diff --git a/_schema/tdapi.tl b/_schema/tdapi.tl index e40019246d..ad79660af5 100644 --- a/_schema/tdapi.tl +++ b/_schema/tdapi.tl @@ -1,7 +1,7 @@ // Code generated by ./cmd/dltl, DO NOT EDIT. // // Source: https://raw.githubusercontent.com/tdlib/td/master/td/generate/scheme/td_api.tl -// SHA256: b084771cd2e20e1cc227082ee83b733cbeae423fc68a7dc41cb944ff63d1be40 +// SHA256: 433b93742472277ab11054e973a05ec38c64027b518b59b945d49f5c6c18c197 double#2210c154 ? = Double; @@ -268,13 +268,13 @@ thumbnailFormatMpeg4#109b57fe = ThumbnailFormat; //@description The thumbnail is in PNG format. It will be used only for background patterns thumbnailFormatPng#5e0697f5 = ThumbnailFormat; -//@description The thumbnail is in TGS format. It will be used only for TGS sticker sets +//@description The thumbnail is in TGS format. It will be used only for sticker sets thumbnailFormatTgs#4e694852 = ThumbnailFormat; -//@description The thumbnail is in WEBM format. It will be used only for WEBM sticker sets +//@description The thumbnail is in WEBM format. It will be used only for sticker sets thumbnailFormatWebm#d8a7e727 = ThumbnailFormat; -//@description The thumbnail is in WEBP format. It will be used only for some stickers +//@description The thumbnail is in WEBP format. It will be used only for some stickers and sticker sets thumbnailFormatWebp#fcce4c12 = ThumbnailFormat; //@description Represents a thumbnail @@ -448,7 +448,7 @@ videoNote#7ae918c5 duration:int32 waveform:bytes length:int32 minithumbnail:mini voiceNote#b9f24cf5 duration:int32 waveform:bytes mime_type:string speech_recognition_result:SpeechRecognitionResult voice:file = VoiceNote; //@description Describes an animated or custom representation of an emoji -//@sticker Sticker for the emoji; may be null if yet unknown for a custom emoji. If the sticker is a custom emoji, it can have arbitrary format different from stickerFormatTgs +//@sticker Sticker for the emoji; may be null if yet unknown for a custom emoji. If the sticker is a custom emoji, then it can have arbitrary format //@sticker_width Expected width of the sticker, which can be used if the sticker is null //@sticker_height Expected height of the sticker, which can be used if the sticker is null //@fitzpatrick_type Emoji modifier fitzpatrick type; 0-6; 0 if none @@ -559,8 +559,9 @@ userTypeDeleted#94403d24 = UserType; //@is_inline True, if the bot supports inline queries //@inline_query_placeholder Placeholder for inline queries (displayed on the application input field) //@need_location True, if the location of the user is expected to be sent with every inline query to this bot +//@can_connect_to_business True, if the bot supports connection to Telegram Business accounts //@can_be_added_to_attachment_menu True, if the bot can be added to attachment or side menu -userTypeBot#f979e790 can_be_edited:Bool can_join_groups:Bool can_read_all_group_messages:Bool is_inline:Bool inline_query_placeholder:string need_location:Bool can_be_added_to_attachment_menu:Bool = UserType; +userTypeBot#ae30a83a can_be_edited:Bool can_join_groups:Bool can_read_all_group_messages:Bool is_inline:Bool inline_query_placeholder:string need_location:Bool can_connect_to_business:Bool can_be_added_to_attachment_menu:Bool = UserType; //@description No information on the user besides the user identifier is available, yet this user has not been deleted. This object is extremely rare and must be handled like a deleted user. It is not possible to perform any actions on users of this type userTypeUnknown#d4d0613d = UserType; @@ -585,6 +586,17 @@ botMenuButton#c7b57ce6 text:string url:string = BotMenuButton; //@address Location address; 1-64 characters, as defined by the chat owner chatLocation#a29b8f21 location:location address:string = ChatLocation; +//@description Represents a birthdate of a user +//@day Day of the month; 1-31 +//@month Month of the year; 1-12 +//@year Birth year; 0 if unknown +birthdate#61fe6d1e day:int32 month:int32 year:int32 = Birthdate; + +//@description Describes a user that had or will have a birthday soon +//@user_id User identifier +//@birthdate Birthdate of the user +closeBirthdayUser#800659ee user_id:int53 birthdate:birthdate = CloseBirthdayUser; + //@class BusinessAwayMessageSchedule @description Describes conditions for sending of away messages by a Telegram Business account //@description Send away messages always @@ -605,12 +617,13 @@ businessLocation#bf54af5a location:location address:string = BusinessLocation; //@description Describes private chats chosen for automatic interaction with a business //@chat_ids Identifiers of selected private chats +//@excluded_chat_ids Identifiers of private chats that are always excluded; for businessConnectedBot only //@select_existing_chats True, if all existing private chats are selected //@select_new_chats True, if all new private chats are selected //@select_contacts True, if all private chats with contacts are selected //@select_non_contacts True, if all private chats with non-contacts are selected //@exclude_selected If true, then all private chats except the selected are chosen. Otherwise, only the selected chats are chosen -businessRecipients#2f3ca54a chat_ids:vector select_existing_chats:Bool select_new_chats:Bool select_contacts:Bool select_non_contacts:Bool exclude_selected:Bool = BusinessRecipients; +businessRecipients#802011e2 chat_ids:vector excluded_chat_ids:vector select_existing_chats:Bool select_new_chats:Bool select_contacts:Bool select_non_contacts:Bool exclude_selected:Bool = BusinessRecipients; //@description Describes settings for messages that are automatically sent by a Telegram Business account when it is away //@shortcut_id Unique quick reply shortcut identifier for the away messages @@ -631,6 +644,18 @@ businessGreetingMessageSettings#64ae3e12 shortcut_id:int32 recipients:businessRe //@can_reply True, if the bot can send messages to the private chats; false otherwise businessConnectedBot#ec50ead7 bot_user_id:int53 recipients:businessRecipients can_reply:Bool = BusinessConnectedBot; +//@description Describes settings for a business account intro +//@title Title text of the intro +//@message Message text of the intro +//@sticker Greeting sticker of the intro; may be null if none +businessIntro#737175e8 title:string message:string sticker:sticker = BusinessIntro; + +//@description Describes settings for a business account intro to set +//@title Title text of the intro; 0-getOption("business_intro_title_length_max") characters +//@message Message text of the intro; 0-getOption("business_intro_message_length_max") characters +//@sticker Greeting sticker of the intro; pass null if none. The sticker must belong to a sticker set and must not be a custom emoji +inputBusinessIntro#910fb07 title:string message:string sticker:InputFile = InputBusinessIntro; + //@description Describes an interval of time when the business is open //@start_minute The first minute of the interval since start of the week; 0-7*24*60 //@end_minute The first minute after the end of the interval since start of the week; 1-8*24*60 @@ -646,7 +671,8 @@ businessOpeningHours#a623e64a time_zone_id:string opening_hours:vector = EmojiStatuses; //@description Describes usernames assigned to a user, a supergroup, or a channel //@active_usernames List of active usernames; the first one must be shown as the primary username. The order of active usernames can be changed with reorderActiveUsernames, reorderBotActiveUsernames or reorderSupergroupActiveUsernames //@disabled_usernames List of currently disabled usernames; the username can be activated with toggleUsernameIsActive, toggleBotUsernameIsActive, or toggleSupergroupUsernameIsActive -//@editable_username The active username, which can be changed with setUsername or setSupergroupUsername +//@editable_username The active username, which can be changed with setUsername or setSupergroupUsername. Information about other active usernames can be received using getCollectibleItemInfo usernames#bf343063 active_usernames:vector disabled_usernames:vector editable_username:string = Usernames; //@description Represents a user @@ -912,11 +938,13 @@ botInfo#bfdb89a short_description:string description:string photo:photo animatio //@need_phone_number_privacy_exception True, if the current user needs to explicitly allow to share their phone number with the user when the method addContact is used //@set_chat_background True, if the user set chat background for both chat users and it wasn't reverted yet //@bio A short user bio; may be null for bots +//@birthdate Birthdate of the user; may be null if unknown +//@personal_chat_id Identifier of the personal chat of the user; 0 if none //@premium_gift_options The list of available options for gifting Telegram Premium to the user //@group_in_common_count Number of group chats where both the other user and the current user are a member; 0 for the current user //@business_info Information about business settings for Telegram Business accounts; may be null if none //@bot_info For bots, information about the bot; may be null if the user isn't a bot -userFullInfo#760faed8 personal_photo:chatPhoto photo:chatPhoto public_photo:chatPhoto block_list:BlockList can_be_called:Bool supports_video_calls:Bool has_private_calls:Bool has_private_forwards:Bool has_restricted_voice_and_video_note_messages:Bool has_pinned_stories:Bool need_phone_number_privacy_exception:Bool set_chat_background:Bool bio:formattedText premium_gift_options:vector group_in_common_count:int32 business_info:businessInfo bot_info:botInfo = UserFullInfo; +userFullInfo#809a3ac2 personal_photo:chatPhoto photo:chatPhoto public_photo:chatPhoto block_list:BlockList can_be_called:Bool supports_video_calls:Bool has_private_calls:Bool has_private_forwards:Bool has_restricted_voice_and_video_note_messages:Bool has_pinned_stories:Bool need_phone_number_privacy_exception:Bool set_chat_background:Bool bio:formattedText birthdate:birthdate personal_chat_id:int53 premium_gift_options:vector group_in_common_count:int32 business_info:businessInfo bot_info:botInfo = UserFullInfo; //@description Represents a list of users //@total_count Approximate total number of users found @@ -1411,6 +1439,7 @@ inputMessageReplyToStory#51aece78 story_sender_chat_id:int53 story_id:int32 = In //@scheduling_state The scheduling state of the message; may be null if the message isn't scheduled //@is_outgoing True, if the message is outgoing //@is_pinned True, if the message is pinned +//@is_from_offline True, if the message was sent because of a scheduled action by the message sender, for example, as away, or greeting service message //@can_be_edited True, if the message can be edited. For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message by the application //@can_be_forwarded True, if the message can be forwarded //@can_be_replied_in_another_chat True, if the message can be replied in another chat or topic @@ -1440,14 +1469,15 @@ inputMessageReplyToStory#51aece78 story_sender_chat_id:int53 story_id:int32 = In //@self_destruct_type The message's self-destruct type; may be null if none //@self_destruct_in Time left before the message self-destruct timer expires, in seconds; 0 if self-destruction isn't scheduled yet //@auto_delete_in Time left before the message will be automatically deleted by message_auto_delete_time setting of the chat, in seconds; 0 if never -//@via_bot_user_id If non-zero, the user identifier of the bot through which this message was sent +//@via_bot_user_id If non-zero, the user identifier of the inline bot through which this message was sent +//@sender_business_bot_user_id If non-zero, the user identifier of the business bot that sent this message //@sender_boost_count Number of times the sender of the message boosted the supergroup at the time the message was sent; 0 if none or unknown. For messages sent by the current user, supergroupFullInfo.my_boost_count must be used instead //@author_signature For channel posts and anonymous group messages, optional author signature //@media_album_id Unique identifier of an album this message belongs to. Only audios, documents, photos and videos can be grouped together in albums //@restriction_reason If non-empty, contains a human-readable description of the reason why access to this message must be restricted //@content Content of the message //@reply_markup Reply markup for the message; may be null if none -message#34e12c0 id:int53 sender_id:MessageSender chat_id:int53 sending_state:MessageSendingState scheduling_state:MessageSchedulingState is_outgoing:Bool is_pinned:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_replied_in_another_chat:Bool can_be_saved:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_get_added_reactions:Bool can_get_statistics:Bool can_get_message_thread:Bool can_get_read_date:Bool can_get_viewers:Bool can_get_media_timestamp_links:Bool can_report_reactions:Bool has_timestamped_media:Bool is_channel_post:Bool is_topic_message:Bool contains_unread_mention:Bool date:int32 edit_date:int32 forward_info:messageForwardInfo import_info:messageImportInfo interaction_info:messageInteractionInfo unread_reactions:vector reply_to:MessageReplyTo message_thread_id:int53 saved_messages_topic_id:int53 self_destruct_type:MessageSelfDestructType self_destruct_in:double auto_delete_in:double via_bot_user_id:int53 sender_boost_count:int32 author_signature:string media_album_id:int64 restriction_reason:string content:MessageContent reply_markup:ReplyMarkup = Message; +message#e255bc28 id:int53 sender_id:MessageSender chat_id:int53 sending_state:MessageSendingState scheduling_state:MessageSchedulingState is_outgoing:Bool is_pinned:Bool is_from_offline:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_replied_in_another_chat:Bool can_be_saved:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_get_added_reactions:Bool can_get_statistics:Bool can_get_message_thread:Bool can_get_read_date:Bool can_get_viewers:Bool can_get_media_timestamp_links:Bool can_report_reactions:Bool has_timestamped_media:Bool is_channel_post:Bool is_topic_message:Bool contains_unread_mention:Bool date:int32 edit_date:int32 forward_info:messageForwardInfo import_info:messageImportInfo interaction_info:messageInteractionInfo unread_reactions:vector reply_to:MessageReplyTo message_thread_id:int53 saved_messages_topic_id:int53 self_destruct_type:MessageSelfDestructType self_destruct_in:double auto_delete_in:double via_bot_user_id:int53 sender_business_bot_user_id:int53 sender_boost_count:int32 author_signature:string media_album_id:int64 restriction_reason:string content:MessageContent reply_markup:ReplyMarkup = Message; //@description Contains a list of messages //@total_count Approximate total number of messages found @@ -1487,6 +1517,15 @@ messageCalendarDay#e98f8f62 total_count:int32 message:message = MessageCalendarD //@days Information about messages sent messageCalendar#2582bbd7 total_count:int32 days:vector = MessageCalendar; +//@description Describes a message from a business account as received by a bot +//@message The message +//@reply_to_message Message that is replied by the message in the same chat; may be null if none +businessMessage#fa604646 message:message reply_to_message:message = BusinessMessage; + +//@description Contains a list of messages from a business account as received by a bot +//@messages List of business messages +businessMessages#355963fa messages:vector = BusinessMessages; + //@class MessageSource @description Describes source of a message //@description The message is from a chat history @@ -1555,17 +1594,42 @@ messageSponsor#a0b25071 type:MessageSponsorType photo:chatPhotoInfo info:string //@description Describes a sponsored message //@message_id Message identifier; unique for the chat to which the sponsored message belongs among both ordinary and sponsored messages //@is_recommended True, if the message needs to be labeled as "recommended" instead of "sponsored" +//@can_be_reported True, if the message can be reported to Telegram moderators through reportChatSponsoredMessage //@content Content of the message. Currently, can be only of the type messageText //@sponsor Information about the sponsor of the message //@button_text If non-empty, text for the message action button //@additional_info If non-empty, additional information about the sponsored message to be shown along with the message -sponsoredMessage#147623b4 message_id:int53 is_recommended:Bool content:MessageContent sponsor:messageSponsor button_text:string additional_info:string = SponsoredMessage; +sponsoredMessage#3748e46f message_id:int53 is_recommended:Bool can_be_reported:Bool content:MessageContent sponsor:messageSponsor button_text:string additional_info:string = SponsoredMessage; //@description Contains a list of sponsored messages //@messages List of sponsored messages //@messages_between The minimum number of messages between shown sponsored messages, or 0 if only one sponsored message must be shown after all ordinary messages sponsoredMessages#e402a0f messages:vector messages_between:int32 = SponsoredMessages; +//@description Describes an option to report a sponsored message +//@id Unique identifier of the option +//@text Text of the option +reportChatSponsoredMessageOption#aabd054a id:bytes text:string = ReportChatSponsoredMessageOption; + +//@class ReportChatSponsoredMessageResult @description Describes result of sponsored message report + +//@description The message was reported successfully +reportChatSponsoredMessageResultOk#754f721f = ReportChatSponsoredMessageResult; + +//@description The sponsored message is too old or not found +reportChatSponsoredMessageResultFailed#7f1f9bc6 = ReportChatSponsoredMessageResult; + +//@description The user must choose an option to report the message and repeat request with the chosen option +//@title Title for the option choice +//@options List of available options +reportChatSponsoredMessageResultOptionRequired#314c2d73 title:string options:vector = ReportChatSponsoredMessageResult; + +//@description Sponsored messages were hidden for the user in all chats +reportChatSponsoredMessageResultAdsHidden#e8eade1e = ReportChatSponsoredMessageResult; + +//@description The user asked to hide sponsored messages, but Telegram Premium is required for this +reportChatSponsoredMessageResultPremiumRequired#770c2ed0 = ReportChatSponsoredMessageResult; + //@description Describes a file added to file download list //@file_id File identifier //@message The message with the file @@ -1661,7 +1725,7 @@ chatFolderIcon#f74aa0e6 name:string = ChatFolderIcon; //@description Represents a folder for user chats //@title The title of the folder; 1-12 characters without line feeds //@icon The chosen icon for the chat folder; may be null. If null, use getChatFolderDefaultIconName to get default icon name for the folder -//@color_id The identifier of the chosen color for the chat folder icon; from -1 to 6. If -1, then color is didabled +//@color_id The identifier of the chosen color for the chat folder icon; from -1 to 6. If -1, then color is didabled. Can't be changed if folder tags are disabled or the current user doesn't have Telegram Premium subscription //@is_shareable True, if at least one link has been created for the folder //@pinned_chat_ids The chat identifiers of pinned chats in the folder. There can be up to getOption("chat_folder_chosen_chat_count_max") pinned and always included non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium //@included_chat_ids The chat identifiers of always included chats in the folder. There can be up to getOption("chat_folder_chosen_chat_count_max") pinned and always included non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium @@ -1892,7 +1956,10 @@ keyboardButtonTypeRequestPoll#7164dcb8 force_regular:Bool force_quiz:Bool = Keyb //@restrict_user_is_premium True, if the shared users must or must not be Telegram Premium users //@user_is_premium True, if the shared users must be Telegram Premium users; otherwise, the shared users must not be Telegram Premium users. Ignored if restrict_user_is_premium is false //@max_quantity The maximum number of users to share -keyboardButtonTypeRequestUsers#7e63ef90 id:int32 restrict_user_is_bot:Bool user_is_bot:Bool restrict_user_is_premium:Bool user_is_premium:Bool max_quantity:int32 = KeyboardButtonType; +//@request_name Pass true to request name of the users; bots only +//@request_username Pass true to request username of the users; bots only +//@request_photo Pass true to request photo of the users; bots only +keyboardButtonTypeRequestUsers#985c8bfd id:int32 restrict_user_is_bot:Bool user_is_bot:Bool restrict_user_is_premium:Bool user_is_premium:Bool max_quantity:int32 request_name:Bool request_username:Bool request_photo:Bool = KeyboardButtonType; //@description A button that requests a chat to be shared by the current user; available only in private chats. Use the method shareChatWithBot to complete the request //@id Unique button identifier @@ -1905,7 +1972,10 @@ keyboardButtonTypeRequestUsers#7e63ef90 id:int32 restrict_user_is_bot:Bool user_ //@user_administrator_rights Expected user administrator rights in the chat; may be null if they aren't restricted //@bot_administrator_rights Expected bot administrator rights in the chat; may be null if they aren't restricted //@bot_is_member True, if the bot must be a member of the chat; for basic group and supergroup chats only -keyboardButtonTypeRequestChat#103ea7a2 id:int32 chat_is_channel:Bool restrict_chat_is_forum:Bool chat_is_forum:Bool restrict_chat_has_username:Bool chat_has_username:Bool chat_is_created:Bool user_administrator_rights:chatAdministratorRights bot_administrator_rights:chatAdministratorRights bot_is_member:Bool = KeyboardButtonType; +//@request_title Pass true to request title of the chat; bots only +//@request_username Pass true to request username of the chat; bots only +//@request_photo Pass true to request photo of the chat; bots only +keyboardButtonTypeRequestChat#5a1224b5 id:int32 chat_is_channel:Bool restrict_chat_is_forum:Bool chat_is_forum:Bool restrict_chat_has_username:Bool chat_has_username:Bool chat_is_created:Bool user_administrator_rights:chatAdministratorRights bot_administrator_rights:chatAdministratorRights bot_is_member:Bool request_title:Bool request_username:Bool request_photo:Bool = KeyboardButtonType; //@description A button that opens a Web App by calling getWebAppUrl //@url An HTTP URL to pass to getWebAppUrl @@ -2085,6 +2155,21 @@ forumTopics#2d99b4ae total_count:int32 topics:vector next_offset_dat //@show_above_text True, if link preview must be shown above message text; otherwise, the link preview will be shown below the message text; ignored in secret chats linkPreviewOptions#3e61b3f3 is_disabled:Bool url:string force_small_media:Bool force_large_media:Bool show_above_text:Bool = LinkPreviewOptions; +//@description Contains information about a user shared with a bot +//@user_id User identifier +//@first_name First name of the user; for bots only +//@last_name Last name of the user; for bots only +//@username Username of the user; for bots only +//@photo Profile photo of the user; for bots only; may be null +sharedUser#117724f7 user_id:int53 first_name:string last_name:string username:string photo:photo = SharedUser; + +//@description Contains information about a chat shared with a bot +//@chat_id Chat identifier +//@title Title of the chat; for bots only +//@username Username of the chat; for bots only +//@photo Photo of the chat; for bots only; may be null +sharedChat#4a87b01a chat_id:int53 title:string username:string photo:photo = SharedChat; + //@class RichText @description Describes a text object inside an instant-view web page //@description A plain text @@ -2427,9 +2512,28 @@ countries#94b50e0f countries:vector = Countries; //@country Information about the country to which the phone number belongs; may be null //@country_calling_code The part of the phone number denoting country calling code or its part //@formatted_phone_number The phone number without country calling code formatted accordingly to local rules. Expected digits are returned as '-', but even more digits might be entered by the user -//@is_anonymous True, if the phone number was bought on Fragment and isn't tied to a SIM card +//@is_anonymous True, if the phone number was bought at https://fragment.com and isn't tied to a SIM card. Information about the phone number can be received using getCollectibleItemInfo phoneNumberInfo#d2c398a1 country:countryInfo country_calling_code:string formatted_phone_number:string is_anonymous:Bool = PhoneNumberInfo; +//@class CollectibleItemType @description Describes a collectible item that can be purchased at https://fragment.com + +//@description A username +//@username The username +collectibleItemTypeUsername#1b56e7d1 username:string = CollectibleItemType; + +//@description A phone number +//@phone_number The phone number +collectibleItemTypePhoneNumber#4ae0e142 phone_number:string = CollectibleItemType; + +//@description Contains information about a collectible item and its last purchase +//@purchase_date Point in time (Unix timestamp) when the item was purchased +//@currency Currency for the paid amount +//@amount The paid amount, in the smallest units of the currency +//@cryptocurrency Cryptocurrency used to pay for the item +//@cryptocurrency_amount The paid amount, in the smallest units of the cryptocurrency +//@url Individual URL for the item on https://fragment.com +collectibleItemInfo#570f9bcd purchase_date:int32 currency:string amount:int53 cryptocurrency:string cryptocurrency_amount:int64 url:string = CollectibleItemInfo; + //@description Describes an action associated with a bank card number //@text Action text //@url The URL to be opened @@ -2607,7 +2711,7 @@ inputInvoiceTelegram#96ecfeed purpose:TelegramPaymentPurpose = InputInvoice; //@description The media is hidden until the invoice is paid //@width Media width; 0 if unknown //@height Media height; 0 if unknown -//@duration Media duration; 0 if unknown +//@duration Media duration, in seconds; 0 if unknown //@minithumbnail Media minithumbnail; may be null //@caption Media caption messageExtendedMediaPreview#7703a347 width:int32 height:int32 duration:int32 minithumbnail:minithumbnail caption:formattedText = MessageExtendedMedia; @@ -3293,14 +3397,14 @@ messagePremiumGiveawayWinners#815d5f31 boosted_chat_id:int53 giveaway_message_id messageContactRegistered#a678fcff = MessageContent; //@description The current user shared users, which were requested by the bot -//@user_ids Identifier of the shared users +//@users The shared users //@button_id Identifier of the keyboard button with the request -messageUsersShared#95dca529 user_ids:vector button_id:int32 = MessageContent; +messageUsersShared#7f1f4a22 users:vector button_id:int32 = MessageContent; //@description The current user shared a chat, which was requested by the bot -//@chat_id Identifier of the shared chat +//@chat The shared chat //@button_id Identifier of the keyboard button with the request -messageChatShared#22db7091 chat_id:int53 button_id:int32 = MessageContent; +messageChatShared#aec6d961 chat:sharedChat button_id:int32 = MessageContent; //@description The user allowed the bot to send messages //@reason The reason why the bot was allowed to write messages @@ -3513,7 +3617,7 @@ inputMessageVideo#f17014da video:InputFile thumbnail:inputThumbnail added_sticke //@description A video note message //@video_note Video note to be sent //@thumbnail Video thumbnail; may be null if empty; pass null to skip thumbnail uploading -//@duration Duration of the video, in seconds +//@duration Duration of the video, in seconds; 0-60 //@length Video width and height; must be positive and not greater than 640 //@self_destruct_type Video note self-destruct type; may be null if none; pass null if none; private chats only inputMessageVideoNote#d56816dd video_note:InputFile thumbnail:inputThumbnail duration:int32 length:int32 self_destruct_type:MessageSelfDestructType = InputMessageContent; @@ -3742,17 +3846,17 @@ emojis#77274a16 emojis:vector = Emojis; //@name Name of the sticker set //@thumbnail Sticker set thumbnail in WEBP, TGS, or WEBM format with width and height 100; may be null. The file can be downloaded only before the thumbnail is changed //@thumbnail_outline Sticker set thumbnail's outline represented as a list of closed vector paths; may be empty. The coordinate system origin is in the upper-left corner +//@is_owned True, if the sticker set is owned by the current user //@is_installed True, if the sticker set has been installed by the current user //@is_archived True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously //@is_official True, if the sticker set is official -//@sticker_format Format of the stickers in the set //@sticker_type Type of the stickers in the set //@needs_repainting True, if stickers in the sticker set are custom emoji that must be repainted; for custom emoji sticker sets only //@is_allowed_as_chat_emoji_status True, if stickers in the sticker set are custom emoji that can be used as chat emoji status; for custom emoji sticker sets only //@is_viewed True for already viewed trending sticker sets //@stickers List of stickers in this set //@emojis A list of emoji corresponding to the stickers in the same order. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object -stickerSet#133c3db9 id:int64 title:string name:string thumbnail:thumbnail thumbnail_outline:vector is_installed:Bool is_archived:Bool is_official:Bool sticker_format:StickerFormat sticker_type:StickerType needs_repainting:Bool is_allowed_as_chat_emoji_status:Bool is_viewed:Bool stickers:vector emojis:vector = StickerSet; +stickerSet#bcf4d158 id:int64 title:string name:string thumbnail:thumbnail thumbnail_outline:vector is_owned:Bool is_installed:Bool is_archived:Bool is_official:Bool sticker_type:StickerType needs_repainting:Bool is_allowed_as_chat_emoji_status:Bool is_viewed:Bool stickers:vector emojis:vector = StickerSet; //@description Represents short information about a sticker set //@id Identifier of the sticker set @@ -3760,17 +3864,17 @@ stickerSet#133c3db9 id:int64 title:string name:string thumbnail:thumbnail thumbn //@name Name of the sticker set //@thumbnail Sticker set thumbnail in WEBP, TGS, or WEBM format with width and height 100; may be null. The file can be downloaded only before the thumbnail is changed //@thumbnail_outline Sticker set thumbnail's outline represented as a list of closed vector paths; may be empty. The coordinate system origin is in the upper-left corner +//@is_owned True, if the sticker set is owned by the current user //@is_installed True, if the sticker set has been installed by the current user //@is_archived True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously //@is_official True, if the sticker set is official -//@sticker_format Format of the stickers in the set //@sticker_type Type of the stickers in the set //@needs_repainting True, if stickers in the sticker set are custom emoji that must be repainted; for custom emoji sticker sets only //@is_allowed_as_chat_emoji_status True, if stickers in the sticker set are custom emoji that can be used as chat emoji status; for custom emoji sticker sets only //@is_viewed True for already viewed trending sticker sets //@size Total number of stickers in the set //@covers Up to the first 5 stickers from the set, depending on the context. If the application needs more stickers the full sticker set needs to be requested -stickerSetInfo#fb991fda id:int64 title:string name:string thumbnail:thumbnail thumbnail_outline:vector is_installed:Bool is_archived:Bool is_official:Bool sticker_format:StickerFormat sticker_type:StickerType needs_repainting:Bool is_allowed_as_chat_emoji_status:Bool is_viewed:Bool size:int32 covers:vector = StickerSetInfo; +stickerSetInfo#3cd2cd82 id:int64 title:string name:string thumbnail:thumbnail thumbnail_outline:vector is_owned:Bool is_installed:Bool is_archived:Bool is_official:Bool sticker_type:StickerType needs_repainting:Bool is_allowed_as_chat_emoji_status:Bool is_viewed:Bool size:int32 covers:vector = StickerSetInfo; //@description Represents a list of sticker sets //@total_count Approximate total number of sticker sets found @@ -4467,6 +4571,15 @@ speechRecognitionResultText#80e681dd text:string = SpeechRecognitionResult; //@error Recognition error. An error with a message "MSG_VOICE_TOO_LONG" is returned when media duration is too big to be recognized speechRecognitionResultError#9d243fc error:error = SpeechRecognitionResult; +//@description Describes a connection of the bot with a business account +//@id Unique identifier of the connection +//@user_id Identifier of the business user that created the connection +//@user_chat_id Chat identifier of the private chat with the user +//@date Point in time (Unix timestamp) when the connection was established +//@can_reply True, if the bot can send messages to the connected user; false otherwise +//@is_enabled True, if the connection is enabled; false otherwise +businessConnection#4436e234 id:string user_id:int53 user_chat_id:int53 date:int32 can_reply:Bool is_enabled:Bool = BusinessConnection; + //@description Describes a color to highlight a bot added to attachment menu //@light_color Color in the RGB24 format for light themes //@dark_color Color in the RGB24 format for dark themes @@ -5193,7 +5306,7 @@ premiumFeatureAdvancedChatManagement#2f774d1a = PremiumFeature; //@description A badge in the user's profile premiumFeatureProfileBadge#ded30c2 = PremiumFeature; -//@description An emoji status shown along with the user's name +//@description The ability to show an emoji status along with the user's name premiumFeatureEmojiStatus#fdd2cce1 = PremiumFeature; //@description Profile photo animation on message and chat screens @@ -5229,6 +5342,44 @@ premiumFeatureMessagePrivacy#2fd278f6 = PremiumFeature; //@description The ability to view last seen and read times of other users even they can't view last seen or read time for the current user premiumFeatureLastSeenTimes#d2914a8f = PremiumFeature; +//@description The ability to use Business features +premiumFeatureBusiness#a6609704 = PremiumFeature; + +//@class BusinessFeature @description Describes a feature available to Business user accounts + +//@description The ability to set location +businessFeatureLocation#c090027c = BusinessFeature; + +//@description The ability to set opening hours +businessFeatureOpeningHours#1b7b22ed = BusinessFeature; + +//@description The ability to use quick replies +businessFeatureQuickReplies#9c380a82 = BusinessFeature; + +//@description The ability to set up a greeting message +businessFeatureGreetingMessage#6aa87474 = BusinessFeature; + +//@description The ability to set up an away message +businessFeatureAwayMessage#40f9e8dd = BusinessFeature; + +//@description The ability to create links to the business account with predefined message text +businessFeatureAccountLinks#6ffa970e = BusinessFeature; + +//@description The ability to customize intro +businessFeatureIntro#b7843cb4 = BusinessFeature; + +//@description The ability to connect a bot to the account +businessFeatureBots#106575e5 = BusinessFeature; + +//@description The ability to show an emoji status along with the business name +businessFeatureEmojiStatus#cd8ec0e5 = BusinessFeature; + +//@description The ability to display folder names for each chat in the chat list +businessFeatureChatFolderTags#df95092a = BusinessFeature; + +//@description Allowed to use many additional features for stories +businessFeatureUpgradedStories#93fb53d2 = BusinessFeature; + //@class PremiumStoryFeature @description Describes a story feature available to Premium users //@description Stories of the current user are displayed before stories of non-Premium contacts, supergroups, and channels @@ -5264,6 +5415,10 @@ premiumLimit#7ed372e6 type:PremiumLimitType default_value:int32 premium_value:in //@payment_link An internal link to be opened to pay for Telegram Premium if store payment isn't possible; may be null if direct payment isn't available premiumFeatures#4cf10e82 features:vector limits:vector payment_link:InternalLinkType = PremiumFeatures; +//@description Contains information about features, available to Business user accounts +//@features The list of available business features +businessFeatures#e1593e48 features:vector = BusinessFeatures; + //@class PremiumSource @description Describes a source from which the Premium features screen is opened //@description A limit was exceeded @@ -5274,6 +5429,10 @@ premiumSourceLimitExceeded#85ae8702 limit_type:PremiumLimitType = PremiumSource; //@feature The used feature premiumSourceFeature#1a929325 feature:PremiumFeature = PremiumSource; +//@description A user tried to use a Business feature +//@feature The used feature; pass null if none specific feature was used +premiumSourceBusinessFeature#a703725c feature:BusinessFeature = PremiumSource; + //@description A user tried to use a Premium story feature //@feature The used feature premiumSourceStoryFeature#c290316c feature:PremiumStoryFeature = PremiumSource; @@ -5290,11 +5449,17 @@ premiumSourceSettings#eef88535 = PremiumSource; //@animation Promotion animation for the feature premiumFeaturePromotionAnimation#899dab1c feature:PremiumFeature animation:animation = PremiumFeaturePromotionAnimation; +//@description Describes a promotion animation for a Business feature +//@feature Business feature +//@animation Promotion animation for the feature +businessFeaturePromotionAnimation#7a05680a feature:BusinessFeature animation:animation = BusinessFeaturePromotionAnimation; + //@description Contains state of Telegram Premium subscription and promotion videos for Premium features //@state Text description of the state of the current Premium subscription; may be empty if the current user has no Telegram Premium subscription //@payment_options The list of available options for buying Telegram Premium //@animations The list of available promotion animations for Premium features -premiumState#fd42d2cd state:formattedText payment_options:vector animations:vector = PremiumState; +//@business_animations The list of available promotion animations for Business features +premiumState#91a8799 state:formattedText payment_options:vector animations:vector business_animations:vector = PremiumState; //@class StorePaymentPurpose @description Describes a purpose of an in-store payment @@ -5530,7 +5695,7 @@ checkChatUsernameResultUsernameInvalid#da087756 = CheckChatUsernameResult; //@description The username is occupied checkChatUsernameResultUsernameOccupied#4ebb3729 = CheckChatUsernameResult; -//@description The username can be purchased at fragment.com +//@description The username can be purchased at https://fragment.com. Information about the username can be received using getCollectibleItemInfo checkChatUsernameResultUsernamePurchasable#59ce59 = CheckChatUsernameResult; //@description The user has too many chats with username, one of them must be made private first @@ -5876,6 +6041,9 @@ userPrivacySettingRuleAllowAll#8abf1c3f = UserPrivacySettingRule; //@description A rule to allow all contacts of the user to do something userPrivacySettingRuleAllowContacts#8f2f2d10 = UserPrivacySettingRule; +//@description A rule to allow all Premium Users to do something; currently, allowed only for userPrivacySettingAllowChatInvites +userPrivacySettingRuleAllowPremiumUsers#60ce8541 = UserPrivacySettingRule; + //@description A rule to allow certain specified users to do something //@user_ids The user identifiers, total number of users in all rules must not exceed 1000 userPrivacySettingRuleAllowUsers#d1570b70 user_ids:vector = UserPrivacySettingRule; @@ -5919,6 +6087,9 @@ userPrivacySettingShowPhoneNumber#d0d1a229 = UserPrivacySetting; //@description A privacy setting for managing whether the user's bio is visible userPrivacySettingShowBio#39382761 = UserPrivacySetting; +//@description A privacy setting for managing whether the user's birthdate is visible +userPrivacySettingShowBirthdate#4596b4df = UserPrivacySetting; + //@description A privacy setting for managing whether the user can be invited to chats userPrivacySettingAllowChatInvites#4bcc1d27 = UserPrivacySetting; @@ -6202,7 +6373,7 @@ internalLinkTypeMessage#3a535c52 url:string = InternalLinkType; internalLinkTypeMessageDraft#276fbad5 text:formattedText contains_link:Bool = InternalLinkType; //@description The link contains a request of Telegram passport data. Call getPassportAuthorizationForm with the given parameters to process the link if the link was received from outside of the application; otherwise, ignore it -//@bot_user_id User identifier of the service's bot +//@bot_user_id User identifier of the service's bot; the corresponding user may be unknown yet //@scope Telegram Passport element types requested by the service //@public_key Service's public key //@nonce Unique request identifier provided by the service @@ -6622,6 +6793,9 @@ suggestedActionSubscribeToAnnualPremium#164978bb = SuggestedAction; //@description Suggests the user to gift Telegram Premium to friends for Christmas suggestedActionGiftPremiumForChristmas#93b3ee6f = SuggestedAction; +//@description Suggests the user to set birthdate +suggestedActionSetBirthdate#eabd9b02 = SuggestedAction; + //@description Contains a counter //@count Count count#4d38f104 count:int32 = Count; @@ -6684,10 +6858,11 @@ proxies#5ee27a86 proxies:vector = Proxies; //@description A sticker to be added to a sticker set //@sticker File with the sticker; must fit in a 512x512 square. For WEBP stickers the file must be in WEBP or PNG format, which will be converted to WEBP server-side. +//@format Format of the sticker //@emojis String with 1-20 emoji corresponding to the sticker //@mask_position Position where the mask is placed; pass null if not specified //@keywords List of up to 20 keywords with total length up to 64 characters, which can be used to find the sticker -inputSticker#e3d1ef79 sticker:InputFile emojis:string mask_position:maskPosition keywords:vector = InputSticker; +inputSticker#1f1d0998 sticker:InputFile format:StickerFormat emojis:string mask_position:maskPosition keywords:vector = InputSticker; //@description Represents a date range //@start_date Point in time (Unix timestamp) at which the date range begins @@ -7425,7 +7600,7 @@ updateDefaultReactionType#4b615105 reaction_type:ReactionType = Update; updateSavedMessagesTags#7386424a saved_messages_topic_id:int53 tags:savedMessagesTags = Update; //@description The parameters of speech recognition without Telegram Premium subscription has changed -//@max_media_duration The maximum allowed duration of media for speech recognition without Telegram Premium subscription +//@max_media_duration The maximum allowed duration of media for speech recognition without Telegram Premium subscription, in seconds //@weekly_count The total number of allowed speech recognitions per week; 0 if none //@left_count Number of left speech recognition attempts this week //@next_reset_date Point in time (Unix timestamp) when the weekly number of tries will reset; 0 if unknown @@ -7451,6 +7626,10 @@ updateAnimationSearchParameters#6016ef01 provider:string emojis:vector = //@removed_actions Removed suggested actions updateSuggestedActions#c2e5cccb added_actions:vector removed_actions:vector = Update; +//@description The list of contacts that had birthdays recently or will have birthday soon has changed +//@close_birthday_users List of contact users with close birthday +updateContactCloseBirthdays#c88b98ce close_birthday_users:vector = Update; + //@description Adding users to a chat has failed because of their privacy settings. An invite link can be shared with the users if appropriate //@chat_id Chat identifier //@user_ids Identifiers of users, which weren't added because of their privacy settings @@ -7461,6 +7640,26 @@ updateAddChatMembersPrivacyForbidden#b8b50363 chat_id:int53 user_ids:vector = Update; + //@description A new incoming inline query; for bots only //@id Unique query identifier //@sender_user_id Identifier of the user who sent the query @@ -7983,6 +8182,9 @@ getSuitableDiscussionChats#2ec5df6 = Chats; //@description Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives CHANNELS_TOO_MUCH error. Also, the limit can be increased with Telegram Premium getInactiveSupergroupChats#d8cbf9b5 = Chats; +//@description Returns a list of channel chats, which can be used as a personal chat +getSuitablePersonalChats#90849bf5 = Chats; + //@description Loads more Saved Messages topics. The loaded topics will be sent through updateSavedMessagesTopic. Topics are sorted by their topic.order in descending order. Returns a 404 error if all topics have been loaded //@limit The maximum number of topics to be loaded. For optimal performance, the number of loaded topics is chosen by TDLib and can be smaller than the specified limit, even if the end of the list is not reached loadSavedMessagesTopics#1146d6b8 limit:int32 = Ok; @@ -8160,6 +8362,12 @@ getChatSponsoredMessages#50a84098 chat_id:int53 = SponsoredMessages; //@message_id Identifier of the sponsored message clickChatSponsoredMessage#d9c09feb chat_id:int53 message_id:int53 = Ok; +//@description Reports a sponsored message to Telegram moderators +//@chat_id Chat identifier of the sponsored message +//@message_id Identifier of the sponsored message +//@option_id Option identifier chosen by the user; leave empty for the initial request +reportChatSponsoredMessage#cc3e53be chat_id:int53 message_id:int53 option_id:bytes = ReportChatSponsoredMessageResult; + //@description Removes an active notification from notification list. Needs to be called only if the notification is removed by the current user //@notification_group_id Identifier of notification group to which the notification belongs //@notification_id Identifier of removed notification @@ -8228,7 +8436,7 @@ setChatMessageSender#ab456b7e chat_id:int53 message_sender_id:MessageSender = Ok //@input_message_content The content of the message to be sent sendMessage#e02d01e9 chat_id:int53 message_thread_id:int53 reply_to:InputMessageReplyTo options:messageSendOptions reply_markup:ReplyMarkup input_message_content:InputMessageContent = Message; -//@description Sends 2-10 messages grouped together into an album. Currently, only audio, document, photo and video messages can be grouped into an album. Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages +//@description Sends 2-10 messages grouped together into an album. Currently, only audio, document, photo and video messages can be grouped into an album. //@chat_id Target chat //@message_thread_id If not 0, the message thread identifier in which the messages will be sent //@reply_to Information about the message or story to be replied; pass null if none @@ -8373,6 +8581,25 @@ editInlineMessageReplyMarkup#fbf906de inline_message_id:string reply_markup:Repl //@scheduling_state The new message scheduling state; pass null to send the message immediately editMessageSchedulingState#ae2a0bc0 chat_id:int53 message_id:int53 scheduling_state:MessageSchedulingState = Ok; +//@description Sends a message on behalf of a business account; for bots only. Returns the message after it was sent +//@business_connection_id Unique identifier of business connection on behalf of which to send the request +//@chat_id Target chat +//@reply_to Information about the message to be replied; pass null if none +//@disable_notification Pass true to disable notification for the message +//@protect_content Pass true if the content of the message must be protected from forwarding and saving +//@reply_markup Markup for replying to the message; pass null if none +//@input_message_content The content of the message to be sent +sendBusinessMessage#ec64b993 business_connection_id:string chat_id:int53 reply_to:InputMessageReplyTo disable_notification:Bool protect_content:Bool reply_markup:ReplyMarkup input_message_content:InputMessageContent = BusinessMessage; + +//@description Sends 2-10 messages grouped together into an album on behalf of a business account; for bots only. Currently, only audio, document, photo and video messages can be grouped into an album. +//@business_connection_id Unique identifier of business connection on behalf of which to send the request +//@chat_id Target chat +//@reply_to Information about the message to be replied; pass null if none +//@disable_notification Pass true to disable notification for the message +//@protect_content Pass true if the content of the message must be protected from forwarding and saving +//@input_message_contents Contents of messages to be sent. At most 10 messages can be added to an album +sendBusinessMessageAlbum#b6f0461f business_connection_id:string chat_id:int53 reply_to:InputMessageReplyTo disable_notification:Bool protect_content:Bool input_message_contents:vector = BusinessMessages; + //@description Checks validness of a name for a quick reply shortcut. Can be called synchronously //@name The name of the shortcut; 1-32 characters checkQuickReplyShortcutName#7d3dd129 name:string = Ok; @@ -8611,6 +8838,10 @@ stopPoll#62e80aad chat_id:int53 message_id:int53 reply_markup:ReplyMarkup = Ok; //@action Suggested action to hide hideSuggestedAction#a2ef2b7f action:SuggestedAction = Ok; +//@description Returns information about a business connection by its identifier; for bots only +//@connection_id Identifier of the business connection to return +getBusinessConnection#81f42420 connection_id:string = BusinessConnection; + //@description Returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button //@chat_id Chat identifier of the message with the button //@message_id Message identifier of the message with the button @@ -8765,8 +8996,9 @@ deleteChatReplyMarkup#5ff9b5b chat_id:int53 message_id:int53 = Ok; //@description Sends a notification about user activity in a chat //@chat_id Chat identifier //@message_thread_id If not 0, the message thread identifier in which the action was performed +//@business_connection_id Unique identifier of business connection on behalf of which to send the request; for bots only //@action The action description; pass null to cancel the currently active action -sendChatAction#7cfce154 chat_id:int53 message_thread_id:int53 action:ChatAction = Ok; +sendChatAction#8823f29e chat_id:int53 message_thread_id:int53 business_connection_id:string action:ChatAction = Ok; //@description Informs TDLib that the chat is opened by the user. Many useful activities depend on the chat being opened or closed (e.g., in supergroups and channels all updates are received only for opened chats) //@chat_id Chat identifier @@ -9241,7 +9473,7 @@ canSendStory#b6e0216b chat_id:int53 = CanSendStoryResult; //@chat_id Identifier of the chat that will post the story //@content Content of the story //@areas Clickable rectangle areas to be shown on the story media; pass null if none -//@caption Story caption; pass null to use an empty caption; 0-getOption("story_caption_length_max") characters +//@caption Story caption; pass null to use an empty caption; 0-getOption("story_caption_length_max") characters; can have entities only if getOption("can_use_text_entities_in_story_caption") //@privacy_settings The privacy settings for the story; ignored for stories sent to supergroup and channel chats //@active_period Period after which the story is moved to archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise //@from_story_full_id Full identifier of the original story, which content was used to create the story @@ -9935,7 +10167,7 @@ getInstalledStickerSets#612ef6f6 sticker_type:StickerType = StickerSets; //@description Returns a list of archived sticker sets //@sticker_type Type of the sticker sets to return -//@offset_sticker_set_id Identifier of the sticker set from which to return the result +//@offset_sticker_set_id Identifier of the sticker set from which to return the result; use 0 to get results from the beginning //@limit The maximum number of sticker sets to return; up to 100 getArchivedStickerSets#3bb8424d sticker_type:StickerType offset_sticker_set_id:int64 limit:int32 = StickerSets; @@ -10125,6 +10357,14 @@ toggleUsernameIsActive#4a276de3 username:string is_active:Bool = Ok; //@usernames The new order of active usernames. All currently active usernames must be specified reorderActiveUsernames#c659414f usernames:vector = Ok; +//@description Changes the birthdate of the current user +//@birthdate The new value of the current user's birthdate; pass null to remove the birthdate +setBirthdate#4ea9dd98 birthdate:birthdate = Ok; + +//@description Changes the personal chat of the current user +//@chat_id Identifier of the new personal chat; pass 0 to remove the chat. Use getSuitablePersonalChats to get suitable chats +setPersonalChat#c04babb4 chat_id:int53 = Ok; + //@description Changes the emoji status of the current user; for Telegram Premium users only //@emoji_status New emoji status; pass null to switch to the default badge setEmojiStatus#92f83e5d emoji_status:emojiStatus = Ok; @@ -10138,7 +10378,7 @@ setLocation#5993371 location:location = Ok; setBusinessLocation#eb740715 location:businessLocation = Ok; //@description Changes the business opening hours of the current user. Requires Telegram Business subscription -//@opening_hours The new opening hours of the business; pass null to remove the opening hours +//@opening_hours The new opening hours of the business; pass null to remove the opening hours; up to 28 time intervals can be specified setBusinessOpeningHours#e470a472 opening_hours:businessOpeningHours = Ok; //@description Changes the business greeting message settings of the current user. Requires Telegram Business subscription @@ -10149,6 +10389,10 @@ setBusinessGreetingMessageSettings#cbf53c3d greeting_message_settings:businessGr //@away_message_settings The new settings for the away message of the business; pass null to disable the away message setBusinessAwayMessageSettings#4974486c away_message_settings:businessAwayMessageSettings = Ok; +//@description Changes the business intro of the current user. Requires Telegram Business subscription +//@intro The new intro of the business; pass null to remove the intro +setBusinessIntro#d2f2e117 intro:inputBusinessIntro = Ok; + //@description Changes the phone number of the user and sends an authentication code to the user's new phone number; for official Android and iOS applications only. On success, returns information about the sent code //@phone_number The new phone number of the user in international format //@settings Settings for the authentication of the user's phone number; pass null to use default settings @@ -10563,7 +10807,7 @@ setReadDatePrivacySettings#1d7086b6 settings:readDatePrivacySettings = Ok; //@description Returns privacy settings for message read date getReadDatePrivacySettings#1ae85bbb = ReadDatePrivacySettings; -//@description Changes privacy settings for new chat creation; for Telegram Premium users only +//@description Changes privacy settings for new chat creation; can be used only if getOption("can_set_new_chat_privacy_settings") //@settings New settings setNewChatPrivacySettings#69bf374f settings:newChatPrivacySettings = Ok; @@ -10819,64 +11063,76 @@ checkStickerSetName#955808fe name:string = CheckStickerSetNameResult; //@description Creates a new sticker set. Returns the newly created sticker set //@user_id Sticker set owner; ignored for regular users //@title Sticker set title; 1-64 characters -//@name Sticker set name. Can contain only English letters, digits and underscores. Must end with *"_by_"* (** is case insensitive) for bots; 1-64 characters -//@sticker_format Format of the stickers in the set +//@name Sticker set name. Can contain only English letters, digits and underscores. Must end with *"_by_"* (** is case insensitive) for bots; 0-64 characters. //@sticker_type Type of the stickers in the set //@needs_repainting Pass true if stickers in the sticker set must be repainted; for custom emoji sticker sets only -//@stickers List of stickers to be added to the set; must be non-empty. All stickers must have the same format. For TGS stickers, uploadStickerFile must be used before the sticker is shown +//@stickers List of stickers to be added to the set; 1-200 stickers for custom emoji sticker sets, and 1-120 stickers otherwise. For TGS stickers, uploadStickerFile must be used before the sticker is shown //@source Source of the sticker set; may be empty if unknown -createNewStickerSet#19454551 user_id:int53 title:string name:string sticker_format:StickerFormat sticker_type:StickerType needs_repainting:Bool stickers:vector source:string = StickerSet; +createNewStickerSet#87fd8611 user_id:int53 title:string name:string sticker_type:StickerType needs_repainting:Bool stickers:vector source:string = StickerSet; -//@description Adds a new sticker to a set; for bots only -//@user_id Sticker set owner -//@name Sticker set name +//@description Adds a new sticker to a set +//@user_id Sticker set owner; ignored for regular users +//@name Sticker set name. The sticker set must be owned by the current user, and contain less than 200 stickers for custom emoji sticker sets and less than 120 otherwise //@sticker Sticker to add to the set addStickerToSet#56dc1e3b user_id:int53 name:string sticker:inputSticker = Ok; -//@description Sets a sticker set thumbnail; for bots only -//@user_id Sticker set owner -//@name Sticker set name -//@thumbnail Thumbnail to set in PNG, TGS, or WEBM format; pass null to remove the sticker set thumbnail. Thumbnail format must match the format of stickers in the set -setStickerSetThumbnail#6f813221 user_id:int53 name:string thumbnail:InputFile = Ok; +//@description Replaces existing sticker in a set. The function is equivalent to removeStickerFromSet, then addStickerToSet, then setStickerPositionInSet +//@user_id Sticker set owner; ignored for regular users +//@name Sticker set name. The sticker set must be owned by the current user +//@old_sticker Sticker to remove from the set +//@new_sticker Sticker to add to the set +replaceStickerInSet#e7c82e19 user_id:int53 name:string old_sticker:InputFile new_sticker:inputSticker = Ok; + +//@description Sets a sticker set thumbnail +//@user_id Sticker set owner; ignored for regular users +//@name Sticker set name. The sticker set must be owned by the current user +//@thumbnail Thumbnail to set; pass null to remove the sticker set thumbnail +//@format Format of the thumbnail; pass null if thumbnail is removed +setStickerSetThumbnail#63fe6932 user_id:int53 name:string thumbnail:InputFile format:StickerFormat = Ok; -//@description Sets a custom emoji sticker set thumbnail; for bots only -//@name Sticker set name +//@description Sets a custom emoji sticker set thumbnail +//@name Sticker set name. The sticker set must be owned by the current user //@custom_emoji_id Identifier of the custom emoji from the sticker set, which will be set as sticker set thumbnail; pass 0 to remove the sticker set thumbnail setCustomEmojiStickerSetThumbnail#bd12e0ea name:string custom_emoji_id:int64 = Ok; -//@description Sets a sticker set title; for bots only -//@name Sticker set name +//@description Sets a sticker set title +//@name Sticker set name. The sticker set must be owned by the current user //@title New sticker set title setStickerSetTitle#64e933a2 name:string title:string = Ok; -//@description Deleted a sticker set; for bots only -//@name Sticker set name +//@description Completely deletes a sticker set +//@name Sticker set name. The sticker set must be owned by the current user deleteStickerSet#5e0a7bad name:string = Ok; -//@description Changes the position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot +//@description Changes the position of a sticker in the set to which it belongs. The sticker set must be owned by the current user //@sticker Sticker //@position New position of the sticker in the set, 0-based setStickerPositionInSet#7bb24721 sticker:InputFile position:int32 = Ok; -//@description Removes a sticker from the set to which it belongs; for bots only. The sticker set must have been created by the bot -//@sticker Sticker +//@description Removes a sticker from the set to which it belongs. The sticker set must be owned by the current user +//@sticker Sticker to remove from the set removeStickerFromSet#61e1eea4 sticker:InputFile = Ok; -//@description Changes the list of emoji corresponding to a sticker; for bots only. The sticker must belong to a regular or custom emoji sticker set created by the bot +//@description Changes the list of emoji corresponding to a sticker. The sticker must belong to a regular or custom emoji sticker set that is owned by the current user //@sticker Sticker //@emojis New string with 1-20 emoji corresponding to the sticker setStickerEmojis#d9ec0431 sticker:InputFile emojis:string = Ok; -//@description Changes the list of keywords of a sticker; for bots only. The sticker must belong to a regular or custom emoji sticker set created by the bot +//@description Changes the list of keywords of a sticker. The sticker must belong to a regular or custom emoji sticker set that is owned by the current user //@sticker Sticker //@keywords List of up to 20 keywords with total length up to 64 characters, which can be used to find the sticker setStickerKeywords#462481d sticker:InputFile keywords:vector = Ok; -//@description Changes the mask position of a mask sticker; for bots only. The sticker must belong to a mask sticker set created by the bot +//@description Changes the mask position of a mask sticker. The sticker must belong to a mask sticker set that is owned by the current user //@sticker Sticker //@mask_position Position where the mask is placed; pass null to remove mask position setStickerMaskPosition#47a959d0 sticker:InputFile mask_position:maskPosition = Ok; +//@description Returns sticker sets owned by the current user +//@offset_sticker_set_id Identifier of the sticker set from which to return owned sticker sets; use 0 to get results from the beginning +//@limit The maximum number of sticker sets to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit +getOwnedStickerSets#58fe8120 offset_sticker_set_id:int64 limit:int32 = StickerSets; + //@description Returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded //@location Location of the map center //@zoom Map zoom level; 13-20 @@ -10945,6 +11201,10 @@ assignAppStoreTransaction#86f30bb0 receipt:bytes purpose:StorePaymentPurpose = O //@purpose Transaction purpose assignGooglePlayTransaction#8939bca4 package_name:string store_product_id:string purchase_token:string purpose:StorePaymentPurpose = Ok; +//@description Returns information about features, available to Business users +//@source Source of the request; pass null if the method is called from settings or some non-standard source +getBusinessFeatures#c4906001 source:BusinessFeature = BusinessFeatures; + //@description Accepts Telegram terms of services //@terms_of_service_id Terms of service identifier acceptTermsOfService#7efe03e4 terms_of_service_id:string = Ok; @@ -10985,6 +11245,10 @@ getPhoneNumberInfo#a0229bf9 phone_number_prefix:string = PhoneNumberInfo; //@phone_number_prefix The phone number prefix getPhoneNumberInfoSync#209b7d38 language_code:string phone_number_prefix:string = PhoneNumberInfo; +//@description Returns information about a given collectible item that was purchased at https://fragment.com +//@type Type of the collectible item. The item must be used by a user and must be visible to the current user +getCollectibleItemInfo#f304ad8a type:CollectibleItemType = CollectibleItemInfo; + //@description Returns information about a tg:// deep link. Use "tg://need_update_for_some_feature" or "tg:some_unsupported_feature" for testing. Returns a 404 error for unknown links. Can be called before authorization //@link The link getDeepLinkInfo#28923f7e link:string = DeepLinkInfo; diff --git a/tdapi/tl_add_sticker_to_set_gen.go b/tdapi/tl_add_sticker_to_set_gen.go index 8d4999a5f1..9dada8888d 100644 --- a/tdapi/tl_add_sticker_to_set_gen.go +++ b/tdapi/tl_add_sticker_to_set_gen.go @@ -33,9 +33,10 @@ var ( // AddStickerToSetRequest represents TL type `addStickerToSet#56dc1e3b`. type AddStickerToSetRequest struct { - // Sticker set owner + // Sticker set owner; ignored for regular users UserID int64 - // Sticker set name + // Sticker set name. The sticker set must be owned by the current user, and contain less + // than 200 stickers for custom emoji sticker sets and less than 120 otherwise Name string // Sticker to add to the set Sticker InputSticker diff --git a/tdapi/tl_animated_emoji_gen.go b/tdapi/tl_animated_emoji_gen.go index ff14dc276b..37e1093b1e 100644 --- a/tdapi/tl_animated_emoji_gen.go +++ b/tdapi/tl_animated_emoji_gen.go @@ -34,7 +34,7 @@ var ( // AnimatedEmoji represents TL type `animatedEmoji#52309ebf`. type AnimatedEmoji struct { // Sticker for the emoji; may be null if yet unknown for a custom emoji. If the sticker - // is a custom emoji, it can have arbitrary format different from stickerFormatTgs + // is a custom emoji, then it can have arbitrary format Sticker Sticker // Expected width of the sticker, which can be used if the sticker is null StickerWidth int32 diff --git a/tdapi/tl_birthdate_gen.go b/tdapi/tl_birthdate_gen.go new file mode 100644 index 0000000000..e87623401f --- /dev/null +++ b/tdapi/tl_birthdate_gen.go @@ -0,0 +1,261 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// Birthdate represents TL type `birthdate#61fe6d1e`. +type Birthdate struct { + // Day of the month; 1-31 + Day int32 + // Month of the year; 1-12 + Month int32 + // Birth year; 0 if unknown + Year int32 +} + +// BirthdateTypeID is TL type id of Birthdate. +const BirthdateTypeID = 0x61fe6d1e + +// Ensuring interfaces in compile-time for Birthdate. +var ( + _ bin.Encoder = &Birthdate{} + _ bin.Decoder = &Birthdate{} + _ bin.BareEncoder = &Birthdate{} + _ bin.BareDecoder = &Birthdate{} +) + +func (b *Birthdate) Zero() bool { + if b == nil { + return true + } + if !(b.Day == 0) { + return false + } + if !(b.Month == 0) { + return false + } + if !(b.Year == 0) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (b *Birthdate) String() string { + if b == nil { + return "Birthdate(nil)" + } + type Alias Birthdate + return fmt.Sprintf("Birthdate%+v", Alias(*b)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*Birthdate) TypeID() uint32 { + return BirthdateTypeID +} + +// TypeName returns name of type in TL schema. +func (*Birthdate) TypeName() string { + return "birthdate" +} + +// TypeInfo returns info about TL type. +func (b *Birthdate) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "birthdate", + ID: BirthdateTypeID, + } + if b == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Day", + SchemaName: "day", + }, + { + Name: "Month", + SchemaName: "month", + }, + { + Name: "Year", + SchemaName: "year", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (b *Birthdate) Encode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode birthdate#61fe6d1e as nil") + } + buf.PutID(BirthdateTypeID) + return b.EncodeBare(buf) +} + +// EncodeBare implements bin.BareEncoder. +func (b *Birthdate) EncodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode birthdate#61fe6d1e as nil") + } + buf.PutInt32(b.Day) + buf.PutInt32(b.Month) + buf.PutInt32(b.Year) + return nil +} + +// Decode implements bin.Decoder. +func (b *Birthdate) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode birthdate#61fe6d1e to nil") + } + if err := buf.ConsumeID(BirthdateTypeID); err != nil { + return fmt.Errorf("unable to decode birthdate#61fe6d1e: %w", err) + } + return b.DecodeBare(buf) +} + +// DecodeBare implements bin.BareDecoder. +func (b *Birthdate) DecodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode birthdate#61fe6d1e to nil") + } + { + value, err := buf.Int32() + if err != nil { + return fmt.Errorf("unable to decode birthdate#61fe6d1e: field day: %w", err) + } + b.Day = value + } + { + value, err := buf.Int32() + if err != nil { + return fmt.Errorf("unable to decode birthdate#61fe6d1e: field month: %w", err) + } + b.Month = value + } + { + value, err := buf.Int32() + if err != nil { + return fmt.Errorf("unable to decode birthdate#61fe6d1e: field year: %w", err) + } + b.Year = value + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (b *Birthdate) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil { + return fmt.Errorf("can't encode birthdate#61fe6d1e as nil") + } + buf.ObjStart() + buf.PutID("birthdate") + buf.Comma() + buf.FieldStart("day") + buf.PutInt32(b.Day) + buf.Comma() + buf.FieldStart("month") + buf.PutInt32(b.Month) + buf.Comma() + buf.FieldStart("year") + buf.PutInt32(b.Year) + buf.Comma() + buf.StripComma() + buf.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (b *Birthdate) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("can't decode birthdate#61fe6d1e to nil") + } + + return buf.Obj(func(buf tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := buf.ConsumeID("birthdate"); err != nil { + return fmt.Errorf("unable to decode birthdate#61fe6d1e: %w", err) + } + case "day": + value, err := buf.Int32() + if err != nil { + return fmt.Errorf("unable to decode birthdate#61fe6d1e: field day: %w", err) + } + b.Day = value + case "month": + value, err := buf.Int32() + if err != nil { + return fmt.Errorf("unable to decode birthdate#61fe6d1e: field month: %w", err) + } + b.Month = value + case "year": + value, err := buf.Int32() + if err != nil { + return fmt.Errorf("unable to decode birthdate#61fe6d1e: field year: %w", err) + } + b.Year = value + default: + return buf.Skip() + } + return nil + }) +} + +// GetDay returns value of Day field. +func (b *Birthdate) GetDay() (value int32) { + if b == nil { + return + } + return b.Day +} + +// GetMonth returns value of Month field. +func (b *Birthdate) GetMonth() (value int32) { + if b == nil { + return + } + return b.Month +} + +// GetYear returns value of Year field. +func (b *Birthdate) GetYear() (value int32) { + if b == nil { + return + } + return b.Year +} diff --git a/tdapi/tl_business_connection_gen.go b/tdapi/tl_business_connection_gen.go new file mode 100644 index 0000000000..69f3212ac6 --- /dev/null +++ b/tdapi/tl_business_connection_gen.go @@ -0,0 +1,363 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// BusinessConnection represents TL type `businessConnection#4436e234`. +type BusinessConnection struct { + // Unique identifier of the connection + ID string + // Identifier of the business user that created the connection + UserID int64 + // Chat identifier of the private chat with the user + UserChatID int64 + // Point in time (Unix timestamp) when the connection was established + Date int32 + // True, if the bot can send messages to the connected user; false otherwise + CanReply bool + // True, if the connection is enabled; false otherwise + IsEnabled bool +} + +// BusinessConnectionTypeID is TL type id of BusinessConnection. +const BusinessConnectionTypeID = 0x4436e234 + +// Ensuring interfaces in compile-time for BusinessConnection. +var ( + _ bin.Encoder = &BusinessConnection{} + _ bin.Decoder = &BusinessConnection{} + _ bin.BareEncoder = &BusinessConnection{} + _ bin.BareDecoder = &BusinessConnection{} +) + +func (b *BusinessConnection) Zero() bool { + if b == nil { + return true + } + if !(b.ID == "") { + return false + } + if !(b.UserID == 0) { + return false + } + if !(b.UserChatID == 0) { + return false + } + if !(b.Date == 0) { + return false + } + if !(b.CanReply == false) { + return false + } + if !(b.IsEnabled == false) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (b *BusinessConnection) String() string { + if b == nil { + return "BusinessConnection(nil)" + } + type Alias BusinessConnection + return fmt.Sprintf("BusinessConnection%+v", Alias(*b)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*BusinessConnection) TypeID() uint32 { + return BusinessConnectionTypeID +} + +// TypeName returns name of type in TL schema. +func (*BusinessConnection) TypeName() string { + return "businessConnection" +} + +// TypeInfo returns info about TL type. +func (b *BusinessConnection) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "businessConnection", + ID: BusinessConnectionTypeID, + } + if b == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "ID", + SchemaName: "id", + }, + { + Name: "UserID", + SchemaName: "user_id", + }, + { + Name: "UserChatID", + SchemaName: "user_chat_id", + }, + { + Name: "Date", + SchemaName: "date", + }, + { + Name: "CanReply", + SchemaName: "can_reply", + }, + { + Name: "IsEnabled", + SchemaName: "is_enabled", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (b *BusinessConnection) Encode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessConnection#4436e234 as nil") + } + buf.PutID(BusinessConnectionTypeID) + return b.EncodeBare(buf) +} + +// EncodeBare implements bin.BareEncoder. +func (b *BusinessConnection) EncodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessConnection#4436e234 as nil") + } + buf.PutString(b.ID) + buf.PutInt53(b.UserID) + buf.PutInt53(b.UserChatID) + buf.PutInt32(b.Date) + buf.PutBool(b.CanReply) + buf.PutBool(b.IsEnabled) + return nil +} + +// Decode implements bin.Decoder. +func (b *BusinessConnection) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessConnection#4436e234 to nil") + } + if err := buf.ConsumeID(BusinessConnectionTypeID); err != nil { + return fmt.Errorf("unable to decode businessConnection#4436e234: %w", err) + } + return b.DecodeBare(buf) +} + +// DecodeBare implements bin.BareDecoder. +func (b *BusinessConnection) DecodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessConnection#4436e234 to nil") + } + { + value, err := buf.String() + if err != nil { + return fmt.Errorf("unable to decode businessConnection#4436e234: field id: %w", err) + } + b.ID = value + } + { + value, err := buf.Int53() + if err != nil { + return fmt.Errorf("unable to decode businessConnection#4436e234: field user_id: %w", err) + } + b.UserID = value + } + { + value, err := buf.Int53() + if err != nil { + return fmt.Errorf("unable to decode businessConnection#4436e234: field user_chat_id: %w", err) + } + b.UserChatID = value + } + { + value, err := buf.Int32() + if err != nil { + return fmt.Errorf("unable to decode businessConnection#4436e234: field date: %w", err) + } + b.Date = value + } + { + value, err := buf.Bool() + if err != nil { + return fmt.Errorf("unable to decode businessConnection#4436e234: field can_reply: %w", err) + } + b.CanReply = value + } + { + value, err := buf.Bool() + if err != nil { + return fmt.Errorf("unable to decode businessConnection#4436e234: field is_enabled: %w", err) + } + b.IsEnabled = value + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (b *BusinessConnection) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil { + return fmt.Errorf("can't encode businessConnection#4436e234 as nil") + } + buf.ObjStart() + buf.PutID("businessConnection") + buf.Comma() + buf.FieldStart("id") + buf.PutString(b.ID) + buf.Comma() + buf.FieldStart("user_id") + buf.PutInt53(b.UserID) + buf.Comma() + buf.FieldStart("user_chat_id") + buf.PutInt53(b.UserChatID) + buf.Comma() + buf.FieldStart("date") + buf.PutInt32(b.Date) + buf.Comma() + buf.FieldStart("can_reply") + buf.PutBool(b.CanReply) + buf.Comma() + buf.FieldStart("is_enabled") + buf.PutBool(b.IsEnabled) + buf.Comma() + buf.StripComma() + buf.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (b *BusinessConnection) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("can't decode businessConnection#4436e234 to nil") + } + + return buf.Obj(func(buf tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := buf.ConsumeID("businessConnection"); err != nil { + return fmt.Errorf("unable to decode businessConnection#4436e234: %w", err) + } + case "id": + value, err := buf.String() + if err != nil { + return fmt.Errorf("unable to decode businessConnection#4436e234: field id: %w", err) + } + b.ID = value + case "user_id": + value, err := buf.Int53() + if err != nil { + return fmt.Errorf("unable to decode businessConnection#4436e234: field user_id: %w", err) + } + b.UserID = value + case "user_chat_id": + value, err := buf.Int53() + if err != nil { + return fmt.Errorf("unable to decode businessConnection#4436e234: field user_chat_id: %w", err) + } + b.UserChatID = value + case "date": + value, err := buf.Int32() + if err != nil { + return fmt.Errorf("unable to decode businessConnection#4436e234: field date: %w", err) + } + b.Date = value + case "can_reply": + value, err := buf.Bool() + if err != nil { + return fmt.Errorf("unable to decode businessConnection#4436e234: field can_reply: %w", err) + } + b.CanReply = value + case "is_enabled": + value, err := buf.Bool() + if err != nil { + return fmt.Errorf("unable to decode businessConnection#4436e234: field is_enabled: %w", err) + } + b.IsEnabled = value + default: + return buf.Skip() + } + return nil + }) +} + +// GetID returns value of ID field. +func (b *BusinessConnection) GetID() (value string) { + if b == nil { + return + } + return b.ID +} + +// GetUserID returns value of UserID field. +func (b *BusinessConnection) GetUserID() (value int64) { + if b == nil { + return + } + return b.UserID +} + +// GetUserChatID returns value of UserChatID field. +func (b *BusinessConnection) GetUserChatID() (value int64) { + if b == nil { + return + } + return b.UserChatID +} + +// GetDate returns value of Date field. +func (b *BusinessConnection) GetDate() (value int32) { + if b == nil { + return + } + return b.Date +} + +// GetCanReply returns value of CanReply field. +func (b *BusinessConnection) GetCanReply() (value bool) { + if b == nil { + return + } + return b.CanReply +} + +// GetIsEnabled returns value of IsEnabled field. +func (b *BusinessConnection) GetIsEnabled() (value bool) { + if b == nil { + return + } + return b.IsEnabled +} diff --git a/tdapi/tl_business_feature_gen.go b/tdapi/tl_business_feature_gen.go new file mode 100644 index 0000000000..981156254c --- /dev/null +++ b/tdapi/tl_business_feature_gen.go @@ -0,0 +1,1745 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// BusinessFeatureLocation represents TL type `businessFeatureLocation#c090027c`. +type BusinessFeatureLocation struct { +} + +// BusinessFeatureLocationTypeID is TL type id of BusinessFeatureLocation. +const BusinessFeatureLocationTypeID = 0xc090027c + +// construct implements constructor of BusinessFeatureClass. +func (b BusinessFeatureLocation) construct() BusinessFeatureClass { return &b } + +// Ensuring interfaces in compile-time for BusinessFeatureLocation. +var ( + _ bin.Encoder = &BusinessFeatureLocation{} + _ bin.Decoder = &BusinessFeatureLocation{} + _ bin.BareEncoder = &BusinessFeatureLocation{} + _ bin.BareDecoder = &BusinessFeatureLocation{} + + _ BusinessFeatureClass = &BusinessFeatureLocation{} +) + +func (b *BusinessFeatureLocation) Zero() bool { + if b == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (b *BusinessFeatureLocation) String() string { + if b == nil { + return "BusinessFeatureLocation(nil)" + } + type Alias BusinessFeatureLocation + return fmt.Sprintf("BusinessFeatureLocation%+v", Alias(*b)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*BusinessFeatureLocation) TypeID() uint32 { + return BusinessFeatureLocationTypeID +} + +// TypeName returns name of type in TL schema. +func (*BusinessFeatureLocation) TypeName() string { + return "businessFeatureLocation" +} + +// TypeInfo returns info about TL type. +func (b *BusinessFeatureLocation) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "businessFeatureLocation", + ID: BusinessFeatureLocationTypeID, + } + if b == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (b *BusinessFeatureLocation) Encode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureLocation#c090027c as nil") + } + buf.PutID(BusinessFeatureLocationTypeID) + return b.EncodeBare(buf) +} + +// EncodeBare implements bin.BareEncoder. +func (b *BusinessFeatureLocation) EncodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureLocation#c090027c as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (b *BusinessFeatureLocation) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureLocation#c090027c to nil") + } + if err := buf.ConsumeID(BusinessFeatureLocationTypeID); err != nil { + return fmt.Errorf("unable to decode businessFeatureLocation#c090027c: %w", err) + } + return b.DecodeBare(buf) +} + +// DecodeBare implements bin.BareDecoder. +func (b *BusinessFeatureLocation) DecodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureLocation#c090027c to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (b *BusinessFeatureLocation) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureLocation#c090027c as nil") + } + buf.ObjStart() + buf.PutID("businessFeatureLocation") + buf.Comma() + buf.StripComma() + buf.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (b *BusinessFeatureLocation) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureLocation#c090027c to nil") + } + + return buf.Obj(func(buf tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := buf.ConsumeID("businessFeatureLocation"); err != nil { + return fmt.Errorf("unable to decode businessFeatureLocation#c090027c: %w", err) + } + default: + return buf.Skip() + } + return nil + }) +} + +// BusinessFeatureOpeningHours represents TL type `businessFeatureOpeningHours#1b7b22ed`. +type BusinessFeatureOpeningHours struct { +} + +// BusinessFeatureOpeningHoursTypeID is TL type id of BusinessFeatureOpeningHours. +const BusinessFeatureOpeningHoursTypeID = 0x1b7b22ed + +// construct implements constructor of BusinessFeatureClass. +func (b BusinessFeatureOpeningHours) construct() BusinessFeatureClass { return &b } + +// Ensuring interfaces in compile-time for BusinessFeatureOpeningHours. +var ( + _ bin.Encoder = &BusinessFeatureOpeningHours{} + _ bin.Decoder = &BusinessFeatureOpeningHours{} + _ bin.BareEncoder = &BusinessFeatureOpeningHours{} + _ bin.BareDecoder = &BusinessFeatureOpeningHours{} + + _ BusinessFeatureClass = &BusinessFeatureOpeningHours{} +) + +func (b *BusinessFeatureOpeningHours) Zero() bool { + if b == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (b *BusinessFeatureOpeningHours) String() string { + if b == nil { + return "BusinessFeatureOpeningHours(nil)" + } + type Alias BusinessFeatureOpeningHours + return fmt.Sprintf("BusinessFeatureOpeningHours%+v", Alias(*b)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*BusinessFeatureOpeningHours) TypeID() uint32 { + return BusinessFeatureOpeningHoursTypeID +} + +// TypeName returns name of type in TL schema. +func (*BusinessFeatureOpeningHours) TypeName() string { + return "businessFeatureOpeningHours" +} + +// TypeInfo returns info about TL type. +func (b *BusinessFeatureOpeningHours) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "businessFeatureOpeningHours", + ID: BusinessFeatureOpeningHoursTypeID, + } + if b == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (b *BusinessFeatureOpeningHours) Encode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureOpeningHours#1b7b22ed as nil") + } + buf.PutID(BusinessFeatureOpeningHoursTypeID) + return b.EncodeBare(buf) +} + +// EncodeBare implements bin.BareEncoder. +func (b *BusinessFeatureOpeningHours) EncodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureOpeningHours#1b7b22ed as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (b *BusinessFeatureOpeningHours) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureOpeningHours#1b7b22ed to nil") + } + if err := buf.ConsumeID(BusinessFeatureOpeningHoursTypeID); err != nil { + return fmt.Errorf("unable to decode businessFeatureOpeningHours#1b7b22ed: %w", err) + } + return b.DecodeBare(buf) +} + +// DecodeBare implements bin.BareDecoder. +func (b *BusinessFeatureOpeningHours) DecodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureOpeningHours#1b7b22ed to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (b *BusinessFeatureOpeningHours) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureOpeningHours#1b7b22ed as nil") + } + buf.ObjStart() + buf.PutID("businessFeatureOpeningHours") + buf.Comma() + buf.StripComma() + buf.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (b *BusinessFeatureOpeningHours) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureOpeningHours#1b7b22ed to nil") + } + + return buf.Obj(func(buf tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := buf.ConsumeID("businessFeatureOpeningHours"); err != nil { + return fmt.Errorf("unable to decode businessFeatureOpeningHours#1b7b22ed: %w", err) + } + default: + return buf.Skip() + } + return nil + }) +} + +// BusinessFeatureQuickReplies represents TL type `businessFeatureQuickReplies#9c380a82`. +type BusinessFeatureQuickReplies struct { +} + +// BusinessFeatureQuickRepliesTypeID is TL type id of BusinessFeatureQuickReplies. +const BusinessFeatureQuickRepliesTypeID = 0x9c380a82 + +// construct implements constructor of BusinessFeatureClass. +func (b BusinessFeatureQuickReplies) construct() BusinessFeatureClass { return &b } + +// Ensuring interfaces in compile-time for BusinessFeatureQuickReplies. +var ( + _ bin.Encoder = &BusinessFeatureQuickReplies{} + _ bin.Decoder = &BusinessFeatureQuickReplies{} + _ bin.BareEncoder = &BusinessFeatureQuickReplies{} + _ bin.BareDecoder = &BusinessFeatureQuickReplies{} + + _ BusinessFeatureClass = &BusinessFeatureQuickReplies{} +) + +func (b *BusinessFeatureQuickReplies) Zero() bool { + if b == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (b *BusinessFeatureQuickReplies) String() string { + if b == nil { + return "BusinessFeatureQuickReplies(nil)" + } + type Alias BusinessFeatureQuickReplies + return fmt.Sprintf("BusinessFeatureQuickReplies%+v", Alias(*b)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*BusinessFeatureQuickReplies) TypeID() uint32 { + return BusinessFeatureQuickRepliesTypeID +} + +// TypeName returns name of type in TL schema. +func (*BusinessFeatureQuickReplies) TypeName() string { + return "businessFeatureQuickReplies" +} + +// TypeInfo returns info about TL type. +func (b *BusinessFeatureQuickReplies) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "businessFeatureQuickReplies", + ID: BusinessFeatureQuickRepliesTypeID, + } + if b == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (b *BusinessFeatureQuickReplies) Encode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureQuickReplies#9c380a82 as nil") + } + buf.PutID(BusinessFeatureQuickRepliesTypeID) + return b.EncodeBare(buf) +} + +// EncodeBare implements bin.BareEncoder. +func (b *BusinessFeatureQuickReplies) EncodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureQuickReplies#9c380a82 as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (b *BusinessFeatureQuickReplies) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureQuickReplies#9c380a82 to nil") + } + if err := buf.ConsumeID(BusinessFeatureQuickRepliesTypeID); err != nil { + return fmt.Errorf("unable to decode businessFeatureQuickReplies#9c380a82: %w", err) + } + return b.DecodeBare(buf) +} + +// DecodeBare implements bin.BareDecoder. +func (b *BusinessFeatureQuickReplies) DecodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureQuickReplies#9c380a82 to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (b *BusinessFeatureQuickReplies) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureQuickReplies#9c380a82 as nil") + } + buf.ObjStart() + buf.PutID("businessFeatureQuickReplies") + buf.Comma() + buf.StripComma() + buf.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (b *BusinessFeatureQuickReplies) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureQuickReplies#9c380a82 to nil") + } + + return buf.Obj(func(buf tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := buf.ConsumeID("businessFeatureQuickReplies"); err != nil { + return fmt.Errorf("unable to decode businessFeatureQuickReplies#9c380a82: %w", err) + } + default: + return buf.Skip() + } + return nil + }) +} + +// BusinessFeatureGreetingMessage represents TL type `businessFeatureGreetingMessage#6aa87474`. +type BusinessFeatureGreetingMessage struct { +} + +// BusinessFeatureGreetingMessageTypeID is TL type id of BusinessFeatureGreetingMessage. +const BusinessFeatureGreetingMessageTypeID = 0x6aa87474 + +// construct implements constructor of BusinessFeatureClass. +func (b BusinessFeatureGreetingMessage) construct() BusinessFeatureClass { return &b } + +// Ensuring interfaces in compile-time for BusinessFeatureGreetingMessage. +var ( + _ bin.Encoder = &BusinessFeatureGreetingMessage{} + _ bin.Decoder = &BusinessFeatureGreetingMessage{} + _ bin.BareEncoder = &BusinessFeatureGreetingMessage{} + _ bin.BareDecoder = &BusinessFeatureGreetingMessage{} + + _ BusinessFeatureClass = &BusinessFeatureGreetingMessage{} +) + +func (b *BusinessFeatureGreetingMessage) Zero() bool { + if b == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (b *BusinessFeatureGreetingMessage) String() string { + if b == nil { + return "BusinessFeatureGreetingMessage(nil)" + } + type Alias BusinessFeatureGreetingMessage + return fmt.Sprintf("BusinessFeatureGreetingMessage%+v", Alias(*b)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*BusinessFeatureGreetingMessage) TypeID() uint32 { + return BusinessFeatureGreetingMessageTypeID +} + +// TypeName returns name of type in TL schema. +func (*BusinessFeatureGreetingMessage) TypeName() string { + return "businessFeatureGreetingMessage" +} + +// TypeInfo returns info about TL type. +func (b *BusinessFeatureGreetingMessage) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "businessFeatureGreetingMessage", + ID: BusinessFeatureGreetingMessageTypeID, + } + if b == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (b *BusinessFeatureGreetingMessage) Encode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureGreetingMessage#6aa87474 as nil") + } + buf.PutID(BusinessFeatureGreetingMessageTypeID) + return b.EncodeBare(buf) +} + +// EncodeBare implements bin.BareEncoder. +func (b *BusinessFeatureGreetingMessage) EncodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureGreetingMessage#6aa87474 as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (b *BusinessFeatureGreetingMessage) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureGreetingMessage#6aa87474 to nil") + } + if err := buf.ConsumeID(BusinessFeatureGreetingMessageTypeID); err != nil { + return fmt.Errorf("unable to decode businessFeatureGreetingMessage#6aa87474: %w", err) + } + return b.DecodeBare(buf) +} + +// DecodeBare implements bin.BareDecoder. +func (b *BusinessFeatureGreetingMessage) DecodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureGreetingMessage#6aa87474 to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (b *BusinessFeatureGreetingMessage) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureGreetingMessage#6aa87474 as nil") + } + buf.ObjStart() + buf.PutID("businessFeatureGreetingMessage") + buf.Comma() + buf.StripComma() + buf.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (b *BusinessFeatureGreetingMessage) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureGreetingMessage#6aa87474 to nil") + } + + return buf.Obj(func(buf tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := buf.ConsumeID("businessFeatureGreetingMessage"); err != nil { + return fmt.Errorf("unable to decode businessFeatureGreetingMessage#6aa87474: %w", err) + } + default: + return buf.Skip() + } + return nil + }) +} + +// BusinessFeatureAwayMessage represents TL type `businessFeatureAwayMessage#40f9e8dd`. +type BusinessFeatureAwayMessage struct { +} + +// BusinessFeatureAwayMessageTypeID is TL type id of BusinessFeatureAwayMessage. +const BusinessFeatureAwayMessageTypeID = 0x40f9e8dd + +// construct implements constructor of BusinessFeatureClass. +func (b BusinessFeatureAwayMessage) construct() BusinessFeatureClass { return &b } + +// Ensuring interfaces in compile-time for BusinessFeatureAwayMessage. +var ( + _ bin.Encoder = &BusinessFeatureAwayMessage{} + _ bin.Decoder = &BusinessFeatureAwayMessage{} + _ bin.BareEncoder = &BusinessFeatureAwayMessage{} + _ bin.BareDecoder = &BusinessFeatureAwayMessage{} + + _ BusinessFeatureClass = &BusinessFeatureAwayMessage{} +) + +func (b *BusinessFeatureAwayMessage) Zero() bool { + if b == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (b *BusinessFeatureAwayMessage) String() string { + if b == nil { + return "BusinessFeatureAwayMessage(nil)" + } + type Alias BusinessFeatureAwayMessage + return fmt.Sprintf("BusinessFeatureAwayMessage%+v", Alias(*b)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*BusinessFeatureAwayMessage) TypeID() uint32 { + return BusinessFeatureAwayMessageTypeID +} + +// TypeName returns name of type in TL schema. +func (*BusinessFeatureAwayMessage) TypeName() string { + return "businessFeatureAwayMessage" +} + +// TypeInfo returns info about TL type. +func (b *BusinessFeatureAwayMessage) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "businessFeatureAwayMessage", + ID: BusinessFeatureAwayMessageTypeID, + } + if b == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (b *BusinessFeatureAwayMessage) Encode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureAwayMessage#40f9e8dd as nil") + } + buf.PutID(BusinessFeatureAwayMessageTypeID) + return b.EncodeBare(buf) +} + +// EncodeBare implements bin.BareEncoder. +func (b *BusinessFeatureAwayMessage) EncodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureAwayMessage#40f9e8dd as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (b *BusinessFeatureAwayMessage) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureAwayMessage#40f9e8dd to nil") + } + if err := buf.ConsumeID(BusinessFeatureAwayMessageTypeID); err != nil { + return fmt.Errorf("unable to decode businessFeatureAwayMessage#40f9e8dd: %w", err) + } + return b.DecodeBare(buf) +} + +// DecodeBare implements bin.BareDecoder. +func (b *BusinessFeatureAwayMessage) DecodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureAwayMessage#40f9e8dd to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (b *BusinessFeatureAwayMessage) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureAwayMessage#40f9e8dd as nil") + } + buf.ObjStart() + buf.PutID("businessFeatureAwayMessage") + buf.Comma() + buf.StripComma() + buf.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (b *BusinessFeatureAwayMessage) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureAwayMessage#40f9e8dd to nil") + } + + return buf.Obj(func(buf tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := buf.ConsumeID("businessFeatureAwayMessage"); err != nil { + return fmt.Errorf("unable to decode businessFeatureAwayMessage#40f9e8dd: %w", err) + } + default: + return buf.Skip() + } + return nil + }) +} + +// BusinessFeatureAccountLinks represents TL type `businessFeatureAccountLinks#6ffa970e`. +type BusinessFeatureAccountLinks struct { +} + +// BusinessFeatureAccountLinksTypeID is TL type id of BusinessFeatureAccountLinks. +const BusinessFeatureAccountLinksTypeID = 0x6ffa970e + +// construct implements constructor of BusinessFeatureClass. +func (b BusinessFeatureAccountLinks) construct() BusinessFeatureClass { return &b } + +// Ensuring interfaces in compile-time for BusinessFeatureAccountLinks. +var ( + _ bin.Encoder = &BusinessFeatureAccountLinks{} + _ bin.Decoder = &BusinessFeatureAccountLinks{} + _ bin.BareEncoder = &BusinessFeatureAccountLinks{} + _ bin.BareDecoder = &BusinessFeatureAccountLinks{} + + _ BusinessFeatureClass = &BusinessFeatureAccountLinks{} +) + +func (b *BusinessFeatureAccountLinks) Zero() bool { + if b == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (b *BusinessFeatureAccountLinks) String() string { + if b == nil { + return "BusinessFeatureAccountLinks(nil)" + } + type Alias BusinessFeatureAccountLinks + return fmt.Sprintf("BusinessFeatureAccountLinks%+v", Alias(*b)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*BusinessFeatureAccountLinks) TypeID() uint32 { + return BusinessFeatureAccountLinksTypeID +} + +// TypeName returns name of type in TL schema. +func (*BusinessFeatureAccountLinks) TypeName() string { + return "businessFeatureAccountLinks" +} + +// TypeInfo returns info about TL type. +func (b *BusinessFeatureAccountLinks) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "businessFeatureAccountLinks", + ID: BusinessFeatureAccountLinksTypeID, + } + if b == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (b *BusinessFeatureAccountLinks) Encode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureAccountLinks#6ffa970e as nil") + } + buf.PutID(BusinessFeatureAccountLinksTypeID) + return b.EncodeBare(buf) +} + +// EncodeBare implements bin.BareEncoder. +func (b *BusinessFeatureAccountLinks) EncodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureAccountLinks#6ffa970e as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (b *BusinessFeatureAccountLinks) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureAccountLinks#6ffa970e to nil") + } + if err := buf.ConsumeID(BusinessFeatureAccountLinksTypeID); err != nil { + return fmt.Errorf("unable to decode businessFeatureAccountLinks#6ffa970e: %w", err) + } + return b.DecodeBare(buf) +} + +// DecodeBare implements bin.BareDecoder. +func (b *BusinessFeatureAccountLinks) DecodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureAccountLinks#6ffa970e to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (b *BusinessFeatureAccountLinks) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureAccountLinks#6ffa970e as nil") + } + buf.ObjStart() + buf.PutID("businessFeatureAccountLinks") + buf.Comma() + buf.StripComma() + buf.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (b *BusinessFeatureAccountLinks) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureAccountLinks#6ffa970e to nil") + } + + return buf.Obj(func(buf tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := buf.ConsumeID("businessFeatureAccountLinks"); err != nil { + return fmt.Errorf("unable to decode businessFeatureAccountLinks#6ffa970e: %w", err) + } + default: + return buf.Skip() + } + return nil + }) +} + +// BusinessFeatureIntro represents TL type `businessFeatureIntro#b7843cb4`. +type BusinessFeatureIntro struct { +} + +// BusinessFeatureIntroTypeID is TL type id of BusinessFeatureIntro. +const BusinessFeatureIntroTypeID = 0xb7843cb4 + +// construct implements constructor of BusinessFeatureClass. +func (b BusinessFeatureIntro) construct() BusinessFeatureClass { return &b } + +// Ensuring interfaces in compile-time for BusinessFeatureIntro. +var ( + _ bin.Encoder = &BusinessFeatureIntro{} + _ bin.Decoder = &BusinessFeatureIntro{} + _ bin.BareEncoder = &BusinessFeatureIntro{} + _ bin.BareDecoder = &BusinessFeatureIntro{} + + _ BusinessFeatureClass = &BusinessFeatureIntro{} +) + +func (b *BusinessFeatureIntro) Zero() bool { + if b == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (b *BusinessFeatureIntro) String() string { + if b == nil { + return "BusinessFeatureIntro(nil)" + } + type Alias BusinessFeatureIntro + return fmt.Sprintf("BusinessFeatureIntro%+v", Alias(*b)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*BusinessFeatureIntro) TypeID() uint32 { + return BusinessFeatureIntroTypeID +} + +// TypeName returns name of type in TL schema. +func (*BusinessFeatureIntro) TypeName() string { + return "businessFeatureIntro" +} + +// TypeInfo returns info about TL type. +func (b *BusinessFeatureIntro) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "businessFeatureIntro", + ID: BusinessFeatureIntroTypeID, + } + if b == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (b *BusinessFeatureIntro) Encode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureIntro#b7843cb4 as nil") + } + buf.PutID(BusinessFeatureIntroTypeID) + return b.EncodeBare(buf) +} + +// EncodeBare implements bin.BareEncoder. +func (b *BusinessFeatureIntro) EncodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureIntro#b7843cb4 as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (b *BusinessFeatureIntro) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureIntro#b7843cb4 to nil") + } + if err := buf.ConsumeID(BusinessFeatureIntroTypeID); err != nil { + return fmt.Errorf("unable to decode businessFeatureIntro#b7843cb4: %w", err) + } + return b.DecodeBare(buf) +} + +// DecodeBare implements bin.BareDecoder. +func (b *BusinessFeatureIntro) DecodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureIntro#b7843cb4 to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (b *BusinessFeatureIntro) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureIntro#b7843cb4 as nil") + } + buf.ObjStart() + buf.PutID("businessFeatureIntro") + buf.Comma() + buf.StripComma() + buf.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (b *BusinessFeatureIntro) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureIntro#b7843cb4 to nil") + } + + return buf.Obj(func(buf tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := buf.ConsumeID("businessFeatureIntro"); err != nil { + return fmt.Errorf("unable to decode businessFeatureIntro#b7843cb4: %w", err) + } + default: + return buf.Skip() + } + return nil + }) +} + +// BusinessFeatureBots represents TL type `businessFeatureBots#106575e5`. +type BusinessFeatureBots struct { +} + +// BusinessFeatureBotsTypeID is TL type id of BusinessFeatureBots. +const BusinessFeatureBotsTypeID = 0x106575e5 + +// construct implements constructor of BusinessFeatureClass. +func (b BusinessFeatureBots) construct() BusinessFeatureClass { return &b } + +// Ensuring interfaces in compile-time for BusinessFeatureBots. +var ( + _ bin.Encoder = &BusinessFeatureBots{} + _ bin.Decoder = &BusinessFeatureBots{} + _ bin.BareEncoder = &BusinessFeatureBots{} + _ bin.BareDecoder = &BusinessFeatureBots{} + + _ BusinessFeatureClass = &BusinessFeatureBots{} +) + +func (b *BusinessFeatureBots) Zero() bool { + if b == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (b *BusinessFeatureBots) String() string { + if b == nil { + return "BusinessFeatureBots(nil)" + } + type Alias BusinessFeatureBots + return fmt.Sprintf("BusinessFeatureBots%+v", Alias(*b)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*BusinessFeatureBots) TypeID() uint32 { + return BusinessFeatureBotsTypeID +} + +// TypeName returns name of type in TL schema. +func (*BusinessFeatureBots) TypeName() string { + return "businessFeatureBots" +} + +// TypeInfo returns info about TL type. +func (b *BusinessFeatureBots) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "businessFeatureBots", + ID: BusinessFeatureBotsTypeID, + } + if b == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (b *BusinessFeatureBots) Encode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureBots#106575e5 as nil") + } + buf.PutID(BusinessFeatureBotsTypeID) + return b.EncodeBare(buf) +} + +// EncodeBare implements bin.BareEncoder. +func (b *BusinessFeatureBots) EncodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureBots#106575e5 as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (b *BusinessFeatureBots) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureBots#106575e5 to nil") + } + if err := buf.ConsumeID(BusinessFeatureBotsTypeID); err != nil { + return fmt.Errorf("unable to decode businessFeatureBots#106575e5: %w", err) + } + return b.DecodeBare(buf) +} + +// DecodeBare implements bin.BareDecoder. +func (b *BusinessFeatureBots) DecodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureBots#106575e5 to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (b *BusinessFeatureBots) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureBots#106575e5 as nil") + } + buf.ObjStart() + buf.PutID("businessFeatureBots") + buf.Comma() + buf.StripComma() + buf.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (b *BusinessFeatureBots) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureBots#106575e5 to nil") + } + + return buf.Obj(func(buf tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := buf.ConsumeID("businessFeatureBots"); err != nil { + return fmt.Errorf("unable to decode businessFeatureBots#106575e5: %w", err) + } + default: + return buf.Skip() + } + return nil + }) +} + +// BusinessFeatureEmojiStatus represents TL type `businessFeatureEmojiStatus#cd8ec0e5`. +type BusinessFeatureEmojiStatus struct { +} + +// BusinessFeatureEmojiStatusTypeID is TL type id of BusinessFeatureEmojiStatus. +const BusinessFeatureEmojiStatusTypeID = 0xcd8ec0e5 + +// construct implements constructor of BusinessFeatureClass. +func (b BusinessFeatureEmojiStatus) construct() BusinessFeatureClass { return &b } + +// Ensuring interfaces in compile-time for BusinessFeatureEmojiStatus. +var ( + _ bin.Encoder = &BusinessFeatureEmojiStatus{} + _ bin.Decoder = &BusinessFeatureEmojiStatus{} + _ bin.BareEncoder = &BusinessFeatureEmojiStatus{} + _ bin.BareDecoder = &BusinessFeatureEmojiStatus{} + + _ BusinessFeatureClass = &BusinessFeatureEmojiStatus{} +) + +func (b *BusinessFeatureEmojiStatus) Zero() bool { + if b == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (b *BusinessFeatureEmojiStatus) String() string { + if b == nil { + return "BusinessFeatureEmojiStatus(nil)" + } + type Alias BusinessFeatureEmojiStatus + return fmt.Sprintf("BusinessFeatureEmojiStatus%+v", Alias(*b)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*BusinessFeatureEmojiStatus) TypeID() uint32 { + return BusinessFeatureEmojiStatusTypeID +} + +// TypeName returns name of type in TL schema. +func (*BusinessFeatureEmojiStatus) TypeName() string { + return "businessFeatureEmojiStatus" +} + +// TypeInfo returns info about TL type. +func (b *BusinessFeatureEmojiStatus) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "businessFeatureEmojiStatus", + ID: BusinessFeatureEmojiStatusTypeID, + } + if b == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (b *BusinessFeatureEmojiStatus) Encode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureEmojiStatus#cd8ec0e5 as nil") + } + buf.PutID(BusinessFeatureEmojiStatusTypeID) + return b.EncodeBare(buf) +} + +// EncodeBare implements bin.BareEncoder. +func (b *BusinessFeatureEmojiStatus) EncodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureEmojiStatus#cd8ec0e5 as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (b *BusinessFeatureEmojiStatus) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureEmojiStatus#cd8ec0e5 to nil") + } + if err := buf.ConsumeID(BusinessFeatureEmojiStatusTypeID); err != nil { + return fmt.Errorf("unable to decode businessFeatureEmojiStatus#cd8ec0e5: %w", err) + } + return b.DecodeBare(buf) +} + +// DecodeBare implements bin.BareDecoder. +func (b *BusinessFeatureEmojiStatus) DecodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureEmojiStatus#cd8ec0e5 to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (b *BusinessFeatureEmojiStatus) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureEmojiStatus#cd8ec0e5 as nil") + } + buf.ObjStart() + buf.PutID("businessFeatureEmojiStatus") + buf.Comma() + buf.StripComma() + buf.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (b *BusinessFeatureEmojiStatus) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureEmojiStatus#cd8ec0e5 to nil") + } + + return buf.Obj(func(buf tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := buf.ConsumeID("businessFeatureEmojiStatus"); err != nil { + return fmt.Errorf("unable to decode businessFeatureEmojiStatus#cd8ec0e5: %w", err) + } + default: + return buf.Skip() + } + return nil + }) +} + +// BusinessFeatureChatFolderTags represents TL type `businessFeatureChatFolderTags#df95092a`. +type BusinessFeatureChatFolderTags struct { +} + +// BusinessFeatureChatFolderTagsTypeID is TL type id of BusinessFeatureChatFolderTags. +const BusinessFeatureChatFolderTagsTypeID = 0xdf95092a + +// construct implements constructor of BusinessFeatureClass. +func (b BusinessFeatureChatFolderTags) construct() BusinessFeatureClass { return &b } + +// Ensuring interfaces in compile-time for BusinessFeatureChatFolderTags. +var ( + _ bin.Encoder = &BusinessFeatureChatFolderTags{} + _ bin.Decoder = &BusinessFeatureChatFolderTags{} + _ bin.BareEncoder = &BusinessFeatureChatFolderTags{} + _ bin.BareDecoder = &BusinessFeatureChatFolderTags{} + + _ BusinessFeatureClass = &BusinessFeatureChatFolderTags{} +) + +func (b *BusinessFeatureChatFolderTags) Zero() bool { + if b == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (b *BusinessFeatureChatFolderTags) String() string { + if b == nil { + return "BusinessFeatureChatFolderTags(nil)" + } + type Alias BusinessFeatureChatFolderTags + return fmt.Sprintf("BusinessFeatureChatFolderTags%+v", Alias(*b)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*BusinessFeatureChatFolderTags) TypeID() uint32 { + return BusinessFeatureChatFolderTagsTypeID +} + +// TypeName returns name of type in TL schema. +func (*BusinessFeatureChatFolderTags) TypeName() string { + return "businessFeatureChatFolderTags" +} + +// TypeInfo returns info about TL type. +func (b *BusinessFeatureChatFolderTags) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "businessFeatureChatFolderTags", + ID: BusinessFeatureChatFolderTagsTypeID, + } + if b == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (b *BusinessFeatureChatFolderTags) Encode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureChatFolderTags#df95092a as nil") + } + buf.PutID(BusinessFeatureChatFolderTagsTypeID) + return b.EncodeBare(buf) +} + +// EncodeBare implements bin.BareEncoder. +func (b *BusinessFeatureChatFolderTags) EncodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureChatFolderTags#df95092a as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (b *BusinessFeatureChatFolderTags) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureChatFolderTags#df95092a to nil") + } + if err := buf.ConsumeID(BusinessFeatureChatFolderTagsTypeID); err != nil { + return fmt.Errorf("unable to decode businessFeatureChatFolderTags#df95092a: %w", err) + } + return b.DecodeBare(buf) +} + +// DecodeBare implements bin.BareDecoder. +func (b *BusinessFeatureChatFolderTags) DecodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureChatFolderTags#df95092a to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (b *BusinessFeatureChatFolderTags) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureChatFolderTags#df95092a as nil") + } + buf.ObjStart() + buf.PutID("businessFeatureChatFolderTags") + buf.Comma() + buf.StripComma() + buf.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (b *BusinessFeatureChatFolderTags) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureChatFolderTags#df95092a to nil") + } + + return buf.Obj(func(buf tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := buf.ConsumeID("businessFeatureChatFolderTags"); err != nil { + return fmt.Errorf("unable to decode businessFeatureChatFolderTags#df95092a: %w", err) + } + default: + return buf.Skip() + } + return nil + }) +} + +// BusinessFeatureUpgradedStories represents TL type `businessFeatureUpgradedStories#93fb53d2`. +type BusinessFeatureUpgradedStories struct { +} + +// BusinessFeatureUpgradedStoriesTypeID is TL type id of BusinessFeatureUpgradedStories. +const BusinessFeatureUpgradedStoriesTypeID = 0x93fb53d2 + +// construct implements constructor of BusinessFeatureClass. +func (b BusinessFeatureUpgradedStories) construct() BusinessFeatureClass { return &b } + +// Ensuring interfaces in compile-time for BusinessFeatureUpgradedStories. +var ( + _ bin.Encoder = &BusinessFeatureUpgradedStories{} + _ bin.Decoder = &BusinessFeatureUpgradedStories{} + _ bin.BareEncoder = &BusinessFeatureUpgradedStories{} + _ bin.BareDecoder = &BusinessFeatureUpgradedStories{} + + _ BusinessFeatureClass = &BusinessFeatureUpgradedStories{} +) + +func (b *BusinessFeatureUpgradedStories) Zero() bool { + if b == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (b *BusinessFeatureUpgradedStories) String() string { + if b == nil { + return "BusinessFeatureUpgradedStories(nil)" + } + type Alias BusinessFeatureUpgradedStories + return fmt.Sprintf("BusinessFeatureUpgradedStories%+v", Alias(*b)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*BusinessFeatureUpgradedStories) TypeID() uint32 { + return BusinessFeatureUpgradedStoriesTypeID +} + +// TypeName returns name of type in TL schema. +func (*BusinessFeatureUpgradedStories) TypeName() string { + return "businessFeatureUpgradedStories" +} + +// TypeInfo returns info about TL type. +func (b *BusinessFeatureUpgradedStories) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "businessFeatureUpgradedStories", + ID: BusinessFeatureUpgradedStoriesTypeID, + } + if b == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (b *BusinessFeatureUpgradedStories) Encode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureUpgradedStories#93fb53d2 as nil") + } + buf.PutID(BusinessFeatureUpgradedStoriesTypeID) + return b.EncodeBare(buf) +} + +// EncodeBare implements bin.BareEncoder. +func (b *BusinessFeatureUpgradedStories) EncodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureUpgradedStories#93fb53d2 as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (b *BusinessFeatureUpgradedStories) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureUpgradedStories#93fb53d2 to nil") + } + if err := buf.ConsumeID(BusinessFeatureUpgradedStoriesTypeID); err != nil { + return fmt.Errorf("unable to decode businessFeatureUpgradedStories#93fb53d2: %w", err) + } + return b.DecodeBare(buf) +} + +// DecodeBare implements bin.BareDecoder. +func (b *BusinessFeatureUpgradedStories) DecodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureUpgradedStories#93fb53d2 to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (b *BusinessFeatureUpgradedStories) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatureUpgradedStories#93fb53d2 as nil") + } + buf.ObjStart() + buf.PutID("businessFeatureUpgradedStories") + buf.Comma() + buf.StripComma() + buf.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (b *BusinessFeatureUpgradedStories) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatureUpgradedStories#93fb53d2 to nil") + } + + return buf.Obj(func(buf tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := buf.ConsumeID("businessFeatureUpgradedStories"); err != nil { + return fmt.Errorf("unable to decode businessFeatureUpgradedStories#93fb53d2: %w", err) + } + default: + return buf.Skip() + } + return nil + }) +} + +// BusinessFeatureClassName is schema name of BusinessFeatureClass. +const BusinessFeatureClassName = "BusinessFeature" + +// BusinessFeatureClass represents BusinessFeature generic type. +// +// Example: +// +// g, err := tdapi.DecodeBusinessFeature(buf) +// if err != nil { +// panic(err) +// } +// switch v := g.(type) { +// case *tdapi.BusinessFeatureLocation: // businessFeatureLocation#c090027c +// case *tdapi.BusinessFeatureOpeningHours: // businessFeatureOpeningHours#1b7b22ed +// case *tdapi.BusinessFeatureQuickReplies: // businessFeatureQuickReplies#9c380a82 +// case *tdapi.BusinessFeatureGreetingMessage: // businessFeatureGreetingMessage#6aa87474 +// case *tdapi.BusinessFeatureAwayMessage: // businessFeatureAwayMessage#40f9e8dd +// case *tdapi.BusinessFeatureAccountLinks: // businessFeatureAccountLinks#6ffa970e +// case *tdapi.BusinessFeatureIntro: // businessFeatureIntro#b7843cb4 +// case *tdapi.BusinessFeatureBots: // businessFeatureBots#106575e5 +// case *tdapi.BusinessFeatureEmojiStatus: // businessFeatureEmojiStatus#cd8ec0e5 +// case *tdapi.BusinessFeatureChatFolderTags: // businessFeatureChatFolderTags#df95092a +// case *tdapi.BusinessFeatureUpgradedStories: // businessFeatureUpgradedStories#93fb53d2 +// default: panic(v) +// } +type BusinessFeatureClass interface { + bin.Encoder + bin.Decoder + bin.BareEncoder + bin.BareDecoder + construct() BusinessFeatureClass + + // TypeID returns type id in TL schema. + // + // See https://core.telegram.org/mtproto/TL-tl#remarks. + TypeID() uint32 + // TypeName returns name of type in TL schema. + TypeName() string + // String implements fmt.Stringer. + String() string + // Zero returns true if current object has a zero value. + Zero() bool + + EncodeTDLibJSON(b tdjson.Encoder) error + DecodeTDLibJSON(b tdjson.Decoder) error +} + +// DecodeBusinessFeature implements binary de-serialization for BusinessFeatureClass. +func DecodeBusinessFeature(buf *bin.Buffer) (BusinessFeatureClass, error) { + id, err := buf.PeekID() + if err != nil { + return nil, err + } + switch id { + case BusinessFeatureLocationTypeID: + // Decoding businessFeatureLocation#c090027c. + v := BusinessFeatureLocation{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + case BusinessFeatureOpeningHoursTypeID: + // Decoding businessFeatureOpeningHours#1b7b22ed. + v := BusinessFeatureOpeningHours{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + case BusinessFeatureQuickRepliesTypeID: + // Decoding businessFeatureQuickReplies#9c380a82. + v := BusinessFeatureQuickReplies{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + case BusinessFeatureGreetingMessageTypeID: + // Decoding businessFeatureGreetingMessage#6aa87474. + v := BusinessFeatureGreetingMessage{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + case BusinessFeatureAwayMessageTypeID: + // Decoding businessFeatureAwayMessage#40f9e8dd. + v := BusinessFeatureAwayMessage{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + case BusinessFeatureAccountLinksTypeID: + // Decoding businessFeatureAccountLinks#6ffa970e. + v := BusinessFeatureAccountLinks{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + case BusinessFeatureIntroTypeID: + // Decoding businessFeatureIntro#b7843cb4. + v := BusinessFeatureIntro{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + case BusinessFeatureBotsTypeID: + // Decoding businessFeatureBots#106575e5. + v := BusinessFeatureBots{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + case BusinessFeatureEmojiStatusTypeID: + // Decoding businessFeatureEmojiStatus#cd8ec0e5. + v := BusinessFeatureEmojiStatus{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + case BusinessFeatureChatFolderTagsTypeID: + // Decoding businessFeatureChatFolderTags#df95092a. + v := BusinessFeatureChatFolderTags{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + case BusinessFeatureUpgradedStoriesTypeID: + // Decoding businessFeatureUpgradedStories#93fb53d2. + v := BusinessFeatureUpgradedStories{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + default: + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", bin.NewUnexpectedID(id)) + } +} + +// DecodeTDLibJSONBusinessFeature implements binary de-serialization for BusinessFeatureClass. +func DecodeTDLibJSONBusinessFeature(buf tdjson.Decoder) (BusinessFeatureClass, error) { + id, err := buf.FindTypeID() + if err != nil { + return nil, err + } + switch id { + case "businessFeatureLocation": + // Decoding businessFeatureLocation#c090027c. + v := BusinessFeatureLocation{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + case "businessFeatureOpeningHours": + // Decoding businessFeatureOpeningHours#1b7b22ed. + v := BusinessFeatureOpeningHours{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + case "businessFeatureQuickReplies": + // Decoding businessFeatureQuickReplies#9c380a82. + v := BusinessFeatureQuickReplies{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + case "businessFeatureGreetingMessage": + // Decoding businessFeatureGreetingMessage#6aa87474. + v := BusinessFeatureGreetingMessage{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + case "businessFeatureAwayMessage": + // Decoding businessFeatureAwayMessage#40f9e8dd. + v := BusinessFeatureAwayMessage{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + case "businessFeatureAccountLinks": + // Decoding businessFeatureAccountLinks#6ffa970e. + v := BusinessFeatureAccountLinks{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + case "businessFeatureIntro": + // Decoding businessFeatureIntro#b7843cb4. + v := BusinessFeatureIntro{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + case "businessFeatureBots": + // Decoding businessFeatureBots#106575e5. + v := BusinessFeatureBots{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + case "businessFeatureEmojiStatus": + // Decoding businessFeatureEmojiStatus#cd8ec0e5. + v := BusinessFeatureEmojiStatus{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + case "businessFeatureChatFolderTags": + // Decoding businessFeatureChatFolderTags#df95092a. + v := BusinessFeatureChatFolderTags{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + case "businessFeatureUpgradedStories": + // Decoding businessFeatureUpgradedStories#93fb53d2. + v := BusinessFeatureUpgradedStories{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", err) + } + return &v, nil + default: + return nil, fmt.Errorf("unable to decode BusinessFeatureClass: %w", tdjson.NewUnexpectedID(id)) + } +} + +// BusinessFeature boxes the BusinessFeatureClass providing a helper. +type BusinessFeatureBox struct { + BusinessFeature BusinessFeatureClass +} + +// Decode implements bin.Decoder for BusinessFeatureBox. +func (b *BusinessFeatureBox) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("unable to decode BusinessFeatureBox to nil") + } + v, err := DecodeBusinessFeature(buf) + if err != nil { + return fmt.Errorf("unable to decode boxed value: %w", err) + } + b.BusinessFeature = v + return nil +} + +// Encode implements bin.Encode for BusinessFeatureBox. +func (b *BusinessFeatureBox) Encode(buf *bin.Buffer) error { + if b == nil || b.BusinessFeature == nil { + return fmt.Errorf("unable to encode BusinessFeatureClass as nil") + } + return b.BusinessFeature.Encode(buf) +} + +// DecodeTDLibJSON implements bin.Decoder for BusinessFeatureBox. +func (b *BusinessFeatureBox) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("unable to decode BusinessFeatureBox to nil") + } + v, err := DecodeTDLibJSONBusinessFeature(buf) + if err != nil { + return fmt.Errorf("unable to decode boxed value: %w", err) + } + b.BusinessFeature = v + return nil +} + +// EncodeTDLibJSON implements bin.Encode for BusinessFeatureBox. +func (b *BusinessFeatureBox) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil || b.BusinessFeature == nil { + return fmt.Errorf("unable to encode BusinessFeatureClass as nil") + } + return b.BusinessFeature.EncodeTDLibJSON(buf) +} diff --git a/tdapi/tl_business_feature_promotion_animation_gen.go b/tdapi/tl_business_feature_promotion_animation_gen.go new file mode 100644 index 0000000000..30948c5542 --- /dev/null +++ b/tdapi/tl_business_feature_promotion_animation_gen.go @@ -0,0 +1,237 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// BusinessFeaturePromotionAnimation represents TL type `businessFeaturePromotionAnimation#7a05680a`. +type BusinessFeaturePromotionAnimation struct { + // Business feature + Feature BusinessFeatureClass + // Promotion animation for the feature + Animation Animation +} + +// BusinessFeaturePromotionAnimationTypeID is TL type id of BusinessFeaturePromotionAnimation. +const BusinessFeaturePromotionAnimationTypeID = 0x7a05680a + +// Ensuring interfaces in compile-time for BusinessFeaturePromotionAnimation. +var ( + _ bin.Encoder = &BusinessFeaturePromotionAnimation{} + _ bin.Decoder = &BusinessFeaturePromotionAnimation{} + _ bin.BareEncoder = &BusinessFeaturePromotionAnimation{} + _ bin.BareDecoder = &BusinessFeaturePromotionAnimation{} +) + +func (b *BusinessFeaturePromotionAnimation) Zero() bool { + if b == nil { + return true + } + if !(b.Feature == nil) { + return false + } + if !(b.Animation.Zero()) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (b *BusinessFeaturePromotionAnimation) String() string { + if b == nil { + return "BusinessFeaturePromotionAnimation(nil)" + } + type Alias BusinessFeaturePromotionAnimation + return fmt.Sprintf("BusinessFeaturePromotionAnimation%+v", Alias(*b)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*BusinessFeaturePromotionAnimation) TypeID() uint32 { + return BusinessFeaturePromotionAnimationTypeID +} + +// TypeName returns name of type in TL schema. +func (*BusinessFeaturePromotionAnimation) TypeName() string { + return "businessFeaturePromotionAnimation" +} + +// TypeInfo returns info about TL type. +func (b *BusinessFeaturePromotionAnimation) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "businessFeaturePromotionAnimation", + ID: BusinessFeaturePromotionAnimationTypeID, + } + if b == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Feature", + SchemaName: "feature", + }, + { + Name: "Animation", + SchemaName: "animation", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (b *BusinessFeaturePromotionAnimation) Encode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeaturePromotionAnimation#7a05680a as nil") + } + buf.PutID(BusinessFeaturePromotionAnimationTypeID) + return b.EncodeBare(buf) +} + +// EncodeBare implements bin.BareEncoder. +func (b *BusinessFeaturePromotionAnimation) EncodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeaturePromotionAnimation#7a05680a as nil") + } + if b.Feature == nil { + return fmt.Errorf("unable to encode businessFeaturePromotionAnimation#7a05680a: field feature is nil") + } + if err := b.Feature.Encode(buf); err != nil { + return fmt.Errorf("unable to encode businessFeaturePromotionAnimation#7a05680a: field feature: %w", err) + } + if err := b.Animation.Encode(buf); err != nil { + return fmt.Errorf("unable to encode businessFeaturePromotionAnimation#7a05680a: field animation: %w", err) + } + return nil +} + +// Decode implements bin.Decoder. +func (b *BusinessFeaturePromotionAnimation) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeaturePromotionAnimation#7a05680a to nil") + } + if err := buf.ConsumeID(BusinessFeaturePromotionAnimationTypeID); err != nil { + return fmt.Errorf("unable to decode businessFeaturePromotionAnimation#7a05680a: %w", err) + } + return b.DecodeBare(buf) +} + +// DecodeBare implements bin.BareDecoder. +func (b *BusinessFeaturePromotionAnimation) DecodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeaturePromotionAnimation#7a05680a to nil") + } + { + value, err := DecodeBusinessFeature(buf) + if err != nil { + return fmt.Errorf("unable to decode businessFeaturePromotionAnimation#7a05680a: field feature: %w", err) + } + b.Feature = value + } + { + if err := b.Animation.Decode(buf); err != nil { + return fmt.Errorf("unable to decode businessFeaturePromotionAnimation#7a05680a: field animation: %w", err) + } + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (b *BusinessFeaturePromotionAnimation) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil { + return fmt.Errorf("can't encode businessFeaturePromotionAnimation#7a05680a as nil") + } + buf.ObjStart() + buf.PutID("businessFeaturePromotionAnimation") + buf.Comma() + buf.FieldStart("feature") + if b.Feature == nil { + return fmt.Errorf("unable to encode businessFeaturePromotionAnimation#7a05680a: field feature is nil") + } + if err := b.Feature.EncodeTDLibJSON(buf); err != nil { + return fmt.Errorf("unable to encode businessFeaturePromotionAnimation#7a05680a: field feature: %w", err) + } + buf.Comma() + buf.FieldStart("animation") + if err := b.Animation.EncodeTDLibJSON(buf); err != nil { + return fmt.Errorf("unable to encode businessFeaturePromotionAnimation#7a05680a: field animation: %w", err) + } + buf.Comma() + buf.StripComma() + buf.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (b *BusinessFeaturePromotionAnimation) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("can't decode businessFeaturePromotionAnimation#7a05680a to nil") + } + + return buf.Obj(func(buf tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := buf.ConsumeID("businessFeaturePromotionAnimation"); err != nil { + return fmt.Errorf("unable to decode businessFeaturePromotionAnimation#7a05680a: %w", err) + } + case "feature": + value, err := DecodeTDLibJSONBusinessFeature(buf) + if err != nil { + return fmt.Errorf("unable to decode businessFeaturePromotionAnimation#7a05680a: field feature: %w", err) + } + b.Feature = value + case "animation": + if err := b.Animation.DecodeTDLibJSON(buf); err != nil { + return fmt.Errorf("unable to decode businessFeaturePromotionAnimation#7a05680a: field animation: %w", err) + } + default: + return buf.Skip() + } + return nil + }) +} + +// GetFeature returns value of Feature field. +func (b *BusinessFeaturePromotionAnimation) GetFeature() (value BusinessFeatureClass) { + if b == nil { + return + } + return b.Feature +} + +// GetAnimation returns value of Animation field. +func (b *BusinessFeaturePromotionAnimation) GetAnimation() (value Animation) { + if b == nil { + return + } + return b.Animation +} diff --git a/tdapi/tl_business_features_gen.go b/tdapi/tl_business_features_gen.go new file mode 100644 index 0000000000..9c8483b3cb --- /dev/null +++ b/tdapi/tl_business_features_gen.go @@ -0,0 +1,227 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// BusinessFeatures represents TL type `businessFeatures#e1593e48`. +type BusinessFeatures struct { + // The list of available business features + Features []BusinessFeatureClass +} + +// BusinessFeaturesTypeID is TL type id of BusinessFeatures. +const BusinessFeaturesTypeID = 0xe1593e48 + +// Ensuring interfaces in compile-time for BusinessFeatures. +var ( + _ bin.Encoder = &BusinessFeatures{} + _ bin.Decoder = &BusinessFeatures{} + _ bin.BareEncoder = &BusinessFeatures{} + _ bin.BareDecoder = &BusinessFeatures{} +) + +func (b *BusinessFeatures) Zero() bool { + if b == nil { + return true + } + if !(b.Features == nil) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (b *BusinessFeatures) String() string { + if b == nil { + return "BusinessFeatures(nil)" + } + type Alias BusinessFeatures + return fmt.Sprintf("BusinessFeatures%+v", Alias(*b)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*BusinessFeatures) TypeID() uint32 { + return BusinessFeaturesTypeID +} + +// TypeName returns name of type in TL schema. +func (*BusinessFeatures) TypeName() string { + return "businessFeatures" +} + +// TypeInfo returns info about TL type. +func (b *BusinessFeatures) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "businessFeatures", + ID: BusinessFeaturesTypeID, + } + if b == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Features", + SchemaName: "features", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (b *BusinessFeatures) Encode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatures#e1593e48 as nil") + } + buf.PutID(BusinessFeaturesTypeID) + return b.EncodeBare(buf) +} + +// EncodeBare implements bin.BareEncoder. +func (b *BusinessFeatures) EncodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatures#e1593e48 as nil") + } + buf.PutInt(len(b.Features)) + for idx, v := range b.Features { + if v == nil { + return fmt.Errorf("unable to encode businessFeatures#e1593e48: field features element with index %d is nil", idx) + } + if err := v.EncodeBare(buf); err != nil { + return fmt.Errorf("unable to encode bare businessFeatures#e1593e48: field features element with index %d: %w", idx, err) + } + } + return nil +} + +// Decode implements bin.Decoder. +func (b *BusinessFeatures) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatures#e1593e48 to nil") + } + if err := buf.ConsumeID(BusinessFeaturesTypeID); err != nil { + return fmt.Errorf("unable to decode businessFeatures#e1593e48: %w", err) + } + return b.DecodeBare(buf) +} + +// DecodeBare implements bin.BareDecoder. +func (b *BusinessFeatures) DecodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatures#e1593e48 to nil") + } + { + headerLen, err := buf.Int() + if err != nil { + return fmt.Errorf("unable to decode businessFeatures#e1593e48: field features: %w", err) + } + + if headerLen > 0 { + b.Features = make([]BusinessFeatureClass, 0, headerLen%bin.PreallocateLimit) + } + for idx := 0; idx < headerLen; idx++ { + value, err := DecodeBusinessFeature(buf) + if err != nil { + return fmt.Errorf("unable to decode businessFeatures#e1593e48: field features: %w", err) + } + b.Features = append(b.Features, value) + } + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (b *BusinessFeatures) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil { + return fmt.Errorf("can't encode businessFeatures#e1593e48 as nil") + } + buf.ObjStart() + buf.PutID("businessFeatures") + buf.Comma() + buf.FieldStart("features") + buf.ArrStart() + for idx, v := range b.Features { + if v == nil { + return fmt.Errorf("unable to encode businessFeatures#e1593e48: field features element with index %d is nil", idx) + } + if err := v.EncodeTDLibJSON(buf); err != nil { + return fmt.Errorf("unable to encode businessFeatures#e1593e48: field features element with index %d: %w", idx, err) + } + buf.Comma() + } + buf.StripComma() + buf.ArrEnd() + buf.Comma() + buf.StripComma() + buf.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (b *BusinessFeatures) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("can't decode businessFeatures#e1593e48 to nil") + } + + return buf.Obj(func(buf tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := buf.ConsumeID("businessFeatures"); err != nil { + return fmt.Errorf("unable to decode businessFeatures#e1593e48: %w", err) + } + case "features": + if err := buf.Arr(func(buf tdjson.Decoder) error { + value, err := DecodeTDLibJSONBusinessFeature(buf) + if err != nil { + return fmt.Errorf("unable to decode businessFeatures#e1593e48: field features: %w", err) + } + b.Features = append(b.Features, value) + return nil + }); err != nil { + return fmt.Errorf("unable to decode businessFeatures#e1593e48: field features: %w", err) + } + default: + return buf.Skip() + } + return nil + }) +} + +// GetFeatures returns value of Features field. +func (b *BusinessFeatures) GetFeatures() (value []BusinessFeatureClass) { + if b == nil { + return + } + return b.Features +} diff --git a/tdapi/tl_business_info_gen.go b/tdapi/tl_business_info_gen.go index b927cc1588..982a07fa66 100644 --- a/tdapi/tl_business_info_gen.go +++ b/tdapi/tl_business_info_gen.go @@ -31,7 +31,7 @@ var ( _ = tdjson.Encoder{} ) -// BusinessInfo represents TL type `businessInfo#773c5066`. +// BusinessInfo represents TL type `businessInfo#cc697499`. type BusinessInfo struct { // Location of the business; may be null if none Location BusinessLocation @@ -44,10 +44,12 @@ type BusinessInfo struct { // The away message; may be null if none or the Business account is not of the current // user AwayMessageSettings BusinessAwayMessageSettings + // Information about intro of the business; may be null if none + Intro BusinessIntro } // BusinessInfoTypeID is TL type id of BusinessInfo. -const BusinessInfoTypeID = 0x773c5066 +const BusinessInfoTypeID = 0xcc697499 // Ensuring interfaces in compile-time for BusinessInfo. var ( @@ -73,6 +75,9 @@ func (b *BusinessInfo) Zero() bool { if !(b.AwayMessageSettings.Zero()) { return false } + if !(b.Intro.Zero()) { + return false + } return true } @@ -125,6 +130,10 @@ func (b *BusinessInfo) TypeInfo() tdp.Type { Name: "AwayMessageSettings", SchemaName: "away_message_settings", }, + { + Name: "Intro", + SchemaName: "intro", + }, } return typ } @@ -132,7 +141,7 @@ func (b *BusinessInfo) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (b *BusinessInfo) Encode(buf *bin.Buffer) error { if b == nil { - return fmt.Errorf("can't encode businessInfo#773c5066 as nil") + return fmt.Errorf("can't encode businessInfo#cc697499 as nil") } buf.PutID(BusinessInfoTypeID) return b.EncodeBare(buf) @@ -141,19 +150,22 @@ func (b *BusinessInfo) Encode(buf *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (b *BusinessInfo) EncodeBare(buf *bin.Buffer) error { if b == nil { - return fmt.Errorf("can't encode businessInfo#773c5066 as nil") + return fmt.Errorf("can't encode businessInfo#cc697499 as nil") } if err := b.Location.Encode(buf); err != nil { - return fmt.Errorf("unable to encode businessInfo#773c5066: field location: %w", err) + return fmt.Errorf("unable to encode businessInfo#cc697499: field location: %w", err) } if err := b.OpeningHours.Encode(buf); err != nil { - return fmt.Errorf("unable to encode businessInfo#773c5066: field opening_hours: %w", err) + return fmt.Errorf("unable to encode businessInfo#cc697499: field opening_hours: %w", err) } if err := b.GreetingMessageSettings.Encode(buf); err != nil { - return fmt.Errorf("unable to encode businessInfo#773c5066: field greeting_message_settings: %w", err) + return fmt.Errorf("unable to encode businessInfo#cc697499: field greeting_message_settings: %w", err) } if err := b.AwayMessageSettings.Encode(buf); err != nil { - return fmt.Errorf("unable to encode businessInfo#773c5066: field away_message_settings: %w", err) + return fmt.Errorf("unable to encode businessInfo#cc697499: field away_message_settings: %w", err) + } + if err := b.Intro.Encode(buf); err != nil { + return fmt.Errorf("unable to encode businessInfo#cc697499: field intro: %w", err) } return nil } @@ -161,10 +173,10 @@ func (b *BusinessInfo) EncodeBare(buf *bin.Buffer) error { // Decode implements bin.Decoder. func (b *BusinessInfo) Decode(buf *bin.Buffer) error { if b == nil { - return fmt.Errorf("can't decode businessInfo#773c5066 to nil") + return fmt.Errorf("can't decode businessInfo#cc697499 to nil") } if err := buf.ConsumeID(BusinessInfoTypeID); err != nil { - return fmt.Errorf("unable to decode businessInfo#773c5066: %w", err) + return fmt.Errorf("unable to decode businessInfo#cc697499: %w", err) } return b.DecodeBare(buf) } @@ -172,26 +184,31 @@ func (b *BusinessInfo) Decode(buf *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (b *BusinessInfo) DecodeBare(buf *bin.Buffer) error { if b == nil { - return fmt.Errorf("can't decode businessInfo#773c5066 to nil") + return fmt.Errorf("can't decode businessInfo#cc697499 to nil") } { if err := b.Location.Decode(buf); err != nil { - return fmt.Errorf("unable to decode businessInfo#773c5066: field location: %w", err) + return fmt.Errorf("unable to decode businessInfo#cc697499: field location: %w", err) } } { if err := b.OpeningHours.Decode(buf); err != nil { - return fmt.Errorf("unable to decode businessInfo#773c5066: field opening_hours: %w", err) + return fmt.Errorf("unable to decode businessInfo#cc697499: field opening_hours: %w", err) } } { if err := b.GreetingMessageSettings.Decode(buf); err != nil { - return fmt.Errorf("unable to decode businessInfo#773c5066: field greeting_message_settings: %w", err) + return fmt.Errorf("unable to decode businessInfo#cc697499: field greeting_message_settings: %w", err) } } { if err := b.AwayMessageSettings.Decode(buf); err != nil { - return fmt.Errorf("unable to decode businessInfo#773c5066: field away_message_settings: %w", err) + return fmt.Errorf("unable to decode businessInfo#cc697499: field away_message_settings: %w", err) + } + } + { + if err := b.Intro.Decode(buf); err != nil { + return fmt.Errorf("unable to decode businessInfo#cc697499: field intro: %w", err) } } return nil @@ -200,29 +217,34 @@ func (b *BusinessInfo) DecodeBare(buf *bin.Buffer) error { // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (b *BusinessInfo) EncodeTDLibJSON(buf tdjson.Encoder) error { if b == nil { - return fmt.Errorf("can't encode businessInfo#773c5066 as nil") + return fmt.Errorf("can't encode businessInfo#cc697499 as nil") } buf.ObjStart() buf.PutID("businessInfo") buf.Comma() buf.FieldStart("location") if err := b.Location.EncodeTDLibJSON(buf); err != nil { - return fmt.Errorf("unable to encode businessInfo#773c5066: field location: %w", err) + return fmt.Errorf("unable to encode businessInfo#cc697499: field location: %w", err) } buf.Comma() buf.FieldStart("opening_hours") if err := b.OpeningHours.EncodeTDLibJSON(buf); err != nil { - return fmt.Errorf("unable to encode businessInfo#773c5066: field opening_hours: %w", err) + return fmt.Errorf("unable to encode businessInfo#cc697499: field opening_hours: %w", err) } buf.Comma() buf.FieldStart("greeting_message_settings") if err := b.GreetingMessageSettings.EncodeTDLibJSON(buf); err != nil { - return fmt.Errorf("unable to encode businessInfo#773c5066: field greeting_message_settings: %w", err) + return fmt.Errorf("unable to encode businessInfo#cc697499: field greeting_message_settings: %w", err) } buf.Comma() buf.FieldStart("away_message_settings") if err := b.AwayMessageSettings.EncodeTDLibJSON(buf); err != nil { - return fmt.Errorf("unable to encode businessInfo#773c5066: field away_message_settings: %w", err) + return fmt.Errorf("unable to encode businessInfo#cc697499: field away_message_settings: %w", err) + } + buf.Comma() + buf.FieldStart("intro") + if err := b.Intro.EncodeTDLibJSON(buf); err != nil { + return fmt.Errorf("unable to encode businessInfo#cc697499: field intro: %w", err) } buf.Comma() buf.StripComma() @@ -233,30 +255,34 @@ func (b *BusinessInfo) EncodeTDLibJSON(buf tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (b *BusinessInfo) DecodeTDLibJSON(buf tdjson.Decoder) error { if b == nil { - return fmt.Errorf("can't decode businessInfo#773c5066 to nil") + return fmt.Errorf("can't decode businessInfo#cc697499 to nil") } return buf.Obj(func(buf tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := buf.ConsumeID("businessInfo"); err != nil { - return fmt.Errorf("unable to decode businessInfo#773c5066: %w", err) + return fmt.Errorf("unable to decode businessInfo#cc697499: %w", err) } case "location": if err := b.Location.DecodeTDLibJSON(buf); err != nil { - return fmt.Errorf("unable to decode businessInfo#773c5066: field location: %w", err) + return fmt.Errorf("unable to decode businessInfo#cc697499: field location: %w", err) } case "opening_hours": if err := b.OpeningHours.DecodeTDLibJSON(buf); err != nil { - return fmt.Errorf("unable to decode businessInfo#773c5066: field opening_hours: %w", err) + return fmt.Errorf("unable to decode businessInfo#cc697499: field opening_hours: %w", err) } case "greeting_message_settings": if err := b.GreetingMessageSettings.DecodeTDLibJSON(buf); err != nil { - return fmt.Errorf("unable to decode businessInfo#773c5066: field greeting_message_settings: %w", err) + return fmt.Errorf("unable to decode businessInfo#cc697499: field greeting_message_settings: %w", err) } case "away_message_settings": if err := b.AwayMessageSettings.DecodeTDLibJSON(buf); err != nil { - return fmt.Errorf("unable to decode businessInfo#773c5066: field away_message_settings: %w", err) + return fmt.Errorf("unable to decode businessInfo#cc697499: field away_message_settings: %w", err) + } + case "intro": + if err := b.Intro.DecodeTDLibJSON(buf); err != nil { + return fmt.Errorf("unable to decode businessInfo#cc697499: field intro: %w", err) } default: return buf.Skip() @@ -296,3 +322,11 @@ func (b *BusinessInfo) GetAwayMessageSettings() (value BusinessAwayMessageSettin } return b.AwayMessageSettings } + +// GetIntro returns value of Intro field. +func (b *BusinessInfo) GetIntro() (value BusinessIntro) { + if b == nil { + return + } + return b.Intro +} diff --git a/tdapi/tl_business_intro_gen.go b/tdapi/tl_business_intro_gen.go new file mode 100644 index 0000000000..d543b54fe2 --- /dev/null +++ b/tdapi/tl_business_intro_gen.go @@ -0,0 +1,261 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// BusinessIntro represents TL type `businessIntro#737175e8`. +type BusinessIntro struct { + // Title text of the intro + Title string + // Message text of the intro + Message string + // Greeting sticker of the intro; may be null if none + Sticker Sticker +} + +// BusinessIntroTypeID is TL type id of BusinessIntro. +const BusinessIntroTypeID = 0x737175e8 + +// Ensuring interfaces in compile-time for BusinessIntro. +var ( + _ bin.Encoder = &BusinessIntro{} + _ bin.Decoder = &BusinessIntro{} + _ bin.BareEncoder = &BusinessIntro{} + _ bin.BareDecoder = &BusinessIntro{} +) + +func (b *BusinessIntro) Zero() bool { + if b == nil { + return true + } + if !(b.Title == "") { + return false + } + if !(b.Message == "") { + return false + } + if !(b.Sticker.Zero()) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (b *BusinessIntro) String() string { + if b == nil { + return "BusinessIntro(nil)" + } + type Alias BusinessIntro + return fmt.Sprintf("BusinessIntro%+v", Alias(*b)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*BusinessIntro) TypeID() uint32 { + return BusinessIntroTypeID +} + +// TypeName returns name of type in TL schema. +func (*BusinessIntro) TypeName() string { + return "businessIntro" +} + +// TypeInfo returns info about TL type. +func (b *BusinessIntro) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "businessIntro", + ID: BusinessIntroTypeID, + } + if b == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Title", + SchemaName: "title", + }, + { + Name: "Message", + SchemaName: "message", + }, + { + Name: "Sticker", + SchemaName: "sticker", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (b *BusinessIntro) Encode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessIntro#737175e8 as nil") + } + buf.PutID(BusinessIntroTypeID) + return b.EncodeBare(buf) +} + +// EncodeBare implements bin.BareEncoder. +func (b *BusinessIntro) EncodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessIntro#737175e8 as nil") + } + buf.PutString(b.Title) + buf.PutString(b.Message) + if err := b.Sticker.Encode(buf); err != nil { + return fmt.Errorf("unable to encode businessIntro#737175e8: field sticker: %w", err) + } + return nil +} + +// Decode implements bin.Decoder. +func (b *BusinessIntro) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessIntro#737175e8 to nil") + } + if err := buf.ConsumeID(BusinessIntroTypeID); err != nil { + return fmt.Errorf("unable to decode businessIntro#737175e8: %w", err) + } + return b.DecodeBare(buf) +} + +// DecodeBare implements bin.BareDecoder. +func (b *BusinessIntro) DecodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessIntro#737175e8 to nil") + } + { + value, err := buf.String() + if err != nil { + return fmt.Errorf("unable to decode businessIntro#737175e8: field title: %w", err) + } + b.Title = value + } + { + value, err := buf.String() + if err != nil { + return fmt.Errorf("unable to decode businessIntro#737175e8: field message: %w", err) + } + b.Message = value + } + { + if err := b.Sticker.Decode(buf); err != nil { + return fmt.Errorf("unable to decode businessIntro#737175e8: field sticker: %w", err) + } + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (b *BusinessIntro) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil { + return fmt.Errorf("can't encode businessIntro#737175e8 as nil") + } + buf.ObjStart() + buf.PutID("businessIntro") + buf.Comma() + buf.FieldStart("title") + buf.PutString(b.Title) + buf.Comma() + buf.FieldStart("message") + buf.PutString(b.Message) + buf.Comma() + buf.FieldStart("sticker") + if err := b.Sticker.EncodeTDLibJSON(buf); err != nil { + return fmt.Errorf("unable to encode businessIntro#737175e8: field sticker: %w", err) + } + buf.Comma() + buf.StripComma() + buf.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (b *BusinessIntro) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("can't decode businessIntro#737175e8 to nil") + } + + return buf.Obj(func(buf tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := buf.ConsumeID("businessIntro"); err != nil { + return fmt.Errorf("unable to decode businessIntro#737175e8: %w", err) + } + case "title": + value, err := buf.String() + if err != nil { + return fmt.Errorf("unable to decode businessIntro#737175e8: field title: %w", err) + } + b.Title = value + case "message": + value, err := buf.String() + if err != nil { + return fmt.Errorf("unable to decode businessIntro#737175e8: field message: %w", err) + } + b.Message = value + case "sticker": + if err := b.Sticker.DecodeTDLibJSON(buf); err != nil { + return fmt.Errorf("unable to decode businessIntro#737175e8: field sticker: %w", err) + } + default: + return buf.Skip() + } + return nil + }) +} + +// GetTitle returns value of Title field. +func (b *BusinessIntro) GetTitle() (value string) { + if b == nil { + return + } + return b.Title +} + +// GetMessage returns value of Message field. +func (b *BusinessIntro) GetMessage() (value string) { + if b == nil { + return + } + return b.Message +} + +// GetSticker returns value of Sticker field. +func (b *BusinessIntro) GetSticker() (value Sticker) { + if b == nil { + return + } + return b.Sticker +} diff --git a/tdapi/tl_business_message_gen.go b/tdapi/tl_business_message_gen.go new file mode 100644 index 0000000000..ed2510bf0a --- /dev/null +++ b/tdapi/tl_business_message_gen.go @@ -0,0 +1,227 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// BusinessMessage represents TL type `businessMessage#fa604646`. +type BusinessMessage struct { + // The message + Message Message + // Message that is replied by the message in the same chat; may be null if none + ReplyToMessage Message +} + +// BusinessMessageTypeID is TL type id of BusinessMessage. +const BusinessMessageTypeID = 0xfa604646 + +// Ensuring interfaces in compile-time for BusinessMessage. +var ( + _ bin.Encoder = &BusinessMessage{} + _ bin.Decoder = &BusinessMessage{} + _ bin.BareEncoder = &BusinessMessage{} + _ bin.BareDecoder = &BusinessMessage{} +) + +func (b *BusinessMessage) Zero() bool { + if b == nil { + return true + } + if !(b.Message.Zero()) { + return false + } + if !(b.ReplyToMessage.Zero()) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (b *BusinessMessage) String() string { + if b == nil { + return "BusinessMessage(nil)" + } + type Alias BusinessMessage + return fmt.Sprintf("BusinessMessage%+v", Alias(*b)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*BusinessMessage) TypeID() uint32 { + return BusinessMessageTypeID +} + +// TypeName returns name of type in TL schema. +func (*BusinessMessage) TypeName() string { + return "businessMessage" +} + +// TypeInfo returns info about TL type. +func (b *BusinessMessage) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "businessMessage", + ID: BusinessMessageTypeID, + } + if b == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Message", + SchemaName: "message", + }, + { + Name: "ReplyToMessage", + SchemaName: "reply_to_message", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (b *BusinessMessage) Encode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessMessage#fa604646 as nil") + } + buf.PutID(BusinessMessageTypeID) + return b.EncodeBare(buf) +} + +// EncodeBare implements bin.BareEncoder. +func (b *BusinessMessage) EncodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessMessage#fa604646 as nil") + } + if err := b.Message.Encode(buf); err != nil { + return fmt.Errorf("unable to encode businessMessage#fa604646: field message: %w", err) + } + if err := b.ReplyToMessage.Encode(buf); err != nil { + return fmt.Errorf("unable to encode businessMessage#fa604646: field reply_to_message: %w", err) + } + return nil +} + +// Decode implements bin.Decoder. +func (b *BusinessMessage) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessMessage#fa604646 to nil") + } + if err := buf.ConsumeID(BusinessMessageTypeID); err != nil { + return fmt.Errorf("unable to decode businessMessage#fa604646: %w", err) + } + return b.DecodeBare(buf) +} + +// DecodeBare implements bin.BareDecoder. +func (b *BusinessMessage) DecodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessMessage#fa604646 to nil") + } + { + if err := b.Message.Decode(buf); err != nil { + return fmt.Errorf("unable to decode businessMessage#fa604646: field message: %w", err) + } + } + { + if err := b.ReplyToMessage.Decode(buf); err != nil { + return fmt.Errorf("unable to decode businessMessage#fa604646: field reply_to_message: %w", err) + } + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (b *BusinessMessage) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil { + return fmt.Errorf("can't encode businessMessage#fa604646 as nil") + } + buf.ObjStart() + buf.PutID("businessMessage") + buf.Comma() + buf.FieldStart("message") + if err := b.Message.EncodeTDLibJSON(buf); err != nil { + return fmt.Errorf("unable to encode businessMessage#fa604646: field message: %w", err) + } + buf.Comma() + buf.FieldStart("reply_to_message") + if err := b.ReplyToMessage.EncodeTDLibJSON(buf); err != nil { + return fmt.Errorf("unable to encode businessMessage#fa604646: field reply_to_message: %w", err) + } + buf.Comma() + buf.StripComma() + buf.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (b *BusinessMessage) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("can't decode businessMessage#fa604646 to nil") + } + + return buf.Obj(func(buf tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := buf.ConsumeID("businessMessage"); err != nil { + return fmt.Errorf("unable to decode businessMessage#fa604646: %w", err) + } + case "message": + if err := b.Message.DecodeTDLibJSON(buf); err != nil { + return fmt.Errorf("unable to decode businessMessage#fa604646: field message: %w", err) + } + case "reply_to_message": + if err := b.ReplyToMessage.DecodeTDLibJSON(buf); err != nil { + return fmt.Errorf("unable to decode businessMessage#fa604646: field reply_to_message: %w", err) + } + default: + return buf.Skip() + } + return nil + }) +} + +// GetMessage returns value of Message field. +func (b *BusinessMessage) GetMessage() (value Message) { + if b == nil { + return + } + return b.Message +} + +// GetReplyToMessage returns value of ReplyToMessage field. +func (b *BusinessMessage) GetReplyToMessage() (value Message) { + if b == nil { + return + } + return b.ReplyToMessage +} diff --git a/tdapi/tl_business_messages_gen.go b/tdapi/tl_business_messages_gen.go new file mode 100644 index 0000000000..b9767efb6f --- /dev/null +++ b/tdapi/tl_business_messages_gen.go @@ -0,0 +1,221 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// BusinessMessages represents TL type `businessMessages#355963fa`. +type BusinessMessages struct { + // List of business messages + Messages []BusinessMessage +} + +// BusinessMessagesTypeID is TL type id of BusinessMessages. +const BusinessMessagesTypeID = 0x355963fa + +// Ensuring interfaces in compile-time for BusinessMessages. +var ( + _ bin.Encoder = &BusinessMessages{} + _ bin.Decoder = &BusinessMessages{} + _ bin.BareEncoder = &BusinessMessages{} + _ bin.BareDecoder = &BusinessMessages{} +) + +func (b *BusinessMessages) Zero() bool { + if b == nil { + return true + } + if !(b.Messages == nil) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (b *BusinessMessages) String() string { + if b == nil { + return "BusinessMessages(nil)" + } + type Alias BusinessMessages + return fmt.Sprintf("BusinessMessages%+v", Alias(*b)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*BusinessMessages) TypeID() uint32 { + return BusinessMessagesTypeID +} + +// TypeName returns name of type in TL schema. +func (*BusinessMessages) TypeName() string { + return "businessMessages" +} + +// TypeInfo returns info about TL type. +func (b *BusinessMessages) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "businessMessages", + ID: BusinessMessagesTypeID, + } + if b == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Messages", + SchemaName: "messages", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (b *BusinessMessages) Encode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessMessages#355963fa as nil") + } + buf.PutID(BusinessMessagesTypeID) + return b.EncodeBare(buf) +} + +// EncodeBare implements bin.BareEncoder. +func (b *BusinessMessages) EncodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't encode businessMessages#355963fa as nil") + } + buf.PutInt(len(b.Messages)) + for idx, v := range b.Messages { + if err := v.EncodeBare(buf); err != nil { + return fmt.Errorf("unable to encode bare businessMessages#355963fa: field messages element with index %d: %w", idx, err) + } + } + return nil +} + +// Decode implements bin.Decoder. +func (b *BusinessMessages) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessMessages#355963fa to nil") + } + if err := buf.ConsumeID(BusinessMessagesTypeID); err != nil { + return fmt.Errorf("unable to decode businessMessages#355963fa: %w", err) + } + return b.DecodeBare(buf) +} + +// DecodeBare implements bin.BareDecoder. +func (b *BusinessMessages) DecodeBare(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("can't decode businessMessages#355963fa to nil") + } + { + headerLen, err := buf.Int() + if err != nil { + return fmt.Errorf("unable to decode businessMessages#355963fa: field messages: %w", err) + } + + if headerLen > 0 { + b.Messages = make([]BusinessMessage, 0, headerLen%bin.PreallocateLimit) + } + for idx := 0; idx < headerLen; idx++ { + var value BusinessMessage + if err := value.DecodeBare(buf); err != nil { + return fmt.Errorf("unable to decode bare businessMessages#355963fa: field messages: %w", err) + } + b.Messages = append(b.Messages, value) + } + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (b *BusinessMessages) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil { + return fmt.Errorf("can't encode businessMessages#355963fa as nil") + } + buf.ObjStart() + buf.PutID("businessMessages") + buf.Comma() + buf.FieldStart("messages") + buf.ArrStart() + for idx, v := range b.Messages { + if err := v.EncodeTDLibJSON(buf); err != nil { + return fmt.Errorf("unable to encode businessMessages#355963fa: field messages element with index %d: %w", idx, err) + } + buf.Comma() + } + buf.StripComma() + buf.ArrEnd() + buf.Comma() + buf.StripComma() + buf.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (b *BusinessMessages) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("can't decode businessMessages#355963fa to nil") + } + + return buf.Obj(func(buf tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := buf.ConsumeID("businessMessages"); err != nil { + return fmt.Errorf("unable to decode businessMessages#355963fa: %w", err) + } + case "messages": + if err := buf.Arr(func(buf tdjson.Decoder) error { + var value BusinessMessage + if err := value.DecodeTDLibJSON(buf); err != nil { + return fmt.Errorf("unable to decode businessMessages#355963fa: field messages: %w", err) + } + b.Messages = append(b.Messages, value) + return nil + }); err != nil { + return fmt.Errorf("unable to decode businessMessages#355963fa: field messages: %w", err) + } + default: + return buf.Skip() + } + return nil + }) +} + +// GetMessages returns value of Messages field. +func (b *BusinessMessages) GetMessages() (value []BusinessMessage) { + if b == nil { + return + } + return b.Messages +} diff --git a/tdapi/tl_business_recipients_gen.go b/tdapi/tl_business_recipients_gen.go index f6abf0624b..9d5add3f94 100644 --- a/tdapi/tl_business_recipients_gen.go +++ b/tdapi/tl_business_recipients_gen.go @@ -31,10 +31,12 @@ var ( _ = tdjson.Encoder{} ) -// BusinessRecipients represents TL type `businessRecipients#2f3ca54a`. +// BusinessRecipients represents TL type `businessRecipients#802011e2`. type BusinessRecipients struct { // Identifiers of selected private chats ChatIDs []int64 + // Identifiers of private chats that are always excluded; for businessConnectedBot only + ExcludedChatIDs []int64 // True, if all existing private chats are selected SelectExistingChats bool // True, if all new private chats are selected @@ -49,7 +51,7 @@ type BusinessRecipients struct { } // BusinessRecipientsTypeID is TL type id of BusinessRecipients. -const BusinessRecipientsTypeID = 0x2f3ca54a +const BusinessRecipientsTypeID = 0x802011e2 // Ensuring interfaces in compile-time for BusinessRecipients. var ( @@ -66,6 +68,9 @@ func (b *BusinessRecipients) Zero() bool { if !(b.ChatIDs == nil) { return false } + if !(b.ExcludedChatIDs == nil) { + return false + } if !(b.SelectExistingChats == false) { return false } @@ -121,6 +126,10 @@ func (b *BusinessRecipients) TypeInfo() tdp.Type { Name: "ChatIDs", SchemaName: "chat_ids", }, + { + Name: "ExcludedChatIDs", + SchemaName: "excluded_chat_ids", + }, { Name: "SelectExistingChats", SchemaName: "select_existing_chats", @@ -148,7 +157,7 @@ func (b *BusinessRecipients) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (b *BusinessRecipients) Encode(buf *bin.Buffer) error { if b == nil { - return fmt.Errorf("can't encode businessRecipients#2f3ca54a as nil") + return fmt.Errorf("can't encode businessRecipients#802011e2 as nil") } buf.PutID(BusinessRecipientsTypeID) return b.EncodeBare(buf) @@ -157,12 +166,16 @@ func (b *BusinessRecipients) Encode(buf *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (b *BusinessRecipients) EncodeBare(buf *bin.Buffer) error { if b == nil { - return fmt.Errorf("can't encode businessRecipients#2f3ca54a as nil") + return fmt.Errorf("can't encode businessRecipients#802011e2 as nil") } buf.PutInt(len(b.ChatIDs)) for _, v := range b.ChatIDs { buf.PutInt53(v) } + buf.PutInt(len(b.ExcludedChatIDs)) + for _, v := range b.ExcludedChatIDs { + buf.PutInt53(v) + } buf.PutBool(b.SelectExistingChats) buf.PutBool(b.SelectNewChats) buf.PutBool(b.SelectContacts) @@ -174,10 +187,10 @@ func (b *BusinessRecipients) EncodeBare(buf *bin.Buffer) error { // Decode implements bin.Decoder. func (b *BusinessRecipients) Decode(buf *bin.Buffer) error { if b == nil { - return fmt.Errorf("can't decode businessRecipients#2f3ca54a to nil") + return fmt.Errorf("can't decode businessRecipients#802011e2 to nil") } if err := buf.ConsumeID(BusinessRecipientsTypeID); err != nil { - return fmt.Errorf("unable to decode businessRecipients#2f3ca54a: %w", err) + return fmt.Errorf("unable to decode businessRecipients#802011e2: %w", err) } return b.DecodeBare(buf) } @@ -185,12 +198,12 @@ func (b *BusinessRecipients) Decode(buf *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (b *BusinessRecipients) DecodeBare(buf *bin.Buffer) error { if b == nil { - return fmt.Errorf("can't decode businessRecipients#2f3ca54a to nil") + return fmt.Errorf("can't decode businessRecipients#802011e2 to nil") } { headerLen, err := buf.Int() if err != nil { - return fmt.Errorf("unable to decode businessRecipients#2f3ca54a: field chat_ids: %w", err) + return fmt.Errorf("unable to decode businessRecipients#802011e2: field chat_ids: %w", err) } if headerLen > 0 { @@ -199,43 +212,60 @@ func (b *BusinessRecipients) DecodeBare(buf *bin.Buffer) error { for idx := 0; idx < headerLen; idx++ { value, err := buf.Int53() if err != nil { - return fmt.Errorf("unable to decode businessRecipients#2f3ca54a: field chat_ids: %w", err) + return fmt.Errorf("unable to decode businessRecipients#802011e2: field chat_ids: %w", err) } b.ChatIDs = append(b.ChatIDs, value) } } + { + headerLen, err := buf.Int() + if err != nil { + return fmt.Errorf("unable to decode businessRecipients#802011e2: field excluded_chat_ids: %w", err) + } + + if headerLen > 0 { + b.ExcludedChatIDs = make([]int64, 0, headerLen%bin.PreallocateLimit) + } + for idx := 0; idx < headerLen; idx++ { + value, err := buf.Int53() + if err != nil { + return fmt.Errorf("unable to decode businessRecipients#802011e2: field excluded_chat_ids: %w", err) + } + b.ExcludedChatIDs = append(b.ExcludedChatIDs, value) + } + } { value, err := buf.Bool() if err != nil { - return fmt.Errorf("unable to decode businessRecipients#2f3ca54a: field select_existing_chats: %w", err) + return fmt.Errorf("unable to decode businessRecipients#802011e2: field select_existing_chats: %w", err) } b.SelectExistingChats = value } { value, err := buf.Bool() if err != nil { - return fmt.Errorf("unable to decode businessRecipients#2f3ca54a: field select_new_chats: %w", err) + return fmt.Errorf("unable to decode businessRecipients#802011e2: field select_new_chats: %w", err) } b.SelectNewChats = value } { value, err := buf.Bool() if err != nil { - return fmt.Errorf("unable to decode businessRecipients#2f3ca54a: field select_contacts: %w", err) + return fmt.Errorf("unable to decode businessRecipients#802011e2: field select_contacts: %w", err) } b.SelectContacts = value } { value, err := buf.Bool() if err != nil { - return fmt.Errorf("unable to decode businessRecipients#2f3ca54a: field select_non_contacts: %w", err) + return fmt.Errorf("unable to decode businessRecipients#802011e2: field select_non_contacts: %w", err) } b.SelectNonContacts = value } { value, err := buf.Bool() if err != nil { - return fmt.Errorf("unable to decode businessRecipients#2f3ca54a: field exclude_selected: %w", err) + return fmt.Errorf("unable to decode businessRecipients#802011e2: field exclude_selected: %w", err) } b.ExcludeSelected = value } @@ -245,7 +275,7 @@ func (b *BusinessRecipients) DecodeBare(buf *bin.Buffer) error { // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (b *BusinessRecipients) EncodeTDLibJSON(buf tdjson.Encoder) error { if b == nil { - return fmt.Errorf("can't encode businessRecipients#2f3ca54a as nil") + return fmt.Errorf("can't encode businessRecipients#802011e2 as nil") } buf.ObjStart() buf.PutID("businessRecipients") @@ -259,6 +289,15 @@ func (b *BusinessRecipients) EncodeTDLibJSON(buf tdjson.Encoder) error { buf.StripComma() buf.ArrEnd() buf.Comma() + buf.FieldStart("excluded_chat_ids") + buf.ArrStart() + for _, v := range b.ExcludedChatIDs { + buf.PutInt53(v) + buf.Comma() + } + buf.StripComma() + buf.ArrEnd() + buf.Comma() buf.FieldStart("select_existing_chats") buf.PutBool(b.SelectExistingChats) buf.Comma() @@ -282,54 +321,65 @@ func (b *BusinessRecipients) EncodeTDLibJSON(buf tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (b *BusinessRecipients) DecodeTDLibJSON(buf tdjson.Decoder) error { if b == nil { - return fmt.Errorf("can't decode businessRecipients#2f3ca54a to nil") + return fmt.Errorf("can't decode businessRecipients#802011e2 to nil") } return buf.Obj(func(buf tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := buf.ConsumeID("businessRecipients"); err != nil { - return fmt.Errorf("unable to decode businessRecipients#2f3ca54a: %w", err) + return fmt.Errorf("unable to decode businessRecipients#802011e2: %w", err) } case "chat_ids": if err := buf.Arr(func(buf tdjson.Decoder) error { value, err := buf.Int53() if err != nil { - return fmt.Errorf("unable to decode businessRecipients#2f3ca54a: field chat_ids: %w", err) + return fmt.Errorf("unable to decode businessRecipients#802011e2: field chat_ids: %w", err) } b.ChatIDs = append(b.ChatIDs, value) return nil }); err != nil { - return fmt.Errorf("unable to decode businessRecipients#2f3ca54a: field chat_ids: %w", err) + return fmt.Errorf("unable to decode businessRecipients#802011e2: field chat_ids: %w", err) + } + case "excluded_chat_ids": + if err := buf.Arr(func(buf tdjson.Decoder) error { + value, err := buf.Int53() + if err != nil { + return fmt.Errorf("unable to decode businessRecipients#802011e2: field excluded_chat_ids: %w", err) + } + b.ExcludedChatIDs = append(b.ExcludedChatIDs, value) + return nil + }); err != nil { + return fmt.Errorf("unable to decode businessRecipients#802011e2: field excluded_chat_ids: %w", err) } case "select_existing_chats": value, err := buf.Bool() if err != nil { - return fmt.Errorf("unable to decode businessRecipients#2f3ca54a: field select_existing_chats: %w", err) + return fmt.Errorf("unable to decode businessRecipients#802011e2: field select_existing_chats: %w", err) } b.SelectExistingChats = value case "select_new_chats": value, err := buf.Bool() if err != nil { - return fmt.Errorf("unable to decode businessRecipients#2f3ca54a: field select_new_chats: %w", err) + return fmt.Errorf("unable to decode businessRecipients#802011e2: field select_new_chats: %w", err) } b.SelectNewChats = value case "select_contacts": value, err := buf.Bool() if err != nil { - return fmt.Errorf("unable to decode businessRecipients#2f3ca54a: field select_contacts: %w", err) + return fmt.Errorf("unable to decode businessRecipients#802011e2: field select_contacts: %w", err) } b.SelectContacts = value case "select_non_contacts": value, err := buf.Bool() if err != nil { - return fmt.Errorf("unable to decode businessRecipients#2f3ca54a: field select_non_contacts: %w", err) + return fmt.Errorf("unable to decode businessRecipients#802011e2: field select_non_contacts: %w", err) } b.SelectNonContacts = value case "exclude_selected": value, err := buf.Bool() if err != nil { - return fmt.Errorf("unable to decode businessRecipients#2f3ca54a: field exclude_selected: %w", err) + return fmt.Errorf("unable to decode businessRecipients#802011e2: field exclude_selected: %w", err) } b.ExcludeSelected = value default: @@ -347,6 +397,14 @@ func (b *BusinessRecipients) GetChatIDs() (value []int64) { return b.ChatIDs } +// GetExcludedChatIDs returns value of ExcludedChatIDs field. +func (b *BusinessRecipients) GetExcludedChatIDs() (value []int64) { + if b == nil { + return + } + return b.ExcludedChatIDs +} + // GetSelectExistingChats returns value of SelectExistingChats field. func (b *BusinessRecipients) GetSelectExistingChats() (value bool) { if b == nil { diff --git a/tdapi/tl_chat_folder_gen.go b/tdapi/tl_chat_folder_gen.go index aadbeb73d9..6f4de409e4 100644 --- a/tdapi/tl_chat_folder_gen.go +++ b/tdapi/tl_chat_folder_gen.go @@ -39,7 +39,8 @@ type ChatFolder struct { // getChatFolderDefaultIconName to get default icon name for the folder Icon ChatFolderIcon // The identifier of the chosen color for the chat folder icon; from -1 to 6. If -1, then - // color is didabled + // color is didabled. Can't be changed if folder tags are disabled or the current user + // doesn't have Telegram Premium subscription ColorID int32 // True, if at least one link has been created for the folder IsShareable bool diff --git a/tdapi/tl_close_birthday_user_gen.go b/tdapi/tl_close_birthday_user_gen.go new file mode 100644 index 0000000000..c536166bb5 --- /dev/null +++ b/tdapi/tl_close_birthday_user_gen.go @@ -0,0 +1,227 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// CloseBirthdayUser represents TL type `closeBirthdayUser#800659ee`. +type CloseBirthdayUser struct { + // User identifier + UserID int64 + // Birthdate of the user + Birthdate Birthdate +} + +// CloseBirthdayUserTypeID is TL type id of CloseBirthdayUser. +const CloseBirthdayUserTypeID = 0x800659ee + +// Ensuring interfaces in compile-time for CloseBirthdayUser. +var ( + _ bin.Encoder = &CloseBirthdayUser{} + _ bin.Decoder = &CloseBirthdayUser{} + _ bin.BareEncoder = &CloseBirthdayUser{} + _ bin.BareDecoder = &CloseBirthdayUser{} +) + +func (c *CloseBirthdayUser) Zero() bool { + if c == nil { + return true + } + if !(c.UserID == 0) { + return false + } + if !(c.Birthdate.Zero()) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (c *CloseBirthdayUser) String() string { + if c == nil { + return "CloseBirthdayUser(nil)" + } + type Alias CloseBirthdayUser + return fmt.Sprintf("CloseBirthdayUser%+v", Alias(*c)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*CloseBirthdayUser) TypeID() uint32 { + return CloseBirthdayUserTypeID +} + +// TypeName returns name of type in TL schema. +func (*CloseBirthdayUser) TypeName() string { + return "closeBirthdayUser" +} + +// TypeInfo returns info about TL type. +func (c *CloseBirthdayUser) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "closeBirthdayUser", + ID: CloseBirthdayUserTypeID, + } + if c == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "UserID", + SchemaName: "user_id", + }, + { + Name: "Birthdate", + SchemaName: "birthdate", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (c *CloseBirthdayUser) Encode(b *bin.Buffer) error { + if c == nil { + return fmt.Errorf("can't encode closeBirthdayUser#800659ee as nil") + } + b.PutID(CloseBirthdayUserTypeID) + return c.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (c *CloseBirthdayUser) EncodeBare(b *bin.Buffer) error { + if c == nil { + return fmt.Errorf("can't encode closeBirthdayUser#800659ee as nil") + } + b.PutInt53(c.UserID) + if err := c.Birthdate.Encode(b); err != nil { + return fmt.Errorf("unable to encode closeBirthdayUser#800659ee: field birthdate: %w", err) + } + return nil +} + +// Decode implements bin.Decoder. +func (c *CloseBirthdayUser) Decode(b *bin.Buffer) error { + if c == nil { + return fmt.Errorf("can't decode closeBirthdayUser#800659ee to nil") + } + if err := b.ConsumeID(CloseBirthdayUserTypeID); err != nil { + return fmt.Errorf("unable to decode closeBirthdayUser#800659ee: %w", err) + } + return c.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (c *CloseBirthdayUser) DecodeBare(b *bin.Buffer) error { + if c == nil { + return fmt.Errorf("can't decode closeBirthdayUser#800659ee to nil") + } + { + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode closeBirthdayUser#800659ee: field user_id: %w", err) + } + c.UserID = value + } + { + if err := c.Birthdate.Decode(b); err != nil { + return fmt.Errorf("unable to decode closeBirthdayUser#800659ee: field birthdate: %w", err) + } + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (c *CloseBirthdayUser) EncodeTDLibJSON(b tdjson.Encoder) error { + if c == nil { + return fmt.Errorf("can't encode closeBirthdayUser#800659ee as nil") + } + b.ObjStart() + b.PutID("closeBirthdayUser") + b.Comma() + b.FieldStart("user_id") + b.PutInt53(c.UserID) + b.Comma() + b.FieldStart("birthdate") + if err := c.Birthdate.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode closeBirthdayUser#800659ee: field birthdate: %w", err) + } + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (c *CloseBirthdayUser) DecodeTDLibJSON(b tdjson.Decoder) error { + if c == nil { + return fmt.Errorf("can't decode closeBirthdayUser#800659ee to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("closeBirthdayUser"); err != nil { + return fmt.Errorf("unable to decode closeBirthdayUser#800659ee: %w", err) + } + case "user_id": + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode closeBirthdayUser#800659ee: field user_id: %w", err) + } + c.UserID = value + case "birthdate": + if err := c.Birthdate.DecodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to decode closeBirthdayUser#800659ee: field birthdate: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// GetUserID returns value of UserID field. +func (c *CloseBirthdayUser) GetUserID() (value int64) { + if c == nil { + return + } + return c.UserID +} + +// GetBirthdate returns value of Birthdate field. +func (c *CloseBirthdayUser) GetBirthdate() (value Birthdate) { + if c == nil { + return + } + return c.Birthdate +} diff --git a/tdapi/tl_collectible_item_info_gen.go b/tdapi/tl_collectible_item_info_gen.go new file mode 100644 index 0000000000..6b1a186dbd --- /dev/null +++ b/tdapi/tl_collectible_item_info_gen.go @@ -0,0 +1,363 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// CollectibleItemInfo represents TL type `collectibleItemInfo#570f9bcd`. +type CollectibleItemInfo struct { + // Point in time (Unix timestamp) when the item was purchased + PurchaseDate int32 + // Currency for the paid amount + Currency string + // The paid amount, in the smallest units of the currency + Amount int64 + // Cryptocurrency used to pay for the item + Cryptocurrency string + // The paid amount, in the smallest units of the cryptocurrency + CryptocurrencyAmount int64 + // Individual URL for the item on https://fragment.com + URL string +} + +// CollectibleItemInfoTypeID is TL type id of CollectibleItemInfo. +const CollectibleItemInfoTypeID = 0x570f9bcd + +// Ensuring interfaces in compile-time for CollectibleItemInfo. +var ( + _ bin.Encoder = &CollectibleItemInfo{} + _ bin.Decoder = &CollectibleItemInfo{} + _ bin.BareEncoder = &CollectibleItemInfo{} + _ bin.BareDecoder = &CollectibleItemInfo{} +) + +func (c *CollectibleItemInfo) Zero() bool { + if c == nil { + return true + } + if !(c.PurchaseDate == 0) { + return false + } + if !(c.Currency == "") { + return false + } + if !(c.Amount == 0) { + return false + } + if !(c.Cryptocurrency == "") { + return false + } + if !(c.CryptocurrencyAmount == 0) { + return false + } + if !(c.URL == "") { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (c *CollectibleItemInfo) String() string { + if c == nil { + return "CollectibleItemInfo(nil)" + } + type Alias CollectibleItemInfo + return fmt.Sprintf("CollectibleItemInfo%+v", Alias(*c)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*CollectibleItemInfo) TypeID() uint32 { + return CollectibleItemInfoTypeID +} + +// TypeName returns name of type in TL schema. +func (*CollectibleItemInfo) TypeName() string { + return "collectibleItemInfo" +} + +// TypeInfo returns info about TL type. +func (c *CollectibleItemInfo) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "collectibleItemInfo", + ID: CollectibleItemInfoTypeID, + } + if c == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "PurchaseDate", + SchemaName: "purchase_date", + }, + { + Name: "Currency", + SchemaName: "currency", + }, + { + Name: "Amount", + SchemaName: "amount", + }, + { + Name: "Cryptocurrency", + SchemaName: "cryptocurrency", + }, + { + Name: "CryptocurrencyAmount", + SchemaName: "cryptocurrency_amount", + }, + { + Name: "URL", + SchemaName: "url", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (c *CollectibleItemInfo) Encode(b *bin.Buffer) error { + if c == nil { + return fmt.Errorf("can't encode collectibleItemInfo#570f9bcd as nil") + } + b.PutID(CollectibleItemInfoTypeID) + return c.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (c *CollectibleItemInfo) EncodeBare(b *bin.Buffer) error { + if c == nil { + return fmt.Errorf("can't encode collectibleItemInfo#570f9bcd as nil") + } + b.PutInt32(c.PurchaseDate) + b.PutString(c.Currency) + b.PutInt53(c.Amount) + b.PutString(c.Cryptocurrency) + b.PutLong(c.CryptocurrencyAmount) + b.PutString(c.URL) + return nil +} + +// Decode implements bin.Decoder. +func (c *CollectibleItemInfo) Decode(b *bin.Buffer) error { + if c == nil { + return fmt.Errorf("can't decode collectibleItemInfo#570f9bcd to nil") + } + if err := b.ConsumeID(CollectibleItemInfoTypeID); err != nil { + return fmt.Errorf("unable to decode collectibleItemInfo#570f9bcd: %w", err) + } + return c.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (c *CollectibleItemInfo) DecodeBare(b *bin.Buffer) error { + if c == nil { + return fmt.Errorf("can't decode collectibleItemInfo#570f9bcd to nil") + } + { + value, err := b.Int32() + if err != nil { + return fmt.Errorf("unable to decode collectibleItemInfo#570f9bcd: field purchase_date: %w", err) + } + c.PurchaseDate = value + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode collectibleItemInfo#570f9bcd: field currency: %w", err) + } + c.Currency = value + } + { + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode collectibleItemInfo#570f9bcd: field amount: %w", err) + } + c.Amount = value + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode collectibleItemInfo#570f9bcd: field cryptocurrency: %w", err) + } + c.Cryptocurrency = value + } + { + value, err := b.Long() + if err != nil { + return fmt.Errorf("unable to decode collectibleItemInfo#570f9bcd: field cryptocurrency_amount: %w", err) + } + c.CryptocurrencyAmount = value + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode collectibleItemInfo#570f9bcd: field url: %w", err) + } + c.URL = value + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (c *CollectibleItemInfo) EncodeTDLibJSON(b tdjson.Encoder) error { + if c == nil { + return fmt.Errorf("can't encode collectibleItemInfo#570f9bcd as nil") + } + b.ObjStart() + b.PutID("collectibleItemInfo") + b.Comma() + b.FieldStart("purchase_date") + b.PutInt32(c.PurchaseDate) + b.Comma() + b.FieldStart("currency") + b.PutString(c.Currency) + b.Comma() + b.FieldStart("amount") + b.PutInt53(c.Amount) + b.Comma() + b.FieldStart("cryptocurrency") + b.PutString(c.Cryptocurrency) + b.Comma() + b.FieldStart("cryptocurrency_amount") + b.PutLong(c.CryptocurrencyAmount) + b.Comma() + b.FieldStart("url") + b.PutString(c.URL) + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (c *CollectibleItemInfo) DecodeTDLibJSON(b tdjson.Decoder) error { + if c == nil { + return fmt.Errorf("can't decode collectibleItemInfo#570f9bcd to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("collectibleItemInfo"); err != nil { + return fmt.Errorf("unable to decode collectibleItemInfo#570f9bcd: %w", err) + } + case "purchase_date": + value, err := b.Int32() + if err != nil { + return fmt.Errorf("unable to decode collectibleItemInfo#570f9bcd: field purchase_date: %w", err) + } + c.PurchaseDate = value + case "currency": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode collectibleItemInfo#570f9bcd: field currency: %w", err) + } + c.Currency = value + case "amount": + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode collectibleItemInfo#570f9bcd: field amount: %w", err) + } + c.Amount = value + case "cryptocurrency": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode collectibleItemInfo#570f9bcd: field cryptocurrency: %w", err) + } + c.Cryptocurrency = value + case "cryptocurrency_amount": + value, err := b.Long() + if err != nil { + return fmt.Errorf("unable to decode collectibleItemInfo#570f9bcd: field cryptocurrency_amount: %w", err) + } + c.CryptocurrencyAmount = value + case "url": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode collectibleItemInfo#570f9bcd: field url: %w", err) + } + c.URL = value + default: + return b.Skip() + } + return nil + }) +} + +// GetPurchaseDate returns value of PurchaseDate field. +func (c *CollectibleItemInfo) GetPurchaseDate() (value int32) { + if c == nil { + return + } + return c.PurchaseDate +} + +// GetCurrency returns value of Currency field. +func (c *CollectibleItemInfo) GetCurrency() (value string) { + if c == nil { + return + } + return c.Currency +} + +// GetAmount returns value of Amount field. +func (c *CollectibleItemInfo) GetAmount() (value int64) { + if c == nil { + return + } + return c.Amount +} + +// GetCryptocurrency returns value of Cryptocurrency field. +func (c *CollectibleItemInfo) GetCryptocurrency() (value string) { + if c == nil { + return + } + return c.Cryptocurrency +} + +// GetCryptocurrencyAmount returns value of CryptocurrencyAmount field. +func (c *CollectibleItemInfo) GetCryptocurrencyAmount() (value int64) { + if c == nil { + return + } + return c.CryptocurrencyAmount +} + +// GetURL returns value of URL field. +func (c *CollectibleItemInfo) GetURL() (value string) { + if c == nil { + return + } + return c.URL +} diff --git a/tdapi/tl_collectible_item_type_gen.go b/tdapi/tl_collectible_item_type_gen.go new file mode 100644 index 0000000000..0c6e84ca5e --- /dev/null +++ b/tdapi/tl_collectible_item_type_gen.go @@ -0,0 +1,501 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// CollectibleItemTypeUsername represents TL type `collectibleItemTypeUsername#1b56e7d1`. +type CollectibleItemTypeUsername struct { + // The username + Username string +} + +// CollectibleItemTypeUsernameTypeID is TL type id of CollectibleItemTypeUsername. +const CollectibleItemTypeUsernameTypeID = 0x1b56e7d1 + +// construct implements constructor of CollectibleItemTypeClass. +func (c CollectibleItemTypeUsername) construct() CollectibleItemTypeClass { return &c } + +// Ensuring interfaces in compile-time for CollectibleItemTypeUsername. +var ( + _ bin.Encoder = &CollectibleItemTypeUsername{} + _ bin.Decoder = &CollectibleItemTypeUsername{} + _ bin.BareEncoder = &CollectibleItemTypeUsername{} + _ bin.BareDecoder = &CollectibleItemTypeUsername{} + + _ CollectibleItemTypeClass = &CollectibleItemTypeUsername{} +) + +func (c *CollectibleItemTypeUsername) Zero() bool { + if c == nil { + return true + } + if !(c.Username == "") { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (c *CollectibleItemTypeUsername) String() string { + if c == nil { + return "CollectibleItemTypeUsername(nil)" + } + type Alias CollectibleItemTypeUsername + return fmt.Sprintf("CollectibleItemTypeUsername%+v", Alias(*c)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*CollectibleItemTypeUsername) TypeID() uint32 { + return CollectibleItemTypeUsernameTypeID +} + +// TypeName returns name of type in TL schema. +func (*CollectibleItemTypeUsername) TypeName() string { + return "collectibleItemTypeUsername" +} + +// TypeInfo returns info about TL type. +func (c *CollectibleItemTypeUsername) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "collectibleItemTypeUsername", + ID: CollectibleItemTypeUsernameTypeID, + } + if c == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Username", + SchemaName: "username", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (c *CollectibleItemTypeUsername) Encode(b *bin.Buffer) error { + if c == nil { + return fmt.Errorf("can't encode collectibleItemTypeUsername#1b56e7d1 as nil") + } + b.PutID(CollectibleItemTypeUsernameTypeID) + return c.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (c *CollectibleItemTypeUsername) EncodeBare(b *bin.Buffer) error { + if c == nil { + return fmt.Errorf("can't encode collectibleItemTypeUsername#1b56e7d1 as nil") + } + b.PutString(c.Username) + return nil +} + +// Decode implements bin.Decoder. +func (c *CollectibleItemTypeUsername) Decode(b *bin.Buffer) error { + if c == nil { + return fmt.Errorf("can't decode collectibleItemTypeUsername#1b56e7d1 to nil") + } + if err := b.ConsumeID(CollectibleItemTypeUsernameTypeID); err != nil { + return fmt.Errorf("unable to decode collectibleItemTypeUsername#1b56e7d1: %w", err) + } + return c.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (c *CollectibleItemTypeUsername) DecodeBare(b *bin.Buffer) error { + if c == nil { + return fmt.Errorf("can't decode collectibleItemTypeUsername#1b56e7d1 to nil") + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode collectibleItemTypeUsername#1b56e7d1: field username: %w", err) + } + c.Username = value + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (c *CollectibleItemTypeUsername) EncodeTDLibJSON(b tdjson.Encoder) error { + if c == nil { + return fmt.Errorf("can't encode collectibleItemTypeUsername#1b56e7d1 as nil") + } + b.ObjStart() + b.PutID("collectibleItemTypeUsername") + b.Comma() + b.FieldStart("username") + b.PutString(c.Username) + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (c *CollectibleItemTypeUsername) DecodeTDLibJSON(b tdjson.Decoder) error { + if c == nil { + return fmt.Errorf("can't decode collectibleItemTypeUsername#1b56e7d1 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("collectibleItemTypeUsername"); err != nil { + return fmt.Errorf("unable to decode collectibleItemTypeUsername#1b56e7d1: %w", err) + } + case "username": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode collectibleItemTypeUsername#1b56e7d1: field username: %w", err) + } + c.Username = value + default: + return b.Skip() + } + return nil + }) +} + +// GetUsername returns value of Username field. +func (c *CollectibleItemTypeUsername) GetUsername() (value string) { + if c == nil { + return + } + return c.Username +} + +// CollectibleItemTypePhoneNumber represents TL type `collectibleItemTypePhoneNumber#4ae0e142`. +type CollectibleItemTypePhoneNumber struct { + // The phone number + PhoneNumber string +} + +// CollectibleItemTypePhoneNumberTypeID is TL type id of CollectibleItemTypePhoneNumber. +const CollectibleItemTypePhoneNumberTypeID = 0x4ae0e142 + +// construct implements constructor of CollectibleItemTypeClass. +func (c CollectibleItemTypePhoneNumber) construct() CollectibleItemTypeClass { return &c } + +// Ensuring interfaces in compile-time for CollectibleItemTypePhoneNumber. +var ( + _ bin.Encoder = &CollectibleItemTypePhoneNumber{} + _ bin.Decoder = &CollectibleItemTypePhoneNumber{} + _ bin.BareEncoder = &CollectibleItemTypePhoneNumber{} + _ bin.BareDecoder = &CollectibleItemTypePhoneNumber{} + + _ CollectibleItemTypeClass = &CollectibleItemTypePhoneNumber{} +) + +func (c *CollectibleItemTypePhoneNumber) Zero() bool { + if c == nil { + return true + } + if !(c.PhoneNumber == "") { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (c *CollectibleItemTypePhoneNumber) String() string { + if c == nil { + return "CollectibleItemTypePhoneNumber(nil)" + } + type Alias CollectibleItemTypePhoneNumber + return fmt.Sprintf("CollectibleItemTypePhoneNumber%+v", Alias(*c)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*CollectibleItemTypePhoneNumber) TypeID() uint32 { + return CollectibleItemTypePhoneNumberTypeID +} + +// TypeName returns name of type in TL schema. +func (*CollectibleItemTypePhoneNumber) TypeName() string { + return "collectibleItemTypePhoneNumber" +} + +// TypeInfo returns info about TL type. +func (c *CollectibleItemTypePhoneNumber) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "collectibleItemTypePhoneNumber", + ID: CollectibleItemTypePhoneNumberTypeID, + } + if c == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "PhoneNumber", + SchemaName: "phone_number", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (c *CollectibleItemTypePhoneNumber) Encode(b *bin.Buffer) error { + if c == nil { + return fmt.Errorf("can't encode collectibleItemTypePhoneNumber#4ae0e142 as nil") + } + b.PutID(CollectibleItemTypePhoneNumberTypeID) + return c.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (c *CollectibleItemTypePhoneNumber) EncodeBare(b *bin.Buffer) error { + if c == nil { + return fmt.Errorf("can't encode collectibleItemTypePhoneNumber#4ae0e142 as nil") + } + b.PutString(c.PhoneNumber) + return nil +} + +// Decode implements bin.Decoder. +func (c *CollectibleItemTypePhoneNumber) Decode(b *bin.Buffer) error { + if c == nil { + return fmt.Errorf("can't decode collectibleItemTypePhoneNumber#4ae0e142 to nil") + } + if err := b.ConsumeID(CollectibleItemTypePhoneNumberTypeID); err != nil { + return fmt.Errorf("unable to decode collectibleItemTypePhoneNumber#4ae0e142: %w", err) + } + return c.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (c *CollectibleItemTypePhoneNumber) DecodeBare(b *bin.Buffer) error { + if c == nil { + return fmt.Errorf("can't decode collectibleItemTypePhoneNumber#4ae0e142 to nil") + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode collectibleItemTypePhoneNumber#4ae0e142: field phone_number: %w", err) + } + c.PhoneNumber = value + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (c *CollectibleItemTypePhoneNumber) EncodeTDLibJSON(b tdjson.Encoder) error { + if c == nil { + return fmt.Errorf("can't encode collectibleItemTypePhoneNumber#4ae0e142 as nil") + } + b.ObjStart() + b.PutID("collectibleItemTypePhoneNumber") + b.Comma() + b.FieldStart("phone_number") + b.PutString(c.PhoneNumber) + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (c *CollectibleItemTypePhoneNumber) DecodeTDLibJSON(b tdjson.Decoder) error { + if c == nil { + return fmt.Errorf("can't decode collectibleItemTypePhoneNumber#4ae0e142 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("collectibleItemTypePhoneNumber"); err != nil { + return fmt.Errorf("unable to decode collectibleItemTypePhoneNumber#4ae0e142: %w", err) + } + case "phone_number": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode collectibleItemTypePhoneNumber#4ae0e142: field phone_number: %w", err) + } + c.PhoneNumber = value + default: + return b.Skip() + } + return nil + }) +} + +// GetPhoneNumber returns value of PhoneNumber field. +func (c *CollectibleItemTypePhoneNumber) GetPhoneNumber() (value string) { + if c == nil { + return + } + return c.PhoneNumber +} + +// CollectibleItemTypeClassName is schema name of CollectibleItemTypeClass. +const CollectibleItemTypeClassName = "CollectibleItemType" + +// CollectibleItemTypeClass represents CollectibleItemType generic type. +// +// Example: +// +// g, err := tdapi.DecodeCollectibleItemType(buf) +// if err != nil { +// panic(err) +// } +// switch v := g.(type) { +// case *tdapi.CollectibleItemTypeUsername: // collectibleItemTypeUsername#1b56e7d1 +// case *tdapi.CollectibleItemTypePhoneNumber: // collectibleItemTypePhoneNumber#4ae0e142 +// default: panic(v) +// } +type CollectibleItemTypeClass interface { + bin.Encoder + bin.Decoder + bin.BareEncoder + bin.BareDecoder + construct() CollectibleItemTypeClass + + // TypeID returns type id in TL schema. + // + // See https://core.telegram.org/mtproto/TL-tl#remarks. + TypeID() uint32 + // TypeName returns name of type in TL schema. + TypeName() string + // String implements fmt.Stringer. + String() string + // Zero returns true if current object has a zero value. + Zero() bool + + EncodeTDLibJSON(b tdjson.Encoder) error + DecodeTDLibJSON(b tdjson.Decoder) error +} + +// DecodeCollectibleItemType implements binary de-serialization for CollectibleItemTypeClass. +func DecodeCollectibleItemType(buf *bin.Buffer) (CollectibleItemTypeClass, error) { + id, err := buf.PeekID() + if err != nil { + return nil, err + } + switch id { + case CollectibleItemTypeUsernameTypeID: + // Decoding collectibleItemTypeUsername#1b56e7d1. + v := CollectibleItemTypeUsername{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode CollectibleItemTypeClass: %w", err) + } + return &v, nil + case CollectibleItemTypePhoneNumberTypeID: + // Decoding collectibleItemTypePhoneNumber#4ae0e142. + v := CollectibleItemTypePhoneNumber{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode CollectibleItemTypeClass: %w", err) + } + return &v, nil + default: + return nil, fmt.Errorf("unable to decode CollectibleItemTypeClass: %w", bin.NewUnexpectedID(id)) + } +} + +// DecodeTDLibJSONCollectibleItemType implements binary de-serialization for CollectibleItemTypeClass. +func DecodeTDLibJSONCollectibleItemType(buf tdjson.Decoder) (CollectibleItemTypeClass, error) { + id, err := buf.FindTypeID() + if err != nil { + return nil, err + } + switch id { + case "collectibleItemTypeUsername": + // Decoding collectibleItemTypeUsername#1b56e7d1. + v := CollectibleItemTypeUsername{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode CollectibleItemTypeClass: %w", err) + } + return &v, nil + case "collectibleItemTypePhoneNumber": + // Decoding collectibleItemTypePhoneNumber#4ae0e142. + v := CollectibleItemTypePhoneNumber{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode CollectibleItemTypeClass: %w", err) + } + return &v, nil + default: + return nil, fmt.Errorf("unable to decode CollectibleItemTypeClass: %w", tdjson.NewUnexpectedID(id)) + } +} + +// CollectibleItemType boxes the CollectibleItemTypeClass providing a helper. +type CollectibleItemTypeBox struct { + CollectibleItemType CollectibleItemTypeClass +} + +// Decode implements bin.Decoder for CollectibleItemTypeBox. +func (b *CollectibleItemTypeBox) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("unable to decode CollectibleItemTypeBox to nil") + } + v, err := DecodeCollectibleItemType(buf) + if err != nil { + return fmt.Errorf("unable to decode boxed value: %w", err) + } + b.CollectibleItemType = v + return nil +} + +// Encode implements bin.Encode for CollectibleItemTypeBox. +func (b *CollectibleItemTypeBox) Encode(buf *bin.Buffer) error { + if b == nil || b.CollectibleItemType == nil { + return fmt.Errorf("unable to encode CollectibleItemTypeClass as nil") + } + return b.CollectibleItemType.Encode(buf) +} + +// DecodeTDLibJSON implements bin.Decoder for CollectibleItemTypeBox. +func (b *CollectibleItemTypeBox) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("unable to decode CollectibleItemTypeBox to nil") + } + v, err := DecodeTDLibJSONCollectibleItemType(buf) + if err != nil { + return fmt.Errorf("unable to decode boxed value: %w", err) + } + b.CollectibleItemType = v + return nil +} + +// EncodeTDLibJSON implements bin.Encode for CollectibleItemTypeBox. +func (b *CollectibleItemTypeBox) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil || b.CollectibleItemType == nil { + return fmt.Errorf("unable to encode CollectibleItemTypeClass as nil") + } + return b.CollectibleItemType.EncodeTDLibJSON(buf) +} diff --git a/tdapi/tl_create_new_sticker_set_gen.go b/tdapi/tl_create_new_sticker_set_gen.go index 252879980f..ff55515743 100644 --- a/tdapi/tl_create_new_sticker_set_gen.go +++ b/tdapi/tl_create_new_sticker_set_gen.go @@ -31,33 +31,31 @@ var ( _ = tdjson.Encoder{} ) -// CreateNewStickerSetRequest represents TL type `createNewStickerSet#19454551`. +// CreateNewStickerSetRequest represents TL type `createNewStickerSet#87fd8611`. type CreateNewStickerSetRequest struct { // Sticker set owner; ignored for regular users UserID int64 // Sticker set title; 1-64 characters Title string // Sticker set name. Can contain only English letters, digits and underscores. Must end - // with *"_by_"* (** is case insensitive) for bots; 1-64 - // characters + // with *"_by_"* (** is case insensitive) for bots; 0-64 + // characters. Name string - // Format of the stickers in the set - StickerFormat StickerFormatClass // Type of the stickers in the set StickerType StickerTypeClass // Pass true if stickers in the sticker set must be repainted; for custom emoji sticker // sets only NeedsRepainting bool - // List of stickers to be added to the set; must be non-empty. All stickers must have the - // same format. For TGS stickers, uploadStickerFile must be used before the sticker is - // shown + // List of stickers to be added to the set; 1-200 stickers for custom emoji sticker sets, + // and 1-120 stickers otherwise. For TGS stickers, uploadStickerFile must be used before + // the sticker is shown Stickers []InputSticker // Source of the sticker set; may be empty if unknown Source string } // CreateNewStickerSetRequestTypeID is TL type id of CreateNewStickerSetRequest. -const CreateNewStickerSetRequestTypeID = 0x19454551 +const CreateNewStickerSetRequestTypeID = 0x87fd8611 // Ensuring interfaces in compile-time for CreateNewStickerSetRequest. var ( @@ -80,9 +78,6 @@ func (c *CreateNewStickerSetRequest) Zero() bool { if !(c.Name == "") { return false } - if !(c.StickerFormat == nil) { - return false - } if !(c.StickerType == nil) { return false } @@ -143,10 +138,6 @@ func (c *CreateNewStickerSetRequest) TypeInfo() tdp.Type { Name: "Name", SchemaName: "name", }, - { - Name: "StickerFormat", - SchemaName: "sticker_format", - }, { Name: "StickerType", SchemaName: "sticker_type", @@ -170,7 +161,7 @@ func (c *CreateNewStickerSetRequest) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (c *CreateNewStickerSetRequest) Encode(b *bin.Buffer) error { if c == nil { - return fmt.Errorf("can't encode createNewStickerSet#19454551 as nil") + return fmt.Errorf("can't encode createNewStickerSet#87fd8611 as nil") } b.PutID(CreateNewStickerSetRequestTypeID) return c.EncodeBare(b) @@ -179,28 +170,22 @@ func (c *CreateNewStickerSetRequest) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (c *CreateNewStickerSetRequest) EncodeBare(b *bin.Buffer) error { if c == nil { - return fmt.Errorf("can't encode createNewStickerSet#19454551 as nil") + return fmt.Errorf("can't encode createNewStickerSet#87fd8611 as nil") } b.PutInt53(c.UserID) b.PutString(c.Title) b.PutString(c.Name) - if c.StickerFormat == nil { - return fmt.Errorf("unable to encode createNewStickerSet#19454551: field sticker_format is nil") - } - if err := c.StickerFormat.Encode(b); err != nil { - return fmt.Errorf("unable to encode createNewStickerSet#19454551: field sticker_format: %w", err) - } if c.StickerType == nil { - return fmt.Errorf("unable to encode createNewStickerSet#19454551: field sticker_type is nil") + return fmt.Errorf("unable to encode createNewStickerSet#87fd8611: field sticker_type is nil") } if err := c.StickerType.Encode(b); err != nil { - return fmt.Errorf("unable to encode createNewStickerSet#19454551: field sticker_type: %w", err) + return fmt.Errorf("unable to encode createNewStickerSet#87fd8611: field sticker_type: %w", err) } b.PutBool(c.NeedsRepainting) b.PutInt(len(c.Stickers)) for idx, v := range c.Stickers { if err := v.EncodeBare(b); err != nil { - return fmt.Errorf("unable to encode bare createNewStickerSet#19454551: field stickers element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode bare createNewStickerSet#87fd8611: field stickers element with index %d: %w", idx, err) } } b.PutString(c.Source) @@ -210,10 +195,10 @@ func (c *CreateNewStickerSetRequest) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (c *CreateNewStickerSetRequest) Decode(b *bin.Buffer) error { if c == nil { - return fmt.Errorf("can't decode createNewStickerSet#19454551 to nil") + return fmt.Errorf("can't decode createNewStickerSet#87fd8611 to nil") } if err := b.ConsumeID(CreateNewStickerSetRequestTypeID); err != nil { - return fmt.Errorf("unable to decode createNewStickerSet#19454551: %w", err) + return fmt.Errorf("unable to decode createNewStickerSet#87fd8611: %w", err) } return c.DecodeBare(b) } @@ -221,54 +206,47 @@ func (c *CreateNewStickerSetRequest) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (c *CreateNewStickerSetRequest) DecodeBare(b *bin.Buffer) error { if c == nil { - return fmt.Errorf("can't decode createNewStickerSet#19454551 to nil") + return fmt.Errorf("can't decode createNewStickerSet#87fd8611 to nil") } { value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode createNewStickerSet#19454551: field user_id: %w", err) + return fmt.Errorf("unable to decode createNewStickerSet#87fd8611: field user_id: %w", err) } c.UserID = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode createNewStickerSet#19454551: field title: %w", err) + return fmt.Errorf("unable to decode createNewStickerSet#87fd8611: field title: %w", err) } c.Title = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode createNewStickerSet#19454551: field name: %w", err) + return fmt.Errorf("unable to decode createNewStickerSet#87fd8611: field name: %w", err) } c.Name = value } - { - value, err := DecodeStickerFormat(b) - if err != nil { - return fmt.Errorf("unable to decode createNewStickerSet#19454551: field sticker_format: %w", err) - } - c.StickerFormat = value - } { value, err := DecodeStickerType(b) if err != nil { - return fmt.Errorf("unable to decode createNewStickerSet#19454551: field sticker_type: %w", err) + return fmt.Errorf("unable to decode createNewStickerSet#87fd8611: field sticker_type: %w", err) } c.StickerType = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode createNewStickerSet#19454551: field needs_repainting: %w", err) + return fmt.Errorf("unable to decode createNewStickerSet#87fd8611: field needs_repainting: %w", err) } c.NeedsRepainting = value } { headerLen, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode createNewStickerSet#19454551: field stickers: %w", err) + return fmt.Errorf("unable to decode createNewStickerSet#87fd8611: field stickers: %w", err) } if headerLen > 0 { @@ -277,7 +255,7 @@ func (c *CreateNewStickerSetRequest) DecodeBare(b *bin.Buffer) error { for idx := 0; idx < headerLen; idx++ { var value InputSticker if err := value.DecodeBare(b); err != nil { - return fmt.Errorf("unable to decode bare createNewStickerSet#19454551: field stickers: %w", err) + return fmt.Errorf("unable to decode bare createNewStickerSet#87fd8611: field stickers: %w", err) } c.Stickers = append(c.Stickers, value) } @@ -285,7 +263,7 @@ func (c *CreateNewStickerSetRequest) DecodeBare(b *bin.Buffer) error { { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode createNewStickerSet#19454551: field source: %w", err) + return fmt.Errorf("unable to decode createNewStickerSet#87fd8611: field source: %w", err) } c.Source = value } @@ -295,7 +273,7 @@ func (c *CreateNewStickerSetRequest) DecodeBare(b *bin.Buffer) error { // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (c *CreateNewStickerSetRequest) EncodeTDLibJSON(b tdjson.Encoder) error { if c == nil { - return fmt.Errorf("can't encode createNewStickerSet#19454551 as nil") + return fmt.Errorf("can't encode createNewStickerSet#87fd8611 as nil") } b.ObjStart() b.PutID("createNewStickerSet") @@ -309,20 +287,12 @@ func (c *CreateNewStickerSetRequest) EncodeTDLibJSON(b tdjson.Encoder) error { b.FieldStart("name") b.PutString(c.Name) b.Comma() - b.FieldStart("sticker_format") - if c.StickerFormat == nil { - return fmt.Errorf("unable to encode createNewStickerSet#19454551: field sticker_format is nil") - } - if err := c.StickerFormat.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode createNewStickerSet#19454551: field sticker_format: %w", err) - } - b.Comma() b.FieldStart("sticker_type") if c.StickerType == nil { - return fmt.Errorf("unable to encode createNewStickerSet#19454551: field sticker_type is nil") + return fmt.Errorf("unable to encode createNewStickerSet#87fd8611: field sticker_type is nil") } if err := c.StickerType.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode createNewStickerSet#19454551: field sticker_type: %w", err) + return fmt.Errorf("unable to encode createNewStickerSet#87fd8611: field sticker_type: %w", err) } b.Comma() b.FieldStart("needs_repainting") @@ -332,7 +302,7 @@ func (c *CreateNewStickerSetRequest) EncodeTDLibJSON(b tdjson.Encoder) error { b.ArrStart() for idx, v := range c.Stickers { if err := v.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode createNewStickerSet#19454551: field stickers element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode createNewStickerSet#87fd8611: field stickers element with index %d: %w", idx, err) } b.Comma() } @@ -350,66 +320,60 @@ func (c *CreateNewStickerSetRequest) EncodeTDLibJSON(b tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (c *CreateNewStickerSetRequest) DecodeTDLibJSON(b tdjson.Decoder) error { if c == nil { - return fmt.Errorf("can't decode createNewStickerSet#19454551 to nil") + return fmt.Errorf("can't decode createNewStickerSet#87fd8611 to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("createNewStickerSet"); err != nil { - return fmt.Errorf("unable to decode createNewStickerSet#19454551: %w", err) + return fmt.Errorf("unable to decode createNewStickerSet#87fd8611: %w", err) } case "user_id": value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode createNewStickerSet#19454551: field user_id: %w", err) + return fmt.Errorf("unable to decode createNewStickerSet#87fd8611: field user_id: %w", err) } c.UserID = value case "title": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode createNewStickerSet#19454551: field title: %w", err) + return fmt.Errorf("unable to decode createNewStickerSet#87fd8611: field title: %w", err) } c.Title = value case "name": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode createNewStickerSet#19454551: field name: %w", err) + return fmt.Errorf("unable to decode createNewStickerSet#87fd8611: field name: %w", err) } c.Name = value - case "sticker_format": - value, err := DecodeTDLibJSONStickerFormat(b) - if err != nil { - return fmt.Errorf("unable to decode createNewStickerSet#19454551: field sticker_format: %w", err) - } - c.StickerFormat = value case "sticker_type": value, err := DecodeTDLibJSONStickerType(b) if err != nil { - return fmt.Errorf("unable to decode createNewStickerSet#19454551: field sticker_type: %w", err) + return fmt.Errorf("unable to decode createNewStickerSet#87fd8611: field sticker_type: %w", err) } c.StickerType = value case "needs_repainting": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode createNewStickerSet#19454551: field needs_repainting: %w", err) + return fmt.Errorf("unable to decode createNewStickerSet#87fd8611: field needs_repainting: %w", err) } c.NeedsRepainting = value case "stickers": if err := b.Arr(func(b tdjson.Decoder) error { var value InputSticker if err := value.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode createNewStickerSet#19454551: field stickers: %w", err) + return fmt.Errorf("unable to decode createNewStickerSet#87fd8611: field stickers: %w", err) } c.Stickers = append(c.Stickers, value) return nil }); err != nil { - return fmt.Errorf("unable to decode createNewStickerSet#19454551: field stickers: %w", err) + return fmt.Errorf("unable to decode createNewStickerSet#87fd8611: field stickers: %w", err) } case "source": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode createNewStickerSet#19454551: field source: %w", err) + return fmt.Errorf("unable to decode createNewStickerSet#87fd8611: field source: %w", err) } c.Source = value default: @@ -443,14 +407,6 @@ func (c *CreateNewStickerSetRequest) GetName() (value string) { return c.Name } -// GetStickerFormat returns value of StickerFormat field. -func (c *CreateNewStickerSetRequest) GetStickerFormat() (value StickerFormatClass) { - if c == nil { - return - } - return c.StickerFormat -} - // GetStickerType returns value of StickerType field. func (c *CreateNewStickerSetRequest) GetStickerType() (value StickerTypeClass) { if c == nil { @@ -483,7 +439,7 @@ func (c *CreateNewStickerSetRequest) GetSource() (value string) { return c.Source } -// CreateNewStickerSet invokes method createNewStickerSet#19454551 returning error if any. +// CreateNewStickerSet invokes method createNewStickerSet#87fd8611 returning error if any. func (c *Client) CreateNewStickerSet(ctx context.Context, request *CreateNewStickerSetRequest) (*StickerSet, error) { var result StickerSet diff --git a/tdapi/tl_delete_sticker_set_gen.go b/tdapi/tl_delete_sticker_set_gen.go index 9b5ea91d2d..7d2654fad3 100644 --- a/tdapi/tl_delete_sticker_set_gen.go +++ b/tdapi/tl_delete_sticker_set_gen.go @@ -33,7 +33,7 @@ var ( // DeleteStickerSetRequest represents TL type `deleteStickerSet#5e0a7bad`. type DeleteStickerSetRequest struct { - // Sticker set name + // Sticker set name. The sticker set must be owned by the current user Name string } diff --git a/tdapi/tl_get_archived_sticker_sets_gen.go b/tdapi/tl_get_archived_sticker_sets_gen.go index 25b1cb2746..d2a28d884b 100644 --- a/tdapi/tl_get_archived_sticker_sets_gen.go +++ b/tdapi/tl_get_archived_sticker_sets_gen.go @@ -35,7 +35,8 @@ var ( type GetArchivedStickerSetsRequest struct { // Type of the sticker sets to return StickerType StickerTypeClass - // Identifier of the sticker set from which to return the result + // Identifier of the sticker set from which to return the result; use 0 to get results + // from the beginning OffsetStickerSetID int64 // The maximum number of sticker sets to return; up to 100 Limit int32 diff --git a/tdapi/tl_get_business_connection_gen.go b/tdapi/tl_get_business_connection_gen.go new file mode 100644 index 0000000000..514982c3c6 --- /dev/null +++ b/tdapi/tl_get_business_connection_gen.go @@ -0,0 +1,206 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// GetBusinessConnectionRequest represents TL type `getBusinessConnection#81f42420`. +type GetBusinessConnectionRequest struct { + // Identifier of the business connection to return + ConnectionID string +} + +// GetBusinessConnectionRequestTypeID is TL type id of GetBusinessConnectionRequest. +const GetBusinessConnectionRequestTypeID = 0x81f42420 + +// Ensuring interfaces in compile-time for GetBusinessConnectionRequest. +var ( + _ bin.Encoder = &GetBusinessConnectionRequest{} + _ bin.Decoder = &GetBusinessConnectionRequest{} + _ bin.BareEncoder = &GetBusinessConnectionRequest{} + _ bin.BareDecoder = &GetBusinessConnectionRequest{} +) + +func (g *GetBusinessConnectionRequest) Zero() bool { + if g == nil { + return true + } + if !(g.ConnectionID == "") { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (g *GetBusinessConnectionRequest) String() string { + if g == nil { + return "GetBusinessConnectionRequest(nil)" + } + type Alias GetBusinessConnectionRequest + return fmt.Sprintf("GetBusinessConnectionRequest%+v", Alias(*g)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*GetBusinessConnectionRequest) TypeID() uint32 { + return GetBusinessConnectionRequestTypeID +} + +// TypeName returns name of type in TL schema. +func (*GetBusinessConnectionRequest) TypeName() string { + return "getBusinessConnection" +} + +// TypeInfo returns info about TL type. +func (g *GetBusinessConnectionRequest) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "getBusinessConnection", + ID: GetBusinessConnectionRequestTypeID, + } + if g == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "ConnectionID", + SchemaName: "connection_id", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (g *GetBusinessConnectionRequest) Encode(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't encode getBusinessConnection#81f42420 as nil") + } + b.PutID(GetBusinessConnectionRequestTypeID) + return g.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (g *GetBusinessConnectionRequest) EncodeBare(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't encode getBusinessConnection#81f42420 as nil") + } + b.PutString(g.ConnectionID) + return nil +} + +// Decode implements bin.Decoder. +func (g *GetBusinessConnectionRequest) Decode(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't decode getBusinessConnection#81f42420 to nil") + } + if err := b.ConsumeID(GetBusinessConnectionRequestTypeID); err != nil { + return fmt.Errorf("unable to decode getBusinessConnection#81f42420: %w", err) + } + return g.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (g *GetBusinessConnectionRequest) DecodeBare(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't decode getBusinessConnection#81f42420 to nil") + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode getBusinessConnection#81f42420: field connection_id: %w", err) + } + g.ConnectionID = value + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (g *GetBusinessConnectionRequest) EncodeTDLibJSON(b tdjson.Encoder) error { + if g == nil { + return fmt.Errorf("can't encode getBusinessConnection#81f42420 as nil") + } + b.ObjStart() + b.PutID("getBusinessConnection") + b.Comma() + b.FieldStart("connection_id") + b.PutString(g.ConnectionID) + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (g *GetBusinessConnectionRequest) DecodeTDLibJSON(b tdjson.Decoder) error { + if g == nil { + return fmt.Errorf("can't decode getBusinessConnection#81f42420 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("getBusinessConnection"); err != nil { + return fmt.Errorf("unable to decode getBusinessConnection#81f42420: %w", err) + } + case "connection_id": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode getBusinessConnection#81f42420: field connection_id: %w", err) + } + g.ConnectionID = value + default: + return b.Skip() + } + return nil + }) +} + +// GetConnectionID returns value of ConnectionID field. +func (g *GetBusinessConnectionRequest) GetConnectionID() (value string) { + if g == nil { + return + } + return g.ConnectionID +} + +// GetBusinessConnection invokes method getBusinessConnection#81f42420 returning error if any. +func (c *Client) GetBusinessConnection(ctx context.Context, connectionid string) (*BusinessConnection, error) { + var result BusinessConnection + + request := &GetBusinessConnectionRequest{ + ConnectionID: connectionid, + } + if err := c.rpc.Invoke(ctx, request, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/tdapi/tl_get_business_features_gen.go b/tdapi/tl_get_business_features_gen.go new file mode 100644 index 0000000000..493fc7b1a0 --- /dev/null +++ b/tdapi/tl_get_business_features_gen.go @@ -0,0 +1,217 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// GetBusinessFeaturesRequest represents TL type `getBusinessFeatures#c4906001`. +type GetBusinessFeaturesRequest struct { + // Source of the request; pass null if the method is called from settings or some + // non-standard source + Source BusinessFeatureClass +} + +// GetBusinessFeaturesRequestTypeID is TL type id of GetBusinessFeaturesRequest. +const GetBusinessFeaturesRequestTypeID = 0xc4906001 + +// Ensuring interfaces in compile-time for GetBusinessFeaturesRequest. +var ( + _ bin.Encoder = &GetBusinessFeaturesRequest{} + _ bin.Decoder = &GetBusinessFeaturesRequest{} + _ bin.BareEncoder = &GetBusinessFeaturesRequest{} + _ bin.BareDecoder = &GetBusinessFeaturesRequest{} +) + +func (g *GetBusinessFeaturesRequest) Zero() bool { + if g == nil { + return true + } + if !(g.Source == nil) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (g *GetBusinessFeaturesRequest) String() string { + if g == nil { + return "GetBusinessFeaturesRequest(nil)" + } + type Alias GetBusinessFeaturesRequest + return fmt.Sprintf("GetBusinessFeaturesRequest%+v", Alias(*g)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*GetBusinessFeaturesRequest) TypeID() uint32 { + return GetBusinessFeaturesRequestTypeID +} + +// TypeName returns name of type in TL schema. +func (*GetBusinessFeaturesRequest) TypeName() string { + return "getBusinessFeatures" +} + +// TypeInfo returns info about TL type. +func (g *GetBusinessFeaturesRequest) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "getBusinessFeatures", + ID: GetBusinessFeaturesRequestTypeID, + } + if g == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Source", + SchemaName: "source", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (g *GetBusinessFeaturesRequest) Encode(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't encode getBusinessFeatures#c4906001 as nil") + } + b.PutID(GetBusinessFeaturesRequestTypeID) + return g.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (g *GetBusinessFeaturesRequest) EncodeBare(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't encode getBusinessFeatures#c4906001 as nil") + } + if g.Source == nil { + return fmt.Errorf("unable to encode getBusinessFeatures#c4906001: field source is nil") + } + if err := g.Source.Encode(b); err != nil { + return fmt.Errorf("unable to encode getBusinessFeatures#c4906001: field source: %w", err) + } + return nil +} + +// Decode implements bin.Decoder. +func (g *GetBusinessFeaturesRequest) Decode(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't decode getBusinessFeatures#c4906001 to nil") + } + if err := b.ConsumeID(GetBusinessFeaturesRequestTypeID); err != nil { + return fmt.Errorf("unable to decode getBusinessFeatures#c4906001: %w", err) + } + return g.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (g *GetBusinessFeaturesRequest) DecodeBare(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't decode getBusinessFeatures#c4906001 to nil") + } + { + value, err := DecodeBusinessFeature(b) + if err != nil { + return fmt.Errorf("unable to decode getBusinessFeatures#c4906001: field source: %w", err) + } + g.Source = value + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (g *GetBusinessFeaturesRequest) EncodeTDLibJSON(b tdjson.Encoder) error { + if g == nil { + return fmt.Errorf("can't encode getBusinessFeatures#c4906001 as nil") + } + b.ObjStart() + b.PutID("getBusinessFeatures") + b.Comma() + b.FieldStart("source") + if g.Source == nil { + return fmt.Errorf("unable to encode getBusinessFeatures#c4906001: field source is nil") + } + if err := g.Source.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode getBusinessFeatures#c4906001: field source: %w", err) + } + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (g *GetBusinessFeaturesRequest) DecodeTDLibJSON(b tdjson.Decoder) error { + if g == nil { + return fmt.Errorf("can't decode getBusinessFeatures#c4906001 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("getBusinessFeatures"); err != nil { + return fmt.Errorf("unable to decode getBusinessFeatures#c4906001: %w", err) + } + case "source": + value, err := DecodeTDLibJSONBusinessFeature(b) + if err != nil { + return fmt.Errorf("unable to decode getBusinessFeatures#c4906001: field source: %w", err) + } + g.Source = value + default: + return b.Skip() + } + return nil + }) +} + +// GetSource returns value of Source field. +func (g *GetBusinessFeaturesRequest) GetSource() (value BusinessFeatureClass) { + if g == nil { + return + } + return g.Source +} + +// GetBusinessFeatures invokes method getBusinessFeatures#c4906001 returning error if any. +func (c *Client) GetBusinessFeatures(ctx context.Context, source BusinessFeatureClass) (*BusinessFeatures, error) { + var result BusinessFeatures + + request := &GetBusinessFeaturesRequest{ + Source: source, + } + if err := c.rpc.Invoke(ctx, request, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/tdapi/tl_get_collectible_item_info_gen.go b/tdapi/tl_get_collectible_item_info_gen.go new file mode 100644 index 0000000000..57db4b7c79 --- /dev/null +++ b/tdapi/tl_get_collectible_item_info_gen.go @@ -0,0 +1,217 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// GetCollectibleItemInfoRequest represents TL type `getCollectibleItemInfo#f304ad8a`. +type GetCollectibleItemInfoRequest struct { + // Type of the collectible item. The item must be used by a user and must be visible to + // the current user + Type CollectibleItemTypeClass +} + +// GetCollectibleItemInfoRequestTypeID is TL type id of GetCollectibleItemInfoRequest. +const GetCollectibleItemInfoRequestTypeID = 0xf304ad8a + +// Ensuring interfaces in compile-time for GetCollectibleItemInfoRequest. +var ( + _ bin.Encoder = &GetCollectibleItemInfoRequest{} + _ bin.Decoder = &GetCollectibleItemInfoRequest{} + _ bin.BareEncoder = &GetCollectibleItemInfoRequest{} + _ bin.BareDecoder = &GetCollectibleItemInfoRequest{} +) + +func (g *GetCollectibleItemInfoRequest) Zero() bool { + if g == nil { + return true + } + if !(g.Type == nil) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (g *GetCollectibleItemInfoRequest) String() string { + if g == nil { + return "GetCollectibleItemInfoRequest(nil)" + } + type Alias GetCollectibleItemInfoRequest + return fmt.Sprintf("GetCollectibleItemInfoRequest%+v", Alias(*g)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*GetCollectibleItemInfoRequest) TypeID() uint32 { + return GetCollectibleItemInfoRequestTypeID +} + +// TypeName returns name of type in TL schema. +func (*GetCollectibleItemInfoRequest) TypeName() string { + return "getCollectibleItemInfo" +} + +// TypeInfo returns info about TL type. +func (g *GetCollectibleItemInfoRequest) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "getCollectibleItemInfo", + ID: GetCollectibleItemInfoRequestTypeID, + } + if g == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Type", + SchemaName: "type", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (g *GetCollectibleItemInfoRequest) Encode(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't encode getCollectibleItemInfo#f304ad8a as nil") + } + b.PutID(GetCollectibleItemInfoRequestTypeID) + return g.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (g *GetCollectibleItemInfoRequest) EncodeBare(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't encode getCollectibleItemInfo#f304ad8a as nil") + } + if g.Type == nil { + return fmt.Errorf("unable to encode getCollectibleItemInfo#f304ad8a: field type is nil") + } + if err := g.Type.Encode(b); err != nil { + return fmt.Errorf("unable to encode getCollectibleItemInfo#f304ad8a: field type: %w", err) + } + return nil +} + +// Decode implements bin.Decoder. +func (g *GetCollectibleItemInfoRequest) Decode(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't decode getCollectibleItemInfo#f304ad8a to nil") + } + if err := b.ConsumeID(GetCollectibleItemInfoRequestTypeID); err != nil { + return fmt.Errorf("unable to decode getCollectibleItemInfo#f304ad8a: %w", err) + } + return g.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (g *GetCollectibleItemInfoRequest) DecodeBare(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't decode getCollectibleItemInfo#f304ad8a to nil") + } + { + value, err := DecodeCollectibleItemType(b) + if err != nil { + return fmt.Errorf("unable to decode getCollectibleItemInfo#f304ad8a: field type: %w", err) + } + g.Type = value + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (g *GetCollectibleItemInfoRequest) EncodeTDLibJSON(b tdjson.Encoder) error { + if g == nil { + return fmt.Errorf("can't encode getCollectibleItemInfo#f304ad8a as nil") + } + b.ObjStart() + b.PutID("getCollectibleItemInfo") + b.Comma() + b.FieldStart("type") + if g.Type == nil { + return fmt.Errorf("unable to encode getCollectibleItemInfo#f304ad8a: field type is nil") + } + if err := g.Type.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode getCollectibleItemInfo#f304ad8a: field type: %w", err) + } + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (g *GetCollectibleItemInfoRequest) DecodeTDLibJSON(b tdjson.Decoder) error { + if g == nil { + return fmt.Errorf("can't decode getCollectibleItemInfo#f304ad8a to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("getCollectibleItemInfo"); err != nil { + return fmt.Errorf("unable to decode getCollectibleItemInfo#f304ad8a: %w", err) + } + case "type": + value, err := DecodeTDLibJSONCollectibleItemType(b) + if err != nil { + return fmt.Errorf("unable to decode getCollectibleItemInfo#f304ad8a: field type: %w", err) + } + g.Type = value + default: + return b.Skip() + } + return nil + }) +} + +// GetType returns value of Type field. +func (g *GetCollectibleItemInfoRequest) GetType() (value CollectibleItemTypeClass) { + if g == nil { + return + } + return g.Type +} + +// GetCollectibleItemInfo invokes method getCollectibleItemInfo#f304ad8a returning error if any. +func (c *Client) GetCollectibleItemInfo(ctx context.Context, type_ CollectibleItemTypeClass) (*CollectibleItemInfo, error) { + var result CollectibleItemInfo + + request := &GetCollectibleItemInfoRequest{ + Type: type_, + } + if err := c.rpc.Invoke(ctx, request, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/tdapi/tl_get_owned_sticker_sets_gen.go b/tdapi/tl_get_owned_sticker_sets_gen.go new file mode 100644 index 0000000000..07cbf9abeb --- /dev/null +++ b/tdapi/tl_get_owned_sticker_sets_gen.go @@ -0,0 +1,240 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// GetOwnedStickerSetsRequest represents TL type `getOwnedStickerSets#58fe8120`. +type GetOwnedStickerSetsRequest struct { + // Identifier of the sticker set from which to return owned sticker sets; use 0 to get + // results from the beginning + OffsetStickerSetID int64 + // The maximum number of sticker sets to be returned; must be positive and can't be + // greater than 100. For optimal performance, the number of returned objects is chosen by + // TDLib and can be smaller than the specified limit + Limit int32 +} + +// GetOwnedStickerSetsRequestTypeID is TL type id of GetOwnedStickerSetsRequest. +const GetOwnedStickerSetsRequestTypeID = 0x58fe8120 + +// Ensuring interfaces in compile-time for GetOwnedStickerSetsRequest. +var ( + _ bin.Encoder = &GetOwnedStickerSetsRequest{} + _ bin.Decoder = &GetOwnedStickerSetsRequest{} + _ bin.BareEncoder = &GetOwnedStickerSetsRequest{} + _ bin.BareDecoder = &GetOwnedStickerSetsRequest{} +) + +func (g *GetOwnedStickerSetsRequest) Zero() bool { + if g == nil { + return true + } + if !(g.OffsetStickerSetID == 0) { + return false + } + if !(g.Limit == 0) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (g *GetOwnedStickerSetsRequest) String() string { + if g == nil { + return "GetOwnedStickerSetsRequest(nil)" + } + type Alias GetOwnedStickerSetsRequest + return fmt.Sprintf("GetOwnedStickerSetsRequest%+v", Alias(*g)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*GetOwnedStickerSetsRequest) TypeID() uint32 { + return GetOwnedStickerSetsRequestTypeID +} + +// TypeName returns name of type in TL schema. +func (*GetOwnedStickerSetsRequest) TypeName() string { + return "getOwnedStickerSets" +} + +// TypeInfo returns info about TL type. +func (g *GetOwnedStickerSetsRequest) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "getOwnedStickerSets", + ID: GetOwnedStickerSetsRequestTypeID, + } + if g == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "OffsetStickerSetID", + SchemaName: "offset_sticker_set_id", + }, + { + Name: "Limit", + SchemaName: "limit", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (g *GetOwnedStickerSetsRequest) Encode(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't encode getOwnedStickerSets#58fe8120 as nil") + } + b.PutID(GetOwnedStickerSetsRequestTypeID) + return g.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (g *GetOwnedStickerSetsRequest) EncodeBare(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't encode getOwnedStickerSets#58fe8120 as nil") + } + b.PutLong(g.OffsetStickerSetID) + b.PutInt32(g.Limit) + return nil +} + +// Decode implements bin.Decoder. +func (g *GetOwnedStickerSetsRequest) Decode(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't decode getOwnedStickerSets#58fe8120 to nil") + } + if err := b.ConsumeID(GetOwnedStickerSetsRequestTypeID); err != nil { + return fmt.Errorf("unable to decode getOwnedStickerSets#58fe8120: %w", err) + } + return g.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (g *GetOwnedStickerSetsRequest) DecodeBare(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't decode getOwnedStickerSets#58fe8120 to nil") + } + { + value, err := b.Long() + if err != nil { + return fmt.Errorf("unable to decode getOwnedStickerSets#58fe8120: field offset_sticker_set_id: %w", err) + } + g.OffsetStickerSetID = value + } + { + value, err := b.Int32() + if err != nil { + return fmt.Errorf("unable to decode getOwnedStickerSets#58fe8120: field limit: %w", err) + } + g.Limit = value + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (g *GetOwnedStickerSetsRequest) EncodeTDLibJSON(b tdjson.Encoder) error { + if g == nil { + return fmt.Errorf("can't encode getOwnedStickerSets#58fe8120 as nil") + } + b.ObjStart() + b.PutID("getOwnedStickerSets") + b.Comma() + b.FieldStart("offset_sticker_set_id") + b.PutLong(g.OffsetStickerSetID) + b.Comma() + b.FieldStart("limit") + b.PutInt32(g.Limit) + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (g *GetOwnedStickerSetsRequest) DecodeTDLibJSON(b tdjson.Decoder) error { + if g == nil { + return fmt.Errorf("can't decode getOwnedStickerSets#58fe8120 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("getOwnedStickerSets"); err != nil { + return fmt.Errorf("unable to decode getOwnedStickerSets#58fe8120: %w", err) + } + case "offset_sticker_set_id": + value, err := b.Long() + if err != nil { + return fmt.Errorf("unable to decode getOwnedStickerSets#58fe8120: field offset_sticker_set_id: %w", err) + } + g.OffsetStickerSetID = value + case "limit": + value, err := b.Int32() + if err != nil { + return fmt.Errorf("unable to decode getOwnedStickerSets#58fe8120: field limit: %w", err) + } + g.Limit = value + default: + return b.Skip() + } + return nil + }) +} + +// GetOffsetStickerSetID returns value of OffsetStickerSetID field. +func (g *GetOwnedStickerSetsRequest) GetOffsetStickerSetID() (value int64) { + if g == nil { + return + } + return g.OffsetStickerSetID +} + +// GetLimit returns value of Limit field. +func (g *GetOwnedStickerSetsRequest) GetLimit() (value int32) { + if g == nil { + return + } + return g.Limit +} + +// GetOwnedStickerSets invokes method getOwnedStickerSets#58fe8120 returning error if any. +func (c *Client) GetOwnedStickerSets(ctx context.Context, request *GetOwnedStickerSetsRequest) (*StickerSets, error) { + var result StickerSets + + if err := c.rpc.Invoke(ctx, request, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/tdapi/tl_get_suitable_personal_chats_gen.go b/tdapi/tl_get_suitable_personal_chats_gen.go new file mode 100644 index 0000000000..2ae2ceff5f --- /dev/null +++ b/tdapi/tl_get_suitable_personal_chats_gen.go @@ -0,0 +1,169 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// GetSuitablePersonalChatsRequest represents TL type `getSuitablePersonalChats#90849bf5`. +type GetSuitablePersonalChatsRequest struct { +} + +// GetSuitablePersonalChatsRequestTypeID is TL type id of GetSuitablePersonalChatsRequest. +const GetSuitablePersonalChatsRequestTypeID = 0x90849bf5 + +// Ensuring interfaces in compile-time for GetSuitablePersonalChatsRequest. +var ( + _ bin.Encoder = &GetSuitablePersonalChatsRequest{} + _ bin.Decoder = &GetSuitablePersonalChatsRequest{} + _ bin.BareEncoder = &GetSuitablePersonalChatsRequest{} + _ bin.BareDecoder = &GetSuitablePersonalChatsRequest{} +) + +func (g *GetSuitablePersonalChatsRequest) Zero() bool { + if g == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (g *GetSuitablePersonalChatsRequest) String() string { + if g == nil { + return "GetSuitablePersonalChatsRequest(nil)" + } + type Alias GetSuitablePersonalChatsRequest + return fmt.Sprintf("GetSuitablePersonalChatsRequest%+v", Alias(*g)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*GetSuitablePersonalChatsRequest) TypeID() uint32 { + return GetSuitablePersonalChatsRequestTypeID +} + +// TypeName returns name of type in TL schema. +func (*GetSuitablePersonalChatsRequest) TypeName() string { + return "getSuitablePersonalChats" +} + +// TypeInfo returns info about TL type. +func (g *GetSuitablePersonalChatsRequest) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "getSuitablePersonalChats", + ID: GetSuitablePersonalChatsRequestTypeID, + } + if g == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (g *GetSuitablePersonalChatsRequest) Encode(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't encode getSuitablePersonalChats#90849bf5 as nil") + } + b.PutID(GetSuitablePersonalChatsRequestTypeID) + return g.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (g *GetSuitablePersonalChatsRequest) EncodeBare(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't encode getSuitablePersonalChats#90849bf5 as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (g *GetSuitablePersonalChatsRequest) Decode(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't decode getSuitablePersonalChats#90849bf5 to nil") + } + if err := b.ConsumeID(GetSuitablePersonalChatsRequestTypeID); err != nil { + return fmt.Errorf("unable to decode getSuitablePersonalChats#90849bf5: %w", err) + } + return g.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (g *GetSuitablePersonalChatsRequest) DecodeBare(b *bin.Buffer) error { + if g == nil { + return fmt.Errorf("can't decode getSuitablePersonalChats#90849bf5 to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (g *GetSuitablePersonalChatsRequest) EncodeTDLibJSON(b tdjson.Encoder) error { + if g == nil { + return fmt.Errorf("can't encode getSuitablePersonalChats#90849bf5 as nil") + } + b.ObjStart() + b.PutID("getSuitablePersonalChats") + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (g *GetSuitablePersonalChatsRequest) DecodeTDLibJSON(b tdjson.Decoder) error { + if g == nil { + return fmt.Errorf("can't decode getSuitablePersonalChats#90849bf5 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("getSuitablePersonalChats"); err != nil { + return fmt.Errorf("unable to decode getSuitablePersonalChats#90849bf5: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// GetSuitablePersonalChats invokes method getSuitablePersonalChats#90849bf5 returning error if any. +func (c *Client) GetSuitablePersonalChats(ctx context.Context) (*Chats, error) { + var result Chats + + request := &GetSuitablePersonalChatsRequest{} + if err := c.rpc.Invoke(ctx, request, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/tdapi/tl_input_business_intro_gen.go b/tdapi/tl_input_business_intro_gen.go new file mode 100644 index 0000000000..b591f6959a --- /dev/null +++ b/tdapi/tl_input_business_intro_gen.go @@ -0,0 +1,272 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// InputBusinessIntro represents TL type `inputBusinessIntro#910fb07`. +type InputBusinessIntro struct { + // Title text of the intro; 0-getOption("business_intro_title_length_max") characters + Title string + // Message text of the intro; 0-getOption("business_intro_message_length_max") characters + Message string + // Greeting sticker of the intro; pass null if none. The sticker must belong to a sticker + // set and must not be a custom emoji + Sticker InputFileClass +} + +// InputBusinessIntroTypeID is TL type id of InputBusinessIntro. +const InputBusinessIntroTypeID = 0x910fb07 + +// Ensuring interfaces in compile-time for InputBusinessIntro. +var ( + _ bin.Encoder = &InputBusinessIntro{} + _ bin.Decoder = &InputBusinessIntro{} + _ bin.BareEncoder = &InputBusinessIntro{} + _ bin.BareDecoder = &InputBusinessIntro{} +) + +func (i *InputBusinessIntro) Zero() bool { + if i == nil { + return true + } + if !(i.Title == "") { + return false + } + if !(i.Message == "") { + return false + } + if !(i.Sticker == nil) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (i *InputBusinessIntro) String() string { + if i == nil { + return "InputBusinessIntro(nil)" + } + type Alias InputBusinessIntro + return fmt.Sprintf("InputBusinessIntro%+v", Alias(*i)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*InputBusinessIntro) TypeID() uint32 { + return InputBusinessIntroTypeID +} + +// TypeName returns name of type in TL schema. +func (*InputBusinessIntro) TypeName() string { + return "inputBusinessIntro" +} + +// TypeInfo returns info about TL type. +func (i *InputBusinessIntro) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "inputBusinessIntro", + ID: InputBusinessIntroTypeID, + } + if i == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Title", + SchemaName: "title", + }, + { + Name: "Message", + SchemaName: "message", + }, + { + Name: "Sticker", + SchemaName: "sticker", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (i *InputBusinessIntro) Encode(b *bin.Buffer) error { + if i == nil { + return fmt.Errorf("can't encode inputBusinessIntro#910fb07 as nil") + } + b.PutID(InputBusinessIntroTypeID) + return i.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (i *InputBusinessIntro) EncodeBare(b *bin.Buffer) error { + if i == nil { + return fmt.Errorf("can't encode inputBusinessIntro#910fb07 as nil") + } + b.PutString(i.Title) + b.PutString(i.Message) + if i.Sticker == nil { + return fmt.Errorf("unable to encode inputBusinessIntro#910fb07: field sticker is nil") + } + if err := i.Sticker.Encode(b); err != nil { + return fmt.Errorf("unable to encode inputBusinessIntro#910fb07: field sticker: %w", err) + } + return nil +} + +// Decode implements bin.Decoder. +func (i *InputBusinessIntro) Decode(b *bin.Buffer) error { + if i == nil { + return fmt.Errorf("can't decode inputBusinessIntro#910fb07 to nil") + } + if err := b.ConsumeID(InputBusinessIntroTypeID); err != nil { + return fmt.Errorf("unable to decode inputBusinessIntro#910fb07: %w", err) + } + return i.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (i *InputBusinessIntro) DecodeBare(b *bin.Buffer) error { + if i == nil { + return fmt.Errorf("can't decode inputBusinessIntro#910fb07 to nil") + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode inputBusinessIntro#910fb07: field title: %w", err) + } + i.Title = value + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode inputBusinessIntro#910fb07: field message: %w", err) + } + i.Message = value + } + { + value, err := DecodeInputFile(b) + if err != nil { + return fmt.Errorf("unable to decode inputBusinessIntro#910fb07: field sticker: %w", err) + } + i.Sticker = value + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (i *InputBusinessIntro) EncodeTDLibJSON(b tdjson.Encoder) error { + if i == nil { + return fmt.Errorf("can't encode inputBusinessIntro#910fb07 as nil") + } + b.ObjStart() + b.PutID("inputBusinessIntro") + b.Comma() + b.FieldStart("title") + b.PutString(i.Title) + b.Comma() + b.FieldStart("message") + b.PutString(i.Message) + b.Comma() + b.FieldStart("sticker") + if i.Sticker == nil { + return fmt.Errorf("unable to encode inputBusinessIntro#910fb07: field sticker is nil") + } + if err := i.Sticker.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode inputBusinessIntro#910fb07: field sticker: %w", err) + } + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (i *InputBusinessIntro) DecodeTDLibJSON(b tdjson.Decoder) error { + if i == nil { + return fmt.Errorf("can't decode inputBusinessIntro#910fb07 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("inputBusinessIntro"); err != nil { + return fmt.Errorf("unable to decode inputBusinessIntro#910fb07: %w", err) + } + case "title": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode inputBusinessIntro#910fb07: field title: %w", err) + } + i.Title = value + case "message": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode inputBusinessIntro#910fb07: field message: %w", err) + } + i.Message = value + case "sticker": + value, err := DecodeTDLibJSONInputFile(b) + if err != nil { + return fmt.Errorf("unable to decode inputBusinessIntro#910fb07: field sticker: %w", err) + } + i.Sticker = value + default: + return b.Skip() + } + return nil + }) +} + +// GetTitle returns value of Title field. +func (i *InputBusinessIntro) GetTitle() (value string) { + if i == nil { + return + } + return i.Title +} + +// GetMessage returns value of Message field. +func (i *InputBusinessIntro) GetMessage() (value string) { + if i == nil { + return + } + return i.Message +} + +// GetSticker returns value of Sticker field. +func (i *InputBusinessIntro) GetSticker() (value InputFileClass) { + if i == nil { + return + } + return i.Sticker +} diff --git a/tdapi/tl_input_message_content_gen.go b/tdapi/tl_input_message_content_gen.go index 079bf43d14..d4306cd8c2 100644 --- a/tdapi/tl_input_message_content_gen.go +++ b/tdapi/tl_input_message_content_gen.go @@ -2623,7 +2623,7 @@ type InputMessageVideoNote struct { VideoNote InputFileClass // Video thumbnail; may be null if empty; pass null to skip thumbnail uploading Thumbnail InputThumbnail - // Duration of the video, in seconds + // Duration of the video, in seconds; 0-60 Duration int32 // Video width and height; must be positive and not greater than 640 Length int32 diff --git a/tdapi/tl_input_sticker_gen.go b/tdapi/tl_input_sticker_gen.go index c0bea00368..ddf49f5467 100644 --- a/tdapi/tl_input_sticker_gen.go +++ b/tdapi/tl_input_sticker_gen.go @@ -31,11 +31,13 @@ var ( _ = tdjson.Encoder{} ) -// InputSticker represents TL type `inputSticker#e3d1ef79`. +// InputSticker represents TL type `inputSticker#1f1d0998`. type InputSticker struct { // File with the sticker; must fit in a 512x512 square. For WEBP stickers the file must // be in WEBP or PNG format, which will be converted to WEBP server-side. Sticker InputFileClass + // Format of the sticker + Format StickerFormatClass // String with 1-20 emoji corresponding to the sticker Emojis string // Position where the mask is placed; pass null if not specified @@ -46,7 +48,7 @@ type InputSticker struct { } // InputStickerTypeID is TL type id of InputSticker. -const InputStickerTypeID = 0xe3d1ef79 +const InputStickerTypeID = 0x1f1d0998 // Ensuring interfaces in compile-time for InputSticker. var ( @@ -63,6 +65,9 @@ func (i *InputSticker) Zero() bool { if !(i.Sticker == nil) { return false } + if !(i.Format == nil) { + return false + } if !(i.Emojis == "") { return false } @@ -112,6 +117,10 @@ func (i *InputSticker) TypeInfo() tdp.Type { Name: "Sticker", SchemaName: "sticker", }, + { + Name: "Format", + SchemaName: "format", + }, { Name: "Emojis", SchemaName: "emojis", @@ -131,7 +140,7 @@ func (i *InputSticker) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (i *InputSticker) Encode(b *bin.Buffer) error { if i == nil { - return fmt.Errorf("can't encode inputSticker#e3d1ef79 as nil") + return fmt.Errorf("can't encode inputSticker#1f1d0998 as nil") } b.PutID(InputStickerTypeID) return i.EncodeBare(b) @@ -140,17 +149,23 @@ func (i *InputSticker) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (i *InputSticker) EncodeBare(b *bin.Buffer) error { if i == nil { - return fmt.Errorf("can't encode inputSticker#e3d1ef79 as nil") + return fmt.Errorf("can't encode inputSticker#1f1d0998 as nil") } if i.Sticker == nil { - return fmt.Errorf("unable to encode inputSticker#e3d1ef79: field sticker is nil") + return fmt.Errorf("unable to encode inputSticker#1f1d0998: field sticker is nil") } if err := i.Sticker.Encode(b); err != nil { - return fmt.Errorf("unable to encode inputSticker#e3d1ef79: field sticker: %w", err) + return fmt.Errorf("unable to encode inputSticker#1f1d0998: field sticker: %w", err) + } + if i.Format == nil { + return fmt.Errorf("unable to encode inputSticker#1f1d0998: field format is nil") + } + if err := i.Format.Encode(b); err != nil { + return fmt.Errorf("unable to encode inputSticker#1f1d0998: field format: %w", err) } b.PutString(i.Emojis) if err := i.MaskPosition.Encode(b); err != nil { - return fmt.Errorf("unable to encode inputSticker#e3d1ef79: field mask_position: %w", err) + return fmt.Errorf("unable to encode inputSticker#1f1d0998: field mask_position: %w", err) } b.PutInt(len(i.Keywords)) for _, v := range i.Keywords { @@ -162,10 +177,10 @@ func (i *InputSticker) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (i *InputSticker) Decode(b *bin.Buffer) error { if i == nil { - return fmt.Errorf("can't decode inputSticker#e3d1ef79 to nil") + return fmt.Errorf("can't decode inputSticker#1f1d0998 to nil") } if err := b.ConsumeID(InputStickerTypeID); err != nil { - return fmt.Errorf("unable to decode inputSticker#e3d1ef79: %w", err) + return fmt.Errorf("unable to decode inputSticker#1f1d0998: %w", err) } return i.DecodeBare(b) } @@ -173,31 +188,38 @@ func (i *InputSticker) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (i *InputSticker) DecodeBare(b *bin.Buffer) error { if i == nil { - return fmt.Errorf("can't decode inputSticker#e3d1ef79 to nil") + return fmt.Errorf("can't decode inputSticker#1f1d0998 to nil") } { value, err := DecodeInputFile(b) if err != nil { - return fmt.Errorf("unable to decode inputSticker#e3d1ef79: field sticker: %w", err) + return fmt.Errorf("unable to decode inputSticker#1f1d0998: field sticker: %w", err) } i.Sticker = value } + { + value, err := DecodeStickerFormat(b) + if err != nil { + return fmt.Errorf("unable to decode inputSticker#1f1d0998: field format: %w", err) + } + i.Format = value + } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode inputSticker#e3d1ef79: field emojis: %w", err) + return fmt.Errorf("unable to decode inputSticker#1f1d0998: field emojis: %w", err) } i.Emojis = value } { if err := i.MaskPosition.Decode(b); err != nil { - return fmt.Errorf("unable to decode inputSticker#e3d1ef79: field mask_position: %w", err) + return fmt.Errorf("unable to decode inputSticker#1f1d0998: field mask_position: %w", err) } } { headerLen, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode inputSticker#e3d1ef79: field keywords: %w", err) + return fmt.Errorf("unable to decode inputSticker#1f1d0998: field keywords: %w", err) } if headerLen > 0 { @@ -206,7 +228,7 @@ func (i *InputSticker) DecodeBare(b *bin.Buffer) error { for idx := 0; idx < headerLen; idx++ { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode inputSticker#e3d1ef79: field keywords: %w", err) + return fmt.Errorf("unable to decode inputSticker#1f1d0998: field keywords: %w", err) } i.Keywords = append(i.Keywords, value) } @@ -217,17 +239,25 @@ func (i *InputSticker) DecodeBare(b *bin.Buffer) error { // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (i *InputSticker) EncodeTDLibJSON(b tdjson.Encoder) error { if i == nil { - return fmt.Errorf("can't encode inputSticker#e3d1ef79 as nil") + return fmt.Errorf("can't encode inputSticker#1f1d0998 as nil") } b.ObjStart() b.PutID("inputSticker") b.Comma() b.FieldStart("sticker") if i.Sticker == nil { - return fmt.Errorf("unable to encode inputSticker#e3d1ef79: field sticker is nil") + return fmt.Errorf("unable to encode inputSticker#1f1d0998: field sticker is nil") } if err := i.Sticker.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode inputSticker#e3d1ef79: field sticker: %w", err) + return fmt.Errorf("unable to encode inputSticker#1f1d0998: field sticker: %w", err) + } + b.Comma() + b.FieldStart("format") + if i.Format == nil { + return fmt.Errorf("unable to encode inputSticker#1f1d0998: field format is nil") + } + if err := i.Format.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode inputSticker#1f1d0998: field format: %w", err) } b.Comma() b.FieldStart("emojis") @@ -235,7 +265,7 @@ func (i *InputSticker) EncodeTDLibJSON(b tdjson.Encoder) error { b.Comma() b.FieldStart("mask_position") if err := i.MaskPosition.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode inputSticker#e3d1ef79: field mask_position: %w", err) + return fmt.Errorf("unable to encode inputSticker#1f1d0998: field mask_position: %w", err) } b.Comma() b.FieldStart("keywords") @@ -255,41 +285,47 @@ func (i *InputSticker) EncodeTDLibJSON(b tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (i *InputSticker) DecodeTDLibJSON(b tdjson.Decoder) error { if i == nil { - return fmt.Errorf("can't decode inputSticker#e3d1ef79 to nil") + return fmt.Errorf("can't decode inputSticker#1f1d0998 to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("inputSticker"); err != nil { - return fmt.Errorf("unable to decode inputSticker#e3d1ef79: %w", err) + return fmt.Errorf("unable to decode inputSticker#1f1d0998: %w", err) } case "sticker": value, err := DecodeTDLibJSONInputFile(b) if err != nil { - return fmt.Errorf("unable to decode inputSticker#e3d1ef79: field sticker: %w", err) + return fmt.Errorf("unable to decode inputSticker#1f1d0998: field sticker: %w", err) } i.Sticker = value + case "format": + value, err := DecodeTDLibJSONStickerFormat(b) + if err != nil { + return fmt.Errorf("unable to decode inputSticker#1f1d0998: field format: %w", err) + } + i.Format = value case "emojis": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode inputSticker#e3d1ef79: field emojis: %w", err) + return fmt.Errorf("unable to decode inputSticker#1f1d0998: field emojis: %w", err) } i.Emojis = value case "mask_position": if err := i.MaskPosition.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode inputSticker#e3d1ef79: field mask_position: %w", err) + return fmt.Errorf("unable to decode inputSticker#1f1d0998: field mask_position: %w", err) } case "keywords": if err := b.Arr(func(b tdjson.Decoder) error { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode inputSticker#e3d1ef79: field keywords: %w", err) + return fmt.Errorf("unable to decode inputSticker#1f1d0998: field keywords: %w", err) } i.Keywords = append(i.Keywords, value) return nil }); err != nil { - return fmt.Errorf("unable to decode inputSticker#e3d1ef79: field keywords: %w", err) + return fmt.Errorf("unable to decode inputSticker#1f1d0998: field keywords: %w", err) } default: return b.Skip() @@ -306,6 +342,14 @@ func (i *InputSticker) GetSticker() (value InputFileClass) { return i.Sticker } +// GetFormat returns value of Format field. +func (i *InputSticker) GetFormat() (value StickerFormatClass) { + if i == nil { + return + } + return i.Format +} + // GetEmojis returns value of Emojis field. func (i *InputSticker) GetEmojis() (value string) { if i == nil { diff --git a/tdapi/tl_internal_link_type_gen.go b/tdapi/tl_internal_link_type_gen.go index 1344b36871..768dd01db8 100644 --- a/tdapi/tl_internal_link_type_gen.go +++ b/tdapi/tl_internal_link_type_gen.go @@ -3663,7 +3663,7 @@ func (i *InternalLinkTypeMessageDraft) GetContainsLink() (value bool) { // InternalLinkTypePassportDataRequest represents TL type `internalLinkTypePassportDataRequest#c50fce81`. type InternalLinkTypePassportDataRequest struct { - // User identifier of the service's bot + // User identifier of the service's bot; the corresponding user may be unknown yet BotUserID int64 // Telegram Passport element types requested by the service Scope string diff --git a/tdapi/tl_keyboard_button_type_gen.go b/tdapi/tl_keyboard_button_type_gen.go index c661a818d0..2a9552490e 100644 --- a/tdapi/tl_keyboard_button_type_gen.go +++ b/tdapi/tl_keyboard_button_type_gen.go @@ -624,7 +624,7 @@ func (k *KeyboardButtonTypeRequestPoll) GetForceQuiz() (value bool) { return k.ForceQuiz } -// KeyboardButtonTypeRequestUsers represents TL type `keyboardButtonTypeRequestUsers#7e63ef90`. +// KeyboardButtonTypeRequestUsers represents TL type `keyboardButtonTypeRequestUsers#985c8bfd`. type KeyboardButtonTypeRequestUsers struct { // Unique button identifier ID int32 @@ -640,10 +640,16 @@ type KeyboardButtonTypeRequestUsers struct { UserIsPremium bool // The maximum number of users to share MaxQuantity int32 + // Pass true to request name of the users; bots only + RequestName bool + // Pass true to request username of the users; bots only + RequestUsername bool + // Pass true to request photo of the users; bots only + RequestPhoto bool } // KeyboardButtonTypeRequestUsersTypeID is TL type id of KeyboardButtonTypeRequestUsers. -const KeyboardButtonTypeRequestUsersTypeID = 0x7e63ef90 +const KeyboardButtonTypeRequestUsersTypeID = 0x985c8bfd // construct implements constructor of KeyboardButtonTypeClass. func (k KeyboardButtonTypeRequestUsers) construct() KeyboardButtonTypeClass { return &k } @@ -680,6 +686,15 @@ func (k *KeyboardButtonTypeRequestUsers) Zero() bool { if !(k.MaxQuantity == 0) { return false } + if !(k.RequestName == false) { + return false + } + if !(k.RequestUsername == false) { + return false + } + if !(k.RequestPhoto == false) { + return false + } return true } @@ -740,6 +755,18 @@ func (k *KeyboardButtonTypeRequestUsers) TypeInfo() tdp.Type { Name: "MaxQuantity", SchemaName: "max_quantity", }, + { + Name: "RequestName", + SchemaName: "request_name", + }, + { + Name: "RequestUsername", + SchemaName: "request_username", + }, + { + Name: "RequestPhoto", + SchemaName: "request_photo", + }, } return typ } @@ -747,7 +774,7 @@ func (k *KeyboardButtonTypeRequestUsers) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (k *KeyboardButtonTypeRequestUsers) Encode(b *bin.Buffer) error { if k == nil { - return fmt.Errorf("can't encode keyboardButtonTypeRequestUsers#7e63ef90 as nil") + return fmt.Errorf("can't encode keyboardButtonTypeRequestUsers#985c8bfd as nil") } b.PutID(KeyboardButtonTypeRequestUsersTypeID) return k.EncodeBare(b) @@ -756,7 +783,7 @@ func (k *KeyboardButtonTypeRequestUsers) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (k *KeyboardButtonTypeRequestUsers) EncodeBare(b *bin.Buffer) error { if k == nil { - return fmt.Errorf("can't encode keyboardButtonTypeRequestUsers#7e63ef90 as nil") + return fmt.Errorf("can't encode keyboardButtonTypeRequestUsers#985c8bfd as nil") } b.PutInt32(k.ID) b.PutBool(k.RestrictUserIsBot) @@ -764,16 +791,19 @@ func (k *KeyboardButtonTypeRequestUsers) EncodeBare(b *bin.Buffer) error { b.PutBool(k.RestrictUserIsPremium) b.PutBool(k.UserIsPremium) b.PutInt32(k.MaxQuantity) + b.PutBool(k.RequestName) + b.PutBool(k.RequestUsername) + b.PutBool(k.RequestPhoto) return nil } // Decode implements bin.Decoder. func (k *KeyboardButtonTypeRequestUsers) Decode(b *bin.Buffer) error { if k == nil { - return fmt.Errorf("can't decode keyboardButtonTypeRequestUsers#7e63ef90 to nil") + return fmt.Errorf("can't decode keyboardButtonTypeRequestUsers#985c8bfd to nil") } if err := b.ConsumeID(KeyboardButtonTypeRequestUsersTypeID); err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#7e63ef90: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#985c8bfd: %w", err) } return k.DecodeBare(b) } @@ -781,57 +811,78 @@ func (k *KeyboardButtonTypeRequestUsers) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (k *KeyboardButtonTypeRequestUsers) DecodeBare(b *bin.Buffer) error { if k == nil { - return fmt.Errorf("can't decode keyboardButtonTypeRequestUsers#7e63ef90 to nil") + return fmt.Errorf("can't decode keyboardButtonTypeRequestUsers#985c8bfd to nil") } { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#7e63ef90: field id: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#985c8bfd: field id: %w", err) } k.ID = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#7e63ef90: field restrict_user_is_bot: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#985c8bfd: field restrict_user_is_bot: %w", err) } k.RestrictUserIsBot = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#7e63ef90: field user_is_bot: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#985c8bfd: field user_is_bot: %w", err) } k.UserIsBot = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#7e63ef90: field restrict_user_is_premium: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#985c8bfd: field restrict_user_is_premium: %w", err) } k.RestrictUserIsPremium = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#7e63ef90: field user_is_premium: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#985c8bfd: field user_is_premium: %w", err) } k.UserIsPremium = value } { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#7e63ef90: field max_quantity: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#985c8bfd: field max_quantity: %w", err) } k.MaxQuantity = value } + { + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#985c8bfd: field request_name: %w", err) + } + k.RequestName = value + } + { + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#985c8bfd: field request_username: %w", err) + } + k.RequestUsername = value + } + { + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#985c8bfd: field request_photo: %w", err) + } + k.RequestPhoto = value + } return nil } // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (k *KeyboardButtonTypeRequestUsers) EncodeTDLibJSON(b tdjson.Encoder) error { if k == nil { - return fmt.Errorf("can't encode keyboardButtonTypeRequestUsers#7e63ef90 as nil") + return fmt.Errorf("can't encode keyboardButtonTypeRequestUsers#985c8bfd as nil") } b.ObjStart() b.PutID("keyboardButtonTypeRequestUsers") @@ -854,6 +905,15 @@ func (k *KeyboardButtonTypeRequestUsers) EncodeTDLibJSON(b tdjson.Encoder) error b.FieldStart("max_quantity") b.PutInt32(k.MaxQuantity) b.Comma() + b.FieldStart("request_name") + b.PutBool(k.RequestName) + b.Comma() + b.FieldStart("request_username") + b.PutBool(k.RequestUsername) + b.Comma() + b.FieldStart("request_photo") + b.PutBool(k.RequestPhoto) + b.Comma() b.StripComma() b.ObjEnd() return nil @@ -862,51 +922,69 @@ func (k *KeyboardButtonTypeRequestUsers) EncodeTDLibJSON(b tdjson.Encoder) error // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (k *KeyboardButtonTypeRequestUsers) DecodeTDLibJSON(b tdjson.Decoder) error { if k == nil { - return fmt.Errorf("can't decode keyboardButtonTypeRequestUsers#7e63ef90 to nil") + return fmt.Errorf("can't decode keyboardButtonTypeRequestUsers#985c8bfd to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("keyboardButtonTypeRequestUsers"); err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#7e63ef90: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#985c8bfd: %w", err) } case "id": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#7e63ef90: field id: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#985c8bfd: field id: %w", err) } k.ID = value case "restrict_user_is_bot": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#7e63ef90: field restrict_user_is_bot: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#985c8bfd: field restrict_user_is_bot: %w", err) } k.RestrictUserIsBot = value case "user_is_bot": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#7e63ef90: field user_is_bot: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#985c8bfd: field user_is_bot: %w", err) } k.UserIsBot = value case "restrict_user_is_premium": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#7e63ef90: field restrict_user_is_premium: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#985c8bfd: field restrict_user_is_premium: %w", err) } k.RestrictUserIsPremium = value case "user_is_premium": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#7e63ef90: field user_is_premium: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#985c8bfd: field user_is_premium: %w", err) } k.UserIsPremium = value case "max_quantity": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#7e63ef90: field max_quantity: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#985c8bfd: field max_quantity: %w", err) } k.MaxQuantity = value + case "request_name": + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#985c8bfd: field request_name: %w", err) + } + k.RequestName = value + case "request_username": + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#985c8bfd: field request_username: %w", err) + } + k.RequestUsername = value + case "request_photo": + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode keyboardButtonTypeRequestUsers#985c8bfd: field request_photo: %w", err) + } + k.RequestPhoto = value default: return b.Skip() } @@ -962,7 +1040,31 @@ func (k *KeyboardButtonTypeRequestUsers) GetMaxQuantity() (value int32) { return k.MaxQuantity } -// KeyboardButtonTypeRequestChat represents TL type `keyboardButtonTypeRequestChat#103ea7a2`. +// GetRequestName returns value of RequestName field. +func (k *KeyboardButtonTypeRequestUsers) GetRequestName() (value bool) { + if k == nil { + return + } + return k.RequestName +} + +// GetRequestUsername returns value of RequestUsername field. +func (k *KeyboardButtonTypeRequestUsers) GetRequestUsername() (value bool) { + if k == nil { + return + } + return k.RequestUsername +} + +// GetRequestPhoto returns value of RequestPhoto field. +func (k *KeyboardButtonTypeRequestUsers) GetRequestPhoto() (value bool) { + if k == nil { + return + } + return k.RequestPhoto +} + +// KeyboardButtonTypeRequestChat represents TL type `keyboardButtonTypeRequestChat#5a1224b5`. type KeyboardButtonTypeRequestChat struct { // Unique button identifier ID int32 @@ -988,10 +1090,16 @@ type KeyboardButtonTypeRequestChat struct { // True, if the bot must be a member of the chat; for basic group and supergroup chats // only BotIsMember bool + // Pass true to request title of the chat; bots only + RequestTitle bool + // Pass true to request username of the chat; bots only + RequestUsername bool + // Pass true to request photo of the chat; bots only + RequestPhoto bool } // KeyboardButtonTypeRequestChatTypeID is TL type id of KeyboardButtonTypeRequestChat. -const KeyboardButtonTypeRequestChatTypeID = 0x103ea7a2 +const KeyboardButtonTypeRequestChatTypeID = 0x5a1224b5 // construct implements constructor of KeyboardButtonTypeClass. func (k KeyboardButtonTypeRequestChat) construct() KeyboardButtonTypeClass { return &k } @@ -1040,6 +1148,15 @@ func (k *KeyboardButtonTypeRequestChat) Zero() bool { if !(k.BotIsMember == false) { return false } + if !(k.RequestTitle == false) { + return false + } + if !(k.RequestUsername == false) { + return false + } + if !(k.RequestPhoto == false) { + return false + } return true } @@ -1116,6 +1233,18 @@ func (k *KeyboardButtonTypeRequestChat) TypeInfo() tdp.Type { Name: "BotIsMember", SchemaName: "bot_is_member", }, + { + Name: "RequestTitle", + SchemaName: "request_title", + }, + { + Name: "RequestUsername", + SchemaName: "request_username", + }, + { + Name: "RequestPhoto", + SchemaName: "request_photo", + }, } return typ } @@ -1123,7 +1252,7 @@ func (k *KeyboardButtonTypeRequestChat) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (k *KeyboardButtonTypeRequestChat) Encode(b *bin.Buffer) error { if k == nil { - return fmt.Errorf("can't encode keyboardButtonTypeRequestChat#103ea7a2 as nil") + return fmt.Errorf("can't encode keyboardButtonTypeRequestChat#5a1224b5 as nil") } b.PutID(KeyboardButtonTypeRequestChatTypeID) return k.EncodeBare(b) @@ -1132,7 +1261,7 @@ func (k *KeyboardButtonTypeRequestChat) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (k *KeyboardButtonTypeRequestChat) EncodeBare(b *bin.Buffer) error { if k == nil { - return fmt.Errorf("can't encode keyboardButtonTypeRequestChat#103ea7a2 as nil") + return fmt.Errorf("can't encode keyboardButtonTypeRequestChat#5a1224b5 as nil") } b.PutInt32(k.ID) b.PutBool(k.ChatIsChannel) @@ -1142,22 +1271,25 @@ func (k *KeyboardButtonTypeRequestChat) EncodeBare(b *bin.Buffer) error { b.PutBool(k.ChatHasUsername) b.PutBool(k.ChatIsCreated) if err := k.UserAdministratorRights.Encode(b); err != nil { - return fmt.Errorf("unable to encode keyboardButtonTypeRequestChat#103ea7a2: field user_administrator_rights: %w", err) + return fmt.Errorf("unable to encode keyboardButtonTypeRequestChat#5a1224b5: field user_administrator_rights: %w", err) } if err := k.BotAdministratorRights.Encode(b); err != nil { - return fmt.Errorf("unable to encode keyboardButtonTypeRequestChat#103ea7a2: field bot_administrator_rights: %w", err) + return fmt.Errorf("unable to encode keyboardButtonTypeRequestChat#5a1224b5: field bot_administrator_rights: %w", err) } b.PutBool(k.BotIsMember) + b.PutBool(k.RequestTitle) + b.PutBool(k.RequestUsername) + b.PutBool(k.RequestPhoto) return nil } // Decode implements bin.Decoder. func (k *KeyboardButtonTypeRequestChat) Decode(b *bin.Buffer) error { if k == nil { - return fmt.Errorf("can't decode keyboardButtonTypeRequestChat#103ea7a2 to nil") + return fmt.Errorf("can't decode keyboardButtonTypeRequestChat#5a1224b5 to nil") } if err := b.ConsumeID(KeyboardButtonTypeRequestChatTypeID); err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: %w", err) } return k.DecodeBare(b) } @@ -1165,81 +1297,102 @@ func (k *KeyboardButtonTypeRequestChat) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (k *KeyboardButtonTypeRequestChat) DecodeBare(b *bin.Buffer) error { if k == nil { - return fmt.Errorf("can't decode keyboardButtonTypeRequestChat#103ea7a2 to nil") + return fmt.Errorf("can't decode keyboardButtonTypeRequestChat#5a1224b5 to nil") } { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: field id: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field id: %w", err) } k.ID = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: field chat_is_channel: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field chat_is_channel: %w", err) } k.ChatIsChannel = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: field restrict_chat_is_forum: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field restrict_chat_is_forum: %w", err) } k.RestrictChatIsForum = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: field chat_is_forum: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field chat_is_forum: %w", err) } k.ChatIsForum = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: field restrict_chat_has_username: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field restrict_chat_has_username: %w", err) } k.RestrictChatHasUsername = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: field chat_has_username: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field chat_has_username: %w", err) } k.ChatHasUsername = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: field chat_is_created: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field chat_is_created: %w", err) } k.ChatIsCreated = value } { if err := k.UserAdministratorRights.Decode(b); err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: field user_administrator_rights: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field user_administrator_rights: %w", err) } } { if err := k.BotAdministratorRights.Decode(b); err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: field bot_administrator_rights: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field bot_administrator_rights: %w", err) } } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: field bot_is_member: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field bot_is_member: %w", err) } k.BotIsMember = value } + { + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field request_title: %w", err) + } + k.RequestTitle = value + } + { + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field request_username: %w", err) + } + k.RequestUsername = value + } + { + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field request_photo: %w", err) + } + k.RequestPhoto = value + } return nil } // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (k *KeyboardButtonTypeRequestChat) EncodeTDLibJSON(b tdjson.Encoder) error { if k == nil { - return fmt.Errorf("can't encode keyboardButtonTypeRequestChat#103ea7a2 as nil") + return fmt.Errorf("can't encode keyboardButtonTypeRequestChat#5a1224b5 as nil") } b.ObjStart() b.PutID("keyboardButtonTypeRequestChat") @@ -1267,17 +1420,26 @@ func (k *KeyboardButtonTypeRequestChat) EncodeTDLibJSON(b tdjson.Encoder) error b.Comma() b.FieldStart("user_administrator_rights") if err := k.UserAdministratorRights.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode keyboardButtonTypeRequestChat#103ea7a2: field user_administrator_rights: %w", err) + return fmt.Errorf("unable to encode keyboardButtonTypeRequestChat#5a1224b5: field user_administrator_rights: %w", err) } b.Comma() b.FieldStart("bot_administrator_rights") if err := k.BotAdministratorRights.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode keyboardButtonTypeRequestChat#103ea7a2: field bot_administrator_rights: %w", err) + return fmt.Errorf("unable to encode keyboardButtonTypeRequestChat#5a1224b5: field bot_administrator_rights: %w", err) } b.Comma() b.FieldStart("bot_is_member") b.PutBool(k.BotIsMember) b.Comma() + b.FieldStart("request_title") + b.PutBool(k.RequestTitle) + b.Comma() + b.FieldStart("request_username") + b.PutBool(k.RequestUsername) + b.Comma() + b.FieldStart("request_photo") + b.PutBool(k.RequestPhoto) + b.Comma() b.StripComma() b.ObjEnd() return nil @@ -1286,71 +1448,89 @@ func (k *KeyboardButtonTypeRequestChat) EncodeTDLibJSON(b tdjson.Encoder) error // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (k *KeyboardButtonTypeRequestChat) DecodeTDLibJSON(b tdjson.Decoder) error { if k == nil { - return fmt.Errorf("can't decode keyboardButtonTypeRequestChat#103ea7a2 to nil") + return fmt.Errorf("can't decode keyboardButtonTypeRequestChat#5a1224b5 to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("keyboardButtonTypeRequestChat"); err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: %w", err) } case "id": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: field id: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field id: %w", err) } k.ID = value case "chat_is_channel": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: field chat_is_channel: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field chat_is_channel: %w", err) } k.ChatIsChannel = value case "restrict_chat_is_forum": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: field restrict_chat_is_forum: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field restrict_chat_is_forum: %w", err) } k.RestrictChatIsForum = value case "chat_is_forum": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: field chat_is_forum: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field chat_is_forum: %w", err) } k.ChatIsForum = value case "restrict_chat_has_username": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: field restrict_chat_has_username: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field restrict_chat_has_username: %w", err) } k.RestrictChatHasUsername = value case "chat_has_username": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: field chat_has_username: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field chat_has_username: %w", err) } k.ChatHasUsername = value case "chat_is_created": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: field chat_is_created: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field chat_is_created: %w", err) } k.ChatIsCreated = value case "user_administrator_rights": if err := k.UserAdministratorRights.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: field user_administrator_rights: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field user_administrator_rights: %w", err) } case "bot_administrator_rights": if err := k.BotAdministratorRights.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: field bot_administrator_rights: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field bot_administrator_rights: %w", err) } case "bot_is_member": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#103ea7a2: field bot_is_member: %w", err) + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field bot_is_member: %w", err) } k.BotIsMember = value + case "request_title": + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field request_title: %w", err) + } + k.RequestTitle = value + case "request_username": + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field request_username: %w", err) + } + k.RequestUsername = value + case "request_photo": + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode keyboardButtonTypeRequestChat#5a1224b5: field request_photo: %w", err) + } + k.RequestPhoto = value default: return b.Skip() } @@ -1438,6 +1618,30 @@ func (k *KeyboardButtonTypeRequestChat) GetBotIsMember() (value bool) { return k.BotIsMember } +// GetRequestTitle returns value of RequestTitle field. +func (k *KeyboardButtonTypeRequestChat) GetRequestTitle() (value bool) { + if k == nil { + return + } + return k.RequestTitle +} + +// GetRequestUsername returns value of RequestUsername field. +func (k *KeyboardButtonTypeRequestChat) GetRequestUsername() (value bool) { + if k == nil { + return + } + return k.RequestUsername +} + +// GetRequestPhoto returns value of RequestPhoto field. +func (k *KeyboardButtonTypeRequestChat) GetRequestPhoto() (value bool) { + if k == nil { + return + } + return k.RequestPhoto +} + // KeyboardButtonTypeWebApp represents TL type `keyboardButtonTypeWebApp#70c8ff62`. type KeyboardButtonTypeWebApp struct { // An HTTP URL to pass to getWebAppUrl @@ -1620,8 +1824,8 @@ const KeyboardButtonTypeClassName = "KeyboardButtonType" // case *tdapi.KeyboardButtonTypeRequestPhoneNumber: // keyboardButtonTypeRequestPhoneNumber#a4d9b7b9 // case *tdapi.KeyboardButtonTypeRequestLocation: // keyboardButtonTypeRequestLocation#f8828cfd // case *tdapi.KeyboardButtonTypeRequestPoll: // keyboardButtonTypeRequestPoll#7164dcb8 -// case *tdapi.KeyboardButtonTypeRequestUsers: // keyboardButtonTypeRequestUsers#7e63ef90 -// case *tdapi.KeyboardButtonTypeRequestChat: // keyboardButtonTypeRequestChat#103ea7a2 +// case *tdapi.KeyboardButtonTypeRequestUsers: // keyboardButtonTypeRequestUsers#985c8bfd +// case *tdapi.KeyboardButtonTypeRequestChat: // keyboardButtonTypeRequestChat#5a1224b5 // case *tdapi.KeyboardButtonTypeWebApp: // keyboardButtonTypeWebApp#70c8ff62 // default: panic(v) // } @@ -1683,14 +1887,14 @@ func DecodeKeyboardButtonType(buf *bin.Buffer) (KeyboardButtonTypeClass, error) } return &v, nil case KeyboardButtonTypeRequestUsersTypeID: - // Decoding keyboardButtonTypeRequestUsers#7e63ef90. + // Decoding keyboardButtonTypeRequestUsers#985c8bfd. v := KeyboardButtonTypeRequestUsers{} if err := v.Decode(buf); err != nil { return nil, fmt.Errorf("unable to decode KeyboardButtonTypeClass: %w", err) } return &v, nil case KeyboardButtonTypeRequestChatTypeID: - // Decoding keyboardButtonTypeRequestChat#103ea7a2. + // Decoding keyboardButtonTypeRequestChat#5a1224b5. v := KeyboardButtonTypeRequestChat{} if err := v.Decode(buf); err != nil { return nil, fmt.Errorf("unable to decode KeyboardButtonTypeClass: %w", err) @@ -1744,14 +1948,14 @@ func DecodeTDLibJSONKeyboardButtonType(buf tdjson.Decoder) (KeyboardButtonTypeCl } return &v, nil case "keyboardButtonTypeRequestUsers": - // Decoding keyboardButtonTypeRequestUsers#7e63ef90. + // Decoding keyboardButtonTypeRequestUsers#985c8bfd. v := KeyboardButtonTypeRequestUsers{} if err := v.DecodeTDLibJSON(buf); err != nil { return nil, fmt.Errorf("unable to decode KeyboardButtonTypeClass: %w", err) } return &v, nil case "keyboardButtonTypeRequestChat": - // Decoding keyboardButtonTypeRequestChat#103ea7a2. + // Decoding keyboardButtonTypeRequestChat#5a1224b5. v := KeyboardButtonTypeRequestChat{} if err := v.DecodeTDLibJSON(buf); err != nil { return nil, fmt.Errorf("unable to decode KeyboardButtonTypeClass: %w", err) diff --git a/tdapi/tl_message_content_gen.go b/tdapi/tl_message_content_gen.go index 07400f1631..c6318247bb 100644 --- a/tdapi/tl_message_content_gen.go +++ b/tdapi/tl_message_content_gen.go @@ -13079,16 +13079,16 @@ func (m *MessageContactRegistered) DecodeTDLibJSON(b tdjson.Decoder) error { }) } -// MessageUsersShared represents TL type `messageUsersShared#95dca529`. +// MessageUsersShared represents TL type `messageUsersShared#7f1f4a22`. type MessageUsersShared struct { - // Identifier of the shared users - UserIDs []int64 + // The shared users + Users []SharedUser // Identifier of the keyboard button with the request ButtonID int32 } // MessageUsersSharedTypeID is TL type id of MessageUsersShared. -const MessageUsersSharedTypeID = 0x95dca529 +const MessageUsersSharedTypeID = 0x7f1f4a22 // construct implements constructor of MessageContentClass. func (m MessageUsersShared) construct() MessageContentClass { return &m } @@ -13107,7 +13107,7 @@ func (m *MessageUsersShared) Zero() bool { if m == nil { return true } - if !(m.UserIDs == nil) { + if !(m.Users == nil) { return false } if !(m.ButtonID == 0) { @@ -13150,8 +13150,8 @@ func (m *MessageUsersShared) TypeInfo() tdp.Type { } typ.Fields = []tdp.Field{ { - Name: "UserIDs", - SchemaName: "user_ids", + Name: "Users", + SchemaName: "users", }, { Name: "ButtonID", @@ -13164,7 +13164,7 @@ func (m *MessageUsersShared) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (m *MessageUsersShared) Encode(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't encode messageUsersShared#95dca529 as nil") + return fmt.Errorf("can't encode messageUsersShared#7f1f4a22 as nil") } b.PutID(MessageUsersSharedTypeID) return m.EncodeBare(b) @@ -13173,11 +13173,13 @@ func (m *MessageUsersShared) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (m *MessageUsersShared) EncodeBare(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't encode messageUsersShared#95dca529 as nil") + return fmt.Errorf("can't encode messageUsersShared#7f1f4a22 as nil") } - b.PutInt(len(m.UserIDs)) - for _, v := range m.UserIDs { - b.PutInt53(v) + b.PutInt(len(m.Users)) + for idx, v := range m.Users { + if err := v.EncodeBare(b); err != nil { + return fmt.Errorf("unable to encode bare messageUsersShared#7f1f4a22: field users element with index %d: %w", idx, err) + } } b.PutInt32(m.ButtonID) return nil @@ -13186,10 +13188,10 @@ func (m *MessageUsersShared) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (m *MessageUsersShared) Decode(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't decode messageUsersShared#95dca529 to nil") + return fmt.Errorf("can't decode messageUsersShared#7f1f4a22 to nil") } if err := b.ConsumeID(MessageUsersSharedTypeID); err != nil { - return fmt.Errorf("unable to decode messageUsersShared#95dca529: %w", err) + return fmt.Errorf("unable to decode messageUsersShared#7f1f4a22: %w", err) } return m.DecodeBare(b) } @@ -13197,29 +13199,29 @@ func (m *MessageUsersShared) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (m *MessageUsersShared) DecodeBare(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't decode messageUsersShared#95dca529 to nil") + return fmt.Errorf("can't decode messageUsersShared#7f1f4a22 to nil") } { headerLen, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode messageUsersShared#95dca529: field user_ids: %w", err) + return fmt.Errorf("unable to decode messageUsersShared#7f1f4a22: field users: %w", err) } if headerLen > 0 { - m.UserIDs = make([]int64, 0, headerLen%bin.PreallocateLimit) + m.Users = make([]SharedUser, 0, headerLen%bin.PreallocateLimit) } for idx := 0; idx < headerLen; idx++ { - value, err := b.Int53() - if err != nil { - return fmt.Errorf("unable to decode messageUsersShared#95dca529: field user_ids: %w", err) + var value SharedUser + if err := value.DecodeBare(b); err != nil { + return fmt.Errorf("unable to decode bare messageUsersShared#7f1f4a22: field users: %w", err) } - m.UserIDs = append(m.UserIDs, value) + m.Users = append(m.Users, value) } } { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode messageUsersShared#95dca529: field button_id: %w", err) + return fmt.Errorf("unable to decode messageUsersShared#7f1f4a22: field button_id: %w", err) } m.ButtonID = value } @@ -13229,15 +13231,17 @@ func (m *MessageUsersShared) DecodeBare(b *bin.Buffer) error { // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (m *MessageUsersShared) EncodeTDLibJSON(b tdjson.Encoder) error { if m == nil { - return fmt.Errorf("can't encode messageUsersShared#95dca529 as nil") + return fmt.Errorf("can't encode messageUsersShared#7f1f4a22 as nil") } b.ObjStart() b.PutID("messageUsersShared") b.Comma() - b.FieldStart("user_ids") + b.FieldStart("users") b.ArrStart() - for _, v := range m.UserIDs { - b.PutInt53(v) + for idx, v := range m.Users { + if err := v.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode messageUsersShared#7f1f4a22: field users element with index %d: %w", idx, err) + } b.Comma() } b.StripComma() @@ -13254,30 +13258,30 @@ func (m *MessageUsersShared) EncodeTDLibJSON(b tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (m *MessageUsersShared) DecodeTDLibJSON(b tdjson.Decoder) error { if m == nil { - return fmt.Errorf("can't decode messageUsersShared#95dca529 to nil") + return fmt.Errorf("can't decode messageUsersShared#7f1f4a22 to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("messageUsersShared"); err != nil { - return fmt.Errorf("unable to decode messageUsersShared#95dca529: %w", err) + return fmt.Errorf("unable to decode messageUsersShared#7f1f4a22: %w", err) } - case "user_ids": + case "users": if err := b.Arr(func(b tdjson.Decoder) error { - value, err := b.Int53() - if err != nil { - return fmt.Errorf("unable to decode messageUsersShared#95dca529: field user_ids: %w", err) + var value SharedUser + if err := value.DecodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to decode messageUsersShared#7f1f4a22: field users: %w", err) } - m.UserIDs = append(m.UserIDs, value) + m.Users = append(m.Users, value) return nil }); err != nil { - return fmt.Errorf("unable to decode messageUsersShared#95dca529: field user_ids: %w", err) + return fmt.Errorf("unable to decode messageUsersShared#7f1f4a22: field users: %w", err) } case "button_id": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode messageUsersShared#95dca529: field button_id: %w", err) + return fmt.Errorf("unable to decode messageUsersShared#7f1f4a22: field button_id: %w", err) } m.ButtonID = value default: @@ -13287,12 +13291,12 @@ func (m *MessageUsersShared) DecodeTDLibJSON(b tdjson.Decoder) error { }) } -// GetUserIDs returns value of UserIDs field. -func (m *MessageUsersShared) GetUserIDs() (value []int64) { +// GetUsers returns value of Users field. +func (m *MessageUsersShared) GetUsers() (value []SharedUser) { if m == nil { return } - return m.UserIDs + return m.Users } // GetButtonID returns value of ButtonID field. @@ -13303,16 +13307,16 @@ func (m *MessageUsersShared) GetButtonID() (value int32) { return m.ButtonID } -// MessageChatShared represents TL type `messageChatShared#22db7091`. +// MessageChatShared represents TL type `messageChatShared#aec6d961`. type MessageChatShared struct { - // Identifier of the shared chat - ChatID int64 + // The shared chat + Chat SharedChat // Identifier of the keyboard button with the request ButtonID int32 } // MessageChatSharedTypeID is TL type id of MessageChatShared. -const MessageChatSharedTypeID = 0x22db7091 +const MessageChatSharedTypeID = 0xaec6d961 // construct implements constructor of MessageContentClass. func (m MessageChatShared) construct() MessageContentClass { return &m } @@ -13331,7 +13335,7 @@ func (m *MessageChatShared) Zero() bool { if m == nil { return true } - if !(m.ChatID == 0) { + if !(m.Chat.Zero()) { return false } if !(m.ButtonID == 0) { @@ -13374,8 +13378,8 @@ func (m *MessageChatShared) TypeInfo() tdp.Type { } typ.Fields = []tdp.Field{ { - Name: "ChatID", - SchemaName: "chat_id", + Name: "Chat", + SchemaName: "chat", }, { Name: "ButtonID", @@ -13388,7 +13392,7 @@ func (m *MessageChatShared) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (m *MessageChatShared) Encode(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't encode messageChatShared#22db7091 as nil") + return fmt.Errorf("can't encode messageChatShared#aec6d961 as nil") } b.PutID(MessageChatSharedTypeID) return m.EncodeBare(b) @@ -13397,9 +13401,11 @@ func (m *MessageChatShared) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (m *MessageChatShared) EncodeBare(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't encode messageChatShared#22db7091 as nil") + return fmt.Errorf("can't encode messageChatShared#aec6d961 as nil") + } + if err := m.Chat.Encode(b); err != nil { + return fmt.Errorf("unable to encode messageChatShared#aec6d961: field chat: %w", err) } - b.PutInt53(m.ChatID) b.PutInt32(m.ButtonID) return nil } @@ -13407,10 +13413,10 @@ func (m *MessageChatShared) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (m *MessageChatShared) Decode(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't decode messageChatShared#22db7091 to nil") + return fmt.Errorf("can't decode messageChatShared#aec6d961 to nil") } if err := b.ConsumeID(MessageChatSharedTypeID); err != nil { - return fmt.Errorf("unable to decode messageChatShared#22db7091: %w", err) + return fmt.Errorf("unable to decode messageChatShared#aec6d961: %w", err) } return m.DecodeBare(b) } @@ -13418,19 +13424,17 @@ func (m *MessageChatShared) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (m *MessageChatShared) DecodeBare(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't decode messageChatShared#22db7091 to nil") + return fmt.Errorf("can't decode messageChatShared#aec6d961 to nil") } { - value, err := b.Int53() - if err != nil { - return fmt.Errorf("unable to decode messageChatShared#22db7091: field chat_id: %w", err) + if err := m.Chat.Decode(b); err != nil { + return fmt.Errorf("unable to decode messageChatShared#aec6d961: field chat: %w", err) } - m.ChatID = value } { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode messageChatShared#22db7091: field button_id: %w", err) + return fmt.Errorf("unable to decode messageChatShared#aec6d961: field button_id: %w", err) } m.ButtonID = value } @@ -13440,13 +13444,15 @@ func (m *MessageChatShared) DecodeBare(b *bin.Buffer) error { // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (m *MessageChatShared) EncodeTDLibJSON(b tdjson.Encoder) error { if m == nil { - return fmt.Errorf("can't encode messageChatShared#22db7091 as nil") + return fmt.Errorf("can't encode messageChatShared#aec6d961 as nil") } b.ObjStart() b.PutID("messageChatShared") b.Comma() - b.FieldStart("chat_id") - b.PutInt53(m.ChatID) + b.FieldStart("chat") + if err := m.Chat.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode messageChatShared#aec6d961: field chat: %w", err) + } b.Comma() b.FieldStart("button_id") b.PutInt32(m.ButtonID) @@ -13459,25 +13465,23 @@ func (m *MessageChatShared) EncodeTDLibJSON(b tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (m *MessageChatShared) DecodeTDLibJSON(b tdjson.Decoder) error { if m == nil { - return fmt.Errorf("can't decode messageChatShared#22db7091 to nil") + return fmt.Errorf("can't decode messageChatShared#aec6d961 to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("messageChatShared"); err != nil { - return fmt.Errorf("unable to decode messageChatShared#22db7091: %w", err) + return fmt.Errorf("unable to decode messageChatShared#aec6d961: %w", err) } - case "chat_id": - value, err := b.Int53() - if err != nil { - return fmt.Errorf("unable to decode messageChatShared#22db7091: field chat_id: %w", err) + case "chat": + if err := m.Chat.DecodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to decode messageChatShared#aec6d961: field chat: %w", err) } - m.ChatID = value case "button_id": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode messageChatShared#22db7091: field button_id: %w", err) + return fmt.Errorf("unable to decode messageChatShared#aec6d961: field button_id: %w", err) } m.ButtonID = value default: @@ -13487,12 +13491,12 @@ func (m *MessageChatShared) DecodeTDLibJSON(b tdjson.Decoder) error { }) } -// GetChatID returns value of ChatID field. -func (m *MessageChatShared) GetChatID() (value int64) { +// GetChat returns value of Chat field. +func (m *MessageChatShared) GetChat() (value SharedChat) { if m == nil { return } - return m.ChatID + return m.Chat } // GetButtonID returns value of ButtonID field. @@ -14930,8 +14934,8 @@ const MessageContentClassName = "MessageContent" // case *tdapi.MessagePremiumGiveawayCompleted: // messagePremiumGiveawayCompleted#80533949 // case *tdapi.MessagePremiumGiveawayWinners: // messagePremiumGiveawayWinners#815d5f31 // case *tdapi.MessageContactRegistered: // messageContactRegistered#a678fcff -// case *tdapi.MessageUsersShared: // messageUsersShared#95dca529 -// case *tdapi.MessageChatShared: // messageChatShared#22db7091 +// case *tdapi.MessageUsersShared: // messageUsersShared#7f1f4a22 +// case *tdapi.MessageChatShared: // messageChatShared#aec6d961 // case *tdapi.MessageBotWriteAccessAllowed: // messageBotWriteAccessAllowed#9a8ab7b4 // case *tdapi.MessageWebAppDataSent: // messageWebAppDataSent#fb033912 // case *tdapi.MessageWebAppDataReceived: // messageWebAppDataReceived#ff7d1a15 @@ -15391,14 +15395,14 @@ func DecodeMessageContent(buf *bin.Buffer) (MessageContentClass, error) { } return &v, nil case MessageUsersSharedTypeID: - // Decoding messageUsersShared#95dca529. + // Decoding messageUsersShared#7f1f4a22. v := MessageUsersShared{} if err := v.Decode(buf); err != nil { return nil, fmt.Errorf("unable to decode MessageContentClass: %w", err) } return &v, nil case MessageChatSharedTypeID: - // Decoding messageChatShared#22db7091. + // Decoding messageChatShared#aec6d961. v := MessageChatShared{} if err := v.Decode(buf); err != nil { return nil, fmt.Errorf("unable to decode MessageContentClass: %w", err) @@ -15886,14 +15890,14 @@ func DecodeTDLibJSONMessageContent(buf tdjson.Decoder) (MessageContentClass, err } return &v, nil case "messageUsersShared": - // Decoding messageUsersShared#95dca529. + // Decoding messageUsersShared#7f1f4a22. v := MessageUsersShared{} if err := v.DecodeTDLibJSON(buf); err != nil { return nil, fmt.Errorf("unable to decode MessageContentClass: %w", err) } return &v, nil case "messageChatShared": - // Decoding messageChatShared#22db7091. + // Decoding messageChatShared#aec6d961. v := MessageChatShared{} if err := v.DecodeTDLibJSON(buf); err != nil { return nil, fmt.Errorf("unable to decode MessageContentClass: %w", err) diff --git a/tdapi/tl_message_extended_media_gen.go b/tdapi/tl_message_extended_media_gen.go index a0fc9ee4be..c66ab02e6e 100644 --- a/tdapi/tl_message_extended_media_gen.go +++ b/tdapi/tl_message_extended_media_gen.go @@ -37,7 +37,7 @@ type MessageExtendedMediaPreview struct { Width int32 // Media height; 0 if unknown Height int32 - // Media duration; 0 if unknown + // Media duration, in seconds; 0 if unknown Duration int32 // Media minithumbnail; may be null Minithumbnail Minithumbnail diff --git a/tdapi/tl_message_gen.go b/tdapi/tl_message_gen.go index 0c63db99f7..fc251343d7 100644 --- a/tdapi/tl_message_gen.go +++ b/tdapi/tl_message_gen.go @@ -31,7 +31,7 @@ var ( _ = tdjson.Encoder{} ) -// Message represents TL type `message#34e12c0`. +// Message represents TL type `message#e255bc28`. type Message struct { // Message identifier; unique for the chat to which the message belongs ID int64 @@ -48,6 +48,9 @@ type Message struct { IsOutgoing bool // True, if the message is pinned IsPinned bool + // True, if the message was sent because of a scheduled action by the message sender, for + // example, as away, or greeting service message + IsFromOffline bool // True, if the message can be edited. For live location and poll messages this fields // shows whether editMessageLiveLocation or stopPoll can be used with this message by the // application @@ -120,8 +123,10 @@ type Message struct { // Time left before the message will be automatically deleted by message_auto_delete_time // setting of the chat, in seconds; 0 if never AutoDeleteIn float64 - // If non-zero, the user identifier of the bot through which this message was sent + // If non-zero, the user identifier of the inline bot through which this message was sent ViaBotUserID int64 + // If non-zero, the user identifier of the business bot that sent this message + SenderBusinessBotUserID int64 // Number of times the sender of the message boosted the supergroup at the time the // message was sent; 0 if none or unknown. For messages sent by the current user, // supergroupFullInfo.my_boost_count must be used instead @@ -141,7 +146,7 @@ type Message struct { } // MessageTypeID is TL type id of Message. -const MessageTypeID = 0x34e12c0 +const MessageTypeID = 0xe255bc28 // Ensuring interfaces in compile-time for Message. var ( @@ -176,6 +181,9 @@ func (m *Message) Zero() bool { if !(m.IsPinned == false) { return false } + if !(m.IsFromOffline == false) { + return false + } if !(m.CanBeEdited == false) { return false } @@ -266,6 +274,9 @@ func (m *Message) Zero() bool { if !(m.ViaBotUserID == 0) { return false } + if !(m.SenderBusinessBotUserID == 0) { + return false + } if !(m.SenderBoostCount == 0) { return false } @@ -348,6 +359,10 @@ func (m *Message) TypeInfo() tdp.Type { Name: "IsPinned", SchemaName: "is_pinned", }, + { + Name: "IsFromOffline", + SchemaName: "is_from_offline", + }, { Name: "CanBeEdited", SchemaName: "can_be_edited", @@ -468,6 +483,10 @@ func (m *Message) TypeInfo() tdp.Type { Name: "ViaBotUserID", SchemaName: "via_bot_user_id", }, + { + Name: "SenderBusinessBotUserID", + SchemaName: "sender_business_bot_user_id", + }, { Name: "SenderBoostCount", SchemaName: "sender_boost_count", @@ -499,7 +518,7 @@ func (m *Message) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (m *Message) Encode(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't encode message#34e12c0 as nil") + return fmt.Errorf("can't encode message#e255bc28 as nil") } b.PutID(MessageTypeID) return m.EncodeBare(b) @@ -508,30 +527,31 @@ func (m *Message) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (m *Message) EncodeBare(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't encode message#34e12c0 as nil") + return fmt.Errorf("can't encode message#e255bc28 as nil") } b.PutInt53(m.ID) if m.SenderID == nil { - return fmt.Errorf("unable to encode message#34e12c0: field sender_id is nil") + return fmt.Errorf("unable to encode message#e255bc28: field sender_id is nil") } if err := m.SenderID.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#34e12c0: field sender_id: %w", err) + return fmt.Errorf("unable to encode message#e255bc28: field sender_id: %w", err) } b.PutInt53(m.ChatID) if m.SendingState == nil { - return fmt.Errorf("unable to encode message#34e12c0: field sending_state is nil") + return fmt.Errorf("unable to encode message#e255bc28: field sending_state is nil") } if err := m.SendingState.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#34e12c0: field sending_state: %w", err) + return fmt.Errorf("unable to encode message#e255bc28: field sending_state: %w", err) } if m.SchedulingState == nil { - return fmt.Errorf("unable to encode message#34e12c0: field scheduling_state is nil") + return fmt.Errorf("unable to encode message#e255bc28: field scheduling_state is nil") } if err := m.SchedulingState.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#34e12c0: field scheduling_state: %w", err) + return fmt.Errorf("unable to encode message#e255bc28: field scheduling_state: %w", err) } b.PutBool(m.IsOutgoing) b.PutBool(m.IsPinned) + b.PutBool(m.IsFromOffline) b.PutBool(m.CanBeEdited) b.PutBool(m.CanBeForwarded) b.PutBool(m.CanBeRepliedInAnotherChat) @@ -552,52 +572,53 @@ func (m *Message) EncodeBare(b *bin.Buffer) error { b.PutInt32(m.Date) b.PutInt32(m.EditDate) if err := m.ForwardInfo.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#34e12c0: field forward_info: %w", err) + return fmt.Errorf("unable to encode message#e255bc28: field forward_info: %w", err) } if err := m.ImportInfo.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#34e12c0: field import_info: %w", err) + return fmt.Errorf("unable to encode message#e255bc28: field import_info: %w", err) } if err := m.InteractionInfo.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#34e12c0: field interaction_info: %w", err) + return fmt.Errorf("unable to encode message#e255bc28: field interaction_info: %w", err) } b.PutInt(len(m.UnreadReactions)) for idx, v := range m.UnreadReactions { if err := v.EncodeBare(b); err != nil { - return fmt.Errorf("unable to encode bare message#34e12c0: field unread_reactions element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode bare message#e255bc28: field unread_reactions element with index %d: %w", idx, err) } } if m.ReplyTo == nil { - return fmt.Errorf("unable to encode message#34e12c0: field reply_to is nil") + return fmt.Errorf("unable to encode message#e255bc28: field reply_to is nil") } if err := m.ReplyTo.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#34e12c0: field reply_to: %w", err) + return fmt.Errorf("unable to encode message#e255bc28: field reply_to: %w", err) } b.PutInt53(m.MessageThreadID) b.PutInt53(m.SavedMessagesTopicID) if m.SelfDestructType == nil { - return fmt.Errorf("unable to encode message#34e12c0: field self_destruct_type is nil") + return fmt.Errorf("unable to encode message#e255bc28: field self_destruct_type is nil") } if err := m.SelfDestructType.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#34e12c0: field self_destruct_type: %w", err) + return fmt.Errorf("unable to encode message#e255bc28: field self_destruct_type: %w", err) } b.PutDouble(m.SelfDestructIn) b.PutDouble(m.AutoDeleteIn) b.PutInt53(m.ViaBotUserID) + b.PutInt53(m.SenderBusinessBotUserID) b.PutInt32(m.SenderBoostCount) b.PutString(m.AuthorSignature) b.PutLong(m.MediaAlbumID) b.PutString(m.RestrictionReason) if m.Content == nil { - return fmt.Errorf("unable to encode message#34e12c0: field content is nil") + return fmt.Errorf("unable to encode message#e255bc28: field content is nil") } if err := m.Content.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#34e12c0: field content: %w", err) + return fmt.Errorf("unable to encode message#e255bc28: field content: %w", err) } if m.ReplyMarkup == nil { - return fmt.Errorf("unable to encode message#34e12c0: field reply_markup is nil") + return fmt.Errorf("unable to encode message#e255bc28: field reply_markup is nil") } if err := m.ReplyMarkup.Encode(b); err != nil { - return fmt.Errorf("unable to encode message#34e12c0: field reply_markup: %w", err) + return fmt.Errorf("unable to encode message#e255bc28: field reply_markup: %w", err) } return nil } @@ -605,10 +626,10 @@ func (m *Message) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (m *Message) Decode(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't decode message#34e12c0 to nil") + return fmt.Errorf("can't decode message#e255bc28 to nil") } if err := b.ConsumeID(MessageTypeID); err != nil { - return fmt.Errorf("unable to decode message#34e12c0: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: %w", err) } return m.DecodeBare(b) } @@ -616,209 +637,216 @@ func (m *Message) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (m *Message) DecodeBare(b *bin.Buffer) error { if m == nil { - return fmt.Errorf("can't decode message#34e12c0 to nil") + return fmt.Errorf("can't decode message#e255bc28 to nil") } { value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field id: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field id: %w", err) } m.ID = value } { value, err := DecodeMessageSender(b) if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field sender_id: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field sender_id: %w", err) } m.SenderID = value } { value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field chat_id: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field chat_id: %w", err) } m.ChatID = value } { value, err := DecodeMessageSendingState(b) if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field sending_state: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field sending_state: %w", err) } m.SendingState = value } { value, err := DecodeMessageSchedulingState(b) if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field scheduling_state: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field scheduling_state: %w", err) } m.SchedulingState = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field is_outgoing: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field is_outgoing: %w", err) } m.IsOutgoing = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field is_pinned: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field is_pinned: %w", err) } m.IsPinned = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_be_edited: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field is_from_offline: %w", err) + } + m.IsFromOffline = value + } + { + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode message#e255bc28: field can_be_edited: %w", err) } m.CanBeEdited = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_be_forwarded: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_be_forwarded: %w", err) } m.CanBeForwarded = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_be_replied_in_another_chat: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_be_replied_in_another_chat: %w", err) } m.CanBeRepliedInAnotherChat = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_be_saved: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_be_saved: %w", err) } m.CanBeSaved = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_be_deleted_only_for_self: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_be_deleted_only_for_self: %w", err) } m.CanBeDeletedOnlyForSelf = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_be_deleted_for_all_users: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_be_deleted_for_all_users: %w", err) } m.CanBeDeletedForAllUsers = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_get_added_reactions: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_get_added_reactions: %w", err) } m.CanGetAddedReactions = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_get_statistics: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_get_statistics: %w", err) } m.CanGetStatistics = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_get_message_thread: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_get_message_thread: %w", err) } m.CanGetMessageThread = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_get_read_date: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_get_read_date: %w", err) } m.CanGetReadDate = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_get_viewers: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_get_viewers: %w", err) } m.CanGetViewers = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_get_media_timestamp_links: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_get_media_timestamp_links: %w", err) } m.CanGetMediaTimestampLinks = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_report_reactions: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_report_reactions: %w", err) } m.CanReportReactions = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field has_timestamped_media: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field has_timestamped_media: %w", err) } m.HasTimestampedMedia = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field is_channel_post: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field is_channel_post: %w", err) } m.IsChannelPost = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field is_topic_message: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field is_topic_message: %w", err) } m.IsTopicMessage = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field contains_unread_mention: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field contains_unread_mention: %w", err) } m.ContainsUnreadMention = value } { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field date: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field date: %w", err) } m.Date = value } { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field edit_date: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field edit_date: %w", err) } m.EditDate = value } { if err := m.ForwardInfo.Decode(b); err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field forward_info: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field forward_info: %w", err) } } { if err := m.ImportInfo.Decode(b); err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field import_info: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field import_info: %w", err) } } { if err := m.InteractionInfo.Decode(b); err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field interaction_info: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field interaction_info: %w", err) } } { headerLen, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field unread_reactions: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field unread_reactions: %w", err) } if headerLen > 0 { @@ -827,7 +855,7 @@ func (m *Message) DecodeBare(b *bin.Buffer) error { for idx := 0; idx < headerLen; idx++ { var value UnreadReaction if err := value.DecodeBare(b); err != nil { - return fmt.Errorf("unable to decode bare message#34e12c0: field unread_reactions: %w", err) + return fmt.Errorf("unable to decode bare message#e255bc28: field unread_reactions: %w", err) } m.UnreadReactions = append(m.UnreadReactions, value) } @@ -835,91 +863,98 @@ func (m *Message) DecodeBare(b *bin.Buffer) error { { value, err := DecodeMessageReplyTo(b) if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field reply_to: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field reply_to: %w", err) } m.ReplyTo = value } { value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field message_thread_id: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field message_thread_id: %w", err) } m.MessageThreadID = value } { value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field saved_messages_topic_id: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field saved_messages_topic_id: %w", err) } m.SavedMessagesTopicID = value } { value, err := DecodeMessageSelfDestructType(b) if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field self_destruct_type: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field self_destruct_type: %w", err) } m.SelfDestructType = value } { value, err := b.Double() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field self_destruct_in: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field self_destruct_in: %w", err) } m.SelfDestructIn = value } { value, err := b.Double() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field auto_delete_in: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field auto_delete_in: %w", err) } m.AutoDeleteIn = value } { value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field via_bot_user_id: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field via_bot_user_id: %w", err) } m.ViaBotUserID = value } + { + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode message#e255bc28: field sender_business_bot_user_id: %w", err) + } + m.SenderBusinessBotUserID = value + } { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field sender_boost_count: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field sender_boost_count: %w", err) } m.SenderBoostCount = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field author_signature: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field author_signature: %w", err) } m.AuthorSignature = value } { value, err := b.Long() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field media_album_id: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field media_album_id: %w", err) } m.MediaAlbumID = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field restriction_reason: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field restriction_reason: %w", err) } m.RestrictionReason = value } { value, err := DecodeMessageContent(b) if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field content: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field content: %w", err) } m.Content = value } { value, err := DecodeReplyMarkup(b) if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field reply_markup: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field reply_markup: %w", err) } m.ReplyMarkup = value } @@ -929,7 +964,7 @@ func (m *Message) DecodeBare(b *bin.Buffer) error { // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (m *Message) EncodeTDLibJSON(b tdjson.Encoder) error { if m == nil { - return fmt.Errorf("can't encode message#34e12c0 as nil") + return fmt.Errorf("can't encode message#e255bc28 as nil") } b.ObjStart() b.PutID("message") @@ -939,10 +974,10 @@ func (m *Message) EncodeTDLibJSON(b tdjson.Encoder) error { b.Comma() b.FieldStart("sender_id") if m.SenderID == nil { - return fmt.Errorf("unable to encode message#34e12c0: field sender_id is nil") + return fmt.Errorf("unable to encode message#e255bc28: field sender_id is nil") } if err := m.SenderID.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode message#34e12c0: field sender_id: %w", err) + return fmt.Errorf("unable to encode message#e255bc28: field sender_id: %w", err) } b.Comma() b.FieldStart("chat_id") @@ -950,18 +985,18 @@ func (m *Message) EncodeTDLibJSON(b tdjson.Encoder) error { b.Comma() b.FieldStart("sending_state") if m.SendingState == nil { - return fmt.Errorf("unable to encode message#34e12c0: field sending_state is nil") + return fmt.Errorf("unable to encode message#e255bc28: field sending_state is nil") } if err := m.SendingState.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode message#34e12c0: field sending_state: %w", err) + return fmt.Errorf("unable to encode message#e255bc28: field sending_state: %w", err) } b.Comma() b.FieldStart("scheduling_state") if m.SchedulingState == nil { - return fmt.Errorf("unable to encode message#34e12c0: field scheduling_state is nil") + return fmt.Errorf("unable to encode message#e255bc28: field scheduling_state is nil") } if err := m.SchedulingState.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode message#34e12c0: field scheduling_state: %w", err) + return fmt.Errorf("unable to encode message#e255bc28: field scheduling_state: %w", err) } b.Comma() b.FieldStart("is_outgoing") @@ -970,6 +1005,9 @@ func (m *Message) EncodeTDLibJSON(b tdjson.Encoder) error { b.FieldStart("is_pinned") b.PutBool(m.IsPinned) b.Comma() + b.FieldStart("is_from_offline") + b.PutBool(m.IsFromOffline) + b.Comma() b.FieldStart("can_be_edited") b.PutBool(m.CanBeEdited) b.Comma() @@ -1029,24 +1067,24 @@ func (m *Message) EncodeTDLibJSON(b tdjson.Encoder) error { b.Comma() b.FieldStart("forward_info") if err := m.ForwardInfo.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode message#34e12c0: field forward_info: %w", err) + return fmt.Errorf("unable to encode message#e255bc28: field forward_info: %w", err) } b.Comma() b.FieldStart("import_info") if err := m.ImportInfo.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode message#34e12c0: field import_info: %w", err) + return fmt.Errorf("unable to encode message#e255bc28: field import_info: %w", err) } b.Comma() b.FieldStart("interaction_info") if err := m.InteractionInfo.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode message#34e12c0: field interaction_info: %w", err) + return fmt.Errorf("unable to encode message#e255bc28: field interaction_info: %w", err) } b.Comma() b.FieldStart("unread_reactions") b.ArrStart() for idx, v := range m.UnreadReactions { if err := v.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode message#34e12c0: field unread_reactions element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode message#e255bc28: field unread_reactions element with index %d: %w", idx, err) } b.Comma() } @@ -1055,10 +1093,10 @@ func (m *Message) EncodeTDLibJSON(b tdjson.Encoder) error { b.Comma() b.FieldStart("reply_to") if m.ReplyTo == nil { - return fmt.Errorf("unable to encode message#34e12c0: field reply_to is nil") + return fmt.Errorf("unable to encode message#e255bc28: field reply_to is nil") } if err := m.ReplyTo.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode message#34e12c0: field reply_to: %w", err) + return fmt.Errorf("unable to encode message#e255bc28: field reply_to: %w", err) } b.Comma() b.FieldStart("message_thread_id") @@ -1069,10 +1107,10 @@ func (m *Message) EncodeTDLibJSON(b tdjson.Encoder) error { b.Comma() b.FieldStart("self_destruct_type") if m.SelfDestructType == nil { - return fmt.Errorf("unable to encode message#34e12c0: field self_destruct_type is nil") + return fmt.Errorf("unable to encode message#e255bc28: field self_destruct_type is nil") } if err := m.SelfDestructType.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode message#34e12c0: field self_destruct_type: %w", err) + return fmt.Errorf("unable to encode message#e255bc28: field self_destruct_type: %w", err) } b.Comma() b.FieldStart("self_destruct_in") @@ -1084,6 +1122,9 @@ func (m *Message) EncodeTDLibJSON(b tdjson.Encoder) error { b.FieldStart("via_bot_user_id") b.PutInt53(m.ViaBotUserID) b.Comma() + b.FieldStart("sender_business_bot_user_id") + b.PutInt53(m.SenderBusinessBotUserID) + b.Comma() b.FieldStart("sender_boost_count") b.PutInt32(m.SenderBoostCount) b.Comma() @@ -1098,18 +1139,18 @@ func (m *Message) EncodeTDLibJSON(b tdjson.Encoder) error { b.Comma() b.FieldStart("content") if m.Content == nil { - return fmt.Errorf("unable to encode message#34e12c0: field content is nil") + return fmt.Errorf("unable to encode message#e255bc28: field content is nil") } if err := m.Content.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode message#34e12c0: field content: %w", err) + return fmt.Errorf("unable to encode message#e255bc28: field content: %w", err) } b.Comma() b.FieldStart("reply_markup") if m.ReplyMarkup == nil { - return fmt.Errorf("unable to encode message#34e12c0: field reply_markup is nil") + return fmt.Errorf("unable to encode message#e255bc28: field reply_markup is nil") } if err := m.ReplyMarkup.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode message#34e12c0: field reply_markup: %w", err) + return fmt.Errorf("unable to encode message#e255bc28: field reply_markup: %w", err) } b.Comma() b.StripComma() @@ -1120,270 +1161,282 @@ func (m *Message) EncodeTDLibJSON(b tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (m *Message) DecodeTDLibJSON(b tdjson.Decoder) error { if m == nil { - return fmt.Errorf("can't decode message#34e12c0 to nil") + return fmt.Errorf("can't decode message#e255bc28 to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("message"); err != nil { - return fmt.Errorf("unable to decode message#34e12c0: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: %w", err) } case "id": value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field id: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field id: %w", err) } m.ID = value case "sender_id": value, err := DecodeTDLibJSONMessageSender(b) if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field sender_id: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field sender_id: %w", err) } m.SenderID = value case "chat_id": value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field chat_id: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field chat_id: %w", err) } m.ChatID = value case "sending_state": value, err := DecodeTDLibJSONMessageSendingState(b) if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field sending_state: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field sending_state: %w", err) } m.SendingState = value case "scheduling_state": value, err := DecodeTDLibJSONMessageSchedulingState(b) if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field scheduling_state: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field scheduling_state: %w", err) } m.SchedulingState = value case "is_outgoing": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field is_outgoing: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field is_outgoing: %w", err) } m.IsOutgoing = value case "is_pinned": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field is_pinned: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field is_pinned: %w", err) } m.IsPinned = value + case "is_from_offline": + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode message#e255bc28: field is_from_offline: %w", err) + } + m.IsFromOffline = value case "can_be_edited": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_be_edited: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_be_edited: %w", err) } m.CanBeEdited = value case "can_be_forwarded": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_be_forwarded: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_be_forwarded: %w", err) } m.CanBeForwarded = value case "can_be_replied_in_another_chat": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_be_replied_in_another_chat: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_be_replied_in_another_chat: %w", err) } m.CanBeRepliedInAnotherChat = value case "can_be_saved": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_be_saved: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_be_saved: %w", err) } m.CanBeSaved = value case "can_be_deleted_only_for_self": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_be_deleted_only_for_self: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_be_deleted_only_for_self: %w", err) } m.CanBeDeletedOnlyForSelf = value case "can_be_deleted_for_all_users": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_be_deleted_for_all_users: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_be_deleted_for_all_users: %w", err) } m.CanBeDeletedForAllUsers = value case "can_get_added_reactions": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_get_added_reactions: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_get_added_reactions: %w", err) } m.CanGetAddedReactions = value case "can_get_statistics": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_get_statistics: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_get_statistics: %w", err) } m.CanGetStatistics = value case "can_get_message_thread": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_get_message_thread: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_get_message_thread: %w", err) } m.CanGetMessageThread = value case "can_get_read_date": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_get_read_date: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_get_read_date: %w", err) } m.CanGetReadDate = value case "can_get_viewers": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_get_viewers: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_get_viewers: %w", err) } m.CanGetViewers = value case "can_get_media_timestamp_links": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_get_media_timestamp_links: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_get_media_timestamp_links: %w", err) } m.CanGetMediaTimestampLinks = value case "can_report_reactions": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field can_report_reactions: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field can_report_reactions: %w", err) } m.CanReportReactions = value case "has_timestamped_media": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field has_timestamped_media: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field has_timestamped_media: %w", err) } m.HasTimestampedMedia = value case "is_channel_post": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field is_channel_post: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field is_channel_post: %w", err) } m.IsChannelPost = value case "is_topic_message": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field is_topic_message: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field is_topic_message: %w", err) } m.IsTopicMessage = value case "contains_unread_mention": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field contains_unread_mention: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field contains_unread_mention: %w", err) } m.ContainsUnreadMention = value case "date": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field date: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field date: %w", err) } m.Date = value case "edit_date": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field edit_date: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field edit_date: %w", err) } m.EditDate = value case "forward_info": if err := m.ForwardInfo.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field forward_info: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field forward_info: %w", err) } case "import_info": if err := m.ImportInfo.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field import_info: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field import_info: %w", err) } case "interaction_info": if err := m.InteractionInfo.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field interaction_info: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field interaction_info: %w", err) } case "unread_reactions": if err := b.Arr(func(b tdjson.Decoder) error { var value UnreadReaction if err := value.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field unread_reactions: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field unread_reactions: %w", err) } m.UnreadReactions = append(m.UnreadReactions, value) return nil }); err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field unread_reactions: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field unread_reactions: %w", err) } case "reply_to": value, err := DecodeTDLibJSONMessageReplyTo(b) if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field reply_to: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field reply_to: %w", err) } m.ReplyTo = value case "message_thread_id": value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field message_thread_id: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field message_thread_id: %w", err) } m.MessageThreadID = value case "saved_messages_topic_id": value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field saved_messages_topic_id: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field saved_messages_topic_id: %w", err) } m.SavedMessagesTopicID = value case "self_destruct_type": value, err := DecodeTDLibJSONMessageSelfDestructType(b) if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field self_destruct_type: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field self_destruct_type: %w", err) } m.SelfDestructType = value case "self_destruct_in": value, err := b.Double() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field self_destruct_in: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field self_destruct_in: %w", err) } m.SelfDestructIn = value case "auto_delete_in": value, err := b.Double() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field auto_delete_in: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field auto_delete_in: %w", err) } m.AutoDeleteIn = value case "via_bot_user_id": value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field via_bot_user_id: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field via_bot_user_id: %w", err) } m.ViaBotUserID = value + case "sender_business_bot_user_id": + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode message#e255bc28: field sender_business_bot_user_id: %w", err) + } + m.SenderBusinessBotUserID = value case "sender_boost_count": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field sender_boost_count: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field sender_boost_count: %w", err) } m.SenderBoostCount = value case "author_signature": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field author_signature: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field author_signature: %w", err) } m.AuthorSignature = value case "media_album_id": value, err := b.Long() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field media_album_id: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field media_album_id: %w", err) } m.MediaAlbumID = value case "restriction_reason": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field restriction_reason: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field restriction_reason: %w", err) } m.RestrictionReason = value case "content": value, err := DecodeTDLibJSONMessageContent(b) if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field content: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field content: %w", err) } m.Content = value case "reply_markup": value, err := DecodeTDLibJSONReplyMarkup(b) if err != nil { - return fmt.Errorf("unable to decode message#34e12c0: field reply_markup: %w", err) + return fmt.Errorf("unable to decode message#e255bc28: field reply_markup: %w", err) } m.ReplyMarkup = value default: @@ -1449,6 +1502,14 @@ func (m *Message) GetIsPinned() (value bool) { return m.IsPinned } +// GetIsFromOffline returns value of IsFromOffline field. +func (m *Message) GetIsFromOffline() (value bool) { + if m == nil { + return + } + return m.IsFromOffline +} + // GetCanBeEdited returns value of CanBeEdited field. func (m *Message) GetCanBeEdited() (value bool) { if m == nil { @@ -1689,6 +1750,14 @@ func (m *Message) GetViaBotUserID() (value int64) { return m.ViaBotUserID } +// GetSenderBusinessBotUserID returns value of SenderBusinessBotUserID field. +func (m *Message) GetSenderBusinessBotUserID() (value int64) { + if m == nil { + return + } + return m.SenderBusinessBotUserID +} + // GetSenderBoostCount returns value of SenderBoostCount field. func (m *Message) GetSenderBoostCount() (value int32) { if m == nil { diff --git a/tdapi/tl_phone_number_info_gen.go b/tdapi/tl_phone_number_info_gen.go index d921aef404..d97db669ce 100644 --- a/tdapi/tl_phone_number_info_gen.go +++ b/tdapi/tl_phone_number_info_gen.go @@ -40,7 +40,8 @@ type PhoneNumberInfo struct { // The phone number without country calling code formatted accordingly to local rules. // Expected digits are returned as '-', but even more digits might be entered by the user FormattedPhoneNumber string - // True, if the phone number was bought on Fragment and isn't tied to a SIM card + // True, if the phone number was bought at https://fragment.com and isn't tied to a SIM + // card. Information about the phone number can be received using getCollectibleItemInfo IsAnonymous bool } diff --git a/tdapi/tl_premium_feature_gen.go b/tdapi/tl_premium_feature_gen.go index c4f0c5e503..fe9c1e8c0c 100644 --- a/tdapi/tl_premium_feature_gen.go +++ b/tdapi/tl_premium_feature_gen.go @@ -2913,6 +2913,137 @@ func (p *PremiumFeatureLastSeenTimes) DecodeTDLibJSON(b tdjson.Decoder) error { }) } +// PremiumFeatureBusiness represents TL type `premiumFeatureBusiness#a6609704`. +type PremiumFeatureBusiness struct { +} + +// PremiumFeatureBusinessTypeID is TL type id of PremiumFeatureBusiness. +const PremiumFeatureBusinessTypeID = 0xa6609704 + +// construct implements constructor of PremiumFeatureClass. +func (p PremiumFeatureBusiness) construct() PremiumFeatureClass { return &p } + +// Ensuring interfaces in compile-time for PremiumFeatureBusiness. +var ( + _ bin.Encoder = &PremiumFeatureBusiness{} + _ bin.Decoder = &PremiumFeatureBusiness{} + _ bin.BareEncoder = &PremiumFeatureBusiness{} + _ bin.BareDecoder = &PremiumFeatureBusiness{} + + _ PremiumFeatureClass = &PremiumFeatureBusiness{} +) + +func (p *PremiumFeatureBusiness) Zero() bool { + if p == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (p *PremiumFeatureBusiness) String() string { + if p == nil { + return "PremiumFeatureBusiness(nil)" + } + type Alias PremiumFeatureBusiness + return fmt.Sprintf("PremiumFeatureBusiness%+v", Alias(*p)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*PremiumFeatureBusiness) TypeID() uint32 { + return PremiumFeatureBusinessTypeID +} + +// TypeName returns name of type in TL schema. +func (*PremiumFeatureBusiness) TypeName() string { + return "premiumFeatureBusiness" +} + +// TypeInfo returns info about TL type. +func (p *PremiumFeatureBusiness) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "premiumFeatureBusiness", + ID: PremiumFeatureBusinessTypeID, + } + if p == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (p *PremiumFeatureBusiness) Encode(b *bin.Buffer) error { + if p == nil { + return fmt.Errorf("can't encode premiumFeatureBusiness#a6609704 as nil") + } + b.PutID(PremiumFeatureBusinessTypeID) + return p.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (p *PremiumFeatureBusiness) EncodeBare(b *bin.Buffer) error { + if p == nil { + return fmt.Errorf("can't encode premiumFeatureBusiness#a6609704 as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (p *PremiumFeatureBusiness) Decode(b *bin.Buffer) error { + if p == nil { + return fmt.Errorf("can't decode premiumFeatureBusiness#a6609704 to nil") + } + if err := b.ConsumeID(PremiumFeatureBusinessTypeID); err != nil { + return fmt.Errorf("unable to decode premiumFeatureBusiness#a6609704: %w", err) + } + return p.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (p *PremiumFeatureBusiness) DecodeBare(b *bin.Buffer) error { + if p == nil { + return fmt.Errorf("can't decode premiumFeatureBusiness#a6609704 to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (p *PremiumFeatureBusiness) EncodeTDLibJSON(b tdjson.Encoder) error { + if p == nil { + return fmt.Errorf("can't encode premiumFeatureBusiness#a6609704 as nil") + } + b.ObjStart() + b.PutID("premiumFeatureBusiness") + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (p *PremiumFeatureBusiness) DecodeTDLibJSON(b tdjson.Decoder) error { + if p == nil { + return fmt.Errorf("can't decode premiumFeatureBusiness#a6609704 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("premiumFeatureBusiness"); err != nil { + return fmt.Errorf("unable to decode premiumFeatureBusiness#a6609704: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + // PremiumFeatureClassName is schema name of PremiumFeatureClass. const PremiumFeatureClassName = "PremiumFeature" @@ -2947,6 +3078,7 @@ const PremiumFeatureClassName = "PremiumFeature" // case *tdapi.PremiumFeatureSavedMessagesTags: // premiumFeatureSavedMessagesTags#3bcbe986 // case *tdapi.PremiumFeatureMessagePrivacy: // premiumFeatureMessagePrivacy#2fd278f6 // case *tdapi.PremiumFeatureLastSeenTimes: // premiumFeatureLastSeenTimes#d2914a8f +// case *tdapi.PremiumFeatureBusiness: // premiumFeatureBusiness#a6609704 // default: panic(v) // } type PremiumFeatureClass interface { @@ -3132,6 +3264,13 @@ func DecodePremiumFeature(buf *bin.Buffer) (PremiumFeatureClass, error) { return nil, fmt.Errorf("unable to decode PremiumFeatureClass: %w", err) } return &v, nil + case PremiumFeatureBusinessTypeID: + // Decoding premiumFeatureBusiness#a6609704. + v := PremiumFeatureBusiness{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode PremiumFeatureClass: %w", err) + } + return &v, nil default: return nil, fmt.Errorf("unable to decode PremiumFeatureClass: %w", bin.NewUnexpectedID(id)) } @@ -3298,6 +3437,13 @@ func DecodeTDLibJSONPremiumFeature(buf tdjson.Decoder) (PremiumFeatureClass, err return nil, fmt.Errorf("unable to decode PremiumFeatureClass: %w", err) } return &v, nil + case "premiumFeatureBusiness": + // Decoding premiumFeatureBusiness#a6609704. + v := PremiumFeatureBusiness{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode PremiumFeatureClass: %w", err) + } + return &v, nil default: return nil, fmt.Errorf("unable to decode PremiumFeatureClass: %w", tdjson.NewUnexpectedID(id)) } diff --git a/tdapi/tl_premium_source_gen.go b/tdapi/tl_premium_source_gen.go index ff53484e5e..9ed8c51776 100644 --- a/tdapi/tl_premium_source_gen.go +++ b/tdapi/tl_premium_source_gen.go @@ -383,6 +383,182 @@ func (p *PremiumSourceFeature) GetFeature() (value PremiumFeatureClass) { return p.Feature } +// PremiumSourceBusinessFeature represents TL type `premiumSourceBusinessFeature#a703725c`. +type PremiumSourceBusinessFeature struct { + // The used feature; pass null if none specific feature was used + Feature BusinessFeatureClass +} + +// PremiumSourceBusinessFeatureTypeID is TL type id of PremiumSourceBusinessFeature. +const PremiumSourceBusinessFeatureTypeID = 0xa703725c + +// construct implements constructor of PremiumSourceClass. +func (p PremiumSourceBusinessFeature) construct() PremiumSourceClass { return &p } + +// Ensuring interfaces in compile-time for PremiumSourceBusinessFeature. +var ( + _ bin.Encoder = &PremiumSourceBusinessFeature{} + _ bin.Decoder = &PremiumSourceBusinessFeature{} + _ bin.BareEncoder = &PremiumSourceBusinessFeature{} + _ bin.BareDecoder = &PremiumSourceBusinessFeature{} + + _ PremiumSourceClass = &PremiumSourceBusinessFeature{} +) + +func (p *PremiumSourceBusinessFeature) Zero() bool { + if p == nil { + return true + } + if !(p.Feature == nil) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (p *PremiumSourceBusinessFeature) String() string { + if p == nil { + return "PremiumSourceBusinessFeature(nil)" + } + type Alias PremiumSourceBusinessFeature + return fmt.Sprintf("PremiumSourceBusinessFeature%+v", Alias(*p)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*PremiumSourceBusinessFeature) TypeID() uint32 { + return PremiumSourceBusinessFeatureTypeID +} + +// TypeName returns name of type in TL schema. +func (*PremiumSourceBusinessFeature) TypeName() string { + return "premiumSourceBusinessFeature" +} + +// TypeInfo returns info about TL type. +func (p *PremiumSourceBusinessFeature) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "premiumSourceBusinessFeature", + ID: PremiumSourceBusinessFeatureTypeID, + } + if p == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Feature", + SchemaName: "feature", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (p *PremiumSourceBusinessFeature) Encode(b *bin.Buffer) error { + if p == nil { + return fmt.Errorf("can't encode premiumSourceBusinessFeature#a703725c as nil") + } + b.PutID(PremiumSourceBusinessFeatureTypeID) + return p.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (p *PremiumSourceBusinessFeature) EncodeBare(b *bin.Buffer) error { + if p == nil { + return fmt.Errorf("can't encode premiumSourceBusinessFeature#a703725c as nil") + } + if p.Feature == nil { + return fmt.Errorf("unable to encode premiumSourceBusinessFeature#a703725c: field feature is nil") + } + if err := p.Feature.Encode(b); err != nil { + return fmt.Errorf("unable to encode premiumSourceBusinessFeature#a703725c: field feature: %w", err) + } + return nil +} + +// Decode implements bin.Decoder. +func (p *PremiumSourceBusinessFeature) Decode(b *bin.Buffer) error { + if p == nil { + return fmt.Errorf("can't decode premiumSourceBusinessFeature#a703725c to nil") + } + if err := b.ConsumeID(PremiumSourceBusinessFeatureTypeID); err != nil { + return fmt.Errorf("unable to decode premiumSourceBusinessFeature#a703725c: %w", err) + } + return p.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (p *PremiumSourceBusinessFeature) DecodeBare(b *bin.Buffer) error { + if p == nil { + return fmt.Errorf("can't decode premiumSourceBusinessFeature#a703725c to nil") + } + { + value, err := DecodeBusinessFeature(b) + if err != nil { + return fmt.Errorf("unable to decode premiumSourceBusinessFeature#a703725c: field feature: %w", err) + } + p.Feature = value + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (p *PremiumSourceBusinessFeature) EncodeTDLibJSON(b tdjson.Encoder) error { + if p == nil { + return fmt.Errorf("can't encode premiumSourceBusinessFeature#a703725c as nil") + } + b.ObjStart() + b.PutID("premiumSourceBusinessFeature") + b.Comma() + b.FieldStart("feature") + if p.Feature == nil { + return fmt.Errorf("unable to encode premiumSourceBusinessFeature#a703725c: field feature is nil") + } + if err := p.Feature.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode premiumSourceBusinessFeature#a703725c: field feature: %w", err) + } + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (p *PremiumSourceBusinessFeature) DecodeTDLibJSON(b tdjson.Decoder) error { + if p == nil { + return fmt.Errorf("can't decode premiumSourceBusinessFeature#a703725c to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("premiumSourceBusinessFeature"); err != nil { + return fmt.Errorf("unable to decode premiumSourceBusinessFeature#a703725c: %w", err) + } + case "feature": + value, err := DecodeTDLibJSONBusinessFeature(b) + if err != nil { + return fmt.Errorf("unable to decode premiumSourceBusinessFeature#a703725c: field feature: %w", err) + } + p.Feature = value + default: + return b.Skip() + } + return nil + }) +} + +// GetFeature returns value of Feature field. +func (p *PremiumSourceBusinessFeature) GetFeature() (value BusinessFeatureClass) { + if p == nil { + return + } + return p.Feature +} + // PremiumSourceStoryFeature represents TL type `premiumSourceStoryFeature#c290316c`. type PremiumSourceStoryFeature struct { // The used feature @@ -870,6 +1046,7 @@ const PremiumSourceClassName = "PremiumSource" // switch v := g.(type) { // case *tdapi.PremiumSourceLimitExceeded: // premiumSourceLimitExceeded#85ae8702 // case *tdapi.PremiumSourceFeature: // premiumSourceFeature#1a929325 +// case *tdapi.PremiumSourceBusinessFeature: // premiumSourceBusinessFeature#a703725c // case *tdapi.PremiumSourceStoryFeature: // premiumSourceStoryFeature#c290316c // case *tdapi.PremiumSourceLink: // premiumSourceLink#7f42999c // case *tdapi.PremiumSourceSettings: // premiumSourceSettings#eef88535 @@ -918,6 +1095,13 @@ func DecodePremiumSource(buf *bin.Buffer) (PremiumSourceClass, error) { return nil, fmt.Errorf("unable to decode PremiumSourceClass: %w", err) } return &v, nil + case PremiumSourceBusinessFeatureTypeID: + // Decoding premiumSourceBusinessFeature#a703725c. + v := PremiumSourceBusinessFeature{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode PremiumSourceClass: %w", err) + } + return &v, nil case PremiumSourceStoryFeatureTypeID: // Decoding premiumSourceStoryFeature#c290316c. v := PremiumSourceStoryFeature{} @@ -965,6 +1149,13 @@ func DecodeTDLibJSONPremiumSource(buf tdjson.Decoder) (PremiumSourceClass, error return nil, fmt.Errorf("unable to decode PremiumSourceClass: %w", err) } return &v, nil + case "premiumSourceBusinessFeature": + // Decoding premiumSourceBusinessFeature#a703725c. + v := PremiumSourceBusinessFeature{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode PremiumSourceClass: %w", err) + } + return &v, nil case "premiumSourceStoryFeature": // Decoding premiumSourceStoryFeature#c290316c. v := PremiumSourceStoryFeature{} diff --git a/tdapi/tl_premium_state_gen.go b/tdapi/tl_premium_state_gen.go index 83f81d0409..caf1771710 100644 --- a/tdapi/tl_premium_state_gen.go +++ b/tdapi/tl_premium_state_gen.go @@ -31,7 +31,7 @@ var ( _ = tdjson.Encoder{} ) -// PremiumState represents TL type `premiumState#fd42d2cd`. +// PremiumState represents TL type `premiumState#91a8799`. type PremiumState struct { // Text description of the state of the current Premium subscription; may be empty if the // current user has no Telegram Premium subscription @@ -40,10 +40,12 @@ type PremiumState struct { PaymentOptions []PremiumStatePaymentOption // The list of available promotion animations for Premium features Animations []PremiumFeaturePromotionAnimation + // The list of available promotion animations for Business features + BusinessAnimations []BusinessFeaturePromotionAnimation } // PremiumStateTypeID is TL type id of PremiumState. -const PremiumStateTypeID = 0xfd42d2cd +const PremiumStateTypeID = 0x91a8799 // Ensuring interfaces in compile-time for PremiumState. var ( @@ -66,6 +68,9 @@ func (p *PremiumState) Zero() bool { if !(p.Animations == nil) { return false } + if !(p.BusinessAnimations == nil) { + return false + } return true } @@ -114,6 +119,10 @@ func (p *PremiumState) TypeInfo() tdp.Type { Name: "Animations", SchemaName: "animations", }, + { + Name: "BusinessAnimations", + SchemaName: "business_animations", + }, } return typ } @@ -121,7 +130,7 @@ func (p *PremiumState) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (p *PremiumState) Encode(b *bin.Buffer) error { if p == nil { - return fmt.Errorf("can't encode premiumState#fd42d2cd as nil") + return fmt.Errorf("can't encode premiumState#91a8799 as nil") } b.PutID(PremiumStateTypeID) return p.EncodeBare(b) @@ -130,21 +139,27 @@ func (p *PremiumState) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (p *PremiumState) EncodeBare(b *bin.Buffer) error { if p == nil { - return fmt.Errorf("can't encode premiumState#fd42d2cd as nil") + return fmt.Errorf("can't encode premiumState#91a8799 as nil") } if err := p.State.Encode(b); err != nil { - return fmt.Errorf("unable to encode premiumState#fd42d2cd: field state: %w", err) + return fmt.Errorf("unable to encode premiumState#91a8799: field state: %w", err) } b.PutInt(len(p.PaymentOptions)) for idx, v := range p.PaymentOptions { if err := v.EncodeBare(b); err != nil { - return fmt.Errorf("unable to encode bare premiumState#fd42d2cd: field payment_options element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode bare premiumState#91a8799: field payment_options element with index %d: %w", idx, err) } } b.PutInt(len(p.Animations)) for idx, v := range p.Animations { if err := v.EncodeBare(b); err != nil { - return fmt.Errorf("unable to encode bare premiumState#fd42d2cd: field animations element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode bare premiumState#91a8799: field animations element with index %d: %w", idx, err) + } + } + b.PutInt(len(p.BusinessAnimations)) + for idx, v := range p.BusinessAnimations { + if err := v.EncodeBare(b); err != nil { + return fmt.Errorf("unable to encode bare premiumState#91a8799: field business_animations element with index %d: %w", idx, err) } } return nil @@ -153,10 +168,10 @@ func (p *PremiumState) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (p *PremiumState) Decode(b *bin.Buffer) error { if p == nil { - return fmt.Errorf("can't decode premiumState#fd42d2cd to nil") + return fmt.Errorf("can't decode premiumState#91a8799 to nil") } if err := b.ConsumeID(PremiumStateTypeID); err != nil { - return fmt.Errorf("unable to decode premiumState#fd42d2cd: %w", err) + return fmt.Errorf("unable to decode premiumState#91a8799: %w", err) } return p.DecodeBare(b) } @@ -164,17 +179,17 @@ func (p *PremiumState) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (p *PremiumState) DecodeBare(b *bin.Buffer) error { if p == nil { - return fmt.Errorf("can't decode premiumState#fd42d2cd to nil") + return fmt.Errorf("can't decode premiumState#91a8799 to nil") } { if err := p.State.Decode(b); err != nil { - return fmt.Errorf("unable to decode premiumState#fd42d2cd: field state: %w", err) + return fmt.Errorf("unable to decode premiumState#91a8799: field state: %w", err) } } { headerLen, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode premiumState#fd42d2cd: field payment_options: %w", err) + return fmt.Errorf("unable to decode premiumState#91a8799: field payment_options: %w", err) } if headerLen > 0 { @@ -183,7 +198,7 @@ func (p *PremiumState) DecodeBare(b *bin.Buffer) error { for idx := 0; idx < headerLen; idx++ { var value PremiumStatePaymentOption if err := value.DecodeBare(b); err != nil { - return fmt.Errorf("unable to decode bare premiumState#fd42d2cd: field payment_options: %w", err) + return fmt.Errorf("unable to decode bare premiumState#91a8799: field payment_options: %w", err) } p.PaymentOptions = append(p.PaymentOptions, value) } @@ -191,7 +206,7 @@ func (p *PremiumState) DecodeBare(b *bin.Buffer) error { { headerLen, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode premiumState#fd42d2cd: field animations: %w", err) + return fmt.Errorf("unable to decode premiumState#91a8799: field animations: %w", err) } if headerLen > 0 { @@ -200,32 +215,49 @@ func (p *PremiumState) DecodeBare(b *bin.Buffer) error { for idx := 0; idx < headerLen; idx++ { var value PremiumFeaturePromotionAnimation if err := value.DecodeBare(b); err != nil { - return fmt.Errorf("unable to decode bare premiumState#fd42d2cd: field animations: %w", err) + return fmt.Errorf("unable to decode bare premiumState#91a8799: field animations: %w", err) } p.Animations = append(p.Animations, value) } } + { + headerLen, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode premiumState#91a8799: field business_animations: %w", err) + } + + if headerLen > 0 { + p.BusinessAnimations = make([]BusinessFeaturePromotionAnimation, 0, headerLen%bin.PreallocateLimit) + } + for idx := 0; idx < headerLen; idx++ { + var value BusinessFeaturePromotionAnimation + if err := value.DecodeBare(b); err != nil { + return fmt.Errorf("unable to decode bare premiumState#91a8799: field business_animations: %w", err) + } + p.BusinessAnimations = append(p.BusinessAnimations, value) + } + } return nil } // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (p *PremiumState) EncodeTDLibJSON(b tdjson.Encoder) error { if p == nil { - return fmt.Errorf("can't encode premiumState#fd42d2cd as nil") + return fmt.Errorf("can't encode premiumState#91a8799 as nil") } b.ObjStart() b.PutID("premiumState") b.Comma() b.FieldStart("state") if err := p.State.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode premiumState#fd42d2cd: field state: %w", err) + return fmt.Errorf("unable to encode premiumState#91a8799: field state: %w", err) } b.Comma() b.FieldStart("payment_options") b.ArrStart() for idx, v := range p.PaymentOptions { if err := v.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode premiumState#fd42d2cd: field payment_options element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode premiumState#91a8799: field payment_options element with index %d: %w", idx, err) } b.Comma() } @@ -236,7 +268,18 @@ func (p *PremiumState) EncodeTDLibJSON(b tdjson.Encoder) error { b.ArrStart() for idx, v := range p.Animations { if err := v.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode premiumState#fd42d2cd: field animations element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode premiumState#91a8799: field animations element with index %d: %w", idx, err) + } + b.Comma() + } + b.StripComma() + b.ArrEnd() + b.Comma() + b.FieldStart("business_animations") + b.ArrStart() + for idx, v := range p.BusinessAnimations { + if err := v.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode premiumState#91a8799: field business_animations element with index %d: %w", idx, err) } b.Comma() } @@ -251,40 +294,51 @@ func (p *PremiumState) EncodeTDLibJSON(b tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (p *PremiumState) DecodeTDLibJSON(b tdjson.Decoder) error { if p == nil { - return fmt.Errorf("can't decode premiumState#fd42d2cd to nil") + return fmt.Errorf("can't decode premiumState#91a8799 to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("premiumState"); err != nil { - return fmt.Errorf("unable to decode premiumState#fd42d2cd: %w", err) + return fmt.Errorf("unable to decode premiumState#91a8799: %w", err) } case "state": if err := p.State.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode premiumState#fd42d2cd: field state: %w", err) + return fmt.Errorf("unable to decode premiumState#91a8799: field state: %w", err) } case "payment_options": if err := b.Arr(func(b tdjson.Decoder) error { var value PremiumStatePaymentOption if err := value.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode premiumState#fd42d2cd: field payment_options: %w", err) + return fmt.Errorf("unable to decode premiumState#91a8799: field payment_options: %w", err) } p.PaymentOptions = append(p.PaymentOptions, value) return nil }); err != nil { - return fmt.Errorf("unable to decode premiumState#fd42d2cd: field payment_options: %w", err) + return fmt.Errorf("unable to decode premiumState#91a8799: field payment_options: %w", err) } case "animations": if err := b.Arr(func(b tdjson.Decoder) error { var value PremiumFeaturePromotionAnimation if err := value.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode premiumState#fd42d2cd: field animations: %w", err) + return fmt.Errorf("unable to decode premiumState#91a8799: field animations: %w", err) } p.Animations = append(p.Animations, value) return nil }); err != nil { - return fmt.Errorf("unable to decode premiumState#fd42d2cd: field animations: %w", err) + return fmt.Errorf("unable to decode premiumState#91a8799: field animations: %w", err) + } + case "business_animations": + if err := b.Arr(func(b tdjson.Decoder) error { + var value BusinessFeaturePromotionAnimation + if err := value.DecodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to decode premiumState#91a8799: field business_animations: %w", err) + } + p.BusinessAnimations = append(p.BusinessAnimations, value) + return nil + }); err != nil { + return fmt.Errorf("unable to decode premiumState#91a8799: field business_animations: %w", err) } default: return b.Skip() @@ -316,3 +370,11 @@ func (p *PremiumState) GetAnimations() (value []PremiumFeaturePromotionAnimation } return p.Animations } + +// GetBusinessAnimations returns value of BusinessAnimations field. +func (p *PremiumState) GetBusinessAnimations() (value []BusinessFeaturePromotionAnimation) { + if p == nil { + return + } + return p.BusinessAnimations +} diff --git a/tdapi/tl_registry_gen.go b/tdapi/tl_registry_gen.go index 04b7c6e4c7..4408ef3280 100644 --- a/tdapi/tl_registry_gen.go +++ b/tdapi/tl_registry_gen.go @@ -135,23 +135,27 @@ func TypesMap() map[uint32]string { ChatPhotoInfoTypeID: "chatPhotoInfo#10c2b4a6", UserTypeRegularTypeID: "userTypeRegular#dc51699b", UserTypeDeletedTypeID: "userTypeDeleted#94403d24", - UserTypeBotTypeID: "userTypeBot#f979e790", + UserTypeBotTypeID: "userTypeBot#ae30a83a", UserTypeUnknownTypeID: "userTypeUnknown#d4d0613d", BotCommandTypeID: "botCommand#c27ac8c7", BotCommandsTypeID: "botCommands#4f9aa2c5", BotMenuButtonTypeID: "botMenuButton#c7b57ce6", ChatLocationTypeID: "chatLocation#a29b8f21", + BirthdateTypeID: "birthdate#61fe6d1e", + CloseBirthdayUserTypeID: "closeBirthdayUser#800659ee", BusinessAwayMessageScheduleAlwaysTypeID: "businessAwayMessageScheduleAlways#c9b9e2b9", BusinessAwayMessageScheduleOutsideOfOpeningHoursTypeID: "businessAwayMessageScheduleOutsideOfOpeningHours#c643df16", BusinessAwayMessageScheduleCustomTypeID: "businessAwayMessageScheduleCustom#8ac04dd2", BusinessLocationTypeID: "businessLocation#bf54af5a", - BusinessRecipientsTypeID: "businessRecipients#2f3ca54a", + BusinessRecipientsTypeID: "businessRecipients#802011e2", BusinessAwayMessageSettingsTypeID: "businessAwayMessageSettings#150ba2e9", BusinessGreetingMessageSettingsTypeID: "businessGreetingMessageSettings#64ae3e12", BusinessConnectedBotTypeID: "businessConnectedBot#ec50ead7", + BusinessIntroTypeID: "businessIntro#737175e8", + InputBusinessIntroTypeID: "inputBusinessIntro#910fb07", BusinessOpeningHoursIntervalTypeID: "businessOpeningHoursInterval#bdf05654", BusinessOpeningHoursTypeID: "businessOpeningHours#a623e64a", - BusinessInfoTypeID: "businessInfo#773c5066", + BusinessInfoTypeID: "businessInfo#cc697499", ChatPhotoStickerTypeRegularOrMaskTypeID: "chatPhotoStickerTypeRegularOrMask#e741599c", ChatPhotoStickerTypeCustomEmojiTypeID: "chatPhotoStickerTypeCustomEmoji#f021bad1", ChatPhotoStickerTypeID: "chatPhotoSticker#a90383a3", @@ -184,7 +188,7 @@ func TypesMap() map[uint32]string { UsernamesTypeID: "usernames#bf343063", UserTypeID: "user#18552c62", BotInfoTypeID: "botInfo#bfdb89a", - UserFullInfoTypeID: "userFullInfo#760faed8", + UserFullInfoTypeID: "userFullInfo#809a3ac2", UsersTypeID: "users#9d955a12", ChatAdministratorTypeID: "chatAdministrator#7277bd2c", ChatAdministratorsTypeID: "chatAdministrators#5141ca21", @@ -266,7 +270,7 @@ func TypesMap() map[uint32]string { MessageReplyToStoryTypeID: "messageReplyToStory#708ca939", InputMessageReplyToMessageTypeID: "inputMessageReplyToMessage#11e3fd76", InputMessageReplyToStoryTypeID: "inputMessageReplyToStory#51aece78", - MessageTypeID: "message#34e12c0", + MessageTypeID: "message#e255bc28", MessagesTypeID: "messages#b34c8c60", FoundMessagesTypeID: "foundMessages#2515f708", FoundChatMessagesTypeID: "foundChatMessages#4a25270c", @@ -274,6 +278,8 @@ func TypesMap() map[uint32]string { MessagePositionsTypeID: "messagePositions#912eab72", MessageCalendarDayTypeID: "messageCalendarDay#e98f8f62", MessageCalendarTypeID: "messageCalendar#2582bbd7", + BusinessMessageTypeID: "businessMessage#fa604646", + BusinessMessagesTypeID: "businessMessages#355963fa", MessageSourceChatHistoryTypeID: "messageSourceChatHistory#bf02073c", MessageSourceMessageThreadHistoryTypeID: "messageSourceMessageThreadHistory#114f9106", MessageSourceForumTopicHistoryTypeID: "messageSourceForumTopicHistory#a5842cb7", @@ -290,8 +296,14 @@ func TypesMap() map[uint32]string { MessageSponsorTypePrivateChannelTypeID: "messageSponsorTypePrivateChannel#74d245a8", MessageSponsorTypeWebsiteTypeID: "messageSponsorTypeWebsite#a4e45f9b", MessageSponsorTypeID: "messageSponsor#a0b25071", - SponsoredMessageTypeID: "sponsoredMessage#147623b4", + SponsoredMessageTypeID: "sponsoredMessage#3748e46f", SponsoredMessagesTypeID: "sponsoredMessages#e402a0f", + ReportChatSponsoredMessageOptionTypeID: "reportChatSponsoredMessageOption#aabd054a", + ReportChatSponsoredMessageResultOkTypeID: "reportChatSponsoredMessageResultOk#754f721f", + ReportChatSponsoredMessageResultFailedTypeID: "reportChatSponsoredMessageResultFailed#7f1f9bc6", + ReportChatSponsoredMessageResultOptionRequiredTypeID: "reportChatSponsoredMessageResultOptionRequired#314c2d73", + ReportChatSponsoredMessageResultAdsHiddenTypeID: "reportChatSponsoredMessageResultAdsHidden#e8eade1e", + ReportChatSponsoredMessageResultPremiumRequiredTypeID: "reportChatSponsoredMessageResultPremiumRequired#770c2ed0", FileDownloadTypeID: "fileDownload#834d1354", DownloadedFileCountsTypeID: "downloadedFileCounts#8a572842", FoundFileDownloadsTypeID: "foundFileDownloads#c7db4128", @@ -343,8 +355,8 @@ func TypesMap() map[uint32]string { KeyboardButtonTypeRequestPhoneNumberTypeID: "keyboardButtonTypeRequestPhoneNumber#a4d9b7b9", KeyboardButtonTypeRequestLocationTypeID: "keyboardButtonTypeRequestLocation#f8828cfd", KeyboardButtonTypeRequestPollTypeID: "keyboardButtonTypeRequestPoll#7164dcb8", - KeyboardButtonTypeRequestUsersTypeID: "keyboardButtonTypeRequestUsers#7e63ef90", - KeyboardButtonTypeRequestChatTypeID: "keyboardButtonTypeRequestChat#103ea7a2", + KeyboardButtonTypeRequestUsersTypeID: "keyboardButtonTypeRequestUsers#985c8bfd", + KeyboardButtonTypeRequestChatTypeID: "keyboardButtonTypeRequestChat#5a1224b5", KeyboardButtonTypeWebAppTypeID: "keyboardButtonTypeWebApp#70c8ff62", KeyboardButtonTypeID: "keyboardButton#84a0ce74", InlineKeyboardButtonTypeURLTypeID: "inlineKeyboardButtonTypeUrl#4365beac", @@ -375,6 +387,8 @@ func TypesMap() map[uint32]string { ForumTopicTypeID: "forumTopic#1213ace6", ForumTopicsTypeID: "forumTopics#2d99b4ae", LinkPreviewOptionsTypeID: "linkPreviewOptions#3e61b3f3", + SharedUserTypeID: "sharedUser#117724f7", + SharedChatTypeID: "sharedChat#4a87b01a", RichTextPlainTypeID: "richTextPlain#1cc42966", RichTextBoldTypeID: "richTextBold#63970f6c", RichTextItalicTypeID: "richTextItalic#6e77f03f", @@ -436,6 +450,9 @@ func TypesMap() map[uint32]string { CountryInfoTypeID: "countryInfo#d9936dff", CountriesTypeID: "countries#94b50e0f", PhoneNumberInfoTypeID: "phoneNumberInfo#d2c398a1", + CollectibleItemTypeUsernameTypeID: "collectibleItemTypeUsername#1b56e7d1", + CollectibleItemTypePhoneNumberTypeID: "collectibleItemTypePhoneNumber#4ae0e142", + CollectibleItemInfoTypeID: "collectibleItemInfo#570f9bcd", BankCardActionOpenURLTypeID: "bankCardActionOpenUrl#f44a5885", BankCardInfoTypeID: "bankCardInfo#2bc7da9f", AddressTypeID: "address#86304f3a", @@ -598,8 +615,8 @@ func TypesMap() map[uint32]string { MessagePremiumGiveawayCompletedTypeID: "messagePremiumGiveawayCompleted#80533949", MessagePremiumGiveawayWinnersTypeID: "messagePremiumGiveawayWinners#815d5f31", MessageContactRegisteredTypeID: "messageContactRegistered#a678fcff", - MessageUsersSharedTypeID: "messageUsersShared#95dca529", - MessageChatSharedTypeID: "messageChatShared#22db7091", + MessageUsersSharedTypeID: "messageUsersShared#7f1f4a22", + MessageChatSharedTypeID: "messageChatShared#aec6d961", MessageBotWriteAccessAllowedTypeID: "messageBotWriteAccessAllowed#9a8ab7b4", MessageWebAppDataSentTypeID: "messageWebAppDataSent#fb033912", MessageWebAppDataReceivedTypeID: "messageWebAppDataReceived#ff7d1a15", @@ -695,8 +712,8 @@ func TypesMap() map[uint32]string { EmojiKeywordsTypeID: "emojiKeywords#de023f4", StickersTypeID: "stickers#83491d00", EmojisTypeID: "emojis#77274a16", - StickerSetTypeID: "stickerSet#133c3db9", - StickerSetInfoTypeID: "stickerSetInfo#fb991fda", + StickerSetTypeID: "stickerSet#bcf4d158", + StickerSetInfoTypeID: "stickerSetInfo#3cd2cd82", StickerSetsTypeID: "stickerSets#b8a6490d", TrendingStickerSetsTypeID: "trendingStickerSets#298f12cc", EmojiCategoryTypeID: "emojiCategory#c6e9e5a4", @@ -810,6 +827,7 @@ func TypesMap() map[uint32]string { SpeechRecognitionResultPendingTypeID: "speechRecognitionResultPending#9ebc8e00", SpeechRecognitionResultTextTypeID: "speechRecognitionResultText#80e681dd", SpeechRecognitionResultErrorTypeID: "speechRecognitionResultError#9d243fc", + BusinessConnectionTypeID: "businessConnection#4436e234", AttachmentMenuBotColorTypeID: "attachmentMenuBotColor#64235ebc", AttachmentMenuBotTypeID: "attachmentMenuBot#b96e1bbf", SentWebAppMessageTypeID: "sentWebAppMessage#4a24eec0", @@ -954,6 +972,18 @@ func TypesMap() map[uint32]string { PremiumFeatureSavedMessagesTagsTypeID: "premiumFeatureSavedMessagesTags#3bcbe986", PremiumFeatureMessagePrivacyTypeID: "premiumFeatureMessagePrivacy#2fd278f6", PremiumFeatureLastSeenTimesTypeID: "premiumFeatureLastSeenTimes#d2914a8f", + PremiumFeatureBusinessTypeID: "premiumFeatureBusiness#a6609704", + BusinessFeatureLocationTypeID: "businessFeatureLocation#c090027c", + BusinessFeatureOpeningHoursTypeID: "businessFeatureOpeningHours#1b7b22ed", + BusinessFeatureQuickRepliesTypeID: "businessFeatureQuickReplies#9c380a82", + BusinessFeatureGreetingMessageTypeID: "businessFeatureGreetingMessage#6aa87474", + BusinessFeatureAwayMessageTypeID: "businessFeatureAwayMessage#40f9e8dd", + BusinessFeatureAccountLinksTypeID: "businessFeatureAccountLinks#6ffa970e", + BusinessFeatureIntroTypeID: "businessFeatureIntro#b7843cb4", + BusinessFeatureBotsTypeID: "businessFeatureBots#106575e5", + BusinessFeatureEmojiStatusTypeID: "businessFeatureEmojiStatus#cd8ec0e5", + BusinessFeatureChatFolderTagsTypeID: "businessFeatureChatFolderTags#df95092a", + BusinessFeatureUpgradedStoriesTypeID: "businessFeatureUpgradedStories#93fb53d2", PremiumStoryFeaturePriorityOrderTypeID: "premiumStoryFeaturePriorityOrder#8ff172c7", PremiumStoryFeatureStealthModeTypeID: "premiumStoryFeatureStealthMode#47343da4", PremiumStoryFeaturePermanentViewsHistoryTypeID: "premiumStoryFeaturePermanentViewsHistory#c2a047a0", @@ -963,13 +993,16 @@ func TypesMap() map[uint32]string { PremiumStoryFeatureVideoQualityTypeID: "premiumStoryFeatureVideoQuality#baafbea9", PremiumLimitTypeID: "premiumLimit#7ed372e6", PremiumFeaturesTypeID: "premiumFeatures#4cf10e82", + BusinessFeaturesTypeID: "businessFeatures#e1593e48", PremiumSourceLimitExceededTypeID: "premiumSourceLimitExceeded#85ae8702", PremiumSourceFeatureTypeID: "premiumSourceFeature#1a929325", + PremiumSourceBusinessFeatureTypeID: "premiumSourceBusinessFeature#a703725c", PremiumSourceStoryFeatureTypeID: "premiumSourceStoryFeature#c290316c", PremiumSourceLinkTypeID: "premiumSourceLink#7f42999c", PremiumSourceSettingsTypeID: "premiumSourceSettings#eef88535", PremiumFeaturePromotionAnimationTypeID: "premiumFeaturePromotionAnimation#899dab1c", - PremiumStateTypeID: "premiumState#fd42d2cd", + BusinessFeaturePromotionAnimationTypeID: "businessFeaturePromotionAnimation#7a05680a", + PremiumStateTypeID: "premiumState#91a8799", StorePaymentPurposePremiumSubscriptionTypeID: "storePaymentPurposePremiumSubscription#4b558114", StorePaymentPurposeGiftedPremiumTypeID: "storePaymentPurposeGiftedPremium#7240c0d1", StorePaymentPurposePremiumGiftCodesTypeID: "storePaymentPurposePremiumGiftCodes#9e11cf42", @@ -1092,6 +1125,7 @@ func TypesMap() map[uint32]string { StoryPrivacySettingsSelectedUsersTypeID: "storyPrivacySettingsSelectedUsers#84d7d27b", UserPrivacySettingRuleAllowAllTypeID: "userPrivacySettingRuleAllowAll#8abf1c3f", UserPrivacySettingRuleAllowContactsTypeID: "userPrivacySettingRuleAllowContacts#8f2f2d10", + UserPrivacySettingRuleAllowPremiumUsersTypeID: "userPrivacySettingRuleAllowPremiumUsers#60ce8541", UserPrivacySettingRuleAllowUsersTypeID: "userPrivacySettingRuleAllowUsers#d1570b70", UserPrivacySettingRuleAllowChatMembersTypeID: "userPrivacySettingRuleAllowChatMembers#f249b617", UserPrivacySettingRuleRestrictAllTypeID: "userPrivacySettingRuleRestrictAll#ac2a9550", @@ -1104,6 +1138,7 @@ func TypesMap() map[uint32]string { UserPrivacySettingShowLinkInForwardedMessagesTypeID: "userPrivacySettingShowLinkInForwardedMessages#2353b6e6", UserPrivacySettingShowPhoneNumberTypeID: "userPrivacySettingShowPhoneNumber#d0d1a229", UserPrivacySettingShowBioTypeID: "userPrivacySettingShowBio#39382761", + UserPrivacySettingShowBirthdateTypeID: "userPrivacySettingShowBirthdate#4596b4df", UserPrivacySettingAllowChatInvitesTypeID: "userPrivacySettingAllowChatInvites#4bcc1d27", UserPrivacySettingAllowCallsTypeID: "userPrivacySettingAllowCalls#c9f0c705", UserPrivacySettingAllowPeerToPeerCallsTypeID: "userPrivacySettingAllowPeerToPeerCalls#1502b940", @@ -1272,903 +1307,921 @@ func TypesMap() map[uint32]string { SuggestedActionRestorePremiumTypeID: "suggestedActionRestorePremium#e909dd64", SuggestedActionSubscribeToAnnualPremiumTypeID: "suggestedActionSubscribeToAnnualPremium#164978bb", SuggestedActionGiftPremiumForChristmasTypeID: "suggestedActionGiftPremiumForChristmas#93b3ee6f", - CountTypeID: "count#4d38f104", - TextTypeID: "text#22765898", - SecondsTypeID: "seconds#3936e58e", - FileDownloadedPrefixSizeTypeID: "fileDownloadedPrefixSize#87e267fb", - DeepLinkInfoTypeID: "deepLinkInfo#6f1ba0fe", - TextParseModeMarkdownTypeID: "textParseModeMarkdown#157648bf", - TextParseModeHTMLTypeID: "textParseModeHTML#62f4c5f3", - ProxyTypeSocks5TypeID: "proxyTypeSocks5#caf342b3", - ProxyTypeHTTPTypeID: "proxyTypeHttp#a3c7c777", - ProxyTypeMtprotoTypeID: "proxyTypeMtproto#8ae31ffd", - ProxyTypeID: "proxy#baf7b73", - ProxiesTypeID: "proxies#5ee27a86", - InputStickerTypeID: "inputSticker#e3d1ef79", - DateRangeTypeID: "dateRange#51150c66", - StatisticalValueTypeID: "statisticalValue#626d6a76", - StatisticalGraphDataTypeID: "statisticalGraphData#89732e2c", - StatisticalGraphAsyncTypeID: "statisticalGraphAsync#19fb2b9f", - StatisticalGraphErrorTypeID: "statisticalGraphError#c3fda052", - ChatStatisticsObjectTypeMessageTypeID: "chatStatisticsObjectTypeMessage#6f9f24f6", - ChatStatisticsObjectTypeStoryTypeID: "chatStatisticsObjectTypeStory#15baf9b0", - ChatStatisticsInteractionInfoTypeID: "chatStatisticsInteractionInfo#694a9a8d", - ChatStatisticsMessageSenderInfoTypeID: "chatStatisticsMessageSenderInfo#690a7e4b", - ChatStatisticsAdministratorActionsInfoTypeID: "chatStatisticsAdministratorActionsInfo#e7c5cd7e", - ChatStatisticsInviterInfoTypeID: "chatStatisticsInviterInfo#2583d48b", - ChatStatisticsSupergroupTypeID: "chatStatisticsSupergroup#c67549ef", - ChatStatisticsChannelTypeID: "chatStatisticsChannel#b8e95b4", - MessageStatisticsTypeID: "messageStatistics#a2ce4f07", - StoryStatisticsTypeID: "storyStatistics#46448b6b", - PointTypeID: "point#1a13f5b9", - VectorPathCommandLineTypeID: "vectorPathCommandLine#db663c8a", - VectorPathCommandCubicBezierCurveTypeID: "vectorPathCommandCubicBezierCurve#494c3e3a", - BotCommandScopeDefaultTypeID: "botCommandScopeDefault#2f6cb2ab", - BotCommandScopeAllPrivateChatsTypeID: "botCommandScopeAllPrivateChats#eb716739", - BotCommandScopeAllGroupChatsTypeID: "botCommandScopeAllGroupChats#c585c85e", - BotCommandScopeAllChatAdministratorsTypeID: "botCommandScopeAllChatAdministrators#771c1551", - BotCommandScopeChatTypeID: "botCommandScopeChat#e65b22a5", - BotCommandScopeChatAdministratorsTypeID: "botCommandScopeChatAdministrators#42bcfe4e", - BotCommandScopeChatMemberTypeID: "botCommandScopeChatMember#f36696f2", - UpdateAuthorizationStateTypeID: "updateAuthorizationState#60b30ee2", - UpdateNewMessageTypeID: "updateNewMessage#de6fb20e", - UpdateMessageSendAcknowledgedTypeID: "updateMessageSendAcknowledged#4da7d239", - UpdateMessageSendSucceededTypeID: "updateMessageSendSucceeded#6c399d7d", - UpdateMessageSendFailedTypeID: "updateMessageSendFailed#da1bf8e7", - UpdateMessageContentTypeID: "updateMessageContent#1e36bb24", - UpdateMessageEditedTypeID: "updateMessageEdited#dea602e6", - UpdateMessageIsPinnedTypeID: "updateMessageIsPinned#41bc233d", - UpdateMessageInteractionInfoTypeID: "updateMessageInteractionInfo#ab803bfe", - UpdateMessageContentOpenedTypeID: "updateMessageContentOpened#a55ea885", - UpdateMessageMentionReadTypeID: "updateMessageMentionRead#f0f74d46", - UpdateMessageUnreadReactionsTypeID: "updateMessageUnreadReactions#12a7220a", - UpdateMessageLiveLocationViewedTypeID: "updateMessageLiveLocationViewed#b2058595", - UpdateNewChatTypeID: "updateNewChat#7bb98ccd", - UpdateChatTitleTypeID: "updateChatTitle#f58b85a4", - UpdateChatPhotoTypeID: "updateChatPhoto#eca5423f", - UpdateChatAccentColorsTypeID: "updateChatAccentColors#b7b8f8f9", - UpdateChatPermissionsTypeID: "updateChatPermissions#9f52176d", - UpdateChatLastMessageTypeID: "updateChatLastMessage#f10cab1d", - UpdateChatPositionTypeID: "updateChatPosition#ff76fa77", - UpdateChatAddedToListTypeID: "updateChatAddedToList#ab7004ec", - UpdateChatRemovedFromListTypeID: "updateChatRemovedFromList#4d2ac21c", - UpdateChatReadInboxTypeID: "updateChatReadInbox#d07036e7", - UpdateChatReadOutboxTypeID: "updateChatReadOutbox#2a385285", - UpdateChatActionBarTypeID: "updateChatActionBar#d9a258c2", - UpdateChatAvailableReactionsTypeID: "updateChatAvailableReactions#8ab413f9", - UpdateChatDraftMessageTypeID: "updateChatDraftMessage#2bf257d4", - UpdateChatEmojiStatusTypeID: "updateChatEmojiStatus#77796510", - UpdateChatMessageSenderTypeID: "updateChatMessageSender#77705241", - UpdateChatMessageAutoDeleteTimeTypeID: "updateChatMessageAutoDeleteTime#71425de5", - UpdateChatNotificationSettingsTypeID: "updateChatNotificationSettings#d020b456", - UpdateChatPendingJoinRequestsTypeID: "updateChatPendingJoinRequests#14c6e3e1", - UpdateChatReplyMarkupTypeID: "updateChatReplyMarkup#4e0ba5a0", - UpdateChatBackgroundTypeID: "updateChatBackground#ff9d38b3", - UpdateChatThemeTypeID: "updateChatTheme#31f3d465", - UpdateChatUnreadMentionCountTypeID: "updateChatUnreadMentionCount#80f47b1c", - UpdateChatUnreadReactionCountTypeID: "updateChatUnreadReactionCount#81603cdd", - UpdateChatVideoChatTypeID: "updateChatVideoChat#25fb4ca6", - UpdateChatDefaultDisableNotificationTypeID: "updateChatDefaultDisableNotification#1ba96a9b", - UpdateChatHasProtectedContentTypeID: "updateChatHasProtectedContent#6b50071b", - UpdateChatIsTranslatableTypeID: "updateChatIsTranslatable#7b031617", - UpdateChatIsMarkedAsUnreadTypeID: "updateChatIsMarkedAsUnread#57853334", - UpdateChatViewAsTopicsTypeID: "updateChatViewAsTopics#5bff163d", - UpdateChatBlockListTypeID: "updateChatBlockList#872af48e", - UpdateChatHasScheduledMessagesTypeID: "updateChatHasScheduledMessages#7b14c2d7", - UpdateChatFoldersTypeID: "updateChatFolders#e110242a", - UpdateChatOnlineMemberCountTypeID: "updateChatOnlineMemberCount#1d0caa9d", - UpdateSavedMessagesTopicTypeID: "updateSavedMessagesTopic#9f823b30", - UpdateSavedMessagesTopicCountTypeID: "updateSavedMessagesTopicCount#fbd279d1", - UpdateQuickReplyShortcutTypeID: "updateQuickReplyShortcut#c69338cf", - UpdateQuickReplyShortcutDeletedTypeID: "updateQuickReplyShortcutDeleted#e8b9bc3a", - UpdateQuickReplyShortcutsTypeID: "updateQuickReplyShortcuts#77d31a6a", - UpdateQuickReplyShortcutMessagesTypeID: "updateQuickReplyShortcutMessages#8bb36b72", - UpdateForumTopicInfoTypeID: "updateForumTopicInfo#6b6f2cc9", - UpdateScopeNotificationSettingsTypeID: "updateScopeNotificationSettings#b83ccb73", - UpdateNotificationTypeID: "updateNotification#8ee67ed4", - UpdateNotificationGroupTypeID: "updateNotificationGroup#96cd9e06", - UpdateActiveNotificationsTypeID: "updateActiveNotifications#317d80f2", - UpdateHavePendingNotificationsTypeID: "updateHavePendingNotifications#aaee1db", - UpdateDeleteMessagesTypeID: "updateDeleteMessages#6a05bf9", - UpdateChatActionTypeID: "updateChatAction#9abfd628", - UpdateUserStatusTypeID: "updateUserStatus#39211211", - UpdateUserTypeID: "updateUser#468928f9", - UpdateBasicGroupTypeID: "updateBasicGroup#c433c763", - UpdateSupergroupTypeID: "updateSupergroup#fb6c6524", - UpdateSecretChatTypeID: "updateSecretChat#9ca5132b", - UpdateUserFullInfoTypeID: "updateUserFullInfo#fcf2cb17", - UpdateBasicGroupFullInfoTypeID: "updateBasicGroupFullInfo#52f66bbf", - UpdateSupergroupFullInfoTypeID: "updateSupergroupFullInfo#19f5cd0e", - UpdateServiceNotificationTypeID: "updateServiceNotification#4e9895ad", - UpdateFileTypeID: "updateFile#6cd875f", - UpdateFileGenerationStartTypeID: "updateFileGenerationStart#cec5eec", - UpdateFileGenerationStopTypeID: "updateFileGenerationStop#8f14fdeb", - UpdateFileDownloadsTypeID: "updateFileDownloads#e8cd12c7", - UpdateFileAddedToDownloadsTypeID: "updateFileAddedToDownloads#5ff5921a", - UpdateFileDownloadTypeID: "updateFileDownload#342f83ca", - UpdateFileRemovedFromDownloadsTypeID: "updateFileRemovedFromDownloads#6e7c14e8", - UpdateCallTypeID: "updateCall#4fb3d0dd", - UpdateGroupCallTypeID: "updateGroupCall#30324e00", - UpdateGroupCallParticipantTypeID: "updateGroupCallParticipant#d0213cf9", - UpdateNewCallSignalingDataTypeID: "updateNewCallSignalingData#22c98d8d", - UpdateUserPrivacySettingRulesTypeID: "updateUserPrivacySettingRules#c99552f6", - UpdateUnreadMessageCountTypeID: "updateUnreadMessageCount#4b541c9", - UpdateUnreadChatCountTypeID: "updateUnreadChatCount#76e19242", - UpdateStoryTypeID: "updateStory#1906572f", - UpdateStoryDeletedTypeID: "updateStoryDeleted#7007eb9d", - UpdateStorySendSucceededTypeID: "updateStorySendSucceeded#b9269e57", - UpdateStorySendFailedTypeID: "updateStorySendFailed#e046f199", - UpdateChatActiveStoriesTypeID: "updateChatActiveStories#79786c2c", - UpdateStoryListChatCountTypeID: "updateStoryListChatCount#8833cd3f", - UpdateStoryStealthModeTypeID: "updateStoryStealthMode#6ff7bd1a", - UpdateOptionTypeID: "updateOption#35b17404", - UpdateStickerSetTypeID: "updateStickerSet#70035dcc", - UpdateInstalledStickerSetsTypeID: "updateInstalledStickerSets#82cd5388", - UpdateTrendingStickerSetsTypeID: "updateTrendingStickerSets#4b7a50a7", - UpdateRecentStickersTypeID: "updateRecentStickers#aefdf8dc", - UpdateFavoriteStickersTypeID: "updateFavoriteStickers#113f2b6a", - UpdateSavedAnimationsTypeID: "updateSavedAnimations#1084a1c8", - UpdateSavedNotificationSoundsTypeID: "updateSavedNotificationSounds#5a6653b4", - UpdateDefaultBackgroundTypeID: "updateDefaultBackground#d550952f", - UpdateChatThemesTypeID: "updateChatThemes#98dc58d5", - UpdateAccentColorsTypeID: "updateAccentColors#1316555e", - UpdateProfileAccentColorsTypeID: "updateProfileAccentColors#bf8e7430", - UpdateLanguagePackStringsTypeID: "updateLanguagePackStrings#af87919f", - UpdateConnectionStateTypeID: "updateConnectionState#57939e2e", - UpdateTermsOfServiceTypeID: "updateTermsOfService#b23cc55e", - UpdateUsersNearbyTypeID: "updateUsersNearby#97c8ab5", - UpdateUnconfirmedSessionTypeID: "updateUnconfirmedSession#fea6088c", - UpdateAttachmentMenuBotsTypeID: "updateAttachmentMenuBots#b6b910c", - UpdateWebAppMessageSentTypeID: "updateWebAppMessageSent#58431229", - UpdateActiveEmojiReactionsTypeID: "updateActiveEmojiReactions#691ffcb7", - UpdateDefaultReactionTypeTypeID: "updateDefaultReactionType#4b615105", - UpdateSavedMessagesTagsTypeID: "updateSavedMessagesTags#7386424a", - UpdateSpeechRecognitionTrialTypeID: "updateSpeechRecognitionTrial#ff4efcc1", - UpdateDiceEmojisTypeID: "updateDiceEmojis#9d0f91df", - UpdateAnimatedEmojiMessageClickedTypeID: "updateAnimatedEmojiMessageClicked#a3167405", - UpdateAnimationSearchParametersTypeID: "updateAnimationSearchParameters#6016ef01", - UpdateSuggestedActionsTypeID: "updateSuggestedActions#c2e5cccb", - UpdateAddChatMembersPrivacyForbiddenTypeID: "updateAddChatMembersPrivacyForbidden#b8b50363", - UpdateAutosaveSettingsTypeID: "updateAutosaveSettings#da274f0b", - UpdateNewInlineQueryTypeID: "updateNewInlineQuery#7171bf34", - UpdateNewChosenInlineResultTypeID: "updateNewChosenInlineResult#cb4c4f5d", - UpdateNewCallbackQueryTypeID: "updateNewCallbackQuery#8964d05e", - UpdateNewInlineCallbackQueryTypeID: "updateNewInlineCallbackQuery#ecf934ba", - UpdateNewShippingQueryTypeID: "updateNewShippingQuery#29584672", - UpdateNewPreCheckoutQueryTypeID: "updateNewPreCheckoutQuery#2a3871c9", - UpdateNewCustomEventTypeID: "updateNewCustomEvent#76dd6a0c", - UpdateNewCustomQueryTypeID: "updateNewCustomQuery#d702f9a6", - UpdatePollTypeID: "updatePoll#966b73ca", - UpdatePollAnswerTypeID: "updatePollAnswer#b67ac547", - UpdateChatMemberTypeID: "updateChatMember#6000e29c", - UpdateNewChatJoinRequestTypeID: "updateNewChatJoinRequest#7e48b843", - UpdateChatBoostTypeID: "updateChatBoost#50727e24", - UpdateMessageReactionTypeID: "updateMessageReaction#f46c854a", - UpdateMessageReactionsTypeID: "updateMessageReactions#bd5618e9", - UpdatesTypeID: "updates#b9829222", - LogStreamDefaultTypeID: "logStreamDefault#52e296bc", - LogStreamFileTypeID: "logStreamFile#5b528de5", - LogStreamEmptyTypeID: "logStreamEmpty#e233f1cc", - LogVerbosityLevelTypeID: "logVerbosityLevel#676443ea", - LogTagsTypeID: "logTags#dc09ced4", - UserSupportInfoTypeID: "userSupportInfo#b50e1c29", - TestIntTypeID: "testInt#ddbd2c09", - TestStringTypeID: "testString#fe56688c", - TestBytesTypeID: "testBytes#a422c4de", - TestVectorIntTypeID: "testVectorInt#df9eb113", - TestVectorIntObjectTypeID: "testVectorIntObject#f152999b", - TestVectorStringTypeID: "testVectorString#5d6f85bc", - TestVectorStringObjectTypeID: "testVectorStringObject#e5ecc0d", - GetAuthorizationStateRequestTypeID: "getAuthorizationState#742dbe3d", - SetTdlibParametersRequestTypeID: "setTdlibParameters#d1c0f62e", - SetAuthenticationPhoneNumberRequestTypeID: "setAuthenticationPhoneNumber#33c0d823", - SetAuthenticationEmailAddressRequestTypeID: "setAuthenticationEmailAddress#69b2c502", - ResendAuthenticationCodeRequestTypeID: "resendAuthenticationCode#cf759719", - CheckAuthenticationEmailCodeRequestTypeID: "checkAuthenticationEmailCode#dd42c29f", - CheckAuthenticationCodeRequestTypeID: "checkAuthenticationCode#edfe44aa", - RequestQrCodeAuthenticationRequestTypeID: "requestQrCodeAuthentication#56fe3c4e", - RegisterUserRequestTypeID: "registerUser#c3aa52ec", - ResetAuthenticationEmailAddressRequestTypeID: "resetAuthenticationEmailAddress#e742722c", - CheckAuthenticationPasswordRequestTypeID: "checkAuthenticationPassword#87424ba0", - RequestAuthenticationPasswordRecoveryRequestTypeID: "requestAuthenticationPasswordRecovery#53152ab6", - CheckAuthenticationPasswordRecoveryCodeRequestTypeID: "checkAuthenticationPasswordRecoveryCode#dc0a3be5", - RecoverAuthenticationPasswordRequestTypeID: "recoverAuthenticationPassword#f8311523", - SendAuthenticationFirebaseSMSRequestTypeID: "sendAuthenticationFirebaseSms#15c15e3f", - CheckAuthenticationBotTokenRequestTypeID: "checkAuthenticationBotToken#261b4476", - LogOutRequestTypeID: "logOut#a1b5c41b", - CloseRequestTypeID: "close#b933e17f", - DestroyRequestTypeID: "destroy#28d9534a", - ConfirmQrCodeAuthenticationRequestTypeID: "confirmQrCodeAuthentication#e993a72d", - GetCurrentStateRequestTypeID: "getCurrentState#b8fc6889", - SetDatabaseEncryptionKeyRequestTypeID: "setDatabaseEncryptionKey#b83345b5", - GetPasswordStateRequestTypeID: "getPasswordState#f5957b78", - SetPasswordRequestTypeID: "setPassword#b8db46dd", - SetLoginEmailAddressRequestTypeID: "setLoginEmailAddress#37bb43d4", - ResendLoginEmailAddressCodeRequestTypeID: "resendLoginEmailAddressCode#11765215", - CheckLoginEmailAddressCodeRequestTypeID: "checkLoginEmailAddressCode#a951fc62", - GetRecoveryEmailAddressRequestTypeID: "getRecoveryEmailAddress#a0f1b9fd", - SetRecoveryEmailAddressRequestTypeID: "setRecoveryEmailAddress#89df939f", - CheckRecoveryEmailAddressCodeRequestTypeID: "checkRecoveryEmailAddressCode#88f7981b", - ResendRecoveryEmailAddressCodeRequestTypeID: "resendRecoveryEmailAddressCode#19d66f1c", - CancelRecoveryEmailAddressVerificationRequestTypeID: "cancelRecoveryEmailAddressVerification#a5988e8d", - RequestPasswordRecoveryRequestTypeID: "requestPasswordRecovery#ff2dc552", - CheckPasswordRecoveryCodeRequestTypeID: "checkPasswordRecoveryCode#f4081e18", - RecoverPasswordRequestTypeID: "recoverPassword#a5259973", - ResetPasswordRequestTypeID: "resetPassword#dc9e8c9d", - CancelPasswordResetRequestTypeID: "cancelPasswordReset#38127462", - CreateTemporaryPasswordRequestTypeID: "createTemporaryPassword#9f0d6f86", - GetTemporaryPasswordStateRequestTypeID: "getTemporaryPasswordState#ff3ea892", - GetMeRequestTypeID: "getMe#f495b27f", - GetUserRequestTypeID: "getUser#42999c0b", - GetUserFullInfoRequestTypeID: "getUserFullInfo#d1b29c58", - GetBasicGroupRequestTypeID: "getBasicGroup#9e893654", - GetBasicGroupFullInfoRequestTypeID: "getBasicGroupFullInfo#9365e32b", - GetSupergroupRequestTypeID: "getSupergroup#3afd10e2", - GetSupergroupFullInfoRequestTypeID: "getSupergroupFullInfo#418d4038", - GetSecretChatRequestTypeID: "getSecretChat#26b7e81", - GetChatRequestTypeID: "getChat#6f421440", - GetMessageRequestTypeID: "getMessage#9372c080", - GetMessageLocallyRequestTypeID: "getMessageLocally#dc062b6c", - GetRepliedMessageRequestTypeID: "getRepliedMessage#d9bd19bd", - GetChatPinnedMessageRequestTypeID: "getChatPinnedMessage#15731ab0", - GetCallbackQueryMessageRequestTypeID: "getCallbackQueryMessage#bd209172", - GetMessagesRequestTypeID: "getMessages#d5dd28bf", - GetMessageThreadRequestTypeID: "getMessageThread#7af23e3e", - GetMessageReadDateRequestTypeID: "getMessageReadDate#a7850343", - GetMessageViewersRequestTypeID: "getMessageViewers#a18f1ace", - GetFileRequestTypeID: "getFile#5c9efd4e", - GetRemoteFileRequestTypeID: "getRemoteFile#7f632732", - LoadChatsRequestTypeID: "loadChats#8f9b7d7b", - GetChatsRequestTypeID: "getChats#c604bac2", - SearchPublicChatRequestTypeID: "searchPublicChat#3316d9ad", - SearchPublicChatsRequestTypeID: "searchPublicChats#39d6e7b9", - SearchChatsRequestTypeID: "searchChats#8ff4b9cc", - SearchChatsOnServerRequestTypeID: "searchChatsOnServer#baf42f74", - SearchChatsNearbyRequestTypeID: "searchChatsNearby#f445c81f", - GetChatSimilarChatsRequestTypeID: "getChatSimilarChats#bb508f83", - GetChatSimilarChatCountRequestTypeID: "getChatSimilarChatCount#463e968e", - OpenChatSimilarChatRequestTypeID: "openChatSimilarChat#8fa6f413", - GetTopChatsRequestTypeID: "getTopChats#e8d95221", - RemoveTopChatRequestTypeID: "removeTopChat#8e481e55", - SearchRecentlyFoundChatsRequestTypeID: "searchRecentlyFoundChats#62320591", - AddRecentlyFoundChatRequestTypeID: "addRecentlyFoundChat#97e8198d", - RemoveRecentlyFoundChatRequestTypeID: "removeRecentlyFoundChat#2ac1bf1c", - ClearRecentlyFoundChatsRequestTypeID: "clearRecentlyFoundChats#eefa5b32", - GetRecentlyOpenedChatsRequestTypeID: "getRecentlyOpenedChats#8d4fb223", - CheckChatUsernameRequestTypeID: "checkChatUsername#f8e66210", - GetCreatedPublicChatsRequestTypeID: "getCreatedPublicChats#2a5725ef", - CheckCreatedPublicChatsLimitRequestTypeID: "checkCreatedPublicChatsLimit#e5717fa1", - GetSuitableDiscussionChatsRequestTypeID: "getSuitableDiscussionChats#2ec5df6", - GetInactiveSupergroupChatsRequestTypeID: "getInactiveSupergroupChats#d8cbf9b5", - LoadSavedMessagesTopicsRequestTypeID: "loadSavedMessagesTopics#1146d6b8", - GetSavedMessagesTopicHistoryRequestTypeID: "getSavedMessagesTopicHistory#77e5da68", - GetSavedMessagesTopicMessageByDateRequestTypeID: "getSavedMessagesTopicMessageByDate#c15e4680", - DeleteSavedMessagesTopicHistoryRequestTypeID: "deleteSavedMessagesTopicHistory#69df3d6a", - DeleteSavedMessagesTopicMessagesByDateRequestTypeID: "deleteSavedMessagesTopicMessagesByDate#160a25", - ToggleSavedMessagesTopicIsPinnedRequestTypeID: "toggleSavedMessagesTopicIsPinned#a15345cc", - SetPinnedSavedMessagesTopicsRequestTypeID: "setPinnedSavedMessagesTopics#475a1110", - GetGroupsInCommonRequestTypeID: "getGroupsInCommon#16bdd36a", - GetChatHistoryRequestTypeID: "getChatHistory#d051927d", - GetMessageThreadHistoryRequestTypeID: "getMessageThreadHistory#9435d428", - DeleteChatHistoryRequestTypeID: "deleteChatHistory#a841d09f", - DeleteChatRequestTypeID: "deleteChat#f5cae05e", - SearchChatMessagesRequestTypeID: "searchChatMessages#dfdeb5c6", - SearchMessagesRequestTypeID: "searchMessages#2a8f08a7", - SearchSecretMessagesRequestTypeID: "searchSecretMessages#cd2a4c9c", - SearchSavedMessagesRequestTypeID: "searchSavedMessages#8a9b9f96", - SearchCallMessagesRequestTypeID: "searchCallMessages#8c3bef1b", - SearchOutgoingDocumentMessagesRequestTypeID: "searchOutgoingDocumentMessages#c023c47e", - DeleteAllCallMessagesRequestTypeID: "deleteAllCallMessages#a897d1f3", - SearchChatRecentLocationMessagesRequestTypeID: "searchChatRecentLocationMessages#38a37ee6", - GetActiveLiveLocationMessagesRequestTypeID: "getActiveLiveLocationMessages#ab093691", - GetChatMessageByDateRequestTypeID: "getChatMessageByDate#3f557136", - GetChatSparseMessagePositionsRequestTypeID: "getChatSparseMessagePositions#3b452efd", - GetChatMessageCalendarRequestTypeID: "getChatMessageCalendar#81af2db7", - GetChatMessageCountRequestTypeID: "getChatMessageCount#38f78909", - GetChatMessagePositionRequestTypeID: "getChatMessagePosition#81bfcc7", - GetChatScheduledMessagesRequestTypeID: "getChatScheduledMessages#df3d2ffb", - GetChatSponsoredMessagesRequestTypeID: "getChatSponsoredMessages#50a84098", - ClickChatSponsoredMessageRequestTypeID: "clickChatSponsoredMessage#d9c09feb", - RemoveNotificationRequestTypeID: "removeNotification#336ab34e", - RemoveNotificationGroupRequestTypeID: "removeNotificationGroup#661a638e", - GetMessageLinkRequestTypeID: "getMessageLink#c556ef7a", - GetMessageEmbeddingCodeRequestTypeID: "getMessageEmbeddingCode#62a4cd09", - GetMessageLinkInfoRequestTypeID: "getMessageLinkInfo#d63eb458", - TranslateTextRequestTypeID: "translateText#252264f2", - TranslateMessageTextRequestTypeID: "translateMessageText#53c51ed2", - RecognizeSpeechRequestTypeID: "recognizeSpeech#67d402b9", - RateSpeechRecognitionRequestTypeID: "rateSpeechRecognition#eedcc3b5", - GetChatAvailableMessageSendersRequestTypeID: "getChatAvailableMessageSenders#450fe92b", - SetChatMessageSenderRequestTypeID: "setChatMessageSender#ab456b7e", - SendMessageRequestTypeID: "sendMessage#e02d01e9", - SendMessageAlbumRequestTypeID: "sendMessageAlbum#74bcdacf", - SendBotStartMessageRequestTypeID: "sendBotStartMessage#aa6a3eee", - SendInlineQueryResultMessageRequestTypeID: "sendInlineQueryResultMessage#467c5478", - ForwardMessagesRequestTypeID: "forwardMessages#34de5b20", - SendQuickReplyShortcutMessagesRequestTypeID: "sendQuickReplyShortcutMessages#dd5169d", - ResendMessagesRequestTypeID: "resendMessages#90e36776", - AddLocalMessageRequestTypeID: "addLocalMessage#f617b7a1", - DeleteMessagesRequestTypeID: "deleteMessages#c3ed9de2", - DeleteChatMessagesBySenderRequestTypeID: "deleteChatMessagesBySender#ba9b2e67", - DeleteChatMessagesByDateRequestTypeID: "deleteChatMessagesByDate#9e44e0bf", - EditMessageTextRequestTypeID: "editMessageText#bb2e1b7", - EditMessageLiveLocationRequestTypeID: "editMessageLiveLocation#ff29a512", - EditMessageMediaRequestTypeID: "editMessageMedia#bb4b8713", - EditMessageCaptionRequestTypeID: "editMessageCaption#44d2f92e", - EditMessageReplyMarkupRequestTypeID: "editMessageReplyMarkup#13cbde89", - EditInlineMessageTextRequestTypeID: "editInlineMessageText#cd02c1e5", - EditInlineMessageLiveLocationRequestTypeID: "editInlineMessageLiveLocation#f6a5da00", - EditInlineMessageMediaRequestTypeID: "editInlineMessageMedia#1676781", - EditInlineMessageCaptionRequestTypeID: "editInlineMessageCaption#d2a446b7", - EditInlineMessageReplyMarkupRequestTypeID: "editInlineMessageReplyMarkup#fbf906de", - EditMessageSchedulingStateRequestTypeID: "editMessageSchedulingState#ae2a0bc0", - CheckQuickReplyShortcutNameRequestTypeID: "checkQuickReplyShortcutName#7d3dd129", - LoadQuickReplyShortcutsRequestTypeID: "loadQuickReplyShortcuts#c367b29d", - SetQuickReplyShortcutNameRequestTypeID: "setQuickReplyShortcutName#b20f471", - DeleteQuickReplyShortcutRequestTypeID: "deleteQuickReplyShortcut#f1486c16", - ReorderQuickReplyShortcutsRequestTypeID: "reorderQuickReplyShortcuts#b04981c4", - LoadQuickReplyShortcutMessagesRequestTypeID: "loadQuickReplyShortcutMessages#fd40aed4", - DeleteQuickReplyShortcutMessagesRequestTypeID: "deleteQuickReplyShortcutMessages#e859fcbb", - GetForumTopicDefaultIconsRequestTypeID: "getForumTopicDefaultIcons#583574dc", - CreateForumTopicRequestTypeID: "createForumTopic#c1fa28e4", - EditForumTopicRequestTypeID: "editForumTopic#a7769060", - GetForumTopicRequestTypeID: "getForumTopic#e59bfe41", - GetForumTopicLinkRequestTypeID: "getForumTopicLink#c97b88cb", - GetForumTopicsRequestTypeID: "getForumTopics#fbab7d5a", - SetForumTopicNotificationSettingsRequestTypeID: "setForumTopicNotificationSettings#1f433467", - ToggleForumTopicIsClosedRequestTypeID: "toggleForumTopicIsClosed#c7648af3", - ToggleGeneralForumTopicIsHiddenRequestTypeID: "toggleGeneralForumTopicIsHidden#5f1d1448", - ToggleForumTopicIsPinnedRequestTypeID: "toggleForumTopicIsPinned#466ceab4", - SetPinnedForumTopicsRequestTypeID: "setPinnedForumTopics#ddf26f21", - DeleteForumTopicRequestTypeID: "deleteForumTopic#6f285cb8", - GetEmojiReactionRequestTypeID: "getEmojiReaction#e53411dc", - GetCustomEmojiReactionAnimationsRequestTypeID: "getCustomEmojiReactionAnimations#49748dd2", - GetMessageAvailableReactionsRequestTypeID: "getMessageAvailableReactions#76db86b2", - ClearRecentReactionsRequestTypeID: "clearRecentReactions#4d61c752", - AddMessageReactionRequestTypeID: "addMessageReaction#549855ed", - RemoveMessageReactionRequestTypeID: "removeMessageReaction#97474d7b", - SetMessageReactionsRequestTypeID: "setMessageReactions#71fa9e8f", - GetMessageAddedReactionsRequestTypeID: "getMessageAddedReactions#7dc6ae52", - SetDefaultReactionTypeRequestTypeID: "setDefaultReactionType#65038a3d", - GetSavedMessagesTagsRequestTypeID: "getSavedMessagesTags#8cd667a9", - SetSavedMessagesTagLabelRequestTypeID: "setSavedMessagesTagLabel#b03acd10", - SearchQuoteRequestTypeID: "searchQuote#6864011f", - GetTextEntitiesRequestTypeID: "getTextEntities#eba543fb", - ParseTextEntitiesRequestTypeID: "parseTextEntities#9a1fc29f", - ParseMarkdownRequestTypeID: "parseMarkdown#2d153aef", - GetMarkdownTextRequestTypeID: "getMarkdownText#9ce7228", - GetCountryFlagEmojiRequestTypeID: "getCountryFlagEmoji#3a8629fa", - GetFileMimeTypeRequestTypeID: "getFileMimeType#84631b89", - GetFileExtensionRequestTypeID: "getFileExtension#f9adb934", - CleanFileNameRequestTypeID: "cleanFileName#39b1f7fb", - GetLanguagePackStringRequestTypeID: "getLanguagePackString#8fcde73", - GetJSONValueRequestTypeID: "getJsonValue#92fa5a05", - GetJSONStringRequestTypeID: "getJsonString#278b9421", - GetThemeParametersJSONStringRequestTypeID: "getThemeParametersJsonString#91b905f8", - SetPollAnswerRequestTypeID: "setPollAnswer#5303b916", - GetPollVotersRequestTypeID: "getPollVoters#c45ba9ac", - StopPollRequestTypeID: "stopPoll#62e80aad", - HideSuggestedActionRequestTypeID: "hideSuggestedAction#a2ef2b7f", - GetLoginURLInfoRequestTypeID: "getLoginUrlInfo#ccc99db3", - GetLoginURLRequestTypeID: "getLoginUrl#2f3295d1", - ShareUsersWithBotRequestTypeID: "shareUsersWithBot#58448550", - ShareChatWithBotRequestTypeID: "shareChatWithBot#a6530ae2", - GetInlineQueryResultsRequestTypeID: "getInlineQueryResults#79dcf86c", - AnswerInlineQueryRequestTypeID: "answerInlineQuery#ac7cc5e6", - SearchWebAppRequestTypeID: "searchWebApp#b5fc8a35", - GetWebAppLinkURLRequestTypeID: "getWebAppLinkUrl#4f0ef3cc", - GetWebAppURLRequestTypeID: "getWebAppUrl#64c42cbe", - SendWebAppDataRequestTypeID: "sendWebAppData#ab1fce0c", - OpenWebAppRequestTypeID: "openWebApp#b02666b0", - CloseWebAppRequestTypeID: "closeWebApp#68a124c6", - AnswerWebAppQueryRequestTypeID: "answerWebAppQuery#a0b49cf1", - GetCallbackQueryAnswerRequestTypeID: "getCallbackQueryAnswer#6ef7a5f", - AnswerCallbackQueryRequestTypeID: "answerCallbackQuery#bb462e76", - AnswerShippingQueryRequestTypeID: "answerShippingQuery#7a3c2432", - AnswerPreCheckoutQueryRequestTypeID: "answerPreCheckoutQuery#a76163eb", - SetGameScoreRequestTypeID: "setGameScore#7eccedc6", - SetInlineGameScoreRequestTypeID: "setInlineGameScore#c7715d8b", - GetGameHighScoresRequestTypeID: "getGameHighScores#f0459b", - GetInlineGameHighScoresRequestTypeID: "getInlineGameHighScores#e0396baa", - DeleteChatReplyMarkupRequestTypeID: "deleteChatReplyMarkup#5ff9b5b", - SendChatActionRequestTypeID: "sendChatAction#7cfce154", - OpenChatRequestTypeID: "openChat#ecb9be0b", - CloseChatRequestTypeID: "closeChat#25e86e9", - ViewMessagesRequestTypeID: "viewMessages#aa2f0438", - OpenMessageContentRequestTypeID: "openMessageContent#d3f2697b", - ClickAnimatedEmojiMessageRequestTypeID: "clickAnimatedEmojiMessage#bb17662", - GetInternalLinkRequestTypeID: "getInternalLink#3960f1b0", - GetInternalLinkTypeRequestTypeID: "getInternalLinkType#8bdd5709", - GetExternalLinkInfoRequestTypeID: "getExternalLinkInfo#460d7a3f", - GetExternalLinkRequestTypeID: "getExternalLink#5e92f0eb", - ReadAllChatMentionsRequestTypeID: "readAllChatMentions#50eab2b5", - ReadAllMessageThreadMentionsRequestTypeID: "readAllMessageThreadMentions#4edd7555", - ReadAllChatReactionsRequestTypeID: "readAllChatReactions#54c1976d", - ReadAllMessageThreadReactionsRequestTypeID: "readAllMessageThreadReactions#d0bc273e", - CreatePrivateChatRequestTypeID: "createPrivateChat#c7825b09", - CreateBasicGroupChatRequestTypeID: "createBasicGroupChat#758ab4e4", - CreateSupergroupChatRequestTypeID: "createSupergroupChat#46c770eb", - CreateSecretChatRequestTypeID: "createSecretChat#730dd22f", - CreateNewBasicGroupChatRequestTypeID: "createNewBasicGroupChat#c479e224", - CreateNewSupergroupChatRequestTypeID: "createNewSupergroupChat#2fecf6c6", - CreateNewSecretChatRequestTypeID: "createNewSecretChat#db012265", - UpgradeBasicGroupChatToSupergroupChatRequestTypeID: "upgradeBasicGroupChatToSupergroupChat#11e915ba", - GetChatListsToAddChatRequestTypeID: "getChatListsToAddChat#2709d6a1", - AddChatToListRequestTypeID: "addChatToList#fb334eb5", - GetChatFolderRequestTypeID: "getChatFolder#5882a98", - CreateChatFolderRequestTypeID: "createChatFolder#3c85c500", - EditChatFolderRequestTypeID: "editChatFolder#332fb32", - DeleteChatFolderRequestTypeID: "deleteChatFolder#74260b87", - GetChatFolderChatsToLeaveRequestTypeID: "getChatFolderChatsToLeave#8dc1e6af", - GetChatFolderChatCountRequestTypeID: "getChatFolderChatCount#7dd4cbbe", - ReorderChatFoldersRequestTypeID: "reorderChatFolders#59544c32", - ToggleChatFolderTagsRequestTypeID: "toggleChatFolderTags#834b6c44", - GetRecommendedChatFoldersRequestTypeID: "getRecommendedChatFolders#f7533b87", - GetChatFolderDefaultIconNameRequestTypeID: "getChatFolderDefaultIconName#2cf7a067", - GetChatsForChatFolderInviteLinkRequestTypeID: "getChatsForChatFolderInviteLink#6fac4949", - CreateChatFolderInviteLinkRequestTypeID: "createChatFolderInviteLink#fba5e198", - GetChatFolderInviteLinksRequestTypeID: "getChatFolderInviteLinks#139d5be0", - EditChatFolderInviteLinkRequestTypeID: "editChatFolderInviteLink#5cc415a8", - DeleteChatFolderInviteLinkRequestTypeID: "deleteChatFolderInviteLink#c890717e", - CheckChatFolderInviteLinkRequestTypeID: "checkChatFolderInviteLink#1f25999b", - AddChatFolderByInviteLinkRequestTypeID: "addChatFolderByInviteLink#1ed19dae", - GetChatFolderNewChatsRequestTypeID: "getChatFolderNewChats#7e8d2ccc", - ProcessChatFolderNewChatsRequestTypeID: "processChatFolderNewChats#109f8a8b", - GetArchiveChatListSettingsRequestTypeID: "getArchiveChatListSettings#838d8e60", - SetArchiveChatListSettingsRequestTypeID: "setArchiveChatListSettings#cb454c0a", - SetChatTitleRequestTypeID: "setChatTitle#9cabebf", - SetChatPhotoRequestTypeID: "setChatPhoto#e97b8d03", - SetChatAccentColorRequestTypeID: "setChatAccentColor#349f57ca", - SetChatProfileAccentColorRequestTypeID: "setChatProfileAccentColor#4227ae7a", - SetChatMessageAutoDeleteTimeRequestTypeID: "setChatMessageAutoDeleteTime#a641b4ff", - SetChatEmojiStatusRequestTypeID: "setChatEmojiStatus#55881912", - SetChatPermissionsRequestTypeID: "setChatPermissions#7f7706fe", - SetChatBackgroundRequestTypeID: "setChatBackground#eb4c3fe", - DeleteChatBackgroundRequestTypeID: "deleteChatBackground#1316e678", - SetChatThemeRequestTypeID: "setChatTheme#8f090293", - SetChatDraftMessageRequestTypeID: "setChatDraftMessage#645e1f1a", - SetChatNotificationSettingsRequestTypeID: "setChatNotificationSettings#2e531ffe", - ToggleChatHasProtectedContentRequestTypeID: "toggleChatHasProtectedContent#3a20d94d", - ToggleChatViewAsTopicsRequestTypeID: "toggleChatViewAsTopics#2b2783dc", - ToggleChatIsTranslatableRequestTypeID: "toggleChatIsTranslatable#93f9cbdf", - ToggleChatIsMarkedAsUnreadRequestTypeID: "toggleChatIsMarkedAsUnread#c538dadf", - ToggleChatDefaultDisableNotificationRequestTypeID: "toggleChatDefaultDisableNotification#12c36012", - SetChatAvailableReactionsRequestTypeID: "setChatAvailableReactions#feb3e06", - SetChatClientDataRequestTypeID: "setChatClientData#ceb3273d", - SetChatDescriptionRequestTypeID: "setChatDescription#74a8b45d", - SetChatDiscussionGroupRequestTypeID: "setChatDiscussionGroup#c93c32b8", - SetChatLocationRequestTypeID: "setChatLocation#d2471daa", - SetChatSlowModeDelayRequestTypeID: "setChatSlowModeDelay#dfcae63e", - PinChatMessageRequestTypeID: "pinChatMessage#79475baf", - UnpinChatMessageRequestTypeID: "unpinChatMessage#7b1c3ede", - UnpinAllChatMessagesRequestTypeID: "unpinAllChatMessages#aa4cd4b7", - UnpinAllMessageThreadMessagesRequestTypeID: "unpinAllMessageThreadMessages#b7c69f00", - JoinChatRequestTypeID: "joinChat#137a1aa1", - LeaveChatRequestTypeID: "leaveChat#93377a61", - AddChatMemberRequestTypeID: "addChatMember#1dc4a5fa", - AddChatMembersRequestTypeID: "addChatMembers#b4f60138", - SetChatMemberStatusRequestTypeID: "setChatMemberStatus#4e0171f", - BanChatMemberRequestTypeID: "banChatMember#cb107d7c", - CanTransferOwnershipRequestTypeID: "canTransferOwnership#25d3440c", - TransferChatOwnershipRequestTypeID: "transferChatOwnership#77a00a13", - GetChatMemberRequestTypeID: "getChatMember#d0c15272", - SearchChatMembersRequestTypeID: "searchChatMembers#e56d46c5", - GetChatAdministratorsRequestTypeID: "getChatAdministrators#5c0eb6bb", - ClearAllDraftMessagesRequestTypeID: "clearAllDraftMessages#fd3c74db", - GetSavedNotificationSoundRequestTypeID: "getSavedNotificationSound#1b647917", - GetSavedNotificationSoundsRequestTypeID: "getSavedNotificationSounds#c0346fa8", - AddSavedNotificationSoundRequestTypeID: "addSavedNotificationSound#3e3984ef", - RemoveSavedNotificationSoundRequestTypeID: "removeSavedNotificationSound#e363474e", - GetChatNotificationSettingsExceptionsRequestTypeID: "getChatNotificationSettingsExceptions#bfe0e11", - GetScopeNotificationSettingsRequestTypeID: "getScopeNotificationSettings#c4a8254f", - SetScopeNotificationSettingsRequestTypeID: "setScopeNotificationSettings#85cfb63a", - ResetAllNotificationSettingsRequestTypeID: "resetAllNotificationSettings#f5a0a8f9", - ToggleChatIsPinnedRequestTypeID: "toggleChatIsPinned#a776263e", - SetPinnedChatsRequestTypeID: "setPinnedChats#c6c6edf1", - ReadChatListRequestTypeID: "readChatList#bd6498aa", - GetStoryRequestTypeID: "getStory#717b1c78", - GetChatsToSendStoriesRequestTypeID: "getChatsToSendStories#22f9e3a4", - CanSendStoryRequestTypeID: "canSendStory#b6e0216b", - SendStoryRequestTypeID: "sendStory#736858bb", - EditStoryRequestTypeID: "editStory#5e6a21b1", - SetStoryPrivacySettingsRequestTypeID: "setStoryPrivacySettings#d8e94332", - ToggleStoryIsPinnedRequestTypeID: "toggleStoryIsPinned#b493b30e", - DeleteStoryRequestTypeID: "deleteStory#9f35af16", - GetStoryNotificationSettingsExceptionsRequestTypeID: "getStoryNotificationSettingsExceptions#256a2eb0", - LoadActiveStoriesRequestTypeID: "loadActiveStories#7d8cf738", - SetChatActiveStoriesListRequestTypeID: "setChatActiveStoriesList#e0e35d11", - GetChatActiveStoriesRequestTypeID: "getChatActiveStories#2e4ffbf5", - GetChatPinnedStoriesRequestTypeID: "getChatPinnedStories#53c82a1", - GetChatArchivedStoriesRequestTypeID: "getChatArchivedStories#af1e9488", - OpenStoryRequestTypeID: "openStory#ceda7c7d", - CloseStoryRequestTypeID: "closeStory#443d0f55", - GetStoryAvailableReactionsRequestTypeID: "getStoryAvailableReactions#23854d3b", - SetStoryReactionRequestTypeID: "setStoryReaction#ac8b4fa7", - GetStoryInteractionsRequestTypeID: "getStoryInteractions#1cd1400d", - GetChatStoryInteractionsRequestTypeID: "getChatStoryInteractions#c5ec7376", - ReportStoryRequestTypeID: "reportStory#9b5f709b", - ActivateStoryStealthModeRequestTypeID: "activateStoryStealthMode#c3db8491", - GetStoryPublicForwardsRequestTypeID: "getStoryPublicForwards#68f7dcbb", - GetChatBoostLevelFeaturesRequestTypeID: "getChatBoostLevelFeatures#45e63e8b", - GetChatBoostFeaturesRequestTypeID: "getChatBoostFeatures#e8c128a0", - GetAvailableChatBoostSlotsRequestTypeID: "getAvailableChatBoostSlots#7307ebd5", - GetChatBoostStatusRequestTypeID: "getChatBoostStatus#cfac8acf", - BoostChatRequestTypeID: "boostChat#890ccd68", - GetChatBoostLinkRequestTypeID: "getChatBoostLink#56f16c85", - GetChatBoostLinkInfoRequestTypeID: "getChatBoostLinkInfo#26fc4b5c", - GetChatBoostsRequestTypeID: "getChatBoosts#ab5eaa38", - GetUserChatBoostsRequestTypeID: "getUserChatBoosts#b90ee799", - GetAttachmentMenuBotRequestTypeID: "getAttachmentMenuBot#3da561fb", - ToggleBotIsAddedToAttachmentMenuRequestTypeID: "toggleBotIsAddedToAttachmentMenu#8e59de9a", - GetThemedEmojiStatusesRequestTypeID: "getThemedEmojiStatuses#6ac5c8c2", - GetRecentEmojiStatusesRequestTypeID: "getRecentEmojiStatuses#ae3a3d29", - GetDefaultEmojiStatusesRequestTypeID: "getDefaultEmojiStatuses#24e45ec3", - ClearRecentEmojiStatusesRequestTypeID: "clearRecentEmojiStatuses#e671cb5e", - GetThemedChatEmojiStatusesRequestTypeID: "getThemedChatEmojiStatuses#fb735cb5", - GetDefaultChatEmojiStatusesRequestTypeID: "getDefaultChatEmojiStatuses#a7aa86e6", - GetDisallowedChatEmojiStatusesRequestTypeID: "getDisallowedChatEmojiStatuses#d2144da0", - DownloadFileRequestTypeID: "downloadFile#3f253234", - GetFileDownloadedPrefixSizeRequestTypeID: "getFileDownloadedPrefixSize#3304bd2d", - CancelDownloadFileRequestTypeID: "cancelDownloadFile#8b8052de", - GetSuggestedFileNameRequestTypeID: "getSuggestedFileName#85d8a486", - PreliminaryUploadFileRequestTypeID: "preliminaryUploadFile#70e7cb99", - CancelPreliminaryUploadFileRequestTypeID: "cancelPreliminaryUploadFile#311446be", - WriteGeneratedFilePartRequestTypeID: "writeGeneratedFilePart#cc89e95", - SetFileGenerationProgressRequestTypeID: "setFileGenerationProgress#6d754b3e", - FinishFileGenerationRequestTypeID: "finishFileGeneration#c11d0c9d", - ReadFilePartRequestTypeID: "readFilePart#360ca70d", - DeleteFileRequestTypeID: "deleteFile#6bbe9b2c", - AddFileToDownloadsRequestTypeID: "addFileToDownloads#33b583b7", - ToggleDownloadIsPausedRequestTypeID: "toggleDownloadIsPaused#c7866715", - ToggleAllDownloadsArePausedRequestTypeID: "toggleAllDownloadsArePaused#4a989002", - RemoveFileFromDownloadsRequestTypeID: "removeFileFromDownloads#5706bfee", - RemoveAllFilesFromDownloadsRequestTypeID: "removeAllFilesFromDownloads#b9487686", - SearchFileDownloadsRequestTypeID: "searchFileDownloads#2a1e0856", - GetMessageFileTypeRequestTypeID: "getMessageFileType#e2c70fd4", - GetMessageImportConfirmationTextRequestTypeID: "getMessageImportConfirmationText#174881a8", - ImportMessagesRequestTypeID: "importMessages#7e98592b", - ReplacePrimaryChatInviteLinkRequestTypeID: "replacePrimaryChatInviteLink#3f9e7b9d", - CreateChatInviteLinkRequestTypeID: "createChatInviteLink#1126a341", - EditChatInviteLinkRequestTypeID: "editChatInviteLink#4eb23d7c", - GetChatInviteLinkRequestTypeID: "getChatInviteLink#e36a41fd", - GetChatInviteLinkCountsRequestTypeID: "getChatInviteLinkCounts#3510e291", - GetChatInviteLinksRequestTypeID: "getChatInviteLinks#34a55cac", - GetChatInviteLinkMembersRequestTypeID: "getChatInviteLinkMembers#c5b6199a", - RevokeChatInviteLinkRequestTypeID: "revokeChatInviteLink#d1b755a9", - DeleteRevokedChatInviteLinkRequestTypeID: "deleteRevokedChatInviteLink#91270c7f", - DeleteAllRevokedChatInviteLinksRequestTypeID: "deleteAllRevokedChatInviteLinks#424816da", - CheckChatInviteLinkRequestTypeID: "checkChatInviteLink#e261483b", - JoinChatByInviteLinkRequestTypeID: "joinChatByInviteLink#c16aab86", - GetChatJoinRequestsRequestTypeID: "getChatJoinRequests#e8d90ea2", - ProcessChatJoinRequestRequestTypeID: "processChatJoinRequest#3be534a3", - ProcessChatJoinRequestsRequestTypeID: "processChatJoinRequests#3e823dce", - CreateCallRequestTypeID: "createCall#be282e10", - AcceptCallRequestTypeID: "acceptCall#d97562d0", - SendCallSignalingDataRequestTypeID: "sendCallSignalingData#542db19c", - DiscardCallRequestTypeID: "discardCall#95a9a57e", - SendCallRatingRequestTypeID: "sendCallRating#d89b576c", - SendCallDebugInformationRequestTypeID: "sendCallDebugInformation#785b373f", - SendCallLogRequestTypeID: "sendCallLog#3f0a47d1", - GetVideoChatAvailableParticipantsRequestTypeID: "getVideoChatAvailableParticipants#c45da305", - SetVideoChatDefaultParticipantRequestTypeID: "setVideoChatDefaultParticipant#f1a672b3", - CreateVideoChatRequestTypeID: "createVideoChat#7ea4958d", - GetVideoChatRtmpURLRequestTypeID: "getVideoChatRtmpUrl#482b1b1f", - ReplaceVideoChatRtmpURLRequestTypeID: "replaceVideoChatRtmpUrl#214f8fe0", - GetGroupCallRequestTypeID: "getGroupCall#5787668e", - StartScheduledGroupCallRequestTypeID: "startScheduledGroupCall#5a986d16", - ToggleGroupCallEnabledStartNotificationRequestTypeID: "toggleGroupCallEnabledStartNotification#2a30c752", - JoinGroupCallRequestTypeID: "joinGroupCall#c1c947e5", - StartGroupCallScreenSharingRequestTypeID: "startGroupCallScreenSharing#cb4e312d", - ToggleGroupCallScreenSharingIsPausedRequestTypeID: "toggleGroupCallScreenSharingIsPaused#a07b5360", - EndGroupCallScreenSharingRequestTypeID: "endGroupCallScreenSharing#85f41c4c", - SetGroupCallTitleRequestTypeID: "setGroupCallTitle#b6c19dcd", - ToggleGroupCallMuteNewParticipantsRequestTypeID: "toggleGroupCallMuteNewParticipants#10eec1c2", - InviteGroupCallParticipantsRequestTypeID: "inviteGroupCallParticipants#56c030a6", - GetGroupCallInviteLinkRequestTypeID: "getGroupCallInviteLink#2ae14924", - RevokeGroupCallInviteLinkRequestTypeID: "revokeGroupCallInviteLink#1de5a494", - StartGroupCallRecordingRequestTypeID: "startGroupCallRecording#68c5847b", - EndGroupCallRecordingRequestTypeID: "endGroupCallRecording#fb7b6289", - ToggleGroupCallIsMyVideoPausedRequestTypeID: "toggleGroupCallIsMyVideoPaused#e374f199", - ToggleGroupCallIsMyVideoEnabledRequestTypeID: "toggleGroupCallIsMyVideoEnabled#9f2f50fa", - SetGroupCallParticipantIsSpeakingRequestTypeID: "setGroupCallParticipantIsSpeaking#3748a1e5", - ToggleGroupCallParticipantIsMutedRequestTypeID: "toggleGroupCallParticipantIsMuted#b2081407", - SetGroupCallParticipantVolumeLevelRequestTypeID: "setGroupCallParticipantVolumeLevel#97779828", - ToggleGroupCallParticipantIsHandRaisedRequestTypeID: "toggleGroupCallParticipantIsHandRaised#8efb63e1", - LoadGroupCallParticipantsRequestTypeID: "loadGroupCallParticipants#37f3bece", - LeaveGroupCallRequestTypeID: "leaveGroupCall#3a6befa9", - EndGroupCallRequestTypeID: "endGroupCall#22294cb7", - GetGroupCallStreamsRequestTypeID: "getGroupCallStreams#9f7c9164", - GetGroupCallStreamSegmentRequestTypeID: "getGroupCallStreamSegment#8424daa5", - SetMessageSenderBlockListRequestTypeID: "setMessageSenderBlockList#898b5c91", - BlockMessageSenderFromRepliesRequestTypeID: "blockMessageSenderFromReplies#b79df58b", - GetBlockedMessageSendersRequestTypeID: "getBlockedMessageSenders#8ce52f16", - AddContactRequestTypeID: "addContact#6f707140", - ImportContactsRequestTypeID: "importContacts#77bdb718", - GetContactsRequestTypeID: "getContacts#ab7f4470", - SearchContactsRequestTypeID: "searchContacts#95073165", - RemoveContactsRequestTypeID: "removeContacts#b464dfff", - GetImportedContactCountRequestTypeID: "getImportedContactCount#d8e11a26", - ChangeImportedContactsRequestTypeID: "changeImportedContacts#24885905", - ClearImportedContactsRequestTypeID: "clearImportedContacts#33d39142", - SetCloseFriendsRequestTypeID: "setCloseFriends#7ff8f69f", - GetCloseFriendsRequestTypeID: "getCloseFriends#a9d574ce", - SetUserPersonalProfilePhotoRequestTypeID: "setUserPersonalProfilePhoto#1baa28f6", - SuggestUserProfilePhotoRequestTypeID: "suggestUserProfilePhoto#9561f463", - SearchUserByPhoneNumberRequestTypeID: "searchUserByPhoneNumber#a2e22b12", - SharePhoneNumberRequestTypeID: "sharePhoneNumber#4164e055", - GetUserProfilePhotosRequestTypeID: "getUserProfilePhotos#c9defe42", - GetStickersRequestTypeID: "getStickers#45069343", - GetAllStickerEmojisRequestTypeID: "getAllStickerEmojis#11ad2e30", - SearchStickersRequestTypeID: "searchStickers#9a19e90b", - GetPremiumStickersRequestTypeID: "getPremiumStickers#ef410a50", - GetInstalledStickerSetsRequestTypeID: "getInstalledStickerSets#612ef6f6", - GetArchivedStickerSetsRequestTypeID: "getArchivedStickerSets#3bb8424d", - GetTrendingStickerSetsRequestTypeID: "getTrendingStickerSets#e058455e", - GetAttachedStickerSetsRequestTypeID: "getAttachedStickerSets#4d9d930d", - GetStickerSetRequestTypeID: "getStickerSet#3eb91bc3", - SearchStickerSetRequestTypeID: "searchStickerSet#45049cee", - SearchInstalledStickerSetsRequestTypeID: "searchInstalledStickerSets#7e5e7fa4", - SearchStickerSetsRequestTypeID: "searchStickerSets#faa066c", - ChangeStickerSetRequestTypeID: "changeStickerSet#1ac8a5ed", - ViewTrendingStickerSetsRequestTypeID: "viewTrendingStickerSets#36d6469", - ReorderInstalledStickerSetsRequestTypeID: "reorderInstalledStickerSets#4a830a78", - GetRecentStickersRequestTypeID: "getRecentStickers#dd73aa9f", - AddRecentStickerRequestTypeID: "addRecentSticker#a7e5d89e", - RemoveRecentStickerRequestTypeID: "removeRecentSticker#4a4d440d", - ClearRecentStickersRequestTypeID: "clearRecentStickers#ecda39c4", - GetFavoriteStickersRequestTypeID: "getFavoriteStickers#ebcbcf40", - AddFavoriteStickerRequestTypeID: "addFavoriteSticker#13578cdf", - RemoveFavoriteStickerRequestTypeID: "removeFavoriteSticker#44b88c70", - GetStickerEmojisRequestTypeID: "getStickerEmojis#8f04d547", - SearchEmojisRequestTypeID: "searchEmojis#d513cd61", - GetKeywordEmojisRequestTypeID: "getKeywordEmojis#7af81263", - GetEmojiCategoriesRequestTypeID: "getEmojiCategories#7f86c16e", - GetAnimatedEmojiRequestTypeID: "getAnimatedEmoji#3f844f76", - GetEmojiSuggestionsURLRequestTypeID: "getEmojiSuggestionsUrl#ac4f1b2f", - GetCustomEmojiStickersRequestTypeID: "getCustomEmojiStickers#a5156885", - GetDefaultChatPhotoCustomEmojiStickersRequestTypeID: "getDefaultChatPhotoCustomEmojiStickers#e9917765", - GetDefaultProfilePhotoCustomEmojiStickersRequestTypeID: "getDefaultProfilePhotoCustomEmojiStickers#4c4be2b7", - GetDefaultBackgroundCustomEmojiStickersRequestTypeID: "getDefaultBackgroundCustomEmojiStickers#1cf6680e", - GetSavedAnimationsRequestTypeID: "getSavedAnimations#6b9718", - AddSavedAnimationRequestTypeID: "addSavedAnimation#a44bf860", - RemoveSavedAnimationRequestTypeID: "removeSavedAnimation#e275a919", - GetRecentInlineBotsRequestTypeID: "getRecentInlineBots#55b3723c", - SearchHashtagsRequestTypeID: "searchHashtags#3e34a571", - RemoveRecentHashtagRequestTypeID: "removeRecentHashtag#c393a0a4", - GetWebPagePreviewRequestTypeID: "getWebPagePreview#a850b8d8", - GetWebPageInstantViewRequestTypeID: "getWebPageInstantView#8b045689", - SetProfilePhotoRequestTypeID: "setProfilePhoto#85ea05ed", - DeleteProfilePhotoRequestTypeID: "deleteProfilePhoto#4eaa77c1", - SetAccentColorRequestTypeID: "setAccentColor#6389cb39", - SetProfileAccentColorRequestTypeID: "setProfileAccentColor#899bc168", - SetNameRequestTypeID: "setName#66065f10", - SetBioRequestTypeID: "setBio#9f772354", - SetUsernameRequestTypeID: "setUsername#1a385c1e", - ToggleUsernameIsActiveRequestTypeID: "toggleUsernameIsActive#4a276de3", - ReorderActiveUsernamesRequestTypeID: "reorderActiveUsernames#c659414f", - SetEmojiStatusRequestTypeID: "setEmojiStatus#92f83e5d", - SetLocationRequestTypeID: "setLocation#5993371", - SetBusinessLocationRequestTypeID: "setBusinessLocation#eb740715", - SetBusinessOpeningHoursRequestTypeID: "setBusinessOpeningHours#e470a472", - SetBusinessGreetingMessageSettingsRequestTypeID: "setBusinessGreetingMessageSettings#cbf53c3d", - SetBusinessAwayMessageSettingsRequestTypeID: "setBusinessAwayMessageSettings#4974486c", - ChangePhoneNumberRequestTypeID: "changePhoneNumber#f891bba3", - ResendChangePhoneNumberCodeRequestTypeID: "resendChangePhoneNumberCode#d11acfa4", - CheckChangePhoneNumberCodeRequestTypeID: "checkChangePhoneNumberCode#9976a263", - GetBusinessConnectedBotRequestTypeID: "getBusinessConnectedBot#364da7c3", - SetBusinessConnectedBotRequestTypeID: "setBusinessConnectedBot#acf17ef0", - DeleteBusinessConnectedBotRequestTypeID: "deleteBusinessConnectedBot#9e9b7e55", - GetUserLinkRequestTypeID: "getUserLink#492014e6", - SearchUserByTokenRequestTypeID: "searchUserByToken#d841f436", - SetCommandsRequestTypeID: "setCommands#b0e0217a", - DeleteCommandsRequestTypeID: "deleteCommands#3bc47c2a", - GetCommandsRequestTypeID: "getCommands#58ba8ff7", - SetMenuButtonRequestTypeID: "setMenuButton#b44fc141", - GetMenuButtonRequestTypeID: "getMenuButton#e5eef440", - SetDefaultGroupAdministratorRightsRequestTypeID: "setDefaultGroupAdministratorRights#65577768", - SetDefaultChannelAdministratorRightsRequestTypeID: "setDefaultChannelAdministratorRights#f20d5e19", - CanBotSendMessagesRequestTypeID: "canBotSendMessages#206d948c", - AllowBotToSendMessagesRequestTypeID: "allowBotToSendMessages#69e9c58e", - SendWebAppCustomRequestRequestTypeID: "sendWebAppCustomRequest#36ff5dc8", - SetBotNameRequestTypeID: "setBotName#d295fa71", - GetBotNameRequestTypeID: "getBotName#9a3f722c", - SetBotProfilePhotoRequestTypeID: "setBotProfilePhoto#bd864b66", - ToggleBotUsernameIsActiveRequestTypeID: "toggleBotUsernameIsActive#79639409", - ReorderBotActiveUsernamesRequestTypeID: "reorderBotActiveUsernames#acadc444", - SetBotInfoDescriptionRequestTypeID: "setBotInfoDescription#29571d48", - GetBotInfoDescriptionRequestTypeID: "getBotInfoDescription#d287f835", - SetBotInfoShortDescriptionRequestTypeID: "setBotInfoShortDescription#3a96bae3", - GetBotInfoShortDescriptionRequestTypeID: "getBotInfoShortDescription#4a1c2614", - GetActiveSessionsRequestTypeID: "getActiveSessions#42bd6d3e", - TerminateSessionRequestTypeID: "terminateSession#e7b7c92c", - TerminateAllOtherSessionsRequestTypeID: "terminateAllOtherSessions#6fba6113", - ConfirmSessionRequestTypeID: "confirmSession#d7c9b41f", - ToggleSessionCanAcceptCallsRequestTypeID: "toggleSessionCanAcceptCalls#6c6c2708", - ToggleSessionCanAcceptSecretChatsRequestTypeID: "toggleSessionCanAcceptSecretChats#3ba7a87e", - SetInactiveSessionTTLRequestTypeID: "setInactiveSessionTtl#5d9ca950", - GetConnectedWebsitesRequestTypeID: "getConnectedWebsites#f5d5d352", - DisconnectWebsiteRequestTypeID: "disconnectWebsite#d194f3dd", - DisconnectAllWebsitesRequestTypeID: "disconnectAllWebsites#bf72f203", - SetSupergroupUsernameRequestTypeID: "setSupergroupUsername#503f4b04", - ToggleSupergroupUsernameIsActiveRequestTypeID: "toggleSupergroupUsernameIsActive#a68b6dff", - DisableAllSupergroupUsernamesRequestTypeID: "disableAllSupergroupUsernames#3246f5b0", - ReorderSupergroupActiveUsernamesRequestTypeID: "reorderSupergroupActiveUsernames#663c7f3b", - SetSupergroupStickerSetRequestTypeID: "setSupergroupStickerSet#856ead69", - SetSupergroupCustomEmojiStickerSetRequestTypeID: "setSupergroupCustomEmojiStickerSet#4f3552af", - SetSupergroupUnrestrictBoostCountRequestTypeID: "setSupergroupUnrestrictBoostCount#39ce30a3", - ToggleSupergroupSignMessagesRequestTypeID: "toggleSupergroupSignMessages#44efd524", - ToggleSupergroupJoinToSendMessagesRequestTypeID: "toggleSupergroupJoinToSendMessages#f5268e0e", - ToggleSupergroupJoinByRequestRequestTypeID: "toggleSupergroupJoinByRequest#7ddf9fde", - ToggleSupergroupIsAllHistoryAvailableRequestTypeID: "toggleSupergroupIsAllHistoryAvailable#44d9964e", - ToggleSupergroupHasHiddenMembersRequestTypeID: "toggleSupergroupHasHiddenMembers#a4559dca", - ToggleSupergroupHasAggressiveAntiSpamEnabledRequestTypeID: "toggleSupergroupHasAggressiveAntiSpamEnabled#683ef70f", - ToggleSupergroupIsForumRequestTypeID: "toggleSupergroupIsForum#966f960a", - ToggleSupergroupIsBroadcastGroupRequestTypeID: "toggleSupergroupIsBroadcastGroup#34b22215", - ReportSupergroupSpamRequestTypeID: "reportSupergroupSpam#383e26f2", - ReportSupergroupAntiSpamFalsePositiveRequestTypeID: "reportSupergroupAntiSpamFalsePositive#e13db048", - GetSupergroupMembersRequestTypeID: "getSupergroupMembers#ddf821c8", - CloseSecretChatRequestTypeID: "closeSecretChat#e3ed044b", - GetChatEventLogRequestTypeID: "getChatEventLog#f47b0a9b", - GetTimeZonesRequestTypeID: "getTimeZones#4fe2e058", - GetPaymentFormRequestTypeID: "getPaymentForm#8d4f76d4", - ValidateOrderInfoRequestTypeID: "validateOrderInfo#b5985fcf", - SendPaymentFormRequestTypeID: "sendPaymentForm#c66e388a", - GetPaymentReceiptRequestTypeID: "getPaymentReceipt#3c6cb956", - GetSavedOrderInfoRequestTypeID: "getSavedOrderInfo#bb559edd", - DeleteSavedOrderInfoRequestTypeID: "deleteSavedOrderInfo#61197474", - DeleteSavedCredentialsRequestTypeID: "deleteSavedCredentials#314056d2", - CreateInvoiceLinkRequestTypeID: "createInvoiceLink#cebe921", - GetSupportUserRequestTypeID: "getSupportUser#98acec9c", - GetBackgroundURLRequestTypeID: "getBackgroundUrl#2bbc6fd2", - SearchBackgroundRequestTypeID: "searchBackground#80fb9121", - SetDefaultBackgroundRequestTypeID: "setDefaultBackground#89d1a8a1", - DeleteDefaultBackgroundRequestTypeID: "deleteDefaultBackground#b2a4ed3e", - GetInstalledBackgroundsRequestTypeID: "getInstalledBackgrounds#c154d05f", - RemoveInstalledBackgroundRequestTypeID: "removeInstalledBackground#5041253c", - ResetInstalledBackgroundsRequestTypeID: "resetInstalledBackgrounds#70540157", - GetLocalizationTargetInfoRequestTypeID: "getLocalizationTargetInfo#6e3d1f86", - GetLanguagePackInfoRequestTypeID: "getLanguagePackInfo#7bd8daa8", - GetLanguagePackStringsRequestTypeID: "getLanguagePackStrings#b0b867bb", - SynchronizeLanguagePackRequestTypeID: "synchronizeLanguagePack#84e5e72e", - AddCustomServerLanguagePackRequestTypeID: "addCustomServerLanguagePack#448de3", - SetCustomLanguagePackRequestTypeID: "setCustomLanguagePack#234b0607", - EditCustomLanguagePackInfoRequestTypeID: "editCustomLanguagePackInfo#4eb91099", - SetCustomLanguagePackStringRequestTypeID: "setCustomLanguagePackString#4e762518", - DeleteLanguagePackRequestTypeID: "deleteLanguagePack#824edc3e", - RegisterDeviceRequestTypeID: "registerDevice#ff140196", - ProcessPushNotificationRequestTypeID: "processPushNotification#2ee3c890", - GetPushReceiverIDRequestTypeID: "getPushReceiverId#eeec46b2", - GetRecentlyVisitedTMeURLsRequestTypeID: "getRecentlyVisitedTMeUrls#30161a91", - SetUserPrivacySettingRulesRequestTypeID: "setUserPrivacySettingRules#e3c230fb", - GetUserPrivacySettingRulesRequestTypeID: "getUserPrivacySettingRules#84301671", - SetReadDatePrivacySettingsRequestTypeID: "setReadDatePrivacySettings#1d7086b6", - GetReadDatePrivacySettingsRequestTypeID: "getReadDatePrivacySettings#1ae85bbb", - SetNewChatPrivacySettingsRequestTypeID: "setNewChatPrivacySettings#69bf374f", - GetNewChatPrivacySettingsRequestTypeID: "getNewChatPrivacySettings#b2cb4bb7", - CanSendMessageToUserRequestTypeID: "canSendMessageToUser#5b2a2836", - GetOptionRequestTypeID: "getOption#a2459e7e", - SetOptionRequestTypeID: "setOption#7e0b4ef2", - SetAccountTTLRequestTypeID: "setAccountTtl#29ce58e8", - GetAccountTTLRequestTypeID: "getAccountTtl#e58a8b77", - DeleteAccountRequestTypeID: "deleteAccount#533276c6", - SetDefaultMessageAutoDeleteTimeRequestTypeID: "setDefaultMessageAutoDeleteTime#965cd36c", - GetDefaultMessageAutoDeleteTimeRequestTypeID: "getDefaultMessageAutoDeleteTime#e520759a", - RemoveChatActionBarRequestTypeID: "removeChatActionBar#9d9839fa", - ReportChatRequestTypeID: "reportChat#d92c3a8a", - ReportChatPhotoRequestTypeID: "reportChatPhoto#d9701288", - ReportMessageReactionsRequestTypeID: "reportMessageReactions#36c88827", - GetChatStatisticsRequestTypeID: "getChatStatistics#137e8198", - GetMessageStatisticsRequestTypeID: "getMessageStatistics#4bb5a1d8", - GetMessagePublicForwardsRequestTypeID: "getMessagePublicForwards#519da4b4", - GetStoryStatisticsRequestTypeID: "getStoryStatistics#3a964342", - GetStatisticalGraphRequestTypeID: "getStatisticalGraph#419f8d9b", - GetStorageStatisticsRequestTypeID: "getStorageStatistics#cd254b37", - GetStorageStatisticsFastRequestTypeID: "getStorageStatisticsFast#3a86702", - GetDatabaseStatisticsRequestTypeID: "getDatabaseStatistics#8c33d4b9", - OptimizeStorageRequestTypeID: "optimizeStorage#ef73c8c5", - SetNetworkTypeRequestTypeID: "setNetworkType#d62de55e", - GetNetworkStatisticsRequestTypeID: "getNetworkStatistics#c537581e", - AddNetworkStatisticsRequestTypeID: "addNetworkStatistics#4b63b3d9", - ResetNetworkStatisticsRequestTypeID: "resetNetworkStatistics#6222dd86", - GetAutoDownloadSettingsPresetsRequestTypeID: "getAutoDownloadSettingsPresets#996a4737", - SetAutoDownloadSettingsRequestTypeID: "setAutoDownloadSettings#eaeb64f4", - GetAutosaveSettingsRequestTypeID: "getAutosaveSettings#7f53f22a", - SetAutosaveSettingsRequestTypeID: "setAutosaveSettings#6878c0", - ClearAutosaveSettingsExceptionsRequestTypeID: "clearAutosaveSettingsExceptions#57ec63f2", - GetBankCardInfoRequestTypeID: "getBankCardInfo#b1e31db0", - GetPassportElementRequestTypeID: "getPassportElement#8fcce17a", - GetAllPassportElementsRequestTypeID: "getAllPassportElements#86782aeb", - SetPassportElementRequestTypeID: "setPassportElement#7b45d19c", - DeletePassportElementRequestTypeID: "deletePassportElement#9981aa74", - SetPassportElementErrorsRequestTypeID: "setPassportElementErrors#80fa80bf", - GetPreferredCountryLanguageRequestTypeID: "getPreferredCountryLanguage#c862cbd6", - SendPhoneNumberVerificationCodeRequestTypeID: "sendPhoneNumberVerificationCode#7c140dcb", - ResendPhoneNumberVerificationCodeRequestTypeID: "resendPhoneNumberVerificationCode#51845ffc", - CheckPhoneNumberVerificationCodeRequestTypeID: "checkPhoneNumberVerificationCode#594177be", - SendEmailAddressVerificationCodeRequestTypeID: "sendEmailAddressVerificationCode#f2ca537d", - ResendEmailAddressVerificationCodeRequestTypeID: "resendEmailAddressVerificationCode#90653024", - CheckEmailAddressVerificationCodeRequestTypeID: "checkEmailAddressVerificationCode#e695db03", - GetPassportAuthorizationFormRequestTypeID: "getPassportAuthorizationForm#61850486", - GetPassportAuthorizationFormAvailableElementsRequestTypeID: "getPassportAuthorizationFormAvailableElements#3fb314fc", - SendPassportAuthorizationFormRequestTypeID: "sendPassportAuthorizationForm#d9c77579", - SendPhoneNumberConfirmationCodeRequestTypeID: "sendPhoneNumberConfirmationCode#8eae6cd9", - ResendPhoneNumberConfirmationCodeRequestTypeID: "resendPhoneNumberConfirmationCode#7b537aea", - CheckPhoneNumberConfirmationCodeRequestTypeID: "checkPhoneNumberConfirmationCode#afa638da", - SetBotUpdatesStatusRequestTypeID: "setBotUpdatesStatus#bb293991", - UploadStickerFileRequestTypeID: "uploadStickerFile#269650c3", - GetSuggestedStickerSetNameRequestTypeID: "getSuggestedStickerSetName#b0120840", - CheckStickerSetNameRequestTypeID: "checkStickerSetName#955808fe", - CreateNewStickerSetRequestTypeID: "createNewStickerSet#19454551", - AddStickerToSetRequestTypeID: "addStickerToSet#56dc1e3b", - SetStickerSetThumbnailRequestTypeID: "setStickerSetThumbnail#6f813221", - SetCustomEmojiStickerSetThumbnailRequestTypeID: "setCustomEmojiStickerSetThumbnail#bd12e0ea", - SetStickerSetTitleRequestTypeID: "setStickerSetTitle#64e933a2", - DeleteStickerSetRequestTypeID: "deleteStickerSet#5e0a7bad", - SetStickerPositionInSetRequestTypeID: "setStickerPositionInSet#7bb24721", - RemoveStickerFromSetRequestTypeID: "removeStickerFromSet#61e1eea4", - SetStickerEmojisRequestTypeID: "setStickerEmojis#d9ec0431", - SetStickerKeywordsRequestTypeID: "setStickerKeywords#462481d", - SetStickerMaskPositionRequestTypeID: "setStickerMaskPosition#47a959d0", - GetMapThumbnailFileRequestTypeID: "getMapThumbnailFile#f6e6979a", - GetPremiumLimitRequestTypeID: "getPremiumLimit#4017fcea", - GetPremiumFeaturesRequestTypeID: "getPremiumFeatures#b4dc2649", - GetPremiumStickerExamplesRequestTypeID: "getPremiumStickerExamples#5369cb98", - ViewPremiumFeatureRequestTypeID: "viewPremiumFeature#b8031b2", - ClickPremiumSubscriptionButtonRequestTypeID: "clickPremiumSubscriptionButton#e9fca306", - GetPremiumStateRequestTypeID: "getPremiumState#278e3ae2", - GetPremiumGiftCodePaymentOptionsRequestTypeID: "getPremiumGiftCodePaymentOptions#89523a2c", - CheckPremiumGiftCodeRequestTypeID: "checkPremiumGiftCode#958ad664", - ApplyPremiumGiftCodeRequestTypeID: "applyPremiumGiftCode#afb44c1e", - LaunchPrepaidPremiumGiveawayRequestTypeID: "launchPrepaidPremiumGiveaway#5328fea1", - GetPremiumGiveawayInfoRequestTypeID: "getPremiumGiveawayInfo#6adb7b97", - CanPurchasePremiumRequestTypeID: "canPurchasePremium#e9de1cc0", - AssignAppStoreTransactionRequestTypeID: "assignAppStoreTransaction#86f30bb0", - AssignGooglePlayTransactionRequestTypeID: "assignGooglePlayTransaction#8939bca4", - AcceptTermsOfServiceRequestTypeID: "acceptTermsOfService#7efe03e4", - SearchStringsByPrefixRequestTypeID: "searchStringsByPrefix#a8145813", - SendCustomRequestRequestTypeID: "sendCustomRequest#10fd71a1", - AnswerCustomQueryRequestTypeID: "answerCustomQuery#b2e52d3f", - SetAlarmRequestTypeID: "setAlarm#cbef7e15", - GetCountriesRequestTypeID: "getCountries#fce8099e", - GetCountryCodeRequestTypeID: "getCountryCode#5bd398f2", - GetPhoneNumberInfoRequestTypeID: "getPhoneNumberInfo#a0229bf9", - GetPhoneNumberInfoSyncRequestTypeID: "getPhoneNumberInfoSync#209b7d38", - GetDeepLinkInfoRequestTypeID: "getDeepLinkInfo#28923f7e", - GetApplicationConfigRequestTypeID: "getApplicationConfig#93550682", - SaveApplicationLogEventRequestTypeID: "saveApplicationLogEvent#cfa6c20e", - GetApplicationDownloadLinkRequestTypeID: "getApplicationDownloadLink#6ad2fc4", - AddProxyRequestTypeID: "addProxy#13c2bcd8", - EditProxyRequestTypeID: "editProxy#a0482853", - EnableProxyRequestTypeID: "enableProxy#59138296", - DisableProxyRequestTypeID: "disableProxy#82d31782", - RemoveProxyRequestTypeID: "removeProxy#519ca307", - GetProxiesRequestTypeID: "getProxies#fa560333", - GetProxyLinkRequestTypeID: "getProxyLink#c125ae78", - PingProxyRequestTypeID: "pingProxy#c59b40b1", - SetLogStreamRequestTypeID: "setLogStream#aeaff791", - GetLogStreamRequestTypeID: "getLogStream#45984b5b", - SetLogVerbosityLevelRequestTypeID: "setLogVerbosityLevel#edea07d2", - GetLogVerbosityLevelRequestTypeID: "getLogVerbosityLevel#23689ae4", - GetLogTagsRequestTypeID: "getLogTags#f0d569da", - SetLogTagVerbosityLevelRequestTypeID: "setLogTagVerbosityLevel#8317d696", - GetLogTagVerbosityLevelRequestTypeID: "getLogTagVerbosityLevel#38af2d83", - AddLogMessageRequestTypeID: "addLogMessage#5f36cfec", - GetUserSupportInfoRequestTypeID: "getUserSupportInfo#74a59305", - SetUserSupportInfoRequestTypeID: "setUserSupportInfo#837c9803", - GetSupportNameRequestTypeID: "getSupportName#4d9e1562", - TestCallEmptyRequestTypeID: "testCallEmpty#da9c4a16", - TestCallStringRequestTypeID: "testCallString#98b74a2f", - TestCallBytesRequestTypeID: "testCallBytes#d4215aa9", - TestCallVectorIntRequestTypeID: "testCallVectorInt#65ed7e72", - TestCallVectorIntObjectRequestTypeID: "testCallVectorIntObject#ca57f472", - TestCallVectorStringRequestTypeID: "testCallVectorString#8e5a6ed8", - TestCallVectorStringObjectRequestTypeID: "testCallVectorStringObject#96cd6de", - TestSquareIntRequestTypeID: "testSquareInt#fc6a6990", - TestNetworkRequestTypeID: "testNetwork#afe4344b", - TestProxyRequestTypeID: "testProxy#b8a1a29e", - TestGetDifferenceRequestTypeID: "testGetDifference#68226325", - TestUseUpdateRequestTypeID: "testUseUpdate#2abdff1e", - TestReturnErrorRequestTypeID: "testReturnError#1b217cf2", + SuggestedActionSetBirthdateTypeID: "suggestedActionSetBirthdate#eabd9b02", + CountTypeID: "count#4d38f104", + TextTypeID: "text#22765898", + SecondsTypeID: "seconds#3936e58e", + FileDownloadedPrefixSizeTypeID: "fileDownloadedPrefixSize#87e267fb", + DeepLinkInfoTypeID: "deepLinkInfo#6f1ba0fe", + TextParseModeMarkdownTypeID: "textParseModeMarkdown#157648bf", + TextParseModeHTMLTypeID: "textParseModeHTML#62f4c5f3", + ProxyTypeSocks5TypeID: "proxyTypeSocks5#caf342b3", + ProxyTypeHTTPTypeID: "proxyTypeHttp#a3c7c777", + ProxyTypeMtprotoTypeID: "proxyTypeMtproto#8ae31ffd", + ProxyTypeID: "proxy#baf7b73", + ProxiesTypeID: "proxies#5ee27a86", + InputStickerTypeID: "inputSticker#1f1d0998", + DateRangeTypeID: "dateRange#51150c66", + StatisticalValueTypeID: "statisticalValue#626d6a76", + StatisticalGraphDataTypeID: "statisticalGraphData#89732e2c", + StatisticalGraphAsyncTypeID: "statisticalGraphAsync#19fb2b9f", + StatisticalGraphErrorTypeID: "statisticalGraphError#c3fda052", + ChatStatisticsObjectTypeMessageTypeID: "chatStatisticsObjectTypeMessage#6f9f24f6", + ChatStatisticsObjectTypeStoryTypeID: "chatStatisticsObjectTypeStory#15baf9b0", + ChatStatisticsInteractionInfoTypeID: "chatStatisticsInteractionInfo#694a9a8d", + ChatStatisticsMessageSenderInfoTypeID: "chatStatisticsMessageSenderInfo#690a7e4b", + ChatStatisticsAdministratorActionsInfoTypeID: "chatStatisticsAdministratorActionsInfo#e7c5cd7e", + ChatStatisticsInviterInfoTypeID: "chatStatisticsInviterInfo#2583d48b", + ChatStatisticsSupergroupTypeID: "chatStatisticsSupergroup#c67549ef", + ChatStatisticsChannelTypeID: "chatStatisticsChannel#b8e95b4", + MessageStatisticsTypeID: "messageStatistics#a2ce4f07", + StoryStatisticsTypeID: "storyStatistics#46448b6b", + PointTypeID: "point#1a13f5b9", + VectorPathCommandLineTypeID: "vectorPathCommandLine#db663c8a", + VectorPathCommandCubicBezierCurveTypeID: "vectorPathCommandCubicBezierCurve#494c3e3a", + BotCommandScopeDefaultTypeID: "botCommandScopeDefault#2f6cb2ab", + BotCommandScopeAllPrivateChatsTypeID: "botCommandScopeAllPrivateChats#eb716739", + BotCommandScopeAllGroupChatsTypeID: "botCommandScopeAllGroupChats#c585c85e", + BotCommandScopeAllChatAdministratorsTypeID: "botCommandScopeAllChatAdministrators#771c1551", + BotCommandScopeChatTypeID: "botCommandScopeChat#e65b22a5", + BotCommandScopeChatAdministratorsTypeID: "botCommandScopeChatAdministrators#42bcfe4e", + BotCommandScopeChatMemberTypeID: "botCommandScopeChatMember#f36696f2", + UpdateAuthorizationStateTypeID: "updateAuthorizationState#60b30ee2", + UpdateNewMessageTypeID: "updateNewMessage#de6fb20e", + UpdateMessageSendAcknowledgedTypeID: "updateMessageSendAcknowledged#4da7d239", + UpdateMessageSendSucceededTypeID: "updateMessageSendSucceeded#6c399d7d", + UpdateMessageSendFailedTypeID: "updateMessageSendFailed#da1bf8e7", + UpdateMessageContentTypeID: "updateMessageContent#1e36bb24", + UpdateMessageEditedTypeID: "updateMessageEdited#dea602e6", + UpdateMessageIsPinnedTypeID: "updateMessageIsPinned#41bc233d", + UpdateMessageInteractionInfoTypeID: "updateMessageInteractionInfo#ab803bfe", + UpdateMessageContentOpenedTypeID: "updateMessageContentOpened#a55ea885", + UpdateMessageMentionReadTypeID: "updateMessageMentionRead#f0f74d46", + UpdateMessageUnreadReactionsTypeID: "updateMessageUnreadReactions#12a7220a", + UpdateMessageLiveLocationViewedTypeID: "updateMessageLiveLocationViewed#b2058595", + UpdateNewChatTypeID: "updateNewChat#7bb98ccd", + UpdateChatTitleTypeID: "updateChatTitle#f58b85a4", + UpdateChatPhotoTypeID: "updateChatPhoto#eca5423f", + UpdateChatAccentColorsTypeID: "updateChatAccentColors#b7b8f8f9", + UpdateChatPermissionsTypeID: "updateChatPermissions#9f52176d", + UpdateChatLastMessageTypeID: "updateChatLastMessage#f10cab1d", + UpdateChatPositionTypeID: "updateChatPosition#ff76fa77", + UpdateChatAddedToListTypeID: "updateChatAddedToList#ab7004ec", + UpdateChatRemovedFromListTypeID: "updateChatRemovedFromList#4d2ac21c", + UpdateChatReadInboxTypeID: "updateChatReadInbox#d07036e7", + UpdateChatReadOutboxTypeID: "updateChatReadOutbox#2a385285", + UpdateChatActionBarTypeID: "updateChatActionBar#d9a258c2", + UpdateChatAvailableReactionsTypeID: "updateChatAvailableReactions#8ab413f9", + UpdateChatDraftMessageTypeID: "updateChatDraftMessage#2bf257d4", + UpdateChatEmojiStatusTypeID: "updateChatEmojiStatus#77796510", + UpdateChatMessageSenderTypeID: "updateChatMessageSender#77705241", + UpdateChatMessageAutoDeleteTimeTypeID: "updateChatMessageAutoDeleteTime#71425de5", + UpdateChatNotificationSettingsTypeID: "updateChatNotificationSettings#d020b456", + UpdateChatPendingJoinRequestsTypeID: "updateChatPendingJoinRequests#14c6e3e1", + UpdateChatReplyMarkupTypeID: "updateChatReplyMarkup#4e0ba5a0", + UpdateChatBackgroundTypeID: "updateChatBackground#ff9d38b3", + UpdateChatThemeTypeID: "updateChatTheme#31f3d465", + UpdateChatUnreadMentionCountTypeID: "updateChatUnreadMentionCount#80f47b1c", + UpdateChatUnreadReactionCountTypeID: "updateChatUnreadReactionCount#81603cdd", + UpdateChatVideoChatTypeID: "updateChatVideoChat#25fb4ca6", + UpdateChatDefaultDisableNotificationTypeID: "updateChatDefaultDisableNotification#1ba96a9b", + UpdateChatHasProtectedContentTypeID: "updateChatHasProtectedContent#6b50071b", + UpdateChatIsTranslatableTypeID: "updateChatIsTranslatable#7b031617", + UpdateChatIsMarkedAsUnreadTypeID: "updateChatIsMarkedAsUnread#57853334", + UpdateChatViewAsTopicsTypeID: "updateChatViewAsTopics#5bff163d", + UpdateChatBlockListTypeID: "updateChatBlockList#872af48e", + UpdateChatHasScheduledMessagesTypeID: "updateChatHasScheduledMessages#7b14c2d7", + UpdateChatFoldersTypeID: "updateChatFolders#e110242a", + UpdateChatOnlineMemberCountTypeID: "updateChatOnlineMemberCount#1d0caa9d", + UpdateSavedMessagesTopicTypeID: "updateSavedMessagesTopic#9f823b30", + UpdateSavedMessagesTopicCountTypeID: "updateSavedMessagesTopicCount#fbd279d1", + UpdateQuickReplyShortcutTypeID: "updateQuickReplyShortcut#c69338cf", + UpdateQuickReplyShortcutDeletedTypeID: "updateQuickReplyShortcutDeleted#e8b9bc3a", + UpdateQuickReplyShortcutsTypeID: "updateQuickReplyShortcuts#77d31a6a", + UpdateQuickReplyShortcutMessagesTypeID: "updateQuickReplyShortcutMessages#8bb36b72", + UpdateForumTopicInfoTypeID: "updateForumTopicInfo#6b6f2cc9", + UpdateScopeNotificationSettingsTypeID: "updateScopeNotificationSettings#b83ccb73", + UpdateNotificationTypeID: "updateNotification#8ee67ed4", + UpdateNotificationGroupTypeID: "updateNotificationGroup#96cd9e06", + UpdateActiveNotificationsTypeID: "updateActiveNotifications#317d80f2", + UpdateHavePendingNotificationsTypeID: "updateHavePendingNotifications#aaee1db", + UpdateDeleteMessagesTypeID: "updateDeleteMessages#6a05bf9", + UpdateChatActionTypeID: "updateChatAction#9abfd628", + UpdateUserStatusTypeID: "updateUserStatus#39211211", + UpdateUserTypeID: "updateUser#468928f9", + UpdateBasicGroupTypeID: "updateBasicGroup#c433c763", + UpdateSupergroupTypeID: "updateSupergroup#fb6c6524", + UpdateSecretChatTypeID: "updateSecretChat#9ca5132b", + UpdateUserFullInfoTypeID: "updateUserFullInfo#fcf2cb17", + UpdateBasicGroupFullInfoTypeID: "updateBasicGroupFullInfo#52f66bbf", + UpdateSupergroupFullInfoTypeID: "updateSupergroupFullInfo#19f5cd0e", + UpdateServiceNotificationTypeID: "updateServiceNotification#4e9895ad", + UpdateFileTypeID: "updateFile#6cd875f", + UpdateFileGenerationStartTypeID: "updateFileGenerationStart#cec5eec", + UpdateFileGenerationStopTypeID: "updateFileGenerationStop#8f14fdeb", + UpdateFileDownloadsTypeID: "updateFileDownloads#e8cd12c7", + UpdateFileAddedToDownloadsTypeID: "updateFileAddedToDownloads#5ff5921a", + UpdateFileDownloadTypeID: "updateFileDownload#342f83ca", + UpdateFileRemovedFromDownloadsTypeID: "updateFileRemovedFromDownloads#6e7c14e8", + UpdateCallTypeID: "updateCall#4fb3d0dd", + UpdateGroupCallTypeID: "updateGroupCall#30324e00", + UpdateGroupCallParticipantTypeID: "updateGroupCallParticipant#d0213cf9", + UpdateNewCallSignalingDataTypeID: "updateNewCallSignalingData#22c98d8d", + UpdateUserPrivacySettingRulesTypeID: "updateUserPrivacySettingRules#c99552f6", + UpdateUnreadMessageCountTypeID: "updateUnreadMessageCount#4b541c9", + UpdateUnreadChatCountTypeID: "updateUnreadChatCount#76e19242", + UpdateStoryTypeID: "updateStory#1906572f", + UpdateStoryDeletedTypeID: "updateStoryDeleted#7007eb9d", + UpdateStorySendSucceededTypeID: "updateStorySendSucceeded#b9269e57", + UpdateStorySendFailedTypeID: "updateStorySendFailed#e046f199", + UpdateChatActiveStoriesTypeID: "updateChatActiveStories#79786c2c", + UpdateStoryListChatCountTypeID: "updateStoryListChatCount#8833cd3f", + UpdateStoryStealthModeTypeID: "updateStoryStealthMode#6ff7bd1a", + UpdateOptionTypeID: "updateOption#35b17404", + UpdateStickerSetTypeID: "updateStickerSet#70035dcc", + UpdateInstalledStickerSetsTypeID: "updateInstalledStickerSets#82cd5388", + UpdateTrendingStickerSetsTypeID: "updateTrendingStickerSets#4b7a50a7", + UpdateRecentStickersTypeID: "updateRecentStickers#aefdf8dc", + UpdateFavoriteStickersTypeID: "updateFavoriteStickers#113f2b6a", + UpdateSavedAnimationsTypeID: "updateSavedAnimations#1084a1c8", + UpdateSavedNotificationSoundsTypeID: "updateSavedNotificationSounds#5a6653b4", + UpdateDefaultBackgroundTypeID: "updateDefaultBackground#d550952f", + UpdateChatThemesTypeID: "updateChatThemes#98dc58d5", + UpdateAccentColorsTypeID: "updateAccentColors#1316555e", + UpdateProfileAccentColorsTypeID: "updateProfileAccentColors#bf8e7430", + UpdateLanguagePackStringsTypeID: "updateLanguagePackStrings#af87919f", + UpdateConnectionStateTypeID: "updateConnectionState#57939e2e", + UpdateTermsOfServiceTypeID: "updateTermsOfService#b23cc55e", + UpdateUsersNearbyTypeID: "updateUsersNearby#97c8ab5", + UpdateUnconfirmedSessionTypeID: "updateUnconfirmedSession#fea6088c", + UpdateAttachmentMenuBotsTypeID: "updateAttachmentMenuBots#b6b910c", + UpdateWebAppMessageSentTypeID: "updateWebAppMessageSent#58431229", + UpdateActiveEmojiReactionsTypeID: "updateActiveEmojiReactions#691ffcb7", + UpdateDefaultReactionTypeTypeID: "updateDefaultReactionType#4b615105", + UpdateSavedMessagesTagsTypeID: "updateSavedMessagesTags#7386424a", + UpdateSpeechRecognitionTrialTypeID: "updateSpeechRecognitionTrial#ff4efcc1", + UpdateDiceEmojisTypeID: "updateDiceEmojis#9d0f91df", + UpdateAnimatedEmojiMessageClickedTypeID: "updateAnimatedEmojiMessageClicked#a3167405", + UpdateAnimationSearchParametersTypeID: "updateAnimationSearchParameters#6016ef01", + UpdateSuggestedActionsTypeID: "updateSuggestedActions#c2e5cccb", + UpdateContactCloseBirthdaysTypeID: "updateContactCloseBirthdays#c88b98ce", + UpdateAddChatMembersPrivacyForbiddenTypeID: "updateAddChatMembersPrivacyForbidden#b8b50363", + UpdateAutosaveSettingsTypeID: "updateAutosaveSettings#da274f0b", + UpdateBusinessConnectionTypeID: "updateBusinessConnection#8632f476", + UpdateNewBusinessMessageTypeID: "updateNewBusinessMessage#86be4644", + UpdateBusinessMessageEditedTypeID: "updateBusinessMessageEdited#81a66d89", + UpdateBusinessMessagesDeletedTypeID: "updateBusinessMessagesDeleted#e036d3ed", + UpdateNewInlineQueryTypeID: "updateNewInlineQuery#7171bf34", + UpdateNewChosenInlineResultTypeID: "updateNewChosenInlineResult#cb4c4f5d", + UpdateNewCallbackQueryTypeID: "updateNewCallbackQuery#8964d05e", + UpdateNewInlineCallbackQueryTypeID: "updateNewInlineCallbackQuery#ecf934ba", + UpdateNewShippingQueryTypeID: "updateNewShippingQuery#29584672", + UpdateNewPreCheckoutQueryTypeID: "updateNewPreCheckoutQuery#2a3871c9", + UpdateNewCustomEventTypeID: "updateNewCustomEvent#76dd6a0c", + UpdateNewCustomQueryTypeID: "updateNewCustomQuery#d702f9a6", + UpdatePollTypeID: "updatePoll#966b73ca", + UpdatePollAnswerTypeID: "updatePollAnswer#b67ac547", + UpdateChatMemberTypeID: "updateChatMember#6000e29c", + UpdateNewChatJoinRequestTypeID: "updateNewChatJoinRequest#7e48b843", + UpdateChatBoostTypeID: "updateChatBoost#50727e24", + UpdateMessageReactionTypeID: "updateMessageReaction#f46c854a", + UpdateMessageReactionsTypeID: "updateMessageReactions#bd5618e9", + UpdatesTypeID: "updates#b9829222", + LogStreamDefaultTypeID: "logStreamDefault#52e296bc", + LogStreamFileTypeID: "logStreamFile#5b528de5", + LogStreamEmptyTypeID: "logStreamEmpty#e233f1cc", + LogVerbosityLevelTypeID: "logVerbosityLevel#676443ea", + LogTagsTypeID: "logTags#dc09ced4", + UserSupportInfoTypeID: "userSupportInfo#b50e1c29", + TestIntTypeID: "testInt#ddbd2c09", + TestStringTypeID: "testString#fe56688c", + TestBytesTypeID: "testBytes#a422c4de", + TestVectorIntTypeID: "testVectorInt#df9eb113", + TestVectorIntObjectTypeID: "testVectorIntObject#f152999b", + TestVectorStringTypeID: "testVectorString#5d6f85bc", + TestVectorStringObjectTypeID: "testVectorStringObject#e5ecc0d", + GetAuthorizationStateRequestTypeID: "getAuthorizationState#742dbe3d", + SetTdlibParametersRequestTypeID: "setTdlibParameters#d1c0f62e", + SetAuthenticationPhoneNumberRequestTypeID: "setAuthenticationPhoneNumber#33c0d823", + SetAuthenticationEmailAddressRequestTypeID: "setAuthenticationEmailAddress#69b2c502", + ResendAuthenticationCodeRequestTypeID: "resendAuthenticationCode#cf759719", + CheckAuthenticationEmailCodeRequestTypeID: "checkAuthenticationEmailCode#dd42c29f", + CheckAuthenticationCodeRequestTypeID: "checkAuthenticationCode#edfe44aa", + RequestQrCodeAuthenticationRequestTypeID: "requestQrCodeAuthentication#56fe3c4e", + RegisterUserRequestTypeID: "registerUser#c3aa52ec", + ResetAuthenticationEmailAddressRequestTypeID: "resetAuthenticationEmailAddress#e742722c", + CheckAuthenticationPasswordRequestTypeID: "checkAuthenticationPassword#87424ba0", + RequestAuthenticationPasswordRecoveryRequestTypeID: "requestAuthenticationPasswordRecovery#53152ab6", + CheckAuthenticationPasswordRecoveryCodeRequestTypeID: "checkAuthenticationPasswordRecoveryCode#dc0a3be5", + RecoverAuthenticationPasswordRequestTypeID: "recoverAuthenticationPassword#f8311523", + SendAuthenticationFirebaseSMSRequestTypeID: "sendAuthenticationFirebaseSms#15c15e3f", + CheckAuthenticationBotTokenRequestTypeID: "checkAuthenticationBotToken#261b4476", + LogOutRequestTypeID: "logOut#a1b5c41b", + CloseRequestTypeID: "close#b933e17f", + DestroyRequestTypeID: "destroy#28d9534a", + ConfirmQrCodeAuthenticationRequestTypeID: "confirmQrCodeAuthentication#e993a72d", + GetCurrentStateRequestTypeID: "getCurrentState#b8fc6889", + SetDatabaseEncryptionKeyRequestTypeID: "setDatabaseEncryptionKey#b83345b5", + GetPasswordStateRequestTypeID: "getPasswordState#f5957b78", + SetPasswordRequestTypeID: "setPassword#b8db46dd", + SetLoginEmailAddressRequestTypeID: "setLoginEmailAddress#37bb43d4", + ResendLoginEmailAddressCodeRequestTypeID: "resendLoginEmailAddressCode#11765215", + CheckLoginEmailAddressCodeRequestTypeID: "checkLoginEmailAddressCode#a951fc62", + GetRecoveryEmailAddressRequestTypeID: "getRecoveryEmailAddress#a0f1b9fd", + SetRecoveryEmailAddressRequestTypeID: "setRecoveryEmailAddress#89df939f", + CheckRecoveryEmailAddressCodeRequestTypeID: "checkRecoveryEmailAddressCode#88f7981b", + ResendRecoveryEmailAddressCodeRequestTypeID: "resendRecoveryEmailAddressCode#19d66f1c", + CancelRecoveryEmailAddressVerificationRequestTypeID: "cancelRecoveryEmailAddressVerification#a5988e8d", + RequestPasswordRecoveryRequestTypeID: "requestPasswordRecovery#ff2dc552", + CheckPasswordRecoveryCodeRequestTypeID: "checkPasswordRecoveryCode#f4081e18", + RecoverPasswordRequestTypeID: "recoverPassword#a5259973", + ResetPasswordRequestTypeID: "resetPassword#dc9e8c9d", + CancelPasswordResetRequestTypeID: "cancelPasswordReset#38127462", + CreateTemporaryPasswordRequestTypeID: "createTemporaryPassword#9f0d6f86", + GetTemporaryPasswordStateRequestTypeID: "getTemporaryPasswordState#ff3ea892", + GetMeRequestTypeID: "getMe#f495b27f", + GetUserRequestTypeID: "getUser#42999c0b", + GetUserFullInfoRequestTypeID: "getUserFullInfo#d1b29c58", + GetBasicGroupRequestTypeID: "getBasicGroup#9e893654", + GetBasicGroupFullInfoRequestTypeID: "getBasicGroupFullInfo#9365e32b", + GetSupergroupRequestTypeID: "getSupergroup#3afd10e2", + GetSupergroupFullInfoRequestTypeID: "getSupergroupFullInfo#418d4038", + GetSecretChatRequestTypeID: "getSecretChat#26b7e81", + GetChatRequestTypeID: "getChat#6f421440", + GetMessageRequestTypeID: "getMessage#9372c080", + GetMessageLocallyRequestTypeID: "getMessageLocally#dc062b6c", + GetRepliedMessageRequestTypeID: "getRepliedMessage#d9bd19bd", + GetChatPinnedMessageRequestTypeID: "getChatPinnedMessage#15731ab0", + GetCallbackQueryMessageRequestTypeID: "getCallbackQueryMessage#bd209172", + GetMessagesRequestTypeID: "getMessages#d5dd28bf", + GetMessageThreadRequestTypeID: "getMessageThread#7af23e3e", + GetMessageReadDateRequestTypeID: "getMessageReadDate#a7850343", + GetMessageViewersRequestTypeID: "getMessageViewers#a18f1ace", + GetFileRequestTypeID: "getFile#5c9efd4e", + GetRemoteFileRequestTypeID: "getRemoteFile#7f632732", + LoadChatsRequestTypeID: "loadChats#8f9b7d7b", + GetChatsRequestTypeID: "getChats#c604bac2", + SearchPublicChatRequestTypeID: "searchPublicChat#3316d9ad", + SearchPublicChatsRequestTypeID: "searchPublicChats#39d6e7b9", + SearchChatsRequestTypeID: "searchChats#8ff4b9cc", + SearchChatsOnServerRequestTypeID: "searchChatsOnServer#baf42f74", + SearchChatsNearbyRequestTypeID: "searchChatsNearby#f445c81f", + GetChatSimilarChatsRequestTypeID: "getChatSimilarChats#bb508f83", + GetChatSimilarChatCountRequestTypeID: "getChatSimilarChatCount#463e968e", + OpenChatSimilarChatRequestTypeID: "openChatSimilarChat#8fa6f413", + GetTopChatsRequestTypeID: "getTopChats#e8d95221", + RemoveTopChatRequestTypeID: "removeTopChat#8e481e55", + SearchRecentlyFoundChatsRequestTypeID: "searchRecentlyFoundChats#62320591", + AddRecentlyFoundChatRequestTypeID: "addRecentlyFoundChat#97e8198d", + RemoveRecentlyFoundChatRequestTypeID: "removeRecentlyFoundChat#2ac1bf1c", + ClearRecentlyFoundChatsRequestTypeID: "clearRecentlyFoundChats#eefa5b32", + GetRecentlyOpenedChatsRequestTypeID: "getRecentlyOpenedChats#8d4fb223", + CheckChatUsernameRequestTypeID: "checkChatUsername#f8e66210", + GetCreatedPublicChatsRequestTypeID: "getCreatedPublicChats#2a5725ef", + CheckCreatedPublicChatsLimitRequestTypeID: "checkCreatedPublicChatsLimit#e5717fa1", + GetSuitableDiscussionChatsRequestTypeID: "getSuitableDiscussionChats#2ec5df6", + GetInactiveSupergroupChatsRequestTypeID: "getInactiveSupergroupChats#d8cbf9b5", + GetSuitablePersonalChatsRequestTypeID: "getSuitablePersonalChats#90849bf5", + LoadSavedMessagesTopicsRequestTypeID: "loadSavedMessagesTopics#1146d6b8", + GetSavedMessagesTopicHistoryRequestTypeID: "getSavedMessagesTopicHistory#77e5da68", + GetSavedMessagesTopicMessageByDateRequestTypeID: "getSavedMessagesTopicMessageByDate#c15e4680", + DeleteSavedMessagesTopicHistoryRequestTypeID: "deleteSavedMessagesTopicHistory#69df3d6a", + DeleteSavedMessagesTopicMessagesByDateRequestTypeID: "deleteSavedMessagesTopicMessagesByDate#160a25", + ToggleSavedMessagesTopicIsPinnedRequestTypeID: "toggleSavedMessagesTopicIsPinned#a15345cc", + SetPinnedSavedMessagesTopicsRequestTypeID: "setPinnedSavedMessagesTopics#475a1110", + GetGroupsInCommonRequestTypeID: "getGroupsInCommon#16bdd36a", + GetChatHistoryRequestTypeID: "getChatHistory#d051927d", + GetMessageThreadHistoryRequestTypeID: "getMessageThreadHistory#9435d428", + DeleteChatHistoryRequestTypeID: "deleteChatHistory#a841d09f", + DeleteChatRequestTypeID: "deleteChat#f5cae05e", + SearchChatMessagesRequestTypeID: "searchChatMessages#dfdeb5c6", + SearchMessagesRequestTypeID: "searchMessages#2a8f08a7", + SearchSecretMessagesRequestTypeID: "searchSecretMessages#cd2a4c9c", + SearchSavedMessagesRequestTypeID: "searchSavedMessages#8a9b9f96", + SearchCallMessagesRequestTypeID: "searchCallMessages#8c3bef1b", + SearchOutgoingDocumentMessagesRequestTypeID: "searchOutgoingDocumentMessages#c023c47e", + DeleteAllCallMessagesRequestTypeID: "deleteAllCallMessages#a897d1f3", + SearchChatRecentLocationMessagesRequestTypeID: "searchChatRecentLocationMessages#38a37ee6", + GetActiveLiveLocationMessagesRequestTypeID: "getActiveLiveLocationMessages#ab093691", + GetChatMessageByDateRequestTypeID: "getChatMessageByDate#3f557136", + GetChatSparseMessagePositionsRequestTypeID: "getChatSparseMessagePositions#3b452efd", + GetChatMessageCalendarRequestTypeID: "getChatMessageCalendar#81af2db7", + GetChatMessageCountRequestTypeID: "getChatMessageCount#38f78909", + GetChatMessagePositionRequestTypeID: "getChatMessagePosition#81bfcc7", + GetChatScheduledMessagesRequestTypeID: "getChatScheduledMessages#df3d2ffb", + GetChatSponsoredMessagesRequestTypeID: "getChatSponsoredMessages#50a84098", + ClickChatSponsoredMessageRequestTypeID: "clickChatSponsoredMessage#d9c09feb", + ReportChatSponsoredMessageRequestTypeID: "reportChatSponsoredMessage#cc3e53be", + RemoveNotificationRequestTypeID: "removeNotification#336ab34e", + RemoveNotificationGroupRequestTypeID: "removeNotificationGroup#661a638e", + GetMessageLinkRequestTypeID: "getMessageLink#c556ef7a", + GetMessageEmbeddingCodeRequestTypeID: "getMessageEmbeddingCode#62a4cd09", + GetMessageLinkInfoRequestTypeID: "getMessageLinkInfo#d63eb458", + TranslateTextRequestTypeID: "translateText#252264f2", + TranslateMessageTextRequestTypeID: "translateMessageText#53c51ed2", + RecognizeSpeechRequestTypeID: "recognizeSpeech#67d402b9", + RateSpeechRecognitionRequestTypeID: "rateSpeechRecognition#eedcc3b5", + GetChatAvailableMessageSendersRequestTypeID: "getChatAvailableMessageSenders#450fe92b", + SetChatMessageSenderRequestTypeID: "setChatMessageSender#ab456b7e", + SendMessageRequestTypeID: "sendMessage#e02d01e9", + SendMessageAlbumRequestTypeID: "sendMessageAlbum#74bcdacf", + SendBotStartMessageRequestTypeID: "sendBotStartMessage#aa6a3eee", + SendInlineQueryResultMessageRequestTypeID: "sendInlineQueryResultMessage#467c5478", + ForwardMessagesRequestTypeID: "forwardMessages#34de5b20", + SendQuickReplyShortcutMessagesRequestTypeID: "sendQuickReplyShortcutMessages#dd5169d", + ResendMessagesRequestTypeID: "resendMessages#90e36776", + AddLocalMessageRequestTypeID: "addLocalMessage#f617b7a1", + DeleteMessagesRequestTypeID: "deleteMessages#c3ed9de2", + DeleteChatMessagesBySenderRequestTypeID: "deleteChatMessagesBySender#ba9b2e67", + DeleteChatMessagesByDateRequestTypeID: "deleteChatMessagesByDate#9e44e0bf", + EditMessageTextRequestTypeID: "editMessageText#bb2e1b7", + EditMessageLiveLocationRequestTypeID: "editMessageLiveLocation#ff29a512", + EditMessageMediaRequestTypeID: "editMessageMedia#bb4b8713", + EditMessageCaptionRequestTypeID: "editMessageCaption#44d2f92e", + EditMessageReplyMarkupRequestTypeID: "editMessageReplyMarkup#13cbde89", + EditInlineMessageTextRequestTypeID: "editInlineMessageText#cd02c1e5", + EditInlineMessageLiveLocationRequestTypeID: "editInlineMessageLiveLocation#f6a5da00", + EditInlineMessageMediaRequestTypeID: "editInlineMessageMedia#1676781", + EditInlineMessageCaptionRequestTypeID: "editInlineMessageCaption#d2a446b7", + EditInlineMessageReplyMarkupRequestTypeID: "editInlineMessageReplyMarkup#fbf906de", + EditMessageSchedulingStateRequestTypeID: "editMessageSchedulingState#ae2a0bc0", + SendBusinessMessageRequestTypeID: "sendBusinessMessage#ec64b993", + SendBusinessMessageAlbumRequestTypeID: "sendBusinessMessageAlbum#b6f0461f", + CheckQuickReplyShortcutNameRequestTypeID: "checkQuickReplyShortcutName#7d3dd129", + LoadQuickReplyShortcutsRequestTypeID: "loadQuickReplyShortcuts#c367b29d", + SetQuickReplyShortcutNameRequestTypeID: "setQuickReplyShortcutName#b20f471", + DeleteQuickReplyShortcutRequestTypeID: "deleteQuickReplyShortcut#f1486c16", + ReorderQuickReplyShortcutsRequestTypeID: "reorderQuickReplyShortcuts#b04981c4", + LoadQuickReplyShortcutMessagesRequestTypeID: "loadQuickReplyShortcutMessages#fd40aed4", + DeleteQuickReplyShortcutMessagesRequestTypeID: "deleteQuickReplyShortcutMessages#e859fcbb", + GetForumTopicDefaultIconsRequestTypeID: "getForumTopicDefaultIcons#583574dc", + CreateForumTopicRequestTypeID: "createForumTopic#c1fa28e4", + EditForumTopicRequestTypeID: "editForumTopic#a7769060", + GetForumTopicRequestTypeID: "getForumTopic#e59bfe41", + GetForumTopicLinkRequestTypeID: "getForumTopicLink#c97b88cb", + GetForumTopicsRequestTypeID: "getForumTopics#fbab7d5a", + SetForumTopicNotificationSettingsRequestTypeID: "setForumTopicNotificationSettings#1f433467", + ToggleForumTopicIsClosedRequestTypeID: "toggleForumTopicIsClosed#c7648af3", + ToggleGeneralForumTopicIsHiddenRequestTypeID: "toggleGeneralForumTopicIsHidden#5f1d1448", + ToggleForumTopicIsPinnedRequestTypeID: "toggleForumTopicIsPinned#466ceab4", + SetPinnedForumTopicsRequestTypeID: "setPinnedForumTopics#ddf26f21", + DeleteForumTopicRequestTypeID: "deleteForumTopic#6f285cb8", + GetEmojiReactionRequestTypeID: "getEmojiReaction#e53411dc", + GetCustomEmojiReactionAnimationsRequestTypeID: "getCustomEmojiReactionAnimations#49748dd2", + GetMessageAvailableReactionsRequestTypeID: "getMessageAvailableReactions#76db86b2", + ClearRecentReactionsRequestTypeID: "clearRecentReactions#4d61c752", + AddMessageReactionRequestTypeID: "addMessageReaction#549855ed", + RemoveMessageReactionRequestTypeID: "removeMessageReaction#97474d7b", + SetMessageReactionsRequestTypeID: "setMessageReactions#71fa9e8f", + GetMessageAddedReactionsRequestTypeID: "getMessageAddedReactions#7dc6ae52", + SetDefaultReactionTypeRequestTypeID: "setDefaultReactionType#65038a3d", + GetSavedMessagesTagsRequestTypeID: "getSavedMessagesTags#8cd667a9", + SetSavedMessagesTagLabelRequestTypeID: "setSavedMessagesTagLabel#b03acd10", + SearchQuoteRequestTypeID: "searchQuote#6864011f", + GetTextEntitiesRequestTypeID: "getTextEntities#eba543fb", + ParseTextEntitiesRequestTypeID: "parseTextEntities#9a1fc29f", + ParseMarkdownRequestTypeID: "parseMarkdown#2d153aef", + GetMarkdownTextRequestTypeID: "getMarkdownText#9ce7228", + GetCountryFlagEmojiRequestTypeID: "getCountryFlagEmoji#3a8629fa", + GetFileMimeTypeRequestTypeID: "getFileMimeType#84631b89", + GetFileExtensionRequestTypeID: "getFileExtension#f9adb934", + CleanFileNameRequestTypeID: "cleanFileName#39b1f7fb", + GetLanguagePackStringRequestTypeID: "getLanguagePackString#8fcde73", + GetJSONValueRequestTypeID: "getJsonValue#92fa5a05", + GetJSONStringRequestTypeID: "getJsonString#278b9421", + GetThemeParametersJSONStringRequestTypeID: "getThemeParametersJsonString#91b905f8", + SetPollAnswerRequestTypeID: "setPollAnswer#5303b916", + GetPollVotersRequestTypeID: "getPollVoters#c45ba9ac", + StopPollRequestTypeID: "stopPoll#62e80aad", + HideSuggestedActionRequestTypeID: "hideSuggestedAction#a2ef2b7f", + GetBusinessConnectionRequestTypeID: "getBusinessConnection#81f42420", + GetLoginURLInfoRequestTypeID: "getLoginUrlInfo#ccc99db3", + GetLoginURLRequestTypeID: "getLoginUrl#2f3295d1", + ShareUsersWithBotRequestTypeID: "shareUsersWithBot#58448550", + ShareChatWithBotRequestTypeID: "shareChatWithBot#a6530ae2", + GetInlineQueryResultsRequestTypeID: "getInlineQueryResults#79dcf86c", + AnswerInlineQueryRequestTypeID: "answerInlineQuery#ac7cc5e6", + SearchWebAppRequestTypeID: "searchWebApp#b5fc8a35", + GetWebAppLinkURLRequestTypeID: "getWebAppLinkUrl#4f0ef3cc", + GetWebAppURLRequestTypeID: "getWebAppUrl#64c42cbe", + SendWebAppDataRequestTypeID: "sendWebAppData#ab1fce0c", + OpenWebAppRequestTypeID: "openWebApp#b02666b0", + CloseWebAppRequestTypeID: "closeWebApp#68a124c6", + AnswerWebAppQueryRequestTypeID: "answerWebAppQuery#a0b49cf1", + GetCallbackQueryAnswerRequestTypeID: "getCallbackQueryAnswer#6ef7a5f", + AnswerCallbackQueryRequestTypeID: "answerCallbackQuery#bb462e76", + AnswerShippingQueryRequestTypeID: "answerShippingQuery#7a3c2432", + AnswerPreCheckoutQueryRequestTypeID: "answerPreCheckoutQuery#a76163eb", + SetGameScoreRequestTypeID: "setGameScore#7eccedc6", + SetInlineGameScoreRequestTypeID: "setInlineGameScore#c7715d8b", + GetGameHighScoresRequestTypeID: "getGameHighScores#f0459b", + GetInlineGameHighScoresRequestTypeID: "getInlineGameHighScores#e0396baa", + DeleteChatReplyMarkupRequestTypeID: "deleteChatReplyMarkup#5ff9b5b", + SendChatActionRequestTypeID: "sendChatAction#8823f29e", + OpenChatRequestTypeID: "openChat#ecb9be0b", + CloseChatRequestTypeID: "closeChat#25e86e9", + ViewMessagesRequestTypeID: "viewMessages#aa2f0438", + OpenMessageContentRequestTypeID: "openMessageContent#d3f2697b", + ClickAnimatedEmojiMessageRequestTypeID: "clickAnimatedEmojiMessage#bb17662", + GetInternalLinkRequestTypeID: "getInternalLink#3960f1b0", + GetInternalLinkTypeRequestTypeID: "getInternalLinkType#8bdd5709", + GetExternalLinkInfoRequestTypeID: "getExternalLinkInfo#460d7a3f", + GetExternalLinkRequestTypeID: "getExternalLink#5e92f0eb", + ReadAllChatMentionsRequestTypeID: "readAllChatMentions#50eab2b5", + ReadAllMessageThreadMentionsRequestTypeID: "readAllMessageThreadMentions#4edd7555", + ReadAllChatReactionsRequestTypeID: "readAllChatReactions#54c1976d", + ReadAllMessageThreadReactionsRequestTypeID: "readAllMessageThreadReactions#d0bc273e", + CreatePrivateChatRequestTypeID: "createPrivateChat#c7825b09", + CreateBasicGroupChatRequestTypeID: "createBasicGroupChat#758ab4e4", + CreateSupergroupChatRequestTypeID: "createSupergroupChat#46c770eb", + CreateSecretChatRequestTypeID: "createSecretChat#730dd22f", + CreateNewBasicGroupChatRequestTypeID: "createNewBasicGroupChat#c479e224", + CreateNewSupergroupChatRequestTypeID: "createNewSupergroupChat#2fecf6c6", + CreateNewSecretChatRequestTypeID: "createNewSecretChat#db012265", + UpgradeBasicGroupChatToSupergroupChatRequestTypeID: "upgradeBasicGroupChatToSupergroupChat#11e915ba", + GetChatListsToAddChatRequestTypeID: "getChatListsToAddChat#2709d6a1", + AddChatToListRequestTypeID: "addChatToList#fb334eb5", + GetChatFolderRequestTypeID: "getChatFolder#5882a98", + CreateChatFolderRequestTypeID: "createChatFolder#3c85c500", + EditChatFolderRequestTypeID: "editChatFolder#332fb32", + DeleteChatFolderRequestTypeID: "deleteChatFolder#74260b87", + GetChatFolderChatsToLeaveRequestTypeID: "getChatFolderChatsToLeave#8dc1e6af", + GetChatFolderChatCountRequestTypeID: "getChatFolderChatCount#7dd4cbbe", + ReorderChatFoldersRequestTypeID: "reorderChatFolders#59544c32", + ToggleChatFolderTagsRequestTypeID: "toggleChatFolderTags#834b6c44", + GetRecommendedChatFoldersRequestTypeID: "getRecommendedChatFolders#f7533b87", + GetChatFolderDefaultIconNameRequestTypeID: "getChatFolderDefaultIconName#2cf7a067", + GetChatsForChatFolderInviteLinkRequestTypeID: "getChatsForChatFolderInviteLink#6fac4949", + CreateChatFolderInviteLinkRequestTypeID: "createChatFolderInviteLink#fba5e198", + GetChatFolderInviteLinksRequestTypeID: "getChatFolderInviteLinks#139d5be0", + EditChatFolderInviteLinkRequestTypeID: "editChatFolderInviteLink#5cc415a8", + DeleteChatFolderInviteLinkRequestTypeID: "deleteChatFolderInviteLink#c890717e", + CheckChatFolderInviteLinkRequestTypeID: "checkChatFolderInviteLink#1f25999b", + AddChatFolderByInviteLinkRequestTypeID: "addChatFolderByInviteLink#1ed19dae", + GetChatFolderNewChatsRequestTypeID: "getChatFolderNewChats#7e8d2ccc", + ProcessChatFolderNewChatsRequestTypeID: "processChatFolderNewChats#109f8a8b", + GetArchiveChatListSettingsRequestTypeID: "getArchiveChatListSettings#838d8e60", + SetArchiveChatListSettingsRequestTypeID: "setArchiveChatListSettings#cb454c0a", + SetChatTitleRequestTypeID: "setChatTitle#9cabebf", + SetChatPhotoRequestTypeID: "setChatPhoto#e97b8d03", + SetChatAccentColorRequestTypeID: "setChatAccentColor#349f57ca", + SetChatProfileAccentColorRequestTypeID: "setChatProfileAccentColor#4227ae7a", + SetChatMessageAutoDeleteTimeRequestTypeID: "setChatMessageAutoDeleteTime#a641b4ff", + SetChatEmojiStatusRequestTypeID: "setChatEmojiStatus#55881912", + SetChatPermissionsRequestTypeID: "setChatPermissions#7f7706fe", + SetChatBackgroundRequestTypeID: "setChatBackground#eb4c3fe", + DeleteChatBackgroundRequestTypeID: "deleteChatBackground#1316e678", + SetChatThemeRequestTypeID: "setChatTheme#8f090293", + SetChatDraftMessageRequestTypeID: "setChatDraftMessage#645e1f1a", + SetChatNotificationSettingsRequestTypeID: "setChatNotificationSettings#2e531ffe", + ToggleChatHasProtectedContentRequestTypeID: "toggleChatHasProtectedContent#3a20d94d", + ToggleChatViewAsTopicsRequestTypeID: "toggleChatViewAsTopics#2b2783dc", + ToggleChatIsTranslatableRequestTypeID: "toggleChatIsTranslatable#93f9cbdf", + ToggleChatIsMarkedAsUnreadRequestTypeID: "toggleChatIsMarkedAsUnread#c538dadf", + ToggleChatDefaultDisableNotificationRequestTypeID: "toggleChatDefaultDisableNotification#12c36012", + SetChatAvailableReactionsRequestTypeID: "setChatAvailableReactions#feb3e06", + SetChatClientDataRequestTypeID: "setChatClientData#ceb3273d", + SetChatDescriptionRequestTypeID: "setChatDescription#74a8b45d", + SetChatDiscussionGroupRequestTypeID: "setChatDiscussionGroup#c93c32b8", + SetChatLocationRequestTypeID: "setChatLocation#d2471daa", + SetChatSlowModeDelayRequestTypeID: "setChatSlowModeDelay#dfcae63e", + PinChatMessageRequestTypeID: "pinChatMessage#79475baf", + UnpinChatMessageRequestTypeID: "unpinChatMessage#7b1c3ede", + UnpinAllChatMessagesRequestTypeID: "unpinAllChatMessages#aa4cd4b7", + UnpinAllMessageThreadMessagesRequestTypeID: "unpinAllMessageThreadMessages#b7c69f00", + JoinChatRequestTypeID: "joinChat#137a1aa1", + LeaveChatRequestTypeID: "leaveChat#93377a61", + AddChatMemberRequestTypeID: "addChatMember#1dc4a5fa", + AddChatMembersRequestTypeID: "addChatMembers#b4f60138", + SetChatMemberStatusRequestTypeID: "setChatMemberStatus#4e0171f", + BanChatMemberRequestTypeID: "banChatMember#cb107d7c", + CanTransferOwnershipRequestTypeID: "canTransferOwnership#25d3440c", + TransferChatOwnershipRequestTypeID: "transferChatOwnership#77a00a13", + GetChatMemberRequestTypeID: "getChatMember#d0c15272", + SearchChatMembersRequestTypeID: "searchChatMembers#e56d46c5", + GetChatAdministratorsRequestTypeID: "getChatAdministrators#5c0eb6bb", + ClearAllDraftMessagesRequestTypeID: "clearAllDraftMessages#fd3c74db", + GetSavedNotificationSoundRequestTypeID: "getSavedNotificationSound#1b647917", + GetSavedNotificationSoundsRequestTypeID: "getSavedNotificationSounds#c0346fa8", + AddSavedNotificationSoundRequestTypeID: "addSavedNotificationSound#3e3984ef", + RemoveSavedNotificationSoundRequestTypeID: "removeSavedNotificationSound#e363474e", + GetChatNotificationSettingsExceptionsRequestTypeID: "getChatNotificationSettingsExceptions#bfe0e11", + GetScopeNotificationSettingsRequestTypeID: "getScopeNotificationSettings#c4a8254f", + SetScopeNotificationSettingsRequestTypeID: "setScopeNotificationSettings#85cfb63a", + ResetAllNotificationSettingsRequestTypeID: "resetAllNotificationSettings#f5a0a8f9", + ToggleChatIsPinnedRequestTypeID: "toggleChatIsPinned#a776263e", + SetPinnedChatsRequestTypeID: "setPinnedChats#c6c6edf1", + ReadChatListRequestTypeID: "readChatList#bd6498aa", + GetStoryRequestTypeID: "getStory#717b1c78", + GetChatsToSendStoriesRequestTypeID: "getChatsToSendStories#22f9e3a4", + CanSendStoryRequestTypeID: "canSendStory#b6e0216b", + SendStoryRequestTypeID: "sendStory#736858bb", + EditStoryRequestTypeID: "editStory#5e6a21b1", + SetStoryPrivacySettingsRequestTypeID: "setStoryPrivacySettings#d8e94332", + ToggleStoryIsPinnedRequestTypeID: "toggleStoryIsPinned#b493b30e", + DeleteStoryRequestTypeID: "deleteStory#9f35af16", + GetStoryNotificationSettingsExceptionsRequestTypeID: "getStoryNotificationSettingsExceptions#256a2eb0", + LoadActiveStoriesRequestTypeID: "loadActiveStories#7d8cf738", + SetChatActiveStoriesListRequestTypeID: "setChatActiveStoriesList#e0e35d11", + GetChatActiveStoriesRequestTypeID: "getChatActiveStories#2e4ffbf5", + GetChatPinnedStoriesRequestTypeID: "getChatPinnedStories#53c82a1", + GetChatArchivedStoriesRequestTypeID: "getChatArchivedStories#af1e9488", + OpenStoryRequestTypeID: "openStory#ceda7c7d", + CloseStoryRequestTypeID: "closeStory#443d0f55", + GetStoryAvailableReactionsRequestTypeID: "getStoryAvailableReactions#23854d3b", + SetStoryReactionRequestTypeID: "setStoryReaction#ac8b4fa7", + GetStoryInteractionsRequestTypeID: "getStoryInteractions#1cd1400d", + GetChatStoryInteractionsRequestTypeID: "getChatStoryInteractions#c5ec7376", + ReportStoryRequestTypeID: "reportStory#9b5f709b", + ActivateStoryStealthModeRequestTypeID: "activateStoryStealthMode#c3db8491", + GetStoryPublicForwardsRequestTypeID: "getStoryPublicForwards#68f7dcbb", + GetChatBoostLevelFeaturesRequestTypeID: "getChatBoostLevelFeatures#45e63e8b", + GetChatBoostFeaturesRequestTypeID: "getChatBoostFeatures#e8c128a0", + GetAvailableChatBoostSlotsRequestTypeID: "getAvailableChatBoostSlots#7307ebd5", + GetChatBoostStatusRequestTypeID: "getChatBoostStatus#cfac8acf", + BoostChatRequestTypeID: "boostChat#890ccd68", + GetChatBoostLinkRequestTypeID: "getChatBoostLink#56f16c85", + GetChatBoostLinkInfoRequestTypeID: "getChatBoostLinkInfo#26fc4b5c", + GetChatBoostsRequestTypeID: "getChatBoosts#ab5eaa38", + GetUserChatBoostsRequestTypeID: "getUserChatBoosts#b90ee799", + GetAttachmentMenuBotRequestTypeID: "getAttachmentMenuBot#3da561fb", + ToggleBotIsAddedToAttachmentMenuRequestTypeID: "toggleBotIsAddedToAttachmentMenu#8e59de9a", + GetThemedEmojiStatusesRequestTypeID: "getThemedEmojiStatuses#6ac5c8c2", + GetRecentEmojiStatusesRequestTypeID: "getRecentEmojiStatuses#ae3a3d29", + GetDefaultEmojiStatusesRequestTypeID: "getDefaultEmojiStatuses#24e45ec3", + ClearRecentEmojiStatusesRequestTypeID: "clearRecentEmojiStatuses#e671cb5e", + GetThemedChatEmojiStatusesRequestTypeID: "getThemedChatEmojiStatuses#fb735cb5", + GetDefaultChatEmojiStatusesRequestTypeID: "getDefaultChatEmojiStatuses#a7aa86e6", + GetDisallowedChatEmojiStatusesRequestTypeID: "getDisallowedChatEmojiStatuses#d2144da0", + DownloadFileRequestTypeID: "downloadFile#3f253234", + GetFileDownloadedPrefixSizeRequestTypeID: "getFileDownloadedPrefixSize#3304bd2d", + CancelDownloadFileRequestTypeID: "cancelDownloadFile#8b8052de", + GetSuggestedFileNameRequestTypeID: "getSuggestedFileName#85d8a486", + PreliminaryUploadFileRequestTypeID: "preliminaryUploadFile#70e7cb99", + CancelPreliminaryUploadFileRequestTypeID: "cancelPreliminaryUploadFile#311446be", + WriteGeneratedFilePartRequestTypeID: "writeGeneratedFilePart#cc89e95", + SetFileGenerationProgressRequestTypeID: "setFileGenerationProgress#6d754b3e", + FinishFileGenerationRequestTypeID: "finishFileGeneration#c11d0c9d", + ReadFilePartRequestTypeID: "readFilePart#360ca70d", + DeleteFileRequestTypeID: "deleteFile#6bbe9b2c", + AddFileToDownloadsRequestTypeID: "addFileToDownloads#33b583b7", + ToggleDownloadIsPausedRequestTypeID: "toggleDownloadIsPaused#c7866715", + ToggleAllDownloadsArePausedRequestTypeID: "toggleAllDownloadsArePaused#4a989002", + RemoveFileFromDownloadsRequestTypeID: "removeFileFromDownloads#5706bfee", + RemoveAllFilesFromDownloadsRequestTypeID: "removeAllFilesFromDownloads#b9487686", + SearchFileDownloadsRequestTypeID: "searchFileDownloads#2a1e0856", + GetMessageFileTypeRequestTypeID: "getMessageFileType#e2c70fd4", + GetMessageImportConfirmationTextRequestTypeID: "getMessageImportConfirmationText#174881a8", + ImportMessagesRequestTypeID: "importMessages#7e98592b", + ReplacePrimaryChatInviteLinkRequestTypeID: "replacePrimaryChatInviteLink#3f9e7b9d", + CreateChatInviteLinkRequestTypeID: "createChatInviteLink#1126a341", + EditChatInviteLinkRequestTypeID: "editChatInviteLink#4eb23d7c", + GetChatInviteLinkRequestTypeID: "getChatInviteLink#e36a41fd", + GetChatInviteLinkCountsRequestTypeID: "getChatInviteLinkCounts#3510e291", + GetChatInviteLinksRequestTypeID: "getChatInviteLinks#34a55cac", + GetChatInviteLinkMembersRequestTypeID: "getChatInviteLinkMembers#c5b6199a", + RevokeChatInviteLinkRequestTypeID: "revokeChatInviteLink#d1b755a9", + DeleteRevokedChatInviteLinkRequestTypeID: "deleteRevokedChatInviteLink#91270c7f", + DeleteAllRevokedChatInviteLinksRequestTypeID: "deleteAllRevokedChatInviteLinks#424816da", + CheckChatInviteLinkRequestTypeID: "checkChatInviteLink#e261483b", + JoinChatByInviteLinkRequestTypeID: "joinChatByInviteLink#c16aab86", + GetChatJoinRequestsRequestTypeID: "getChatJoinRequests#e8d90ea2", + ProcessChatJoinRequestRequestTypeID: "processChatJoinRequest#3be534a3", + ProcessChatJoinRequestsRequestTypeID: "processChatJoinRequests#3e823dce", + CreateCallRequestTypeID: "createCall#be282e10", + AcceptCallRequestTypeID: "acceptCall#d97562d0", + SendCallSignalingDataRequestTypeID: "sendCallSignalingData#542db19c", + DiscardCallRequestTypeID: "discardCall#95a9a57e", + SendCallRatingRequestTypeID: "sendCallRating#d89b576c", + SendCallDebugInformationRequestTypeID: "sendCallDebugInformation#785b373f", + SendCallLogRequestTypeID: "sendCallLog#3f0a47d1", + GetVideoChatAvailableParticipantsRequestTypeID: "getVideoChatAvailableParticipants#c45da305", + SetVideoChatDefaultParticipantRequestTypeID: "setVideoChatDefaultParticipant#f1a672b3", + CreateVideoChatRequestTypeID: "createVideoChat#7ea4958d", + GetVideoChatRtmpURLRequestTypeID: "getVideoChatRtmpUrl#482b1b1f", + ReplaceVideoChatRtmpURLRequestTypeID: "replaceVideoChatRtmpUrl#214f8fe0", + GetGroupCallRequestTypeID: "getGroupCall#5787668e", + StartScheduledGroupCallRequestTypeID: "startScheduledGroupCall#5a986d16", + ToggleGroupCallEnabledStartNotificationRequestTypeID: "toggleGroupCallEnabledStartNotification#2a30c752", + JoinGroupCallRequestTypeID: "joinGroupCall#c1c947e5", + StartGroupCallScreenSharingRequestTypeID: "startGroupCallScreenSharing#cb4e312d", + ToggleGroupCallScreenSharingIsPausedRequestTypeID: "toggleGroupCallScreenSharingIsPaused#a07b5360", + EndGroupCallScreenSharingRequestTypeID: "endGroupCallScreenSharing#85f41c4c", + SetGroupCallTitleRequestTypeID: "setGroupCallTitle#b6c19dcd", + ToggleGroupCallMuteNewParticipantsRequestTypeID: "toggleGroupCallMuteNewParticipants#10eec1c2", + InviteGroupCallParticipantsRequestTypeID: "inviteGroupCallParticipants#56c030a6", + GetGroupCallInviteLinkRequestTypeID: "getGroupCallInviteLink#2ae14924", + RevokeGroupCallInviteLinkRequestTypeID: "revokeGroupCallInviteLink#1de5a494", + StartGroupCallRecordingRequestTypeID: "startGroupCallRecording#68c5847b", + EndGroupCallRecordingRequestTypeID: "endGroupCallRecording#fb7b6289", + ToggleGroupCallIsMyVideoPausedRequestTypeID: "toggleGroupCallIsMyVideoPaused#e374f199", + ToggleGroupCallIsMyVideoEnabledRequestTypeID: "toggleGroupCallIsMyVideoEnabled#9f2f50fa", + SetGroupCallParticipantIsSpeakingRequestTypeID: "setGroupCallParticipantIsSpeaking#3748a1e5", + ToggleGroupCallParticipantIsMutedRequestTypeID: "toggleGroupCallParticipantIsMuted#b2081407", + SetGroupCallParticipantVolumeLevelRequestTypeID: "setGroupCallParticipantVolumeLevel#97779828", + ToggleGroupCallParticipantIsHandRaisedRequestTypeID: "toggleGroupCallParticipantIsHandRaised#8efb63e1", + LoadGroupCallParticipantsRequestTypeID: "loadGroupCallParticipants#37f3bece", + LeaveGroupCallRequestTypeID: "leaveGroupCall#3a6befa9", + EndGroupCallRequestTypeID: "endGroupCall#22294cb7", + GetGroupCallStreamsRequestTypeID: "getGroupCallStreams#9f7c9164", + GetGroupCallStreamSegmentRequestTypeID: "getGroupCallStreamSegment#8424daa5", + SetMessageSenderBlockListRequestTypeID: "setMessageSenderBlockList#898b5c91", + BlockMessageSenderFromRepliesRequestTypeID: "blockMessageSenderFromReplies#b79df58b", + GetBlockedMessageSendersRequestTypeID: "getBlockedMessageSenders#8ce52f16", + AddContactRequestTypeID: "addContact#6f707140", + ImportContactsRequestTypeID: "importContacts#77bdb718", + GetContactsRequestTypeID: "getContacts#ab7f4470", + SearchContactsRequestTypeID: "searchContacts#95073165", + RemoveContactsRequestTypeID: "removeContacts#b464dfff", + GetImportedContactCountRequestTypeID: "getImportedContactCount#d8e11a26", + ChangeImportedContactsRequestTypeID: "changeImportedContacts#24885905", + ClearImportedContactsRequestTypeID: "clearImportedContacts#33d39142", + SetCloseFriendsRequestTypeID: "setCloseFriends#7ff8f69f", + GetCloseFriendsRequestTypeID: "getCloseFriends#a9d574ce", + SetUserPersonalProfilePhotoRequestTypeID: "setUserPersonalProfilePhoto#1baa28f6", + SuggestUserProfilePhotoRequestTypeID: "suggestUserProfilePhoto#9561f463", + SearchUserByPhoneNumberRequestTypeID: "searchUserByPhoneNumber#a2e22b12", + SharePhoneNumberRequestTypeID: "sharePhoneNumber#4164e055", + GetUserProfilePhotosRequestTypeID: "getUserProfilePhotos#c9defe42", + GetStickersRequestTypeID: "getStickers#45069343", + GetAllStickerEmojisRequestTypeID: "getAllStickerEmojis#11ad2e30", + SearchStickersRequestTypeID: "searchStickers#9a19e90b", + GetPremiumStickersRequestTypeID: "getPremiumStickers#ef410a50", + GetInstalledStickerSetsRequestTypeID: "getInstalledStickerSets#612ef6f6", + GetArchivedStickerSetsRequestTypeID: "getArchivedStickerSets#3bb8424d", + GetTrendingStickerSetsRequestTypeID: "getTrendingStickerSets#e058455e", + GetAttachedStickerSetsRequestTypeID: "getAttachedStickerSets#4d9d930d", + GetStickerSetRequestTypeID: "getStickerSet#3eb91bc3", + SearchStickerSetRequestTypeID: "searchStickerSet#45049cee", + SearchInstalledStickerSetsRequestTypeID: "searchInstalledStickerSets#7e5e7fa4", + SearchStickerSetsRequestTypeID: "searchStickerSets#faa066c", + ChangeStickerSetRequestTypeID: "changeStickerSet#1ac8a5ed", + ViewTrendingStickerSetsRequestTypeID: "viewTrendingStickerSets#36d6469", + ReorderInstalledStickerSetsRequestTypeID: "reorderInstalledStickerSets#4a830a78", + GetRecentStickersRequestTypeID: "getRecentStickers#dd73aa9f", + AddRecentStickerRequestTypeID: "addRecentSticker#a7e5d89e", + RemoveRecentStickerRequestTypeID: "removeRecentSticker#4a4d440d", + ClearRecentStickersRequestTypeID: "clearRecentStickers#ecda39c4", + GetFavoriteStickersRequestTypeID: "getFavoriteStickers#ebcbcf40", + AddFavoriteStickerRequestTypeID: "addFavoriteSticker#13578cdf", + RemoveFavoriteStickerRequestTypeID: "removeFavoriteSticker#44b88c70", + GetStickerEmojisRequestTypeID: "getStickerEmojis#8f04d547", + SearchEmojisRequestTypeID: "searchEmojis#d513cd61", + GetKeywordEmojisRequestTypeID: "getKeywordEmojis#7af81263", + GetEmojiCategoriesRequestTypeID: "getEmojiCategories#7f86c16e", + GetAnimatedEmojiRequestTypeID: "getAnimatedEmoji#3f844f76", + GetEmojiSuggestionsURLRequestTypeID: "getEmojiSuggestionsUrl#ac4f1b2f", + GetCustomEmojiStickersRequestTypeID: "getCustomEmojiStickers#a5156885", + GetDefaultChatPhotoCustomEmojiStickersRequestTypeID: "getDefaultChatPhotoCustomEmojiStickers#e9917765", + GetDefaultProfilePhotoCustomEmojiStickersRequestTypeID: "getDefaultProfilePhotoCustomEmojiStickers#4c4be2b7", + GetDefaultBackgroundCustomEmojiStickersRequestTypeID: "getDefaultBackgroundCustomEmojiStickers#1cf6680e", + GetSavedAnimationsRequestTypeID: "getSavedAnimations#6b9718", + AddSavedAnimationRequestTypeID: "addSavedAnimation#a44bf860", + RemoveSavedAnimationRequestTypeID: "removeSavedAnimation#e275a919", + GetRecentInlineBotsRequestTypeID: "getRecentInlineBots#55b3723c", + SearchHashtagsRequestTypeID: "searchHashtags#3e34a571", + RemoveRecentHashtagRequestTypeID: "removeRecentHashtag#c393a0a4", + GetWebPagePreviewRequestTypeID: "getWebPagePreview#a850b8d8", + GetWebPageInstantViewRequestTypeID: "getWebPageInstantView#8b045689", + SetProfilePhotoRequestTypeID: "setProfilePhoto#85ea05ed", + DeleteProfilePhotoRequestTypeID: "deleteProfilePhoto#4eaa77c1", + SetAccentColorRequestTypeID: "setAccentColor#6389cb39", + SetProfileAccentColorRequestTypeID: "setProfileAccentColor#899bc168", + SetNameRequestTypeID: "setName#66065f10", + SetBioRequestTypeID: "setBio#9f772354", + SetUsernameRequestTypeID: "setUsername#1a385c1e", + ToggleUsernameIsActiveRequestTypeID: "toggleUsernameIsActive#4a276de3", + ReorderActiveUsernamesRequestTypeID: "reorderActiveUsernames#c659414f", + SetBirthdateRequestTypeID: "setBirthdate#4ea9dd98", + SetPersonalChatRequestTypeID: "setPersonalChat#c04babb4", + SetEmojiStatusRequestTypeID: "setEmojiStatus#92f83e5d", + SetLocationRequestTypeID: "setLocation#5993371", + SetBusinessLocationRequestTypeID: "setBusinessLocation#eb740715", + SetBusinessOpeningHoursRequestTypeID: "setBusinessOpeningHours#e470a472", + SetBusinessGreetingMessageSettingsRequestTypeID: "setBusinessGreetingMessageSettings#cbf53c3d", + SetBusinessAwayMessageSettingsRequestTypeID: "setBusinessAwayMessageSettings#4974486c", + SetBusinessIntroRequestTypeID: "setBusinessIntro#d2f2e117", + ChangePhoneNumberRequestTypeID: "changePhoneNumber#f891bba3", + ResendChangePhoneNumberCodeRequestTypeID: "resendChangePhoneNumberCode#d11acfa4", + CheckChangePhoneNumberCodeRequestTypeID: "checkChangePhoneNumberCode#9976a263", + GetBusinessConnectedBotRequestTypeID: "getBusinessConnectedBot#364da7c3", + SetBusinessConnectedBotRequestTypeID: "setBusinessConnectedBot#acf17ef0", + DeleteBusinessConnectedBotRequestTypeID: "deleteBusinessConnectedBot#9e9b7e55", + GetUserLinkRequestTypeID: "getUserLink#492014e6", + SearchUserByTokenRequestTypeID: "searchUserByToken#d841f436", + SetCommandsRequestTypeID: "setCommands#b0e0217a", + DeleteCommandsRequestTypeID: "deleteCommands#3bc47c2a", + GetCommandsRequestTypeID: "getCommands#58ba8ff7", + SetMenuButtonRequestTypeID: "setMenuButton#b44fc141", + GetMenuButtonRequestTypeID: "getMenuButton#e5eef440", + SetDefaultGroupAdministratorRightsRequestTypeID: "setDefaultGroupAdministratorRights#65577768", + SetDefaultChannelAdministratorRightsRequestTypeID: "setDefaultChannelAdministratorRights#f20d5e19", + CanBotSendMessagesRequestTypeID: "canBotSendMessages#206d948c", + AllowBotToSendMessagesRequestTypeID: "allowBotToSendMessages#69e9c58e", + SendWebAppCustomRequestRequestTypeID: "sendWebAppCustomRequest#36ff5dc8", + SetBotNameRequestTypeID: "setBotName#d295fa71", + GetBotNameRequestTypeID: "getBotName#9a3f722c", + SetBotProfilePhotoRequestTypeID: "setBotProfilePhoto#bd864b66", + ToggleBotUsernameIsActiveRequestTypeID: "toggleBotUsernameIsActive#79639409", + ReorderBotActiveUsernamesRequestTypeID: "reorderBotActiveUsernames#acadc444", + SetBotInfoDescriptionRequestTypeID: "setBotInfoDescription#29571d48", + GetBotInfoDescriptionRequestTypeID: "getBotInfoDescription#d287f835", + SetBotInfoShortDescriptionRequestTypeID: "setBotInfoShortDescription#3a96bae3", + GetBotInfoShortDescriptionRequestTypeID: "getBotInfoShortDescription#4a1c2614", + GetActiveSessionsRequestTypeID: "getActiveSessions#42bd6d3e", + TerminateSessionRequestTypeID: "terminateSession#e7b7c92c", + TerminateAllOtherSessionsRequestTypeID: "terminateAllOtherSessions#6fba6113", + ConfirmSessionRequestTypeID: "confirmSession#d7c9b41f", + ToggleSessionCanAcceptCallsRequestTypeID: "toggleSessionCanAcceptCalls#6c6c2708", + ToggleSessionCanAcceptSecretChatsRequestTypeID: "toggleSessionCanAcceptSecretChats#3ba7a87e", + SetInactiveSessionTTLRequestTypeID: "setInactiveSessionTtl#5d9ca950", + GetConnectedWebsitesRequestTypeID: "getConnectedWebsites#f5d5d352", + DisconnectWebsiteRequestTypeID: "disconnectWebsite#d194f3dd", + DisconnectAllWebsitesRequestTypeID: "disconnectAllWebsites#bf72f203", + SetSupergroupUsernameRequestTypeID: "setSupergroupUsername#503f4b04", + ToggleSupergroupUsernameIsActiveRequestTypeID: "toggleSupergroupUsernameIsActive#a68b6dff", + DisableAllSupergroupUsernamesRequestTypeID: "disableAllSupergroupUsernames#3246f5b0", + ReorderSupergroupActiveUsernamesRequestTypeID: "reorderSupergroupActiveUsernames#663c7f3b", + SetSupergroupStickerSetRequestTypeID: "setSupergroupStickerSet#856ead69", + SetSupergroupCustomEmojiStickerSetRequestTypeID: "setSupergroupCustomEmojiStickerSet#4f3552af", + SetSupergroupUnrestrictBoostCountRequestTypeID: "setSupergroupUnrestrictBoostCount#39ce30a3", + ToggleSupergroupSignMessagesRequestTypeID: "toggleSupergroupSignMessages#44efd524", + ToggleSupergroupJoinToSendMessagesRequestTypeID: "toggleSupergroupJoinToSendMessages#f5268e0e", + ToggleSupergroupJoinByRequestRequestTypeID: "toggleSupergroupJoinByRequest#7ddf9fde", + ToggleSupergroupIsAllHistoryAvailableRequestTypeID: "toggleSupergroupIsAllHistoryAvailable#44d9964e", + ToggleSupergroupHasHiddenMembersRequestTypeID: "toggleSupergroupHasHiddenMembers#a4559dca", + ToggleSupergroupHasAggressiveAntiSpamEnabledRequestTypeID: "toggleSupergroupHasAggressiveAntiSpamEnabled#683ef70f", + ToggleSupergroupIsForumRequestTypeID: "toggleSupergroupIsForum#966f960a", + ToggleSupergroupIsBroadcastGroupRequestTypeID: "toggleSupergroupIsBroadcastGroup#34b22215", + ReportSupergroupSpamRequestTypeID: "reportSupergroupSpam#383e26f2", + ReportSupergroupAntiSpamFalsePositiveRequestTypeID: "reportSupergroupAntiSpamFalsePositive#e13db048", + GetSupergroupMembersRequestTypeID: "getSupergroupMembers#ddf821c8", + CloseSecretChatRequestTypeID: "closeSecretChat#e3ed044b", + GetChatEventLogRequestTypeID: "getChatEventLog#f47b0a9b", + GetTimeZonesRequestTypeID: "getTimeZones#4fe2e058", + GetPaymentFormRequestTypeID: "getPaymentForm#8d4f76d4", + ValidateOrderInfoRequestTypeID: "validateOrderInfo#b5985fcf", + SendPaymentFormRequestTypeID: "sendPaymentForm#c66e388a", + GetPaymentReceiptRequestTypeID: "getPaymentReceipt#3c6cb956", + GetSavedOrderInfoRequestTypeID: "getSavedOrderInfo#bb559edd", + DeleteSavedOrderInfoRequestTypeID: "deleteSavedOrderInfo#61197474", + DeleteSavedCredentialsRequestTypeID: "deleteSavedCredentials#314056d2", + CreateInvoiceLinkRequestTypeID: "createInvoiceLink#cebe921", + GetSupportUserRequestTypeID: "getSupportUser#98acec9c", + GetBackgroundURLRequestTypeID: "getBackgroundUrl#2bbc6fd2", + SearchBackgroundRequestTypeID: "searchBackground#80fb9121", + SetDefaultBackgroundRequestTypeID: "setDefaultBackground#89d1a8a1", + DeleteDefaultBackgroundRequestTypeID: "deleteDefaultBackground#b2a4ed3e", + GetInstalledBackgroundsRequestTypeID: "getInstalledBackgrounds#c154d05f", + RemoveInstalledBackgroundRequestTypeID: "removeInstalledBackground#5041253c", + ResetInstalledBackgroundsRequestTypeID: "resetInstalledBackgrounds#70540157", + GetLocalizationTargetInfoRequestTypeID: "getLocalizationTargetInfo#6e3d1f86", + GetLanguagePackInfoRequestTypeID: "getLanguagePackInfo#7bd8daa8", + GetLanguagePackStringsRequestTypeID: "getLanguagePackStrings#b0b867bb", + SynchronizeLanguagePackRequestTypeID: "synchronizeLanguagePack#84e5e72e", + AddCustomServerLanguagePackRequestTypeID: "addCustomServerLanguagePack#448de3", + SetCustomLanguagePackRequestTypeID: "setCustomLanguagePack#234b0607", + EditCustomLanguagePackInfoRequestTypeID: "editCustomLanguagePackInfo#4eb91099", + SetCustomLanguagePackStringRequestTypeID: "setCustomLanguagePackString#4e762518", + DeleteLanguagePackRequestTypeID: "deleteLanguagePack#824edc3e", + RegisterDeviceRequestTypeID: "registerDevice#ff140196", + ProcessPushNotificationRequestTypeID: "processPushNotification#2ee3c890", + GetPushReceiverIDRequestTypeID: "getPushReceiverId#eeec46b2", + GetRecentlyVisitedTMeURLsRequestTypeID: "getRecentlyVisitedTMeUrls#30161a91", + SetUserPrivacySettingRulesRequestTypeID: "setUserPrivacySettingRules#e3c230fb", + GetUserPrivacySettingRulesRequestTypeID: "getUserPrivacySettingRules#84301671", + SetReadDatePrivacySettingsRequestTypeID: "setReadDatePrivacySettings#1d7086b6", + GetReadDatePrivacySettingsRequestTypeID: "getReadDatePrivacySettings#1ae85bbb", + SetNewChatPrivacySettingsRequestTypeID: "setNewChatPrivacySettings#69bf374f", + GetNewChatPrivacySettingsRequestTypeID: "getNewChatPrivacySettings#b2cb4bb7", + CanSendMessageToUserRequestTypeID: "canSendMessageToUser#5b2a2836", + GetOptionRequestTypeID: "getOption#a2459e7e", + SetOptionRequestTypeID: "setOption#7e0b4ef2", + SetAccountTTLRequestTypeID: "setAccountTtl#29ce58e8", + GetAccountTTLRequestTypeID: "getAccountTtl#e58a8b77", + DeleteAccountRequestTypeID: "deleteAccount#533276c6", + SetDefaultMessageAutoDeleteTimeRequestTypeID: "setDefaultMessageAutoDeleteTime#965cd36c", + GetDefaultMessageAutoDeleteTimeRequestTypeID: "getDefaultMessageAutoDeleteTime#e520759a", + RemoveChatActionBarRequestTypeID: "removeChatActionBar#9d9839fa", + ReportChatRequestTypeID: "reportChat#d92c3a8a", + ReportChatPhotoRequestTypeID: "reportChatPhoto#d9701288", + ReportMessageReactionsRequestTypeID: "reportMessageReactions#36c88827", + GetChatStatisticsRequestTypeID: "getChatStatistics#137e8198", + GetMessageStatisticsRequestTypeID: "getMessageStatistics#4bb5a1d8", + GetMessagePublicForwardsRequestTypeID: "getMessagePublicForwards#519da4b4", + GetStoryStatisticsRequestTypeID: "getStoryStatistics#3a964342", + GetStatisticalGraphRequestTypeID: "getStatisticalGraph#419f8d9b", + GetStorageStatisticsRequestTypeID: "getStorageStatistics#cd254b37", + GetStorageStatisticsFastRequestTypeID: "getStorageStatisticsFast#3a86702", + GetDatabaseStatisticsRequestTypeID: "getDatabaseStatistics#8c33d4b9", + OptimizeStorageRequestTypeID: "optimizeStorage#ef73c8c5", + SetNetworkTypeRequestTypeID: "setNetworkType#d62de55e", + GetNetworkStatisticsRequestTypeID: "getNetworkStatistics#c537581e", + AddNetworkStatisticsRequestTypeID: "addNetworkStatistics#4b63b3d9", + ResetNetworkStatisticsRequestTypeID: "resetNetworkStatistics#6222dd86", + GetAutoDownloadSettingsPresetsRequestTypeID: "getAutoDownloadSettingsPresets#996a4737", + SetAutoDownloadSettingsRequestTypeID: "setAutoDownloadSettings#eaeb64f4", + GetAutosaveSettingsRequestTypeID: "getAutosaveSettings#7f53f22a", + SetAutosaveSettingsRequestTypeID: "setAutosaveSettings#6878c0", + ClearAutosaveSettingsExceptionsRequestTypeID: "clearAutosaveSettingsExceptions#57ec63f2", + GetBankCardInfoRequestTypeID: "getBankCardInfo#b1e31db0", + GetPassportElementRequestTypeID: "getPassportElement#8fcce17a", + GetAllPassportElementsRequestTypeID: "getAllPassportElements#86782aeb", + SetPassportElementRequestTypeID: "setPassportElement#7b45d19c", + DeletePassportElementRequestTypeID: "deletePassportElement#9981aa74", + SetPassportElementErrorsRequestTypeID: "setPassportElementErrors#80fa80bf", + GetPreferredCountryLanguageRequestTypeID: "getPreferredCountryLanguage#c862cbd6", + SendPhoneNumberVerificationCodeRequestTypeID: "sendPhoneNumberVerificationCode#7c140dcb", + ResendPhoneNumberVerificationCodeRequestTypeID: "resendPhoneNumberVerificationCode#51845ffc", + CheckPhoneNumberVerificationCodeRequestTypeID: "checkPhoneNumberVerificationCode#594177be", + SendEmailAddressVerificationCodeRequestTypeID: "sendEmailAddressVerificationCode#f2ca537d", + ResendEmailAddressVerificationCodeRequestTypeID: "resendEmailAddressVerificationCode#90653024", + CheckEmailAddressVerificationCodeRequestTypeID: "checkEmailAddressVerificationCode#e695db03", + GetPassportAuthorizationFormRequestTypeID: "getPassportAuthorizationForm#61850486", + GetPassportAuthorizationFormAvailableElementsRequestTypeID: "getPassportAuthorizationFormAvailableElements#3fb314fc", + SendPassportAuthorizationFormRequestTypeID: "sendPassportAuthorizationForm#d9c77579", + SendPhoneNumberConfirmationCodeRequestTypeID: "sendPhoneNumberConfirmationCode#8eae6cd9", + ResendPhoneNumberConfirmationCodeRequestTypeID: "resendPhoneNumberConfirmationCode#7b537aea", + CheckPhoneNumberConfirmationCodeRequestTypeID: "checkPhoneNumberConfirmationCode#afa638da", + SetBotUpdatesStatusRequestTypeID: "setBotUpdatesStatus#bb293991", + UploadStickerFileRequestTypeID: "uploadStickerFile#269650c3", + GetSuggestedStickerSetNameRequestTypeID: "getSuggestedStickerSetName#b0120840", + CheckStickerSetNameRequestTypeID: "checkStickerSetName#955808fe", + CreateNewStickerSetRequestTypeID: "createNewStickerSet#87fd8611", + AddStickerToSetRequestTypeID: "addStickerToSet#56dc1e3b", + ReplaceStickerInSetRequestTypeID: "replaceStickerInSet#e7c82e19", + SetStickerSetThumbnailRequestTypeID: "setStickerSetThumbnail#63fe6932", + SetCustomEmojiStickerSetThumbnailRequestTypeID: "setCustomEmojiStickerSetThumbnail#bd12e0ea", + SetStickerSetTitleRequestTypeID: "setStickerSetTitle#64e933a2", + DeleteStickerSetRequestTypeID: "deleteStickerSet#5e0a7bad", + SetStickerPositionInSetRequestTypeID: "setStickerPositionInSet#7bb24721", + RemoveStickerFromSetRequestTypeID: "removeStickerFromSet#61e1eea4", + SetStickerEmojisRequestTypeID: "setStickerEmojis#d9ec0431", + SetStickerKeywordsRequestTypeID: "setStickerKeywords#462481d", + SetStickerMaskPositionRequestTypeID: "setStickerMaskPosition#47a959d0", + GetOwnedStickerSetsRequestTypeID: "getOwnedStickerSets#58fe8120", + GetMapThumbnailFileRequestTypeID: "getMapThumbnailFile#f6e6979a", + GetPremiumLimitRequestTypeID: "getPremiumLimit#4017fcea", + GetPremiumFeaturesRequestTypeID: "getPremiumFeatures#b4dc2649", + GetPremiumStickerExamplesRequestTypeID: "getPremiumStickerExamples#5369cb98", + ViewPremiumFeatureRequestTypeID: "viewPremiumFeature#b8031b2", + ClickPremiumSubscriptionButtonRequestTypeID: "clickPremiumSubscriptionButton#e9fca306", + GetPremiumStateRequestTypeID: "getPremiumState#278e3ae2", + GetPremiumGiftCodePaymentOptionsRequestTypeID: "getPremiumGiftCodePaymentOptions#89523a2c", + CheckPremiumGiftCodeRequestTypeID: "checkPremiumGiftCode#958ad664", + ApplyPremiumGiftCodeRequestTypeID: "applyPremiumGiftCode#afb44c1e", + LaunchPrepaidPremiumGiveawayRequestTypeID: "launchPrepaidPremiumGiveaway#5328fea1", + GetPremiumGiveawayInfoRequestTypeID: "getPremiumGiveawayInfo#6adb7b97", + CanPurchasePremiumRequestTypeID: "canPurchasePremium#e9de1cc0", + AssignAppStoreTransactionRequestTypeID: "assignAppStoreTransaction#86f30bb0", + AssignGooglePlayTransactionRequestTypeID: "assignGooglePlayTransaction#8939bca4", + GetBusinessFeaturesRequestTypeID: "getBusinessFeatures#c4906001", + AcceptTermsOfServiceRequestTypeID: "acceptTermsOfService#7efe03e4", + SearchStringsByPrefixRequestTypeID: "searchStringsByPrefix#a8145813", + SendCustomRequestRequestTypeID: "sendCustomRequest#10fd71a1", + AnswerCustomQueryRequestTypeID: "answerCustomQuery#b2e52d3f", + SetAlarmRequestTypeID: "setAlarm#cbef7e15", + GetCountriesRequestTypeID: "getCountries#fce8099e", + GetCountryCodeRequestTypeID: "getCountryCode#5bd398f2", + GetPhoneNumberInfoRequestTypeID: "getPhoneNumberInfo#a0229bf9", + GetPhoneNumberInfoSyncRequestTypeID: "getPhoneNumberInfoSync#209b7d38", + GetCollectibleItemInfoRequestTypeID: "getCollectibleItemInfo#f304ad8a", + GetDeepLinkInfoRequestTypeID: "getDeepLinkInfo#28923f7e", + GetApplicationConfigRequestTypeID: "getApplicationConfig#93550682", + SaveApplicationLogEventRequestTypeID: "saveApplicationLogEvent#cfa6c20e", + GetApplicationDownloadLinkRequestTypeID: "getApplicationDownloadLink#6ad2fc4", + AddProxyRequestTypeID: "addProxy#13c2bcd8", + EditProxyRequestTypeID: "editProxy#a0482853", + EnableProxyRequestTypeID: "enableProxy#59138296", + DisableProxyRequestTypeID: "disableProxy#82d31782", + RemoveProxyRequestTypeID: "removeProxy#519ca307", + GetProxiesRequestTypeID: "getProxies#fa560333", + GetProxyLinkRequestTypeID: "getProxyLink#c125ae78", + PingProxyRequestTypeID: "pingProxy#c59b40b1", + SetLogStreamRequestTypeID: "setLogStream#aeaff791", + GetLogStreamRequestTypeID: "getLogStream#45984b5b", + SetLogVerbosityLevelRequestTypeID: "setLogVerbosityLevel#edea07d2", + GetLogVerbosityLevelRequestTypeID: "getLogVerbosityLevel#23689ae4", + GetLogTagsRequestTypeID: "getLogTags#f0d569da", + SetLogTagVerbosityLevelRequestTypeID: "setLogTagVerbosityLevel#8317d696", + GetLogTagVerbosityLevelRequestTypeID: "getLogTagVerbosityLevel#38af2d83", + AddLogMessageRequestTypeID: "addLogMessage#5f36cfec", + GetUserSupportInfoRequestTypeID: "getUserSupportInfo#74a59305", + SetUserSupportInfoRequestTypeID: "setUserSupportInfo#837c9803", + GetSupportNameRequestTypeID: "getSupportName#4d9e1562", + TestCallEmptyRequestTypeID: "testCallEmpty#da9c4a16", + TestCallStringRequestTypeID: "testCallString#98b74a2f", + TestCallBytesRequestTypeID: "testCallBytes#d4215aa9", + TestCallVectorIntRequestTypeID: "testCallVectorInt#65ed7e72", + TestCallVectorIntObjectRequestTypeID: "testCallVectorIntObject#ca57f472", + TestCallVectorStringRequestTypeID: "testCallVectorString#8e5a6ed8", + TestCallVectorStringObjectRequestTypeID: "testCallVectorStringObject#96cd6de", + TestSquareIntRequestTypeID: "testSquareInt#fc6a6990", + TestNetworkRequestTypeID: "testNetwork#afe4344b", + TestProxyRequestTypeID: "testProxy#b8a1a29e", + TestGetDifferenceRequestTypeID: "testGetDifference#68226325", + TestUseUpdateRequestTypeID: "testUseUpdate#2abdff1e", + TestReturnErrorRequestTypeID: "testReturnError#1b217cf2", } } @@ -2282,6 +2335,8 @@ func NamesMap() map[string]uint32 { "botCommands": BotCommandsTypeID, "botMenuButton": BotMenuButtonTypeID, "chatLocation": ChatLocationTypeID, + "birthdate": BirthdateTypeID, + "closeBirthdayUser": CloseBirthdayUserTypeID, "businessAwayMessageScheduleAlways": BusinessAwayMessageScheduleAlwaysTypeID, "businessAwayMessageScheduleOutsideOfOpeningHours": BusinessAwayMessageScheduleOutsideOfOpeningHoursTypeID, "businessAwayMessageScheduleCustom": BusinessAwayMessageScheduleCustomTypeID, @@ -2290,6 +2345,8 @@ func NamesMap() map[string]uint32 { "businessAwayMessageSettings": BusinessAwayMessageSettingsTypeID, "businessGreetingMessageSettings": BusinessGreetingMessageSettingsTypeID, "businessConnectedBot": BusinessConnectedBotTypeID, + "businessIntro": BusinessIntroTypeID, + "inputBusinessIntro": InputBusinessIntroTypeID, "businessOpeningHoursInterval": BusinessOpeningHoursIntervalTypeID, "businessOpeningHours": BusinessOpeningHoursTypeID, "businessInfo": BusinessInfoTypeID, @@ -2415,6 +2472,8 @@ func NamesMap() map[string]uint32 { "messagePositions": MessagePositionsTypeID, "messageCalendarDay": MessageCalendarDayTypeID, "messageCalendar": MessageCalendarTypeID, + "businessMessage": BusinessMessageTypeID, + "businessMessages": BusinessMessagesTypeID, "messageSourceChatHistory": MessageSourceChatHistoryTypeID, "messageSourceMessageThreadHistory": MessageSourceMessageThreadHistoryTypeID, "messageSourceForumTopicHistory": MessageSourceForumTopicHistoryTypeID, @@ -2433,6 +2492,12 @@ func NamesMap() map[string]uint32 { "messageSponsor": MessageSponsorTypeID, "sponsoredMessage": SponsoredMessageTypeID, "sponsoredMessages": SponsoredMessagesTypeID, + "reportChatSponsoredMessageOption": ReportChatSponsoredMessageOptionTypeID, + "reportChatSponsoredMessageResultOk": ReportChatSponsoredMessageResultOkTypeID, + "reportChatSponsoredMessageResultFailed": ReportChatSponsoredMessageResultFailedTypeID, + "reportChatSponsoredMessageResultOptionRequired": ReportChatSponsoredMessageResultOptionRequiredTypeID, + "reportChatSponsoredMessageResultAdsHidden": ReportChatSponsoredMessageResultAdsHiddenTypeID, + "reportChatSponsoredMessageResultPremiumRequired": ReportChatSponsoredMessageResultPremiumRequiredTypeID, "fileDownload": FileDownloadTypeID, "downloadedFileCounts": DownloadedFileCountsTypeID, "foundFileDownloads": FoundFileDownloadsTypeID, @@ -2516,6 +2581,8 @@ func NamesMap() map[string]uint32 { "forumTopic": ForumTopicTypeID, "forumTopics": ForumTopicsTypeID, "linkPreviewOptions": LinkPreviewOptionsTypeID, + "sharedUser": SharedUserTypeID, + "sharedChat": SharedChatTypeID, "richTextPlain": RichTextPlainTypeID, "richTextBold": RichTextBoldTypeID, "richTextItalic": RichTextItalicTypeID, @@ -2577,6 +2644,9 @@ func NamesMap() map[string]uint32 { "countryInfo": CountryInfoTypeID, "countries": CountriesTypeID, "phoneNumberInfo": PhoneNumberInfoTypeID, + "collectibleItemTypeUsername": CollectibleItemTypeUsernameTypeID, + "collectibleItemTypePhoneNumber": CollectibleItemTypePhoneNumberTypeID, + "collectibleItemInfo": CollectibleItemInfoTypeID, "bankCardActionOpenUrl": BankCardActionOpenURLTypeID, "bankCardInfo": BankCardInfoTypeID, "address": AddressTypeID, @@ -2951,6 +3021,7 @@ func NamesMap() map[string]uint32 { "speechRecognitionResultPending": SpeechRecognitionResultPendingTypeID, "speechRecognitionResultText": SpeechRecognitionResultTextTypeID, "speechRecognitionResultError": SpeechRecognitionResultErrorTypeID, + "businessConnection": BusinessConnectionTypeID, "attachmentMenuBotColor": AttachmentMenuBotColorTypeID, "attachmentMenuBot": AttachmentMenuBotTypeID, "sentWebAppMessage": SentWebAppMessageTypeID, @@ -3095,6 +3166,18 @@ func NamesMap() map[string]uint32 { "premiumFeatureSavedMessagesTags": PremiumFeatureSavedMessagesTagsTypeID, "premiumFeatureMessagePrivacy": PremiumFeatureMessagePrivacyTypeID, "premiumFeatureLastSeenTimes": PremiumFeatureLastSeenTimesTypeID, + "premiumFeatureBusiness": PremiumFeatureBusinessTypeID, + "businessFeatureLocation": BusinessFeatureLocationTypeID, + "businessFeatureOpeningHours": BusinessFeatureOpeningHoursTypeID, + "businessFeatureQuickReplies": BusinessFeatureQuickRepliesTypeID, + "businessFeatureGreetingMessage": BusinessFeatureGreetingMessageTypeID, + "businessFeatureAwayMessage": BusinessFeatureAwayMessageTypeID, + "businessFeatureAccountLinks": BusinessFeatureAccountLinksTypeID, + "businessFeatureIntro": BusinessFeatureIntroTypeID, + "businessFeatureBots": BusinessFeatureBotsTypeID, + "businessFeatureEmojiStatus": BusinessFeatureEmojiStatusTypeID, + "businessFeatureChatFolderTags": BusinessFeatureChatFolderTagsTypeID, + "businessFeatureUpgradedStories": BusinessFeatureUpgradedStoriesTypeID, "premiumStoryFeaturePriorityOrder": PremiumStoryFeaturePriorityOrderTypeID, "premiumStoryFeatureStealthMode": PremiumStoryFeatureStealthModeTypeID, "premiumStoryFeaturePermanentViewsHistory": PremiumStoryFeaturePermanentViewsHistoryTypeID, @@ -3104,12 +3187,15 @@ func NamesMap() map[string]uint32 { "premiumStoryFeatureVideoQuality": PremiumStoryFeatureVideoQualityTypeID, "premiumLimit": PremiumLimitTypeID, "premiumFeatures": PremiumFeaturesTypeID, + "businessFeatures": BusinessFeaturesTypeID, "premiumSourceLimitExceeded": PremiumSourceLimitExceededTypeID, "premiumSourceFeature": PremiumSourceFeatureTypeID, + "premiumSourceBusinessFeature": PremiumSourceBusinessFeatureTypeID, "premiumSourceStoryFeature": PremiumSourceStoryFeatureTypeID, "premiumSourceLink": PremiumSourceLinkTypeID, "premiumSourceSettings": PremiumSourceSettingsTypeID, "premiumFeaturePromotionAnimation": PremiumFeaturePromotionAnimationTypeID, + "businessFeaturePromotionAnimation": BusinessFeaturePromotionAnimationTypeID, "premiumState": PremiumStateTypeID, "storePaymentPurposePremiumSubscription": StorePaymentPurposePremiumSubscriptionTypeID, "storePaymentPurposeGiftedPremium": StorePaymentPurposeGiftedPremiumTypeID, @@ -3233,6 +3319,7 @@ func NamesMap() map[string]uint32 { "storyPrivacySettingsSelectedUsers": StoryPrivacySettingsSelectedUsersTypeID, "userPrivacySettingRuleAllowAll": UserPrivacySettingRuleAllowAllTypeID, "userPrivacySettingRuleAllowContacts": UserPrivacySettingRuleAllowContactsTypeID, + "userPrivacySettingRuleAllowPremiumUsers": UserPrivacySettingRuleAllowPremiumUsersTypeID, "userPrivacySettingRuleAllowUsers": UserPrivacySettingRuleAllowUsersTypeID, "userPrivacySettingRuleAllowChatMembers": UserPrivacySettingRuleAllowChatMembersTypeID, "userPrivacySettingRuleRestrictAll": UserPrivacySettingRuleRestrictAllTypeID, @@ -3245,6 +3332,7 @@ func NamesMap() map[string]uint32 { "userPrivacySettingShowLinkInForwardedMessages": UserPrivacySettingShowLinkInForwardedMessagesTypeID, "userPrivacySettingShowPhoneNumber": UserPrivacySettingShowPhoneNumberTypeID, "userPrivacySettingShowBio": UserPrivacySettingShowBioTypeID, + "userPrivacySettingShowBirthdate": UserPrivacySettingShowBirthdateTypeID, "userPrivacySettingAllowChatInvites": UserPrivacySettingAllowChatInvitesTypeID, "userPrivacySettingAllowCalls": UserPrivacySettingAllowCallsTypeID, "userPrivacySettingAllowPeerToPeerCalls": UserPrivacySettingAllowPeerToPeerCallsTypeID, @@ -3413,6 +3501,7 @@ func NamesMap() map[string]uint32 { "suggestedActionRestorePremium": SuggestedActionRestorePremiumTypeID, "suggestedActionSubscribeToAnnualPremium": SuggestedActionSubscribeToAnnualPremiumTypeID, "suggestedActionGiftPremiumForChristmas": SuggestedActionGiftPremiumForChristmasTypeID, + "suggestedActionSetBirthdate": SuggestedActionSetBirthdateTypeID, "count": CountTypeID, "text": TextTypeID, "seconds": SecondsTypeID, @@ -3569,8 +3658,13 @@ func NamesMap() map[string]uint32 { "updateAnimatedEmojiMessageClicked": UpdateAnimatedEmojiMessageClickedTypeID, "updateAnimationSearchParameters": UpdateAnimationSearchParametersTypeID, "updateSuggestedActions": UpdateSuggestedActionsTypeID, + "updateContactCloseBirthdays": UpdateContactCloseBirthdaysTypeID, "updateAddChatMembersPrivacyForbidden": UpdateAddChatMembersPrivacyForbiddenTypeID, "updateAutosaveSettings": UpdateAutosaveSettingsTypeID, + "updateBusinessConnection": UpdateBusinessConnectionTypeID, + "updateNewBusinessMessage": UpdateNewBusinessMessageTypeID, + "updateBusinessMessageEdited": UpdateBusinessMessageEditedTypeID, + "updateBusinessMessagesDeleted": UpdateBusinessMessagesDeletedTypeID, "updateNewInlineQuery": UpdateNewInlineQueryTypeID, "updateNewChosenInlineResult": UpdateNewChosenInlineResultTypeID, "updateNewCallbackQuery": UpdateNewCallbackQueryTypeID, @@ -3681,6 +3775,7 @@ func NamesMap() map[string]uint32 { "checkCreatedPublicChatsLimit": CheckCreatedPublicChatsLimitRequestTypeID, "getSuitableDiscussionChats": GetSuitableDiscussionChatsRequestTypeID, "getInactiveSupergroupChats": GetInactiveSupergroupChatsRequestTypeID, + "getSuitablePersonalChats": GetSuitablePersonalChatsRequestTypeID, "loadSavedMessagesTopics": LoadSavedMessagesTopicsRequestTypeID, "getSavedMessagesTopicHistory": GetSavedMessagesTopicHistoryRequestTypeID, "getSavedMessagesTopicMessageByDate": GetSavedMessagesTopicMessageByDateRequestTypeID, @@ -3710,6 +3805,7 @@ func NamesMap() map[string]uint32 { "getChatScheduledMessages": GetChatScheduledMessagesRequestTypeID, "getChatSponsoredMessages": GetChatSponsoredMessagesRequestTypeID, "clickChatSponsoredMessage": ClickChatSponsoredMessageRequestTypeID, + "reportChatSponsoredMessage": ReportChatSponsoredMessageRequestTypeID, "removeNotification": RemoveNotificationRequestTypeID, "removeNotificationGroup": RemoveNotificationGroupRequestTypeID, "getMessageLink": GetMessageLinkRequestTypeID, @@ -3743,6 +3839,8 @@ func NamesMap() map[string]uint32 { "editInlineMessageCaption": EditInlineMessageCaptionRequestTypeID, "editInlineMessageReplyMarkup": EditInlineMessageReplyMarkupRequestTypeID, "editMessageSchedulingState": EditMessageSchedulingStateRequestTypeID, + "sendBusinessMessage": SendBusinessMessageRequestTypeID, + "sendBusinessMessageAlbum": SendBusinessMessageAlbumRequestTypeID, "checkQuickReplyShortcutName": CheckQuickReplyShortcutNameRequestTypeID, "loadQuickReplyShortcuts": LoadQuickReplyShortcutsRequestTypeID, "setQuickReplyShortcutName": SetQuickReplyShortcutNameRequestTypeID, @@ -3790,6 +3888,7 @@ func NamesMap() map[string]uint32 { "getPollVoters": GetPollVotersRequestTypeID, "stopPoll": StopPollRequestTypeID, "hideSuggestedAction": HideSuggestedActionRequestTypeID, + "getBusinessConnection": GetBusinessConnectionRequestTypeID, "getLoginUrlInfo": GetLoginURLInfoRequestTypeID, "getLoginUrl": GetLoginURLRequestTypeID, "shareUsersWithBot": ShareUsersWithBotRequestTypeID, @@ -4087,12 +4186,15 @@ func NamesMap() map[string]uint32 { "setUsername": SetUsernameRequestTypeID, "toggleUsernameIsActive": ToggleUsernameIsActiveRequestTypeID, "reorderActiveUsernames": ReorderActiveUsernamesRequestTypeID, + "setBirthdate": SetBirthdateRequestTypeID, + "setPersonalChat": SetPersonalChatRequestTypeID, "setEmojiStatus": SetEmojiStatusRequestTypeID, "setLocation": SetLocationRequestTypeID, "setBusinessLocation": SetBusinessLocationRequestTypeID, "setBusinessOpeningHours": SetBusinessOpeningHoursRequestTypeID, "setBusinessGreetingMessageSettings": SetBusinessGreetingMessageSettingsRequestTypeID, "setBusinessAwayMessageSettings": SetBusinessAwayMessageSettingsRequestTypeID, + "setBusinessIntro": SetBusinessIntroRequestTypeID, "changePhoneNumber": ChangePhoneNumberRequestTypeID, "resendChangePhoneNumberCode": ResendChangePhoneNumberCodeRequestTypeID, "checkChangePhoneNumberCode": CheckChangePhoneNumberCodeRequestTypeID, @@ -4241,6 +4343,7 @@ func NamesMap() map[string]uint32 { "checkStickerSetName": CheckStickerSetNameRequestTypeID, "createNewStickerSet": CreateNewStickerSetRequestTypeID, "addStickerToSet": AddStickerToSetRequestTypeID, + "replaceStickerInSet": ReplaceStickerInSetRequestTypeID, "setStickerSetThumbnail": SetStickerSetThumbnailRequestTypeID, "setCustomEmojiStickerSetThumbnail": SetCustomEmojiStickerSetThumbnailRequestTypeID, "setStickerSetTitle": SetStickerSetTitleRequestTypeID, @@ -4250,6 +4353,7 @@ func NamesMap() map[string]uint32 { "setStickerEmojis": SetStickerEmojisRequestTypeID, "setStickerKeywords": SetStickerKeywordsRequestTypeID, "setStickerMaskPosition": SetStickerMaskPositionRequestTypeID, + "getOwnedStickerSets": GetOwnedStickerSetsRequestTypeID, "getMapThumbnailFile": GetMapThumbnailFileRequestTypeID, "getPremiumLimit": GetPremiumLimitRequestTypeID, "getPremiumFeatures": GetPremiumFeaturesRequestTypeID, @@ -4265,6 +4369,7 @@ func NamesMap() map[string]uint32 { "canPurchasePremium": CanPurchasePremiumRequestTypeID, "assignAppStoreTransaction": AssignAppStoreTransactionRequestTypeID, "assignGooglePlayTransaction": AssignGooglePlayTransactionRequestTypeID, + "getBusinessFeatures": GetBusinessFeaturesRequestTypeID, "acceptTermsOfService": AcceptTermsOfServiceRequestTypeID, "searchStringsByPrefix": SearchStringsByPrefixRequestTypeID, "sendCustomRequest": SendCustomRequestRequestTypeID, @@ -4274,6 +4379,7 @@ func NamesMap() map[string]uint32 { "getCountryCode": GetCountryCodeRequestTypeID, "getPhoneNumberInfo": GetPhoneNumberInfoRequestTypeID, "getPhoneNumberInfoSync": GetPhoneNumberInfoSyncRequestTypeID, + "getCollectibleItemInfo": GetCollectibleItemInfoRequestTypeID, "getDeepLinkInfo": GetDeepLinkInfoRequestTypeID, "getApplicationConfig": GetApplicationConfigRequestTypeID, "saveApplicationLogEvent": SaveApplicationLogEventRequestTypeID, @@ -4423,6 +4529,8 @@ func TypesConstructorMap() map[uint32]func() bin.Object { BotCommandsTypeID: func() bin.Object { return &BotCommands{} }, BotMenuButtonTypeID: func() bin.Object { return &BotMenuButton{} }, ChatLocationTypeID: func() bin.Object { return &ChatLocation{} }, + BirthdateTypeID: func() bin.Object { return &Birthdate{} }, + CloseBirthdayUserTypeID: func() bin.Object { return &CloseBirthdayUser{} }, BusinessAwayMessageScheduleAlwaysTypeID: func() bin.Object { return &BusinessAwayMessageScheduleAlways{} }, BusinessAwayMessageScheduleOutsideOfOpeningHoursTypeID: func() bin.Object { return &BusinessAwayMessageScheduleOutsideOfOpeningHours{} }, BusinessAwayMessageScheduleCustomTypeID: func() bin.Object { return &BusinessAwayMessageScheduleCustom{} }, @@ -4431,6 +4539,8 @@ func TypesConstructorMap() map[uint32]func() bin.Object { BusinessAwayMessageSettingsTypeID: func() bin.Object { return &BusinessAwayMessageSettings{} }, BusinessGreetingMessageSettingsTypeID: func() bin.Object { return &BusinessGreetingMessageSettings{} }, BusinessConnectedBotTypeID: func() bin.Object { return &BusinessConnectedBot{} }, + BusinessIntroTypeID: func() bin.Object { return &BusinessIntro{} }, + InputBusinessIntroTypeID: func() bin.Object { return &InputBusinessIntro{} }, BusinessOpeningHoursIntervalTypeID: func() bin.Object { return &BusinessOpeningHoursInterval{} }, BusinessOpeningHoursTypeID: func() bin.Object { return &BusinessOpeningHours{} }, BusinessInfoTypeID: func() bin.Object { return &BusinessInfo{} }, @@ -4556,6 +4666,8 @@ func TypesConstructorMap() map[uint32]func() bin.Object { MessagePositionsTypeID: func() bin.Object { return &MessagePositions{} }, MessageCalendarDayTypeID: func() bin.Object { return &MessageCalendarDay{} }, MessageCalendarTypeID: func() bin.Object { return &MessageCalendar{} }, + BusinessMessageTypeID: func() bin.Object { return &BusinessMessage{} }, + BusinessMessagesTypeID: func() bin.Object { return &BusinessMessages{} }, MessageSourceChatHistoryTypeID: func() bin.Object { return &MessageSourceChatHistory{} }, MessageSourceMessageThreadHistoryTypeID: func() bin.Object { return &MessageSourceMessageThreadHistory{} }, MessageSourceForumTopicHistoryTypeID: func() bin.Object { return &MessageSourceForumTopicHistory{} }, @@ -4574,6 +4686,12 @@ func TypesConstructorMap() map[uint32]func() bin.Object { MessageSponsorTypeID: func() bin.Object { return &MessageSponsor{} }, SponsoredMessageTypeID: func() bin.Object { return &SponsoredMessage{} }, SponsoredMessagesTypeID: func() bin.Object { return &SponsoredMessages{} }, + ReportChatSponsoredMessageOptionTypeID: func() bin.Object { return &ReportChatSponsoredMessageOption{} }, + ReportChatSponsoredMessageResultOkTypeID: func() bin.Object { return &ReportChatSponsoredMessageResultOk{} }, + ReportChatSponsoredMessageResultFailedTypeID: func() bin.Object { return &ReportChatSponsoredMessageResultFailed{} }, + ReportChatSponsoredMessageResultOptionRequiredTypeID: func() bin.Object { return &ReportChatSponsoredMessageResultOptionRequired{} }, + ReportChatSponsoredMessageResultAdsHiddenTypeID: func() bin.Object { return &ReportChatSponsoredMessageResultAdsHidden{} }, + ReportChatSponsoredMessageResultPremiumRequiredTypeID: func() bin.Object { return &ReportChatSponsoredMessageResultPremiumRequired{} }, FileDownloadTypeID: func() bin.Object { return &FileDownload{} }, DownloadedFileCountsTypeID: func() bin.Object { return &DownloadedFileCounts{} }, FoundFileDownloadsTypeID: func() bin.Object { return &FoundFileDownloads{} }, @@ -4657,6 +4775,8 @@ func TypesConstructorMap() map[uint32]func() bin.Object { ForumTopicTypeID: func() bin.Object { return &ForumTopic{} }, ForumTopicsTypeID: func() bin.Object { return &ForumTopics{} }, LinkPreviewOptionsTypeID: func() bin.Object { return &LinkPreviewOptions{} }, + SharedUserTypeID: func() bin.Object { return &SharedUser{} }, + SharedChatTypeID: func() bin.Object { return &SharedChat{} }, RichTextPlainTypeID: func() bin.Object { return &RichTextPlain{} }, RichTextBoldTypeID: func() bin.Object { return &RichTextBold{} }, RichTextItalicTypeID: func() bin.Object { return &RichTextItalic{} }, @@ -4718,6 +4838,9 @@ func TypesConstructorMap() map[uint32]func() bin.Object { CountryInfoTypeID: func() bin.Object { return &CountryInfo{} }, CountriesTypeID: func() bin.Object { return &Countries{} }, PhoneNumberInfoTypeID: func() bin.Object { return &PhoneNumberInfo{} }, + CollectibleItemTypeUsernameTypeID: func() bin.Object { return &CollectibleItemTypeUsername{} }, + CollectibleItemTypePhoneNumberTypeID: func() bin.Object { return &CollectibleItemTypePhoneNumber{} }, + CollectibleItemInfoTypeID: func() bin.Object { return &CollectibleItemInfo{} }, BankCardActionOpenURLTypeID: func() bin.Object { return &BankCardActionOpenURL{} }, BankCardInfoTypeID: func() bin.Object { return &BankCardInfo{} }, AddressTypeID: func() bin.Object { return &Address{} }, @@ -5092,6 +5215,7 @@ func TypesConstructorMap() map[uint32]func() bin.Object { SpeechRecognitionResultPendingTypeID: func() bin.Object { return &SpeechRecognitionResultPending{} }, SpeechRecognitionResultTextTypeID: func() bin.Object { return &SpeechRecognitionResultText{} }, SpeechRecognitionResultErrorTypeID: func() bin.Object { return &SpeechRecognitionResultError{} }, + BusinessConnectionTypeID: func() bin.Object { return &BusinessConnection{} }, AttachmentMenuBotColorTypeID: func() bin.Object { return &AttachmentMenuBotColor{} }, AttachmentMenuBotTypeID: func() bin.Object { return &AttachmentMenuBot{} }, SentWebAppMessageTypeID: func() bin.Object { return &SentWebAppMessage{} }, @@ -5236,6 +5360,18 @@ func TypesConstructorMap() map[uint32]func() bin.Object { PremiumFeatureSavedMessagesTagsTypeID: func() bin.Object { return &PremiumFeatureSavedMessagesTags{} }, PremiumFeatureMessagePrivacyTypeID: func() bin.Object { return &PremiumFeatureMessagePrivacy{} }, PremiumFeatureLastSeenTimesTypeID: func() bin.Object { return &PremiumFeatureLastSeenTimes{} }, + PremiumFeatureBusinessTypeID: func() bin.Object { return &PremiumFeatureBusiness{} }, + BusinessFeatureLocationTypeID: func() bin.Object { return &BusinessFeatureLocation{} }, + BusinessFeatureOpeningHoursTypeID: func() bin.Object { return &BusinessFeatureOpeningHours{} }, + BusinessFeatureQuickRepliesTypeID: func() bin.Object { return &BusinessFeatureQuickReplies{} }, + BusinessFeatureGreetingMessageTypeID: func() bin.Object { return &BusinessFeatureGreetingMessage{} }, + BusinessFeatureAwayMessageTypeID: func() bin.Object { return &BusinessFeatureAwayMessage{} }, + BusinessFeatureAccountLinksTypeID: func() bin.Object { return &BusinessFeatureAccountLinks{} }, + BusinessFeatureIntroTypeID: func() bin.Object { return &BusinessFeatureIntro{} }, + BusinessFeatureBotsTypeID: func() bin.Object { return &BusinessFeatureBots{} }, + BusinessFeatureEmojiStatusTypeID: func() bin.Object { return &BusinessFeatureEmojiStatus{} }, + BusinessFeatureChatFolderTagsTypeID: func() bin.Object { return &BusinessFeatureChatFolderTags{} }, + BusinessFeatureUpgradedStoriesTypeID: func() bin.Object { return &BusinessFeatureUpgradedStories{} }, PremiumStoryFeaturePriorityOrderTypeID: func() bin.Object { return &PremiumStoryFeaturePriorityOrder{} }, PremiumStoryFeatureStealthModeTypeID: func() bin.Object { return &PremiumStoryFeatureStealthMode{} }, PremiumStoryFeaturePermanentViewsHistoryTypeID: func() bin.Object { return &PremiumStoryFeaturePermanentViewsHistory{} }, @@ -5245,12 +5381,15 @@ func TypesConstructorMap() map[uint32]func() bin.Object { PremiumStoryFeatureVideoQualityTypeID: func() bin.Object { return &PremiumStoryFeatureVideoQuality{} }, PremiumLimitTypeID: func() bin.Object { return &PremiumLimit{} }, PremiumFeaturesTypeID: func() bin.Object { return &PremiumFeatures{} }, + BusinessFeaturesTypeID: func() bin.Object { return &BusinessFeatures{} }, PremiumSourceLimitExceededTypeID: func() bin.Object { return &PremiumSourceLimitExceeded{} }, PremiumSourceFeatureTypeID: func() bin.Object { return &PremiumSourceFeature{} }, + PremiumSourceBusinessFeatureTypeID: func() bin.Object { return &PremiumSourceBusinessFeature{} }, PremiumSourceStoryFeatureTypeID: func() bin.Object { return &PremiumSourceStoryFeature{} }, PremiumSourceLinkTypeID: func() bin.Object { return &PremiumSourceLink{} }, PremiumSourceSettingsTypeID: func() bin.Object { return &PremiumSourceSettings{} }, PremiumFeaturePromotionAnimationTypeID: func() bin.Object { return &PremiumFeaturePromotionAnimation{} }, + BusinessFeaturePromotionAnimationTypeID: func() bin.Object { return &BusinessFeaturePromotionAnimation{} }, PremiumStateTypeID: func() bin.Object { return &PremiumState{} }, StorePaymentPurposePremiumSubscriptionTypeID: func() bin.Object { return &StorePaymentPurposePremiumSubscription{} }, StorePaymentPurposeGiftedPremiumTypeID: func() bin.Object { return &StorePaymentPurposeGiftedPremium{} }, @@ -5374,6 +5513,7 @@ func TypesConstructorMap() map[uint32]func() bin.Object { StoryPrivacySettingsSelectedUsersTypeID: func() bin.Object { return &StoryPrivacySettingsSelectedUsers{} }, UserPrivacySettingRuleAllowAllTypeID: func() bin.Object { return &UserPrivacySettingRuleAllowAll{} }, UserPrivacySettingRuleAllowContactsTypeID: func() bin.Object { return &UserPrivacySettingRuleAllowContacts{} }, + UserPrivacySettingRuleAllowPremiumUsersTypeID: func() bin.Object { return &UserPrivacySettingRuleAllowPremiumUsers{} }, UserPrivacySettingRuleAllowUsersTypeID: func() bin.Object { return &UserPrivacySettingRuleAllowUsers{} }, UserPrivacySettingRuleAllowChatMembersTypeID: func() bin.Object { return &UserPrivacySettingRuleAllowChatMembers{} }, UserPrivacySettingRuleRestrictAllTypeID: func() bin.Object { return &UserPrivacySettingRuleRestrictAll{} }, @@ -5386,6 +5526,7 @@ func TypesConstructorMap() map[uint32]func() bin.Object { UserPrivacySettingShowLinkInForwardedMessagesTypeID: func() bin.Object { return &UserPrivacySettingShowLinkInForwardedMessages{} }, UserPrivacySettingShowPhoneNumberTypeID: func() bin.Object { return &UserPrivacySettingShowPhoneNumber{} }, UserPrivacySettingShowBioTypeID: func() bin.Object { return &UserPrivacySettingShowBio{} }, + UserPrivacySettingShowBirthdateTypeID: func() bin.Object { return &UserPrivacySettingShowBirthdate{} }, UserPrivacySettingAllowChatInvitesTypeID: func() bin.Object { return &UserPrivacySettingAllowChatInvites{} }, UserPrivacySettingAllowCallsTypeID: func() bin.Object { return &UserPrivacySettingAllowCalls{} }, UserPrivacySettingAllowPeerToPeerCallsTypeID: func() bin.Object { return &UserPrivacySettingAllowPeerToPeerCalls{} }, @@ -5554,903 +5695,921 @@ func TypesConstructorMap() map[uint32]func() bin.Object { SuggestedActionRestorePremiumTypeID: func() bin.Object { return &SuggestedActionRestorePremium{} }, SuggestedActionSubscribeToAnnualPremiumTypeID: func() bin.Object { return &SuggestedActionSubscribeToAnnualPremium{} }, SuggestedActionGiftPremiumForChristmasTypeID: func() bin.Object { return &SuggestedActionGiftPremiumForChristmas{} }, - CountTypeID: func() bin.Object { return &Count{} }, - TextTypeID: func() bin.Object { return &Text{} }, - SecondsTypeID: func() bin.Object { return &Seconds{} }, - FileDownloadedPrefixSizeTypeID: func() bin.Object { return &FileDownloadedPrefixSize{} }, - DeepLinkInfoTypeID: func() bin.Object { return &DeepLinkInfo{} }, - TextParseModeMarkdownTypeID: func() bin.Object { return &TextParseModeMarkdown{} }, - TextParseModeHTMLTypeID: func() bin.Object { return &TextParseModeHTML{} }, - ProxyTypeSocks5TypeID: func() bin.Object { return &ProxyTypeSocks5{} }, - ProxyTypeHTTPTypeID: func() bin.Object { return &ProxyTypeHTTP{} }, - ProxyTypeMtprotoTypeID: func() bin.Object { return &ProxyTypeMtproto{} }, - ProxyTypeID: func() bin.Object { return &Proxy{} }, - ProxiesTypeID: func() bin.Object { return &Proxies{} }, - InputStickerTypeID: func() bin.Object { return &InputSticker{} }, - DateRangeTypeID: func() bin.Object { return &DateRange{} }, - StatisticalValueTypeID: func() bin.Object { return &StatisticalValue{} }, - StatisticalGraphDataTypeID: func() bin.Object { return &StatisticalGraphData{} }, - StatisticalGraphAsyncTypeID: func() bin.Object { return &StatisticalGraphAsync{} }, - StatisticalGraphErrorTypeID: func() bin.Object { return &StatisticalGraphError{} }, - ChatStatisticsObjectTypeMessageTypeID: func() bin.Object { return &ChatStatisticsObjectTypeMessage{} }, - ChatStatisticsObjectTypeStoryTypeID: func() bin.Object { return &ChatStatisticsObjectTypeStory{} }, - ChatStatisticsInteractionInfoTypeID: func() bin.Object { return &ChatStatisticsInteractionInfo{} }, - ChatStatisticsMessageSenderInfoTypeID: func() bin.Object { return &ChatStatisticsMessageSenderInfo{} }, - ChatStatisticsAdministratorActionsInfoTypeID: func() bin.Object { return &ChatStatisticsAdministratorActionsInfo{} }, - ChatStatisticsInviterInfoTypeID: func() bin.Object { return &ChatStatisticsInviterInfo{} }, - ChatStatisticsSupergroupTypeID: func() bin.Object { return &ChatStatisticsSupergroup{} }, - ChatStatisticsChannelTypeID: func() bin.Object { return &ChatStatisticsChannel{} }, - MessageStatisticsTypeID: func() bin.Object { return &MessageStatistics{} }, - StoryStatisticsTypeID: func() bin.Object { return &StoryStatistics{} }, - PointTypeID: func() bin.Object { return &Point{} }, - VectorPathCommandLineTypeID: func() bin.Object { return &VectorPathCommandLine{} }, - VectorPathCommandCubicBezierCurveTypeID: func() bin.Object { return &VectorPathCommandCubicBezierCurve{} }, - BotCommandScopeDefaultTypeID: func() bin.Object { return &BotCommandScopeDefault{} }, - BotCommandScopeAllPrivateChatsTypeID: func() bin.Object { return &BotCommandScopeAllPrivateChats{} }, - BotCommandScopeAllGroupChatsTypeID: func() bin.Object { return &BotCommandScopeAllGroupChats{} }, - BotCommandScopeAllChatAdministratorsTypeID: func() bin.Object { return &BotCommandScopeAllChatAdministrators{} }, - BotCommandScopeChatTypeID: func() bin.Object { return &BotCommandScopeChat{} }, - BotCommandScopeChatAdministratorsTypeID: func() bin.Object { return &BotCommandScopeChatAdministrators{} }, - BotCommandScopeChatMemberTypeID: func() bin.Object { return &BotCommandScopeChatMember{} }, - UpdateAuthorizationStateTypeID: func() bin.Object { return &UpdateAuthorizationState{} }, - UpdateNewMessageTypeID: func() bin.Object { return &UpdateNewMessage{} }, - UpdateMessageSendAcknowledgedTypeID: func() bin.Object { return &UpdateMessageSendAcknowledged{} }, - UpdateMessageSendSucceededTypeID: func() bin.Object { return &UpdateMessageSendSucceeded{} }, - UpdateMessageSendFailedTypeID: func() bin.Object { return &UpdateMessageSendFailed{} }, - UpdateMessageContentTypeID: func() bin.Object { return &UpdateMessageContent{} }, - UpdateMessageEditedTypeID: func() bin.Object { return &UpdateMessageEdited{} }, - UpdateMessageIsPinnedTypeID: func() bin.Object { return &UpdateMessageIsPinned{} }, - UpdateMessageInteractionInfoTypeID: func() bin.Object { return &UpdateMessageInteractionInfo{} }, - UpdateMessageContentOpenedTypeID: func() bin.Object { return &UpdateMessageContentOpened{} }, - UpdateMessageMentionReadTypeID: func() bin.Object { return &UpdateMessageMentionRead{} }, - UpdateMessageUnreadReactionsTypeID: func() bin.Object { return &UpdateMessageUnreadReactions{} }, - UpdateMessageLiveLocationViewedTypeID: func() bin.Object { return &UpdateMessageLiveLocationViewed{} }, - UpdateNewChatTypeID: func() bin.Object { return &UpdateNewChat{} }, - UpdateChatTitleTypeID: func() bin.Object { return &UpdateChatTitle{} }, - UpdateChatPhotoTypeID: func() bin.Object { return &UpdateChatPhoto{} }, - UpdateChatAccentColorsTypeID: func() bin.Object { return &UpdateChatAccentColors{} }, - UpdateChatPermissionsTypeID: func() bin.Object { return &UpdateChatPermissions{} }, - UpdateChatLastMessageTypeID: func() bin.Object { return &UpdateChatLastMessage{} }, - UpdateChatPositionTypeID: func() bin.Object { return &UpdateChatPosition{} }, - UpdateChatAddedToListTypeID: func() bin.Object { return &UpdateChatAddedToList{} }, - UpdateChatRemovedFromListTypeID: func() bin.Object { return &UpdateChatRemovedFromList{} }, - UpdateChatReadInboxTypeID: func() bin.Object { return &UpdateChatReadInbox{} }, - UpdateChatReadOutboxTypeID: func() bin.Object { return &UpdateChatReadOutbox{} }, - UpdateChatActionBarTypeID: func() bin.Object { return &UpdateChatActionBar{} }, - UpdateChatAvailableReactionsTypeID: func() bin.Object { return &UpdateChatAvailableReactions{} }, - UpdateChatDraftMessageTypeID: func() bin.Object { return &UpdateChatDraftMessage{} }, - UpdateChatEmojiStatusTypeID: func() bin.Object { return &UpdateChatEmojiStatus{} }, - UpdateChatMessageSenderTypeID: func() bin.Object { return &UpdateChatMessageSender{} }, - UpdateChatMessageAutoDeleteTimeTypeID: func() bin.Object { return &UpdateChatMessageAutoDeleteTime{} }, - UpdateChatNotificationSettingsTypeID: func() bin.Object { return &UpdateChatNotificationSettings{} }, - UpdateChatPendingJoinRequestsTypeID: func() bin.Object { return &UpdateChatPendingJoinRequests{} }, - UpdateChatReplyMarkupTypeID: func() bin.Object { return &UpdateChatReplyMarkup{} }, - UpdateChatBackgroundTypeID: func() bin.Object { return &UpdateChatBackground{} }, - UpdateChatThemeTypeID: func() bin.Object { return &UpdateChatTheme{} }, - UpdateChatUnreadMentionCountTypeID: func() bin.Object { return &UpdateChatUnreadMentionCount{} }, - UpdateChatUnreadReactionCountTypeID: func() bin.Object { return &UpdateChatUnreadReactionCount{} }, - UpdateChatVideoChatTypeID: func() bin.Object { return &UpdateChatVideoChat{} }, - UpdateChatDefaultDisableNotificationTypeID: func() bin.Object { return &UpdateChatDefaultDisableNotification{} }, - UpdateChatHasProtectedContentTypeID: func() bin.Object { return &UpdateChatHasProtectedContent{} }, - UpdateChatIsTranslatableTypeID: func() bin.Object { return &UpdateChatIsTranslatable{} }, - UpdateChatIsMarkedAsUnreadTypeID: func() bin.Object { return &UpdateChatIsMarkedAsUnread{} }, - UpdateChatViewAsTopicsTypeID: func() bin.Object { return &UpdateChatViewAsTopics{} }, - UpdateChatBlockListTypeID: func() bin.Object { return &UpdateChatBlockList{} }, - UpdateChatHasScheduledMessagesTypeID: func() bin.Object { return &UpdateChatHasScheduledMessages{} }, - UpdateChatFoldersTypeID: func() bin.Object { return &UpdateChatFolders{} }, - UpdateChatOnlineMemberCountTypeID: func() bin.Object { return &UpdateChatOnlineMemberCount{} }, - UpdateSavedMessagesTopicTypeID: func() bin.Object { return &UpdateSavedMessagesTopic{} }, - UpdateSavedMessagesTopicCountTypeID: func() bin.Object { return &UpdateSavedMessagesTopicCount{} }, - UpdateQuickReplyShortcutTypeID: func() bin.Object { return &UpdateQuickReplyShortcut{} }, - UpdateQuickReplyShortcutDeletedTypeID: func() bin.Object { return &UpdateQuickReplyShortcutDeleted{} }, - UpdateQuickReplyShortcutsTypeID: func() bin.Object { return &UpdateQuickReplyShortcuts{} }, - UpdateQuickReplyShortcutMessagesTypeID: func() bin.Object { return &UpdateQuickReplyShortcutMessages{} }, - UpdateForumTopicInfoTypeID: func() bin.Object { return &UpdateForumTopicInfo{} }, - UpdateScopeNotificationSettingsTypeID: func() bin.Object { return &UpdateScopeNotificationSettings{} }, - UpdateNotificationTypeID: func() bin.Object { return &UpdateNotification{} }, - UpdateNotificationGroupTypeID: func() bin.Object { return &UpdateNotificationGroup{} }, - UpdateActiveNotificationsTypeID: func() bin.Object { return &UpdateActiveNotifications{} }, - UpdateHavePendingNotificationsTypeID: func() bin.Object { return &UpdateHavePendingNotifications{} }, - UpdateDeleteMessagesTypeID: func() bin.Object { return &UpdateDeleteMessages{} }, - UpdateChatActionTypeID: func() bin.Object { return &UpdateChatAction{} }, - UpdateUserStatusTypeID: func() bin.Object { return &UpdateUserStatus{} }, - UpdateUserTypeID: func() bin.Object { return &UpdateUser{} }, - UpdateBasicGroupTypeID: func() bin.Object { return &UpdateBasicGroup{} }, - UpdateSupergroupTypeID: func() bin.Object { return &UpdateSupergroup{} }, - UpdateSecretChatTypeID: func() bin.Object { return &UpdateSecretChat{} }, - UpdateUserFullInfoTypeID: func() bin.Object { return &UpdateUserFullInfo{} }, - UpdateBasicGroupFullInfoTypeID: func() bin.Object { return &UpdateBasicGroupFullInfo{} }, - UpdateSupergroupFullInfoTypeID: func() bin.Object { return &UpdateSupergroupFullInfo{} }, - UpdateServiceNotificationTypeID: func() bin.Object { return &UpdateServiceNotification{} }, - UpdateFileTypeID: func() bin.Object { return &UpdateFile{} }, - UpdateFileGenerationStartTypeID: func() bin.Object { return &UpdateFileGenerationStart{} }, - UpdateFileGenerationStopTypeID: func() bin.Object { return &UpdateFileGenerationStop{} }, - UpdateFileDownloadsTypeID: func() bin.Object { return &UpdateFileDownloads{} }, - UpdateFileAddedToDownloadsTypeID: func() bin.Object { return &UpdateFileAddedToDownloads{} }, - UpdateFileDownloadTypeID: func() bin.Object { return &UpdateFileDownload{} }, - UpdateFileRemovedFromDownloadsTypeID: func() bin.Object { return &UpdateFileRemovedFromDownloads{} }, - UpdateCallTypeID: func() bin.Object { return &UpdateCall{} }, - UpdateGroupCallTypeID: func() bin.Object { return &UpdateGroupCall{} }, - UpdateGroupCallParticipantTypeID: func() bin.Object { return &UpdateGroupCallParticipant{} }, - UpdateNewCallSignalingDataTypeID: func() bin.Object { return &UpdateNewCallSignalingData{} }, - UpdateUserPrivacySettingRulesTypeID: func() bin.Object { return &UpdateUserPrivacySettingRules{} }, - UpdateUnreadMessageCountTypeID: func() bin.Object { return &UpdateUnreadMessageCount{} }, - UpdateUnreadChatCountTypeID: func() bin.Object { return &UpdateUnreadChatCount{} }, - UpdateStoryTypeID: func() bin.Object { return &UpdateStory{} }, - UpdateStoryDeletedTypeID: func() bin.Object { return &UpdateStoryDeleted{} }, - UpdateStorySendSucceededTypeID: func() bin.Object { return &UpdateStorySendSucceeded{} }, - UpdateStorySendFailedTypeID: func() bin.Object { return &UpdateStorySendFailed{} }, - UpdateChatActiveStoriesTypeID: func() bin.Object { return &UpdateChatActiveStories{} }, - UpdateStoryListChatCountTypeID: func() bin.Object { return &UpdateStoryListChatCount{} }, - UpdateStoryStealthModeTypeID: func() bin.Object { return &UpdateStoryStealthMode{} }, - UpdateOptionTypeID: func() bin.Object { return &UpdateOption{} }, - UpdateStickerSetTypeID: func() bin.Object { return &UpdateStickerSet{} }, - UpdateInstalledStickerSetsTypeID: func() bin.Object { return &UpdateInstalledStickerSets{} }, - UpdateTrendingStickerSetsTypeID: func() bin.Object { return &UpdateTrendingStickerSets{} }, - UpdateRecentStickersTypeID: func() bin.Object { return &UpdateRecentStickers{} }, - UpdateFavoriteStickersTypeID: func() bin.Object { return &UpdateFavoriteStickers{} }, - UpdateSavedAnimationsTypeID: func() bin.Object { return &UpdateSavedAnimations{} }, - UpdateSavedNotificationSoundsTypeID: func() bin.Object { return &UpdateSavedNotificationSounds{} }, - UpdateDefaultBackgroundTypeID: func() bin.Object { return &UpdateDefaultBackground{} }, - UpdateChatThemesTypeID: func() bin.Object { return &UpdateChatThemes{} }, - UpdateAccentColorsTypeID: func() bin.Object { return &UpdateAccentColors{} }, - UpdateProfileAccentColorsTypeID: func() bin.Object { return &UpdateProfileAccentColors{} }, - UpdateLanguagePackStringsTypeID: func() bin.Object { return &UpdateLanguagePackStrings{} }, - UpdateConnectionStateTypeID: func() bin.Object { return &UpdateConnectionState{} }, - UpdateTermsOfServiceTypeID: func() bin.Object { return &UpdateTermsOfService{} }, - UpdateUsersNearbyTypeID: func() bin.Object { return &UpdateUsersNearby{} }, - UpdateUnconfirmedSessionTypeID: func() bin.Object { return &UpdateUnconfirmedSession{} }, - UpdateAttachmentMenuBotsTypeID: func() bin.Object { return &UpdateAttachmentMenuBots{} }, - UpdateWebAppMessageSentTypeID: func() bin.Object { return &UpdateWebAppMessageSent{} }, - UpdateActiveEmojiReactionsTypeID: func() bin.Object { return &UpdateActiveEmojiReactions{} }, - UpdateDefaultReactionTypeTypeID: func() bin.Object { return &UpdateDefaultReactionType{} }, - UpdateSavedMessagesTagsTypeID: func() bin.Object { return &UpdateSavedMessagesTags{} }, - UpdateSpeechRecognitionTrialTypeID: func() bin.Object { return &UpdateSpeechRecognitionTrial{} }, - UpdateDiceEmojisTypeID: func() bin.Object { return &UpdateDiceEmojis{} }, - UpdateAnimatedEmojiMessageClickedTypeID: func() bin.Object { return &UpdateAnimatedEmojiMessageClicked{} }, - UpdateAnimationSearchParametersTypeID: func() bin.Object { return &UpdateAnimationSearchParameters{} }, - UpdateSuggestedActionsTypeID: func() bin.Object { return &UpdateSuggestedActions{} }, - UpdateAddChatMembersPrivacyForbiddenTypeID: func() bin.Object { return &UpdateAddChatMembersPrivacyForbidden{} }, - UpdateAutosaveSettingsTypeID: func() bin.Object { return &UpdateAutosaveSettings{} }, - UpdateNewInlineQueryTypeID: func() bin.Object { return &UpdateNewInlineQuery{} }, - UpdateNewChosenInlineResultTypeID: func() bin.Object { return &UpdateNewChosenInlineResult{} }, - UpdateNewCallbackQueryTypeID: func() bin.Object { return &UpdateNewCallbackQuery{} }, - UpdateNewInlineCallbackQueryTypeID: func() bin.Object { return &UpdateNewInlineCallbackQuery{} }, - UpdateNewShippingQueryTypeID: func() bin.Object { return &UpdateNewShippingQuery{} }, - UpdateNewPreCheckoutQueryTypeID: func() bin.Object { return &UpdateNewPreCheckoutQuery{} }, - UpdateNewCustomEventTypeID: func() bin.Object { return &UpdateNewCustomEvent{} }, - UpdateNewCustomQueryTypeID: func() bin.Object { return &UpdateNewCustomQuery{} }, - UpdatePollTypeID: func() bin.Object { return &UpdatePoll{} }, - UpdatePollAnswerTypeID: func() bin.Object { return &UpdatePollAnswer{} }, - UpdateChatMemberTypeID: func() bin.Object { return &UpdateChatMember{} }, - UpdateNewChatJoinRequestTypeID: func() bin.Object { return &UpdateNewChatJoinRequest{} }, - UpdateChatBoostTypeID: func() bin.Object { return &UpdateChatBoost{} }, - UpdateMessageReactionTypeID: func() bin.Object { return &UpdateMessageReaction{} }, - UpdateMessageReactionsTypeID: func() bin.Object { return &UpdateMessageReactions{} }, - UpdatesTypeID: func() bin.Object { return &Updates{} }, - LogStreamDefaultTypeID: func() bin.Object { return &LogStreamDefault{} }, - LogStreamFileTypeID: func() bin.Object { return &LogStreamFile{} }, - LogStreamEmptyTypeID: func() bin.Object { return &LogStreamEmpty{} }, - LogVerbosityLevelTypeID: func() bin.Object { return &LogVerbosityLevel{} }, - LogTagsTypeID: func() bin.Object { return &LogTags{} }, - UserSupportInfoTypeID: func() bin.Object { return &UserSupportInfo{} }, - TestIntTypeID: func() bin.Object { return &TestInt{} }, - TestStringTypeID: func() bin.Object { return &TestString{} }, - TestBytesTypeID: func() bin.Object { return &TestBytes{} }, - TestVectorIntTypeID: func() bin.Object { return &TestVectorInt{} }, - TestVectorIntObjectTypeID: func() bin.Object { return &TestVectorIntObject{} }, - TestVectorStringTypeID: func() bin.Object { return &TestVectorString{} }, - TestVectorStringObjectTypeID: func() bin.Object { return &TestVectorStringObject{} }, - GetAuthorizationStateRequestTypeID: func() bin.Object { return &GetAuthorizationStateRequest{} }, - SetTdlibParametersRequestTypeID: func() bin.Object { return &SetTdlibParametersRequest{} }, - SetAuthenticationPhoneNumberRequestTypeID: func() bin.Object { return &SetAuthenticationPhoneNumberRequest{} }, - SetAuthenticationEmailAddressRequestTypeID: func() bin.Object { return &SetAuthenticationEmailAddressRequest{} }, - ResendAuthenticationCodeRequestTypeID: func() bin.Object { return &ResendAuthenticationCodeRequest{} }, - CheckAuthenticationEmailCodeRequestTypeID: func() bin.Object { return &CheckAuthenticationEmailCodeRequest{} }, - CheckAuthenticationCodeRequestTypeID: func() bin.Object { return &CheckAuthenticationCodeRequest{} }, - RequestQrCodeAuthenticationRequestTypeID: func() bin.Object { return &RequestQrCodeAuthenticationRequest{} }, - RegisterUserRequestTypeID: func() bin.Object { return &RegisterUserRequest{} }, - ResetAuthenticationEmailAddressRequestTypeID: func() bin.Object { return &ResetAuthenticationEmailAddressRequest{} }, - CheckAuthenticationPasswordRequestTypeID: func() bin.Object { return &CheckAuthenticationPasswordRequest{} }, - RequestAuthenticationPasswordRecoveryRequestTypeID: func() bin.Object { return &RequestAuthenticationPasswordRecoveryRequest{} }, - CheckAuthenticationPasswordRecoveryCodeRequestTypeID: func() bin.Object { return &CheckAuthenticationPasswordRecoveryCodeRequest{} }, - RecoverAuthenticationPasswordRequestTypeID: func() bin.Object { return &RecoverAuthenticationPasswordRequest{} }, - SendAuthenticationFirebaseSMSRequestTypeID: func() bin.Object { return &SendAuthenticationFirebaseSMSRequest{} }, - CheckAuthenticationBotTokenRequestTypeID: func() bin.Object { return &CheckAuthenticationBotTokenRequest{} }, - LogOutRequestTypeID: func() bin.Object { return &LogOutRequest{} }, - CloseRequestTypeID: func() bin.Object { return &CloseRequest{} }, - DestroyRequestTypeID: func() bin.Object { return &DestroyRequest{} }, - ConfirmQrCodeAuthenticationRequestTypeID: func() bin.Object { return &ConfirmQrCodeAuthenticationRequest{} }, - GetCurrentStateRequestTypeID: func() bin.Object { return &GetCurrentStateRequest{} }, - SetDatabaseEncryptionKeyRequestTypeID: func() bin.Object { return &SetDatabaseEncryptionKeyRequest{} }, - GetPasswordStateRequestTypeID: func() bin.Object { return &GetPasswordStateRequest{} }, - SetPasswordRequestTypeID: func() bin.Object { return &SetPasswordRequest{} }, - SetLoginEmailAddressRequestTypeID: func() bin.Object { return &SetLoginEmailAddressRequest{} }, - ResendLoginEmailAddressCodeRequestTypeID: func() bin.Object { return &ResendLoginEmailAddressCodeRequest{} }, - CheckLoginEmailAddressCodeRequestTypeID: func() bin.Object { return &CheckLoginEmailAddressCodeRequest{} }, - GetRecoveryEmailAddressRequestTypeID: func() bin.Object { return &GetRecoveryEmailAddressRequest{} }, - SetRecoveryEmailAddressRequestTypeID: func() bin.Object { return &SetRecoveryEmailAddressRequest{} }, - CheckRecoveryEmailAddressCodeRequestTypeID: func() bin.Object { return &CheckRecoveryEmailAddressCodeRequest{} }, - ResendRecoveryEmailAddressCodeRequestTypeID: func() bin.Object { return &ResendRecoveryEmailAddressCodeRequest{} }, - CancelRecoveryEmailAddressVerificationRequestTypeID: func() bin.Object { return &CancelRecoveryEmailAddressVerificationRequest{} }, - RequestPasswordRecoveryRequestTypeID: func() bin.Object { return &RequestPasswordRecoveryRequest{} }, - CheckPasswordRecoveryCodeRequestTypeID: func() bin.Object { return &CheckPasswordRecoveryCodeRequest{} }, - RecoverPasswordRequestTypeID: func() bin.Object { return &RecoverPasswordRequest{} }, - ResetPasswordRequestTypeID: func() bin.Object { return &ResetPasswordRequest{} }, - CancelPasswordResetRequestTypeID: func() bin.Object { return &CancelPasswordResetRequest{} }, - CreateTemporaryPasswordRequestTypeID: func() bin.Object { return &CreateTemporaryPasswordRequest{} }, - GetTemporaryPasswordStateRequestTypeID: func() bin.Object { return &GetTemporaryPasswordStateRequest{} }, - GetMeRequestTypeID: func() bin.Object { return &GetMeRequest{} }, - GetUserRequestTypeID: func() bin.Object { return &GetUserRequest{} }, - GetUserFullInfoRequestTypeID: func() bin.Object { return &GetUserFullInfoRequest{} }, - GetBasicGroupRequestTypeID: func() bin.Object { return &GetBasicGroupRequest{} }, - GetBasicGroupFullInfoRequestTypeID: func() bin.Object { return &GetBasicGroupFullInfoRequest{} }, - GetSupergroupRequestTypeID: func() bin.Object { return &GetSupergroupRequest{} }, - GetSupergroupFullInfoRequestTypeID: func() bin.Object { return &GetSupergroupFullInfoRequest{} }, - GetSecretChatRequestTypeID: func() bin.Object { return &GetSecretChatRequest{} }, - GetChatRequestTypeID: func() bin.Object { return &GetChatRequest{} }, - GetMessageRequestTypeID: func() bin.Object { return &GetMessageRequest{} }, - GetMessageLocallyRequestTypeID: func() bin.Object { return &GetMessageLocallyRequest{} }, - GetRepliedMessageRequestTypeID: func() bin.Object { return &GetRepliedMessageRequest{} }, - GetChatPinnedMessageRequestTypeID: func() bin.Object { return &GetChatPinnedMessageRequest{} }, - GetCallbackQueryMessageRequestTypeID: func() bin.Object { return &GetCallbackQueryMessageRequest{} }, - GetMessagesRequestTypeID: func() bin.Object { return &GetMessagesRequest{} }, - GetMessageThreadRequestTypeID: func() bin.Object { return &GetMessageThreadRequest{} }, - GetMessageReadDateRequestTypeID: func() bin.Object { return &GetMessageReadDateRequest{} }, - GetMessageViewersRequestTypeID: func() bin.Object { return &GetMessageViewersRequest{} }, - GetFileRequestTypeID: func() bin.Object { return &GetFileRequest{} }, - GetRemoteFileRequestTypeID: func() bin.Object { return &GetRemoteFileRequest{} }, - LoadChatsRequestTypeID: func() bin.Object { return &LoadChatsRequest{} }, - GetChatsRequestTypeID: func() bin.Object { return &GetChatsRequest{} }, - SearchPublicChatRequestTypeID: func() bin.Object { return &SearchPublicChatRequest{} }, - SearchPublicChatsRequestTypeID: func() bin.Object { return &SearchPublicChatsRequest{} }, - SearchChatsRequestTypeID: func() bin.Object { return &SearchChatsRequest{} }, - SearchChatsOnServerRequestTypeID: func() bin.Object { return &SearchChatsOnServerRequest{} }, - SearchChatsNearbyRequestTypeID: func() bin.Object { return &SearchChatsNearbyRequest{} }, - GetChatSimilarChatsRequestTypeID: func() bin.Object { return &GetChatSimilarChatsRequest{} }, - GetChatSimilarChatCountRequestTypeID: func() bin.Object { return &GetChatSimilarChatCountRequest{} }, - OpenChatSimilarChatRequestTypeID: func() bin.Object { return &OpenChatSimilarChatRequest{} }, - GetTopChatsRequestTypeID: func() bin.Object { return &GetTopChatsRequest{} }, - RemoveTopChatRequestTypeID: func() bin.Object { return &RemoveTopChatRequest{} }, - SearchRecentlyFoundChatsRequestTypeID: func() bin.Object { return &SearchRecentlyFoundChatsRequest{} }, - AddRecentlyFoundChatRequestTypeID: func() bin.Object { return &AddRecentlyFoundChatRequest{} }, - RemoveRecentlyFoundChatRequestTypeID: func() bin.Object { return &RemoveRecentlyFoundChatRequest{} }, - ClearRecentlyFoundChatsRequestTypeID: func() bin.Object { return &ClearRecentlyFoundChatsRequest{} }, - GetRecentlyOpenedChatsRequestTypeID: func() bin.Object { return &GetRecentlyOpenedChatsRequest{} }, - CheckChatUsernameRequestTypeID: func() bin.Object { return &CheckChatUsernameRequest{} }, - GetCreatedPublicChatsRequestTypeID: func() bin.Object { return &GetCreatedPublicChatsRequest{} }, - CheckCreatedPublicChatsLimitRequestTypeID: func() bin.Object { return &CheckCreatedPublicChatsLimitRequest{} }, - GetSuitableDiscussionChatsRequestTypeID: func() bin.Object { return &GetSuitableDiscussionChatsRequest{} }, - GetInactiveSupergroupChatsRequestTypeID: func() bin.Object { return &GetInactiveSupergroupChatsRequest{} }, - LoadSavedMessagesTopicsRequestTypeID: func() bin.Object { return &LoadSavedMessagesTopicsRequest{} }, - GetSavedMessagesTopicHistoryRequestTypeID: func() bin.Object { return &GetSavedMessagesTopicHistoryRequest{} }, - GetSavedMessagesTopicMessageByDateRequestTypeID: func() bin.Object { return &GetSavedMessagesTopicMessageByDateRequest{} }, - DeleteSavedMessagesTopicHistoryRequestTypeID: func() bin.Object { return &DeleteSavedMessagesTopicHistoryRequest{} }, - DeleteSavedMessagesTopicMessagesByDateRequestTypeID: func() bin.Object { return &DeleteSavedMessagesTopicMessagesByDateRequest{} }, - ToggleSavedMessagesTopicIsPinnedRequestTypeID: func() bin.Object { return &ToggleSavedMessagesTopicIsPinnedRequest{} }, - SetPinnedSavedMessagesTopicsRequestTypeID: func() bin.Object { return &SetPinnedSavedMessagesTopicsRequest{} }, - GetGroupsInCommonRequestTypeID: func() bin.Object { return &GetGroupsInCommonRequest{} }, - GetChatHistoryRequestTypeID: func() bin.Object { return &GetChatHistoryRequest{} }, - GetMessageThreadHistoryRequestTypeID: func() bin.Object { return &GetMessageThreadHistoryRequest{} }, - DeleteChatHistoryRequestTypeID: func() bin.Object { return &DeleteChatHistoryRequest{} }, - DeleteChatRequestTypeID: func() bin.Object { return &DeleteChatRequest{} }, - SearchChatMessagesRequestTypeID: func() bin.Object { return &SearchChatMessagesRequest{} }, - SearchMessagesRequestTypeID: func() bin.Object { return &SearchMessagesRequest{} }, - SearchSecretMessagesRequestTypeID: func() bin.Object { return &SearchSecretMessagesRequest{} }, - SearchSavedMessagesRequestTypeID: func() bin.Object { return &SearchSavedMessagesRequest{} }, - SearchCallMessagesRequestTypeID: func() bin.Object { return &SearchCallMessagesRequest{} }, - SearchOutgoingDocumentMessagesRequestTypeID: func() bin.Object { return &SearchOutgoingDocumentMessagesRequest{} }, - DeleteAllCallMessagesRequestTypeID: func() bin.Object { return &DeleteAllCallMessagesRequest{} }, - SearchChatRecentLocationMessagesRequestTypeID: func() bin.Object { return &SearchChatRecentLocationMessagesRequest{} }, - GetActiveLiveLocationMessagesRequestTypeID: func() bin.Object { return &GetActiveLiveLocationMessagesRequest{} }, - GetChatMessageByDateRequestTypeID: func() bin.Object { return &GetChatMessageByDateRequest{} }, - GetChatSparseMessagePositionsRequestTypeID: func() bin.Object { return &GetChatSparseMessagePositionsRequest{} }, - GetChatMessageCalendarRequestTypeID: func() bin.Object { return &GetChatMessageCalendarRequest{} }, - GetChatMessageCountRequestTypeID: func() bin.Object { return &GetChatMessageCountRequest{} }, - GetChatMessagePositionRequestTypeID: func() bin.Object { return &GetChatMessagePositionRequest{} }, - GetChatScheduledMessagesRequestTypeID: func() bin.Object { return &GetChatScheduledMessagesRequest{} }, - GetChatSponsoredMessagesRequestTypeID: func() bin.Object { return &GetChatSponsoredMessagesRequest{} }, - ClickChatSponsoredMessageRequestTypeID: func() bin.Object { return &ClickChatSponsoredMessageRequest{} }, - RemoveNotificationRequestTypeID: func() bin.Object { return &RemoveNotificationRequest{} }, - RemoveNotificationGroupRequestTypeID: func() bin.Object { return &RemoveNotificationGroupRequest{} }, - GetMessageLinkRequestTypeID: func() bin.Object { return &GetMessageLinkRequest{} }, - GetMessageEmbeddingCodeRequestTypeID: func() bin.Object { return &GetMessageEmbeddingCodeRequest{} }, - GetMessageLinkInfoRequestTypeID: func() bin.Object { return &GetMessageLinkInfoRequest{} }, - TranslateTextRequestTypeID: func() bin.Object { return &TranslateTextRequest{} }, - TranslateMessageTextRequestTypeID: func() bin.Object { return &TranslateMessageTextRequest{} }, - RecognizeSpeechRequestTypeID: func() bin.Object { return &RecognizeSpeechRequest{} }, - RateSpeechRecognitionRequestTypeID: func() bin.Object { return &RateSpeechRecognitionRequest{} }, - GetChatAvailableMessageSendersRequestTypeID: func() bin.Object { return &GetChatAvailableMessageSendersRequest{} }, - SetChatMessageSenderRequestTypeID: func() bin.Object { return &SetChatMessageSenderRequest{} }, - SendMessageRequestTypeID: func() bin.Object { return &SendMessageRequest{} }, - SendMessageAlbumRequestTypeID: func() bin.Object { return &SendMessageAlbumRequest{} }, - SendBotStartMessageRequestTypeID: func() bin.Object { return &SendBotStartMessageRequest{} }, - SendInlineQueryResultMessageRequestTypeID: func() bin.Object { return &SendInlineQueryResultMessageRequest{} }, - ForwardMessagesRequestTypeID: func() bin.Object { return &ForwardMessagesRequest{} }, - SendQuickReplyShortcutMessagesRequestTypeID: func() bin.Object { return &SendQuickReplyShortcutMessagesRequest{} }, - ResendMessagesRequestTypeID: func() bin.Object { return &ResendMessagesRequest{} }, - AddLocalMessageRequestTypeID: func() bin.Object { return &AddLocalMessageRequest{} }, - DeleteMessagesRequestTypeID: func() bin.Object { return &DeleteMessagesRequest{} }, - DeleteChatMessagesBySenderRequestTypeID: func() bin.Object { return &DeleteChatMessagesBySenderRequest{} }, - DeleteChatMessagesByDateRequestTypeID: func() bin.Object { return &DeleteChatMessagesByDateRequest{} }, - EditMessageTextRequestTypeID: func() bin.Object { return &EditMessageTextRequest{} }, - EditMessageLiveLocationRequestTypeID: func() bin.Object { return &EditMessageLiveLocationRequest{} }, - EditMessageMediaRequestTypeID: func() bin.Object { return &EditMessageMediaRequest{} }, - EditMessageCaptionRequestTypeID: func() bin.Object { return &EditMessageCaptionRequest{} }, - EditMessageReplyMarkupRequestTypeID: func() bin.Object { return &EditMessageReplyMarkupRequest{} }, - EditInlineMessageTextRequestTypeID: func() bin.Object { return &EditInlineMessageTextRequest{} }, - EditInlineMessageLiveLocationRequestTypeID: func() bin.Object { return &EditInlineMessageLiveLocationRequest{} }, - EditInlineMessageMediaRequestTypeID: func() bin.Object { return &EditInlineMessageMediaRequest{} }, - EditInlineMessageCaptionRequestTypeID: func() bin.Object { return &EditInlineMessageCaptionRequest{} }, - EditInlineMessageReplyMarkupRequestTypeID: func() bin.Object { return &EditInlineMessageReplyMarkupRequest{} }, - EditMessageSchedulingStateRequestTypeID: func() bin.Object { return &EditMessageSchedulingStateRequest{} }, - CheckQuickReplyShortcutNameRequestTypeID: func() bin.Object { return &CheckQuickReplyShortcutNameRequest{} }, - LoadQuickReplyShortcutsRequestTypeID: func() bin.Object { return &LoadQuickReplyShortcutsRequest{} }, - SetQuickReplyShortcutNameRequestTypeID: func() bin.Object { return &SetQuickReplyShortcutNameRequest{} }, - DeleteQuickReplyShortcutRequestTypeID: func() bin.Object { return &DeleteQuickReplyShortcutRequest{} }, - ReorderQuickReplyShortcutsRequestTypeID: func() bin.Object { return &ReorderQuickReplyShortcutsRequest{} }, - LoadQuickReplyShortcutMessagesRequestTypeID: func() bin.Object { return &LoadQuickReplyShortcutMessagesRequest{} }, - DeleteQuickReplyShortcutMessagesRequestTypeID: func() bin.Object { return &DeleteQuickReplyShortcutMessagesRequest{} }, - GetForumTopicDefaultIconsRequestTypeID: func() bin.Object { return &GetForumTopicDefaultIconsRequest{} }, - CreateForumTopicRequestTypeID: func() bin.Object { return &CreateForumTopicRequest{} }, - EditForumTopicRequestTypeID: func() bin.Object { return &EditForumTopicRequest{} }, - GetForumTopicRequestTypeID: func() bin.Object { return &GetForumTopicRequest{} }, - GetForumTopicLinkRequestTypeID: func() bin.Object { return &GetForumTopicLinkRequest{} }, - GetForumTopicsRequestTypeID: func() bin.Object { return &GetForumTopicsRequest{} }, - SetForumTopicNotificationSettingsRequestTypeID: func() bin.Object { return &SetForumTopicNotificationSettingsRequest{} }, - ToggleForumTopicIsClosedRequestTypeID: func() bin.Object { return &ToggleForumTopicIsClosedRequest{} }, - ToggleGeneralForumTopicIsHiddenRequestTypeID: func() bin.Object { return &ToggleGeneralForumTopicIsHiddenRequest{} }, - ToggleForumTopicIsPinnedRequestTypeID: func() bin.Object { return &ToggleForumTopicIsPinnedRequest{} }, - SetPinnedForumTopicsRequestTypeID: func() bin.Object { return &SetPinnedForumTopicsRequest{} }, - DeleteForumTopicRequestTypeID: func() bin.Object { return &DeleteForumTopicRequest{} }, - GetEmojiReactionRequestTypeID: func() bin.Object { return &GetEmojiReactionRequest{} }, - GetCustomEmojiReactionAnimationsRequestTypeID: func() bin.Object { return &GetCustomEmojiReactionAnimationsRequest{} }, - GetMessageAvailableReactionsRequestTypeID: func() bin.Object { return &GetMessageAvailableReactionsRequest{} }, - ClearRecentReactionsRequestTypeID: func() bin.Object { return &ClearRecentReactionsRequest{} }, - AddMessageReactionRequestTypeID: func() bin.Object { return &AddMessageReactionRequest{} }, - RemoveMessageReactionRequestTypeID: func() bin.Object { return &RemoveMessageReactionRequest{} }, - SetMessageReactionsRequestTypeID: func() bin.Object { return &SetMessageReactionsRequest{} }, - GetMessageAddedReactionsRequestTypeID: func() bin.Object { return &GetMessageAddedReactionsRequest{} }, - SetDefaultReactionTypeRequestTypeID: func() bin.Object { return &SetDefaultReactionTypeRequest{} }, - GetSavedMessagesTagsRequestTypeID: func() bin.Object { return &GetSavedMessagesTagsRequest{} }, - SetSavedMessagesTagLabelRequestTypeID: func() bin.Object { return &SetSavedMessagesTagLabelRequest{} }, - SearchQuoteRequestTypeID: func() bin.Object { return &SearchQuoteRequest{} }, - GetTextEntitiesRequestTypeID: func() bin.Object { return &GetTextEntitiesRequest{} }, - ParseTextEntitiesRequestTypeID: func() bin.Object { return &ParseTextEntitiesRequest{} }, - ParseMarkdownRequestTypeID: func() bin.Object { return &ParseMarkdownRequest{} }, - GetMarkdownTextRequestTypeID: func() bin.Object { return &GetMarkdownTextRequest{} }, - GetCountryFlagEmojiRequestTypeID: func() bin.Object { return &GetCountryFlagEmojiRequest{} }, - GetFileMimeTypeRequestTypeID: func() bin.Object { return &GetFileMimeTypeRequest{} }, - GetFileExtensionRequestTypeID: func() bin.Object { return &GetFileExtensionRequest{} }, - CleanFileNameRequestTypeID: func() bin.Object { return &CleanFileNameRequest{} }, - GetLanguagePackStringRequestTypeID: func() bin.Object { return &GetLanguagePackStringRequest{} }, - GetJSONValueRequestTypeID: func() bin.Object { return &GetJSONValueRequest{} }, - GetJSONStringRequestTypeID: func() bin.Object { return &GetJSONStringRequest{} }, - GetThemeParametersJSONStringRequestTypeID: func() bin.Object { return &GetThemeParametersJSONStringRequest{} }, - SetPollAnswerRequestTypeID: func() bin.Object { return &SetPollAnswerRequest{} }, - GetPollVotersRequestTypeID: func() bin.Object { return &GetPollVotersRequest{} }, - StopPollRequestTypeID: func() bin.Object { return &StopPollRequest{} }, - HideSuggestedActionRequestTypeID: func() bin.Object { return &HideSuggestedActionRequest{} }, - GetLoginURLInfoRequestTypeID: func() bin.Object { return &GetLoginURLInfoRequest{} }, - GetLoginURLRequestTypeID: func() bin.Object { return &GetLoginURLRequest{} }, - ShareUsersWithBotRequestTypeID: func() bin.Object { return &ShareUsersWithBotRequest{} }, - ShareChatWithBotRequestTypeID: func() bin.Object { return &ShareChatWithBotRequest{} }, - GetInlineQueryResultsRequestTypeID: func() bin.Object { return &GetInlineQueryResultsRequest{} }, - AnswerInlineQueryRequestTypeID: func() bin.Object { return &AnswerInlineQueryRequest{} }, - SearchWebAppRequestTypeID: func() bin.Object { return &SearchWebAppRequest{} }, - GetWebAppLinkURLRequestTypeID: func() bin.Object { return &GetWebAppLinkURLRequest{} }, - GetWebAppURLRequestTypeID: func() bin.Object { return &GetWebAppURLRequest{} }, - SendWebAppDataRequestTypeID: func() bin.Object { return &SendWebAppDataRequest{} }, - OpenWebAppRequestTypeID: func() bin.Object { return &OpenWebAppRequest{} }, - CloseWebAppRequestTypeID: func() bin.Object { return &CloseWebAppRequest{} }, - AnswerWebAppQueryRequestTypeID: func() bin.Object { return &AnswerWebAppQueryRequest{} }, - GetCallbackQueryAnswerRequestTypeID: func() bin.Object { return &GetCallbackQueryAnswerRequest{} }, - AnswerCallbackQueryRequestTypeID: func() bin.Object { return &AnswerCallbackQueryRequest{} }, - AnswerShippingQueryRequestTypeID: func() bin.Object { return &AnswerShippingQueryRequest{} }, - AnswerPreCheckoutQueryRequestTypeID: func() bin.Object { return &AnswerPreCheckoutQueryRequest{} }, - SetGameScoreRequestTypeID: func() bin.Object { return &SetGameScoreRequest{} }, - SetInlineGameScoreRequestTypeID: func() bin.Object { return &SetInlineGameScoreRequest{} }, - GetGameHighScoresRequestTypeID: func() bin.Object { return &GetGameHighScoresRequest{} }, - GetInlineGameHighScoresRequestTypeID: func() bin.Object { return &GetInlineGameHighScoresRequest{} }, - DeleteChatReplyMarkupRequestTypeID: func() bin.Object { return &DeleteChatReplyMarkupRequest{} }, - SendChatActionRequestTypeID: func() bin.Object { return &SendChatActionRequest{} }, - OpenChatRequestTypeID: func() bin.Object { return &OpenChatRequest{} }, - CloseChatRequestTypeID: func() bin.Object { return &CloseChatRequest{} }, - ViewMessagesRequestTypeID: func() bin.Object { return &ViewMessagesRequest{} }, - OpenMessageContentRequestTypeID: func() bin.Object { return &OpenMessageContentRequest{} }, - ClickAnimatedEmojiMessageRequestTypeID: func() bin.Object { return &ClickAnimatedEmojiMessageRequest{} }, - GetInternalLinkRequestTypeID: func() bin.Object { return &GetInternalLinkRequest{} }, - GetInternalLinkTypeRequestTypeID: func() bin.Object { return &GetInternalLinkTypeRequest{} }, - GetExternalLinkInfoRequestTypeID: func() bin.Object { return &GetExternalLinkInfoRequest{} }, - GetExternalLinkRequestTypeID: func() bin.Object { return &GetExternalLinkRequest{} }, - ReadAllChatMentionsRequestTypeID: func() bin.Object { return &ReadAllChatMentionsRequest{} }, - ReadAllMessageThreadMentionsRequestTypeID: func() bin.Object { return &ReadAllMessageThreadMentionsRequest{} }, - ReadAllChatReactionsRequestTypeID: func() bin.Object { return &ReadAllChatReactionsRequest{} }, - ReadAllMessageThreadReactionsRequestTypeID: func() bin.Object { return &ReadAllMessageThreadReactionsRequest{} }, - CreatePrivateChatRequestTypeID: func() bin.Object { return &CreatePrivateChatRequest{} }, - CreateBasicGroupChatRequestTypeID: func() bin.Object { return &CreateBasicGroupChatRequest{} }, - CreateSupergroupChatRequestTypeID: func() bin.Object { return &CreateSupergroupChatRequest{} }, - CreateSecretChatRequestTypeID: func() bin.Object { return &CreateSecretChatRequest{} }, - CreateNewBasicGroupChatRequestTypeID: func() bin.Object { return &CreateNewBasicGroupChatRequest{} }, - CreateNewSupergroupChatRequestTypeID: func() bin.Object { return &CreateNewSupergroupChatRequest{} }, - CreateNewSecretChatRequestTypeID: func() bin.Object { return &CreateNewSecretChatRequest{} }, - UpgradeBasicGroupChatToSupergroupChatRequestTypeID: func() bin.Object { return &UpgradeBasicGroupChatToSupergroupChatRequest{} }, - GetChatListsToAddChatRequestTypeID: func() bin.Object { return &GetChatListsToAddChatRequest{} }, - AddChatToListRequestTypeID: func() bin.Object { return &AddChatToListRequest{} }, - GetChatFolderRequestTypeID: func() bin.Object { return &GetChatFolderRequest{} }, - CreateChatFolderRequestTypeID: func() bin.Object { return &CreateChatFolderRequest{} }, - EditChatFolderRequestTypeID: func() bin.Object { return &EditChatFolderRequest{} }, - DeleteChatFolderRequestTypeID: func() bin.Object { return &DeleteChatFolderRequest{} }, - GetChatFolderChatsToLeaveRequestTypeID: func() bin.Object { return &GetChatFolderChatsToLeaveRequest{} }, - GetChatFolderChatCountRequestTypeID: func() bin.Object { return &GetChatFolderChatCountRequest{} }, - ReorderChatFoldersRequestTypeID: func() bin.Object { return &ReorderChatFoldersRequest{} }, - ToggleChatFolderTagsRequestTypeID: func() bin.Object { return &ToggleChatFolderTagsRequest{} }, - GetRecommendedChatFoldersRequestTypeID: func() bin.Object { return &GetRecommendedChatFoldersRequest{} }, - GetChatFolderDefaultIconNameRequestTypeID: func() bin.Object { return &GetChatFolderDefaultIconNameRequest{} }, - GetChatsForChatFolderInviteLinkRequestTypeID: func() bin.Object { return &GetChatsForChatFolderInviteLinkRequest{} }, - CreateChatFolderInviteLinkRequestTypeID: func() bin.Object { return &CreateChatFolderInviteLinkRequest{} }, - GetChatFolderInviteLinksRequestTypeID: func() bin.Object { return &GetChatFolderInviteLinksRequest{} }, - EditChatFolderInviteLinkRequestTypeID: func() bin.Object { return &EditChatFolderInviteLinkRequest{} }, - DeleteChatFolderInviteLinkRequestTypeID: func() bin.Object { return &DeleteChatFolderInviteLinkRequest{} }, - CheckChatFolderInviteLinkRequestTypeID: func() bin.Object { return &CheckChatFolderInviteLinkRequest{} }, - AddChatFolderByInviteLinkRequestTypeID: func() bin.Object { return &AddChatFolderByInviteLinkRequest{} }, - GetChatFolderNewChatsRequestTypeID: func() bin.Object { return &GetChatFolderNewChatsRequest{} }, - ProcessChatFolderNewChatsRequestTypeID: func() bin.Object { return &ProcessChatFolderNewChatsRequest{} }, - GetArchiveChatListSettingsRequestTypeID: func() bin.Object { return &GetArchiveChatListSettingsRequest{} }, - SetArchiveChatListSettingsRequestTypeID: func() bin.Object { return &SetArchiveChatListSettingsRequest{} }, - SetChatTitleRequestTypeID: func() bin.Object { return &SetChatTitleRequest{} }, - SetChatPhotoRequestTypeID: func() bin.Object { return &SetChatPhotoRequest{} }, - SetChatAccentColorRequestTypeID: func() bin.Object { return &SetChatAccentColorRequest{} }, - SetChatProfileAccentColorRequestTypeID: func() bin.Object { return &SetChatProfileAccentColorRequest{} }, - SetChatMessageAutoDeleteTimeRequestTypeID: func() bin.Object { return &SetChatMessageAutoDeleteTimeRequest{} }, - SetChatEmojiStatusRequestTypeID: func() bin.Object { return &SetChatEmojiStatusRequest{} }, - SetChatPermissionsRequestTypeID: func() bin.Object { return &SetChatPermissionsRequest{} }, - SetChatBackgroundRequestTypeID: func() bin.Object { return &SetChatBackgroundRequest{} }, - DeleteChatBackgroundRequestTypeID: func() bin.Object { return &DeleteChatBackgroundRequest{} }, - SetChatThemeRequestTypeID: func() bin.Object { return &SetChatThemeRequest{} }, - SetChatDraftMessageRequestTypeID: func() bin.Object { return &SetChatDraftMessageRequest{} }, - SetChatNotificationSettingsRequestTypeID: func() bin.Object { return &SetChatNotificationSettingsRequest{} }, - ToggleChatHasProtectedContentRequestTypeID: func() bin.Object { return &ToggleChatHasProtectedContentRequest{} }, - ToggleChatViewAsTopicsRequestTypeID: func() bin.Object { return &ToggleChatViewAsTopicsRequest{} }, - ToggleChatIsTranslatableRequestTypeID: func() bin.Object { return &ToggleChatIsTranslatableRequest{} }, - ToggleChatIsMarkedAsUnreadRequestTypeID: func() bin.Object { return &ToggleChatIsMarkedAsUnreadRequest{} }, - ToggleChatDefaultDisableNotificationRequestTypeID: func() bin.Object { return &ToggleChatDefaultDisableNotificationRequest{} }, - SetChatAvailableReactionsRequestTypeID: func() bin.Object { return &SetChatAvailableReactionsRequest{} }, - SetChatClientDataRequestTypeID: func() bin.Object { return &SetChatClientDataRequest{} }, - SetChatDescriptionRequestTypeID: func() bin.Object { return &SetChatDescriptionRequest{} }, - SetChatDiscussionGroupRequestTypeID: func() bin.Object { return &SetChatDiscussionGroupRequest{} }, - SetChatLocationRequestTypeID: func() bin.Object { return &SetChatLocationRequest{} }, - SetChatSlowModeDelayRequestTypeID: func() bin.Object { return &SetChatSlowModeDelayRequest{} }, - PinChatMessageRequestTypeID: func() bin.Object { return &PinChatMessageRequest{} }, - UnpinChatMessageRequestTypeID: func() bin.Object { return &UnpinChatMessageRequest{} }, - UnpinAllChatMessagesRequestTypeID: func() bin.Object { return &UnpinAllChatMessagesRequest{} }, - UnpinAllMessageThreadMessagesRequestTypeID: func() bin.Object { return &UnpinAllMessageThreadMessagesRequest{} }, - JoinChatRequestTypeID: func() bin.Object { return &JoinChatRequest{} }, - LeaveChatRequestTypeID: func() bin.Object { return &LeaveChatRequest{} }, - AddChatMemberRequestTypeID: func() bin.Object { return &AddChatMemberRequest{} }, - AddChatMembersRequestTypeID: func() bin.Object { return &AddChatMembersRequest{} }, - SetChatMemberStatusRequestTypeID: func() bin.Object { return &SetChatMemberStatusRequest{} }, - BanChatMemberRequestTypeID: func() bin.Object { return &BanChatMemberRequest{} }, - CanTransferOwnershipRequestTypeID: func() bin.Object { return &CanTransferOwnershipRequest{} }, - TransferChatOwnershipRequestTypeID: func() bin.Object { return &TransferChatOwnershipRequest{} }, - GetChatMemberRequestTypeID: func() bin.Object { return &GetChatMemberRequest{} }, - SearchChatMembersRequestTypeID: func() bin.Object { return &SearchChatMembersRequest{} }, - GetChatAdministratorsRequestTypeID: func() bin.Object { return &GetChatAdministratorsRequest{} }, - ClearAllDraftMessagesRequestTypeID: func() bin.Object { return &ClearAllDraftMessagesRequest{} }, - GetSavedNotificationSoundRequestTypeID: func() bin.Object { return &GetSavedNotificationSoundRequest{} }, - GetSavedNotificationSoundsRequestTypeID: func() bin.Object { return &GetSavedNotificationSoundsRequest{} }, - AddSavedNotificationSoundRequestTypeID: func() bin.Object { return &AddSavedNotificationSoundRequest{} }, - RemoveSavedNotificationSoundRequestTypeID: func() bin.Object { return &RemoveSavedNotificationSoundRequest{} }, - GetChatNotificationSettingsExceptionsRequestTypeID: func() bin.Object { return &GetChatNotificationSettingsExceptionsRequest{} }, - GetScopeNotificationSettingsRequestTypeID: func() bin.Object { return &GetScopeNotificationSettingsRequest{} }, - SetScopeNotificationSettingsRequestTypeID: func() bin.Object { return &SetScopeNotificationSettingsRequest{} }, - ResetAllNotificationSettingsRequestTypeID: func() bin.Object { return &ResetAllNotificationSettingsRequest{} }, - ToggleChatIsPinnedRequestTypeID: func() bin.Object { return &ToggleChatIsPinnedRequest{} }, - SetPinnedChatsRequestTypeID: func() bin.Object { return &SetPinnedChatsRequest{} }, - ReadChatListRequestTypeID: func() bin.Object { return &ReadChatListRequest{} }, - GetStoryRequestTypeID: func() bin.Object { return &GetStoryRequest{} }, - GetChatsToSendStoriesRequestTypeID: func() bin.Object { return &GetChatsToSendStoriesRequest{} }, - CanSendStoryRequestTypeID: func() bin.Object { return &CanSendStoryRequest{} }, - SendStoryRequestTypeID: func() bin.Object { return &SendStoryRequest{} }, - EditStoryRequestTypeID: func() bin.Object { return &EditStoryRequest{} }, - SetStoryPrivacySettingsRequestTypeID: func() bin.Object { return &SetStoryPrivacySettingsRequest{} }, - ToggleStoryIsPinnedRequestTypeID: func() bin.Object { return &ToggleStoryIsPinnedRequest{} }, - DeleteStoryRequestTypeID: func() bin.Object { return &DeleteStoryRequest{} }, - GetStoryNotificationSettingsExceptionsRequestTypeID: func() bin.Object { return &GetStoryNotificationSettingsExceptionsRequest{} }, - LoadActiveStoriesRequestTypeID: func() bin.Object { return &LoadActiveStoriesRequest{} }, - SetChatActiveStoriesListRequestTypeID: func() bin.Object { return &SetChatActiveStoriesListRequest{} }, - GetChatActiveStoriesRequestTypeID: func() bin.Object { return &GetChatActiveStoriesRequest{} }, - GetChatPinnedStoriesRequestTypeID: func() bin.Object { return &GetChatPinnedStoriesRequest{} }, - GetChatArchivedStoriesRequestTypeID: func() bin.Object { return &GetChatArchivedStoriesRequest{} }, - OpenStoryRequestTypeID: func() bin.Object { return &OpenStoryRequest{} }, - CloseStoryRequestTypeID: func() bin.Object { return &CloseStoryRequest{} }, - GetStoryAvailableReactionsRequestTypeID: func() bin.Object { return &GetStoryAvailableReactionsRequest{} }, - SetStoryReactionRequestTypeID: func() bin.Object { return &SetStoryReactionRequest{} }, - GetStoryInteractionsRequestTypeID: func() bin.Object { return &GetStoryInteractionsRequest{} }, - GetChatStoryInteractionsRequestTypeID: func() bin.Object { return &GetChatStoryInteractionsRequest{} }, - ReportStoryRequestTypeID: func() bin.Object { return &ReportStoryRequest{} }, - ActivateStoryStealthModeRequestTypeID: func() bin.Object { return &ActivateStoryStealthModeRequest{} }, - GetStoryPublicForwardsRequestTypeID: func() bin.Object { return &GetStoryPublicForwardsRequest{} }, - GetChatBoostLevelFeaturesRequestTypeID: func() bin.Object { return &GetChatBoostLevelFeaturesRequest{} }, - GetChatBoostFeaturesRequestTypeID: func() bin.Object { return &GetChatBoostFeaturesRequest{} }, - GetAvailableChatBoostSlotsRequestTypeID: func() bin.Object { return &GetAvailableChatBoostSlotsRequest{} }, - GetChatBoostStatusRequestTypeID: func() bin.Object { return &GetChatBoostStatusRequest{} }, - BoostChatRequestTypeID: func() bin.Object { return &BoostChatRequest{} }, - GetChatBoostLinkRequestTypeID: func() bin.Object { return &GetChatBoostLinkRequest{} }, - GetChatBoostLinkInfoRequestTypeID: func() bin.Object { return &GetChatBoostLinkInfoRequest{} }, - GetChatBoostsRequestTypeID: func() bin.Object { return &GetChatBoostsRequest{} }, - GetUserChatBoostsRequestTypeID: func() bin.Object { return &GetUserChatBoostsRequest{} }, - GetAttachmentMenuBotRequestTypeID: func() bin.Object { return &GetAttachmentMenuBotRequest{} }, - ToggleBotIsAddedToAttachmentMenuRequestTypeID: func() bin.Object { return &ToggleBotIsAddedToAttachmentMenuRequest{} }, - GetThemedEmojiStatusesRequestTypeID: func() bin.Object { return &GetThemedEmojiStatusesRequest{} }, - GetRecentEmojiStatusesRequestTypeID: func() bin.Object { return &GetRecentEmojiStatusesRequest{} }, - GetDefaultEmojiStatusesRequestTypeID: func() bin.Object { return &GetDefaultEmojiStatusesRequest{} }, - ClearRecentEmojiStatusesRequestTypeID: func() bin.Object { return &ClearRecentEmojiStatusesRequest{} }, - GetThemedChatEmojiStatusesRequestTypeID: func() bin.Object { return &GetThemedChatEmojiStatusesRequest{} }, - GetDefaultChatEmojiStatusesRequestTypeID: func() bin.Object { return &GetDefaultChatEmojiStatusesRequest{} }, - GetDisallowedChatEmojiStatusesRequestTypeID: func() bin.Object { return &GetDisallowedChatEmojiStatusesRequest{} }, - DownloadFileRequestTypeID: func() bin.Object { return &DownloadFileRequest{} }, - GetFileDownloadedPrefixSizeRequestTypeID: func() bin.Object { return &GetFileDownloadedPrefixSizeRequest{} }, - CancelDownloadFileRequestTypeID: func() bin.Object { return &CancelDownloadFileRequest{} }, - GetSuggestedFileNameRequestTypeID: func() bin.Object { return &GetSuggestedFileNameRequest{} }, - PreliminaryUploadFileRequestTypeID: func() bin.Object { return &PreliminaryUploadFileRequest{} }, - CancelPreliminaryUploadFileRequestTypeID: func() bin.Object { return &CancelPreliminaryUploadFileRequest{} }, - WriteGeneratedFilePartRequestTypeID: func() bin.Object { return &WriteGeneratedFilePartRequest{} }, - SetFileGenerationProgressRequestTypeID: func() bin.Object { return &SetFileGenerationProgressRequest{} }, - FinishFileGenerationRequestTypeID: func() bin.Object { return &FinishFileGenerationRequest{} }, - ReadFilePartRequestTypeID: func() bin.Object { return &ReadFilePartRequest{} }, - DeleteFileRequestTypeID: func() bin.Object { return &DeleteFileRequest{} }, - AddFileToDownloadsRequestTypeID: func() bin.Object { return &AddFileToDownloadsRequest{} }, - ToggleDownloadIsPausedRequestTypeID: func() bin.Object { return &ToggleDownloadIsPausedRequest{} }, - ToggleAllDownloadsArePausedRequestTypeID: func() bin.Object { return &ToggleAllDownloadsArePausedRequest{} }, - RemoveFileFromDownloadsRequestTypeID: func() bin.Object { return &RemoveFileFromDownloadsRequest{} }, - RemoveAllFilesFromDownloadsRequestTypeID: func() bin.Object { return &RemoveAllFilesFromDownloadsRequest{} }, - SearchFileDownloadsRequestTypeID: func() bin.Object { return &SearchFileDownloadsRequest{} }, - GetMessageFileTypeRequestTypeID: func() bin.Object { return &GetMessageFileTypeRequest{} }, - GetMessageImportConfirmationTextRequestTypeID: func() bin.Object { return &GetMessageImportConfirmationTextRequest{} }, - ImportMessagesRequestTypeID: func() bin.Object { return &ImportMessagesRequest{} }, - ReplacePrimaryChatInviteLinkRequestTypeID: func() bin.Object { return &ReplacePrimaryChatInviteLinkRequest{} }, - CreateChatInviteLinkRequestTypeID: func() bin.Object { return &CreateChatInviteLinkRequest{} }, - EditChatInviteLinkRequestTypeID: func() bin.Object { return &EditChatInviteLinkRequest{} }, - GetChatInviteLinkRequestTypeID: func() bin.Object { return &GetChatInviteLinkRequest{} }, - GetChatInviteLinkCountsRequestTypeID: func() bin.Object { return &GetChatInviteLinkCountsRequest{} }, - GetChatInviteLinksRequestTypeID: func() bin.Object { return &GetChatInviteLinksRequest{} }, - GetChatInviteLinkMembersRequestTypeID: func() bin.Object { return &GetChatInviteLinkMembersRequest{} }, - RevokeChatInviteLinkRequestTypeID: func() bin.Object { return &RevokeChatInviteLinkRequest{} }, - DeleteRevokedChatInviteLinkRequestTypeID: func() bin.Object { return &DeleteRevokedChatInviteLinkRequest{} }, - DeleteAllRevokedChatInviteLinksRequestTypeID: func() bin.Object { return &DeleteAllRevokedChatInviteLinksRequest{} }, - CheckChatInviteLinkRequestTypeID: func() bin.Object { return &CheckChatInviteLinkRequest{} }, - JoinChatByInviteLinkRequestTypeID: func() bin.Object { return &JoinChatByInviteLinkRequest{} }, - GetChatJoinRequestsRequestTypeID: func() bin.Object { return &GetChatJoinRequestsRequest{} }, - ProcessChatJoinRequestRequestTypeID: func() bin.Object { return &ProcessChatJoinRequestRequest{} }, - ProcessChatJoinRequestsRequestTypeID: func() bin.Object { return &ProcessChatJoinRequestsRequest{} }, - CreateCallRequestTypeID: func() bin.Object { return &CreateCallRequest{} }, - AcceptCallRequestTypeID: func() bin.Object { return &AcceptCallRequest{} }, - SendCallSignalingDataRequestTypeID: func() bin.Object { return &SendCallSignalingDataRequest{} }, - DiscardCallRequestTypeID: func() bin.Object { return &DiscardCallRequest{} }, - SendCallRatingRequestTypeID: func() bin.Object { return &SendCallRatingRequest{} }, - SendCallDebugInformationRequestTypeID: func() bin.Object { return &SendCallDebugInformationRequest{} }, - SendCallLogRequestTypeID: func() bin.Object { return &SendCallLogRequest{} }, - GetVideoChatAvailableParticipantsRequestTypeID: func() bin.Object { return &GetVideoChatAvailableParticipantsRequest{} }, - SetVideoChatDefaultParticipantRequestTypeID: func() bin.Object { return &SetVideoChatDefaultParticipantRequest{} }, - CreateVideoChatRequestTypeID: func() bin.Object { return &CreateVideoChatRequest{} }, - GetVideoChatRtmpURLRequestTypeID: func() bin.Object { return &GetVideoChatRtmpURLRequest{} }, - ReplaceVideoChatRtmpURLRequestTypeID: func() bin.Object { return &ReplaceVideoChatRtmpURLRequest{} }, - GetGroupCallRequestTypeID: func() bin.Object { return &GetGroupCallRequest{} }, - StartScheduledGroupCallRequestTypeID: func() bin.Object { return &StartScheduledGroupCallRequest{} }, - ToggleGroupCallEnabledStartNotificationRequestTypeID: func() bin.Object { return &ToggleGroupCallEnabledStartNotificationRequest{} }, - JoinGroupCallRequestTypeID: func() bin.Object { return &JoinGroupCallRequest{} }, - StartGroupCallScreenSharingRequestTypeID: func() bin.Object { return &StartGroupCallScreenSharingRequest{} }, - ToggleGroupCallScreenSharingIsPausedRequestTypeID: func() bin.Object { return &ToggleGroupCallScreenSharingIsPausedRequest{} }, - EndGroupCallScreenSharingRequestTypeID: func() bin.Object { return &EndGroupCallScreenSharingRequest{} }, - SetGroupCallTitleRequestTypeID: func() bin.Object { return &SetGroupCallTitleRequest{} }, - ToggleGroupCallMuteNewParticipantsRequestTypeID: func() bin.Object { return &ToggleGroupCallMuteNewParticipantsRequest{} }, - InviteGroupCallParticipantsRequestTypeID: func() bin.Object { return &InviteGroupCallParticipantsRequest{} }, - GetGroupCallInviteLinkRequestTypeID: func() bin.Object { return &GetGroupCallInviteLinkRequest{} }, - RevokeGroupCallInviteLinkRequestTypeID: func() bin.Object { return &RevokeGroupCallInviteLinkRequest{} }, - StartGroupCallRecordingRequestTypeID: func() bin.Object { return &StartGroupCallRecordingRequest{} }, - EndGroupCallRecordingRequestTypeID: func() bin.Object { return &EndGroupCallRecordingRequest{} }, - ToggleGroupCallIsMyVideoPausedRequestTypeID: func() bin.Object { return &ToggleGroupCallIsMyVideoPausedRequest{} }, - ToggleGroupCallIsMyVideoEnabledRequestTypeID: func() bin.Object { return &ToggleGroupCallIsMyVideoEnabledRequest{} }, - SetGroupCallParticipantIsSpeakingRequestTypeID: func() bin.Object { return &SetGroupCallParticipantIsSpeakingRequest{} }, - ToggleGroupCallParticipantIsMutedRequestTypeID: func() bin.Object { return &ToggleGroupCallParticipantIsMutedRequest{} }, - SetGroupCallParticipantVolumeLevelRequestTypeID: func() bin.Object { return &SetGroupCallParticipantVolumeLevelRequest{} }, - ToggleGroupCallParticipantIsHandRaisedRequestTypeID: func() bin.Object { return &ToggleGroupCallParticipantIsHandRaisedRequest{} }, - LoadGroupCallParticipantsRequestTypeID: func() bin.Object { return &LoadGroupCallParticipantsRequest{} }, - LeaveGroupCallRequestTypeID: func() bin.Object { return &LeaveGroupCallRequest{} }, - EndGroupCallRequestTypeID: func() bin.Object { return &EndGroupCallRequest{} }, - GetGroupCallStreamsRequestTypeID: func() bin.Object { return &GetGroupCallStreamsRequest{} }, - GetGroupCallStreamSegmentRequestTypeID: func() bin.Object { return &GetGroupCallStreamSegmentRequest{} }, - SetMessageSenderBlockListRequestTypeID: func() bin.Object { return &SetMessageSenderBlockListRequest{} }, - BlockMessageSenderFromRepliesRequestTypeID: func() bin.Object { return &BlockMessageSenderFromRepliesRequest{} }, - GetBlockedMessageSendersRequestTypeID: func() bin.Object { return &GetBlockedMessageSendersRequest{} }, - AddContactRequestTypeID: func() bin.Object { return &AddContactRequest{} }, - ImportContactsRequestTypeID: func() bin.Object { return &ImportContactsRequest{} }, - GetContactsRequestTypeID: func() bin.Object { return &GetContactsRequest{} }, - SearchContactsRequestTypeID: func() bin.Object { return &SearchContactsRequest{} }, - RemoveContactsRequestTypeID: func() bin.Object { return &RemoveContactsRequest{} }, - GetImportedContactCountRequestTypeID: func() bin.Object { return &GetImportedContactCountRequest{} }, - ChangeImportedContactsRequestTypeID: func() bin.Object { return &ChangeImportedContactsRequest{} }, - ClearImportedContactsRequestTypeID: func() bin.Object { return &ClearImportedContactsRequest{} }, - SetCloseFriendsRequestTypeID: func() bin.Object { return &SetCloseFriendsRequest{} }, - GetCloseFriendsRequestTypeID: func() bin.Object { return &GetCloseFriendsRequest{} }, - SetUserPersonalProfilePhotoRequestTypeID: func() bin.Object { return &SetUserPersonalProfilePhotoRequest{} }, - SuggestUserProfilePhotoRequestTypeID: func() bin.Object { return &SuggestUserProfilePhotoRequest{} }, - SearchUserByPhoneNumberRequestTypeID: func() bin.Object { return &SearchUserByPhoneNumberRequest{} }, - SharePhoneNumberRequestTypeID: func() bin.Object { return &SharePhoneNumberRequest{} }, - GetUserProfilePhotosRequestTypeID: func() bin.Object { return &GetUserProfilePhotosRequest{} }, - GetStickersRequestTypeID: func() bin.Object { return &GetStickersRequest{} }, - GetAllStickerEmojisRequestTypeID: func() bin.Object { return &GetAllStickerEmojisRequest{} }, - SearchStickersRequestTypeID: func() bin.Object { return &SearchStickersRequest{} }, - GetPremiumStickersRequestTypeID: func() bin.Object { return &GetPremiumStickersRequest{} }, - GetInstalledStickerSetsRequestTypeID: func() bin.Object { return &GetInstalledStickerSetsRequest{} }, - GetArchivedStickerSetsRequestTypeID: func() bin.Object { return &GetArchivedStickerSetsRequest{} }, - GetTrendingStickerSetsRequestTypeID: func() bin.Object { return &GetTrendingStickerSetsRequest{} }, - GetAttachedStickerSetsRequestTypeID: func() bin.Object { return &GetAttachedStickerSetsRequest{} }, - GetStickerSetRequestTypeID: func() bin.Object { return &GetStickerSetRequest{} }, - SearchStickerSetRequestTypeID: func() bin.Object { return &SearchStickerSetRequest{} }, - SearchInstalledStickerSetsRequestTypeID: func() bin.Object { return &SearchInstalledStickerSetsRequest{} }, - SearchStickerSetsRequestTypeID: func() bin.Object { return &SearchStickerSetsRequest{} }, - ChangeStickerSetRequestTypeID: func() bin.Object { return &ChangeStickerSetRequest{} }, - ViewTrendingStickerSetsRequestTypeID: func() bin.Object { return &ViewTrendingStickerSetsRequest{} }, - ReorderInstalledStickerSetsRequestTypeID: func() bin.Object { return &ReorderInstalledStickerSetsRequest{} }, - GetRecentStickersRequestTypeID: func() bin.Object { return &GetRecentStickersRequest{} }, - AddRecentStickerRequestTypeID: func() bin.Object { return &AddRecentStickerRequest{} }, - RemoveRecentStickerRequestTypeID: func() bin.Object { return &RemoveRecentStickerRequest{} }, - ClearRecentStickersRequestTypeID: func() bin.Object { return &ClearRecentStickersRequest{} }, - GetFavoriteStickersRequestTypeID: func() bin.Object { return &GetFavoriteStickersRequest{} }, - AddFavoriteStickerRequestTypeID: func() bin.Object { return &AddFavoriteStickerRequest{} }, - RemoveFavoriteStickerRequestTypeID: func() bin.Object { return &RemoveFavoriteStickerRequest{} }, - GetStickerEmojisRequestTypeID: func() bin.Object { return &GetStickerEmojisRequest{} }, - SearchEmojisRequestTypeID: func() bin.Object { return &SearchEmojisRequest{} }, - GetKeywordEmojisRequestTypeID: func() bin.Object { return &GetKeywordEmojisRequest{} }, - GetEmojiCategoriesRequestTypeID: func() bin.Object { return &GetEmojiCategoriesRequest{} }, - GetAnimatedEmojiRequestTypeID: func() bin.Object { return &GetAnimatedEmojiRequest{} }, - GetEmojiSuggestionsURLRequestTypeID: func() bin.Object { return &GetEmojiSuggestionsURLRequest{} }, - GetCustomEmojiStickersRequestTypeID: func() bin.Object { return &GetCustomEmojiStickersRequest{} }, - GetDefaultChatPhotoCustomEmojiStickersRequestTypeID: func() bin.Object { return &GetDefaultChatPhotoCustomEmojiStickersRequest{} }, - GetDefaultProfilePhotoCustomEmojiStickersRequestTypeID: func() bin.Object { return &GetDefaultProfilePhotoCustomEmojiStickersRequest{} }, - GetDefaultBackgroundCustomEmojiStickersRequestTypeID: func() bin.Object { return &GetDefaultBackgroundCustomEmojiStickersRequest{} }, - GetSavedAnimationsRequestTypeID: func() bin.Object { return &GetSavedAnimationsRequest{} }, - AddSavedAnimationRequestTypeID: func() bin.Object { return &AddSavedAnimationRequest{} }, - RemoveSavedAnimationRequestTypeID: func() bin.Object { return &RemoveSavedAnimationRequest{} }, - GetRecentInlineBotsRequestTypeID: func() bin.Object { return &GetRecentInlineBotsRequest{} }, - SearchHashtagsRequestTypeID: func() bin.Object { return &SearchHashtagsRequest{} }, - RemoveRecentHashtagRequestTypeID: func() bin.Object { return &RemoveRecentHashtagRequest{} }, - GetWebPagePreviewRequestTypeID: func() bin.Object { return &GetWebPagePreviewRequest{} }, - GetWebPageInstantViewRequestTypeID: func() bin.Object { return &GetWebPageInstantViewRequest{} }, - SetProfilePhotoRequestTypeID: func() bin.Object { return &SetProfilePhotoRequest{} }, - DeleteProfilePhotoRequestTypeID: func() bin.Object { return &DeleteProfilePhotoRequest{} }, - SetAccentColorRequestTypeID: func() bin.Object { return &SetAccentColorRequest{} }, - SetProfileAccentColorRequestTypeID: func() bin.Object { return &SetProfileAccentColorRequest{} }, - SetNameRequestTypeID: func() bin.Object { return &SetNameRequest{} }, - SetBioRequestTypeID: func() bin.Object { return &SetBioRequest{} }, - SetUsernameRequestTypeID: func() bin.Object { return &SetUsernameRequest{} }, - ToggleUsernameIsActiveRequestTypeID: func() bin.Object { return &ToggleUsernameIsActiveRequest{} }, - ReorderActiveUsernamesRequestTypeID: func() bin.Object { return &ReorderActiveUsernamesRequest{} }, - SetEmojiStatusRequestTypeID: func() bin.Object { return &SetEmojiStatusRequest{} }, - SetLocationRequestTypeID: func() bin.Object { return &SetLocationRequest{} }, - SetBusinessLocationRequestTypeID: func() bin.Object { return &SetBusinessLocationRequest{} }, - SetBusinessOpeningHoursRequestTypeID: func() bin.Object { return &SetBusinessOpeningHoursRequest{} }, - SetBusinessGreetingMessageSettingsRequestTypeID: func() bin.Object { return &SetBusinessGreetingMessageSettingsRequest{} }, - SetBusinessAwayMessageSettingsRequestTypeID: func() bin.Object { return &SetBusinessAwayMessageSettingsRequest{} }, - ChangePhoneNumberRequestTypeID: func() bin.Object { return &ChangePhoneNumberRequest{} }, - ResendChangePhoneNumberCodeRequestTypeID: func() bin.Object { return &ResendChangePhoneNumberCodeRequest{} }, - CheckChangePhoneNumberCodeRequestTypeID: func() bin.Object { return &CheckChangePhoneNumberCodeRequest{} }, - GetBusinessConnectedBotRequestTypeID: func() bin.Object { return &GetBusinessConnectedBotRequest{} }, - SetBusinessConnectedBotRequestTypeID: func() bin.Object { return &SetBusinessConnectedBotRequest{} }, - DeleteBusinessConnectedBotRequestTypeID: func() bin.Object { return &DeleteBusinessConnectedBotRequest{} }, - GetUserLinkRequestTypeID: func() bin.Object { return &GetUserLinkRequest{} }, - SearchUserByTokenRequestTypeID: func() bin.Object { return &SearchUserByTokenRequest{} }, - SetCommandsRequestTypeID: func() bin.Object { return &SetCommandsRequest{} }, - DeleteCommandsRequestTypeID: func() bin.Object { return &DeleteCommandsRequest{} }, - GetCommandsRequestTypeID: func() bin.Object { return &GetCommandsRequest{} }, - SetMenuButtonRequestTypeID: func() bin.Object { return &SetMenuButtonRequest{} }, - GetMenuButtonRequestTypeID: func() bin.Object { return &GetMenuButtonRequest{} }, - SetDefaultGroupAdministratorRightsRequestTypeID: func() bin.Object { return &SetDefaultGroupAdministratorRightsRequest{} }, - SetDefaultChannelAdministratorRightsRequestTypeID: func() bin.Object { return &SetDefaultChannelAdministratorRightsRequest{} }, - CanBotSendMessagesRequestTypeID: func() bin.Object { return &CanBotSendMessagesRequest{} }, - AllowBotToSendMessagesRequestTypeID: func() bin.Object { return &AllowBotToSendMessagesRequest{} }, - SendWebAppCustomRequestRequestTypeID: func() bin.Object { return &SendWebAppCustomRequestRequest{} }, - SetBotNameRequestTypeID: func() bin.Object { return &SetBotNameRequest{} }, - GetBotNameRequestTypeID: func() bin.Object { return &GetBotNameRequest{} }, - SetBotProfilePhotoRequestTypeID: func() bin.Object { return &SetBotProfilePhotoRequest{} }, - ToggleBotUsernameIsActiveRequestTypeID: func() bin.Object { return &ToggleBotUsernameIsActiveRequest{} }, - ReorderBotActiveUsernamesRequestTypeID: func() bin.Object { return &ReorderBotActiveUsernamesRequest{} }, - SetBotInfoDescriptionRequestTypeID: func() bin.Object { return &SetBotInfoDescriptionRequest{} }, - GetBotInfoDescriptionRequestTypeID: func() bin.Object { return &GetBotInfoDescriptionRequest{} }, - SetBotInfoShortDescriptionRequestTypeID: func() bin.Object { return &SetBotInfoShortDescriptionRequest{} }, - GetBotInfoShortDescriptionRequestTypeID: func() bin.Object { return &GetBotInfoShortDescriptionRequest{} }, - GetActiveSessionsRequestTypeID: func() bin.Object { return &GetActiveSessionsRequest{} }, - TerminateSessionRequestTypeID: func() bin.Object { return &TerminateSessionRequest{} }, - TerminateAllOtherSessionsRequestTypeID: func() bin.Object { return &TerminateAllOtherSessionsRequest{} }, - ConfirmSessionRequestTypeID: func() bin.Object { return &ConfirmSessionRequest{} }, - ToggleSessionCanAcceptCallsRequestTypeID: func() bin.Object { return &ToggleSessionCanAcceptCallsRequest{} }, - ToggleSessionCanAcceptSecretChatsRequestTypeID: func() bin.Object { return &ToggleSessionCanAcceptSecretChatsRequest{} }, - SetInactiveSessionTTLRequestTypeID: func() bin.Object { return &SetInactiveSessionTTLRequest{} }, - GetConnectedWebsitesRequestTypeID: func() bin.Object { return &GetConnectedWebsitesRequest{} }, - DisconnectWebsiteRequestTypeID: func() bin.Object { return &DisconnectWebsiteRequest{} }, - DisconnectAllWebsitesRequestTypeID: func() bin.Object { return &DisconnectAllWebsitesRequest{} }, - SetSupergroupUsernameRequestTypeID: func() bin.Object { return &SetSupergroupUsernameRequest{} }, - ToggleSupergroupUsernameIsActiveRequestTypeID: func() bin.Object { return &ToggleSupergroupUsernameIsActiveRequest{} }, - DisableAllSupergroupUsernamesRequestTypeID: func() bin.Object { return &DisableAllSupergroupUsernamesRequest{} }, - ReorderSupergroupActiveUsernamesRequestTypeID: func() bin.Object { return &ReorderSupergroupActiveUsernamesRequest{} }, - SetSupergroupStickerSetRequestTypeID: func() bin.Object { return &SetSupergroupStickerSetRequest{} }, - SetSupergroupCustomEmojiStickerSetRequestTypeID: func() bin.Object { return &SetSupergroupCustomEmojiStickerSetRequest{} }, - SetSupergroupUnrestrictBoostCountRequestTypeID: func() bin.Object { return &SetSupergroupUnrestrictBoostCountRequest{} }, - ToggleSupergroupSignMessagesRequestTypeID: func() bin.Object { return &ToggleSupergroupSignMessagesRequest{} }, - ToggleSupergroupJoinToSendMessagesRequestTypeID: func() bin.Object { return &ToggleSupergroupJoinToSendMessagesRequest{} }, - ToggleSupergroupJoinByRequestRequestTypeID: func() bin.Object { return &ToggleSupergroupJoinByRequestRequest{} }, - ToggleSupergroupIsAllHistoryAvailableRequestTypeID: func() bin.Object { return &ToggleSupergroupIsAllHistoryAvailableRequest{} }, - ToggleSupergroupHasHiddenMembersRequestTypeID: func() bin.Object { return &ToggleSupergroupHasHiddenMembersRequest{} }, - ToggleSupergroupHasAggressiveAntiSpamEnabledRequestTypeID: func() bin.Object { return &ToggleSupergroupHasAggressiveAntiSpamEnabledRequest{} }, - ToggleSupergroupIsForumRequestTypeID: func() bin.Object { return &ToggleSupergroupIsForumRequest{} }, - ToggleSupergroupIsBroadcastGroupRequestTypeID: func() bin.Object { return &ToggleSupergroupIsBroadcastGroupRequest{} }, - ReportSupergroupSpamRequestTypeID: func() bin.Object { return &ReportSupergroupSpamRequest{} }, - ReportSupergroupAntiSpamFalsePositiveRequestTypeID: func() bin.Object { return &ReportSupergroupAntiSpamFalsePositiveRequest{} }, - GetSupergroupMembersRequestTypeID: func() bin.Object { return &GetSupergroupMembersRequest{} }, - CloseSecretChatRequestTypeID: func() bin.Object { return &CloseSecretChatRequest{} }, - GetChatEventLogRequestTypeID: func() bin.Object { return &GetChatEventLogRequest{} }, - GetTimeZonesRequestTypeID: func() bin.Object { return &GetTimeZonesRequest{} }, - GetPaymentFormRequestTypeID: func() bin.Object { return &GetPaymentFormRequest{} }, - ValidateOrderInfoRequestTypeID: func() bin.Object { return &ValidateOrderInfoRequest{} }, - SendPaymentFormRequestTypeID: func() bin.Object { return &SendPaymentFormRequest{} }, - GetPaymentReceiptRequestTypeID: func() bin.Object { return &GetPaymentReceiptRequest{} }, - GetSavedOrderInfoRequestTypeID: func() bin.Object { return &GetSavedOrderInfoRequest{} }, - DeleteSavedOrderInfoRequestTypeID: func() bin.Object { return &DeleteSavedOrderInfoRequest{} }, - DeleteSavedCredentialsRequestTypeID: func() bin.Object { return &DeleteSavedCredentialsRequest{} }, - CreateInvoiceLinkRequestTypeID: func() bin.Object { return &CreateInvoiceLinkRequest{} }, - GetSupportUserRequestTypeID: func() bin.Object { return &GetSupportUserRequest{} }, - GetBackgroundURLRequestTypeID: func() bin.Object { return &GetBackgroundURLRequest{} }, - SearchBackgroundRequestTypeID: func() bin.Object { return &SearchBackgroundRequest{} }, - SetDefaultBackgroundRequestTypeID: func() bin.Object { return &SetDefaultBackgroundRequest{} }, - DeleteDefaultBackgroundRequestTypeID: func() bin.Object { return &DeleteDefaultBackgroundRequest{} }, - GetInstalledBackgroundsRequestTypeID: func() bin.Object { return &GetInstalledBackgroundsRequest{} }, - RemoveInstalledBackgroundRequestTypeID: func() bin.Object { return &RemoveInstalledBackgroundRequest{} }, - ResetInstalledBackgroundsRequestTypeID: func() bin.Object { return &ResetInstalledBackgroundsRequest{} }, - GetLocalizationTargetInfoRequestTypeID: func() bin.Object { return &GetLocalizationTargetInfoRequest{} }, - GetLanguagePackInfoRequestTypeID: func() bin.Object { return &GetLanguagePackInfoRequest{} }, - GetLanguagePackStringsRequestTypeID: func() bin.Object { return &GetLanguagePackStringsRequest{} }, - SynchronizeLanguagePackRequestTypeID: func() bin.Object { return &SynchronizeLanguagePackRequest{} }, - AddCustomServerLanguagePackRequestTypeID: func() bin.Object { return &AddCustomServerLanguagePackRequest{} }, - SetCustomLanguagePackRequestTypeID: func() bin.Object { return &SetCustomLanguagePackRequest{} }, - EditCustomLanguagePackInfoRequestTypeID: func() bin.Object { return &EditCustomLanguagePackInfoRequest{} }, - SetCustomLanguagePackStringRequestTypeID: func() bin.Object { return &SetCustomLanguagePackStringRequest{} }, - DeleteLanguagePackRequestTypeID: func() bin.Object { return &DeleteLanguagePackRequest{} }, - RegisterDeviceRequestTypeID: func() bin.Object { return &RegisterDeviceRequest{} }, - ProcessPushNotificationRequestTypeID: func() bin.Object { return &ProcessPushNotificationRequest{} }, - GetPushReceiverIDRequestTypeID: func() bin.Object { return &GetPushReceiverIDRequest{} }, - GetRecentlyVisitedTMeURLsRequestTypeID: func() bin.Object { return &GetRecentlyVisitedTMeURLsRequest{} }, - SetUserPrivacySettingRulesRequestTypeID: func() bin.Object { return &SetUserPrivacySettingRulesRequest{} }, - GetUserPrivacySettingRulesRequestTypeID: func() bin.Object { return &GetUserPrivacySettingRulesRequest{} }, - SetReadDatePrivacySettingsRequestTypeID: func() bin.Object { return &SetReadDatePrivacySettingsRequest{} }, - GetReadDatePrivacySettingsRequestTypeID: func() bin.Object { return &GetReadDatePrivacySettingsRequest{} }, - SetNewChatPrivacySettingsRequestTypeID: func() bin.Object { return &SetNewChatPrivacySettingsRequest{} }, - GetNewChatPrivacySettingsRequestTypeID: func() bin.Object { return &GetNewChatPrivacySettingsRequest{} }, - CanSendMessageToUserRequestTypeID: func() bin.Object { return &CanSendMessageToUserRequest{} }, - GetOptionRequestTypeID: func() bin.Object { return &GetOptionRequest{} }, - SetOptionRequestTypeID: func() bin.Object { return &SetOptionRequest{} }, - SetAccountTTLRequestTypeID: func() bin.Object { return &SetAccountTTLRequest{} }, - GetAccountTTLRequestTypeID: func() bin.Object { return &GetAccountTTLRequest{} }, - DeleteAccountRequestTypeID: func() bin.Object { return &DeleteAccountRequest{} }, - SetDefaultMessageAutoDeleteTimeRequestTypeID: func() bin.Object { return &SetDefaultMessageAutoDeleteTimeRequest{} }, - GetDefaultMessageAutoDeleteTimeRequestTypeID: func() bin.Object { return &GetDefaultMessageAutoDeleteTimeRequest{} }, - RemoveChatActionBarRequestTypeID: func() bin.Object { return &RemoveChatActionBarRequest{} }, - ReportChatRequestTypeID: func() bin.Object { return &ReportChatRequest{} }, - ReportChatPhotoRequestTypeID: func() bin.Object { return &ReportChatPhotoRequest{} }, - ReportMessageReactionsRequestTypeID: func() bin.Object { return &ReportMessageReactionsRequest{} }, - GetChatStatisticsRequestTypeID: func() bin.Object { return &GetChatStatisticsRequest{} }, - GetMessageStatisticsRequestTypeID: func() bin.Object { return &GetMessageStatisticsRequest{} }, - GetMessagePublicForwardsRequestTypeID: func() bin.Object { return &GetMessagePublicForwardsRequest{} }, - GetStoryStatisticsRequestTypeID: func() bin.Object { return &GetStoryStatisticsRequest{} }, - GetStatisticalGraphRequestTypeID: func() bin.Object { return &GetStatisticalGraphRequest{} }, - GetStorageStatisticsRequestTypeID: func() bin.Object { return &GetStorageStatisticsRequest{} }, - GetStorageStatisticsFastRequestTypeID: func() bin.Object { return &GetStorageStatisticsFastRequest{} }, - GetDatabaseStatisticsRequestTypeID: func() bin.Object { return &GetDatabaseStatisticsRequest{} }, - OptimizeStorageRequestTypeID: func() bin.Object { return &OptimizeStorageRequest{} }, - SetNetworkTypeRequestTypeID: func() bin.Object { return &SetNetworkTypeRequest{} }, - GetNetworkStatisticsRequestTypeID: func() bin.Object { return &GetNetworkStatisticsRequest{} }, - AddNetworkStatisticsRequestTypeID: func() bin.Object { return &AddNetworkStatisticsRequest{} }, - ResetNetworkStatisticsRequestTypeID: func() bin.Object { return &ResetNetworkStatisticsRequest{} }, - GetAutoDownloadSettingsPresetsRequestTypeID: func() bin.Object { return &GetAutoDownloadSettingsPresetsRequest{} }, - SetAutoDownloadSettingsRequestTypeID: func() bin.Object { return &SetAutoDownloadSettingsRequest{} }, - GetAutosaveSettingsRequestTypeID: func() bin.Object { return &GetAutosaveSettingsRequest{} }, - SetAutosaveSettingsRequestTypeID: func() bin.Object { return &SetAutosaveSettingsRequest{} }, - ClearAutosaveSettingsExceptionsRequestTypeID: func() bin.Object { return &ClearAutosaveSettingsExceptionsRequest{} }, - GetBankCardInfoRequestTypeID: func() bin.Object { return &GetBankCardInfoRequest{} }, - GetPassportElementRequestTypeID: func() bin.Object { return &GetPassportElementRequest{} }, - GetAllPassportElementsRequestTypeID: func() bin.Object { return &GetAllPassportElementsRequest{} }, - SetPassportElementRequestTypeID: func() bin.Object { return &SetPassportElementRequest{} }, - DeletePassportElementRequestTypeID: func() bin.Object { return &DeletePassportElementRequest{} }, - SetPassportElementErrorsRequestTypeID: func() bin.Object { return &SetPassportElementErrorsRequest{} }, - GetPreferredCountryLanguageRequestTypeID: func() bin.Object { return &GetPreferredCountryLanguageRequest{} }, - SendPhoneNumberVerificationCodeRequestTypeID: func() bin.Object { return &SendPhoneNumberVerificationCodeRequest{} }, - ResendPhoneNumberVerificationCodeRequestTypeID: func() bin.Object { return &ResendPhoneNumberVerificationCodeRequest{} }, - CheckPhoneNumberVerificationCodeRequestTypeID: func() bin.Object { return &CheckPhoneNumberVerificationCodeRequest{} }, - SendEmailAddressVerificationCodeRequestTypeID: func() bin.Object { return &SendEmailAddressVerificationCodeRequest{} }, - ResendEmailAddressVerificationCodeRequestTypeID: func() bin.Object { return &ResendEmailAddressVerificationCodeRequest{} }, - CheckEmailAddressVerificationCodeRequestTypeID: func() bin.Object { return &CheckEmailAddressVerificationCodeRequest{} }, - GetPassportAuthorizationFormRequestTypeID: func() bin.Object { return &GetPassportAuthorizationFormRequest{} }, - GetPassportAuthorizationFormAvailableElementsRequestTypeID: func() bin.Object { return &GetPassportAuthorizationFormAvailableElementsRequest{} }, - SendPassportAuthorizationFormRequestTypeID: func() bin.Object { return &SendPassportAuthorizationFormRequest{} }, - SendPhoneNumberConfirmationCodeRequestTypeID: func() bin.Object { return &SendPhoneNumberConfirmationCodeRequest{} }, - ResendPhoneNumberConfirmationCodeRequestTypeID: func() bin.Object { return &ResendPhoneNumberConfirmationCodeRequest{} }, - CheckPhoneNumberConfirmationCodeRequestTypeID: func() bin.Object { return &CheckPhoneNumberConfirmationCodeRequest{} }, - SetBotUpdatesStatusRequestTypeID: func() bin.Object { return &SetBotUpdatesStatusRequest{} }, - UploadStickerFileRequestTypeID: func() bin.Object { return &UploadStickerFileRequest{} }, - GetSuggestedStickerSetNameRequestTypeID: func() bin.Object { return &GetSuggestedStickerSetNameRequest{} }, - CheckStickerSetNameRequestTypeID: func() bin.Object { return &CheckStickerSetNameRequest{} }, - CreateNewStickerSetRequestTypeID: func() bin.Object { return &CreateNewStickerSetRequest{} }, - AddStickerToSetRequestTypeID: func() bin.Object { return &AddStickerToSetRequest{} }, - SetStickerSetThumbnailRequestTypeID: func() bin.Object { return &SetStickerSetThumbnailRequest{} }, - SetCustomEmojiStickerSetThumbnailRequestTypeID: func() bin.Object { return &SetCustomEmojiStickerSetThumbnailRequest{} }, - SetStickerSetTitleRequestTypeID: func() bin.Object { return &SetStickerSetTitleRequest{} }, - DeleteStickerSetRequestTypeID: func() bin.Object { return &DeleteStickerSetRequest{} }, - SetStickerPositionInSetRequestTypeID: func() bin.Object { return &SetStickerPositionInSetRequest{} }, - RemoveStickerFromSetRequestTypeID: func() bin.Object { return &RemoveStickerFromSetRequest{} }, - SetStickerEmojisRequestTypeID: func() bin.Object { return &SetStickerEmojisRequest{} }, - SetStickerKeywordsRequestTypeID: func() bin.Object { return &SetStickerKeywordsRequest{} }, - SetStickerMaskPositionRequestTypeID: func() bin.Object { return &SetStickerMaskPositionRequest{} }, - GetMapThumbnailFileRequestTypeID: func() bin.Object { return &GetMapThumbnailFileRequest{} }, - GetPremiumLimitRequestTypeID: func() bin.Object { return &GetPremiumLimitRequest{} }, - GetPremiumFeaturesRequestTypeID: func() bin.Object { return &GetPremiumFeaturesRequest{} }, - GetPremiumStickerExamplesRequestTypeID: func() bin.Object { return &GetPremiumStickerExamplesRequest{} }, - ViewPremiumFeatureRequestTypeID: func() bin.Object { return &ViewPremiumFeatureRequest{} }, - ClickPremiumSubscriptionButtonRequestTypeID: func() bin.Object { return &ClickPremiumSubscriptionButtonRequest{} }, - GetPremiumStateRequestTypeID: func() bin.Object { return &GetPremiumStateRequest{} }, - GetPremiumGiftCodePaymentOptionsRequestTypeID: func() bin.Object { return &GetPremiumGiftCodePaymentOptionsRequest{} }, - CheckPremiumGiftCodeRequestTypeID: func() bin.Object { return &CheckPremiumGiftCodeRequest{} }, - ApplyPremiumGiftCodeRequestTypeID: func() bin.Object { return &ApplyPremiumGiftCodeRequest{} }, - LaunchPrepaidPremiumGiveawayRequestTypeID: func() bin.Object { return &LaunchPrepaidPremiumGiveawayRequest{} }, - GetPremiumGiveawayInfoRequestTypeID: func() bin.Object { return &GetPremiumGiveawayInfoRequest{} }, - CanPurchasePremiumRequestTypeID: func() bin.Object { return &CanPurchasePremiumRequest{} }, - AssignAppStoreTransactionRequestTypeID: func() bin.Object { return &AssignAppStoreTransactionRequest{} }, - AssignGooglePlayTransactionRequestTypeID: func() bin.Object { return &AssignGooglePlayTransactionRequest{} }, - AcceptTermsOfServiceRequestTypeID: func() bin.Object { return &AcceptTermsOfServiceRequest{} }, - SearchStringsByPrefixRequestTypeID: func() bin.Object { return &SearchStringsByPrefixRequest{} }, - SendCustomRequestRequestTypeID: func() bin.Object { return &SendCustomRequestRequest{} }, - AnswerCustomQueryRequestTypeID: func() bin.Object { return &AnswerCustomQueryRequest{} }, - SetAlarmRequestTypeID: func() bin.Object { return &SetAlarmRequest{} }, - GetCountriesRequestTypeID: func() bin.Object { return &GetCountriesRequest{} }, - GetCountryCodeRequestTypeID: func() bin.Object { return &GetCountryCodeRequest{} }, - GetPhoneNumberInfoRequestTypeID: func() bin.Object { return &GetPhoneNumberInfoRequest{} }, - GetPhoneNumberInfoSyncRequestTypeID: func() bin.Object { return &GetPhoneNumberInfoSyncRequest{} }, - GetDeepLinkInfoRequestTypeID: func() bin.Object { return &GetDeepLinkInfoRequest{} }, - GetApplicationConfigRequestTypeID: func() bin.Object { return &GetApplicationConfigRequest{} }, - SaveApplicationLogEventRequestTypeID: func() bin.Object { return &SaveApplicationLogEventRequest{} }, - GetApplicationDownloadLinkRequestTypeID: func() bin.Object { return &GetApplicationDownloadLinkRequest{} }, - AddProxyRequestTypeID: func() bin.Object { return &AddProxyRequest{} }, - EditProxyRequestTypeID: func() bin.Object { return &EditProxyRequest{} }, - EnableProxyRequestTypeID: func() bin.Object { return &EnableProxyRequest{} }, - DisableProxyRequestTypeID: func() bin.Object { return &DisableProxyRequest{} }, - RemoveProxyRequestTypeID: func() bin.Object { return &RemoveProxyRequest{} }, - GetProxiesRequestTypeID: func() bin.Object { return &GetProxiesRequest{} }, - GetProxyLinkRequestTypeID: func() bin.Object { return &GetProxyLinkRequest{} }, - PingProxyRequestTypeID: func() bin.Object { return &PingProxyRequest{} }, - SetLogStreamRequestTypeID: func() bin.Object { return &SetLogStreamRequest{} }, - GetLogStreamRequestTypeID: func() bin.Object { return &GetLogStreamRequest{} }, - SetLogVerbosityLevelRequestTypeID: func() bin.Object { return &SetLogVerbosityLevelRequest{} }, - GetLogVerbosityLevelRequestTypeID: func() bin.Object { return &GetLogVerbosityLevelRequest{} }, - GetLogTagsRequestTypeID: func() bin.Object { return &GetLogTagsRequest{} }, - SetLogTagVerbosityLevelRequestTypeID: func() bin.Object { return &SetLogTagVerbosityLevelRequest{} }, - GetLogTagVerbosityLevelRequestTypeID: func() bin.Object { return &GetLogTagVerbosityLevelRequest{} }, - AddLogMessageRequestTypeID: func() bin.Object { return &AddLogMessageRequest{} }, - GetUserSupportInfoRequestTypeID: func() bin.Object { return &GetUserSupportInfoRequest{} }, - SetUserSupportInfoRequestTypeID: func() bin.Object { return &SetUserSupportInfoRequest{} }, - GetSupportNameRequestTypeID: func() bin.Object { return &GetSupportNameRequest{} }, - TestCallEmptyRequestTypeID: func() bin.Object { return &TestCallEmptyRequest{} }, - TestCallStringRequestTypeID: func() bin.Object { return &TestCallStringRequest{} }, - TestCallBytesRequestTypeID: func() bin.Object { return &TestCallBytesRequest{} }, - TestCallVectorIntRequestTypeID: func() bin.Object { return &TestCallVectorIntRequest{} }, - TestCallVectorIntObjectRequestTypeID: func() bin.Object { return &TestCallVectorIntObjectRequest{} }, - TestCallVectorStringRequestTypeID: func() bin.Object { return &TestCallVectorStringRequest{} }, - TestCallVectorStringObjectRequestTypeID: func() bin.Object { return &TestCallVectorStringObjectRequest{} }, - TestSquareIntRequestTypeID: func() bin.Object { return &TestSquareIntRequest{} }, - TestNetworkRequestTypeID: func() bin.Object { return &TestNetworkRequest{} }, - TestProxyRequestTypeID: func() bin.Object { return &TestProxyRequest{} }, - TestGetDifferenceRequestTypeID: func() bin.Object { return &TestGetDifferenceRequest{} }, - TestUseUpdateRequestTypeID: func() bin.Object { return &TestUseUpdateRequest{} }, - TestReturnErrorRequestTypeID: func() bin.Object { return &TestReturnErrorRequest{} }, + SuggestedActionSetBirthdateTypeID: func() bin.Object { return &SuggestedActionSetBirthdate{} }, + CountTypeID: func() bin.Object { return &Count{} }, + TextTypeID: func() bin.Object { return &Text{} }, + SecondsTypeID: func() bin.Object { return &Seconds{} }, + FileDownloadedPrefixSizeTypeID: func() bin.Object { return &FileDownloadedPrefixSize{} }, + DeepLinkInfoTypeID: func() bin.Object { return &DeepLinkInfo{} }, + TextParseModeMarkdownTypeID: func() bin.Object { return &TextParseModeMarkdown{} }, + TextParseModeHTMLTypeID: func() bin.Object { return &TextParseModeHTML{} }, + ProxyTypeSocks5TypeID: func() bin.Object { return &ProxyTypeSocks5{} }, + ProxyTypeHTTPTypeID: func() bin.Object { return &ProxyTypeHTTP{} }, + ProxyTypeMtprotoTypeID: func() bin.Object { return &ProxyTypeMtproto{} }, + ProxyTypeID: func() bin.Object { return &Proxy{} }, + ProxiesTypeID: func() bin.Object { return &Proxies{} }, + InputStickerTypeID: func() bin.Object { return &InputSticker{} }, + DateRangeTypeID: func() bin.Object { return &DateRange{} }, + StatisticalValueTypeID: func() bin.Object { return &StatisticalValue{} }, + StatisticalGraphDataTypeID: func() bin.Object { return &StatisticalGraphData{} }, + StatisticalGraphAsyncTypeID: func() bin.Object { return &StatisticalGraphAsync{} }, + StatisticalGraphErrorTypeID: func() bin.Object { return &StatisticalGraphError{} }, + ChatStatisticsObjectTypeMessageTypeID: func() bin.Object { return &ChatStatisticsObjectTypeMessage{} }, + ChatStatisticsObjectTypeStoryTypeID: func() bin.Object { return &ChatStatisticsObjectTypeStory{} }, + ChatStatisticsInteractionInfoTypeID: func() bin.Object { return &ChatStatisticsInteractionInfo{} }, + ChatStatisticsMessageSenderInfoTypeID: func() bin.Object { return &ChatStatisticsMessageSenderInfo{} }, + ChatStatisticsAdministratorActionsInfoTypeID: func() bin.Object { return &ChatStatisticsAdministratorActionsInfo{} }, + ChatStatisticsInviterInfoTypeID: func() bin.Object { return &ChatStatisticsInviterInfo{} }, + ChatStatisticsSupergroupTypeID: func() bin.Object { return &ChatStatisticsSupergroup{} }, + ChatStatisticsChannelTypeID: func() bin.Object { return &ChatStatisticsChannel{} }, + MessageStatisticsTypeID: func() bin.Object { return &MessageStatistics{} }, + StoryStatisticsTypeID: func() bin.Object { return &StoryStatistics{} }, + PointTypeID: func() bin.Object { return &Point{} }, + VectorPathCommandLineTypeID: func() bin.Object { return &VectorPathCommandLine{} }, + VectorPathCommandCubicBezierCurveTypeID: func() bin.Object { return &VectorPathCommandCubicBezierCurve{} }, + BotCommandScopeDefaultTypeID: func() bin.Object { return &BotCommandScopeDefault{} }, + BotCommandScopeAllPrivateChatsTypeID: func() bin.Object { return &BotCommandScopeAllPrivateChats{} }, + BotCommandScopeAllGroupChatsTypeID: func() bin.Object { return &BotCommandScopeAllGroupChats{} }, + BotCommandScopeAllChatAdministratorsTypeID: func() bin.Object { return &BotCommandScopeAllChatAdministrators{} }, + BotCommandScopeChatTypeID: func() bin.Object { return &BotCommandScopeChat{} }, + BotCommandScopeChatAdministratorsTypeID: func() bin.Object { return &BotCommandScopeChatAdministrators{} }, + BotCommandScopeChatMemberTypeID: func() bin.Object { return &BotCommandScopeChatMember{} }, + UpdateAuthorizationStateTypeID: func() bin.Object { return &UpdateAuthorizationState{} }, + UpdateNewMessageTypeID: func() bin.Object { return &UpdateNewMessage{} }, + UpdateMessageSendAcknowledgedTypeID: func() bin.Object { return &UpdateMessageSendAcknowledged{} }, + UpdateMessageSendSucceededTypeID: func() bin.Object { return &UpdateMessageSendSucceeded{} }, + UpdateMessageSendFailedTypeID: func() bin.Object { return &UpdateMessageSendFailed{} }, + UpdateMessageContentTypeID: func() bin.Object { return &UpdateMessageContent{} }, + UpdateMessageEditedTypeID: func() bin.Object { return &UpdateMessageEdited{} }, + UpdateMessageIsPinnedTypeID: func() bin.Object { return &UpdateMessageIsPinned{} }, + UpdateMessageInteractionInfoTypeID: func() bin.Object { return &UpdateMessageInteractionInfo{} }, + UpdateMessageContentOpenedTypeID: func() bin.Object { return &UpdateMessageContentOpened{} }, + UpdateMessageMentionReadTypeID: func() bin.Object { return &UpdateMessageMentionRead{} }, + UpdateMessageUnreadReactionsTypeID: func() bin.Object { return &UpdateMessageUnreadReactions{} }, + UpdateMessageLiveLocationViewedTypeID: func() bin.Object { return &UpdateMessageLiveLocationViewed{} }, + UpdateNewChatTypeID: func() bin.Object { return &UpdateNewChat{} }, + UpdateChatTitleTypeID: func() bin.Object { return &UpdateChatTitle{} }, + UpdateChatPhotoTypeID: func() bin.Object { return &UpdateChatPhoto{} }, + UpdateChatAccentColorsTypeID: func() bin.Object { return &UpdateChatAccentColors{} }, + UpdateChatPermissionsTypeID: func() bin.Object { return &UpdateChatPermissions{} }, + UpdateChatLastMessageTypeID: func() bin.Object { return &UpdateChatLastMessage{} }, + UpdateChatPositionTypeID: func() bin.Object { return &UpdateChatPosition{} }, + UpdateChatAddedToListTypeID: func() bin.Object { return &UpdateChatAddedToList{} }, + UpdateChatRemovedFromListTypeID: func() bin.Object { return &UpdateChatRemovedFromList{} }, + UpdateChatReadInboxTypeID: func() bin.Object { return &UpdateChatReadInbox{} }, + UpdateChatReadOutboxTypeID: func() bin.Object { return &UpdateChatReadOutbox{} }, + UpdateChatActionBarTypeID: func() bin.Object { return &UpdateChatActionBar{} }, + UpdateChatAvailableReactionsTypeID: func() bin.Object { return &UpdateChatAvailableReactions{} }, + UpdateChatDraftMessageTypeID: func() bin.Object { return &UpdateChatDraftMessage{} }, + UpdateChatEmojiStatusTypeID: func() bin.Object { return &UpdateChatEmojiStatus{} }, + UpdateChatMessageSenderTypeID: func() bin.Object { return &UpdateChatMessageSender{} }, + UpdateChatMessageAutoDeleteTimeTypeID: func() bin.Object { return &UpdateChatMessageAutoDeleteTime{} }, + UpdateChatNotificationSettingsTypeID: func() bin.Object { return &UpdateChatNotificationSettings{} }, + UpdateChatPendingJoinRequestsTypeID: func() bin.Object { return &UpdateChatPendingJoinRequests{} }, + UpdateChatReplyMarkupTypeID: func() bin.Object { return &UpdateChatReplyMarkup{} }, + UpdateChatBackgroundTypeID: func() bin.Object { return &UpdateChatBackground{} }, + UpdateChatThemeTypeID: func() bin.Object { return &UpdateChatTheme{} }, + UpdateChatUnreadMentionCountTypeID: func() bin.Object { return &UpdateChatUnreadMentionCount{} }, + UpdateChatUnreadReactionCountTypeID: func() bin.Object { return &UpdateChatUnreadReactionCount{} }, + UpdateChatVideoChatTypeID: func() bin.Object { return &UpdateChatVideoChat{} }, + UpdateChatDefaultDisableNotificationTypeID: func() bin.Object { return &UpdateChatDefaultDisableNotification{} }, + UpdateChatHasProtectedContentTypeID: func() bin.Object { return &UpdateChatHasProtectedContent{} }, + UpdateChatIsTranslatableTypeID: func() bin.Object { return &UpdateChatIsTranslatable{} }, + UpdateChatIsMarkedAsUnreadTypeID: func() bin.Object { return &UpdateChatIsMarkedAsUnread{} }, + UpdateChatViewAsTopicsTypeID: func() bin.Object { return &UpdateChatViewAsTopics{} }, + UpdateChatBlockListTypeID: func() bin.Object { return &UpdateChatBlockList{} }, + UpdateChatHasScheduledMessagesTypeID: func() bin.Object { return &UpdateChatHasScheduledMessages{} }, + UpdateChatFoldersTypeID: func() bin.Object { return &UpdateChatFolders{} }, + UpdateChatOnlineMemberCountTypeID: func() bin.Object { return &UpdateChatOnlineMemberCount{} }, + UpdateSavedMessagesTopicTypeID: func() bin.Object { return &UpdateSavedMessagesTopic{} }, + UpdateSavedMessagesTopicCountTypeID: func() bin.Object { return &UpdateSavedMessagesTopicCount{} }, + UpdateQuickReplyShortcutTypeID: func() bin.Object { return &UpdateQuickReplyShortcut{} }, + UpdateQuickReplyShortcutDeletedTypeID: func() bin.Object { return &UpdateQuickReplyShortcutDeleted{} }, + UpdateQuickReplyShortcutsTypeID: func() bin.Object { return &UpdateQuickReplyShortcuts{} }, + UpdateQuickReplyShortcutMessagesTypeID: func() bin.Object { return &UpdateQuickReplyShortcutMessages{} }, + UpdateForumTopicInfoTypeID: func() bin.Object { return &UpdateForumTopicInfo{} }, + UpdateScopeNotificationSettingsTypeID: func() bin.Object { return &UpdateScopeNotificationSettings{} }, + UpdateNotificationTypeID: func() bin.Object { return &UpdateNotification{} }, + UpdateNotificationGroupTypeID: func() bin.Object { return &UpdateNotificationGroup{} }, + UpdateActiveNotificationsTypeID: func() bin.Object { return &UpdateActiveNotifications{} }, + UpdateHavePendingNotificationsTypeID: func() bin.Object { return &UpdateHavePendingNotifications{} }, + UpdateDeleteMessagesTypeID: func() bin.Object { return &UpdateDeleteMessages{} }, + UpdateChatActionTypeID: func() bin.Object { return &UpdateChatAction{} }, + UpdateUserStatusTypeID: func() bin.Object { return &UpdateUserStatus{} }, + UpdateUserTypeID: func() bin.Object { return &UpdateUser{} }, + UpdateBasicGroupTypeID: func() bin.Object { return &UpdateBasicGroup{} }, + UpdateSupergroupTypeID: func() bin.Object { return &UpdateSupergroup{} }, + UpdateSecretChatTypeID: func() bin.Object { return &UpdateSecretChat{} }, + UpdateUserFullInfoTypeID: func() bin.Object { return &UpdateUserFullInfo{} }, + UpdateBasicGroupFullInfoTypeID: func() bin.Object { return &UpdateBasicGroupFullInfo{} }, + UpdateSupergroupFullInfoTypeID: func() bin.Object { return &UpdateSupergroupFullInfo{} }, + UpdateServiceNotificationTypeID: func() bin.Object { return &UpdateServiceNotification{} }, + UpdateFileTypeID: func() bin.Object { return &UpdateFile{} }, + UpdateFileGenerationStartTypeID: func() bin.Object { return &UpdateFileGenerationStart{} }, + UpdateFileGenerationStopTypeID: func() bin.Object { return &UpdateFileGenerationStop{} }, + UpdateFileDownloadsTypeID: func() bin.Object { return &UpdateFileDownloads{} }, + UpdateFileAddedToDownloadsTypeID: func() bin.Object { return &UpdateFileAddedToDownloads{} }, + UpdateFileDownloadTypeID: func() bin.Object { return &UpdateFileDownload{} }, + UpdateFileRemovedFromDownloadsTypeID: func() bin.Object { return &UpdateFileRemovedFromDownloads{} }, + UpdateCallTypeID: func() bin.Object { return &UpdateCall{} }, + UpdateGroupCallTypeID: func() bin.Object { return &UpdateGroupCall{} }, + UpdateGroupCallParticipantTypeID: func() bin.Object { return &UpdateGroupCallParticipant{} }, + UpdateNewCallSignalingDataTypeID: func() bin.Object { return &UpdateNewCallSignalingData{} }, + UpdateUserPrivacySettingRulesTypeID: func() bin.Object { return &UpdateUserPrivacySettingRules{} }, + UpdateUnreadMessageCountTypeID: func() bin.Object { return &UpdateUnreadMessageCount{} }, + UpdateUnreadChatCountTypeID: func() bin.Object { return &UpdateUnreadChatCount{} }, + UpdateStoryTypeID: func() bin.Object { return &UpdateStory{} }, + UpdateStoryDeletedTypeID: func() bin.Object { return &UpdateStoryDeleted{} }, + UpdateStorySendSucceededTypeID: func() bin.Object { return &UpdateStorySendSucceeded{} }, + UpdateStorySendFailedTypeID: func() bin.Object { return &UpdateStorySendFailed{} }, + UpdateChatActiveStoriesTypeID: func() bin.Object { return &UpdateChatActiveStories{} }, + UpdateStoryListChatCountTypeID: func() bin.Object { return &UpdateStoryListChatCount{} }, + UpdateStoryStealthModeTypeID: func() bin.Object { return &UpdateStoryStealthMode{} }, + UpdateOptionTypeID: func() bin.Object { return &UpdateOption{} }, + UpdateStickerSetTypeID: func() bin.Object { return &UpdateStickerSet{} }, + UpdateInstalledStickerSetsTypeID: func() bin.Object { return &UpdateInstalledStickerSets{} }, + UpdateTrendingStickerSetsTypeID: func() bin.Object { return &UpdateTrendingStickerSets{} }, + UpdateRecentStickersTypeID: func() bin.Object { return &UpdateRecentStickers{} }, + UpdateFavoriteStickersTypeID: func() bin.Object { return &UpdateFavoriteStickers{} }, + UpdateSavedAnimationsTypeID: func() bin.Object { return &UpdateSavedAnimations{} }, + UpdateSavedNotificationSoundsTypeID: func() bin.Object { return &UpdateSavedNotificationSounds{} }, + UpdateDefaultBackgroundTypeID: func() bin.Object { return &UpdateDefaultBackground{} }, + UpdateChatThemesTypeID: func() bin.Object { return &UpdateChatThemes{} }, + UpdateAccentColorsTypeID: func() bin.Object { return &UpdateAccentColors{} }, + UpdateProfileAccentColorsTypeID: func() bin.Object { return &UpdateProfileAccentColors{} }, + UpdateLanguagePackStringsTypeID: func() bin.Object { return &UpdateLanguagePackStrings{} }, + UpdateConnectionStateTypeID: func() bin.Object { return &UpdateConnectionState{} }, + UpdateTermsOfServiceTypeID: func() bin.Object { return &UpdateTermsOfService{} }, + UpdateUsersNearbyTypeID: func() bin.Object { return &UpdateUsersNearby{} }, + UpdateUnconfirmedSessionTypeID: func() bin.Object { return &UpdateUnconfirmedSession{} }, + UpdateAttachmentMenuBotsTypeID: func() bin.Object { return &UpdateAttachmentMenuBots{} }, + UpdateWebAppMessageSentTypeID: func() bin.Object { return &UpdateWebAppMessageSent{} }, + UpdateActiveEmojiReactionsTypeID: func() bin.Object { return &UpdateActiveEmojiReactions{} }, + UpdateDefaultReactionTypeTypeID: func() bin.Object { return &UpdateDefaultReactionType{} }, + UpdateSavedMessagesTagsTypeID: func() bin.Object { return &UpdateSavedMessagesTags{} }, + UpdateSpeechRecognitionTrialTypeID: func() bin.Object { return &UpdateSpeechRecognitionTrial{} }, + UpdateDiceEmojisTypeID: func() bin.Object { return &UpdateDiceEmojis{} }, + UpdateAnimatedEmojiMessageClickedTypeID: func() bin.Object { return &UpdateAnimatedEmojiMessageClicked{} }, + UpdateAnimationSearchParametersTypeID: func() bin.Object { return &UpdateAnimationSearchParameters{} }, + UpdateSuggestedActionsTypeID: func() bin.Object { return &UpdateSuggestedActions{} }, + UpdateContactCloseBirthdaysTypeID: func() bin.Object { return &UpdateContactCloseBirthdays{} }, + UpdateAddChatMembersPrivacyForbiddenTypeID: func() bin.Object { return &UpdateAddChatMembersPrivacyForbidden{} }, + UpdateAutosaveSettingsTypeID: func() bin.Object { return &UpdateAutosaveSettings{} }, + UpdateBusinessConnectionTypeID: func() bin.Object { return &UpdateBusinessConnection{} }, + UpdateNewBusinessMessageTypeID: func() bin.Object { return &UpdateNewBusinessMessage{} }, + UpdateBusinessMessageEditedTypeID: func() bin.Object { return &UpdateBusinessMessageEdited{} }, + UpdateBusinessMessagesDeletedTypeID: func() bin.Object { return &UpdateBusinessMessagesDeleted{} }, + UpdateNewInlineQueryTypeID: func() bin.Object { return &UpdateNewInlineQuery{} }, + UpdateNewChosenInlineResultTypeID: func() bin.Object { return &UpdateNewChosenInlineResult{} }, + UpdateNewCallbackQueryTypeID: func() bin.Object { return &UpdateNewCallbackQuery{} }, + UpdateNewInlineCallbackQueryTypeID: func() bin.Object { return &UpdateNewInlineCallbackQuery{} }, + UpdateNewShippingQueryTypeID: func() bin.Object { return &UpdateNewShippingQuery{} }, + UpdateNewPreCheckoutQueryTypeID: func() bin.Object { return &UpdateNewPreCheckoutQuery{} }, + UpdateNewCustomEventTypeID: func() bin.Object { return &UpdateNewCustomEvent{} }, + UpdateNewCustomQueryTypeID: func() bin.Object { return &UpdateNewCustomQuery{} }, + UpdatePollTypeID: func() bin.Object { return &UpdatePoll{} }, + UpdatePollAnswerTypeID: func() bin.Object { return &UpdatePollAnswer{} }, + UpdateChatMemberTypeID: func() bin.Object { return &UpdateChatMember{} }, + UpdateNewChatJoinRequestTypeID: func() bin.Object { return &UpdateNewChatJoinRequest{} }, + UpdateChatBoostTypeID: func() bin.Object { return &UpdateChatBoost{} }, + UpdateMessageReactionTypeID: func() bin.Object { return &UpdateMessageReaction{} }, + UpdateMessageReactionsTypeID: func() bin.Object { return &UpdateMessageReactions{} }, + UpdatesTypeID: func() bin.Object { return &Updates{} }, + LogStreamDefaultTypeID: func() bin.Object { return &LogStreamDefault{} }, + LogStreamFileTypeID: func() bin.Object { return &LogStreamFile{} }, + LogStreamEmptyTypeID: func() bin.Object { return &LogStreamEmpty{} }, + LogVerbosityLevelTypeID: func() bin.Object { return &LogVerbosityLevel{} }, + LogTagsTypeID: func() bin.Object { return &LogTags{} }, + UserSupportInfoTypeID: func() bin.Object { return &UserSupportInfo{} }, + TestIntTypeID: func() bin.Object { return &TestInt{} }, + TestStringTypeID: func() bin.Object { return &TestString{} }, + TestBytesTypeID: func() bin.Object { return &TestBytes{} }, + TestVectorIntTypeID: func() bin.Object { return &TestVectorInt{} }, + TestVectorIntObjectTypeID: func() bin.Object { return &TestVectorIntObject{} }, + TestVectorStringTypeID: func() bin.Object { return &TestVectorString{} }, + TestVectorStringObjectTypeID: func() bin.Object { return &TestVectorStringObject{} }, + GetAuthorizationStateRequestTypeID: func() bin.Object { return &GetAuthorizationStateRequest{} }, + SetTdlibParametersRequestTypeID: func() bin.Object { return &SetTdlibParametersRequest{} }, + SetAuthenticationPhoneNumberRequestTypeID: func() bin.Object { return &SetAuthenticationPhoneNumberRequest{} }, + SetAuthenticationEmailAddressRequestTypeID: func() bin.Object { return &SetAuthenticationEmailAddressRequest{} }, + ResendAuthenticationCodeRequestTypeID: func() bin.Object { return &ResendAuthenticationCodeRequest{} }, + CheckAuthenticationEmailCodeRequestTypeID: func() bin.Object { return &CheckAuthenticationEmailCodeRequest{} }, + CheckAuthenticationCodeRequestTypeID: func() bin.Object { return &CheckAuthenticationCodeRequest{} }, + RequestQrCodeAuthenticationRequestTypeID: func() bin.Object { return &RequestQrCodeAuthenticationRequest{} }, + RegisterUserRequestTypeID: func() bin.Object { return &RegisterUserRequest{} }, + ResetAuthenticationEmailAddressRequestTypeID: func() bin.Object { return &ResetAuthenticationEmailAddressRequest{} }, + CheckAuthenticationPasswordRequestTypeID: func() bin.Object { return &CheckAuthenticationPasswordRequest{} }, + RequestAuthenticationPasswordRecoveryRequestTypeID: func() bin.Object { return &RequestAuthenticationPasswordRecoveryRequest{} }, + CheckAuthenticationPasswordRecoveryCodeRequestTypeID: func() bin.Object { return &CheckAuthenticationPasswordRecoveryCodeRequest{} }, + RecoverAuthenticationPasswordRequestTypeID: func() bin.Object { return &RecoverAuthenticationPasswordRequest{} }, + SendAuthenticationFirebaseSMSRequestTypeID: func() bin.Object { return &SendAuthenticationFirebaseSMSRequest{} }, + CheckAuthenticationBotTokenRequestTypeID: func() bin.Object { return &CheckAuthenticationBotTokenRequest{} }, + LogOutRequestTypeID: func() bin.Object { return &LogOutRequest{} }, + CloseRequestTypeID: func() bin.Object { return &CloseRequest{} }, + DestroyRequestTypeID: func() bin.Object { return &DestroyRequest{} }, + ConfirmQrCodeAuthenticationRequestTypeID: func() bin.Object { return &ConfirmQrCodeAuthenticationRequest{} }, + GetCurrentStateRequestTypeID: func() bin.Object { return &GetCurrentStateRequest{} }, + SetDatabaseEncryptionKeyRequestTypeID: func() bin.Object { return &SetDatabaseEncryptionKeyRequest{} }, + GetPasswordStateRequestTypeID: func() bin.Object { return &GetPasswordStateRequest{} }, + SetPasswordRequestTypeID: func() bin.Object { return &SetPasswordRequest{} }, + SetLoginEmailAddressRequestTypeID: func() bin.Object { return &SetLoginEmailAddressRequest{} }, + ResendLoginEmailAddressCodeRequestTypeID: func() bin.Object { return &ResendLoginEmailAddressCodeRequest{} }, + CheckLoginEmailAddressCodeRequestTypeID: func() bin.Object { return &CheckLoginEmailAddressCodeRequest{} }, + GetRecoveryEmailAddressRequestTypeID: func() bin.Object { return &GetRecoveryEmailAddressRequest{} }, + SetRecoveryEmailAddressRequestTypeID: func() bin.Object { return &SetRecoveryEmailAddressRequest{} }, + CheckRecoveryEmailAddressCodeRequestTypeID: func() bin.Object { return &CheckRecoveryEmailAddressCodeRequest{} }, + ResendRecoveryEmailAddressCodeRequestTypeID: func() bin.Object { return &ResendRecoveryEmailAddressCodeRequest{} }, + CancelRecoveryEmailAddressVerificationRequestTypeID: func() bin.Object { return &CancelRecoveryEmailAddressVerificationRequest{} }, + RequestPasswordRecoveryRequestTypeID: func() bin.Object { return &RequestPasswordRecoveryRequest{} }, + CheckPasswordRecoveryCodeRequestTypeID: func() bin.Object { return &CheckPasswordRecoveryCodeRequest{} }, + RecoverPasswordRequestTypeID: func() bin.Object { return &RecoverPasswordRequest{} }, + ResetPasswordRequestTypeID: func() bin.Object { return &ResetPasswordRequest{} }, + CancelPasswordResetRequestTypeID: func() bin.Object { return &CancelPasswordResetRequest{} }, + CreateTemporaryPasswordRequestTypeID: func() bin.Object { return &CreateTemporaryPasswordRequest{} }, + GetTemporaryPasswordStateRequestTypeID: func() bin.Object { return &GetTemporaryPasswordStateRequest{} }, + GetMeRequestTypeID: func() bin.Object { return &GetMeRequest{} }, + GetUserRequestTypeID: func() bin.Object { return &GetUserRequest{} }, + GetUserFullInfoRequestTypeID: func() bin.Object { return &GetUserFullInfoRequest{} }, + GetBasicGroupRequestTypeID: func() bin.Object { return &GetBasicGroupRequest{} }, + GetBasicGroupFullInfoRequestTypeID: func() bin.Object { return &GetBasicGroupFullInfoRequest{} }, + GetSupergroupRequestTypeID: func() bin.Object { return &GetSupergroupRequest{} }, + GetSupergroupFullInfoRequestTypeID: func() bin.Object { return &GetSupergroupFullInfoRequest{} }, + GetSecretChatRequestTypeID: func() bin.Object { return &GetSecretChatRequest{} }, + GetChatRequestTypeID: func() bin.Object { return &GetChatRequest{} }, + GetMessageRequestTypeID: func() bin.Object { return &GetMessageRequest{} }, + GetMessageLocallyRequestTypeID: func() bin.Object { return &GetMessageLocallyRequest{} }, + GetRepliedMessageRequestTypeID: func() bin.Object { return &GetRepliedMessageRequest{} }, + GetChatPinnedMessageRequestTypeID: func() bin.Object { return &GetChatPinnedMessageRequest{} }, + GetCallbackQueryMessageRequestTypeID: func() bin.Object { return &GetCallbackQueryMessageRequest{} }, + GetMessagesRequestTypeID: func() bin.Object { return &GetMessagesRequest{} }, + GetMessageThreadRequestTypeID: func() bin.Object { return &GetMessageThreadRequest{} }, + GetMessageReadDateRequestTypeID: func() bin.Object { return &GetMessageReadDateRequest{} }, + GetMessageViewersRequestTypeID: func() bin.Object { return &GetMessageViewersRequest{} }, + GetFileRequestTypeID: func() bin.Object { return &GetFileRequest{} }, + GetRemoteFileRequestTypeID: func() bin.Object { return &GetRemoteFileRequest{} }, + LoadChatsRequestTypeID: func() bin.Object { return &LoadChatsRequest{} }, + GetChatsRequestTypeID: func() bin.Object { return &GetChatsRequest{} }, + SearchPublicChatRequestTypeID: func() bin.Object { return &SearchPublicChatRequest{} }, + SearchPublicChatsRequestTypeID: func() bin.Object { return &SearchPublicChatsRequest{} }, + SearchChatsRequestTypeID: func() bin.Object { return &SearchChatsRequest{} }, + SearchChatsOnServerRequestTypeID: func() bin.Object { return &SearchChatsOnServerRequest{} }, + SearchChatsNearbyRequestTypeID: func() bin.Object { return &SearchChatsNearbyRequest{} }, + GetChatSimilarChatsRequestTypeID: func() bin.Object { return &GetChatSimilarChatsRequest{} }, + GetChatSimilarChatCountRequestTypeID: func() bin.Object { return &GetChatSimilarChatCountRequest{} }, + OpenChatSimilarChatRequestTypeID: func() bin.Object { return &OpenChatSimilarChatRequest{} }, + GetTopChatsRequestTypeID: func() bin.Object { return &GetTopChatsRequest{} }, + RemoveTopChatRequestTypeID: func() bin.Object { return &RemoveTopChatRequest{} }, + SearchRecentlyFoundChatsRequestTypeID: func() bin.Object { return &SearchRecentlyFoundChatsRequest{} }, + AddRecentlyFoundChatRequestTypeID: func() bin.Object { return &AddRecentlyFoundChatRequest{} }, + RemoveRecentlyFoundChatRequestTypeID: func() bin.Object { return &RemoveRecentlyFoundChatRequest{} }, + ClearRecentlyFoundChatsRequestTypeID: func() bin.Object { return &ClearRecentlyFoundChatsRequest{} }, + GetRecentlyOpenedChatsRequestTypeID: func() bin.Object { return &GetRecentlyOpenedChatsRequest{} }, + CheckChatUsernameRequestTypeID: func() bin.Object { return &CheckChatUsernameRequest{} }, + GetCreatedPublicChatsRequestTypeID: func() bin.Object { return &GetCreatedPublicChatsRequest{} }, + CheckCreatedPublicChatsLimitRequestTypeID: func() bin.Object { return &CheckCreatedPublicChatsLimitRequest{} }, + GetSuitableDiscussionChatsRequestTypeID: func() bin.Object { return &GetSuitableDiscussionChatsRequest{} }, + GetInactiveSupergroupChatsRequestTypeID: func() bin.Object { return &GetInactiveSupergroupChatsRequest{} }, + GetSuitablePersonalChatsRequestTypeID: func() bin.Object { return &GetSuitablePersonalChatsRequest{} }, + LoadSavedMessagesTopicsRequestTypeID: func() bin.Object { return &LoadSavedMessagesTopicsRequest{} }, + GetSavedMessagesTopicHistoryRequestTypeID: func() bin.Object { return &GetSavedMessagesTopicHistoryRequest{} }, + GetSavedMessagesTopicMessageByDateRequestTypeID: func() bin.Object { return &GetSavedMessagesTopicMessageByDateRequest{} }, + DeleteSavedMessagesTopicHistoryRequestTypeID: func() bin.Object { return &DeleteSavedMessagesTopicHistoryRequest{} }, + DeleteSavedMessagesTopicMessagesByDateRequestTypeID: func() bin.Object { return &DeleteSavedMessagesTopicMessagesByDateRequest{} }, + ToggleSavedMessagesTopicIsPinnedRequestTypeID: func() bin.Object { return &ToggleSavedMessagesTopicIsPinnedRequest{} }, + SetPinnedSavedMessagesTopicsRequestTypeID: func() bin.Object { return &SetPinnedSavedMessagesTopicsRequest{} }, + GetGroupsInCommonRequestTypeID: func() bin.Object { return &GetGroupsInCommonRequest{} }, + GetChatHistoryRequestTypeID: func() bin.Object { return &GetChatHistoryRequest{} }, + GetMessageThreadHistoryRequestTypeID: func() bin.Object { return &GetMessageThreadHistoryRequest{} }, + DeleteChatHistoryRequestTypeID: func() bin.Object { return &DeleteChatHistoryRequest{} }, + DeleteChatRequestTypeID: func() bin.Object { return &DeleteChatRequest{} }, + SearchChatMessagesRequestTypeID: func() bin.Object { return &SearchChatMessagesRequest{} }, + SearchMessagesRequestTypeID: func() bin.Object { return &SearchMessagesRequest{} }, + SearchSecretMessagesRequestTypeID: func() bin.Object { return &SearchSecretMessagesRequest{} }, + SearchSavedMessagesRequestTypeID: func() bin.Object { return &SearchSavedMessagesRequest{} }, + SearchCallMessagesRequestTypeID: func() bin.Object { return &SearchCallMessagesRequest{} }, + SearchOutgoingDocumentMessagesRequestTypeID: func() bin.Object { return &SearchOutgoingDocumentMessagesRequest{} }, + DeleteAllCallMessagesRequestTypeID: func() bin.Object { return &DeleteAllCallMessagesRequest{} }, + SearchChatRecentLocationMessagesRequestTypeID: func() bin.Object { return &SearchChatRecentLocationMessagesRequest{} }, + GetActiveLiveLocationMessagesRequestTypeID: func() bin.Object { return &GetActiveLiveLocationMessagesRequest{} }, + GetChatMessageByDateRequestTypeID: func() bin.Object { return &GetChatMessageByDateRequest{} }, + GetChatSparseMessagePositionsRequestTypeID: func() bin.Object { return &GetChatSparseMessagePositionsRequest{} }, + GetChatMessageCalendarRequestTypeID: func() bin.Object { return &GetChatMessageCalendarRequest{} }, + GetChatMessageCountRequestTypeID: func() bin.Object { return &GetChatMessageCountRequest{} }, + GetChatMessagePositionRequestTypeID: func() bin.Object { return &GetChatMessagePositionRequest{} }, + GetChatScheduledMessagesRequestTypeID: func() bin.Object { return &GetChatScheduledMessagesRequest{} }, + GetChatSponsoredMessagesRequestTypeID: func() bin.Object { return &GetChatSponsoredMessagesRequest{} }, + ClickChatSponsoredMessageRequestTypeID: func() bin.Object { return &ClickChatSponsoredMessageRequest{} }, + ReportChatSponsoredMessageRequestTypeID: func() bin.Object { return &ReportChatSponsoredMessageRequest{} }, + RemoveNotificationRequestTypeID: func() bin.Object { return &RemoveNotificationRequest{} }, + RemoveNotificationGroupRequestTypeID: func() bin.Object { return &RemoveNotificationGroupRequest{} }, + GetMessageLinkRequestTypeID: func() bin.Object { return &GetMessageLinkRequest{} }, + GetMessageEmbeddingCodeRequestTypeID: func() bin.Object { return &GetMessageEmbeddingCodeRequest{} }, + GetMessageLinkInfoRequestTypeID: func() bin.Object { return &GetMessageLinkInfoRequest{} }, + TranslateTextRequestTypeID: func() bin.Object { return &TranslateTextRequest{} }, + TranslateMessageTextRequestTypeID: func() bin.Object { return &TranslateMessageTextRequest{} }, + RecognizeSpeechRequestTypeID: func() bin.Object { return &RecognizeSpeechRequest{} }, + RateSpeechRecognitionRequestTypeID: func() bin.Object { return &RateSpeechRecognitionRequest{} }, + GetChatAvailableMessageSendersRequestTypeID: func() bin.Object { return &GetChatAvailableMessageSendersRequest{} }, + SetChatMessageSenderRequestTypeID: func() bin.Object { return &SetChatMessageSenderRequest{} }, + SendMessageRequestTypeID: func() bin.Object { return &SendMessageRequest{} }, + SendMessageAlbumRequestTypeID: func() bin.Object { return &SendMessageAlbumRequest{} }, + SendBotStartMessageRequestTypeID: func() bin.Object { return &SendBotStartMessageRequest{} }, + SendInlineQueryResultMessageRequestTypeID: func() bin.Object { return &SendInlineQueryResultMessageRequest{} }, + ForwardMessagesRequestTypeID: func() bin.Object { return &ForwardMessagesRequest{} }, + SendQuickReplyShortcutMessagesRequestTypeID: func() bin.Object { return &SendQuickReplyShortcutMessagesRequest{} }, + ResendMessagesRequestTypeID: func() bin.Object { return &ResendMessagesRequest{} }, + AddLocalMessageRequestTypeID: func() bin.Object { return &AddLocalMessageRequest{} }, + DeleteMessagesRequestTypeID: func() bin.Object { return &DeleteMessagesRequest{} }, + DeleteChatMessagesBySenderRequestTypeID: func() bin.Object { return &DeleteChatMessagesBySenderRequest{} }, + DeleteChatMessagesByDateRequestTypeID: func() bin.Object { return &DeleteChatMessagesByDateRequest{} }, + EditMessageTextRequestTypeID: func() bin.Object { return &EditMessageTextRequest{} }, + EditMessageLiveLocationRequestTypeID: func() bin.Object { return &EditMessageLiveLocationRequest{} }, + EditMessageMediaRequestTypeID: func() bin.Object { return &EditMessageMediaRequest{} }, + EditMessageCaptionRequestTypeID: func() bin.Object { return &EditMessageCaptionRequest{} }, + EditMessageReplyMarkupRequestTypeID: func() bin.Object { return &EditMessageReplyMarkupRequest{} }, + EditInlineMessageTextRequestTypeID: func() bin.Object { return &EditInlineMessageTextRequest{} }, + EditInlineMessageLiveLocationRequestTypeID: func() bin.Object { return &EditInlineMessageLiveLocationRequest{} }, + EditInlineMessageMediaRequestTypeID: func() bin.Object { return &EditInlineMessageMediaRequest{} }, + EditInlineMessageCaptionRequestTypeID: func() bin.Object { return &EditInlineMessageCaptionRequest{} }, + EditInlineMessageReplyMarkupRequestTypeID: func() bin.Object { return &EditInlineMessageReplyMarkupRequest{} }, + EditMessageSchedulingStateRequestTypeID: func() bin.Object { return &EditMessageSchedulingStateRequest{} }, + SendBusinessMessageRequestTypeID: func() bin.Object { return &SendBusinessMessageRequest{} }, + SendBusinessMessageAlbumRequestTypeID: func() bin.Object { return &SendBusinessMessageAlbumRequest{} }, + CheckQuickReplyShortcutNameRequestTypeID: func() bin.Object { return &CheckQuickReplyShortcutNameRequest{} }, + LoadQuickReplyShortcutsRequestTypeID: func() bin.Object { return &LoadQuickReplyShortcutsRequest{} }, + SetQuickReplyShortcutNameRequestTypeID: func() bin.Object { return &SetQuickReplyShortcutNameRequest{} }, + DeleteQuickReplyShortcutRequestTypeID: func() bin.Object { return &DeleteQuickReplyShortcutRequest{} }, + ReorderQuickReplyShortcutsRequestTypeID: func() bin.Object { return &ReorderQuickReplyShortcutsRequest{} }, + LoadQuickReplyShortcutMessagesRequestTypeID: func() bin.Object { return &LoadQuickReplyShortcutMessagesRequest{} }, + DeleteQuickReplyShortcutMessagesRequestTypeID: func() bin.Object { return &DeleteQuickReplyShortcutMessagesRequest{} }, + GetForumTopicDefaultIconsRequestTypeID: func() bin.Object { return &GetForumTopicDefaultIconsRequest{} }, + CreateForumTopicRequestTypeID: func() bin.Object { return &CreateForumTopicRequest{} }, + EditForumTopicRequestTypeID: func() bin.Object { return &EditForumTopicRequest{} }, + GetForumTopicRequestTypeID: func() bin.Object { return &GetForumTopicRequest{} }, + GetForumTopicLinkRequestTypeID: func() bin.Object { return &GetForumTopicLinkRequest{} }, + GetForumTopicsRequestTypeID: func() bin.Object { return &GetForumTopicsRequest{} }, + SetForumTopicNotificationSettingsRequestTypeID: func() bin.Object { return &SetForumTopicNotificationSettingsRequest{} }, + ToggleForumTopicIsClosedRequestTypeID: func() bin.Object { return &ToggleForumTopicIsClosedRequest{} }, + ToggleGeneralForumTopicIsHiddenRequestTypeID: func() bin.Object { return &ToggleGeneralForumTopicIsHiddenRequest{} }, + ToggleForumTopicIsPinnedRequestTypeID: func() bin.Object { return &ToggleForumTopicIsPinnedRequest{} }, + SetPinnedForumTopicsRequestTypeID: func() bin.Object { return &SetPinnedForumTopicsRequest{} }, + DeleteForumTopicRequestTypeID: func() bin.Object { return &DeleteForumTopicRequest{} }, + GetEmojiReactionRequestTypeID: func() bin.Object { return &GetEmojiReactionRequest{} }, + GetCustomEmojiReactionAnimationsRequestTypeID: func() bin.Object { return &GetCustomEmojiReactionAnimationsRequest{} }, + GetMessageAvailableReactionsRequestTypeID: func() bin.Object { return &GetMessageAvailableReactionsRequest{} }, + ClearRecentReactionsRequestTypeID: func() bin.Object { return &ClearRecentReactionsRequest{} }, + AddMessageReactionRequestTypeID: func() bin.Object { return &AddMessageReactionRequest{} }, + RemoveMessageReactionRequestTypeID: func() bin.Object { return &RemoveMessageReactionRequest{} }, + SetMessageReactionsRequestTypeID: func() bin.Object { return &SetMessageReactionsRequest{} }, + GetMessageAddedReactionsRequestTypeID: func() bin.Object { return &GetMessageAddedReactionsRequest{} }, + SetDefaultReactionTypeRequestTypeID: func() bin.Object { return &SetDefaultReactionTypeRequest{} }, + GetSavedMessagesTagsRequestTypeID: func() bin.Object { return &GetSavedMessagesTagsRequest{} }, + SetSavedMessagesTagLabelRequestTypeID: func() bin.Object { return &SetSavedMessagesTagLabelRequest{} }, + SearchQuoteRequestTypeID: func() bin.Object { return &SearchQuoteRequest{} }, + GetTextEntitiesRequestTypeID: func() bin.Object { return &GetTextEntitiesRequest{} }, + ParseTextEntitiesRequestTypeID: func() bin.Object { return &ParseTextEntitiesRequest{} }, + ParseMarkdownRequestTypeID: func() bin.Object { return &ParseMarkdownRequest{} }, + GetMarkdownTextRequestTypeID: func() bin.Object { return &GetMarkdownTextRequest{} }, + GetCountryFlagEmojiRequestTypeID: func() bin.Object { return &GetCountryFlagEmojiRequest{} }, + GetFileMimeTypeRequestTypeID: func() bin.Object { return &GetFileMimeTypeRequest{} }, + GetFileExtensionRequestTypeID: func() bin.Object { return &GetFileExtensionRequest{} }, + CleanFileNameRequestTypeID: func() bin.Object { return &CleanFileNameRequest{} }, + GetLanguagePackStringRequestTypeID: func() bin.Object { return &GetLanguagePackStringRequest{} }, + GetJSONValueRequestTypeID: func() bin.Object { return &GetJSONValueRequest{} }, + GetJSONStringRequestTypeID: func() bin.Object { return &GetJSONStringRequest{} }, + GetThemeParametersJSONStringRequestTypeID: func() bin.Object { return &GetThemeParametersJSONStringRequest{} }, + SetPollAnswerRequestTypeID: func() bin.Object { return &SetPollAnswerRequest{} }, + GetPollVotersRequestTypeID: func() bin.Object { return &GetPollVotersRequest{} }, + StopPollRequestTypeID: func() bin.Object { return &StopPollRequest{} }, + HideSuggestedActionRequestTypeID: func() bin.Object { return &HideSuggestedActionRequest{} }, + GetBusinessConnectionRequestTypeID: func() bin.Object { return &GetBusinessConnectionRequest{} }, + GetLoginURLInfoRequestTypeID: func() bin.Object { return &GetLoginURLInfoRequest{} }, + GetLoginURLRequestTypeID: func() bin.Object { return &GetLoginURLRequest{} }, + ShareUsersWithBotRequestTypeID: func() bin.Object { return &ShareUsersWithBotRequest{} }, + ShareChatWithBotRequestTypeID: func() bin.Object { return &ShareChatWithBotRequest{} }, + GetInlineQueryResultsRequestTypeID: func() bin.Object { return &GetInlineQueryResultsRequest{} }, + AnswerInlineQueryRequestTypeID: func() bin.Object { return &AnswerInlineQueryRequest{} }, + SearchWebAppRequestTypeID: func() bin.Object { return &SearchWebAppRequest{} }, + GetWebAppLinkURLRequestTypeID: func() bin.Object { return &GetWebAppLinkURLRequest{} }, + GetWebAppURLRequestTypeID: func() bin.Object { return &GetWebAppURLRequest{} }, + SendWebAppDataRequestTypeID: func() bin.Object { return &SendWebAppDataRequest{} }, + OpenWebAppRequestTypeID: func() bin.Object { return &OpenWebAppRequest{} }, + CloseWebAppRequestTypeID: func() bin.Object { return &CloseWebAppRequest{} }, + AnswerWebAppQueryRequestTypeID: func() bin.Object { return &AnswerWebAppQueryRequest{} }, + GetCallbackQueryAnswerRequestTypeID: func() bin.Object { return &GetCallbackQueryAnswerRequest{} }, + AnswerCallbackQueryRequestTypeID: func() bin.Object { return &AnswerCallbackQueryRequest{} }, + AnswerShippingQueryRequestTypeID: func() bin.Object { return &AnswerShippingQueryRequest{} }, + AnswerPreCheckoutQueryRequestTypeID: func() bin.Object { return &AnswerPreCheckoutQueryRequest{} }, + SetGameScoreRequestTypeID: func() bin.Object { return &SetGameScoreRequest{} }, + SetInlineGameScoreRequestTypeID: func() bin.Object { return &SetInlineGameScoreRequest{} }, + GetGameHighScoresRequestTypeID: func() bin.Object { return &GetGameHighScoresRequest{} }, + GetInlineGameHighScoresRequestTypeID: func() bin.Object { return &GetInlineGameHighScoresRequest{} }, + DeleteChatReplyMarkupRequestTypeID: func() bin.Object { return &DeleteChatReplyMarkupRequest{} }, + SendChatActionRequestTypeID: func() bin.Object { return &SendChatActionRequest{} }, + OpenChatRequestTypeID: func() bin.Object { return &OpenChatRequest{} }, + CloseChatRequestTypeID: func() bin.Object { return &CloseChatRequest{} }, + ViewMessagesRequestTypeID: func() bin.Object { return &ViewMessagesRequest{} }, + OpenMessageContentRequestTypeID: func() bin.Object { return &OpenMessageContentRequest{} }, + ClickAnimatedEmojiMessageRequestTypeID: func() bin.Object { return &ClickAnimatedEmojiMessageRequest{} }, + GetInternalLinkRequestTypeID: func() bin.Object { return &GetInternalLinkRequest{} }, + GetInternalLinkTypeRequestTypeID: func() bin.Object { return &GetInternalLinkTypeRequest{} }, + GetExternalLinkInfoRequestTypeID: func() bin.Object { return &GetExternalLinkInfoRequest{} }, + GetExternalLinkRequestTypeID: func() bin.Object { return &GetExternalLinkRequest{} }, + ReadAllChatMentionsRequestTypeID: func() bin.Object { return &ReadAllChatMentionsRequest{} }, + ReadAllMessageThreadMentionsRequestTypeID: func() bin.Object { return &ReadAllMessageThreadMentionsRequest{} }, + ReadAllChatReactionsRequestTypeID: func() bin.Object { return &ReadAllChatReactionsRequest{} }, + ReadAllMessageThreadReactionsRequestTypeID: func() bin.Object { return &ReadAllMessageThreadReactionsRequest{} }, + CreatePrivateChatRequestTypeID: func() bin.Object { return &CreatePrivateChatRequest{} }, + CreateBasicGroupChatRequestTypeID: func() bin.Object { return &CreateBasicGroupChatRequest{} }, + CreateSupergroupChatRequestTypeID: func() bin.Object { return &CreateSupergroupChatRequest{} }, + CreateSecretChatRequestTypeID: func() bin.Object { return &CreateSecretChatRequest{} }, + CreateNewBasicGroupChatRequestTypeID: func() bin.Object { return &CreateNewBasicGroupChatRequest{} }, + CreateNewSupergroupChatRequestTypeID: func() bin.Object { return &CreateNewSupergroupChatRequest{} }, + CreateNewSecretChatRequestTypeID: func() bin.Object { return &CreateNewSecretChatRequest{} }, + UpgradeBasicGroupChatToSupergroupChatRequestTypeID: func() bin.Object { return &UpgradeBasicGroupChatToSupergroupChatRequest{} }, + GetChatListsToAddChatRequestTypeID: func() bin.Object { return &GetChatListsToAddChatRequest{} }, + AddChatToListRequestTypeID: func() bin.Object { return &AddChatToListRequest{} }, + GetChatFolderRequestTypeID: func() bin.Object { return &GetChatFolderRequest{} }, + CreateChatFolderRequestTypeID: func() bin.Object { return &CreateChatFolderRequest{} }, + EditChatFolderRequestTypeID: func() bin.Object { return &EditChatFolderRequest{} }, + DeleteChatFolderRequestTypeID: func() bin.Object { return &DeleteChatFolderRequest{} }, + GetChatFolderChatsToLeaveRequestTypeID: func() bin.Object { return &GetChatFolderChatsToLeaveRequest{} }, + GetChatFolderChatCountRequestTypeID: func() bin.Object { return &GetChatFolderChatCountRequest{} }, + ReorderChatFoldersRequestTypeID: func() bin.Object { return &ReorderChatFoldersRequest{} }, + ToggleChatFolderTagsRequestTypeID: func() bin.Object { return &ToggleChatFolderTagsRequest{} }, + GetRecommendedChatFoldersRequestTypeID: func() bin.Object { return &GetRecommendedChatFoldersRequest{} }, + GetChatFolderDefaultIconNameRequestTypeID: func() bin.Object { return &GetChatFolderDefaultIconNameRequest{} }, + GetChatsForChatFolderInviteLinkRequestTypeID: func() bin.Object { return &GetChatsForChatFolderInviteLinkRequest{} }, + CreateChatFolderInviteLinkRequestTypeID: func() bin.Object { return &CreateChatFolderInviteLinkRequest{} }, + GetChatFolderInviteLinksRequestTypeID: func() bin.Object { return &GetChatFolderInviteLinksRequest{} }, + EditChatFolderInviteLinkRequestTypeID: func() bin.Object { return &EditChatFolderInviteLinkRequest{} }, + DeleteChatFolderInviteLinkRequestTypeID: func() bin.Object { return &DeleteChatFolderInviteLinkRequest{} }, + CheckChatFolderInviteLinkRequestTypeID: func() bin.Object { return &CheckChatFolderInviteLinkRequest{} }, + AddChatFolderByInviteLinkRequestTypeID: func() bin.Object { return &AddChatFolderByInviteLinkRequest{} }, + GetChatFolderNewChatsRequestTypeID: func() bin.Object { return &GetChatFolderNewChatsRequest{} }, + ProcessChatFolderNewChatsRequestTypeID: func() bin.Object { return &ProcessChatFolderNewChatsRequest{} }, + GetArchiveChatListSettingsRequestTypeID: func() bin.Object { return &GetArchiveChatListSettingsRequest{} }, + SetArchiveChatListSettingsRequestTypeID: func() bin.Object { return &SetArchiveChatListSettingsRequest{} }, + SetChatTitleRequestTypeID: func() bin.Object { return &SetChatTitleRequest{} }, + SetChatPhotoRequestTypeID: func() bin.Object { return &SetChatPhotoRequest{} }, + SetChatAccentColorRequestTypeID: func() bin.Object { return &SetChatAccentColorRequest{} }, + SetChatProfileAccentColorRequestTypeID: func() bin.Object { return &SetChatProfileAccentColorRequest{} }, + SetChatMessageAutoDeleteTimeRequestTypeID: func() bin.Object { return &SetChatMessageAutoDeleteTimeRequest{} }, + SetChatEmojiStatusRequestTypeID: func() bin.Object { return &SetChatEmojiStatusRequest{} }, + SetChatPermissionsRequestTypeID: func() bin.Object { return &SetChatPermissionsRequest{} }, + SetChatBackgroundRequestTypeID: func() bin.Object { return &SetChatBackgroundRequest{} }, + DeleteChatBackgroundRequestTypeID: func() bin.Object { return &DeleteChatBackgroundRequest{} }, + SetChatThemeRequestTypeID: func() bin.Object { return &SetChatThemeRequest{} }, + SetChatDraftMessageRequestTypeID: func() bin.Object { return &SetChatDraftMessageRequest{} }, + SetChatNotificationSettingsRequestTypeID: func() bin.Object { return &SetChatNotificationSettingsRequest{} }, + ToggleChatHasProtectedContentRequestTypeID: func() bin.Object { return &ToggleChatHasProtectedContentRequest{} }, + ToggleChatViewAsTopicsRequestTypeID: func() bin.Object { return &ToggleChatViewAsTopicsRequest{} }, + ToggleChatIsTranslatableRequestTypeID: func() bin.Object { return &ToggleChatIsTranslatableRequest{} }, + ToggleChatIsMarkedAsUnreadRequestTypeID: func() bin.Object { return &ToggleChatIsMarkedAsUnreadRequest{} }, + ToggleChatDefaultDisableNotificationRequestTypeID: func() bin.Object { return &ToggleChatDefaultDisableNotificationRequest{} }, + SetChatAvailableReactionsRequestTypeID: func() bin.Object { return &SetChatAvailableReactionsRequest{} }, + SetChatClientDataRequestTypeID: func() bin.Object { return &SetChatClientDataRequest{} }, + SetChatDescriptionRequestTypeID: func() bin.Object { return &SetChatDescriptionRequest{} }, + SetChatDiscussionGroupRequestTypeID: func() bin.Object { return &SetChatDiscussionGroupRequest{} }, + SetChatLocationRequestTypeID: func() bin.Object { return &SetChatLocationRequest{} }, + SetChatSlowModeDelayRequestTypeID: func() bin.Object { return &SetChatSlowModeDelayRequest{} }, + PinChatMessageRequestTypeID: func() bin.Object { return &PinChatMessageRequest{} }, + UnpinChatMessageRequestTypeID: func() bin.Object { return &UnpinChatMessageRequest{} }, + UnpinAllChatMessagesRequestTypeID: func() bin.Object { return &UnpinAllChatMessagesRequest{} }, + UnpinAllMessageThreadMessagesRequestTypeID: func() bin.Object { return &UnpinAllMessageThreadMessagesRequest{} }, + JoinChatRequestTypeID: func() bin.Object { return &JoinChatRequest{} }, + LeaveChatRequestTypeID: func() bin.Object { return &LeaveChatRequest{} }, + AddChatMemberRequestTypeID: func() bin.Object { return &AddChatMemberRequest{} }, + AddChatMembersRequestTypeID: func() bin.Object { return &AddChatMembersRequest{} }, + SetChatMemberStatusRequestTypeID: func() bin.Object { return &SetChatMemberStatusRequest{} }, + BanChatMemberRequestTypeID: func() bin.Object { return &BanChatMemberRequest{} }, + CanTransferOwnershipRequestTypeID: func() bin.Object { return &CanTransferOwnershipRequest{} }, + TransferChatOwnershipRequestTypeID: func() bin.Object { return &TransferChatOwnershipRequest{} }, + GetChatMemberRequestTypeID: func() bin.Object { return &GetChatMemberRequest{} }, + SearchChatMembersRequestTypeID: func() bin.Object { return &SearchChatMembersRequest{} }, + GetChatAdministratorsRequestTypeID: func() bin.Object { return &GetChatAdministratorsRequest{} }, + ClearAllDraftMessagesRequestTypeID: func() bin.Object { return &ClearAllDraftMessagesRequest{} }, + GetSavedNotificationSoundRequestTypeID: func() bin.Object { return &GetSavedNotificationSoundRequest{} }, + GetSavedNotificationSoundsRequestTypeID: func() bin.Object { return &GetSavedNotificationSoundsRequest{} }, + AddSavedNotificationSoundRequestTypeID: func() bin.Object { return &AddSavedNotificationSoundRequest{} }, + RemoveSavedNotificationSoundRequestTypeID: func() bin.Object { return &RemoveSavedNotificationSoundRequest{} }, + GetChatNotificationSettingsExceptionsRequestTypeID: func() bin.Object { return &GetChatNotificationSettingsExceptionsRequest{} }, + GetScopeNotificationSettingsRequestTypeID: func() bin.Object { return &GetScopeNotificationSettingsRequest{} }, + SetScopeNotificationSettingsRequestTypeID: func() bin.Object { return &SetScopeNotificationSettingsRequest{} }, + ResetAllNotificationSettingsRequestTypeID: func() bin.Object { return &ResetAllNotificationSettingsRequest{} }, + ToggleChatIsPinnedRequestTypeID: func() bin.Object { return &ToggleChatIsPinnedRequest{} }, + SetPinnedChatsRequestTypeID: func() bin.Object { return &SetPinnedChatsRequest{} }, + ReadChatListRequestTypeID: func() bin.Object { return &ReadChatListRequest{} }, + GetStoryRequestTypeID: func() bin.Object { return &GetStoryRequest{} }, + GetChatsToSendStoriesRequestTypeID: func() bin.Object { return &GetChatsToSendStoriesRequest{} }, + CanSendStoryRequestTypeID: func() bin.Object { return &CanSendStoryRequest{} }, + SendStoryRequestTypeID: func() bin.Object { return &SendStoryRequest{} }, + EditStoryRequestTypeID: func() bin.Object { return &EditStoryRequest{} }, + SetStoryPrivacySettingsRequestTypeID: func() bin.Object { return &SetStoryPrivacySettingsRequest{} }, + ToggleStoryIsPinnedRequestTypeID: func() bin.Object { return &ToggleStoryIsPinnedRequest{} }, + DeleteStoryRequestTypeID: func() bin.Object { return &DeleteStoryRequest{} }, + GetStoryNotificationSettingsExceptionsRequestTypeID: func() bin.Object { return &GetStoryNotificationSettingsExceptionsRequest{} }, + LoadActiveStoriesRequestTypeID: func() bin.Object { return &LoadActiveStoriesRequest{} }, + SetChatActiveStoriesListRequestTypeID: func() bin.Object { return &SetChatActiveStoriesListRequest{} }, + GetChatActiveStoriesRequestTypeID: func() bin.Object { return &GetChatActiveStoriesRequest{} }, + GetChatPinnedStoriesRequestTypeID: func() bin.Object { return &GetChatPinnedStoriesRequest{} }, + GetChatArchivedStoriesRequestTypeID: func() bin.Object { return &GetChatArchivedStoriesRequest{} }, + OpenStoryRequestTypeID: func() bin.Object { return &OpenStoryRequest{} }, + CloseStoryRequestTypeID: func() bin.Object { return &CloseStoryRequest{} }, + GetStoryAvailableReactionsRequestTypeID: func() bin.Object { return &GetStoryAvailableReactionsRequest{} }, + SetStoryReactionRequestTypeID: func() bin.Object { return &SetStoryReactionRequest{} }, + GetStoryInteractionsRequestTypeID: func() bin.Object { return &GetStoryInteractionsRequest{} }, + GetChatStoryInteractionsRequestTypeID: func() bin.Object { return &GetChatStoryInteractionsRequest{} }, + ReportStoryRequestTypeID: func() bin.Object { return &ReportStoryRequest{} }, + ActivateStoryStealthModeRequestTypeID: func() bin.Object { return &ActivateStoryStealthModeRequest{} }, + GetStoryPublicForwardsRequestTypeID: func() bin.Object { return &GetStoryPublicForwardsRequest{} }, + GetChatBoostLevelFeaturesRequestTypeID: func() bin.Object { return &GetChatBoostLevelFeaturesRequest{} }, + GetChatBoostFeaturesRequestTypeID: func() bin.Object { return &GetChatBoostFeaturesRequest{} }, + GetAvailableChatBoostSlotsRequestTypeID: func() bin.Object { return &GetAvailableChatBoostSlotsRequest{} }, + GetChatBoostStatusRequestTypeID: func() bin.Object { return &GetChatBoostStatusRequest{} }, + BoostChatRequestTypeID: func() bin.Object { return &BoostChatRequest{} }, + GetChatBoostLinkRequestTypeID: func() bin.Object { return &GetChatBoostLinkRequest{} }, + GetChatBoostLinkInfoRequestTypeID: func() bin.Object { return &GetChatBoostLinkInfoRequest{} }, + GetChatBoostsRequestTypeID: func() bin.Object { return &GetChatBoostsRequest{} }, + GetUserChatBoostsRequestTypeID: func() bin.Object { return &GetUserChatBoostsRequest{} }, + GetAttachmentMenuBotRequestTypeID: func() bin.Object { return &GetAttachmentMenuBotRequest{} }, + ToggleBotIsAddedToAttachmentMenuRequestTypeID: func() bin.Object { return &ToggleBotIsAddedToAttachmentMenuRequest{} }, + GetThemedEmojiStatusesRequestTypeID: func() bin.Object { return &GetThemedEmojiStatusesRequest{} }, + GetRecentEmojiStatusesRequestTypeID: func() bin.Object { return &GetRecentEmojiStatusesRequest{} }, + GetDefaultEmojiStatusesRequestTypeID: func() bin.Object { return &GetDefaultEmojiStatusesRequest{} }, + ClearRecentEmojiStatusesRequestTypeID: func() bin.Object { return &ClearRecentEmojiStatusesRequest{} }, + GetThemedChatEmojiStatusesRequestTypeID: func() bin.Object { return &GetThemedChatEmojiStatusesRequest{} }, + GetDefaultChatEmojiStatusesRequestTypeID: func() bin.Object { return &GetDefaultChatEmojiStatusesRequest{} }, + GetDisallowedChatEmojiStatusesRequestTypeID: func() bin.Object { return &GetDisallowedChatEmojiStatusesRequest{} }, + DownloadFileRequestTypeID: func() bin.Object { return &DownloadFileRequest{} }, + GetFileDownloadedPrefixSizeRequestTypeID: func() bin.Object { return &GetFileDownloadedPrefixSizeRequest{} }, + CancelDownloadFileRequestTypeID: func() bin.Object { return &CancelDownloadFileRequest{} }, + GetSuggestedFileNameRequestTypeID: func() bin.Object { return &GetSuggestedFileNameRequest{} }, + PreliminaryUploadFileRequestTypeID: func() bin.Object { return &PreliminaryUploadFileRequest{} }, + CancelPreliminaryUploadFileRequestTypeID: func() bin.Object { return &CancelPreliminaryUploadFileRequest{} }, + WriteGeneratedFilePartRequestTypeID: func() bin.Object { return &WriteGeneratedFilePartRequest{} }, + SetFileGenerationProgressRequestTypeID: func() bin.Object { return &SetFileGenerationProgressRequest{} }, + FinishFileGenerationRequestTypeID: func() bin.Object { return &FinishFileGenerationRequest{} }, + ReadFilePartRequestTypeID: func() bin.Object { return &ReadFilePartRequest{} }, + DeleteFileRequestTypeID: func() bin.Object { return &DeleteFileRequest{} }, + AddFileToDownloadsRequestTypeID: func() bin.Object { return &AddFileToDownloadsRequest{} }, + ToggleDownloadIsPausedRequestTypeID: func() bin.Object { return &ToggleDownloadIsPausedRequest{} }, + ToggleAllDownloadsArePausedRequestTypeID: func() bin.Object { return &ToggleAllDownloadsArePausedRequest{} }, + RemoveFileFromDownloadsRequestTypeID: func() bin.Object { return &RemoveFileFromDownloadsRequest{} }, + RemoveAllFilesFromDownloadsRequestTypeID: func() bin.Object { return &RemoveAllFilesFromDownloadsRequest{} }, + SearchFileDownloadsRequestTypeID: func() bin.Object { return &SearchFileDownloadsRequest{} }, + GetMessageFileTypeRequestTypeID: func() bin.Object { return &GetMessageFileTypeRequest{} }, + GetMessageImportConfirmationTextRequestTypeID: func() bin.Object { return &GetMessageImportConfirmationTextRequest{} }, + ImportMessagesRequestTypeID: func() bin.Object { return &ImportMessagesRequest{} }, + ReplacePrimaryChatInviteLinkRequestTypeID: func() bin.Object { return &ReplacePrimaryChatInviteLinkRequest{} }, + CreateChatInviteLinkRequestTypeID: func() bin.Object { return &CreateChatInviteLinkRequest{} }, + EditChatInviteLinkRequestTypeID: func() bin.Object { return &EditChatInviteLinkRequest{} }, + GetChatInviteLinkRequestTypeID: func() bin.Object { return &GetChatInviteLinkRequest{} }, + GetChatInviteLinkCountsRequestTypeID: func() bin.Object { return &GetChatInviteLinkCountsRequest{} }, + GetChatInviteLinksRequestTypeID: func() bin.Object { return &GetChatInviteLinksRequest{} }, + GetChatInviteLinkMembersRequestTypeID: func() bin.Object { return &GetChatInviteLinkMembersRequest{} }, + RevokeChatInviteLinkRequestTypeID: func() bin.Object { return &RevokeChatInviteLinkRequest{} }, + DeleteRevokedChatInviteLinkRequestTypeID: func() bin.Object { return &DeleteRevokedChatInviteLinkRequest{} }, + DeleteAllRevokedChatInviteLinksRequestTypeID: func() bin.Object { return &DeleteAllRevokedChatInviteLinksRequest{} }, + CheckChatInviteLinkRequestTypeID: func() bin.Object { return &CheckChatInviteLinkRequest{} }, + JoinChatByInviteLinkRequestTypeID: func() bin.Object { return &JoinChatByInviteLinkRequest{} }, + GetChatJoinRequestsRequestTypeID: func() bin.Object { return &GetChatJoinRequestsRequest{} }, + ProcessChatJoinRequestRequestTypeID: func() bin.Object { return &ProcessChatJoinRequestRequest{} }, + ProcessChatJoinRequestsRequestTypeID: func() bin.Object { return &ProcessChatJoinRequestsRequest{} }, + CreateCallRequestTypeID: func() bin.Object { return &CreateCallRequest{} }, + AcceptCallRequestTypeID: func() bin.Object { return &AcceptCallRequest{} }, + SendCallSignalingDataRequestTypeID: func() bin.Object { return &SendCallSignalingDataRequest{} }, + DiscardCallRequestTypeID: func() bin.Object { return &DiscardCallRequest{} }, + SendCallRatingRequestTypeID: func() bin.Object { return &SendCallRatingRequest{} }, + SendCallDebugInformationRequestTypeID: func() bin.Object { return &SendCallDebugInformationRequest{} }, + SendCallLogRequestTypeID: func() bin.Object { return &SendCallLogRequest{} }, + GetVideoChatAvailableParticipantsRequestTypeID: func() bin.Object { return &GetVideoChatAvailableParticipantsRequest{} }, + SetVideoChatDefaultParticipantRequestTypeID: func() bin.Object { return &SetVideoChatDefaultParticipantRequest{} }, + CreateVideoChatRequestTypeID: func() bin.Object { return &CreateVideoChatRequest{} }, + GetVideoChatRtmpURLRequestTypeID: func() bin.Object { return &GetVideoChatRtmpURLRequest{} }, + ReplaceVideoChatRtmpURLRequestTypeID: func() bin.Object { return &ReplaceVideoChatRtmpURLRequest{} }, + GetGroupCallRequestTypeID: func() bin.Object { return &GetGroupCallRequest{} }, + StartScheduledGroupCallRequestTypeID: func() bin.Object { return &StartScheduledGroupCallRequest{} }, + ToggleGroupCallEnabledStartNotificationRequestTypeID: func() bin.Object { return &ToggleGroupCallEnabledStartNotificationRequest{} }, + JoinGroupCallRequestTypeID: func() bin.Object { return &JoinGroupCallRequest{} }, + StartGroupCallScreenSharingRequestTypeID: func() bin.Object { return &StartGroupCallScreenSharingRequest{} }, + ToggleGroupCallScreenSharingIsPausedRequestTypeID: func() bin.Object { return &ToggleGroupCallScreenSharingIsPausedRequest{} }, + EndGroupCallScreenSharingRequestTypeID: func() bin.Object { return &EndGroupCallScreenSharingRequest{} }, + SetGroupCallTitleRequestTypeID: func() bin.Object { return &SetGroupCallTitleRequest{} }, + ToggleGroupCallMuteNewParticipantsRequestTypeID: func() bin.Object { return &ToggleGroupCallMuteNewParticipantsRequest{} }, + InviteGroupCallParticipantsRequestTypeID: func() bin.Object { return &InviteGroupCallParticipantsRequest{} }, + GetGroupCallInviteLinkRequestTypeID: func() bin.Object { return &GetGroupCallInviteLinkRequest{} }, + RevokeGroupCallInviteLinkRequestTypeID: func() bin.Object { return &RevokeGroupCallInviteLinkRequest{} }, + StartGroupCallRecordingRequestTypeID: func() bin.Object { return &StartGroupCallRecordingRequest{} }, + EndGroupCallRecordingRequestTypeID: func() bin.Object { return &EndGroupCallRecordingRequest{} }, + ToggleGroupCallIsMyVideoPausedRequestTypeID: func() bin.Object { return &ToggleGroupCallIsMyVideoPausedRequest{} }, + ToggleGroupCallIsMyVideoEnabledRequestTypeID: func() bin.Object { return &ToggleGroupCallIsMyVideoEnabledRequest{} }, + SetGroupCallParticipantIsSpeakingRequestTypeID: func() bin.Object { return &SetGroupCallParticipantIsSpeakingRequest{} }, + ToggleGroupCallParticipantIsMutedRequestTypeID: func() bin.Object { return &ToggleGroupCallParticipantIsMutedRequest{} }, + SetGroupCallParticipantVolumeLevelRequestTypeID: func() bin.Object { return &SetGroupCallParticipantVolumeLevelRequest{} }, + ToggleGroupCallParticipantIsHandRaisedRequestTypeID: func() bin.Object { return &ToggleGroupCallParticipantIsHandRaisedRequest{} }, + LoadGroupCallParticipantsRequestTypeID: func() bin.Object { return &LoadGroupCallParticipantsRequest{} }, + LeaveGroupCallRequestTypeID: func() bin.Object { return &LeaveGroupCallRequest{} }, + EndGroupCallRequestTypeID: func() bin.Object { return &EndGroupCallRequest{} }, + GetGroupCallStreamsRequestTypeID: func() bin.Object { return &GetGroupCallStreamsRequest{} }, + GetGroupCallStreamSegmentRequestTypeID: func() bin.Object { return &GetGroupCallStreamSegmentRequest{} }, + SetMessageSenderBlockListRequestTypeID: func() bin.Object { return &SetMessageSenderBlockListRequest{} }, + BlockMessageSenderFromRepliesRequestTypeID: func() bin.Object { return &BlockMessageSenderFromRepliesRequest{} }, + GetBlockedMessageSendersRequestTypeID: func() bin.Object { return &GetBlockedMessageSendersRequest{} }, + AddContactRequestTypeID: func() bin.Object { return &AddContactRequest{} }, + ImportContactsRequestTypeID: func() bin.Object { return &ImportContactsRequest{} }, + GetContactsRequestTypeID: func() bin.Object { return &GetContactsRequest{} }, + SearchContactsRequestTypeID: func() bin.Object { return &SearchContactsRequest{} }, + RemoveContactsRequestTypeID: func() bin.Object { return &RemoveContactsRequest{} }, + GetImportedContactCountRequestTypeID: func() bin.Object { return &GetImportedContactCountRequest{} }, + ChangeImportedContactsRequestTypeID: func() bin.Object { return &ChangeImportedContactsRequest{} }, + ClearImportedContactsRequestTypeID: func() bin.Object { return &ClearImportedContactsRequest{} }, + SetCloseFriendsRequestTypeID: func() bin.Object { return &SetCloseFriendsRequest{} }, + GetCloseFriendsRequestTypeID: func() bin.Object { return &GetCloseFriendsRequest{} }, + SetUserPersonalProfilePhotoRequestTypeID: func() bin.Object { return &SetUserPersonalProfilePhotoRequest{} }, + SuggestUserProfilePhotoRequestTypeID: func() bin.Object { return &SuggestUserProfilePhotoRequest{} }, + SearchUserByPhoneNumberRequestTypeID: func() bin.Object { return &SearchUserByPhoneNumberRequest{} }, + SharePhoneNumberRequestTypeID: func() bin.Object { return &SharePhoneNumberRequest{} }, + GetUserProfilePhotosRequestTypeID: func() bin.Object { return &GetUserProfilePhotosRequest{} }, + GetStickersRequestTypeID: func() bin.Object { return &GetStickersRequest{} }, + GetAllStickerEmojisRequestTypeID: func() bin.Object { return &GetAllStickerEmojisRequest{} }, + SearchStickersRequestTypeID: func() bin.Object { return &SearchStickersRequest{} }, + GetPremiumStickersRequestTypeID: func() bin.Object { return &GetPremiumStickersRequest{} }, + GetInstalledStickerSetsRequestTypeID: func() bin.Object { return &GetInstalledStickerSetsRequest{} }, + GetArchivedStickerSetsRequestTypeID: func() bin.Object { return &GetArchivedStickerSetsRequest{} }, + GetTrendingStickerSetsRequestTypeID: func() bin.Object { return &GetTrendingStickerSetsRequest{} }, + GetAttachedStickerSetsRequestTypeID: func() bin.Object { return &GetAttachedStickerSetsRequest{} }, + GetStickerSetRequestTypeID: func() bin.Object { return &GetStickerSetRequest{} }, + SearchStickerSetRequestTypeID: func() bin.Object { return &SearchStickerSetRequest{} }, + SearchInstalledStickerSetsRequestTypeID: func() bin.Object { return &SearchInstalledStickerSetsRequest{} }, + SearchStickerSetsRequestTypeID: func() bin.Object { return &SearchStickerSetsRequest{} }, + ChangeStickerSetRequestTypeID: func() bin.Object { return &ChangeStickerSetRequest{} }, + ViewTrendingStickerSetsRequestTypeID: func() bin.Object { return &ViewTrendingStickerSetsRequest{} }, + ReorderInstalledStickerSetsRequestTypeID: func() bin.Object { return &ReorderInstalledStickerSetsRequest{} }, + GetRecentStickersRequestTypeID: func() bin.Object { return &GetRecentStickersRequest{} }, + AddRecentStickerRequestTypeID: func() bin.Object { return &AddRecentStickerRequest{} }, + RemoveRecentStickerRequestTypeID: func() bin.Object { return &RemoveRecentStickerRequest{} }, + ClearRecentStickersRequestTypeID: func() bin.Object { return &ClearRecentStickersRequest{} }, + GetFavoriteStickersRequestTypeID: func() bin.Object { return &GetFavoriteStickersRequest{} }, + AddFavoriteStickerRequestTypeID: func() bin.Object { return &AddFavoriteStickerRequest{} }, + RemoveFavoriteStickerRequestTypeID: func() bin.Object { return &RemoveFavoriteStickerRequest{} }, + GetStickerEmojisRequestTypeID: func() bin.Object { return &GetStickerEmojisRequest{} }, + SearchEmojisRequestTypeID: func() bin.Object { return &SearchEmojisRequest{} }, + GetKeywordEmojisRequestTypeID: func() bin.Object { return &GetKeywordEmojisRequest{} }, + GetEmojiCategoriesRequestTypeID: func() bin.Object { return &GetEmojiCategoriesRequest{} }, + GetAnimatedEmojiRequestTypeID: func() bin.Object { return &GetAnimatedEmojiRequest{} }, + GetEmojiSuggestionsURLRequestTypeID: func() bin.Object { return &GetEmojiSuggestionsURLRequest{} }, + GetCustomEmojiStickersRequestTypeID: func() bin.Object { return &GetCustomEmojiStickersRequest{} }, + GetDefaultChatPhotoCustomEmojiStickersRequestTypeID: func() bin.Object { return &GetDefaultChatPhotoCustomEmojiStickersRequest{} }, + GetDefaultProfilePhotoCustomEmojiStickersRequestTypeID: func() bin.Object { return &GetDefaultProfilePhotoCustomEmojiStickersRequest{} }, + GetDefaultBackgroundCustomEmojiStickersRequestTypeID: func() bin.Object { return &GetDefaultBackgroundCustomEmojiStickersRequest{} }, + GetSavedAnimationsRequestTypeID: func() bin.Object { return &GetSavedAnimationsRequest{} }, + AddSavedAnimationRequestTypeID: func() bin.Object { return &AddSavedAnimationRequest{} }, + RemoveSavedAnimationRequestTypeID: func() bin.Object { return &RemoveSavedAnimationRequest{} }, + GetRecentInlineBotsRequestTypeID: func() bin.Object { return &GetRecentInlineBotsRequest{} }, + SearchHashtagsRequestTypeID: func() bin.Object { return &SearchHashtagsRequest{} }, + RemoveRecentHashtagRequestTypeID: func() bin.Object { return &RemoveRecentHashtagRequest{} }, + GetWebPagePreviewRequestTypeID: func() bin.Object { return &GetWebPagePreviewRequest{} }, + GetWebPageInstantViewRequestTypeID: func() bin.Object { return &GetWebPageInstantViewRequest{} }, + SetProfilePhotoRequestTypeID: func() bin.Object { return &SetProfilePhotoRequest{} }, + DeleteProfilePhotoRequestTypeID: func() bin.Object { return &DeleteProfilePhotoRequest{} }, + SetAccentColorRequestTypeID: func() bin.Object { return &SetAccentColorRequest{} }, + SetProfileAccentColorRequestTypeID: func() bin.Object { return &SetProfileAccentColorRequest{} }, + SetNameRequestTypeID: func() bin.Object { return &SetNameRequest{} }, + SetBioRequestTypeID: func() bin.Object { return &SetBioRequest{} }, + SetUsernameRequestTypeID: func() bin.Object { return &SetUsernameRequest{} }, + ToggleUsernameIsActiveRequestTypeID: func() bin.Object { return &ToggleUsernameIsActiveRequest{} }, + ReorderActiveUsernamesRequestTypeID: func() bin.Object { return &ReorderActiveUsernamesRequest{} }, + SetBirthdateRequestTypeID: func() bin.Object { return &SetBirthdateRequest{} }, + SetPersonalChatRequestTypeID: func() bin.Object { return &SetPersonalChatRequest{} }, + SetEmojiStatusRequestTypeID: func() bin.Object { return &SetEmojiStatusRequest{} }, + SetLocationRequestTypeID: func() bin.Object { return &SetLocationRequest{} }, + SetBusinessLocationRequestTypeID: func() bin.Object { return &SetBusinessLocationRequest{} }, + SetBusinessOpeningHoursRequestTypeID: func() bin.Object { return &SetBusinessOpeningHoursRequest{} }, + SetBusinessGreetingMessageSettingsRequestTypeID: func() bin.Object { return &SetBusinessGreetingMessageSettingsRequest{} }, + SetBusinessAwayMessageSettingsRequestTypeID: func() bin.Object { return &SetBusinessAwayMessageSettingsRequest{} }, + SetBusinessIntroRequestTypeID: func() bin.Object { return &SetBusinessIntroRequest{} }, + ChangePhoneNumberRequestTypeID: func() bin.Object { return &ChangePhoneNumberRequest{} }, + ResendChangePhoneNumberCodeRequestTypeID: func() bin.Object { return &ResendChangePhoneNumberCodeRequest{} }, + CheckChangePhoneNumberCodeRequestTypeID: func() bin.Object { return &CheckChangePhoneNumberCodeRequest{} }, + GetBusinessConnectedBotRequestTypeID: func() bin.Object { return &GetBusinessConnectedBotRequest{} }, + SetBusinessConnectedBotRequestTypeID: func() bin.Object { return &SetBusinessConnectedBotRequest{} }, + DeleteBusinessConnectedBotRequestTypeID: func() bin.Object { return &DeleteBusinessConnectedBotRequest{} }, + GetUserLinkRequestTypeID: func() bin.Object { return &GetUserLinkRequest{} }, + SearchUserByTokenRequestTypeID: func() bin.Object { return &SearchUserByTokenRequest{} }, + SetCommandsRequestTypeID: func() bin.Object { return &SetCommandsRequest{} }, + DeleteCommandsRequestTypeID: func() bin.Object { return &DeleteCommandsRequest{} }, + GetCommandsRequestTypeID: func() bin.Object { return &GetCommandsRequest{} }, + SetMenuButtonRequestTypeID: func() bin.Object { return &SetMenuButtonRequest{} }, + GetMenuButtonRequestTypeID: func() bin.Object { return &GetMenuButtonRequest{} }, + SetDefaultGroupAdministratorRightsRequestTypeID: func() bin.Object { return &SetDefaultGroupAdministratorRightsRequest{} }, + SetDefaultChannelAdministratorRightsRequestTypeID: func() bin.Object { return &SetDefaultChannelAdministratorRightsRequest{} }, + CanBotSendMessagesRequestTypeID: func() bin.Object { return &CanBotSendMessagesRequest{} }, + AllowBotToSendMessagesRequestTypeID: func() bin.Object { return &AllowBotToSendMessagesRequest{} }, + SendWebAppCustomRequestRequestTypeID: func() bin.Object { return &SendWebAppCustomRequestRequest{} }, + SetBotNameRequestTypeID: func() bin.Object { return &SetBotNameRequest{} }, + GetBotNameRequestTypeID: func() bin.Object { return &GetBotNameRequest{} }, + SetBotProfilePhotoRequestTypeID: func() bin.Object { return &SetBotProfilePhotoRequest{} }, + ToggleBotUsernameIsActiveRequestTypeID: func() bin.Object { return &ToggleBotUsernameIsActiveRequest{} }, + ReorderBotActiveUsernamesRequestTypeID: func() bin.Object { return &ReorderBotActiveUsernamesRequest{} }, + SetBotInfoDescriptionRequestTypeID: func() bin.Object { return &SetBotInfoDescriptionRequest{} }, + GetBotInfoDescriptionRequestTypeID: func() bin.Object { return &GetBotInfoDescriptionRequest{} }, + SetBotInfoShortDescriptionRequestTypeID: func() bin.Object { return &SetBotInfoShortDescriptionRequest{} }, + GetBotInfoShortDescriptionRequestTypeID: func() bin.Object { return &GetBotInfoShortDescriptionRequest{} }, + GetActiveSessionsRequestTypeID: func() bin.Object { return &GetActiveSessionsRequest{} }, + TerminateSessionRequestTypeID: func() bin.Object { return &TerminateSessionRequest{} }, + TerminateAllOtherSessionsRequestTypeID: func() bin.Object { return &TerminateAllOtherSessionsRequest{} }, + ConfirmSessionRequestTypeID: func() bin.Object { return &ConfirmSessionRequest{} }, + ToggleSessionCanAcceptCallsRequestTypeID: func() bin.Object { return &ToggleSessionCanAcceptCallsRequest{} }, + ToggleSessionCanAcceptSecretChatsRequestTypeID: func() bin.Object { return &ToggleSessionCanAcceptSecretChatsRequest{} }, + SetInactiveSessionTTLRequestTypeID: func() bin.Object { return &SetInactiveSessionTTLRequest{} }, + GetConnectedWebsitesRequestTypeID: func() bin.Object { return &GetConnectedWebsitesRequest{} }, + DisconnectWebsiteRequestTypeID: func() bin.Object { return &DisconnectWebsiteRequest{} }, + DisconnectAllWebsitesRequestTypeID: func() bin.Object { return &DisconnectAllWebsitesRequest{} }, + SetSupergroupUsernameRequestTypeID: func() bin.Object { return &SetSupergroupUsernameRequest{} }, + ToggleSupergroupUsernameIsActiveRequestTypeID: func() bin.Object { return &ToggleSupergroupUsernameIsActiveRequest{} }, + DisableAllSupergroupUsernamesRequestTypeID: func() bin.Object { return &DisableAllSupergroupUsernamesRequest{} }, + ReorderSupergroupActiveUsernamesRequestTypeID: func() bin.Object { return &ReorderSupergroupActiveUsernamesRequest{} }, + SetSupergroupStickerSetRequestTypeID: func() bin.Object { return &SetSupergroupStickerSetRequest{} }, + SetSupergroupCustomEmojiStickerSetRequestTypeID: func() bin.Object { return &SetSupergroupCustomEmojiStickerSetRequest{} }, + SetSupergroupUnrestrictBoostCountRequestTypeID: func() bin.Object { return &SetSupergroupUnrestrictBoostCountRequest{} }, + ToggleSupergroupSignMessagesRequestTypeID: func() bin.Object { return &ToggleSupergroupSignMessagesRequest{} }, + ToggleSupergroupJoinToSendMessagesRequestTypeID: func() bin.Object { return &ToggleSupergroupJoinToSendMessagesRequest{} }, + ToggleSupergroupJoinByRequestRequestTypeID: func() bin.Object { return &ToggleSupergroupJoinByRequestRequest{} }, + ToggleSupergroupIsAllHistoryAvailableRequestTypeID: func() bin.Object { return &ToggleSupergroupIsAllHistoryAvailableRequest{} }, + ToggleSupergroupHasHiddenMembersRequestTypeID: func() bin.Object { return &ToggleSupergroupHasHiddenMembersRequest{} }, + ToggleSupergroupHasAggressiveAntiSpamEnabledRequestTypeID: func() bin.Object { return &ToggleSupergroupHasAggressiveAntiSpamEnabledRequest{} }, + ToggleSupergroupIsForumRequestTypeID: func() bin.Object { return &ToggleSupergroupIsForumRequest{} }, + ToggleSupergroupIsBroadcastGroupRequestTypeID: func() bin.Object { return &ToggleSupergroupIsBroadcastGroupRequest{} }, + ReportSupergroupSpamRequestTypeID: func() bin.Object { return &ReportSupergroupSpamRequest{} }, + ReportSupergroupAntiSpamFalsePositiveRequestTypeID: func() bin.Object { return &ReportSupergroupAntiSpamFalsePositiveRequest{} }, + GetSupergroupMembersRequestTypeID: func() bin.Object { return &GetSupergroupMembersRequest{} }, + CloseSecretChatRequestTypeID: func() bin.Object { return &CloseSecretChatRequest{} }, + GetChatEventLogRequestTypeID: func() bin.Object { return &GetChatEventLogRequest{} }, + GetTimeZonesRequestTypeID: func() bin.Object { return &GetTimeZonesRequest{} }, + GetPaymentFormRequestTypeID: func() bin.Object { return &GetPaymentFormRequest{} }, + ValidateOrderInfoRequestTypeID: func() bin.Object { return &ValidateOrderInfoRequest{} }, + SendPaymentFormRequestTypeID: func() bin.Object { return &SendPaymentFormRequest{} }, + GetPaymentReceiptRequestTypeID: func() bin.Object { return &GetPaymentReceiptRequest{} }, + GetSavedOrderInfoRequestTypeID: func() bin.Object { return &GetSavedOrderInfoRequest{} }, + DeleteSavedOrderInfoRequestTypeID: func() bin.Object { return &DeleteSavedOrderInfoRequest{} }, + DeleteSavedCredentialsRequestTypeID: func() bin.Object { return &DeleteSavedCredentialsRequest{} }, + CreateInvoiceLinkRequestTypeID: func() bin.Object { return &CreateInvoiceLinkRequest{} }, + GetSupportUserRequestTypeID: func() bin.Object { return &GetSupportUserRequest{} }, + GetBackgroundURLRequestTypeID: func() bin.Object { return &GetBackgroundURLRequest{} }, + SearchBackgroundRequestTypeID: func() bin.Object { return &SearchBackgroundRequest{} }, + SetDefaultBackgroundRequestTypeID: func() bin.Object { return &SetDefaultBackgroundRequest{} }, + DeleteDefaultBackgroundRequestTypeID: func() bin.Object { return &DeleteDefaultBackgroundRequest{} }, + GetInstalledBackgroundsRequestTypeID: func() bin.Object { return &GetInstalledBackgroundsRequest{} }, + RemoveInstalledBackgroundRequestTypeID: func() bin.Object { return &RemoveInstalledBackgroundRequest{} }, + ResetInstalledBackgroundsRequestTypeID: func() bin.Object { return &ResetInstalledBackgroundsRequest{} }, + GetLocalizationTargetInfoRequestTypeID: func() bin.Object { return &GetLocalizationTargetInfoRequest{} }, + GetLanguagePackInfoRequestTypeID: func() bin.Object { return &GetLanguagePackInfoRequest{} }, + GetLanguagePackStringsRequestTypeID: func() bin.Object { return &GetLanguagePackStringsRequest{} }, + SynchronizeLanguagePackRequestTypeID: func() bin.Object { return &SynchronizeLanguagePackRequest{} }, + AddCustomServerLanguagePackRequestTypeID: func() bin.Object { return &AddCustomServerLanguagePackRequest{} }, + SetCustomLanguagePackRequestTypeID: func() bin.Object { return &SetCustomLanguagePackRequest{} }, + EditCustomLanguagePackInfoRequestTypeID: func() bin.Object { return &EditCustomLanguagePackInfoRequest{} }, + SetCustomLanguagePackStringRequestTypeID: func() bin.Object { return &SetCustomLanguagePackStringRequest{} }, + DeleteLanguagePackRequestTypeID: func() bin.Object { return &DeleteLanguagePackRequest{} }, + RegisterDeviceRequestTypeID: func() bin.Object { return &RegisterDeviceRequest{} }, + ProcessPushNotificationRequestTypeID: func() bin.Object { return &ProcessPushNotificationRequest{} }, + GetPushReceiverIDRequestTypeID: func() bin.Object { return &GetPushReceiverIDRequest{} }, + GetRecentlyVisitedTMeURLsRequestTypeID: func() bin.Object { return &GetRecentlyVisitedTMeURLsRequest{} }, + SetUserPrivacySettingRulesRequestTypeID: func() bin.Object { return &SetUserPrivacySettingRulesRequest{} }, + GetUserPrivacySettingRulesRequestTypeID: func() bin.Object { return &GetUserPrivacySettingRulesRequest{} }, + SetReadDatePrivacySettingsRequestTypeID: func() bin.Object { return &SetReadDatePrivacySettingsRequest{} }, + GetReadDatePrivacySettingsRequestTypeID: func() bin.Object { return &GetReadDatePrivacySettingsRequest{} }, + SetNewChatPrivacySettingsRequestTypeID: func() bin.Object { return &SetNewChatPrivacySettingsRequest{} }, + GetNewChatPrivacySettingsRequestTypeID: func() bin.Object { return &GetNewChatPrivacySettingsRequest{} }, + CanSendMessageToUserRequestTypeID: func() bin.Object { return &CanSendMessageToUserRequest{} }, + GetOptionRequestTypeID: func() bin.Object { return &GetOptionRequest{} }, + SetOptionRequestTypeID: func() bin.Object { return &SetOptionRequest{} }, + SetAccountTTLRequestTypeID: func() bin.Object { return &SetAccountTTLRequest{} }, + GetAccountTTLRequestTypeID: func() bin.Object { return &GetAccountTTLRequest{} }, + DeleteAccountRequestTypeID: func() bin.Object { return &DeleteAccountRequest{} }, + SetDefaultMessageAutoDeleteTimeRequestTypeID: func() bin.Object { return &SetDefaultMessageAutoDeleteTimeRequest{} }, + GetDefaultMessageAutoDeleteTimeRequestTypeID: func() bin.Object { return &GetDefaultMessageAutoDeleteTimeRequest{} }, + RemoveChatActionBarRequestTypeID: func() bin.Object { return &RemoveChatActionBarRequest{} }, + ReportChatRequestTypeID: func() bin.Object { return &ReportChatRequest{} }, + ReportChatPhotoRequestTypeID: func() bin.Object { return &ReportChatPhotoRequest{} }, + ReportMessageReactionsRequestTypeID: func() bin.Object { return &ReportMessageReactionsRequest{} }, + GetChatStatisticsRequestTypeID: func() bin.Object { return &GetChatStatisticsRequest{} }, + GetMessageStatisticsRequestTypeID: func() bin.Object { return &GetMessageStatisticsRequest{} }, + GetMessagePublicForwardsRequestTypeID: func() bin.Object { return &GetMessagePublicForwardsRequest{} }, + GetStoryStatisticsRequestTypeID: func() bin.Object { return &GetStoryStatisticsRequest{} }, + GetStatisticalGraphRequestTypeID: func() bin.Object { return &GetStatisticalGraphRequest{} }, + GetStorageStatisticsRequestTypeID: func() bin.Object { return &GetStorageStatisticsRequest{} }, + GetStorageStatisticsFastRequestTypeID: func() bin.Object { return &GetStorageStatisticsFastRequest{} }, + GetDatabaseStatisticsRequestTypeID: func() bin.Object { return &GetDatabaseStatisticsRequest{} }, + OptimizeStorageRequestTypeID: func() bin.Object { return &OptimizeStorageRequest{} }, + SetNetworkTypeRequestTypeID: func() bin.Object { return &SetNetworkTypeRequest{} }, + GetNetworkStatisticsRequestTypeID: func() bin.Object { return &GetNetworkStatisticsRequest{} }, + AddNetworkStatisticsRequestTypeID: func() bin.Object { return &AddNetworkStatisticsRequest{} }, + ResetNetworkStatisticsRequestTypeID: func() bin.Object { return &ResetNetworkStatisticsRequest{} }, + GetAutoDownloadSettingsPresetsRequestTypeID: func() bin.Object { return &GetAutoDownloadSettingsPresetsRequest{} }, + SetAutoDownloadSettingsRequestTypeID: func() bin.Object { return &SetAutoDownloadSettingsRequest{} }, + GetAutosaveSettingsRequestTypeID: func() bin.Object { return &GetAutosaveSettingsRequest{} }, + SetAutosaveSettingsRequestTypeID: func() bin.Object { return &SetAutosaveSettingsRequest{} }, + ClearAutosaveSettingsExceptionsRequestTypeID: func() bin.Object { return &ClearAutosaveSettingsExceptionsRequest{} }, + GetBankCardInfoRequestTypeID: func() bin.Object { return &GetBankCardInfoRequest{} }, + GetPassportElementRequestTypeID: func() bin.Object { return &GetPassportElementRequest{} }, + GetAllPassportElementsRequestTypeID: func() bin.Object { return &GetAllPassportElementsRequest{} }, + SetPassportElementRequestTypeID: func() bin.Object { return &SetPassportElementRequest{} }, + DeletePassportElementRequestTypeID: func() bin.Object { return &DeletePassportElementRequest{} }, + SetPassportElementErrorsRequestTypeID: func() bin.Object { return &SetPassportElementErrorsRequest{} }, + GetPreferredCountryLanguageRequestTypeID: func() bin.Object { return &GetPreferredCountryLanguageRequest{} }, + SendPhoneNumberVerificationCodeRequestTypeID: func() bin.Object { return &SendPhoneNumberVerificationCodeRequest{} }, + ResendPhoneNumberVerificationCodeRequestTypeID: func() bin.Object { return &ResendPhoneNumberVerificationCodeRequest{} }, + CheckPhoneNumberVerificationCodeRequestTypeID: func() bin.Object { return &CheckPhoneNumberVerificationCodeRequest{} }, + SendEmailAddressVerificationCodeRequestTypeID: func() bin.Object { return &SendEmailAddressVerificationCodeRequest{} }, + ResendEmailAddressVerificationCodeRequestTypeID: func() bin.Object { return &ResendEmailAddressVerificationCodeRequest{} }, + CheckEmailAddressVerificationCodeRequestTypeID: func() bin.Object { return &CheckEmailAddressVerificationCodeRequest{} }, + GetPassportAuthorizationFormRequestTypeID: func() bin.Object { return &GetPassportAuthorizationFormRequest{} }, + GetPassportAuthorizationFormAvailableElementsRequestTypeID: func() bin.Object { return &GetPassportAuthorizationFormAvailableElementsRequest{} }, + SendPassportAuthorizationFormRequestTypeID: func() bin.Object { return &SendPassportAuthorizationFormRequest{} }, + SendPhoneNumberConfirmationCodeRequestTypeID: func() bin.Object { return &SendPhoneNumberConfirmationCodeRequest{} }, + ResendPhoneNumberConfirmationCodeRequestTypeID: func() bin.Object { return &ResendPhoneNumberConfirmationCodeRequest{} }, + CheckPhoneNumberConfirmationCodeRequestTypeID: func() bin.Object { return &CheckPhoneNumberConfirmationCodeRequest{} }, + SetBotUpdatesStatusRequestTypeID: func() bin.Object { return &SetBotUpdatesStatusRequest{} }, + UploadStickerFileRequestTypeID: func() bin.Object { return &UploadStickerFileRequest{} }, + GetSuggestedStickerSetNameRequestTypeID: func() bin.Object { return &GetSuggestedStickerSetNameRequest{} }, + CheckStickerSetNameRequestTypeID: func() bin.Object { return &CheckStickerSetNameRequest{} }, + CreateNewStickerSetRequestTypeID: func() bin.Object { return &CreateNewStickerSetRequest{} }, + AddStickerToSetRequestTypeID: func() bin.Object { return &AddStickerToSetRequest{} }, + ReplaceStickerInSetRequestTypeID: func() bin.Object { return &ReplaceStickerInSetRequest{} }, + SetStickerSetThumbnailRequestTypeID: func() bin.Object { return &SetStickerSetThumbnailRequest{} }, + SetCustomEmojiStickerSetThumbnailRequestTypeID: func() bin.Object { return &SetCustomEmojiStickerSetThumbnailRequest{} }, + SetStickerSetTitleRequestTypeID: func() bin.Object { return &SetStickerSetTitleRequest{} }, + DeleteStickerSetRequestTypeID: func() bin.Object { return &DeleteStickerSetRequest{} }, + SetStickerPositionInSetRequestTypeID: func() bin.Object { return &SetStickerPositionInSetRequest{} }, + RemoveStickerFromSetRequestTypeID: func() bin.Object { return &RemoveStickerFromSetRequest{} }, + SetStickerEmojisRequestTypeID: func() bin.Object { return &SetStickerEmojisRequest{} }, + SetStickerKeywordsRequestTypeID: func() bin.Object { return &SetStickerKeywordsRequest{} }, + SetStickerMaskPositionRequestTypeID: func() bin.Object { return &SetStickerMaskPositionRequest{} }, + GetOwnedStickerSetsRequestTypeID: func() bin.Object { return &GetOwnedStickerSetsRequest{} }, + GetMapThumbnailFileRequestTypeID: func() bin.Object { return &GetMapThumbnailFileRequest{} }, + GetPremiumLimitRequestTypeID: func() bin.Object { return &GetPremiumLimitRequest{} }, + GetPremiumFeaturesRequestTypeID: func() bin.Object { return &GetPremiumFeaturesRequest{} }, + GetPremiumStickerExamplesRequestTypeID: func() bin.Object { return &GetPremiumStickerExamplesRequest{} }, + ViewPremiumFeatureRequestTypeID: func() bin.Object { return &ViewPremiumFeatureRequest{} }, + ClickPremiumSubscriptionButtonRequestTypeID: func() bin.Object { return &ClickPremiumSubscriptionButtonRequest{} }, + GetPremiumStateRequestTypeID: func() bin.Object { return &GetPremiumStateRequest{} }, + GetPremiumGiftCodePaymentOptionsRequestTypeID: func() bin.Object { return &GetPremiumGiftCodePaymentOptionsRequest{} }, + CheckPremiumGiftCodeRequestTypeID: func() bin.Object { return &CheckPremiumGiftCodeRequest{} }, + ApplyPremiumGiftCodeRequestTypeID: func() bin.Object { return &ApplyPremiumGiftCodeRequest{} }, + LaunchPrepaidPremiumGiveawayRequestTypeID: func() bin.Object { return &LaunchPrepaidPremiumGiveawayRequest{} }, + GetPremiumGiveawayInfoRequestTypeID: func() bin.Object { return &GetPremiumGiveawayInfoRequest{} }, + CanPurchasePremiumRequestTypeID: func() bin.Object { return &CanPurchasePremiumRequest{} }, + AssignAppStoreTransactionRequestTypeID: func() bin.Object { return &AssignAppStoreTransactionRequest{} }, + AssignGooglePlayTransactionRequestTypeID: func() bin.Object { return &AssignGooglePlayTransactionRequest{} }, + GetBusinessFeaturesRequestTypeID: func() bin.Object { return &GetBusinessFeaturesRequest{} }, + AcceptTermsOfServiceRequestTypeID: func() bin.Object { return &AcceptTermsOfServiceRequest{} }, + SearchStringsByPrefixRequestTypeID: func() bin.Object { return &SearchStringsByPrefixRequest{} }, + SendCustomRequestRequestTypeID: func() bin.Object { return &SendCustomRequestRequest{} }, + AnswerCustomQueryRequestTypeID: func() bin.Object { return &AnswerCustomQueryRequest{} }, + SetAlarmRequestTypeID: func() bin.Object { return &SetAlarmRequest{} }, + GetCountriesRequestTypeID: func() bin.Object { return &GetCountriesRequest{} }, + GetCountryCodeRequestTypeID: func() bin.Object { return &GetCountryCodeRequest{} }, + GetPhoneNumberInfoRequestTypeID: func() bin.Object { return &GetPhoneNumberInfoRequest{} }, + GetPhoneNumberInfoSyncRequestTypeID: func() bin.Object { return &GetPhoneNumberInfoSyncRequest{} }, + GetCollectibleItemInfoRequestTypeID: func() bin.Object { return &GetCollectibleItemInfoRequest{} }, + GetDeepLinkInfoRequestTypeID: func() bin.Object { return &GetDeepLinkInfoRequest{} }, + GetApplicationConfigRequestTypeID: func() bin.Object { return &GetApplicationConfigRequest{} }, + SaveApplicationLogEventRequestTypeID: func() bin.Object { return &SaveApplicationLogEventRequest{} }, + GetApplicationDownloadLinkRequestTypeID: func() bin.Object { return &GetApplicationDownloadLinkRequest{} }, + AddProxyRequestTypeID: func() bin.Object { return &AddProxyRequest{} }, + EditProxyRequestTypeID: func() bin.Object { return &EditProxyRequest{} }, + EnableProxyRequestTypeID: func() bin.Object { return &EnableProxyRequest{} }, + DisableProxyRequestTypeID: func() bin.Object { return &DisableProxyRequest{} }, + RemoveProxyRequestTypeID: func() bin.Object { return &RemoveProxyRequest{} }, + GetProxiesRequestTypeID: func() bin.Object { return &GetProxiesRequest{} }, + GetProxyLinkRequestTypeID: func() bin.Object { return &GetProxyLinkRequest{} }, + PingProxyRequestTypeID: func() bin.Object { return &PingProxyRequest{} }, + SetLogStreamRequestTypeID: func() bin.Object { return &SetLogStreamRequest{} }, + GetLogStreamRequestTypeID: func() bin.Object { return &GetLogStreamRequest{} }, + SetLogVerbosityLevelRequestTypeID: func() bin.Object { return &SetLogVerbosityLevelRequest{} }, + GetLogVerbosityLevelRequestTypeID: func() bin.Object { return &GetLogVerbosityLevelRequest{} }, + GetLogTagsRequestTypeID: func() bin.Object { return &GetLogTagsRequest{} }, + SetLogTagVerbosityLevelRequestTypeID: func() bin.Object { return &SetLogTagVerbosityLevelRequest{} }, + GetLogTagVerbosityLevelRequestTypeID: func() bin.Object { return &GetLogTagVerbosityLevelRequest{} }, + AddLogMessageRequestTypeID: func() bin.Object { return &AddLogMessageRequest{} }, + GetUserSupportInfoRequestTypeID: func() bin.Object { return &GetUserSupportInfoRequest{} }, + SetUserSupportInfoRequestTypeID: func() bin.Object { return &SetUserSupportInfoRequest{} }, + GetSupportNameRequestTypeID: func() bin.Object { return &GetSupportNameRequest{} }, + TestCallEmptyRequestTypeID: func() bin.Object { return &TestCallEmptyRequest{} }, + TestCallStringRequestTypeID: func() bin.Object { return &TestCallStringRequest{} }, + TestCallBytesRequestTypeID: func() bin.Object { return &TestCallBytesRequest{} }, + TestCallVectorIntRequestTypeID: func() bin.Object { return &TestCallVectorIntRequest{} }, + TestCallVectorIntObjectRequestTypeID: func() bin.Object { return &TestCallVectorIntObjectRequest{} }, + TestCallVectorStringRequestTypeID: func() bin.Object { return &TestCallVectorStringRequest{} }, + TestCallVectorStringObjectRequestTypeID: func() bin.Object { return &TestCallVectorStringObjectRequest{} }, + TestSquareIntRequestTypeID: func() bin.Object { return &TestSquareIntRequest{} }, + TestNetworkRequestTypeID: func() bin.Object { return &TestNetworkRequest{} }, + TestProxyRequestTypeID: func() bin.Object { return &TestProxyRequest{} }, + TestGetDifferenceRequestTypeID: func() bin.Object { return &TestGetDifferenceRequest{} }, + TestUseUpdateRequestTypeID: func() bin.Object { return &TestUseUpdateRequest{} }, + TestReturnErrorRequestTypeID: func() bin.Object { return &TestReturnErrorRequest{} }, } } @@ -6526,6 +6685,19 @@ func ClassConstructorsMap() map[string][]uint32 { BusinessAwayMessageScheduleOutsideOfOpeningHoursTypeID, BusinessAwayMessageScheduleCustomTypeID, }, + BusinessFeatureClassName: { + BusinessFeatureLocationTypeID, + BusinessFeatureOpeningHoursTypeID, + BusinessFeatureQuickRepliesTypeID, + BusinessFeatureGreetingMessageTypeID, + BusinessFeatureAwayMessageTypeID, + BusinessFeatureAccountLinksTypeID, + BusinessFeatureIntroTypeID, + BusinessFeatureBotsTypeID, + BusinessFeatureEmojiStatusTypeID, + BusinessFeatureChatFolderTagsTypeID, + BusinessFeatureUpgradedStoriesTypeID, + }, CallDiscardReasonClassName: { CallDiscardReasonEmptyTypeID, CallDiscardReasonMissedTypeID, @@ -6723,6 +6895,10 @@ func ClassConstructorsMap() map[string][]uint32 { CheckStickerSetNameResultNameInvalidTypeID, CheckStickerSetNameResultNameOccupiedTypeID, }, + CollectibleItemTypeClassName: { + CollectibleItemTypeUsernameTypeID, + CollectibleItemTypePhoneNumberTypeID, + }, ConnectionStateClassName: { ConnectionStateWaitingForNetworkTypeID, ConnectionStateConnectingToProxyTypeID, @@ -7293,6 +7469,7 @@ func ClassConstructorsMap() map[string][]uint32 { PremiumFeatureSavedMessagesTagsTypeID, PremiumFeatureMessagePrivacyTypeID, PremiumFeatureLastSeenTimesTypeID, + PremiumFeatureBusinessTypeID, }, PremiumGiveawayInfoClassName: { PremiumGiveawayInfoOngoingTypeID, @@ -7329,6 +7506,7 @@ func ClassConstructorsMap() map[string][]uint32 { PremiumSourceClassName: { PremiumSourceLimitExceededTypeID, PremiumSourceFeatureTypeID, + PremiumSourceBusinessFeatureTypeID, PremiumSourceStoryFeatureTypeID, PremiumSourceLinkTypeID, PremiumSourceSettingsTypeID, @@ -7405,6 +7583,13 @@ func ClassConstructorsMap() map[string][]uint32 { ReplyMarkupShowKeyboardTypeID, ReplyMarkupInlineKeyboardTypeID, }, + ReportChatSponsoredMessageResultClassName: { + ReportChatSponsoredMessageResultOkTypeID, + ReportChatSponsoredMessageResultFailedTypeID, + ReportChatSponsoredMessageResultOptionRequiredTypeID, + ReportChatSponsoredMessageResultAdsHiddenTypeID, + ReportChatSponsoredMessageResultPremiumRequiredTypeID, + }, ReportReasonClassName: { ReportReasonSpamTypeID, ReportReasonViolenceTypeID, @@ -7561,6 +7746,7 @@ func ClassConstructorsMap() map[string][]uint32 { SuggestedActionRestorePremiumTypeID, SuggestedActionSubscribeToAnnualPremiumTypeID, SuggestedActionGiftPremiumForChristmasTypeID, + SuggestedActionSetBirthdateTypeID, }, SupergroupMembersFilterClassName: { SupergroupMembersFilterRecentTypeID, @@ -7751,8 +7937,13 @@ func ClassConstructorsMap() map[string][]uint32 { UpdateAnimatedEmojiMessageClickedTypeID, UpdateAnimationSearchParametersTypeID, UpdateSuggestedActionsTypeID, + UpdateContactCloseBirthdaysTypeID, UpdateAddChatMembersPrivacyForbiddenTypeID, UpdateAutosaveSettingsTypeID, + UpdateBusinessConnectionTypeID, + UpdateNewBusinessMessageTypeID, + UpdateBusinessMessageEditedTypeID, + UpdateBusinessMessagesDeletedTypeID, UpdateNewInlineQueryTypeID, UpdateNewChosenInlineResultTypeID, UpdateNewCallbackQueryTypeID, @@ -7775,6 +7966,7 @@ func ClassConstructorsMap() map[string][]uint32 { UserPrivacySettingShowLinkInForwardedMessagesTypeID, UserPrivacySettingShowPhoneNumberTypeID, UserPrivacySettingShowBioTypeID, + UserPrivacySettingShowBirthdateTypeID, UserPrivacySettingAllowChatInvitesTypeID, UserPrivacySettingAllowCallsTypeID, UserPrivacySettingAllowPeerToPeerCallsTypeID, @@ -7784,6 +7976,7 @@ func ClassConstructorsMap() map[string][]uint32 { UserPrivacySettingRuleClassName: { UserPrivacySettingRuleAllowAllTypeID, UserPrivacySettingRuleAllowContactsTypeID, + UserPrivacySettingRuleAllowPremiumUsersTypeID, UserPrivacySettingRuleAllowUsersTypeID, UserPrivacySettingRuleAllowChatMembersTypeID, UserPrivacySettingRuleRestrictAllTypeID, diff --git a/tdapi/tl_remove_sticker_from_set_gen.go b/tdapi/tl_remove_sticker_from_set_gen.go index 452d9a2f29..3d6a0bce1a 100644 --- a/tdapi/tl_remove_sticker_from_set_gen.go +++ b/tdapi/tl_remove_sticker_from_set_gen.go @@ -33,7 +33,7 @@ var ( // RemoveStickerFromSetRequest represents TL type `removeStickerFromSet#61e1eea4`. type RemoveStickerFromSetRequest struct { - // Sticker + // Sticker to remove from the set Sticker InputFileClass } diff --git a/tdapi/tl_replace_sticker_in_set_gen.go b/tdapi/tl_replace_sticker_in_set_gen.go new file mode 100644 index 0000000000..7c023cb1e5 --- /dev/null +++ b/tdapi/tl_replace_sticker_in_set_gen.go @@ -0,0 +1,315 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// ReplaceStickerInSetRequest represents TL type `replaceStickerInSet#e7c82e19`. +type ReplaceStickerInSetRequest struct { + // Sticker set owner; ignored for regular users + UserID int64 + // Sticker set name. The sticker set must be owned by the current user + Name string + // Sticker to remove from the set + OldSticker InputFileClass + // Sticker to add to the set + NewSticker InputSticker +} + +// ReplaceStickerInSetRequestTypeID is TL type id of ReplaceStickerInSetRequest. +const ReplaceStickerInSetRequestTypeID = 0xe7c82e19 + +// Ensuring interfaces in compile-time for ReplaceStickerInSetRequest. +var ( + _ bin.Encoder = &ReplaceStickerInSetRequest{} + _ bin.Decoder = &ReplaceStickerInSetRequest{} + _ bin.BareEncoder = &ReplaceStickerInSetRequest{} + _ bin.BareDecoder = &ReplaceStickerInSetRequest{} +) + +func (r *ReplaceStickerInSetRequest) Zero() bool { + if r == nil { + return true + } + if !(r.UserID == 0) { + return false + } + if !(r.Name == "") { + return false + } + if !(r.OldSticker == nil) { + return false + } + if !(r.NewSticker.Zero()) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (r *ReplaceStickerInSetRequest) String() string { + if r == nil { + return "ReplaceStickerInSetRequest(nil)" + } + type Alias ReplaceStickerInSetRequest + return fmt.Sprintf("ReplaceStickerInSetRequest%+v", Alias(*r)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*ReplaceStickerInSetRequest) TypeID() uint32 { + return ReplaceStickerInSetRequestTypeID +} + +// TypeName returns name of type in TL schema. +func (*ReplaceStickerInSetRequest) TypeName() string { + return "replaceStickerInSet" +} + +// TypeInfo returns info about TL type. +func (r *ReplaceStickerInSetRequest) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "replaceStickerInSet", + ID: ReplaceStickerInSetRequestTypeID, + } + if r == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "UserID", + SchemaName: "user_id", + }, + { + Name: "Name", + SchemaName: "name", + }, + { + Name: "OldSticker", + SchemaName: "old_sticker", + }, + { + Name: "NewSticker", + SchemaName: "new_sticker", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (r *ReplaceStickerInSetRequest) Encode(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't encode replaceStickerInSet#e7c82e19 as nil") + } + b.PutID(ReplaceStickerInSetRequestTypeID) + return r.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (r *ReplaceStickerInSetRequest) EncodeBare(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't encode replaceStickerInSet#e7c82e19 as nil") + } + b.PutInt53(r.UserID) + b.PutString(r.Name) + if r.OldSticker == nil { + return fmt.Errorf("unable to encode replaceStickerInSet#e7c82e19: field old_sticker is nil") + } + if err := r.OldSticker.Encode(b); err != nil { + return fmt.Errorf("unable to encode replaceStickerInSet#e7c82e19: field old_sticker: %w", err) + } + if err := r.NewSticker.Encode(b); err != nil { + return fmt.Errorf("unable to encode replaceStickerInSet#e7c82e19: field new_sticker: %w", err) + } + return nil +} + +// Decode implements bin.Decoder. +func (r *ReplaceStickerInSetRequest) Decode(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't decode replaceStickerInSet#e7c82e19 to nil") + } + if err := b.ConsumeID(ReplaceStickerInSetRequestTypeID); err != nil { + return fmt.Errorf("unable to decode replaceStickerInSet#e7c82e19: %w", err) + } + return r.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (r *ReplaceStickerInSetRequest) DecodeBare(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't decode replaceStickerInSet#e7c82e19 to nil") + } + { + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode replaceStickerInSet#e7c82e19: field user_id: %w", err) + } + r.UserID = value + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode replaceStickerInSet#e7c82e19: field name: %w", err) + } + r.Name = value + } + { + value, err := DecodeInputFile(b) + if err != nil { + return fmt.Errorf("unable to decode replaceStickerInSet#e7c82e19: field old_sticker: %w", err) + } + r.OldSticker = value + } + { + if err := r.NewSticker.Decode(b); err != nil { + return fmt.Errorf("unable to decode replaceStickerInSet#e7c82e19: field new_sticker: %w", err) + } + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (r *ReplaceStickerInSetRequest) EncodeTDLibJSON(b tdjson.Encoder) error { + if r == nil { + return fmt.Errorf("can't encode replaceStickerInSet#e7c82e19 as nil") + } + b.ObjStart() + b.PutID("replaceStickerInSet") + b.Comma() + b.FieldStart("user_id") + b.PutInt53(r.UserID) + b.Comma() + b.FieldStart("name") + b.PutString(r.Name) + b.Comma() + b.FieldStart("old_sticker") + if r.OldSticker == nil { + return fmt.Errorf("unable to encode replaceStickerInSet#e7c82e19: field old_sticker is nil") + } + if err := r.OldSticker.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode replaceStickerInSet#e7c82e19: field old_sticker: %w", err) + } + b.Comma() + b.FieldStart("new_sticker") + if err := r.NewSticker.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode replaceStickerInSet#e7c82e19: field new_sticker: %w", err) + } + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (r *ReplaceStickerInSetRequest) DecodeTDLibJSON(b tdjson.Decoder) error { + if r == nil { + return fmt.Errorf("can't decode replaceStickerInSet#e7c82e19 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("replaceStickerInSet"); err != nil { + return fmt.Errorf("unable to decode replaceStickerInSet#e7c82e19: %w", err) + } + case "user_id": + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode replaceStickerInSet#e7c82e19: field user_id: %w", err) + } + r.UserID = value + case "name": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode replaceStickerInSet#e7c82e19: field name: %w", err) + } + r.Name = value + case "old_sticker": + value, err := DecodeTDLibJSONInputFile(b) + if err != nil { + return fmt.Errorf("unable to decode replaceStickerInSet#e7c82e19: field old_sticker: %w", err) + } + r.OldSticker = value + case "new_sticker": + if err := r.NewSticker.DecodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to decode replaceStickerInSet#e7c82e19: field new_sticker: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// GetUserID returns value of UserID field. +func (r *ReplaceStickerInSetRequest) GetUserID() (value int64) { + if r == nil { + return + } + return r.UserID +} + +// GetName returns value of Name field. +func (r *ReplaceStickerInSetRequest) GetName() (value string) { + if r == nil { + return + } + return r.Name +} + +// GetOldSticker returns value of OldSticker field. +func (r *ReplaceStickerInSetRequest) GetOldSticker() (value InputFileClass) { + if r == nil { + return + } + return r.OldSticker +} + +// GetNewSticker returns value of NewSticker field. +func (r *ReplaceStickerInSetRequest) GetNewSticker() (value InputSticker) { + if r == nil { + return + } + return r.NewSticker +} + +// ReplaceStickerInSet invokes method replaceStickerInSet#e7c82e19 returning error if any. +func (c *Client) ReplaceStickerInSet(ctx context.Context, request *ReplaceStickerInSetRequest) error { + var ok Ok + + if err := c.rpc.Invoke(ctx, request, &ok); err != nil { + return err + } + return nil +} diff --git a/tdapi/tl_report_chat_sponsored_message_gen.go b/tdapi/tl_report_chat_sponsored_message_gen.go new file mode 100644 index 0000000000..4ac58bb36e --- /dev/null +++ b/tdapi/tl_report_chat_sponsored_message_gen.go @@ -0,0 +1,271 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// ReportChatSponsoredMessageRequest represents TL type `reportChatSponsoredMessage#cc3e53be`. +type ReportChatSponsoredMessageRequest struct { + // Chat identifier of the sponsored message + ChatID int64 + // Identifier of the sponsored message + MessageID int64 + // Option identifier chosen by the user; leave empty for the initial request + OptionID []byte +} + +// ReportChatSponsoredMessageRequestTypeID is TL type id of ReportChatSponsoredMessageRequest. +const ReportChatSponsoredMessageRequestTypeID = 0xcc3e53be + +// Ensuring interfaces in compile-time for ReportChatSponsoredMessageRequest. +var ( + _ bin.Encoder = &ReportChatSponsoredMessageRequest{} + _ bin.Decoder = &ReportChatSponsoredMessageRequest{} + _ bin.BareEncoder = &ReportChatSponsoredMessageRequest{} + _ bin.BareDecoder = &ReportChatSponsoredMessageRequest{} +) + +func (r *ReportChatSponsoredMessageRequest) Zero() bool { + if r == nil { + return true + } + if !(r.ChatID == 0) { + return false + } + if !(r.MessageID == 0) { + return false + } + if !(r.OptionID == nil) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (r *ReportChatSponsoredMessageRequest) String() string { + if r == nil { + return "ReportChatSponsoredMessageRequest(nil)" + } + type Alias ReportChatSponsoredMessageRequest + return fmt.Sprintf("ReportChatSponsoredMessageRequest%+v", Alias(*r)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*ReportChatSponsoredMessageRequest) TypeID() uint32 { + return ReportChatSponsoredMessageRequestTypeID +} + +// TypeName returns name of type in TL schema. +func (*ReportChatSponsoredMessageRequest) TypeName() string { + return "reportChatSponsoredMessage" +} + +// TypeInfo returns info about TL type. +func (r *ReportChatSponsoredMessageRequest) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "reportChatSponsoredMessage", + ID: ReportChatSponsoredMessageRequestTypeID, + } + if r == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "ChatID", + SchemaName: "chat_id", + }, + { + Name: "MessageID", + SchemaName: "message_id", + }, + { + Name: "OptionID", + SchemaName: "option_id", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (r *ReportChatSponsoredMessageRequest) Encode(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't encode reportChatSponsoredMessage#cc3e53be as nil") + } + b.PutID(ReportChatSponsoredMessageRequestTypeID) + return r.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (r *ReportChatSponsoredMessageRequest) EncodeBare(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't encode reportChatSponsoredMessage#cc3e53be as nil") + } + b.PutInt53(r.ChatID) + b.PutInt53(r.MessageID) + b.PutBytes(r.OptionID) + return nil +} + +// Decode implements bin.Decoder. +func (r *ReportChatSponsoredMessageRequest) Decode(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't decode reportChatSponsoredMessage#cc3e53be to nil") + } + if err := b.ConsumeID(ReportChatSponsoredMessageRequestTypeID); err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessage#cc3e53be: %w", err) + } + return r.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (r *ReportChatSponsoredMessageRequest) DecodeBare(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't decode reportChatSponsoredMessage#cc3e53be to nil") + } + { + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessage#cc3e53be: field chat_id: %w", err) + } + r.ChatID = value + } + { + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessage#cc3e53be: field message_id: %w", err) + } + r.MessageID = value + } + { + value, err := b.Bytes() + if err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessage#cc3e53be: field option_id: %w", err) + } + r.OptionID = value + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (r *ReportChatSponsoredMessageRequest) EncodeTDLibJSON(b tdjson.Encoder) error { + if r == nil { + return fmt.Errorf("can't encode reportChatSponsoredMessage#cc3e53be as nil") + } + b.ObjStart() + b.PutID("reportChatSponsoredMessage") + b.Comma() + b.FieldStart("chat_id") + b.PutInt53(r.ChatID) + b.Comma() + b.FieldStart("message_id") + b.PutInt53(r.MessageID) + b.Comma() + b.FieldStart("option_id") + b.PutBytes(r.OptionID) + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (r *ReportChatSponsoredMessageRequest) DecodeTDLibJSON(b tdjson.Decoder) error { + if r == nil { + return fmt.Errorf("can't decode reportChatSponsoredMessage#cc3e53be to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("reportChatSponsoredMessage"); err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessage#cc3e53be: %w", err) + } + case "chat_id": + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessage#cc3e53be: field chat_id: %w", err) + } + r.ChatID = value + case "message_id": + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessage#cc3e53be: field message_id: %w", err) + } + r.MessageID = value + case "option_id": + value, err := b.Bytes() + if err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessage#cc3e53be: field option_id: %w", err) + } + r.OptionID = value + default: + return b.Skip() + } + return nil + }) +} + +// GetChatID returns value of ChatID field. +func (r *ReportChatSponsoredMessageRequest) GetChatID() (value int64) { + if r == nil { + return + } + return r.ChatID +} + +// GetMessageID returns value of MessageID field. +func (r *ReportChatSponsoredMessageRequest) GetMessageID() (value int64) { + if r == nil { + return + } + return r.MessageID +} + +// GetOptionID returns value of OptionID field. +func (r *ReportChatSponsoredMessageRequest) GetOptionID() (value []byte) { + if r == nil { + return + } + return r.OptionID +} + +// ReportChatSponsoredMessage invokes method reportChatSponsoredMessage#cc3e53be returning error if any. +func (c *Client) ReportChatSponsoredMessage(ctx context.Context, request *ReportChatSponsoredMessageRequest) (ReportChatSponsoredMessageResultClass, error) { + var result ReportChatSponsoredMessageResultBox + + if err := c.rpc.Invoke(ctx, request, &result); err != nil { + return nil, err + } + return result.ReportChatSponsoredMessageResult, nil +} diff --git a/tdapi/tl_report_chat_sponsored_message_option_gen.go b/tdapi/tl_report_chat_sponsored_message_option_gen.go new file mode 100644 index 0000000000..33f9ccd2b3 --- /dev/null +++ b/tdapi/tl_report_chat_sponsored_message_option_gen.go @@ -0,0 +1,227 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// ReportChatSponsoredMessageOption represents TL type `reportChatSponsoredMessageOption#aabd054a`. +type ReportChatSponsoredMessageOption struct { + // Unique identifier of the option + ID []byte + // Text of the option + Text string +} + +// ReportChatSponsoredMessageOptionTypeID is TL type id of ReportChatSponsoredMessageOption. +const ReportChatSponsoredMessageOptionTypeID = 0xaabd054a + +// Ensuring interfaces in compile-time for ReportChatSponsoredMessageOption. +var ( + _ bin.Encoder = &ReportChatSponsoredMessageOption{} + _ bin.Decoder = &ReportChatSponsoredMessageOption{} + _ bin.BareEncoder = &ReportChatSponsoredMessageOption{} + _ bin.BareDecoder = &ReportChatSponsoredMessageOption{} +) + +func (r *ReportChatSponsoredMessageOption) Zero() bool { + if r == nil { + return true + } + if !(r.ID == nil) { + return false + } + if !(r.Text == "") { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (r *ReportChatSponsoredMessageOption) String() string { + if r == nil { + return "ReportChatSponsoredMessageOption(nil)" + } + type Alias ReportChatSponsoredMessageOption + return fmt.Sprintf("ReportChatSponsoredMessageOption%+v", Alias(*r)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*ReportChatSponsoredMessageOption) TypeID() uint32 { + return ReportChatSponsoredMessageOptionTypeID +} + +// TypeName returns name of type in TL schema. +func (*ReportChatSponsoredMessageOption) TypeName() string { + return "reportChatSponsoredMessageOption" +} + +// TypeInfo returns info about TL type. +func (r *ReportChatSponsoredMessageOption) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "reportChatSponsoredMessageOption", + ID: ReportChatSponsoredMessageOptionTypeID, + } + if r == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "ID", + SchemaName: "id", + }, + { + Name: "Text", + SchemaName: "text", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (r *ReportChatSponsoredMessageOption) Encode(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't encode reportChatSponsoredMessageOption#aabd054a as nil") + } + b.PutID(ReportChatSponsoredMessageOptionTypeID) + return r.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (r *ReportChatSponsoredMessageOption) EncodeBare(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't encode reportChatSponsoredMessageOption#aabd054a as nil") + } + b.PutBytes(r.ID) + b.PutString(r.Text) + return nil +} + +// Decode implements bin.Decoder. +func (r *ReportChatSponsoredMessageOption) Decode(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't decode reportChatSponsoredMessageOption#aabd054a to nil") + } + if err := b.ConsumeID(ReportChatSponsoredMessageOptionTypeID); err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessageOption#aabd054a: %w", err) + } + return r.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (r *ReportChatSponsoredMessageOption) DecodeBare(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't decode reportChatSponsoredMessageOption#aabd054a to nil") + } + { + value, err := b.Bytes() + if err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessageOption#aabd054a: field id: %w", err) + } + r.ID = value + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessageOption#aabd054a: field text: %w", err) + } + r.Text = value + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (r *ReportChatSponsoredMessageOption) EncodeTDLibJSON(b tdjson.Encoder) error { + if r == nil { + return fmt.Errorf("can't encode reportChatSponsoredMessageOption#aabd054a as nil") + } + b.ObjStart() + b.PutID("reportChatSponsoredMessageOption") + b.Comma() + b.FieldStart("id") + b.PutBytes(r.ID) + b.Comma() + b.FieldStart("text") + b.PutString(r.Text) + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (r *ReportChatSponsoredMessageOption) DecodeTDLibJSON(b tdjson.Decoder) error { + if r == nil { + return fmt.Errorf("can't decode reportChatSponsoredMessageOption#aabd054a to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("reportChatSponsoredMessageOption"); err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessageOption#aabd054a: %w", err) + } + case "id": + value, err := b.Bytes() + if err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessageOption#aabd054a: field id: %w", err) + } + r.ID = value + case "text": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessageOption#aabd054a: field text: %w", err) + } + r.Text = value + default: + return b.Skip() + } + return nil + }) +} + +// GetID returns value of ID field. +func (r *ReportChatSponsoredMessageOption) GetID() (value []byte) { + if r == nil { + return + } + return r.ID +} + +// GetText returns value of Text field. +func (r *ReportChatSponsoredMessageOption) GetText() (value string) { + if r == nil { + return + } + return r.Text +} diff --git a/tdapi/tl_report_chat_sponsored_message_result_gen.go b/tdapi/tl_report_chat_sponsored_message_result_gen.go new file mode 100644 index 0000000000..1cd06ecee7 --- /dev/null +++ b/tdapi/tl_report_chat_sponsored_message_result_gen.go @@ -0,0 +1,976 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// ReportChatSponsoredMessageResultOk represents TL type `reportChatSponsoredMessageResultOk#754f721f`. +type ReportChatSponsoredMessageResultOk struct { +} + +// ReportChatSponsoredMessageResultOkTypeID is TL type id of ReportChatSponsoredMessageResultOk. +const ReportChatSponsoredMessageResultOkTypeID = 0x754f721f + +// construct implements constructor of ReportChatSponsoredMessageResultClass. +func (r ReportChatSponsoredMessageResultOk) construct() ReportChatSponsoredMessageResultClass { + return &r +} + +// Ensuring interfaces in compile-time for ReportChatSponsoredMessageResultOk. +var ( + _ bin.Encoder = &ReportChatSponsoredMessageResultOk{} + _ bin.Decoder = &ReportChatSponsoredMessageResultOk{} + _ bin.BareEncoder = &ReportChatSponsoredMessageResultOk{} + _ bin.BareDecoder = &ReportChatSponsoredMessageResultOk{} + + _ ReportChatSponsoredMessageResultClass = &ReportChatSponsoredMessageResultOk{} +) + +func (r *ReportChatSponsoredMessageResultOk) Zero() bool { + if r == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (r *ReportChatSponsoredMessageResultOk) String() string { + if r == nil { + return "ReportChatSponsoredMessageResultOk(nil)" + } + type Alias ReportChatSponsoredMessageResultOk + return fmt.Sprintf("ReportChatSponsoredMessageResultOk%+v", Alias(*r)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*ReportChatSponsoredMessageResultOk) TypeID() uint32 { + return ReportChatSponsoredMessageResultOkTypeID +} + +// TypeName returns name of type in TL schema. +func (*ReportChatSponsoredMessageResultOk) TypeName() string { + return "reportChatSponsoredMessageResultOk" +} + +// TypeInfo returns info about TL type. +func (r *ReportChatSponsoredMessageResultOk) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "reportChatSponsoredMessageResultOk", + ID: ReportChatSponsoredMessageResultOkTypeID, + } + if r == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (r *ReportChatSponsoredMessageResultOk) Encode(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't encode reportChatSponsoredMessageResultOk#754f721f as nil") + } + b.PutID(ReportChatSponsoredMessageResultOkTypeID) + return r.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (r *ReportChatSponsoredMessageResultOk) EncodeBare(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't encode reportChatSponsoredMessageResultOk#754f721f as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (r *ReportChatSponsoredMessageResultOk) Decode(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't decode reportChatSponsoredMessageResultOk#754f721f to nil") + } + if err := b.ConsumeID(ReportChatSponsoredMessageResultOkTypeID); err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessageResultOk#754f721f: %w", err) + } + return r.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (r *ReportChatSponsoredMessageResultOk) DecodeBare(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't decode reportChatSponsoredMessageResultOk#754f721f to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (r *ReportChatSponsoredMessageResultOk) EncodeTDLibJSON(b tdjson.Encoder) error { + if r == nil { + return fmt.Errorf("can't encode reportChatSponsoredMessageResultOk#754f721f as nil") + } + b.ObjStart() + b.PutID("reportChatSponsoredMessageResultOk") + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (r *ReportChatSponsoredMessageResultOk) DecodeTDLibJSON(b tdjson.Decoder) error { + if r == nil { + return fmt.Errorf("can't decode reportChatSponsoredMessageResultOk#754f721f to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("reportChatSponsoredMessageResultOk"); err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessageResultOk#754f721f: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// ReportChatSponsoredMessageResultFailed represents TL type `reportChatSponsoredMessageResultFailed#7f1f9bc6`. +type ReportChatSponsoredMessageResultFailed struct { +} + +// ReportChatSponsoredMessageResultFailedTypeID is TL type id of ReportChatSponsoredMessageResultFailed. +const ReportChatSponsoredMessageResultFailedTypeID = 0x7f1f9bc6 + +// construct implements constructor of ReportChatSponsoredMessageResultClass. +func (r ReportChatSponsoredMessageResultFailed) construct() ReportChatSponsoredMessageResultClass { + return &r +} + +// Ensuring interfaces in compile-time for ReportChatSponsoredMessageResultFailed. +var ( + _ bin.Encoder = &ReportChatSponsoredMessageResultFailed{} + _ bin.Decoder = &ReportChatSponsoredMessageResultFailed{} + _ bin.BareEncoder = &ReportChatSponsoredMessageResultFailed{} + _ bin.BareDecoder = &ReportChatSponsoredMessageResultFailed{} + + _ ReportChatSponsoredMessageResultClass = &ReportChatSponsoredMessageResultFailed{} +) + +func (r *ReportChatSponsoredMessageResultFailed) Zero() bool { + if r == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (r *ReportChatSponsoredMessageResultFailed) String() string { + if r == nil { + return "ReportChatSponsoredMessageResultFailed(nil)" + } + type Alias ReportChatSponsoredMessageResultFailed + return fmt.Sprintf("ReportChatSponsoredMessageResultFailed%+v", Alias(*r)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*ReportChatSponsoredMessageResultFailed) TypeID() uint32 { + return ReportChatSponsoredMessageResultFailedTypeID +} + +// TypeName returns name of type in TL schema. +func (*ReportChatSponsoredMessageResultFailed) TypeName() string { + return "reportChatSponsoredMessageResultFailed" +} + +// TypeInfo returns info about TL type. +func (r *ReportChatSponsoredMessageResultFailed) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "reportChatSponsoredMessageResultFailed", + ID: ReportChatSponsoredMessageResultFailedTypeID, + } + if r == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (r *ReportChatSponsoredMessageResultFailed) Encode(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't encode reportChatSponsoredMessageResultFailed#7f1f9bc6 as nil") + } + b.PutID(ReportChatSponsoredMessageResultFailedTypeID) + return r.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (r *ReportChatSponsoredMessageResultFailed) EncodeBare(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't encode reportChatSponsoredMessageResultFailed#7f1f9bc6 as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (r *ReportChatSponsoredMessageResultFailed) Decode(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't decode reportChatSponsoredMessageResultFailed#7f1f9bc6 to nil") + } + if err := b.ConsumeID(ReportChatSponsoredMessageResultFailedTypeID); err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessageResultFailed#7f1f9bc6: %w", err) + } + return r.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (r *ReportChatSponsoredMessageResultFailed) DecodeBare(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't decode reportChatSponsoredMessageResultFailed#7f1f9bc6 to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (r *ReportChatSponsoredMessageResultFailed) EncodeTDLibJSON(b tdjson.Encoder) error { + if r == nil { + return fmt.Errorf("can't encode reportChatSponsoredMessageResultFailed#7f1f9bc6 as nil") + } + b.ObjStart() + b.PutID("reportChatSponsoredMessageResultFailed") + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (r *ReportChatSponsoredMessageResultFailed) DecodeTDLibJSON(b tdjson.Decoder) error { + if r == nil { + return fmt.Errorf("can't decode reportChatSponsoredMessageResultFailed#7f1f9bc6 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("reportChatSponsoredMessageResultFailed"); err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessageResultFailed#7f1f9bc6: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// ReportChatSponsoredMessageResultOptionRequired represents TL type `reportChatSponsoredMessageResultOptionRequired#314c2d73`. +type ReportChatSponsoredMessageResultOptionRequired struct { + // Title for the option choice + Title string + // List of available options + Options []ReportChatSponsoredMessageOption +} + +// ReportChatSponsoredMessageResultOptionRequiredTypeID is TL type id of ReportChatSponsoredMessageResultOptionRequired. +const ReportChatSponsoredMessageResultOptionRequiredTypeID = 0x314c2d73 + +// construct implements constructor of ReportChatSponsoredMessageResultClass. +func (r ReportChatSponsoredMessageResultOptionRequired) construct() ReportChatSponsoredMessageResultClass { + return &r +} + +// Ensuring interfaces in compile-time for ReportChatSponsoredMessageResultOptionRequired. +var ( + _ bin.Encoder = &ReportChatSponsoredMessageResultOptionRequired{} + _ bin.Decoder = &ReportChatSponsoredMessageResultOptionRequired{} + _ bin.BareEncoder = &ReportChatSponsoredMessageResultOptionRequired{} + _ bin.BareDecoder = &ReportChatSponsoredMessageResultOptionRequired{} + + _ ReportChatSponsoredMessageResultClass = &ReportChatSponsoredMessageResultOptionRequired{} +) + +func (r *ReportChatSponsoredMessageResultOptionRequired) Zero() bool { + if r == nil { + return true + } + if !(r.Title == "") { + return false + } + if !(r.Options == nil) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (r *ReportChatSponsoredMessageResultOptionRequired) String() string { + if r == nil { + return "ReportChatSponsoredMessageResultOptionRequired(nil)" + } + type Alias ReportChatSponsoredMessageResultOptionRequired + return fmt.Sprintf("ReportChatSponsoredMessageResultOptionRequired%+v", Alias(*r)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*ReportChatSponsoredMessageResultOptionRequired) TypeID() uint32 { + return ReportChatSponsoredMessageResultOptionRequiredTypeID +} + +// TypeName returns name of type in TL schema. +func (*ReportChatSponsoredMessageResultOptionRequired) TypeName() string { + return "reportChatSponsoredMessageResultOptionRequired" +} + +// TypeInfo returns info about TL type. +func (r *ReportChatSponsoredMessageResultOptionRequired) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "reportChatSponsoredMessageResultOptionRequired", + ID: ReportChatSponsoredMessageResultOptionRequiredTypeID, + } + if r == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Title", + SchemaName: "title", + }, + { + Name: "Options", + SchemaName: "options", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (r *ReportChatSponsoredMessageResultOptionRequired) Encode(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't encode reportChatSponsoredMessageResultOptionRequired#314c2d73 as nil") + } + b.PutID(ReportChatSponsoredMessageResultOptionRequiredTypeID) + return r.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (r *ReportChatSponsoredMessageResultOptionRequired) EncodeBare(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't encode reportChatSponsoredMessageResultOptionRequired#314c2d73 as nil") + } + b.PutString(r.Title) + b.PutInt(len(r.Options)) + for idx, v := range r.Options { + if err := v.EncodeBare(b); err != nil { + return fmt.Errorf("unable to encode bare reportChatSponsoredMessageResultOptionRequired#314c2d73: field options element with index %d: %w", idx, err) + } + } + return nil +} + +// Decode implements bin.Decoder. +func (r *ReportChatSponsoredMessageResultOptionRequired) Decode(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't decode reportChatSponsoredMessageResultOptionRequired#314c2d73 to nil") + } + if err := b.ConsumeID(ReportChatSponsoredMessageResultOptionRequiredTypeID); err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessageResultOptionRequired#314c2d73: %w", err) + } + return r.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (r *ReportChatSponsoredMessageResultOptionRequired) DecodeBare(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't decode reportChatSponsoredMessageResultOptionRequired#314c2d73 to nil") + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessageResultOptionRequired#314c2d73: field title: %w", err) + } + r.Title = value + } + { + headerLen, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessageResultOptionRequired#314c2d73: field options: %w", err) + } + + if headerLen > 0 { + r.Options = make([]ReportChatSponsoredMessageOption, 0, headerLen%bin.PreallocateLimit) + } + for idx := 0; idx < headerLen; idx++ { + var value ReportChatSponsoredMessageOption + if err := value.DecodeBare(b); err != nil { + return fmt.Errorf("unable to decode bare reportChatSponsoredMessageResultOptionRequired#314c2d73: field options: %w", err) + } + r.Options = append(r.Options, value) + } + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (r *ReportChatSponsoredMessageResultOptionRequired) EncodeTDLibJSON(b tdjson.Encoder) error { + if r == nil { + return fmt.Errorf("can't encode reportChatSponsoredMessageResultOptionRequired#314c2d73 as nil") + } + b.ObjStart() + b.PutID("reportChatSponsoredMessageResultOptionRequired") + b.Comma() + b.FieldStart("title") + b.PutString(r.Title) + b.Comma() + b.FieldStart("options") + b.ArrStart() + for idx, v := range r.Options { + if err := v.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode reportChatSponsoredMessageResultOptionRequired#314c2d73: field options element with index %d: %w", idx, err) + } + b.Comma() + } + b.StripComma() + b.ArrEnd() + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (r *ReportChatSponsoredMessageResultOptionRequired) DecodeTDLibJSON(b tdjson.Decoder) error { + if r == nil { + return fmt.Errorf("can't decode reportChatSponsoredMessageResultOptionRequired#314c2d73 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("reportChatSponsoredMessageResultOptionRequired"); err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessageResultOptionRequired#314c2d73: %w", err) + } + case "title": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessageResultOptionRequired#314c2d73: field title: %w", err) + } + r.Title = value + case "options": + if err := b.Arr(func(b tdjson.Decoder) error { + var value ReportChatSponsoredMessageOption + if err := value.DecodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessageResultOptionRequired#314c2d73: field options: %w", err) + } + r.Options = append(r.Options, value) + return nil + }); err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessageResultOptionRequired#314c2d73: field options: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// GetTitle returns value of Title field. +func (r *ReportChatSponsoredMessageResultOptionRequired) GetTitle() (value string) { + if r == nil { + return + } + return r.Title +} + +// GetOptions returns value of Options field. +func (r *ReportChatSponsoredMessageResultOptionRequired) GetOptions() (value []ReportChatSponsoredMessageOption) { + if r == nil { + return + } + return r.Options +} + +// ReportChatSponsoredMessageResultAdsHidden represents TL type `reportChatSponsoredMessageResultAdsHidden#e8eade1e`. +type ReportChatSponsoredMessageResultAdsHidden struct { +} + +// ReportChatSponsoredMessageResultAdsHiddenTypeID is TL type id of ReportChatSponsoredMessageResultAdsHidden. +const ReportChatSponsoredMessageResultAdsHiddenTypeID = 0xe8eade1e + +// construct implements constructor of ReportChatSponsoredMessageResultClass. +func (r ReportChatSponsoredMessageResultAdsHidden) construct() ReportChatSponsoredMessageResultClass { + return &r +} + +// Ensuring interfaces in compile-time for ReportChatSponsoredMessageResultAdsHidden. +var ( + _ bin.Encoder = &ReportChatSponsoredMessageResultAdsHidden{} + _ bin.Decoder = &ReportChatSponsoredMessageResultAdsHidden{} + _ bin.BareEncoder = &ReportChatSponsoredMessageResultAdsHidden{} + _ bin.BareDecoder = &ReportChatSponsoredMessageResultAdsHidden{} + + _ ReportChatSponsoredMessageResultClass = &ReportChatSponsoredMessageResultAdsHidden{} +) + +func (r *ReportChatSponsoredMessageResultAdsHidden) Zero() bool { + if r == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (r *ReportChatSponsoredMessageResultAdsHidden) String() string { + if r == nil { + return "ReportChatSponsoredMessageResultAdsHidden(nil)" + } + type Alias ReportChatSponsoredMessageResultAdsHidden + return fmt.Sprintf("ReportChatSponsoredMessageResultAdsHidden%+v", Alias(*r)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*ReportChatSponsoredMessageResultAdsHidden) TypeID() uint32 { + return ReportChatSponsoredMessageResultAdsHiddenTypeID +} + +// TypeName returns name of type in TL schema. +func (*ReportChatSponsoredMessageResultAdsHidden) TypeName() string { + return "reportChatSponsoredMessageResultAdsHidden" +} + +// TypeInfo returns info about TL type. +func (r *ReportChatSponsoredMessageResultAdsHidden) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "reportChatSponsoredMessageResultAdsHidden", + ID: ReportChatSponsoredMessageResultAdsHiddenTypeID, + } + if r == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (r *ReportChatSponsoredMessageResultAdsHidden) Encode(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't encode reportChatSponsoredMessageResultAdsHidden#e8eade1e as nil") + } + b.PutID(ReportChatSponsoredMessageResultAdsHiddenTypeID) + return r.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (r *ReportChatSponsoredMessageResultAdsHidden) EncodeBare(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't encode reportChatSponsoredMessageResultAdsHidden#e8eade1e as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (r *ReportChatSponsoredMessageResultAdsHidden) Decode(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't decode reportChatSponsoredMessageResultAdsHidden#e8eade1e to nil") + } + if err := b.ConsumeID(ReportChatSponsoredMessageResultAdsHiddenTypeID); err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessageResultAdsHidden#e8eade1e: %w", err) + } + return r.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (r *ReportChatSponsoredMessageResultAdsHidden) DecodeBare(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't decode reportChatSponsoredMessageResultAdsHidden#e8eade1e to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (r *ReportChatSponsoredMessageResultAdsHidden) EncodeTDLibJSON(b tdjson.Encoder) error { + if r == nil { + return fmt.Errorf("can't encode reportChatSponsoredMessageResultAdsHidden#e8eade1e as nil") + } + b.ObjStart() + b.PutID("reportChatSponsoredMessageResultAdsHidden") + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (r *ReportChatSponsoredMessageResultAdsHidden) DecodeTDLibJSON(b tdjson.Decoder) error { + if r == nil { + return fmt.Errorf("can't decode reportChatSponsoredMessageResultAdsHidden#e8eade1e to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("reportChatSponsoredMessageResultAdsHidden"); err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessageResultAdsHidden#e8eade1e: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// ReportChatSponsoredMessageResultPremiumRequired represents TL type `reportChatSponsoredMessageResultPremiumRequired#770c2ed0`. +type ReportChatSponsoredMessageResultPremiumRequired struct { +} + +// ReportChatSponsoredMessageResultPremiumRequiredTypeID is TL type id of ReportChatSponsoredMessageResultPremiumRequired. +const ReportChatSponsoredMessageResultPremiumRequiredTypeID = 0x770c2ed0 + +// construct implements constructor of ReportChatSponsoredMessageResultClass. +func (r ReportChatSponsoredMessageResultPremiumRequired) construct() ReportChatSponsoredMessageResultClass { + return &r +} + +// Ensuring interfaces in compile-time for ReportChatSponsoredMessageResultPremiumRequired. +var ( + _ bin.Encoder = &ReportChatSponsoredMessageResultPremiumRequired{} + _ bin.Decoder = &ReportChatSponsoredMessageResultPremiumRequired{} + _ bin.BareEncoder = &ReportChatSponsoredMessageResultPremiumRequired{} + _ bin.BareDecoder = &ReportChatSponsoredMessageResultPremiumRequired{} + + _ ReportChatSponsoredMessageResultClass = &ReportChatSponsoredMessageResultPremiumRequired{} +) + +func (r *ReportChatSponsoredMessageResultPremiumRequired) Zero() bool { + if r == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (r *ReportChatSponsoredMessageResultPremiumRequired) String() string { + if r == nil { + return "ReportChatSponsoredMessageResultPremiumRequired(nil)" + } + type Alias ReportChatSponsoredMessageResultPremiumRequired + return fmt.Sprintf("ReportChatSponsoredMessageResultPremiumRequired%+v", Alias(*r)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*ReportChatSponsoredMessageResultPremiumRequired) TypeID() uint32 { + return ReportChatSponsoredMessageResultPremiumRequiredTypeID +} + +// TypeName returns name of type in TL schema. +func (*ReportChatSponsoredMessageResultPremiumRequired) TypeName() string { + return "reportChatSponsoredMessageResultPremiumRequired" +} + +// TypeInfo returns info about TL type. +func (r *ReportChatSponsoredMessageResultPremiumRequired) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "reportChatSponsoredMessageResultPremiumRequired", + ID: ReportChatSponsoredMessageResultPremiumRequiredTypeID, + } + if r == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (r *ReportChatSponsoredMessageResultPremiumRequired) Encode(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't encode reportChatSponsoredMessageResultPremiumRequired#770c2ed0 as nil") + } + b.PutID(ReportChatSponsoredMessageResultPremiumRequiredTypeID) + return r.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (r *ReportChatSponsoredMessageResultPremiumRequired) EncodeBare(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't encode reportChatSponsoredMessageResultPremiumRequired#770c2ed0 as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (r *ReportChatSponsoredMessageResultPremiumRequired) Decode(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't decode reportChatSponsoredMessageResultPremiumRequired#770c2ed0 to nil") + } + if err := b.ConsumeID(ReportChatSponsoredMessageResultPremiumRequiredTypeID); err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessageResultPremiumRequired#770c2ed0: %w", err) + } + return r.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (r *ReportChatSponsoredMessageResultPremiumRequired) DecodeBare(b *bin.Buffer) error { + if r == nil { + return fmt.Errorf("can't decode reportChatSponsoredMessageResultPremiumRequired#770c2ed0 to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (r *ReportChatSponsoredMessageResultPremiumRequired) EncodeTDLibJSON(b tdjson.Encoder) error { + if r == nil { + return fmt.Errorf("can't encode reportChatSponsoredMessageResultPremiumRequired#770c2ed0 as nil") + } + b.ObjStart() + b.PutID("reportChatSponsoredMessageResultPremiumRequired") + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (r *ReportChatSponsoredMessageResultPremiumRequired) DecodeTDLibJSON(b tdjson.Decoder) error { + if r == nil { + return fmt.Errorf("can't decode reportChatSponsoredMessageResultPremiumRequired#770c2ed0 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("reportChatSponsoredMessageResultPremiumRequired"); err != nil { + return fmt.Errorf("unable to decode reportChatSponsoredMessageResultPremiumRequired#770c2ed0: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// ReportChatSponsoredMessageResultClassName is schema name of ReportChatSponsoredMessageResultClass. +const ReportChatSponsoredMessageResultClassName = "ReportChatSponsoredMessageResult" + +// ReportChatSponsoredMessageResultClass represents ReportChatSponsoredMessageResult generic type. +// +// Example: +// +// g, err := tdapi.DecodeReportChatSponsoredMessageResult(buf) +// if err != nil { +// panic(err) +// } +// switch v := g.(type) { +// case *tdapi.ReportChatSponsoredMessageResultOk: // reportChatSponsoredMessageResultOk#754f721f +// case *tdapi.ReportChatSponsoredMessageResultFailed: // reportChatSponsoredMessageResultFailed#7f1f9bc6 +// case *tdapi.ReportChatSponsoredMessageResultOptionRequired: // reportChatSponsoredMessageResultOptionRequired#314c2d73 +// case *tdapi.ReportChatSponsoredMessageResultAdsHidden: // reportChatSponsoredMessageResultAdsHidden#e8eade1e +// case *tdapi.ReportChatSponsoredMessageResultPremiumRequired: // reportChatSponsoredMessageResultPremiumRequired#770c2ed0 +// default: panic(v) +// } +type ReportChatSponsoredMessageResultClass interface { + bin.Encoder + bin.Decoder + bin.BareEncoder + bin.BareDecoder + construct() ReportChatSponsoredMessageResultClass + + // TypeID returns type id in TL schema. + // + // See https://core.telegram.org/mtproto/TL-tl#remarks. + TypeID() uint32 + // TypeName returns name of type in TL schema. + TypeName() string + // String implements fmt.Stringer. + String() string + // Zero returns true if current object has a zero value. + Zero() bool + + EncodeTDLibJSON(b tdjson.Encoder) error + DecodeTDLibJSON(b tdjson.Decoder) error +} + +// DecodeReportChatSponsoredMessageResult implements binary de-serialization for ReportChatSponsoredMessageResultClass. +func DecodeReportChatSponsoredMessageResult(buf *bin.Buffer) (ReportChatSponsoredMessageResultClass, error) { + id, err := buf.PeekID() + if err != nil { + return nil, err + } + switch id { + case ReportChatSponsoredMessageResultOkTypeID: + // Decoding reportChatSponsoredMessageResultOk#754f721f. + v := ReportChatSponsoredMessageResultOk{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode ReportChatSponsoredMessageResultClass: %w", err) + } + return &v, nil + case ReportChatSponsoredMessageResultFailedTypeID: + // Decoding reportChatSponsoredMessageResultFailed#7f1f9bc6. + v := ReportChatSponsoredMessageResultFailed{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode ReportChatSponsoredMessageResultClass: %w", err) + } + return &v, nil + case ReportChatSponsoredMessageResultOptionRequiredTypeID: + // Decoding reportChatSponsoredMessageResultOptionRequired#314c2d73. + v := ReportChatSponsoredMessageResultOptionRequired{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode ReportChatSponsoredMessageResultClass: %w", err) + } + return &v, nil + case ReportChatSponsoredMessageResultAdsHiddenTypeID: + // Decoding reportChatSponsoredMessageResultAdsHidden#e8eade1e. + v := ReportChatSponsoredMessageResultAdsHidden{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode ReportChatSponsoredMessageResultClass: %w", err) + } + return &v, nil + case ReportChatSponsoredMessageResultPremiumRequiredTypeID: + // Decoding reportChatSponsoredMessageResultPremiumRequired#770c2ed0. + v := ReportChatSponsoredMessageResultPremiumRequired{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode ReportChatSponsoredMessageResultClass: %w", err) + } + return &v, nil + default: + return nil, fmt.Errorf("unable to decode ReportChatSponsoredMessageResultClass: %w", bin.NewUnexpectedID(id)) + } +} + +// DecodeTDLibJSONReportChatSponsoredMessageResult implements binary de-serialization for ReportChatSponsoredMessageResultClass. +func DecodeTDLibJSONReportChatSponsoredMessageResult(buf tdjson.Decoder) (ReportChatSponsoredMessageResultClass, error) { + id, err := buf.FindTypeID() + if err != nil { + return nil, err + } + switch id { + case "reportChatSponsoredMessageResultOk": + // Decoding reportChatSponsoredMessageResultOk#754f721f. + v := ReportChatSponsoredMessageResultOk{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode ReportChatSponsoredMessageResultClass: %w", err) + } + return &v, nil + case "reportChatSponsoredMessageResultFailed": + // Decoding reportChatSponsoredMessageResultFailed#7f1f9bc6. + v := ReportChatSponsoredMessageResultFailed{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode ReportChatSponsoredMessageResultClass: %w", err) + } + return &v, nil + case "reportChatSponsoredMessageResultOptionRequired": + // Decoding reportChatSponsoredMessageResultOptionRequired#314c2d73. + v := ReportChatSponsoredMessageResultOptionRequired{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode ReportChatSponsoredMessageResultClass: %w", err) + } + return &v, nil + case "reportChatSponsoredMessageResultAdsHidden": + // Decoding reportChatSponsoredMessageResultAdsHidden#e8eade1e. + v := ReportChatSponsoredMessageResultAdsHidden{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode ReportChatSponsoredMessageResultClass: %w", err) + } + return &v, nil + case "reportChatSponsoredMessageResultPremiumRequired": + // Decoding reportChatSponsoredMessageResultPremiumRequired#770c2ed0. + v := ReportChatSponsoredMessageResultPremiumRequired{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode ReportChatSponsoredMessageResultClass: %w", err) + } + return &v, nil + default: + return nil, fmt.Errorf("unable to decode ReportChatSponsoredMessageResultClass: %w", tdjson.NewUnexpectedID(id)) + } +} + +// ReportChatSponsoredMessageResult boxes the ReportChatSponsoredMessageResultClass providing a helper. +type ReportChatSponsoredMessageResultBox struct { + ReportChatSponsoredMessageResult ReportChatSponsoredMessageResultClass +} + +// Decode implements bin.Decoder for ReportChatSponsoredMessageResultBox. +func (b *ReportChatSponsoredMessageResultBox) Decode(buf *bin.Buffer) error { + if b == nil { + return fmt.Errorf("unable to decode ReportChatSponsoredMessageResultBox to nil") + } + v, err := DecodeReportChatSponsoredMessageResult(buf) + if err != nil { + return fmt.Errorf("unable to decode boxed value: %w", err) + } + b.ReportChatSponsoredMessageResult = v + return nil +} + +// Encode implements bin.Encode for ReportChatSponsoredMessageResultBox. +func (b *ReportChatSponsoredMessageResultBox) Encode(buf *bin.Buffer) error { + if b == nil || b.ReportChatSponsoredMessageResult == nil { + return fmt.Errorf("unable to encode ReportChatSponsoredMessageResultClass as nil") + } + return b.ReportChatSponsoredMessageResult.Encode(buf) +} + +// DecodeTDLibJSON implements bin.Decoder for ReportChatSponsoredMessageResultBox. +func (b *ReportChatSponsoredMessageResultBox) DecodeTDLibJSON(buf tdjson.Decoder) error { + if b == nil { + return fmt.Errorf("unable to decode ReportChatSponsoredMessageResultBox to nil") + } + v, err := DecodeTDLibJSONReportChatSponsoredMessageResult(buf) + if err != nil { + return fmt.Errorf("unable to decode boxed value: %w", err) + } + b.ReportChatSponsoredMessageResult = v + return nil +} + +// EncodeTDLibJSON implements bin.Encode for ReportChatSponsoredMessageResultBox. +func (b *ReportChatSponsoredMessageResultBox) EncodeTDLibJSON(buf tdjson.Encoder) error { + if b == nil || b.ReportChatSponsoredMessageResult == nil { + return fmt.Errorf("unable to encode ReportChatSponsoredMessageResultClass as nil") + } + return b.ReportChatSponsoredMessageResult.EncodeTDLibJSON(buf) +} diff --git a/tdapi/tl_send_business_message_album_gen.go b/tdapi/tl_send_business_message_album_gen.go new file mode 100644 index 0000000000..5cf4ba1e6a --- /dev/null +++ b/tdapi/tl_send_business_message_album_gen.go @@ -0,0 +1,417 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// SendBusinessMessageAlbumRequest represents TL type `sendBusinessMessageAlbum#b6f0461f`. +type SendBusinessMessageAlbumRequest struct { + // Unique identifier of business connection on behalf of which to send the request + BusinessConnectionID string + // Target chat + ChatID int64 + // Information about the message to be replied; pass null if none + ReplyTo InputMessageReplyToClass + // Pass true to disable notification for the message + DisableNotification bool + // Pass true if the content of the message must be protected from forwarding and saving + ProtectContent bool + // Contents of messages to be sent. At most 10 messages can be added to an album + InputMessageContents []InputMessageContentClass +} + +// SendBusinessMessageAlbumRequestTypeID is TL type id of SendBusinessMessageAlbumRequest. +const SendBusinessMessageAlbumRequestTypeID = 0xb6f0461f + +// Ensuring interfaces in compile-time for SendBusinessMessageAlbumRequest. +var ( + _ bin.Encoder = &SendBusinessMessageAlbumRequest{} + _ bin.Decoder = &SendBusinessMessageAlbumRequest{} + _ bin.BareEncoder = &SendBusinessMessageAlbumRequest{} + _ bin.BareDecoder = &SendBusinessMessageAlbumRequest{} +) + +func (s *SendBusinessMessageAlbumRequest) Zero() bool { + if s == nil { + return true + } + if !(s.BusinessConnectionID == "") { + return false + } + if !(s.ChatID == 0) { + return false + } + if !(s.ReplyTo == nil) { + return false + } + if !(s.DisableNotification == false) { + return false + } + if !(s.ProtectContent == false) { + return false + } + if !(s.InputMessageContents == nil) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (s *SendBusinessMessageAlbumRequest) String() string { + if s == nil { + return "SendBusinessMessageAlbumRequest(nil)" + } + type Alias SendBusinessMessageAlbumRequest + return fmt.Sprintf("SendBusinessMessageAlbumRequest%+v", Alias(*s)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*SendBusinessMessageAlbumRequest) TypeID() uint32 { + return SendBusinessMessageAlbumRequestTypeID +} + +// TypeName returns name of type in TL schema. +func (*SendBusinessMessageAlbumRequest) TypeName() string { + return "sendBusinessMessageAlbum" +} + +// TypeInfo returns info about TL type. +func (s *SendBusinessMessageAlbumRequest) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "sendBusinessMessageAlbum", + ID: SendBusinessMessageAlbumRequestTypeID, + } + if s == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "BusinessConnectionID", + SchemaName: "business_connection_id", + }, + { + Name: "ChatID", + SchemaName: "chat_id", + }, + { + Name: "ReplyTo", + SchemaName: "reply_to", + }, + { + Name: "DisableNotification", + SchemaName: "disable_notification", + }, + { + Name: "ProtectContent", + SchemaName: "protect_content", + }, + { + Name: "InputMessageContents", + SchemaName: "input_message_contents", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (s *SendBusinessMessageAlbumRequest) Encode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode sendBusinessMessageAlbum#b6f0461f as nil") + } + b.PutID(SendBusinessMessageAlbumRequestTypeID) + return s.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (s *SendBusinessMessageAlbumRequest) EncodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode sendBusinessMessageAlbum#b6f0461f as nil") + } + b.PutString(s.BusinessConnectionID) + b.PutInt53(s.ChatID) + if s.ReplyTo == nil { + return fmt.Errorf("unable to encode sendBusinessMessageAlbum#b6f0461f: field reply_to is nil") + } + if err := s.ReplyTo.Encode(b); err != nil { + return fmt.Errorf("unable to encode sendBusinessMessageAlbum#b6f0461f: field reply_to: %w", err) + } + b.PutBool(s.DisableNotification) + b.PutBool(s.ProtectContent) + b.PutInt(len(s.InputMessageContents)) + for idx, v := range s.InputMessageContents { + if v == nil { + return fmt.Errorf("unable to encode sendBusinessMessageAlbum#b6f0461f: field input_message_contents element with index %d is nil", idx) + } + if err := v.EncodeBare(b); err != nil { + return fmt.Errorf("unable to encode bare sendBusinessMessageAlbum#b6f0461f: field input_message_contents element with index %d: %w", idx, err) + } + } + return nil +} + +// Decode implements bin.Decoder. +func (s *SendBusinessMessageAlbumRequest) Decode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode sendBusinessMessageAlbum#b6f0461f to nil") + } + if err := b.ConsumeID(SendBusinessMessageAlbumRequestTypeID); err != nil { + return fmt.Errorf("unable to decode sendBusinessMessageAlbum#b6f0461f: %w", err) + } + return s.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (s *SendBusinessMessageAlbumRequest) DecodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode sendBusinessMessageAlbum#b6f0461f to nil") + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessageAlbum#b6f0461f: field business_connection_id: %w", err) + } + s.BusinessConnectionID = value + } + { + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessageAlbum#b6f0461f: field chat_id: %w", err) + } + s.ChatID = value + } + { + value, err := DecodeInputMessageReplyTo(b) + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessageAlbum#b6f0461f: field reply_to: %w", err) + } + s.ReplyTo = value + } + { + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessageAlbum#b6f0461f: field disable_notification: %w", err) + } + s.DisableNotification = value + } + { + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessageAlbum#b6f0461f: field protect_content: %w", err) + } + s.ProtectContent = value + } + { + headerLen, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessageAlbum#b6f0461f: field input_message_contents: %w", err) + } + + if headerLen > 0 { + s.InputMessageContents = make([]InputMessageContentClass, 0, headerLen%bin.PreallocateLimit) + } + for idx := 0; idx < headerLen; idx++ { + value, err := DecodeInputMessageContent(b) + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessageAlbum#b6f0461f: field input_message_contents: %w", err) + } + s.InputMessageContents = append(s.InputMessageContents, value) + } + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (s *SendBusinessMessageAlbumRequest) EncodeTDLibJSON(b tdjson.Encoder) error { + if s == nil { + return fmt.Errorf("can't encode sendBusinessMessageAlbum#b6f0461f as nil") + } + b.ObjStart() + b.PutID("sendBusinessMessageAlbum") + b.Comma() + b.FieldStart("business_connection_id") + b.PutString(s.BusinessConnectionID) + b.Comma() + b.FieldStart("chat_id") + b.PutInt53(s.ChatID) + b.Comma() + b.FieldStart("reply_to") + if s.ReplyTo == nil { + return fmt.Errorf("unable to encode sendBusinessMessageAlbum#b6f0461f: field reply_to is nil") + } + if err := s.ReplyTo.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode sendBusinessMessageAlbum#b6f0461f: field reply_to: %w", err) + } + b.Comma() + b.FieldStart("disable_notification") + b.PutBool(s.DisableNotification) + b.Comma() + b.FieldStart("protect_content") + b.PutBool(s.ProtectContent) + b.Comma() + b.FieldStart("input_message_contents") + b.ArrStart() + for idx, v := range s.InputMessageContents { + if v == nil { + return fmt.Errorf("unable to encode sendBusinessMessageAlbum#b6f0461f: field input_message_contents element with index %d is nil", idx) + } + if err := v.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode sendBusinessMessageAlbum#b6f0461f: field input_message_contents element with index %d: %w", idx, err) + } + b.Comma() + } + b.StripComma() + b.ArrEnd() + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (s *SendBusinessMessageAlbumRequest) DecodeTDLibJSON(b tdjson.Decoder) error { + if s == nil { + return fmt.Errorf("can't decode sendBusinessMessageAlbum#b6f0461f to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("sendBusinessMessageAlbum"); err != nil { + return fmt.Errorf("unable to decode sendBusinessMessageAlbum#b6f0461f: %w", err) + } + case "business_connection_id": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessageAlbum#b6f0461f: field business_connection_id: %w", err) + } + s.BusinessConnectionID = value + case "chat_id": + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessageAlbum#b6f0461f: field chat_id: %w", err) + } + s.ChatID = value + case "reply_to": + value, err := DecodeTDLibJSONInputMessageReplyTo(b) + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessageAlbum#b6f0461f: field reply_to: %w", err) + } + s.ReplyTo = value + case "disable_notification": + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessageAlbum#b6f0461f: field disable_notification: %w", err) + } + s.DisableNotification = value + case "protect_content": + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessageAlbum#b6f0461f: field protect_content: %w", err) + } + s.ProtectContent = value + case "input_message_contents": + if err := b.Arr(func(b tdjson.Decoder) error { + value, err := DecodeTDLibJSONInputMessageContent(b) + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessageAlbum#b6f0461f: field input_message_contents: %w", err) + } + s.InputMessageContents = append(s.InputMessageContents, value) + return nil + }); err != nil { + return fmt.Errorf("unable to decode sendBusinessMessageAlbum#b6f0461f: field input_message_contents: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// GetBusinessConnectionID returns value of BusinessConnectionID field. +func (s *SendBusinessMessageAlbumRequest) GetBusinessConnectionID() (value string) { + if s == nil { + return + } + return s.BusinessConnectionID +} + +// GetChatID returns value of ChatID field. +func (s *SendBusinessMessageAlbumRequest) GetChatID() (value int64) { + if s == nil { + return + } + return s.ChatID +} + +// GetReplyTo returns value of ReplyTo field. +func (s *SendBusinessMessageAlbumRequest) GetReplyTo() (value InputMessageReplyToClass) { + if s == nil { + return + } + return s.ReplyTo +} + +// GetDisableNotification returns value of DisableNotification field. +func (s *SendBusinessMessageAlbumRequest) GetDisableNotification() (value bool) { + if s == nil { + return + } + return s.DisableNotification +} + +// GetProtectContent returns value of ProtectContent field. +func (s *SendBusinessMessageAlbumRequest) GetProtectContent() (value bool) { + if s == nil { + return + } + return s.ProtectContent +} + +// GetInputMessageContents returns value of InputMessageContents field. +func (s *SendBusinessMessageAlbumRequest) GetInputMessageContents() (value []InputMessageContentClass) { + if s == nil { + return + } + return s.InputMessageContents +} + +// SendBusinessMessageAlbum invokes method sendBusinessMessageAlbum#b6f0461f returning error if any. +func (c *Client) SendBusinessMessageAlbum(ctx context.Context, request *SendBusinessMessageAlbumRequest) (*BusinessMessages, error) { + var result BusinessMessages + + if err := c.rpc.Invoke(ctx, request, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/tdapi/tl_send_business_message_gen.go b/tdapi/tl_send_business_message_gen.go new file mode 100644 index 0000000000..c463565bfc --- /dev/null +++ b/tdapi/tl_send_business_message_gen.go @@ -0,0 +1,437 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// SendBusinessMessageRequest represents TL type `sendBusinessMessage#ec64b993`. +type SendBusinessMessageRequest struct { + // Unique identifier of business connection on behalf of which to send the request + BusinessConnectionID string + // Target chat + ChatID int64 + // Information about the message to be replied; pass null if none + ReplyTo InputMessageReplyToClass + // Pass true to disable notification for the message + DisableNotification bool + // Pass true if the content of the message must be protected from forwarding and saving + ProtectContent bool + // Markup for replying to the message; pass null if none + ReplyMarkup ReplyMarkupClass + // The content of the message to be sent + InputMessageContent InputMessageContentClass +} + +// SendBusinessMessageRequestTypeID is TL type id of SendBusinessMessageRequest. +const SendBusinessMessageRequestTypeID = 0xec64b993 + +// Ensuring interfaces in compile-time for SendBusinessMessageRequest. +var ( + _ bin.Encoder = &SendBusinessMessageRequest{} + _ bin.Decoder = &SendBusinessMessageRequest{} + _ bin.BareEncoder = &SendBusinessMessageRequest{} + _ bin.BareDecoder = &SendBusinessMessageRequest{} +) + +func (s *SendBusinessMessageRequest) Zero() bool { + if s == nil { + return true + } + if !(s.BusinessConnectionID == "") { + return false + } + if !(s.ChatID == 0) { + return false + } + if !(s.ReplyTo == nil) { + return false + } + if !(s.DisableNotification == false) { + return false + } + if !(s.ProtectContent == false) { + return false + } + if !(s.ReplyMarkup == nil) { + return false + } + if !(s.InputMessageContent == nil) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (s *SendBusinessMessageRequest) String() string { + if s == nil { + return "SendBusinessMessageRequest(nil)" + } + type Alias SendBusinessMessageRequest + return fmt.Sprintf("SendBusinessMessageRequest%+v", Alias(*s)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*SendBusinessMessageRequest) TypeID() uint32 { + return SendBusinessMessageRequestTypeID +} + +// TypeName returns name of type in TL schema. +func (*SendBusinessMessageRequest) TypeName() string { + return "sendBusinessMessage" +} + +// TypeInfo returns info about TL type. +func (s *SendBusinessMessageRequest) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "sendBusinessMessage", + ID: SendBusinessMessageRequestTypeID, + } + if s == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "BusinessConnectionID", + SchemaName: "business_connection_id", + }, + { + Name: "ChatID", + SchemaName: "chat_id", + }, + { + Name: "ReplyTo", + SchemaName: "reply_to", + }, + { + Name: "DisableNotification", + SchemaName: "disable_notification", + }, + { + Name: "ProtectContent", + SchemaName: "protect_content", + }, + { + Name: "ReplyMarkup", + SchemaName: "reply_markup", + }, + { + Name: "InputMessageContent", + SchemaName: "input_message_content", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (s *SendBusinessMessageRequest) Encode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode sendBusinessMessage#ec64b993 as nil") + } + b.PutID(SendBusinessMessageRequestTypeID) + return s.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (s *SendBusinessMessageRequest) EncodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode sendBusinessMessage#ec64b993 as nil") + } + b.PutString(s.BusinessConnectionID) + b.PutInt53(s.ChatID) + if s.ReplyTo == nil { + return fmt.Errorf("unable to encode sendBusinessMessage#ec64b993: field reply_to is nil") + } + if err := s.ReplyTo.Encode(b); err != nil { + return fmt.Errorf("unable to encode sendBusinessMessage#ec64b993: field reply_to: %w", err) + } + b.PutBool(s.DisableNotification) + b.PutBool(s.ProtectContent) + if s.ReplyMarkup == nil { + return fmt.Errorf("unable to encode sendBusinessMessage#ec64b993: field reply_markup is nil") + } + if err := s.ReplyMarkup.Encode(b); err != nil { + return fmt.Errorf("unable to encode sendBusinessMessage#ec64b993: field reply_markup: %w", err) + } + if s.InputMessageContent == nil { + return fmt.Errorf("unable to encode sendBusinessMessage#ec64b993: field input_message_content is nil") + } + if err := s.InputMessageContent.Encode(b); err != nil { + return fmt.Errorf("unable to encode sendBusinessMessage#ec64b993: field input_message_content: %w", err) + } + return nil +} + +// Decode implements bin.Decoder. +func (s *SendBusinessMessageRequest) Decode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode sendBusinessMessage#ec64b993 to nil") + } + if err := b.ConsumeID(SendBusinessMessageRequestTypeID); err != nil { + return fmt.Errorf("unable to decode sendBusinessMessage#ec64b993: %w", err) + } + return s.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (s *SendBusinessMessageRequest) DecodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode sendBusinessMessage#ec64b993 to nil") + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessage#ec64b993: field business_connection_id: %w", err) + } + s.BusinessConnectionID = value + } + { + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessage#ec64b993: field chat_id: %w", err) + } + s.ChatID = value + } + { + value, err := DecodeInputMessageReplyTo(b) + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessage#ec64b993: field reply_to: %w", err) + } + s.ReplyTo = value + } + { + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessage#ec64b993: field disable_notification: %w", err) + } + s.DisableNotification = value + } + { + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessage#ec64b993: field protect_content: %w", err) + } + s.ProtectContent = value + } + { + value, err := DecodeReplyMarkup(b) + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessage#ec64b993: field reply_markup: %w", err) + } + s.ReplyMarkup = value + } + { + value, err := DecodeInputMessageContent(b) + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessage#ec64b993: field input_message_content: %w", err) + } + s.InputMessageContent = value + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (s *SendBusinessMessageRequest) EncodeTDLibJSON(b tdjson.Encoder) error { + if s == nil { + return fmt.Errorf("can't encode sendBusinessMessage#ec64b993 as nil") + } + b.ObjStart() + b.PutID("sendBusinessMessage") + b.Comma() + b.FieldStart("business_connection_id") + b.PutString(s.BusinessConnectionID) + b.Comma() + b.FieldStart("chat_id") + b.PutInt53(s.ChatID) + b.Comma() + b.FieldStart("reply_to") + if s.ReplyTo == nil { + return fmt.Errorf("unable to encode sendBusinessMessage#ec64b993: field reply_to is nil") + } + if err := s.ReplyTo.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode sendBusinessMessage#ec64b993: field reply_to: %w", err) + } + b.Comma() + b.FieldStart("disable_notification") + b.PutBool(s.DisableNotification) + b.Comma() + b.FieldStart("protect_content") + b.PutBool(s.ProtectContent) + b.Comma() + b.FieldStart("reply_markup") + if s.ReplyMarkup == nil { + return fmt.Errorf("unable to encode sendBusinessMessage#ec64b993: field reply_markup is nil") + } + if err := s.ReplyMarkup.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode sendBusinessMessage#ec64b993: field reply_markup: %w", err) + } + b.Comma() + b.FieldStart("input_message_content") + if s.InputMessageContent == nil { + return fmt.Errorf("unable to encode sendBusinessMessage#ec64b993: field input_message_content is nil") + } + if err := s.InputMessageContent.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode sendBusinessMessage#ec64b993: field input_message_content: %w", err) + } + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (s *SendBusinessMessageRequest) DecodeTDLibJSON(b tdjson.Decoder) error { + if s == nil { + return fmt.Errorf("can't decode sendBusinessMessage#ec64b993 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("sendBusinessMessage"); err != nil { + return fmt.Errorf("unable to decode sendBusinessMessage#ec64b993: %w", err) + } + case "business_connection_id": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessage#ec64b993: field business_connection_id: %w", err) + } + s.BusinessConnectionID = value + case "chat_id": + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessage#ec64b993: field chat_id: %w", err) + } + s.ChatID = value + case "reply_to": + value, err := DecodeTDLibJSONInputMessageReplyTo(b) + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessage#ec64b993: field reply_to: %w", err) + } + s.ReplyTo = value + case "disable_notification": + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessage#ec64b993: field disable_notification: %w", err) + } + s.DisableNotification = value + case "protect_content": + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessage#ec64b993: field protect_content: %w", err) + } + s.ProtectContent = value + case "reply_markup": + value, err := DecodeTDLibJSONReplyMarkup(b) + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessage#ec64b993: field reply_markup: %w", err) + } + s.ReplyMarkup = value + case "input_message_content": + value, err := DecodeTDLibJSONInputMessageContent(b) + if err != nil { + return fmt.Errorf("unable to decode sendBusinessMessage#ec64b993: field input_message_content: %w", err) + } + s.InputMessageContent = value + default: + return b.Skip() + } + return nil + }) +} + +// GetBusinessConnectionID returns value of BusinessConnectionID field. +func (s *SendBusinessMessageRequest) GetBusinessConnectionID() (value string) { + if s == nil { + return + } + return s.BusinessConnectionID +} + +// GetChatID returns value of ChatID field. +func (s *SendBusinessMessageRequest) GetChatID() (value int64) { + if s == nil { + return + } + return s.ChatID +} + +// GetReplyTo returns value of ReplyTo field. +func (s *SendBusinessMessageRequest) GetReplyTo() (value InputMessageReplyToClass) { + if s == nil { + return + } + return s.ReplyTo +} + +// GetDisableNotification returns value of DisableNotification field. +func (s *SendBusinessMessageRequest) GetDisableNotification() (value bool) { + if s == nil { + return + } + return s.DisableNotification +} + +// GetProtectContent returns value of ProtectContent field. +func (s *SendBusinessMessageRequest) GetProtectContent() (value bool) { + if s == nil { + return + } + return s.ProtectContent +} + +// GetReplyMarkup returns value of ReplyMarkup field. +func (s *SendBusinessMessageRequest) GetReplyMarkup() (value ReplyMarkupClass) { + if s == nil { + return + } + return s.ReplyMarkup +} + +// GetInputMessageContent returns value of InputMessageContent field. +func (s *SendBusinessMessageRequest) GetInputMessageContent() (value InputMessageContentClass) { + if s == nil { + return + } + return s.InputMessageContent +} + +// SendBusinessMessage invokes method sendBusinessMessage#ec64b993 returning error if any. +func (c *Client) SendBusinessMessage(ctx context.Context, request *SendBusinessMessageRequest) (*BusinessMessage, error) { + var result BusinessMessage + + if err := c.rpc.Invoke(ctx, request, &result); err != nil { + return nil, err + } + return &result, nil +} diff --git a/tdapi/tl_send_chat_action_gen.go b/tdapi/tl_send_chat_action_gen.go index 2717c011e0..9737cb3b16 100644 --- a/tdapi/tl_send_chat_action_gen.go +++ b/tdapi/tl_send_chat_action_gen.go @@ -31,18 +31,21 @@ var ( _ = tdjson.Encoder{} ) -// SendChatActionRequest represents TL type `sendChatAction#7cfce154`. +// SendChatActionRequest represents TL type `sendChatAction#8823f29e`. type SendChatActionRequest struct { // Chat identifier ChatID int64 // If not 0, the message thread identifier in which the action was performed MessageThreadID int64 + // Unique identifier of business connection on behalf of which to send the request; for + // bots only + BusinessConnectionID string // The action description; pass null to cancel the currently active action Action ChatActionClass } // SendChatActionRequestTypeID is TL type id of SendChatActionRequest. -const SendChatActionRequestTypeID = 0x7cfce154 +const SendChatActionRequestTypeID = 0x8823f29e // Ensuring interfaces in compile-time for SendChatActionRequest. var ( @@ -62,6 +65,9 @@ func (s *SendChatActionRequest) Zero() bool { if !(s.MessageThreadID == 0) { return false } + if !(s.BusinessConnectionID == "") { + return false + } if !(s.Action == nil) { return false } @@ -109,6 +115,10 @@ func (s *SendChatActionRequest) TypeInfo() tdp.Type { Name: "MessageThreadID", SchemaName: "message_thread_id", }, + { + Name: "BusinessConnectionID", + SchemaName: "business_connection_id", + }, { Name: "Action", SchemaName: "action", @@ -120,7 +130,7 @@ func (s *SendChatActionRequest) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (s *SendChatActionRequest) Encode(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't encode sendChatAction#7cfce154 as nil") + return fmt.Errorf("can't encode sendChatAction#8823f29e as nil") } b.PutID(SendChatActionRequestTypeID) return s.EncodeBare(b) @@ -129,15 +139,16 @@ func (s *SendChatActionRequest) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (s *SendChatActionRequest) EncodeBare(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't encode sendChatAction#7cfce154 as nil") + return fmt.Errorf("can't encode sendChatAction#8823f29e as nil") } b.PutInt53(s.ChatID) b.PutInt53(s.MessageThreadID) + b.PutString(s.BusinessConnectionID) if s.Action == nil { - return fmt.Errorf("unable to encode sendChatAction#7cfce154: field action is nil") + return fmt.Errorf("unable to encode sendChatAction#8823f29e: field action is nil") } if err := s.Action.Encode(b); err != nil { - return fmt.Errorf("unable to encode sendChatAction#7cfce154: field action: %w", err) + return fmt.Errorf("unable to encode sendChatAction#8823f29e: field action: %w", err) } return nil } @@ -145,10 +156,10 @@ func (s *SendChatActionRequest) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (s *SendChatActionRequest) Decode(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't decode sendChatAction#7cfce154 to nil") + return fmt.Errorf("can't decode sendChatAction#8823f29e to nil") } if err := b.ConsumeID(SendChatActionRequestTypeID); err != nil { - return fmt.Errorf("unable to decode sendChatAction#7cfce154: %w", err) + return fmt.Errorf("unable to decode sendChatAction#8823f29e: %w", err) } return s.DecodeBare(b) } @@ -156,26 +167,33 @@ func (s *SendChatActionRequest) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (s *SendChatActionRequest) DecodeBare(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't decode sendChatAction#7cfce154 to nil") + return fmt.Errorf("can't decode sendChatAction#8823f29e to nil") } { value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode sendChatAction#7cfce154: field chat_id: %w", err) + return fmt.Errorf("unable to decode sendChatAction#8823f29e: field chat_id: %w", err) } s.ChatID = value } { value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode sendChatAction#7cfce154: field message_thread_id: %w", err) + return fmt.Errorf("unable to decode sendChatAction#8823f29e: field message_thread_id: %w", err) } s.MessageThreadID = value } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode sendChatAction#8823f29e: field business_connection_id: %w", err) + } + s.BusinessConnectionID = value + } { value, err := DecodeChatAction(b) if err != nil { - return fmt.Errorf("unable to decode sendChatAction#7cfce154: field action: %w", err) + return fmt.Errorf("unable to decode sendChatAction#8823f29e: field action: %w", err) } s.Action = value } @@ -185,7 +203,7 @@ func (s *SendChatActionRequest) DecodeBare(b *bin.Buffer) error { // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (s *SendChatActionRequest) EncodeTDLibJSON(b tdjson.Encoder) error { if s == nil { - return fmt.Errorf("can't encode sendChatAction#7cfce154 as nil") + return fmt.Errorf("can't encode sendChatAction#8823f29e as nil") } b.ObjStart() b.PutID("sendChatAction") @@ -196,12 +214,15 @@ func (s *SendChatActionRequest) EncodeTDLibJSON(b tdjson.Encoder) error { b.FieldStart("message_thread_id") b.PutInt53(s.MessageThreadID) b.Comma() + b.FieldStart("business_connection_id") + b.PutString(s.BusinessConnectionID) + b.Comma() b.FieldStart("action") if s.Action == nil { - return fmt.Errorf("unable to encode sendChatAction#7cfce154: field action is nil") + return fmt.Errorf("unable to encode sendChatAction#8823f29e: field action is nil") } if err := s.Action.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode sendChatAction#7cfce154: field action: %w", err) + return fmt.Errorf("unable to encode sendChatAction#8823f29e: field action: %w", err) } b.Comma() b.StripComma() @@ -212,31 +233,37 @@ func (s *SendChatActionRequest) EncodeTDLibJSON(b tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (s *SendChatActionRequest) DecodeTDLibJSON(b tdjson.Decoder) error { if s == nil { - return fmt.Errorf("can't decode sendChatAction#7cfce154 to nil") + return fmt.Errorf("can't decode sendChatAction#8823f29e to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("sendChatAction"); err != nil { - return fmt.Errorf("unable to decode sendChatAction#7cfce154: %w", err) + return fmt.Errorf("unable to decode sendChatAction#8823f29e: %w", err) } case "chat_id": value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode sendChatAction#7cfce154: field chat_id: %w", err) + return fmt.Errorf("unable to decode sendChatAction#8823f29e: field chat_id: %w", err) } s.ChatID = value case "message_thread_id": value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode sendChatAction#7cfce154: field message_thread_id: %w", err) + return fmt.Errorf("unable to decode sendChatAction#8823f29e: field message_thread_id: %w", err) } s.MessageThreadID = value + case "business_connection_id": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode sendChatAction#8823f29e: field business_connection_id: %w", err) + } + s.BusinessConnectionID = value case "action": value, err := DecodeTDLibJSONChatAction(b) if err != nil { - return fmt.Errorf("unable to decode sendChatAction#7cfce154: field action: %w", err) + return fmt.Errorf("unable to decode sendChatAction#8823f29e: field action: %w", err) } s.Action = value default: @@ -262,6 +289,14 @@ func (s *SendChatActionRequest) GetMessageThreadID() (value int64) { return s.MessageThreadID } +// GetBusinessConnectionID returns value of BusinessConnectionID field. +func (s *SendChatActionRequest) GetBusinessConnectionID() (value string) { + if s == nil { + return + } + return s.BusinessConnectionID +} + // GetAction returns value of Action field. func (s *SendChatActionRequest) GetAction() (value ChatActionClass) { if s == nil { @@ -270,7 +305,7 @@ func (s *SendChatActionRequest) GetAction() (value ChatActionClass) { return s.Action } -// SendChatAction invokes method sendChatAction#7cfce154 returning error if any. +// SendChatAction invokes method sendChatAction#8823f29e returning error if any. func (c *Client) SendChatAction(ctx context.Context, request *SendChatActionRequest) error { var ok Ok diff --git a/tdapi/tl_send_story_gen.go b/tdapi/tl_send_story_gen.go index aceb543a87..d68bbe1c88 100644 --- a/tdapi/tl_send_story_gen.go +++ b/tdapi/tl_send_story_gen.go @@ -40,7 +40,8 @@ type SendStoryRequest struct { // Clickable rectangle areas to be shown on the story media; pass null if none Areas InputStoryAreas // Story caption; pass null to use an empty caption; - // 0-getOption("story_caption_length_max") characters + // 0-getOption("story_caption_length_max") characters; can have entities only if + // getOption("can_use_text_entities_in_story_caption") Caption FormattedText // The privacy settings for the story; ignored for stories sent to supergroup and channel // chats diff --git a/tdapi/tl_set_birthdate_gen.go b/tdapi/tl_set_birthdate_gen.go new file mode 100644 index 0000000000..579ecea941 --- /dev/null +++ b/tdapi/tl_set_birthdate_gen.go @@ -0,0 +1,206 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// SetBirthdateRequest represents TL type `setBirthdate#4ea9dd98`. +type SetBirthdateRequest struct { + // The new value of the current user's birthdate; pass null to remove the birthdate + Birthdate Birthdate +} + +// SetBirthdateRequestTypeID is TL type id of SetBirthdateRequest. +const SetBirthdateRequestTypeID = 0x4ea9dd98 + +// Ensuring interfaces in compile-time for SetBirthdateRequest. +var ( + _ bin.Encoder = &SetBirthdateRequest{} + _ bin.Decoder = &SetBirthdateRequest{} + _ bin.BareEncoder = &SetBirthdateRequest{} + _ bin.BareDecoder = &SetBirthdateRequest{} +) + +func (s *SetBirthdateRequest) Zero() bool { + if s == nil { + return true + } + if !(s.Birthdate.Zero()) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (s *SetBirthdateRequest) String() string { + if s == nil { + return "SetBirthdateRequest(nil)" + } + type Alias SetBirthdateRequest + return fmt.Sprintf("SetBirthdateRequest%+v", Alias(*s)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*SetBirthdateRequest) TypeID() uint32 { + return SetBirthdateRequestTypeID +} + +// TypeName returns name of type in TL schema. +func (*SetBirthdateRequest) TypeName() string { + return "setBirthdate" +} + +// TypeInfo returns info about TL type. +func (s *SetBirthdateRequest) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "setBirthdate", + ID: SetBirthdateRequestTypeID, + } + if s == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Birthdate", + SchemaName: "birthdate", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (s *SetBirthdateRequest) Encode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode setBirthdate#4ea9dd98 as nil") + } + b.PutID(SetBirthdateRequestTypeID) + return s.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (s *SetBirthdateRequest) EncodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode setBirthdate#4ea9dd98 as nil") + } + if err := s.Birthdate.Encode(b); err != nil { + return fmt.Errorf("unable to encode setBirthdate#4ea9dd98: field birthdate: %w", err) + } + return nil +} + +// Decode implements bin.Decoder. +func (s *SetBirthdateRequest) Decode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode setBirthdate#4ea9dd98 to nil") + } + if err := b.ConsumeID(SetBirthdateRequestTypeID); err != nil { + return fmt.Errorf("unable to decode setBirthdate#4ea9dd98: %w", err) + } + return s.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (s *SetBirthdateRequest) DecodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode setBirthdate#4ea9dd98 to nil") + } + { + if err := s.Birthdate.Decode(b); err != nil { + return fmt.Errorf("unable to decode setBirthdate#4ea9dd98: field birthdate: %w", err) + } + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (s *SetBirthdateRequest) EncodeTDLibJSON(b tdjson.Encoder) error { + if s == nil { + return fmt.Errorf("can't encode setBirthdate#4ea9dd98 as nil") + } + b.ObjStart() + b.PutID("setBirthdate") + b.Comma() + b.FieldStart("birthdate") + if err := s.Birthdate.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode setBirthdate#4ea9dd98: field birthdate: %w", err) + } + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (s *SetBirthdateRequest) DecodeTDLibJSON(b tdjson.Decoder) error { + if s == nil { + return fmt.Errorf("can't decode setBirthdate#4ea9dd98 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("setBirthdate"); err != nil { + return fmt.Errorf("unable to decode setBirthdate#4ea9dd98: %w", err) + } + case "birthdate": + if err := s.Birthdate.DecodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to decode setBirthdate#4ea9dd98: field birthdate: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// GetBirthdate returns value of Birthdate field. +func (s *SetBirthdateRequest) GetBirthdate() (value Birthdate) { + if s == nil { + return + } + return s.Birthdate +} + +// SetBirthdate invokes method setBirthdate#4ea9dd98 returning error if any. +func (c *Client) SetBirthdate(ctx context.Context, birthdate Birthdate) error { + var ok Ok + + request := &SetBirthdateRequest{ + Birthdate: birthdate, + } + if err := c.rpc.Invoke(ctx, request, &ok); err != nil { + return err + } + return nil +} diff --git a/tdapi/tl_set_business_intro_gen.go b/tdapi/tl_set_business_intro_gen.go new file mode 100644 index 0000000000..6accf94123 --- /dev/null +++ b/tdapi/tl_set_business_intro_gen.go @@ -0,0 +1,206 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// SetBusinessIntroRequest represents TL type `setBusinessIntro#d2f2e117`. +type SetBusinessIntroRequest struct { + // The new intro of the business; pass null to remove the intro + Intro InputBusinessIntro +} + +// SetBusinessIntroRequestTypeID is TL type id of SetBusinessIntroRequest. +const SetBusinessIntroRequestTypeID = 0xd2f2e117 + +// Ensuring interfaces in compile-time for SetBusinessIntroRequest. +var ( + _ bin.Encoder = &SetBusinessIntroRequest{} + _ bin.Decoder = &SetBusinessIntroRequest{} + _ bin.BareEncoder = &SetBusinessIntroRequest{} + _ bin.BareDecoder = &SetBusinessIntroRequest{} +) + +func (s *SetBusinessIntroRequest) Zero() bool { + if s == nil { + return true + } + if !(s.Intro.Zero()) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (s *SetBusinessIntroRequest) String() string { + if s == nil { + return "SetBusinessIntroRequest(nil)" + } + type Alias SetBusinessIntroRequest + return fmt.Sprintf("SetBusinessIntroRequest%+v", Alias(*s)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*SetBusinessIntroRequest) TypeID() uint32 { + return SetBusinessIntroRequestTypeID +} + +// TypeName returns name of type in TL schema. +func (*SetBusinessIntroRequest) TypeName() string { + return "setBusinessIntro" +} + +// TypeInfo returns info about TL type. +func (s *SetBusinessIntroRequest) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "setBusinessIntro", + ID: SetBusinessIntroRequestTypeID, + } + if s == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Intro", + SchemaName: "intro", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (s *SetBusinessIntroRequest) Encode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode setBusinessIntro#d2f2e117 as nil") + } + b.PutID(SetBusinessIntroRequestTypeID) + return s.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (s *SetBusinessIntroRequest) EncodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode setBusinessIntro#d2f2e117 as nil") + } + if err := s.Intro.Encode(b); err != nil { + return fmt.Errorf("unable to encode setBusinessIntro#d2f2e117: field intro: %w", err) + } + return nil +} + +// Decode implements bin.Decoder. +func (s *SetBusinessIntroRequest) Decode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode setBusinessIntro#d2f2e117 to nil") + } + if err := b.ConsumeID(SetBusinessIntroRequestTypeID); err != nil { + return fmt.Errorf("unable to decode setBusinessIntro#d2f2e117: %w", err) + } + return s.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (s *SetBusinessIntroRequest) DecodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode setBusinessIntro#d2f2e117 to nil") + } + { + if err := s.Intro.Decode(b); err != nil { + return fmt.Errorf("unable to decode setBusinessIntro#d2f2e117: field intro: %w", err) + } + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (s *SetBusinessIntroRequest) EncodeTDLibJSON(b tdjson.Encoder) error { + if s == nil { + return fmt.Errorf("can't encode setBusinessIntro#d2f2e117 as nil") + } + b.ObjStart() + b.PutID("setBusinessIntro") + b.Comma() + b.FieldStart("intro") + if err := s.Intro.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode setBusinessIntro#d2f2e117: field intro: %w", err) + } + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (s *SetBusinessIntroRequest) DecodeTDLibJSON(b tdjson.Decoder) error { + if s == nil { + return fmt.Errorf("can't decode setBusinessIntro#d2f2e117 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("setBusinessIntro"); err != nil { + return fmt.Errorf("unable to decode setBusinessIntro#d2f2e117: %w", err) + } + case "intro": + if err := s.Intro.DecodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to decode setBusinessIntro#d2f2e117: field intro: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// GetIntro returns value of Intro field. +func (s *SetBusinessIntroRequest) GetIntro() (value InputBusinessIntro) { + if s == nil { + return + } + return s.Intro +} + +// SetBusinessIntro invokes method setBusinessIntro#d2f2e117 returning error if any. +func (c *Client) SetBusinessIntro(ctx context.Context, intro InputBusinessIntro) error { + var ok Ok + + request := &SetBusinessIntroRequest{ + Intro: intro, + } + if err := c.rpc.Invoke(ctx, request, &ok); err != nil { + return err + } + return nil +} diff --git a/tdapi/tl_set_business_opening_hours_gen.go b/tdapi/tl_set_business_opening_hours_gen.go index 0b671e6612..2eb28db473 100644 --- a/tdapi/tl_set_business_opening_hours_gen.go +++ b/tdapi/tl_set_business_opening_hours_gen.go @@ -33,7 +33,8 @@ var ( // SetBusinessOpeningHoursRequest represents TL type `setBusinessOpeningHours#e470a472`. type SetBusinessOpeningHoursRequest struct { - // The new opening hours of the business; pass null to remove the opening hours + // The new opening hours of the business; pass null to remove the opening hours; up to 28 + // time intervals can be specified OpeningHours BusinessOpeningHours } diff --git a/tdapi/tl_set_custom_emoji_sticker_set_thumbnail_gen.go b/tdapi/tl_set_custom_emoji_sticker_set_thumbnail_gen.go index 95dd74a968..eba3bfab23 100644 --- a/tdapi/tl_set_custom_emoji_sticker_set_thumbnail_gen.go +++ b/tdapi/tl_set_custom_emoji_sticker_set_thumbnail_gen.go @@ -33,7 +33,7 @@ var ( // SetCustomEmojiStickerSetThumbnailRequest represents TL type `setCustomEmojiStickerSetThumbnail#bd12e0ea`. type SetCustomEmojiStickerSetThumbnailRequest struct { - // Sticker set name + // Sticker set name. The sticker set must be owned by the current user Name string // Identifier of the custom emoji from the sticker set, which will be set as sticker set // thumbnail; pass 0 to remove the sticker set thumbnail diff --git a/tdapi/tl_set_personal_chat_gen.go b/tdapi/tl_set_personal_chat_gen.go new file mode 100644 index 0000000000..13ca70fa79 --- /dev/null +++ b/tdapi/tl_set_personal_chat_gen.go @@ -0,0 +1,207 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// SetPersonalChatRequest represents TL type `setPersonalChat#c04babb4`. +type SetPersonalChatRequest struct { + // Identifier of the new personal chat; pass 0 to remove the chat. Use + // getSuitablePersonalChats to get suitable chats + ChatID int64 +} + +// SetPersonalChatRequestTypeID is TL type id of SetPersonalChatRequest. +const SetPersonalChatRequestTypeID = 0xc04babb4 + +// Ensuring interfaces in compile-time for SetPersonalChatRequest. +var ( + _ bin.Encoder = &SetPersonalChatRequest{} + _ bin.Decoder = &SetPersonalChatRequest{} + _ bin.BareEncoder = &SetPersonalChatRequest{} + _ bin.BareDecoder = &SetPersonalChatRequest{} +) + +func (s *SetPersonalChatRequest) Zero() bool { + if s == nil { + return true + } + if !(s.ChatID == 0) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (s *SetPersonalChatRequest) String() string { + if s == nil { + return "SetPersonalChatRequest(nil)" + } + type Alias SetPersonalChatRequest + return fmt.Sprintf("SetPersonalChatRequest%+v", Alias(*s)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*SetPersonalChatRequest) TypeID() uint32 { + return SetPersonalChatRequestTypeID +} + +// TypeName returns name of type in TL schema. +func (*SetPersonalChatRequest) TypeName() string { + return "setPersonalChat" +} + +// TypeInfo returns info about TL type. +func (s *SetPersonalChatRequest) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "setPersonalChat", + ID: SetPersonalChatRequestTypeID, + } + if s == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "ChatID", + SchemaName: "chat_id", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (s *SetPersonalChatRequest) Encode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode setPersonalChat#c04babb4 as nil") + } + b.PutID(SetPersonalChatRequestTypeID) + return s.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (s *SetPersonalChatRequest) EncodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode setPersonalChat#c04babb4 as nil") + } + b.PutInt53(s.ChatID) + return nil +} + +// Decode implements bin.Decoder. +func (s *SetPersonalChatRequest) Decode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode setPersonalChat#c04babb4 to nil") + } + if err := b.ConsumeID(SetPersonalChatRequestTypeID); err != nil { + return fmt.Errorf("unable to decode setPersonalChat#c04babb4: %w", err) + } + return s.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (s *SetPersonalChatRequest) DecodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode setPersonalChat#c04babb4 to nil") + } + { + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode setPersonalChat#c04babb4: field chat_id: %w", err) + } + s.ChatID = value + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (s *SetPersonalChatRequest) EncodeTDLibJSON(b tdjson.Encoder) error { + if s == nil { + return fmt.Errorf("can't encode setPersonalChat#c04babb4 as nil") + } + b.ObjStart() + b.PutID("setPersonalChat") + b.Comma() + b.FieldStart("chat_id") + b.PutInt53(s.ChatID) + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (s *SetPersonalChatRequest) DecodeTDLibJSON(b tdjson.Decoder) error { + if s == nil { + return fmt.Errorf("can't decode setPersonalChat#c04babb4 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("setPersonalChat"); err != nil { + return fmt.Errorf("unable to decode setPersonalChat#c04babb4: %w", err) + } + case "chat_id": + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode setPersonalChat#c04babb4: field chat_id: %w", err) + } + s.ChatID = value + default: + return b.Skip() + } + return nil + }) +} + +// GetChatID returns value of ChatID field. +func (s *SetPersonalChatRequest) GetChatID() (value int64) { + if s == nil { + return + } + return s.ChatID +} + +// SetPersonalChat invokes method setPersonalChat#c04babb4 returning error if any. +func (c *Client) SetPersonalChat(ctx context.Context, chatid int64) error { + var ok Ok + + request := &SetPersonalChatRequest{ + ChatID: chatid, + } + if err := c.rpc.Invoke(ctx, request, &ok); err != nil { + return err + } + return nil +} diff --git a/tdapi/tl_set_sticker_set_thumbnail_gen.go b/tdapi/tl_set_sticker_set_thumbnail_gen.go index 26fd82baaf..14c15ebe97 100644 --- a/tdapi/tl_set_sticker_set_thumbnail_gen.go +++ b/tdapi/tl_set_sticker_set_thumbnail_gen.go @@ -31,19 +31,20 @@ var ( _ = tdjson.Encoder{} ) -// SetStickerSetThumbnailRequest represents TL type `setStickerSetThumbnail#6f813221`. +// SetStickerSetThumbnailRequest represents TL type `setStickerSetThumbnail#63fe6932`. type SetStickerSetThumbnailRequest struct { - // Sticker set owner + // Sticker set owner; ignored for regular users UserID int64 - // Sticker set name + // Sticker set name. The sticker set must be owned by the current user Name string - // Thumbnail to set in PNG, TGS, or WEBM format; pass null to remove the sticker set - // thumbnail. Thumbnail format must match the format of stickers in the set + // Thumbnail to set; pass null to remove the sticker set thumbnail Thumbnail InputFileClass + // Format of the thumbnail; pass null if thumbnail is removed + Format StickerFormatClass } // SetStickerSetThumbnailRequestTypeID is TL type id of SetStickerSetThumbnailRequest. -const SetStickerSetThumbnailRequestTypeID = 0x6f813221 +const SetStickerSetThumbnailRequestTypeID = 0x63fe6932 // Ensuring interfaces in compile-time for SetStickerSetThumbnailRequest. var ( @@ -66,6 +67,9 @@ func (s *SetStickerSetThumbnailRequest) Zero() bool { if !(s.Thumbnail == nil) { return false } + if !(s.Format == nil) { + return false + } return true } @@ -114,6 +118,10 @@ func (s *SetStickerSetThumbnailRequest) TypeInfo() tdp.Type { Name: "Thumbnail", SchemaName: "thumbnail", }, + { + Name: "Format", + SchemaName: "format", + }, } return typ } @@ -121,7 +129,7 @@ func (s *SetStickerSetThumbnailRequest) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (s *SetStickerSetThumbnailRequest) Encode(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't encode setStickerSetThumbnail#6f813221 as nil") + return fmt.Errorf("can't encode setStickerSetThumbnail#63fe6932 as nil") } b.PutID(SetStickerSetThumbnailRequestTypeID) return s.EncodeBare(b) @@ -130,15 +138,21 @@ func (s *SetStickerSetThumbnailRequest) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (s *SetStickerSetThumbnailRequest) EncodeBare(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't encode setStickerSetThumbnail#6f813221 as nil") + return fmt.Errorf("can't encode setStickerSetThumbnail#63fe6932 as nil") } b.PutInt53(s.UserID) b.PutString(s.Name) if s.Thumbnail == nil { - return fmt.Errorf("unable to encode setStickerSetThumbnail#6f813221: field thumbnail is nil") + return fmt.Errorf("unable to encode setStickerSetThumbnail#63fe6932: field thumbnail is nil") } if err := s.Thumbnail.Encode(b); err != nil { - return fmt.Errorf("unable to encode setStickerSetThumbnail#6f813221: field thumbnail: %w", err) + return fmt.Errorf("unable to encode setStickerSetThumbnail#63fe6932: field thumbnail: %w", err) + } + if s.Format == nil { + return fmt.Errorf("unable to encode setStickerSetThumbnail#63fe6932: field format is nil") + } + if err := s.Format.Encode(b); err != nil { + return fmt.Errorf("unable to encode setStickerSetThumbnail#63fe6932: field format: %w", err) } return nil } @@ -146,10 +160,10 @@ func (s *SetStickerSetThumbnailRequest) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (s *SetStickerSetThumbnailRequest) Decode(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't decode setStickerSetThumbnail#6f813221 to nil") + return fmt.Errorf("can't decode setStickerSetThumbnail#63fe6932 to nil") } if err := b.ConsumeID(SetStickerSetThumbnailRequestTypeID); err != nil { - return fmt.Errorf("unable to decode setStickerSetThumbnail#6f813221: %w", err) + return fmt.Errorf("unable to decode setStickerSetThumbnail#63fe6932: %w", err) } return s.DecodeBare(b) } @@ -157,36 +171,43 @@ func (s *SetStickerSetThumbnailRequest) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (s *SetStickerSetThumbnailRequest) DecodeBare(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't decode setStickerSetThumbnail#6f813221 to nil") + return fmt.Errorf("can't decode setStickerSetThumbnail#63fe6932 to nil") } { value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode setStickerSetThumbnail#6f813221: field user_id: %w", err) + return fmt.Errorf("unable to decode setStickerSetThumbnail#63fe6932: field user_id: %w", err) } s.UserID = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode setStickerSetThumbnail#6f813221: field name: %w", err) + return fmt.Errorf("unable to decode setStickerSetThumbnail#63fe6932: field name: %w", err) } s.Name = value } { value, err := DecodeInputFile(b) if err != nil { - return fmt.Errorf("unable to decode setStickerSetThumbnail#6f813221: field thumbnail: %w", err) + return fmt.Errorf("unable to decode setStickerSetThumbnail#63fe6932: field thumbnail: %w", err) } s.Thumbnail = value } + { + value, err := DecodeStickerFormat(b) + if err != nil { + return fmt.Errorf("unable to decode setStickerSetThumbnail#63fe6932: field format: %w", err) + } + s.Format = value + } return nil } // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (s *SetStickerSetThumbnailRequest) EncodeTDLibJSON(b tdjson.Encoder) error { if s == nil { - return fmt.Errorf("can't encode setStickerSetThumbnail#6f813221 as nil") + return fmt.Errorf("can't encode setStickerSetThumbnail#63fe6932 as nil") } b.ObjStart() b.PutID("setStickerSetThumbnail") @@ -199,10 +220,18 @@ func (s *SetStickerSetThumbnailRequest) EncodeTDLibJSON(b tdjson.Encoder) error b.Comma() b.FieldStart("thumbnail") if s.Thumbnail == nil { - return fmt.Errorf("unable to encode setStickerSetThumbnail#6f813221: field thumbnail is nil") + return fmt.Errorf("unable to encode setStickerSetThumbnail#63fe6932: field thumbnail is nil") } if err := s.Thumbnail.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode setStickerSetThumbnail#6f813221: field thumbnail: %w", err) + return fmt.Errorf("unable to encode setStickerSetThumbnail#63fe6932: field thumbnail: %w", err) + } + b.Comma() + b.FieldStart("format") + if s.Format == nil { + return fmt.Errorf("unable to encode setStickerSetThumbnail#63fe6932: field format is nil") + } + if err := s.Format.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode setStickerSetThumbnail#63fe6932: field format: %w", err) } b.Comma() b.StripComma() @@ -213,33 +242,39 @@ func (s *SetStickerSetThumbnailRequest) EncodeTDLibJSON(b tdjson.Encoder) error // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (s *SetStickerSetThumbnailRequest) DecodeTDLibJSON(b tdjson.Decoder) error { if s == nil { - return fmt.Errorf("can't decode setStickerSetThumbnail#6f813221 to nil") + return fmt.Errorf("can't decode setStickerSetThumbnail#63fe6932 to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("setStickerSetThumbnail"); err != nil { - return fmt.Errorf("unable to decode setStickerSetThumbnail#6f813221: %w", err) + return fmt.Errorf("unable to decode setStickerSetThumbnail#63fe6932: %w", err) } case "user_id": value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode setStickerSetThumbnail#6f813221: field user_id: %w", err) + return fmt.Errorf("unable to decode setStickerSetThumbnail#63fe6932: field user_id: %w", err) } s.UserID = value case "name": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode setStickerSetThumbnail#6f813221: field name: %w", err) + return fmt.Errorf("unable to decode setStickerSetThumbnail#63fe6932: field name: %w", err) } s.Name = value case "thumbnail": value, err := DecodeTDLibJSONInputFile(b) if err != nil { - return fmt.Errorf("unable to decode setStickerSetThumbnail#6f813221: field thumbnail: %w", err) + return fmt.Errorf("unable to decode setStickerSetThumbnail#63fe6932: field thumbnail: %w", err) } s.Thumbnail = value + case "format": + value, err := DecodeTDLibJSONStickerFormat(b) + if err != nil { + return fmt.Errorf("unable to decode setStickerSetThumbnail#63fe6932: field format: %w", err) + } + s.Format = value default: return b.Skip() } @@ -271,7 +306,15 @@ func (s *SetStickerSetThumbnailRequest) GetThumbnail() (value InputFileClass) { return s.Thumbnail } -// SetStickerSetThumbnail invokes method setStickerSetThumbnail#6f813221 returning error if any. +// GetFormat returns value of Format field. +func (s *SetStickerSetThumbnailRequest) GetFormat() (value StickerFormatClass) { + if s == nil { + return + } + return s.Format +} + +// SetStickerSetThumbnail invokes method setStickerSetThumbnail#63fe6932 returning error if any. func (c *Client) SetStickerSetThumbnail(ctx context.Context, request *SetStickerSetThumbnailRequest) error { var ok Ok diff --git a/tdapi/tl_set_sticker_set_title_gen.go b/tdapi/tl_set_sticker_set_title_gen.go index 88f08b5b01..65ab68fc79 100644 --- a/tdapi/tl_set_sticker_set_title_gen.go +++ b/tdapi/tl_set_sticker_set_title_gen.go @@ -33,7 +33,7 @@ var ( // SetStickerSetTitleRequest represents TL type `setStickerSetTitle#64e933a2`. type SetStickerSetTitleRequest struct { - // Sticker set name + // Sticker set name. The sticker set must be owned by the current user Name string // New sticker set title Title string diff --git a/tdapi/tl_shared_chat_gen.go b/tdapi/tl_shared_chat_gen.go new file mode 100644 index 0000000000..652911e94f --- /dev/null +++ b/tdapi/tl_shared_chat_gen.go @@ -0,0 +1,295 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// SharedChat represents TL type `sharedChat#4a87b01a`. +type SharedChat struct { + // Chat identifier + ChatID int64 + // Title of the chat; for bots only + Title string + // Username of the chat; for bots only + Username string + // Photo of the chat; for bots only; may be null + Photo Photo +} + +// SharedChatTypeID is TL type id of SharedChat. +const SharedChatTypeID = 0x4a87b01a + +// Ensuring interfaces in compile-time for SharedChat. +var ( + _ bin.Encoder = &SharedChat{} + _ bin.Decoder = &SharedChat{} + _ bin.BareEncoder = &SharedChat{} + _ bin.BareDecoder = &SharedChat{} +) + +func (s *SharedChat) Zero() bool { + if s == nil { + return true + } + if !(s.ChatID == 0) { + return false + } + if !(s.Title == "") { + return false + } + if !(s.Username == "") { + return false + } + if !(s.Photo.Zero()) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (s *SharedChat) String() string { + if s == nil { + return "SharedChat(nil)" + } + type Alias SharedChat + return fmt.Sprintf("SharedChat%+v", Alias(*s)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*SharedChat) TypeID() uint32 { + return SharedChatTypeID +} + +// TypeName returns name of type in TL schema. +func (*SharedChat) TypeName() string { + return "sharedChat" +} + +// TypeInfo returns info about TL type. +func (s *SharedChat) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "sharedChat", + ID: SharedChatTypeID, + } + if s == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "ChatID", + SchemaName: "chat_id", + }, + { + Name: "Title", + SchemaName: "title", + }, + { + Name: "Username", + SchemaName: "username", + }, + { + Name: "Photo", + SchemaName: "photo", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (s *SharedChat) Encode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode sharedChat#4a87b01a as nil") + } + b.PutID(SharedChatTypeID) + return s.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (s *SharedChat) EncodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode sharedChat#4a87b01a as nil") + } + b.PutInt53(s.ChatID) + b.PutString(s.Title) + b.PutString(s.Username) + if err := s.Photo.Encode(b); err != nil { + return fmt.Errorf("unable to encode sharedChat#4a87b01a: field photo: %w", err) + } + return nil +} + +// Decode implements bin.Decoder. +func (s *SharedChat) Decode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode sharedChat#4a87b01a to nil") + } + if err := b.ConsumeID(SharedChatTypeID); err != nil { + return fmt.Errorf("unable to decode sharedChat#4a87b01a: %w", err) + } + return s.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (s *SharedChat) DecodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode sharedChat#4a87b01a to nil") + } + { + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode sharedChat#4a87b01a: field chat_id: %w", err) + } + s.ChatID = value + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode sharedChat#4a87b01a: field title: %w", err) + } + s.Title = value + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode sharedChat#4a87b01a: field username: %w", err) + } + s.Username = value + } + { + if err := s.Photo.Decode(b); err != nil { + return fmt.Errorf("unable to decode sharedChat#4a87b01a: field photo: %w", err) + } + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (s *SharedChat) EncodeTDLibJSON(b tdjson.Encoder) error { + if s == nil { + return fmt.Errorf("can't encode sharedChat#4a87b01a as nil") + } + b.ObjStart() + b.PutID("sharedChat") + b.Comma() + b.FieldStart("chat_id") + b.PutInt53(s.ChatID) + b.Comma() + b.FieldStart("title") + b.PutString(s.Title) + b.Comma() + b.FieldStart("username") + b.PutString(s.Username) + b.Comma() + b.FieldStart("photo") + if err := s.Photo.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode sharedChat#4a87b01a: field photo: %w", err) + } + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (s *SharedChat) DecodeTDLibJSON(b tdjson.Decoder) error { + if s == nil { + return fmt.Errorf("can't decode sharedChat#4a87b01a to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("sharedChat"); err != nil { + return fmt.Errorf("unable to decode sharedChat#4a87b01a: %w", err) + } + case "chat_id": + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode sharedChat#4a87b01a: field chat_id: %w", err) + } + s.ChatID = value + case "title": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode sharedChat#4a87b01a: field title: %w", err) + } + s.Title = value + case "username": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode sharedChat#4a87b01a: field username: %w", err) + } + s.Username = value + case "photo": + if err := s.Photo.DecodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to decode sharedChat#4a87b01a: field photo: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// GetChatID returns value of ChatID field. +func (s *SharedChat) GetChatID() (value int64) { + if s == nil { + return + } + return s.ChatID +} + +// GetTitle returns value of Title field. +func (s *SharedChat) GetTitle() (value string) { + if s == nil { + return + } + return s.Title +} + +// GetUsername returns value of Username field. +func (s *SharedChat) GetUsername() (value string) { + if s == nil { + return + } + return s.Username +} + +// GetPhoto returns value of Photo field. +func (s *SharedChat) GetPhoto() (value Photo) { + if s == nil { + return + } + return s.Photo +} diff --git a/tdapi/tl_shared_user_gen.go b/tdapi/tl_shared_user_gen.go new file mode 100644 index 0000000000..95a8d889cc --- /dev/null +++ b/tdapi/tl_shared_user_gen.go @@ -0,0 +1,329 @@ +// Code generated by gotdgen, DO NOT EDIT. + +package tdapi + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "go.uber.org/multierr" + + "github.com/gotd/td/bin" + "github.com/gotd/td/tdjson" + "github.com/gotd/td/tdp" + "github.com/gotd/td/tgerr" +) + +// No-op definition for keeping imports. +var ( + _ = bin.Buffer{} + _ = context.Background() + _ = fmt.Stringer(nil) + _ = strings.Builder{} + _ = errors.Is + _ = multierr.AppendInto + _ = sort.Ints + _ = tdp.Format + _ = tgerr.Error{} + _ = tdjson.Encoder{} +) + +// SharedUser represents TL type `sharedUser#117724f7`. +type SharedUser struct { + // User identifier + UserID int64 + // First name of the user; for bots only + FirstName string + // Last name of the user; for bots only + LastName string + // Username of the user; for bots only + Username string + // Profile photo of the user; for bots only; may be null + Photo Photo +} + +// SharedUserTypeID is TL type id of SharedUser. +const SharedUserTypeID = 0x117724f7 + +// Ensuring interfaces in compile-time for SharedUser. +var ( + _ bin.Encoder = &SharedUser{} + _ bin.Decoder = &SharedUser{} + _ bin.BareEncoder = &SharedUser{} + _ bin.BareDecoder = &SharedUser{} +) + +func (s *SharedUser) Zero() bool { + if s == nil { + return true + } + if !(s.UserID == 0) { + return false + } + if !(s.FirstName == "") { + return false + } + if !(s.LastName == "") { + return false + } + if !(s.Username == "") { + return false + } + if !(s.Photo.Zero()) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (s *SharedUser) String() string { + if s == nil { + return "SharedUser(nil)" + } + type Alias SharedUser + return fmt.Sprintf("SharedUser%+v", Alias(*s)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*SharedUser) TypeID() uint32 { + return SharedUserTypeID +} + +// TypeName returns name of type in TL schema. +func (*SharedUser) TypeName() string { + return "sharedUser" +} + +// TypeInfo returns info about TL type. +func (s *SharedUser) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "sharedUser", + ID: SharedUserTypeID, + } + if s == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "UserID", + SchemaName: "user_id", + }, + { + Name: "FirstName", + SchemaName: "first_name", + }, + { + Name: "LastName", + SchemaName: "last_name", + }, + { + Name: "Username", + SchemaName: "username", + }, + { + Name: "Photo", + SchemaName: "photo", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (s *SharedUser) Encode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode sharedUser#117724f7 as nil") + } + b.PutID(SharedUserTypeID) + return s.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (s *SharedUser) EncodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode sharedUser#117724f7 as nil") + } + b.PutInt53(s.UserID) + b.PutString(s.FirstName) + b.PutString(s.LastName) + b.PutString(s.Username) + if err := s.Photo.Encode(b); err != nil { + return fmt.Errorf("unable to encode sharedUser#117724f7: field photo: %w", err) + } + return nil +} + +// Decode implements bin.Decoder. +func (s *SharedUser) Decode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode sharedUser#117724f7 to nil") + } + if err := b.ConsumeID(SharedUserTypeID); err != nil { + return fmt.Errorf("unable to decode sharedUser#117724f7: %w", err) + } + return s.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (s *SharedUser) DecodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode sharedUser#117724f7 to nil") + } + { + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode sharedUser#117724f7: field user_id: %w", err) + } + s.UserID = value + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode sharedUser#117724f7: field first_name: %w", err) + } + s.FirstName = value + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode sharedUser#117724f7: field last_name: %w", err) + } + s.LastName = value + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode sharedUser#117724f7: field username: %w", err) + } + s.Username = value + } + { + if err := s.Photo.Decode(b); err != nil { + return fmt.Errorf("unable to decode sharedUser#117724f7: field photo: %w", err) + } + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (s *SharedUser) EncodeTDLibJSON(b tdjson.Encoder) error { + if s == nil { + return fmt.Errorf("can't encode sharedUser#117724f7 as nil") + } + b.ObjStart() + b.PutID("sharedUser") + b.Comma() + b.FieldStart("user_id") + b.PutInt53(s.UserID) + b.Comma() + b.FieldStart("first_name") + b.PutString(s.FirstName) + b.Comma() + b.FieldStart("last_name") + b.PutString(s.LastName) + b.Comma() + b.FieldStart("username") + b.PutString(s.Username) + b.Comma() + b.FieldStart("photo") + if err := s.Photo.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode sharedUser#117724f7: field photo: %w", err) + } + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (s *SharedUser) DecodeTDLibJSON(b tdjson.Decoder) error { + if s == nil { + return fmt.Errorf("can't decode sharedUser#117724f7 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("sharedUser"); err != nil { + return fmt.Errorf("unable to decode sharedUser#117724f7: %w", err) + } + case "user_id": + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode sharedUser#117724f7: field user_id: %w", err) + } + s.UserID = value + case "first_name": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode sharedUser#117724f7: field first_name: %w", err) + } + s.FirstName = value + case "last_name": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode sharedUser#117724f7: field last_name: %w", err) + } + s.LastName = value + case "username": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode sharedUser#117724f7: field username: %w", err) + } + s.Username = value + case "photo": + if err := s.Photo.DecodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to decode sharedUser#117724f7: field photo: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// GetUserID returns value of UserID field. +func (s *SharedUser) GetUserID() (value int64) { + if s == nil { + return + } + return s.UserID +} + +// GetFirstName returns value of FirstName field. +func (s *SharedUser) GetFirstName() (value string) { + if s == nil { + return + } + return s.FirstName +} + +// GetLastName returns value of LastName field. +func (s *SharedUser) GetLastName() (value string) { + if s == nil { + return + } + return s.LastName +} + +// GetUsername returns value of Username field. +func (s *SharedUser) GetUsername() (value string) { + if s == nil { + return + } + return s.Username +} + +// GetPhoto returns value of Photo field. +func (s *SharedUser) GetPhoto() (value Photo) { + if s == nil { + return + } + return s.Photo +} diff --git a/tdapi/tl_sponsored_message_gen.go b/tdapi/tl_sponsored_message_gen.go index 4276c66cd7..085d0daf06 100644 --- a/tdapi/tl_sponsored_message_gen.go +++ b/tdapi/tl_sponsored_message_gen.go @@ -31,13 +31,16 @@ var ( _ = tdjson.Encoder{} ) -// SponsoredMessage represents TL type `sponsoredMessage#147623b4`. +// SponsoredMessage represents TL type `sponsoredMessage#3748e46f`. type SponsoredMessage struct { // Message identifier; unique for the chat to which the sponsored message belongs among // both ordinary and sponsored messages MessageID int64 // True, if the message needs to be labeled as "recommended" instead of "sponsored" IsRecommended bool + // True, if the message can be reported to Telegram moderators through + // reportChatSponsoredMessage + CanBeReported bool // Content of the message. Currently, can be only of the type messageText Content MessageContentClass // Information about the sponsor of the message @@ -50,7 +53,7 @@ type SponsoredMessage struct { } // SponsoredMessageTypeID is TL type id of SponsoredMessage. -const SponsoredMessageTypeID = 0x147623b4 +const SponsoredMessageTypeID = 0x3748e46f // Ensuring interfaces in compile-time for SponsoredMessage. var ( @@ -70,6 +73,9 @@ func (s *SponsoredMessage) Zero() bool { if !(s.IsRecommended == false) { return false } + if !(s.CanBeReported == false) { + return false + } if !(s.Content == nil) { return false } @@ -126,6 +132,10 @@ func (s *SponsoredMessage) TypeInfo() tdp.Type { Name: "IsRecommended", SchemaName: "is_recommended", }, + { + Name: "CanBeReported", + SchemaName: "can_be_reported", + }, { Name: "Content", SchemaName: "content", @@ -149,7 +159,7 @@ func (s *SponsoredMessage) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (s *SponsoredMessage) Encode(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't encode sponsoredMessage#147623b4 as nil") + return fmt.Errorf("can't encode sponsoredMessage#3748e46f as nil") } b.PutID(SponsoredMessageTypeID) return s.EncodeBare(b) @@ -158,18 +168,19 @@ func (s *SponsoredMessage) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (s *SponsoredMessage) EncodeBare(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't encode sponsoredMessage#147623b4 as nil") + return fmt.Errorf("can't encode sponsoredMessage#3748e46f as nil") } b.PutInt53(s.MessageID) b.PutBool(s.IsRecommended) + b.PutBool(s.CanBeReported) if s.Content == nil { - return fmt.Errorf("unable to encode sponsoredMessage#147623b4: field content is nil") + return fmt.Errorf("unable to encode sponsoredMessage#3748e46f: field content is nil") } if err := s.Content.Encode(b); err != nil { - return fmt.Errorf("unable to encode sponsoredMessage#147623b4: field content: %w", err) + return fmt.Errorf("unable to encode sponsoredMessage#3748e46f: field content: %w", err) } if err := s.Sponsor.Encode(b); err != nil { - return fmt.Errorf("unable to encode sponsoredMessage#147623b4: field sponsor: %w", err) + return fmt.Errorf("unable to encode sponsoredMessage#3748e46f: field sponsor: %w", err) } b.PutString(s.ButtonText) b.PutString(s.AdditionalInfo) @@ -179,10 +190,10 @@ func (s *SponsoredMessage) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (s *SponsoredMessage) Decode(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't decode sponsoredMessage#147623b4 to nil") + return fmt.Errorf("can't decode sponsoredMessage#3748e46f to nil") } if err := b.ConsumeID(SponsoredMessageTypeID); err != nil { - return fmt.Errorf("unable to decode sponsoredMessage#147623b4: %w", err) + return fmt.Errorf("unable to decode sponsoredMessage#3748e46f: %w", err) } return s.DecodeBare(b) } @@ -190,45 +201,52 @@ func (s *SponsoredMessage) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (s *SponsoredMessage) DecodeBare(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't decode sponsoredMessage#147623b4 to nil") + return fmt.Errorf("can't decode sponsoredMessage#3748e46f to nil") } { value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode sponsoredMessage#147623b4: field message_id: %w", err) + return fmt.Errorf("unable to decode sponsoredMessage#3748e46f: field message_id: %w", err) } s.MessageID = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode sponsoredMessage#147623b4: field is_recommended: %w", err) + return fmt.Errorf("unable to decode sponsoredMessage#3748e46f: field is_recommended: %w", err) } s.IsRecommended = value } + { + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode sponsoredMessage#3748e46f: field can_be_reported: %w", err) + } + s.CanBeReported = value + } { value, err := DecodeMessageContent(b) if err != nil { - return fmt.Errorf("unable to decode sponsoredMessage#147623b4: field content: %w", err) + return fmt.Errorf("unable to decode sponsoredMessage#3748e46f: field content: %w", err) } s.Content = value } { if err := s.Sponsor.Decode(b); err != nil { - return fmt.Errorf("unable to decode sponsoredMessage#147623b4: field sponsor: %w", err) + return fmt.Errorf("unable to decode sponsoredMessage#3748e46f: field sponsor: %w", err) } } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode sponsoredMessage#147623b4: field button_text: %w", err) + return fmt.Errorf("unable to decode sponsoredMessage#3748e46f: field button_text: %w", err) } s.ButtonText = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode sponsoredMessage#147623b4: field additional_info: %w", err) + return fmt.Errorf("unable to decode sponsoredMessage#3748e46f: field additional_info: %w", err) } s.AdditionalInfo = value } @@ -238,7 +256,7 @@ func (s *SponsoredMessage) DecodeBare(b *bin.Buffer) error { // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (s *SponsoredMessage) EncodeTDLibJSON(b tdjson.Encoder) error { if s == nil { - return fmt.Errorf("can't encode sponsoredMessage#147623b4 as nil") + return fmt.Errorf("can't encode sponsoredMessage#3748e46f as nil") } b.ObjStart() b.PutID("sponsoredMessage") @@ -249,17 +267,20 @@ func (s *SponsoredMessage) EncodeTDLibJSON(b tdjson.Encoder) error { b.FieldStart("is_recommended") b.PutBool(s.IsRecommended) b.Comma() + b.FieldStart("can_be_reported") + b.PutBool(s.CanBeReported) + b.Comma() b.FieldStart("content") if s.Content == nil { - return fmt.Errorf("unable to encode sponsoredMessage#147623b4: field content is nil") + return fmt.Errorf("unable to encode sponsoredMessage#3748e46f: field content is nil") } if err := s.Content.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode sponsoredMessage#147623b4: field content: %w", err) + return fmt.Errorf("unable to encode sponsoredMessage#3748e46f: field content: %w", err) } b.Comma() b.FieldStart("sponsor") if err := s.Sponsor.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode sponsoredMessage#147623b4: field sponsor: %w", err) + return fmt.Errorf("unable to encode sponsoredMessage#3748e46f: field sponsor: %w", err) } b.Comma() b.FieldStart("button_text") @@ -276,47 +297,53 @@ func (s *SponsoredMessage) EncodeTDLibJSON(b tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (s *SponsoredMessage) DecodeTDLibJSON(b tdjson.Decoder) error { if s == nil { - return fmt.Errorf("can't decode sponsoredMessage#147623b4 to nil") + return fmt.Errorf("can't decode sponsoredMessage#3748e46f to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("sponsoredMessage"); err != nil { - return fmt.Errorf("unable to decode sponsoredMessage#147623b4: %w", err) + return fmt.Errorf("unable to decode sponsoredMessage#3748e46f: %w", err) } case "message_id": value, err := b.Int53() if err != nil { - return fmt.Errorf("unable to decode sponsoredMessage#147623b4: field message_id: %w", err) + return fmt.Errorf("unable to decode sponsoredMessage#3748e46f: field message_id: %w", err) } s.MessageID = value case "is_recommended": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode sponsoredMessage#147623b4: field is_recommended: %w", err) + return fmt.Errorf("unable to decode sponsoredMessage#3748e46f: field is_recommended: %w", err) } s.IsRecommended = value + case "can_be_reported": + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode sponsoredMessage#3748e46f: field can_be_reported: %w", err) + } + s.CanBeReported = value case "content": value, err := DecodeTDLibJSONMessageContent(b) if err != nil { - return fmt.Errorf("unable to decode sponsoredMessage#147623b4: field content: %w", err) + return fmt.Errorf("unable to decode sponsoredMessage#3748e46f: field content: %w", err) } s.Content = value case "sponsor": if err := s.Sponsor.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode sponsoredMessage#147623b4: field sponsor: %w", err) + return fmt.Errorf("unable to decode sponsoredMessage#3748e46f: field sponsor: %w", err) } case "button_text": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode sponsoredMessage#147623b4: field button_text: %w", err) + return fmt.Errorf("unable to decode sponsoredMessage#3748e46f: field button_text: %w", err) } s.ButtonText = value case "additional_info": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode sponsoredMessage#147623b4: field additional_info: %w", err) + return fmt.Errorf("unable to decode sponsoredMessage#3748e46f: field additional_info: %w", err) } s.AdditionalInfo = value default: @@ -342,6 +369,14 @@ func (s *SponsoredMessage) GetIsRecommended() (value bool) { return s.IsRecommended } +// GetCanBeReported returns value of CanBeReported field. +func (s *SponsoredMessage) GetCanBeReported() (value bool) { + if s == nil { + return + } + return s.CanBeReported +} + // GetContent returns value of Content field. func (s *SponsoredMessage) GetContent() (value MessageContentClass) { if s == nil { diff --git a/tdapi/tl_sticker_set_gen.go b/tdapi/tl_sticker_set_gen.go index 007f75d8b8..fd11fcc29d 100644 --- a/tdapi/tl_sticker_set_gen.go +++ b/tdapi/tl_sticker_set_gen.go @@ -31,7 +31,7 @@ var ( _ = tdjson.Encoder{} ) -// StickerSet represents TL type `stickerSet#133c3db9`. +// StickerSet represents TL type `stickerSet#bcf4d158`. type StickerSet struct { // Identifier of the sticker set ID int64 @@ -45,6 +45,8 @@ type StickerSet struct { // Sticker set thumbnail's outline represented as a list of closed vector paths; may be // empty. The coordinate system origin is in the upper-left corner ThumbnailOutline []ClosedVectorPath + // True, if the sticker set is owned by the current user + IsOwned bool // True, if the sticker set has been installed by the current user IsInstalled bool // True, if the sticker set has been archived. A sticker set can't be installed and @@ -52,8 +54,6 @@ type StickerSet struct { IsArchived bool // True, if the sticker set is official IsOfficial bool - // Format of the stickers in the set - StickerFormat StickerFormatClass // Type of the stickers in the set StickerType StickerTypeClass // True, if stickers in the sticker set are custom emoji that must be repainted; for @@ -73,7 +73,7 @@ type StickerSet struct { } // StickerSetTypeID is TL type id of StickerSet. -const StickerSetTypeID = 0x133c3db9 +const StickerSetTypeID = 0xbcf4d158 // Ensuring interfaces in compile-time for StickerSet. var ( @@ -102,6 +102,9 @@ func (s *StickerSet) Zero() bool { if !(s.ThumbnailOutline == nil) { return false } + if !(s.IsOwned == false) { + return false + } if !(s.IsInstalled == false) { return false } @@ -111,9 +114,6 @@ func (s *StickerSet) Zero() bool { if !(s.IsOfficial == false) { return false } - if !(s.StickerFormat == nil) { - return false - } if !(s.StickerType == nil) { return false } @@ -188,6 +188,10 @@ func (s *StickerSet) TypeInfo() tdp.Type { Name: "ThumbnailOutline", SchemaName: "thumbnail_outline", }, + { + Name: "IsOwned", + SchemaName: "is_owned", + }, { Name: "IsInstalled", SchemaName: "is_installed", @@ -200,10 +204,6 @@ func (s *StickerSet) TypeInfo() tdp.Type { Name: "IsOfficial", SchemaName: "is_official", }, - { - Name: "StickerFormat", - SchemaName: "sticker_format", - }, { Name: "StickerType", SchemaName: "sticker_type", @@ -235,7 +235,7 @@ func (s *StickerSet) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (s *StickerSet) Encode(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't encode stickerSet#133c3db9 as nil") + return fmt.Errorf("can't encode stickerSet#bcf4d158 as nil") } b.PutID(StickerSetTypeID) return s.EncodeBare(b) @@ -244,34 +244,29 @@ func (s *StickerSet) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (s *StickerSet) EncodeBare(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't encode stickerSet#133c3db9 as nil") + return fmt.Errorf("can't encode stickerSet#bcf4d158 as nil") } b.PutLong(s.ID) b.PutString(s.Title) b.PutString(s.Name) if err := s.Thumbnail.Encode(b); err != nil { - return fmt.Errorf("unable to encode stickerSet#133c3db9: field thumbnail: %w", err) + return fmt.Errorf("unable to encode stickerSet#bcf4d158: field thumbnail: %w", err) } b.PutInt(len(s.ThumbnailOutline)) for idx, v := range s.ThumbnailOutline { if err := v.EncodeBare(b); err != nil { - return fmt.Errorf("unable to encode bare stickerSet#133c3db9: field thumbnail_outline element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode bare stickerSet#bcf4d158: field thumbnail_outline element with index %d: %w", idx, err) } } + b.PutBool(s.IsOwned) b.PutBool(s.IsInstalled) b.PutBool(s.IsArchived) b.PutBool(s.IsOfficial) - if s.StickerFormat == nil { - return fmt.Errorf("unable to encode stickerSet#133c3db9: field sticker_format is nil") - } - if err := s.StickerFormat.Encode(b); err != nil { - return fmt.Errorf("unable to encode stickerSet#133c3db9: field sticker_format: %w", err) - } if s.StickerType == nil { - return fmt.Errorf("unable to encode stickerSet#133c3db9: field sticker_type is nil") + return fmt.Errorf("unable to encode stickerSet#bcf4d158: field sticker_type is nil") } if err := s.StickerType.Encode(b); err != nil { - return fmt.Errorf("unable to encode stickerSet#133c3db9: field sticker_type: %w", err) + return fmt.Errorf("unable to encode stickerSet#bcf4d158: field sticker_type: %w", err) } b.PutBool(s.NeedsRepainting) b.PutBool(s.IsAllowedAsChatEmojiStatus) @@ -279,13 +274,13 @@ func (s *StickerSet) EncodeBare(b *bin.Buffer) error { b.PutInt(len(s.Stickers)) for idx, v := range s.Stickers { if err := v.EncodeBare(b); err != nil { - return fmt.Errorf("unable to encode bare stickerSet#133c3db9: field stickers element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode bare stickerSet#bcf4d158: field stickers element with index %d: %w", idx, err) } } b.PutInt(len(s.Emojis)) for idx, v := range s.Emojis { if err := v.EncodeBare(b); err != nil { - return fmt.Errorf("unable to encode bare stickerSet#133c3db9: field emojis element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode bare stickerSet#bcf4d158: field emojis element with index %d: %w", idx, err) } } return nil @@ -294,10 +289,10 @@ func (s *StickerSet) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (s *StickerSet) Decode(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't decode stickerSet#133c3db9 to nil") + return fmt.Errorf("can't decode stickerSet#bcf4d158 to nil") } if err := b.ConsumeID(StickerSetTypeID); err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: %w", err) } return s.DecodeBare(b) } @@ -305,38 +300,38 @@ func (s *StickerSet) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (s *StickerSet) DecodeBare(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't decode stickerSet#133c3db9 to nil") + return fmt.Errorf("can't decode stickerSet#bcf4d158 to nil") } { value, err := b.Long() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field id: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field id: %w", err) } s.ID = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field title: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field title: %w", err) } s.Title = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field name: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field name: %w", err) } s.Name = value } { if err := s.Thumbnail.Decode(b); err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field thumbnail: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field thumbnail: %w", err) } } { headerLen, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field thumbnail_outline: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field thumbnail_outline: %w", err) } if headerLen > 0 { @@ -345,7 +340,7 @@ func (s *StickerSet) DecodeBare(b *bin.Buffer) error { for idx := 0; idx < headerLen; idx++ { var value ClosedVectorPath if err := value.DecodeBare(b); err != nil { - return fmt.Errorf("unable to decode bare stickerSet#133c3db9: field thumbnail_outline: %w", err) + return fmt.Errorf("unable to decode bare stickerSet#bcf4d158: field thumbnail_outline: %w", err) } s.ThumbnailOutline = append(s.ThumbnailOutline, value) } @@ -353,63 +348,63 @@ func (s *StickerSet) DecodeBare(b *bin.Buffer) error { { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field is_installed: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field is_owned: %w", err) } - s.IsInstalled = value + s.IsOwned = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field is_archived: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field is_installed: %w", err) } - s.IsArchived = value + s.IsInstalled = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field is_official: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field is_archived: %w", err) } - s.IsOfficial = value + s.IsArchived = value } { - value, err := DecodeStickerFormat(b) + value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field sticker_format: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field is_official: %w", err) } - s.StickerFormat = value + s.IsOfficial = value } { value, err := DecodeStickerType(b) if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field sticker_type: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field sticker_type: %w", err) } s.StickerType = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field needs_repainting: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field needs_repainting: %w", err) } s.NeedsRepainting = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field is_allowed_as_chat_emoji_status: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field is_allowed_as_chat_emoji_status: %w", err) } s.IsAllowedAsChatEmojiStatus = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field is_viewed: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field is_viewed: %w", err) } s.IsViewed = value } { headerLen, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field stickers: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field stickers: %w", err) } if headerLen > 0 { @@ -418,7 +413,7 @@ func (s *StickerSet) DecodeBare(b *bin.Buffer) error { for idx := 0; idx < headerLen; idx++ { var value Sticker if err := value.DecodeBare(b); err != nil { - return fmt.Errorf("unable to decode bare stickerSet#133c3db9: field stickers: %w", err) + return fmt.Errorf("unable to decode bare stickerSet#bcf4d158: field stickers: %w", err) } s.Stickers = append(s.Stickers, value) } @@ -426,7 +421,7 @@ func (s *StickerSet) DecodeBare(b *bin.Buffer) error { { headerLen, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field emojis: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field emojis: %w", err) } if headerLen > 0 { @@ -435,7 +430,7 @@ func (s *StickerSet) DecodeBare(b *bin.Buffer) error { for idx := 0; idx < headerLen; idx++ { var value Emojis if err := value.DecodeBare(b); err != nil { - return fmt.Errorf("unable to decode bare stickerSet#133c3db9: field emojis: %w", err) + return fmt.Errorf("unable to decode bare stickerSet#bcf4d158: field emojis: %w", err) } s.Emojis = append(s.Emojis, value) } @@ -446,7 +441,7 @@ func (s *StickerSet) DecodeBare(b *bin.Buffer) error { // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (s *StickerSet) EncodeTDLibJSON(b tdjson.Encoder) error { if s == nil { - return fmt.Errorf("can't encode stickerSet#133c3db9 as nil") + return fmt.Errorf("can't encode stickerSet#bcf4d158 as nil") } b.ObjStart() b.PutID("stickerSet") @@ -462,20 +457,23 @@ func (s *StickerSet) EncodeTDLibJSON(b tdjson.Encoder) error { b.Comma() b.FieldStart("thumbnail") if err := s.Thumbnail.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode stickerSet#133c3db9: field thumbnail: %w", err) + return fmt.Errorf("unable to encode stickerSet#bcf4d158: field thumbnail: %w", err) } b.Comma() b.FieldStart("thumbnail_outline") b.ArrStart() for idx, v := range s.ThumbnailOutline { if err := v.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode stickerSet#133c3db9: field thumbnail_outline element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode stickerSet#bcf4d158: field thumbnail_outline element with index %d: %w", idx, err) } b.Comma() } b.StripComma() b.ArrEnd() b.Comma() + b.FieldStart("is_owned") + b.PutBool(s.IsOwned) + b.Comma() b.FieldStart("is_installed") b.PutBool(s.IsInstalled) b.Comma() @@ -485,20 +483,12 @@ func (s *StickerSet) EncodeTDLibJSON(b tdjson.Encoder) error { b.FieldStart("is_official") b.PutBool(s.IsOfficial) b.Comma() - b.FieldStart("sticker_format") - if s.StickerFormat == nil { - return fmt.Errorf("unable to encode stickerSet#133c3db9: field sticker_format is nil") - } - if err := s.StickerFormat.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode stickerSet#133c3db9: field sticker_format: %w", err) - } - b.Comma() b.FieldStart("sticker_type") if s.StickerType == nil { - return fmt.Errorf("unable to encode stickerSet#133c3db9: field sticker_type is nil") + return fmt.Errorf("unable to encode stickerSet#bcf4d158: field sticker_type is nil") } if err := s.StickerType.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode stickerSet#133c3db9: field sticker_type: %w", err) + return fmt.Errorf("unable to encode stickerSet#bcf4d158: field sticker_type: %w", err) } b.Comma() b.FieldStart("needs_repainting") @@ -514,7 +504,7 @@ func (s *StickerSet) EncodeTDLibJSON(b tdjson.Encoder) error { b.ArrStart() for idx, v := range s.Stickers { if err := v.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode stickerSet#133c3db9: field stickers element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode stickerSet#bcf4d158: field stickers element with index %d: %w", idx, err) } b.Comma() } @@ -525,7 +515,7 @@ func (s *StickerSet) EncodeTDLibJSON(b tdjson.Encoder) error { b.ArrStart() for idx, v := range s.Emojis { if err := v.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode stickerSet#133c3db9: field emojis element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode stickerSet#bcf4d158: field emojis element with index %d: %w", idx, err) } b.Comma() } @@ -540,117 +530,117 @@ func (s *StickerSet) EncodeTDLibJSON(b tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (s *StickerSet) DecodeTDLibJSON(b tdjson.Decoder) error { if s == nil { - return fmt.Errorf("can't decode stickerSet#133c3db9 to nil") + return fmt.Errorf("can't decode stickerSet#bcf4d158 to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("stickerSet"); err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: %w", err) } case "id": value, err := b.Long() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field id: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field id: %w", err) } s.ID = value case "title": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field title: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field title: %w", err) } s.Title = value case "name": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field name: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field name: %w", err) } s.Name = value case "thumbnail": if err := s.Thumbnail.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field thumbnail: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field thumbnail: %w", err) } case "thumbnail_outline": if err := b.Arr(func(b tdjson.Decoder) error { var value ClosedVectorPath if err := value.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field thumbnail_outline: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field thumbnail_outline: %w", err) } s.ThumbnailOutline = append(s.ThumbnailOutline, value) return nil }); err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field thumbnail_outline: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field thumbnail_outline: %w", err) } + case "is_owned": + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field is_owned: %w", err) + } + s.IsOwned = value case "is_installed": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field is_installed: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field is_installed: %w", err) } s.IsInstalled = value case "is_archived": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field is_archived: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field is_archived: %w", err) } s.IsArchived = value case "is_official": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field is_official: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field is_official: %w", err) } s.IsOfficial = value - case "sticker_format": - value, err := DecodeTDLibJSONStickerFormat(b) - if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field sticker_format: %w", err) - } - s.StickerFormat = value case "sticker_type": value, err := DecodeTDLibJSONStickerType(b) if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field sticker_type: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field sticker_type: %w", err) } s.StickerType = value case "needs_repainting": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field needs_repainting: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field needs_repainting: %w", err) } s.NeedsRepainting = value case "is_allowed_as_chat_emoji_status": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field is_allowed_as_chat_emoji_status: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field is_allowed_as_chat_emoji_status: %w", err) } s.IsAllowedAsChatEmojiStatus = value case "is_viewed": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field is_viewed: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field is_viewed: %w", err) } s.IsViewed = value case "stickers": if err := b.Arr(func(b tdjson.Decoder) error { var value Sticker if err := value.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field stickers: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field stickers: %w", err) } s.Stickers = append(s.Stickers, value) return nil }); err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field stickers: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field stickers: %w", err) } case "emojis": if err := b.Arr(func(b tdjson.Decoder) error { var value Emojis if err := value.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field emojis: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field emojis: %w", err) } s.Emojis = append(s.Emojis, value) return nil }); err != nil { - return fmt.Errorf("unable to decode stickerSet#133c3db9: field emojis: %w", err) + return fmt.Errorf("unable to decode stickerSet#bcf4d158: field emojis: %w", err) } default: return b.Skip() @@ -699,6 +689,14 @@ func (s *StickerSet) GetThumbnailOutline() (value []ClosedVectorPath) { return s.ThumbnailOutline } +// GetIsOwned returns value of IsOwned field. +func (s *StickerSet) GetIsOwned() (value bool) { + if s == nil { + return + } + return s.IsOwned +} + // GetIsInstalled returns value of IsInstalled field. func (s *StickerSet) GetIsInstalled() (value bool) { if s == nil { @@ -723,14 +721,6 @@ func (s *StickerSet) GetIsOfficial() (value bool) { return s.IsOfficial } -// GetStickerFormat returns value of StickerFormat field. -func (s *StickerSet) GetStickerFormat() (value StickerFormatClass) { - if s == nil { - return - } - return s.StickerFormat -} - // GetStickerType returns value of StickerType field. func (s *StickerSet) GetStickerType() (value StickerTypeClass) { if s == nil { diff --git a/tdapi/tl_sticker_set_info_gen.go b/tdapi/tl_sticker_set_info_gen.go index 9085368c53..444fb7809c 100644 --- a/tdapi/tl_sticker_set_info_gen.go +++ b/tdapi/tl_sticker_set_info_gen.go @@ -31,7 +31,7 @@ var ( _ = tdjson.Encoder{} ) -// StickerSetInfo represents TL type `stickerSetInfo#fb991fda`. +// StickerSetInfo represents TL type `stickerSetInfo#3cd2cd82`. type StickerSetInfo struct { // Identifier of the sticker set ID int64 @@ -45,6 +45,8 @@ type StickerSetInfo struct { // Sticker set thumbnail's outline represented as a list of closed vector paths; may be // empty. The coordinate system origin is in the upper-left corner ThumbnailOutline []ClosedVectorPath + // True, if the sticker set is owned by the current user + IsOwned bool // True, if the sticker set has been installed by the current user IsInstalled bool // True, if the sticker set has been archived. A sticker set can't be installed and @@ -52,8 +54,6 @@ type StickerSetInfo struct { IsArchived bool // True, if the sticker set is official IsOfficial bool - // Format of the stickers in the set - StickerFormat StickerFormatClass // Type of the stickers in the set StickerType StickerTypeClass // True, if stickers in the sticker set are custom emoji that must be repainted; for @@ -72,7 +72,7 @@ type StickerSetInfo struct { } // StickerSetInfoTypeID is TL type id of StickerSetInfo. -const StickerSetInfoTypeID = 0xfb991fda +const StickerSetInfoTypeID = 0x3cd2cd82 // Ensuring interfaces in compile-time for StickerSetInfo. var ( @@ -101,6 +101,9 @@ func (s *StickerSetInfo) Zero() bool { if !(s.ThumbnailOutline == nil) { return false } + if !(s.IsOwned == false) { + return false + } if !(s.IsInstalled == false) { return false } @@ -110,9 +113,6 @@ func (s *StickerSetInfo) Zero() bool { if !(s.IsOfficial == false) { return false } - if !(s.StickerFormat == nil) { - return false - } if !(s.StickerType == nil) { return false } @@ -187,6 +187,10 @@ func (s *StickerSetInfo) TypeInfo() tdp.Type { Name: "ThumbnailOutline", SchemaName: "thumbnail_outline", }, + { + Name: "IsOwned", + SchemaName: "is_owned", + }, { Name: "IsInstalled", SchemaName: "is_installed", @@ -199,10 +203,6 @@ func (s *StickerSetInfo) TypeInfo() tdp.Type { Name: "IsOfficial", SchemaName: "is_official", }, - { - Name: "StickerFormat", - SchemaName: "sticker_format", - }, { Name: "StickerType", SchemaName: "sticker_type", @@ -234,7 +234,7 @@ func (s *StickerSetInfo) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (s *StickerSetInfo) Encode(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't encode stickerSetInfo#fb991fda as nil") + return fmt.Errorf("can't encode stickerSetInfo#3cd2cd82 as nil") } b.PutID(StickerSetInfoTypeID) return s.EncodeBare(b) @@ -243,34 +243,29 @@ func (s *StickerSetInfo) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (s *StickerSetInfo) EncodeBare(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't encode stickerSetInfo#fb991fda as nil") + return fmt.Errorf("can't encode stickerSetInfo#3cd2cd82 as nil") } b.PutLong(s.ID) b.PutString(s.Title) b.PutString(s.Name) if err := s.Thumbnail.Encode(b); err != nil { - return fmt.Errorf("unable to encode stickerSetInfo#fb991fda: field thumbnail: %w", err) + return fmt.Errorf("unable to encode stickerSetInfo#3cd2cd82: field thumbnail: %w", err) } b.PutInt(len(s.ThumbnailOutline)) for idx, v := range s.ThumbnailOutline { if err := v.EncodeBare(b); err != nil { - return fmt.Errorf("unable to encode bare stickerSetInfo#fb991fda: field thumbnail_outline element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode bare stickerSetInfo#3cd2cd82: field thumbnail_outline element with index %d: %w", idx, err) } } + b.PutBool(s.IsOwned) b.PutBool(s.IsInstalled) b.PutBool(s.IsArchived) b.PutBool(s.IsOfficial) - if s.StickerFormat == nil { - return fmt.Errorf("unable to encode stickerSetInfo#fb991fda: field sticker_format is nil") - } - if err := s.StickerFormat.Encode(b); err != nil { - return fmt.Errorf("unable to encode stickerSetInfo#fb991fda: field sticker_format: %w", err) - } if s.StickerType == nil { - return fmt.Errorf("unable to encode stickerSetInfo#fb991fda: field sticker_type is nil") + return fmt.Errorf("unable to encode stickerSetInfo#3cd2cd82: field sticker_type is nil") } if err := s.StickerType.Encode(b); err != nil { - return fmt.Errorf("unable to encode stickerSetInfo#fb991fda: field sticker_type: %w", err) + return fmt.Errorf("unable to encode stickerSetInfo#3cd2cd82: field sticker_type: %w", err) } b.PutBool(s.NeedsRepainting) b.PutBool(s.IsAllowedAsChatEmojiStatus) @@ -279,7 +274,7 @@ func (s *StickerSetInfo) EncodeBare(b *bin.Buffer) error { b.PutInt(len(s.Covers)) for idx, v := range s.Covers { if err := v.EncodeBare(b); err != nil { - return fmt.Errorf("unable to encode bare stickerSetInfo#fb991fda: field covers element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode bare stickerSetInfo#3cd2cd82: field covers element with index %d: %w", idx, err) } } return nil @@ -288,10 +283,10 @@ func (s *StickerSetInfo) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (s *StickerSetInfo) Decode(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't decode stickerSetInfo#fb991fda to nil") + return fmt.Errorf("can't decode stickerSetInfo#3cd2cd82 to nil") } if err := b.ConsumeID(StickerSetInfoTypeID); err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: %w", err) } return s.DecodeBare(b) } @@ -299,38 +294,38 @@ func (s *StickerSetInfo) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (s *StickerSetInfo) DecodeBare(b *bin.Buffer) error { if s == nil { - return fmt.Errorf("can't decode stickerSetInfo#fb991fda to nil") + return fmt.Errorf("can't decode stickerSetInfo#3cd2cd82 to nil") } { value, err := b.Long() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field id: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field id: %w", err) } s.ID = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field title: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field title: %w", err) } s.Title = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field name: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field name: %w", err) } s.Name = value } { if err := s.Thumbnail.Decode(b); err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field thumbnail: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field thumbnail: %w", err) } } { headerLen, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field thumbnail_outline: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field thumbnail_outline: %w", err) } if headerLen > 0 { @@ -339,7 +334,7 @@ func (s *StickerSetInfo) DecodeBare(b *bin.Buffer) error { for idx := 0; idx < headerLen; idx++ { var value ClosedVectorPath if err := value.DecodeBare(b); err != nil { - return fmt.Errorf("unable to decode bare stickerSetInfo#fb991fda: field thumbnail_outline: %w", err) + return fmt.Errorf("unable to decode bare stickerSetInfo#3cd2cd82: field thumbnail_outline: %w", err) } s.ThumbnailOutline = append(s.ThumbnailOutline, value) } @@ -347,70 +342,70 @@ func (s *StickerSetInfo) DecodeBare(b *bin.Buffer) error { { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field is_installed: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field is_owned: %w", err) } - s.IsInstalled = value + s.IsOwned = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field is_archived: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field is_installed: %w", err) } - s.IsArchived = value + s.IsInstalled = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field is_official: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field is_archived: %w", err) } - s.IsOfficial = value + s.IsArchived = value } { - value, err := DecodeStickerFormat(b) + value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field sticker_format: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field is_official: %w", err) } - s.StickerFormat = value + s.IsOfficial = value } { value, err := DecodeStickerType(b) if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field sticker_type: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field sticker_type: %w", err) } s.StickerType = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field needs_repainting: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field needs_repainting: %w", err) } s.NeedsRepainting = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field is_allowed_as_chat_emoji_status: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field is_allowed_as_chat_emoji_status: %w", err) } s.IsAllowedAsChatEmojiStatus = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field is_viewed: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field is_viewed: %w", err) } s.IsViewed = value } { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field size: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field size: %w", err) } s.Size = value } { headerLen, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field covers: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field covers: %w", err) } if headerLen > 0 { @@ -419,7 +414,7 @@ func (s *StickerSetInfo) DecodeBare(b *bin.Buffer) error { for idx := 0; idx < headerLen; idx++ { var value Sticker if err := value.DecodeBare(b); err != nil { - return fmt.Errorf("unable to decode bare stickerSetInfo#fb991fda: field covers: %w", err) + return fmt.Errorf("unable to decode bare stickerSetInfo#3cd2cd82: field covers: %w", err) } s.Covers = append(s.Covers, value) } @@ -430,7 +425,7 @@ func (s *StickerSetInfo) DecodeBare(b *bin.Buffer) error { // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (s *StickerSetInfo) EncodeTDLibJSON(b tdjson.Encoder) error { if s == nil { - return fmt.Errorf("can't encode stickerSetInfo#fb991fda as nil") + return fmt.Errorf("can't encode stickerSetInfo#3cd2cd82 as nil") } b.ObjStart() b.PutID("stickerSetInfo") @@ -446,20 +441,23 @@ func (s *StickerSetInfo) EncodeTDLibJSON(b tdjson.Encoder) error { b.Comma() b.FieldStart("thumbnail") if err := s.Thumbnail.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode stickerSetInfo#fb991fda: field thumbnail: %w", err) + return fmt.Errorf("unable to encode stickerSetInfo#3cd2cd82: field thumbnail: %w", err) } b.Comma() b.FieldStart("thumbnail_outline") b.ArrStart() for idx, v := range s.ThumbnailOutline { if err := v.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode stickerSetInfo#fb991fda: field thumbnail_outline element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode stickerSetInfo#3cd2cd82: field thumbnail_outline element with index %d: %w", idx, err) } b.Comma() } b.StripComma() b.ArrEnd() b.Comma() + b.FieldStart("is_owned") + b.PutBool(s.IsOwned) + b.Comma() b.FieldStart("is_installed") b.PutBool(s.IsInstalled) b.Comma() @@ -469,20 +467,12 @@ func (s *StickerSetInfo) EncodeTDLibJSON(b tdjson.Encoder) error { b.FieldStart("is_official") b.PutBool(s.IsOfficial) b.Comma() - b.FieldStart("sticker_format") - if s.StickerFormat == nil { - return fmt.Errorf("unable to encode stickerSetInfo#fb991fda: field sticker_format is nil") - } - if err := s.StickerFormat.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode stickerSetInfo#fb991fda: field sticker_format: %w", err) - } - b.Comma() b.FieldStart("sticker_type") if s.StickerType == nil { - return fmt.Errorf("unable to encode stickerSetInfo#fb991fda: field sticker_type is nil") + return fmt.Errorf("unable to encode stickerSetInfo#3cd2cd82: field sticker_type is nil") } if err := s.StickerType.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode stickerSetInfo#fb991fda: field sticker_type: %w", err) + return fmt.Errorf("unable to encode stickerSetInfo#3cd2cd82: field sticker_type: %w", err) } b.Comma() b.FieldStart("needs_repainting") @@ -501,7 +491,7 @@ func (s *StickerSetInfo) EncodeTDLibJSON(b tdjson.Encoder) error { b.ArrStart() for idx, v := range s.Covers { if err := v.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode stickerSetInfo#fb991fda: field covers element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode stickerSetInfo#3cd2cd82: field covers element with index %d: %w", idx, err) } b.Comma() } @@ -516,112 +506,112 @@ func (s *StickerSetInfo) EncodeTDLibJSON(b tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (s *StickerSetInfo) DecodeTDLibJSON(b tdjson.Decoder) error { if s == nil { - return fmt.Errorf("can't decode stickerSetInfo#fb991fda to nil") + return fmt.Errorf("can't decode stickerSetInfo#3cd2cd82 to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("stickerSetInfo"); err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: %w", err) } case "id": value, err := b.Long() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field id: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field id: %w", err) } s.ID = value case "title": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field title: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field title: %w", err) } s.Title = value case "name": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field name: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field name: %w", err) } s.Name = value case "thumbnail": if err := s.Thumbnail.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field thumbnail: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field thumbnail: %w", err) } case "thumbnail_outline": if err := b.Arr(func(b tdjson.Decoder) error { var value ClosedVectorPath if err := value.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field thumbnail_outline: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field thumbnail_outline: %w", err) } s.ThumbnailOutline = append(s.ThumbnailOutline, value) return nil }); err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field thumbnail_outline: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field thumbnail_outline: %w", err) } + case "is_owned": + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field is_owned: %w", err) + } + s.IsOwned = value case "is_installed": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field is_installed: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field is_installed: %w", err) } s.IsInstalled = value case "is_archived": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field is_archived: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field is_archived: %w", err) } s.IsArchived = value case "is_official": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field is_official: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field is_official: %w", err) } s.IsOfficial = value - case "sticker_format": - value, err := DecodeTDLibJSONStickerFormat(b) - if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field sticker_format: %w", err) - } - s.StickerFormat = value case "sticker_type": value, err := DecodeTDLibJSONStickerType(b) if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field sticker_type: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field sticker_type: %w", err) } s.StickerType = value case "needs_repainting": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field needs_repainting: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field needs_repainting: %w", err) } s.NeedsRepainting = value case "is_allowed_as_chat_emoji_status": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field is_allowed_as_chat_emoji_status: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field is_allowed_as_chat_emoji_status: %w", err) } s.IsAllowedAsChatEmojiStatus = value case "is_viewed": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field is_viewed: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field is_viewed: %w", err) } s.IsViewed = value case "size": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field size: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field size: %w", err) } s.Size = value case "covers": if err := b.Arr(func(b tdjson.Decoder) error { var value Sticker if err := value.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field covers: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field covers: %w", err) } s.Covers = append(s.Covers, value) return nil }); err != nil { - return fmt.Errorf("unable to decode stickerSetInfo#fb991fda: field covers: %w", err) + return fmt.Errorf("unable to decode stickerSetInfo#3cd2cd82: field covers: %w", err) } default: return b.Skip() @@ -670,6 +660,14 @@ func (s *StickerSetInfo) GetThumbnailOutline() (value []ClosedVectorPath) { return s.ThumbnailOutline } +// GetIsOwned returns value of IsOwned field. +func (s *StickerSetInfo) GetIsOwned() (value bool) { + if s == nil { + return + } + return s.IsOwned +} + // GetIsInstalled returns value of IsInstalled field. func (s *StickerSetInfo) GetIsInstalled() (value bool) { if s == nil { @@ -694,14 +692,6 @@ func (s *StickerSetInfo) GetIsOfficial() (value bool) { return s.IsOfficial } -// GetStickerFormat returns value of StickerFormat field. -func (s *StickerSetInfo) GetStickerFormat() (value StickerFormatClass) { - if s == nil { - return - } - return s.StickerFormat -} - // GetStickerType returns value of StickerType field. func (s *StickerSetInfo) GetStickerType() (value StickerTypeClass) { if s == nil { diff --git a/tdapi/tl_suggested_action_gen.go b/tdapi/tl_suggested_action_gen.go index deee9c1e91..5bd26d6e58 100644 --- a/tdapi/tl_suggested_action_gen.go +++ b/tdapi/tl_suggested_action_gen.go @@ -1412,6 +1412,137 @@ func (s *SuggestedActionGiftPremiumForChristmas) DecodeTDLibJSON(b tdjson.Decode }) } +// SuggestedActionSetBirthdate represents TL type `suggestedActionSetBirthdate#eabd9b02`. +type SuggestedActionSetBirthdate struct { +} + +// SuggestedActionSetBirthdateTypeID is TL type id of SuggestedActionSetBirthdate. +const SuggestedActionSetBirthdateTypeID = 0xeabd9b02 + +// construct implements constructor of SuggestedActionClass. +func (s SuggestedActionSetBirthdate) construct() SuggestedActionClass { return &s } + +// Ensuring interfaces in compile-time for SuggestedActionSetBirthdate. +var ( + _ bin.Encoder = &SuggestedActionSetBirthdate{} + _ bin.Decoder = &SuggestedActionSetBirthdate{} + _ bin.BareEncoder = &SuggestedActionSetBirthdate{} + _ bin.BareDecoder = &SuggestedActionSetBirthdate{} + + _ SuggestedActionClass = &SuggestedActionSetBirthdate{} +) + +func (s *SuggestedActionSetBirthdate) Zero() bool { + if s == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (s *SuggestedActionSetBirthdate) String() string { + if s == nil { + return "SuggestedActionSetBirthdate(nil)" + } + type Alias SuggestedActionSetBirthdate + return fmt.Sprintf("SuggestedActionSetBirthdate%+v", Alias(*s)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*SuggestedActionSetBirthdate) TypeID() uint32 { + return SuggestedActionSetBirthdateTypeID +} + +// TypeName returns name of type in TL schema. +func (*SuggestedActionSetBirthdate) TypeName() string { + return "suggestedActionSetBirthdate" +} + +// TypeInfo returns info about TL type. +func (s *SuggestedActionSetBirthdate) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "suggestedActionSetBirthdate", + ID: SuggestedActionSetBirthdateTypeID, + } + if s == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (s *SuggestedActionSetBirthdate) Encode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode suggestedActionSetBirthdate#eabd9b02 as nil") + } + b.PutID(SuggestedActionSetBirthdateTypeID) + return s.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (s *SuggestedActionSetBirthdate) EncodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't encode suggestedActionSetBirthdate#eabd9b02 as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (s *SuggestedActionSetBirthdate) Decode(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode suggestedActionSetBirthdate#eabd9b02 to nil") + } + if err := b.ConsumeID(SuggestedActionSetBirthdateTypeID); err != nil { + return fmt.Errorf("unable to decode suggestedActionSetBirthdate#eabd9b02: %w", err) + } + return s.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (s *SuggestedActionSetBirthdate) DecodeBare(b *bin.Buffer) error { + if s == nil { + return fmt.Errorf("can't decode suggestedActionSetBirthdate#eabd9b02 to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (s *SuggestedActionSetBirthdate) EncodeTDLibJSON(b tdjson.Encoder) error { + if s == nil { + return fmt.Errorf("can't encode suggestedActionSetBirthdate#eabd9b02 as nil") + } + b.ObjStart() + b.PutID("suggestedActionSetBirthdate") + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (s *SuggestedActionSetBirthdate) DecodeTDLibJSON(b tdjson.Decoder) error { + if s == nil { + return fmt.Errorf("can't decode suggestedActionSetBirthdate#eabd9b02 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("suggestedActionSetBirthdate"); err != nil { + return fmt.Errorf("unable to decode suggestedActionSetBirthdate#eabd9b02: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + // SuggestedActionClassName is schema name of SuggestedActionClass. const SuggestedActionClassName = "SuggestedAction" @@ -1434,6 +1565,7 @@ const SuggestedActionClassName = "SuggestedAction" // case *tdapi.SuggestedActionRestorePremium: // suggestedActionRestorePremium#e909dd64 // case *tdapi.SuggestedActionSubscribeToAnnualPremium: // suggestedActionSubscribeToAnnualPremium#164978bb // case *tdapi.SuggestedActionGiftPremiumForChristmas: // suggestedActionGiftPremiumForChristmas#93b3ee6f +// case *tdapi.SuggestedActionSetBirthdate: // suggestedActionSetBirthdate#eabd9b02 // default: panic(v) // } type SuggestedActionClass interface { @@ -1535,6 +1667,13 @@ func DecodeSuggestedAction(buf *bin.Buffer) (SuggestedActionClass, error) { return nil, fmt.Errorf("unable to decode SuggestedActionClass: %w", err) } return &v, nil + case SuggestedActionSetBirthdateTypeID: + // Decoding suggestedActionSetBirthdate#eabd9b02. + v := SuggestedActionSetBirthdate{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode SuggestedActionClass: %w", err) + } + return &v, nil default: return nil, fmt.Errorf("unable to decode SuggestedActionClass: %w", bin.NewUnexpectedID(id)) } @@ -1617,6 +1756,13 @@ func DecodeTDLibJSONSuggestedAction(buf tdjson.Decoder) (SuggestedActionClass, e return nil, fmt.Errorf("unable to decode SuggestedActionClass: %w", err) } return &v, nil + case "suggestedActionSetBirthdate": + // Decoding suggestedActionSetBirthdate#eabd9b02. + v := SuggestedActionSetBirthdate{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode SuggestedActionClass: %w", err) + } + return &v, nil default: return nil, fmt.Errorf("unable to decode SuggestedActionClass: %w", tdjson.NewUnexpectedID(id)) } diff --git a/tdapi/tl_update_gen.go b/tdapi/tl_update_gen.go index c10453478a..92a288a469 100644 --- a/tdapi/tl_update_gen.go +++ b/tdapi/tl_update_gen.go @@ -23772,7 +23772,7 @@ func (u *UpdateSavedMessagesTags) GetTags() (value SavedMessagesTags) { // UpdateSpeechRecognitionTrial represents TL type `updateSpeechRecognitionTrial#ff4efcc1`. type UpdateSpeechRecognitionTrial struct { // The maximum allowed duration of media for speech recognition without Telegram Premium - // subscription + // subscription, in seconds MaxMediaDuration int32 // The total number of allowed speech recognitions per week; 0 if none WeeklyCount int32 @@ -24955,6 +24955,200 @@ func (u *UpdateSuggestedActions) GetRemovedActions() (value []SuggestedActionCla return u.RemovedActions } +// UpdateContactCloseBirthdays represents TL type `updateContactCloseBirthdays#c88b98ce`. +type UpdateContactCloseBirthdays struct { + // List of contact users with close birthday + CloseBirthdayUsers []CloseBirthdayUser +} + +// UpdateContactCloseBirthdaysTypeID is TL type id of UpdateContactCloseBirthdays. +const UpdateContactCloseBirthdaysTypeID = 0xc88b98ce + +// construct implements constructor of UpdateClass. +func (u UpdateContactCloseBirthdays) construct() UpdateClass { return &u } + +// Ensuring interfaces in compile-time for UpdateContactCloseBirthdays. +var ( + _ bin.Encoder = &UpdateContactCloseBirthdays{} + _ bin.Decoder = &UpdateContactCloseBirthdays{} + _ bin.BareEncoder = &UpdateContactCloseBirthdays{} + _ bin.BareDecoder = &UpdateContactCloseBirthdays{} + + _ UpdateClass = &UpdateContactCloseBirthdays{} +) + +func (u *UpdateContactCloseBirthdays) Zero() bool { + if u == nil { + return true + } + if !(u.CloseBirthdayUsers == nil) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (u *UpdateContactCloseBirthdays) String() string { + if u == nil { + return "UpdateContactCloseBirthdays(nil)" + } + type Alias UpdateContactCloseBirthdays + return fmt.Sprintf("UpdateContactCloseBirthdays%+v", Alias(*u)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*UpdateContactCloseBirthdays) TypeID() uint32 { + return UpdateContactCloseBirthdaysTypeID +} + +// TypeName returns name of type in TL schema. +func (*UpdateContactCloseBirthdays) TypeName() string { + return "updateContactCloseBirthdays" +} + +// TypeInfo returns info about TL type. +func (u *UpdateContactCloseBirthdays) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "updateContactCloseBirthdays", + ID: UpdateContactCloseBirthdaysTypeID, + } + if u == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "CloseBirthdayUsers", + SchemaName: "close_birthday_users", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (u *UpdateContactCloseBirthdays) Encode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode updateContactCloseBirthdays#c88b98ce as nil") + } + b.PutID(UpdateContactCloseBirthdaysTypeID) + return u.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (u *UpdateContactCloseBirthdays) EncodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode updateContactCloseBirthdays#c88b98ce as nil") + } + b.PutInt(len(u.CloseBirthdayUsers)) + for idx, v := range u.CloseBirthdayUsers { + if err := v.EncodeBare(b); err != nil { + return fmt.Errorf("unable to encode bare updateContactCloseBirthdays#c88b98ce: field close_birthday_users element with index %d: %w", idx, err) + } + } + return nil +} + +// Decode implements bin.Decoder. +func (u *UpdateContactCloseBirthdays) Decode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode updateContactCloseBirthdays#c88b98ce to nil") + } + if err := b.ConsumeID(UpdateContactCloseBirthdaysTypeID); err != nil { + return fmt.Errorf("unable to decode updateContactCloseBirthdays#c88b98ce: %w", err) + } + return u.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (u *UpdateContactCloseBirthdays) DecodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode updateContactCloseBirthdays#c88b98ce to nil") + } + { + headerLen, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode updateContactCloseBirthdays#c88b98ce: field close_birthday_users: %w", err) + } + + if headerLen > 0 { + u.CloseBirthdayUsers = make([]CloseBirthdayUser, 0, headerLen%bin.PreallocateLimit) + } + for idx := 0; idx < headerLen; idx++ { + var value CloseBirthdayUser + if err := value.DecodeBare(b); err != nil { + return fmt.Errorf("unable to decode bare updateContactCloseBirthdays#c88b98ce: field close_birthday_users: %w", err) + } + u.CloseBirthdayUsers = append(u.CloseBirthdayUsers, value) + } + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (u *UpdateContactCloseBirthdays) EncodeTDLibJSON(b tdjson.Encoder) error { + if u == nil { + return fmt.Errorf("can't encode updateContactCloseBirthdays#c88b98ce as nil") + } + b.ObjStart() + b.PutID("updateContactCloseBirthdays") + b.Comma() + b.FieldStart("close_birthday_users") + b.ArrStart() + for idx, v := range u.CloseBirthdayUsers { + if err := v.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode updateContactCloseBirthdays#c88b98ce: field close_birthday_users element with index %d: %w", idx, err) + } + b.Comma() + } + b.StripComma() + b.ArrEnd() + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (u *UpdateContactCloseBirthdays) DecodeTDLibJSON(b tdjson.Decoder) error { + if u == nil { + return fmt.Errorf("can't decode updateContactCloseBirthdays#c88b98ce to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("updateContactCloseBirthdays"); err != nil { + return fmt.Errorf("unable to decode updateContactCloseBirthdays#c88b98ce: %w", err) + } + case "close_birthday_users": + if err := b.Arr(func(b tdjson.Decoder) error { + var value CloseBirthdayUser + if err := value.DecodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to decode updateContactCloseBirthdays#c88b98ce: field close_birthday_users: %w", err) + } + u.CloseBirthdayUsers = append(u.CloseBirthdayUsers, value) + return nil + }); err != nil { + return fmt.Errorf("unable to decode updateContactCloseBirthdays#c88b98ce: field close_birthday_users: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// GetCloseBirthdayUsers returns value of CloseBirthdayUsers field. +func (u *UpdateContactCloseBirthdays) GetCloseBirthdayUsers() (value []CloseBirthdayUser) { + if u == nil { + return + } + return u.CloseBirthdayUsers +} + // UpdateAddChatMembersPrivacyForbidden represents TL type `updateAddChatMembersPrivacyForbidden#b8b50363`. type UpdateAddChatMembersPrivacyForbidden struct { // Chat identifier @@ -25083,44 +25277,827 @@ func (u *UpdateAddChatMembersPrivacyForbidden) DecodeBare(b *bin.Buffer) error { u.ChatID = value } { - headerLen, err := b.Int() + headerLen, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode updateAddChatMembersPrivacyForbidden#b8b50363: field user_ids: %w", err) + } + + if headerLen > 0 { + u.UserIDs = make([]int64, 0, headerLen%bin.PreallocateLimit) + } + for idx := 0; idx < headerLen; idx++ { + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode updateAddChatMembersPrivacyForbidden#b8b50363: field user_ids: %w", err) + } + u.UserIDs = append(u.UserIDs, value) + } + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (u *UpdateAddChatMembersPrivacyForbidden) EncodeTDLibJSON(b tdjson.Encoder) error { + if u == nil { + return fmt.Errorf("can't encode updateAddChatMembersPrivacyForbidden#b8b50363 as nil") + } + b.ObjStart() + b.PutID("updateAddChatMembersPrivacyForbidden") + b.Comma() + b.FieldStart("chat_id") + b.PutInt53(u.ChatID) + b.Comma() + b.FieldStart("user_ids") + b.ArrStart() + for _, v := range u.UserIDs { + b.PutInt53(v) + b.Comma() + } + b.StripComma() + b.ArrEnd() + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (u *UpdateAddChatMembersPrivacyForbidden) DecodeTDLibJSON(b tdjson.Decoder) error { + if u == nil { + return fmt.Errorf("can't decode updateAddChatMembersPrivacyForbidden#b8b50363 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("updateAddChatMembersPrivacyForbidden"); err != nil { + return fmt.Errorf("unable to decode updateAddChatMembersPrivacyForbidden#b8b50363: %w", err) + } + case "chat_id": + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode updateAddChatMembersPrivacyForbidden#b8b50363: field chat_id: %w", err) + } + u.ChatID = value + case "user_ids": + if err := b.Arr(func(b tdjson.Decoder) error { + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode updateAddChatMembersPrivacyForbidden#b8b50363: field user_ids: %w", err) + } + u.UserIDs = append(u.UserIDs, value) + return nil + }); err != nil { + return fmt.Errorf("unable to decode updateAddChatMembersPrivacyForbidden#b8b50363: field user_ids: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// GetChatID returns value of ChatID field. +func (u *UpdateAddChatMembersPrivacyForbidden) GetChatID() (value int64) { + if u == nil { + return + } + return u.ChatID +} + +// GetUserIDs returns value of UserIDs field. +func (u *UpdateAddChatMembersPrivacyForbidden) GetUserIDs() (value []int64) { + if u == nil { + return + } + return u.UserIDs +} + +// UpdateAutosaveSettings represents TL type `updateAutosaveSettings#da274f0b`. +type UpdateAutosaveSettings struct { + // Type of chats for which autosave settings were updated + Scope AutosaveSettingsScopeClass + // The new autosave settings; may be null if the settings are reset to default + Settings ScopeAutosaveSettings +} + +// UpdateAutosaveSettingsTypeID is TL type id of UpdateAutosaveSettings. +const UpdateAutosaveSettingsTypeID = 0xda274f0b + +// construct implements constructor of UpdateClass. +func (u UpdateAutosaveSettings) construct() UpdateClass { return &u } + +// Ensuring interfaces in compile-time for UpdateAutosaveSettings. +var ( + _ bin.Encoder = &UpdateAutosaveSettings{} + _ bin.Decoder = &UpdateAutosaveSettings{} + _ bin.BareEncoder = &UpdateAutosaveSettings{} + _ bin.BareDecoder = &UpdateAutosaveSettings{} + + _ UpdateClass = &UpdateAutosaveSettings{} +) + +func (u *UpdateAutosaveSettings) Zero() bool { + if u == nil { + return true + } + if !(u.Scope == nil) { + return false + } + if !(u.Settings.Zero()) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (u *UpdateAutosaveSettings) String() string { + if u == nil { + return "UpdateAutosaveSettings(nil)" + } + type Alias UpdateAutosaveSettings + return fmt.Sprintf("UpdateAutosaveSettings%+v", Alias(*u)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*UpdateAutosaveSettings) TypeID() uint32 { + return UpdateAutosaveSettingsTypeID +} + +// TypeName returns name of type in TL schema. +func (*UpdateAutosaveSettings) TypeName() string { + return "updateAutosaveSettings" +} + +// TypeInfo returns info about TL type. +func (u *UpdateAutosaveSettings) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "updateAutosaveSettings", + ID: UpdateAutosaveSettingsTypeID, + } + if u == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Scope", + SchemaName: "scope", + }, + { + Name: "Settings", + SchemaName: "settings", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (u *UpdateAutosaveSettings) Encode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode updateAutosaveSettings#da274f0b as nil") + } + b.PutID(UpdateAutosaveSettingsTypeID) + return u.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (u *UpdateAutosaveSettings) EncodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode updateAutosaveSettings#da274f0b as nil") + } + if u.Scope == nil { + return fmt.Errorf("unable to encode updateAutosaveSettings#da274f0b: field scope is nil") + } + if err := u.Scope.Encode(b); err != nil { + return fmt.Errorf("unable to encode updateAutosaveSettings#da274f0b: field scope: %w", err) + } + if err := u.Settings.Encode(b); err != nil { + return fmt.Errorf("unable to encode updateAutosaveSettings#da274f0b: field settings: %w", err) + } + return nil +} + +// Decode implements bin.Decoder. +func (u *UpdateAutosaveSettings) Decode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode updateAutosaveSettings#da274f0b to nil") + } + if err := b.ConsumeID(UpdateAutosaveSettingsTypeID); err != nil { + return fmt.Errorf("unable to decode updateAutosaveSettings#da274f0b: %w", err) + } + return u.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (u *UpdateAutosaveSettings) DecodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode updateAutosaveSettings#da274f0b to nil") + } + { + value, err := DecodeAutosaveSettingsScope(b) + if err != nil { + return fmt.Errorf("unable to decode updateAutosaveSettings#da274f0b: field scope: %w", err) + } + u.Scope = value + } + { + if err := u.Settings.Decode(b); err != nil { + return fmt.Errorf("unable to decode updateAutosaveSettings#da274f0b: field settings: %w", err) + } + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (u *UpdateAutosaveSettings) EncodeTDLibJSON(b tdjson.Encoder) error { + if u == nil { + return fmt.Errorf("can't encode updateAutosaveSettings#da274f0b as nil") + } + b.ObjStart() + b.PutID("updateAutosaveSettings") + b.Comma() + b.FieldStart("scope") + if u.Scope == nil { + return fmt.Errorf("unable to encode updateAutosaveSettings#da274f0b: field scope is nil") + } + if err := u.Scope.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode updateAutosaveSettings#da274f0b: field scope: %w", err) + } + b.Comma() + b.FieldStart("settings") + if err := u.Settings.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode updateAutosaveSettings#da274f0b: field settings: %w", err) + } + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (u *UpdateAutosaveSettings) DecodeTDLibJSON(b tdjson.Decoder) error { + if u == nil { + return fmt.Errorf("can't decode updateAutosaveSettings#da274f0b to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("updateAutosaveSettings"); err != nil { + return fmt.Errorf("unable to decode updateAutosaveSettings#da274f0b: %w", err) + } + case "scope": + value, err := DecodeTDLibJSONAutosaveSettingsScope(b) + if err != nil { + return fmt.Errorf("unable to decode updateAutosaveSettings#da274f0b: field scope: %w", err) + } + u.Scope = value + case "settings": + if err := u.Settings.DecodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to decode updateAutosaveSettings#da274f0b: field settings: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// GetScope returns value of Scope field. +func (u *UpdateAutosaveSettings) GetScope() (value AutosaveSettingsScopeClass) { + if u == nil { + return + } + return u.Scope +} + +// GetSettings returns value of Settings field. +func (u *UpdateAutosaveSettings) GetSettings() (value ScopeAutosaveSettings) { + if u == nil { + return + } + return u.Settings +} + +// UpdateBusinessConnection represents TL type `updateBusinessConnection#8632f476`. +type UpdateBusinessConnection struct { + // New data about the connection + Connection BusinessConnection +} + +// UpdateBusinessConnectionTypeID is TL type id of UpdateBusinessConnection. +const UpdateBusinessConnectionTypeID = 0x8632f476 + +// construct implements constructor of UpdateClass. +func (u UpdateBusinessConnection) construct() UpdateClass { return &u } + +// Ensuring interfaces in compile-time for UpdateBusinessConnection. +var ( + _ bin.Encoder = &UpdateBusinessConnection{} + _ bin.Decoder = &UpdateBusinessConnection{} + _ bin.BareEncoder = &UpdateBusinessConnection{} + _ bin.BareDecoder = &UpdateBusinessConnection{} + + _ UpdateClass = &UpdateBusinessConnection{} +) + +func (u *UpdateBusinessConnection) Zero() bool { + if u == nil { + return true + } + if !(u.Connection.Zero()) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (u *UpdateBusinessConnection) String() string { + if u == nil { + return "UpdateBusinessConnection(nil)" + } + type Alias UpdateBusinessConnection + return fmt.Sprintf("UpdateBusinessConnection%+v", Alias(*u)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*UpdateBusinessConnection) TypeID() uint32 { + return UpdateBusinessConnectionTypeID +} + +// TypeName returns name of type in TL schema. +func (*UpdateBusinessConnection) TypeName() string { + return "updateBusinessConnection" +} + +// TypeInfo returns info about TL type. +func (u *UpdateBusinessConnection) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "updateBusinessConnection", + ID: UpdateBusinessConnectionTypeID, + } + if u == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "Connection", + SchemaName: "connection", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (u *UpdateBusinessConnection) Encode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode updateBusinessConnection#8632f476 as nil") + } + b.PutID(UpdateBusinessConnectionTypeID) + return u.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (u *UpdateBusinessConnection) EncodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode updateBusinessConnection#8632f476 as nil") + } + if err := u.Connection.Encode(b); err != nil { + return fmt.Errorf("unable to encode updateBusinessConnection#8632f476: field connection: %w", err) + } + return nil +} + +// Decode implements bin.Decoder. +func (u *UpdateBusinessConnection) Decode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode updateBusinessConnection#8632f476 to nil") + } + if err := b.ConsumeID(UpdateBusinessConnectionTypeID); err != nil { + return fmt.Errorf("unable to decode updateBusinessConnection#8632f476: %w", err) + } + return u.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (u *UpdateBusinessConnection) DecodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode updateBusinessConnection#8632f476 to nil") + } + { + if err := u.Connection.Decode(b); err != nil { + return fmt.Errorf("unable to decode updateBusinessConnection#8632f476: field connection: %w", err) + } + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (u *UpdateBusinessConnection) EncodeTDLibJSON(b tdjson.Encoder) error { + if u == nil { + return fmt.Errorf("can't encode updateBusinessConnection#8632f476 as nil") + } + b.ObjStart() + b.PutID("updateBusinessConnection") + b.Comma() + b.FieldStart("connection") + if err := u.Connection.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode updateBusinessConnection#8632f476: field connection: %w", err) + } + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (u *UpdateBusinessConnection) DecodeTDLibJSON(b tdjson.Decoder) error { + if u == nil { + return fmt.Errorf("can't decode updateBusinessConnection#8632f476 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("updateBusinessConnection"); err != nil { + return fmt.Errorf("unable to decode updateBusinessConnection#8632f476: %w", err) + } + case "connection": + if err := u.Connection.DecodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to decode updateBusinessConnection#8632f476: field connection: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// GetConnection returns value of Connection field. +func (u *UpdateBusinessConnection) GetConnection() (value BusinessConnection) { + if u == nil { + return + } + return u.Connection +} + +// UpdateNewBusinessMessage represents TL type `updateNewBusinessMessage#86be4644`. +type UpdateNewBusinessMessage struct { + // Unique identifier of the business connection + ConnectionID string + // The new message + Message BusinessMessage +} + +// UpdateNewBusinessMessageTypeID is TL type id of UpdateNewBusinessMessage. +const UpdateNewBusinessMessageTypeID = 0x86be4644 + +// construct implements constructor of UpdateClass. +func (u UpdateNewBusinessMessage) construct() UpdateClass { return &u } + +// Ensuring interfaces in compile-time for UpdateNewBusinessMessage. +var ( + _ bin.Encoder = &UpdateNewBusinessMessage{} + _ bin.Decoder = &UpdateNewBusinessMessage{} + _ bin.BareEncoder = &UpdateNewBusinessMessage{} + _ bin.BareDecoder = &UpdateNewBusinessMessage{} + + _ UpdateClass = &UpdateNewBusinessMessage{} +) + +func (u *UpdateNewBusinessMessage) Zero() bool { + if u == nil { + return true + } + if !(u.ConnectionID == "") { + return false + } + if !(u.Message.Zero()) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (u *UpdateNewBusinessMessage) String() string { + if u == nil { + return "UpdateNewBusinessMessage(nil)" + } + type Alias UpdateNewBusinessMessage + return fmt.Sprintf("UpdateNewBusinessMessage%+v", Alias(*u)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*UpdateNewBusinessMessage) TypeID() uint32 { + return UpdateNewBusinessMessageTypeID +} + +// TypeName returns name of type in TL schema. +func (*UpdateNewBusinessMessage) TypeName() string { + return "updateNewBusinessMessage" +} + +// TypeInfo returns info about TL type. +func (u *UpdateNewBusinessMessage) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "updateNewBusinessMessage", + ID: UpdateNewBusinessMessageTypeID, + } + if u == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "ConnectionID", + SchemaName: "connection_id", + }, + { + Name: "Message", + SchemaName: "message", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (u *UpdateNewBusinessMessage) Encode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode updateNewBusinessMessage#86be4644 as nil") + } + b.PutID(UpdateNewBusinessMessageTypeID) + return u.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (u *UpdateNewBusinessMessage) EncodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode updateNewBusinessMessage#86be4644 as nil") + } + b.PutString(u.ConnectionID) + if err := u.Message.Encode(b); err != nil { + return fmt.Errorf("unable to encode updateNewBusinessMessage#86be4644: field message: %w", err) + } + return nil +} + +// Decode implements bin.Decoder. +func (u *UpdateNewBusinessMessage) Decode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode updateNewBusinessMessage#86be4644 to nil") + } + if err := b.ConsumeID(UpdateNewBusinessMessageTypeID); err != nil { + return fmt.Errorf("unable to decode updateNewBusinessMessage#86be4644: %w", err) + } + return u.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (u *UpdateNewBusinessMessage) DecodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode updateNewBusinessMessage#86be4644 to nil") + } + { + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode updateNewBusinessMessage#86be4644: field connection_id: %w", err) + } + u.ConnectionID = value + } + { + if err := u.Message.Decode(b); err != nil { + return fmt.Errorf("unable to decode updateNewBusinessMessage#86be4644: field message: %w", err) + } + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (u *UpdateNewBusinessMessage) EncodeTDLibJSON(b tdjson.Encoder) error { + if u == nil { + return fmt.Errorf("can't encode updateNewBusinessMessage#86be4644 as nil") + } + b.ObjStart() + b.PutID("updateNewBusinessMessage") + b.Comma() + b.FieldStart("connection_id") + b.PutString(u.ConnectionID) + b.Comma() + b.FieldStart("message") + if err := u.Message.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode updateNewBusinessMessage#86be4644: field message: %w", err) + } + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (u *UpdateNewBusinessMessage) DecodeTDLibJSON(b tdjson.Decoder) error { + if u == nil { + return fmt.Errorf("can't decode updateNewBusinessMessage#86be4644 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("updateNewBusinessMessage"); err != nil { + return fmt.Errorf("unable to decode updateNewBusinessMessage#86be4644: %w", err) + } + case "connection_id": + value, err := b.String() + if err != nil { + return fmt.Errorf("unable to decode updateNewBusinessMessage#86be4644: field connection_id: %w", err) + } + u.ConnectionID = value + case "message": + if err := u.Message.DecodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to decode updateNewBusinessMessage#86be4644: field message: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + +// GetConnectionID returns value of ConnectionID field. +func (u *UpdateNewBusinessMessage) GetConnectionID() (value string) { + if u == nil { + return + } + return u.ConnectionID +} + +// GetMessage returns value of Message field. +func (u *UpdateNewBusinessMessage) GetMessage() (value BusinessMessage) { + if u == nil { + return + } + return u.Message +} + +// UpdateBusinessMessageEdited represents TL type `updateBusinessMessageEdited#81a66d89`. +type UpdateBusinessMessageEdited struct { + // Unique identifier of the business connection + ConnectionID string + // The edited message + Message BusinessMessage +} + +// UpdateBusinessMessageEditedTypeID is TL type id of UpdateBusinessMessageEdited. +const UpdateBusinessMessageEditedTypeID = 0x81a66d89 + +// construct implements constructor of UpdateClass. +func (u UpdateBusinessMessageEdited) construct() UpdateClass { return &u } + +// Ensuring interfaces in compile-time for UpdateBusinessMessageEdited. +var ( + _ bin.Encoder = &UpdateBusinessMessageEdited{} + _ bin.Decoder = &UpdateBusinessMessageEdited{} + _ bin.BareEncoder = &UpdateBusinessMessageEdited{} + _ bin.BareDecoder = &UpdateBusinessMessageEdited{} + + _ UpdateClass = &UpdateBusinessMessageEdited{} +) + +func (u *UpdateBusinessMessageEdited) Zero() bool { + if u == nil { + return true + } + if !(u.ConnectionID == "") { + return false + } + if !(u.Message.Zero()) { + return false + } + + return true +} + +// String implements fmt.Stringer. +func (u *UpdateBusinessMessageEdited) String() string { + if u == nil { + return "UpdateBusinessMessageEdited(nil)" + } + type Alias UpdateBusinessMessageEdited + return fmt.Sprintf("UpdateBusinessMessageEdited%+v", Alias(*u)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*UpdateBusinessMessageEdited) TypeID() uint32 { + return UpdateBusinessMessageEditedTypeID +} + +// TypeName returns name of type in TL schema. +func (*UpdateBusinessMessageEdited) TypeName() string { + return "updateBusinessMessageEdited" +} + +// TypeInfo returns info about TL type. +func (u *UpdateBusinessMessageEdited) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "updateBusinessMessageEdited", + ID: UpdateBusinessMessageEditedTypeID, + } + if u == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{ + { + Name: "ConnectionID", + SchemaName: "connection_id", + }, + { + Name: "Message", + SchemaName: "message", + }, + } + return typ +} + +// Encode implements bin.Encoder. +func (u *UpdateBusinessMessageEdited) Encode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode updateBusinessMessageEdited#81a66d89 as nil") + } + b.PutID(UpdateBusinessMessageEditedTypeID) + return u.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (u *UpdateBusinessMessageEdited) EncodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode updateBusinessMessageEdited#81a66d89 as nil") + } + b.PutString(u.ConnectionID) + if err := u.Message.Encode(b); err != nil { + return fmt.Errorf("unable to encode updateBusinessMessageEdited#81a66d89: field message: %w", err) + } + return nil +} + +// Decode implements bin.Decoder. +func (u *UpdateBusinessMessageEdited) Decode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode updateBusinessMessageEdited#81a66d89 to nil") + } + if err := b.ConsumeID(UpdateBusinessMessageEditedTypeID); err != nil { + return fmt.Errorf("unable to decode updateBusinessMessageEdited#81a66d89: %w", err) + } + return u.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (u *UpdateBusinessMessageEdited) DecodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode updateBusinessMessageEdited#81a66d89 to nil") + } + { + value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode updateAddChatMembersPrivacyForbidden#b8b50363: field user_ids: %w", err) - } - - if headerLen > 0 { - u.UserIDs = make([]int64, 0, headerLen%bin.PreallocateLimit) + return fmt.Errorf("unable to decode updateBusinessMessageEdited#81a66d89: field connection_id: %w", err) } - for idx := 0; idx < headerLen; idx++ { - value, err := b.Int53() - if err != nil { - return fmt.Errorf("unable to decode updateAddChatMembersPrivacyForbidden#b8b50363: field user_ids: %w", err) - } - u.UserIDs = append(u.UserIDs, value) + u.ConnectionID = value + } + { + if err := u.Message.Decode(b); err != nil { + return fmt.Errorf("unable to decode updateBusinessMessageEdited#81a66d89: field message: %w", err) } } return nil } // EncodeTDLibJSON implements tdjson.TDLibEncoder. -func (u *UpdateAddChatMembersPrivacyForbidden) EncodeTDLibJSON(b tdjson.Encoder) error { +func (u *UpdateBusinessMessageEdited) EncodeTDLibJSON(b tdjson.Encoder) error { if u == nil { - return fmt.Errorf("can't encode updateAddChatMembersPrivacyForbidden#b8b50363 as nil") + return fmt.Errorf("can't encode updateBusinessMessageEdited#81a66d89 as nil") } b.ObjStart() - b.PutID("updateAddChatMembersPrivacyForbidden") + b.PutID("updateBusinessMessageEdited") b.Comma() - b.FieldStart("chat_id") - b.PutInt53(u.ChatID) + b.FieldStart("connection_id") + b.PutString(u.ConnectionID) b.Comma() - b.FieldStart("user_ids") - b.ArrStart() - for _, v := range u.UserIDs { - b.PutInt53(v) - b.Comma() + b.FieldStart("message") + if err := u.Message.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode updateBusinessMessageEdited#81a66d89: field message: %w", err) } - b.StripComma() - b.ArrEnd() b.Comma() b.StripComma() b.ObjEnd() @@ -25128,33 +26105,26 @@ func (u *UpdateAddChatMembersPrivacyForbidden) EncodeTDLibJSON(b tdjson.Encoder) } // DecodeTDLibJSON implements tdjson.TDLibDecoder. -func (u *UpdateAddChatMembersPrivacyForbidden) DecodeTDLibJSON(b tdjson.Decoder) error { +func (u *UpdateBusinessMessageEdited) DecodeTDLibJSON(b tdjson.Decoder) error { if u == nil { - return fmt.Errorf("can't decode updateAddChatMembersPrivacyForbidden#b8b50363 to nil") + return fmt.Errorf("can't decode updateBusinessMessageEdited#81a66d89 to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: - if err := b.ConsumeID("updateAddChatMembersPrivacyForbidden"); err != nil { - return fmt.Errorf("unable to decode updateAddChatMembersPrivacyForbidden#b8b50363: %w", err) + if err := b.ConsumeID("updateBusinessMessageEdited"); err != nil { + return fmt.Errorf("unable to decode updateBusinessMessageEdited#81a66d89: %w", err) } - case "chat_id": - value, err := b.Int53() + case "connection_id": + value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode updateAddChatMembersPrivacyForbidden#b8b50363: field chat_id: %w", err) + return fmt.Errorf("unable to decode updateBusinessMessageEdited#81a66d89: field connection_id: %w", err) } - u.ChatID = value - case "user_ids": - if err := b.Arr(func(b tdjson.Decoder) error { - value, err := b.Int53() - if err != nil { - return fmt.Errorf("unable to decode updateAddChatMembersPrivacyForbidden#b8b50363: field user_ids: %w", err) - } - u.UserIDs = append(u.UserIDs, value) - return nil - }); err != nil { - return fmt.Errorf("unable to decode updateAddChatMembersPrivacyForbidden#b8b50363: field user_ids: %w", err) + u.ConnectionID = value + case "message": + if err := u.Message.DecodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to decode updateBusinessMessageEdited#81a66d89: field message: %w", err) } default: return b.Skip() @@ -25163,54 +26133,59 @@ func (u *UpdateAddChatMembersPrivacyForbidden) DecodeTDLibJSON(b tdjson.Decoder) }) } -// GetChatID returns value of ChatID field. -func (u *UpdateAddChatMembersPrivacyForbidden) GetChatID() (value int64) { +// GetConnectionID returns value of ConnectionID field. +func (u *UpdateBusinessMessageEdited) GetConnectionID() (value string) { if u == nil { return } - return u.ChatID + return u.ConnectionID } -// GetUserIDs returns value of UserIDs field. -func (u *UpdateAddChatMembersPrivacyForbidden) GetUserIDs() (value []int64) { +// GetMessage returns value of Message field. +func (u *UpdateBusinessMessageEdited) GetMessage() (value BusinessMessage) { if u == nil { return } - return u.UserIDs + return u.Message } -// UpdateAutosaveSettings represents TL type `updateAutosaveSettings#da274f0b`. -type UpdateAutosaveSettings struct { - // Type of chats for which autosave settings were updated - Scope AutosaveSettingsScopeClass - // The new autosave settings; may be null if the settings are reset to default - Settings ScopeAutosaveSettings +// UpdateBusinessMessagesDeleted represents TL type `updateBusinessMessagesDeleted#e036d3ed`. +type UpdateBusinessMessagesDeleted struct { + // Unique identifier of the business connection + ConnectionID string + // Identifier of a chat in the business account in which messages were deleted + ChatID int64 + // Unique message identifiers of the deleted messages + MessageIDs []int64 } -// UpdateAutosaveSettingsTypeID is TL type id of UpdateAutosaveSettings. -const UpdateAutosaveSettingsTypeID = 0xda274f0b +// UpdateBusinessMessagesDeletedTypeID is TL type id of UpdateBusinessMessagesDeleted. +const UpdateBusinessMessagesDeletedTypeID = 0xe036d3ed // construct implements constructor of UpdateClass. -func (u UpdateAutosaveSettings) construct() UpdateClass { return &u } +func (u UpdateBusinessMessagesDeleted) construct() UpdateClass { return &u } -// Ensuring interfaces in compile-time for UpdateAutosaveSettings. +// Ensuring interfaces in compile-time for UpdateBusinessMessagesDeleted. var ( - _ bin.Encoder = &UpdateAutosaveSettings{} - _ bin.Decoder = &UpdateAutosaveSettings{} - _ bin.BareEncoder = &UpdateAutosaveSettings{} - _ bin.BareDecoder = &UpdateAutosaveSettings{} + _ bin.Encoder = &UpdateBusinessMessagesDeleted{} + _ bin.Decoder = &UpdateBusinessMessagesDeleted{} + _ bin.BareEncoder = &UpdateBusinessMessagesDeleted{} + _ bin.BareDecoder = &UpdateBusinessMessagesDeleted{} - _ UpdateClass = &UpdateAutosaveSettings{} + _ UpdateClass = &UpdateBusinessMessagesDeleted{} ) -func (u *UpdateAutosaveSettings) Zero() bool { +func (u *UpdateBusinessMessagesDeleted) Zero() bool { if u == nil { return true } - if !(u.Scope == nil) { + if !(u.ConnectionID == "") { return false } - if !(u.Settings.Zero()) { + if !(u.ChatID == 0) { + return false + } + if !(u.MessageIDs == nil) { return false } @@ -25218,31 +26193,31 @@ func (u *UpdateAutosaveSettings) Zero() bool { } // String implements fmt.Stringer. -func (u *UpdateAutosaveSettings) String() string { +func (u *UpdateBusinessMessagesDeleted) String() string { if u == nil { - return "UpdateAutosaveSettings(nil)" + return "UpdateBusinessMessagesDeleted(nil)" } - type Alias UpdateAutosaveSettings - return fmt.Sprintf("UpdateAutosaveSettings%+v", Alias(*u)) + type Alias UpdateBusinessMessagesDeleted + return fmt.Sprintf("UpdateBusinessMessagesDeleted%+v", Alias(*u)) } // TypeID returns type id in TL schema. // // See https://core.telegram.org/mtproto/TL-tl#remarks. -func (*UpdateAutosaveSettings) TypeID() uint32 { - return UpdateAutosaveSettingsTypeID +func (*UpdateBusinessMessagesDeleted) TypeID() uint32 { + return UpdateBusinessMessagesDeletedTypeID } // TypeName returns name of type in TL schema. -func (*UpdateAutosaveSettings) TypeName() string { - return "updateAutosaveSettings" +func (*UpdateBusinessMessagesDeleted) TypeName() string { + return "updateBusinessMessagesDeleted" } // TypeInfo returns info about TL type. -func (u *UpdateAutosaveSettings) TypeInfo() tdp.Type { +func (u *UpdateBusinessMessagesDeleted) TypeInfo() tdp.Type { typ := tdp.Type{ - Name: "updateAutosaveSettings", - ID: UpdateAutosaveSettingsTypeID, + Name: "updateBusinessMessagesDeleted", + ID: UpdateBusinessMessagesDeletedTypeID, } if u == nil { typ.Null = true @@ -25250,94 +26225,116 @@ func (u *UpdateAutosaveSettings) TypeInfo() tdp.Type { } typ.Fields = []tdp.Field{ { - Name: "Scope", - SchemaName: "scope", + Name: "ConnectionID", + SchemaName: "connection_id", }, { - Name: "Settings", - SchemaName: "settings", + Name: "ChatID", + SchemaName: "chat_id", + }, + { + Name: "MessageIDs", + SchemaName: "message_ids", }, } return typ } // Encode implements bin.Encoder. -func (u *UpdateAutosaveSettings) Encode(b *bin.Buffer) error { +func (u *UpdateBusinessMessagesDeleted) Encode(b *bin.Buffer) error { if u == nil { - return fmt.Errorf("can't encode updateAutosaveSettings#da274f0b as nil") + return fmt.Errorf("can't encode updateBusinessMessagesDeleted#e036d3ed as nil") } - b.PutID(UpdateAutosaveSettingsTypeID) + b.PutID(UpdateBusinessMessagesDeletedTypeID) return u.EncodeBare(b) } // EncodeBare implements bin.BareEncoder. -func (u *UpdateAutosaveSettings) EncodeBare(b *bin.Buffer) error { +func (u *UpdateBusinessMessagesDeleted) EncodeBare(b *bin.Buffer) error { if u == nil { - return fmt.Errorf("can't encode updateAutosaveSettings#da274f0b as nil") - } - if u.Scope == nil { - return fmt.Errorf("unable to encode updateAutosaveSettings#da274f0b: field scope is nil") - } - if err := u.Scope.Encode(b); err != nil { - return fmt.Errorf("unable to encode updateAutosaveSettings#da274f0b: field scope: %w", err) + return fmt.Errorf("can't encode updateBusinessMessagesDeleted#e036d3ed as nil") } - if err := u.Settings.Encode(b); err != nil { - return fmt.Errorf("unable to encode updateAutosaveSettings#da274f0b: field settings: %w", err) + b.PutString(u.ConnectionID) + b.PutInt53(u.ChatID) + b.PutInt(len(u.MessageIDs)) + for _, v := range u.MessageIDs { + b.PutInt53(v) } return nil } // Decode implements bin.Decoder. -func (u *UpdateAutosaveSettings) Decode(b *bin.Buffer) error { +func (u *UpdateBusinessMessagesDeleted) Decode(b *bin.Buffer) error { if u == nil { - return fmt.Errorf("can't decode updateAutosaveSettings#da274f0b to nil") + return fmt.Errorf("can't decode updateBusinessMessagesDeleted#e036d3ed to nil") } - if err := b.ConsumeID(UpdateAutosaveSettingsTypeID); err != nil { - return fmt.Errorf("unable to decode updateAutosaveSettings#da274f0b: %w", err) + if err := b.ConsumeID(UpdateBusinessMessagesDeletedTypeID); err != nil { + return fmt.Errorf("unable to decode updateBusinessMessagesDeleted#e036d3ed: %w", err) } return u.DecodeBare(b) } // DecodeBare implements bin.BareDecoder. -func (u *UpdateAutosaveSettings) DecodeBare(b *bin.Buffer) error { +func (u *UpdateBusinessMessagesDeleted) DecodeBare(b *bin.Buffer) error { if u == nil { - return fmt.Errorf("can't decode updateAutosaveSettings#da274f0b to nil") + return fmt.Errorf("can't decode updateBusinessMessagesDeleted#e036d3ed to nil") } { - value, err := DecodeAutosaveSettingsScope(b) + value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode updateAutosaveSettings#da274f0b: field scope: %w", err) + return fmt.Errorf("unable to decode updateBusinessMessagesDeleted#e036d3ed: field connection_id: %w", err) } - u.Scope = value + u.ConnectionID = value } { - if err := u.Settings.Decode(b); err != nil { - return fmt.Errorf("unable to decode updateAutosaveSettings#da274f0b: field settings: %w", err) + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode updateBusinessMessagesDeleted#e036d3ed: field chat_id: %w", err) + } + u.ChatID = value + } + { + headerLen, err := b.Int() + if err != nil { + return fmt.Errorf("unable to decode updateBusinessMessagesDeleted#e036d3ed: field message_ids: %w", err) + } + + if headerLen > 0 { + u.MessageIDs = make([]int64, 0, headerLen%bin.PreallocateLimit) + } + for idx := 0; idx < headerLen; idx++ { + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode updateBusinessMessagesDeleted#e036d3ed: field message_ids: %w", err) + } + u.MessageIDs = append(u.MessageIDs, value) } } return nil } // EncodeTDLibJSON implements tdjson.TDLibEncoder. -func (u *UpdateAutosaveSettings) EncodeTDLibJSON(b tdjson.Encoder) error { +func (u *UpdateBusinessMessagesDeleted) EncodeTDLibJSON(b tdjson.Encoder) error { if u == nil { - return fmt.Errorf("can't encode updateAutosaveSettings#da274f0b as nil") + return fmt.Errorf("can't encode updateBusinessMessagesDeleted#e036d3ed as nil") } b.ObjStart() - b.PutID("updateAutosaveSettings") + b.PutID("updateBusinessMessagesDeleted") b.Comma() - b.FieldStart("scope") - if u.Scope == nil { - return fmt.Errorf("unable to encode updateAutosaveSettings#da274f0b: field scope is nil") - } - if err := u.Scope.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode updateAutosaveSettings#da274f0b: field scope: %w", err) - } + b.FieldStart("connection_id") + b.PutString(u.ConnectionID) b.Comma() - b.FieldStart("settings") - if err := u.Settings.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode updateAutosaveSettings#da274f0b: field settings: %w", err) + b.FieldStart("chat_id") + b.PutInt53(u.ChatID) + b.Comma() + b.FieldStart("message_ids") + b.ArrStart() + for _, v := range u.MessageIDs { + b.PutInt53(v) + b.Comma() } + b.StripComma() + b.ArrEnd() b.Comma() b.StripComma() b.ObjEnd() @@ -25345,26 +26342,39 @@ func (u *UpdateAutosaveSettings) EncodeTDLibJSON(b tdjson.Encoder) error { } // DecodeTDLibJSON implements tdjson.TDLibDecoder. -func (u *UpdateAutosaveSettings) DecodeTDLibJSON(b tdjson.Decoder) error { +func (u *UpdateBusinessMessagesDeleted) DecodeTDLibJSON(b tdjson.Decoder) error { if u == nil { - return fmt.Errorf("can't decode updateAutosaveSettings#da274f0b to nil") + return fmt.Errorf("can't decode updateBusinessMessagesDeleted#e036d3ed to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: - if err := b.ConsumeID("updateAutosaveSettings"); err != nil { - return fmt.Errorf("unable to decode updateAutosaveSettings#da274f0b: %w", err) + if err := b.ConsumeID("updateBusinessMessagesDeleted"); err != nil { + return fmt.Errorf("unable to decode updateBusinessMessagesDeleted#e036d3ed: %w", err) } - case "scope": - value, err := DecodeTDLibJSONAutosaveSettingsScope(b) + case "connection_id": + value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode updateAutosaveSettings#da274f0b: field scope: %w", err) + return fmt.Errorf("unable to decode updateBusinessMessagesDeleted#e036d3ed: field connection_id: %w", err) } - u.Scope = value - case "settings": - if err := u.Settings.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode updateAutosaveSettings#da274f0b: field settings: %w", err) + u.ConnectionID = value + case "chat_id": + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode updateBusinessMessagesDeleted#e036d3ed: field chat_id: %w", err) + } + u.ChatID = value + case "message_ids": + if err := b.Arr(func(b tdjson.Decoder) error { + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode updateBusinessMessagesDeleted#e036d3ed: field message_ids: %w", err) + } + u.MessageIDs = append(u.MessageIDs, value) + return nil + }); err != nil { + return fmt.Errorf("unable to decode updateBusinessMessagesDeleted#e036d3ed: field message_ids: %w", err) } default: return b.Skip() @@ -25373,20 +26383,28 @@ func (u *UpdateAutosaveSettings) DecodeTDLibJSON(b tdjson.Decoder) error { }) } -// GetScope returns value of Scope field. -func (u *UpdateAutosaveSettings) GetScope() (value AutosaveSettingsScopeClass) { +// GetConnectionID returns value of ConnectionID field. +func (u *UpdateBusinessMessagesDeleted) GetConnectionID() (value string) { if u == nil { return } - return u.Scope + return u.ConnectionID } -// GetSettings returns value of Settings field. -func (u *UpdateAutosaveSettings) GetSettings() (value ScopeAutosaveSettings) { +// GetChatID returns value of ChatID field. +func (u *UpdateBusinessMessagesDeleted) GetChatID() (value int64) { if u == nil { return } - return u.Settings + return u.ChatID +} + +// GetMessageIDs returns value of MessageIDs field. +func (u *UpdateBusinessMessagesDeleted) GetMessageIDs() (value []int64) { + if u == nil { + return + } + return u.MessageIDs } // UpdateNewInlineQuery represents TL type `updateNewInlineQuery#7171bf34`. @@ -29845,8 +30863,13 @@ const UpdateClassName = "Update" // case *tdapi.UpdateAnimatedEmojiMessageClicked: // updateAnimatedEmojiMessageClicked#a3167405 // case *tdapi.UpdateAnimationSearchParameters: // updateAnimationSearchParameters#6016ef01 // case *tdapi.UpdateSuggestedActions: // updateSuggestedActions#c2e5cccb +// case *tdapi.UpdateContactCloseBirthdays: // updateContactCloseBirthdays#c88b98ce // case *tdapi.UpdateAddChatMembersPrivacyForbidden: // updateAddChatMembersPrivacyForbidden#b8b50363 // case *tdapi.UpdateAutosaveSettings: // updateAutosaveSettings#da274f0b +// case *tdapi.UpdateBusinessConnection: // updateBusinessConnection#8632f476 +// case *tdapi.UpdateNewBusinessMessage: // updateNewBusinessMessage#86be4644 +// case *tdapi.UpdateBusinessMessageEdited: // updateBusinessMessageEdited#81a66d89 +// case *tdapi.UpdateBusinessMessagesDeleted: // updateBusinessMessagesDeleted#e036d3ed // case *tdapi.UpdateNewInlineQuery: // updateNewInlineQuery#7171bf34 // case *tdapi.UpdateNewChosenInlineResult: // updateNewChosenInlineResult#cb4c4f5d // case *tdapi.UpdateNewCallbackQuery: // updateNewCallbackQuery#8964d05e @@ -30719,6 +31742,13 @@ func DecodeUpdate(buf *bin.Buffer) (UpdateClass, error) { return nil, fmt.Errorf("unable to decode UpdateClass: %w", err) } return &v, nil + case UpdateContactCloseBirthdaysTypeID: + // Decoding updateContactCloseBirthdays#c88b98ce. + v := UpdateContactCloseBirthdays{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode UpdateClass: %w", err) + } + return &v, nil case UpdateAddChatMembersPrivacyForbiddenTypeID: // Decoding updateAddChatMembersPrivacyForbidden#b8b50363. v := UpdateAddChatMembersPrivacyForbidden{} @@ -30733,6 +31763,34 @@ func DecodeUpdate(buf *bin.Buffer) (UpdateClass, error) { return nil, fmt.Errorf("unable to decode UpdateClass: %w", err) } return &v, nil + case UpdateBusinessConnectionTypeID: + // Decoding updateBusinessConnection#8632f476. + v := UpdateBusinessConnection{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode UpdateClass: %w", err) + } + return &v, nil + case UpdateNewBusinessMessageTypeID: + // Decoding updateNewBusinessMessage#86be4644. + v := UpdateNewBusinessMessage{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode UpdateClass: %w", err) + } + return &v, nil + case UpdateBusinessMessageEditedTypeID: + // Decoding updateBusinessMessageEdited#81a66d89. + v := UpdateBusinessMessageEdited{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode UpdateClass: %w", err) + } + return &v, nil + case UpdateBusinessMessagesDeletedTypeID: + // Decoding updateBusinessMessagesDeleted#e036d3ed. + v := UpdateBusinessMessagesDeleted{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode UpdateClass: %w", err) + } + return &v, nil case UpdateNewInlineQueryTypeID: // Decoding updateNewInlineQuery#7171bf34. v := UpdateNewInlineQuery{} @@ -31676,6 +32734,13 @@ func DecodeTDLibJSONUpdate(buf tdjson.Decoder) (UpdateClass, error) { return nil, fmt.Errorf("unable to decode UpdateClass: %w", err) } return &v, nil + case "updateContactCloseBirthdays": + // Decoding updateContactCloseBirthdays#c88b98ce. + v := UpdateContactCloseBirthdays{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode UpdateClass: %w", err) + } + return &v, nil case "updateAddChatMembersPrivacyForbidden": // Decoding updateAddChatMembersPrivacyForbidden#b8b50363. v := UpdateAddChatMembersPrivacyForbidden{} @@ -31690,6 +32755,34 @@ func DecodeTDLibJSONUpdate(buf tdjson.Decoder) (UpdateClass, error) { return nil, fmt.Errorf("unable to decode UpdateClass: %w", err) } return &v, nil + case "updateBusinessConnection": + // Decoding updateBusinessConnection#8632f476. + v := UpdateBusinessConnection{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode UpdateClass: %w", err) + } + return &v, nil + case "updateNewBusinessMessage": + // Decoding updateNewBusinessMessage#86be4644. + v := UpdateNewBusinessMessage{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode UpdateClass: %w", err) + } + return &v, nil + case "updateBusinessMessageEdited": + // Decoding updateBusinessMessageEdited#81a66d89. + v := UpdateBusinessMessageEdited{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode UpdateClass: %w", err) + } + return &v, nil + case "updateBusinessMessagesDeleted": + // Decoding updateBusinessMessagesDeleted#e036d3ed. + v := UpdateBusinessMessagesDeleted{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode UpdateClass: %w", err) + } + return &v, nil case "updateNewInlineQuery": // Decoding updateNewInlineQuery#7171bf34. v := UpdateNewInlineQuery{} diff --git a/tdapi/tl_user_full_info_gen.go b/tdapi/tl_user_full_info_gen.go index c34965ed67..f6dcd86e09 100644 --- a/tdapi/tl_user_full_info_gen.go +++ b/tdapi/tl_user_full_info_gen.go @@ -31,7 +31,7 @@ var ( _ = tdjson.Encoder{} ) -// UserFullInfo represents TL type `userFullInfo#760faed8`. +// UserFullInfo represents TL type `userFullInfo#809a3ac2`. type UserFullInfo struct { // User profile photo set by the current user for the contact; may be null. If null and // user.profile_photo is null, then the photo is empty; otherwise, it is unknown. @@ -64,6 +64,10 @@ type UserFullInfo struct { SetChatBackground bool // A short user bio; may be null for bots Bio FormattedText + // Birthdate of the user; may be null if unknown + Birthdate Birthdate + // Identifier of the personal chat of the user; 0 if none + PersonalChatID int64 // The list of available options for gifting Telegram Premium to the user PremiumGiftOptions []PremiumPaymentOption // Number of group chats where both the other user and the current user are a member; 0 @@ -77,7 +81,7 @@ type UserFullInfo struct { } // UserFullInfoTypeID is TL type id of UserFullInfo. -const UserFullInfoTypeID = 0x760faed8 +const UserFullInfoTypeID = 0x809a3ac2 // Ensuring interfaces in compile-time for UserFullInfo. var ( @@ -130,6 +134,12 @@ func (u *UserFullInfo) Zero() bool { if !(u.Bio.Zero()) { return false } + if !(u.Birthdate.Zero()) { + return false + } + if !(u.PersonalChatID == 0) { + return false + } if !(u.PremiumGiftOptions == nil) { return false } @@ -230,6 +240,14 @@ func (u *UserFullInfo) TypeInfo() tdp.Type { Name: "Bio", SchemaName: "bio", }, + { + Name: "Birthdate", + SchemaName: "birthdate", + }, + { + Name: "PersonalChatID", + SchemaName: "personal_chat_id", + }, { Name: "PremiumGiftOptions", SchemaName: "premium_gift_options", @@ -253,7 +271,7 @@ func (u *UserFullInfo) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (u *UserFullInfo) Encode(b *bin.Buffer) error { if u == nil { - return fmt.Errorf("can't encode userFullInfo#760faed8 as nil") + return fmt.Errorf("can't encode userFullInfo#809a3ac2 as nil") } b.PutID(UserFullInfoTypeID) return u.EncodeBare(b) @@ -262,22 +280,22 @@ func (u *UserFullInfo) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (u *UserFullInfo) EncodeBare(b *bin.Buffer) error { if u == nil { - return fmt.Errorf("can't encode userFullInfo#760faed8 as nil") + return fmt.Errorf("can't encode userFullInfo#809a3ac2 as nil") } if err := u.PersonalPhoto.Encode(b); err != nil { - return fmt.Errorf("unable to encode userFullInfo#760faed8: field personal_photo: %w", err) + return fmt.Errorf("unable to encode userFullInfo#809a3ac2: field personal_photo: %w", err) } if err := u.Photo.Encode(b); err != nil { - return fmt.Errorf("unable to encode userFullInfo#760faed8: field photo: %w", err) + return fmt.Errorf("unable to encode userFullInfo#809a3ac2: field photo: %w", err) } if err := u.PublicPhoto.Encode(b); err != nil { - return fmt.Errorf("unable to encode userFullInfo#760faed8: field public_photo: %w", err) + return fmt.Errorf("unable to encode userFullInfo#809a3ac2: field public_photo: %w", err) } if u.BlockList == nil { - return fmt.Errorf("unable to encode userFullInfo#760faed8: field block_list is nil") + return fmt.Errorf("unable to encode userFullInfo#809a3ac2: field block_list is nil") } if err := u.BlockList.Encode(b); err != nil { - return fmt.Errorf("unable to encode userFullInfo#760faed8: field block_list: %w", err) + return fmt.Errorf("unable to encode userFullInfo#809a3ac2: field block_list: %w", err) } b.PutBool(u.CanBeCalled) b.PutBool(u.SupportsVideoCalls) @@ -288,20 +306,24 @@ func (u *UserFullInfo) EncodeBare(b *bin.Buffer) error { b.PutBool(u.NeedPhoneNumberPrivacyException) b.PutBool(u.SetChatBackground) if err := u.Bio.Encode(b); err != nil { - return fmt.Errorf("unable to encode userFullInfo#760faed8: field bio: %w", err) + return fmt.Errorf("unable to encode userFullInfo#809a3ac2: field bio: %w", err) } + if err := u.Birthdate.Encode(b); err != nil { + return fmt.Errorf("unable to encode userFullInfo#809a3ac2: field birthdate: %w", err) + } + b.PutInt53(u.PersonalChatID) b.PutInt(len(u.PremiumGiftOptions)) for idx, v := range u.PremiumGiftOptions { if err := v.EncodeBare(b); err != nil { - return fmt.Errorf("unable to encode bare userFullInfo#760faed8: field premium_gift_options element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode bare userFullInfo#809a3ac2: field premium_gift_options element with index %d: %w", idx, err) } } b.PutInt32(u.GroupInCommonCount) if err := u.BusinessInfo.Encode(b); err != nil { - return fmt.Errorf("unable to encode userFullInfo#760faed8: field business_info: %w", err) + return fmt.Errorf("unable to encode userFullInfo#809a3ac2: field business_info: %w", err) } if err := u.BotInfo.Encode(b); err != nil { - return fmt.Errorf("unable to encode userFullInfo#760faed8: field bot_info: %w", err) + return fmt.Errorf("unable to encode userFullInfo#809a3ac2: field bot_info: %w", err) } return nil } @@ -309,10 +331,10 @@ func (u *UserFullInfo) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (u *UserFullInfo) Decode(b *bin.Buffer) error { if u == nil { - return fmt.Errorf("can't decode userFullInfo#760faed8 to nil") + return fmt.Errorf("can't decode userFullInfo#809a3ac2 to nil") } if err := b.ConsumeID(UserFullInfoTypeID); err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: %w", err) } return u.DecodeBare(b) } @@ -320,95 +342,107 @@ func (u *UserFullInfo) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (u *UserFullInfo) DecodeBare(b *bin.Buffer) error { if u == nil { - return fmt.Errorf("can't decode userFullInfo#760faed8 to nil") + return fmt.Errorf("can't decode userFullInfo#809a3ac2 to nil") } { if err := u.PersonalPhoto.Decode(b); err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field personal_photo: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field personal_photo: %w", err) } } { if err := u.Photo.Decode(b); err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field photo: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field photo: %w", err) } } { if err := u.PublicPhoto.Decode(b); err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field public_photo: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field public_photo: %w", err) } } { value, err := DecodeBlockList(b) if err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field block_list: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field block_list: %w", err) } u.BlockList = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field can_be_called: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field can_be_called: %w", err) } u.CanBeCalled = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field supports_video_calls: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field supports_video_calls: %w", err) } u.SupportsVideoCalls = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field has_private_calls: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field has_private_calls: %w", err) } u.HasPrivateCalls = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field has_private_forwards: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field has_private_forwards: %w", err) } u.HasPrivateForwards = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field has_restricted_voice_and_video_note_messages: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field has_restricted_voice_and_video_note_messages: %w", err) } u.HasRestrictedVoiceAndVideoNoteMessages = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field has_pinned_stories: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field has_pinned_stories: %w", err) } u.HasPinnedStories = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field need_phone_number_privacy_exception: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field need_phone_number_privacy_exception: %w", err) } u.NeedPhoneNumberPrivacyException = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field set_chat_background: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field set_chat_background: %w", err) } u.SetChatBackground = value } { if err := u.Bio.Decode(b); err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field bio: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field bio: %w", err) + } + } + { + if err := u.Birthdate.Decode(b); err != nil { + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field birthdate: %w", err) + } + } + { + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field personal_chat_id: %w", err) } + u.PersonalChatID = value } { headerLen, err := b.Int() if err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field premium_gift_options: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field premium_gift_options: %w", err) } if headerLen > 0 { @@ -417,7 +451,7 @@ func (u *UserFullInfo) DecodeBare(b *bin.Buffer) error { for idx := 0; idx < headerLen; idx++ { var value PremiumPaymentOption if err := value.DecodeBare(b); err != nil { - return fmt.Errorf("unable to decode bare userFullInfo#760faed8: field premium_gift_options: %w", err) + return fmt.Errorf("unable to decode bare userFullInfo#809a3ac2: field premium_gift_options: %w", err) } u.PremiumGiftOptions = append(u.PremiumGiftOptions, value) } @@ -425,18 +459,18 @@ func (u *UserFullInfo) DecodeBare(b *bin.Buffer) error { { value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field group_in_common_count: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field group_in_common_count: %w", err) } u.GroupInCommonCount = value } { if err := u.BusinessInfo.Decode(b); err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field business_info: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field business_info: %w", err) } } { if err := u.BotInfo.Decode(b); err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field bot_info: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field bot_info: %w", err) } } return nil @@ -445,32 +479,32 @@ func (u *UserFullInfo) DecodeBare(b *bin.Buffer) error { // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (u *UserFullInfo) EncodeTDLibJSON(b tdjson.Encoder) error { if u == nil { - return fmt.Errorf("can't encode userFullInfo#760faed8 as nil") + return fmt.Errorf("can't encode userFullInfo#809a3ac2 as nil") } b.ObjStart() b.PutID("userFullInfo") b.Comma() b.FieldStart("personal_photo") if err := u.PersonalPhoto.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode userFullInfo#760faed8: field personal_photo: %w", err) + return fmt.Errorf("unable to encode userFullInfo#809a3ac2: field personal_photo: %w", err) } b.Comma() b.FieldStart("photo") if err := u.Photo.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode userFullInfo#760faed8: field photo: %w", err) + return fmt.Errorf("unable to encode userFullInfo#809a3ac2: field photo: %w", err) } b.Comma() b.FieldStart("public_photo") if err := u.PublicPhoto.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode userFullInfo#760faed8: field public_photo: %w", err) + return fmt.Errorf("unable to encode userFullInfo#809a3ac2: field public_photo: %w", err) } b.Comma() b.FieldStart("block_list") if u.BlockList == nil { - return fmt.Errorf("unable to encode userFullInfo#760faed8: field block_list is nil") + return fmt.Errorf("unable to encode userFullInfo#809a3ac2: field block_list is nil") } if err := u.BlockList.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode userFullInfo#760faed8: field block_list: %w", err) + return fmt.Errorf("unable to encode userFullInfo#809a3ac2: field block_list: %w", err) } b.Comma() b.FieldStart("can_be_called") @@ -499,14 +533,22 @@ func (u *UserFullInfo) EncodeTDLibJSON(b tdjson.Encoder) error { b.Comma() b.FieldStart("bio") if err := u.Bio.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode userFullInfo#760faed8: field bio: %w", err) + return fmt.Errorf("unable to encode userFullInfo#809a3ac2: field bio: %w", err) } b.Comma() + b.FieldStart("birthdate") + if err := u.Birthdate.EncodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to encode userFullInfo#809a3ac2: field birthdate: %w", err) + } + b.Comma() + b.FieldStart("personal_chat_id") + b.PutInt53(u.PersonalChatID) + b.Comma() b.FieldStart("premium_gift_options") b.ArrStart() for idx, v := range u.PremiumGiftOptions { if err := v.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode userFullInfo#760faed8: field premium_gift_options element with index %d: %w", idx, err) + return fmt.Errorf("unable to encode userFullInfo#809a3ac2: field premium_gift_options element with index %d: %w", idx, err) } b.Comma() } @@ -518,12 +560,12 @@ func (u *UserFullInfo) EncodeTDLibJSON(b tdjson.Encoder) error { b.Comma() b.FieldStart("business_info") if err := u.BusinessInfo.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode userFullInfo#760faed8: field business_info: %w", err) + return fmt.Errorf("unable to encode userFullInfo#809a3ac2: field business_info: %w", err) } b.Comma() b.FieldStart("bot_info") if err := u.BotInfo.EncodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to encode userFullInfo#760faed8: field bot_info: %w", err) + return fmt.Errorf("unable to encode userFullInfo#809a3ac2: field bot_info: %w", err) } b.Comma() b.StripComma() @@ -534,109 +576,119 @@ func (u *UserFullInfo) EncodeTDLibJSON(b tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (u *UserFullInfo) DecodeTDLibJSON(b tdjson.Decoder) error { if u == nil { - return fmt.Errorf("can't decode userFullInfo#760faed8 to nil") + return fmt.Errorf("can't decode userFullInfo#809a3ac2 to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("userFullInfo"); err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: %w", err) } case "personal_photo": if err := u.PersonalPhoto.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field personal_photo: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field personal_photo: %w", err) } case "photo": if err := u.Photo.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field photo: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field photo: %w", err) } case "public_photo": if err := u.PublicPhoto.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field public_photo: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field public_photo: %w", err) } case "block_list": value, err := DecodeTDLibJSONBlockList(b) if err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field block_list: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field block_list: %w", err) } u.BlockList = value case "can_be_called": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field can_be_called: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field can_be_called: %w", err) } u.CanBeCalled = value case "supports_video_calls": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field supports_video_calls: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field supports_video_calls: %w", err) } u.SupportsVideoCalls = value case "has_private_calls": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field has_private_calls: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field has_private_calls: %w", err) } u.HasPrivateCalls = value case "has_private_forwards": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field has_private_forwards: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field has_private_forwards: %w", err) } u.HasPrivateForwards = value case "has_restricted_voice_and_video_note_messages": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field has_restricted_voice_and_video_note_messages: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field has_restricted_voice_and_video_note_messages: %w", err) } u.HasRestrictedVoiceAndVideoNoteMessages = value case "has_pinned_stories": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field has_pinned_stories: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field has_pinned_stories: %w", err) } u.HasPinnedStories = value case "need_phone_number_privacy_exception": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field need_phone_number_privacy_exception: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field need_phone_number_privacy_exception: %w", err) } u.NeedPhoneNumberPrivacyException = value case "set_chat_background": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field set_chat_background: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field set_chat_background: %w", err) } u.SetChatBackground = value case "bio": if err := u.Bio.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field bio: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field bio: %w", err) + } + case "birthdate": + if err := u.Birthdate.DecodeTDLibJSON(b); err != nil { + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field birthdate: %w", err) } + case "personal_chat_id": + value, err := b.Int53() + if err != nil { + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field personal_chat_id: %w", err) + } + u.PersonalChatID = value case "premium_gift_options": if err := b.Arr(func(b tdjson.Decoder) error { var value PremiumPaymentOption if err := value.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field premium_gift_options: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field premium_gift_options: %w", err) } u.PremiumGiftOptions = append(u.PremiumGiftOptions, value) return nil }); err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field premium_gift_options: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field premium_gift_options: %w", err) } case "group_in_common_count": value, err := b.Int32() if err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field group_in_common_count: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field group_in_common_count: %w", err) } u.GroupInCommonCount = value case "business_info": if err := u.BusinessInfo.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field business_info: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field business_info: %w", err) } case "bot_info": if err := u.BotInfo.DecodeTDLibJSON(b); err != nil { - return fmt.Errorf("unable to decode userFullInfo#760faed8: field bot_info: %w", err) + return fmt.Errorf("unable to decode userFullInfo#809a3ac2: field bot_info: %w", err) } default: return b.Skip() @@ -749,6 +801,22 @@ func (u *UserFullInfo) GetBio() (value FormattedText) { return u.Bio } +// GetBirthdate returns value of Birthdate field. +func (u *UserFullInfo) GetBirthdate() (value Birthdate) { + if u == nil { + return + } + return u.Birthdate +} + +// GetPersonalChatID returns value of PersonalChatID field. +func (u *UserFullInfo) GetPersonalChatID() (value int64) { + if u == nil { + return + } + return u.PersonalChatID +} + // GetPremiumGiftOptions returns value of PremiumGiftOptions field. func (u *UserFullInfo) GetPremiumGiftOptions() (value []PremiumPaymentOption) { if u == nil { diff --git a/tdapi/tl_user_privacy_setting_gen.go b/tdapi/tl_user_privacy_setting_gen.go index faf5b0af14..448059f8fc 100644 --- a/tdapi/tl_user_privacy_setting_gen.go +++ b/tdapi/tl_user_privacy_setting_gen.go @@ -686,6 +686,137 @@ func (u *UserPrivacySettingShowBio) DecodeTDLibJSON(b tdjson.Decoder) error { }) } +// UserPrivacySettingShowBirthdate represents TL type `userPrivacySettingShowBirthdate#4596b4df`. +type UserPrivacySettingShowBirthdate struct { +} + +// UserPrivacySettingShowBirthdateTypeID is TL type id of UserPrivacySettingShowBirthdate. +const UserPrivacySettingShowBirthdateTypeID = 0x4596b4df + +// construct implements constructor of UserPrivacySettingClass. +func (u UserPrivacySettingShowBirthdate) construct() UserPrivacySettingClass { return &u } + +// Ensuring interfaces in compile-time for UserPrivacySettingShowBirthdate. +var ( + _ bin.Encoder = &UserPrivacySettingShowBirthdate{} + _ bin.Decoder = &UserPrivacySettingShowBirthdate{} + _ bin.BareEncoder = &UserPrivacySettingShowBirthdate{} + _ bin.BareDecoder = &UserPrivacySettingShowBirthdate{} + + _ UserPrivacySettingClass = &UserPrivacySettingShowBirthdate{} +) + +func (u *UserPrivacySettingShowBirthdate) Zero() bool { + if u == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (u *UserPrivacySettingShowBirthdate) String() string { + if u == nil { + return "UserPrivacySettingShowBirthdate(nil)" + } + type Alias UserPrivacySettingShowBirthdate + return fmt.Sprintf("UserPrivacySettingShowBirthdate%+v", Alias(*u)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*UserPrivacySettingShowBirthdate) TypeID() uint32 { + return UserPrivacySettingShowBirthdateTypeID +} + +// TypeName returns name of type in TL schema. +func (*UserPrivacySettingShowBirthdate) TypeName() string { + return "userPrivacySettingShowBirthdate" +} + +// TypeInfo returns info about TL type. +func (u *UserPrivacySettingShowBirthdate) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "userPrivacySettingShowBirthdate", + ID: UserPrivacySettingShowBirthdateTypeID, + } + if u == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (u *UserPrivacySettingShowBirthdate) Encode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode userPrivacySettingShowBirthdate#4596b4df as nil") + } + b.PutID(UserPrivacySettingShowBirthdateTypeID) + return u.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (u *UserPrivacySettingShowBirthdate) EncodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode userPrivacySettingShowBirthdate#4596b4df as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (u *UserPrivacySettingShowBirthdate) Decode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode userPrivacySettingShowBirthdate#4596b4df to nil") + } + if err := b.ConsumeID(UserPrivacySettingShowBirthdateTypeID); err != nil { + return fmt.Errorf("unable to decode userPrivacySettingShowBirthdate#4596b4df: %w", err) + } + return u.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (u *UserPrivacySettingShowBirthdate) DecodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode userPrivacySettingShowBirthdate#4596b4df to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (u *UserPrivacySettingShowBirthdate) EncodeTDLibJSON(b tdjson.Encoder) error { + if u == nil { + return fmt.Errorf("can't encode userPrivacySettingShowBirthdate#4596b4df as nil") + } + b.ObjStart() + b.PutID("userPrivacySettingShowBirthdate") + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (u *UserPrivacySettingShowBirthdate) DecodeTDLibJSON(b tdjson.Decoder) error { + if u == nil { + return fmt.Errorf("can't decode userPrivacySettingShowBirthdate#4596b4df to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("userPrivacySettingShowBirthdate"); err != nil { + return fmt.Errorf("unable to decode userPrivacySettingShowBirthdate#4596b4df: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + // UserPrivacySettingAllowChatInvites represents TL type `userPrivacySettingAllowChatInvites#4bcc1d27`. type UserPrivacySettingAllowChatInvites struct { } @@ -1360,6 +1491,7 @@ const UserPrivacySettingClassName = "UserPrivacySetting" // case *tdapi.UserPrivacySettingShowLinkInForwardedMessages: // userPrivacySettingShowLinkInForwardedMessages#2353b6e6 // case *tdapi.UserPrivacySettingShowPhoneNumber: // userPrivacySettingShowPhoneNumber#d0d1a229 // case *tdapi.UserPrivacySettingShowBio: // userPrivacySettingShowBio#39382761 +// case *tdapi.UserPrivacySettingShowBirthdate: // userPrivacySettingShowBirthdate#4596b4df // case *tdapi.UserPrivacySettingAllowChatInvites: // userPrivacySettingAllowChatInvites#4bcc1d27 // case *tdapi.UserPrivacySettingAllowCalls: // userPrivacySettingAllowCalls#c9f0c705 // case *tdapi.UserPrivacySettingAllowPeerToPeerCalls: // userPrivacySettingAllowPeerToPeerCalls#1502b940 @@ -1431,6 +1563,13 @@ func DecodeUserPrivacySetting(buf *bin.Buffer) (UserPrivacySettingClass, error) return nil, fmt.Errorf("unable to decode UserPrivacySettingClass: %w", err) } return &v, nil + case UserPrivacySettingShowBirthdateTypeID: + // Decoding userPrivacySettingShowBirthdate#4596b4df. + v := UserPrivacySettingShowBirthdate{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode UserPrivacySettingClass: %w", err) + } + return &v, nil case UserPrivacySettingAllowChatInvitesTypeID: // Decoding userPrivacySettingAllowChatInvites#4bcc1d27. v := UserPrivacySettingAllowChatInvites{} @@ -1513,6 +1652,13 @@ func DecodeTDLibJSONUserPrivacySetting(buf tdjson.Decoder) (UserPrivacySettingCl return nil, fmt.Errorf("unable to decode UserPrivacySettingClass: %w", err) } return &v, nil + case "userPrivacySettingShowBirthdate": + // Decoding userPrivacySettingShowBirthdate#4596b4df. + v := UserPrivacySettingShowBirthdate{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode UserPrivacySettingClass: %w", err) + } + return &v, nil case "userPrivacySettingAllowChatInvites": // Decoding userPrivacySettingAllowChatInvites#4bcc1d27. v := UserPrivacySettingAllowChatInvites{} diff --git a/tdapi/tl_user_privacy_setting_rule_gen.go b/tdapi/tl_user_privacy_setting_rule_gen.go index d4b2c3e48c..94bb5acb8e 100644 --- a/tdapi/tl_user_privacy_setting_rule_gen.go +++ b/tdapi/tl_user_privacy_setting_rule_gen.go @@ -293,6 +293,137 @@ func (u *UserPrivacySettingRuleAllowContacts) DecodeTDLibJSON(b tdjson.Decoder) }) } +// UserPrivacySettingRuleAllowPremiumUsers represents TL type `userPrivacySettingRuleAllowPremiumUsers#60ce8541`. +type UserPrivacySettingRuleAllowPremiumUsers struct { +} + +// UserPrivacySettingRuleAllowPremiumUsersTypeID is TL type id of UserPrivacySettingRuleAllowPremiumUsers. +const UserPrivacySettingRuleAllowPremiumUsersTypeID = 0x60ce8541 + +// construct implements constructor of UserPrivacySettingRuleClass. +func (u UserPrivacySettingRuleAllowPremiumUsers) construct() UserPrivacySettingRuleClass { return &u } + +// Ensuring interfaces in compile-time for UserPrivacySettingRuleAllowPremiumUsers. +var ( + _ bin.Encoder = &UserPrivacySettingRuleAllowPremiumUsers{} + _ bin.Decoder = &UserPrivacySettingRuleAllowPremiumUsers{} + _ bin.BareEncoder = &UserPrivacySettingRuleAllowPremiumUsers{} + _ bin.BareDecoder = &UserPrivacySettingRuleAllowPremiumUsers{} + + _ UserPrivacySettingRuleClass = &UserPrivacySettingRuleAllowPremiumUsers{} +) + +func (u *UserPrivacySettingRuleAllowPremiumUsers) Zero() bool { + if u == nil { + return true + } + + return true +} + +// String implements fmt.Stringer. +func (u *UserPrivacySettingRuleAllowPremiumUsers) String() string { + if u == nil { + return "UserPrivacySettingRuleAllowPremiumUsers(nil)" + } + type Alias UserPrivacySettingRuleAllowPremiumUsers + return fmt.Sprintf("UserPrivacySettingRuleAllowPremiumUsers%+v", Alias(*u)) +} + +// TypeID returns type id in TL schema. +// +// See https://core.telegram.org/mtproto/TL-tl#remarks. +func (*UserPrivacySettingRuleAllowPremiumUsers) TypeID() uint32 { + return UserPrivacySettingRuleAllowPremiumUsersTypeID +} + +// TypeName returns name of type in TL schema. +func (*UserPrivacySettingRuleAllowPremiumUsers) TypeName() string { + return "userPrivacySettingRuleAllowPremiumUsers" +} + +// TypeInfo returns info about TL type. +func (u *UserPrivacySettingRuleAllowPremiumUsers) TypeInfo() tdp.Type { + typ := tdp.Type{ + Name: "userPrivacySettingRuleAllowPremiumUsers", + ID: UserPrivacySettingRuleAllowPremiumUsersTypeID, + } + if u == nil { + typ.Null = true + return typ + } + typ.Fields = []tdp.Field{} + return typ +} + +// Encode implements bin.Encoder. +func (u *UserPrivacySettingRuleAllowPremiumUsers) Encode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode userPrivacySettingRuleAllowPremiumUsers#60ce8541 as nil") + } + b.PutID(UserPrivacySettingRuleAllowPremiumUsersTypeID) + return u.EncodeBare(b) +} + +// EncodeBare implements bin.BareEncoder. +func (u *UserPrivacySettingRuleAllowPremiumUsers) EncodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't encode userPrivacySettingRuleAllowPremiumUsers#60ce8541 as nil") + } + return nil +} + +// Decode implements bin.Decoder. +func (u *UserPrivacySettingRuleAllowPremiumUsers) Decode(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode userPrivacySettingRuleAllowPremiumUsers#60ce8541 to nil") + } + if err := b.ConsumeID(UserPrivacySettingRuleAllowPremiumUsersTypeID); err != nil { + return fmt.Errorf("unable to decode userPrivacySettingRuleAllowPremiumUsers#60ce8541: %w", err) + } + return u.DecodeBare(b) +} + +// DecodeBare implements bin.BareDecoder. +func (u *UserPrivacySettingRuleAllowPremiumUsers) DecodeBare(b *bin.Buffer) error { + if u == nil { + return fmt.Errorf("can't decode userPrivacySettingRuleAllowPremiumUsers#60ce8541 to nil") + } + return nil +} + +// EncodeTDLibJSON implements tdjson.TDLibEncoder. +func (u *UserPrivacySettingRuleAllowPremiumUsers) EncodeTDLibJSON(b tdjson.Encoder) error { + if u == nil { + return fmt.Errorf("can't encode userPrivacySettingRuleAllowPremiumUsers#60ce8541 as nil") + } + b.ObjStart() + b.PutID("userPrivacySettingRuleAllowPremiumUsers") + b.Comma() + b.StripComma() + b.ObjEnd() + return nil +} + +// DecodeTDLibJSON implements tdjson.TDLibDecoder. +func (u *UserPrivacySettingRuleAllowPremiumUsers) DecodeTDLibJSON(b tdjson.Decoder) error { + if u == nil { + return fmt.Errorf("can't decode userPrivacySettingRuleAllowPremiumUsers#60ce8541 to nil") + } + + return b.Obj(func(b tdjson.Decoder, key []byte) error { + switch string(key) { + case tdjson.TypeField: + if err := b.ConsumeID("userPrivacySettingRuleAllowPremiumUsers"); err != nil { + return fmt.Errorf("unable to decode userPrivacySettingRuleAllowPremiumUsers#60ce8541: %w", err) + } + default: + return b.Skip() + } + return nil + }) +} + // UserPrivacySettingRuleAllowUsers represents TL type `userPrivacySettingRuleAllowUsers#d1570b70`. type UserPrivacySettingRuleAllowUsers struct { // The user identifiers, total number of users in all rules must not exceed 1000 @@ -1329,6 +1460,7 @@ const UserPrivacySettingRuleClassName = "UserPrivacySettingRule" // switch v := g.(type) { // case *tdapi.UserPrivacySettingRuleAllowAll: // userPrivacySettingRuleAllowAll#8abf1c3f // case *tdapi.UserPrivacySettingRuleAllowContacts: // userPrivacySettingRuleAllowContacts#8f2f2d10 +// case *tdapi.UserPrivacySettingRuleAllowPremiumUsers: // userPrivacySettingRuleAllowPremiumUsers#60ce8541 // case *tdapi.UserPrivacySettingRuleAllowUsers: // userPrivacySettingRuleAllowUsers#d1570b70 // case *tdapi.UserPrivacySettingRuleAllowChatMembers: // userPrivacySettingRuleAllowChatMembers#f249b617 // case *tdapi.UserPrivacySettingRuleRestrictAll: // userPrivacySettingRuleRestrictAll#ac2a9550 @@ -1380,6 +1512,13 @@ func DecodeUserPrivacySettingRule(buf *bin.Buffer) (UserPrivacySettingRuleClass, return nil, fmt.Errorf("unable to decode UserPrivacySettingRuleClass: %w", err) } return &v, nil + case UserPrivacySettingRuleAllowPremiumUsersTypeID: + // Decoding userPrivacySettingRuleAllowPremiumUsers#60ce8541. + v := UserPrivacySettingRuleAllowPremiumUsers{} + if err := v.Decode(buf); err != nil { + return nil, fmt.Errorf("unable to decode UserPrivacySettingRuleClass: %w", err) + } + return &v, nil case UserPrivacySettingRuleAllowUsersTypeID: // Decoding userPrivacySettingRuleAllowUsers#d1570b70. v := UserPrivacySettingRuleAllowUsers{} @@ -1448,6 +1587,13 @@ func DecodeTDLibJSONUserPrivacySettingRule(buf tdjson.Decoder) (UserPrivacySetti return nil, fmt.Errorf("unable to decode UserPrivacySettingRuleClass: %w", err) } return &v, nil + case "userPrivacySettingRuleAllowPremiumUsers": + // Decoding userPrivacySettingRuleAllowPremiumUsers#60ce8541. + v := UserPrivacySettingRuleAllowPremiumUsers{} + if err := v.DecodeTDLibJSON(buf); err != nil { + return nil, fmt.Errorf("unable to decode UserPrivacySettingRuleClass: %w", err) + } + return &v, nil case "userPrivacySettingRuleAllowUsers": // Decoding userPrivacySettingRuleAllowUsers#d1570b70. v := UserPrivacySettingRuleAllowUsers{} diff --git a/tdapi/tl_user_type_gen.go b/tdapi/tl_user_type_gen.go index 40a316ee27..13fcd4af61 100644 --- a/tdapi/tl_user_type_gen.go +++ b/tdapi/tl_user_type_gen.go @@ -293,7 +293,7 @@ func (u *UserTypeDeleted) DecodeTDLibJSON(b tdjson.Decoder) error { }) } -// UserTypeBot represents TL type `userTypeBot#f979e790`. +// UserTypeBot represents TL type `userTypeBot#ae30a83a`. type UserTypeBot struct { // True, if the bot is owned by the current user and can be edited using the methods // toggleBotUsernameIsActive, reorderBotActiveUsernames, setBotProfilePhoto, setBotName, @@ -312,12 +312,14 @@ type UserTypeBot struct { // True, if the location of the user is expected to be sent with every inline query to // this bot NeedLocation bool + // True, if the bot supports connection to Telegram Business accounts + CanConnectToBusiness bool // True, if the bot can be added to attachment or side menu CanBeAddedToAttachmentMenu bool } // UserTypeBotTypeID is TL type id of UserTypeBot. -const UserTypeBotTypeID = 0xf979e790 +const UserTypeBotTypeID = 0xae30a83a // construct implements constructor of UserTypeClass. func (u UserTypeBot) construct() UserTypeClass { return &u } @@ -354,6 +356,9 @@ func (u *UserTypeBot) Zero() bool { if !(u.NeedLocation == false) { return false } + if !(u.CanConnectToBusiness == false) { + return false + } if !(u.CanBeAddedToAttachmentMenu == false) { return false } @@ -417,6 +422,10 @@ func (u *UserTypeBot) TypeInfo() tdp.Type { Name: "NeedLocation", SchemaName: "need_location", }, + { + Name: "CanConnectToBusiness", + SchemaName: "can_connect_to_business", + }, { Name: "CanBeAddedToAttachmentMenu", SchemaName: "can_be_added_to_attachment_menu", @@ -428,7 +437,7 @@ func (u *UserTypeBot) TypeInfo() tdp.Type { // Encode implements bin.Encoder. func (u *UserTypeBot) Encode(b *bin.Buffer) error { if u == nil { - return fmt.Errorf("can't encode userTypeBot#f979e790 as nil") + return fmt.Errorf("can't encode userTypeBot#ae30a83a as nil") } b.PutID(UserTypeBotTypeID) return u.EncodeBare(b) @@ -437,7 +446,7 @@ func (u *UserTypeBot) Encode(b *bin.Buffer) error { // EncodeBare implements bin.BareEncoder. func (u *UserTypeBot) EncodeBare(b *bin.Buffer) error { if u == nil { - return fmt.Errorf("can't encode userTypeBot#f979e790 as nil") + return fmt.Errorf("can't encode userTypeBot#ae30a83a as nil") } b.PutBool(u.CanBeEdited) b.PutBool(u.CanJoinGroups) @@ -445,6 +454,7 @@ func (u *UserTypeBot) EncodeBare(b *bin.Buffer) error { b.PutBool(u.IsInline) b.PutString(u.InlineQueryPlaceholder) b.PutBool(u.NeedLocation) + b.PutBool(u.CanConnectToBusiness) b.PutBool(u.CanBeAddedToAttachmentMenu) return nil } @@ -452,10 +462,10 @@ func (u *UserTypeBot) EncodeBare(b *bin.Buffer) error { // Decode implements bin.Decoder. func (u *UserTypeBot) Decode(b *bin.Buffer) error { if u == nil { - return fmt.Errorf("can't decode userTypeBot#f979e790 to nil") + return fmt.Errorf("can't decode userTypeBot#ae30a83a to nil") } if err := b.ConsumeID(UserTypeBotTypeID); err != nil { - return fmt.Errorf("unable to decode userTypeBot#f979e790: %w", err) + return fmt.Errorf("unable to decode userTypeBot#ae30a83a: %w", err) } return u.DecodeBare(b) } @@ -463,54 +473,61 @@ func (u *UserTypeBot) Decode(b *bin.Buffer) error { // DecodeBare implements bin.BareDecoder. func (u *UserTypeBot) DecodeBare(b *bin.Buffer) error { if u == nil { - return fmt.Errorf("can't decode userTypeBot#f979e790 to nil") + return fmt.Errorf("can't decode userTypeBot#ae30a83a to nil") } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userTypeBot#f979e790: field can_be_edited: %w", err) + return fmt.Errorf("unable to decode userTypeBot#ae30a83a: field can_be_edited: %w", err) } u.CanBeEdited = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userTypeBot#f979e790: field can_join_groups: %w", err) + return fmt.Errorf("unable to decode userTypeBot#ae30a83a: field can_join_groups: %w", err) } u.CanJoinGroups = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userTypeBot#f979e790: field can_read_all_group_messages: %w", err) + return fmt.Errorf("unable to decode userTypeBot#ae30a83a: field can_read_all_group_messages: %w", err) } u.CanReadAllGroupMessages = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userTypeBot#f979e790: field is_inline: %w", err) + return fmt.Errorf("unable to decode userTypeBot#ae30a83a: field is_inline: %w", err) } u.IsInline = value } { value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode userTypeBot#f979e790: field inline_query_placeholder: %w", err) + return fmt.Errorf("unable to decode userTypeBot#ae30a83a: field inline_query_placeholder: %w", err) } u.InlineQueryPlaceholder = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userTypeBot#f979e790: field need_location: %w", err) + return fmt.Errorf("unable to decode userTypeBot#ae30a83a: field need_location: %w", err) } u.NeedLocation = value } { value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userTypeBot#f979e790: field can_be_added_to_attachment_menu: %w", err) + return fmt.Errorf("unable to decode userTypeBot#ae30a83a: field can_connect_to_business: %w", err) + } + u.CanConnectToBusiness = value + } + { + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode userTypeBot#ae30a83a: field can_be_added_to_attachment_menu: %w", err) } u.CanBeAddedToAttachmentMenu = value } @@ -520,7 +537,7 @@ func (u *UserTypeBot) DecodeBare(b *bin.Buffer) error { // EncodeTDLibJSON implements tdjson.TDLibEncoder. func (u *UserTypeBot) EncodeTDLibJSON(b tdjson.Encoder) error { if u == nil { - return fmt.Errorf("can't encode userTypeBot#f979e790 as nil") + return fmt.Errorf("can't encode userTypeBot#ae30a83a as nil") } b.ObjStart() b.PutID("userTypeBot") @@ -543,6 +560,9 @@ func (u *UserTypeBot) EncodeTDLibJSON(b tdjson.Encoder) error { b.FieldStart("need_location") b.PutBool(u.NeedLocation) b.Comma() + b.FieldStart("can_connect_to_business") + b.PutBool(u.CanConnectToBusiness) + b.Comma() b.FieldStart("can_be_added_to_attachment_menu") b.PutBool(u.CanBeAddedToAttachmentMenu) b.Comma() @@ -554,55 +574,61 @@ func (u *UserTypeBot) EncodeTDLibJSON(b tdjson.Encoder) error { // DecodeTDLibJSON implements tdjson.TDLibDecoder. func (u *UserTypeBot) DecodeTDLibJSON(b tdjson.Decoder) error { if u == nil { - return fmt.Errorf("can't decode userTypeBot#f979e790 to nil") + return fmt.Errorf("can't decode userTypeBot#ae30a83a to nil") } return b.Obj(func(b tdjson.Decoder, key []byte) error { switch string(key) { case tdjson.TypeField: if err := b.ConsumeID("userTypeBot"); err != nil { - return fmt.Errorf("unable to decode userTypeBot#f979e790: %w", err) + return fmt.Errorf("unable to decode userTypeBot#ae30a83a: %w", err) } case "can_be_edited": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userTypeBot#f979e790: field can_be_edited: %w", err) + return fmt.Errorf("unable to decode userTypeBot#ae30a83a: field can_be_edited: %w", err) } u.CanBeEdited = value case "can_join_groups": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userTypeBot#f979e790: field can_join_groups: %w", err) + return fmt.Errorf("unable to decode userTypeBot#ae30a83a: field can_join_groups: %w", err) } u.CanJoinGroups = value case "can_read_all_group_messages": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userTypeBot#f979e790: field can_read_all_group_messages: %w", err) + return fmt.Errorf("unable to decode userTypeBot#ae30a83a: field can_read_all_group_messages: %w", err) } u.CanReadAllGroupMessages = value case "is_inline": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userTypeBot#f979e790: field is_inline: %w", err) + return fmt.Errorf("unable to decode userTypeBot#ae30a83a: field is_inline: %w", err) } u.IsInline = value case "inline_query_placeholder": value, err := b.String() if err != nil { - return fmt.Errorf("unable to decode userTypeBot#f979e790: field inline_query_placeholder: %w", err) + return fmt.Errorf("unable to decode userTypeBot#ae30a83a: field inline_query_placeholder: %w", err) } u.InlineQueryPlaceholder = value case "need_location": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userTypeBot#f979e790: field need_location: %w", err) + return fmt.Errorf("unable to decode userTypeBot#ae30a83a: field need_location: %w", err) } u.NeedLocation = value + case "can_connect_to_business": + value, err := b.Bool() + if err != nil { + return fmt.Errorf("unable to decode userTypeBot#ae30a83a: field can_connect_to_business: %w", err) + } + u.CanConnectToBusiness = value case "can_be_added_to_attachment_menu": value, err := b.Bool() if err != nil { - return fmt.Errorf("unable to decode userTypeBot#f979e790: field can_be_added_to_attachment_menu: %w", err) + return fmt.Errorf("unable to decode userTypeBot#ae30a83a: field can_be_added_to_attachment_menu: %w", err) } u.CanBeAddedToAttachmentMenu = value default: @@ -660,6 +686,14 @@ func (u *UserTypeBot) GetNeedLocation() (value bool) { return u.NeedLocation } +// GetCanConnectToBusiness returns value of CanConnectToBusiness field. +func (u *UserTypeBot) GetCanConnectToBusiness() (value bool) { + if u == nil { + return + } + return u.CanConnectToBusiness +} + // GetCanBeAddedToAttachmentMenu returns value of CanBeAddedToAttachmentMenu field. func (u *UserTypeBot) GetCanBeAddedToAttachmentMenu() (value bool) { if u == nil { @@ -813,7 +847,7 @@ const UserTypeClassName = "UserType" // switch v := g.(type) { // case *tdapi.UserTypeRegular: // userTypeRegular#dc51699b // case *tdapi.UserTypeDeleted: // userTypeDeleted#94403d24 -// case *tdapi.UserTypeBot: // userTypeBot#f979e790 +// case *tdapi.UserTypeBot: // userTypeBot#ae30a83a // case *tdapi.UserTypeUnknown: // userTypeUnknown#d4d0613d // default: panic(v) // } @@ -861,7 +895,7 @@ func DecodeUserType(buf *bin.Buffer) (UserTypeClass, error) { } return &v, nil case UserTypeBotTypeID: - // Decoding userTypeBot#f979e790. + // Decoding userTypeBot#ae30a83a. v := UserTypeBot{} if err := v.Decode(buf); err != nil { return nil, fmt.Errorf("unable to decode UserTypeClass: %w", err) @@ -901,7 +935,7 @@ func DecodeTDLibJSONUserType(buf tdjson.Decoder) (UserTypeClass, error) { } return &v, nil case "userTypeBot": - // Decoding userTypeBot#f979e790. + // Decoding userTypeBot#ae30a83a. v := UserTypeBot{} if err := v.DecodeTDLibJSON(buf); err != nil { return nil, fmt.Errorf("unable to decode UserTypeClass: %w", err) diff --git a/tdapi/tl_usernames_gen.go b/tdapi/tl_usernames_gen.go index 0d2a70d39d..240f3ef342 100644 --- a/tdapi/tl_usernames_gen.go +++ b/tdapi/tl_usernames_gen.go @@ -40,7 +40,8 @@ type Usernames struct { // List of currently disabled usernames; the username can be activated with // toggleUsernameIsActive, toggleBotUsernameIsActive, or toggleSupergroupUsernameIsActive DisabledUsernames []string - // The active username, which can be changed with setUsername or setSupergroupUsername + // The active username, which can be changed with setUsername or setSupergroupUsername. + // Information about other active usernames can be received using getCollectibleItemInfo EditableUsername string }