From aafe7c1308b4e1709ea41f3e7bad95603ce3dbf5 Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Sun, 6 Dec 2020 22:03:08 +0100 Subject: [PATCH] Header files for TDLib 1.7 --- tdlib/include/td/telegram/Client.h | 140 +- tdlib/include/td/telegram/td_api.h | 6703 +++++++++++++------- tdlib/include/td/telegram/td_api.hpp | 698 +- tdlib/include/td/telegram/td_json_client.h | 78 +- tdlib/include/td/tl/TlObject.h | 19 +- 5 files changed, 5120 insertions(+), 2518 deletions(-) diff --git a/tdlib/include/td/telegram/Client.h b/tdlib/include/td/telegram/Client.h index ac49f15..abc5048 100644 --- a/tdlib/include/td/telegram/Client.h +++ b/tdlib/include/td/telegram/Client.h @@ -22,10 +22,10 @@ namespace td { * The TDLib instance is created for the lifetime of the Client object. * Requests to TDLib can be sent using the Client::send method from any thread. * New updates and responses to requests can be received using the Client::receive method from any thread, - * this function shouldn't be called simultaneously from two different threads. Also note that all updates and + * this function must not be called simultaneously from two different threads. Also note that all updates and * responses to requests should be applied in the same order as they were received, to ensure consistency. * Given this information, it's advisable to call this function from a dedicated thread. - * Some service TDLib requests can be executed synchronously from any thread by using the Client::execute method. + * Some service TDLib requests can be executed synchronously from any thread using the Client::execute method. * * General pattern of usage: * \code @@ -84,7 +84,7 @@ class Client final { */ struct Response { /** - * TDLib request identifier, which corresponds to the response or 0 for incoming updates from TDLib. + * TDLib request identifier, which corresponds to the response, or 0 for incoming updates from TDLib. */ std::uint64_t id; @@ -131,4 +131,138 @@ class Client final { std::unique_ptr impl_; }; +/** + * The future native C++ interface for interaction with TDLib. + * + * A TDLib client instance can be created through the method ClientManager::create_client_id. + * Requests can be sent using the method ClientManager::send from any thread. + * New updates and responses to requests can be received using the method ClientManager::receive from any thread after + * the first request has been sent to the client instance. ClientManager::receive must not be called simultaneously from + * two different threads. Also note that all updates and responses to requests should be applied in the same order as + * they were received, to ensure consistency. + * Some TDLib requests can be executed synchronously from any thread using the method ClientManager::execute. + * + * General pattern of usage: + * \code + * td::ClientManager manager; + * auto client_id = manager.create_client_id(); + * // somehow share the manager and the client_id with other threads, + * // which will be able to send requests via manager.send(client_id, ...) + * + * // send some dummy requests to the new instance to activate it + * manager.send(client_id, ...); + * + * const double WAIT_TIMEOUT = 10.0; // seconds + * while (true) { + * auto response = manager.receive(WAIT_TIMEOUT); + * if (response.object == nullptr) { + * continue; + * } + * + * if (response.request_id == 0) { + * // process response.object as an incoming update of the type td_api::Update for the client response.client_id + * } else { + * // process response.object as an answer to a request response.request_id for the client response.client_id + * } + * } + * \endcode + */ +class ClientManager final { + public: + /** + * Creates a new TDLib client manager. + */ + ClientManager(); + + /** + * Opaque TDLib client instance identifier. + */ + using ClientId = std::int32_t; + + /** + * Request identifier. + * Responses to TDLib requests will have the same request id as the corresponding request. + * Updates from TDLib will have the request_id == 0, incoming requests are thus not allowed to have request_id == 0. + */ + using RequestId = std::uint64_t; + + /** + * Returns an opaque identifier of a new TDLib instance. + * The TDLib instance will not send updates until the first request is sent to it. + * \return Opaque identifier of a new TDLib instance. + */ + ClientId create_client_id(); + + /** + * Sends request to TDLib. May be called from any thread. + * \param[in] client_id TDLib client instance identifier. + * \param[in] request_id Request identifier. Must be non-zero. + * \param[in] request Request to TDLib. + */ + void send(ClientId client_id, RequestId request_id, td_api::object_ptr &&request); + + /** + * A response to a request, or an incoming update from TDLib. + */ + struct Response { + /** + * TDLib client instance identifier, for which the response was received. + */ + ClientId client_id; + + /** + * Request identifier, to which the response corresponds, or 0 for incoming updates from TDLib. + */ + RequestId request_id; + + /** + * TDLib API object representing a response to a TDLib request or an incoming update. + */ + td_api::object_ptr object; + }; + + /** + * Receives incoming updates and responses to requests from TDLib. May be called from any thread, but must not be + * called simultaneously from two different threads. + * \param[in] timeout The maximum number of seconds allowed for this function to wait for new data. + * \return An incoming update or response to a request. The object returned in the response may be a nullptr + * if the timeout expires. + */ + Response receive(double timeout); + + /** + * Synchronously executes a TDLib request. + * A request can be executed synchronously, only if it is documented with "Can be called synchronously". + * \param[in] request Request to the TDLib. + * \return The request response. + */ + static td_api::object_ptr execute(td_api::object_ptr &&request); + + /** + * Destroys the client manager and all TDLib client instances managed by it. + */ + ~ClientManager(); + + /** + * Move constructor. + */ + ClientManager(ClientManager &&other); + + /** + * Move assignment operator. + */ + ClientManager &operator=(ClientManager &&other); + + /** + * Returns a pointer to a singleton ClientManager instance. + * \return A unique singleton ClientManager instance. + */ + static ClientManager *get_manager_singleton(); + + private: + friend class Client; + class Impl; + std::unique_ptr impl_; +}; + } // namespace td diff --git a/tdlib/include/td/telegram/td_api.h b/tdlib/include/td/telegram/td_api.h index 9c8b66e..6053610 100644 --- a/tdlib/include/td/telegram/td_api.h +++ b/tdlib/include/td/telegram/td_api.h @@ -13,6 +13,17 @@ class TlStorerToString; namespace td_api { +using int32 = std::int32_t; +using int53 = std::int64_t; +using int64 = std::int64_t; + +using string = std::string; + +using bytes = std::string; + +template +using array = std::vector; + using BaseObject = ::td::TlObject; template @@ -43,6 +54,8 @@ class accountTtl; class address; +class animatedChatPhoto; + class animation; class animations; @@ -67,6 +80,10 @@ class BackgroundType; class backgrounds; +class bankCardActionOpenUrl; + +class bankCardInfo; + class basicGroup; class basicGroupFullInfo; @@ -77,8 +94,6 @@ class botInfo; class call; -class callConnection; - class CallDiscardReason; class callId; @@ -87,6 +102,10 @@ class CallProblem; class callProtocol; +class callServer; + +class CallServerType; + class CallState; class callbackQueryAnswer; @@ -113,12 +132,18 @@ class chatEventLogFilters; class chatEvents; +class chatFilter; + +class chatFilterInfo; + class chatInviteLink; class chatInviteLinkInfo; class ChatList; +class chatLists; + class chatLocation; class chatMember; @@ -137,8 +162,26 @@ class chatPermissions; class chatPhoto; +class chatPhotoInfo; + +class chatPhotos; + +class chatPosition; + class ChatReportReason; +class ChatSource; + +class ChatStatistics; + +class chatStatisticsAdministratorActionsInfo; + +class chatStatisticsInviterInfo; + +class chatStatisticsMessageInteractionInfo; + +class chatStatisticsMessageSenderInfo; + class ChatType; class chats; @@ -157,18 +200,26 @@ class contact; class count; +class countries; + +class countryInfo; + class customRequestResult; class databaseStatistics; class date; +class dateRange; + class datedFile; class deepLinkInfo; class DeviceToken; +class DiceStickers; + class document; class draftMessage; @@ -217,6 +268,8 @@ class inlineQueryResults; class InputBackground; +class InputChatPhoto; + class InputCredentials; class InputFile; @@ -235,7 +288,7 @@ class InputPassportElementErrorSource; class inputPersonalDocument; -class inputSticker; +class InputSticker; class inputThumbnail; @@ -281,16 +334,34 @@ class message; class MessageContent; +class messageCopyOptions; + class messageForwardInfo; class MessageForwardOrigin; +class messageInteractionInfo; + +class messageLink; + class messageLinkInfo; +class messageReplyInfo; + class MessageSchedulingState; +class messageSendOptions; + +class MessageSender; + +class messageSenders; + class MessageSendingState; +class messageStatistics; + +class messageThreadInfo; + class messages; class minithumbnail; @@ -365,6 +436,8 @@ class personalDocument; class phoneNumberAuthenticationSettings; +class phoneNumberInfo; + class photo; class photoSize; @@ -385,12 +458,14 @@ class ProxyType; class PublicChatType; -class publicMessageLink; - class PushMessageContent; class pushReceiverId; +class recommendedChatFilter; + +class recommendedChatFilters; + class recoveryEmailAddress; class remoteFile; @@ -411,14 +486,16 @@ class secretChat; class SecretChatState; -class sendMessageOptions; - class session; class sessions; class shippingOption; +class StatisticalGraph; + +class statisticalValue; + class sticker; class stickerSet; @@ -437,6 +514,8 @@ class storageStatisticsByFileType; class storageStatisticsFast; +class SuggestedAction; + class supergroup; class supergroupFullInfo; @@ -479,6 +558,10 @@ class TextEntityType; class TextParseMode; +class thumbnail; + +class ThumbnailFormat; + class TopChatCategory; class Update; @@ -495,10 +578,6 @@ class UserPrivacySettingRule; class userPrivacySettingRules; -class userProfilePhoto; - -class userProfilePhotos; - class UserStatus; class UserType; @@ -531,11 +610,11 @@ class Function: public TlObject { class accountTtl final : public Object { public: - std::int32_t days_; + int32 days_; accountTtl(); - explicit accountTtl(std::int32_t days_); + explicit accountTtl(int32 days_); static const std::int32_t ID = 1324495492; std::int32_t get_id() const final { @@ -547,16 +626,16 @@ class accountTtl final : public Object { class address final : public Object { public: - std::string country_code_; - std::string state_; - std::string city_; - std::string street_line1_; - std::string street_line2_; - std::string postal_code_; + string country_code_; + string state_; + string city_; + string street_line1_; + string street_line2_; + string postal_code_; address(); - address(std::string const &country_code_, std::string const &state_, std::string const &city_, std::string const &street_line1_, std::string const &street_line2_, std::string const &postal_code_); + address(string const &country_code_, string const &state_, string const &city_, string const &street_line1_, string const &street_line2_, string const &postal_code_); static const std::int32_t ID = -2043654342; std::int32_t get_id() const final { @@ -566,22 +645,41 @@ class address final : public Object { void store(TlStorerToString &s, const char *field_name) const final; }; +class animatedChatPhoto final : public Object { + public: + int32 length_; + object_ptr file_; + double main_frame_timestamp_; + + animatedChatPhoto(); + + animatedChatPhoto(int32 length_, object_ptr &&file_, double main_frame_timestamp_); + + static const std::int32_t ID = 191994926; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class animation final : public Object { public: - std::int32_t duration_; - std::int32_t width_; - std::int32_t height_; - std::string file_name_; - std::string mime_type_; + int32 duration_; + int32 width_; + int32 height_; + string file_name_; + string mime_type_; + bool has_stickers_; object_ptr minithumbnail_; - object_ptr thumbnail_; + object_ptr thumbnail_; object_ptr animation_; animation(); - animation(std::int32_t duration_, std::int32_t width_, std::int32_t height_, std::string const &file_name_, std::string const &mime_type_, object_ptr &&minithumbnail_, object_ptr &&thumbnail_, object_ptr &&animation_); + animation(int32 duration_, int32 width_, int32 height_, string const &file_name_, string const &mime_type_, bool has_stickers_, object_ptr &&minithumbnail_, object_ptr &&thumbnail_, object_ptr &&animation_); - static const std::int32_t ID = -1629245379; + static const std::int32_t ID = -872359106; std::int32_t get_id() const final { return ID; } @@ -591,11 +689,11 @@ class animation final : public Object { class animations final : public Object { public: - std::vector> animations_; + array> animations_; animations(); - explicit animations(std::vector> &&animations_); + explicit animations(array> &&animations_); static const std::int32_t ID = 344216945; std::int32_t get_id() const final { @@ -607,20 +705,20 @@ class animations final : public Object { class audio final : public Object { public: - std::int32_t duration_; - std::string title_; - std::string performer_; - std::string file_name_; - std::string mime_type_; + int32 duration_; + string title_; + string performer_; + string file_name_; + string mime_type_; object_ptr album_cover_minithumbnail_; - object_ptr album_cover_thumbnail_; + object_ptr album_cover_thumbnail_; object_ptr audio_; audio(); - audio(std::int32_t duration_, std::string const &title_, std::string const &performer_, std::string const &file_name_, std::string const &mime_type_, object_ptr &&album_cover_minithumbnail_, object_ptr &&album_cover_thumbnail_, object_ptr &&audio_); + audio(int32 duration_, string const &title_, string const &performer_, string const &file_name_, string const &mime_type_, object_ptr &&album_cover_minithumbnail_, object_ptr &&album_cover_thumbnail_, object_ptr &&audio_); - static const std::int32_t ID = 1475294302; + static const std::int32_t ID = -1179334690; std::int32_t get_id() const final { return ID; } @@ -630,14 +728,14 @@ class audio final : public Object { class authenticationCodeInfo final : public Object { public: - std::string phone_number_; + string phone_number_; object_ptr type_; object_ptr next_type_; - std::int32_t timeout_; + int32 timeout_; authenticationCodeInfo(); - authenticationCodeInfo(std::string const &phone_number_, object_ptr &&type_, object_ptr &&next_type_, std::int32_t timeout_); + authenticationCodeInfo(string const &phone_number_, object_ptr &&type_, object_ptr &&next_type_, int32 timeout_); static const std::int32_t ID = -860345416; std::int32_t get_id() const final { @@ -653,11 +751,11 @@ class AuthenticationCodeType: public Object { class authenticationCodeTypeTelegramMessage final : public AuthenticationCodeType { public: - std::int32_t length_; + int32 length_; authenticationCodeTypeTelegramMessage(); - explicit authenticationCodeTypeTelegramMessage(std::int32_t length_); + explicit authenticationCodeTypeTelegramMessage(int32 length_); static const std::int32_t ID = 2079628074; std::int32_t get_id() const final { @@ -669,11 +767,11 @@ class authenticationCodeTypeTelegramMessage final : public AuthenticationCodeTyp class authenticationCodeTypeSms final : public AuthenticationCodeType { public: - std::int32_t length_; + int32 length_; authenticationCodeTypeSms(); - explicit authenticationCodeTypeSms(std::int32_t length_); + explicit authenticationCodeTypeSms(int32 length_); static const std::int32_t ID = 962650760; std::int32_t get_id() const final { @@ -685,11 +783,11 @@ class authenticationCodeTypeSms final : public AuthenticationCodeType { class authenticationCodeTypeCall final : public AuthenticationCodeType { public: - std::int32_t length_; + int32 length_; authenticationCodeTypeCall(); - explicit authenticationCodeTypeCall(std::int32_t length_); + explicit authenticationCodeTypeCall(int32 length_); static const std::int32_t ID = 1636265063; std::int32_t get_id() const final { @@ -701,11 +799,11 @@ class authenticationCodeTypeCall final : public AuthenticationCodeType { class authenticationCodeTypeFlashCall final : public AuthenticationCodeType { public: - std::string pattern_; + string pattern_; authenticationCodeTypeFlashCall(); - explicit authenticationCodeTypeFlashCall(std::string const &pattern_); + explicit authenticationCodeTypeFlashCall(string const &pattern_); static const std::int32_t ID = 1395882402; std::int32_t get_id() const final { @@ -779,11 +877,11 @@ class authorizationStateWaitCode final : public AuthorizationState { class authorizationStateWaitOtherDeviceConfirmation final : public AuthorizationState { public: - std::string link_; + string link_; authorizationStateWaitOtherDeviceConfirmation(); - explicit authorizationStateWaitOtherDeviceConfirmation(std::string const &link_); + explicit authorizationStateWaitOtherDeviceConfirmation(string const &link_); static const std::int32_t ID = 860166378; std::int32_t get_id() const final { @@ -811,13 +909,13 @@ class authorizationStateWaitRegistration final : public AuthorizationState { class authorizationStateWaitPassword final : public AuthorizationState { public: - std::string password_hint_; + string password_hint_; bool has_recovery_email_address_; - std::string recovery_email_address_pattern_; + string recovery_email_address_pattern_; authorizationStateWaitPassword(); - authorizationStateWaitPassword(std::string const &password_hint_, bool has_recovery_email_address_, std::string const &recovery_email_address_pattern_); + authorizationStateWaitPassword(string const &password_hint_, bool has_recovery_email_address_, string const &recovery_email_address_pattern_); static const std::int32_t ID = 187548796; std::int32_t get_id() const final { @@ -882,17 +980,17 @@ class authorizationStateClosed final : public AuthorizationState { class autoDownloadSettings final : public Object { public: bool is_auto_download_enabled_; - std::int32_t max_photo_file_size_; - std::int32_t max_video_file_size_; - std::int32_t max_other_file_size_; - std::int32_t video_upload_bitrate_; + int32 max_photo_file_size_; + int32 max_video_file_size_; + int32 max_other_file_size_; + int32 video_upload_bitrate_; bool preload_large_videos_; bool preload_next_audio_; bool use_less_data_for_calls_; autoDownloadSettings(); - autoDownloadSettings(bool is_auto_download_enabled_, std::int32_t max_photo_file_size_, std::int32_t max_video_file_size_, std::int32_t max_other_file_size_, std::int32_t video_upload_bitrate_, bool preload_large_videos_, bool preload_next_audio_, bool use_less_data_for_calls_); + autoDownloadSettings(bool is_auto_download_enabled_, int32 max_photo_file_size_, int32 max_video_file_size_, int32 max_other_file_size_, int32 video_upload_bitrate_, bool preload_large_videos_, bool preload_next_audio_, bool use_less_data_for_calls_); static const std::int32_t ID = -2144418333; std::int32_t get_id() const final { @@ -922,16 +1020,16 @@ class autoDownloadSettingsPresets final : public Object { class background final : public Object { public: - std::int64_t id_; + int64 id_; bool is_default_; bool is_dark_; - std::string name_; + string name_; object_ptr document_; object_ptr type_; background(); - background(std::int64_t id_, bool is_default_, bool is_dark_, std::string const &name_, object_ptr &&document_, object_ptr &&type_); + background(int64 id_, bool is_default_, bool is_dark_, string const &name_, object_ptr &&document_, object_ptr &&type_); static const std::int32_t ID = -429971172; std::int32_t get_id() const final { @@ -947,11 +1045,11 @@ class BackgroundFill: public Object { class backgroundFillSolid final : public BackgroundFill { public: - std::int32_t color_; + int32 color_; backgroundFillSolid(); - explicit backgroundFillSolid(std::int32_t color_); + explicit backgroundFillSolid(int32 color_); static const std::int32_t ID = 1010678813; std::int32_t get_id() const final { @@ -963,13 +1061,13 @@ class backgroundFillSolid final : public BackgroundFill { class backgroundFillGradient final : public BackgroundFill { public: - std::int32_t top_color_; - std::int32_t bottom_color_; - std::int32_t rotation_angle_; + int32 top_color_; + int32 bottom_color_; + int32 rotation_angle_; backgroundFillGradient(); - backgroundFillGradient(std::int32_t top_color_, std::int32_t bottom_color_, std::int32_t rotation_angle_); + backgroundFillGradient(int32 top_color_, int32 bottom_color_, int32 rotation_angle_); static const std::int32_t ID = -1839206017; std::int32_t get_id() const final { @@ -1003,12 +1101,12 @@ class backgroundTypeWallpaper final : public BackgroundType { class backgroundTypePattern final : public BackgroundType { public: object_ptr fill_; - std::int32_t intensity_; + int32 intensity_; bool is_moving_; backgroundTypePattern(); - backgroundTypePattern(object_ptr &&fill_, std::int32_t intensity_, bool is_moving_); + backgroundTypePattern(object_ptr &&fill_, int32 intensity_, bool is_moving_); static const std::int32_t ID = 649993914; std::int32_t get_id() const final { @@ -1036,11 +1134,11 @@ class backgroundTypeFill final : public BackgroundType { class backgrounds final : public Object { public: - std::vector> backgrounds_; + array> backgrounds_; backgrounds(); - explicit backgrounds(std::vector> &&backgrounds_); + explicit backgrounds(array> &&backgrounds_); static const std::int32_t ID = 724728704; std::int32_t get_id() const final { @@ -1050,17 +1148,51 @@ class backgrounds final : public Object { void store(TlStorerToString &s, const char *field_name) const final; }; +class bankCardActionOpenUrl final : public Object { + public: + string text_; + string url_; + + bankCardActionOpenUrl(); + + bankCardActionOpenUrl(string const &text_, string const &url_); + + static const std::int32_t ID = -196454267; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class bankCardInfo final : public Object { + public: + string title_; + array> actions_; + + bankCardInfo(); + + bankCardInfo(string const &title_, array> &&actions_); + + static const std::int32_t ID = -2116647730; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class basicGroup final : public Object { public: - std::int32_t id_; - std::int32_t member_count_; + int32 id_; + int32 member_count_; object_ptr status_; bool is_active_; - std::int32_t upgraded_to_supergroup_id_; + int32 upgraded_to_supergroup_id_; basicGroup(); - basicGroup(std::int32_t id_, std::int32_t member_count_, object_ptr &&status_, bool is_active_, std::int32_t upgraded_to_supergroup_id_); + basicGroup(int32 id_, int32 member_count_, object_ptr &&status_, bool is_active_, int32 upgraded_to_supergroup_id_); static const std::int32_t ID = -317839045; std::int32_t get_id() const final { @@ -1072,16 +1204,17 @@ class basicGroup final : public Object { class basicGroupFullInfo final : public Object { public: - std::string description_; - std::int32_t creator_user_id_; - std::vector> members_; - std::string invite_link_; + object_ptr photo_; + string description_; + int32 creator_user_id_; + array> members_; + string invite_link_; basicGroupFullInfo(); - basicGroupFullInfo(std::string const &description_, std::int32_t creator_user_id_, std::vector> &&members_, std::string const &invite_link_); + basicGroupFullInfo(object_ptr &&photo_, string const &description_, int32 creator_user_id_, array> &&members_, string const &invite_link_); - static const std::int32_t ID = 161500149; + static const std::int32_t ID = -127204719; std::int32_t get_id() const final { return ID; } @@ -1091,12 +1224,12 @@ class basicGroupFullInfo final : public Object { class botCommand final : public Object { public: - std::string command_; - std::string description_; + string command_; + string description_; botCommand(); - botCommand(std::string const &command_, std::string const &description_); + botCommand(string const &command_, string const &description_); static const std::int32_t ID = -1032140601; std::int32_t get_id() const final { @@ -1108,12 +1241,12 @@ class botCommand final : public Object { class botInfo final : public Object { public: - std::string description_; - std::vector> commands_; + string description_; + array> commands_; botInfo(); - botInfo(std::string const &description_, std::vector> &&commands_); + botInfo(string const &description_, array> &&commands_); static const std::int32_t ID = 1296528907; std::int32_t get_id() const final { @@ -1125,36 +1258,17 @@ class botInfo final : public Object { class call final : public Object { public: - std::int32_t id_; - std::int32_t user_id_; + int32 id_; + int32 user_id_; bool is_outgoing_; + bool is_video_; object_ptr state_; call(); - call(std::int32_t id_, std::int32_t user_id_, bool is_outgoing_, object_ptr &&state_); + call(int32 id_, int32 user_id_, bool is_outgoing_, bool is_video_, object_ptr &&state_); - static const std::int32_t ID = -1837599107; - std::int32_t get_id() const final { - return ID; - } - - void store(TlStorerToString &s, const char *field_name) const final; -}; - -class callConnection final : public Object { - public: - std::int64_t id_; - std::string ip_; - std::string ipv6_; - std::int32_t port_; - std::string peer_tag_; - - callConnection(); - - callConnection(std::int64_t id_, std::string const &ip_, std::string const &ipv6_, std::int32_t port_, std::string const &peer_tag_); - - static const std::int32_t ID = 1318542714; + static const std::int32_t ID = 1504070790; std::int32_t get_id() const final { return ID; } @@ -1233,11 +1347,11 @@ class callDiscardReasonHungUp final : public CallDiscardReason { class callId final : public Object { public: - std::int32_t id_; + int32 id_; callId(); - explicit callId(std::int32_t id_); + explicit callId(int32 id_); static const std::int32_t ID = 65717769; std::int32_t get_id() const final { @@ -1342,18 +1456,104 @@ class callProblemDropped final : public CallProblem { void store(TlStorerToString &s, const char *field_name) const final; }; +class callProblemDistortedVideo final : public CallProblem { + public: + + callProblemDistortedVideo(); + + static const std::int32_t ID = 385245706; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class callProblemPixelatedVideo final : public CallProblem { + public: + + callProblemPixelatedVideo(); + + static const std::int32_t ID = 2115315411; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class callProtocol final : public Object { public: bool udp_p2p_; bool udp_reflector_; - std::int32_t min_layer_; - std::int32_t max_layer_; + int32 min_layer_; + int32 max_layer_; + array library_versions_; callProtocol(); - callProtocol(bool udp_p2p_, bool udp_reflector_, std::int32_t min_layer_, std::int32_t max_layer_); + callProtocol(bool udp_p2p_, bool udp_reflector_, int32 min_layer_, int32 max_layer_, array &&library_versions_); - static const std::int32_t ID = -1042830667; + static const std::int32_t ID = -1075562897; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class callServer final : public Object { + public: + int64 id_; + string ip_address_; + string ipv6_address_; + int32 port_; + object_ptr type_; + + callServer(); + + callServer(int64 id_, string const &ip_address_, string const &ipv6_address_, int32 port_, object_ptr &&type_); + + static const std::int32_t ID = 1865932695; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class CallServerType: public Object { + public: +}; + +class callServerTypeTelegramReflector final : public CallServerType { + public: + bytes peer_tag_; + + callServerTypeTelegramReflector(); + + explicit callServerTypeTelegramReflector(bytes const &peer_tag_); + + static const std::int32_t ID = -1507850700; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class callServerTypeWebrtc final : public CallServerType { + public: + string username_; + string password_; + bool supports_turn_; + bool supports_stun_; + + callServerTypeWebrtc(); + + callServerTypeWebrtc(string const &username_, string const &password_, bool supports_turn_, bool supports_stun_); + + static const std::int32_t ID = 1250622821; std::int32_t get_id() const final { return ID; } @@ -1398,17 +1598,17 @@ class callStateExchangingKeys final : public CallState { class callStateReady final : public CallState { public: object_ptr protocol_; - std::vector> connections_; - std::string config_; - std::string encryption_key_; - std::vector emojis_; + array> servers_; + string config_; + bytes encryption_key_; + array emojis_; bool allow_p2p_; callStateReady(); - callStateReady(object_ptr &&protocol_, std::vector> &&connections_, std::string const &config_, std::string const &encryption_key_, std::vector &&emojis_, bool allow_p2p_); + callStateReady(object_ptr &&protocol_, array> &&servers_, string const &config_, bytes const &encryption_key_, array &&emojis_, bool allow_p2p_); - static const std::int32_t ID = 1848397705; + static const std::int32_t ID = -2000107571; std::int32_t get_id() const final { return ID; } @@ -1465,13 +1665,13 @@ class callStateError final : public CallState { class callbackQueryAnswer final : public Object { public: - std::string text_; + string text_; bool show_alert_; - std::string url_; + string url_; callbackQueryAnswer(); - callbackQueryAnswer(std::string const &text_, bool show_alert_, std::string const &url_); + callbackQueryAnswer(string const &text_, bool show_alert_, string const &url_); static const std::int32_t ID = 360867933; std::int32_t get_id() const final { @@ -1487,11 +1687,11 @@ class CallbackQueryPayload: public Object { class callbackQueryPayloadData final : public CallbackQueryPayload { public: - std::string data_; + bytes data_; callbackQueryPayloadData(); - explicit callbackQueryPayloadData(std::string const &data_); + explicit callbackQueryPayloadData(bytes const &data_); static const std::int32_t ID = -1977729946; std::int32_t get_id() const final { @@ -1501,13 +1701,30 @@ class callbackQueryPayloadData final : public CallbackQueryPayload { void store(TlStorerToString &s, const char *field_name) const final; }; +class callbackQueryPayloadDataWithPassword final : public CallbackQueryPayload { + public: + string password_; + bytes data_; + + callbackQueryPayloadDataWithPassword(); + + callbackQueryPayloadDataWithPassword(string const &password_, bytes const &data_); + + static const std::int32_t ID = 1340266738; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class callbackQueryPayloadGame final : public CallbackQueryPayload { public: - std::string game_short_name_; + string game_short_name_; callbackQueryPayloadGame(); - explicit callbackQueryPayloadGame(std::string const &game_short_name_); + explicit callbackQueryPayloadGame(string const &game_short_name_); static const std::int32_t ID = 1303571512; std::int32_t get_id() const final { @@ -1549,11 +1766,11 @@ class canTransferOwnershipResultPasswordNeeded final : public CanTransferOwnersh class canTransferOwnershipResultPasswordTooFresh final : public CanTransferOwnershipResult { public: - std::int32_t retry_after_; + int32 retry_after_; canTransferOwnershipResultPasswordTooFresh(); - explicit canTransferOwnershipResultPasswordTooFresh(std::int32_t retry_after_); + explicit canTransferOwnershipResultPasswordTooFresh(int32 retry_after_); static const std::int32_t ID = 811440913; std::int32_t get_id() const final { @@ -1565,11 +1782,11 @@ class canTransferOwnershipResultPasswordTooFresh final : public CanTransferOwner class canTransferOwnershipResultSessionTooFresh final : public CanTransferOwnershipResult { public: - std::int32_t retry_after_; + int32 retry_after_; canTransferOwnershipResultSessionTooFresh(); - explicit canTransferOwnershipResultSessionTooFresh(std::int32_t retry_after_); + explicit canTransferOwnershipResultSessionTooFresh(int32 retry_after_); static const std::int32_t ID = 984664289; std::int32_t get_id() const final { @@ -1581,38 +1798,35 @@ class canTransferOwnershipResultSessionTooFresh final : public CanTransferOwners class chat final : public Object { public: - std::int64_t id_; + int53 id_; object_ptr type_; - object_ptr chat_list_; - std::string title_; - object_ptr photo_; + string title_; + object_ptr photo_; object_ptr permissions_; object_ptr last_message_; - std::int64_t order_; - bool is_pinned_; + array> positions_; bool is_marked_as_unread_; - bool is_sponsored_; + bool is_blocked_; bool has_scheduled_messages_; bool can_be_deleted_only_for_self_; bool can_be_deleted_for_all_users_; bool can_be_reported_; bool default_disable_notification_; - std::int32_t unread_count_; - std::int64_t last_read_inbox_message_id_; - std::int64_t last_read_outbox_message_id_; - std::int32_t unread_mention_count_; + int32 unread_count_; + int53 last_read_inbox_message_id_; + int53 last_read_outbox_message_id_; + int32 unread_mention_count_; object_ptr notification_settings_; object_ptr action_bar_; - std::int64_t pinned_message_id_; - std::int64_t reply_markup_message_id_; + int53 reply_markup_message_id_; object_ptr draft_message_; - std::string client_data_; + string client_data_; chat(); - chat(std::int64_t id_, object_ptr &&type_, object_ptr &&chat_list_, std::string const &title_, object_ptr &&photo_, object_ptr &&permissions_, object_ptr &&last_message_, std::int64_t order_, bool is_pinned_, bool is_marked_as_unread_, bool is_sponsored_, bool has_scheduled_messages_, bool can_be_deleted_only_for_self_, bool can_be_deleted_for_all_users_, bool can_be_reported_, bool default_disable_notification_, std::int32_t unread_count_, std::int64_t last_read_inbox_message_id_, std::int64_t last_read_outbox_message_id_, std::int32_t unread_mention_count_, object_ptr &¬ification_settings_, object_ptr &&action_bar_, std::int64_t pinned_message_id_, std::int64_t reply_markup_message_id_, object_ptr &&draft_message_, std::string const &client_data_); + chat(int53 id_, object_ptr &&type_, string const &title_, object_ptr &&photo_, object_ptr &&permissions_, object_ptr &&last_message_, array> &&positions_, bool is_marked_as_unread_, bool is_blocked_, bool has_scheduled_messages_, bool can_be_deleted_only_for_self_, bool can_be_deleted_for_all_users_, bool can_be_reported_, bool default_disable_notification_, int32 unread_count_, int53 last_read_inbox_message_id_, int53 last_read_outbox_message_id_, int32 unread_mention_count_, object_ptr &¬ification_settings_, object_ptr &&action_bar_, int53 reply_markup_message_id_, object_ptr &&draft_message_, string const &client_data_); - static const std::int32_t ID = -861487386; + static const std::int32_t ID = 1811058223; std::int32_t get_id() const final { return ID; } @@ -1652,11 +1866,11 @@ class chatActionRecordingVideo final : public ChatAction { class chatActionUploadingVideo final : public ChatAction { public: - std::int32_t progress_; + int32 progress_; chatActionUploadingVideo(); - explicit chatActionUploadingVideo(std::int32_t progress_); + explicit chatActionUploadingVideo(int32 progress_); static const std::int32_t ID = 1234185270; std::int32_t get_id() const final { @@ -1681,11 +1895,11 @@ class chatActionRecordingVoiceNote final : public ChatAction { class chatActionUploadingVoiceNote final : public ChatAction { public: - std::int32_t progress_; + int32 progress_; chatActionUploadingVoiceNote(); - explicit chatActionUploadingVoiceNote(std::int32_t progress_); + explicit chatActionUploadingVoiceNote(int32 progress_); static const std::int32_t ID = -613643666; std::int32_t get_id() const final { @@ -1697,11 +1911,11 @@ class chatActionUploadingVoiceNote final : public ChatAction { class chatActionUploadingPhoto final : public ChatAction { public: - std::int32_t progress_; + int32 progress_; chatActionUploadingPhoto(); - explicit chatActionUploadingPhoto(std::int32_t progress_); + explicit chatActionUploadingPhoto(int32 progress_); static const std::int32_t ID = 654240583; std::int32_t get_id() const final { @@ -1713,11 +1927,11 @@ class chatActionUploadingPhoto final : public ChatAction { class chatActionUploadingDocument final : public ChatAction { public: - std::int32_t progress_; + int32 progress_; chatActionUploadingDocument(); - explicit chatActionUploadingDocument(std::int32_t progress_); + explicit chatActionUploadingDocument(int32 progress_); static const std::int32_t ID = 167884362; std::int32_t get_id() const final { @@ -1781,11 +1995,11 @@ class chatActionRecordingVideoNote final : public ChatAction { class chatActionUploadingVideoNote final : public ChatAction { public: - std::int32_t progress_; + int32 progress_; chatActionUploadingVideoNote(); - explicit chatActionUploadingVideoNote(std::int32_t progress_); + explicit chatActionUploadingVideoNote(int32 progress_); static const std::int32_t ID = 1172364918; std::int32_t get_id() const final { @@ -1814,10 +2028,13 @@ class ChatActionBar: public Object { class chatActionBarReportSpam final : public ChatActionBar { public: + bool can_unarchive_; chatActionBarReportSpam(); - static const std::int32_t ID = -1603417249; + explicit chatActionBarReportSpam(bool can_unarchive_); + + static const std::int32_t ID = -1312758246; std::int32_t get_id() const final { return ID; } @@ -1840,10 +2057,14 @@ class chatActionBarReportUnrelatedLocation final : public ChatActionBar { class chatActionBarReportAddBlock final : public ChatActionBar { public: + bool can_unarchive_; + int32 distance_; chatActionBarReportAddBlock(); - static const std::int32_t ID = -87894249; + chatActionBarReportAddBlock(bool can_unarchive_, int32 distance_); + + static const std::int32_t ID = -914150419; std::int32_t get_id() const final { return ID; } @@ -1879,13 +2100,13 @@ class chatActionBarSharePhoneNumber final : public ChatActionBar { class chatAdministrator final : public Object { public: - std::int32_t user_id_; - std::string custom_title_; + int32 user_id_; + string custom_title_; bool is_owner_; chatAdministrator(); - chatAdministrator(std::int32_t user_id_, std::string const &custom_title_, bool is_owner_); + chatAdministrator(int32 user_id_, string const &custom_title_, bool is_owner_); static const std::int32_t ID = 487220942; std::int32_t get_id() const final { @@ -1897,11 +2118,11 @@ class chatAdministrator final : public Object { class chatAdministrators final : public Object { public: - std::vector> administrators_; + array> administrators_; chatAdministrators(); - explicit chatAdministrators(std::vector> &&administrators_); + explicit chatAdministrators(array> &&administrators_); static const std::int32_t ID = -2126186435; std::int32_t get_id() const final { @@ -1913,14 +2134,14 @@ class chatAdministrators final : public Object { class chatEvent final : public Object { public: - std::int64_t id_; - std::int32_t date_; - std::int32_t user_id_; + int64 id_; + int32 date_; + int32 user_id_; object_ptr action_; chatEvent(); - chatEvent(std::int64_t id_, std::int32_t date_, std::int32_t user_id_, object_ptr &&action_); + chatEvent(int64 id_, int32 date_, int32 user_id_, object_ptr &&action_); static const std::int32_t ID = -609912404; std::int32_t get_id() const final { @@ -2001,10 +2222,13 @@ class chatEventMessagePinned final : public ChatEventAction { class chatEventMessageUnpinned final : public ChatEventAction { public: + object_ptr message_; chatEventMessageUnpinned(); - static const std::int32_t ID = 2002594849; + explicit chatEventMessageUnpinned(object_ptr &&message_); + + static const std::int32_t ID = -376161513; std::int32_t get_id() const final { return ID; } @@ -2040,12 +2264,12 @@ class chatEventMemberLeft final : public ChatEventAction { class chatEventMemberInvited final : public ChatEventAction { public: - std::int32_t user_id_; + int32 user_id_; object_ptr status_; chatEventMemberInvited(); - chatEventMemberInvited(std::int32_t user_id_, object_ptr &&status_); + chatEventMemberInvited(int32 user_id_, object_ptr &&status_); static const std::int32_t ID = -2093688706; std::int32_t get_id() const final { @@ -2057,13 +2281,13 @@ class chatEventMemberInvited final : public ChatEventAction { class chatEventMemberPromoted final : public ChatEventAction { public: - std::int32_t user_id_; + int32 user_id_; object_ptr old_status_; object_ptr new_status_; chatEventMemberPromoted(); - chatEventMemberPromoted(std::int32_t user_id_, object_ptr &&old_status_, object_ptr &&new_status_); + chatEventMemberPromoted(int32 user_id_, object_ptr &&old_status_, object_ptr &&new_status_); static const std::int32_t ID = 1887176186; std::int32_t get_id() const final { @@ -2075,13 +2299,13 @@ class chatEventMemberPromoted final : public ChatEventAction { class chatEventMemberRestricted final : public ChatEventAction { public: - std::int32_t user_id_; + int32 user_id_; object_ptr old_status_; object_ptr new_status_; chatEventMemberRestricted(); - chatEventMemberRestricted(std::int32_t user_id_, object_ptr &&old_status_, object_ptr &&new_status_); + chatEventMemberRestricted(int32 user_id_, object_ptr &&old_status_, object_ptr &&new_status_); static const std::int32_t ID = 584946294; std::int32_t get_id() const final { @@ -2093,12 +2317,12 @@ class chatEventMemberRestricted final : public ChatEventAction { class chatEventTitleChanged final : public ChatEventAction { public: - std::string old_title_; - std::string new_title_; + string old_title_; + string new_title_; chatEventTitleChanged(); - chatEventTitleChanged(std::string const &old_title_, std::string const &new_title_); + chatEventTitleChanged(string const &old_title_, string const &new_title_); static const std::int32_t ID = 1134103250; std::int32_t get_id() const final { @@ -2127,12 +2351,12 @@ class chatEventPermissionsChanged final : public ChatEventAction { class chatEventDescriptionChanged final : public ChatEventAction { public: - std::string old_description_; - std::string new_description_; + string old_description_; + string new_description_; chatEventDescriptionChanged(); - chatEventDescriptionChanged(std::string const &old_description_, std::string const &new_description_); + chatEventDescriptionChanged(string const &old_description_, string const &new_description_); static const std::int32_t ID = 39112478; std::int32_t get_id() const final { @@ -2144,12 +2368,12 @@ class chatEventDescriptionChanged final : public ChatEventAction { class chatEventUsernameChanged final : public ChatEventAction { public: - std::string old_username_; - std::string new_username_; + string old_username_; + string new_username_; chatEventUsernameChanged(); - chatEventUsernameChanged(std::string const &old_username_, std::string const &new_username_); + chatEventUsernameChanged(string const &old_username_, string const &new_username_); static const std::int32_t ID = 1728558443; std::int32_t get_id() const final { @@ -2161,14 +2385,14 @@ class chatEventUsernameChanged final : public ChatEventAction { class chatEventPhotoChanged final : public ChatEventAction { public: - object_ptr old_photo_; - object_ptr new_photo_; + object_ptr old_photo_; + object_ptr new_photo_; chatEventPhotoChanged(); - chatEventPhotoChanged(object_ptr &&old_photo_, object_ptr &&new_photo_); + chatEventPhotoChanged(object_ptr &&old_photo_, object_ptr &&new_photo_); - static const std::int32_t ID = 1037662734; + static const std::int32_t ID = -811572541; std::int32_t get_id() const final { return ID; } @@ -2194,12 +2418,12 @@ class chatEventInvitesToggled final : public ChatEventAction { class chatEventLinkedChatChanged final : public ChatEventAction { public: - std::int64_t old_linked_chat_id_; - std::int64_t new_linked_chat_id_; + int53 old_linked_chat_id_; + int53 new_linked_chat_id_; chatEventLinkedChatChanged(); - chatEventLinkedChatChanged(std::int64_t old_linked_chat_id_, std::int64_t new_linked_chat_id_); + chatEventLinkedChatChanged(int53 old_linked_chat_id_, int53 new_linked_chat_id_); static const std::int32_t ID = 1797419439; std::int32_t get_id() const final { @@ -2211,12 +2435,12 @@ class chatEventLinkedChatChanged final : public ChatEventAction { class chatEventSlowModeDelayChanged final : public ChatEventAction { public: - std::int32_t old_slow_mode_delay_; - std::int32_t new_slow_mode_delay_; + int32 old_slow_mode_delay_; + int32 new_slow_mode_delay_; chatEventSlowModeDelayChanged(); - chatEventSlowModeDelayChanged(std::int32_t old_slow_mode_delay_, std::int32_t new_slow_mode_delay_); + chatEventSlowModeDelayChanged(int32 old_slow_mode_delay_, int32 new_slow_mode_delay_); static const std::int32_t ID = -1653195765; std::int32_t get_id() const final { @@ -2244,12 +2468,12 @@ class chatEventSignMessagesToggled final : public ChatEventAction { class chatEventStickerSetChanged final : public ChatEventAction { public: - std::int64_t old_sticker_set_id_; - std::int64_t new_sticker_set_id_; + int64 old_sticker_set_id_; + int64 new_sticker_set_id_; chatEventStickerSetChanged(); - chatEventStickerSetChanged(std::int64_t old_sticker_set_id_, std::int64_t new_sticker_set_id_); + chatEventStickerSetChanged(int64 old_sticker_set_id_, int64 new_sticker_set_id_); static const std::int32_t ID = -1243130481; std::int32_t get_id() const final { @@ -2319,11 +2543,11 @@ class chatEventLogFilters final : public Object { class chatEvents final : public Object { public: - std::vector> events_; + array> events_; chatEvents(); - explicit chatEvents(std::vector> &&events_); + explicit chatEvents(array> &&events_); static const std::int32_t ID = -585329664; std::int32_t get_id() const final { @@ -2333,13 +2557,59 @@ class chatEvents final : public Object { void store(TlStorerToString &s, const char *field_name) const final; }; +class chatFilter final : public Object { + public: + string title_; + string icon_name_; + array pinned_chat_ids_; + array included_chat_ids_; + array excluded_chat_ids_; + bool exclude_muted_; + bool exclude_read_; + bool exclude_archived_; + bool include_contacts_; + bool include_non_contacts_; + bool include_bots_; + bool include_groups_; + bool include_channels_; + + chatFilter(); + + chatFilter(string const &title_, string const &icon_name_, array &&pinned_chat_ids_, array &&included_chat_ids_, array &&excluded_chat_ids_, bool exclude_muted_, bool exclude_read_, bool exclude_archived_, bool include_contacts_, bool include_non_contacts_, bool include_bots_, bool include_groups_, bool include_channels_); + + static const std::int32_t ID = -664815123; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class chatFilterInfo final : public Object { + public: + int32 id_; + string title_; + string icon_name_; + + chatFilterInfo(); + + chatFilterInfo(int32 id_, string const &title_, string const &icon_name_); + + static const std::int32_t ID = -943721165; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class chatInviteLink final : public Object { public: - std::string invite_link_; + string invite_link_; chatInviteLink(); - explicit chatInviteLink(std::string const &invite_link_); + explicit chatInviteLink(string const &invite_link_); static const std::int32_t ID = -882072492; std::int32_t get_id() const final { @@ -2351,19 +2621,20 @@ class chatInviteLink final : public Object { class chatInviteLinkInfo final : public Object { public: - std::int64_t chat_id_; + int53 chat_id_; + int32 accessible_for_; object_ptr type_; - std::string title_; - object_ptr photo_; - std::int32_t member_count_; - std::vector member_user_ids_; + string title_; + object_ptr photo_; + int32 member_count_; + array member_user_ids_; bool is_public_; chatInviteLinkInfo(); - chatInviteLinkInfo(std::int64_t chat_id_, object_ptr &&type_, std::string const &title_, object_ptr &&photo_, std::int32_t member_count_, std::vector &&member_user_ids_, bool is_public_); + chatInviteLinkInfo(int53 chat_id_, int32 accessible_for_, object_ptr &&type_, string const &title_, object_ptr &&photo_, int32 member_count_, array &&member_user_ids_, bool is_public_); - static const std::int32_t ID = -323394424; + static const std::int32_t ID = 910695551; std::int32_t get_id() const final { return ID; } @@ -2401,14 +2672,46 @@ class chatListArchive final : public ChatList { void store(TlStorerToString &s, const char *field_name) const final; }; +class chatListFilter final : public ChatList { + public: + int32 chat_filter_id_; + + chatListFilter(); + + explicit chatListFilter(int32 chat_filter_id_); + + static const std::int32_t ID = -2022707655; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class chatLists final : public Object { + public: + array> chat_lists_; + + chatLists(); + + explicit chatLists(array> &&chat_lists_); + + static const std::int32_t ID = -258292771; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class chatLocation final : public Object { public: object_ptr location_; - std::string address_; + string address_; chatLocation(); - chatLocation(object_ptr &&location_, std::string const &address_); + chatLocation(object_ptr &&location_, string const &address_); static const std::int32_t ID = -1566863583; std::int32_t get_id() const final { @@ -2420,15 +2723,15 @@ class chatLocation final : public Object { class chatMember final : public Object { public: - std::int32_t user_id_; - std::int32_t inviter_user_id_; - std::int32_t joined_chat_date_; + int32 user_id_; + int32 inviter_user_id_; + int32 joined_chat_date_; object_ptr status_; object_ptr bot_info_; chatMember(); - chatMember(std::int32_t user_id_, std::int32_t inviter_user_id_, std::int32_t joined_chat_date_, object_ptr &&status_, object_ptr &&bot_info_); + chatMember(int32 user_id_, int32 inviter_user_id_, int32 joined_chat_date_, object_ptr &&status_, object_ptr &&bot_info_); static const std::int32_t ID = -806137076; std::int32_t get_id() const final { @@ -2444,14 +2747,15 @@ class ChatMemberStatus: public Object { class chatMemberStatusCreator final : public ChatMemberStatus { public: - std::string custom_title_; + string custom_title_; + bool is_anonymous_; bool is_member_; chatMemberStatusCreator(); - chatMemberStatusCreator(std::string const &custom_title_, bool is_member_); + chatMemberStatusCreator(string const &custom_title_, bool is_anonymous_, bool is_member_); - static const std::int32_t ID = 2038475849; + static const std::int32_t ID = -160019714; std::int32_t get_id() const final { return ID; } @@ -2461,7 +2765,7 @@ class chatMemberStatusCreator final : public ChatMemberStatus { class chatMemberStatusAdministrator final : public ChatMemberStatus { public: - std::string custom_title_; + string custom_title_; bool can_be_edited_; bool can_change_info_; bool can_post_messages_; @@ -2471,12 +2775,13 @@ class chatMemberStatusAdministrator final : public ChatMemberStatus { bool can_restrict_members_; bool can_pin_messages_; bool can_promote_members_; + bool is_anonymous_; chatMemberStatusAdministrator(); - chatMemberStatusAdministrator(std::string const &custom_title_, bool can_be_edited_, bool can_change_info_, bool can_post_messages_, bool can_edit_messages_, bool can_delete_messages_, bool can_invite_users_, bool can_restrict_members_, bool can_pin_messages_, bool can_promote_members_); + chatMemberStatusAdministrator(string const &custom_title_, bool can_be_edited_, bool can_change_info_, bool can_post_messages_, bool can_edit_messages_, bool can_delete_messages_, bool can_invite_users_, bool can_restrict_members_, bool can_pin_messages_, bool can_promote_members_, bool is_anonymous_); - static const std::int32_t ID = 1800612058; + static const std::int32_t ID = 222495835; std::int32_t get_id() const final { return ID; } @@ -2500,12 +2805,12 @@ class chatMemberStatusMember final : public ChatMemberStatus { class chatMemberStatusRestricted final : public ChatMemberStatus { public: bool is_member_; - std::int32_t restricted_until_date_; + int32 restricted_until_date_; object_ptr permissions_; chatMemberStatusRestricted(); - chatMemberStatusRestricted(bool is_member_, std::int32_t restricted_until_date_, object_ptr &&permissions_); + chatMemberStatusRestricted(bool is_member_, int32 restricted_until_date_, object_ptr &&permissions_); static const std::int32_t ID = 1661432998; std::int32_t get_id() const final { @@ -2530,11 +2835,11 @@ class chatMemberStatusLeft final : public ChatMemberStatus { class chatMemberStatusBanned final : public ChatMemberStatus { public: - std::int32_t banned_until_date_; + int32 banned_until_date_; chatMemberStatusBanned(); - explicit chatMemberStatusBanned(std::int32_t banned_until_date_); + explicit chatMemberStatusBanned(int32 banned_until_date_); static const std::int32_t ID = -1653518666; std::int32_t get_id() const final { @@ -2546,12 +2851,12 @@ class chatMemberStatusBanned final : public ChatMemberStatus { class chatMembers final : public Object { public: - std::int32_t total_count_; - std::vector> members_; + int32 total_count_; + array> members_; chatMembers(); - chatMembers(std::int32_t total_count_, std::vector> &&members_); + chatMembers(int32 total_count_, array> &&members_); static const std::int32_t ID = -497558622; std::int32_t get_id() const final { @@ -2604,6 +2909,22 @@ class chatMembersFilterMembers final : public ChatMembersFilter { void store(TlStorerToString &s, const char *field_name) const final; }; +class chatMembersFilterMention final : public ChatMembersFilter { + public: + int53 message_thread_id_; + + chatMembersFilterMention(); + + explicit chatMembersFilterMention(int53 message_thread_id_); + + static const std::int32_t ID = 856419831; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class chatMembersFilterRestricted final : public ChatMembersFilter { public: @@ -2645,12 +2966,12 @@ class chatMembersFilterBots final : public ChatMembersFilter { class chatNearby final : public Object { public: - std::int64_t chat_id_; - std::int32_t distance_; + int53 chat_id_; + int32 distance_; chatNearby(); - chatNearby(std::int64_t chat_id_, std::int32_t distance_); + chatNearby(int53 chat_id_, int32 distance_); static const std::int32_t ID = 48120405; std::int32_t get_id() const final { @@ -2663,9 +2984,9 @@ class chatNearby final : public Object { class chatNotificationSettings final : public Object { public: bool use_default_mute_for_; - std::int32_t mute_for_; + int32 mute_for_; bool use_default_sound_; - std::string sound_; + string sound_; bool use_default_show_preview_; bool show_preview_; bool use_default_disable_pinned_message_notifications_; @@ -2675,7 +2996,7 @@ class chatNotificationSettings final : public Object { chatNotificationSettings(); - chatNotificationSettings(bool use_default_mute_for_, std::int32_t mute_for_, bool use_default_sound_, std::string const &sound_, bool use_default_show_preview_, bool show_preview_, bool use_default_disable_pinned_message_notifications_, bool disable_pinned_message_notifications_, bool use_default_disable_mention_notifications_, bool disable_mention_notifications_); + chatNotificationSettings(bool use_default_mute_for_, int32 mute_for_, bool use_default_sound_, string const &sound_, bool use_default_show_preview_, bool show_preview_, bool use_default_disable_pinned_message_notifications_, bool disable_pinned_message_notifications_, bool use_default_disable_mention_notifications_, bool disable_mention_notifications_); static const std::int32_t ID = 1503183218; std::int32_t get_id() const final { @@ -2710,14 +3031,71 @@ class chatPermissions final : public Object { class chatPhoto final : public Object { public: - object_ptr small_; - object_ptr big_; + int64 id_; + int32 added_date_; + object_ptr minithumbnail_; + array> sizes_; + object_ptr animation_; chatPhoto(); - chatPhoto(object_ptr &&small_, object_ptr &&big_); + chatPhoto(int64 id_, int32 added_date_, object_ptr &&minithumbnail_, array> &&sizes_, object_ptr &&animation_); - static const std::int32_t ID = -217062456; + static const std::int32_t ID = -113003577; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class chatPhotoInfo final : public Object { + public: + object_ptr small_; + object_ptr big_; + bool has_animation_; + + chatPhotoInfo(); + + chatPhotoInfo(object_ptr &&small_, object_ptr &&big_, bool has_animation_); + + static const std::int32_t ID = 404510091; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class chatPhotos final : public Object { + public: + int32 total_count_; + array> photos_; + + chatPhotos(); + + chatPhotos(int32 total_count_, array> &&photos_); + + static const std::int32_t ID = -1510699180; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class chatPosition final : public Object { + public: + object_ptr list_; + int64 order_; + bool is_pinned_; + object_ptr source_; + + chatPosition(); + + chatPosition(object_ptr &&list_, int64 order_, bool is_pinned_, object_ptr &&source_); + + static const std::int32_t ID = -622557355; std::int32_t get_id() const final { return ID; } @@ -2809,11 +3187,11 @@ class chatReportReasonUnrelatedLocation final : public ChatReportReason { class chatReportReasonCustom final : public ChatReportReason { public: - std::string text_; + string text_; chatReportReasonCustom(); - explicit chatReportReasonCustom(std::string const &text_); + explicit chatReportReasonCustom(string const &text_); static const std::int32_t ID = 544575454; std::int32_t get_id() const final { @@ -2823,17 +3201,188 @@ class chatReportReasonCustom final : public ChatReportReason { void store(TlStorerToString &s, const char *field_name) const final; }; +class ChatSource: public Object { + public: +}; + +class chatSourceMtprotoProxy final : public ChatSource { + public: + + chatSourceMtprotoProxy(); + + static const std::int32_t ID = 394074115; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class chatSourcePublicServiceAnnouncement final : public ChatSource { + public: + string type_; + string text_; + + chatSourcePublicServiceAnnouncement(); + + chatSourcePublicServiceAnnouncement(string const &type_, string const &text_); + + static const std::int32_t ID = -328571244; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class ChatStatistics: public Object { + public: +}; + +class chatStatisticsSupergroup final : public ChatStatistics { + public: + object_ptr period_; + object_ptr member_count_; + object_ptr message_count_; + object_ptr viewer_count_; + object_ptr sender_count_; + object_ptr member_count_graph_; + object_ptr join_graph_; + object_ptr join_by_source_graph_; + object_ptr language_graph_; + object_ptr message_content_graph_; + object_ptr action_graph_; + object_ptr day_graph_; + object_ptr week_graph_; + array> top_senders_; + array> top_administrators_; + array> top_inviters_; + + chatStatisticsSupergroup(); + + chatStatisticsSupergroup(object_ptr &&period_, object_ptr &&member_count_, object_ptr &&message_count_, object_ptr &&viewer_count_, object_ptr &&sender_count_, object_ptr &&member_count_graph_, object_ptr &&join_graph_, object_ptr &&join_by_source_graph_, object_ptr &&language_graph_, object_ptr &&message_content_graph_, object_ptr &&action_graph_, object_ptr &&day_graph_, object_ptr &&week_graph_, array> &&top_senders_, array> &&top_administrators_, array> &&top_inviters_); + + static const std::int32_t ID = -17244633; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class chatStatisticsChannel final : public ChatStatistics { + public: + object_ptr period_; + object_ptr member_count_; + object_ptr mean_view_count_; + object_ptr mean_share_count_; + double enabled_notifications_percentage_; + object_ptr member_count_graph_; + object_ptr join_graph_; + object_ptr mute_graph_; + object_ptr view_count_by_hour_graph_; + object_ptr view_count_by_source_graph_; + object_ptr join_by_source_graph_; + object_ptr language_graph_; + object_ptr message_interaction_graph_; + object_ptr instant_view_interaction_graph_; + array> recent_message_interactions_; + + chatStatisticsChannel(); + + chatStatisticsChannel(object_ptr &&period_, object_ptr &&member_count_, object_ptr &&mean_view_count_, object_ptr &&mean_share_count_, double enabled_notifications_percentage_, object_ptr &&member_count_graph_, object_ptr &&join_graph_, object_ptr &&mute_graph_, object_ptr &&view_count_by_hour_graph_, object_ptr &&view_count_by_source_graph_, object_ptr &&join_by_source_graph_, object_ptr &&language_graph_, object_ptr &&message_interaction_graph_, object_ptr &&instant_view_interaction_graph_, array> &&recent_message_interactions_); + + static const std::int32_t ID = -825434183; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class chatStatisticsAdministratorActionsInfo final : public Object { + public: + int32 user_id_; + int32 deleted_message_count_; + int32 banned_user_count_; + int32 restricted_user_count_; + + chatStatisticsAdministratorActionsInfo(); + + chatStatisticsAdministratorActionsInfo(int32 user_id_, int32 deleted_message_count_, int32 banned_user_count_, int32 restricted_user_count_); + + static const std::int32_t ID = 1988384904; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class chatStatisticsInviterInfo final : public Object { + public: + int32 user_id_; + int32 added_member_count_; + + chatStatisticsInviterInfo(); + + chatStatisticsInviterInfo(int32 user_id_, int32 added_member_count_); + + static const std::int32_t ID = -399517859; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class chatStatisticsMessageInteractionInfo final : public Object { + public: + int53 message_id_; + int32 view_count_; + int32 forward_count_; + + chatStatisticsMessageInteractionInfo(); + + chatStatisticsMessageInteractionInfo(int53 message_id_, int32 view_count_, int32 forward_count_); + + static const std::int32_t ID = -765580756; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class chatStatisticsMessageSenderInfo final : public Object { + public: + int32 user_id_; + int32 sent_message_count_; + int32 average_character_count_; + + chatStatisticsMessageSenderInfo(); + + chatStatisticsMessageSenderInfo(int32 user_id_, int32 sent_message_count_, int32 average_character_count_); + + static const std::int32_t ID = 1716075179; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class ChatType: public Object { public: }; class chatTypePrivate final : public ChatType { public: - std::int32_t user_id_; + int32 user_id_; chatTypePrivate(); - explicit chatTypePrivate(std::int32_t user_id_); + explicit chatTypePrivate(int32 user_id_); static const std::int32_t ID = 1700720838; std::int32_t get_id() const final { @@ -2845,11 +3394,11 @@ class chatTypePrivate final : public ChatType { class chatTypeBasicGroup final : public ChatType { public: - std::int32_t basic_group_id_; + int32 basic_group_id_; chatTypeBasicGroup(); - explicit chatTypeBasicGroup(std::int32_t basic_group_id_); + explicit chatTypeBasicGroup(int32 basic_group_id_); static const std::int32_t ID = 21815278; std::int32_t get_id() const final { @@ -2861,12 +3410,12 @@ class chatTypeBasicGroup final : public ChatType { class chatTypeSupergroup final : public ChatType { public: - std::int32_t supergroup_id_; + int32 supergroup_id_; bool is_channel_; chatTypeSupergroup(); - chatTypeSupergroup(std::int32_t supergroup_id_, bool is_channel_); + chatTypeSupergroup(int32 supergroup_id_, bool is_channel_); static const std::int32_t ID = 955152366; std::int32_t get_id() const final { @@ -2878,12 +3427,12 @@ class chatTypeSupergroup final : public ChatType { class chatTypeSecret final : public ChatType { public: - std::int32_t secret_chat_id_; - std::int32_t user_id_; + int32 secret_chat_id_; + int32 user_id_; chatTypeSecret(); - chatTypeSecret(std::int32_t secret_chat_id_, std::int32_t user_id_); + chatTypeSecret(int32 secret_chat_id_, int32 user_id_); static const std::int32_t ID = 136722563; std::int32_t get_id() const final { @@ -2895,13 +3444,14 @@ class chatTypeSecret final : public ChatType { class chats final : public Object { public: - std::vector chat_ids_; + int32 total_count_; + array chat_ids_; chats(); - explicit chats(std::vector &&chat_ids_); + chats(int32 total_count_, array &&chat_ids_); - static const std::int32_t ID = -1687756019; + static const std::int32_t ID = 1809654812; std::int32_t get_id() const final { return ID; } @@ -2911,12 +3461,12 @@ class chats final : public Object { class chatsNearby final : public Object { public: - std::vector> users_nearby_; - std::vector> supergroups_nearby_; + array> users_nearby_; + array> supergroups_nearby_; chatsNearby(); - chatsNearby(std::vector> &&users_nearby_, std::vector> &&supergroups_nearby_); + chatsNearby(array> &&users_nearby_, array> &&supergroups_nearby_); static const std::int32_t ID = 187746081; std::int32_t get_id() const final { @@ -2997,19 +3547,19 @@ class checkChatUsernameResultPublicGroupsUnavailable final : public CheckChatUse class connectedWebsite final : public Object { public: - std::int64_t id_; - std::string domain_name_; - std::int32_t bot_user_id_; - std::string browser_; - std::string platform_; - std::int32_t log_in_date_; - std::int32_t last_active_date_; - std::string ip_; - std::string location_; + int64 id_; + string domain_name_; + int32 bot_user_id_; + string browser_; + string platform_; + int32 log_in_date_; + int32 last_active_date_; + string ip_; + string location_; connectedWebsite(); - connectedWebsite(std::int64_t id_, std::string const &domain_name_, std::int32_t bot_user_id_, std::string const &browser_, std::string const &platform_, std::int32_t log_in_date_, std::int32_t last_active_date_, std::string const &ip_, std::string const &location_); + connectedWebsite(int64 id_, string const &domain_name_, int32 bot_user_id_, string const &browser_, string const &platform_, int32 log_in_date_, int32 last_active_date_, string const &ip_, string const &location_); static const std::int32_t ID = -1538986855; std::int32_t get_id() const final { @@ -3021,11 +3571,11 @@ class connectedWebsite final : public Object { class connectedWebsites final : public Object { public: - std::vector> websites_; + array> websites_; connectedWebsites(); - explicit connectedWebsites(std::vector> &&websites_); + explicit connectedWebsites(array> &&websites_); static const std::int32_t ID = -1727949694; std::int32_t get_id() const final { @@ -3106,15 +3656,15 @@ class connectionStateReady final : public ConnectionState { class contact final : public Object { public: - std::string phone_number_; - std::string first_name_; - std::string last_name_; - std::string vcard_; - std::int32_t user_id_; + string phone_number_; + string first_name_; + string last_name_; + string vcard_; + int32 user_id_; contact(); - contact(std::string const &phone_number_, std::string const &first_name_, std::string const &last_name_, std::string const &vcard_, std::int32_t user_id_); + contact(string const &phone_number_, string const &first_name_, string const &last_name_, string const &vcard_, int32 user_id_); static const std::int32_t ID = -1483002540; std::int32_t get_id() const final { @@ -3126,11 +3676,11 @@ class contact final : public Object { class count final : public Object { public: - std::int32_t count_; + int32 count_; count(); - explicit count(std::int32_t count_); + explicit count(int32 count_); static const std::int32_t ID = 1295577348; std::int32_t get_id() const final { @@ -3140,13 +3690,49 @@ class count final : public Object { void store(TlStorerToString &s, const char *field_name) const final; }; +class countries final : public Object { + public: + array> countries_; + + countries(); + + explicit countries(array> &&countries_); + + static const std::int32_t ID = 1854211813; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class countryInfo final : public Object { + public: + string country_code_; + string name_; + string english_name_; + bool is_hidden_; + array calling_codes_; + + countryInfo(); + + countryInfo(string const &country_code_, string const &name_, string const &english_name_, bool is_hidden_, array &&calling_codes_); + + static const std::int32_t ID = 1617195722; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class customRequestResult final : public Object { public: - std::string result_; + string result_; customRequestResult(); - explicit customRequestResult(std::string const &result_); + explicit customRequestResult(string const &result_); static const std::int32_t ID = -2009960452; std::int32_t get_id() const final { @@ -3158,11 +3744,11 @@ class customRequestResult final : public Object { class databaseStatistics final : public Object { public: - std::string statistics_; + string statistics_; databaseStatistics(); - explicit databaseStatistics(std::string const &statistics_); + explicit databaseStatistics(string const &statistics_); static const std::int32_t ID = -1123912880; std::int32_t get_id() const final { @@ -3174,13 +3760,13 @@ class databaseStatistics final : public Object { class date final : public Object { public: - std::int32_t day_; - std::int32_t month_; - std::int32_t year_; + int32 day_; + int32 month_; + int32 year_; date(); - date(std::int32_t day_, std::int32_t month_, std::int32_t year_); + date(int32 day_, int32 month_, int32 year_); static const std::int32_t ID = -277956960; std::int32_t get_id() const final { @@ -3190,14 +3776,31 @@ class date final : public Object { void store(TlStorerToString &s, const char *field_name) const final; }; +class dateRange final : public Object { + public: + int32 start_date_; + int32 end_date_; + + dateRange(); + + dateRange(int32 start_date_, int32 end_date_); + + static const std::int32_t ID = 1360333926; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class datedFile final : public Object { public: object_ptr file_; - std::int32_t date_; + int32 date_; datedFile(); - datedFile(object_ptr &&file_, std::int32_t date_); + datedFile(object_ptr &&file_, int32 date_); static const std::int32_t ID = -1840795491; std::int32_t get_id() const final { @@ -3230,12 +3833,12 @@ class DeviceToken: public Object { class deviceTokenFirebaseCloudMessaging final : public DeviceToken { public: - std::string token_; + string token_; bool encrypt_; deviceTokenFirebaseCloudMessaging(); - deviceTokenFirebaseCloudMessaging(std::string const &token_, bool encrypt_); + deviceTokenFirebaseCloudMessaging(string const &token_, bool encrypt_); static const std::int32_t ID = -797881849; std::int32_t get_id() const final { @@ -3247,12 +3850,12 @@ class deviceTokenFirebaseCloudMessaging final : public DeviceToken { class deviceTokenApplePush final : public DeviceToken { public: - std::string device_token_; + string device_token_; bool is_app_sandbox_; deviceTokenApplePush(); - deviceTokenApplePush(std::string const &device_token_, bool is_app_sandbox_); + deviceTokenApplePush(string const &device_token_, bool is_app_sandbox_); static const std::int32_t ID = 387541955; std::int32_t get_id() const final { @@ -3264,13 +3867,13 @@ class deviceTokenApplePush final : public DeviceToken { class deviceTokenApplePushVoIP final : public DeviceToken { public: - std::string device_token_; + string device_token_; bool is_app_sandbox_; bool encrypt_; deviceTokenApplePushVoIP(); - deviceTokenApplePushVoIP(std::string const &device_token_, bool is_app_sandbox_, bool encrypt_); + deviceTokenApplePushVoIP(string const &device_token_, bool is_app_sandbox_, bool encrypt_); static const std::int32_t ID = 804275689; std::int32_t get_id() const final { @@ -3282,11 +3885,11 @@ class deviceTokenApplePushVoIP final : public DeviceToken { class deviceTokenWindowsPush final : public DeviceToken { public: - std::string access_token_; + string access_token_; deviceTokenWindowsPush(); - explicit deviceTokenWindowsPush(std::string const &access_token_); + explicit deviceTokenWindowsPush(string const &access_token_); static const std::int32_t ID = -1410514289; std::int32_t get_id() const final { @@ -3298,11 +3901,11 @@ class deviceTokenWindowsPush final : public DeviceToken { class deviceTokenMicrosoftPush final : public DeviceToken { public: - std::string channel_uri_; + string channel_uri_; deviceTokenMicrosoftPush(); - explicit deviceTokenMicrosoftPush(std::string const &channel_uri_); + explicit deviceTokenMicrosoftPush(string const &channel_uri_); static const std::int32_t ID = 1224269900; std::int32_t get_id() const final { @@ -3314,11 +3917,11 @@ class deviceTokenMicrosoftPush final : public DeviceToken { class deviceTokenMicrosoftPushVoIP final : public DeviceToken { public: - std::string channel_uri_; + string channel_uri_; deviceTokenMicrosoftPushVoIP(); - explicit deviceTokenMicrosoftPushVoIP(std::string const &channel_uri_); + explicit deviceTokenMicrosoftPushVoIP(string const &channel_uri_); static const std::int32_t ID = -785603759; std::int32_t get_id() const final { @@ -3330,13 +3933,13 @@ class deviceTokenMicrosoftPushVoIP final : public DeviceToken { class deviceTokenWebPush final : public DeviceToken { public: - std::string endpoint_; - std::string p256dh_base64url_; - std::string auth_base64url_; + string endpoint_; + string p256dh_base64url_; + string auth_base64url_; deviceTokenWebPush(); - deviceTokenWebPush(std::string const &endpoint_, std::string const &p256dh_base64url_, std::string const &auth_base64url_); + deviceTokenWebPush(string const &endpoint_, string const &p256dh_base64url_, string const &auth_base64url_); static const std::int32_t ID = -1694507273; std::int32_t get_id() const final { @@ -3348,11 +3951,11 @@ class deviceTokenWebPush final : public DeviceToken { class deviceTokenSimplePush final : public DeviceToken { public: - std::string endpoint_; + string endpoint_; deviceTokenSimplePush(); - explicit deviceTokenSimplePush(std::string const &endpoint_); + explicit deviceTokenSimplePush(string const &endpoint_); static const std::int32_t ID = 49584736; std::int32_t get_id() const final { @@ -3364,11 +3967,11 @@ class deviceTokenSimplePush final : public DeviceToken { class deviceTokenUbuntuPush final : public DeviceToken { public: - std::string token_; + string token_; deviceTokenUbuntuPush(); - explicit deviceTokenUbuntuPush(std::string const &token_); + explicit deviceTokenUbuntuPush(string const &token_); static const std::int32_t ID = 1782320422; std::int32_t get_id() const final { @@ -3380,11 +3983,11 @@ class deviceTokenUbuntuPush final : public DeviceToken { class deviceTokenBlackBerryPush final : public DeviceToken { public: - std::string token_; + string token_; deviceTokenBlackBerryPush(); - explicit deviceTokenBlackBerryPush(std::string const &token_); + explicit deviceTokenBlackBerryPush(string const &token_); static const std::int32_t ID = 1559167234; std::int32_t get_id() const final { @@ -3396,11 +3999,11 @@ class deviceTokenBlackBerryPush final : public DeviceToken { class deviceTokenTizenPush final : public DeviceToken { public: - std::string reg_id_; + string reg_id_; deviceTokenTizenPush(); - explicit deviceTokenTizenPush(std::string const ®_id_); + explicit deviceTokenTizenPush(string const ®_id_); static const std::int32_t ID = -1359947213; std::int32_t get_id() const final { @@ -3410,19 +4013,59 @@ class deviceTokenTizenPush final : public DeviceToken { void store(TlStorerToString &s, const char *field_name) const final; }; +class DiceStickers: public Object { + public: +}; + +class diceStickersRegular final : public DiceStickers { + public: + object_ptr sticker_; + + diceStickersRegular(); + + explicit diceStickersRegular(object_ptr &&sticker_); + + static const std::int32_t ID = -740299570; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class diceStickersSlotMachine final : public DiceStickers { + public: + object_ptr background_; + object_ptr lever_; + object_ptr left_reel_; + object_ptr center_reel_; + object_ptr right_reel_; + + diceStickersSlotMachine(); + + diceStickersSlotMachine(object_ptr &&background_, object_ptr &&lever_, object_ptr &&left_reel_, object_ptr &¢er_reel_, object_ptr &&right_reel_); + + static const std::int32_t ID = -375223124; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class document final : public Object { public: - std::string file_name_; - std::string mime_type_; + string file_name_; + string mime_type_; object_ptr minithumbnail_; - object_ptr thumbnail_; + object_ptr thumbnail_; object_ptr document_; document(); - document(std::string const &file_name_, std::string const &mime_type_, object_ptr &&minithumbnail_, object_ptr &&thumbnail_, object_ptr &&document_); + document(string const &file_name_, string const &mime_type_, object_ptr &&minithumbnail_, object_ptr &&thumbnail_, object_ptr &&document_); - static const std::int32_t ID = 21881988; + static const std::int32_t ID = -1357271080; std::int32_t get_id() const final { return ID; } @@ -3432,14 +4075,15 @@ class document final : public Object { class draftMessage final : public Object { public: - std::int64_t reply_to_message_id_; + int53 reply_to_message_id_; + int32 date_; object_ptr input_message_text_; draftMessage(); - draftMessage(std::int64_t reply_to_message_id_, object_ptr &&input_message_text_); + draftMessage(int53 reply_to_message_id_, int32 date_, object_ptr &&input_message_text_); - static const std::int32_t ID = 1902914742; + static const std::int32_t ID = 1373050112; std::int32_t get_id() const final { return ID; } @@ -3449,12 +4093,12 @@ class draftMessage final : public Object { class emailAddressAuthenticationCodeInfo final : public Object { public: - std::string email_address_pattern_; - std::int32_t length_; + string email_address_pattern_; + int32 length_; emailAddressAuthenticationCodeInfo(); - emailAddressAuthenticationCodeInfo(std::string const &email_address_pattern_, std::int32_t length_); + emailAddressAuthenticationCodeInfo(string const &email_address_pattern_, int32 length_); static const std::int32_t ID = 1151066659; std::int32_t get_id() const final { @@ -3466,11 +4110,11 @@ class emailAddressAuthenticationCodeInfo final : public Object { class emojis final : public Object { public: - std::vector emojis_; + array emojis_; emojis(); - explicit emojis(std::vector &&emojis_); + explicit emojis(array &&emojis_); static const std::int32_t ID = 950339552; std::int32_t get_id() const final { @@ -3482,13 +4126,13 @@ class emojis final : public Object { class encryptedCredentials final : public Object { public: - std::string data_; - std::string hash_; - std::string secret_; + bytes data_; + bytes hash_; + bytes secret_; encryptedCredentials(); - encryptedCredentials(std::string const &data_, std::string const &hash_, std::string const &secret_); + encryptedCredentials(bytes const &data_, bytes const &hash_, bytes const &secret_); static const std::int32_t ID = 1331106766; std::int32_t get_id() const final { @@ -3501,18 +4145,18 @@ class encryptedCredentials final : public Object { class encryptedPassportElement final : public Object { public: object_ptr type_; - std::string data_; + bytes data_; object_ptr front_side_; object_ptr reverse_side_; object_ptr selfie_; - std::vector> translation_; - std::vector> files_; - std::string value_; - std::string hash_; + array> translation_; + array> files_; + string value_; + string hash_; encryptedPassportElement(); - encryptedPassportElement(object_ptr &&type_, std::string const &data_, object_ptr &&front_side_, object_ptr &&reverse_side_, object_ptr &&selfie_, std::vector> &&translation_, std::vector> &&files_, std::string const &value_, std::string const &hash_); + encryptedPassportElement(object_ptr &&type_, bytes const &data_, object_ptr &&front_side_, object_ptr &&reverse_side_, object_ptr &&selfie_, array> &&translation_, array> &&files_, string const &value_, string const &hash_); static const std::int32_t ID = 2002386193; std::int32_t get_id() const final { @@ -3524,12 +4168,12 @@ class encryptedPassportElement final : public Object { class error final : public Object { public: - std::int32_t code_; - std::string message_; + int32 code_; + string message_; error(); - error(std::int32_t code_, std::string const &message_); + error(int32 code_, string const &message_); static const std::int32_t ID = -1679978726; std::int32_t get_id() const final { @@ -3541,15 +4185,15 @@ class error final : public Object { class file final : public Object { public: - std::int32_t id_; - std::int32_t size_; - std::int32_t expected_size_; + int32 id_; + int32 size_; + int32 expected_size_; object_ptr local_; object_ptr remote_; file(); - file(std::int32_t id_, std::int32_t size_, std::int32_t expected_size_, object_ptr &&local_, object_ptr &&remote_); + file(int32 id_, int32 size_, int32 expected_size_, object_ptr &&local_, object_ptr &&remote_); static const std::int32_t ID = 766337656; std::int32_t get_id() const final { @@ -3561,11 +4205,11 @@ class file final : public Object { class filePart final : public Object { public: - std::string data_; + bytes data_; filePart(); - explicit filePart(std::string const &data_); + explicit filePart(bytes const &data_); static const std::int32_t ID = 911821878; std::int32_t get_id() const final { @@ -3789,12 +4433,12 @@ class fileTypeWallpaper final : public FileType { class formattedText final : public Object { public: - std::string text_; - std::vector> entities_; + string text_; + array> entities_; formattedText(); - formattedText(std::string const &text_, std::vector> &&entities_); + formattedText(string const &text_, array> &&entities_); static const std::int32_t ID = -252624564; std::int32_t get_id() const final { @@ -3806,14 +4450,15 @@ class formattedText final : public Object { class foundMessages final : public Object { public: - std::vector> messages_; - std::int64_t next_from_search_id_; + int32 total_count_; + array> messages_; + string next_offset_; foundMessages(); - foundMessages(std::vector> &&messages_, std::int64_t next_from_search_id_); + foundMessages(int32 total_count_, array> &&messages_, string const &next_offset_); - static const std::int32_t ID = 2135623881; + static const std::int32_t ID = -529809608; std::int32_t get_id() const final { return ID; } @@ -3823,17 +4468,17 @@ class foundMessages final : public Object { class game final : public Object { public: - std::int64_t id_; - std::string short_name_; - std::string title_; + int64 id_; + string short_name_; + string title_; object_ptr text_; - std::string description_; + string description_; object_ptr photo_; object_ptr animation_; game(); - game(std::int64_t id_, std::string const &short_name_, std::string const &title_, object_ptr &&text_, std::string const &description_, object_ptr &&photo_, object_ptr &&animation_); + game(int64 id_, string const &short_name_, string const &title_, object_ptr &&text_, string const &description_, object_ptr &&photo_, object_ptr &&animation_); static const std::int32_t ID = -1565597752; std::int32_t get_id() const final { @@ -3845,13 +4490,13 @@ class game final : public Object { class gameHighScore final : public Object { public: - std::int32_t position_; - std::int32_t user_id_; - std::int32_t score_; + int32 position_; + int32 user_id_; + int32 score_; gameHighScore(); - gameHighScore(std::int32_t position_, std::int32_t user_id_, std::int32_t score_); + gameHighScore(int32 position_, int32 user_id_, int32 score_); static const std::int32_t ID = -30778358; std::int32_t get_id() const final { @@ -3863,11 +4508,11 @@ class gameHighScore final : public Object { class gameHighScores final : public Object { public: - std::vector> scores_; + array> scores_; gameHighScores(); - explicit gameHighScores(std::vector> &&scores_); + explicit gameHighScores(array> &&scores_); static const std::int32_t ID = -725770727; std::int32_t get_id() const final { @@ -3879,11 +4524,11 @@ class gameHighScores final : public Object { class hashtags final : public Object { public: - std::vector hashtags_; + array hashtags_; hashtags(); - explicit hashtags(std::vector &&hashtags_); + explicit hashtags(array &&hashtags_); static const std::int32_t ID = 676798885; std::int32_t get_id() const final { @@ -3895,11 +4540,11 @@ class hashtags final : public Object { class httpUrl final : public Object { public: - std::string url_; + string url_; httpUrl(); - explicit httpUrl(std::string const &url_); + explicit httpUrl(string const &url_); static const std::int32_t ID = -2018019930; std::int32_t get_id() const final { @@ -3911,16 +4556,16 @@ class httpUrl final : public Object { class identityDocument final : public Object { public: - std::string number_; + string number_; object_ptr expiry_date_; object_ptr front_side_; object_ptr reverse_side_; object_ptr selfie_; - std::vector> translation_; + array> translation_; identityDocument(); - identityDocument(std::string const &number_, object_ptr &&expiry_date_, object_ptr &&front_side_, object_ptr &&reverse_side_, object_ptr &&selfie_, std::vector> &&translation_); + identityDocument(string const &number_, object_ptr &&expiry_date_, object_ptr &&front_side_, object_ptr &&reverse_side_, object_ptr &&selfie_, array> &&translation_); static const std::int32_t ID = 445952972; std::int32_t get_id() const final { @@ -3932,12 +4577,12 @@ class identityDocument final : public Object { class importedContacts final : public Object { public: - std::vector user_ids_; - std::vector importer_count_; + array user_ids_; + array importer_count_; importedContacts(); - importedContacts(std::vector &&user_ids_, std::vector &&importer_count_); + importedContacts(array &&user_ids_, array &&importer_count_); static const std::int32_t ID = -741685354; std::int32_t get_id() const final { @@ -3949,12 +4594,12 @@ class importedContacts final : public Object { class inlineKeyboardButton final : public Object { public: - std::string text_; + string text_; object_ptr type_; inlineKeyboardButton(); - inlineKeyboardButton(std::string const &text_, object_ptr &&type_); + inlineKeyboardButton(string const &text_, object_ptr &&type_); static const std::int32_t ID = -372105704; std::int32_t get_id() const final { @@ -3970,11 +4615,11 @@ class InlineKeyboardButtonType: public Object { class inlineKeyboardButtonTypeUrl final : public InlineKeyboardButtonType { public: - std::string url_; + string url_; inlineKeyboardButtonTypeUrl(); - explicit inlineKeyboardButtonTypeUrl(std::string const &url_); + explicit inlineKeyboardButtonTypeUrl(string const &url_); static const std::int32_t ID = 1130741420; std::int32_t get_id() const final { @@ -3986,13 +4631,13 @@ class inlineKeyboardButtonTypeUrl final : public InlineKeyboardButtonType { class inlineKeyboardButtonTypeLoginUrl final : public InlineKeyboardButtonType { public: - std::string url_; - std::int32_t id_; - std::string forward_text_; + string url_; + int32 id_; + string forward_text_; inlineKeyboardButtonTypeLoginUrl(); - inlineKeyboardButtonTypeLoginUrl(std::string const &url_, std::int32_t id_, std::string const &forward_text_); + inlineKeyboardButtonTypeLoginUrl(string const &url_, int32 id_, string const &forward_text_); static const std::int32_t ID = 281435539; std::int32_t get_id() const final { @@ -4004,11 +4649,11 @@ class inlineKeyboardButtonTypeLoginUrl final : public InlineKeyboardButtonType { class inlineKeyboardButtonTypeCallback final : public InlineKeyboardButtonType { public: - std::string data_; + bytes data_; inlineKeyboardButtonTypeCallback(); - explicit inlineKeyboardButtonTypeCallback(std::string const &data_); + explicit inlineKeyboardButtonTypeCallback(bytes const &data_); static const std::int32_t ID = -1127515139; std::int32_t get_id() const final { @@ -4018,6 +4663,22 @@ class inlineKeyboardButtonTypeCallback final : public InlineKeyboardButtonType { void store(TlStorerToString &s, const char *field_name) const final; }; +class inlineKeyboardButtonTypeCallbackWithPassword final : public InlineKeyboardButtonType { + public: + bytes data_; + + inlineKeyboardButtonTypeCallbackWithPassword(); + + explicit inlineKeyboardButtonTypeCallbackWithPassword(bytes const &data_); + + static const std::int32_t ID = 908018248; + std::int32_t get_id() const final { + return ID; + } + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class inlineKeyboardButtonTypeCallbackGame final : public InlineKeyboardButtonType { public: @@ -4033,12 +4694,12 @@ class inlineKeyboardButtonTypeCallbackGame final : public InlineKeyboardButtonTy class inlineKeyboardButtonTypeSwitchInline final : public InlineKeyboardButtonType { public: - std::string query_; + string query_; bool in_current_chat_; inlineKeyboardButtonTypeSwitchInline(); - inlineKeyboardButtonTypeSwitchInline(std::string const &query_, bool in_current_chat_); + inlineKeyboardButtonTypeSwitchInline(string const &query_, bool in_current_chat_); static const std::int32_t ID = -2035563307; std::int32_t get_id() const final { @@ -4067,18 +4728,18 @@ class InlineQueryResult: public Object { class inlineQueryResultArticle final : public InlineQueryResult { public: - std::string id_; - std::string url_; + string id_; + string url_; bool hide_url_; - std::string title_; - std::string description_; - object_ptr thumbnail_; + string title_; + string description_; + object_ptr thumbnail_; inlineQueryResultArticle(); - inlineQueryResultArticle(std::string const &id_, std::string const &url_, bool hide_url_, std::string const &title_, std::string const &description_, object_ptr &&thumbnail_); + inlineQueryResultArticle(string const &id_, string const &url_, bool hide_url_, string const &title_, string const &description_, object_ptr &&thumbnail_); - static const std::int32_t ID = -518366710; + static const std::int32_t ID = 206340825; std::int32_t get_id() const final { return ID; } @@ -4088,15 +4749,15 @@ class inlineQueryResultArticle final : public InlineQueryResult { class inlineQueryResultContact final : public InlineQueryResult { public: - std::string id_; + string id_; object_ptr contact_; - object_ptr thumbnail_; + object_ptr thumbnail_; inlineQueryResultContact(); - inlineQueryResultContact(std::string const &id_, object_ptr &&contact_, object_ptr &&thumbnail_); + inlineQueryResultContact(string const &id_, object_ptr &&contact_, object_ptr &&thumbnail_); - static const std::int32_t ID = 410081985; + static const std::int32_t ID = -181960174; std::int32_t get_id() const final { return ID; } @@ -4106,16 +4767,16 @@ class inlineQueryResultContact final : public InlineQueryResult { class inlineQueryResultLocation final : public InlineQueryResult { public: - std::string id_; + string id_; object_ptr location_; - std::string title_; - object_ptr thumbnail_; + string title_; + object_ptr thumbnail_; inlineQueryResultLocation(); - inlineQueryResultLocation(std::string const &id_, object_ptr &&location_, std::string const &title_, object_ptr &&thumbnail_); + inlineQueryResultLocation(string const &id_, object_ptr &&location_, string const &title_, object_ptr &&thumbnail_); - static const std::int32_t ID = -158305341; + static const std::int32_t ID = 466004752; std::int32_t get_id() const final { return ID; } @@ -4125,15 +4786,15 @@ class inlineQueryResultLocation final : public InlineQueryResult { class inlineQueryResultVenue final : public InlineQueryResult { public: - std::string id_; + string id_; object_ptr venue_; - object_ptr thumbnail_; + object_ptr thumbnail_; inlineQueryResultVenue(); - inlineQueryResultVenue(std::string const &id_, object_ptr &&venue_, object_ptr &&thumbnail_); + inlineQueryResultVenue(string const &id_, object_ptr &&venue_, object_ptr &&thumbnail_); - static const std::int32_t ID = -1592932211; + static const std::int32_t ID = 1281036382; std::int32_t get_id() const final { return ID; } @@ -4143,12 +4804,12 @@ class inlineQueryResultVenue final : public InlineQueryResult { class inlineQueryResultGame final : public InlineQueryResult { public: - std::string id_; + string id_; object_ptr game_; inlineQueryResultGame(); - inlineQueryResultGame(std::string const &id_, object_ptr &&game_); + inlineQueryResultGame(string const &id_, object_ptr &&game_); static const std::int32_t ID = 1706916987; std::int32_t get_id() const final { @@ -4160,13 +4821,13 @@ class inlineQueryResultGame final : public InlineQueryResult { class inlineQueryResultAnimation final : public InlineQueryResult { public: - std::string id_; + string id_; object_ptr animation_; - std::string title_; + string title_; inlineQueryResultAnimation(); - inlineQueryResultAnimation(std::string const &id_, object_ptr &&animation_, std::string const &title_); + inlineQueryResultAnimation(string const &id_, object_ptr &&animation_, string const &title_); static const std::int32_t ID = 2009984267; std::int32_t get_id() const final { @@ -4178,12 +4839,12 @@ class inlineQueryResultAnimation final : public InlineQueryResult { class inlineQueryResultAudio final : public InlineQueryResult { public: - std::string id_; + string id_; object_ptr