diff --git a/Cargo.toml b/Cargo.toml index 5dd331c..a157b8e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -76,7 +76,7 @@ required-features = ["telegram-trait"] [dependencies] thiserror = "1" -typed-builder = "0.19" +bon = "2.2.0" [dependencies.async-trait] version = "0.1" diff --git a/src/api/async_telegram_api_impl.rs b/src/api/async_telegram_api_impl.rs index 501df7f..3aa584c 100644 --- a/src/api/async_telegram_api_impl.rs +++ b/src/api/async_telegram_api_impl.rs @@ -3,20 +3,25 @@ use super::HttpError; use crate::api_traits::AsyncTelegramApi; use crate::api_traits::ErrorResponse; use async_trait::async_trait; +use bon::Builder; use reqwest::multipart; use serde_json::Value; use std::path::PathBuf; use std::time::Duration; use tokio::fs::File; -use typed_builder::TypedBuilder; -#[derive(Debug, Clone, TypedBuilder)] +#[derive(Debug, Clone, Builder)] #[must_use = "API needs to be used in order to be useful"] pub struct AsyncApi { - #[builder(setter(into))] + #[builder(into)] pub api_url: String, + #[builder( - default_code = "reqwest::ClientBuilder::new().connect_timeout(Duration::from_secs(10)).timeout(Duration::from_secs(500)).build().unwrap()" + default = reqwest::ClientBuilder::new() + .connect_timeout(Duration::from_secs(10)) + .timeout(Duration::from_secs(500)) + .build() + .unwrap() )] pub client: reqwest::Client, } diff --git a/src/api/telegram_api_impl.rs b/src/api/telegram_api_impl.rs index a1c2151..26567dd 100644 --- a/src/api/telegram_api_impl.rs +++ b/src/api/telegram_api_impl.rs @@ -1,19 +1,20 @@ use super::Error; use super::HttpError; use crate::api_traits::TelegramApi; +use bon::Builder; use multipart::client::lazy::Multipart; use serde_json::Value; use std::path::PathBuf; use std::time::Duration; -use typed_builder::TypedBuilder; use ureq::Response; -#[derive(Debug, Clone, TypedBuilder)] +#[derive(Debug, Clone, Builder)] #[must_use = "API needs to be used in order to be useful"] pub struct Api { - #[builder(setter(into))] + #[builder(into)] pub api_url: String, - #[builder(default_code = "ureq::builder().timeout(Duration::from_secs(500)).build()")] + + #[builder(default = ureq::builder().timeout(Duration::from_secs(500)).build())] pub request_agent: ureq::Agent, } diff --git a/src/api_params.rs b/src/api_params.rs index a99d6f0..ef7bb9c 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 typed_builder::TypedBuilder as Builder; #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] #[serde(untagged)] @@ -198,19 +198,19 @@ pub enum BotCommandScope { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BotCommandScopeChat { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BotCommandScopeChatAdministrators { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BotCommandScopeChatMember { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, pub user_id: u64, } @@ -223,126 +223,106 @@ pub struct InputFile { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetUpdatesParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub offset: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub limit: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub timeout: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub allowed_updates: Option>, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetWebhookParams { - #[builder(setter(into))] + #[builder(into)] pub url: String, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub certificate: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub ip_address: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub max_connections: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub allowed_updates: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub drop_pending_updates: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub secret_token: Option, } #[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteWebhookParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub drop_pending_updates: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendMessageParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, - #[builder(setter(into))] + #[builder(into)] pub text: String, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub parse_mode: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub entities: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub link_preview_options: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub message_effect_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_parameters: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ForwardMessageParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, - #[builder(setter(into))] + #[builder(into)] pub from_chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, pub message_id: i32, @@ -350,539 +330,459 @@ pub struct ForwardMessageParams { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ForwardMessagesParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, - #[builder(setter(into))] + #[builder(into)] pub from_chat_id: ChatId, pub message_ids: Vec, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct CopyMessageParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, - #[builder(setter(into))] + #[builder(into)] pub from_chat_id: ChatId, pub message_id: i32, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub caption: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub parse_mode: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub caption_entities: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub show_caption_above_media: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_parameters: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct CopyMessagesParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, - #[builder(setter(into))] + #[builder(into)] pub from_chat_id: ChatId, pub message_ids: Vec, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub remove_caption: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendPhotoParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, - #[builder(setter(into))] + #[builder(into)] pub photo: FileUpload, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub caption: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub parse_mode: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub caption_entities: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub show_caption_above_media: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub has_spoiler: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub message_effect_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_parameters: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendAudioParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, - #[builder(setter(into))] + #[builder(into)] pub audio: FileUpload, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub caption: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub parse_mode: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub caption_entities: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub duration: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub performer: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub title: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub thumbnail: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub message_effect_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_parameters: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendDocumentParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, - #[builder(setter(into))] + #[builder(into)] pub document: FileUpload, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub thumbnail: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub caption: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub parse_mode: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub caption_entities: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_content_type_detection: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub message_effect_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_parameters: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendVideoParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, - #[builder(setter(into))] + #[builder(into)] pub video: FileUpload, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub duration: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub width: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub height: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub thumbnail: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub caption: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub parse_mode: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub caption_entities: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub show_caption_above_media: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub has_spoiler: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub supports_streaming: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub message_effect_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_parameters: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendAnimationParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, - #[builder(setter(into))] + #[builder(into)] pub animation: FileUpload, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub duration: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub width: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub height: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub thumbnail: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub caption: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub parse_mode: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub caption_entities: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub show_caption_above_media: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub has_spoiler: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub message_effect_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_parameters: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendVoiceParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, - #[builder(setter(into))] + #[builder(into)] pub voice: FileUpload, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub caption: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub parse_mode: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub caption_entities: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub duration: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub message_effect_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_parameters: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendVideoNoteParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, - #[builder(setter(into))] + #[builder(into)] pub video_note: FileUpload, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub duration: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub length: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub thumbnail: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub message_effect_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_parameters: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendPaidMediaParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, pub star_count: u32, @@ -890,85 +790,73 @@ pub struct SendPaidMediaParams { pub media: Vec, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub payload: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub caption: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub parse_mode: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub caption_entities: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub show_caption_above_media: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_parameters: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendMediaGroupParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, pub media: Vec, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub message_effect_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_parameters: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct SendLocationParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, pub latitude: f64, @@ -976,58 +864,49 @@ pub struct SendLocationParams { pub longitude: f64, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub horizontal_accuracy: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub live_period: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub heading: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub proximity_alert_radius: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub message_effect_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_parameters: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct EditMessageLiveLocationParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub chat_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub inline_message_id: Option, pub latitude: f64, @@ -1035,293 +914,254 @@ pub struct EditMessageLiveLocationParams { pub longitude: f64, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub live_period: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub horizontal_accuracy: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub heading: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub proximity_alert_radius: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct StopMessageLiveLocationParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub chat_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub inline_message_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct SendVenueParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, pub latitude: f64, pub longitude: f64, - #[builder(setter(into))] + #[builder(into)] pub title: String, - #[builder(setter(into))] + #[builder(into)] pub address: String, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub foursquare_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub foursquare_type: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub google_place_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub google_place_type: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub message_effect_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_parameters: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendContactParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, - #[builder(setter(into))] + #[builder(into)] pub phone_number: String, - #[builder(setter(into))] + #[builder(into)] pub first_name: String, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub last_name: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub vcard: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub message_effect_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_parameters: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendPollParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, - #[builder(setter(into))] + #[builder(into)] pub question: String, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub question_parse_mode: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub question_entities: Option>, pub options: Vec, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub is_anonymous: Option, #[serde(rename = "type")] #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub type_field: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub allows_multiple_answers: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub correct_option_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub explanation: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub explanation_parse_mode: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub explanation_entities: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub open_period: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub close_date: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub is_closed: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub message_effect_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_parameters: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendDiceParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub emoji: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub message_effect_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_parameters: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendChatActionParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, pub action: ChatAction, @@ -1329,7 +1169,7 @@ pub struct SendChatActionParams { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetMessageReactionParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, pub message_id: i32, @@ -1337,7 +1177,6 @@ pub struct SetMessageReactionParams { pub reaction: Vec, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub is_big: Option, } @@ -1346,51 +1185,46 @@ pub struct GetUserProfilePhotosParams { pub user_id: u64, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub offset: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub limit: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetFileParams { - #[builder(setter(into))] + #[builder(into)] pub file_id: String, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BanChatMemberParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, pub user_id: u64, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub until_date: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub revoke_messages: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UnbanChatMemberParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, pub user_id: u64, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub only_if_banned: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct RestrictChatMemberParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, pub user_id: u64, @@ -1398,96 +1232,79 @@ pub struct RestrictChatMemberParams { pub permissions: ChatPermissions, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub use_independent_chat_permissions: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub until_date: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PromoteChatMemberParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, pub user_id: u64, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub is_anonymous: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_manage_chat: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_post_messages: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_edit_messages: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_delete_messages: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_post_stories: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_edit_stories: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_delete_stories: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_manage_video_chats: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_restrict_members: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_promote_members: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_change_info: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_invite_users: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_pin_messages: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_manage_topics: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetChatAdministratorCustomTitleParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, pub user_id: u64, - #[builder(setter(into))] + #[builder(into)] pub custom_title: String, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BanChatSenderChatParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, pub sender_chat_id: i64, @@ -1495,7 +1312,7 @@ pub struct BanChatSenderChatParams { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UnbanChatSenderChatParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, pub sender_chat_id: i64, @@ -1503,76 +1320,69 @@ pub struct UnbanChatSenderChatParams { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetChatPermissionsParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, pub permissions: ChatPermissions, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub use_independent_chat_permissions: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ExportChatInviteLinkParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct CreateChatInviteLinkParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub name: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub expire_date: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub member_limit: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub creates_join_request: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EditChatInviteLinkParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, - #[builder(setter(into))] + #[builder(into)] pub invite_link: String, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub name: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub expire_date: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub member_limit: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub creates_join_request: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct CreateChatSubscriptionInviteLinkParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub name: Option, pub subscription_period: u32, @@ -1582,29 +1392,29 @@ pub struct CreateChatSubscriptionInviteLinkParams { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EditChatSubscriptionInviteLinkParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, - #[builder(setter(into))] + #[builder(into)] pub invite_link: String, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub name: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct RevokeChatInviteLinkParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, - #[builder(setter(into))] + #[builder(into)] pub invite_link: String, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ApproveChatJoinRequestParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, pub user_id: u64, @@ -1612,7 +1422,7 @@ pub struct ApproveChatJoinRequestParams { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeclineChatJoinRequestParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, pub user_id: u64, @@ -1620,7 +1430,7 @@ pub struct DeclineChatJoinRequestParams { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetChatPhotoParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, pub photo: InputFile, @@ -1628,92 +1438,90 @@ pub struct SetChatPhotoParams { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteChatPhotoParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetChatTitleParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, - #[builder(setter(into))] + #[builder(into)] pub title: String, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetChatDescriptionParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub description: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PinChatMessageParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, pub message_id: i32, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UnpinChatMessageParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_id: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UnpinAllChatMessagesParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct LeaveChatParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetChatParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetChatAdministratorsParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetChatMemberCountParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetChatMemberParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, pub user_id: u64, @@ -1721,147 +1529,139 @@ pub struct GetChatMemberParams { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetChatStickerSetParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, - #[builder(setter(into))] + #[builder(into)] pub sticker_set_name: String, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteChatStickerSetParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct CreateForumTopicParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, - #[builder(setter(into))] + #[builder(into)] pub name: String, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub icon_color: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub icon_custom_emoji_id: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EditForumTopicParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, - #[builder(setter(into))] pub message_thread_id: i32, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub name: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub icon_custom_emoji_id: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct CloseForumTopicParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, - #[builder(setter(into))] pub message_thread_id: i32, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ReopenForumTopicParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, - #[builder(setter(into))] pub message_thread_id: i32, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteForumTopicParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, - #[builder(setter(into))] pub message_thread_id: i32, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UnpinAllForumTopicMessagesParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, - #[builder(setter(into))] pub message_thread_id: i32, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EditGeneralForumTopicParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, - #[builder(setter(into))] + #[builder(into)] pub name: String, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct CloseGeneralForumTopicParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ReopenGeneralForumTopicParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct HideGeneralForumTopicParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UnhideGeneralForumTopicParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct AnswerCallbackQueryParams { - #[builder(setter(into))] + #[builder(into)] pub callback_query_id: String, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub text: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub show_alert: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub url: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub cache_time: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetUserChatBoostsParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, pub user_id: u64, @@ -1869,7 +1669,7 @@ pub struct GetUserChatBoostsParams { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetBusinessConnectionParams { - #[builder(setter(into))] + #[builder(into)] pub business_connection_id: String, } @@ -1878,235 +1678,216 @@ pub struct SetMyCommandsParams { pub commands: Vec, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub scope: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub language_code: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetMyNameParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub name: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub language_code: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetMyNameParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub language_code: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetMyDescriptionParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub description: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub language_code: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetMyDescriptionParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub language_code: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetMyShortDescriptionParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub short_description: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub language_code: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetMyShortDescriptionParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub language_code: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetMyCommandsParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub scope: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub language_code: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteMyCommandsParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub scope: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub language_code: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EditMessageTextParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub chat_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub inline_message_id: Option, - #[builder(setter(into))] + #[builder(into)] pub text: String, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub parse_mode: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub entities: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub link_preview_options: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EditMessageCaptionParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub chat_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub inline_message_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub caption: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub parse_mode: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub caption_entities: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub show_caption_above_media: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EditMessageMediaParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub chat_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub inline_message_id: Option, - #[builder(setter(into))] pub media: InputMedia, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EditMessageReplyMarkupParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub chat_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub inline_message_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct StopPollParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, pub message_id: i32, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteMessageParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, pub message_id: i32, @@ -2114,7 +1895,7 @@ pub struct DeleteMessageParams { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteMessagesParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, pub message_ids: Vec, @@ -2123,47 +1904,42 @@ pub struct DeleteMessagesParams { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendStickerParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, - #[builder(setter(into))] + #[builder(into)] pub sticker: FileUpload, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub emoji: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub message_effect_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_parameters: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetStickerSetParams { - #[builder(setter(into))] + #[builder(into)] pub name: String, } @@ -2180,26 +1956,23 @@ pub struct UploadStickerFileParams { pub struct CreateNewStickerSetParams { pub user_id: u64, - #[builder(setter(into))] + #[builder(into)] pub name: String, - #[builder(setter(into))] + #[builder(into)] pub title: String, pub stickers: Vec, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option))] pub sticker_type: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option))] pub needs_repainting: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetCustomEmojiStickersParams { - #[builder(setter(into))] pub custom_emoji_ids: Vec, } @@ -2207,7 +1980,7 @@ pub struct GetCustomEmojiStickersParams { pub struct AddStickerToSetParams { pub user_id: u64, - #[builder(setter(into))] + #[builder(into)] pub name: String, pub sticker: InputSticker, @@ -2215,7 +1988,7 @@ pub struct AddStickerToSetParams { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetStickerPositionInSetParams { - #[builder(setter(into))] + #[builder(into)] pub sticker: String, pub position: u32, @@ -2223,7 +1996,7 @@ pub struct SetStickerPositionInSetParams { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteStickerFromSetParams { - #[builder(setter(into))] + #[builder(into)] pub sticker: String, } @@ -2231,10 +2004,10 @@ pub struct DeleteStickerFromSetParams { pub struct ReplaceStickerInSetParams { pub user_id: u64, - #[builder(setter(into))] + #[builder(into)] pub name: String, - #[builder(setter(into))] + #[builder(into)] pub old_sticker: String, pub sticker: InputSticker, @@ -2242,7 +2015,7 @@ pub struct ReplaceStickerInSetParams { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetStickerEmojiListParams { - #[builder(setter(into))] + #[builder(into)] pub sticker: String, pub emoji_list: Vec, @@ -2250,42 +2023,40 @@ pub struct SetStickerEmojiListParams { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetStickerKeywordsParams { - #[builder(setter(into))] + #[builder(into)] pub sticker: String, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub keywords: Option>, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct SetStickerMaskPositionParams { - #[builder(setter(into))] + #[builder(into)] pub sticker: String, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub mask_position: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetStickerSetTitleParams { - #[builder(setter(into))] + #[builder(into)] pub name: String, - #[builder(setter(into))] + #[builder(into)] pub title: String, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetStickerSetThumbnailParams { - #[builder(setter(into))] + #[builder(into)] pub name: String, pub user_id: u64, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub thumbnail: Option, pub format: StickerFormat, @@ -2293,277 +2064,241 @@ pub struct SetStickerSetThumbnailParams { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetCustomEmojiStickerSetThumbnailParams { - #[builder(setter(into))] + #[builder(into)] pub name: String, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub custom_emoji_id: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteStickerSetParams { - #[builder(setter(into))] + #[builder(into)] pub name: String, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct AnswerInlineQueryParams { - #[builder(setter(into))] + #[builder(into)] pub inline_query_id: String, pub results: Vec, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub cache_time: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub is_personal: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub next_offset: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub button: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InlineQueryResultsButton { - #[builder(setter(into))] + #[builder(into)] pub text: String, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub web_app: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub start_parameter: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendInvoiceParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, - #[builder(setter(into))] + #[builder(into)] pub title: String, - #[builder(setter(into))] + #[builder(into)] pub description: String, - #[builder(setter(into))] + #[builder(into)] pub payload: String, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub provider_token: Option, - #[builder(setter(into))] + #[builder(into)] pub currency: String, pub prices: Vec, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub max_tip_amount: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub suggested_tip_amounts: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub start_parameter: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub provider_data: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub photo_url: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub photo_size: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub photo_width: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub photo_height: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub need_name: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub need_phone_number: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub need_email: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub need_shipping_address: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub send_phone_number_to_provider: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub send_email_to_provider: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub is_flexible: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub message_effect_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_parameters: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct CreateInvoiceLinkParams { - #[builder(setter(into))] + #[builder(into)] pub title: String, - #[builder(setter(into))] + #[builder(into)] pub description: String, - #[builder(setter(into))] + #[builder(into)] pub payload: String, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub provider_token: Option, - #[builder(setter(into))] + #[builder(into)] pub currency: String, pub prices: Vec, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub max_tip_amount: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub suggested_tip_amounts: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub provider_data: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub photo_url: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub photo_size: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub photo_width: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub photo_height: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub need_name: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub need_phone_number: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub need_email: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub need_shipping_address: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub send_phone_number_to_provider: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub send_email_to_provider: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub is_flexible: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct AnswerShippingQueryParams { - #[builder(setter(into))] + #[builder(into)] pub shipping_query_id: String, pub ok: bool, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub shipping_options: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub error_message: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct AnswerPreCheckoutQueryParams { - #[builder(setter(into))] + #[builder(into)] pub pre_checkout_query_id: String, pub ok: bool, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub error_message: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetStarTransactionsParams { - #[builder(setter(into))] offset: u32, - #[builder(setter(into))] limit: u32, } @@ -2584,36 +2319,31 @@ pub struct SetPassportDataErrorsParams { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendGameParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, pub chat_id: i64, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, - #[builder(setter(into))] + #[builder(into)] pub game_short_name: String, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_notification: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub protect_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub message_effect_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_parameters: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub reply_markup: Option, } @@ -2624,23 +2354,19 @@ pub struct SetGameScoreParams { pub score: i32, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub force: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_edit_message: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub chat_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub inline_message_id: Option, } @@ -2649,189 +2375,162 @@ pub struct GetGameHighScoresParams { pub user_id: u64, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub chat_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub inline_message_id: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputMediaPhoto { - #[builder(setter(into))] + #[builder(into)] pub media: FileUpload, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub caption: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub parse_mode: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub caption_entities: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub show_caption_above_media: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub has_spoiler: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputMediaVideo { - #[builder(setter(into))] + #[builder(into)] pub media: FileUpload, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub thumbnail: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub caption: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub parse_mode: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub caption_entities: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub show_caption_above_media: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub width: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub height: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub duration: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub supports_streaming: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub has_spoiler: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputMediaAnimation { - #[builder(setter(into))] + #[builder(into)] pub media: FileUpload, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub thumbnail: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub caption: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub parse_mode: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub caption_entities: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub show_caption_above_media: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub width: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub height: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub duration: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub has_spoiler: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputMediaAudio { - #[builder(setter(into))] + #[builder(into)] pub media: FileUpload, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub thumbnail: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub caption: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub parse_mode: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub caption_entities: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub duration: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub performer: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub title: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputMediaDocument { - #[builder(setter(into))] + #[builder(into)] pub media: FileUpload, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub thumbnail: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub caption: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub parse_mode: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub caption_entities: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub disable_content_type_detection: Option, } @@ -2840,19 +2539,17 @@ pub struct SetMyDefaultAdministratorRightsParams { pub rights: ChatAdministratorRights, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub for_channels: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetMyDefaultAdministratorRightsParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub for_channels: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] pub struct AnswerWebAppQueryParams { - #[builder(setter(into))] + #[builder(into)] pub web_app_query_id: String, pub result: InlineQueryResult, @@ -2861,24 +2558,21 @@ pub struct AnswerWebAppQueryParams { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetChatMenuButtonParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub chat_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub menu_button: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetChatMenuButtonParams { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub chat_id: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UnpinAllGeneralForumTopicMessagesParams { - #[builder(setter(into))] + #[builder(into)] pub chat_id: ChatId, } @@ -2887,26 +2581,22 @@ pub struct ReplyParameters { pub message_id: i32, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub chat_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub allow_sending_without_reply: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub quote: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub quote_parse_mode: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub quote_entities: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub quote_position: Option, } diff --git a/src/objects.rs b/src/objects.rs index 9eb8099..3dd9e98 100644 --- a/src/objects.rs +++ b/src/objects.rs @@ -1,7 +1,7 @@ #![allow(deprecated)] use super::api_params::FileUpload; +use bon::Builder; use serde::{Deserialize, Serialize}; -use typed_builder::TypedBuilder as Builder; use crate::ParseMode; @@ -189,7 +189,7 @@ pub enum BackgroundFill { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct MenuButtonWebApp { - #[builder(setter(into))] + #[builder(into)] pub text: String, pub web_app: WebAppInfo, @@ -200,7 +200,7 @@ pub struct ChatMemberOwner { pub user: User, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub custom_title: Option, pub is_anonymous: bool, @@ -229,35 +229,28 @@ pub struct ChatMemberAdministrator { pub can_invite_users: bool, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_post_messages: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_edit_messages: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_pin_messages: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_post_stories: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_edit_stories: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_delete_stories: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_manage_topics: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub custom_title: Option, } @@ -266,7 +259,6 @@ pub struct ChatMemberMember { pub user: User, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub until_date: Option, } @@ -331,19 +323,19 @@ pub struct CallbackGame {} #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BotDescription { - #[builder(setter(into))] + #[builder(into)] pub description: String, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BotName { - #[builder(setter(into))] + #[builder(into)] pub name: String, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BotShortDescription { - #[builder(setter(into))] + #[builder(into)] pub short_description: String, } @@ -389,7 +381,7 @@ pub enum UpdateContent { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct WebhookInfo { - #[builder(setter(into))] + #[builder(into)] pub url: String, pub has_custom_certificate: bool, @@ -397,27 +389,23 @@ pub struct WebhookInfo { pub pending_update_count: u32, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub ip_address: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub last_error_date: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub last_error_message: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub last_synchronization_error_date: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub max_connections: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub allowed_updates: Option>, } @@ -454,47 +442,40 @@ pub struct User { pub is_bot: bool, - #[builder(setter(into))] + #[builder(into)] pub first_name: String, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub last_name: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub username: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub language_code: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub is_premium: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub added_to_attachment_menu: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_join_groups: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_read_all_group_messages: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub supports_inline_queries: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_connect_to_business: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub has_main_web_app: Option, } @@ -506,23 +487,22 @@ pub struct Chat { pub type_field: ChatType, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub title: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub username: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub first_name: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub last_name: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub is_forum: Option, } @@ -534,171 +514,143 @@ pub struct ChatFullInfo { pub type_field: ChatType, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub title: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub username: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub first_name: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub last_name: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub is_forum: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub photo: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub active_usernames: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub birthdate: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub business_intro: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub business_location: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub business_opening_hours: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub personal_chat: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub available_reactions: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub accent_color_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub max_reaction_count: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub background_custom_emoji_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub profile_accent_color_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub profile_background_custom_emoji_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub emoji_status_custom_emoji_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub emoji_status_expiration_date: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub bio: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub has_private_forwards: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub has_restricted_voice_and_video_messages: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub join_to_send_messages: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub join_by_request: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub description: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub invite_link: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub pinned_message: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub permissions: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_send_paid_media: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub slow_mode_delay: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub unrestrict_boost_count: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_auto_delete_time: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub has_aggressive_anti_spam_enabled: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub has_hidden_members: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub has_protected_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub has_visible_history: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub sticker_set_name: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub can_set_sticker_set: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub custom_emoji_sticker_set_name: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub linked_chat_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub location: Option, } @@ -707,336 +659,310 @@ pub struct Message { pub message_id: i32, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_thread_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub from: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub sender_chat: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub sender_boost_count: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub sender_business_bot: Option>, pub date: u64, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub business_connection_id: Option, - #[builder(setter(into))] + #[builder(into)] pub chat: Box, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub forward_origin: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub is_topic_message: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub is_automatic_forward: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub reply_to_message: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub external_reply: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub quote: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub reply_to_story: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub via_bot: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub edit_date: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub has_protected_content: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub is_from_offline: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub media_group_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub author_signature: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub text: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub entities: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub link_preview_options: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub effect_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub animation: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub audio: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub document: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub paid_media: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub photo: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub sticker: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub story: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub video: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub video_note: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub voice: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub caption: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub caption_entities: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub show_caption_above_media: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub has_media_spoiler: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub contact: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub dice: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub game: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub poll: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub venue: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub location: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub new_chat_members: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub left_chat_member: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub new_chat_title: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub new_chat_photo: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub delete_chat_photo: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub group_chat_created: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub supergroup_chat_created: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub channel_chat_created: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub message_auto_delete_timer_changed: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub migrate_to_chat_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub migrate_from_chat_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub pinned_message: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub invoice: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub successful_payment: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub refunded_payment: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub users_shared: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub chat_shared: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub connected_website: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub write_access_allowed: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub passport_data: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub proximity_alert_triggered: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub boost_added: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub chat_background_set: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub forum_topic_created: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub forum_topic_edited: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub forum_topic_closed: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub forum_topic_reopened: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub general_forum_topic_hidden: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub general_forum_topic_unhidden: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub giveaway_created: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub giveaway: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub giveaway_winners: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub giveaway_completed: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub video_chat_started: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub video_chat_ended: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub video_chat_scheduled: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub video_chat_participants_invited: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub web_app_data: Option>, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub reply_markup: Option>, } @@ -1055,134 +981,107 @@ pub struct MessageEntity { pub length: u16, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub url: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub user: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub language: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] + #[builder(into)] pub custom_emoji_id: Option, } #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct TextQuote { - #[builder(setter(into))] + #[builder(into)] pub text: String, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub entities: Option>, pub position: u32, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub is_manual: Option, } #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Builder)] pub struct ExternalReplyInfo { #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub origin: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub chat: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub message_id: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub link_preview_options: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub animation: Option, #[serde(skip_serializing_if = "Option::is_none")] - #[builder(setter(into, strip_option), default)] pub audio: Option