use rtdlib::types::*;
pub trait TDFB {}
impl <'a, T: TDFB> TDFB for &'a T {}
impl <'a, T: TDFB> TDFB for &'a mut T {}
#[derive(Debug, Clone)]
pub struct TGAcceptCall {
call_id: Option<i32>,
protocol: Option<CallProtocol>,
}
impl TDFB for TGAcceptCall {}
impl AsRef<TGAcceptCall> for TGAcceptCall {
fn as_ref(&self) -> &TGAcceptCall { self }
}
impl TGAcceptCall {
pub fn new() -> Self {
Self {
call_id: None,
protocol: None,
}
}
pub fn call_id(&mut self, call_id: i32) -> &mut Self { self.call_id = Some(call_id); self }
#[doc(hidden)] pub fn _protocol(&mut self, protocol: CallProtocol) -> &mut Self { self.protocol = Some(protocol); self }
#[doc(hidden)]
pub fn build(&self) -> AcceptCall {
AcceptCall::builder()
.call_id(self.call_id.clone())
.protocol(self.protocol.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGAcceptTermsOfService {
terms_of_service_id: Option<String>,
}
impl TDFB for TGAcceptTermsOfService {}
impl AsRef<TGAcceptTermsOfService> for TGAcceptTermsOfService {
fn as_ref(&self) -> &TGAcceptTermsOfService { self }
}
impl TGAcceptTermsOfService {
pub fn new() -> Self {
Self {
terms_of_service_id: None,
}
}
pub fn terms_of_service_id<S: AsRef<str>>(&mut self, terms_of_service_id: S) -> &mut Self { self.terms_of_service_id = Some(terms_of_service_id.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> AcceptTermsOfService {
AcceptTermsOfService::builder()
.terms_of_service_id(self.terms_of_service_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGAddChatMember {
chat_id: Option<i64>,
user_id: Option<i32>,
forward_limit: Option<i32>,
}
impl TDFB for TGAddChatMember {}
impl AsRef<TGAddChatMember> for TGAddChatMember {
fn as_ref(&self) -> &TGAddChatMember { self }
}
impl TGAddChatMember {
pub fn new() -> Self {
Self {
chat_id: None,
user_id: None,
forward_limit: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
pub fn forward_limit(&mut self, forward_limit: i32) -> &mut Self { self.forward_limit = Some(forward_limit); self }
#[doc(hidden)]
pub fn build(&self) -> AddChatMember {
AddChatMember::builder()
.chat_id(self.chat_id.clone())
.user_id(self.user_id.clone())
.forward_limit(self.forward_limit.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGAddChatMembers {
chat_id: Option<i64>,
user_ids: Option<Vec<i32>>,
}
impl TDFB for TGAddChatMembers {}
impl AsRef<TGAddChatMembers> for TGAddChatMembers {
fn as_ref(&self) -> &TGAddChatMembers { self }
}
impl TGAddChatMembers {
pub fn new() -> Self {
Self {
chat_id: None,
user_ids: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn user_ids(&mut self, user_ids: Vec<i32>) -> &mut Self { self.user_ids = Some(user_ids); self }
#[doc(hidden)]
pub fn build(&self) -> AddChatMembers {
AddChatMembers::builder()
.chat_id(self.chat_id.clone())
.user_ids(self.user_ids.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGAddCustomServerLanguagePack {
language_pack_id: Option<String>,
}
impl TDFB for TGAddCustomServerLanguagePack {}
impl AsRef<TGAddCustomServerLanguagePack> for TGAddCustomServerLanguagePack {
fn as_ref(&self) -> &TGAddCustomServerLanguagePack { self }
}
impl TGAddCustomServerLanguagePack {
pub fn new() -> Self {
Self {
language_pack_id: None,
}
}
pub fn language_pack_id<S: AsRef<str>>(&mut self, language_pack_id: S) -> &mut Self { self.language_pack_id = Some(language_pack_id.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> AddCustomServerLanguagePack {
AddCustomServerLanguagePack::builder()
.language_pack_id(self.language_pack_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGAddFavoriteSticker {
sticker: Option<Box<InputFile>>,
}
impl TDFB for TGAddFavoriteSticker {}
impl AsRef<TGAddFavoriteSticker> for TGAddFavoriteSticker {
fn as_ref(&self) -> &TGAddFavoriteSticker { self }
}
impl TGAddFavoriteSticker {
pub fn new() -> Self {
Self {
sticker: None,
}
}
#[doc(hidden)] pub fn _sticker(&mut self, sticker: Box<InputFile>) -> &mut Self { self.sticker = Some(sticker); self }
#[doc(hidden)]
pub fn build(&self) -> AddFavoriteSticker {
AddFavoriteSticker::builder()
.sticker(self.sticker.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGAddLocalMessage {
chat_id: Option<i64>,
sender_user_id: Option<i32>,
reply_to_message_id: Option<i64>,
disable_notification: Option<bool>,
input_message_content: Option<Box<InputMessageContent>>,
}
impl TDFB for TGAddLocalMessage {}
impl AsRef<TGAddLocalMessage> for TGAddLocalMessage {
fn as_ref(&self) -> &TGAddLocalMessage { self }
}
impl TGAddLocalMessage {
pub fn new() -> Self {
Self {
chat_id: None,
sender_user_id: None,
reply_to_message_id: None,
disable_notification: None,
input_message_content: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn sender_user_id(&mut self, sender_user_id: i32) -> &mut Self { self.sender_user_id = Some(sender_user_id); self }
pub fn reply_to_message_id(&mut self, reply_to_message_id: i64) -> &mut Self { self.reply_to_message_id = Some(reply_to_message_id); self }
pub fn disable_notification(&mut self, disable_notification: bool) -> &mut Self { self.disable_notification = Some(disable_notification); self }
#[doc(hidden)] pub fn _input_message_content(&mut self, input_message_content: Box<InputMessageContent>) -> &mut Self { self.input_message_content = Some(input_message_content); self }
#[doc(hidden)]
pub fn build(&self) -> AddLocalMessage {
AddLocalMessage::builder()
.chat_id(self.chat_id.clone())
.sender_user_id(self.sender_user_id.clone())
.reply_to_message_id(self.reply_to_message_id.clone())
.disable_notification(self.disable_notification.clone())
.input_message_content(self.input_message_content.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGAddLogMessage {
verbosity_level: Option<i32>,
text: Option<String>,
}
impl TDFB for TGAddLogMessage {}
impl AsRef<TGAddLogMessage> for TGAddLogMessage {
fn as_ref(&self) -> &TGAddLogMessage { self }
}
impl TGAddLogMessage {
pub fn new() -> Self {
Self {
verbosity_level: None,
text: None,
}
}
pub fn verbosity_level(&mut self, verbosity_level: i32) -> &mut Self { self.verbosity_level = Some(verbosity_level); self }
pub fn text<S: AsRef<str>>(&mut self, text: S) -> &mut Self { self.text = Some(text.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> AddLogMessage {
AddLogMessage::builder()
.verbosity_level(self.verbosity_level.clone())
.text(self.text.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGAddNetworkStatistics {
entry: Option<Box<NetworkStatisticsEntry>>,
}
impl TDFB for TGAddNetworkStatistics {}
impl AsRef<TGAddNetworkStatistics> for TGAddNetworkStatistics {
fn as_ref(&self) -> &TGAddNetworkStatistics { self }
}
impl TGAddNetworkStatistics {
pub fn new() -> Self {
Self {
entry: None,
}
}
#[doc(hidden)] pub fn _entry(&mut self, entry: Box<NetworkStatisticsEntry>) -> &mut Self { self.entry = Some(entry); self }
#[doc(hidden)]
pub fn build(&self) -> AddNetworkStatistics {
AddNetworkStatistics::builder()
.entry(self.entry.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGAddProxy {
server: Option<String>,
port: Option<i32>,
enable: Option<bool>,
type_: Option<Box<ProxyType>>,
}
impl TDFB for TGAddProxy {}
impl AsRef<TGAddProxy> for TGAddProxy {
fn as_ref(&self) -> &TGAddProxy { self }
}
impl TGAddProxy {
pub fn new() -> Self {
Self {
server: None,
port: None,
enable: None,
type_: None,
}
}
pub fn server<S: AsRef<str>>(&mut self, server: S) -> &mut Self { self.server = Some(server.as_ref().to_string()); self }
pub fn port(&mut self, port: i32) -> &mut Self { self.port = Some(port); self }
pub fn enable(&mut self, enable: bool) -> &mut Self { self.enable = Some(enable); self }
#[doc(hidden)] pub fn _type_(&mut self, type_: Box<ProxyType>) -> &mut Self { self.type_ = Some(type_); self }
#[doc(hidden)]
pub fn build(&self) -> AddProxy {
AddProxy::builder()
.server(self.server.clone())
.port(self.port.clone())
.enable(self.enable.clone())
.type_(self.type_.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGAddRecentlyFoundChat {
chat_id: Option<i64>,
}
impl TDFB for TGAddRecentlyFoundChat {}
impl AsRef<TGAddRecentlyFoundChat> for TGAddRecentlyFoundChat {
fn as_ref(&self) -> &TGAddRecentlyFoundChat { self }
}
impl TGAddRecentlyFoundChat {
pub fn new() -> Self {
Self {
chat_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
#[doc(hidden)]
pub fn build(&self) -> AddRecentlyFoundChat {
AddRecentlyFoundChat::builder()
.chat_id(self.chat_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGAddRecentSticker {
is_attached: Option<bool>,
sticker: Option<Box<InputFile>>,
}
impl TDFB for TGAddRecentSticker {}
impl AsRef<TGAddRecentSticker> for TGAddRecentSticker {
fn as_ref(&self) -> &TGAddRecentSticker { self }
}
impl TGAddRecentSticker {
pub fn new() -> Self {
Self {
is_attached: None,
sticker: None,
}
}
pub fn is_attached(&mut self, is_attached: bool) -> &mut Self { self.is_attached = Some(is_attached); self }
#[doc(hidden)] pub fn _sticker(&mut self, sticker: Box<InputFile>) -> &mut Self { self.sticker = Some(sticker); self }
#[doc(hidden)]
pub fn build(&self) -> AddRecentSticker {
AddRecentSticker::builder()
.is_attached(self.is_attached.clone())
.sticker(self.sticker.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGAddSavedAnimation {
animation: Option<Box<InputFile>>,
}
impl TDFB for TGAddSavedAnimation {}
impl AsRef<TGAddSavedAnimation> for TGAddSavedAnimation {
fn as_ref(&self) -> &TGAddSavedAnimation { self }
}
impl TGAddSavedAnimation {
pub fn new() -> Self {
Self {
animation: None,
}
}
#[doc(hidden)] pub fn _animation(&mut self, animation: Box<InputFile>) -> &mut Self { self.animation = Some(animation); self }
#[doc(hidden)]
pub fn build(&self) -> AddSavedAnimation {
AddSavedAnimation::builder()
.animation(self.animation.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGAddStickerToSet {
user_id: Option<i32>,
name: Option<String>,
sticker: Option<InputSticker>,
}
impl TDFB for TGAddStickerToSet {}
impl AsRef<TGAddStickerToSet> for TGAddStickerToSet {
fn as_ref(&self) -> &TGAddStickerToSet { self }
}
impl TGAddStickerToSet {
pub fn new() -> Self {
Self {
user_id: None,
name: None,
sticker: None,
}
}
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
pub fn name<S: AsRef<str>>(&mut self, name: S) -> &mut Self { self.name = Some(name.as_ref().to_string()); self }
#[doc(hidden)] pub fn _sticker(&mut self, sticker: InputSticker) -> &mut Self { self.sticker = Some(sticker); self }
#[doc(hidden)]
pub fn build(&self) -> AddStickerToSet {
AddStickerToSet::builder()
.user_id(self.user_id.clone())
.name(self.name.clone())
.sticker(self.sticker.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGAnswerCallbackQuery {
callback_query_id: Option<i64>,
text: Option<String>,
show_alert: Option<bool>,
url: Option<String>,
cache_time: Option<i32>,
}
impl TDFB for TGAnswerCallbackQuery {}
impl AsRef<TGAnswerCallbackQuery> for TGAnswerCallbackQuery {
fn as_ref(&self) -> &TGAnswerCallbackQuery { self }
}
impl TGAnswerCallbackQuery {
pub fn new() -> Self {
Self {
callback_query_id: None,
text: None,
show_alert: None,
url: None,
cache_time: None,
}
}
pub fn callback_query_id(&mut self, callback_query_id: i64) -> &mut Self { self.callback_query_id = Some(callback_query_id); self }
pub fn text<S: AsRef<str>>(&mut self, text: S) -> &mut Self { self.text = Some(text.as_ref().to_string()); self }
pub fn show_alert(&mut self, show_alert: bool) -> &mut Self { self.show_alert = Some(show_alert); self }
pub fn url<S: AsRef<str>>(&mut self, url: S) -> &mut Self { self.url = Some(url.as_ref().to_string()); self }
pub fn cache_time(&mut self, cache_time: i32) -> &mut Self { self.cache_time = Some(cache_time); self }
#[doc(hidden)]
pub fn build(&self) -> AnswerCallbackQuery {
AnswerCallbackQuery::builder()
.callback_query_id(self.callback_query_id.clone())
.text(self.text.clone())
.show_alert(self.show_alert.clone())
.url(self.url.clone())
.cache_time(self.cache_time.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGAnswerCustomQuery {
custom_query_id: Option<i64>,
data: Option<String>,
}
impl TDFB for TGAnswerCustomQuery {}
impl AsRef<TGAnswerCustomQuery> for TGAnswerCustomQuery {
fn as_ref(&self) -> &TGAnswerCustomQuery { self }
}
impl TGAnswerCustomQuery {
pub fn new() -> Self {
Self {
custom_query_id: None,
data: None,
}
}
pub fn custom_query_id(&mut self, custom_query_id: i64) -> &mut Self { self.custom_query_id = Some(custom_query_id); self }
pub fn data<S: AsRef<str>>(&mut self, data: S) -> &mut Self { self.data = Some(data.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> AnswerCustomQuery {
AnswerCustomQuery::builder()
.custom_query_id(self.custom_query_id.clone())
.data(self.data.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGAnswerInlineQuery {
inline_query_id: Option<i64>,
is_personal: Option<bool>,
results: Option<Vec<Box<InputInlineQueryResult>>>,
cache_time: Option<i32>,
next_offset: Option<String>,
switch_pm_text: Option<String>,
switch_pm_parameter: Option<String>,
}
impl TDFB for TGAnswerInlineQuery {}
impl AsRef<TGAnswerInlineQuery> for TGAnswerInlineQuery {
fn as_ref(&self) -> &TGAnswerInlineQuery { self }
}
impl TGAnswerInlineQuery {
pub fn new() -> Self {
Self {
inline_query_id: None,
is_personal: None,
results: None,
cache_time: None,
next_offset: None,
switch_pm_text: None,
switch_pm_parameter: None,
}
}
pub fn inline_query_id(&mut self, inline_query_id: i64) -> &mut Self { self.inline_query_id = Some(inline_query_id); self }
pub fn is_personal(&mut self, is_personal: bool) -> &mut Self { self.is_personal = Some(is_personal); self }
pub fn cache_time(&mut self, cache_time: i32) -> &mut Self { self.cache_time = Some(cache_time); self }
pub fn next_offset<S: AsRef<str>>(&mut self, next_offset: S) -> &mut Self { self.next_offset = Some(next_offset.as_ref().to_string()); self }
pub fn switch_pm_text<S: AsRef<str>>(&mut self, switch_pm_text: S) -> &mut Self { self.switch_pm_text = Some(switch_pm_text.as_ref().to_string()); self }
pub fn switch_pm_parameter<S: AsRef<str>>(&mut self, switch_pm_parameter: S) -> &mut Self { self.switch_pm_parameter = Some(switch_pm_parameter.as_ref().to_string()); self }
#[doc(hidden)] pub fn _results(&mut self, results: Vec<Box<InputInlineQueryResult>>) -> &mut Self { self.results = Some(results); self }
#[doc(hidden)]
pub fn build(&self) -> AnswerInlineQuery {
AnswerInlineQuery::builder()
.inline_query_id(self.inline_query_id.clone())
.is_personal(self.is_personal.clone())
.results(self.results.clone())
.cache_time(self.cache_time.clone())
.next_offset(self.next_offset.clone())
.switch_pm_text(self.switch_pm_text.clone())
.switch_pm_parameter(self.switch_pm_parameter.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGAnswerPreCheckoutQuery {
pre_checkout_query_id: Option<i64>,
error_message: Option<String>,
}
impl TDFB for TGAnswerPreCheckoutQuery {}
impl AsRef<TGAnswerPreCheckoutQuery> for TGAnswerPreCheckoutQuery {
fn as_ref(&self) -> &TGAnswerPreCheckoutQuery { self }
}
impl TGAnswerPreCheckoutQuery {
pub fn new() -> Self {
Self {
pre_checkout_query_id: None,
error_message: None,
}
}
pub fn pre_checkout_query_id(&mut self, pre_checkout_query_id: i64) -> &mut Self { self.pre_checkout_query_id = Some(pre_checkout_query_id); self }
pub fn error_message<S: AsRef<str>>(&mut self, error_message: S) -> &mut Self { self.error_message = Some(error_message.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> AnswerPreCheckoutQuery {
AnswerPreCheckoutQuery::builder()
.pre_checkout_query_id(self.pre_checkout_query_id.clone())
.error_message(self.error_message.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGAnswerShippingQuery {
shipping_query_id: Option<i64>,
shipping_options: Option<Vec<ShippingOption>>,
error_message: Option<String>,
}
impl TDFB for TGAnswerShippingQuery {}
impl AsRef<TGAnswerShippingQuery> for TGAnswerShippingQuery {
fn as_ref(&self) -> &TGAnswerShippingQuery { self }
}
impl TGAnswerShippingQuery {
pub fn new() -> Self {
Self {
shipping_query_id: None,
shipping_options: None,
error_message: None,
}
}
pub fn shipping_query_id(&mut self, shipping_query_id: i64) -> &mut Self { self.shipping_query_id = Some(shipping_query_id); self }
pub fn error_message<S: AsRef<str>>(&mut self, error_message: S) -> &mut Self { self.error_message = Some(error_message.as_ref().to_string()); self }
#[doc(hidden)] pub fn _shipping_options(&mut self, shipping_options: Vec<ShippingOption>) -> &mut Self { self.shipping_options = Some(shipping_options); self }
#[doc(hidden)]
pub fn build(&self) -> AnswerShippingQuery {
AnswerShippingQuery::builder()
.shipping_query_id(self.shipping_query_id.clone())
.shipping_options(self.shipping_options.clone())
.error_message(self.error_message.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGBlockUser {
user_id: Option<i32>,
}
impl TDFB for TGBlockUser {}
impl AsRef<TGBlockUser> for TGBlockUser {
fn as_ref(&self) -> &TGBlockUser { self }
}
impl TGBlockUser {
pub fn new() -> Self {
Self {
user_id: None,
}
}
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
#[doc(hidden)]
pub fn build(&self) -> BlockUser {
BlockUser::builder()
.user_id(self.user_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCancelDownloadFile {
file_id: Option<i32>,
only_if_pending: Option<bool>,
}
impl TDFB for TGCancelDownloadFile {}
impl AsRef<TGCancelDownloadFile> for TGCancelDownloadFile {
fn as_ref(&self) -> &TGCancelDownloadFile { self }
}
impl TGCancelDownloadFile {
pub fn new() -> Self {
Self {
file_id: None,
only_if_pending: None,
}
}
pub fn file_id(&mut self, file_id: i32) -> &mut Self { self.file_id = Some(file_id); self }
pub fn only_if_pending(&mut self, only_if_pending: bool) -> &mut Self { self.only_if_pending = Some(only_if_pending); self }
#[doc(hidden)]
pub fn build(&self) -> CancelDownloadFile {
CancelDownloadFile::builder()
.file_id(self.file_id.clone())
.only_if_pending(self.only_if_pending.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCancelUploadFile {
file_id: Option<i32>,
}
impl TDFB for TGCancelUploadFile {}
impl AsRef<TGCancelUploadFile> for TGCancelUploadFile {
fn as_ref(&self) -> &TGCancelUploadFile { self }
}
impl TGCancelUploadFile {
pub fn new() -> Self {
Self {
file_id: None,
}
}
pub fn file_id(&mut self, file_id: i32) -> &mut Self { self.file_id = Some(file_id); self }
#[doc(hidden)]
pub fn build(&self) -> CancelUploadFile {
CancelUploadFile::builder()
.file_id(self.file_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGChangeChatReportSpamState {
chat_id: Option<i64>,
is_spam_chat: Option<bool>,
}
impl TDFB for TGChangeChatReportSpamState {}
impl AsRef<TGChangeChatReportSpamState> for TGChangeChatReportSpamState {
fn as_ref(&self) -> &TGChangeChatReportSpamState { self }
}
impl TGChangeChatReportSpamState {
pub fn new() -> Self {
Self {
chat_id: None,
is_spam_chat: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn is_spam_chat(&mut self, is_spam_chat: bool) -> &mut Self { self.is_spam_chat = Some(is_spam_chat); self }
#[doc(hidden)]
pub fn build(&self) -> ChangeChatReportSpamState {
ChangeChatReportSpamState::builder()
.chat_id(self.chat_id.clone())
.is_spam_chat(self.is_spam_chat.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGChangeImportedContacts {
contacts: Option<Vec<Contact>>,
}
impl TDFB for TGChangeImportedContacts {}
impl AsRef<TGChangeImportedContacts> for TGChangeImportedContacts {
fn as_ref(&self) -> &TGChangeImportedContacts { self }
}
impl TGChangeImportedContacts {
pub fn new() -> Self {
Self {
contacts: None,
}
}
#[doc(hidden)] pub fn _contacts(&mut self, contacts: Vec<Contact>) -> &mut Self { self.contacts = Some(contacts); self }
#[doc(hidden)]
pub fn build(&self) -> ChangeImportedContacts {
ChangeImportedContacts::builder()
.contacts(self.contacts.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGChangePhoneNumber {
phone_number: Option<String>,
allow_flash_call: Option<bool>,
is_current_phone_number: Option<bool>,
}
impl TDFB for TGChangePhoneNumber {}
impl AsRef<TGChangePhoneNumber> for TGChangePhoneNumber {
fn as_ref(&self) -> &TGChangePhoneNumber { self }
}
impl TGChangePhoneNumber {
pub fn new() -> Self {
Self {
phone_number: None,
allow_flash_call: None,
is_current_phone_number: None,
}
}
pub fn phone_number<S: AsRef<str>>(&mut self, phone_number: S) -> &mut Self { self.phone_number = Some(phone_number.as_ref().to_string()); self }
pub fn allow_flash_call(&mut self, allow_flash_call: bool) -> &mut Self { self.allow_flash_call = Some(allow_flash_call); self }
pub fn is_current_phone_number(&mut self, is_current_phone_number: bool) -> &mut Self { self.is_current_phone_number = Some(is_current_phone_number); self }
#[doc(hidden)]
pub fn build(&self) -> ChangePhoneNumber {
ChangePhoneNumber::builder()
.phone_number(self.phone_number.clone())
.allow_flash_call(self.allow_flash_call.clone())
.is_current_phone_number(self.is_current_phone_number.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGChangeStickerSet {
set_id: Option<i64>,
is_installed: Option<bool>,
is_archived: Option<bool>,
}
impl TDFB for TGChangeStickerSet {}
impl AsRef<TGChangeStickerSet> for TGChangeStickerSet {
fn as_ref(&self) -> &TGChangeStickerSet { self }
}
impl TGChangeStickerSet {
pub fn new() -> Self {
Self {
set_id: None,
is_installed: None,
is_archived: None,
}
}
pub fn set_id(&mut self, set_id: i64) -> &mut Self { self.set_id = Some(set_id); self }
pub fn is_installed(&mut self, is_installed: bool) -> &mut Self { self.is_installed = Some(is_installed); self }
pub fn is_archived(&mut self, is_archived: bool) -> &mut Self { self.is_archived = Some(is_archived); self }
#[doc(hidden)]
pub fn build(&self) -> ChangeStickerSet {
ChangeStickerSet::builder()
.set_id(self.set_id.clone())
.is_installed(self.is_installed.clone())
.is_archived(self.is_archived.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCheckAuthenticationBotToken {
token: Option<String>,
}
impl TDFB for TGCheckAuthenticationBotToken {}
impl AsRef<TGCheckAuthenticationBotToken> for TGCheckAuthenticationBotToken {
fn as_ref(&self) -> &TGCheckAuthenticationBotToken { self }
}
impl TGCheckAuthenticationBotToken {
pub fn new() -> Self {
Self {
token: None,
}
}
pub fn token<S: AsRef<str>>(&mut self, token: S) -> &mut Self { self.token = Some(token.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> CheckAuthenticationBotToken {
CheckAuthenticationBotToken::builder()
.token(self.token.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCheckAuthenticationCode {
code: Option<String>,
first_name: Option<String>,
last_name: Option<String>,
}
impl TDFB for TGCheckAuthenticationCode {}
impl AsRef<TGCheckAuthenticationCode> for TGCheckAuthenticationCode {
fn as_ref(&self) -> &TGCheckAuthenticationCode { self }
}
impl TGCheckAuthenticationCode {
pub fn new() -> Self {
Self {
code: None,
first_name: None,
last_name: None,
}
}
pub fn code<S: AsRef<str>>(&mut self, code: S) -> &mut Self { self.code = Some(code.as_ref().to_string()); self }
pub fn first_name<S: AsRef<str>>(&mut self, first_name: S) -> &mut Self { self.first_name = Some(first_name.as_ref().to_string()); self }
pub fn last_name<S: AsRef<str>>(&mut self, last_name: S) -> &mut Self { self.last_name = Some(last_name.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> CheckAuthenticationCode {
CheckAuthenticationCode::builder()
.code(self.code.clone())
.first_name(self.first_name.clone())
.last_name(self.last_name.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCheckAuthenticationPassword {
password: Option<String>,
}
impl TDFB for TGCheckAuthenticationPassword {}
impl AsRef<TGCheckAuthenticationPassword> for TGCheckAuthenticationPassword {
fn as_ref(&self) -> &TGCheckAuthenticationPassword { self }
}
impl TGCheckAuthenticationPassword {
pub fn new() -> Self {
Self {
password: None,
}
}
pub fn password<S: AsRef<str>>(&mut self, password: S) -> &mut Self { self.password = Some(password.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> CheckAuthenticationPassword {
CheckAuthenticationPassword::builder()
.password(self.password.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCheckChangePhoneNumberCode {
code: Option<String>,
}
impl TDFB for TGCheckChangePhoneNumberCode {}
impl AsRef<TGCheckChangePhoneNumberCode> for TGCheckChangePhoneNumberCode {
fn as_ref(&self) -> &TGCheckChangePhoneNumberCode { self }
}
impl TGCheckChangePhoneNumberCode {
pub fn new() -> Self {
Self {
code: None,
}
}
pub fn code<S: AsRef<str>>(&mut self, code: S) -> &mut Self { self.code = Some(code.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> CheckChangePhoneNumberCode {
CheckChangePhoneNumberCode::builder()
.code(self.code.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCheckChatInviteLink {
invite_link: Option<String>,
}
impl TDFB for TGCheckChatInviteLink {}
impl AsRef<TGCheckChatInviteLink> for TGCheckChatInviteLink {
fn as_ref(&self) -> &TGCheckChatInviteLink { self }
}
impl TGCheckChatInviteLink {
pub fn new() -> Self {
Self {
invite_link: None,
}
}
pub fn invite_link<S: AsRef<str>>(&mut self, invite_link: S) -> &mut Self { self.invite_link = Some(invite_link.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> CheckChatInviteLink {
CheckChatInviteLink::builder()
.invite_link(self.invite_link.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCheckChatUsername {
chat_id: Option<i64>,
username: Option<String>,
}
impl TDFB for TGCheckChatUsername {}
impl AsRef<TGCheckChatUsername> for TGCheckChatUsername {
fn as_ref(&self) -> &TGCheckChatUsername { self }
}
impl TGCheckChatUsername {
pub fn new() -> Self {
Self {
chat_id: None,
username: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn username<S: AsRef<str>>(&mut self, username: S) -> &mut Self { self.username = Some(username.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> CheckChatUsername {
CheckChatUsername::builder()
.chat_id(self.chat_id.clone())
.username(self.username.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCheckDatabaseEncryptionKey {
encryption_key: Option<String>,
}
impl TDFB for TGCheckDatabaseEncryptionKey {}
impl AsRef<TGCheckDatabaseEncryptionKey> for TGCheckDatabaseEncryptionKey {
fn as_ref(&self) -> &TGCheckDatabaseEncryptionKey { self }
}
impl TGCheckDatabaseEncryptionKey {
pub fn new() -> Self {
Self {
encryption_key: None,
}
}
pub fn encryption_key<S: AsRef<str>>(&mut self, encryption_key: S) -> &mut Self { self.encryption_key = Some(encryption_key.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> CheckDatabaseEncryptionKey {
CheckDatabaseEncryptionKey::builder()
.encryption_key(self.encryption_key.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCheckEmailAddressVerificationCode {
code: Option<String>,
}
impl TDFB for TGCheckEmailAddressVerificationCode {}
impl AsRef<TGCheckEmailAddressVerificationCode> for TGCheckEmailAddressVerificationCode {
fn as_ref(&self) -> &TGCheckEmailAddressVerificationCode { self }
}
impl TGCheckEmailAddressVerificationCode {
pub fn new() -> Self {
Self {
code: None,
}
}
pub fn code<S: AsRef<str>>(&mut self, code: S) -> &mut Self { self.code = Some(code.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> CheckEmailAddressVerificationCode {
CheckEmailAddressVerificationCode::builder()
.code(self.code.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCheckPhoneNumberConfirmationCode {
code: Option<String>,
}
impl TDFB for TGCheckPhoneNumberConfirmationCode {}
impl AsRef<TGCheckPhoneNumberConfirmationCode> for TGCheckPhoneNumberConfirmationCode {
fn as_ref(&self) -> &TGCheckPhoneNumberConfirmationCode { self }
}
impl TGCheckPhoneNumberConfirmationCode {
pub fn new() -> Self {
Self {
code: None,
}
}
pub fn code<S: AsRef<str>>(&mut self, code: S) -> &mut Self { self.code = Some(code.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> CheckPhoneNumberConfirmationCode {
CheckPhoneNumberConfirmationCode::builder()
.code(self.code.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCheckPhoneNumberVerificationCode {
code: Option<String>,
}
impl TDFB for TGCheckPhoneNumberVerificationCode {}
impl AsRef<TGCheckPhoneNumberVerificationCode> for TGCheckPhoneNumberVerificationCode {
fn as_ref(&self) -> &TGCheckPhoneNumberVerificationCode { self }
}
impl TGCheckPhoneNumberVerificationCode {
pub fn new() -> Self {
Self {
code: None,
}
}
pub fn code<S: AsRef<str>>(&mut self, code: S) -> &mut Self { self.code = Some(code.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> CheckPhoneNumberVerificationCode {
CheckPhoneNumberVerificationCode::builder()
.code(self.code.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCheckRecoveryEmailAddressCode {
code: Option<String>,
}
impl TDFB for TGCheckRecoveryEmailAddressCode {}
impl AsRef<TGCheckRecoveryEmailAddressCode> for TGCheckRecoveryEmailAddressCode {
fn as_ref(&self) -> &TGCheckRecoveryEmailAddressCode { self }
}
impl TGCheckRecoveryEmailAddressCode {
pub fn new() -> Self {
Self {
code: None,
}
}
pub fn code<S: AsRef<str>>(&mut self, code: S) -> &mut Self { self.code = Some(code.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> CheckRecoveryEmailAddressCode {
CheckRecoveryEmailAddressCode::builder()
.code(self.code.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCleanFileName {
file_name: Option<String>,
}
impl TDFB for TGCleanFileName {}
impl AsRef<TGCleanFileName> for TGCleanFileName {
fn as_ref(&self) -> &TGCleanFileName { self }
}
impl TGCleanFileName {
pub fn new() -> Self {
Self {
file_name: None,
}
}
pub fn file_name<S: AsRef<str>>(&mut self, file_name: S) -> &mut Self { self.file_name = Some(file_name.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> CleanFileName {
CleanFileName::builder()
.file_name(self.file_name.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGClearAllDraftMessages {
exclude_secret_chats: Option<bool>,
}
impl TDFB for TGClearAllDraftMessages {}
impl AsRef<TGClearAllDraftMessages> for TGClearAllDraftMessages {
fn as_ref(&self) -> &TGClearAllDraftMessages { self }
}
impl TGClearAllDraftMessages {
pub fn new() -> Self {
Self {
exclude_secret_chats: None,
}
}
pub fn exclude_secret_chats(&mut self, exclude_secret_chats: bool) -> &mut Self { self.exclude_secret_chats = Some(exclude_secret_chats); self }
#[doc(hidden)]
pub fn build(&self) -> ClearAllDraftMessages {
ClearAllDraftMessages::builder()
.exclude_secret_chats(self.exclude_secret_chats.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGClearImportedContacts {
}
impl TDFB for TGClearImportedContacts {}
impl AsRef<TGClearImportedContacts> for TGClearImportedContacts {
fn as_ref(&self) -> &TGClearImportedContacts { self }
}
impl TGClearImportedContacts {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> ClearImportedContacts {
ClearImportedContacts::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGClearRecentlyFoundChats {
}
impl TDFB for TGClearRecentlyFoundChats {}
impl AsRef<TGClearRecentlyFoundChats> for TGClearRecentlyFoundChats {
fn as_ref(&self) -> &TGClearRecentlyFoundChats { self }
}
impl TGClearRecentlyFoundChats {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> ClearRecentlyFoundChats {
ClearRecentlyFoundChats::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGClearRecentStickers {
is_attached: Option<bool>,
}
impl TDFB for TGClearRecentStickers {}
impl AsRef<TGClearRecentStickers> for TGClearRecentStickers {
fn as_ref(&self) -> &TGClearRecentStickers { self }
}
impl TGClearRecentStickers {
pub fn new() -> Self {
Self {
is_attached: None,
}
}
pub fn is_attached(&mut self, is_attached: bool) -> &mut Self { self.is_attached = Some(is_attached); self }
#[doc(hidden)]
pub fn build(&self) -> ClearRecentStickers {
ClearRecentStickers::builder()
.is_attached(self.is_attached.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGClose {
}
impl TDFB for TGClose {}
impl AsRef<TGClose> for TGClose {
fn as_ref(&self) -> &TGClose { self }
}
impl TGClose {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> Close {
Close::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCloseChat {
chat_id: Option<i64>,
}
impl TDFB for TGCloseChat {}
impl AsRef<TGCloseChat> for TGCloseChat {
fn as_ref(&self) -> &TGCloseChat { self }
}
impl TGCloseChat {
pub fn new() -> Self {
Self {
chat_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
#[doc(hidden)]
pub fn build(&self) -> CloseChat {
CloseChat::builder()
.chat_id(self.chat_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCloseSecretChat {
secret_chat_id: Option<i32>,
}
impl TDFB for TGCloseSecretChat {}
impl AsRef<TGCloseSecretChat> for TGCloseSecretChat {
fn as_ref(&self) -> &TGCloseSecretChat { self }
}
impl TGCloseSecretChat {
pub fn new() -> Self {
Self {
secret_chat_id: None,
}
}
pub fn secret_chat_id(&mut self, secret_chat_id: i32) -> &mut Self { self.secret_chat_id = Some(secret_chat_id); self }
#[doc(hidden)]
pub fn build(&self) -> CloseSecretChat {
CloseSecretChat::builder()
.secret_chat_id(self.secret_chat_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCreateBasicGroupChat {
basic_group_id: Option<i32>,
force: Option<bool>,
}
impl TDFB for TGCreateBasicGroupChat {}
impl AsRef<TGCreateBasicGroupChat> for TGCreateBasicGroupChat {
fn as_ref(&self) -> &TGCreateBasicGroupChat { self }
}
impl TGCreateBasicGroupChat {
pub fn new() -> Self {
Self {
basic_group_id: None,
force: None,
}
}
pub fn basic_group_id(&mut self, basic_group_id: i32) -> &mut Self { self.basic_group_id = Some(basic_group_id); self }
pub fn force(&mut self, force: bool) -> &mut Self { self.force = Some(force); self }
#[doc(hidden)]
pub fn build(&self) -> CreateBasicGroupChat {
CreateBasicGroupChat::builder()
.basic_group_id(self.basic_group_id.clone())
.force(self.force.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCreateCall {
user_id: Option<i32>,
protocol: Option<CallProtocol>,
}
impl TDFB for TGCreateCall {}
impl AsRef<TGCreateCall> for TGCreateCall {
fn as_ref(&self) -> &TGCreateCall { self }
}
impl TGCreateCall {
pub fn new() -> Self {
Self {
user_id: None,
protocol: None,
}
}
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
#[doc(hidden)] pub fn _protocol(&mut self, protocol: CallProtocol) -> &mut Self { self.protocol = Some(protocol); self }
#[doc(hidden)]
pub fn build(&self) -> CreateCall {
CreateCall::builder()
.user_id(self.user_id.clone())
.protocol(self.protocol.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCreateNewBasicGroupChat {
user_ids: Option<Vec<i32>>,
title: Option<String>,
}
impl TDFB for TGCreateNewBasicGroupChat {}
impl AsRef<TGCreateNewBasicGroupChat> for TGCreateNewBasicGroupChat {
fn as_ref(&self) -> &TGCreateNewBasicGroupChat { self }
}
impl TGCreateNewBasicGroupChat {
pub fn new() -> Self {
Self {
user_ids: None,
title: None,
}
}
pub fn user_ids(&mut self, user_ids: Vec<i32>) -> &mut Self { self.user_ids = Some(user_ids); self }
pub fn title<S: AsRef<str>>(&mut self, title: S) -> &mut Self { self.title = Some(title.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> CreateNewBasicGroupChat {
CreateNewBasicGroupChat::builder()
.user_ids(self.user_ids.clone())
.title(self.title.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCreateNewSecretChat {
user_id: Option<i32>,
}
impl TDFB for TGCreateNewSecretChat {}
impl AsRef<TGCreateNewSecretChat> for TGCreateNewSecretChat {
fn as_ref(&self) -> &TGCreateNewSecretChat { self }
}
impl TGCreateNewSecretChat {
pub fn new() -> Self {
Self {
user_id: None,
}
}
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
#[doc(hidden)]
pub fn build(&self) -> CreateNewSecretChat {
CreateNewSecretChat::builder()
.user_id(self.user_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCreateNewStickerSet {
user_id: Option<i32>,
title: Option<String>,
name: Option<String>,
is_masks: Option<bool>,
stickers: Option<Vec<InputSticker>>,
}
impl TDFB for TGCreateNewStickerSet {}
impl AsRef<TGCreateNewStickerSet> for TGCreateNewStickerSet {
fn as_ref(&self) -> &TGCreateNewStickerSet { self }
}
impl TGCreateNewStickerSet {
pub fn new() -> Self {
Self {
user_id: None,
title: None,
name: None,
is_masks: None,
stickers: None,
}
}
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
pub fn title<S: AsRef<str>>(&mut self, title: S) -> &mut Self { self.title = Some(title.as_ref().to_string()); self }
pub fn name<S: AsRef<str>>(&mut self, name: S) -> &mut Self { self.name = Some(name.as_ref().to_string()); self }
pub fn is_masks(&mut self, is_masks: bool) -> &mut Self { self.is_masks = Some(is_masks); self }
#[doc(hidden)] pub fn _stickers(&mut self, stickers: Vec<InputSticker>) -> &mut Self { self.stickers = Some(stickers); self }
#[doc(hidden)]
pub fn build(&self) -> CreateNewStickerSet {
CreateNewStickerSet::builder()
.user_id(self.user_id.clone())
.title(self.title.clone())
.name(self.name.clone())
.is_masks(self.is_masks.clone())
.stickers(self.stickers.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCreateNewSupergroupChat {
title: Option<String>,
is_channel: Option<bool>,
description: Option<String>,
}
impl TDFB for TGCreateNewSupergroupChat {}
impl AsRef<TGCreateNewSupergroupChat> for TGCreateNewSupergroupChat {
fn as_ref(&self) -> &TGCreateNewSupergroupChat { self }
}
impl TGCreateNewSupergroupChat {
pub fn new() -> Self {
Self {
title: None,
is_channel: None,
description: None,
}
}
pub fn title<S: AsRef<str>>(&mut self, title: S) -> &mut Self { self.title = Some(title.as_ref().to_string()); self }
pub fn is_channel(&mut self, is_channel: bool) -> &mut Self { self.is_channel = Some(is_channel); self }
pub fn description<S: AsRef<str>>(&mut self, description: S) -> &mut Self { self.description = Some(description.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> CreateNewSupergroupChat {
CreateNewSupergroupChat::builder()
.title(self.title.clone())
.is_channel(self.is_channel.clone())
.description(self.description.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCreatePrivateChat {
user_id: Option<i32>,
force: Option<bool>,
}
impl TDFB for TGCreatePrivateChat {}
impl AsRef<TGCreatePrivateChat> for TGCreatePrivateChat {
fn as_ref(&self) -> &TGCreatePrivateChat { self }
}
impl TGCreatePrivateChat {
pub fn new() -> Self {
Self {
user_id: None,
force: None,
}
}
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
pub fn force(&mut self, force: bool) -> &mut Self { self.force = Some(force); self }
#[doc(hidden)]
pub fn build(&self) -> CreatePrivateChat {
CreatePrivateChat::builder()
.user_id(self.user_id.clone())
.force(self.force.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCreateSecretChat {
secret_chat_id: Option<i32>,
}
impl TDFB for TGCreateSecretChat {}
impl AsRef<TGCreateSecretChat> for TGCreateSecretChat {
fn as_ref(&self) -> &TGCreateSecretChat { self }
}
impl TGCreateSecretChat {
pub fn new() -> Self {
Self {
secret_chat_id: None,
}
}
pub fn secret_chat_id(&mut self, secret_chat_id: i32) -> &mut Self { self.secret_chat_id = Some(secret_chat_id); self }
#[doc(hidden)]
pub fn build(&self) -> CreateSecretChat {
CreateSecretChat::builder()
.secret_chat_id(self.secret_chat_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCreateSupergroupChat {
supergroup_id: Option<i32>,
force: Option<bool>,
}
impl TDFB for TGCreateSupergroupChat {}
impl AsRef<TGCreateSupergroupChat> for TGCreateSupergroupChat {
fn as_ref(&self) -> &TGCreateSupergroupChat { self }
}
impl TGCreateSupergroupChat {
pub fn new() -> Self {
Self {
supergroup_id: None,
force: None,
}
}
pub fn supergroup_id(&mut self, supergroup_id: i32) -> &mut Self { self.supergroup_id = Some(supergroup_id); self }
pub fn force(&mut self, force: bool) -> &mut Self { self.force = Some(force); self }
#[doc(hidden)]
pub fn build(&self) -> CreateSupergroupChat {
CreateSupergroupChat::builder()
.supergroup_id(self.supergroup_id.clone())
.force(self.force.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGCreateTemporaryPassword {
password: Option<String>,
valid_for: Option<i32>,
}
impl TDFB for TGCreateTemporaryPassword {}
impl AsRef<TGCreateTemporaryPassword> for TGCreateTemporaryPassword {
fn as_ref(&self) -> &TGCreateTemporaryPassword { self }
}
impl TGCreateTemporaryPassword {
pub fn new() -> Self {
Self {
password: None,
valid_for: None,
}
}
pub fn password<S: AsRef<str>>(&mut self, password: S) -> &mut Self { self.password = Some(password.as_ref().to_string()); self }
pub fn valid_for(&mut self, valid_for: i32) -> &mut Self { self.valid_for = Some(valid_for); self }
#[doc(hidden)]
pub fn build(&self) -> CreateTemporaryPassword {
CreateTemporaryPassword::builder()
.password(self.password.clone())
.valid_for(self.valid_for.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGDeleteAccount {
reason: Option<String>,
}
impl TDFB for TGDeleteAccount {}
impl AsRef<TGDeleteAccount> for TGDeleteAccount {
fn as_ref(&self) -> &TGDeleteAccount { self }
}
impl TGDeleteAccount {
pub fn new() -> Self {
Self {
reason: None,
}
}
pub fn reason<S: AsRef<str>>(&mut self, reason: S) -> &mut Self { self.reason = Some(reason.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> DeleteAccount {
DeleteAccount::builder()
.reason(self.reason.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGDeleteChatHistory {
chat_id: Option<i64>,
remove_from_chat_list: Option<bool>,
revoke: Option<bool>,
}
impl TDFB for TGDeleteChatHistory {}
impl AsRef<TGDeleteChatHistory> for TGDeleteChatHistory {
fn as_ref(&self) -> &TGDeleteChatHistory { self }
}
impl TGDeleteChatHistory {
pub fn new() -> Self {
Self {
chat_id: None,
remove_from_chat_list: None,
revoke: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn remove_from_chat_list(&mut self, remove_from_chat_list: bool) -> &mut Self { self.remove_from_chat_list = Some(remove_from_chat_list); self }
pub fn revoke(&mut self, revoke: bool) -> &mut Self { self.revoke = Some(revoke); self }
#[doc(hidden)]
pub fn build(&self) -> DeleteChatHistory {
DeleteChatHistory::builder()
.chat_id(self.chat_id.clone())
.remove_from_chat_list(self.remove_from_chat_list.clone())
.revoke(self.revoke.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGDeleteChatMessagesFromUser {
chat_id: Option<i64>,
user_id: Option<i32>,
}
impl TDFB for TGDeleteChatMessagesFromUser {}
impl AsRef<TGDeleteChatMessagesFromUser> for TGDeleteChatMessagesFromUser {
fn as_ref(&self) -> &TGDeleteChatMessagesFromUser { self }
}
impl TGDeleteChatMessagesFromUser {
pub fn new() -> Self {
Self {
chat_id: None,
user_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
#[doc(hidden)]
pub fn build(&self) -> DeleteChatMessagesFromUser {
DeleteChatMessagesFromUser::builder()
.chat_id(self.chat_id.clone())
.user_id(self.user_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGDeleteChatReplyMarkup {
chat_id: Option<i64>,
message_id: Option<i64>,
}
impl TDFB for TGDeleteChatReplyMarkup {}
impl AsRef<TGDeleteChatReplyMarkup> for TGDeleteChatReplyMarkup {
fn as_ref(&self) -> &TGDeleteChatReplyMarkup { self }
}
impl TGDeleteChatReplyMarkup {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
#[doc(hidden)]
pub fn build(&self) -> DeleteChatReplyMarkup {
DeleteChatReplyMarkup::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGDeleteFile {
file_id: Option<i32>,
}
impl TDFB for TGDeleteFile {}
impl AsRef<TGDeleteFile> for TGDeleteFile {
fn as_ref(&self) -> &TGDeleteFile { self }
}
impl TGDeleteFile {
pub fn new() -> Self {
Self {
file_id: None,
}
}
pub fn file_id(&mut self, file_id: i32) -> &mut Self { self.file_id = Some(file_id); self }
#[doc(hidden)]
pub fn build(&self) -> DeleteFile {
DeleteFile::builder()
.file_id(self.file_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGDeleteLanguagePack {
language_pack_id: Option<String>,
}
impl TDFB for TGDeleteLanguagePack {}
impl AsRef<TGDeleteLanguagePack> for TGDeleteLanguagePack {
fn as_ref(&self) -> &TGDeleteLanguagePack { self }
}
impl TGDeleteLanguagePack {
pub fn new() -> Self {
Self {
language_pack_id: None,
}
}
pub fn language_pack_id<S: AsRef<str>>(&mut self, language_pack_id: S) -> &mut Self { self.language_pack_id = Some(language_pack_id.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> DeleteLanguagePack {
DeleteLanguagePack::builder()
.language_pack_id(self.language_pack_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGDeleteMessages {
chat_id: Option<i64>,
message_ids: Option<Vec<i64>>,
revoke: Option<bool>,
}
impl TDFB for TGDeleteMessages {}
impl AsRef<TGDeleteMessages> for TGDeleteMessages {
fn as_ref(&self) -> &TGDeleteMessages { self }
}
impl TGDeleteMessages {
pub fn new() -> Self {
Self {
chat_id: None,
message_ids: None,
revoke: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_ids(&mut self, message_ids: Vec<i64>) -> &mut Self { self.message_ids = Some(message_ids); self }
pub fn revoke(&mut self, revoke: bool) -> &mut Self { self.revoke = Some(revoke); self }
#[doc(hidden)]
pub fn build(&self) -> DeleteMessages {
DeleteMessages::builder()
.chat_id(self.chat_id.clone())
.message_ids(self.message_ids.clone())
.revoke(self.revoke.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGDeletePassportElement {
type_: Option<Box<PassportElementType>>,
}
impl TDFB for TGDeletePassportElement {}
impl AsRef<TGDeletePassportElement> for TGDeletePassportElement {
fn as_ref(&self) -> &TGDeletePassportElement { self }
}
impl TGDeletePassportElement {
pub fn new() -> Self {
Self {
type_: None,
}
}
#[doc(hidden)] pub fn _type_(&mut self, type_: Box<PassportElementType>) -> &mut Self { self.type_ = Some(type_); self }
#[doc(hidden)]
pub fn build(&self) -> DeletePassportElement {
DeletePassportElement::builder()
.type_(self.type_.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGDeleteProfilePhoto {
profile_photo_id: Option<i64>,
}
impl TDFB for TGDeleteProfilePhoto {}
impl AsRef<TGDeleteProfilePhoto> for TGDeleteProfilePhoto {
fn as_ref(&self) -> &TGDeleteProfilePhoto { self }
}
impl TGDeleteProfilePhoto {
pub fn new() -> Self {
Self {
profile_photo_id: None,
}
}
pub fn profile_photo_id(&mut self, profile_photo_id: i64) -> &mut Self { self.profile_photo_id = Some(profile_photo_id); self }
#[doc(hidden)]
pub fn build(&self) -> DeleteProfilePhoto {
DeleteProfilePhoto::builder()
.profile_photo_id(self.profile_photo_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGDeleteSavedCredentials {
}
impl TDFB for TGDeleteSavedCredentials {}
impl AsRef<TGDeleteSavedCredentials> for TGDeleteSavedCredentials {
fn as_ref(&self) -> &TGDeleteSavedCredentials { self }
}
impl TGDeleteSavedCredentials {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> DeleteSavedCredentials {
DeleteSavedCredentials::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGDeleteSavedOrderInfo {
}
impl TDFB for TGDeleteSavedOrderInfo {}
impl AsRef<TGDeleteSavedOrderInfo> for TGDeleteSavedOrderInfo {
fn as_ref(&self) -> &TGDeleteSavedOrderInfo { self }
}
impl TGDeleteSavedOrderInfo {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> DeleteSavedOrderInfo {
DeleteSavedOrderInfo::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGDeleteSupergroup {
supergroup_id: Option<i32>,
}
impl TDFB for TGDeleteSupergroup {}
impl AsRef<TGDeleteSupergroup> for TGDeleteSupergroup {
fn as_ref(&self) -> &TGDeleteSupergroup { self }
}
impl TGDeleteSupergroup {
pub fn new() -> Self {
Self {
supergroup_id: None,
}
}
pub fn supergroup_id(&mut self, supergroup_id: i32) -> &mut Self { self.supergroup_id = Some(supergroup_id); self }
#[doc(hidden)]
pub fn build(&self) -> DeleteSupergroup {
DeleteSupergroup::builder()
.supergroup_id(self.supergroup_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGDestroy {
}
impl TDFB for TGDestroy {}
impl AsRef<TGDestroy> for TGDestroy {
fn as_ref(&self) -> &TGDestroy { self }
}
impl TGDestroy {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> Destroy {
Destroy::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGDisableProxy {
}
impl TDFB for TGDisableProxy {}
impl AsRef<TGDisableProxy> for TGDisableProxy {
fn as_ref(&self) -> &TGDisableProxy { self }
}
impl TGDisableProxy {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> DisableProxy {
DisableProxy::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGDiscardCall {
call_id: Option<i32>,
is_disconnected: Option<bool>,
duration: Option<i32>,
connection_id: Option<i64>,
}
impl TDFB for TGDiscardCall {}
impl AsRef<TGDiscardCall> for TGDiscardCall {
fn as_ref(&self) -> &TGDiscardCall { self }
}
impl TGDiscardCall {
pub fn new() -> Self {
Self {
call_id: None,
is_disconnected: None,
duration: None,
connection_id: None,
}
}
pub fn call_id(&mut self, call_id: i32) -> &mut Self { self.call_id = Some(call_id); self }
pub fn is_disconnected(&mut self, is_disconnected: bool) -> &mut Self { self.is_disconnected = Some(is_disconnected); self }
pub fn duration(&mut self, duration: i32) -> &mut Self { self.duration = Some(duration); self }
pub fn connection_id(&mut self, connection_id: i64) -> &mut Self { self.connection_id = Some(connection_id); self }
#[doc(hidden)]
pub fn build(&self) -> DiscardCall {
DiscardCall::builder()
.call_id(self.call_id.clone())
.is_disconnected(self.is_disconnected.clone())
.duration(self.duration.clone())
.connection_id(self.connection_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGDisconnectAllWebsites {
}
impl TDFB for TGDisconnectAllWebsites {}
impl AsRef<TGDisconnectAllWebsites> for TGDisconnectAllWebsites {
fn as_ref(&self) -> &TGDisconnectAllWebsites { self }
}
impl TGDisconnectAllWebsites {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> DisconnectAllWebsites {
DisconnectAllWebsites::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGDisconnectWebsite {
website_id: Option<i64>,
}
impl TDFB for TGDisconnectWebsite {}
impl AsRef<TGDisconnectWebsite> for TGDisconnectWebsite {
fn as_ref(&self) -> &TGDisconnectWebsite { self }
}
impl TGDisconnectWebsite {
pub fn new() -> Self {
Self {
website_id: None,
}
}
pub fn website_id(&mut self, website_id: i64) -> &mut Self { self.website_id = Some(website_id); self }
#[doc(hidden)]
pub fn build(&self) -> DisconnectWebsite {
DisconnectWebsite::builder()
.website_id(self.website_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGDownloadFile {
file_id: Option<i32>,
priority: Option<i32>,
offset: Option<i32>,
limit: Option<i32>,
synchronous: Option<bool>,
}
impl TDFB for TGDownloadFile {}
impl AsRef<TGDownloadFile> for TGDownloadFile {
fn as_ref(&self) -> &TGDownloadFile { self }
}
impl TGDownloadFile {
pub fn new() -> Self {
Self {
file_id: None,
priority: None,
offset: None,
limit: None,
synchronous: None,
}
}
pub fn file_id(&mut self, file_id: i32) -> &mut Self { self.file_id = Some(file_id); self }
pub fn priority(&mut self, priority: i32) -> &mut Self { self.priority = Some(priority); self }
pub fn offset(&mut self, offset: i32) -> &mut Self { self.offset = Some(offset); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
pub fn synchronous(&mut self, synchronous: bool) -> &mut Self { self.synchronous = Some(synchronous); self }
#[doc(hidden)]
pub fn build(&self) -> DownloadFile {
DownloadFile::builder()
.file_id(self.file_id.clone())
.priority(self.priority.clone())
.offset(self.offset.clone())
.limit(self.limit.clone())
.synchronous(self.synchronous.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGEditCustomLanguagePackInfo {
info: Option<LanguagePackInfo>,
}
impl TDFB for TGEditCustomLanguagePackInfo {}
impl AsRef<TGEditCustomLanguagePackInfo> for TGEditCustomLanguagePackInfo {
fn as_ref(&self) -> &TGEditCustomLanguagePackInfo { self }
}
impl TGEditCustomLanguagePackInfo {
pub fn new() -> Self {
Self {
info: None,
}
}
#[doc(hidden)] pub fn _info(&mut self, info: LanguagePackInfo) -> &mut Self { self.info = Some(info); self }
#[doc(hidden)]
pub fn build(&self) -> EditCustomLanguagePackInfo {
EditCustomLanguagePackInfo::builder()
.info(self.info.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGEditInlineMessageCaption {
inline_message_id: Option<String>,
reply_markup: Option<Box<ReplyMarkup>>,
caption: Option<FormattedText>,
}
impl TDFB for TGEditInlineMessageCaption {}
impl AsRef<TGEditInlineMessageCaption> for TGEditInlineMessageCaption {
fn as_ref(&self) -> &TGEditInlineMessageCaption { self }
}
impl TGEditInlineMessageCaption {
pub fn new() -> Self {
Self {
inline_message_id: None,
reply_markup: None,
caption: None,
}
}
pub fn inline_message_id<S: AsRef<str>>(&mut self, inline_message_id: S) -> &mut Self { self.inline_message_id = Some(inline_message_id.as_ref().to_string()); self }
#[doc(hidden)] pub fn _reply_markup(&mut self, reply_markup: Box<ReplyMarkup>) -> &mut Self { self.reply_markup = Some(reply_markup); self }
#[doc(hidden)] pub fn _caption(&mut self, caption: FormattedText) -> &mut Self { self.caption = Some(caption); self }
#[doc(hidden)]
pub fn build(&self) -> EditInlineMessageCaption {
EditInlineMessageCaption::builder()
.inline_message_id(self.inline_message_id.clone())
.reply_markup(self.reply_markup.clone())
.caption(self.caption.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGEditInlineMessageLiveLocation {
inline_message_id: Option<String>,
reply_markup: Option<Box<ReplyMarkup>>,
location: Option<Location>,
}
impl TDFB for TGEditInlineMessageLiveLocation {}
impl AsRef<TGEditInlineMessageLiveLocation> for TGEditInlineMessageLiveLocation {
fn as_ref(&self) -> &TGEditInlineMessageLiveLocation { self }
}
impl TGEditInlineMessageLiveLocation {
pub fn new() -> Self {
Self {
inline_message_id: None,
reply_markup: None,
location: None,
}
}
pub fn inline_message_id<S: AsRef<str>>(&mut self, inline_message_id: S) -> &mut Self { self.inline_message_id = Some(inline_message_id.as_ref().to_string()); self }
#[doc(hidden)] pub fn _reply_markup(&mut self, reply_markup: Box<ReplyMarkup>) -> &mut Self { self.reply_markup = Some(reply_markup); self }
#[doc(hidden)] pub fn _location(&mut self, location: Location) -> &mut Self { self.location = Some(location); self }
#[doc(hidden)]
pub fn build(&self) -> EditInlineMessageLiveLocation {
EditInlineMessageLiveLocation::builder()
.inline_message_id(self.inline_message_id.clone())
.reply_markup(self.reply_markup.clone())
.location(self.location.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGEditInlineMessageMedia {
inline_message_id: Option<String>,
reply_markup: Option<Box<ReplyMarkup>>,
input_message_content: Option<Box<InputMessageContent>>,
}
impl TDFB for TGEditInlineMessageMedia {}
impl AsRef<TGEditInlineMessageMedia> for TGEditInlineMessageMedia {
fn as_ref(&self) -> &TGEditInlineMessageMedia { self }
}
impl TGEditInlineMessageMedia {
pub fn new() -> Self {
Self {
inline_message_id: None,
reply_markup: None,
input_message_content: None,
}
}
pub fn inline_message_id<S: AsRef<str>>(&mut self, inline_message_id: S) -> &mut Self { self.inline_message_id = Some(inline_message_id.as_ref().to_string()); self }
#[doc(hidden)] pub fn _reply_markup(&mut self, reply_markup: Box<ReplyMarkup>) -> &mut Self { self.reply_markup = Some(reply_markup); self }
#[doc(hidden)] pub fn _input_message_content(&mut self, input_message_content: Box<InputMessageContent>) -> &mut Self { self.input_message_content = Some(input_message_content); self }
#[doc(hidden)]
pub fn build(&self) -> EditInlineMessageMedia {
EditInlineMessageMedia::builder()
.inline_message_id(self.inline_message_id.clone())
.reply_markup(self.reply_markup.clone())
.input_message_content(self.input_message_content.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGEditInlineMessageReplyMarkup {
inline_message_id: Option<String>,
reply_markup: Option<Box<ReplyMarkup>>,
}
impl TDFB for TGEditInlineMessageReplyMarkup {}
impl AsRef<TGEditInlineMessageReplyMarkup> for TGEditInlineMessageReplyMarkup {
fn as_ref(&self) -> &TGEditInlineMessageReplyMarkup { self }
}
impl TGEditInlineMessageReplyMarkup {
pub fn new() -> Self {
Self {
inline_message_id: None,
reply_markup: None,
}
}
pub fn inline_message_id<S: AsRef<str>>(&mut self, inline_message_id: S) -> &mut Self { self.inline_message_id = Some(inline_message_id.as_ref().to_string()); self }
#[doc(hidden)] pub fn _reply_markup(&mut self, reply_markup: Box<ReplyMarkup>) -> &mut Self { self.reply_markup = Some(reply_markup); self }
#[doc(hidden)]
pub fn build(&self) -> EditInlineMessageReplyMarkup {
EditInlineMessageReplyMarkup::builder()
.inline_message_id(self.inline_message_id.clone())
.reply_markup(self.reply_markup.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGEditInlineMessageText {
inline_message_id: Option<String>,
reply_markup: Option<Box<ReplyMarkup>>,
input_message_content: Option<Box<InputMessageContent>>,
}
impl TDFB for TGEditInlineMessageText {}
impl AsRef<TGEditInlineMessageText> for TGEditInlineMessageText {
fn as_ref(&self) -> &TGEditInlineMessageText { self }
}
impl TGEditInlineMessageText {
pub fn new() -> Self {
Self {
inline_message_id: None,
reply_markup: None,
input_message_content: None,
}
}
pub fn inline_message_id<S: AsRef<str>>(&mut self, inline_message_id: S) -> &mut Self { self.inline_message_id = Some(inline_message_id.as_ref().to_string()); self }
#[doc(hidden)] pub fn _reply_markup(&mut self, reply_markup: Box<ReplyMarkup>) -> &mut Self { self.reply_markup = Some(reply_markup); self }
#[doc(hidden)] pub fn _input_message_content(&mut self, input_message_content: Box<InputMessageContent>) -> &mut Self { self.input_message_content = Some(input_message_content); self }
#[doc(hidden)]
pub fn build(&self) -> EditInlineMessageText {
EditInlineMessageText::builder()
.inline_message_id(self.inline_message_id.clone())
.reply_markup(self.reply_markup.clone())
.input_message_content(self.input_message_content.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGEditMessageCaption {
chat_id: Option<i64>,
message_id: Option<i64>,
reply_markup: Option<Box<ReplyMarkup>>,
caption: Option<FormattedText>,
}
impl TDFB for TGEditMessageCaption {}
impl AsRef<TGEditMessageCaption> for TGEditMessageCaption {
fn as_ref(&self) -> &TGEditMessageCaption { self }
}
impl TGEditMessageCaption {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
reply_markup: None,
caption: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
#[doc(hidden)] pub fn _reply_markup(&mut self, reply_markup: Box<ReplyMarkup>) -> &mut Self { self.reply_markup = Some(reply_markup); self }
#[doc(hidden)] pub fn _caption(&mut self, caption: FormattedText) -> &mut Self { self.caption = Some(caption); self }
#[doc(hidden)]
pub fn build(&self) -> EditMessageCaption {
EditMessageCaption::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.reply_markup(self.reply_markup.clone())
.caption(self.caption.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGEditMessageLiveLocation {
chat_id: Option<i64>,
message_id: Option<i64>,
reply_markup: Option<Box<ReplyMarkup>>,
location: Option<Location>,
}
impl TDFB for TGEditMessageLiveLocation {}
impl AsRef<TGEditMessageLiveLocation> for TGEditMessageLiveLocation {
fn as_ref(&self) -> &TGEditMessageLiveLocation { self }
}
impl TGEditMessageLiveLocation {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
reply_markup: None,
location: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
#[doc(hidden)] pub fn _reply_markup(&mut self, reply_markup: Box<ReplyMarkup>) -> &mut Self { self.reply_markup = Some(reply_markup); self }
#[doc(hidden)] pub fn _location(&mut self, location: Location) -> &mut Self { self.location = Some(location); self }
#[doc(hidden)]
pub fn build(&self) -> EditMessageLiveLocation {
EditMessageLiveLocation::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.reply_markup(self.reply_markup.clone())
.location(self.location.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGEditMessageMedia {
chat_id: Option<i64>,
message_id: Option<i64>,
reply_markup: Option<Box<ReplyMarkup>>,
input_message_content: Option<Box<InputMessageContent>>,
}
impl TDFB for TGEditMessageMedia {}
impl AsRef<TGEditMessageMedia> for TGEditMessageMedia {
fn as_ref(&self) -> &TGEditMessageMedia { self }
}
impl TGEditMessageMedia {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
reply_markup: None,
input_message_content: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
#[doc(hidden)] pub fn _reply_markup(&mut self, reply_markup: Box<ReplyMarkup>) -> &mut Self { self.reply_markup = Some(reply_markup); self }
#[doc(hidden)] pub fn _input_message_content(&mut self, input_message_content: Box<InputMessageContent>) -> &mut Self { self.input_message_content = Some(input_message_content); self }
#[doc(hidden)]
pub fn build(&self) -> EditMessageMedia {
EditMessageMedia::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.reply_markup(self.reply_markup.clone())
.input_message_content(self.input_message_content.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGEditMessageReplyMarkup {
chat_id: Option<i64>,
message_id: Option<i64>,
reply_markup: Option<Box<ReplyMarkup>>,
}
impl TDFB for TGEditMessageReplyMarkup {}
impl AsRef<TGEditMessageReplyMarkup> for TGEditMessageReplyMarkup {
fn as_ref(&self) -> &TGEditMessageReplyMarkup { self }
}
impl TGEditMessageReplyMarkup {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
reply_markup: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
#[doc(hidden)] pub fn _reply_markup(&mut self, reply_markup: Box<ReplyMarkup>) -> &mut Self { self.reply_markup = Some(reply_markup); self }
#[doc(hidden)]
pub fn build(&self) -> EditMessageReplyMarkup {
EditMessageReplyMarkup::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.reply_markup(self.reply_markup.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGEditMessageText {
chat_id: Option<i64>,
message_id: Option<i64>,
reply_markup: Option<Box<ReplyMarkup>>,
input_message_content: Option<Box<InputMessageContent>>,
}
impl TDFB for TGEditMessageText {}
impl AsRef<TGEditMessageText> for TGEditMessageText {
fn as_ref(&self) -> &TGEditMessageText { self }
}
impl TGEditMessageText {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
reply_markup: None,
input_message_content: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
#[doc(hidden)] pub fn _reply_markup(&mut self, reply_markup: Box<ReplyMarkup>) -> &mut Self { self.reply_markup = Some(reply_markup); self }
#[doc(hidden)] pub fn _input_message_content(&mut self, input_message_content: Box<InputMessageContent>) -> &mut Self { self.input_message_content = Some(input_message_content); self }
#[doc(hidden)]
pub fn build(&self) -> EditMessageText {
EditMessageText::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.reply_markup(self.reply_markup.clone())
.input_message_content(self.input_message_content.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGEditProxy {
proxy_id: Option<i32>,
server: Option<String>,
port: Option<i32>,
enable: Option<bool>,
type_: Option<Box<ProxyType>>,
}
impl TDFB for TGEditProxy {}
impl AsRef<TGEditProxy> for TGEditProxy {
fn as_ref(&self) -> &TGEditProxy { self }
}
impl TGEditProxy {
pub fn new() -> Self {
Self {
proxy_id: None,
server: None,
port: None,
enable: None,
type_: None,
}
}
pub fn proxy_id(&mut self, proxy_id: i32) -> &mut Self { self.proxy_id = Some(proxy_id); self }
pub fn server<S: AsRef<str>>(&mut self, server: S) -> &mut Self { self.server = Some(server.as_ref().to_string()); self }
pub fn port(&mut self, port: i32) -> &mut Self { self.port = Some(port); self }
pub fn enable(&mut self, enable: bool) -> &mut Self { self.enable = Some(enable); self }
#[doc(hidden)] pub fn _type_(&mut self, type_: Box<ProxyType>) -> &mut Self { self.type_ = Some(type_); self }
#[doc(hidden)]
pub fn build(&self) -> EditProxy {
EditProxy::builder()
.proxy_id(self.proxy_id.clone())
.server(self.server.clone())
.port(self.port.clone())
.enable(self.enable.clone())
.type_(self.type_.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGEnableProxy {
proxy_id: Option<i32>,
}
impl TDFB for TGEnableProxy {}
impl AsRef<TGEnableProxy> for TGEnableProxy {
fn as_ref(&self) -> &TGEnableProxy { self }
}
impl TGEnableProxy {
pub fn new() -> Self {
Self {
proxy_id: None,
}
}
pub fn proxy_id(&mut self, proxy_id: i32) -> &mut Self { self.proxy_id = Some(proxy_id); self }
#[doc(hidden)]
pub fn build(&self) -> EnableProxy {
EnableProxy::builder()
.proxy_id(self.proxy_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGFinishFileGeneration {
generation_id: Option<i64>,
error: Option<Error>,
}
impl TDFB for TGFinishFileGeneration {}
impl AsRef<TGFinishFileGeneration> for TGFinishFileGeneration {
fn as_ref(&self) -> &TGFinishFileGeneration { self }
}
impl TGFinishFileGeneration {
pub fn new() -> Self {
Self {
generation_id: None,
error: None,
}
}
pub fn generation_id(&mut self, generation_id: i64) -> &mut Self { self.generation_id = Some(generation_id); self }
#[doc(hidden)] pub fn _error(&mut self, error: Error) -> &mut Self { self.error = Some(error); self }
#[doc(hidden)]
pub fn build(&self) -> FinishFileGeneration {
FinishFileGeneration::builder()
.generation_id(self.generation_id.clone())
.error(self.error.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGForwardMessages {
chat_id: Option<i64>,
from_chat_id: Option<i64>,
message_ids: Option<Vec<i64>>,
disable_notification: Option<bool>,
from_background: Option<bool>,
as_album: Option<bool>,
}
impl TDFB for TGForwardMessages {}
impl AsRef<TGForwardMessages> for TGForwardMessages {
fn as_ref(&self) -> &TGForwardMessages { self }
}
impl TGForwardMessages {
pub fn new() -> Self {
Self {
chat_id: None,
from_chat_id: None,
message_ids: None,
disable_notification: None,
from_background: None,
as_album: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn from_chat_id(&mut self, from_chat_id: i64) -> &mut Self { self.from_chat_id = Some(from_chat_id); self }
pub fn message_ids(&mut self, message_ids: Vec<i64>) -> &mut Self { self.message_ids = Some(message_ids); self }
pub fn disable_notification(&mut self, disable_notification: bool) -> &mut Self { self.disable_notification = Some(disable_notification); self }
pub fn from_background(&mut self, from_background: bool) -> &mut Self { self.from_background = Some(from_background); self }
pub fn as_album(&mut self, as_album: bool) -> &mut Self { self.as_album = Some(as_album); self }
#[doc(hidden)]
pub fn build(&self) -> ForwardMessages {
ForwardMessages::builder()
.chat_id(self.chat_id.clone())
.from_chat_id(self.from_chat_id.clone())
.message_ids(self.message_ids.clone())
.disable_notification(self.disable_notification.clone())
.from_background(self.from_background.clone())
.as_album(self.as_album.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGenerateChatInviteLink {
chat_id: Option<i64>,
}
impl TDFB for TGGenerateChatInviteLink {}
impl AsRef<TGGenerateChatInviteLink> for TGGenerateChatInviteLink {
fn as_ref(&self) -> &TGGenerateChatInviteLink { self }
}
impl TGGenerateChatInviteLink {
pub fn new() -> Self {
Self {
chat_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
#[doc(hidden)]
pub fn build(&self) -> GenerateChatInviteLink {
GenerateChatInviteLink::builder()
.chat_id(self.chat_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetAccountTtl {
}
impl TDFB for TGGetAccountTtl {}
impl AsRef<TGGetAccountTtl> for TGGetAccountTtl {
fn as_ref(&self) -> &TGGetAccountTtl { self }
}
impl TGGetAccountTtl {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetAccountTtl {
GetAccountTtl::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetActiveLiveLocationMessages {
}
impl TDFB for TGGetActiveLiveLocationMessages {}
impl AsRef<TGGetActiveLiveLocationMessages> for TGGetActiveLiveLocationMessages {
fn as_ref(&self) -> &TGGetActiveLiveLocationMessages { self }
}
impl TGGetActiveLiveLocationMessages {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetActiveLiveLocationMessages {
GetActiveLiveLocationMessages::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetActiveSessions {
}
impl TDFB for TGGetActiveSessions {}
impl AsRef<TGGetActiveSessions> for TGGetActiveSessions {
fn as_ref(&self) -> &TGGetActiveSessions { self }
}
impl TGGetActiveSessions {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetActiveSessions {
GetActiveSessions::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetAllPassportElements {
password: Option<String>,
}
impl TDFB for TGGetAllPassportElements {}
impl AsRef<TGGetAllPassportElements> for TGGetAllPassportElements {
fn as_ref(&self) -> &TGGetAllPassportElements { self }
}
impl TGGetAllPassportElements {
pub fn new() -> Self {
Self {
password: None,
}
}
pub fn password<S: AsRef<str>>(&mut self, password: S) -> &mut Self { self.password = Some(password.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> GetAllPassportElements {
GetAllPassportElements::builder()
.password(self.password.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetApplicationConfig {
}
impl TDFB for TGGetApplicationConfig {}
impl AsRef<TGGetApplicationConfig> for TGGetApplicationConfig {
fn as_ref(&self) -> &TGGetApplicationConfig { self }
}
impl TGGetApplicationConfig {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetApplicationConfig {
GetApplicationConfig::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetArchivedStickerSets {
is_masks: Option<bool>,
offset_sticker_set_id: Option<i64>,
limit: Option<i32>,
}
impl TDFB for TGGetArchivedStickerSets {}
impl AsRef<TGGetArchivedStickerSets> for TGGetArchivedStickerSets {
fn as_ref(&self) -> &TGGetArchivedStickerSets { self }
}
impl TGGetArchivedStickerSets {
pub fn new() -> Self {
Self {
is_masks: None,
offset_sticker_set_id: None,
limit: None,
}
}
pub fn is_masks(&mut self, is_masks: bool) -> &mut Self { self.is_masks = Some(is_masks); self }
pub fn offset_sticker_set_id(&mut self, offset_sticker_set_id: i64) -> &mut Self { self.offset_sticker_set_id = Some(offset_sticker_set_id); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
#[doc(hidden)]
pub fn build(&self) -> GetArchivedStickerSets {
GetArchivedStickerSets::builder()
.is_masks(self.is_masks.clone())
.offset_sticker_set_id(self.offset_sticker_set_id.clone())
.limit(self.limit.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetAttachedStickerSets {
file_id: Option<i32>,
}
impl TDFB for TGGetAttachedStickerSets {}
impl AsRef<TGGetAttachedStickerSets> for TGGetAttachedStickerSets {
fn as_ref(&self) -> &TGGetAttachedStickerSets { self }
}
impl TGGetAttachedStickerSets {
pub fn new() -> Self {
Self {
file_id: None,
}
}
pub fn file_id(&mut self, file_id: i32) -> &mut Self { self.file_id = Some(file_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetAttachedStickerSets {
GetAttachedStickerSets::builder()
.file_id(self.file_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetAuthorizationState {
}
impl TDFB for TGGetAuthorizationState {}
impl AsRef<TGGetAuthorizationState> for TGGetAuthorizationState {
fn as_ref(&self) -> &TGGetAuthorizationState { self }
}
impl TGGetAuthorizationState {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetAuthorizationState {
GetAuthorizationState::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetBasicGroup {
basic_group_id: Option<i32>,
}
impl TDFB for TGGetBasicGroup {}
impl AsRef<TGGetBasicGroup> for TGGetBasicGroup {
fn as_ref(&self) -> &TGGetBasicGroup { self }
}
impl TGGetBasicGroup {
pub fn new() -> Self {
Self {
basic_group_id: None,
}
}
pub fn basic_group_id(&mut self, basic_group_id: i32) -> &mut Self { self.basic_group_id = Some(basic_group_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetBasicGroup {
GetBasicGroup::builder()
.basic_group_id(self.basic_group_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetBasicGroupFullInfo {
basic_group_id: Option<i32>,
}
impl TDFB for TGGetBasicGroupFullInfo {}
impl AsRef<TGGetBasicGroupFullInfo> for TGGetBasicGroupFullInfo {
fn as_ref(&self) -> &TGGetBasicGroupFullInfo { self }
}
impl TGGetBasicGroupFullInfo {
pub fn new() -> Self {
Self {
basic_group_id: None,
}
}
pub fn basic_group_id(&mut self, basic_group_id: i32) -> &mut Self { self.basic_group_id = Some(basic_group_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetBasicGroupFullInfo {
GetBasicGroupFullInfo::builder()
.basic_group_id(self.basic_group_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetBlockedUsers {
offset: Option<i32>,
limit: Option<i32>,
}
impl TDFB for TGGetBlockedUsers {}
impl AsRef<TGGetBlockedUsers> for TGGetBlockedUsers {
fn as_ref(&self) -> &TGGetBlockedUsers { self }
}
impl TGGetBlockedUsers {
pub fn new() -> Self {
Self {
offset: None,
limit: None,
}
}
pub fn offset(&mut self, offset: i32) -> &mut Self { self.offset = Some(offset); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
#[doc(hidden)]
pub fn build(&self) -> GetBlockedUsers {
GetBlockedUsers::builder()
.offset(self.offset.clone())
.limit(self.limit.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetCallbackQueryAnswer {
chat_id: Option<i64>,
message_id: Option<i64>,
payload: Option<Box<CallbackQueryPayload>>,
}
impl TDFB for TGGetCallbackQueryAnswer {}
impl AsRef<TGGetCallbackQueryAnswer> for TGGetCallbackQueryAnswer {
fn as_ref(&self) -> &TGGetCallbackQueryAnswer { self }
}
impl TGGetCallbackQueryAnswer {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
payload: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
#[doc(hidden)] pub fn _payload(&mut self, payload: Box<CallbackQueryPayload>) -> &mut Self { self.payload = Some(payload); self }
#[doc(hidden)]
pub fn build(&self) -> GetCallbackQueryAnswer {
GetCallbackQueryAnswer::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.payload(self.payload.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetChat {
chat_id: Option<i64>,
}
impl TDFB for TGGetChat {}
impl AsRef<TGGetChat> for TGGetChat {
fn as_ref(&self) -> &TGGetChat { self }
}
impl TGGetChat {
pub fn new() -> Self {
Self {
chat_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetChat {
GetChat::builder()
.chat_id(self.chat_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetChatAdministrators {
chat_id: Option<i64>,
}
impl TDFB for TGGetChatAdministrators {}
impl AsRef<TGGetChatAdministrators> for TGGetChatAdministrators {
fn as_ref(&self) -> &TGGetChatAdministrators { self }
}
impl TGGetChatAdministrators {
pub fn new() -> Self {
Self {
chat_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetChatAdministrators {
GetChatAdministrators::builder()
.chat_id(self.chat_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetChatEventLog {
chat_id: Option<i64>,
query: Option<String>,
from_event_id: Option<i64>,
limit: Option<i32>,
filters: Option<ChatEventLogFilters>,
user_ids: Option<Vec<i32>>,
}
impl TDFB for TGGetChatEventLog {}
impl AsRef<TGGetChatEventLog> for TGGetChatEventLog {
fn as_ref(&self) -> &TGGetChatEventLog { self }
}
impl TGGetChatEventLog {
pub fn new() -> Self {
Self {
chat_id: None,
query: None,
from_event_id: None,
limit: None,
filters: None,
user_ids: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn query<S: AsRef<str>>(&mut self, query: S) -> &mut Self { self.query = Some(query.as_ref().to_string()); self }
pub fn from_event_id(&mut self, from_event_id: i64) -> &mut Self { self.from_event_id = Some(from_event_id); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
pub fn user_ids(&mut self, user_ids: Vec<i32>) -> &mut Self { self.user_ids = Some(user_ids); self }
#[doc(hidden)] pub fn _filters(&mut self, filters: ChatEventLogFilters) -> &mut Self { self.filters = Some(filters); self }
#[doc(hidden)]
pub fn build(&self) -> GetChatEventLog {
GetChatEventLog::builder()
.chat_id(self.chat_id.clone())
.query(self.query.clone())
.from_event_id(self.from_event_id.clone())
.limit(self.limit.clone())
.filters(self.filters.clone())
.user_ids(self.user_ids.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetChatHistory {
chat_id: Option<i64>,
from_message_id: Option<i64>,
offset: Option<i32>,
limit: Option<i32>,
only_local: Option<bool>,
}
impl TDFB for TGGetChatHistory {}
impl AsRef<TGGetChatHistory> for TGGetChatHistory {
fn as_ref(&self) -> &TGGetChatHistory { self }
}
impl TGGetChatHistory {
pub fn new() -> Self {
Self {
chat_id: None,
from_message_id: None,
offset: None,
limit: None,
only_local: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn from_message_id(&mut self, from_message_id: i64) -> &mut Self { self.from_message_id = Some(from_message_id); self }
pub fn offset(&mut self, offset: i32) -> &mut Self { self.offset = Some(offset); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
pub fn only_local(&mut self, only_local: bool) -> &mut Self { self.only_local = Some(only_local); self }
#[doc(hidden)]
pub fn build(&self) -> GetChatHistory {
GetChatHistory::builder()
.chat_id(self.chat_id.clone())
.from_message_id(self.from_message_id.clone())
.offset(self.offset.clone())
.limit(self.limit.clone())
.only_local(self.only_local.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetChatMember {
chat_id: Option<i64>,
user_id: Option<i32>,
}
impl TDFB for TGGetChatMember {}
impl AsRef<TGGetChatMember> for TGGetChatMember {
fn as_ref(&self) -> &TGGetChatMember { self }
}
impl TGGetChatMember {
pub fn new() -> Self {
Self {
chat_id: None,
user_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetChatMember {
GetChatMember::builder()
.chat_id(self.chat_id.clone())
.user_id(self.user_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetChatMessageByDate {
chat_id: Option<i64>,
date: Option<i32>,
}
impl TDFB for TGGetChatMessageByDate {}
impl AsRef<TGGetChatMessageByDate> for TGGetChatMessageByDate {
fn as_ref(&self) -> &TGGetChatMessageByDate { self }
}
impl TGGetChatMessageByDate {
pub fn new() -> Self {
Self {
chat_id: None,
date: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn date(&mut self, date: i32) -> &mut Self { self.date = Some(date); self }
#[doc(hidden)]
pub fn build(&self) -> GetChatMessageByDate {
GetChatMessageByDate::builder()
.chat_id(self.chat_id.clone())
.date(self.date.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetChatMessageCount {
chat_id: Option<i64>,
filter: Option<Box<SearchMessagesFilter>>,
return_local: Option<bool>,
}
impl TDFB for TGGetChatMessageCount {}
impl AsRef<TGGetChatMessageCount> for TGGetChatMessageCount {
fn as_ref(&self) -> &TGGetChatMessageCount { self }
}
impl TGGetChatMessageCount {
pub fn new() -> Self {
Self {
chat_id: None,
filter: None,
return_local: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn return_local(&mut self, return_local: bool) -> &mut Self { self.return_local = Some(return_local); self }
#[doc(hidden)] pub fn _filter(&mut self, filter: Box<SearchMessagesFilter>) -> &mut Self { self.filter = Some(filter); self }
#[doc(hidden)]
pub fn build(&self) -> GetChatMessageCount {
GetChatMessageCount::builder()
.chat_id(self.chat_id.clone())
.filter(self.filter.clone())
.return_local(self.return_local.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetChatNotificationSettingsExceptions {
scope: Option<Box<NotificationSettingsScope>>,
compare_sound: Option<bool>,
}
impl TDFB for TGGetChatNotificationSettingsExceptions {}
impl AsRef<TGGetChatNotificationSettingsExceptions> for TGGetChatNotificationSettingsExceptions {
fn as_ref(&self) -> &TGGetChatNotificationSettingsExceptions { self }
}
impl TGGetChatNotificationSettingsExceptions {
pub fn new() -> Self {
Self {
scope: None,
compare_sound: None,
}
}
pub fn compare_sound(&mut self, compare_sound: bool) -> &mut Self { self.compare_sound = Some(compare_sound); self }
#[doc(hidden)] pub fn _scope(&mut self, scope: Box<NotificationSettingsScope>) -> &mut Self { self.scope = Some(scope); self }
#[doc(hidden)]
pub fn build(&self) -> GetChatNotificationSettingsExceptions {
GetChatNotificationSettingsExceptions::builder()
.scope(self.scope.clone())
.compare_sound(self.compare_sound.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetChatPinnedMessage {
chat_id: Option<i64>,
}
impl TDFB for TGGetChatPinnedMessage {}
impl AsRef<TGGetChatPinnedMessage> for TGGetChatPinnedMessage {
fn as_ref(&self) -> &TGGetChatPinnedMessage { self }
}
impl TGGetChatPinnedMessage {
pub fn new() -> Self {
Self {
chat_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetChatPinnedMessage {
GetChatPinnedMessage::builder()
.chat_id(self.chat_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetChatReportSpamState {
chat_id: Option<i64>,
}
impl TDFB for TGGetChatReportSpamState {}
impl AsRef<TGGetChatReportSpamState> for TGGetChatReportSpamState {
fn as_ref(&self) -> &TGGetChatReportSpamState { self }
}
impl TGGetChatReportSpamState {
pub fn new() -> Self {
Self {
chat_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetChatReportSpamState {
GetChatReportSpamState::builder()
.chat_id(self.chat_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetChats {
offset_order: Option<i64>,
offset_chat_id: Option<i64>,
limit: Option<i32>,
}
impl TDFB for TGGetChats {}
impl AsRef<TGGetChats> for TGGetChats {
fn as_ref(&self) -> &TGGetChats { self }
}
impl TGGetChats {
pub fn new() -> Self {
Self {
offset_order: None,
offset_chat_id: None,
limit: None,
}
}
pub fn offset_order(&mut self, offset_order: i64) -> &mut Self { self.offset_order = Some(offset_order); self }
pub fn offset_chat_id(&mut self, offset_chat_id: i64) -> &mut Self { self.offset_chat_id = Some(offset_chat_id); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
#[doc(hidden)]
pub fn build(&self) -> GetChats {
GetChats::builder()
.offset_order(self.offset_order.clone())
.offset_chat_id(self.offset_chat_id.clone())
.limit(self.limit.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetChatStatisticsUrl {
chat_id: Option<i64>,
parameters: Option<String>,
is_dark: Option<bool>,
}
impl TDFB for TGGetChatStatisticsUrl {}
impl AsRef<TGGetChatStatisticsUrl> for TGGetChatStatisticsUrl {
fn as_ref(&self) -> &TGGetChatStatisticsUrl { self }
}
impl TGGetChatStatisticsUrl {
pub fn new() -> Self {
Self {
chat_id: None,
parameters: None,
is_dark: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn parameters<S: AsRef<str>>(&mut self, parameters: S) -> &mut Self { self.parameters = Some(parameters.as_ref().to_string()); self }
pub fn is_dark(&mut self, is_dark: bool) -> &mut Self { self.is_dark = Some(is_dark); self }
#[doc(hidden)]
pub fn build(&self) -> GetChatStatisticsUrl {
GetChatStatisticsUrl::builder()
.chat_id(self.chat_id.clone())
.parameters(self.parameters.clone())
.is_dark(self.is_dark.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetConnectedWebsites {
}
impl TDFB for TGGetConnectedWebsites {}
impl AsRef<TGGetConnectedWebsites> for TGGetConnectedWebsites {
fn as_ref(&self) -> &TGGetConnectedWebsites { self }
}
impl TGGetConnectedWebsites {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetConnectedWebsites {
GetConnectedWebsites::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetContacts {
}
impl TDFB for TGGetContacts {}
impl AsRef<TGGetContacts> for TGGetContacts {
fn as_ref(&self) -> &TGGetContacts { self }
}
impl TGGetContacts {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetContacts {
GetContacts::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetCountryCode {
}
impl TDFB for TGGetCountryCode {}
impl AsRef<TGGetCountryCode> for TGGetCountryCode {
fn as_ref(&self) -> &TGGetCountryCode { self }
}
impl TGGetCountryCode {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetCountryCode {
GetCountryCode::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetCreatedPublicChats {
}
impl TDFB for TGGetCreatedPublicChats {}
impl AsRef<TGGetCreatedPublicChats> for TGGetCreatedPublicChats {
fn as_ref(&self) -> &TGGetCreatedPublicChats { self }
}
impl TGGetCreatedPublicChats {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetCreatedPublicChats {
GetCreatedPublicChats::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetCurrentState {
}
impl TDFB for TGGetCurrentState {}
impl AsRef<TGGetCurrentState> for TGGetCurrentState {
fn as_ref(&self) -> &TGGetCurrentState { self }
}
impl TGGetCurrentState {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetCurrentState {
GetCurrentState::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetDatabaseStatistics {
}
impl TDFB for TGGetDatabaseStatistics {}
impl AsRef<TGGetDatabaseStatistics> for TGGetDatabaseStatistics {
fn as_ref(&self) -> &TGGetDatabaseStatistics { self }
}
impl TGGetDatabaseStatistics {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetDatabaseStatistics {
GetDatabaseStatistics::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetDeepLinkInfo {
link: Option<String>,
}
impl TDFB for TGGetDeepLinkInfo {}
impl AsRef<TGGetDeepLinkInfo> for TGGetDeepLinkInfo {
fn as_ref(&self) -> &TGGetDeepLinkInfo { self }
}
impl TGGetDeepLinkInfo {
pub fn new() -> Self {
Self {
link: None,
}
}
pub fn link<S: AsRef<str>>(&mut self, link: S) -> &mut Self { self.link = Some(link.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> GetDeepLinkInfo {
GetDeepLinkInfo::builder()
.link(self.link.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetFavoriteStickers {
}
impl TDFB for TGGetFavoriteStickers {}
impl AsRef<TGGetFavoriteStickers> for TGGetFavoriteStickers {
fn as_ref(&self) -> &TGGetFavoriteStickers { self }
}
impl TGGetFavoriteStickers {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetFavoriteStickers {
GetFavoriteStickers::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetFile {
file_id: Option<i32>,
}
impl TDFB for TGGetFile {}
impl AsRef<TGGetFile> for TGGetFile {
fn as_ref(&self) -> &TGGetFile { self }
}
impl TGGetFile {
pub fn new() -> Self {
Self {
file_id: None,
}
}
pub fn file_id(&mut self, file_id: i32) -> &mut Self { self.file_id = Some(file_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetFile {
GetFile::builder()
.file_id(self.file_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetFileDownloadedPrefixSize {
file_id: Option<i32>,
offset: Option<i32>,
}
impl TDFB for TGGetFileDownloadedPrefixSize {}
impl AsRef<TGGetFileDownloadedPrefixSize> for TGGetFileDownloadedPrefixSize {
fn as_ref(&self) -> &TGGetFileDownloadedPrefixSize { self }
}
impl TGGetFileDownloadedPrefixSize {
pub fn new() -> Self {
Self {
file_id: None,
offset: None,
}
}
pub fn file_id(&mut self, file_id: i32) -> &mut Self { self.file_id = Some(file_id); self }
pub fn offset(&mut self, offset: i32) -> &mut Self { self.offset = Some(offset); self }
#[doc(hidden)]
pub fn build(&self) -> GetFileDownloadedPrefixSize {
GetFileDownloadedPrefixSize::builder()
.file_id(self.file_id.clone())
.offset(self.offset.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetFileExtension {
mime_type: Option<String>,
}
impl TDFB for TGGetFileExtension {}
impl AsRef<TGGetFileExtension> for TGGetFileExtension {
fn as_ref(&self) -> &TGGetFileExtension { self }
}
impl TGGetFileExtension {
pub fn new() -> Self {
Self {
mime_type: None,
}
}
pub fn mime_type<S: AsRef<str>>(&mut self, mime_type: S) -> &mut Self { self.mime_type = Some(mime_type.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> GetFileExtension {
GetFileExtension::builder()
.mime_type(self.mime_type.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetFileMimeType {
file_name: Option<String>,
}
impl TDFB for TGGetFileMimeType {}
impl AsRef<TGGetFileMimeType> for TGGetFileMimeType {
fn as_ref(&self) -> &TGGetFileMimeType { self }
}
impl TGGetFileMimeType {
pub fn new() -> Self {
Self {
file_name: None,
}
}
pub fn file_name<S: AsRef<str>>(&mut self, file_name: S) -> &mut Self { self.file_name = Some(file_name.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> GetFileMimeType {
GetFileMimeType::builder()
.file_name(self.file_name.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetGameHighScores {
chat_id: Option<i64>,
message_id: Option<i64>,
user_id: Option<i32>,
}
impl TDFB for TGGetGameHighScores {}
impl AsRef<TGGetGameHighScores> for TGGetGameHighScores {
fn as_ref(&self) -> &TGGetGameHighScores { self }
}
impl TGGetGameHighScores {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
user_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetGameHighScores {
GetGameHighScores::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.user_id(self.user_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetGroupsInCommon {
user_id: Option<i32>,
offset_chat_id: Option<i64>,
limit: Option<i32>,
}
impl TDFB for TGGetGroupsInCommon {}
impl AsRef<TGGetGroupsInCommon> for TGGetGroupsInCommon {
fn as_ref(&self) -> &TGGetGroupsInCommon { self }
}
impl TGGetGroupsInCommon {
pub fn new() -> Self {
Self {
user_id: None,
offset_chat_id: None,
limit: None,
}
}
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
pub fn offset_chat_id(&mut self, offset_chat_id: i64) -> &mut Self { self.offset_chat_id = Some(offset_chat_id); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
#[doc(hidden)]
pub fn build(&self) -> GetGroupsInCommon {
GetGroupsInCommon::builder()
.user_id(self.user_id.clone())
.offset_chat_id(self.offset_chat_id.clone())
.limit(self.limit.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetImportedContactCount {
}
impl TDFB for TGGetImportedContactCount {}
impl AsRef<TGGetImportedContactCount> for TGGetImportedContactCount {
fn as_ref(&self) -> &TGGetImportedContactCount { self }
}
impl TGGetImportedContactCount {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetImportedContactCount {
GetImportedContactCount::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetInlineGameHighScores {
inline_message_id: Option<String>,
user_id: Option<i32>,
}
impl TDFB for TGGetInlineGameHighScores {}
impl AsRef<TGGetInlineGameHighScores> for TGGetInlineGameHighScores {
fn as_ref(&self) -> &TGGetInlineGameHighScores { self }
}
impl TGGetInlineGameHighScores {
pub fn new() -> Self {
Self {
inline_message_id: None,
user_id: None,
}
}
pub fn inline_message_id<S: AsRef<str>>(&mut self, inline_message_id: S) -> &mut Self { self.inline_message_id = Some(inline_message_id.as_ref().to_string()); self }
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetInlineGameHighScores {
GetInlineGameHighScores::builder()
.inline_message_id(self.inline_message_id.clone())
.user_id(self.user_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetInlineQueryResults {
bot_user_id: Option<i32>,
chat_id: Option<i64>,
user_location: Option<Location>,
query: Option<String>,
offset: Option<String>,
}
impl TDFB for TGGetInlineQueryResults {}
impl AsRef<TGGetInlineQueryResults> for TGGetInlineQueryResults {
fn as_ref(&self) -> &TGGetInlineQueryResults { self }
}
impl TGGetInlineQueryResults {
pub fn new() -> Self {
Self {
bot_user_id: None,
chat_id: None,
user_location: None,
query: None,
offset: None,
}
}
pub fn bot_user_id(&mut self, bot_user_id: i32) -> &mut Self { self.bot_user_id = Some(bot_user_id); self }
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn query<S: AsRef<str>>(&mut self, query: S) -> &mut Self { self.query = Some(query.as_ref().to_string()); self }
pub fn offset<S: AsRef<str>>(&mut self, offset: S) -> &mut Self { self.offset = Some(offset.as_ref().to_string()); self }
#[doc(hidden)] pub fn _user_location(&mut self, user_location: Location) -> &mut Self { self.user_location = Some(user_location); self }
#[doc(hidden)]
pub fn build(&self) -> GetInlineQueryResults {
GetInlineQueryResults::builder()
.bot_user_id(self.bot_user_id.clone())
.chat_id(self.chat_id.clone())
.user_location(self.user_location.clone())
.query(self.query.clone())
.offset(self.offset.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetInstalledStickerSets {
is_masks: Option<bool>,
}
impl TDFB for TGGetInstalledStickerSets {}
impl AsRef<TGGetInstalledStickerSets> for TGGetInstalledStickerSets {
fn as_ref(&self) -> &TGGetInstalledStickerSets { self }
}
impl TGGetInstalledStickerSets {
pub fn new() -> Self {
Self {
is_masks: None,
}
}
pub fn is_masks(&mut self, is_masks: bool) -> &mut Self { self.is_masks = Some(is_masks); self }
#[doc(hidden)]
pub fn build(&self) -> GetInstalledStickerSets {
GetInstalledStickerSets::builder()
.is_masks(self.is_masks.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetInviteText {
}
impl TDFB for TGGetInviteText {}
impl AsRef<TGGetInviteText> for TGGetInviteText {
fn as_ref(&self) -> &TGGetInviteText { self }
}
impl TGGetInviteText {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetInviteText {
GetInviteText::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetLanguagePackInfo {
language_pack_id: Option<String>,
}
impl TDFB for TGGetLanguagePackInfo {}
impl AsRef<TGGetLanguagePackInfo> for TGGetLanguagePackInfo {
fn as_ref(&self) -> &TGGetLanguagePackInfo { self }
}
impl TGGetLanguagePackInfo {
pub fn new() -> Self {
Self {
language_pack_id: None,
}
}
pub fn language_pack_id<S: AsRef<str>>(&mut self, language_pack_id: S) -> &mut Self { self.language_pack_id = Some(language_pack_id.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> GetLanguagePackInfo {
GetLanguagePackInfo::builder()
.language_pack_id(self.language_pack_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetLanguagePackString {
language_pack_database_path: Option<String>,
localization_target: Option<String>,
language_pack_id: Option<String>,
key: Option<String>,
}
impl TDFB for TGGetLanguagePackString {}
impl AsRef<TGGetLanguagePackString> for TGGetLanguagePackString {
fn as_ref(&self) -> &TGGetLanguagePackString { self }
}
impl TGGetLanguagePackString {
pub fn new() -> Self {
Self {
language_pack_database_path: None,
localization_target: None,
language_pack_id: None,
key: None,
}
}
pub fn language_pack_database_path<S: AsRef<str>>(&mut self, language_pack_database_path: S) -> &mut Self { self.language_pack_database_path = Some(language_pack_database_path.as_ref().to_string()); self }
pub fn localization_target<S: AsRef<str>>(&mut self, localization_target: S) -> &mut Self { self.localization_target = Some(localization_target.as_ref().to_string()); self }
pub fn language_pack_id<S: AsRef<str>>(&mut self, language_pack_id: S) -> &mut Self { self.language_pack_id = Some(language_pack_id.as_ref().to_string()); self }
pub fn key<S: AsRef<str>>(&mut self, key: S) -> &mut Self { self.key = Some(key.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> GetLanguagePackString {
GetLanguagePackString::builder()
.language_pack_database_path(self.language_pack_database_path.clone())
.localization_target(self.localization_target.clone())
.language_pack_id(self.language_pack_id.clone())
.key(self.key.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetLanguagePackStrings {
language_pack_id: Option<String>,
keys: Option<Vec<String>>,
}
impl TDFB for TGGetLanguagePackStrings {}
impl AsRef<TGGetLanguagePackStrings> for TGGetLanguagePackStrings {
fn as_ref(&self) -> &TGGetLanguagePackStrings { self }
}
impl TGGetLanguagePackStrings {
pub fn new() -> Self {
Self {
language_pack_id: None,
keys: None,
}
}
pub fn language_pack_id<S: AsRef<str>>(&mut self, language_pack_id: S) -> &mut Self { self.language_pack_id = Some(language_pack_id.as_ref().to_string()); self }
#[doc(hidden)] pub fn _keys(&mut self, keys: Vec<String>) -> &mut Self { self.keys = Some(keys); self }
#[doc(hidden)]
pub fn build(&self) -> GetLanguagePackStrings {
GetLanguagePackStrings::builder()
.language_pack_id(self.language_pack_id.clone())
.keys(self.keys.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetLocalizationTargetInfo {
only_local: Option<bool>,
}
impl TDFB for TGGetLocalizationTargetInfo {}
impl AsRef<TGGetLocalizationTargetInfo> for TGGetLocalizationTargetInfo {
fn as_ref(&self) -> &TGGetLocalizationTargetInfo { self }
}
impl TGGetLocalizationTargetInfo {
pub fn new() -> Self {
Self {
only_local: None,
}
}
pub fn only_local(&mut self, only_local: bool) -> &mut Self { self.only_local = Some(only_local); self }
#[doc(hidden)]
pub fn build(&self) -> GetLocalizationTargetInfo {
GetLocalizationTargetInfo::builder()
.only_local(self.only_local.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetLogStream {
}
impl TDFB for TGGetLogStream {}
impl AsRef<TGGetLogStream> for TGGetLogStream {
fn as_ref(&self) -> &TGGetLogStream { self }
}
impl TGGetLogStream {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetLogStream {
GetLogStream::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetLogTags {
}
impl TDFB for TGGetLogTags {}
impl AsRef<TGGetLogTags> for TGGetLogTags {
fn as_ref(&self) -> &TGGetLogTags { self }
}
impl TGGetLogTags {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetLogTags {
GetLogTags::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetLogTagVerbosityLevel {
tag: Option<String>,
}
impl TDFB for TGGetLogTagVerbosityLevel {}
impl AsRef<TGGetLogTagVerbosityLevel> for TGGetLogTagVerbosityLevel {
fn as_ref(&self) -> &TGGetLogTagVerbosityLevel { self }
}
impl TGGetLogTagVerbosityLevel {
pub fn new() -> Self {
Self {
tag: None,
}
}
pub fn tag<S: AsRef<str>>(&mut self, tag: S) -> &mut Self { self.tag = Some(tag.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> GetLogTagVerbosityLevel {
GetLogTagVerbosityLevel::builder()
.tag(self.tag.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetLogVerbosityLevel {
}
impl TDFB for TGGetLogVerbosityLevel {}
impl AsRef<TGGetLogVerbosityLevel> for TGGetLogVerbosityLevel {
fn as_ref(&self) -> &TGGetLogVerbosityLevel { self }
}
impl TGGetLogVerbosityLevel {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetLogVerbosityLevel {
GetLogVerbosityLevel::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetMapThumbnailFile {
location: Option<Location>,
zoom: Option<i32>,
width: Option<i32>,
height: Option<i32>,
scale: Option<i32>,
chat_id: Option<i64>,
}
impl TDFB for TGGetMapThumbnailFile {}
impl AsRef<TGGetMapThumbnailFile> for TGGetMapThumbnailFile {
fn as_ref(&self) -> &TGGetMapThumbnailFile { self }
}
impl TGGetMapThumbnailFile {
pub fn new() -> Self {
Self {
location: None,
zoom: None,
width: None,
height: None,
scale: None,
chat_id: None,
}
}
pub fn zoom(&mut self, zoom: i32) -> &mut Self { self.zoom = Some(zoom); self }
pub fn width(&mut self, width: i32) -> &mut Self { self.width = Some(width); self }
pub fn height(&mut self, height: i32) -> &mut Self { self.height = Some(height); self }
pub fn scale(&mut self, scale: i32) -> &mut Self { self.scale = Some(scale); self }
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
#[doc(hidden)] pub fn _location(&mut self, location: Location) -> &mut Self { self.location = Some(location); self }
#[doc(hidden)]
pub fn build(&self) -> GetMapThumbnailFile {
GetMapThumbnailFile::builder()
.location(self.location.clone())
.zoom(self.zoom.clone())
.width(self.width.clone())
.height(self.height.clone())
.scale(self.scale.clone())
.chat_id(self.chat_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetMe {
}
impl TDFB for TGGetMe {}
impl AsRef<TGGetMe> for TGGetMe {
fn as_ref(&self) -> &TGGetMe { self }
}
impl TGGetMe {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetMe {
GetMe::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetMessage {
chat_id: Option<i64>,
message_id: Option<i64>,
}
impl TDFB for TGGetMessage {}
impl AsRef<TGGetMessage> for TGGetMessage {
fn as_ref(&self) -> &TGGetMessage { self }
}
impl TGGetMessage {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetMessage {
GetMessage::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetMessageLink {
chat_id: Option<i64>,
message_id: Option<i64>,
}
impl TDFB for TGGetMessageLink {}
impl AsRef<TGGetMessageLink> for TGGetMessageLink {
fn as_ref(&self) -> &TGGetMessageLink { self }
}
impl TGGetMessageLink {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetMessageLink {
GetMessageLink::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetMessageLocally {
chat_id: Option<i64>,
message_id: Option<i64>,
}
impl TDFB for TGGetMessageLocally {}
impl AsRef<TGGetMessageLocally> for TGGetMessageLocally {
fn as_ref(&self) -> &TGGetMessageLocally { self }
}
impl TGGetMessageLocally {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetMessageLocally {
GetMessageLocally::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetMessages {
chat_id: Option<i64>,
message_ids: Option<Vec<i64>>,
}
impl TDFB for TGGetMessages {}
impl AsRef<TGGetMessages> for TGGetMessages {
fn as_ref(&self) -> &TGGetMessages { self }
}
impl TGGetMessages {
pub fn new() -> Self {
Self {
chat_id: None,
message_ids: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_ids(&mut self, message_ids: Vec<i64>) -> &mut Self { self.message_ids = Some(message_ids); self }
#[doc(hidden)]
pub fn build(&self) -> GetMessages {
GetMessages::builder()
.chat_id(self.chat_id.clone())
.message_ids(self.message_ids.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetNetworkStatistics {
only_current: Option<bool>,
}
impl TDFB for TGGetNetworkStatistics {}
impl AsRef<TGGetNetworkStatistics> for TGGetNetworkStatistics {
fn as_ref(&self) -> &TGGetNetworkStatistics { self }
}
impl TGGetNetworkStatistics {
pub fn new() -> Self {
Self {
only_current: None,
}
}
pub fn only_current(&mut self, only_current: bool) -> &mut Self { self.only_current = Some(only_current); self }
#[doc(hidden)]
pub fn build(&self) -> GetNetworkStatistics {
GetNetworkStatistics::builder()
.only_current(self.only_current.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetOption {
name: Option<String>,
}
impl TDFB for TGGetOption {}
impl AsRef<TGGetOption> for TGGetOption {
fn as_ref(&self) -> &TGGetOption { self }
}
impl TGGetOption {
pub fn new() -> Self {
Self {
name: None,
}
}
pub fn name<S: AsRef<str>>(&mut self, name: S) -> &mut Self { self.name = Some(name.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> GetOption {
GetOption::builder()
.name(self.name.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetPassportAuthorizationForm {
bot_user_id: Option<i32>,
scope: Option<String>,
public_key: Option<String>,
nonce: Option<String>,
}
impl TDFB for TGGetPassportAuthorizationForm {}
impl AsRef<TGGetPassportAuthorizationForm> for TGGetPassportAuthorizationForm {
fn as_ref(&self) -> &TGGetPassportAuthorizationForm { self }
}
impl TGGetPassportAuthorizationForm {
pub fn new() -> Self {
Self {
bot_user_id: None,
scope: None,
public_key: None,
nonce: None,
}
}
pub fn bot_user_id(&mut self, bot_user_id: i32) -> &mut Self { self.bot_user_id = Some(bot_user_id); self }
pub fn scope<S: AsRef<str>>(&mut self, scope: S) -> &mut Self { self.scope = Some(scope.as_ref().to_string()); self }
pub fn public_key<S: AsRef<str>>(&mut self, public_key: S) -> &mut Self { self.public_key = Some(public_key.as_ref().to_string()); self }
pub fn nonce<S: AsRef<str>>(&mut self, nonce: S) -> &mut Self { self.nonce = Some(nonce.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> GetPassportAuthorizationForm {
GetPassportAuthorizationForm::builder()
.bot_user_id(self.bot_user_id.clone())
.scope(self.scope.clone())
.public_key(self.public_key.clone())
.nonce(self.nonce.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetPassportAuthorizationFormAvailableElements {
autorization_form_id: Option<i32>,
password: Option<String>,
}
impl TDFB for TGGetPassportAuthorizationFormAvailableElements {}
impl AsRef<TGGetPassportAuthorizationFormAvailableElements> for TGGetPassportAuthorizationFormAvailableElements {
fn as_ref(&self) -> &TGGetPassportAuthorizationFormAvailableElements { self }
}
impl TGGetPassportAuthorizationFormAvailableElements {
pub fn new() -> Self {
Self {
autorization_form_id: None,
password: None,
}
}
pub fn autorization_form_id(&mut self, autorization_form_id: i32) -> &mut Self { self.autorization_form_id = Some(autorization_form_id); self }
pub fn password<S: AsRef<str>>(&mut self, password: S) -> &mut Self { self.password = Some(password.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> GetPassportAuthorizationFormAvailableElements {
GetPassportAuthorizationFormAvailableElements::builder()
.autorization_form_id(self.autorization_form_id.clone())
.password(self.password.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetPassportElement {
type_: Option<Box<PassportElementType>>,
password: Option<String>,
}
impl TDFB for TGGetPassportElement {}
impl AsRef<TGGetPassportElement> for TGGetPassportElement {
fn as_ref(&self) -> &TGGetPassportElement { self }
}
impl TGGetPassportElement {
pub fn new() -> Self {
Self {
type_: None,
password: None,
}
}
pub fn password<S: AsRef<str>>(&mut self, password: S) -> &mut Self { self.password = Some(password.as_ref().to_string()); self }
#[doc(hidden)] pub fn _type_(&mut self, type_: Box<PassportElementType>) -> &mut Self { self.type_ = Some(type_); self }
#[doc(hidden)]
pub fn build(&self) -> GetPassportElement {
GetPassportElement::builder()
.type_(self.type_.clone())
.password(self.password.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetPasswordState {
}
impl TDFB for TGGetPasswordState {}
impl AsRef<TGGetPasswordState> for TGGetPasswordState {
fn as_ref(&self) -> &TGGetPasswordState { self }
}
impl TGGetPasswordState {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetPasswordState {
GetPasswordState::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetPaymentForm {
chat_id: Option<i64>,
message_id: Option<i64>,
}
impl TDFB for TGGetPaymentForm {}
impl AsRef<TGGetPaymentForm> for TGGetPaymentForm {
fn as_ref(&self) -> &TGGetPaymentForm { self }
}
impl TGGetPaymentForm {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetPaymentForm {
GetPaymentForm::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetPaymentReceipt {
chat_id: Option<i64>,
message_id: Option<i64>,
}
impl TDFB for TGGetPaymentReceipt {}
impl AsRef<TGGetPaymentReceipt> for TGGetPaymentReceipt {
fn as_ref(&self) -> &TGGetPaymentReceipt { self }
}
impl TGGetPaymentReceipt {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetPaymentReceipt {
GetPaymentReceipt::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetPreferredCountryLanguage {
country_code: Option<String>,
}
impl TDFB for TGGetPreferredCountryLanguage {}
impl AsRef<TGGetPreferredCountryLanguage> for TGGetPreferredCountryLanguage {
fn as_ref(&self) -> &TGGetPreferredCountryLanguage { self }
}
impl TGGetPreferredCountryLanguage {
pub fn new() -> Self {
Self {
country_code: None,
}
}
pub fn country_code<S: AsRef<str>>(&mut self, country_code: S) -> &mut Self { self.country_code = Some(country_code.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> GetPreferredCountryLanguage {
GetPreferredCountryLanguage::builder()
.country_code(self.country_code.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetProxies {
}
impl TDFB for TGGetProxies {}
impl AsRef<TGGetProxies> for TGGetProxies {
fn as_ref(&self) -> &TGGetProxies { self }
}
impl TGGetProxies {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetProxies {
GetProxies::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetProxyLink {
proxy_id: Option<i32>,
}
impl TDFB for TGGetProxyLink {}
impl AsRef<TGGetProxyLink> for TGGetProxyLink {
fn as_ref(&self) -> &TGGetProxyLink { self }
}
impl TGGetProxyLink {
pub fn new() -> Self {
Self {
proxy_id: None,
}
}
pub fn proxy_id(&mut self, proxy_id: i32) -> &mut Self { self.proxy_id = Some(proxy_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetProxyLink {
GetProxyLink::builder()
.proxy_id(self.proxy_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetPublicMessageLink {
chat_id: Option<i64>,
message_id: Option<i64>,
for_album: Option<bool>,
}
impl TDFB for TGGetPublicMessageLink {}
impl AsRef<TGGetPublicMessageLink> for TGGetPublicMessageLink {
fn as_ref(&self) -> &TGGetPublicMessageLink { self }
}
impl TGGetPublicMessageLink {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
for_album: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
pub fn for_album(&mut self, for_album: bool) -> &mut Self { self.for_album = Some(for_album); self }
#[doc(hidden)]
pub fn build(&self) -> GetPublicMessageLink {
GetPublicMessageLink::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.for_album(self.for_album.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetPushReceiverId {
payload: Option<String>,
}
impl TDFB for TGGetPushReceiverId {}
impl AsRef<TGGetPushReceiverId> for TGGetPushReceiverId {
fn as_ref(&self) -> &TGGetPushReceiverId { self }
}
impl TGGetPushReceiverId {
pub fn new() -> Self {
Self {
payload: None,
}
}
pub fn payload<S: AsRef<str>>(&mut self, payload: S) -> &mut Self { self.payload = Some(payload.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> GetPushReceiverId {
GetPushReceiverId::builder()
.payload(self.payload.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetRecentInlineBots {
}
impl TDFB for TGGetRecentInlineBots {}
impl AsRef<TGGetRecentInlineBots> for TGGetRecentInlineBots {
fn as_ref(&self) -> &TGGetRecentInlineBots { self }
}
impl TGGetRecentInlineBots {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetRecentInlineBots {
GetRecentInlineBots::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetRecentlyVisitedTMeUrls {
referrer: Option<String>,
}
impl TDFB for TGGetRecentlyVisitedTMeUrls {}
impl AsRef<TGGetRecentlyVisitedTMeUrls> for TGGetRecentlyVisitedTMeUrls {
fn as_ref(&self) -> &TGGetRecentlyVisitedTMeUrls { self }
}
impl TGGetRecentlyVisitedTMeUrls {
pub fn new() -> Self {
Self {
referrer: None,
}
}
pub fn referrer<S: AsRef<str>>(&mut self, referrer: S) -> &mut Self { self.referrer = Some(referrer.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> GetRecentlyVisitedTMeUrls {
GetRecentlyVisitedTMeUrls::builder()
.referrer(self.referrer.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetRecentStickers {
is_attached: Option<bool>,
}
impl TDFB for TGGetRecentStickers {}
impl AsRef<TGGetRecentStickers> for TGGetRecentStickers {
fn as_ref(&self) -> &TGGetRecentStickers { self }
}
impl TGGetRecentStickers {
pub fn new() -> Self {
Self {
is_attached: None,
}
}
pub fn is_attached(&mut self, is_attached: bool) -> &mut Self { self.is_attached = Some(is_attached); self }
#[doc(hidden)]
pub fn build(&self) -> GetRecentStickers {
GetRecentStickers::builder()
.is_attached(self.is_attached.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetRecoveryEmailAddress {
password: Option<String>,
}
impl TDFB for TGGetRecoveryEmailAddress {}
impl AsRef<TGGetRecoveryEmailAddress> for TGGetRecoveryEmailAddress {
fn as_ref(&self) -> &TGGetRecoveryEmailAddress { self }
}
impl TGGetRecoveryEmailAddress {
pub fn new() -> Self {
Self {
password: None,
}
}
pub fn password<S: AsRef<str>>(&mut self, password: S) -> &mut Self { self.password = Some(password.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> GetRecoveryEmailAddress {
GetRecoveryEmailAddress::builder()
.password(self.password.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetRemoteFile {
remote_file_id: Option<String>,
file_type: Option<Box<FileType>>,
}
impl TDFB for TGGetRemoteFile {}
impl AsRef<TGGetRemoteFile> for TGGetRemoteFile {
fn as_ref(&self) -> &TGGetRemoteFile { self }
}
impl TGGetRemoteFile {
pub fn new() -> Self {
Self {
remote_file_id: None,
file_type: None,
}
}
pub fn remote_file_id<S: AsRef<str>>(&mut self, remote_file_id: S) -> &mut Self { self.remote_file_id = Some(remote_file_id.as_ref().to_string()); self }
#[doc(hidden)] pub fn _file_type(&mut self, file_type: Box<FileType>) -> &mut Self { self.file_type = Some(file_type); self }
#[doc(hidden)]
pub fn build(&self) -> GetRemoteFile {
GetRemoteFile::builder()
.remote_file_id(self.remote_file_id.clone())
.file_type(self.file_type.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetRepliedMessage {
chat_id: Option<i64>,
message_id: Option<i64>,
}
impl TDFB for TGGetRepliedMessage {}
impl AsRef<TGGetRepliedMessage> for TGGetRepliedMessage {
fn as_ref(&self) -> &TGGetRepliedMessage { self }
}
impl TGGetRepliedMessage {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetRepliedMessage {
GetRepliedMessage::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetSavedAnimations {
}
impl TDFB for TGGetSavedAnimations {}
impl AsRef<TGGetSavedAnimations> for TGGetSavedAnimations {
fn as_ref(&self) -> &TGGetSavedAnimations { self }
}
impl TGGetSavedAnimations {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetSavedAnimations {
GetSavedAnimations::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetSavedOrderInfo {
}
impl TDFB for TGGetSavedOrderInfo {}
impl AsRef<TGGetSavedOrderInfo> for TGGetSavedOrderInfo {
fn as_ref(&self) -> &TGGetSavedOrderInfo { self }
}
impl TGGetSavedOrderInfo {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetSavedOrderInfo {
GetSavedOrderInfo::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetScopeNotificationSettings {
scope: Option<Box<NotificationSettingsScope>>,
}
impl TDFB for TGGetScopeNotificationSettings {}
impl AsRef<TGGetScopeNotificationSettings> for TGGetScopeNotificationSettings {
fn as_ref(&self) -> &TGGetScopeNotificationSettings { self }
}
impl TGGetScopeNotificationSettings {
pub fn new() -> Self {
Self {
scope: None,
}
}
#[doc(hidden)] pub fn _scope(&mut self, scope: Box<NotificationSettingsScope>) -> &mut Self { self.scope = Some(scope); self }
#[doc(hidden)]
pub fn build(&self) -> GetScopeNotificationSettings {
GetScopeNotificationSettings::builder()
.scope(self.scope.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetSecretChat {
secret_chat_id: Option<i32>,
}
impl TDFB for TGGetSecretChat {}
impl AsRef<TGGetSecretChat> for TGGetSecretChat {
fn as_ref(&self) -> &TGGetSecretChat { self }
}
impl TGGetSecretChat {
pub fn new() -> Self {
Self {
secret_chat_id: None,
}
}
pub fn secret_chat_id(&mut self, secret_chat_id: i32) -> &mut Self { self.secret_chat_id = Some(secret_chat_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetSecretChat {
GetSecretChat::builder()
.secret_chat_id(self.secret_chat_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetStickerEmojis {
sticker: Option<Box<InputFile>>,
}
impl TDFB for TGGetStickerEmojis {}
impl AsRef<TGGetStickerEmojis> for TGGetStickerEmojis {
fn as_ref(&self) -> &TGGetStickerEmojis { self }
}
impl TGGetStickerEmojis {
pub fn new() -> Self {
Self {
sticker: None,
}
}
#[doc(hidden)] pub fn _sticker(&mut self, sticker: Box<InputFile>) -> &mut Self { self.sticker = Some(sticker); self }
#[doc(hidden)]
pub fn build(&self) -> GetStickerEmojis {
GetStickerEmojis::builder()
.sticker(self.sticker.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetStickers {
emoji: Option<String>,
limit: Option<i32>,
}
impl TDFB for TGGetStickers {}
impl AsRef<TGGetStickers> for TGGetStickers {
fn as_ref(&self) -> &TGGetStickers { self }
}
impl TGGetStickers {
pub fn new() -> Self {
Self {
emoji: None,
limit: None,
}
}
pub fn emoji<S: AsRef<str>>(&mut self, emoji: S) -> &mut Self { self.emoji = Some(emoji.as_ref().to_string()); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
#[doc(hidden)]
pub fn build(&self) -> GetStickers {
GetStickers::builder()
.emoji(self.emoji.clone())
.limit(self.limit.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetStickerSet {
set_id: Option<i64>,
}
impl TDFB for TGGetStickerSet {}
impl AsRef<TGGetStickerSet> for TGGetStickerSet {
fn as_ref(&self) -> &TGGetStickerSet { self }
}
impl TGGetStickerSet {
pub fn new() -> Self {
Self {
set_id: None,
}
}
pub fn set_id(&mut self, set_id: i64) -> &mut Self { self.set_id = Some(set_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetStickerSet {
GetStickerSet::builder()
.set_id(self.set_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetStorageStatistics {
chat_limit: Option<i32>,
}
impl TDFB for TGGetStorageStatistics {}
impl AsRef<TGGetStorageStatistics> for TGGetStorageStatistics {
fn as_ref(&self) -> &TGGetStorageStatistics { self }
}
impl TGGetStorageStatistics {
pub fn new() -> Self {
Self {
chat_limit: None,
}
}
pub fn chat_limit(&mut self, chat_limit: i32) -> &mut Self { self.chat_limit = Some(chat_limit); self }
#[doc(hidden)]
pub fn build(&self) -> GetStorageStatistics {
GetStorageStatistics::builder()
.chat_limit(self.chat_limit.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetStorageStatisticsFast {
}
impl TDFB for TGGetStorageStatisticsFast {}
impl AsRef<TGGetStorageStatisticsFast> for TGGetStorageStatisticsFast {
fn as_ref(&self) -> &TGGetStorageStatisticsFast { self }
}
impl TGGetStorageStatisticsFast {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetStorageStatisticsFast {
GetStorageStatisticsFast::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetSupergroup {
supergroup_id: Option<i32>,
}
impl TDFB for TGGetSupergroup {}
impl AsRef<TGGetSupergroup> for TGGetSupergroup {
fn as_ref(&self) -> &TGGetSupergroup { self }
}
impl TGGetSupergroup {
pub fn new() -> Self {
Self {
supergroup_id: None,
}
}
pub fn supergroup_id(&mut self, supergroup_id: i32) -> &mut Self { self.supergroup_id = Some(supergroup_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetSupergroup {
GetSupergroup::builder()
.supergroup_id(self.supergroup_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetSupergroupFullInfo {
supergroup_id: Option<i32>,
}
impl TDFB for TGGetSupergroupFullInfo {}
impl AsRef<TGGetSupergroupFullInfo> for TGGetSupergroupFullInfo {
fn as_ref(&self) -> &TGGetSupergroupFullInfo { self }
}
impl TGGetSupergroupFullInfo {
pub fn new() -> Self {
Self {
supergroup_id: None,
}
}
pub fn supergroup_id(&mut self, supergroup_id: i32) -> &mut Self { self.supergroup_id = Some(supergroup_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetSupergroupFullInfo {
GetSupergroupFullInfo::builder()
.supergroup_id(self.supergroup_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetSupergroupMembers {
supergroup_id: Option<i32>,
filter: Option<Box<SupergroupMembersFilter>>,
offset: Option<i32>,
limit: Option<i32>,
}
impl TDFB for TGGetSupergroupMembers {}
impl AsRef<TGGetSupergroupMembers> for TGGetSupergroupMembers {
fn as_ref(&self) -> &TGGetSupergroupMembers { self }
}
impl TGGetSupergroupMembers {
pub fn new() -> Self {
Self {
supergroup_id: None,
filter: None,
offset: None,
limit: None,
}
}
pub fn supergroup_id(&mut self, supergroup_id: i32) -> &mut Self { self.supergroup_id = Some(supergroup_id); self }
pub fn offset(&mut self, offset: i32) -> &mut Self { self.offset = Some(offset); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
#[doc(hidden)] pub fn _filter(&mut self, filter: Box<SupergroupMembersFilter>) -> &mut Self { self.filter = Some(filter); self }
#[doc(hidden)]
pub fn build(&self) -> GetSupergroupMembers {
GetSupergroupMembers::builder()
.supergroup_id(self.supergroup_id.clone())
.filter(self.filter.clone())
.offset(self.offset.clone())
.limit(self.limit.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetSupportUser {
}
impl TDFB for TGGetSupportUser {}
impl AsRef<TGGetSupportUser> for TGGetSupportUser {
fn as_ref(&self) -> &TGGetSupportUser { self }
}
impl TGGetSupportUser {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetSupportUser {
GetSupportUser::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetTemporaryPasswordState {
}
impl TDFB for TGGetTemporaryPasswordState {}
impl AsRef<TGGetTemporaryPasswordState> for TGGetTemporaryPasswordState {
fn as_ref(&self) -> &TGGetTemporaryPasswordState { self }
}
impl TGGetTemporaryPasswordState {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetTemporaryPasswordState {
GetTemporaryPasswordState::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetTextEntities {
text: Option<String>,
}
impl TDFB for TGGetTextEntities {}
impl AsRef<TGGetTextEntities> for TGGetTextEntities {
fn as_ref(&self) -> &TGGetTextEntities { self }
}
impl TGGetTextEntities {
pub fn new() -> Self {
Self {
text: None,
}
}
pub fn text<S: AsRef<str>>(&mut self, text: S) -> &mut Self { self.text = Some(text.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> GetTextEntities {
GetTextEntities::builder()
.text(self.text.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetTopChats {
category: Option<Box<TopChatCategory>>,
limit: Option<i32>,
}
impl TDFB for TGGetTopChats {}
impl AsRef<TGGetTopChats> for TGGetTopChats {
fn as_ref(&self) -> &TGGetTopChats { self }
}
impl TGGetTopChats {
pub fn new() -> Self {
Self {
category: None,
limit: None,
}
}
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
#[doc(hidden)] pub fn _category(&mut self, category: Box<TopChatCategory>) -> &mut Self { self.category = Some(category); self }
#[doc(hidden)]
pub fn build(&self) -> GetTopChats {
GetTopChats::builder()
.category(self.category.clone())
.limit(self.limit.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetTrendingStickerSets {
}
impl TDFB for TGGetTrendingStickerSets {}
impl AsRef<TGGetTrendingStickerSets> for TGGetTrendingStickerSets {
fn as_ref(&self) -> &TGGetTrendingStickerSets { self }
}
impl TGGetTrendingStickerSets {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetTrendingStickerSets {
GetTrendingStickerSets::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetUser {
user_id: Option<i32>,
}
impl TDFB for TGGetUser {}
impl AsRef<TGGetUser> for TGGetUser {
fn as_ref(&self) -> &TGGetUser { self }
}
impl TGGetUser {
pub fn new() -> Self {
Self {
user_id: None,
}
}
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetUser {
GetUser::builder()
.user_id(self.user_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetUserFullInfo {
user_id: Option<i32>,
}
impl TDFB for TGGetUserFullInfo {}
impl AsRef<TGGetUserFullInfo> for TGGetUserFullInfo {
fn as_ref(&self) -> &TGGetUserFullInfo { self }
}
impl TGGetUserFullInfo {
pub fn new() -> Self {
Self {
user_id: None,
}
}
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
#[doc(hidden)]
pub fn build(&self) -> GetUserFullInfo {
GetUserFullInfo::builder()
.user_id(self.user_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetUserPrivacySettingRules {
setting: Option<Box<UserPrivacySetting>>,
}
impl TDFB for TGGetUserPrivacySettingRules {}
impl AsRef<TGGetUserPrivacySettingRules> for TGGetUserPrivacySettingRules {
fn as_ref(&self) -> &TGGetUserPrivacySettingRules { self }
}
impl TGGetUserPrivacySettingRules {
pub fn new() -> Self {
Self {
setting: None,
}
}
#[doc(hidden)] pub fn _setting(&mut self, setting: Box<UserPrivacySetting>) -> &mut Self { self.setting = Some(setting); self }
#[doc(hidden)]
pub fn build(&self) -> GetUserPrivacySettingRules {
GetUserPrivacySettingRules::builder()
.setting(self.setting.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetUserProfilePhotos {
user_id: Option<i32>,
offset: Option<i32>,
limit: Option<i32>,
}
impl TDFB for TGGetUserProfilePhotos {}
impl AsRef<TGGetUserProfilePhotos> for TGGetUserProfilePhotos {
fn as_ref(&self) -> &TGGetUserProfilePhotos { self }
}
impl TGGetUserProfilePhotos {
pub fn new() -> Self {
Self {
user_id: None,
offset: None,
limit: None,
}
}
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
pub fn offset(&mut self, offset: i32) -> &mut Self { self.offset = Some(offset); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
#[doc(hidden)]
pub fn build(&self) -> GetUserProfilePhotos {
GetUserProfilePhotos::builder()
.user_id(self.user_id.clone())
.offset(self.offset.clone())
.limit(self.limit.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetWallpapers {
}
impl TDFB for TGGetWallpapers {}
impl AsRef<TGGetWallpapers> for TGGetWallpapers {
fn as_ref(&self) -> &TGGetWallpapers { self }
}
impl TGGetWallpapers {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> GetWallpapers {
GetWallpapers::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetWebPageInstantView {
url: Option<String>,
force_full: Option<bool>,
}
impl TDFB for TGGetWebPageInstantView {}
impl AsRef<TGGetWebPageInstantView> for TGGetWebPageInstantView {
fn as_ref(&self) -> &TGGetWebPageInstantView { self }
}
impl TGGetWebPageInstantView {
pub fn new() -> Self {
Self {
url: None,
force_full: None,
}
}
pub fn url<S: AsRef<str>>(&mut self, url: S) -> &mut Self { self.url = Some(url.as_ref().to_string()); self }
pub fn force_full(&mut self, force_full: bool) -> &mut Self { self.force_full = Some(force_full); self }
#[doc(hidden)]
pub fn build(&self) -> GetWebPageInstantView {
GetWebPageInstantView::builder()
.url(self.url.clone())
.force_full(self.force_full.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGGetWebPagePreview {
text: Option<FormattedText>,
}
impl TDFB for TGGetWebPagePreview {}
impl AsRef<TGGetWebPagePreview> for TGGetWebPagePreview {
fn as_ref(&self) -> &TGGetWebPagePreview { self }
}
impl TGGetWebPagePreview {
pub fn new() -> Self {
Self {
text: None,
}
}
#[doc(hidden)] pub fn _text(&mut self, text: FormattedText) -> &mut Self { self.text = Some(text); self }
#[doc(hidden)]
pub fn build(&self) -> GetWebPagePreview {
GetWebPagePreview::builder()
.text(self.text.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGImportContacts {
contacts: Option<Vec<Contact>>,
}
impl TDFB for TGImportContacts {}
impl AsRef<TGImportContacts> for TGImportContacts {
fn as_ref(&self) -> &TGImportContacts { self }
}
impl TGImportContacts {
pub fn new() -> Self {
Self {
contacts: None,
}
}
#[doc(hidden)] pub fn _contacts(&mut self, contacts: Vec<Contact>) -> &mut Self { self.contacts = Some(contacts); self }
#[doc(hidden)]
pub fn build(&self) -> ImportContacts {
ImportContacts::builder()
.contacts(self.contacts.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGJoinChat {
chat_id: Option<i64>,
}
impl TDFB for TGJoinChat {}
impl AsRef<TGJoinChat> for TGJoinChat {
fn as_ref(&self) -> &TGJoinChat { self }
}
impl TGJoinChat {
pub fn new() -> Self {
Self {
chat_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
#[doc(hidden)]
pub fn build(&self) -> JoinChat {
JoinChat::builder()
.chat_id(self.chat_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGJoinChatByInviteLink {
invite_link: Option<String>,
}
impl TDFB for TGJoinChatByInviteLink {}
impl AsRef<TGJoinChatByInviteLink> for TGJoinChatByInviteLink {
fn as_ref(&self) -> &TGJoinChatByInviteLink { self }
}
impl TGJoinChatByInviteLink {
pub fn new() -> Self {
Self {
invite_link: None,
}
}
pub fn invite_link<S: AsRef<str>>(&mut self, invite_link: S) -> &mut Self { self.invite_link = Some(invite_link.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> JoinChatByInviteLink {
JoinChatByInviteLink::builder()
.invite_link(self.invite_link.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGLeaveChat {
chat_id: Option<i64>,
}
impl TDFB for TGLeaveChat {}
impl AsRef<TGLeaveChat> for TGLeaveChat {
fn as_ref(&self) -> &TGLeaveChat { self }
}
impl TGLeaveChat {
pub fn new() -> Self {
Self {
chat_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
#[doc(hidden)]
pub fn build(&self) -> LeaveChat {
LeaveChat::builder()
.chat_id(self.chat_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGLogOut {
}
impl TDFB for TGLogOut {}
impl AsRef<TGLogOut> for TGLogOut {
fn as_ref(&self) -> &TGLogOut { self }
}
impl TGLogOut {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> LogOut {
LogOut::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGOpenChat {
chat_id: Option<i64>,
}
impl TDFB for TGOpenChat {}
impl AsRef<TGOpenChat> for TGOpenChat {
fn as_ref(&self) -> &TGOpenChat { self }
}
impl TGOpenChat {
pub fn new() -> Self {
Self {
chat_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
#[doc(hidden)]
pub fn build(&self) -> OpenChat {
OpenChat::builder()
.chat_id(self.chat_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGOpenMessageContent {
chat_id: Option<i64>,
message_id: Option<i64>,
}
impl TDFB for TGOpenMessageContent {}
impl AsRef<TGOpenMessageContent> for TGOpenMessageContent {
fn as_ref(&self) -> &TGOpenMessageContent { self }
}
impl TGOpenMessageContent {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
#[doc(hidden)]
pub fn build(&self) -> OpenMessageContent {
OpenMessageContent::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGOptimizeStorage {
size: Option<i64>,
ttl: Option<i32>,
count: Option<i32>,
immunity_delay: Option<i32>,
file_types: Option<Vec<Box<FileType>>>,
chat_ids: Option<Vec<i64>>,
exclude_chat_ids: Option<Vec<i64>>,
chat_limit: Option<i32>,
}
impl TDFB for TGOptimizeStorage {}
impl AsRef<TGOptimizeStorage> for TGOptimizeStorage {
fn as_ref(&self) -> &TGOptimizeStorage { self }
}
impl TGOptimizeStorage {
pub fn new() -> Self {
Self {
size: None,
ttl: None,
count: None,
immunity_delay: None,
file_types: None,
chat_ids: None,
exclude_chat_ids: None,
chat_limit: None,
}
}
pub fn size(&mut self, size: i64) -> &mut Self { self.size = Some(size); self }
pub fn ttl(&mut self, ttl: i32) -> &mut Self { self.ttl = Some(ttl); self }
pub fn count(&mut self, count: i32) -> &mut Self { self.count = Some(count); self }
pub fn immunity_delay(&mut self, immunity_delay: i32) -> &mut Self { self.immunity_delay = Some(immunity_delay); self }
pub fn chat_ids(&mut self, chat_ids: Vec<i64>) -> &mut Self { self.chat_ids = Some(chat_ids); self }
pub fn exclude_chat_ids(&mut self, exclude_chat_ids: Vec<i64>) -> &mut Self { self.exclude_chat_ids = Some(exclude_chat_ids); self }
pub fn chat_limit(&mut self, chat_limit: i32) -> &mut Self { self.chat_limit = Some(chat_limit); self }
#[doc(hidden)] pub fn _file_types(&mut self, file_types: Vec<Box<FileType>>) -> &mut Self { self.file_types = Some(file_types); self }
#[doc(hidden)]
pub fn build(&self) -> OptimizeStorage {
OptimizeStorage::builder()
.size(self.size.clone())
.ttl(self.ttl.clone())
.count(self.count.clone())
.immunity_delay(self.immunity_delay.clone())
.file_types(self.file_types.clone())
.chat_ids(self.chat_ids.clone())
.exclude_chat_ids(self.exclude_chat_ids.clone())
.chat_limit(self.chat_limit.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGParseTextEntities {
text: Option<String>,
parse_mode: Option<Box<TextParseMode>>,
}
impl TDFB for TGParseTextEntities {}
impl AsRef<TGParseTextEntities> for TGParseTextEntities {
fn as_ref(&self) -> &TGParseTextEntities { self }
}
impl TGParseTextEntities {
pub fn new() -> Self {
Self {
text: None,
parse_mode: None,
}
}
pub fn text<S: AsRef<str>>(&mut self, text: S) -> &mut Self { self.text = Some(text.as_ref().to_string()); self }
#[doc(hidden)] pub fn _parse_mode(&mut self, parse_mode: Box<TextParseMode>) -> &mut Self { self.parse_mode = Some(parse_mode); self }
#[doc(hidden)]
pub fn build(&self) -> ParseTextEntities {
ParseTextEntities::builder()
.text(self.text.clone())
.parse_mode(self.parse_mode.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGPinChatMessage {
chat_id: Option<i64>,
message_id: Option<i64>,
disable_notification: Option<bool>,
}
impl TDFB for TGPinChatMessage {}
impl AsRef<TGPinChatMessage> for TGPinChatMessage {
fn as_ref(&self) -> &TGPinChatMessage { self }
}
impl TGPinChatMessage {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
disable_notification: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
pub fn disable_notification(&mut self, disable_notification: bool) -> &mut Self { self.disable_notification = Some(disable_notification); self }
#[doc(hidden)]
pub fn build(&self) -> PinChatMessage {
PinChatMessage::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.disable_notification(self.disable_notification.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGPingProxy {
proxy_id: Option<i32>,
}
impl TDFB for TGPingProxy {}
impl AsRef<TGPingProxy> for TGPingProxy {
fn as_ref(&self) -> &TGPingProxy { self }
}
impl TGPingProxy {
pub fn new() -> Self {
Self {
proxy_id: None,
}
}
pub fn proxy_id(&mut self, proxy_id: i32) -> &mut Self { self.proxy_id = Some(proxy_id); self }
#[doc(hidden)]
pub fn build(&self) -> PingProxy {
PingProxy::builder()
.proxy_id(self.proxy_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGProcessPushNotification {
payload: Option<String>,
}
impl TDFB for TGProcessPushNotification {}
impl AsRef<TGProcessPushNotification> for TGProcessPushNotification {
fn as_ref(&self) -> &TGProcessPushNotification { self }
}
impl TGProcessPushNotification {
pub fn new() -> Self {
Self {
payload: None,
}
}
pub fn payload<S: AsRef<str>>(&mut self, payload: S) -> &mut Self { self.payload = Some(payload.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> ProcessPushNotification {
ProcessPushNotification::builder()
.payload(self.payload.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGReadAllChatMentions {
chat_id: Option<i64>,
}
impl TDFB for TGReadAllChatMentions {}
impl AsRef<TGReadAllChatMentions> for TGReadAllChatMentions {
fn as_ref(&self) -> &TGReadAllChatMentions { self }
}
impl TGReadAllChatMentions {
pub fn new() -> Self {
Self {
chat_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
#[doc(hidden)]
pub fn build(&self) -> ReadAllChatMentions {
ReadAllChatMentions::builder()
.chat_id(self.chat_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGReadFilePart {
file_id: Option<i32>,
offset: Option<i32>,
count: Option<i32>,
}
impl TDFB for TGReadFilePart {}
impl AsRef<TGReadFilePart> for TGReadFilePart {
fn as_ref(&self) -> &TGReadFilePart { self }
}
impl TGReadFilePart {
pub fn new() -> Self {
Self {
file_id: None,
offset: None,
count: None,
}
}
pub fn file_id(&mut self, file_id: i32) -> &mut Self { self.file_id = Some(file_id); self }
pub fn offset(&mut self, offset: i32) -> &mut Self { self.offset = Some(offset); self }
pub fn count(&mut self, count: i32) -> &mut Self { self.count = Some(count); self }
#[doc(hidden)]
pub fn build(&self) -> ReadFilePart {
ReadFilePart::builder()
.file_id(self.file_id.clone())
.offset(self.offset.clone())
.count(self.count.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGRecoverAuthenticationPassword {
recovery_code: Option<String>,
}
impl TDFB for TGRecoverAuthenticationPassword {}
impl AsRef<TGRecoverAuthenticationPassword> for TGRecoverAuthenticationPassword {
fn as_ref(&self) -> &TGRecoverAuthenticationPassword { self }
}
impl TGRecoverAuthenticationPassword {
pub fn new() -> Self {
Self {
recovery_code: None,
}
}
pub fn recovery_code<S: AsRef<str>>(&mut self, recovery_code: S) -> &mut Self { self.recovery_code = Some(recovery_code.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> RecoverAuthenticationPassword {
RecoverAuthenticationPassword::builder()
.recovery_code(self.recovery_code.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGRecoverPassword {
recovery_code: Option<String>,
}
impl TDFB for TGRecoverPassword {}
impl AsRef<TGRecoverPassword> for TGRecoverPassword {
fn as_ref(&self) -> &TGRecoverPassword { self }
}
impl TGRecoverPassword {
pub fn new() -> Self {
Self {
recovery_code: None,
}
}
pub fn recovery_code<S: AsRef<str>>(&mut self, recovery_code: S) -> &mut Self { self.recovery_code = Some(recovery_code.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> RecoverPassword {
RecoverPassword::builder()
.recovery_code(self.recovery_code.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGRegisterDevice {
device_token: Option<Box<DeviceToken>>,
other_user_ids: Option<Vec<i32>>,
}
impl TDFB for TGRegisterDevice {}
impl AsRef<TGRegisterDevice> for TGRegisterDevice {
fn as_ref(&self) -> &TGRegisterDevice { self }
}
impl TGRegisterDevice {
pub fn new() -> Self {
Self {
device_token: None,
other_user_ids: None,
}
}
pub fn other_user_ids(&mut self, other_user_ids: Vec<i32>) -> &mut Self { self.other_user_ids = Some(other_user_ids); self }
#[doc(hidden)] pub fn _device_token(&mut self, device_token: Box<DeviceToken>) -> &mut Self { self.device_token = Some(device_token); self }
#[doc(hidden)]
pub fn build(&self) -> RegisterDevice {
RegisterDevice::builder()
.device_token(self.device_token.clone())
.other_user_ids(self.other_user_ids.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGRemoveContacts {
user_ids: Option<Vec<i32>>,
}
impl TDFB for TGRemoveContacts {}
impl AsRef<TGRemoveContacts> for TGRemoveContacts {
fn as_ref(&self) -> &TGRemoveContacts { self }
}
impl TGRemoveContacts {
pub fn new() -> Self {
Self {
user_ids: None,
}
}
pub fn user_ids(&mut self, user_ids: Vec<i32>) -> &mut Self { self.user_ids = Some(user_ids); self }
#[doc(hidden)]
pub fn build(&self) -> RemoveContacts {
RemoveContacts::builder()
.user_ids(self.user_ids.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGRemoveFavoriteSticker {
sticker: Option<Box<InputFile>>,
}
impl TDFB for TGRemoveFavoriteSticker {}
impl AsRef<TGRemoveFavoriteSticker> for TGRemoveFavoriteSticker {
fn as_ref(&self) -> &TGRemoveFavoriteSticker { self }
}
impl TGRemoveFavoriteSticker {
pub fn new() -> Self {
Self {
sticker: None,
}
}
#[doc(hidden)] pub fn _sticker(&mut self, sticker: Box<InputFile>) -> &mut Self { self.sticker = Some(sticker); self }
#[doc(hidden)]
pub fn build(&self) -> RemoveFavoriteSticker {
RemoveFavoriteSticker::builder()
.sticker(self.sticker.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGRemoveNotification {
notification_group_id: Option<i32>,
notification_id: Option<i32>,
}
impl TDFB for TGRemoveNotification {}
impl AsRef<TGRemoveNotification> for TGRemoveNotification {
fn as_ref(&self) -> &TGRemoveNotification { self }
}
impl TGRemoveNotification {
pub fn new() -> Self {
Self {
notification_group_id: None,
notification_id: None,
}
}
pub fn notification_group_id(&mut self, notification_group_id: i32) -> &mut Self { self.notification_group_id = Some(notification_group_id); self }
pub fn notification_id(&mut self, notification_id: i32) -> &mut Self { self.notification_id = Some(notification_id); self }
#[doc(hidden)]
pub fn build(&self) -> RemoveNotification {
RemoveNotification::builder()
.notification_group_id(self.notification_group_id.clone())
.notification_id(self.notification_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGRemoveNotificationGroup {
notification_group_id: Option<i32>,
max_notification_id: Option<i32>,
}
impl TDFB for TGRemoveNotificationGroup {}
impl AsRef<TGRemoveNotificationGroup> for TGRemoveNotificationGroup {
fn as_ref(&self) -> &TGRemoveNotificationGroup { self }
}
impl TGRemoveNotificationGroup {
pub fn new() -> Self {
Self {
notification_group_id: None,
max_notification_id: None,
}
}
pub fn notification_group_id(&mut self, notification_group_id: i32) -> &mut Self { self.notification_group_id = Some(notification_group_id); self }
pub fn max_notification_id(&mut self, max_notification_id: i32) -> &mut Self { self.max_notification_id = Some(max_notification_id); self }
#[doc(hidden)]
pub fn build(&self) -> RemoveNotificationGroup {
RemoveNotificationGroup::builder()
.notification_group_id(self.notification_group_id.clone())
.max_notification_id(self.max_notification_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGRemoveProxy {
proxy_id: Option<i32>,
}
impl TDFB for TGRemoveProxy {}
impl AsRef<TGRemoveProxy> for TGRemoveProxy {
fn as_ref(&self) -> &TGRemoveProxy { self }
}
impl TGRemoveProxy {
pub fn new() -> Self {
Self {
proxy_id: None,
}
}
pub fn proxy_id(&mut self, proxy_id: i32) -> &mut Self { self.proxy_id = Some(proxy_id); self }
#[doc(hidden)]
pub fn build(&self) -> RemoveProxy {
RemoveProxy::builder()
.proxy_id(self.proxy_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGRemoveRecentHashtag {
hashtag: Option<String>,
}
impl TDFB for TGRemoveRecentHashtag {}
impl AsRef<TGRemoveRecentHashtag> for TGRemoveRecentHashtag {
fn as_ref(&self) -> &TGRemoveRecentHashtag { self }
}
impl TGRemoveRecentHashtag {
pub fn new() -> Self {
Self {
hashtag: None,
}
}
pub fn hashtag<S: AsRef<str>>(&mut self, hashtag: S) -> &mut Self { self.hashtag = Some(hashtag.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> RemoveRecentHashtag {
RemoveRecentHashtag::builder()
.hashtag(self.hashtag.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGRemoveRecentlyFoundChat {
chat_id: Option<i64>,
}
impl TDFB for TGRemoveRecentlyFoundChat {}
impl AsRef<TGRemoveRecentlyFoundChat> for TGRemoveRecentlyFoundChat {
fn as_ref(&self) -> &TGRemoveRecentlyFoundChat { self }
}
impl TGRemoveRecentlyFoundChat {
pub fn new() -> Self {
Self {
chat_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
#[doc(hidden)]
pub fn build(&self) -> RemoveRecentlyFoundChat {
RemoveRecentlyFoundChat::builder()
.chat_id(self.chat_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGRemoveRecentSticker {
is_attached: Option<bool>,
sticker: Option<Box<InputFile>>,
}
impl TDFB for TGRemoveRecentSticker {}
impl AsRef<TGRemoveRecentSticker> for TGRemoveRecentSticker {
fn as_ref(&self) -> &TGRemoveRecentSticker { self }
}
impl TGRemoveRecentSticker {
pub fn new() -> Self {
Self {
is_attached: None,
sticker: None,
}
}
pub fn is_attached(&mut self, is_attached: bool) -> &mut Self { self.is_attached = Some(is_attached); self }
#[doc(hidden)] pub fn _sticker(&mut self, sticker: Box<InputFile>) -> &mut Self { self.sticker = Some(sticker); self }
#[doc(hidden)]
pub fn build(&self) -> RemoveRecentSticker {
RemoveRecentSticker::builder()
.is_attached(self.is_attached.clone())
.sticker(self.sticker.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGRemoveSavedAnimation {
animation: Option<Box<InputFile>>,
}
impl TDFB for TGRemoveSavedAnimation {}
impl AsRef<TGRemoveSavedAnimation> for TGRemoveSavedAnimation {
fn as_ref(&self) -> &TGRemoveSavedAnimation { self }
}
impl TGRemoveSavedAnimation {
pub fn new() -> Self {
Self {
animation: None,
}
}
#[doc(hidden)] pub fn _animation(&mut self, animation: Box<InputFile>) -> &mut Self { self.animation = Some(animation); self }
#[doc(hidden)]
pub fn build(&self) -> RemoveSavedAnimation {
RemoveSavedAnimation::builder()
.animation(self.animation.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGRemoveStickerFromSet {
sticker: Option<Box<InputFile>>,
}
impl TDFB for TGRemoveStickerFromSet {}
impl AsRef<TGRemoveStickerFromSet> for TGRemoveStickerFromSet {
fn as_ref(&self) -> &TGRemoveStickerFromSet { self }
}
impl TGRemoveStickerFromSet {
pub fn new() -> Self {
Self {
sticker: None,
}
}
#[doc(hidden)] pub fn _sticker(&mut self, sticker: Box<InputFile>) -> &mut Self { self.sticker = Some(sticker); self }
#[doc(hidden)]
pub fn build(&self) -> RemoveStickerFromSet {
RemoveStickerFromSet::builder()
.sticker(self.sticker.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGRemoveTopChat {
category: Option<Box<TopChatCategory>>,
chat_id: Option<i64>,
}
impl TDFB for TGRemoveTopChat {}
impl AsRef<TGRemoveTopChat> for TGRemoveTopChat {
fn as_ref(&self) -> &TGRemoveTopChat { self }
}
impl TGRemoveTopChat {
pub fn new() -> Self {
Self {
category: None,
chat_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
#[doc(hidden)] pub fn _category(&mut self, category: Box<TopChatCategory>) -> &mut Self { self.category = Some(category); self }
#[doc(hidden)]
pub fn build(&self) -> RemoveTopChat {
RemoveTopChat::builder()
.category(self.category.clone())
.chat_id(self.chat_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGReorderInstalledStickerSets {
is_masks: Option<bool>,
sticker_set_ids: Option<Vec<i64>>,
}
impl TDFB for TGReorderInstalledStickerSets {}
impl AsRef<TGReorderInstalledStickerSets> for TGReorderInstalledStickerSets {
fn as_ref(&self) -> &TGReorderInstalledStickerSets { self }
}
impl TGReorderInstalledStickerSets {
pub fn new() -> Self {
Self {
is_masks: None,
sticker_set_ids: None,
}
}
pub fn is_masks(&mut self, is_masks: bool) -> &mut Self { self.is_masks = Some(is_masks); self }
pub fn sticker_set_ids(&mut self, sticker_set_ids: Vec<i64>) -> &mut Self { self.sticker_set_ids = Some(sticker_set_ids); self }
#[doc(hidden)]
pub fn build(&self) -> ReorderInstalledStickerSets {
ReorderInstalledStickerSets::builder()
.is_masks(self.is_masks.clone())
.sticker_set_ids(self.sticker_set_ids.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGReportChat {
chat_id: Option<i64>,
reason: Option<Box<ChatReportReason>>,
message_ids: Option<Vec<i64>>,
}
impl TDFB for TGReportChat {}
impl AsRef<TGReportChat> for TGReportChat {
fn as_ref(&self) -> &TGReportChat { self }
}
impl TGReportChat {
pub fn new() -> Self {
Self {
chat_id: None,
reason: None,
message_ids: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_ids(&mut self, message_ids: Vec<i64>) -> &mut Self { self.message_ids = Some(message_ids); self }
#[doc(hidden)] pub fn _reason(&mut self, reason: Box<ChatReportReason>) -> &mut Self { self.reason = Some(reason); self }
#[doc(hidden)]
pub fn build(&self) -> ReportChat {
ReportChat::builder()
.chat_id(self.chat_id.clone())
.reason(self.reason.clone())
.message_ids(self.message_ids.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGReportSupergroupSpam {
supergroup_id: Option<i32>,
user_id: Option<i32>,
message_ids: Option<Vec<i64>>,
}
impl TDFB for TGReportSupergroupSpam {}
impl AsRef<TGReportSupergroupSpam> for TGReportSupergroupSpam {
fn as_ref(&self) -> &TGReportSupergroupSpam { self }
}
impl TGReportSupergroupSpam {
pub fn new() -> Self {
Self {
supergroup_id: None,
user_id: None,
message_ids: None,
}
}
pub fn supergroup_id(&mut self, supergroup_id: i32) -> &mut Self { self.supergroup_id = Some(supergroup_id); self }
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
pub fn message_ids(&mut self, message_ids: Vec<i64>) -> &mut Self { self.message_ids = Some(message_ids); self }
#[doc(hidden)]
pub fn build(&self) -> ReportSupergroupSpam {
ReportSupergroupSpam::builder()
.supergroup_id(self.supergroup_id.clone())
.user_id(self.user_id.clone())
.message_ids(self.message_ids.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGRequestAuthenticationPasswordRecovery {
}
impl TDFB for TGRequestAuthenticationPasswordRecovery {}
impl AsRef<TGRequestAuthenticationPasswordRecovery> for TGRequestAuthenticationPasswordRecovery {
fn as_ref(&self) -> &TGRequestAuthenticationPasswordRecovery { self }
}
impl TGRequestAuthenticationPasswordRecovery {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> RequestAuthenticationPasswordRecovery {
RequestAuthenticationPasswordRecovery::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGRequestPasswordRecovery {
}
impl TDFB for TGRequestPasswordRecovery {}
impl AsRef<TGRequestPasswordRecovery> for TGRequestPasswordRecovery {
fn as_ref(&self) -> &TGRequestPasswordRecovery { self }
}
impl TGRequestPasswordRecovery {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> RequestPasswordRecovery {
RequestPasswordRecovery::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGResendAuthenticationCode {
}
impl TDFB for TGResendAuthenticationCode {}
impl AsRef<TGResendAuthenticationCode> for TGResendAuthenticationCode {
fn as_ref(&self) -> &TGResendAuthenticationCode { self }
}
impl TGResendAuthenticationCode {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> ResendAuthenticationCode {
ResendAuthenticationCode::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGResendChangePhoneNumberCode {
}
impl TDFB for TGResendChangePhoneNumberCode {}
impl AsRef<TGResendChangePhoneNumberCode> for TGResendChangePhoneNumberCode {
fn as_ref(&self) -> &TGResendChangePhoneNumberCode { self }
}
impl TGResendChangePhoneNumberCode {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> ResendChangePhoneNumberCode {
ResendChangePhoneNumberCode::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGResendEmailAddressVerificationCode {
}
impl TDFB for TGResendEmailAddressVerificationCode {}
impl AsRef<TGResendEmailAddressVerificationCode> for TGResendEmailAddressVerificationCode {
fn as_ref(&self) -> &TGResendEmailAddressVerificationCode { self }
}
impl TGResendEmailAddressVerificationCode {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> ResendEmailAddressVerificationCode {
ResendEmailAddressVerificationCode::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGResendPhoneNumberConfirmationCode {
}
impl TDFB for TGResendPhoneNumberConfirmationCode {}
impl AsRef<TGResendPhoneNumberConfirmationCode> for TGResendPhoneNumberConfirmationCode {
fn as_ref(&self) -> &TGResendPhoneNumberConfirmationCode { self }
}
impl TGResendPhoneNumberConfirmationCode {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> ResendPhoneNumberConfirmationCode {
ResendPhoneNumberConfirmationCode::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGResendPhoneNumberVerificationCode {
}
impl TDFB for TGResendPhoneNumberVerificationCode {}
impl AsRef<TGResendPhoneNumberVerificationCode> for TGResendPhoneNumberVerificationCode {
fn as_ref(&self) -> &TGResendPhoneNumberVerificationCode { self }
}
impl TGResendPhoneNumberVerificationCode {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> ResendPhoneNumberVerificationCode {
ResendPhoneNumberVerificationCode::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGResendRecoveryEmailAddressCode {
}
impl TDFB for TGResendRecoveryEmailAddressCode {}
impl AsRef<TGResendRecoveryEmailAddressCode> for TGResendRecoveryEmailAddressCode {
fn as_ref(&self) -> &TGResendRecoveryEmailAddressCode { self }
}
impl TGResendRecoveryEmailAddressCode {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> ResendRecoveryEmailAddressCode {
ResendRecoveryEmailAddressCode::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGResetAllNotificationSettings {
}
impl TDFB for TGResetAllNotificationSettings {}
impl AsRef<TGResetAllNotificationSettings> for TGResetAllNotificationSettings {
fn as_ref(&self) -> &TGResetAllNotificationSettings { self }
}
impl TGResetAllNotificationSettings {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> ResetAllNotificationSettings {
ResetAllNotificationSettings::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGResetNetworkStatistics {
}
impl TDFB for TGResetNetworkStatistics {}
impl AsRef<TGResetNetworkStatistics> for TGResetNetworkStatistics {
fn as_ref(&self) -> &TGResetNetworkStatistics { self }
}
impl TGResetNetworkStatistics {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> ResetNetworkStatistics {
ResetNetworkStatistics::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSearchCallMessages {
from_message_id: Option<i64>,
limit: Option<i32>,
only_missed: Option<bool>,
}
impl TDFB for TGSearchCallMessages {}
impl AsRef<TGSearchCallMessages> for TGSearchCallMessages {
fn as_ref(&self) -> &TGSearchCallMessages { self }
}
impl TGSearchCallMessages {
pub fn new() -> Self {
Self {
from_message_id: None,
limit: None,
only_missed: None,
}
}
pub fn from_message_id(&mut self, from_message_id: i64) -> &mut Self { self.from_message_id = Some(from_message_id); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
pub fn only_missed(&mut self, only_missed: bool) -> &mut Self { self.only_missed = Some(only_missed); self }
#[doc(hidden)]
pub fn build(&self) -> SearchCallMessages {
SearchCallMessages::builder()
.from_message_id(self.from_message_id.clone())
.limit(self.limit.clone())
.only_missed(self.only_missed.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSearchChatMembers {
chat_id: Option<i64>,
query: Option<String>,
limit: Option<i32>,
filter: Option<Box<ChatMembersFilter>>,
}
impl TDFB for TGSearchChatMembers {}
impl AsRef<TGSearchChatMembers> for TGSearchChatMembers {
fn as_ref(&self) -> &TGSearchChatMembers { self }
}
impl TGSearchChatMembers {
pub fn new() -> Self {
Self {
chat_id: None,
query: None,
limit: None,
filter: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn query<S: AsRef<str>>(&mut self, query: S) -> &mut Self { self.query = Some(query.as_ref().to_string()); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
#[doc(hidden)] pub fn _filter(&mut self, filter: Box<ChatMembersFilter>) -> &mut Self { self.filter = Some(filter); self }
#[doc(hidden)]
pub fn build(&self) -> SearchChatMembers {
SearchChatMembers::builder()
.chat_id(self.chat_id.clone())
.query(self.query.clone())
.limit(self.limit.clone())
.filter(self.filter.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSearchChatMessages {
chat_id: Option<i64>,
query: Option<String>,
sender_user_id: Option<i32>,
from_message_id: Option<i64>,
offset: Option<i32>,
limit: Option<i32>,
filter: Option<Box<SearchMessagesFilter>>,
}
impl TDFB for TGSearchChatMessages {}
impl AsRef<TGSearchChatMessages> for TGSearchChatMessages {
fn as_ref(&self) -> &TGSearchChatMessages { self }
}
impl TGSearchChatMessages {
pub fn new() -> Self {
Self {
chat_id: None,
query: None,
sender_user_id: None,
from_message_id: None,
offset: None,
limit: None,
filter: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn query<S: AsRef<str>>(&mut self, query: S) -> &mut Self { self.query = Some(query.as_ref().to_string()); self }
pub fn sender_user_id(&mut self, sender_user_id: i32) -> &mut Self { self.sender_user_id = Some(sender_user_id); self }
pub fn from_message_id(&mut self, from_message_id: i64) -> &mut Self { self.from_message_id = Some(from_message_id); self }
pub fn offset(&mut self, offset: i32) -> &mut Self { self.offset = Some(offset); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
#[doc(hidden)] pub fn _filter(&mut self, filter: Box<SearchMessagesFilter>) -> &mut Self { self.filter = Some(filter); self }
#[doc(hidden)]
pub fn build(&self) -> SearchChatMessages {
SearchChatMessages::builder()
.chat_id(self.chat_id.clone())
.query(self.query.clone())
.sender_user_id(self.sender_user_id.clone())
.from_message_id(self.from_message_id.clone())
.offset(self.offset.clone())
.limit(self.limit.clone())
.filter(self.filter.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSearchChatRecentLocationMessages {
chat_id: Option<i64>,
limit: Option<i32>,
}
impl TDFB for TGSearchChatRecentLocationMessages {}
impl AsRef<TGSearchChatRecentLocationMessages> for TGSearchChatRecentLocationMessages {
fn as_ref(&self) -> &TGSearchChatRecentLocationMessages { self }
}
impl TGSearchChatRecentLocationMessages {
pub fn new() -> Self {
Self {
chat_id: None,
limit: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
#[doc(hidden)]
pub fn build(&self) -> SearchChatRecentLocationMessages {
SearchChatRecentLocationMessages::builder()
.chat_id(self.chat_id.clone())
.limit(self.limit.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSearchChats {
query: Option<String>,
limit: Option<i32>,
}
impl TDFB for TGSearchChats {}
impl AsRef<TGSearchChats> for TGSearchChats {
fn as_ref(&self) -> &TGSearchChats { self }
}
impl TGSearchChats {
pub fn new() -> Self {
Self {
query: None,
limit: None,
}
}
pub fn query<S: AsRef<str>>(&mut self, query: S) -> &mut Self { self.query = Some(query.as_ref().to_string()); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
#[doc(hidden)]
pub fn build(&self) -> SearchChats {
SearchChats::builder()
.query(self.query.clone())
.limit(self.limit.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSearchChatsOnServer {
query: Option<String>,
limit: Option<i32>,
}
impl TDFB for TGSearchChatsOnServer {}
impl AsRef<TGSearchChatsOnServer> for TGSearchChatsOnServer {
fn as_ref(&self) -> &TGSearchChatsOnServer { self }
}
impl TGSearchChatsOnServer {
pub fn new() -> Self {
Self {
query: None,
limit: None,
}
}
pub fn query<S: AsRef<str>>(&mut self, query: S) -> &mut Self { self.query = Some(query.as_ref().to_string()); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
#[doc(hidden)]
pub fn build(&self) -> SearchChatsOnServer {
SearchChatsOnServer::builder()
.query(self.query.clone())
.limit(self.limit.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSearchContacts {
query: Option<String>,
limit: Option<i32>,
}
impl TDFB for TGSearchContacts {}
impl AsRef<TGSearchContacts> for TGSearchContacts {
fn as_ref(&self) -> &TGSearchContacts { self }
}
impl TGSearchContacts {
pub fn new() -> Self {
Self {
query: None,
limit: None,
}
}
pub fn query<S: AsRef<str>>(&mut self, query: S) -> &mut Self { self.query = Some(query.as_ref().to_string()); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
#[doc(hidden)]
pub fn build(&self) -> SearchContacts {
SearchContacts::builder()
.query(self.query.clone())
.limit(self.limit.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSearchHashtags {
prefix: Option<String>,
limit: Option<i32>,
}
impl TDFB for TGSearchHashtags {}
impl AsRef<TGSearchHashtags> for TGSearchHashtags {
fn as_ref(&self) -> &TGSearchHashtags { self }
}
impl TGSearchHashtags {
pub fn new() -> Self {
Self {
prefix: None,
limit: None,
}
}
pub fn prefix<S: AsRef<str>>(&mut self, prefix: S) -> &mut Self { self.prefix = Some(prefix.as_ref().to_string()); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
#[doc(hidden)]
pub fn build(&self) -> SearchHashtags {
SearchHashtags::builder()
.prefix(self.prefix.clone())
.limit(self.limit.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSearchInstalledStickerSets {
is_masks: Option<bool>,
query: Option<String>,
limit: Option<i32>,
}
impl TDFB for TGSearchInstalledStickerSets {}
impl AsRef<TGSearchInstalledStickerSets> for TGSearchInstalledStickerSets {
fn as_ref(&self) -> &TGSearchInstalledStickerSets { self }
}
impl TGSearchInstalledStickerSets {
pub fn new() -> Self {
Self {
is_masks: None,
query: None,
limit: None,
}
}
pub fn is_masks(&mut self, is_masks: bool) -> &mut Self { self.is_masks = Some(is_masks); self }
pub fn query<S: AsRef<str>>(&mut self, query: S) -> &mut Self { self.query = Some(query.as_ref().to_string()); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
#[doc(hidden)]
pub fn build(&self) -> SearchInstalledStickerSets {
SearchInstalledStickerSets::builder()
.is_masks(self.is_masks.clone())
.query(self.query.clone())
.limit(self.limit.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSearchMessages {
query: Option<String>,
offset_date: Option<i32>,
offset_chat_id: Option<i64>,
offset_message_id: Option<i64>,
limit: Option<i32>,
}
impl TDFB for TGSearchMessages {}
impl AsRef<TGSearchMessages> for TGSearchMessages {
fn as_ref(&self) -> &TGSearchMessages { self }
}
impl TGSearchMessages {
pub fn new() -> Self {
Self {
query: None,
offset_date: None,
offset_chat_id: None,
offset_message_id: None,
limit: None,
}
}
pub fn query<S: AsRef<str>>(&mut self, query: S) -> &mut Self { self.query = Some(query.as_ref().to_string()); self }
pub fn offset_date(&mut self, offset_date: i32) -> &mut Self { self.offset_date = Some(offset_date); self }
pub fn offset_chat_id(&mut self, offset_chat_id: i64) -> &mut Self { self.offset_chat_id = Some(offset_chat_id); self }
pub fn offset_message_id(&mut self, offset_message_id: i64) -> &mut Self { self.offset_message_id = Some(offset_message_id); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
#[doc(hidden)]
pub fn build(&self) -> SearchMessages {
SearchMessages::builder()
.query(self.query.clone())
.offset_date(self.offset_date.clone())
.offset_chat_id(self.offset_chat_id.clone())
.offset_message_id(self.offset_message_id.clone())
.limit(self.limit.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSearchPublicChat {
username: Option<String>,
}
impl TDFB for TGSearchPublicChat {}
impl AsRef<TGSearchPublicChat> for TGSearchPublicChat {
fn as_ref(&self) -> &TGSearchPublicChat { self }
}
impl TGSearchPublicChat {
pub fn new() -> Self {
Self {
username: None,
}
}
pub fn username<S: AsRef<str>>(&mut self, username: S) -> &mut Self { self.username = Some(username.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> SearchPublicChat {
SearchPublicChat::builder()
.username(self.username.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSearchPublicChats {
query: Option<String>,
}
impl TDFB for TGSearchPublicChats {}
impl AsRef<TGSearchPublicChats> for TGSearchPublicChats {
fn as_ref(&self) -> &TGSearchPublicChats { self }
}
impl TGSearchPublicChats {
pub fn new() -> Self {
Self {
query: None,
}
}
pub fn query<S: AsRef<str>>(&mut self, query: S) -> &mut Self { self.query = Some(query.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> SearchPublicChats {
SearchPublicChats::builder()
.query(self.query.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSearchSecretMessages {
chat_id: Option<i64>,
query: Option<String>,
from_search_id: Option<i64>,
limit: Option<i32>,
filter: Option<Box<SearchMessagesFilter>>,
}
impl TDFB for TGSearchSecretMessages {}
impl AsRef<TGSearchSecretMessages> for TGSearchSecretMessages {
fn as_ref(&self) -> &TGSearchSecretMessages { self }
}
impl TGSearchSecretMessages {
pub fn new() -> Self {
Self {
chat_id: None,
query: None,
from_search_id: None,
limit: None,
filter: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn query<S: AsRef<str>>(&mut self, query: S) -> &mut Self { self.query = Some(query.as_ref().to_string()); self }
pub fn from_search_id(&mut self, from_search_id: i64) -> &mut Self { self.from_search_id = Some(from_search_id); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
#[doc(hidden)] pub fn _filter(&mut self, filter: Box<SearchMessagesFilter>) -> &mut Self { self.filter = Some(filter); self }
#[doc(hidden)]
pub fn build(&self) -> SearchSecretMessages {
SearchSecretMessages::builder()
.chat_id(self.chat_id.clone())
.query(self.query.clone())
.from_search_id(self.from_search_id.clone())
.limit(self.limit.clone())
.filter(self.filter.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSearchStickers {
emoji: Option<String>,
limit: Option<i32>,
}
impl TDFB for TGSearchStickers {}
impl AsRef<TGSearchStickers> for TGSearchStickers {
fn as_ref(&self) -> &TGSearchStickers { self }
}
impl TGSearchStickers {
pub fn new() -> Self {
Self {
emoji: None,
limit: None,
}
}
pub fn emoji<S: AsRef<str>>(&mut self, emoji: S) -> &mut Self { self.emoji = Some(emoji.as_ref().to_string()); self }
pub fn limit(&mut self, limit: i32) -> &mut Self { self.limit = Some(limit); self }
#[doc(hidden)]
pub fn build(&self) -> SearchStickers {
SearchStickers::builder()
.emoji(self.emoji.clone())
.limit(self.limit.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSearchStickerSet {
name: Option<String>,
}
impl TDFB for TGSearchStickerSet {}
impl AsRef<TGSearchStickerSet> for TGSearchStickerSet {
fn as_ref(&self) -> &TGSearchStickerSet { self }
}
impl TGSearchStickerSet {
pub fn new() -> Self {
Self {
name: None,
}
}
pub fn name<S: AsRef<str>>(&mut self, name: S) -> &mut Self { self.name = Some(name.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> SearchStickerSet {
SearchStickerSet::builder()
.name(self.name.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSearchStickerSets {
query: Option<String>,
}
impl TDFB for TGSearchStickerSets {}
impl AsRef<TGSearchStickerSets> for TGSearchStickerSets {
fn as_ref(&self) -> &TGSearchStickerSets { self }
}
impl TGSearchStickerSets {
pub fn new() -> Self {
Self {
query: None,
}
}
pub fn query<S: AsRef<str>>(&mut self, query: S) -> &mut Self { self.query = Some(query.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> SearchStickerSets {
SearchStickerSets::builder()
.query(self.query.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSendBotStartMessage {
bot_user_id: Option<i32>,
chat_id: Option<i64>,
parameter: Option<String>,
}
impl TDFB for TGSendBotStartMessage {}
impl AsRef<TGSendBotStartMessage> for TGSendBotStartMessage {
fn as_ref(&self) -> &TGSendBotStartMessage { self }
}
impl TGSendBotStartMessage {
pub fn new() -> Self {
Self {
bot_user_id: None,
chat_id: None,
parameter: None,
}
}
pub fn bot_user_id(&mut self, bot_user_id: i32) -> &mut Self { self.bot_user_id = Some(bot_user_id); self }
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn parameter<S: AsRef<str>>(&mut self, parameter: S) -> &mut Self { self.parameter = Some(parameter.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> SendBotStartMessage {
SendBotStartMessage::builder()
.bot_user_id(self.bot_user_id.clone())
.chat_id(self.chat_id.clone())
.parameter(self.parameter.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSendCallDebugInformation {
call_id: Option<i32>,
debug_information: Option<String>,
}
impl TDFB for TGSendCallDebugInformation {}
impl AsRef<TGSendCallDebugInformation> for TGSendCallDebugInformation {
fn as_ref(&self) -> &TGSendCallDebugInformation { self }
}
impl TGSendCallDebugInformation {
pub fn new() -> Self {
Self {
call_id: None,
debug_information: None,
}
}
pub fn call_id(&mut self, call_id: i32) -> &mut Self { self.call_id = Some(call_id); self }
pub fn debug_information<S: AsRef<str>>(&mut self, debug_information: S) -> &mut Self { self.debug_information = Some(debug_information.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> SendCallDebugInformation {
SendCallDebugInformation::builder()
.call_id(self.call_id.clone())
.debug_information(self.debug_information.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSendCallRating {
call_id: Option<i32>,
rating: Option<i32>,
comment: Option<String>,
}
impl TDFB for TGSendCallRating {}
impl AsRef<TGSendCallRating> for TGSendCallRating {
fn as_ref(&self) -> &TGSendCallRating { self }
}
impl TGSendCallRating {
pub fn new() -> Self {
Self {
call_id: None,
rating: None,
comment: None,
}
}
pub fn call_id(&mut self, call_id: i32) -> &mut Self { self.call_id = Some(call_id); self }
pub fn rating(&mut self, rating: i32) -> &mut Self { self.rating = Some(rating); self }
pub fn comment<S: AsRef<str>>(&mut self, comment: S) -> &mut Self { self.comment = Some(comment.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> SendCallRating {
SendCallRating::builder()
.call_id(self.call_id.clone())
.rating(self.rating.clone())
.comment(self.comment.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSendChatAction {
chat_id: Option<i64>,
action: Option<Box<ChatAction>>,
}
impl TDFB for TGSendChatAction {}
impl AsRef<TGSendChatAction> for TGSendChatAction {
fn as_ref(&self) -> &TGSendChatAction { self }
}
impl TGSendChatAction {
pub fn new() -> Self {
Self {
chat_id: None,
action: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
#[doc(hidden)] pub fn _action(&mut self, action: Box<ChatAction>) -> &mut Self { self.action = Some(action); self }
#[doc(hidden)]
pub fn build(&self) -> SendChatAction {
SendChatAction::builder()
.chat_id(self.chat_id.clone())
.action(self.action.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSendChatScreenshotTakenNotification {
chat_id: Option<i64>,
}
impl TDFB for TGSendChatScreenshotTakenNotification {}
impl AsRef<TGSendChatScreenshotTakenNotification> for TGSendChatScreenshotTakenNotification {
fn as_ref(&self) -> &TGSendChatScreenshotTakenNotification { self }
}
impl TGSendChatScreenshotTakenNotification {
pub fn new() -> Self {
Self {
chat_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
#[doc(hidden)]
pub fn build(&self) -> SendChatScreenshotTakenNotification {
SendChatScreenshotTakenNotification::builder()
.chat_id(self.chat_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSendChatSetTtlMessage {
chat_id: Option<i64>,
ttl: Option<i32>,
}
impl TDFB for TGSendChatSetTtlMessage {}
impl AsRef<TGSendChatSetTtlMessage> for TGSendChatSetTtlMessage {
fn as_ref(&self) -> &TGSendChatSetTtlMessage { self }
}
impl TGSendChatSetTtlMessage {
pub fn new() -> Self {
Self {
chat_id: None,
ttl: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn ttl(&mut self, ttl: i32) -> &mut Self { self.ttl = Some(ttl); self }
#[doc(hidden)]
pub fn build(&self) -> SendChatSetTtlMessage {
SendChatSetTtlMessage::builder()
.chat_id(self.chat_id.clone())
.ttl(self.ttl.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSendCustomRequest {
method: Option<String>,
parameters: Option<String>,
}
impl TDFB for TGSendCustomRequest {}
impl AsRef<TGSendCustomRequest> for TGSendCustomRequest {
fn as_ref(&self) -> &TGSendCustomRequest { self }
}
impl TGSendCustomRequest {
pub fn new() -> Self {
Self {
method: None,
parameters: None,
}
}
pub fn method<S: AsRef<str>>(&mut self, method: S) -> &mut Self { self.method = Some(method.as_ref().to_string()); self }
pub fn parameters<S: AsRef<str>>(&mut self, parameters: S) -> &mut Self { self.parameters = Some(parameters.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> SendCustomRequest {
SendCustomRequest::builder()
.method(self.method.clone())
.parameters(self.parameters.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSendEmailAddressVerificationCode {
email_address: Option<String>,
}
impl TDFB for TGSendEmailAddressVerificationCode {}
impl AsRef<TGSendEmailAddressVerificationCode> for TGSendEmailAddressVerificationCode {
fn as_ref(&self) -> &TGSendEmailAddressVerificationCode { self }
}
impl TGSendEmailAddressVerificationCode {
pub fn new() -> Self {
Self {
email_address: None,
}
}
pub fn email_address<S: AsRef<str>>(&mut self, email_address: S) -> &mut Self { self.email_address = Some(email_address.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> SendEmailAddressVerificationCode {
SendEmailAddressVerificationCode::builder()
.email_address(self.email_address.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSendInlineQueryResultMessage {
chat_id: Option<i64>,
reply_to_message_id: Option<i64>,
disable_notification: Option<bool>,
from_background: Option<bool>,
query_id: Option<i64>,
result_id: Option<String>,
hide_via_bot: Option<bool>,
}
impl TDFB for TGSendInlineQueryResultMessage {}
impl AsRef<TGSendInlineQueryResultMessage> for TGSendInlineQueryResultMessage {
fn as_ref(&self) -> &TGSendInlineQueryResultMessage { self }
}
impl TGSendInlineQueryResultMessage {
pub fn new() -> Self {
Self {
chat_id: None,
reply_to_message_id: None,
disable_notification: None,
from_background: None,
query_id: None,
result_id: None,
hide_via_bot: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn reply_to_message_id(&mut self, reply_to_message_id: i64) -> &mut Self { self.reply_to_message_id = Some(reply_to_message_id); self }
pub fn disable_notification(&mut self, disable_notification: bool) -> &mut Self { self.disable_notification = Some(disable_notification); self }
pub fn from_background(&mut self, from_background: bool) -> &mut Self { self.from_background = Some(from_background); self }
pub fn query_id(&mut self, query_id: i64) -> &mut Self { self.query_id = Some(query_id); self }
pub fn result_id<S: AsRef<str>>(&mut self, result_id: S) -> &mut Self { self.result_id = Some(result_id.as_ref().to_string()); self }
pub fn hide_via_bot(&mut self, hide_via_bot: bool) -> &mut Self { self.hide_via_bot = Some(hide_via_bot); self }
#[doc(hidden)]
pub fn build(&self) -> SendInlineQueryResultMessage {
SendInlineQueryResultMessage::builder()
.chat_id(self.chat_id.clone())
.reply_to_message_id(self.reply_to_message_id.clone())
.disable_notification(self.disable_notification.clone())
.from_background(self.from_background.clone())
.query_id(self.query_id.clone())
.result_id(self.result_id.clone())
.hide_via_bot(self.hide_via_bot.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSendMessage {
chat_id: Option<i64>,
reply_to_message_id: Option<i64>,
disable_notification: Option<bool>,
from_background: Option<bool>,
reply_markup: Option<Box<ReplyMarkup>>,
input_message_content: Option<Box<InputMessageContent>>,
}
impl TDFB for TGSendMessage {}
impl AsRef<TGSendMessage> for TGSendMessage {
fn as_ref(&self) -> &TGSendMessage { self }
}
impl TGSendMessage {
pub fn new() -> Self {
Self {
chat_id: None,
reply_to_message_id: None,
disable_notification: None,
from_background: None,
reply_markup: None,
input_message_content: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn reply_to_message_id(&mut self, reply_to_message_id: i64) -> &mut Self { self.reply_to_message_id = Some(reply_to_message_id); self }
pub fn disable_notification(&mut self, disable_notification: bool) -> &mut Self { self.disable_notification = Some(disable_notification); self }
pub fn from_background(&mut self, from_background: bool) -> &mut Self { self.from_background = Some(from_background); self }
#[doc(hidden)] pub fn _reply_markup(&mut self, reply_markup: Box<ReplyMarkup>) -> &mut Self { self.reply_markup = Some(reply_markup); self }
#[doc(hidden)] pub fn _input_message_content(&mut self, input_message_content: Box<InputMessageContent>) -> &mut Self { self.input_message_content = Some(input_message_content); self }
#[doc(hidden)]
pub fn build(&self) -> SendMessage {
SendMessage::builder()
.chat_id(self.chat_id.clone())
.reply_to_message_id(self.reply_to_message_id.clone())
.disable_notification(self.disable_notification.clone())
.from_background(self.from_background.clone())
.reply_markup(self.reply_markup.clone())
.input_message_content(self.input_message_content.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSendMessageAlbum {
chat_id: Option<i64>,
reply_to_message_id: Option<i64>,
disable_notification: Option<bool>,
from_background: Option<bool>,
input_message_contents: Option<Vec<Box<InputMessageContent>>>,
}
impl TDFB for TGSendMessageAlbum {}
impl AsRef<TGSendMessageAlbum> for TGSendMessageAlbum {
fn as_ref(&self) -> &TGSendMessageAlbum { self }
}
impl TGSendMessageAlbum {
pub fn new() -> Self {
Self {
chat_id: None,
reply_to_message_id: None,
disable_notification: None,
from_background: None,
input_message_contents: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn reply_to_message_id(&mut self, reply_to_message_id: i64) -> &mut Self { self.reply_to_message_id = Some(reply_to_message_id); self }
pub fn disable_notification(&mut self, disable_notification: bool) -> &mut Self { self.disable_notification = Some(disable_notification); self }
pub fn from_background(&mut self, from_background: bool) -> &mut Self { self.from_background = Some(from_background); self }
#[doc(hidden)] pub fn _input_message_contents(&mut self, input_message_contents: Vec<Box<InputMessageContent>>) -> &mut Self { self.input_message_contents = Some(input_message_contents); self }
#[doc(hidden)]
pub fn build(&self) -> SendMessageAlbum {
SendMessageAlbum::builder()
.chat_id(self.chat_id.clone())
.reply_to_message_id(self.reply_to_message_id.clone())
.disable_notification(self.disable_notification.clone())
.from_background(self.from_background.clone())
.input_message_contents(self.input_message_contents.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSendPassportAuthorizationForm {
autorization_form_id: Option<i32>,
types: Option<Vec<Box<PassportElementType>>>,
}
impl TDFB for TGSendPassportAuthorizationForm {}
impl AsRef<TGSendPassportAuthorizationForm> for TGSendPassportAuthorizationForm {
fn as_ref(&self) -> &TGSendPassportAuthorizationForm { self }
}
impl TGSendPassportAuthorizationForm {
pub fn new() -> Self {
Self {
autorization_form_id: None,
types: None,
}
}
pub fn autorization_form_id(&mut self, autorization_form_id: i32) -> &mut Self { self.autorization_form_id = Some(autorization_form_id); self }
#[doc(hidden)] pub fn _types(&mut self, types: Vec<Box<PassportElementType>>) -> &mut Self { self.types = Some(types); self }
#[doc(hidden)]
pub fn build(&self) -> SendPassportAuthorizationForm {
SendPassportAuthorizationForm::builder()
.autorization_form_id(self.autorization_form_id.clone())
.types(self.types.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSendPaymentForm {
chat_id: Option<i64>,
message_id: Option<i64>,
order_info_id: Option<String>,
shipping_option_id: Option<String>,
credentials: Option<Box<InputCredentials>>,
}
impl TDFB for TGSendPaymentForm {}
impl AsRef<TGSendPaymentForm> for TGSendPaymentForm {
fn as_ref(&self) -> &TGSendPaymentForm { self }
}
impl TGSendPaymentForm {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
order_info_id: None,
shipping_option_id: None,
credentials: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
pub fn order_info_id<S: AsRef<str>>(&mut self, order_info_id: S) -> &mut Self { self.order_info_id = Some(order_info_id.as_ref().to_string()); self }
pub fn shipping_option_id<S: AsRef<str>>(&mut self, shipping_option_id: S) -> &mut Self { self.shipping_option_id = Some(shipping_option_id.as_ref().to_string()); self }
#[doc(hidden)] pub fn _credentials(&mut self, credentials: Box<InputCredentials>) -> &mut Self { self.credentials = Some(credentials); self }
#[doc(hidden)]
pub fn build(&self) -> SendPaymentForm {
SendPaymentForm::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.order_info_id(self.order_info_id.clone())
.shipping_option_id(self.shipping_option_id.clone())
.credentials(self.credentials.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSendPhoneNumberConfirmationCode {
hash: Option<String>,
phone_number: Option<String>,
allow_flash_call: Option<bool>,
is_current_phone_number: Option<bool>,
}
impl TDFB for TGSendPhoneNumberConfirmationCode {}
impl AsRef<TGSendPhoneNumberConfirmationCode> for TGSendPhoneNumberConfirmationCode {
fn as_ref(&self) -> &TGSendPhoneNumberConfirmationCode { self }
}
impl TGSendPhoneNumberConfirmationCode {
pub fn new() -> Self {
Self {
hash: None,
phone_number: None,
allow_flash_call: None,
is_current_phone_number: None,
}
}
pub fn hash<S: AsRef<str>>(&mut self, hash: S) -> &mut Self { self.hash = Some(hash.as_ref().to_string()); self }
pub fn phone_number<S: AsRef<str>>(&mut self, phone_number: S) -> &mut Self { self.phone_number = Some(phone_number.as_ref().to_string()); self }
pub fn allow_flash_call(&mut self, allow_flash_call: bool) -> &mut Self { self.allow_flash_call = Some(allow_flash_call); self }
pub fn is_current_phone_number(&mut self, is_current_phone_number: bool) -> &mut Self { self.is_current_phone_number = Some(is_current_phone_number); self }
#[doc(hidden)]
pub fn build(&self) -> SendPhoneNumberConfirmationCode {
SendPhoneNumberConfirmationCode::builder()
.hash(self.hash.clone())
.phone_number(self.phone_number.clone())
.allow_flash_call(self.allow_flash_call.clone())
.is_current_phone_number(self.is_current_phone_number.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSendPhoneNumberVerificationCode {
phone_number: Option<String>,
allow_flash_call: Option<bool>,
is_current_phone_number: Option<bool>,
}
impl TDFB for TGSendPhoneNumberVerificationCode {}
impl AsRef<TGSendPhoneNumberVerificationCode> for TGSendPhoneNumberVerificationCode {
fn as_ref(&self) -> &TGSendPhoneNumberVerificationCode { self }
}
impl TGSendPhoneNumberVerificationCode {
pub fn new() -> Self {
Self {
phone_number: None,
allow_flash_call: None,
is_current_phone_number: None,
}
}
pub fn phone_number<S: AsRef<str>>(&mut self, phone_number: S) -> &mut Self { self.phone_number = Some(phone_number.as_ref().to_string()); self }
pub fn allow_flash_call(&mut self, allow_flash_call: bool) -> &mut Self { self.allow_flash_call = Some(allow_flash_call); self }
pub fn is_current_phone_number(&mut self, is_current_phone_number: bool) -> &mut Self { self.is_current_phone_number = Some(is_current_phone_number); self }
#[doc(hidden)]
pub fn build(&self) -> SendPhoneNumberVerificationCode {
SendPhoneNumberVerificationCode::builder()
.phone_number(self.phone_number.clone())
.allow_flash_call(self.allow_flash_call.clone())
.is_current_phone_number(self.is_current_phone_number.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetAccountTtl {
ttl: Option<AccountTtl>,
}
impl TDFB for TGSetAccountTtl {}
impl AsRef<TGSetAccountTtl> for TGSetAccountTtl {
fn as_ref(&self) -> &TGSetAccountTtl { self }
}
impl TGSetAccountTtl {
pub fn new() -> Self {
Self {
ttl: None,
}
}
#[doc(hidden)] pub fn _ttl(&mut self, ttl: AccountTtl) -> &mut Self { self.ttl = Some(ttl); self }
#[doc(hidden)]
pub fn build(&self) -> SetAccountTtl {
SetAccountTtl::builder()
.ttl(self.ttl.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetAlarm {
seconds: Option<f64>,
}
impl TDFB for TGSetAlarm {}
impl AsRef<TGSetAlarm> for TGSetAlarm {
fn as_ref(&self) -> &TGSetAlarm { self }
}
impl TGSetAlarm {
pub fn new() -> Self {
Self {
seconds: None,
}
}
pub fn seconds(&mut self, seconds: f64) -> &mut Self { self.seconds = Some(seconds); self }
#[doc(hidden)]
pub fn build(&self) -> SetAlarm {
SetAlarm::builder()
.seconds(self.seconds.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetAuthenticationPhoneNumber {
phone_number: Option<String>,
allow_flash_call: Option<bool>,
is_current_phone_number: Option<bool>,
}
impl TDFB for TGSetAuthenticationPhoneNumber {}
impl AsRef<TGSetAuthenticationPhoneNumber> for TGSetAuthenticationPhoneNumber {
fn as_ref(&self) -> &TGSetAuthenticationPhoneNumber { self }
}
impl TGSetAuthenticationPhoneNumber {
pub fn new() -> Self {
Self {
phone_number: None,
allow_flash_call: None,
is_current_phone_number: None,
}
}
pub fn phone_number<S: AsRef<str>>(&mut self, phone_number: S) -> &mut Self { self.phone_number = Some(phone_number.as_ref().to_string()); self }
pub fn allow_flash_call(&mut self, allow_flash_call: bool) -> &mut Self { self.allow_flash_call = Some(allow_flash_call); self }
pub fn is_current_phone_number(&mut self, is_current_phone_number: bool) -> &mut Self { self.is_current_phone_number = Some(is_current_phone_number); self }
#[doc(hidden)]
pub fn build(&self) -> SetAuthenticationPhoneNumber {
SetAuthenticationPhoneNumber::builder()
.phone_number(self.phone_number.clone())
.allow_flash_call(self.allow_flash_call.clone())
.is_current_phone_number(self.is_current_phone_number.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetBio {
bio: Option<String>,
}
impl TDFB for TGSetBio {}
impl AsRef<TGSetBio> for TGSetBio {
fn as_ref(&self) -> &TGSetBio { self }
}
impl TGSetBio {
pub fn new() -> Self {
Self {
bio: None,
}
}
pub fn bio<S: AsRef<str>>(&mut self, bio: S) -> &mut Self { self.bio = Some(bio.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> SetBio {
SetBio::builder()
.bio(self.bio.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetBotUpdatesStatus {
pending_update_count: Option<i32>,
error_message: Option<String>,
}
impl TDFB for TGSetBotUpdatesStatus {}
impl AsRef<TGSetBotUpdatesStatus> for TGSetBotUpdatesStatus {
fn as_ref(&self) -> &TGSetBotUpdatesStatus { self }
}
impl TGSetBotUpdatesStatus {
pub fn new() -> Self {
Self {
pending_update_count: None,
error_message: None,
}
}
pub fn pending_update_count(&mut self, pending_update_count: i32) -> &mut Self { self.pending_update_count = Some(pending_update_count); self }
pub fn error_message<S: AsRef<str>>(&mut self, error_message: S) -> &mut Self { self.error_message = Some(error_message.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> SetBotUpdatesStatus {
SetBotUpdatesStatus::builder()
.pending_update_count(self.pending_update_count.clone())
.error_message(self.error_message.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetChatClientData {
chat_id: Option<i64>,
client_data: Option<String>,
}
impl TDFB for TGSetChatClientData {}
impl AsRef<TGSetChatClientData> for TGSetChatClientData {
fn as_ref(&self) -> &TGSetChatClientData { self }
}
impl TGSetChatClientData {
pub fn new() -> Self {
Self {
chat_id: None,
client_data: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn client_data<S: AsRef<str>>(&mut self, client_data: S) -> &mut Self { self.client_data = Some(client_data.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> SetChatClientData {
SetChatClientData::builder()
.chat_id(self.chat_id.clone())
.client_data(self.client_data.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetChatDraftMessage {
chat_id: Option<i64>,
draft_message: Option<DraftMessage>,
}
impl TDFB for TGSetChatDraftMessage {}
impl AsRef<TGSetChatDraftMessage> for TGSetChatDraftMessage {
fn as_ref(&self) -> &TGSetChatDraftMessage { self }
}
impl TGSetChatDraftMessage {
pub fn new() -> Self {
Self {
chat_id: None,
draft_message: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
#[doc(hidden)] pub fn _draft_message(&mut self, draft_message: DraftMessage) -> &mut Self { self.draft_message = Some(draft_message); self }
#[doc(hidden)]
pub fn build(&self) -> SetChatDraftMessage {
SetChatDraftMessage::builder()
.chat_id(self.chat_id.clone())
.draft_message(self.draft_message.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetChatMemberStatus {
chat_id: Option<i64>,
user_id: Option<i32>,
status: Option<Box<ChatMemberStatus>>,
}
impl TDFB for TGSetChatMemberStatus {}
impl AsRef<TGSetChatMemberStatus> for TGSetChatMemberStatus {
fn as_ref(&self) -> &TGSetChatMemberStatus { self }
}
impl TGSetChatMemberStatus {
pub fn new() -> Self {
Self {
chat_id: None,
user_id: None,
status: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
#[doc(hidden)] pub fn _status(&mut self, status: Box<ChatMemberStatus>) -> &mut Self { self.status = Some(status); self }
#[doc(hidden)]
pub fn build(&self) -> SetChatMemberStatus {
SetChatMemberStatus::builder()
.chat_id(self.chat_id.clone())
.user_id(self.user_id.clone())
.status(self.status.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetChatNotificationSettings {
chat_id: Option<i64>,
notification_settings: Option<ChatNotificationSettings>,
}
impl TDFB for TGSetChatNotificationSettings {}
impl AsRef<TGSetChatNotificationSettings> for TGSetChatNotificationSettings {
fn as_ref(&self) -> &TGSetChatNotificationSettings { self }
}
impl TGSetChatNotificationSettings {
pub fn new() -> Self {
Self {
chat_id: None,
notification_settings: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
#[doc(hidden)] pub fn _notification_settings(&mut self, notification_settings: ChatNotificationSettings) -> &mut Self { self.notification_settings = Some(notification_settings); self }
#[doc(hidden)]
pub fn build(&self) -> SetChatNotificationSettings {
SetChatNotificationSettings::builder()
.chat_id(self.chat_id.clone())
.notification_settings(self.notification_settings.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetChatPhoto {
chat_id: Option<i64>,
photo: Option<Box<InputFile>>,
}
impl TDFB for TGSetChatPhoto {}
impl AsRef<TGSetChatPhoto> for TGSetChatPhoto {
fn as_ref(&self) -> &TGSetChatPhoto { self }
}
impl TGSetChatPhoto {
pub fn new() -> Self {
Self {
chat_id: None,
photo: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
#[doc(hidden)] pub fn _photo(&mut self, photo: Box<InputFile>) -> &mut Self { self.photo = Some(photo); self }
#[doc(hidden)]
pub fn build(&self) -> SetChatPhoto {
SetChatPhoto::builder()
.chat_id(self.chat_id.clone())
.photo(self.photo.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetChatTitle {
chat_id: Option<i64>,
title: Option<String>,
}
impl TDFB for TGSetChatTitle {}
impl AsRef<TGSetChatTitle> for TGSetChatTitle {
fn as_ref(&self) -> &TGSetChatTitle { self }
}
impl TGSetChatTitle {
pub fn new() -> Self {
Self {
chat_id: None,
title: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn title<S: AsRef<str>>(&mut self, title: S) -> &mut Self { self.title = Some(title.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> SetChatTitle {
SetChatTitle::builder()
.chat_id(self.chat_id.clone())
.title(self.title.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetCustomLanguagePack {
info: Option<LanguagePackInfo>,
strings: Option<Vec<LanguagePackString>>,
}
impl TDFB for TGSetCustomLanguagePack {}
impl AsRef<TGSetCustomLanguagePack> for TGSetCustomLanguagePack {
fn as_ref(&self) -> &TGSetCustomLanguagePack { self }
}
impl TGSetCustomLanguagePack {
pub fn new() -> Self {
Self {
info: None,
strings: None,
}
}
#[doc(hidden)] pub fn _info(&mut self, info: LanguagePackInfo) -> &mut Self { self.info = Some(info); self }
#[doc(hidden)] pub fn _strings(&mut self, strings: Vec<LanguagePackString>) -> &mut Self { self.strings = Some(strings); self }
#[doc(hidden)]
pub fn build(&self) -> SetCustomLanguagePack {
SetCustomLanguagePack::builder()
.info(self.info.clone())
.strings(self.strings.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetCustomLanguagePackString {
language_pack_id: Option<String>,
new_string: Option<LanguagePackString>,
}
impl TDFB for TGSetCustomLanguagePackString {}
impl AsRef<TGSetCustomLanguagePackString> for TGSetCustomLanguagePackString {
fn as_ref(&self) -> &TGSetCustomLanguagePackString { self }
}
impl TGSetCustomLanguagePackString {
pub fn new() -> Self {
Self {
language_pack_id: None,
new_string: None,
}
}
pub fn language_pack_id<S: AsRef<str>>(&mut self, language_pack_id: S) -> &mut Self { self.language_pack_id = Some(language_pack_id.as_ref().to_string()); self }
#[doc(hidden)] pub fn _new_string(&mut self, new_string: LanguagePackString) -> &mut Self { self.new_string = Some(new_string); self }
#[doc(hidden)]
pub fn build(&self) -> SetCustomLanguagePackString {
SetCustomLanguagePackString::builder()
.language_pack_id(self.language_pack_id.clone())
.new_string(self.new_string.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetDatabaseEncryptionKey {
new_encryption_key: Option<String>,
}
impl TDFB for TGSetDatabaseEncryptionKey {}
impl AsRef<TGSetDatabaseEncryptionKey> for TGSetDatabaseEncryptionKey {
fn as_ref(&self) -> &TGSetDatabaseEncryptionKey { self }
}
impl TGSetDatabaseEncryptionKey {
pub fn new() -> Self {
Self {
new_encryption_key: None,
}
}
pub fn new_encryption_key<S: AsRef<str>>(&mut self, new_encryption_key: S) -> &mut Self { self.new_encryption_key = Some(new_encryption_key.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> SetDatabaseEncryptionKey {
SetDatabaseEncryptionKey::builder()
.new_encryption_key(self.new_encryption_key.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetFileGenerationProgress {
generation_id: Option<i64>,
expected_size: Option<i32>,
local_prefix_size: Option<i32>,
}
impl TDFB for TGSetFileGenerationProgress {}
impl AsRef<TGSetFileGenerationProgress> for TGSetFileGenerationProgress {
fn as_ref(&self) -> &TGSetFileGenerationProgress { self }
}
impl TGSetFileGenerationProgress {
pub fn new() -> Self {
Self {
generation_id: None,
expected_size: None,
local_prefix_size: None,
}
}
pub fn generation_id(&mut self, generation_id: i64) -> &mut Self { self.generation_id = Some(generation_id); self }
pub fn expected_size(&mut self, expected_size: i32) -> &mut Self { self.expected_size = Some(expected_size); self }
pub fn local_prefix_size(&mut self, local_prefix_size: i32) -> &mut Self { self.local_prefix_size = Some(local_prefix_size); self }
#[doc(hidden)]
pub fn build(&self) -> SetFileGenerationProgress {
SetFileGenerationProgress::builder()
.generation_id(self.generation_id.clone())
.expected_size(self.expected_size.clone())
.local_prefix_size(self.local_prefix_size.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetGameScore {
chat_id: Option<i64>,
message_id: Option<i64>,
edit_message: Option<bool>,
user_id: Option<i32>,
score: Option<i32>,
force: Option<bool>,
}
impl TDFB for TGSetGameScore {}
impl AsRef<TGSetGameScore> for TGSetGameScore {
fn as_ref(&self) -> &TGSetGameScore { self }
}
impl TGSetGameScore {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
edit_message: None,
user_id: None,
score: None,
force: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
pub fn edit_message(&mut self, edit_message: bool) -> &mut Self { self.edit_message = Some(edit_message); self }
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
pub fn score(&mut self, score: i32) -> &mut Self { self.score = Some(score); self }
pub fn force(&mut self, force: bool) -> &mut Self { self.force = Some(force); self }
#[doc(hidden)]
pub fn build(&self) -> SetGameScore {
SetGameScore::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.edit_message(self.edit_message.clone())
.user_id(self.user_id.clone())
.score(self.score.clone())
.force(self.force.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetInlineGameScore {
inline_message_id: Option<String>,
edit_message: Option<bool>,
user_id: Option<i32>,
score: Option<i32>,
force: Option<bool>,
}
impl TDFB for TGSetInlineGameScore {}
impl AsRef<TGSetInlineGameScore> for TGSetInlineGameScore {
fn as_ref(&self) -> &TGSetInlineGameScore { self }
}
impl TGSetInlineGameScore {
pub fn new() -> Self {
Self {
inline_message_id: None,
edit_message: None,
user_id: None,
score: None,
force: None,
}
}
pub fn inline_message_id<S: AsRef<str>>(&mut self, inline_message_id: S) -> &mut Self { self.inline_message_id = Some(inline_message_id.as_ref().to_string()); self }
pub fn edit_message(&mut self, edit_message: bool) -> &mut Self { self.edit_message = Some(edit_message); self }
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
pub fn score(&mut self, score: i32) -> &mut Self { self.score = Some(score); self }
pub fn force(&mut self, force: bool) -> &mut Self { self.force = Some(force); self }
#[doc(hidden)]
pub fn build(&self) -> SetInlineGameScore {
SetInlineGameScore::builder()
.inline_message_id(self.inline_message_id.clone())
.edit_message(self.edit_message.clone())
.user_id(self.user_id.clone())
.score(self.score.clone())
.force(self.force.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetLogStream {
log_stream: Option<Box<LogStream>>,
}
impl TDFB for TGSetLogStream {}
impl AsRef<TGSetLogStream> for TGSetLogStream {
fn as_ref(&self) -> &TGSetLogStream { self }
}
impl TGSetLogStream {
pub fn new() -> Self {
Self {
log_stream: None,
}
}
#[doc(hidden)] pub fn _log_stream(&mut self, log_stream: Box<LogStream>) -> &mut Self { self.log_stream = Some(log_stream); self }
#[doc(hidden)]
pub fn build(&self) -> SetLogStream {
SetLogStream::builder()
.log_stream(self.log_stream.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetLogTagVerbosityLevel {
tag: Option<String>,
new_verbosity_level: Option<i32>,
}
impl TDFB for TGSetLogTagVerbosityLevel {}
impl AsRef<TGSetLogTagVerbosityLevel> for TGSetLogTagVerbosityLevel {
fn as_ref(&self) -> &TGSetLogTagVerbosityLevel { self }
}
impl TGSetLogTagVerbosityLevel {
pub fn new() -> Self {
Self {
tag: None,
new_verbosity_level: None,
}
}
pub fn tag<S: AsRef<str>>(&mut self, tag: S) -> &mut Self { self.tag = Some(tag.as_ref().to_string()); self }
pub fn new_verbosity_level(&mut self, new_verbosity_level: i32) -> &mut Self { self.new_verbosity_level = Some(new_verbosity_level); self }
#[doc(hidden)]
pub fn build(&self) -> SetLogTagVerbosityLevel {
SetLogTagVerbosityLevel::builder()
.tag(self.tag.clone())
.new_verbosity_level(self.new_verbosity_level.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetLogVerbosityLevel {
new_verbosity_level: Option<i32>,
}
impl TDFB for TGSetLogVerbosityLevel {}
impl AsRef<TGSetLogVerbosityLevel> for TGSetLogVerbosityLevel {
fn as_ref(&self) -> &TGSetLogVerbosityLevel { self }
}
impl TGSetLogVerbosityLevel {
pub fn new() -> Self {
Self {
new_verbosity_level: None,
}
}
pub fn new_verbosity_level(&mut self, new_verbosity_level: i32) -> &mut Self { self.new_verbosity_level = Some(new_verbosity_level); self }
#[doc(hidden)]
pub fn build(&self) -> SetLogVerbosityLevel {
SetLogVerbosityLevel::builder()
.new_verbosity_level(self.new_verbosity_level.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetName {
first_name: Option<String>,
last_name: Option<String>,
}
impl TDFB for TGSetName {}
impl AsRef<TGSetName> for TGSetName {
fn as_ref(&self) -> &TGSetName { self }
}
impl TGSetName {
pub fn new() -> Self {
Self {
first_name: None,
last_name: None,
}
}
pub fn first_name<S: AsRef<str>>(&mut self, first_name: S) -> &mut Self { self.first_name = Some(first_name.as_ref().to_string()); self }
pub fn last_name<S: AsRef<str>>(&mut self, last_name: S) -> &mut Self { self.last_name = Some(last_name.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> SetName {
SetName::builder()
.first_name(self.first_name.clone())
.last_name(self.last_name.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetNetworkType {
type_: Option<Box<NetworkType>>,
}
impl TDFB for TGSetNetworkType {}
impl AsRef<TGSetNetworkType> for TGSetNetworkType {
fn as_ref(&self) -> &TGSetNetworkType { self }
}
impl TGSetNetworkType {
pub fn new() -> Self {
Self {
type_: None,
}
}
#[doc(hidden)] pub fn _type_(&mut self, type_: Box<NetworkType>) -> &mut Self { self.type_ = Some(type_); self }
#[doc(hidden)]
pub fn build(&self) -> SetNetworkType {
SetNetworkType::builder()
.type_(self.type_.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetOption {
name: Option<String>,
value: Option<Box<OptionValue>>,
}
impl TDFB for TGSetOption {}
impl AsRef<TGSetOption> for TGSetOption {
fn as_ref(&self) -> &TGSetOption { self }
}
impl TGSetOption {
pub fn new() -> Self {
Self {
name: None,
value: None,
}
}
pub fn name<S: AsRef<str>>(&mut self, name: S) -> &mut Self { self.name = Some(name.as_ref().to_string()); self }
#[doc(hidden)] pub fn _value(&mut self, value: Box<OptionValue>) -> &mut Self { self.value = Some(value); self }
#[doc(hidden)]
pub fn build(&self) -> SetOption {
SetOption::builder()
.name(self.name.clone())
.value(self.value.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetPassportElement {
element: Option<Box<InputPassportElement>>,
password: Option<String>,
}
impl TDFB for TGSetPassportElement {}
impl AsRef<TGSetPassportElement> for TGSetPassportElement {
fn as_ref(&self) -> &TGSetPassportElement { self }
}
impl TGSetPassportElement {
pub fn new() -> Self {
Self {
element: None,
password: None,
}
}
pub fn password<S: AsRef<str>>(&mut self, password: S) -> &mut Self { self.password = Some(password.as_ref().to_string()); self }
#[doc(hidden)] pub fn _element(&mut self, element: Box<InputPassportElement>) -> &mut Self { self.element = Some(element); self }
#[doc(hidden)]
pub fn build(&self) -> SetPassportElement {
SetPassportElement::builder()
.element(self.element.clone())
.password(self.password.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetPassportElementErrors {
user_id: Option<i32>,
errors: Option<Vec<InputPassportElementError>>,
}
impl TDFB for TGSetPassportElementErrors {}
impl AsRef<TGSetPassportElementErrors> for TGSetPassportElementErrors {
fn as_ref(&self) -> &TGSetPassportElementErrors { self }
}
impl TGSetPassportElementErrors {
pub fn new() -> Self {
Self {
user_id: None,
errors: None,
}
}
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
#[doc(hidden)] pub fn _errors(&mut self, errors: Vec<InputPassportElementError>) -> &mut Self { self.errors = Some(errors); self }
#[doc(hidden)]
pub fn build(&self) -> SetPassportElementErrors {
SetPassportElementErrors::builder()
.user_id(self.user_id.clone())
.errors(self.errors.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetPassword {
old_password: Option<String>,
new_password: Option<String>,
new_hint: Option<String>,
set_recovery_email_address: Option<bool>,
new_recovery_email_address: Option<String>,
}
impl TDFB for TGSetPassword {}
impl AsRef<TGSetPassword> for TGSetPassword {
fn as_ref(&self) -> &TGSetPassword { self }
}
impl TGSetPassword {
pub fn new() -> Self {
Self {
old_password: None,
new_password: None,
new_hint: None,
set_recovery_email_address: None,
new_recovery_email_address: None,
}
}
pub fn old_password<S: AsRef<str>>(&mut self, old_password: S) -> &mut Self { self.old_password = Some(old_password.as_ref().to_string()); self }
pub fn new_password<S: AsRef<str>>(&mut self, new_password: S) -> &mut Self { self.new_password = Some(new_password.as_ref().to_string()); self }
pub fn new_hint<S: AsRef<str>>(&mut self, new_hint: S) -> &mut Self { self.new_hint = Some(new_hint.as_ref().to_string()); self }
pub fn set_recovery_email_address(&mut self, set_recovery_email_address: bool) -> &mut Self { self.set_recovery_email_address = Some(set_recovery_email_address); self }
pub fn new_recovery_email_address<S: AsRef<str>>(&mut self, new_recovery_email_address: S) -> &mut Self { self.new_recovery_email_address = Some(new_recovery_email_address.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> SetPassword {
SetPassword::builder()
.old_password(self.old_password.clone())
.new_password(self.new_password.clone())
.new_hint(self.new_hint.clone())
.set_recovery_email_address(self.set_recovery_email_address.clone())
.new_recovery_email_address(self.new_recovery_email_address.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetPinnedChats {
chat_ids: Option<Vec<i64>>,
}
impl TDFB for TGSetPinnedChats {}
impl AsRef<TGSetPinnedChats> for TGSetPinnedChats {
fn as_ref(&self) -> &TGSetPinnedChats { self }
}
impl TGSetPinnedChats {
pub fn new() -> Self {
Self {
chat_ids: None,
}
}
pub fn chat_ids(&mut self, chat_ids: Vec<i64>) -> &mut Self { self.chat_ids = Some(chat_ids); self }
#[doc(hidden)]
pub fn build(&self) -> SetPinnedChats {
SetPinnedChats::builder()
.chat_ids(self.chat_ids.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetPollAnswer {
chat_id: Option<i64>,
message_id: Option<i64>,
option_ids: Option<Vec<i32>>,
}
impl TDFB for TGSetPollAnswer {}
impl AsRef<TGSetPollAnswer> for TGSetPollAnswer {
fn as_ref(&self) -> &TGSetPollAnswer { self }
}
impl TGSetPollAnswer {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
option_ids: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
pub fn option_ids(&mut self, option_ids: Vec<i32>) -> &mut Self { self.option_ids = Some(option_ids); self }
#[doc(hidden)]
pub fn build(&self) -> SetPollAnswer {
SetPollAnswer::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.option_ids(self.option_ids.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetProfilePhoto {
photo: Option<Box<InputFile>>,
}
impl TDFB for TGSetProfilePhoto {}
impl AsRef<TGSetProfilePhoto> for TGSetProfilePhoto {
fn as_ref(&self) -> &TGSetProfilePhoto { self }
}
impl TGSetProfilePhoto {
pub fn new() -> Self {
Self {
photo: None,
}
}
#[doc(hidden)] pub fn _photo(&mut self, photo: Box<InputFile>) -> &mut Self { self.photo = Some(photo); self }
#[doc(hidden)]
pub fn build(&self) -> SetProfilePhoto {
SetProfilePhoto::builder()
.photo(self.photo.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetRecoveryEmailAddress {
password: Option<String>,
new_recovery_email_address: Option<String>,
}
impl TDFB for TGSetRecoveryEmailAddress {}
impl AsRef<TGSetRecoveryEmailAddress> for TGSetRecoveryEmailAddress {
fn as_ref(&self) -> &TGSetRecoveryEmailAddress { self }
}
impl TGSetRecoveryEmailAddress {
pub fn new() -> Self {
Self {
password: None,
new_recovery_email_address: None,
}
}
pub fn password<S: AsRef<str>>(&mut self, password: S) -> &mut Self { self.password = Some(password.as_ref().to_string()); self }
pub fn new_recovery_email_address<S: AsRef<str>>(&mut self, new_recovery_email_address: S) -> &mut Self { self.new_recovery_email_address = Some(new_recovery_email_address.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> SetRecoveryEmailAddress {
SetRecoveryEmailAddress::builder()
.password(self.password.clone())
.new_recovery_email_address(self.new_recovery_email_address.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetScopeNotificationSettings {
scope: Option<Box<NotificationSettingsScope>>,
notification_settings: Option<ScopeNotificationSettings>,
}
impl TDFB for TGSetScopeNotificationSettings {}
impl AsRef<TGSetScopeNotificationSettings> for TGSetScopeNotificationSettings {
fn as_ref(&self) -> &TGSetScopeNotificationSettings { self }
}
impl TGSetScopeNotificationSettings {
pub fn new() -> Self {
Self {
scope: None,
notification_settings: None,
}
}
#[doc(hidden)] pub fn _scope(&mut self, scope: Box<NotificationSettingsScope>) -> &mut Self { self.scope = Some(scope); self }
#[doc(hidden)] pub fn _notification_settings(&mut self, notification_settings: ScopeNotificationSettings) -> &mut Self { self.notification_settings = Some(notification_settings); self }
#[doc(hidden)]
pub fn build(&self) -> SetScopeNotificationSettings {
SetScopeNotificationSettings::builder()
.scope(self.scope.clone())
.notification_settings(self.notification_settings.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetStickerPositionInSet {
sticker: Option<Box<InputFile>>,
position: Option<i32>,
}
impl TDFB for TGSetStickerPositionInSet {}
impl AsRef<TGSetStickerPositionInSet> for TGSetStickerPositionInSet {
fn as_ref(&self) -> &TGSetStickerPositionInSet { self }
}
impl TGSetStickerPositionInSet {
pub fn new() -> Self {
Self {
sticker: None,
position: None,
}
}
pub fn position(&mut self, position: i32) -> &mut Self { self.position = Some(position); self }
#[doc(hidden)] pub fn _sticker(&mut self, sticker: Box<InputFile>) -> &mut Self { self.sticker = Some(sticker); self }
#[doc(hidden)]
pub fn build(&self) -> SetStickerPositionInSet {
SetStickerPositionInSet::builder()
.sticker(self.sticker.clone())
.position(self.position.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetSupergroupDescription {
supergroup_id: Option<i32>,
description: Option<String>,
}
impl TDFB for TGSetSupergroupDescription {}
impl AsRef<TGSetSupergroupDescription> for TGSetSupergroupDescription {
fn as_ref(&self) -> &TGSetSupergroupDescription { self }
}
impl TGSetSupergroupDescription {
pub fn new() -> Self {
Self {
supergroup_id: None,
description: None,
}
}
pub fn supergroup_id(&mut self, supergroup_id: i32) -> &mut Self { self.supergroup_id = Some(supergroup_id); self }
pub fn description<S: AsRef<str>>(&mut self, description: S) -> &mut Self { self.description = Some(description.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> SetSupergroupDescription {
SetSupergroupDescription::builder()
.supergroup_id(self.supergroup_id.clone())
.description(self.description.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetSupergroupStickerSet {
supergroup_id: Option<i32>,
sticker_set_id: Option<i64>,
}
impl TDFB for TGSetSupergroupStickerSet {}
impl AsRef<TGSetSupergroupStickerSet> for TGSetSupergroupStickerSet {
fn as_ref(&self) -> &TGSetSupergroupStickerSet { self }
}
impl TGSetSupergroupStickerSet {
pub fn new() -> Self {
Self {
supergroup_id: None,
sticker_set_id: None,
}
}
pub fn supergroup_id(&mut self, supergroup_id: i32) -> &mut Self { self.supergroup_id = Some(supergroup_id); self }
pub fn sticker_set_id(&mut self, sticker_set_id: i64) -> &mut Self { self.sticker_set_id = Some(sticker_set_id); self }
#[doc(hidden)]
pub fn build(&self) -> SetSupergroupStickerSet {
SetSupergroupStickerSet::builder()
.supergroup_id(self.supergroup_id.clone())
.sticker_set_id(self.sticker_set_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetSupergroupUsername {
supergroup_id: Option<i32>,
username: Option<String>,
}
impl TDFB for TGSetSupergroupUsername {}
impl AsRef<TGSetSupergroupUsername> for TGSetSupergroupUsername {
fn as_ref(&self) -> &TGSetSupergroupUsername { self }
}
impl TGSetSupergroupUsername {
pub fn new() -> Self {
Self {
supergroup_id: None,
username: None,
}
}
pub fn supergroup_id(&mut self, supergroup_id: i32) -> &mut Self { self.supergroup_id = Some(supergroup_id); self }
pub fn username<S: AsRef<str>>(&mut self, username: S) -> &mut Self { self.username = Some(username.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> SetSupergroupUsername {
SetSupergroupUsername::builder()
.supergroup_id(self.supergroup_id.clone())
.username(self.username.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetTdlibParameters {
parameters: Option<TdlibParameters>,
}
impl TDFB for TGSetTdlibParameters {}
impl AsRef<TGSetTdlibParameters> for TGSetTdlibParameters {
fn as_ref(&self) -> &TGSetTdlibParameters { self }
}
impl TGSetTdlibParameters {
pub fn new() -> Self {
Self {
parameters: None,
}
}
#[doc(hidden)] pub fn _parameters(&mut self, parameters: TdlibParameters) -> &mut Self { self.parameters = Some(parameters); self }
#[doc(hidden)]
pub fn build(&self) -> SetTdlibParameters {
SetTdlibParameters::builder()
.parameters(self.parameters.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetUsername {
username: Option<String>,
}
impl TDFB for TGSetUsername {}
impl AsRef<TGSetUsername> for TGSetUsername {
fn as_ref(&self) -> &TGSetUsername { self }
}
impl TGSetUsername {
pub fn new() -> Self {
Self {
username: None,
}
}
pub fn username<S: AsRef<str>>(&mut self, username: S) -> &mut Self { self.username = Some(username.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> SetUsername {
SetUsername::builder()
.username(self.username.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSetUserPrivacySettingRules {
setting: Option<Box<UserPrivacySetting>>,
rules: Option<UserPrivacySettingRules>,
}
impl TDFB for TGSetUserPrivacySettingRules {}
impl AsRef<TGSetUserPrivacySettingRules> for TGSetUserPrivacySettingRules {
fn as_ref(&self) -> &TGSetUserPrivacySettingRules { self }
}
impl TGSetUserPrivacySettingRules {
pub fn new() -> Self {
Self {
setting: None,
rules: None,
}
}
#[doc(hidden)] pub fn _setting(&mut self, setting: Box<UserPrivacySetting>) -> &mut Self { self.setting = Some(setting); self }
#[doc(hidden)] pub fn _rules(&mut self, rules: UserPrivacySettingRules) -> &mut Self { self.rules = Some(rules); self }
#[doc(hidden)]
pub fn build(&self) -> SetUserPrivacySettingRules {
SetUserPrivacySettingRules::builder()
.setting(self.setting.clone())
.rules(self.rules.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGStopPoll {
chat_id: Option<i64>,
message_id: Option<i64>,
reply_markup: Option<Box<ReplyMarkup>>,
}
impl TDFB for TGStopPoll {}
impl AsRef<TGStopPoll> for TGStopPoll {
fn as_ref(&self) -> &TGStopPoll { self }
}
impl TGStopPoll {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
reply_markup: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
#[doc(hidden)] pub fn _reply_markup(&mut self, reply_markup: Box<ReplyMarkup>) -> &mut Self { self.reply_markup = Some(reply_markup); self }
#[doc(hidden)]
pub fn build(&self) -> StopPoll {
StopPoll::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.reply_markup(self.reply_markup.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGSynchronizeLanguagePack {
language_pack_id: Option<String>,
}
impl TDFB for TGSynchronizeLanguagePack {}
impl AsRef<TGSynchronizeLanguagePack> for TGSynchronizeLanguagePack {
fn as_ref(&self) -> &TGSynchronizeLanguagePack { self }
}
impl TGSynchronizeLanguagePack {
pub fn new() -> Self {
Self {
language_pack_id: None,
}
}
pub fn language_pack_id<S: AsRef<str>>(&mut self, language_pack_id: S) -> &mut Self { self.language_pack_id = Some(language_pack_id.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> SynchronizeLanguagePack {
SynchronizeLanguagePack::builder()
.language_pack_id(self.language_pack_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGTerminateAllOtherSessions {
}
impl TDFB for TGTerminateAllOtherSessions {}
impl AsRef<TGTerminateAllOtherSessions> for TGTerminateAllOtherSessions {
fn as_ref(&self) -> &TGTerminateAllOtherSessions { self }
}
impl TGTerminateAllOtherSessions {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> TerminateAllOtherSessions {
TerminateAllOtherSessions::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGTerminateSession {
session_id: Option<i64>,
}
impl TDFB for TGTerminateSession {}
impl AsRef<TGTerminateSession> for TGTerminateSession {
fn as_ref(&self) -> &TGTerminateSession { self }
}
impl TGTerminateSession {
pub fn new() -> Self {
Self {
session_id: None,
}
}
pub fn session_id(&mut self, session_id: i64) -> &mut Self { self.session_id = Some(session_id); self }
#[doc(hidden)]
pub fn build(&self) -> TerminateSession {
TerminateSession::builder()
.session_id(self.session_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGTestCallBytes {
x: Option<String>,
}
impl TDFB for TGTestCallBytes {}
impl AsRef<TGTestCallBytes> for TGTestCallBytes {
fn as_ref(&self) -> &TGTestCallBytes { self }
}
impl TGTestCallBytes {
pub fn new() -> Self {
Self {
x: None,
}
}
pub fn x<S: AsRef<str>>(&mut self, x: S) -> &mut Self { self.x = Some(x.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> TestCallBytes {
TestCallBytes::builder()
.x(self.x.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGTestCallEmpty {
}
impl TDFB for TGTestCallEmpty {}
impl AsRef<TGTestCallEmpty> for TGTestCallEmpty {
fn as_ref(&self) -> &TGTestCallEmpty { self }
}
impl TGTestCallEmpty {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> TestCallEmpty {
TestCallEmpty::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGTestCallString {
x: Option<String>,
}
impl TDFB for TGTestCallString {}
impl AsRef<TGTestCallString> for TGTestCallString {
fn as_ref(&self) -> &TGTestCallString { self }
}
impl TGTestCallString {
pub fn new() -> Self {
Self {
x: None,
}
}
pub fn x<S: AsRef<str>>(&mut self, x: S) -> &mut Self { self.x = Some(x.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> TestCallString {
TestCallString::builder()
.x(self.x.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGTestCallVectorInt {
x: Option<Vec<i32>>,
}
impl TDFB for TGTestCallVectorInt {}
impl AsRef<TGTestCallVectorInt> for TGTestCallVectorInt {
fn as_ref(&self) -> &TGTestCallVectorInt { self }
}
impl TGTestCallVectorInt {
pub fn new() -> Self {
Self {
x: None,
}
}
pub fn x(&mut self, x: Vec<i32>) -> &mut Self { self.x = Some(x); self }
#[doc(hidden)]
pub fn build(&self) -> TestCallVectorInt {
TestCallVectorInt::builder()
.x(self.x.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGTestCallVectorIntObject {
x: Option<Vec<TestInt>>,
}
impl TDFB for TGTestCallVectorIntObject {}
impl AsRef<TGTestCallVectorIntObject> for TGTestCallVectorIntObject {
fn as_ref(&self) -> &TGTestCallVectorIntObject { self }
}
impl TGTestCallVectorIntObject {
pub fn new() -> Self {
Self {
x: None,
}
}
#[doc(hidden)] pub fn _x(&mut self, x: Vec<TestInt>) -> &mut Self { self.x = Some(x); self }
#[doc(hidden)]
pub fn build(&self) -> TestCallVectorIntObject {
TestCallVectorIntObject::builder()
.x(self.x.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGTestCallVectorString {
x: Option<Vec<String>>,
}
impl TDFB for TGTestCallVectorString {}
impl AsRef<TGTestCallVectorString> for TGTestCallVectorString {
fn as_ref(&self) -> &TGTestCallVectorString { self }
}
impl TGTestCallVectorString {
pub fn new() -> Self {
Self {
x: None,
}
}
#[doc(hidden)] pub fn _x(&mut self, x: Vec<String>) -> &mut Self { self.x = Some(x); self }
#[doc(hidden)]
pub fn build(&self) -> TestCallVectorString {
TestCallVectorString::builder()
.x(self.x.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGTestCallVectorStringObject {
x: Option<Vec<TestString>>,
}
impl TDFB for TGTestCallVectorStringObject {}
impl AsRef<TGTestCallVectorStringObject> for TGTestCallVectorStringObject {
fn as_ref(&self) -> &TGTestCallVectorStringObject { self }
}
impl TGTestCallVectorStringObject {
pub fn new() -> Self {
Self {
x: None,
}
}
#[doc(hidden)] pub fn _x(&mut self, x: Vec<TestString>) -> &mut Self { self.x = Some(x); self }
#[doc(hidden)]
pub fn build(&self) -> TestCallVectorStringObject {
TestCallVectorStringObject::builder()
.x(self.x.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGTestGetDifference {
}
impl TDFB for TGTestGetDifference {}
impl AsRef<TGTestGetDifference> for TGTestGetDifference {
fn as_ref(&self) -> &TGTestGetDifference { self }
}
impl TGTestGetDifference {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> TestGetDifference {
TestGetDifference::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGTestNetwork {
}
impl TDFB for TGTestNetwork {}
impl AsRef<TGTestNetwork> for TGTestNetwork {
fn as_ref(&self) -> &TGTestNetwork { self }
}
impl TGTestNetwork {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> TestNetwork {
TestNetwork::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGTestSquareInt {
x: Option<i32>,
}
impl TDFB for TGTestSquareInt {}
impl AsRef<TGTestSquareInt> for TGTestSquareInt {
fn as_ref(&self) -> &TGTestSquareInt { self }
}
impl TGTestSquareInt {
pub fn new() -> Self {
Self {
x: None,
}
}
pub fn x(&mut self, x: i32) -> &mut Self { self.x = Some(x); self }
#[doc(hidden)]
pub fn build(&self) -> TestSquareInt {
TestSquareInt::builder()
.x(self.x.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGTestUseError {
}
impl TDFB for TGTestUseError {}
impl AsRef<TGTestUseError> for TGTestUseError {
fn as_ref(&self) -> &TGTestUseError { self }
}
impl TGTestUseError {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> TestUseError {
TestUseError::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGTestUseUpdate {
}
impl TDFB for TGTestUseUpdate {}
impl AsRef<TGTestUseUpdate> for TGTestUseUpdate {
fn as_ref(&self) -> &TGTestUseUpdate { self }
}
impl TGTestUseUpdate {
pub fn new() -> Self {
Self {
}
}
#[doc(hidden)]
pub fn build(&self) -> TestUseUpdate {
TestUseUpdate::builder()
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGToggleBasicGroupAdministrators {
basic_group_id: Option<i32>,
everyone_is_administrator: Option<bool>,
}
impl TDFB for TGToggleBasicGroupAdministrators {}
impl AsRef<TGToggleBasicGroupAdministrators> for TGToggleBasicGroupAdministrators {
fn as_ref(&self) -> &TGToggleBasicGroupAdministrators { self }
}
impl TGToggleBasicGroupAdministrators {
pub fn new() -> Self {
Self {
basic_group_id: None,
everyone_is_administrator: None,
}
}
pub fn basic_group_id(&mut self, basic_group_id: i32) -> &mut Self { self.basic_group_id = Some(basic_group_id); self }
pub fn everyone_is_administrator(&mut self, everyone_is_administrator: bool) -> &mut Self { self.everyone_is_administrator = Some(everyone_is_administrator); self }
#[doc(hidden)]
pub fn build(&self) -> ToggleBasicGroupAdministrators {
ToggleBasicGroupAdministrators::builder()
.basic_group_id(self.basic_group_id.clone())
.everyone_is_administrator(self.everyone_is_administrator.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGToggleChatDefaultDisableNotification {
chat_id: Option<i64>,
default_disable_notification: Option<bool>,
}
impl TDFB for TGToggleChatDefaultDisableNotification {}
impl AsRef<TGToggleChatDefaultDisableNotification> for TGToggleChatDefaultDisableNotification {
fn as_ref(&self) -> &TGToggleChatDefaultDisableNotification { self }
}
impl TGToggleChatDefaultDisableNotification {
pub fn new() -> Self {
Self {
chat_id: None,
default_disable_notification: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn default_disable_notification(&mut self, default_disable_notification: bool) -> &mut Self { self.default_disable_notification = Some(default_disable_notification); self }
#[doc(hidden)]
pub fn build(&self) -> ToggleChatDefaultDisableNotification {
ToggleChatDefaultDisableNotification::builder()
.chat_id(self.chat_id.clone())
.default_disable_notification(self.default_disable_notification.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGToggleChatIsMarkedAsUnread {
chat_id: Option<i64>,
is_marked_as_unread: Option<bool>,
}
impl TDFB for TGToggleChatIsMarkedAsUnread {}
impl AsRef<TGToggleChatIsMarkedAsUnread> for TGToggleChatIsMarkedAsUnread {
fn as_ref(&self) -> &TGToggleChatIsMarkedAsUnread { self }
}
impl TGToggleChatIsMarkedAsUnread {
pub fn new() -> Self {
Self {
chat_id: None,
is_marked_as_unread: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn is_marked_as_unread(&mut self, is_marked_as_unread: bool) -> &mut Self { self.is_marked_as_unread = Some(is_marked_as_unread); self }
#[doc(hidden)]
pub fn build(&self) -> ToggleChatIsMarkedAsUnread {
ToggleChatIsMarkedAsUnread::builder()
.chat_id(self.chat_id.clone())
.is_marked_as_unread(self.is_marked_as_unread.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGToggleChatIsPinned {
chat_id: Option<i64>,
is_pinned: Option<bool>,
}
impl TDFB for TGToggleChatIsPinned {}
impl AsRef<TGToggleChatIsPinned> for TGToggleChatIsPinned {
fn as_ref(&self) -> &TGToggleChatIsPinned { self }
}
impl TGToggleChatIsPinned {
pub fn new() -> Self {
Self {
chat_id: None,
is_pinned: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn is_pinned(&mut self, is_pinned: bool) -> &mut Self { self.is_pinned = Some(is_pinned); self }
#[doc(hidden)]
pub fn build(&self) -> ToggleChatIsPinned {
ToggleChatIsPinned::builder()
.chat_id(self.chat_id.clone())
.is_pinned(self.is_pinned.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGToggleSupergroupInvites {
supergroup_id: Option<i32>,
anyone_can_invite: Option<bool>,
}
impl TDFB for TGToggleSupergroupInvites {}
impl AsRef<TGToggleSupergroupInvites> for TGToggleSupergroupInvites {
fn as_ref(&self) -> &TGToggleSupergroupInvites { self }
}
impl TGToggleSupergroupInvites {
pub fn new() -> Self {
Self {
supergroup_id: None,
anyone_can_invite: None,
}
}
pub fn supergroup_id(&mut self, supergroup_id: i32) -> &mut Self { self.supergroup_id = Some(supergroup_id); self }
pub fn anyone_can_invite(&mut self, anyone_can_invite: bool) -> &mut Self { self.anyone_can_invite = Some(anyone_can_invite); self }
#[doc(hidden)]
pub fn build(&self) -> ToggleSupergroupInvites {
ToggleSupergroupInvites::builder()
.supergroup_id(self.supergroup_id.clone())
.anyone_can_invite(self.anyone_can_invite.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGToggleSupergroupIsAllHistoryAvailable {
supergroup_id: Option<i32>,
is_all_history_available: Option<bool>,
}
impl TDFB for TGToggleSupergroupIsAllHistoryAvailable {}
impl AsRef<TGToggleSupergroupIsAllHistoryAvailable> for TGToggleSupergroupIsAllHistoryAvailable {
fn as_ref(&self) -> &TGToggleSupergroupIsAllHistoryAvailable { self }
}
impl TGToggleSupergroupIsAllHistoryAvailable {
pub fn new() -> Self {
Self {
supergroup_id: None,
is_all_history_available: None,
}
}
pub fn supergroup_id(&mut self, supergroup_id: i32) -> &mut Self { self.supergroup_id = Some(supergroup_id); self }
pub fn is_all_history_available(&mut self, is_all_history_available: bool) -> &mut Self { self.is_all_history_available = Some(is_all_history_available); self }
#[doc(hidden)]
pub fn build(&self) -> ToggleSupergroupIsAllHistoryAvailable {
ToggleSupergroupIsAllHistoryAvailable::builder()
.supergroup_id(self.supergroup_id.clone())
.is_all_history_available(self.is_all_history_available.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGToggleSupergroupSignMessages {
supergroup_id: Option<i32>,
sign_messages: Option<bool>,
}
impl TDFB for TGToggleSupergroupSignMessages {}
impl AsRef<TGToggleSupergroupSignMessages> for TGToggleSupergroupSignMessages {
fn as_ref(&self) -> &TGToggleSupergroupSignMessages { self }
}
impl TGToggleSupergroupSignMessages {
pub fn new() -> Self {
Self {
supergroup_id: None,
sign_messages: None,
}
}
pub fn supergroup_id(&mut self, supergroup_id: i32) -> &mut Self { self.supergroup_id = Some(supergroup_id); self }
pub fn sign_messages(&mut self, sign_messages: bool) -> &mut Self { self.sign_messages = Some(sign_messages); self }
#[doc(hidden)]
pub fn build(&self) -> ToggleSupergroupSignMessages {
ToggleSupergroupSignMessages::builder()
.supergroup_id(self.supergroup_id.clone())
.sign_messages(self.sign_messages.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGUnblockUser {
user_id: Option<i32>,
}
impl TDFB for TGUnblockUser {}
impl AsRef<TGUnblockUser> for TGUnblockUser {
fn as_ref(&self) -> &TGUnblockUser { self }
}
impl TGUnblockUser {
pub fn new() -> Self {
Self {
user_id: None,
}
}
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
#[doc(hidden)]
pub fn build(&self) -> UnblockUser {
UnblockUser::builder()
.user_id(self.user_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGUnpinChatMessage {
chat_id: Option<i64>,
}
impl TDFB for TGUnpinChatMessage {}
impl AsRef<TGUnpinChatMessage> for TGUnpinChatMessage {
fn as_ref(&self) -> &TGUnpinChatMessage { self }
}
impl TGUnpinChatMessage {
pub fn new() -> Self {
Self {
chat_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
#[doc(hidden)]
pub fn build(&self) -> UnpinChatMessage {
UnpinChatMessage::builder()
.chat_id(self.chat_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGUpgradeBasicGroupChatToSupergroupChat {
chat_id: Option<i64>,
}
impl TDFB for TGUpgradeBasicGroupChatToSupergroupChat {}
impl AsRef<TGUpgradeBasicGroupChatToSupergroupChat> for TGUpgradeBasicGroupChatToSupergroupChat {
fn as_ref(&self) -> &TGUpgradeBasicGroupChatToSupergroupChat { self }
}
impl TGUpgradeBasicGroupChatToSupergroupChat {
pub fn new() -> Self {
Self {
chat_id: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
#[doc(hidden)]
pub fn build(&self) -> UpgradeBasicGroupChatToSupergroupChat {
UpgradeBasicGroupChatToSupergroupChat::builder()
.chat_id(self.chat_id.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGUploadFile {
file: Option<Box<InputFile>>,
file_type: Option<Box<FileType>>,
priority: Option<i32>,
}
impl TDFB for TGUploadFile {}
impl AsRef<TGUploadFile> for TGUploadFile {
fn as_ref(&self) -> &TGUploadFile { self }
}
impl TGUploadFile {
pub fn new() -> Self {
Self {
file: None,
file_type: None,
priority: None,
}
}
pub fn priority(&mut self, priority: i32) -> &mut Self { self.priority = Some(priority); self }
#[doc(hidden)] pub fn _file(&mut self, file: Box<InputFile>) -> &mut Self { self.file = Some(file); self }
#[doc(hidden)] pub fn _file_type(&mut self, file_type: Box<FileType>) -> &mut Self { self.file_type = Some(file_type); self }
#[doc(hidden)]
pub fn build(&self) -> UploadFile {
UploadFile::builder()
.file(self.file.clone())
.file_type(self.file_type.clone())
.priority(self.priority.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGUploadStickerFile {
user_id: Option<i32>,
png_sticker: Option<Box<InputFile>>,
}
impl TDFB for TGUploadStickerFile {}
impl AsRef<TGUploadStickerFile> for TGUploadStickerFile {
fn as_ref(&self) -> &TGUploadStickerFile { self }
}
impl TGUploadStickerFile {
pub fn new() -> Self {
Self {
user_id: None,
png_sticker: None,
}
}
pub fn user_id(&mut self, user_id: i32) -> &mut Self { self.user_id = Some(user_id); self }
#[doc(hidden)] pub fn _png_sticker(&mut self, png_sticker: Box<InputFile>) -> &mut Self { self.png_sticker = Some(png_sticker); self }
#[doc(hidden)]
pub fn build(&self) -> UploadStickerFile {
UploadStickerFile::builder()
.user_id(self.user_id.clone())
.png_sticker(self.png_sticker.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGValidateOrderInfo {
chat_id: Option<i64>,
message_id: Option<i64>,
order_info: Option<OrderInfo>,
allow_save: Option<bool>,
}
impl TDFB for TGValidateOrderInfo {}
impl AsRef<TGValidateOrderInfo> for TGValidateOrderInfo {
fn as_ref(&self) -> &TGValidateOrderInfo { self }
}
impl TGValidateOrderInfo {
pub fn new() -> Self {
Self {
chat_id: None,
message_id: None,
order_info: None,
allow_save: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_id(&mut self, message_id: i64) -> &mut Self { self.message_id = Some(message_id); self }
pub fn allow_save(&mut self, allow_save: bool) -> &mut Self { self.allow_save = Some(allow_save); self }
#[doc(hidden)] pub fn _order_info(&mut self, order_info: OrderInfo) -> &mut Self { self.order_info = Some(order_info); self }
#[doc(hidden)]
pub fn build(&self) -> ValidateOrderInfo {
ValidateOrderInfo::builder()
.chat_id(self.chat_id.clone())
.message_id(self.message_id.clone())
.order_info(self.order_info.clone())
.allow_save(self.allow_save.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGViewMessages {
chat_id: Option<i64>,
message_ids: Option<Vec<i64>>,
force_read: Option<bool>,
}
impl TDFB for TGViewMessages {}
impl AsRef<TGViewMessages> for TGViewMessages {
fn as_ref(&self) -> &TGViewMessages { self }
}
impl TGViewMessages {
pub fn new() -> Self {
Self {
chat_id: None,
message_ids: None,
force_read: None,
}
}
pub fn chat_id(&mut self, chat_id: i64) -> &mut Self { self.chat_id = Some(chat_id); self }
pub fn message_ids(&mut self, message_ids: Vec<i64>) -> &mut Self { self.message_ids = Some(message_ids); self }
pub fn force_read(&mut self, force_read: bool) -> &mut Self { self.force_read = Some(force_read); self }
#[doc(hidden)]
pub fn build(&self) -> ViewMessages {
ViewMessages::builder()
.chat_id(self.chat_id.clone())
.message_ids(self.message_ids.clone())
.force_read(self.force_read.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGViewTrendingStickerSets {
sticker_set_ids: Option<Vec<i64>>,
}
impl TDFB for TGViewTrendingStickerSets {}
impl AsRef<TGViewTrendingStickerSets> for TGViewTrendingStickerSets {
fn as_ref(&self) -> &TGViewTrendingStickerSets { self }
}
impl TGViewTrendingStickerSets {
pub fn new() -> Self {
Self {
sticker_set_ids: None,
}
}
pub fn sticker_set_ids(&mut self, sticker_set_ids: Vec<i64>) -> &mut Self { self.sticker_set_ids = Some(sticker_set_ids); self }
#[doc(hidden)]
pub fn build(&self) -> ViewTrendingStickerSets {
ViewTrendingStickerSets::builder()
.sticker_set_ids(self.sticker_set_ids.clone())
.build()
}
}
#[derive(Debug, Clone)]
pub struct TGWriteGeneratedFilePart {
generation_id: Option<i64>,
offset: Option<i32>,
data: Option<String>,
}
impl TDFB for TGWriteGeneratedFilePart {}
impl AsRef<TGWriteGeneratedFilePart> for TGWriteGeneratedFilePart {
fn as_ref(&self) -> &TGWriteGeneratedFilePart { self }
}
impl TGWriteGeneratedFilePart {
pub fn new() -> Self {
Self {
generation_id: None,
offset: None,
data: None,
}
}
pub fn generation_id(&mut self, generation_id: i64) -> &mut Self { self.generation_id = Some(generation_id); self }
pub fn offset(&mut self, offset: i32) -> &mut Self { self.offset = Some(offset); self }
pub fn data<S: AsRef<str>>(&mut self, data: S) -> &mut Self { self.data = Some(data.as_ref().to_string()); self }
#[doc(hidden)]
pub fn build(&self) -> WriteGeneratedFilePart {
WriteGeneratedFilePart::builder()
.generation_id(self.generation_id.clone())
.offset(self.offset.clone())
.data(self.data.clone())
.build()
}
}