From c158042a891cc9f267dd62be368e15e20233e1f4 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Sun, 8 Sep 2024 18:43:25 +0000 Subject: [PATCH] Update to bon 2.2 with the new `#[derive(Builder)]` syntax --- src/api/async_telegram_api_impl.rs | 5 +- src/api/telegram_api_impl.rs | 5 +- src/api_params.rs | 398 +++++++------------- src/objects.rs | 560 ++++++++++------------------- 4 files changed, 324 insertions(+), 644 deletions(-) diff --git a/src/api/async_telegram_api_impl.rs b/src/api/async_telegram_api_impl.rs index fc88337..3aa584c 100644 --- a/src/api/async_telegram_api_impl.rs +++ b/src/api/async_telegram_api_impl.rs @@ -3,15 +3,14 @@ use super::HttpError; use crate::api_traits::AsyncTelegramApi; use crate::api_traits::ErrorResponse; use async_trait::async_trait; -use bon::builder; +use bon::Builder; use reqwest::multipart; use serde_json::Value; use std::path::PathBuf; use std::time::Duration; use tokio::fs::File; -#[builder] -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Builder)] #[must_use = "API needs to be used in order to be useful"] pub struct AsyncApi { #[builder(into)] diff --git a/src/api/telegram_api_impl.rs b/src/api/telegram_api_impl.rs index e3d541d..26567dd 100644 --- a/src/api/telegram_api_impl.rs +++ b/src/api/telegram_api_impl.rs @@ -1,15 +1,14 @@ use super::Error; use super::HttpError; use crate::api_traits::TelegramApi; -use bon::builder; +use bon::Builder; use multipart::client::lazy::Multipart; use serde_json::Value; use std::path::PathBuf; use std::time::Duration; use ureq::Response; -#[builder] -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Builder)] #[must_use = "API needs to be used in order to be useful"] pub struct Api { #[builder(into)] diff --git a/src/api_params.rs b/src/api_params.rs index 8885631..8bcd4e9 100644 --- a/src/api_params.rs +++ b/src/api_params.rs @@ -16,10 +16,10 @@ use crate::objects::{ ReplyKeyboardRemove, ShippingOption, StickerFormat, StickerType, WebAppInfo, }; use crate::{AllowedUpdate, ParseMode}; -use bon::builder; use serde::Deserialize; use serde::Serialize; use std::path::PathBuf; +use bon::Builder; #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] #[serde(untagged)] @@ -196,36 +196,31 @@ pub enum BotCommandScope { ChatMember(BotCommandScopeChatMember), } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BotCommandScopeChat { #[builder(into)] pub chat_id: ChatId, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BotCommandScopeChatAdministrators { #[builder(into)] pub chat_id: ChatId, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BotCommandScopeChatMember { #[builder(into)] pub chat_id: ChatId, pub user_id: u64, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputFile { pub path: PathBuf, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetUpdatesParams { #[serde(skip_serializing_if = "Option::is_none")] pub offset: Option, @@ -240,8 +235,7 @@ pub struct GetUpdatesParams { pub allowed_updates: Option>, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetWebhookParams { #[builder(into)] pub url: String, @@ -267,15 +261,13 @@ pub struct SetWebhookParams { pub secret_token: Option, } -#[builder] -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteWebhookParams { #[serde(skip_serializing_if = "Option::is_none")] pub drop_pending_updates: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendMessageParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -316,8 +308,7 @@ pub struct SendMessageParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ForwardMessageParams { #[builder(into)] pub chat_id: ChatId, @@ -337,8 +328,7 @@ pub struct ForwardMessageParams { pub message_id: i32, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ForwardMessagesParams { #[builder(into)] pub chat_id: ChatId, @@ -358,8 +348,7 @@ pub struct ForwardMessagesParams { pub protect_content: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct CopyMessageParams { #[builder(into)] pub chat_id: ChatId, @@ -398,8 +387,7 @@ pub struct CopyMessageParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct CopyMessagesParams { #[builder(into)] pub chat_id: ChatId, @@ -422,8 +410,7 @@ pub struct CopyMessagesParams { pub remove_caption: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendPhotoParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -471,8 +458,7 @@ pub struct SendPhotoParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendAudioParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -529,8 +515,7 @@ pub struct SendAudioParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendDocumentParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -579,8 +564,7 @@ pub struct SendDocumentParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendVideoParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -644,8 +628,7 @@ pub struct SendVideoParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendAnimationParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -706,8 +689,7 @@ pub struct SendAnimationParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendVoiceParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -752,8 +734,7 @@ pub struct SendVoiceParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendVideoNoteParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -795,8 +776,7 @@ pub struct SendVideoNoteParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendPaidMediaParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -839,8 +819,7 @@ pub struct SendPaidMediaParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendMediaGroupParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -868,8 +847,7 @@ pub struct SendMediaGroupParams { pub reply_parameters: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct SendLocationParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -914,8 +892,7 @@ pub struct SendLocationParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct EditMessageLiveLocationParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -952,8 +929,7 @@ pub struct EditMessageLiveLocationParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct StopMessageLiveLocationParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -974,8 +950,7 @@ pub struct StopMessageLiveLocationParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct SendVenueParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -1030,8 +1005,7 @@ pub struct SendVenueParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendContactParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -1074,8 +1048,7 @@ pub struct SendContactParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendPollParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -1146,8 +1119,7 @@ pub struct SendPollParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendDiceParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -1180,8 +1152,7 @@ pub struct SendDiceParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendChatActionParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -1196,8 +1167,7 @@ pub struct SendChatActionParams { pub action: ChatAction, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetMessageReactionParams { #[builder(into)] pub chat_id: ChatId, @@ -1210,8 +1180,7 @@ pub struct SetMessageReactionParams { pub is_big: Option, } -#[builder] -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetUserProfilePhotosParams { pub user_id: u64, @@ -1222,15 +1191,13 @@ pub struct GetUserProfilePhotosParams { pub limit: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetFileParams { #[builder(into)] pub file_id: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BanChatMemberParams { #[builder(into)] pub chat_id: ChatId, @@ -1244,8 +1211,7 @@ pub struct BanChatMemberParams { pub revoke_messages: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UnbanChatMemberParams { #[builder(into)] pub chat_id: ChatId, @@ -1256,8 +1222,7 @@ pub struct UnbanChatMemberParams { pub only_if_banned: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct RestrictChatMemberParams { #[builder(into)] pub chat_id: ChatId, @@ -1273,8 +1238,7 @@ pub struct RestrictChatMemberParams { pub until_date: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PromoteChatMemberParams { #[builder(into)] pub chat_id: ChatId, @@ -1327,8 +1291,7 @@ pub struct PromoteChatMemberParams { pub can_manage_topics: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetChatAdministratorCustomTitleParams { #[builder(into)] pub chat_id: ChatId, @@ -1339,8 +1302,7 @@ pub struct SetChatAdministratorCustomTitleParams { pub custom_title: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BanChatSenderChatParams { #[builder(into)] pub chat_id: ChatId, @@ -1348,8 +1310,7 @@ pub struct BanChatSenderChatParams { pub sender_chat_id: i64, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UnbanChatSenderChatParams { #[builder(into)] pub chat_id: ChatId, @@ -1357,8 +1318,7 @@ pub struct UnbanChatSenderChatParams { pub sender_chat_id: i64, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetChatPermissionsParams { #[builder(into)] pub chat_id: ChatId, @@ -1369,15 +1329,13 @@ pub struct SetChatPermissionsParams { pub use_independent_chat_permissions: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ExportChatInviteLinkParams { #[builder(into)] pub chat_id: ChatId, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct CreateChatInviteLinkParams { #[builder(into)] pub chat_id: ChatId, @@ -1396,8 +1354,7 @@ pub struct CreateChatInviteLinkParams { pub creates_join_request: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EditChatInviteLinkParams { #[builder(into)] pub chat_id: ChatId, @@ -1419,8 +1376,7 @@ pub struct EditChatInviteLinkParams { pub creates_join_request: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct CreateChatSubscriptionInviteLinkParams { #[builder(into)] pub chat_id: ChatId, @@ -1434,8 +1390,7 @@ pub struct CreateChatSubscriptionInviteLinkParams { pub subscription_price: u16, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EditChatSubscriptionInviteLinkParams { #[builder(into)] pub chat_id: ChatId, @@ -1448,8 +1403,7 @@ pub struct EditChatSubscriptionInviteLinkParams { pub name: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct RevokeChatInviteLinkParams { #[builder(into)] pub chat_id: ChatId, @@ -1458,8 +1412,7 @@ pub struct RevokeChatInviteLinkParams { pub invite_link: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ApproveChatJoinRequestParams { #[builder(into)] pub chat_id: ChatId, @@ -1467,8 +1420,7 @@ pub struct ApproveChatJoinRequestParams { pub user_id: u64, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeclineChatJoinRequestParams { #[builder(into)] pub chat_id: ChatId, @@ -1476,8 +1428,7 @@ pub struct DeclineChatJoinRequestParams { pub user_id: u64, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetChatPhotoParams { #[builder(into)] pub chat_id: ChatId, @@ -1485,15 +1436,13 @@ pub struct SetChatPhotoParams { pub photo: InputFile, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteChatPhotoParams { #[builder(into)] pub chat_id: ChatId, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetChatTitleParams { #[builder(into)] pub chat_id: ChatId, @@ -1502,8 +1451,7 @@ pub struct SetChatTitleParams { pub title: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetChatDescriptionParams { #[builder(into)] pub chat_id: ChatId, @@ -1513,8 +1461,7 @@ pub struct SetChatDescriptionParams { pub description: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PinChatMessageParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -1529,8 +1476,7 @@ pub struct PinChatMessageParams { pub disable_notification: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UnpinChatMessageParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -1543,43 +1489,37 @@ pub struct UnpinChatMessageParams { pub message_id: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UnpinAllChatMessagesParams { #[builder(into)] pub chat_id: ChatId, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct LeaveChatParams { #[builder(into)] pub chat_id: ChatId, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetChatParams { #[builder(into)] pub chat_id: ChatId, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetChatAdministratorsParams { #[builder(into)] pub chat_id: ChatId, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetChatMemberCountParams { #[builder(into)] pub chat_id: ChatId, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetChatMemberParams { #[builder(into)] pub chat_id: ChatId, @@ -1587,8 +1527,7 @@ pub struct GetChatMemberParams { pub user_id: u64, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetChatStickerSetParams { #[builder(into)] pub chat_id: ChatId, @@ -1597,15 +1536,13 @@ pub struct SetChatStickerSetParams { pub sticker_set_name: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteChatStickerSetParams { #[builder(into)] pub chat_id: ChatId, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct CreateForumTopicParams { #[builder(into)] pub chat_id: ChatId, @@ -1621,8 +1558,7 @@ pub struct CreateForumTopicParams { pub icon_custom_emoji_id: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EditForumTopicParams { #[builder(into)] pub chat_id: ChatId, @@ -1638,8 +1574,7 @@ pub struct EditForumTopicParams { pub icon_custom_emoji_id: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct CloseForumTopicParams { #[builder(into)] pub chat_id: ChatId, @@ -1647,8 +1582,7 @@ pub struct CloseForumTopicParams { pub message_thread_id: i32, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ReopenForumTopicParams { #[builder(into)] pub chat_id: ChatId, @@ -1656,8 +1590,7 @@ pub struct ReopenForumTopicParams { pub message_thread_id: i32, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteForumTopicParams { #[builder(into)] pub chat_id: ChatId, @@ -1665,8 +1598,7 @@ pub struct DeleteForumTopicParams { pub message_thread_id: i32, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UnpinAllForumTopicMessagesParams { #[builder(into)] pub chat_id: ChatId, @@ -1674,8 +1606,7 @@ pub struct UnpinAllForumTopicMessagesParams { pub message_thread_id: i32, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EditGeneralForumTopicParams { #[builder(into)] pub chat_id: ChatId, @@ -1684,36 +1615,31 @@ pub struct EditGeneralForumTopicParams { pub name: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct CloseGeneralForumTopicParams { #[builder(into)] pub chat_id: ChatId, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ReopenGeneralForumTopicParams { #[builder(into)] pub chat_id: ChatId, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct HideGeneralForumTopicParams { #[builder(into)] pub chat_id: ChatId, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UnhideGeneralForumTopicParams { #[builder(into)] pub chat_id: ChatId, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct AnswerCallbackQueryParams { #[builder(into)] pub callback_query_id: String, @@ -1733,8 +1659,7 @@ pub struct AnswerCallbackQueryParams { pub cache_time: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetUserChatBoostsParams { #[builder(into)] pub chat_id: ChatId, @@ -1742,15 +1667,13 @@ pub struct GetUserChatBoostsParams { pub user_id: u64, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetBusinessConnectionParams { #[builder(into)] pub business_connection_id: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetMyCommandsParams { pub commands: Vec, @@ -1762,8 +1685,7 @@ pub struct SetMyCommandsParams { pub language_code: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetMyNameParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -1774,16 +1696,14 @@ pub struct SetMyNameParams { pub language_code: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetMyNameParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] pub language_code: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetMyDescriptionParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -1794,16 +1714,14 @@ pub struct SetMyDescriptionParams { pub language_code: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetMyDescriptionParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] pub language_code: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetMyShortDescriptionParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -1814,16 +1732,14 @@ pub struct SetMyShortDescriptionParams { pub language_code: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetMyShortDescriptionParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] pub language_code: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetMyCommandsParams { #[serde(skip_serializing_if = "Option::is_none")] pub scope: Option, @@ -1833,8 +1749,7 @@ pub struct GetMyCommandsParams { pub language_code: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteMyCommandsParams { #[serde(skip_serializing_if = "Option::is_none")] pub scope: Option, @@ -1844,8 +1759,7 @@ pub struct DeleteMyCommandsParams { pub language_code: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EditMessageTextParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -1878,8 +1792,7 @@ pub struct EditMessageTextParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EditMessageCaptionParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -1913,8 +1826,7 @@ pub struct EditMessageCaptionParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EditMessageMediaParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -1937,8 +1849,7 @@ pub struct EditMessageMediaParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EditMessageReplyMarkupParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -1959,8 +1870,7 @@ pub struct EditMessageReplyMarkupParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct StopPollParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -1975,8 +1885,7 @@ pub struct StopPollParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteMessageParams { #[builder(into)] pub chat_id: ChatId, @@ -1984,8 +1893,7 @@ pub struct DeleteMessageParams { pub message_id: i32, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteMessagesParams { #[builder(into)] pub chat_id: ChatId, @@ -1993,8 +1901,7 @@ pub struct DeleteMessagesParams { pub message_ids: Vec, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendStickerParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -2030,15 +1937,13 @@ pub struct SendStickerParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetStickerSetParams { #[builder(into)] pub name: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UploadStickerFileParams { pub user_id: u64, @@ -2047,8 +1952,7 @@ pub struct UploadStickerFileParams { pub sticker_format: StickerFormat, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct CreateNewStickerSetParams { pub user_id: u64, @@ -2067,14 +1971,12 @@ pub struct CreateNewStickerSetParams { pub needs_repainting: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetCustomEmojiStickersParams { pub custom_emoji_ids: Vec, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct AddStickerToSetParams { pub user_id: u64, @@ -2084,8 +1986,7 @@ pub struct AddStickerToSetParams { pub sticker: InputSticker, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetStickerPositionInSetParams { #[builder(into)] pub sticker: String, @@ -2093,15 +1994,13 @@ pub struct SetStickerPositionInSetParams { pub position: u32, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteStickerFromSetParams { #[builder(into)] pub sticker: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct ReplaceStickerInSetParams { pub user_id: u64, @@ -2114,8 +2013,7 @@ pub struct ReplaceStickerInSetParams { pub sticker: InputSticker, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetStickerEmojiListParams { #[builder(into)] pub sticker: String, @@ -2123,8 +2021,7 @@ pub struct SetStickerEmojiListParams { pub emoji_list: Vec, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetStickerKeywordsParams { #[builder(into)] pub sticker: String, @@ -2133,8 +2030,7 @@ pub struct SetStickerKeywordsParams { pub keywords: Option>, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct SetStickerMaskPositionParams { #[builder(into)] pub sticker: String, @@ -2143,8 +2039,7 @@ pub struct SetStickerMaskPositionParams { pub mask_position: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetStickerSetTitleParams { #[builder(into)] pub name: String, @@ -2153,8 +2048,7 @@ pub struct SetStickerSetTitleParams { pub title: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetStickerSetThumbnailParams { #[builder(into)] pub name: String, @@ -2168,8 +2062,7 @@ pub struct SetStickerSetThumbnailParams { pub format: StickerFormat, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetCustomEmojiStickerSetThumbnailParams { #[builder(into)] pub name: String, @@ -2179,15 +2072,13 @@ pub struct SetCustomEmojiStickerSetThumbnailParams { pub custom_emoji_id: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteStickerSetParams { #[builder(into)] pub name: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct AnswerInlineQueryParams { #[builder(into)] pub inline_query_id: String, @@ -2208,8 +2099,7 @@ pub struct AnswerInlineQueryParams { pub button: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InlineQueryResultsButton { #[builder(into)] pub text: String, @@ -2222,8 +2112,7 @@ pub struct InlineQueryResultsButton { pub start_parameter: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendInvoiceParams { #[builder(into)] pub chat_id: ChatId, @@ -2314,8 +2203,7 @@ pub struct SendInvoiceParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct CreateInvoiceLinkParams { #[builder(into)] pub title: String, @@ -2380,8 +2268,7 @@ pub struct CreateInvoiceLinkParams { pub is_flexible: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct AnswerShippingQueryParams { #[builder(into)] pub shipping_query_id: String, @@ -2396,8 +2283,7 @@ pub struct AnswerShippingQueryParams { pub error_message: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct AnswerPreCheckoutQueryParams { #[builder(into)] pub pre_checkout_query_id: String, @@ -2409,32 +2295,28 @@ pub struct AnswerPreCheckoutQueryParams { pub error_message: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetStarTransactionsParams { offset: u32, limit: u32, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct RefundStarPaymentParams { pub user_id: u64, pub telegram_payment_charge_id: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetPassportDataErrorsParams { pub user_id: u64, pub errors: Vec, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendGameParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -2465,8 +2347,7 @@ pub struct SendGameParams { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetGameScoreParams { pub user_id: u64, @@ -2489,8 +2370,7 @@ pub struct SetGameScoreParams { pub inline_message_id: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetGameHighScoresParams { pub user_id: u64, @@ -2505,8 +2385,7 @@ pub struct GetGameHighScoresParams { pub inline_message_id: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputMediaPhoto { #[builder(into)] pub media: FileUpload, @@ -2528,8 +2407,7 @@ pub struct InputMediaPhoto { pub has_spoiler: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputMediaVideo { #[builder(into)] pub media: FileUpload, @@ -2567,8 +2445,7 @@ pub struct InputMediaVideo { pub has_spoiler: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputMediaAnimation { #[builder(into)] pub media: FileUpload, @@ -2603,8 +2480,7 @@ pub struct InputMediaAnimation { pub has_spoiler: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputMediaAudio { #[builder(into)] pub media: FileUpload, @@ -2635,8 +2511,7 @@ pub struct InputMediaAudio { pub title: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputMediaDocument { #[builder(into)] pub media: FileUpload, @@ -2659,8 +2534,7 @@ pub struct InputMediaDocument { pub disable_content_type_detection: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetMyDefaultAdministratorRightsParams { pub rights: ChatAdministratorRights, @@ -2668,14 +2542,12 @@ pub struct SetMyDefaultAdministratorRightsParams { pub for_channels: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetMyDefaultAdministratorRightsParams { #[serde(skip_serializing_if = "Option::is_none")] pub for_channels: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct AnswerWebAppQueryParams { #[builder(into)] pub web_app_query_id: String, @@ -2683,8 +2555,7 @@ pub struct AnswerWebAppQueryParams { pub result: InlineQueryResult, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetChatMenuButtonParams { #[serde(skip_serializing_if = "Option::is_none")] pub chat_id: Option, @@ -2693,22 +2564,19 @@ pub struct SetChatMenuButtonParams { pub menu_button: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetChatMenuButtonParams { #[serde(skip_serializing_if = "Option::is_none")] pub chat_id: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UnpinAllGeneralForumTopicMessagesParams { #[builder(into)] pub chat_id: ChatId, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ReplyParameters { pub message_id: i32, diff --git a/src/objects.rs b/src/objects.rs index 637a081..3dd9e98 100644 --- a/src/objects.rs +++ b/src/objects.rs @@ -1,6 +1,6 @@ #![allow(deprecated)] use super::api_params::FileUpload; -use bon::builder; +use bon::Builder; use serde::{Deserialize, Serialize}; use crate::ParseMode; @@ -187,8 +187,7 @@ pub enum BackgroundFill { FreeformGradient(BackgroundFillFreeformGradient), } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct MenuButtonWebApp { #[builder(into)] pub text: String, @@ -196,8 +195,7 @@ pub struct MenuButtonWebApp { pub web_app: WebAppInfo, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatMemberOwner { pub user: User, @@ -208,8 +206,7 @@ pub struct ChatMemberOwner { pub is_anonymous: bool, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatMemberAdministrator { pub user: User, @@ -257,8 +254,7 @@ pub struct ChatMemberAdministrator { pub custom_title: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatMemberMember { pub user: User, @@ -266,8 +262,7 @@ pub struct ChatMemberMember { pub until_date: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatMemberRestricted { pub user: User, @@ -304,49 +299,41 @@ pub struct ChatMemberRestricted { pub until_date: u64, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatMemberLeft { pub user: User, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatMemberBanned { pub user: User, pub until_date: u64, } -#[builder] -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct VideoChatStarted {} -#[builder] -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct VideoChatScheduled { pub start_date: u64, } -#[builder] -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct CallbackGame {} -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BotDescription { #[builder(into)] pub description: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BotName { #[builder(into)] pub name: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BotShortDescription { #[builder(into)] pub short_description: String, @@ -392,8 +379,7 @@ pub enum UpdateContent { PurchasedPaidMedia(PaidMediaPurchased), } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct WebhookInfo { #[builder(into)] pub url: String, @@ -450,8 +436,7 @@ pub enum AllowedUpdate { RemovedChatBoost, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct User { pub id: u64, @@ -494,8 +479,7 @@ pub struct User { pub has_main_web_app: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Chat { pub id: i64, @@ -522,8 +506,7 @@ pub struct Chat { pub is_forum: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct ChatFullInfo { pub id: i64, @@ -671,8 +654,7 @@ pub struct ChatFullInfo { pub location: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct Message { pub message_id: i32, @@ -984,14 +966,12 @@ pub struct Message { pub reply_markup: Option>, } -#[builder] -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct MessageId { pub message_id: i32, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct MessageEntity { #[serde(rename = "type")] pub type_field: MessageEntityType, @@ -1016,8 +996,7 @@ pub struct MessageEntity { pub custom_emoji_id: Option, } -#[builder] -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct TextQuote { #[builder(into)] pub text: String, @@ -1031,8 +1010,7 @@ pub struct TextQuote { pub is_manual: Option, } -#[builder] -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Builder)] pub struct ExternalReplyInfo { #[serde(skip_serializing_if = "Option::is_none")] pub origin: Option, @@ -1116,23 +1094,20 @@ pub enum MessageOrigin { Channel(MessageOriginChannel), } -#[builder] -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct MessageOriginUser { pub date: u64, pub sender_user: User, } -#[builder] -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct MessageOriginHiddenUser { pub date: u64, #[builder(into)] pub sender_user_name: String, } -#[builder] -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct MessageOriginChat { pub date: u64, @@ -1143,8 +1118,7 @@ pub struct MessageOriginChat { pub author_signature: Option, } -#[builder] -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct MessageOriginChannel { pub date: u64, @@ -1157,8 +1131,7 @@ pub struct MessageOriginChannel { pub author_signature: Option, } -#[builder] -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct LinkPreviewOptions { #[serde(skip_serializing_if = "Option::is_none")] pub is_disabled: Option, @@ -1177,8 +1150,7 @@ pub struct LinkPreviewOptions { pub show_above_text: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PhotoSize { #[builder(into)] pub file_id: String, @@ -1194,8 +1166,7 @@ pub struct PhotoSize { pub file_size: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Animation { #[builder(into)] pub file_id: String, @@ -1224,8 +1195,7 @@ pub struct Animation { pub file_size: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Audio { #[builder(into)] pub file_id: String, @@ -1258,8 +1228,7 @@ pub struct Audio { pub thumbnail: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Document { #[builder(into)] pub file_id: String, @@ -1282,8 +1251,7 @@ pub struct Document { pub file_size: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Video { #[builder(into)] pub file_id: String, @@ -1312,8 +1280,7 @@ pub struct Video { pub file_size: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct VideoNote { #[builder(into)] pub file_id: String, @@ -1332,8 +1299,7 @@ pub struct VideoNote { pub file_size: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Voice { #[builder(into)] pub file_id: String, @@ -1351,8 +1317,7 @@ pub struct Voice { pub file_size: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Contact { #[builder(into)] pub phone_number: String, @@ -1372,8 +1337,7 @@ pub struct Contact { pub vcard: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Dice { #[builder(into)] pub emoji: String, @@ -1381,8 +1345,7 @@ pub struct Dice { pub value: u8, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PollOption { #[builder(into)] pub text: String, @@ -1393,8 +1356,7 @@ pub struct PollOption { pub voter_count: u32, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputPollOption { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -1407,8 +1369,7 @@ pub struct InputPollOption { pub text_entities: Option>, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PollAnswer { #[builder(into)] pub poll_id: String, @@ -1423,8 +1384,7 @@ pub struct PollAnswer { pub option_ids: Vec, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Poll { #[builder(into)] pub id: String, @@ -1464,8 +1424,7 @@ pub struct Poll { pub close_date: Option, } -#[builder] -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Builder)] pub struct Location { pub longitude: f64, @@ -1484,8 +1443,7 @@ pub struct Location { pub proximity_alert_radius: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct Venue { pub location: Location, @@ -1512,8 +1470,7 @@ pub struct Venue { pub google_place_type: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ProximityAlertTriggered { pub traveler: User, @@ -1522,26 +1479,22 @@ pub struct ProximityAlertTriggered { pub distance: u32, } -#[builder] -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct MessageAutoDeleteTimerChanged { pub message_auto_delete_time: u32, } -#[builder] -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatBoostAdded { pub boost_count: u32, } -#[builder] -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BackgroundFillSolid { pub color: u32, } -#[builder] -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BackgroundFillGradient { pub top_color: u32, @@ -1550,22 +1503,19 @@ pub struct BackgroundFillGradient { pub rotation_angle: u16, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BackgroundFillFreeformGradient { pub colors: Vec, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BackgroundTypeFill { pub fill: BackgroundFill, pub dark_theme_dimming: u8, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BackgroundTypeWallpaper { pub document: Document, @@ -1578,8 +1528,7 @@ pub struct BackgroundTypeWallpaper { pub is_moving: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BackgroundTypePattern { pub document: Document, @@ -1594,15 +1543,13 @@ pub struct BackgroundTypePattern { pub is_moving: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BackgroundTypeChatTheme { #[builder(into)] pub theme_name: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ForumTopicCreated { #[builder(into)] pub name: String, @@ -1614,12 +1561,10 @@ pub struct ForumTopicCreated { pub icon_custom_emoji_id: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ForumTopicClosed {} -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ForumTopicEdited { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -1630,20 +1575,16 @@ pub struct ForumTopicEdited { pub icon_custom_emoji_id: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ForumTopicReopened {} -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GeneralForumTopicHidden {} -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GeneralForumTopicUnhidden {} -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SharedUser { pub user_id: u64, @@ -1663,16 +1604,14 @@ pub struct SharedUser { pub photo: Option>, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UsersShared { pub request_id: i32, pub users: Vec, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatShared { pub request_id: i32, @@ -1690,8 +1629,7 @@ pub struct ChatShared { pub photo: Option>, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct WriteAccessAllowed { #[serde(skip_serializing_if = "Option::is_none")] pub from_request: Option, @@ -1704,29 +1642,25 @@ pub struct WriteAccessAllowed { pub from_attachment_menu: Option, } -#[builder] -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct VideoChatEnded { pub duration: u32, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct VideoChatParticipantsInvited { #[serde(skip_serializing_if = "Option::is_none")] pub users: Option>, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UserProfilePhotos { pub total_count: u32, pub photos: Vec>, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct File { #[builder(into)] pub file_id: String, @@ -1742,8 +1676,7 @@ pub struct File { pub file_path: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ReplyKeyboardMarkup { pub keyboard: Vec>, @@ -1764,8 +1697,7 @@ pub struct ReplyKeyboardMarkup { pub selective: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct KeyboardButton { #[builder(into)] pub text: String, @@ -1789,8 +1721,7 @@ pub struct KeyboardButton { pub web_app: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct KeyboardButtonRequestUsers { pub request_id: i32, @@ -1813,8 +1744,7 @@ pub struct KeyboardButtonRequestUsers { pub request_photo: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct KeyboardButtonRequestChat { pub request_id: i32, @@ -1848,16 +1778,14 @@ pub struct KeyboardButtonRequestChat { pub request_photo: Option, } -#[builder] -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct KeyboardButtonPollType { #[serde(rename = "type")] #[serde(skip_serializing_if = "Option::is_none")] pub type_field: Option, } -#[builder] -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ReplyKeyboardRemove { pub remove_keyboard: bool, @@ -1865,14 +1793,12 @@ pub struct ReplyKeyboardRemove { pub selective: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InlineKeyboardMarkup { pub inline_keyboard: Vec>, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InlineKeyboardButton { #[builder(into)] pub text: String, @@ -1909,8 +1835,7 @@ pub struct InlineKeyboardButton { pub pay: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct LoginUrl { #[builder(into)] pub url: String, @@ -1927,8 +1852,7 @@ pub struct LoginUrl { pub request_write_access: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SwitchInlineQueryChosenChat { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -1947,8 +1871,7 @@ pub struct SwitchInlineQueryChosenChat { pub allow_channel_chats: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct CallbackQuery { #[builder(into)] pub id: String, @@ -1974,8 +1897,7 @@ pub struct CallbackQuery { pub game_short_name: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ForceReply { pub force_reply: bool, @@ -1987,8 +1909,7 @@ pub struct ForceReply { pub selective: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatPhoto { #[builder(into)] pub small_file_id: String, @@ -2003,8 +1924,7 @@ pub struct ChatPhoto { pub big_file_unique_id: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatInviteLink { #[builder(into)] pub invite_link: String, @@ -2031,8 +1951,7 @@ pub struct ChatInviteLink { pub pending_join_request_count: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatMemberUpdated { pub chat: Chat, @@ -2054,8 +1973,7 @@ pub struct ChatMemberUpdated { pub via_chat_folder_invite_link: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatJoinRequest { pub chat: Chat, @@ -2073,8 +1991,7 @@ pub struct ChatJoinRequest { pub invite_link: Option, } -#[builder] -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatPermissions { #[serde(skip_serializing_if = "Option::is_none")] pub can_send_messages: Option, @@ -2119,8 +2036,7 @@ pub struct ChatPermissions { pub can_manage_topics: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Birthdate { pub day: u8, @@ -2129,8 +2045,7 @@ pub struct Birthdate { pub year: u16, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct BusinessIntro { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -2144,8 +2059,7 @@ pub struct BusinessIntro { pub sticker: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct BusinessLocation { #[builder(into)] pub address: String, @@ -2154,24 +2068,21 @@ pub struct BusinessLocation { pub location: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BusinessOpeningHoursInterval { pub opening_minute: u16, pub closing_minute: u16, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BusinessOpeningHours { pub time_zone_name: String, pub opening_hours: Vec, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct ChatLocation { pub location: Location, @@ -2187,26 +2098,22 @@ pub enum ReactionType { Paid(ReactionTypePaid), } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ReactionTypeEmoji { #[builder(into)] pub emoji: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ReactionTypeCustomEmoji { #[builder(into)] pub custom_emoji_id: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ReactionTypePaid {} -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ReactionCount { #[serde(rename = "type")] pub type_field: ReactionType, @@ -2214,8 +2121,7 @@ pub struct ReactionCount { pub total_count: i32, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct MessageReactionUpdated { pub chat: Chat, @@ -2234,8 +2140,7 @@ pub struct MessageReactionUpdated { pub new_reaction: Vec, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct MessageReactionCountUpdated { pub chat: Chat, @@ -2246,8 +2151,7 @@ pub struct MessageReactionCountUpdated { pub reactions: Vec, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq, Builder)] pub struct ForumTopic { pub message_thread_id: i32, @@ -2261,8 +2165,7 @@ pub struct ForumTopic { pub icon_custom_emoji_id: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BotCommand { #[builder(into)] pub command: String, @@ -2271,8 +2174,7 @@ pub struct BotCommand { pub description: String, } -#[builder] -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ResponseParameters { #[serde(skip_serializing_if = "Option::is_none")] pub migrate_to_chat_id: Option, @@ -2281,8 +2183,7 @@ pub struct ResponseParameters { pub retry_after: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct Sticker { #[builder(into)] pub file_id: String, @@ -2329,8 +2230,7 @@ pub struct Sticker { pub file_size: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InputSticker { pub sticker: FileUpload, pub format: StickerFormat, @@ -2343,15 +2243,13 @@ pub struct InputSticker { pub keywords: Option>, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Story { pub chat: Chat, pub id: u64, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct StickerSet { #[builder(into)] pub name: String, @@ -2372,8 +2270,7 @@ pub struct StickerSet { pub thumbnail: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct MaskPosition { #[builder(into)] pub point: String, @@ -2385,8 +2282,7 @@ pub struct MaskPosition { pub scale: f64, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InlineQuery { #[builder(into)] pub id: String, @@ -2407,8 +2303,7 @@ pub struct InlineQuery { pub offset: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InlineQueryResultArticle { #[builder(into)] pub id: String, @@ -2443,8 +2338,7 @@ pub struct InlineQueryResultArticle { pub thumbnail_height: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InlineQueryResultPhoto { #[builder(into)] pub id: String, @@ -2489,8 +2383,7 @@ pub struct InlineQueryResultPhoto { pub input_message_content: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InlineQueryResultGif { #[builder(into)] pub id: String, @@ -2538,8 +2431,7 @@ pub struct InlineQueryResultGif { pub input_message_content: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InlineQueryResultMpeg4Gif { #[builder(into)] pub id: String, @@ -2587,8 +2479,7 @@ pub struct InlineQueryResultMpeg4Gif { pub input_message_content: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InlineQueryResultVideo { #[builder(into)] pub id: String, @@ -2638,8 +2529,7 @@ pub struct InlineQueryResultVideo { pub input_message_content: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InlineQueryResultAudio { #[builder(into)] pub id: String, @@ -2674,8 +2564,7 @@ pub struct InlineQueryResultAudio { pub input_message_content: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InlineQueryResultVoice { #[builder(into)] pub id: String, @@ -2706,8 +2595,7 @@ pub struct InlineQueryResultVoice { pub input_message_content: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InlineQueryResultDocument { #[builder(into)] pub id: String, @@ -2752,8 +2640,7 @@ pub struct InlineQueryResultDocument { pub thumbnail_height: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InlineQueryResultLocation { #[builder(into)] pub id: String, @@ -2794,8 +2681,7 @@ pub struct InlineQueryResultLocation { pub thumbnail_height: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InlineQueryResultVenue { #[builder(into)] pub id: String, @@ -2843,8 +2729,7 @@ pub struct InlineQueryResultVenue { pub thumbnail_height: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InlineQueryResultContact { #[builder(into)] pub id: String, @@ -2880,8 +2765,7 @@ pub struct InlineQueryResultContact { pub thumbnail_height: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InlineQueryResultGame { #[builder(into)] pub id: String, @@ -2893,8 +2777,7 @@ pub struct InlineQueryResultGame { pub reply_markup: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InlineQueryResultCachedPhoto { #[builder(into)] pub id: String, @@ -2930,8 +2813,7 @@ pub struct InlineQueryResultCachedPhoto { pub input_message_content: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InlineQueryResultCachedGif { #[builder(into)] pub id: String, @@ -2963,8 +2845,7 @@ pub struct InlineQueryResultCachedGif { pub input_message_content: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InlineQueryResultCachedMpeg4Gif { #[builder(into)] pub id: String, @@ -2996,8 +2877,7 @@ pub struct InlineQueryResultCachedMpeg4Gif { pub input_message_content: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InlineQueryResultCachedSticker { #[builder(into)] pub id: String, @@ -3012,8 +2892,7 @@ pub struct InlineQueryResultCachedSticker { pub input_message_content: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InlineQueryResultCachedDocument { #[builder(into)] pub id: String, @@ -3045,8 +2924,7 @@ pub struct InlineQueryResultCachedDocument { pub input_message_content: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InlineQueryResultCachedVideo { #[builder(into)] pub id: String, @@ -3081,8 +2959,7 @@ pub struct InlineQueryResultCachedVideo { pub input_message_content: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InlineQueryResultCachedVoice { #[builder(into)] pub id: String, @@ -3110,8 +2987,7 @@ pub struct InlineQueryResultCachedVoice { pub input_message_content: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InlineQueryResultCachedAudio { #[builder(into)] pub id: String, @@ -3136,8 +3012,7 @@ pub struct InlineQueryResultCachedAudio { pub input_message_content: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputTextMessageContent { #[builder(into)] pub message_text: String, @@ -3152,8 +3027,7 @@ pub struct InputTextMessageContent { pub link_preview_options: Option, } -#[builder] -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Builder)] pub struct InputLocationMessageContent { pub latitude: f64, @@ -3172,8 +3046,7 @@ pub struct InputLocationMessageContent { pub proximity_alert_radius: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputInvoiceMessageContent { #[builder(into)] pub title: String, @@ -3238,8 +3111,7 @@ pub struct InputInvoiceMessageContent { pub is_flexible: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct InputVenueMessageContent { pub latitude: f64, @@ -3268,8 +3140,7 @@ pub struct InputVenueMessageContent { pub google_place_type: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputContactMessageContent { #[builder(into)] pub phone_number: String, @@ -3286,8 +3157,7 @@ pub struct InputContactMessageContent { pub vcard: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct ChosenInlineResult { #[builder(into)] pub result_id: String, @@ -3305,8 +3175,7 @@ pub struct ChosenInlineResult { pub query: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct LabeledPrice { #[builder(into)] pub label: String, @@ -3314,8 +3183,7 @@ pub struct LabeledPrice { pub amount: u32, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Invoice { #[builder(into)] pub title: String, @@ -3332,8 +3200,7 @@ pub struct Invoice { pub total_amount: u32, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PaidMediaInfo { pub star_count: u32, @@ -3348,8 +3215,7 @@ pub enum PaidMedia { Video(PaidMediaVideo), } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PaidMediaPreview { #[serde(skip_serializing_if = "Option::is_none")] pub width: Option, @@ -3378,15 +3244,13 @@ pub enum InputPaidMedia { Video(InputPaidMediaVideo), } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputPaidMediaPhoto { #[builder(into)] pub media: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputPaidMediaVideo { #[builder(into)] pub media: String, @@ -3407,8 +3271,7 @@ pub struct InputPaidMediaVideo { pub supports_streaming: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ShippingAddress { #[builder(into)] pub country_code: String, @@ -3429,8 +3292,7 @@ pub struct ShippingAddress { pub post_code: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct OrderInfo { #[serde(skip_serializing_if = "Option::is_none")] #[builder(into)] @@ -3448,8 +3310,7 @@ pub struct OrderInfo { pub shipping_address: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ShippingOption { #[builder(into)] pub id: String, @@ -3460,8 +3321,7 @@ pub struct ShippingOption { pub prices: Vec, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SuccessfulPayment { #[builder(into)] pub currency: String, @@ -3485,8 +3345,7 @@ pub struct SuccessfulPayment { pub provider_payment_charge_id: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct RefundedPayment { #[builder(into)] pub currency: String, @@ -3503,8 +3362,7 @@ pub struct RefundedPayment { pub provider_payment_charge_id: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ShippingQuery { #[builder(into)] pub id: String, @@ -3517,8 +3375,7 @@ pub struct ShippingQuery { pub shipping_address: ShippingAddress, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PreCheckoutQuery { #[builder(into)] pub id: String, @@ -3541,8 +3398,7 @@ pub struct PreCheckoutQuery { pub order_info: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PaidMediaPurchased { pub from: User, @@ -3550,16 +3406,14 @@ pub struct PaidMediaPurchased { pub paid_media_payload: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportData { pub data: Vec, pub credentials: EncryptedCredentials, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportFile { #[builder(into)] pub file_id: String, @@ -3572,8 +3426,7 @@ pub struct PassportFile { pub file_date: u64, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EncryptedPassportElement { #[serde(rename = "type")] pub type_field: EncryptedPassportElementType, @@ -3609,8 +3462,7 @@ pub struct EncryptedPassportElement { pub hash: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EncryptedCredentials { #[builder(into)] pub data: String, @@ -3622,8 +3474,7 @@ pub struct EncryptedCredentials { pub secret: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportElementErrorDataField { #[serde(rename = "type")] pub type_field: PassportElementErrorDataFieldType, @@ -3638,8 +3489,7 @@ pub struct PassportElementErrorDataField { pub message: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportElementErrorFrontSide { #[serde(rename = "type")] pub type_field: PassportElementErrorFrontSideType, @@ -3651,8 +3501,7 @@ pub struct PassportElementErrorFrontSide { pub message: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportElementErrorReverseSide { #[serde(rename = "type")] pub type_field: PassportElementErrorReverseSideType, @@ -3664,8 +3513,7 @@ pub struct PassportElementErrorReverseSide { pub message: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportElementErrorSelfie { #[serde(rename = "type")] pub type_field: PassportElementErrorSelfieType, @@ -3677,8 +3525,7 @@ pub struct PassportElementErrorSelfie { pub message: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportElementErrorFile { #[serde(rename = "type")] pub type_field: PassportElementErrorFileType, @@ -3690,8 +3537,7 @@ pub struct PassportElementErrorFile { pub message: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportElementErrorFiles { #[serde(rename = "type")] pub type_field: PassportElementErrorFileType, @@ -3702,8 +3548,7 @@ pub struct PassportElementErrorFiles { pub message: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportElementErrorTranslationFile { #[serde(rename = "type")] pub type_field: PassportElementErrorTranslationFileType, @@ -3715,8 +3560,7 @@ pub struct PassportElementErrorTranslationFile { pub message: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportElementErrorTranslationFiles { #[serde(rename = "type")] pub type_field: PassportElementErrorTranslationFileType, @@ -3727,8 +3571,7 @@ pub struct PassportElementErrorTranslationFiles { pub message: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportElementErrorUnspecified { #[serde(rename = "type")] pub type_field: EncryptedPassportElementType, @@ -3740,8 +3583,7 @@ pub struct PassportElementErrorUnspecified { pub message: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Game { #[builder(into)] pub title: String, @@ -3762,8 +3604,7 @@ pub struct Game { pub animation: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GameHighScore { pub position: u32, @@ -3772,15 +3613,13 @@ pub struct GameHighScore { pub score: i32, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GiveawayCreated { #[serde(skip_serializing_if = "Option::is_none")] pub prize_star_count: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Giveaway { pub chats: Vec, @@ -3808,8 +3647,7 @@ pub struct Giveaway { pub premium_subscription_month_count: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GiveawayWinners { pub chat: Chat, @@ -3844,8 +3682,7 @@ pub struct GiveawayWinners { pub prize_description: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct GiveawayCompleted { pub winner_count: u32, @@ -3860,8 +3697,7 @@ pub struct GiveawayCompleted { pub is_star_giveaway: Option, } -#[builder] -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatAdministratorRights { pub is_anonymous: bool, @@ -3901,22 +3737,19 @@ pub struct ChatAdministratorRights { pub can_manage_topics: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct WebAppInfo { #[builder(into)] pub url: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SentWebAppMessage { #[builder(into)] pub inline_message_id: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct WebAppData { #[builder(into)] pub data: String, @@ -3933,20 +3766,17 @@ pub enum ChatBoostSource { Giveaway(ChatBoostSourceGiveaway), } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatBoostSourcePremium { pub user: User, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatBoostSourceGiftCode { pub user: User, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatBoostSourceGiveaway { pub giveaway_message_id: i32, @@ -3960,8 +3790,7 @@ pub struct ChatBoostSourceGiveaway { pub is_unclaimed: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatBoost { #[builder(into)] pub boost_id: String, @@ -3973,16 +3802,14 @@ pub struct ChatBoost { pub source: ChatBoostSource, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatBoostUpdated { pub chat: Chat, pub boost: ChatBoost, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatBoostRemoved { pub chat: Chat, @@ -3994,14 +3821,12 @@ pub struct ChatBoostRemoved { pub source: ChatBoostSource, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UserChatBoosts { pub boosts: Vec, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BusinessConnection { #[builder(into)] pub id: String, @@ -4017,8 +3842,7 @@ pub struct BusinessConnection { pub is_enabled: bool, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BusinessMessagesDeleted { #[builder(into)] pub business_connection_id: String, @@ -4035,8 +3859,7 @@ pub enum MaybeInaccessibleMessage { InaccessibleMessage(InaccessibleMessage), } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InaccessibleMessage { pub chat: Chat, @@ -4053,12 +3876,10 @@ pub enum RevenueWithdrawalState { Failed(RevenueWithdrawalStateFailed), } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct RevenueWithdrawalStatePending {} -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct RevenueWithdrawalStateSucceeded { pub date: u64, @@ -4066,8 +3887,7 @@ pub struct RevenueWithdrawalStateSucceeded { pub url: String, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct RevenueWithdrawalStateFailed {} #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] @@ -4079,8 +3899,7 @@ pub enum TransactionPartner { Other(TransactionPartnerOther), } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct TransactionPartnerUser { pub user: User, @@ -4092,23 +3911,19 @@ pub struct TransactionPartnerUser { pub paid_media: Option>, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct TransactionPartnerFragment { #[serde(skip_serializing_if = "Option::is_none")] pub withdrawal_state: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct TransactionPartnerTelegramAds {} -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct TransactionPartnerOther {} -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct StarTransaction { #[builder(into)] pub id: String, @@ -4124,8 +3939,7 @@ pub struct StarTransaction { pub receiver: Option, } -#[builder] -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct StarTransactions { pub transactions: Vec, }