1
# [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An object of this type can be returned on every function call, in case of an error" ] pub struct Error { # [ doc = "Error code; subject to future changes. If the error code is 406, the error message must not be processed in any way and must not be displayed to the user" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub code : i32 , # [ doc = "Error message; subject to future changes" ] pub message : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An object of this type is returned on a successful function call for certain functions" ] pub struct Ok { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains parameters for TDLib initialization" ] pub struct TdlibParameters { # [ doc = "If set to true, the Telegram test environment will be used instead of the production environment" ] # [ serde ( default ) ] pub use_test_dc : bool , # [ doc = "The path to the directory for the persistent database; if empty, the current working directory will be used" ] pub database_directory : String , # [ doc = "The path to the directory for storing files; if empty, database_directory will be used" ] pub files_directory : String , # [ doc = "If set to true, information about downloaded and uploaded files will be saved between application restarts" ] # [ serde ( default ) ] pub use_file_database : bool , # [ doc = "If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies use_file_database" ] # [ serde ( default ) ] pub use_chat_info_database : bool , # [ doc = "If set to true, the library will maintain a cache of chats and messages. Implies use_chat_info_database" ] # [ serde ( default ) ] pub use_message_database : bool , # [ doc = "If set to true, support for secret chats will be enabled" ] # [ serde ( default ) ] pub use_secret_chats : bool , # [ doc = "Application identifier for Telegram API access, which can be obtained at https://my.telegram.org" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub api_id : i32 , # [ doc = "Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org" ] pub api_hash : String , # [ doc = "IETF language tag of the user's operating system language; must be non-empty" ] pub system_language_code : String , # [ doc = "Model of the device the application is being run on; must be non-empty" ] pub device_model : String , # [ doc = "Version of the operating system the application is being run on; must be non-empty" ] pub system_version : String , # [ doc = "Application version; must be non-empty" ] pub application_version : String , # [ doc = "If set to true, old files will automatically be deleted" ] # [ serde ( default ) ] pub enable_storage_optimizer : bool , # [ doc = "If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name" ] # [ serde ( default ) ] pub ignore_file_names : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An authentication code is delivered via a private Telegram message, which can be viewed in another client " ] pub struct AuthenticationCodeTypeTelegramMessage { # [ doc = "Length of the code" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub length : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An authentication code is delivered via an SMS message to the specified phone number " ] pub struct AuthenticationCodeTypeSms { # [ doc = "Length of the code" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub length : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An authentication code is delivered via a phone call to the specified phone number " ] pub struct AuthenticationCodeTypeCall { # [ doc = "Length of the code" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub length : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An authentication code is delivered by an immediately cancelled call to the specified phone number. The number from which the call was made is the code " ] pub struct AuthenticationCodeTypeFlashCall { # [ doc = "Pattern of the phone number from which the call will be made" ] pub pattern : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Information about the authentication code that was sent " ] pub struct AuthenticationCodeInfo { # [ doc = "A phone number that is being authenticated " ] pub phone_number : String , # [ serde ( rename = "type" ) ] # [ doc = "Describes the way the code was sent to the user " ] pub type_ : AuthenticationCodeType , # [ doc = "Describes the way the next code will be sent to the user; may be null " ] pub next_type : Option<AuthenticationCodeType> , # [ doc = "Timeout before the code should be re-sent, in seconds" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub timeout : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Information about the email address authentication code that was sent " ] pub struct EmailAddressAuthenticationCodeInfo { # [ doc = "Pattern of the email address to which an authentication code was sent " ] pub email_address_pattern : String , # [ doc = "Length of the code; 0 if unknown" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub length : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a part of the text that needs to be formatted in some unusual way " ] pub struct TextEntity { # [ doc = "Offset of the entity in UTF-16 code points " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub offset : i32 , # [ doc = "Length of the entity, in UTF-16 code points " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub length : i32 , # [ serde ( rename = "type" ) ] # [ doc = "Type of the entity" ] pub type_ : TextEntityType } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains a list of text entities " ] pub struct TextEntities { # [ doc = "List of text entities" ] pub entities : Vec<TextEntity> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A text with some entities " ] pub struct FormattedText { # [ doc = "The text " ] pub text : String , # [ doc = "Entities contained in the text" ] pub entities : Vec<TextEntity> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains Telegram terms of service " ] pub struct TermsOfService { # [ doc = "Text of the terms of service " ] pub text : FormattedText , # [ doc = "Mininum age of a user to be able to accept the terms; 0 if any " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub min_user_age : i32 , # [ doc = "True, if a blocking popup with terms of service must be shown to the user" ] # [ serde ( default ) ] pub show_popup : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "TDLib needs TdlibParameters for initialization" ] pub struct AuthorizationStateWaitTdlibParameters { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "TDLib needs an encryption key to decrypt the local database " ] pub struct AuthorizationStateWaitEncryptionKey { # [ doc = "True, if the database is currently encrypted" ] # [ serde ( default ) ] pub is_encrypted : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "TDLib needs the user's phone number to authorize" ] pub struct AuthorizationStateWaitPhoneNumber { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "TDLib needs the user's authentication code to finalize authorization " ] pub struct AuthorizationStateWaitCode { # [ doc = "True, if the user is already registered " ] # [ serde ( default ) ] pub is_registered : bool , # [ doc = "Telegram terms of service, which should be accepted before user can continue registration; may be null " ] pub terms_of_service : Option<TermsOfService> , # [ doc = "Information about the authorization code that was sent" ] pub code_info : AuthenticationCodeInfo } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user has been authorized, but needs to enter a password to start using the application " ] pub struct AuthorizationStateWaitPassword { # [ doc = "Hint for the password; can be empty " ] pub password_hint : String , # [ doc = "True if a recovery email address has been set up" ] # [ serde ( default ) ] pub has_recovery_email_address : bool , # [ doc = "Pattern of the email address to which the recovery email was sent; empty until a recovery email has been sent" ] pub recovery_email_address_pattern : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user has been successfully authorized. TDLib is now ready to answer queries" ] pub struct AuthorizationStateReady { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user is currently logging out" ] pub struct AuthorizationStateLoggingOut { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "TDLib is closing, all subsequent queries will be answered with the error 500. Note that closing TDLib can take a while. All resources will be freed only after authorizationStateClosed has been received" ] pub struct AuthorizationStateClosing { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "TDLib client is in its final state. All databases are closed and all resources are released. No other updates will be received after this. All queries will be responded to\n with error code 500. To continue working, one should create a new instance of the TDLib client" ] pub struct AuthorizationStateClosed { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents the current state of 2-step verification " ] pub struct PasswordState { # [ doc = "True if a 2-step verification password is set " ] # [ serde ( default ) ] pub has_password : bool , # [ doc = "Hint for the password; can be empty " ] pub password_hint : String , # [ doc = "True if a recovery email is set " ] # [ serde ( default ) ] pub has_recovery_email_address : bool , # [ doc = "True if some Telegram Passport elements were saved " ] # [ serde ( default ) ] pub has_passport_data : bool , # [ doc = "Pattern of the email address to which the confirmation email was sent" ] pub unconfirmed_recovery_email_address_pattern : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about the current recovery email address " ] pub struct RecoveryEmailAddress { # [ doc = "Recovery email address" ] pub recovery_email_address : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns information about the availability of a temporary password, which can be used for payments " ] pub struct TemporaryPasswordState { # [ doc = "True, if a temporary password is available " ] # [ serde ( default ) ] pub has_password : bool , # [ doc = "Time left before the temporary password expires, in seconds" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub valid_for : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a local file" ] pub struct LocalFile { # [ doc = "Local path to the locally available file part; may be empty" ] pub path : String , # [ doc = "True, if it is possible to try to download or generate the file" ] # [ serde ( default ) ] pub can_be_downloaded : bool , # [ doc = "True, if the file can be deleted" ] # [ serde ( default ) ] pub can_be_deleted : bool , # [ doc = "True, if the file is currently being downloaded (or a local copy is being generated by some other means)" ] # [ serde ( default ) ] pub is_downloading_active : bool , # [ doc = "True, if the local copy is fully available" ] # [ serde ( default ) ] pub is_downloading_completed : bool , # [ doc = "If is_downloading_completed is false, then only some prefix of the file is ready to be read. downloaded_prefix_size is the size of that prefix" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub downloaded_prefix_size : i32 , # [ doc = "Total downloaded file bytes. Should be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub downloaded_size : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a remote file" ] pub struct RemoteFile { # [ doc = "Remote file identifier; may be empty. Can be used across application restarts or even from other devices for the current user. If the ID starts with \"http://\" or \"https://\", it represents the HTTP URL of the file. TDLib is currently unable to download files if only their URL is known.\n If downloadFile is called on such a file or if it is sent to a secret chat, TDLib starts a file generation process by sending updateFileGenerationStart to the client with the HTTP URL in the original_path and \"#url#\" as the conversion string. Clients should generate the file by downloading it to the specified location" ] pub id : String , # [ doc = "True, if the file is currently being uploaded (or a remote copy is being generated by some other means)" ] # [ serde ( default ) ] pub is_uploading_active : bool , # [ doc = "True, if a remote copy is fully available" ] # [ serde ( default ) ] pub is_uploading_completed : bool , # [ doc = "Size of the remote available part of the file; 0 if unknown" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub uploaded_size : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a file" ] pub struct File { # [ doc = "Unique file identifier" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i32 , # [ doc = "File size; 0 if unknown" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub size : i32 , # [ doc = "Expected file size in case the exact file size is unknown, but an approximate size is known. Can be used to show download/upload progress" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub expected_size : i32 , # [ doc = "Information about the local copy of the file" ] pub local : LocalFile , # [ doc = "Information about the remote copy of the file" ] pub remote : RemoteFile } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A file defined by its unique ID " ] pub struct InputFileId { # [ doc = "Unique file identifier" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A file defined by its remote ID " ] pub struct InputFileRemote { # [ doc = "Remote file identifier" ] pub id : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A file defined by a local path " ] pub struct InputFileLocal { # [ doc = "Local path to the file" ] pub path : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A file generated by the client " ] pub struct InputFileGenerated { # [ doc = "Local path to a file from which the file is generated; may be empty if there is no such file " ] pub original_path : String , # [ doc = "String specifying the conversion applied to the original file; should be persistent across application restarts " ] pub conversion : String , # [ doc = "Expected size of the generated file; 0 if unknown" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub expected_size : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Photo description " ] pub struct PhotoSize { # [ serde ( rename = "type" ) ] # [ doc = "Thumbnail type (see https://core.telegram.org/constructor/photoSize) " ] pub type_ : String , # [ doc = "Information about the photo file " ] pub photo : File , # [ doc = "Photo width " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub width : i32 , # [ doc = "Photo height" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub height : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A mask should be placed relatively to the forehead" ] pub struct MaskPointForehead { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A mask should be placed relatively to the eyes" ] pub struct MaskPointEyes { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A mask should be placed relatively to the mouth" ] pub struct MaskPointMouth { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A mask should be placed relatively to the chin" ] pub struct MaskPointChin { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Position on a photo where a mask should be placed " ] pub struct MaskPosition { # [ doc = "Part of the face, relative to which the mask should be placed" ] pub point : MaskPoint , # [ doc = "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position)" ] pub x_shift : f64 , # [ doc = "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. (For example, 1.0 will place the mask just below the default mask position)" ] pub y_shift : f64 , # [ doc = "Mask scaling coefficient. (For example, 2.0 means a doubled size)" ] pub scale : f64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Describes an animation file. The animation must be encoded in GIF or MPEG4 format " ] pub struct Animation { # [ doc = "Duration of the animation, in seconds; as defined by the sender " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub duration : i32 , # [ doc = "Width of the animation " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub width : i32 , # [ doc = "Height of the animation" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub height : i32 , # [ doc = "Original name of the file; as defined by the sender " ] pub file_name : String , # [ doc = "MIME type of the file, usually \"image/gif\" or \"video/mp4\" " ] pub mime_type : String , # [ doc = "Animation thumbnail; may be null " ] pub thumbnail : Option<PhotoSize> , # [ doc = "File containing the animation" ] pub animation : File } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Describes an audio file. Audio is usually in MP3 format " ] pub struct Audio { # [ doc = "Duration of the audio, in seconds; as defined by the sender " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub duration : i32 , # [ doc = "Title of the audio; as defined by the sender " ] pub title : String , # [ doc = "Performer of the audio; as defined by the sender" ] pub performer : String , # [ doc = "Original name of the file; as defined by the sender " ] pub file_name : String , # [ doc = "The MIME type of the file; as defined by the sender " ] pub mime_type : String , # [ doc = "The thumbnail of the album cover; as defined by the sender. The full size thumbnail should be extracted from the downloaded file; may be null " ] pub album_cover_thumbnail : Option<PhotoSize> , # [ doc = "File containing the audio" ] pub audio : File } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Describes a document of any type " ] pub struct Document { # [ doc = "Original name of the file; as defined by the sender " ] pub file_name : String , # [ doc = "MIME type of the file; as defined by the sender" ] pub mime_type : String , # [ doc = "Document thumbnail; as defined by the sender; may be null " ] pub thumbnail : Option<PhotoSize> , # [ doc = "File containing the document" ] pub document : File } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Describes a photo " ] pub struct Photo { # [ doc = "Photo identifier; 0 for deleted photos " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i64 , # [ doc = "True, if stickers were added to the photo " ] # [ serde ( default ) ] pub has_stickers : bool , # [ doc = "Available variants of the photo, in different sizes" ] pub sizes : Vec<PhotoSize> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Describes a sticker " ] pub struct Sticker { # [ doc = "The identifier of the sticker set to which the sticker belongs; 0 if none " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub set_id : i64 , # [ doc = "Sticker width; as defined by the sender " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub width : i32 , # [ doc = "Sticker height; as defined by the sender" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub height : i32 , # [ doc = "Emoji corresponding to the sticker " ] pub emoji : String , # [ doc = "True, if the sticker is a mask " ] # [ serde ( default ) ] pub is_mask : bool , # [ doc = "Position where the mask should be placed; may be null " ] pub mask_position : Option<MaskPosition> , # [ doc = "Sticker thumbnail in WEBP or JPEG format; may be null " ] pub thumbnail : Option<PhotoSize> , # [ doc = "File containing the sticker" ] pub sticker : File } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Describes a video file " ] pub struct Video { # [ doc = "Duration of the video, in seconds; as defined by the sender " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub duration : i32 , # [ doc = "Video width; as defined by the sender " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub width : i32 , # [ doc = "Video height; as defined by the sender" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub height : i32 , # [ doc = "Original name of the file; as defined by the sender " ] pub file_name : String , # [ doc = "MIME type of the file; as defined by the sender " ] pub mime_type : String , # [ doc = "True, if stickers were added to the photo" ] # [ serde ( default ) ] pub has_stickers : bool , # [ doc = "True, if the video should be tried to be streamed " ] # [ serde ( default ) ] pub supports_streaming : bool , # [ doc = "Video thumbnail; as defined by the sender; may be null " ] pub thumbnail : Option<PhotoSize> , # [ doc = "File containing the video" ] pub video : File } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Describes a video note. The video must be equal in width and height, cropped to a circle, and stored in MPEG4 format " ] pub struct VideoNote { # [ doc = "Duration of the video, in seconds; as defined by the sender " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub duration : i32 , # [ doc = "Video width and height; as defined by the sender " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub length : i32 , # [ doc = "Video thumbnail; as defined by the sender; may be null " ] pub thumbnail : Option<PhotoSize> , # [ doc = "File containing the video" ] pub video : File } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Describes a voice note. The voice note must be encoded with the Opus codec, and stored inside an OGG container. Voice notes can have only a single audio channel " ] pub struct VoiceNote { # [ doc = "Duration of the voice note, in seconds; as defined by the sender" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub duration : i32 , # [ doc = "A waveform representation of the voice note in 5-bit format " ] pub waveform : String , # [ doc = "MIME type of the file; as defined by the sender " ] pub mime_type : String , # [ doc = "File containing the voice note" ] pub voice : File } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Describes a user contact " ] pub struct Contact { # [ doc = "Phone number of the user " ] pub phone_number : String , # [ doc = "First name of the user; 1-255 characters in length " ] pub first_name : String , # [ doc = "Last name of the user " ] pub last_name : String , # [ doc = "Additional data about the user in a form of vCard; 0-2048 bytes in length " ] pub vcard : String , # [ doc = "Identifier of the user, if known; otherwise 0" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub user_id : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Describes a location on planet Earth " ] pub struct Location { # [ doc = "Latitude of the location in degrees; as defined by the sender " ] pub latitude : f64 , # [ doc = "Longitude of the location, in degrees; as defined by the sender" ] pub longitude : f64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Describes a venue " ] pub struct Venue { # [ doc = "Venue location; as defined by the sender " ] pub location : Location , # [ doc = "Venue name; as defined by the sender " ] pub title : String , # [ doc = "Venue address; as defined by the sender " ] pub address : String , # [ doc = "Provider of the venue database; as defined by the sender. Currently only \"foursquare\" needs to be supported" ] pub provider : String , # [ doc = "Identifier of the venue in the provider database; as defined by the sender " ] pub id : String , # [ serde ( rename = "type" ) ] # [ doc = "Type of the venue in the provider database; as defined by the sender" ] pub type_ : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Describes a game " ] pub struct Game { # [ doc = "Game ID " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i64 , # [ doc = "Game short name. To share a game use the URL https://t.me/{bot_username}?game={game_short_name} " ] pub short_name : String , # [ doc = "Game title " ] pub title : String , # [ doc = "Game text, usually containing scoreboards for a game" ] pub text : FormattedText , # [ doc = "Game description " ] pub description : String , # [ doc = "Game photo " ] pub photo : Photo , # [ doc = "Game animation; may be null" ] pub animation : Option<Animation> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Describes a user profile photo " ] pub struct ProfilePhoto { # [ doc = "Photo identifier; 0 for an empty photo. Can be used to find a photo in a list of userProfilePhotos" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i64 , # [ doc = "A small (160x160) user profile photo " ] pub small : File , # [ doc = "A big (640x640) user profile photo" ] pub big : File } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Describes the photo of a chat " ] pub struct ChatPhoto { # [ doc = "A small (160x160) chat photo " ] pub small : File , # [ doc = "A big (640x640) chat photo" ] pub big : File } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The phone number of user A is not known to user B" ] pub struct LinkStateNone { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The phone number of user A is known but that number has not been saved to the contacts list of user B" ] pub struct LinkStateKnowsPhoneNumber { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The phone number of user A has been saved to the contacts list of user B" ] pub struct LinkStateIsContact { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A regular user" ] pub struct UserTypeRegular { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A deleted user or deleted bot. No information on the user besides the user_id is available. It is not possible to perform any active actions on this type of user" ] pub struct UserTypeDeleted { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A bot (see https://core.telegram.org/bots) " ] pub struct UserTypeBot { # [ doc = "True, if the bot can be invited to basic group and supergroup chats" ] # [ serde ( default ) ] pub can_join_groups : bool , # [ doc = "True, if the bot can read all messages in basic group or supergroup chats and not just those addressed to the bot. In private and channel chats a bot can always read all messages" ] # [ serde ( default ) ] pub can_read_all_group_messages : bool , # [ doc = "True, if the bot supports inline queries " ] # [ serde ( default ) ] pub is_inline : bool , # [ doc = "Placeholder for inline queries (displayed on the client input field) " ] pub inline_query_placeholder : String , # [ doc = "True, if the location of the user should be sent with every inline query to this bot" ] # [ serde ( default ) ] pub need_location : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "No information on the user besides the user_id is available, yet this user has not been deleted. This object is extremely rare and must be handled like a deleted user. It is not possible to perform any actions on users of this type" ] pub struct UserTypeUnknown { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents commands supported by a bot " ] pub struct BotCommand { # [ doc = "Text of the bot command " ] pub command : String , # [ doc = "Description of the bot command" ] pub description : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Provides information about a bot and its supported commands " ] pub struct BotInfo { # [ doc = "Long description shown on the user info page " ] pub description : String , # [ doc = "A list of commands supported by the bot" ] pub commands : Vec<BotCommand> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a user " ] pub struct User { # [ doc = "User identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i32 , # [ doc = "First name of the user " ] pub first_name : String , # [ doc = "Last name of the user " ] pub last_name : String , # [ doc = "Username of the user" ] pub username : String , # [ doc = "Phone number of the user " ] pub phone_number : String , # [ doc = "Current online status of the user " ] pub status : UserStatus , # [ doc = "Profile photo of the user; may be null" ] pub profile_photo : Option<ProfilePhoto> , # [ doc = "Relationship from the current user to the other user " ] pub outgoing_link : LinkState , # [ doc = "Relationship from the other user to the current user " ] pub incoming_link : LinkState , # [ doc = "True, if the user is verified " ] # [ serde ( default ) ] pub is_verified : bool , # [ doc = "If non-empty, it contains the reason why access to this user must be restricted. The format of the string is \"{type}: {description}\".\n {type} contains the type of the restriction and at least one of the suffixes \"-all\", \"-ios\", \"-android\", or \"-wp\", which describe the platforms on which access should be restricted. (For example, \"terms-ios-android\". {description} contains a human-readable description of the restriction, which can be shown to the user)" ] pub restriction_reason : String , # [ doc = "If false, the user is inaccessible, and the only information known about the user is inside this class. It can't be passed to any method except GetUser " ] # [ serde ( default ) ] pub have_access : bool , # [ serde ( rename = "type" ) ] # [ doc = "Type of the user " ] pub type_ : UserType , # [ doc = "IETF language tag of the user's language; only available to bots" ] pub language_code : Option<String> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains full information about a user (except the full list of profile photos) " ] pub struct UserFullInfo { # [ doc = "True, if the user is blacklisted by the current user " ] # [ serde ( default ) ] pub is_blocked : bool , # [ doc = "True, if the user can be called " ] # [ serde ( default ) ] pub can_be_called : bool , # [ doc = "True, if the user can't be called due to their privacy settings" ] # [ serde ( default ) ] pub has_private_calls : bool , # [ doc = "A short user bio " ] pub bio : String , # [ doc = "For bots, the text that is included with the link when users share the bot " ] pub share_text : String , # [ doc = "Number of group chats where both the other user and the current user are a member; 0 for the current user " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub group_in_common_count : i32 , # [ doc = "If the user is a bot, information about the bot; may be null" ] pub bot_info : Option<BotInfo> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains part of the list of user photos " ] pub struct UserProfilePhotos { # [ doc = "Total number of user profile photos " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub total_count : i32 , # [ doc = "A list of photos" ] pub photos : Vec<Photo> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a list of users " ] pub struct Users { # [ doc = "Approximate total count of users found " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub total_count : i32 , # [ doc = "A list of user identifiers" ] pub user_ids : Vec<i32> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user is the creator of a chat and has all the administrator privileges " ] pub struct ChatMemberStatusCreator { # [ doc = "True, if the user is a member of the chat" ] # [ serde ( default ) ] pub is_member : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user is a member of a chat and has some additional privileges. In basic groups, administrators can edit and delete messages sent by others, add new members, and ban unprivileged members. In supergroups and channels, there are more detailed options for administrator privileges" ] pub struct ChatMemberStatusAdministrator { # [ doc = "True, if the current user can edit the administrator privileges for the called user" ] # [ serde ( default ) ] pub can_be_edited : bool , # [ doc = "True, if the administrator can change the chat title, photo, and other settings" ] # [ serde ( default ) ] pub can_change_info : bool , # [ doc = "True, if the administrator can create channel posts; applicable to channels only" ] # [ serde ( default ) ] pub can_post_messages : bool , # [ doc = "True, if the administrator can edit messages of other users and pin messages; applicable to channels only" ] # [ serde ( default ) ] pub can_edit_messages : bool , # [ doc = "True, if the administrator can delete messages of other users" ] # [ serde ( default ) ] pub can_delete_messages : bool , # [ doc = "True, if the administrator can invite new users to the chat" ] # [ serde ( default ) ] pub can_invite_users : bool , # [ doc = "True, if the administrator can restrict, ban, or unban chat members" ] # [ serde ( default ) ] pub can_restrict_members : bool , # [ doc = "True, if the administrator can pin messages; applicable to supergroups only" ] # [ serde ( default ) ] pub can_pin_messages : bool , # [ doc = "True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that were directly or indirectly promoted by him" ] # [ serde ( default ) ] pub can_promote_members : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user is a member of a chat, without any additional privileges or restrictions" ] pub struct ChatMemberStatusMember { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user is under certain restrictions in the chat. Not supported in basic groups and channels" ] pub struct ChatMemberStatusRestricted { # [ doc = "True, if the user is a member of the chat" ] # [ serde ( default ) ] pub is_member : bool , # [ doc = "Point in time (Unix timestamp) when restrictions will be lifted from the user; 0 if never. If the user is restricted for more than 366 days or for less than 30 seconds from the current time, the user is considered to be restricted forever" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub restricted_until_date : i32 , # [ doc = "True, if the user can send text messages, contacts, locations, and venues" ] # [ serde ( default ) ] pub can_send_messages : bool , # [ doc = "True, if the user can send audio files, documents, photos, videos, video notes, and voice notes. Implies can_send_messages permissions" ] # [ serde ( default ) ] pub can_send_media_messages : bool , # [ doc = "True, if the user can send animations, games, and stickers and use inline bots. Implies can_send_media_messages permissions" ] # [ serde ( default ) ] pub can_send_other_messages : bool , # [ doc = "True, if the user may add a web page preview to his messages. Implies can_send_messages permissions" ] # [ serde ( default ) ] pub can_add_web_page_previews : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user is not a chat member" ] pub struct ChatMemberStatusLeft { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user was banned (and hence is not a member of the chat). Implies the user can't return to the chat or view messages" ] pub struct ChatMemberStatusBanned { # [ doc = "Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub banned_until_date : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A user with information about joining/leaving a chat " ] pub struct ChatMember { # [ doc = "User identifier of the chat member " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub user_id : i32 , # [ doc = "Identifier of a user that invited/promoted/banned this member in the chat; 0 if unknown" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub inviter_user_id : i32 , # [ doc = "Point in time (Unix timestamp) when the user joined a chat " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub joined_chat_date : i32 , # [ doc = "Status of the member in the chat " ] pub status : ChatMemberStatus , # [ doc = "If the user is a bot, information about the bot; may be null. Can be null even for a bot if the bot is not a chat member" ] pub bot_info : Option<BotInfo> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains a list of chat members " ] pub struct ChatMembers { # [ doc = "Approximate total count of chat members found " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub total_count : i32 , # [ doc = "A list of chat members" ] pub members : Vec<ChatMember> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns the creator and administrators" ] pub struct ChatMembersFilterAdministrators { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns all chat members, including restricted chat members" ] pub struct ChatMembersFilterMembers { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns users under certain restrictions in the chat; can be used only by administrators in a supergroup" ] pub struct ChatMembersFilterRestricted { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns users banned from the chat; can be used only by administrators in a supergroup or in a channel" ] pub struct ChatMembersFilterBanned { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns bot members of the chat" ] pub struct ChatMembersFilterBots { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns recently active users in reverse chronological order" ] pub struct SupergroupMembersFilterRecent { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns the creator and administrators" ] pub struct SupergroupMembersFilterAdministrators { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Used to search for supergroup or channel members via a (string) query " ] pub struct SupergroupMembersFilterSearch { # [ doc = "Query to search for" ] pub query : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns restricted supergroup members; can be used only by administrators " ] pub struct SupergroupMembersFilterRestricted { # [ doc = "Query to search for" ] pub query : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns users banned from the supergroup or channel; can be used only by administrators " ] pub struct SupergroupMembersFilterBanned { # [ doc = "Query to search for" ] pub query : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns bot members of the supergroup or channel" ] pub struct SupergroupMembersFilterBots { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a basic group of 0-200 users (must be upgraded to a supergroup to accommodate more than 200 users)" ] pub struct BasicGroup { # [ doc = "Group identifier" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i32 , # [ doc = "Number of members in the group" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub member_count : i32 , # [ doc = "Status of the current user in the group" ] pub status : ChatMemberStatus , # [ doc = "True, if all members have been granted administrator rights in the group" ] # [ serde ( default ) ] pub everyone_is_administrator : bool , # [ doc = "True, if the group is active" ] # [ serde ( default ) ] pub is_active : bool , # [ doc = "Identifier of the supergroup to which this group was upgraded; 0 if none" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub upgraded_to_supergroup_id : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains full information about a basic group " ] pub struct BasicGroupFullInfo { # [ doc = "User identifier of the creator of the group; 0 if unknown " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub creator_user_id : i32 , # [ doc = "Group members " ] pub members : Vec<ChatMember> , # [ doc = "Invite link for this group; available only for the group creator and only after it has been generated at least once" ] pub invite_link : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a supergroup or channel with zero or more members (subscribers in the case of channels). From the point of view of the system, a channel is a special kind of a supergroup: only administrators can post and see the list of members, and posts from all administrators use the name and photo of the channel instead of individual names and profile photos. Unlike supergroups, channels can have an unlimited number of subscribers" ] pub struct Supergroup { # [ doc = "Supergroup or channel identifier" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i32 , # [ doc = "Username of the supergroup or channel; empty for private supergroups or channels" ] pub username : String , # [ doc = "Point in time (Unix timestamp) when the current user joined, or the point in time when the supergroup or channel was created, in case the user is not a member" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub date : i32 , # [ doc = "Status of the current user in the supergroup or channel" ] pub status : ChatMemberStatus , # [ doc = "Member count; 0 if unknown. Currently it is guaranteed to be known only if the supergroup or channel was found through SearchPublicChats" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub member_count : i32 , # [ doc = "True, if any member of the supergroup can invite other members. This field has no meaning for channels" ] # [ serde ( default ) ] pub anyone_can_invite : bool , # [ doc = "True, if messages sent to the channel should contain information about the sender. This field is only applicable to channels" ] # [ serde ( default ) ] pub sign_messages : bool , # [ doc = "True, if the supergroup is a channel" ] # [ serde ( default ) ] pub is_channel : bool , # [ doc = "True, if the supergroup or channel is verified" ] # [ serde ( default ) ] pub is_verified : bool , # [ doc = "If non-empty, contains the reason why access to this supergroup or channel must be restricted. Format of the string is \"{type}: {description}\".\n {type} Contains the type of the restriction and at least one of the suffixes \"-all\", \"-ios\", \"-android\", or \"-wp\", which describe the platforms on which access should be restricted. (For example, \"terms-ios-android\". {description} contains a human-readable description of the restriction, which can be shown to the user)" ] pub restriction_reason : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains full information about a supergroup or channel" ] pub struct SupergroupFullInfo { # [ doc = "Supergroup or channel description" ] pub description : String , # [ doc = "Number of members in the supergroup or channel; 0 if unknown" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub member_count : i32 , # [ doc = "Number of privileged users in the supergroup or channel; 0 if unknown" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub administrator_count : i32 , # [ doc = "Number of restricted users in the supergroup; 0 if unknown" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub restricted_count : i32 , # [ doc = "Number of users banned from chat; 0 if unknown" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub banned_count : i32 , # [ doc = "True, if members of the chat can be retrieved" ] # [ serde ( default ) ] pub can_get_members : bool , # [ doc = "True, if the chat can be made public" ] # [ serde ( default ) ] pub can_set_username : bool , # [ doc = "True, if the supergroup sticker set can be changed" ] # [ serde ( default ) ] pub can_set_sticker_set : bool , # [ doc = "True, if new chat members will have access to old messages. In public supergroups and both public and private channels, old messages are always available, so this option affects only private supergroups. The value of this field is only available for chat administrators" ] # [ serde ( default ) ] pub is_all_history_available : bool , # [ doc = "Identifier of the supergroup sticker set; 0 if none" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub sticker_set_id : i64 , # [ doc = "Invite link for this chat" ] pub invite_link : String , # [ doc = "Identifier of the pinned message in the chat; 0 if none" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub pinned_message_id : i64 , # [ doc = "Identifier of the basic group from which supergroup was upgraded; 0 if none" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub upgraded_from_basic_group_id : i32 , # [ doc = "Identifier of the last message in the basic group from which supergroup was upgraded; 0 if none" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub upgraded_from_max_message_id : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The secret chat is not yet created; waiting for the other user to get online" ] pub struct SecretChatStatePending { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The secret chat is ready to use" ] pub struct SecretChatStateReady { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The secret chat is closed" ] pub struct SecretChatStateClosed { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a secret chat" ] pub struct SecretChat { # [ doc = "Secret chat identifier" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i32 , # [ doc = "Identifier of the chat partner" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub user_id : i32 , # [ doc = "State of the secret chat" ] pub state : SecretChatState , # [ doc = "True, if the chat was created by the current user; otherwise false" ] # [ serde ( default ) ] pub is_outbound : bool , # [ doc = "Current message Time To Live setting (self-destruct timer) for the chat, in seconds" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub ttl : i32 , # [ doc = "Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 bytes, which must be used to make a 12x12 square image with a color depth of 4. The first 16 bytes should be used to make a central 8x8 square, while the remaining 20 bytes should be used to construct a 2-pixel-wide border around that square.\n Alternatively, the first 32 bytes of the hash can be converted to the hexadecimal format and printed as 32 2-digit hex numbers" ] pub key_hash : String , # [ doc = "Secret chat layer; determines features supported by the other client. Video notes are supported if the layer >= 66" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub layer : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The message was originally written by a known user " ] pub struct MessageForwardedFromUser { # [ doc = "Identifier of the user that originally sent this message " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub sender_user_id : i32 , # [ doc = "Point in time (Unix timestamp) when the message was originally sent" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub date : i32 , # [ doc = "For messages forwarded to the chat with the current user (saved messages), the identifier of the chat from which the message was forwarded; 0 if unknown" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub forwarded_from_chat_id : i64 , # [ doc = "For messages forwarded to the chat with the current user (saved messages) the identifier of the original message from which the new message was forwarded; 0 if unknown" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub forwarded_from_message_id : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The message was originally a post in a channel " ] pub struct MessageForwardedPost { # [ doc = "Identifier of the chat from which the message was forwarded " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "Post author signature" ] pub author_signature : String , # [ doc = "Point in time (Unix timestamp) when the message was originally sent " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub date : i32 , # [ doc = "Message identifier of the original message from which the new message was forwarded; 0 if unknown" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub message_id : i64 , # [ doc = "For messages forwarded to the chat with the current user (saved messages), the identifier of the chat from which the message was forwarded; 0 if unknown" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub forwarded_from_chat_id : i64 , # [ doc = "For messages forwarded to the chat with the current user (saved messages), the identifier of the original message from which the new message was forwarded; 0 if unknown" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub forwarded_from_message_id : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The message is being sent now, but has not yet been delivered to the server" ] pub struct MessageSendingStatePending { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The message failed to be sent" ] pub struct MessageSendingStateFailed { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Describes a message" ] pub struct Message { # [ doc = "Message identifier, unique for the chat to which the message belongs" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i64 , # [ doc = "Identifier of the user who sent the message; 0 if unknown. It is unknown for channel posts" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub sender_user_id : i32 , # [ doc = "Chat identifier" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "Information about the sending state of the message; may be null" ] pub sending_state : Option<MessageSendingState> , # [ doc = "True, if the message is outgoing" ] # [ serde ( default ) ] pub is_outgoing : bool , # [ doc = "True, if the message can be edited" ] # [ serde ( default ) ] pub can_be_edited : bool , # [ doc = "True, if the message can be forwarded" ] # [ serde ( default ) ] pub can_be_forwarded : bool , # [ doc = "True, if the message can be deleted only for the current user while other users will continue to see it" ] # [ serde ( default ) ] pub can_be_deleted_only_for_self : bool , # [ doc = "True, if the message can be deleted for all users" ] # [ serde ( default ) ] pub can_be_deleted_for_all_users : bool , # [ doc = "True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts" ] # [ serde ( default ) ] pub is_channel_post : bool , # [ doc = "True, if the message contains an unread mention for the current user" ] # [ serde ( default ) ] pub contains_unread_mention : bool , # [ doc = "Point in time (Unix timestamp) when the message was sent" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub date : i32 , # [ doc = "Point in time (Unix timestamp) when the message was last edited" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub edit_date : i32 , # [ doc = "Information about the initial message sender; may be null" ] pub forward_info : Option<MessageForwardInfo> , # [ doc = "If non-zero, the identifier of the message this message is replying to; can be the identifier of a deleted message" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub reply_to_message_id : i64 , # [ doc = "For self-destructing messages, the message's TTL (Time To Live), in seconds; 0 if none. TDLib will send updateDeleteMessages or updateMessageContent once the TTL expires" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub ttl : i32 , # [ doc = "Time left before the message expires, in seconds" ] pub ttl_expires_in : f64 , # [ doc = "If non-zero, the user identifier of the bot through which this message was sent" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub via_bot_user_id : i32 , # [ doc = "For channel posts, optional author signature" ] pub author_signature : String , # [ doc = "Number of times this message was viewed" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub views : i32 , # [ doc = "Unique identifier of an album this message belongs to. Only photos and videos can be grouped together in albums" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub media_album_id : i64 , # [ doc = "Content of the message" ] pub content : MessageContent , # [ doc = "Reply markup for the message; may be null" ] pub reply_markup : Option<ReplyMarkup> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains a list of messages " ] pub struct Messages { # [ doc = "Approximate total count of messages found " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub total_count : i32 , # [ doc = "List of messages; messages may be null" ] pub messages : Option<Vec<Message>> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains a list of messages found by a search " ] pub struct FoundMessages { # [ doc = "List of messages " ] pub messages : Vec<Message> , # [ doc = "Value to pass as from_search_id to get more results" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub next_from_search_id : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Notification settings applied to all private and secret chats when the corresponding chat setting has a default value" ] pub struct NotificationSettingsScopePrivateChats { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Notification settings applied to all basic groups, supergroups and channels when the corresponding chat setting has a default value" ] pub struct NotificationSettingsScopeGroupChats { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about notification settings for a chat" ] pub struct ChatNotificationSettings { # [ doc = "If true, mute_for is ignored and the value for the relevant type of chat is used instead " ] # [ serde ( default ) ] pub use_default_mute_for : bool , # [ doc = "Time left before notifications will be unmuted, in seconds" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub mute_for : i32 , # [ doc = "If true, sound is ignored and the value for the relevant type of chat is used instead " ] # [ serde ( default ) ] pub use_default_sound : bool , # [ doc = "The name of an audio file to be used for notification sounds; only applies to iOS applications" ] pub sound : String , # [ doc = "If true, show_preview is ignored and the value for the relevant type of chat is used instead " ] # [ serde ( default ) ] pub use_default_show_preview : bool , # [ doc = "True, if message content should be displayed in notifications" ] # [ serde ( default ) ] pub show_preview : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about notification settings for several chats " ] pub struct ScopeNotificationSettings { # [ doc = "Time left before notifications will be unmuted, in seconds" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub mute_for : i32 , # [ doc = "The name of an audio file to be used for notification sounds; only applies to iOS applications " ] pub sound : String , # [ doc = "True, if message content should be displayed in notifications" ] # [ serde ( default ) ] pub show_preview : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about a message draft " ] pub struct DraftMessage { # [ doc = "Identifier of the message to reply to; 0 if none " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub reply_to_message_id : i64 , # [ doc = "Content of the message draft; this should always be of type inputMessageText" ] pub input_message_text : InputMessageContent } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An ordinary chat with a user " ] pub struct ChatTypePrivate { # [ doc = "User identifier" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub user_id : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A basic group (i.e., a chat with 0-200 other users) " ] pub struct ChatTypeBasicGroup { # [ doc = "Basic group identifier" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub basic_group_id : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A supergroup (i.e. a chat with up to GetOption(\"supergroup_max_size\") other users), or channel (with unlimited members) " ] pub struct ChatTypeSupergroup { # [ doc = "Supergroup or channel identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub supergroup_id : i32 , # [ doc = "True, if the supergroup is a channel" ] # [ serde ( default ) ] pub is_channel : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A secret chat with a user " ] pub struct ChatTypeSecret { # [ doc = "Secret chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub secret_chat_id : i32 , # [ doc = "User identifier of the secret chat peer" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub user_id : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A chat. (Can be a private chat, basic group, supergroup, or secret chat)" ] pub struct Chat { # [ doc = "Chat unique identifier" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i64 , # [ serde ( rename = "type" ) ] # [ doc = "Type of the chat" ] pub type_ : ChatType , # [ doc = "Chat title" ] pub title : String , # [ doc = "Chat photo; may be null" ] pub photo : Option<ChatPhoto> , # [ doc = "Last message in the chat; may be null" ] pub last_message : Option<Message> , # [ doc = "Descending parameter by which chats are sorted in the main chat list. If the order number of two chats is the same, they must be sorted in descending order by ID. If 0, the position of the chat in the list is undetermined" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub order : i64 , # [ doc = "True, if the chat is pinned" ] # [ serde ( default ) ] pub is_pinned : bool , # [ doc = "True, if the chat is marked as unread" ] # [ serde ( default ) ] pub is_marked_as_unread : bool , # [ doc = "True, if the chat is sponsored by the user's MTProxy server" ] # [ serde ( default ) ] pub is_sponsored : bool , # [ doc = "True, if the chat can be reported to Telegram moderators through reportChat" ] # [ serde ( default ) ] pub can_be_reported : bool , # [ doc = "Default value of the disable_notification parameter, used when a message is sent to the chat" ] # [ serde ( default ) ] pub default_disable_notification : bool , # [ doc = "Number of unread messages in the chat" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub unread_count : i32 , # [ doc = "Identifier of the last read incoming message" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub last_read_inbox_message_id : i64 , # [ doc = "Identifier of the last read outgoing message" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub last_read_outbox_message_id : i64 , # [ doc = "Number of unread messages with a mention/reply in the chat" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub unread_mention_count : i32 , # [ doc = "Notification settings for this chat" ] pub notification_settings : ChatNotificationSettings , # [ doc = "Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub reply_markup_message_id : i64 , # [ doc = "A draft of a message in the chat; may be null" ] pub draft_message : Option<DraftMessage> , # [ doc = "Contains client-specific data associated with the chat. (For example, the chat position or local chat notification settings can be stored here.) Persistent if a message database is used" ] pub client_data : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a list of chats " ] pub struct Chats { # [ doc = "List of chat identifiers" ] pub chat_ids : Vec<i64> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains a chat invite link " ] pub struct ChatInviteLink { # [ doc = "Chat invite link" ] pub invite_link : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about a chat invite link" ] pub struct ChatInviteLinkInfo { # [ doc = "Chat identifier of the invite link; 0 if the user is not a member of this chat" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ serde ( rename = "type" ) ] # [ doc = "Contains information about the type of the chat" ] pub type_ : ChatType , # [ doc = "Title of the chat" ] pub title : String , # [ doc = "Chat photo; may be null" ] pub photo : Option<ChatPhoto> , # [ doc = "Number of members" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub member_count : i32 , # [ doc = "User identifiers of some chat members that may be known to the current user" ] pub member_user_ids : Vec<i32> , # [ doc = "True, if the chat is a public supergroup or channel with a username" ] # [ serde ( default ) ] pub is_public : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A simple button, with text that should be sent when the button is pressed" ] pub struct KeyboardButtonTypeText { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A button that sends the user's phone number when pressed; available only in private chats" ] pub struct KeyboardButtonTypeRequestPhoneNumber { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A button that sends the user's location when pressed; available only in private chats" ] pub struct KeyboardButtonTypeRequestLocation { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a single button in a bot keyboard " ] pub struct KeyboardButton { # [ doc = "Text of the button " ] pub text : String , # [ serde ( rename = "type" ) ] # [ doc = "Type of the button" ] pub type_ : KeyboardButtonType } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A button that opens a specified URL " ] pub struct InlineKeyboardButtonTypeUrl { # [ doc = "HTTP or tg:// URL to open" ] pub url : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A button that sends a special callback query to a bot " ] pub struct InlineKeyboardButtonTypeCallback { # [ doc = "Data to be sent to the bot via a callback query" ] pub data : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A button with a game that sends a special callback query to a bot. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageGame" ] pub struct InlineKeyboardButtonTypeCallbackGame { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A button that forces an inline query to the bot to be inserted in the input field " ] pub struct InlineKeyboardButtonTypeSwitchInline { # [ doc = "Inline query to be sent to the bot " ] pub query : String , # [ doc = "True, if the inline query should be sent from the current chat" ] # [ serde ( default ) ] pub in_current_chat : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A button to buy something. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageInvoice" ] pub struct InlineKeyboardButtonTypeBuy { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a single button in an inline keyboard " ] pub struct InlineKeyboardButton { # [ doc = "Text of the button " ] pub text : String , # [ serde ( rename = "type" ) ] # [ doc = "Type of the button" ] pub type_ : InlineKeyboardButtonType } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Instructs clients to remove the keyboard once this message has been received. This kind of keyboard can't be received in an incoming message; instead, UpdateChatReplyMarkup with message_id == 0 will be sent" ] pub struct ReplyMarkupRemoveKeyboard { # [ doc = "True, if the keyboard is removed only for the mentioned users or the target user of a reply" ] # [ serde ( default ) ] pub is_personal : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Instructs clients to force a reply to this message" ] pub struct ReplyMarkupForceReply { # [ doc = "True, if a forced reply must automatically be shown to the current user. For outgoing messages, specify true to show the forced reply only for the mentioned users and for the target user of a reply" ] # [ serde ( default ) ] pub is_personal : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains a custom keyboard layout to quickly reply to bots" ] pub struct ReplyMarkupShowKeyboard { # [ doc = "A list of rows of bot keyboard buttons" ] pub rows : Vec<Vec<KeyboardButton>> , # [ doc = "True, if the client needs to resize the keyboard vertically" ] # [ serde ( default ) ] pub resize_keyboard : bool , # [ doc = "True, if the client needs to hide the keyboard after use" ] # [ serde ( default ) ] pub one_time : bool , # [ doc = "True, if the keyboard must automatically be shown to the current user. For outgoing messages, specify true to show the keyboard only for the mentioned users and for the target user of a reply" ] # [ serde ( default ) ] pub is_personal : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains an inline keyboard layout" ] pub struct ReplyMarkupInlineKeyboard { # [ doc = "A list of rows of inline keyboard buttons" ] pub rows : Vec<Vec<InlineKeyboardButton>> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A plain text " ] pub struct RichTextPlain { # [ doc = "Text" ] pub text : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A bold rich text " ] pub struct RichTextBold { # [ doc = "Text" ] pub text : Box<RichText> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An italicized rich text " ] pub struct RichTextItalic { # [ doc = "Text" ] pub text : Box<RichText> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An underlined rich text " ] pub struct RichTextUnderline { # [ doc = "Text" ] pub text : Box<RichText> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A strike-through rich text " ] pub struct RichTextStrikethrough { # [ doc = "Text" ] pub text : Box<RichText> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A fixed-width rich text " ] pub struct RichTextFixed { # [ doc = "Text" ] pub text : Box<RichText> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A rich text URL link " ] pub struct RichTextUrl { # [ doc = "Text " ] pub text : Box<RichText> , # [ doc = "URL" ] pub url : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A rich text email link " ] pub struct RichTextEmailAddress { # [ doc = "Text " ] pub text : Box<RichText> , # [ doc = "Email address" ] pub email_address : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A concatenation of rich texts " ] pub struct RichTexts { # [ doc = "Texts" ] pub texts : Vec<RichText> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The title of a page " ] pub struct PageBlockTitle { # [ doc = "Title" ] pub title : RichText } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The subtitle of a page " ] pub struct PageBlockSubtitle { # [ doc = "Subtitle" ] pub subtitle : RichText } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The author and publishing date of a page " ] pub struct PageBlockAuthorDate { # [ doc = "Author " ] pub author : RichText , # [ doc = "Point in time (Unix timestamp) when the article was published; 0 if unknown" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub publish_date : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A header " ] pub struct PageBlockHeader { # [ doc = "Header" ] pub header : RichText } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A subheader " ] pub struct PageBlockSubheader { # [ doc = "Subheader" ] pub subheader : RichText } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A text paragraph " ] pub struct PageBlockParagraph { # [ doc = "Paragraph text" ] pub text : RichText } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A preformatted text paragraph " ] pub struct PageBlockPreformatted { # [ doc = "Paragraph text " ] pub text : RichText , # [ doc = "Programming language for which the text should be formatted" ] pub language : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The footer of a page " ] pub struct PageBlockFooter { # [ doc = "Footer" ] pub footer : RichText } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An empty block separating a page" ] pub struct PageBlockDivider { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An invisible anchor on a page, which can be used in a URL to open the page from the specified anchor " ] pub struct PageBlockAnchor { # [ doc = "Name of the anchor" ] pub name : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A list of texts " ] pub struct PageBlockList { # [ doc = "Texts " ] pub items : Vec<RichText> , # [ doc = "True, if the items should be marked with numbers" ] # [ serde ( default ) ] pub is_ordered : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A block quote " ] pub struct PageBlockBlockQuote { # [ doc = "Quote text " ] pub text : RichText , # [ doc = "Quote caption" ] pub caption : RichText } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A pull quote " ] pub struct PageBlockPullQuote { # [ doc = "Quote text " ] pub text : RichText , # [ doc = "Quote caption" ] pub caption : RichText } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An animation " ] pub struct PageBlockAnimation { # [ doc = "Animation file; may be null " ] pub animation : Option<Animation> , # [ doc = "Animation caption " ] pub caption : RichText , # [ doc = "True, if the animation should be played automatically" ] # [ serde ( default ) ] pub need_autoplay : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An audio file " ] pub struct PageBlockAudio { # [ doc = "Audio file; may be null " ] pub audio : Option<Audio> , # [ doc = "Audio file caption" ] pub caption : RichText } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A photo " ] pub struct PageBlockPhoto { # [ doc = "Photo file; may be null " ] pub photo : Option<Photo> , # [ doc = "Photo caption" ] pub caption : RichText } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A video " ] pub struct PageBlockVideo { # [ doc = "Video file; may be null " ] pub video : Option<Video> , # [ doc = "Video caption " ] pub caption : RichText , # [ doc = "True, if the video should be played automatically " ] # [ serde ( default ) ] pub need_autoplay : bool , # [ doc = "True, if the video should be looped" ] # [ serde ( default ) ] pub is_looped : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A page cover " ] pub struct PageBlockCover { # [ doc = "Cover" ] pub cover : Box<PageBlock> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An embedded web page " ] pub struct PageBlockEmbedded { # [ doc = "Web page URL, if available " ] pub url : String , # [ doc = "HTML-markup of the embedded page " ] pub html : String , # [ doc = "Poster photo, if available; may be null " ] pub poster_photo : Option<Photo> , # [ doc = "Block width " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub width : i32 , # [ doc = "Block height " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub height : i32 , # [ doc = "Block caption " ] pub caption : RichText , # [ doc = "True, if the block should be full width " ] # [ serde ( default ) ] pub is_full_width : bool , # [ doc = "True, if scrolling should be allowed" ] # [ serde ( default ) ] pub allow_scrolling : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An embedded post " ] pub struct PageBlockEmbeddedPost { # [ doc = "Web page URL " ] pub url : String , # [ doc = "Post author " ] pub author : String , # [ doc = "Post author photo " ] pub author_photo : Photo , # [ doc = "Point in time (Unix timestamp) when the post was created; 0 if unknown " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub date : i32 , # [ doc = "Post content " ] pub page_blocks : Vec<PageBlock> , # [ doc = "Post caption" ] pub caption : RichText } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A collage " ] pub struct PageBlockCollage { # [ doc = "Collage item contents " ] pub page_blocks : Vec<PageBlock> , # [ doc = "Block caption" ] pub caption : RichText } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A slideshow " ] pub struct PageBlockSlideshow { # [ doc = "Slideshow item contents " ] pub page_blocks : Vec<PageBlock> , # [ doc = "Block caption" ] pub caption : RichText } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A link to a chat " ] pub struct PageBlockChatLink { # [ doc = "Chat title " ] pub title : String , # [ doc = "Chat photo; may be null " ] pub photo : Option<ChatPhoto> , # [ doc = "Chat username, by which all other information about the chat should be resolved" ] pub username : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Describes an instant view page for a web page " ] pub struct WebPageInstantView { # [ doc = "Content of the web page " ] pub page_blocks : Vec<PageBlock> , # [ doc = "True, if the instant view contains the full page. A network request might be needed to get the full web page instant view" ] # [ serde ( default ) ] pub is_full : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Describes a web page preview " ] pub struct WebPage { # [ doc = "Original URL of the link " ] pub url : String , # [ doc = "URL to display" ] pub display_url : String , # [ serde ( rename = "type" ) ] # [ doc = "Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else" ] pub type_ : String , # [ doc = "Short name of the site (e.g., Google Docs, App Store) " ] pub site_name : String , # [ doc = "Title of the content " ] pub title : String , # [ doc = "Description of the content" ] pub description : String , # [ doc = "Image representing the content; may be null" ] pub photo : Option<Photo> , # [ doc = "URL to show in the embedded preview" ] pub embed_url : String , # [ doc = "MIME type of the embedded preview, (e.g., text/html or video/mp4)" ] pub embed_type : String , # [ doc = "Width of the embedded preview" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub embed_width : i32 , # [ doc = "Height of the embedded preview" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub embed_height : i32 , # [ doc = "Duration of the content, in seconds" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub duration : i32 , # [ doc = "Author of the content" ] pub author : String , # [ doc = "Preview of the content as an animation, if available; may be null" ] pub animation : Option<Animation> , # [ doc = "Preview of the content as an audio file, if available; may be null" ] pub audio : Option<Audio> , # [ doc = "Preview of the content as a document, if available (currently only available for small PDF files and ZIP archives); may be null" ] pub document : Option<Document> , # [ doc = "Preview of the content as a sticker for small WEBP files, if available; may be null" ] pub sticker : Option<Sticker> , # [ doc = "Preview of the content as a video, if available; may be null" ] pub video : Option<Video> , # [ doc = "Preview of the content as a video note, if available; may be null" ] pub video_note : Option<VideoNote> , # [ doc = "Preview of the content as a voice note, if available; may be null" ] pub voice_note : Option<VoiceNote> , # [ doc = "True, if the web page has an instant view" ] # [ serde ( default ) ] pub has_instant_view : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Describes an address " ] pub struct Address { # [ doc = "A two-letter ISO 3166-1 alpha-2 country code " ] pub country_code : String , # [ doc = "State, if applicable " ] pub state : String , # [ doc = "City " ] pub city : String , # [ doc = "First line of the address " ] pub street_line1 : String , # [ doc = "Second line of the address " ] pub street_line2 : String , # [ doc = "Address postal code" ] pub postal_code : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Portion of the price of a product (e.g., \"delivery cost\", \"tax amount\") " ] pub struct LabeledPricePart { # [ doc = "Label for this portion of the product price " ] pub label : String , # [ doc = "Currency amount in minimal quantity of the currency" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub amount : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Product invoice " ] pub struct Invoice { # [ doc = "ISO 4217 currency code " ] pub currency : String , # [ doc = "A list of objects used to calculate the total price of the product " ] pub price_parts : Vec<LabeledPricePart> , # [ doc = "True, if the payment is a test payment" ] # [ serde ( default ) ] pub is_test : bool , # [ doc = "True, if the user's name is needed for payment " ] # [ serde ( default ) ] pub need_name : bool , # [ doc = "True, if the user's phone number is needed for payment " ] # [ serde ( default ) ] pub need_phone_number : bool , # [ doc = "True, if the user's email address is needed for payment" ] # [ serde ( default ) ] pub need_email_address : bool , # [ doc = "True, if the user's shipping address is needed for payment " ] # [ serde ( default ) ] pub need_shipping_address : bool , # [ doc = "True, if the user's phone number will be sent to the provider" ] # [ serde ( default ) ] pub send_phone_number_to_provider : bool , # [ doc = "True, if the user's email address will be sent to the provider " ] # [ serde ( default ) ] pub send_email_address_to_provider : bool , # [ doc = "True, if the total price depends on the shipping method" ] # [ serde ( default ) ] pub is_flexible : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Order information " ] pub struct OrderInfo { # [ doc = "Name of the user " ] pub name : String , # [ doc = "Phone number of the user " ] pub phone_number : String , # [ doc = "Email address of the user " ] pub email_address : String , # [ doc = "Shipping address for this order; may be null" ] pub shipping_address : Option<Address> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "One shipping option " ] pub struct ShippingOption { # [ doc = "Shipping option identifier " ] pub id : String , # [ doc = "Option title " ] pub title : String , # [ doc = "A list of objects used to calculate the total shipping costs" ] pub price_parts : Vec<LabeledPricePart> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about saved card credentials " ] pub struct SavedCredentials { # [ doc = "Unique identifier of the saved credentials " ] pub id : String , # [ doc = "Title of the saved credentials" ] pub title : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Applies if a user chooses some previously saved payment credentials. To use their previously saved credentials, the user must have a valid temporary password " ] pub struct InputCredentialsSaved { # [ doc = "Identifier of the saved credentials" ] pub saved_credentials_id : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Applies if a user enters new credentials on a payment provider website " ] pub struct InputCredentialsNew { # [ doc = "Contains JSON-encoded data with a credential identifier from the payment provider " ] pub data : String , # [ doc = "True, if the credential identifier can be saved on the server side" ] # [ serde ( default ) ] pub allow_save : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Applies if a user enters new credentials using Android Pay " ] pub struct InputCredentialsAndroidPay { # [ doc = "JSON-encoded data with the credential identifier" ] pub data : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Applies if a user enters new credentials using Apple Pay " ] pub struct InputCredentialsApplePay { # [ doc = "JSON-encoded data with the credential identifier" ] pub data : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Stripe payment provider " ] pub struct PaymentsProviderStripe { # [ doc = "Stripe API publishable key " ] pub publishable_key : String , # [ doc = "True, if the user country must be provided " ] # [ serde ( default ) ] pub need_country : bool , # [ doc = "True, if the user ZIP/postal code must be provided " ] # [ serde ( default ) ] pub need_postal_code : bool , # [ doc = "True, if the cardholder name must be provided" ] # [ serde ( default ) ] pub need_cardholder_name : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about an invoice payment form " ] pub struct PaymentForm { # [ doc = "Full information of the invoice " ] pub invoice : Invoice , # [ doc = "Payment form URL " ] pub url : String , # [ doc = "Contains information about the payment provider, if available, to support it natively without the need for opening the URL; may be null" ] pub payments_provider : Option<PaymentsProviderStripe> , # [ doc = "Saved server-side order information; may be null " ] pub saved_order_info : Option<OrderInfo> , # [ doc = "Contains information about saved card credentials; may be null " ] pub saved_credentials : Option<SavedCredentials> , # [ doc = "True, if the user can choose to save credentials " ] # [ serde ( default ) ] pub can_save_credentials : bool , # [ doc = "True, if the user will be able to save credentials protected by a password they set up" ] # [ serde ( default ) ] pub need_password : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains a temporary identifier of validated order information, which is stored for one hour. Also contains the available shipping options " ] pub struct ValidatedOrderInfo { # [ doc = "Temporary identifier of the order information " ] pub order_info_id : String , # [ doc = "Available shipping options" ] pub shipping_options : Vec<ShippingOption> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains the result of a payment request " ] pub struct PaymentResult { # [ doc = "True, if the payment request was successful; otherwise the verification_url will be not empty " ] # [ serde ( default ) ] pub success : bool , # [ doc = "URL for additional payment credentials verification" ] pub verification_url : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about a successful payment " ] pub struct PaymentReceipt { # [ doc = "Point in time (Unix timestamp) when the payment was made " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub date : i32 , # [ doc = "User identifier of the payment provider bot " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub payments_provider_user_id : i32 , # [ doc = "Contains information about the invoice" ] pub invoice : Invoice , # [ doc = "Contains order information; may be null " ] pub order_info : Option<OrderInfo> , # [ doc = "Chosen shipping option; may be null " ] pub shipping_option : Option<ShippingOption> , # [ doc = "Title of the saved credentials" ] pub credentials_title : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "File with the date it was uploaded " ] pub struct DatedFile { # [ doc = "The file " ] pub file : File , # [ doc = "Point in time (Unix timestamp) when the file was uploaded" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub date : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's personal details" ] pub struct PassportElementTypePersonalDetails { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's passport" ] pub struct PassportElementTypePassport { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's driver license" ] pub struct PassportElementTypeDriverLicense { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's identity card" ] pub struct PassportElementTypeIdentityCard { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's internal passport" ] pub struct PassportElementTypeInternalPassport { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's address" ] pub struct PassportElementTypeAddress { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's utility bill" ] pub struct PassportElementTypeUtilityBill { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's bank statement" ] pub struct PassportElementTypeBankStatement { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's rental agreement" ] pub struct PassportElementTypeRentalAgreement { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the registration page of the user's passport" ] pub struct PassportElementTypePassportRegistration { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's temporary registration" ] pub struct PassportElementTypeTemporaryRegistration { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's phone number" ] pub struct PassportElementTypePhoneNumber { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's email address" ] pub struct PassportElementTypeEmailAddress { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a date according to the Gregorian calendar " ] pub struct Date { # [ doc = "Day of the month, 1-31 " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub day : i32 , # [ doc = "Month, 1-12 " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub month : i32 , # [ doc = "Year, 1-9999" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub year : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains the user's personal details" ] pub struct PersonalDetails { # [ doc = "First name of the user written in English; 1-255 characters " ] pub first_name : String , # [ doc = "Middle name of the user written in English; 0-255 characters " ] pub middle_name : String , # [ doc = "Last name of the user written in English; 1-255 characters" ] pub last_name : String , # [ doc = "Native first name of the user; 1-255 characters " ] pub native_first_name : String , # [ doc = "Native middle name of the user; 0-255 characters " ] pub native_middle_name : String , # [ doc = "Native last name of the user; 1-255 characters" ] pub native_last_name : String , # [ doc = "Birthdate of the user " ] pub birthdate : Date , # [ doc = "Gender of the user, \"male\" or \"female\" " ] pub gender : String , # [ doc = "A two-letter ISO 3166-1 alpha-2 country code of the user's country " ] pub country_code : String , # [ doc = "A two-letter ISO 3166-1 alpha-2 country code of the user's residence country" ] pub residence_country_code : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An identity document " ] pub struct IdentityDocument { # [ doc = "Document number; 1-24 characters " ] pub number : String , # [ doc = "Document expiry date; may be null " ] pub expiry_date : Option<Date> , # [ doc = "Front side of the document" ] pub front_side : DatedFile , # [ doc = "Reverse side of the document; only for driver license and identity card " ] pub reverse_side : DatedFile , # [ doc = "Selfie with the document; may be null " ] pub selfie : Option<DatedFile> , # [ doc = "List of files containing a certified English translation of the document" ] pub translation : Vec<DatedFile> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An identity document to be saved to Telegram Passport " ] pub struct InputIdentityDocument { # [ doc = "Document number; 1-24 characters " ] pub number : String , # [ doc = "Document expiry date, if available " ] pub expiry_date : Date , # [ doc = "Front side of the document" ] pub front_side : InputFile , # [ doc = "Reverse side of the document; only for driver license and identity card " ] pub reverse_side : InputFile , # [ doc = "Selfie with the document, if available " ] pub selfie : InputFile , # [ doc = "List of files containing a certified English translation of the document" ] pub translation : Vec<InputFile> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A personal document, containing some information about a user " ] pub struct PersonalDocument { # [ doc = "List of files containing the pages of the document " ] pub files : Vec<DatedFile> , # [ doc = "List of files containing a certified English translation of the document" ] pub translation : Vec<DatedFile> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A personal document to be saved to Telegram Passport " ] pub struct InputPersonalDocument { # [ doc = "List of files containing the pages of the document " ] pub files : Vec<InputFile> , # [ doc = "List of files containing a certified English translation of the document" ] pub translation : Vec<InputFile> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's personal details " ] pub struct PassportElementPersonalDetails { # [ doc = "Personal details of the user" ] pub personal_details : PersonalDetails } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's passport " ] pub struct PassportElementPassport { # [ doc = "Passport" ] pub passport : IdentityDocument } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's driver license " ] pub struct PassportElementDriverLicense { # [ doc = "Driver license" ] pub driver_license : IdentityDocument } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's identity card " ] pub struct PassportElementIdentityCard { # [ doc = "Identity card" ] pub identity_card : IdentityDocument } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's internal passport " ] pub struct PassportElementInternalPassport { # [ doc = "Internal passport" ] pub internal_passport : IdentityDocument } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's address " ] pub struct PassportElementAddress { # [ doc = "Address" ] pub address : Address } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's utility bill " ] pub struct PassportElementUtilityBill { # [ doc = "Utility bill" ] pub utility_bill : PersonalDocument } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's bank statement " ] pub struct PassportElementBankStatement { # [ doc = "Bank statement" ] pub bank_statement : PersonalDocument } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's rental agreement " ] pub struct PassportElementRentalAgreement { # [ doc = "Rental agreement" ] pub rental_agreement : PersonalDocument } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's passport registration pages " ] pub struct PassportElementPassportRegistration { # [ doc = "Passport registration pages" ] pub passport_registration : PersonalDocument } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's temporary registration " ] pub struct PassportElementTemporaryRegistration { # [ doc = "Temporary registration" ] pub temporary_registration : PersonalDocument } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's phone number " ] pub struct PassportElementPhoneNumber { # [ doc = "Phone number" ] pub phone_number : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element containing the user's email address " ] pub struct PassportElementEmailAddress { # [ doc = "Email address" ] pub email_address : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element to be saved containing the user's personal details " ] pub struct InputPassportElementPersonalDetails { # [ doc = "Personal details of the user" ] pub personal_details : PersonalDetails } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element to be saved containing the user's passport " ] pub struct InputPassportElementPassport { # [ doc = "The passport to be saved" ] pub passport : InputIdentityDocument } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element to be saved containing the user's driver license " ] pub struct InputPassportElementDriverLicense { # [ doc = "The driver license to be saved" ] pub driver_license : InputIdentityDocument } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element to be saved containing the user's identity card " ] pub struct InputPassportElementIdentityCard { # [ doc = "The identity card to be saved" ] pub identity_card : InputIdentityDocument } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element to be saved containing the user's internal passport " ] pub struct InputPassportElementInternalPassport { # [ doc = "The internal passport to be saved" ] pub internal_passport : InputIdentityDocument } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element to be saved containing the user's address " ] pub struct InputPassportElementAddress { # [ doc = "The address to be saved" ] pub address : Address } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element to be saved containing the user's utility bill " ] pub struct InputPassportElementUtilityBill { # [ doc = "The utility bill to be saved" ] pub utility_bill : InputPersonalDocument } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element to be saved containing the user's bank statement " ] pub struct InputPassportElementBankStatement { # [ doc = "The bank statement to be saved" ] pub bank_statement : InputPersonalDocument } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element to be saved containing the user's rental agreement " ] pub struct InputPassportElementRentalAgreement { # [ doc = "The rental agreement to be saved" ] pub rental_agreement : InputPersonalDocument } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element to be saved containing the user's passport registration " ] pub struct InputPassportElementPassportRegistration { # [ doc = "The passport registration page to be saved" ] pub passport_registration : InputPersonalDocument } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element to be saved containing the user's temporary registration " ] pub struct InputPassportElementTemporaryRegistration { # [ doc = "The temporary registration document to be saved" ] pub temporary_registration : InputPersonalDocument } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element to be saved containing the user's phone number " ] pub struct InputPassportElementPhoneNumber { # [ doc = "The phone number to be saved" ] pub phone_number : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Telegram Passport element to be saved containing the user's email address " ] pub struct InputPassportElementEmailAddress { # [ doc = "The email address to be saved" ] pub email_address : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about saved Telegram Passport elements " ] pub struct PassportElements { # [ doc = "Telegram Passport elements" ] pub elements : Vec<PassportElement> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The element contains an error in an unspecified place. The error will be considered resolved when new data is added" ] pub struct PassportElementErrorSourceUnspecified { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "One of the data fields contains an error. The error will be considered resolved when the value of the field changes " ] pub struct PassportElementErrorSourceDataField { # [ doc = "Field name" ] pub field_name : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The front side of the document contains an error. The error will be considered resolved when the file with the front side changes" ] pub struct PassportElementErrorSourceFrontSide { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The reverse side of the document contains an error. The error will be considered resolved when the file with the reverse side changes" ] pub struct PassportElementErrorSourceReverseSide { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The selfie with the document contains an error. The error will be considered resolved when the file with the selfie changes" ] pub struct PassportElementErrorSourceSelfie { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "One of files with the translation of the document contains an error. The error will be considered resolved when the file changes" ] pub struct PassportElementErrorSourceTranslationFile { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The translation of the document contains an error. The error will be considered resolved when the list of translation files changes" ] pub struct PassportElementErrorSourceTranslationFiles { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The file contains an error. The error will be considered resolved when the file changes" ] pub struct PassportElementErrorSourceFile { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The list of attached files contains an error. The error will be considered resolved when the list of files changes" ] pub struct PassportElementErrorSourceFiles { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains the description of an error in a Telegram Passport element " ] pub struct PassportElementError { # [ serde ( rename = "type" ) ] # [ doc = "Type of the Telegram Passport element which has the error " ] pub type_ : PassportElementType , # [ doc = "Error message " ] pub message : String , # [ doc = "Error source" ] pub source : PassportElementErrorSource } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about a Telegram Passport element that was requested by a service " ] pub struct PassportSuitableElement { # [ serde ( rename = "type" ) ] # [ doc = "Type of the element " ] pub type_ : PassportElementType , # [ doc = "True, if a selfie is required with the identity document" ] # [ serde ( default ) ] pub is_selfie_required : bool , # [ doc = "True, if a certified English translation is required with the document " ] # [ serde ( default ) ] pub is_translation_required : bool , # [ doc = "True, if personal details must include the user's name in the language of their country of residence" ] # [ serde ( default ) ] pub is_native_name_required : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains a description of the required Telegram Passport element that was requested by a service " ] pub struct PassportRequiredElement { # [ doc = "List of Telegram Passport elements any of which is enough to provide" ] pub suitable_elements : Vec<PassportSuitableElement> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about a Telegram Passport authorization form that was requested " ] pub struct PassportAuthorizationForm { # [ doc = "Unique identifier of the authorization form" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i32 , # [ doc = "Information about the Telegram Passport elements that need to be provided to complete the form " ] pub required_elements : Vec<PassportRequiredElement> , # [ doc = "Already available Telegram Passport elements" ] pub elements : Vec<PassportElement> , # [ doc = "Errors in the elements that are already available " ] pub errors : Vec<PassportElementError> , # [ doc = "URL for the privacy policy of the service; can be empty" ] pub privacy_policy_url : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains encrypted Telegram Passport data credentials " ] pub struct EncryptedCredentials { # [ doc = "The encrypted credentials " ] pub data : String , # [ doc = "The decrypted data hash " ] pub hash : String , # [ doc = "Secret for data decryption, encrypted with the service's public key" ] pub secret : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about an encrypted Telegram Passport element; for bots only " ] pub struct EncryptedPassportElement { # [ serde ( rename = "type" ) ] # [ doc = "Type of Telegram Passport element " ] pub type_ : PassportElementType , # [ doc = "Encrypted JSON-encoded data about the user " ] pub data : String , # [ doc = "The front side of an identity document " ] pub front_side : DatedFile , # [ doc = "The reverse side of an identity document; may be null " ] pub reverse_side : Option<DatedFile> , # [ doc = "Selfie with the document; may be null " ] pub selfie : Option<DatedFile> , # [ doc = "List of files containing a certified English translation of the document " ] pub translation : Vec<DatedFile> , # [ doc = "List of attached files " ] pub files : Vec<DatedFile> , # [ doc = "Unencrypted data, phone number or email address " ] pub value : String , # [ doc = "Hash of the entire element" ] pub hash : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The element contains an error in an unspecified place. The error will be considered resolved when new data is added " ] pub struct InputPassportElementErrorSourceUnspecified { # [ doc = "Current hash of the entire element" ] pub element_hash : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A data field contains an error. The error is considered resolved when the field's value changes " ] pub struct InputPassportElementErrorSourceDataField { # [ doc = "Field name " ] pub field_name : String , # [ doc = "Current data hash" ] pub data_hash : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The front side of the document contains an error. The error is considered resolved when the file with the front side of the document changes " ] pub struct InputPassportElementErrorSourceFrontSide { # [ doc = "Current hash of the file containing the front side" ] pub file_hash : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The reverse side of the document contains an error. The error is considered resolved when the file with the reverse side of the document changes " ] pub struct InputPassportElementErrorSourceReverseSide { # [ doc = "Current hash of the file containing the reverse side" ] pub file_hash : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The selfie contains an error. The error is considered resolved when the file with the selfie changes " ] pub struct InputPassportElementErrorSourceSelfie { # [ doc = "Current hash of the file containing the selfie" ] pub file_hash : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "One of the files containing the translation of the document contains an error. The error is considered resolved when the file with the translation changes " ] pub struct InputPassportElementErrorSourceTranslationFile { # [ doc = "Current hash of the file containing the translation" ] pub file_hash : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The translation of the document contains an error. The error is considered resolved when the list of files changes " ] pub struct InputPassportElementErrorSourceTranslationFiles { # [ doc = "Current hashes of all files with the translation" ] pub file_hashes : Vec<String> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The file contains an error. The error is considered resolved when the file changes " ] pub struct InputPassportElementErrorSourceFile { # [ doc = "Current hash of the file which has the error" ] pub file_hash : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The list of attached files contains an error. The error is considered resolved when the file list changes " ] pub struct InputPassportElementErrorSourceFiles { # [ doc = "Current hashes of all attached files" ] pub file_hashes : Vec<String> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains the description of an error in a Telegram Passport element; for bots only " ] pub struct InputPassportElementError { # [ serde ( rename = "type" ) ] # [ doc = "Type of Telegram Passport element that has the error " ] pub type_ : PassportElementType , # [ doc = "Error message " ] pub message : String , # [ doc = "Error source" ] pub source : InputPassportElementErrorSource } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A text message " ] pub struct MessageText { # [ doc = "Text of the message " ] pub text : FormattedText , # [ doc = "A preview of the web page that's mentioned in the text; may be null" ] pub web_page : Option<WebPage> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An animation message (GIF-style). " ] pub struct MessageAnimation { # [ doc = "Message content " ] pub animation : Animation , # [ doc = "Animation caption " ] pub caption : FormattedText , # [ doc = "True, if the animation thumbnail must be blurred and the animation must be shown only while tapped" ] # [ serde ( default ) ] pub is_secret : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An audio message " ] pub struct MessageAudio { # [ doc = "Message content " ] pub audio : Audio , # [ doc = "Audio caption" ] pub caption : FormattedText } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A document message (general file) " ] pub struct MessageDocument { # [ doc = "Message content " ] pub document : Document , # [ doc = "Document caption" ] pub caption : FormattedText } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A photo message " ] pub struct MessagePhoto { # [ doc = "Message content " ] pub photo : Photo , # [ doc = "Photo caption " ] pub caption : FormattedText , # [ doc = "True, if the photo must be blurred and must be shown only while tapped" ] # [ serde ( default ) ] pub is_secret : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An expired photo message (self-destructed after TTL has elapsed)" ] pub struct MessageExpiredPhoto { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A sticker message " ] pub struct MessageSticker { # [ doc = "Message content" ] pub sticker : Sticker } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A video message " ] pub struct MessageVideo { # [ doc = "Message content " ] pub video : Video , # [ doc = "Video caption " ] pub caption : FormattedText , # [ doc = "True, if the video thumbnail must be blurred and the video must be shown only while tapped" ] # [ serde ( default ) ] pub is_secret : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An expired video message (self-destructed after TTL has elapsed)" ] pub struct MessageExpiredVideo { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A video note message " ] pub struct MessageVideoNote { # [ doc = "Message content " ] pub video_note : VideoNote , # [ doc = "True, if at least one of the recipients has viewed the video note " ] # [ serde ( default ) ] pub is_viewed : bool , # [ doc = "True, if the video note thumbnail must be blurred and the video note must be shown only while tapped" ] # [ serde ( default ) ] pub is_secret : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A voice note message " ] pub struct MessageVoiceNote { # [ doc = "Message content " ] pub voice_note : VoiceNote , # [ doc = "Voice note caption " ] pub caption : FormattedText , # [ doc = "True, if at least one of the recipients has listened to the voice note" ] # [ serde ( default ) ] pub is_listened : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A message with a location " ] pub struct MessageLocation { # [ doc = "Message content " ] pub location : Location , # [ doc = "Time relative to the message sent date until which the location can be updated, in seconds" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub live_period : i32 , # [ doc = "Left time for which the location can be updated, in seconds. updateMessageContent is not sent when this field changes" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub expires_in : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A message with information about a venue " ] pub struct MessageVenue { # [ doc = "Message content" ] pub venue : Venue } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A message with a user contact " ] pub struct MessageContact { # [ doc = "Message content" ] pub contact : Contact } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A message with a game " ] pub struct MessageGame { # [ doc = "Game" ] pub game : Game } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A message with an invoice from a bot " ] pub struct MessageInvoice { # [ doc = "Product title " ] pub title : String , # [ doc = "Product description " ] pub description : String , # [ doc = "Product photo; may be null " ] pub photo : Option<Photo> , # [ doc = "Currency for the product price " ] pub currency : String , # [ doc = "Product total price in the minimal quantity of the currency" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub total_amount : i64 , # [ doc = "Unique invoice bot start_parameter. To share an invoice use the URL https://t.me/{bot_username}?start={start_parameter} " ] pub start_parameter : String , # [ doc = "True, if the invoice is a test invoice" ] # [ serde ( default ) ] pub is_test : bool , # [ doc = "True, if the shipping address should be specified " ] # [ serde ( default ) ] pub need_shipping_address : bool , # [ doc = "The identifier of the message with the receipt, after the product has been purchased" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub receipt_message_id : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A message with information about an ended call " ] pub struct MessageCall { # [ doc = "Reason why the call was discarded " ] pub discard_reason : CallDiscardReason , # [ doc = "Call duration, in seconds" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub duration : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A newly created basic group " ] pub struct MessageBasicGroupChatCreate { # [ doc = "Title of the basic group " ] pub title : String , # [ doc = "User identifiers of members in the basic group" ] pub member_user_ids : Vec<i32> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A newly created supergroup or channel " ] pub struct MessageSupergroupChatCreate { # [ doc = "Title of the supergroup or channel" ] pub title : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An updated chat title " ] pub struct MessageChatChangeTitle { # [ doc = "New chat title" ] pub title : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An updated chat photo " ] pub struct MessageChatChangePhoto { # [ doc = "New chat photo" ] pub photo : Photo } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A deleted chat photo" ] pub struct MessageChatDeletePhoto { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "New chat members were added " ] pub struct MessageChatAddMembers { # [ doc = "User identifiers of the new members" ] pub member_user_ids : Vec<i32> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A new member joined the chat by invite link" ] pub struct MessageChatJoinByLink { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A chat member was deleted " ] pub struct MessageChatDeleteMember { # [ doc = "User identifier of the deleted chat member" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub user_id : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A basic group was upgraded to a supergroup and was deactivated as the result " ] pub struct MessageChatUpgradeTo { # [ doc = "Identifier of the supergroup to which the basic group was upgraded" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub supergroup_id : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A supergroup has been created from a basic group " ] pub struct MessageChatUpgradeFrom { # [ doc = "Title of the newly created supergroup " ] pub title : String , # [ doc = "The identifier of the original basic group" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub basic_group_id : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A message has been pinned " ] pub struct MessagePinMessage { # [ doc = "Identifier of the pinned message, can be an identifier of a deleted message" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub message_id : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A screenshot of a message in the chat has been taken" ] pub struct MessageScreenshotTaken { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The TTL (Time To Live) setting messages in a secret chat has been changed " ] pub struct MessageChatSetTtl { # [ doc = "New TTL" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub ttl : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A non-standard action has happened in the chat " ] pub struct MessageCustomServiceAction { # [ doc = "Message text to be shown in the chat" ] pub text : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A new high score was achieved in a game " ] pub struct MessageGameScore { # [ doc = "Identifier of the message with the game, can be an identifier of a deleted message " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub game_message_id : i64 , # [ doc = "Identifier of the game, may be different from the games presented in the message with the game " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub game_id : i64 , # [ doc = "New score" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub score : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A payment has been completed " ] pub struct MessagePaymentSuccessful { # [ doc = "Identifier of the message with the corresponding invoice; can be an identifier of a deleted message " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub invoice_message_id : i64 , # [ doc = "Currency for the price of the product " ] pub currency : String , # [ doc = "Total price for the product, in the minimal quantity of the currency" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub total_amount : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A payment has been completed; for bots only " ] pub struct MessagePaymentSuccessfulBot { # [ doc = "Identifier of the message with the corresponding invoice; can be an identifier of a deleted message " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub invoice_message_id : i64 , # [ doc = "Currency for price of the product" ] pub currency : String , # [ doc = "Total price for the product, in the minimal quantity of the currency " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub total_amount : i64 , # [ doc = "Invoice payload " ] pub invoice_payload : String , # [ doc = "Identifier of the shipping option chosen by the user; may be empty if not applicable " ] pub shipping_option_id : String , # [ doc = "Information about the order; may be null" ] pub order_info : Option<OrderInfo> , # [ doc = "Telegram payment identifier " ] pub telegram_payment_charge_id : String , # [ doc = "Provider payment identifier" ] pub provider_payment_charge_id : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A contact has registered with Telegram" ] pub struct MessageContactRegistered { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The current user has connected a website by logging in using Telegram Login Widget on it " ] pub struct MessageWebsiteConnected { # [ doc = "Domain name of the connected website" ] pub domain_name : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Telegram Passport data has been sent " ] pub struct MessagePassportDataSent { # [ doc = "List of Telegram Passport element types sent" ] pub types : Vec<PassportElementType> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Telegram Passport data has been received; for bots only " ] pub struct MessagePassportDataReceived { # [ doc = "List of received Telegram Passport elements " ] pub elements : Vec<EncryptedPassportElement> , # [ doc = "Encrypted data credentials" ] pub credentials : EncryptedCredentials } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Message content that is not supported by the client" ] pub struct MessageUnsupported { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A mention of a user by their username" ] pub struct TextEntityTypeMention { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A hashtag text, beginning with \"#\"" ] pub struct TextEntityTypeHashtag { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A cashtag text, beginning with \"$\" and consisting of capital english letters (i.e. \"$USD\")" ] pub struct TextEntityTypeCashtag { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A bot command, beginning with \"/\". This shouldn't be highlighted if there are no bots in the chat" ] pub struct TextEntityTypeBotCommand { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An HTTP URL" ] pub struct TextEntityTypeUrl { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An email address" ] pub struct TextEntityTypeEmailAddress { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A bold text" ] pub struct TextEntityTypeBold { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An italic text" ] pub struct TextEntityTypeItalic { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Text that must be formatted as if inside a code HTML tag" ] pub struct TextEntityTypeCode { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Text that must be formatted as if inside a pre HTML tag" ] pub struct TextEntityTypePre { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Text that must be formatted as if inside pre, and code HTML tags " ] pub struct TextEntityTypePreCode { # [ doc = "Programming language of the code; as defined by the sender" ] pub language : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A text description shown instead of a raw URL " ] pub struct TextEntityTypeTextUrl { # [ doc = "HTTP or tg:// URL to be opened when the link is clicked" ] pub url : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A text shows instead of a raw mention of the user (e.g., when the user has no username) " ] pub struct TextEntityTypeMentionName { # [ doc = "Identifier of the mentioned user" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub user_id : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A phone number" ] pub struct TextEntityTypePhoneNumber { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A thumbnail to be sent along with a file; should be in JPEG or WEBP format for stickers, and less than 200 kB in size " ] pub struct InputThumbnail { # [ doc = "Thumbnail file to send. Sending thumbnails by file_id is currently not supported" ] pub thumbnail : InputFile , # [ doc = "Thumbnail width, usually shouldn't exceed 90. Use 0 if unknown " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub width : i32 , # [ doc = "Thumbnail height, usually shouldn't exceed 90. Use 0 if unknown" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub height : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A text message " ] pub struct InputMessageText { # [ doc = "Formatted text to be sent; 1-GetOption(\"message_text_length_max\") characters. Only Bold, Italic, Code, Pre, PreCode and TextUrl entities are allowed to be specified manually" ] pub text : FormattedText , # [ doc = "True, if rich web page previews for URLs in the message text should be disabled " ] # [ serde ( default ) ] pub disable_web_page_preview : bool , # [ doc = "True, if a chat message draft should be deleted" ] # [ serde ( default ) ] pub clear_draft : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An animation message (GIF-style). " ] pub struct InputMessageAnimation { # [ doc = "Animation file to be sent " ] pub animation : InputFile , # [ doc = "Animation thumbnail, if available " ] pub thumbnail : InputThumbnail , # [ doc = "Duration of the animation, in seconds " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub duration : i32 , # [ doc = "Width of the animation; may be replaced by the server " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub width : i32 , # [ doc = "Height of the animation; may be replaced by the server " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub height : i32 , # [ doc = "Animation caption; 0-GetOption(\"message_caption_length_max\") characters" ] pub caption : FormattedText } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An audio message " ] pub struct InputMessageAudio { # [ doc = "Audio file to be sent " ] pub audio : InputFile , # [ doc = "Thumbnail of the cover for the album, if available " ] pub album_cover_thumbnail : InputThumbnail , # [ doc = "Duration of the audio, in seconds; may be replaced by the server " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub duration : i32 , # [ doc = "Title of the audio; 0-64 characters; may be replaced by the server" ] pub title : String , # [ doc = "Performer of the audio; 0-64 characters, may be replaced by the server " ] pub performer : String , # [ doc = "Audio caption; 0-GetOption(\"message_caption_length_max\") characters" ] pub caption : FormattedText } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A document message (general file) " ] pub struct InputMessageDocument { # [ doc = "Document to be sent " ] pub document : InputFile , # [ doc = "Document thumbnail, if available " ] pub thumbnail : InputThumbnail , # [ doc = "Document caption; 0-GetOption(\"message_caption_length_max\") characters" ] pub caption : FormattedText } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A photo message " ] pub struct InputMessagePhoto { # [ doc = "Photo to send " ] pub photo : InputFile , # [ doc = "Photo thumbnail to be sent, this is sent to the other party in secret chats only " ] pub thumbnail : InputThumbnail , # [ doc = "File identifiers of the stickers added to the photo, if applicable " ] pub added_sticker_file_ids : Vec<i32> , # [ doc = "Photo width " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub width : i32 , # [ doc = "Photo height " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub height : i32 , # [ doc = "Photo caption; 0-GetOption(\"message_caption_length_max\") characters" ] pub caption : FormattedText , # [ doc = "Photo TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub ttl : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A sticker message " ] pub struct InputMessageSticker { # [ doc = "Sticker to be sent " ] pub sticker : InputFile , # [ doc = "Sticker thumbnail, if available " ] pub thumbnail : InputThumbnail , # [ doc = "Sticker width " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub width : i32 , # [ doc = "Sticker height" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub height : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A video message " ] pub struct InputMessageVideo { # [ doc = "Video to be sent " ] pub video : InputFile , # [ doc = "Video thumbnail, if available " ] pub thumbnail : InputThumbnail , # [ doc = "File identifiers of the stickers added to the video, if applicable" ] pub added_sticker_file_ids : Vec<i32> , # [ doc = "Duration of the video, in seconds " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub duration : i32 , # [ doc = "Video width " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub width : i32 , # [ doc = "Video height " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub height : i32 , # [ doc = "True, if the video should be tried to be streamed" ] # [ serde ( default ) ] pub supports_streaming : bool , # [ doc = "Video caption; 0-GetOption(\"message_caption_length_max\") characters " ] pub caption : FormattedText , # [ doc = "Video TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub ttl : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A video note message " ] pub struct InputMessageVideoNote { # [ doc = "Video note to be sent " ] pub video_note : InputFile , # [ doc = "Video thumbnail, if available " ] pub thumbnail : InputThumbnail , # [ doc = "Duration of the video, in seconds " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub duration : i32 , # [ doc = "Video width and height; must be positive and not greater than 640" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub length : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A voice note message " ] pub struct InputMessageVoiceNote { # [ doc = "Voice note to be sent " ] pub voice_note : InputFile , # [ doc = "Duration of the voice note, in seconds " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub duration : i32 , # [ doc = "Waveform representation of the voice note, in 5-bit format " ] pub waveform : String , # [ doc = "Voice note caption; 0-GetOption(\"message_caption_length_max\") characters" ] pub caption : FormattedText } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A message with a location " ] pub struct InputMessageLocation { # [ doc = "Location to be sent " ] pub location : Location , # [ doc = "Period for which the location can be updated, in seconds; should bebetween 60 and 86400 for a live location and 0 otherwise" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub live_period : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A message with information about a venue " ] pub struct InputMessageVenue { # [ doc = "Venue to send" ] pub venue : Venue } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A message containing a user contact " ] pub struct InputMessageContact { # [ doc = "Contact to send" ] pub contact : Contact } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A message with a game; not supported for channels or secret chats " ] pub struct InputMessageGame { # [ doc = "User identifier of the bot that owns the game " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub bot_user_id : i32 , # [ doc = "Short name of the game" ] pub game_short_name : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A message with an invoice; can be used only by bots and only in private chats " ] pub struct InputMessageInvoice { # [ doc = "Invoice " ] pub invoice : Invoice , # [ doc = "Product title; 1-32 characters " ] pub title : String , # [ doc = "Product description; 0-255 characters " ] pub description : String , # [ doc = "Product photo URL; optional " ] pub photo_url : String , # [ doc = "Product photo size " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub photo_size : i32 , # [ doc = "Product photo width " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub photo_width : i32 , # [ doc = "Product photo height" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub photo_height : i32 , # [ doc = "The invoice payload " ] pub payload : String , # [ doc = "Payment provider token " ] pub provider_token : String , # [ doc = "JSON-encoded data about the invoice, which will be shared with the payment provider " ] pub provider_data : String , # [ doc = "Unique invoice bot start_parameter for the generation of this invoice" ] pub start_parameter : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A forwarded message " ] pub struct InputMessageForwarded { # [ doc = "Identifier for the chat this forwarded message came from " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub from_chat_id : i64 , # [ doc = "Identifier of the message to forward " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub message_id : i64 , # [ doc = "True, if a game message should be shared within a launched game; applies only to game messages" ] # [ serde ( default ) ] pub in_game_share : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns all found messages, no filter is applied" ] pub struct SearchMessagesFilterEmpty { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns only animation messages" ] pub struct SearchMessagesFilterAnimation { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns only audio messages" ] pub struct SearchMessagesFilterAudio { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns only document messages" ] pub struct SearchMessagesFilterDocument { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns only photo messages" ] pub struct SearchMessagesFilterPhoto { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns only video messages" ] pub struct SearchMessagesFilterVideo { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns only voice note messages" ] pub struct SearchMessagesFilterVoiceNote { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns only photo and video messages" ] pub struct SearchMessagesFilterPhotoAndVideo { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns only messages containing URLs" ] pub struct SearchMessagesFilterUrl { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns only messages containing chat photos" ] pub struct SearchMessagesFilterChatPhoto { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns only call messages" ] pub struct SearchMessagesFilterCall { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns only incoming call messages with missed/declined discard reasons" ] pub struct SearchMessagesFilterMissedCall { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns only video note messages" ] pub struct SearchMessagesFilterVideoNote { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns only voice and video note messages" ] pub struct SearchMessagesFilterVoiceAndVideoNote { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns only messages with mentions of the current user, or messages that are replies to their messages" ] pub struct SearchMessagesFilterMention { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Returns only messages with unread mentions of the current user or messages that are replies to their messages. When using this filter the results can't be additionally filtered by a query or by the sending user" ] pub struct SearchMessagesFilterUnreadMention { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user is typing a message" ] pub struct ChatActionTyping { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user is recording a video" ] pub struct ChatActionRecordingVideo { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user is uploading a video " ] pub struct ChatActionUploadingVideo { # [ doc = "Upload progress, as a percentage" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub progress : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user is recording a voice note" ] pub struct ChatActionRecordingVoiceNote { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user is uploading a voice note " ] pub struct ChatActionUploadingVoiceNote { # [ doc = "Upload progress, as a percentage" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub progress : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user is uploading a photo " ] pub struct ChatActionUploadingPhoto { # [ doc = "Upload progress, as a percentage" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub progress : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user is uploading a document " ] pub struct ChatActionUploadingDocument { # [ doc = "Upload progress, as a percentage" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub progress : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user is picking a location or venue to send" ] pub struct ChatActionChoosingLocation { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user is picking a contact to send" ] pub struct ChatActionChoosingContact { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user has started to play a game" ] pub struct ChatActionStartPlayingGame { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user is recording a video note" ] pub struct ChatActionRecordingVideoNote { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user is uploading a video note " ] pub struct ChatActionUploadingVideoNote { # [ doc = "Upload progress, as a percentage" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub progress : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user has cancelled the previous action" ] pub struct ChatActionCancel { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user status was never changed" ] pub struct UserStatusEmpty { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user is online " ] pub struct UserStatusOnline { # [ doc = "Point in time (Unix timestamp) when the user's online status will expire" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub expires : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user is offline " ] pub struct UserStatusOffline { # [ doc = "Point in time (Unix timestamp) when the user was last online" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub was_online : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user was online recently" ] pub struct UserStatusRecently { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user is offline, but was online last week" ] pub struct UserStatusLastWeek { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user is offline, but was online last month" ] pub struct UserStatusLastMonth { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a list of stickers " ] pub struct Stickers { # [ doc = "List of stickers" ] pub stickers : Vec<Sticker> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a list of all emoji corresponding to a sticker in a sticker set. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object " ] pub struct StickerEmojis { # [ doc = "List of emojis" ] pub emojis : Vec<String> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a sticker set " ] pub struct StickerSet { # [ doc = "Identifier of the sticker set " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i64 , # [ doc = "Title of the sticker set " ] pub title : String , # [ doc = "Name of the sticker set " ] pub name : String , # [ doc = "True, if the sticker set has been installed by the current user" ] # [ serde ( default ) ] pub is_installed : bool , # [ doc = "True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously " ] # [ serde ( default ) ] pub is_archived : bool , # [ doc = "True, if the sticker set is official " ] # [ serde ( default ) ] pub is_official : bool , # [ doc = "True, if the stickers in the set are masks" ] # [ serde ( default ) ] pub is_masks : bool , # [ doc = "True for already viewed trending sticker sets " ] # [ serde ( default ) ] pub is_viewed : bool , # [ doc = "List of stickers in this set " ] pub stickers : Vec<Sticker> , # [ doc = "A list of emoji corresponding to the stickers in the same order" ] pub emojis : Vec<StickerEmojis> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents short information about a sticker set " ] pub struct StickerSetInfo { # [ doc = "Identifier of the sticker set " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i64 , # [ doc = "Title of the sticker set " ] pub title : String , # [ doc = "Name of the sticker set " ] pub name : String , # [ doc = "True, if the sticker set has been installed by current user" ] # [ serde ( default ) ] pub is_installed : bool , # [ doc = "True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously " ] # [ serde ( default ) ] pub is_archived : bool , # [ doc = "True, if the sticker set is official " ] # [ serde ( default ) ] pub is_official : bool , # [ doc = "True, if the stickers in the set are masks" ] # [ serde ( default ) ] pub is_masks : bool , # [ doc = "True for already viewed trending sticker sets " ] # [ serde ( default ) ] pub is_viewed : bool , # [ doc = "Total number of stickers in the set " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub size : i32 , # [ doc = "Contains up to the first 5 stickers from the set, depending on the context. If the client needs more stickers the full set should be requested" ] pub covers : Vec<Sticker> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a list of sticker sets " ] pub struct StickerSets { # [ doc = "Approximate total number of sticker sets found " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub total_count : i32 , # [ doc = "List of sticker sets" ] pub sets : Vec<StickerSetInfo> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The call wasn't discarded, or the reason is unknown" ] pub struct CallDiscardReasonEmpty { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The call was ended before the conversation started. It was cancelled by the caller or missed by the other party" ] pub struct CallDiscardReasonMissed { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The call was ended before the conversation started. It was declined by the other party" ] pub struct CallDiscardReasonDeclined { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The call was ended during the conversation because the users were disconnected" ] pub struct CallDiscardReasonDisconnected { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The call was ended because one of the parties hung up" ] pub struct CallDiscardReasonHungUp { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Specifies the supported call protocols " ] pub struct CallProtocol { # [ doc = "True, if UDP peer-to-peer connections are supported " ] # [ serde ( default ) ] pub udp_p2p : bool , # [ doc = "True, if connection through UDP reflectors is supported " ] # [ serde ( default ) ] pub udp_reflector : bool , # [ doc = "Minimum supported API layer; use 65 " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub min_layer : i32 , # [ doc = "Maximum supported API layer; use 65" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub max_layer : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Describes the address of UDP reflectors " ] pub struct CallConnection { # [ doc = "Reflector identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i64 , # [ doc = "IPv4 reflector address " ] pub ip : String , # [ doc = "IPv6 reflector address " ] pub ipv6 : String , # [ doc = "Reflector port number " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub port : i32 , # [ doc = "Connection peer tag" ] pub peer_tag : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains the call identifier " ] pub struct CallId { # [ doc = "Call identifier" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The call is pending, waiting to be accepted by a user " ] pub struct CallStatePending { # [ doc = "True, if the call has already been created by the server " ] # [ serde ( default ) ] pub is_created : bool , # [ doc = "True, if the call has already been received by the other party" ] # [ serde ( default ) ] pub is_received : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The call has been answered and encryption keys are being exchanged" ] pub struct CallStateExchangingKeys { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The call is ready to use " ] pub struct CallStateReady { # [ doc = "Call protocols supported by the peer " ] pub protocol : CallProtocol , # [ doc = "Available UDP reflectors " ] pub connections : Vec<CallConnection> , # [ doc = "A JSON-encoded call config " ] pub config : String , # [ doc = "Call encryption key " ] pub encryption_key : String , # [ doc = "Encryption key emojis fingerprint" ] pub emojis : Vec<String> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The call is hanging up after discardCall has been called" ] pub struct CallStateHangingUp { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The call has ended successfully " ] pub struct CallStateDiscarded { # [ doc = "The reason, why the call has ended " ] pub reason : CallDiscardReason , # [ doc = "True, if the call rating should be sent to the server " ] # [ serde ( default ) ] pub need_rating : bool , # [ doc = "True, if the call debug information should be sent to the server" ] # [ serde ( default ) ] pub need_debug_information : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The call has ended with an error " ] pub struct CallStateError { # [ doc = "Error. An error with the code 4005000 will be returned if an outgoing call is missed because of an expired timeout" ] pub error : Error } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Describes a call " ] pub struct Call { # [ doc = "Call identifier, not persistent " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i32 , # [ doc = "Peer user identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub user_id : i32 , # [ doc = "True, if the call is outgoing " ] # [ serde ( default ) ] pub is_outgoing : bool , # [ doc = "Call state" ] pub state : CallState } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a list of animations " ] pub struct Animations { # [ doc = "List of animations" ] pub animations : Vec<Animation> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents the result of an ImportContacts request " ] pub struct ImportedContacts { # [ doc = "User identifiers of the imported contacts in the same order as they were specified in the request; 0 if the contact is not yet a registered user" ] pub user_ids : Vec<i32> , # [ doc = "The number of users that imported the corresponding contact; 0 for already registered users or if unavailable" ] pub importer_count : Vec<i32> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a link to an animated GIF " ] pub struct InputInlineQueryResultAnimatedGif { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "Title of the query result " ] pub title : String , # [ doc = "URL of the static result thumbnail (JPEG or GIF), if it exists" ] pub thumbnail_url : String , # [ doc = "The URL of the GIF-file (file size must not exceed 1MB) " ] pub gif_url : String , # [ doc = "Duration of the GIF, in seconds " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub gif_duration : i32 , # [ doc = "Width of the GIF " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub gif_width : i32 , # [ doc = "Height of the GIF" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub gif_height : i32 , # [ doc = "The message reply markup. Must be of type replyMarkupInlineKeyboard or null" ] pub reply_markup : Option<ReplyMarkup> , # [ doc = "The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageAnimation, InputMessageLocation, InputMessageVenue or InputMessageContact" ] pub input_message_content : InputMessageContent } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a link to an animated (i.e. without sound) H.264/MPEG-4 AVC video " ] pub struct InputInlineQueryResultAnimatedMpeg4 { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "Title of the result " ] pub title : String , # [ doc = "URL of the static result thumbnail (JPEG or GIF), if it exists" ] pub thumbnail_url : String , # [ doc = "The URL of the MPEG4-file (file size must not exceed 1MB) " ] pub mpeg4_url : String , # [ doc = "Duration of the video, in seconds " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub mpeg4_duration : i32 , # [ doc = "Width of the video " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub mpeg4_width : i32 , # [ doc = "Height of the video" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub mpeg4_height : i32 , # [ doc = "The message reply markup. Must be of type replyMarkupInlineKeyboard or null" ] pub reply_markup : Option<ReplyMarkup> , # [ doc = "The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageAnimation, InputMessageLocation, InputMessageVenue or InputMessageContact" ] pub input_message_content : InputMessageContent } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a link to an article or web page " ] pub struct InputInlineQueryResultArticle { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "URL of the result, if it exists " ] pub url : String , # [ doc = "True, if the URL must be not shown " ] # [ serde ( default ) ] pub hide_url : bool , # [ doc = "Title of the result" ] pub title : String , # [ doc = "A short description of the result " ] pub description : String , # [ doc = "URL of the result thumbnail, if it exists " ] pub thumbnail_url : String , # [ doc = "Thumbnail width, if known " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub thumbnail_width : i32 , # [ doc = "Thumbnail height, if known" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub thumbnail_height : i32 , # [ doc = "The message reply markup. Must be of type replyMarkupInlineKeyboard or null" ] pub reply_markup : Option<ReplyMarkup> , # [ doc = "The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact" ] pub input_message_content : InputMessageContent } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a link to an MP3 audio file " ] pub struct InputInlineQueryResultAudio { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "Title of the audio file " ] pub title : String , # [ doc = "Performer of the audio file" ] pub performer : String , # [ doc = "The URL of the audio file " ] pub audio_url : String , # [ doc = "Audio file duration, in seconds" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub audio_duration : i32 , # [ doc = "The message reply markup. Must be of type replyMarkupInlineKeyboard or null" ] pub reply_markup : Option<ReplyMarkup> , # [ doc = "The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageAudio, InputMessageLocation, InputMessageVenue or InputMessageContact" ] pub input_message_content : InputMessageContent } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a user contact " ] pub struct InputInlineQueryResultContact { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "User contact " ] pub contact : Contact , # [ doc = "URL of the result thumbnail, if it exists " ] pub thumbnail_url : String , # [ doc = "Thumbnail width, if known " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub thumbnail_width : i32 , # [ doc = "Thumbnail height, if known" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub thumbnail_height : i32 , # [ doc = "The message reply markup. Must be of type replyMarkupInlineKeyboard or null" ] pub reply_markup : Option<ReplyMarkup> , # [ doc = "The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact" ] pub input_message_content : InputMessageContent } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a link to a file " ] pub struct InputInlineQueryResultDocument { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "Title of the resulting file " ] pub title : String , # [ doc = "Short description of the result, if known " ] pub description : String , # [ doc = "URL of the file " ] pub document_url : String , # [ doc = "MIME type of the file content; only \"application/pdf\" and \"application/zip\" are currently allowed" ] pub mime_type : String , # [ doc = "The URL of the file thumbnail, if it exists " ] pub thumbnail_url : String , # [ doc = "Width of the thumbnail " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub thumbnail_width : i32 , # [ doc = "Height of the thumbnail" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub thumbnail_height : i32 , # [ doc = "The message reply markup. Must be of type replyMarkupInlineKeyboard or null" ] pub reply_markup : Option<ReplyMarkup> , # [ doc = "The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageDocument, InputMessageLocation, InputMessageVenue or InputMessageContact" ] pub input_message_content : InputMessageContent } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a game " ] pub struct InputInlineQueryResultGame { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "Short name of the game " ] pub game_short_name : String , # [ doc = "Message reply markup. Must be of type replyMarkupInlineKeyboard or null" ] pub reply_markup : Option<ReplyMarkup> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a point on the map " ] pub struct InputInlineQueryResultLocation { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "Location result " ] pub location : Location , # [ doc = "Amount of time relative to the message sent time until the location can be updated, in seconds " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub live_period : i32 , # [ doc = "Title of the result " ] pub title : String , # [ doc = "URL of the result thumbnail, if it exists " ] pub thumbnail_url : String , # [ doc = "Thumbnail width, if known " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub thumbnail_width : i32 , # [ doc = "Thumbnail height, if known" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub thumbnail_height : i32 , # [ doc = "The message reply markup. Must be of type replyMarkupInlineKeyboard or null" ] pub reply_markup : Option<ReplyMarkup> , # [ doc = "The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact" ] pub input_message_content : InputMessageContent } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents link to a JPEG image " ] pub struct InputInlineQueryResultPhoto { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "Title of the result, if known " ] pub title : String , # [ doc = "A short description of the result, if known " ] pub description : String , # [ doc = "URL of the photo thumbnail, if it exists" ] pub thumbnail_url : String , # [ doc = "The URL of the JPEG photo (photo size must not exceed 5MB) " ] pub photo_url : String , # [ doc = "Width of the photo " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub photo_width : i32 , # [ doc = "Height of the photo" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub photo_height : i32 , # [ doc = "The message reply markup. Must be of type replyMarkupInlineKeyboard or null" ] pub reply_markup : Option<ReplyMarkup> , # [ doc = "The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessagePhoto, InputMessageLocation, InputMessageVenue or InputMessageContact" ] pub input_message_content : InputMessageContent } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a link to a WEBP sticker " ] pub struct InputInlineQueryResultSticker { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "URL of the sticker thumbnail, if it exists" ] pub thumbnail_url : String , # [ doc = "The URL of the WEBP sticker (sticker file size must not exceed 5MB) " ] pub sticker_url : String , # [ doc = "Width of the sticker " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub sticker_width : i32 , # [ doc = "Height of the sticker" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub sticker_height : i32 , # [ doc = "The message reply markup. Must be of type replyMarkupInlineKeyboard or null" ] pub reply_markup : Option<ReplyMarkup> , # [ doc = "The content of the message to be sent. Must be one of the following types: InputMessageText, inputMessageSticker, InputMessageLocation, InputMessageVenue or InputMessageContact" ] pub input_message_content : InputMessageContent } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents information about a venue " ] pub struct InputInlineQueryResultVenue { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "Venue result " ] pub venue : Venue , # [ doc = "URL of the result thumbnail, if it exists " ] pub thumbnail_url : String , # [ doc = "Thumbnail width, if known " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub thumbnail_width : i32 , # [ doc = "Thumbnail height, if known" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub thumbnail_height : i32 , # [ doc = "The message reply markup. Must be of type replyMarkupInlineKeyboard or null" ] pub reply_markup : Option<ReplyMarkup> , # [ doc = "The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact" ] pub input_message_content : InputMessageContent } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a link to a page containing an embedded video player or a video file " ] pub struct InputInlineQueryResultVideo { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "Title of the result " ] pub title : String , # [ doc = "A short description of the result, if known" ] pub description : String , # [ doc = "The URL of the video thumbnail (JPEG), if it exists " ] pub thumbnail_url : String , # [ doc = "URL of the embedded video player or video file " ] pub video_url : String , # [ doc = "MIME type of the content of the video URL, only \"text/html\" or \"video/mp4\" are currently supported" ] pub mime_type : String , # [ doc = "Width of the video " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub video_width : i32 , # [ doc = "Height of the video " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub video_height : i32 , # [ doc = "Video duration, in seconds" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub video_duration : i32 , # [ doc = "The message reply markup. Must be of type replyMarkupInlineKeyboard or null" ] pub reply_markup : Option<ReplyMarkup> , # [ doc = "The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageVideo, InputMessageLocation, InputMessageVenue or InputMessageContact" ] pub input_message_content : InputMessageContent } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a link to an opus-encoded audio file within an OGG container, single channel audio " ] pub struct InputInlineQueryResultVoiceNote { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "Title of the voice note" ] pub title : String , # [ doc = "The URL of the voice note file " ] pub voice_note_url : String , # [ doc = "Duration of the voice note, in seconds" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub voice_note_duration : i32 , # [ doc = "The message reply markup. Must be of type replyMarkupInlineKeyboard or null" ] pub reply_markup : Option<ReplyMarkup> , # [ doc = "The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageVoiceNote, InputMessageLocation, InputMessageVenue or InputMessageContact" ] pub input_message_content : InputMessageContent } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a link to an article or web page " ] pub struct InlineQueryResultArticle { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "URL of the result, if it exists " ] pub url : String , # [ doc = "True, if the URL must be not shown " ] # [ serde ( default ) ] pub hide_url : bool , # [ doc = "Title of the result" ] pub title : String , # [ doc = "A short description of the result " ] pub description : String , # [ doc = "Result thumbnail; may be null" ] pub thumbnail : Option<PhotoSize> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a user contact " ] pub struct InlineQueryResultContact { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "A user contact " ] pub contact : Contact , # [ doc = "Result thumbnail; may be null" ] pub thumbnail : Option<PhotoSize> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a point on the map " ] pub struct InlineQueryResultLocation { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "Location result " ] pub location : Location , # [ doc = "Title of the result " ] pub title : String , # [ doc = "Result thumbnail; may be null" ] pub thumbnail : Option<PhotoSize> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents information about a venue " ] pub struct InlineQueryResultVenue { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "Venue result " ] pub venue : Venue , # [ doc = "Result thumbnail; may be null" ] pub thumbnail : Option<PhotoSize> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents information about a game " ] pub struct InlineQueryResultGame { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "Game result" ] pub game : Game } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents an animation file " ] pub struct InlineQueryResultAnimation { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "Animation file " ] pub animation : Animation , # [ doc = "Animation title" ] pub title : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents an audio file " ] pub struct InlineQueryResultAudio { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "Audio file" ] pub audio : Audio } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a document " ] pub struct InlineQueryResultDocument { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "Document " ] pub document : Document , # [ doc = "Document title " ] pub title : String , # [ doc = "Document description" ] pub description : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a photo " ] pub struct InlineQueryResultPhoto { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "Photo " ] pub photo : Photo , # [ doc = "Title of the result, if known " ] pub title : String , # [ doc = "A short description of the result, if known" ] pub description : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a sticker " ] pub struct InlineQueryResultSticker { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "Sticker" ] pub sticker : Sticker } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a video " ] pub struct InlineQueryResultVideo { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "Video " ] pub video : Video , # [ doc = "Title of the video " ] pub title : String , # [ doc = "Description of the video" ] pub description : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a voice note " ] pub struct InlineQueryResultVoiceNote { # [ doc = "Unique identifier of the query result " ] pub id : String , # [ doc = "Voice note " ] pub voice_note : VoiceNote , # [ doc = "Title of the voice note" ] pub title : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents the results of the inline query. Use sendInlineQueryResultMessage to send the result of the query " ] pub struct InlineQueryResults { # [ doc = "Unique identifier of the inline query " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub inline_query_id : i64 , # [ doc = "The offset for the next request. If empty, there are no more results " ] pub next_offset : String , # [ doc = "Results of the query" ] pub results : Vec<InlineQueryResult> , # [ doc = "If non-empty, this text should be shown on the button, which opens a private chat with the bot and sends the bot a start message with the switch_pm_parameter " ] pub switch_pm_text : String , # [ doc = "Parameter for the bot start message" ] pub switch_pm_parameter : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The payload from a general callback button " ] pub struct CallbackQueryPayloadData { # [ doc = "Data that was attached to the callback button" ] pub data : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The payload from a game callback button " ] pub struct CallbackQueryPayloadGame { # [ doc = "A short name of the game that was attached to the callback button" ] pub game_short_name : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains a bot's answer to a callback query " ] pub struct CallbackQueryAnswer { # [ doc = "Text of the answer " ] pub text : String , # [ doc = "True, if an alert should be shown to the user instead of a toast notification " ] # [ serde ( default ) ] pub show_alert : bool , # [ doc = "URL to be opened" ] pub url : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains the result of a custom request " ] pub struct CustomRequestResult { # [ doc = "A JSON-serialized result" ] pub result : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains one row of the game high score table " ] pub struct GameHighScore { # [ doc = "Position in the high score table " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub position : i32 , # [ doc = "User identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub user_id : i32 , # [ doc = "User score" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub score : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains a list of game high scores " ] pub struct GameHighScores { # [ doc = "A list of game high scores" ] pub scores : Vec<GameHighScore> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A message was edited " ] pub struct ChatEventMessageEdited { # [ doc = "The original message before the edit " ] pub old_message : Message , # [ doc = "The message after it was edited" ] pub new_message : Message } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A message was deleted " ] pub struct ChatEventMessageDeleted { # [ doc = "Deleted message" ] pub message : Message } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A message was pinned " ] pub struct ChatEventMessagePinned { # [ doc = "Pinned message" ] pub message : Message } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A message was unpinned" ] pub struct ChatEventMessageUnpinned { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A new member joined the chat" ] pub struct ChatEventMemberJoined { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A member left the chat" ] pub struct ChatEventMemberLeft { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A new chat member was invited " ] pub struct ChatEventMemberInvited { # [ doc = "New member user identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub user_id : i32 , # [ doc = "New member status" ] pub status : ChatMemberStatus } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A chat member has gained/lost administrator status, or the list of their administrator privileges has changed " ] pub struct ChatEventMemberPromoted { # [ doc = "Chat member user identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub user_id : i32 , # [ doc = "Previous status of the chat member " ] pub old_status : ChatMemberStatus , # [ doc = "New status of the chat member" ] pub new_status : ChatMemberStatus } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A chat member was restricted/unrestricted or banned/unbanned, or the list of their restrictions has changed " ] pub struct ChatEventMemberRestricted { # [ doc = "Chat member user identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub user_id : i32 , # [ doc = "Previous status of the chat member " ] pub old_status : ChatMemberStatus , # [ doc = "New status of the chat member" ] pub new_status : ChatMemberStatus } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The chat title was changed " ] pub struct ChatEventTitleChanged { # [ doc = "Previous chat title " ] pub old_title : String , # [ doc = "New chat title" ] pub new_title : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The chat description was changed " ] pub struct ChatEventDescriptionChanged { # [ doc = "Previous chat description " ] pub old_description : String , # [ doc = "New chat description" ] pub new_description : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The chat username was changed " ] pub struct ChatEventUsernameChanged { # [ doc = "Previous chat username " ] pub old_username : String , # [ doc = "New chat username" ] pub new_username : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The chat photo was changed " ] pub struct ChatEventPhotoChanged { # [ doc = "Previous chat photo value; may be null " ] pub old_photo : Option<ChatPhoto> , # [ doc = "New chat photo value; may be null" ] pub new_photo : Option<ChatPhoto> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The anyone_can_invite setting of a supergroup chat was toggled " ] pub struct ChatEventInvitesToggled { # [ doc = "New value of anyone_can_invite" ] # [ serde ( default ) ] pub anyone_can_invite : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The sign_messages setting of a channel was toggled " ] pub struct ChatEventSignMessagesToggled { # [ doc = "New value of sign_messages" ] # [ serde ( default ) ] pub sign_messages : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The supergroup sticker set was changed " ] pub struct ChatEventStickerSetChanged { # [ doc = "Previous identifier of the chat sticker set; 0 if none " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub old_sticker_set_id : i64 , # [ doc = "New identifier of the chat sticker set; 0 if none" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub new_sticker_set_id : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The is_all_history_available setting of a supergroup was toggled " ] pub struct ChatEventIsAllHistoryAvailableToggled { # [ doc = "New value of is_all_history_available" ] # [ serde ( default ) ] pub is_all_history_available : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a chat event " ] pub struct ChatEvent { # [ doc = "Chat event identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i64 , # [ doc = "Point in time (Unix timestamp) when the event happened " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub date : i32 , # [ doc = "Identifier of the user who performed the action that triggered the event " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub user_id : i32 , # [ doc = "Action performed by the user" ] pub action : ChatEventAction } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains a list of chat events " ] pub struct ChatEvents { # [ doc = "List of events" ] pub events : Vec<ChatEvent> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a set of filters used to obtain a chat event log" ] pub struct ChatEventLogFilters { # [ doc = "True, if message edits should be returned" ] # [ serde ( default ) ] pub message_edits : bool , # [ doc = "True, if message deletions should be returned" ] # [ serde ( default ) ] pub message_deletions : bool , # [ doc = "True, if pin/unpin events should be returned" ] # [ serde ( default ) ] pub message_pins : bool , # [ doc = "True, if members joining events should be returned" ] # [ serde ( default ) ] pub member_joins : bool , # [ doc = "True, if members leaving events should be returned" ] # [ serde ( default ) ] pub member_leaves : bool , # [ doc = "True, if invited member events should be returned" ] # [ serde ( default ) ] pub member_invites : bool , # [ doc = "True, if member promotion/demotion events should be returned" ] # [ serde ( default ) ] pub member_promotions : bool , # [ doc = "True, if member restricted/unrestricted/banned/unbanned events should be returned" ] # [ serde ( default ) ] pub member_restrictions : bool , # [ doc = "True, if changes in chat information should be returned" ] # [ serde ( default ) ] pub info_changes : bool , # [ doc = "True, if changes in chat settings should be returned" ] # [ serde ( default ) ] pub setting_changes : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An ordinary language pack string " ] pub struct LanguagePackStringValueOrdinary { # [ doc = "String value" ] pub value : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A language pack string which has different forms based on the number of some object it mentions " ] pub struct LanguagePackStringValuePluralized { # [ doc = "Value for zero objects " ] pub zero_value : String , # [ doc = "Value for one object " ] pub one_value : String , # [ doc = "Value for two objects" ] pub two_value : String , # [ doc = "Value for few objects " ] pub few_value : String , # [ doc = "Value for many objects " ] pub many_value : String , # [ doc = "Default value" ] pub other_value : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A deleted language pack string, the value should be taken from the built-in english language pack" ] pub struct LanguagePackStringValueDeleted { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents one language pack string " ] pub struct LanguagePackString { # [ doc = "String key " ] pub key : String , # [ doc = "String value" ] pub value : LanguagePackStringValue } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains a list of language pack strings " ] pub struct LanguagePackStrings { # [ doc = "A list of language pack strings" ] pub strings : Vec<LanguagePackString> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about a language pack " ] pub struct LanguagePackInfo { # [ doc = "Unique language pack identifier " ] pub id : String , # [ doc = "Language name " ] pub name : String , # [ doc = "Name of the language in that language " ] pub native_name : String , # [ doc = "Total number of non-deleted strings from the language pack available locally" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub local_string_count : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about the current localization target " ] pub struct LocalizationTargetInfo { # [ doc = "List of available language packs for this application" ] pub language_packs : Vec<LanguagePackInfo> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A token for Google Cloud Messaging " ] pub struct DeviceTokenGoogleCloudMessaging { # [ doc = "Device registration token; may be empty to de-register a device" ] pub token : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A token for Apple Push Notification service " ] pub struct DeviceTokenApplePush { # [ doc = "Device token; may be empty to de-register a device " ] pub device_token : String , # [ doc = "True, if App Sandbox is enabled" ] # [ serde ( default ) ] pub is_app_sandbox : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A token for Apple Push Notification service VoIP notifications " ] pub struct DeviceTokenApplePushVoIP { # [ doc = "Device token; may be empty to de-register a device " ] pub device_token : String , # [ doc = "True, if App Sandbox is enabled" ] # [ serde ( default ) ] pub is_app_sandbox : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A token for Windows Push Notification Services " ] pub struct DeviceTokenWindowsPush { # [ doc = "The access token that will be used to send notifications; may be empty to de-register a device" ] pub access_token : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A token for Microsoft Push Notification Service " ] pub struct DeviceTokenMicrosoftPush { # [ doc = "Push notification channel URI; may be empty to de-register a device" ] pub channel_uri : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A token for Microsoft Push Notification Service VoIP channel " ] pub struct DeviceTokenMicrosoftPushVoIP { # [ doc = "Push notification channel URI; may be empty to de-register a device" ] pub channel_uri : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A token for web Push API " ] pub struct DeviceTokenWebPush { # [ doc = "Absolute URL exposed by the push service where the application server can send push messages; may be empty to de-register a device" ] pub endpoint : String , # [ doc = "Base64url-encoded P-256 elliptic curve Diffie-Hellman public key " ] pub p256dh_base64url : String , # [ doc = "Base64url-encoded authentication secret" ] pub auth_base64url : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A token for Simple Push API for Firefox OS " ] pub struct DeviceTokenSimplePush { # [ doc = "Absolute URL exposed by the push service where the application server can send push messages; may be empty to de-register a device" ] pub endpoint : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A token for Ubuntu Push Client service " ] pub struct DeviceTokenUbuntuPush { # [ doc = "Token; may be empty to de-register a device" ] pub token : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A token for BlackBerry Push Service " ] pub struct DeviceTokenBlackBerryPush { # [ doc = "Token; may be empty to de-register a device" ] pub token : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A token for Tizen Push Service " ] pub struct DeviceTokenTizenPush { # [ doc = "Push service registration identifier; may be empty to de-register a device" ] pub reg_id : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about a wallpaper " ] pub struct Wallpaper { # [ doc = "Unique persistent wallpaper identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i32 , # [ doc = "Available variants of the wallpaper in different sizes. These photos can only be downloaded; they can't be sent in a message " ] pub sizes : Vec<PhotoSize> , # [ doc = "Main color of the wallpaper in RGB24 format; should be treated as background color if no photos are specified" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub color : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains a list of wallpapers " ] pub struct Wallpapers { # [ doc = "A list of wallpapers" ] pub wallpapers : Vec<Wallpaper> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains a list of hashtags " ] pub struct Hashtags { # [ doc = "A list of hashtags" ] pub hashtags : Vec<String> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The username can be set" ] pub struct CheckChatUsernameResultOk { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The username is invalid" ] pub struct CheckChatUsernameResultUsernameInvalid { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The username is occupied" ] pub struct CheckChatUsernameResultUsernameOccupied { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user has too much public chats, one of them should be made private first" ] pub struct CheckChatUsernameResultPublicChatsTooMuch { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user can't be a member of a public supergroup" ] pub struct CheckChatUsernameResultPublicGroupsUnavailable { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Boolean option " ] pub struct OptionValueBoolean { # [ doc = "The value of the option" ] # [ serde ( default ) ] pub value : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An unknown option or an option which has a default value" ] pub struct OptionValueEmpty { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An integer option " ] pub struct OptionValueInteger { # [ doc = "The value of the option" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub value : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A string option " ] pub struct OptionValueString { # [ doc = "The value of the option" ] pub value : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A rule to allow all users to do something" ] pub struct UserPrivacySettingRuleAllowAll { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A rule to allow all of a user's contacts to do something" ] pub struct UserPrivacySettingRuleAllowContacts { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A rule to allow certain specified users to do something " ] pub struct UserPrivacySettingRuleAllowUsers { # [ doc = "The user identifiers" ] pub user_ids : Vec<i32> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A rule to restrict all users from doing something" ] pub struct UserPrivacySettingRuleRestrictAll { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A rule to restrict all contacts of a user from doing something" ] pub struct UserPrivacySettingRuleRestrictContacts { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A rule to restrict all specified users from doing something " ] pub struct UserPrivacySettingRuleRestrictUsers { # [ doc = "The user identifiers" ] pub user_ids : Vec<i32> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A list of privacy rules. Rules are matched in the specified order. The first matched rule defines the privacy setting for a given user. If no rule matches, the action is not allowed " ] pub struct UserPrivacySettingRules { # [ doc = "A list of rules" ] pub rules : Vec<UserPrivacySettingRule> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A privacy setting for managing whether the user's online status is visible" ] pub struct UserPrivacySettingShowStatus { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A privacy setting for managing whether the user can be invited to chats" ] pub struct UserPrivacySettingAllowChatInvites { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A privacy setting for managing whether the user can be called" ] pub struct UserPrivacySettingAllowCalls { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about the period of inactivity after which the current user's account will automatically be deleted " ] pub struct AccountTtl { # [ doc = "Number of days of inactivity before the account will be flagged for deletion; should range from 30-366 days" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub days : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about one session in a Telegram application used by the current user " ] pub struct Session { # [ doc = "Session identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i64 , # [ doc = "True, if this session is the current session" ] # [ serde ( default ) ] pub is_current : bool , # [ doc = "Telegram API identifier, as provided by the application " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub api_id : i32 , # [ doc = "Name of the application, as provided by the application" ] pub application_name : String , # [ doc = "The version of the application, as provided by the application " ] pub application_version : String , # [ doc = "True, if the application is an official application or uses the api_id of an official application" ] # [ serde ( default ) ] pub is_official_application : bool , # [ doc = "Model of the device the application has been run or is running on, as provided by the application " ] pub device_model : String , # [ doc = "Operating system the application has been run or is running on, as provided by the application" ] pub platform : String , # [ doc = "Version of the operating system the application has been run or is running on, as provided by the application " ] pub system_version : String , # [ doc = "Point in time (Unix timestamp) when the user has logged in" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub log_in_date : i32 , # [ doc = "Point in time (Unix timestamp) when the session was last used " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub last_active_date : i32 , # [ doc = "IP address from which the session was created, in human-readable format" ] pub ip : String , # [ doc = "A two-letter country code for the country from which the session was created, based on the IP address " ] pub country : String , # [ doc = "Region code from which the session was created, based on the IP address" ] pub region : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains a list of sessions " ] pub struct Sessions { # [ doc = "List of sessions" ] pub sessions : Vec<Session> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about one website the current user is logged in with Telegram" ] pub struct ConnectedWebsite { # [ doc = "Website identifier" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i64 , # [ doc = "The domain name of the website" ] pub domain_name : String , # [ doc = "User identifier of a bot linked with the website" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub bot_user_id : i32 , # [ doc = "The version of a browser used to log in" ] pub browser : String , # [ doc = "Operating system the browser is running on" ] pub platform : String , # [ doc = "Point in time (Unix timestamp) when the user was logged in" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub log_in_date : i32 , # [ doc = "Point in time (Unix timestamp) when obtained authorization was last used" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub last_active_date : i32 , # [ doc = "IP address from which the user was logged in, in human-readable format" ] pub ip : String , # [ doc = "Human-readable description of a country and a region, from which the user was logged in, based on the IP address" ] pub location : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains a list of websites the current user is logged in with Telegram " ] pub struct ConnectedWebsites { # [ doc = "List of connected websites" ] pub websites : Vec<ConnectedWebsite> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about the availability of the \"Report spam\" action for a chat " ] pub struct ChatReportSpamState { # [ doc = "True, if a prompt with the \"Report spam\" action should be shown to the user" ] # [ serde ( default ) ] pub can_report_spam : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The chat contains spam messages" ] pub struct ChatReportReasonSpam { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The chat promotes violence" ] pub struct ChatReportReasonViolence { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The chat contains pornographic messages" ] pub struct ChatReportReasonPornography { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The chat contains copyrighted content" ] pub struct ChatReportReasonCopyright { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A custom reason provided by the user " ] pub struct ChatReportReasonCustom { # [ doc = "Report text" ] pub text : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains a public HTTPS link to a message in a public supergroup or channel " ] pub struct PublicMessageLink { # [ doc = "Message link " ] pub link : String , # [ doc = "HTML-code for embedding the message" ] pub html : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The data is not a file" ] pub struct FileTypeNone { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The file is an animation" ] pub struct FileTypeAnimation { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The file is an audio file" ] pub struct FileTypeAudio { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The file is a document" ] pub struct FileTypeDocument { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The file is a photo" ] pub struct FileTypePhoto { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The file is a profile photo" ] pub struct FileTypeProfilePhoto { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The file was sent to a secret chat (the file type is not known to the server)" ] pub struct FileTypeSecret { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The file is a thumbnail of a file from a secret chat" ] pub struct FileTypeSecretThumbnail { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The file is a file from Secure storage used for storing Telegram Passport files" ] pub struct FileTypeSecure { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The file is a sticker" ] pub struct FileTypeSticker { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The file is a thumbnail of another file" ] pub struct FileTypeThumbnail { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The file type is not yet known" ] pub struct FileTypeUnknown { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The file is a video" ] pub struct FileTypeVideo { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The file is a video note" ] pub struct FileTypeVideoNote { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The file is a voice note" ] pub struct FileTypeVoiceNote { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The file is a wallpaper" ] pub struct FileTypeWallpaper { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains the storage usage statistics for a specific file type " ] pub struct StorageStatisticsByFileType { # [ doc = "File type " ] pub file_type : FileType , # [ doc = "Total size of the files " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub size : i64 , # [ doc = "Total number of files" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub count : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains the storage usage statistics for a specific chat " ] pub struct StorageStatisticsByChat { # [ doc = "Chat identifier; 0 if none " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "Total size of the files in the chat " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub size : i64 , # [ doc = "Total number of files in the chat " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub count : i32 , # [ doc = "Statistics split by file types" ] pub by_file_type : Vec<StorageStatisticsByFileType> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains the exact storage usage statistics split by chats and file type " ] pub struct StorageStatistics { # [ doc = "Total size of files " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub size : i64 , # [ doc = "Total number of files " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub count : i32 , # [ doc = "Statistics split by chats" ] pub by_chat : Vec<StorageStatisticsByChat> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains approximate storage usage statistics, excluding files of unknown file type " ] pub struct StorageStatisticsFast { # [ doc = "Approximate total size of files " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub files_size : i64 , # [ doc = "Approximate number of files " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub file_count : i32 , # [ doc = "Size of the database" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub database_size : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The network is not available" ] pub struct NetworkTypeNone { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A mobile network" ] pub struct NetworkTypeMobile { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A mobile roaming network" ] pub struct NetworkTypeMobileRoaming { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A Wi-Fi network" ] pub struct NetworkTypeWiFi { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A different network type (e.g., Ethernet network)" ] pub struct NetworkTypeOther { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about the total amount of data that was used to send and receive files " ] pub struct NetworkStatisticsEntryFile { # [ doc = "Type of the file the data is part of " ] pub file_type : FileType , # [ doc = "Type of the network the data was sent through. Call setNetworkType to maintain the actual network type" ] pub network_type : NetworkType , # [ doc = "Total number of bytes sent " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub sent_bytes : i64 , # [ doc = "Total number of bytes received" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub received_bytes : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about the total amount of data that was used for calls " ] pub struct NetworkStatisticsEntryCall { # [ doc = "Type of the network the data was sent through. Call setNetworkType to maintain the actual network type" ] pub network_type : NetworkType , # [ doc = "Total number of bytes sent " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub sent_bytes : i64 , # [ doc = "Total number of bytes received " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub received_bytes : i64 , # [ doc = "Total call duration, in seconds" ] pub duration : f64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A full list of available network statistic entries " ] pub struct NetworkStatistics { # [ doc = "Point in time (Unix timestamp) when the app began collecting statistics " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub since_date : i32 , # [ doc = "Network statistics entries" ] pub entries : Vec<NetworkStatisticsEntry> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Currently waiting for the network to become available. Use SetNetworkType to change the available network type" ] pub struct ConnectionStateWaitingForNetwork { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Currently establishing a connection with a proxy server" ] pub struct ConnectionStateConnectingToProxy { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Currently establishing a connection to the Telegram servers" ] pub struct ConnectionStateConnecting { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Downloading data received while the client was offline" ] pub struct ConnectionStateUpdating { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "There is a working connection to the Telegram servers" ] pub struct ConnectionStateReady { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A category containing frequently used private chats with non-bot users" ] pub struct TopChatCategoryUsers { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A category containing frequently used private chats with bot users" ] pub struct TopChatCategoryBots { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A category containing frequently used basic groups and supergroups" ] pub struct TopChatCategoryGroups { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A category containing frequently used channels" ] pub struct TopChatCategoryChannels { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A category containing frequently used chats with inline bots sorted by their usage in inline mode" ] pub struct TopChatCategoryInlineBots { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A category containing frequently used chats used for calls" ] pub struct TopChatCategoryCalls { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A URL linking to a user " ] pub struct TMeUrlTypeUser { # [ doc = "Identifier of the user" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub user_id : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A URL linking to a public supergroup or channel " ] pub struct TMeUrlTypeSupergroup { # [ doc = "Identifier of the supergroup or channel" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub supergroup_id : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A chat invite link " ] pub struct TMeUrlTypeChatInvite { # [ doc = "Chat invite link info" ] pub info : ChatInviteLinkInfo } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A URL linking to a sticker set " ] pub struct TMeUrlTypeStickerSet { # [ doc = "Identifier of the sticker set" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub sticker_set_id : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a URL linking to an internal Telegram entity " ] pub struct TMeUrl { # [ doc = "URL " ] pub url : String , # [ serde ( rename = "type" ) ] # [ doc = "Type of the URL" ] pub type_ : TMeUrlType } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains a list of t.me URLs " ] pub struct TMeUrls { # [ doc = "List of URLs" ] pub urls : Vec<TMeUrl> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains a counter " ] pub struct Count { # [ doc = "Count" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub count : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains some text " ] pub struct Text { # [ doc = "Text" ] pub text : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains a value representing a number of seconds " ] pub struct Seconds { # [ doc = "Number of seconds" ] pub seconds : f64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about a tg:// deep link " ] pub struct DeepLinkInfo { # [ doc = "Text to be shown to the user " ] pub text : FormattedText , # [ doc = "True, if user should be asked to update the application" ] # [ serde ( default ) ] pub need_update_application : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The text should be parsed in markdown-style" ] pub struct TextParseModeMarkdown { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The text should be parsed in HTML-style" ] pub struct TextParseModeHTML { } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A SOCKS5 proxy server " ] pub struct ProxyTypeSocks5 { # [ doc = "Username for logging in; may be empty " ] pub username : String , # [ doc = "Password for logging in; may be empty" ] pub password : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A HTTP transparent proxy server " ] pub struct ProxyTypeHttp { # [ doc = "Username for logging in; may be empty " ] pub username : String , # [ doc = "Password for logging in; may be empty " ] pub password : String , # [ doc = "Pass true, if the proxy supports only HTTP requests and doesn't support transparent TCP connections via HTTP CONNECT method" ] # [ serde ( default ) ] pub http_only : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An MTProto proxy server " ] pub struct ProxyTypeMtproto { # [ doc = "The proxy's secret in hexadecimal encoding" ] pub secret : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Contains information about a proxy server " ] pub struct Proxy { # [ doc = "Unique identifier of the proxy " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i32 , # [ doc = "Proxy server IP address " ] pub server : String , # [ doc = "Proxy server port " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub port : i32 , # [ doc = "Point in time (Unix timestamp) when the proxy was last used; 0 if never " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub last_used_date : i32 , # [ doc = "True, if the proxy is enabled now " ] # [ serde ( default ) ] pub is_enabled : bool , # [ serde ( rename = "type" ) ] # [ doc = "Type of the proxy" ] pub type_ : ProxyType } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Represents a list of proxy servers " ] pub struct Proxies { # [ doc = "List of proxy servers" ] pub proxies : Vec<Proxy> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Describes a sticker that should be added to a sticker set " ] pub struct InputSticker { # [ doc = "PNG image with the sticker; must be up to 512 kB in size and fit in a 512x512 square " ] pub png_sticker : InputFile , # [ doc = "Emoji corresponding to the sticker " ] pub emojis : String , # [ doc = "For masks, position where the mask should be placed; may be null" ] pub mask_position : Option<MaskPosition> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user authorization state has changed " ] pub struct UpdateAuthorizationState { # [ doc = "New authorization state" ] pub authorization_state : AuthorizationState } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A new message was received; can also be an outgoing message " ] pub struct UpdateNewMessage { # [ doc = "The new message " ] pub message : Message , # [ doc = "True, if this message must not generate a notification " ] # [ serde ( default ) ] pub disable_notification : bool , # [ doc = "True, if the message contains a mention of the current user" ] # [ serde ( default ) ] pub contains_mention : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A request to send a message has reached the Telegram server. This doesn't mean that the message will be sent successfully or even that the send message request will be processed. This update will be sent only if the option \"use_quick_ack\" is set to true. This update may be sent multiple times for the same message" ] pub struct UpdateMessageSendAcknowledged { # [ doc = "The chat identifier of the sent message " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "A temporary message identifier" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub message_id : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A message has been successfully sent " ] pub struct UpdateMessageSendSucceeded { # [ doc = "Information about the sent message. Usually only the message identifier, date, and content are changed, but almost all other fields can also change " ] pub message : Message , # [ doc = "The previous temporary message identifier" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub old_message_id : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update" ] pub struct UpdateMessageSendFailed { # [ doc = "Contains information about the message that failed to send " ] pub message : Message , # [ doc = "The previous temporary message identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub old_message_id : i64 , # [ doc = "An error code " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub error_code : i32 , # [ doc = "Error message" ] pub error_message : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The message content has changed " ] pub struct UpdateMessageContent { # [ doc = "Chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "Message identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub message_id : i64 , # [ doc = "New message content" ] pub new_content : MessageContent } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A message was edited. Changes in the message content will come in a separate updateMessageContent " ] pub struct UpdateMessageEdited { # [ doc = "Chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "Message identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub message_id : i64 , # [ doc = "Point in time (Unix timestamp) when the message was edited " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub edit_date : i32 , # [ doc = "New message reply markup; may be null" ] pub reply_markup : Option<ReplyMarkup> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The view count of the message has changed " ] pub struct UpdateMessageViews { # [ doc = "Chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "Message identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub message_id : i64 , # [ doc = "New value of the view count" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub views : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The message content was opened. Updates voice note messages to \"listened\", video note messages to \"viewed\" and starts the TTL timer for self-destructing messages " ] pub struct UpdateMessageContentOpened { # [ doc = "Chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "Message identifier" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub message_id : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A message with an unread mention was read " ] pub struct UpdateMessageMentionRead { # [ doc = "Chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "Message identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub message_id : i64 , # [ doc = "The new number of unread mention messages left in the chat" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub unread_mention_count : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the client. The chat field changes will be reported through separate updates " ] pub struct UpdateNewChat { # [ doc = "The chat" ] pub chat : Chat } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The title of a chat was changed " ] pub struct UpdateChatTitle { # [ doc = "Chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "The new chat title" ] pub title : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A chat photo was changed " ] pub struct UpdateChatPhoto { # [ doc = "Chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "The new chat photo; may be null" ] pub photo : Option<ChatPhoto> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The last message of a chat was changed. If last_message is null then the last message in the chat became unknown. Some new unknown messages might be added to the chat in this case " ] pub struct UpdateChatLastMessage { # [ doc = "Chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "The new last message in the chat; may be null " ] pub last_message : Option<Message> , # [ doc = "New value of the chat order" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub order : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The order of the chat in the chats list has changed. Instead of this update updateChatLastMessage, updateChatIsPinned or updateChatDraftMessage might be sent " ] pub struct UpdateChatOrder { # [ doc = "Chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "New value of the order" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub order : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A chat was pinned or unpinned " ] pub struct UpdateChatIsPinned { # [ doc = "Chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "New value of is_pinned " ] # [ serde ( default ) ] pub is_pinned : bool , # [ doc = "New value of the chat order" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub order : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A chat was marked as unread or was read " ] pub struct UpdateChatIsMarkedAsUnread { # [ doc = "Chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "New value of is_marked_as_unread" ] # [ serde ( default ) ] pub is_marked_as_unread : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A chat's is_sponsored field has changed " ] pub struct UpdateChatIsSponsored { # [ doc = "Chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "New value of is_sponsored " ] # [ serde ( default ) ] pub is_sponsored : bool , # [ doc = "New value of chat order" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub order : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The value of the default disable_notification parameter, used when a message is sent to the chat, was changed " ] pub struct UpdateChatDefaultDisableNotification { # [ doc = "Chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "The new default_disable_notification value" ] # [ serde ( default ) ] pub default_disable_notification : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Incoming messages were read or number of unread messages has been changed " ] pub struct UpdateChatReadInbox { # [ doc = "Chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "Identifier of the last read incoming message " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub last_read_inbox_message_id : i64 , # [ doc = "The number of unread messages left in the chat" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub unread_count : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Outgoing messages were read " ] pub struct UpdateChatReadOutbox { # [ doc = "Chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "Identifier of last read outgoing message" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub last_read_outbox_message_id : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The chat unread_mention_count has changed " ] pub struct UpdateChatUnreadMentionCount { # [ doc = "Chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "The number of unread mention messages left in the chat" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub unread_mention_count : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Notification settings for a chat were changed " ] pub struct UpdateChatNotificationSettings { # [ doc = "Chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "The new notification settings" ] pub notification_settings : ChatNotificationSettings } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Notification settings for some type of chats were updated " ] pub struct UpdateScopeNotificationSettings { # [ doc = "Types of chats for which notification settings were updated " ] pub scope : NotificationSettingsScope , # [ doc = "The new notification settings" ] pub notification_settings : ScopeNotificationSettings } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The default chat reply markup was changed. Can occur because new messages with reply markup were received or because an old reply markup was hidden by the user" ] pub struct UpdateChatReplyMarkup { # [ doc = "Chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub reply_markup_message_id : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update shouldn't be applied " ] pub struct UpdateChatDraftMessage { # [ doc = "Chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "The new draft message; may be null " ] pub draft_message : Option<DraftMessage> , # [ doc = "New value of the chat order" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub order : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Some messages were deleted " ] pub struct UpdateDeleteMessages { # [ doc = "Chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "Identifiers of the deleted messages" ] pub message_ids : Vec<i64> , # [ doc = "True, if the messages are permanently deleted by a user (as opposed to just becoming unaccessible)" ] # [ serde ( default ) ] pub is_permanent : bool , # [ doc = "True, if the messages are deleted only from the cache and can possibly be retrieved again in the future" ] # [ serde ( default ) ] pub from_cache : bool } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "User activity in the chat has changed " ] pub struct UpdateUserChatAction { # [ doc = "Chat identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "Identifier of a user performing an action " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub user_id : i32 , # [ doc = "The action description" ] pub action : ChatAction } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user went online or offline " ] pub struct UpdateUserStatus { # [ doc = "User identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub user_id : i32 , # [ doc = "New status of the user" ] pub status : UserStatus } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the client " ] pub struct UpdateUser { # [ doc = "New data about the user" ] pub user : User } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Some data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the client " ] pub struct UpdateBasicGroup { # [ doc = "New data about the group" ] pub basic_group : BasicGroup } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Some data of a supergroup or a channel has changed. This update is guaranteed to come before the supergroup identifier is returned to the client " ] pub struct UpdateSupergroup { # [ doc = "New data about the supergroup" ] pub supergroup : Supergroup } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Some data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the client " ] pub struct UpdateSecretChat { # [ doc = "New data about the secret chat" ] pub secret_chat : SecretChat } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Some data from userFullInfo has been changed " ] pub struct UpdateUserFullInfo { # [ doc = "User identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub user_id : i32 , # [ doc = "New full information about the user" ] pub user_full_info : UserFullInfo } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Some data from basicGroupFullInfo has been changed " ] pub struct UpdateBasicGroupFullInfo { # [ doc = "Identifier of a basic group " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub basic_group_id : i32 , # [ doc = "New full information about the group" ] pub basic_group_full_info : BasicGroupFullInfo } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Some data from supergroupFullInfo has been changed " ] pub struct UpdateSupergroupFullInfo { # [ doc = "Identifier of the supergroup or channel " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub supergroup_id : i32 , # [ doc = "New full information about the supergroup" ] pub supergroup_full_info : SupergroupFullInfo } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Service notification from the server. Upon receiving this the client must show a popup with the content of the notification" ] pub struct UpdateServiceNotification { # [ serde ( rename = "type" ) ] # [ doc = "Notification type. If type begins with \"AUTH_KEY_DROP_\", then two buttons \"Cancel\" and \"Log out\" should be shown under notification; if user presses the second, all local data should be destroyed using Destroy method" ] pub type_ : String , # [ doc = "Notification content" ] pub content : MessageContent } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Information about a file was updated " ] pub struct UpdateFile { # [ doc = "New data about the file" ] pub file : File } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The file generation process needs to be started by the client" ] pub struct UpdateFileGenerationStart { # [ doc = "Unique identifier for the generation process" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub generation_id : i64 , # [ doc = "The path to a file from which a new file is generated; may be empty" ] pub original_path : String , # [ doc = "The path to a file that should be created and where the new file should be generated" ] pub destination_path : String , # [ doc = "String specifying the conversion applied to the original file. If conversion is \"#url#\" than original_path contains an HTTP/HTTPS URL of a file, which should be downloaded by the client" ] pub conversion : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "File generation is no longer needed " ] pub struct UpdateFileGenerationStop { # [ doc = "Unique identifier for the generation process" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub generation_id : i64 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "New call was created or information about a call was updated " ] pub struct UpdateCall { # [ doc = "New data about a call" ] pub call : Call } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Some privacy setting rules have been changed " ] pub struct UpdateUserPrivacySettingRules { # [ doc = "The privacy setting " ] pub setting : UserPrivacySetting , # [ doc = "New privacy rules" ] pub rules : UserPrivacySettingRules } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Number of unread messages has changed. This update is sent only if a message database is used " ] pub struct UpdateUnreadMessageCount { # [ doc = "Total number of unread messages " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub unread_count : i32 , # [ doc = "Total number of unread messages in unmuted chats" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub unread_unmuted_count : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Number of unread chats, i.e. with unread messages or marked as unread, has changed. This update is sent only if a message database is used" ] pub struct UpdateUnreadChatCount { # [ doc = "Total number of unread chats " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub unread_count : i32 , # [ doc = "Total number of unread unmuted chats" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub unread_unmuted_count : i32 , # [ doc = "Total number of chats marked as unread " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub marked_as_unread_count : i32 , # [ doc = "Total number of unmuted chats marked as unread" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub marked_as_unread_unmuted_count : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "An option changed its value " ] pub struct UpdateOption { # [ doc = "The option name " ] pub name : String , # [ doc = "The new option value" ] pub value : OptionValue } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The list of installed sticker sets was updated " ] pub struct UpdateInstalledStickerSets { # [ doc = "True, if the list of installed mask sticker sets was updated " ] # [ serde ( default ) ] pub is_masks : bool , # [ doc = "The new list of installed ordinary sticker sets" ] pub sticker_set_ids : Vec<i64> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The list of trending sticker sets was updated or some of them were viewed " ] pub struct UpdateTrendingStickerSets { # [ doc = "The new list of trending sticker sets" ] pub sticker_sets : StickerSets } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The list of recently used stickers was updated " ] pub struct UpdateRecentStickers { # [ doc = "True, if the list of stickers attached to photo or video files was updated, otherwise the list of sent stickers is updated " ] # [ serde ( default ) ] pub is_attached : bool , # [ doc = "The new list of file identifiers of recently used stickers" ] pub sticker_ids : Vec<i32> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The list of favorite stickers was updated " ] pub struct UpdateFavoriteStickers { # [ doc = "The new list of file identifiers of favorite stickers" ] pub sticker_ids : Vec<i32> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The list of saved animations was updated " ] pub struct UpdateSavedAnimations { # [ doc = "The new list of file identifiers of saved animations" ] pub animation_ids : Vec<i32> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "Some language pack strings have been updated " ] pub struct UpdateLanguagePackStrings { # [ doc = "Localization target to which the language pack belongs " ] pub localization_target : String , # [ doc = "Identifier of the updated language pack " ] pub language_pack_id : String , # [ doc = "List of changed language pack strings" ] pub strings : Vec<LanguagePackString> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The connection state has changed " ] pub struct UpdateConnectionState { # [ doc = "The new connection state" ] pub state : ConnectionState } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method should be called with the reason \"Decline ToS update\" " ] pub struct UpdateTermsOfService { # [ doc = "Identifier of the terms of service " ] pub terms_of_service_id : String , # [ doc = "The new terms of service" ] pub terms_of_service : TermsOfService } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A new incoming inline query; for bots only " ] pub struct UpdateNewInlineQuery { # [ doc = "Unique query identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i64 , # [ doc = "Identifier of the user who sent the query " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub sender_user_id : i32 , # [ doc = "User location, provided by the client; may be null " ] pub user_location : Option<Location> , # [ doc = "Text of the query " ] pub query : String , # [ doc = "Offset of the first entry to return" ] pub offset : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "The user has chosen a result of an inline query; for bots only " ] pub struct UpdateNewChosenInlineResult { # [ doc = "Identifier of the user who sent the query " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub sender_user_id : i32 , # [ doc = "User location, provided by the client; may be null " ] pub user_location : Option<Location> , # [ doc = "Text of the query " ] pub query : String , # [ doc = "Identifier of the chosen result " ] pub result_id : String , # [ doc = "Identifier of the sent inline message, if known" ] pub inline_message_id : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A new incoming callback query; for bots only " ] pub struct UpdateNewCallbackQuery { # [ doc = "Unique query identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i64 , # [ doc = "Identifier of the user who sent the query " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub sender_user_id : i32 , # [ doc = "Identifier of the chat, in which the query was sent" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_id : i64 , # [ doc = "Identifier of the message, from which the query originated " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub message_id : i64 , # [ doc = "Identifier that uniquely corresponds to the chat to which the message was sent " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_instance : i64 , # [ doc = "Query payload" ] pub payload : CallbackQueryPayload } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A new incoming callback query from a message sent via a bot; for bots only " ] pub struct UpdateNewInlineCallbackQuery { # [ doc = "Unique query identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i64 , # [ doc = "Identifier of the user who sent the query " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub sender_user_id : i32 , # [ doc = "Identifier of the inline message, from which the query originated" ] pub inline_message_id : String , # [ doc = "An identifier uniquely corresponding to the chat a message was sent to " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub chat_instance : i64 , # [ doc = "Query payload" ] pub payload : CallbackQueryPayload } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A new incoming shipping query; for bots only. Only for invoices with flexible price " ] pub struct UpdateNewShippingQuery { # [ doc = "Unique query identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i64 , # [ doc = "Identifier of the user who sent the query " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub sender_user_id : i32 , # [ doc = "Invoice payload " ] pub invoice_payload : String , # [ doc = "User shipping address" ] pub shipping_address : Address } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A new incoming pre-checkout query; for bots only. Contains full information about a checkout " ] pub struct UpdateNewPreCheckoutQuery { # [ doc = "Unique query identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i64 , # [ doc = "Identifier of the user who sent the query " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub sender_user_id : i32 , # [ doc = "Currency for the product price " ] pub currency : String , # [ doc = "Total price for the product, in the minimal quantity of the currency" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub total_amount : i64 , # [ doc = "Invoice payload " ] pub invoice_payload : String , # [ doc = "Identifier of a shipping option chosen by the user; may be empty if not applicable " ] pub shipping_option_id : String , # [ doc = "Information about the order; may be null" ] pub order_info : Option<OrderInfo> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A new incoming event; for bots only " ] pub struct UpdateNewCustomEvent { # [ doc = "A JSON-serialized event" ] pub event : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A new incoming query; for bots only " ] pub struct UpdateNewCustomQuery { # [ doc = "The query identifier " ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub id : i64 , # [ doc = "JSON-serialized query data " ] pub data : String , # [ doc = "Query timeout" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub timeout : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A simple object containing a number; for testing only " ] pub struct TestInt { # [ doc = "Number" ] # [ serde ( deserialize_with = "::serde_aux::field_attributes::deserialize_number_from_string" ) ] pub value : i32 } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A simple object containing a string; for testing only " ] pub struct TestString { # [ doc = "String" ] pub value : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A simple object containing a sequence of bytes; for testing only " ] pub struct TestBytes { # [ doc = "Bytes" ] pub value : String } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A simple object containing a vector of numbers; for testing only " ] pub struct TestVectorInt { # [ doc = "Vector of numbers" ] pub value : Vec<i32> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A simple object containing a vector of objects that hold a number; for testing only " ] pub struct TestVectorIntObject { # [ doc = "Vector of objects" ] pub value : Vec<TestInt> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A simple object containing a vector of strings; for testing only " ] pub struct TestVectorString { # [ doc = "Vector of strings" ] pub value : Vec<String> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ doc = "A simple object containing a vector of objects that hold a string; for testing only " ] pub struct TestVectorStringObject { # [ doc = "Vector of objects" ] pub value : Vec<TestString> } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum AuthorizationState { AuthorizationStateWaitTdlibParameters ( AuthorizationStateWaitTdlibParameters ) , AuthorizationStateWaitEncryptionKey ( AuthorizationStateWaitEncryptionKey ) , AuthorizationStateWaitPhoneNumber ( AuthorizationStateWaitPhoneNumber ) , AuthorizationStateWaitCode ( AuthorizationStateWaitCode ) , AuthorizationStateWaitPassword ( AuthorizationStateWaitPassword ) , AuthorizationStateReady ( AuthorizationStateReady ) , AuthorizationStateLoggingOut ( AuthorizationStateLoggingOut ) , AuthorizationStateClosing ( AuthorizationStateClosing ) , AuthorizationStateClosed ( AuthorizationStateClosed ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum TextEntityType { TextEntityTypeMention ( TextEntityTypeMention ) , TextEntityTypeHashtag ( TextEntityTypeHashtag ) , TextEntityTypeCashtag ( TextEntityTypeCashtag ) , TextEntityTypeBotCommand ( TextEntityTypeBotCommand ) , TextEntityTypeUrl ( TextEntityTypeUrl ) , TextEntityTypeEmailAddress ( TextEntityTypeEmailAddress ) , TextEntityTypeBold ( TextEntityTypeBold ) , TextEntityTypeItalic ( TextEntityTypeItalic ) , TextEntityTypeCode ( TextEntityTypeCode ) , TextEntityTypePre ( TextEntityTypePre ) , TextEntityTypePreCode ( TextEntityTypePreCode ) , TextEntityTypeTextUrl ( TextEntityTypeTextUrl ) , TextEntityTypeMentionName ( TextEntityTypeMentionName ) , TextEntityTypePhoneNumber ( TextEntityTypePhoneNumber ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum OptionValue { OptionValueBoolean ( OptionValueBoolean ) , OptionValueEmpty ( OptionValueEmpty ) , OptionValueInteger ( OptionValueInteger ) , OptionValueString ( OptionValueString ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum TMeUrlType { TMeUrlTypeUser ( TMeUrlTypeUser ) , TMeUrlTypeSupergroup ( TMeUrlTypeSupergroup ) , TMeUrlTypeChatInvite ( TMeUrlTypeChatInvite ) , TMeUrlTypeStickerSet ( TMeUrlTypeStickerSet ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum UserType { UserTypeRegular ( UserTypeRegular ) , UserTypeDeleted ( UserTypeDeleted ) , UserTypeBot ( UserTypeBot ) , UserTypeUnknown ( UserTypeUnknown ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum InputInlineQueryResult { InputInlineQueryResultAnimatedGif ( InputInlineQueryResultAnimatedGif ) , InputInlineQueryResultAnimatedMpeg4 ( InputInlineQueryResultAnimatedMpeg4 ) , InputInlineQueryResultArticle ( InputInlineQueryResultArticle ) , InputInlineQueryResultAudio ( InputInlineQueryResultAudio ) , InputInlineQueryResultContact ( InputInlineQueryResultContact ) , InputInlineQueryResultDocument ( InputInlineQueryResultDocument ) , InputInlineQueryResultGame ( InputInlineQueryResultGame ) , InputInlineQueryResultLocation ( InputInlineQueryResultLocation ) , InputInlineQueryResultPhoto ( InputInlineQueryResultPhoto ) , InputInlineQueryResultSticker ( InputInlineQueryResultSticker ) , InputInlineQueryResultVenue ( InputInlineQueryResultVenue ) , InputInlineQueryResultVideo ( InputInlineQueryResultVideo ) , InputInlineQueryResultVoiceNote ( InputInlineQueryResultVoiceNote ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum InputPassportElementErrorSource { InputPassportElementErrorSourceUnspecified ( InputPassportElementErrorSourceUnspecified ) , InputPassportElementErrorSourceDataField ( InputPassportElementErrorSourceDataField ) , InputPassportElementErrorSourceFrontSide ( InputPassportElementErrorSourceFrontSide ) , InputPassportElementErrorSourceReverseSide ( InputPassportElementErrorSourceReverseSide ) , InputPassportElementErrorSourceSelfie ( InputPassportElementErrorSourceSelfie ) , InputPassportElementErrorSourceTranslationFile ( InputPassportElementErrorSourceTranslationFile ) , InputPassportElementErrorSourceTranslationFiles ( InputPassportElementErrorSourceTranslationFiles ) , InputPassportElementErrorSourceFile ( InputPassportElementErrorSourceFile ) , InputPassportElementErrorSourceFiles ( InputPassportElementErrorSourceFiles ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum MessageSendingState { MessageSendingStatePending ( MessageSendingStatePending ) , MessageSendingStateFailed ( MessageSendingStateFailed ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum UserPrivacySettingRule { UserPrivacySettingRuleAllowAll ( UserPrivacySettingRuleAllowAll ) , UserPrivacySettingRuleAllowContacts ( UserPrivacySettingRuleAllowContacts ) , UserPrivacySettingRuleAllowUsers ( UserPrivacySettingRuleAllowUsers ) , UserPrivacySettingRuleRestrictAll ( UserPrivacySettingRuleRestrictAll ) , UserPrivacySettingRuleRestrictContacts ( UserPrivacySettingRuleRestrictContacts ) , UserPrivacySettingRuleRestrictUsers ( UserPrivacySettingRuleRestrictUsers ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum UserPrivacySetting { UserPrivacySettingShowStatus ( UserPrivacySettingShowStatus ) , UserPrivacySettingAllowChatInvites ( UserPrivacySettingAllowChatInvites ) , UserPrivacySettingAllowCalls ( UserPrivacySettingAllowCalls ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum SecretChatState { SecretChatStatePending ( SecretChatStatePending ) , SecretChatStateReady ( SecretChatStateReady ) , SecretChatStateClosed ( SecretChatStateClosed ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum LanguagePackStringValue { LanguagePackStringValueOrdinary ( LanguagePackStringValueOrdinary ) , LanguagePackStringValuePluralized ( LanguagePackStringValuePluralized ) , LanguagePackStringValueDeleted ( LanguagePackStringValueDeleted ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum InputCredentials { InputCredentialsSaved ( InputCredentialsSaved ) , InputCredentialsNew ( InputCredentialsNew ) , InputCredentialsAndroidPay ( InputCredentialsAndroidPay ) , InputCredentialsApplePay ( InputCredentialsApplePay ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum CheckChatUsernameResult { CheckChatUsernameResultOk ( CheckChatUsernameResultOk ) , CheckChatUsernameResultUsernameInvalid ( CheckChatUsernameResultUsernameInvalid ) , CheckChatUsernameResultUsernameOccupied ( CheckChatUsernameResultUsernameOccupied ) , CheckChatUsernameResultPublicChatsTooMuch ( CheckChatUsernameResultPublicChatsTooMuch ) , CheckChatUsernameResultPublicGroupsUnavailable ( CheckChatUsernameResultPublicGroupsUnavailable ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum InputFile { InputFileId ( InputFileId ) , InputFileRemote ( InputFileRemote ) , InputFileLocal ( InputFileLocal ) , InputFileGenerated ( InputFileGenerated ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum SupergroupMembersFilter { SupergroupMembersFilterRecent ( SupergroupMembersFilterRecent ) , SupergroupMembersFilterAdministrators ( SupergroupMembersFilterAdministrators ) , SupergroupMembersFilterSearch ( SupergroupMembersFilterSearch ) , SupergroupMembersFilterRestricted ( SupergroupMembersFilterRestricted ) , SupergroupMembersFilterBanned ( SupergroupMembersFilterBanned ) , SupergroupMembersFilterBots ( SupergroupMembersFilterBots ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum CallDiscardReason { CallDiscardReasonEmpty ( CallDiscardReasonEmpty ) , CallDiscardReasonMissed ( CallDiscardReasonMissed ) , CallDiscardReasonDeclined ( CallDiscardReasonDeclined ) , CallDiscardReasonDisconnected ( CallDiscardReasonDisconnected ) , CallDiscardReasonHungUp ( CallDiscardReasonHungUp ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum ChatEventAction { ChatEventMessageEdited ( ChatEventMessageEdited ) , ChatEventMessageDeleted ( ChatEventMessageDeleted ) , ChatEventMessagePinned ( ChatEventMessagePinned ) , ChatEventMessageUnpinned ( ChatEventMessageUnpinned ) , ChatEventMemberJoined ( ChatEventMemberJoined ) , ChatEventMemberLeft ( ChatEventMemberLeft ) , ChatEventMemberInvited ( ChatEventMemberInvited ) , ChatEventMemberPromoted ( ChatEventMemberPromoted ) , ChatEventMemberRestricted ( ChatEventMemberRestricted ) , ChatEventTitleChanged ( ChatEventTitleChanged ) , ChatEventDescriptionChanged ( ChatEventDescriptionChanged ) , ChatEventUsernameChanged ( ChatEventUsernameChanged ) , ChatEventPhotoChanged ( ChatEventPhotoChanged ) , ChatEventInvitesToggled ( ChatEventInvitesToggled ) , ChatEventSignMessagesToggled ( ChatEventSignMessagesToggled ) , ChatEventStickerSetChanged ( ChatEventStickerSetChanged ) , ChatEventIsAllHistoryAvailableToggled ( ChatEventIsAllHistoryAvailableToggled ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum Update { UpdateAuthorizationState ( UpdateAuthorizationState ) , UpdateNewMessage ( UpdateNewMessage ) , UpdateMessageSendAcknowledged ( UpdateMessageSendAcknowledged ) , UpdateMessageSendSucceeded ( UpdateMessageSendSucceeded ) , UpdateMessageSendFailed ( UpdateMessageSendFailed ) , UpdateMessageContent ( UpdateMessageContent ) , UpdateMessageEdited ( UpdateMessageEdited ) , UpdateMessageViews ( UpdateMessageViews ) , UpdateMessageContentOpened ( UpdateMessageContentOpened ) , UpdateMessageMentionRead ( UpdateMessageMentionRead ) , UpdateNewChat ( UpdateNewChat ) , UpdateChatTitle ( UpdateChatTitle ) , UpdateChatPhoto ( UpdateChatPhoto ) , UpdateChatLastMessage ( UpdateChatLastMessage ) , UpdateChatOrder ( UpdateChatOrder ) , UpdateChatIsPinned ( UpdateChatIsPinned ) , UpdateChatIsMarkedAsUnread ( UpdateChatIsMarkedAsUnread ) , UpdateChatIsSponsored ( UpdateChatIsSponsored ) , UpdateChatDefaultDisableNotification ( UpdateChatDefaultDisableNotification ) , UpdateChatReadInbox ( UpdateChatReadInbox ) , UpdateChatReadOutbox ( UpdateChatReadOutbox ) , UpdateChatUnreadMentionCount ( UpdateChatUnreadMentionCount ) , UpdateChatNotificationSettings ( UpdateChatNotificationSettings ) , UpdateScopeNotificationSettings ( UpdateScopeNotificationSettings ) , UpdateChatReplyMarkup ( UpdateChatReplyMarkup ) , UpdateChatDraftMessage ( UpdateChatDraftMessage ) , UpdateDeleteMessages ( UpdateDeleteMessages ) , UpdateUserChatAction ( UpdateUserChatAction ) , UpdateUserStatus ( UpdateUserStatus ) , UpdateUser ( UpdateUser ) , UpdateBasicGroup ( UpdateBasicGroup ) , UpdateSupergroup ( UpdateSupergroup ) , UpdateSecretChat ( UpdateSecretChat ) , UpdateUserFullInfo ( UpdateUserFullInfo ) , UpdateBasicGroupFullInfo ( UpdateBasicGroupFullInfo ) , UpdateSupergroupFullInfo ( UpdateSupergroupFullInfo ) , UpdateServiceNotification ( UpdateServiceNotification ) , UpdateFile ( UpdateFile ) , UpdateFileGenerationStart ( UpdateFileGenerationStart ) , UpdateFileGenerationStop ( UpdateFileGenerationStop ) , UpdateCall ( UpdateCall ) , UpdateUserPrivacySettingRules ( UpdateUserPrivacySettingRules ) , UpdateUnreadMessageCount ( UpdateUnreadMessageCount ) , UpdateUnreadChatCount ( UpdateUnreadChatCount ) , UpdateOption ( UpdateOption ) , UpdateInstalledStickerSets ( UpdateInstalledStickerSets ) , UpdateTrendingStickerSets ( UpdateTrendingStickerSets ) , UpdateRecentStickers ( UpdateRecentStickers ) , UpdateFavoriteStickers ( UpdateFavoriteStickers ) , UpdateSavedAnimations ( UpdateSavedAnimations ) , UpdateLanguagePackStrings ( UpdateLanguagePackStrings ) , UpdateConnectionState ( UpdateConnectionState ) , UpdateTermsOfService ( UpdateTermsOfService ) , UpdateNewInlineQuery ( UpdateNewInlineQuery ) , UpdateNewChosenInlineResult ( UpdateNewChosenInlineResult ) , UpdateNewCallbackQuery ( UpdateNewCallbackQuery ) , UpdateNewInlineCallbackQuery ( UpdateNewInlineCallbackQuery ) , UpdateNewShippingQuery ( UpdateNewShippingQuery ) , UpdateNewPreCheckoutQuery ( UpdateNewPreCheckoutQuery ) , UpdateNewCustomEvent ( UpdateNewCustomEvent ) , UpdateNewCustomQuery ( UpdateNewCustomQuery ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum InputMessageContent { InputMessageText ( InputMessageText ) , InputMessageAnimation ( InputMessageAnimation ) , InputMessageAudio ( InputMessageAudio ) , InputMessageDocument ( InputMessageDocument ) , InputMessagePhoto ( InputMessagePhoto ) , InputMessageSticker ( InputMessageSticker ) , InputMessageVideo ( InputMessageVideo ) , InputMessageVideoNote ( InputMessageVideoNote ) , InputMessageVoiceNote ( InputMessageVoiceNote ) , InputMessageLocation ( InputMessageLocation ) , InputMessageVenue ( InputMessageVenue ) , InputMessageContact ( InputMessageContact ) , InputMessageGame ( InputMessageGame ) , InputMessageInvoice ( InputMessageInvoice ) , InputMessageForwarded ( InputMessageForwarded ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum UserStatus { UserStatusEmpty ( UserStatusEmpty ) , UserStatusOnline ( UserStatusOnline ) , UserStatusOffline ( UserStatusOffline ) , UserStatusRecently ( UserStatusRecently ) , UserStatusLastWeek ( UserStatusLastWeek ) , UserStatusLastMonth ( UserStatusLastMonth ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum PassportElementType { PassportElementTypePersonalDetails ( PassportElementTypePersonalDetails ) , PassportElementTypePassport ( PassportElementTypePassport ) , PassportElementTypeDriverLicense ( PassportElementTypeDriverLicense ) , PassportElementTypeIdentityCard ( PassportElementTypeIdentityCard ) , PassportElementTypeInternalPassport ( PassportElementTypeInternalPassport ) , PassportElementTypeAddress ( PassportElementTypeAddress ) , PassportElementTypeUtilityBill ( PassportElementTypeUtilityBill ) , PassportElementTypeBankStatement ( PassportElementTypeBankStatement ) , PassportElementTypeRentalAgreement ( PassportElementTypeRentalAgreement ) , PassportElementTypePassportRegistration ( PassportElementTypePassportRegistration ) , PassportElementTypeTemporaryRegistration ( PassportElementTypeTemporaryRegistration ) , PassportElementTypePhoneNumber ( PassportElementTypePhoneNumber ) , PassportElementTypeEmailAddress ( PassportElementTypeEmailAddress ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum ChatType { ChatTypePrivate ( ChatTypePrivate ) , ChatTypeBasicGroup ( ChatTypeBasicGroup ) , ChatTypeSupergroup ( ChatTypeSupergroup ) , ChatTypeSecret ( ChatTypeSecret ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum NetworkStatisticsEntry { NetworkStatisticsEntryFile ( NetworkStatisticsEntryFile ) , NetworkStatisticsEntryCall ( NetworkStatisticsEntryCall ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum PassportElement { PassportElementPersonalDetails ( PassportElementPersonalDetails ) , PassportElementPassport ( PassportElementPassport ) , PassportElementDriverLicense ( PassportElementDriverLicense ) , PassportElementIdentityCard ( PassportElementIdentityCard ) , PassportElementInternalPassport ( PassportElementInternalPassport ) , PassportElementAddress ( PassportElementAddress ) , PassportElementUtilityBill ( PassportElementUtilityBill ) , PassportElementBankStatement ( PassportElementBankStatement ) , PassportElementRentalAgreement ( PassportElementRentalAgreement ) , PassportElementPassportRegistration ( PassportElementPassportRegistration ) , PassportElementTemporaryRegistration ( PassportElementTemporaryRegistration ) , PassportElementPhoneNumber ( PassportElementPhoneNumber ) , PassportElementEmailAddress ( PassportElementEmailAddress ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum ChatAction { ChatActionTyping ( ChatActionTyping ) , ChatActionRecordingVideo ( ChatActionRecordingVideo ) , ChatActionUploadingVideo ( ChatActionUploadingVideo ) , ChatActionRecordingVoiceNote ( ChatActionRecordingVoiceNote ) , ChatActionUploadingVoiceNote ( ChatActionUploadingVoiceNote ) , ChatActionUploadingPhoto ( ChatActionUploadingPhoto ) , ChatActionUploadingDocument ( ChatActionUploadingDocument ) , ChatActionChoosingLocation ( ChatActionChoosingLocation ) , ChatActionChoosingContact ( ChatActionChoosingContact ) , ChatActionStartPlayingGame ( ChatActionStartPlayingGame ) , ChatActionRecordingVideoNote ( ChatActionRecordingVideoNote ) , ChatActionUploadingVideoNote ( ChatActionUploadingVideoNote ) , ChatActionCancel ( ChatActionCancel ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum InputPassportElement { InputPassportElementPersonalDetails ( InputPassportElementPersonalDetails ) , InputPassportElementPassport ( InputPassportElementPassport ) , InputPassportElementDriverLicense ( InputPassportElementDriverLicense ) , InputPassportElementIdentityCard ( InputPassportElementIdentityCard ) , InputPassportElementInternalPassport ( InputPassportElementInternalPassport ) , InputPassportElementAddress ( InputPassportElementAddress ) , InputPassportElementUtilityBill ( InputPassportElementUtilityBill ) , InputPassportElementBankStatement ( InputPassportElementBankStatement ) , InputPassportElementRentalAgreement ( InputPassportElementRentalAgreement ) , InputPassportElementPassportRegistration ( InputPassportElementPassportRegistration ) , InputPassportElementTemporaryRegistration ( InputPassportElementTemporaryRegistration ) , InputPassportElementPhoneNumber ( InputPassportElementPhoneNumber ) , InputPassportElementEmailAddress ( InputPassportElementEmailAddress ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum SearchMessagesFilter { SearchMessagesFilterEmpty ( SearchMessagesFilterEmpty ) , SearchMessagesFilterAnimation ( SearchMessagesFilterAnimation ) , SearchMessagesFilterAudio ( SearchMessagesFilterAudio ) , SearchMessagesFilterDocument ( SearchMessagesFilterDocument ) , SearchMessagesFilterPhoto ( SearchMessagesFilterPhoto ) , SearchMessagesFilterVideo ( SearchMessagesFilterVideo ) , SearchMessagesFilterVoiceNote ( SearchMessagesFilterVoiceNote ) , SearchMessagesFilterPhotoAndVideo ( SearchMessagesFilterPhotoAndVideo ) , SearchMessagesFilterUrl ( SearchMessagesFilterUrl ) , SearchMessagesFilterChatPhoto ( SearchMessagesFilterChatPhoto ) , SearchMessagesFilterCall ( SearchMessagesFilterCall ) , SearchMessagesFilterMissedCall ( SearchMessagesFilterMissedCall ) , SearchMessagesFilterVideoNote ( SearchMessagesFilterVideoNote ) , SearchMessagesFilterVoiceAndVideoNote ( SearchMessagesFilterVoiceAndVideoNote ) , SearchMessagesFilterMention ( SearchMessagesFilterMention ) , SearchMessagesFilterUnreadMention ( SearchMessagesFilterUnreadMention ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum TopChatCategory { TopChatCategoryUsers ( TopChatCategoryUsers ) , TopChatCategoryBots ( TopChatCategoryBots ) , TopChatCategoryGroups ( TopChatCategoryGroups ) , TopChatCategoryChannels ( TopChatCategoryChannels ) , TopChatCategoryInlineBots ( TopChatCategoryInlineBots ) , TopChatCategoryCalls ( TopChatCategoryCalls ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum LinkState { LinkStateNone ( LinkStateNone ) , LinkStateKnowsPhoneNumber ( LinkStateKnowsPhoneNumber ) , LinkStateIsContact ( LinkStateIsContact ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum PassportElementErrorSource { PassportElementErrorSourceUnspecified ( PassportElementErrorSourceUnspecified ) , PassportElementErrorSourceDataField ( PassportElementErrorSourceDataField ) , PassportElementErrorSourceFrontSide ( PassportElementErrorSourceFrontSide ) , PassportElementErrorSourceReverseSide ( PassportElementErrorSourceReverseSide ) , PassportElementErrorSourceSelfie ( PassportElementErrorSourceSelfie ) , PassportElementErrorSourceTranslationFile ( PassportElementErrorSourceTranslationFile ) , PassportElementErrorSourceTranslationFiles ( PassportElementErrorSourceTranslationFiles ) , PassportElementErrorSourceFile ( PassportElementErrorSourceFile ) , PassportElementErrorSourceFiles ( PassportElementErrorSourceFiles ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum TextParseMode { TextParseModeMarkdown ( TextParseModeMarkdown ) , TextParseModeHTML ( TextParseModeHTML ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum ProxyType { ProxyTypeSocks5 ( ProxyTypeSocks5 ) , ProxyTypeHttp ( ProxyTypeHttp ) , ProxyTypeMtproto ( ProxyTypeMtproto ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum RichText { RichTextPlain ( RichTextPlain ) , RichTextBold ( RichTextBold ) , RichTextItalic ( RichTextItalic ) , RichTextUnderline ( RichTextUnderline ) , RichTextStrikethrough ( RichTextStrikethrough ) , RichTextFixed ( RichTextFixed ) , RichTextUrl ( RichTextUrl ) , RichTextEmailAddress ( RichTextEmailAddress ) , RichTexts ( RichTexts ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum MessageContent { MessageText ( MessageText ) , MessageAnimation ( MessageAnimation ) , MessageAudio ( MessageAudio ) , MessageDocument ( MessageDocument ) , MessagePhoto ( MessagePhoto ) , MessageExpiredPhoto ( MessageExpiredPhoto ) , MessageSticker ( MessageSticker ) , MessageVideo ( MessageVideo ) , MessageExpiredVideo ( MessageExpiredVideo ) , MessageVideoNote ( MessageVideoNote ) , MessageVoiceNote ( MessageVoiceNote ) , MessageLocation ( MessageLocation ) , MessageVenue ( MessageVenue ) , MessageContact ( MessageContact ) , MessageGame ( MessageGame ) , MessageInvoice ( MessageInvoice ) , MessageCall ( MessageCall ) , MessageBasicGroupChatCreate ( MessageBasicGroupChatCreate ) , MessageSupergroupChatCreate ( MessageSupergroupChatCreate ) , MessageChatChangeTitle ( MessageChatChangeTitle ) , MessageChatChangePhoto ( MessageChatChangePhoto ) , MessageChatDeletePhoto ( MessageChatDeletePhoto ) , MessageChatAddMembers ( MessageChatAddMembers ) , MessageChatJoinByLink ( MessageChatJoinByLink ) , MessageChatDeleteMember ( MessageChatDeleteMember ) , MessageChatUpgradeTo ( MessageChatUpgradeTo ) , MessageChatUpgradeFrom ( MessageChatUpgradeFrom ) , MessagePinMessage ( MessagePinMessage ) , MessageScreenshotTaken ( MessageScreenshotTaken ) , MessageChatSetTtl ( MessageChatSetTtl ) , MessageCustomServiceAction ( MessageCustomServiceAction ) , MessageGameScore ( MessageGameScore ) , MessagePaymentSuccessful ( MessagePaymentSuccessful ) , MessagePaymentSuccessfulBot ( MessagePaymentSuccessfulBot ) , MessageContactRegistered ( MessageContactRegistered ) , MessageWebsiteConnected ( MessageWebsiteConnected ) , MessagePassportDataSent ( MessagePassportDataSent ) , MessagePassportDataReceived ( MessagePassportDataReceived ) , MessageUnsupported ( MessageUnsupported ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum MaskPoint { MaskPointForehead ( MaskPointForehead ) , MaskPointEyes ( MaskPointEyes ) , MaskPointMouth ( MaskPointMouth ) , MaskPointChin ( MaskPointChin ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum ReplyMarkup { ReplyMarkupRemoveKeyboard ( ReplyMarkupRemoveKeyboard ) , ReplyMarkupForceReply ( ReplyMarkupForceReply ) , ReplyMarkupShowKeyboard ( ReplyMarkupShowKeyboard ) , ReplyMarkupInlineKeyboard ( ReplyMarkupInlineKeyboard ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum InlineQueryResult { InlineQueryResultArticle ( InlineQueryResultArticle ) , InlineQueryResultContact ( InlineQueryResultContact ) , InlineQueryResultLocation ( InlineQueryResultLocation ) , InlineQueryResultVenue ( InlineQueryResultVenue ) , InlineQueryResultGame ( InlineQueryResultGame ) , InlineQueryResultAnimation ( InlineQueryResultAnimation ) , InlineQueryResultAudio ( InlineQueryResultAudio ) , InlineQueryResultDocument ( InlineQueryResultDocument ) , InlineQueryResultPhoto ( InlineQueryResultPhoto ) , InlineQueryResultSticker ( InlineQueryResultSticker ) , InlineQueryResultVideo ( InlineQueryResultVideo ) , InlineQueryResultVoiceNote ( InlineQueryResultVoiceNote ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum CallbackQueryPayload { CallbackQueryPayloadData ( CallbackQueryPayloadData ) , CallbackQueryPayloadGame ( CallbackQueryPayloadGame ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum FileType { FileTypeNone ( FileTypeNone ) , FileTypeAnimation ( FileTypeAnimation ) , FileTypeAudio ( FileTypeAudio ) , FileTypeDocument ( FileTypeDocument ) , FileTypePhoto ( FileTypePhoto ) , FileTypeProfilePhoto ( FileTypeProfilePhoto ) , FileTypeSecret ( FileTypeSecret ) , FileTypeSecretThumbnail ( FileTypeSecretThumbnail ) , FileTypeSecure ( FileTypeSecure ) , FileTypeSticker ( FileTypeSticker ) , FileTypeThumbnail ( FileTypeThumbnail ) , FileTypeUnknown ( FileTypeUnknown ) , FileTypeVideo ( FileTypeVideo ) , FileTypeVideoNote ( FileTypeVideoNote ) , FileTypeVoiceNote ( FileTypeVoiceNote ) , FileTypeWallpaper ( FileTypeWallpaper ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum ConnectionState { ConnectionStateWaitingForNetwork ( ConnectionStateWaitingForNetwork ) , ConnectionStateConnectingToProxy ( ConnectionStateConnectingToProxy ) , ConnectionStateConnecting ( ConnectionStateConnecting ) , ConnectionStateUpdating ( ConnectionStateUpdating ) , ConnectionStateReady ( ConnectionStateReady ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum ChatMembersFilter { ChatMembersFilterAdministrators ( ChatMembersFilterAdministrators ) , ChatMembersFilterMembers ( ChatMembersFilterMembers ) , ChatMembersFilterRestricted ( ChatMembersFilterRestricted ) , ChatMembersFilterBanned ( ChatMembersFilterBanned ) , ChatMembersFilterBots ( ChatMembersFilterBots ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum ChatMemberStatus { ChatMemberStatusCreator ( ChatMemberStatusCreator ) , ChatMemberStatusAdministrator ( ChatMemberStatusAdministrator ) , ChatMemberStatusMember ( ChatMemberStatusMember ) , ChatMemberStatusRestricted ( ChatMemberStatusRestricted ) , ChatMemberStatusLeft ( ChatMemberStatusLeft ) , ChatMemberStatusBanned ( ChatMemberStatusBanned ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum MessageForwardInfo { MessageForwardedFromUser ( MessageForwardedFromUser ) , MessageForwardedPost ( MessageForwardedPost ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum KeyboardButtonType { KeyboardButtonTypeText ( KeyboardButtonTypeText ) , KeyboardButtonTypeRequestPhoneNumber ( KeyboardButtonTypeRequestPhoneNumber ) , KeyboardButtonTypeRequestLocation ( KeyboardButtonTypeRequestLocation ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum PageBlock { PageBlockTitle ( PageBlockTitle ) , PageBlockSubtitle ( PageBlockSubtitle ) , PageBlockAuthorDate ( PageBlockAuthorDate ) , PageBlockHeader ( PageBlockHeader ) , PageBlockSubheader ( PageBlockSubheader ) , PageBlockParagraph ( PageBlockParagraph ) , PageBlockPreformatted ( PageBlockPreformatted ) , PageBlockFooter ( PageBlockFooter ) , PageBlockDivider ( PageBlockDivider ) , PageBlockAnchor ( PageBlockAnchor ) , PageBlockList ( PageBlockList ) , PageBlockBlockQuote ( PageBlockBlockQuote ) , PageBlockPullQuote ( PageBlockPullQuote ) , PageBlockAnimation ( PageBlockAnimation ) , PageBlockAudio ( PageBlockAudio ) , PageBlockPhoto ( PageBlockPhoto ) , PageBlockVideo ( PageBlockVideo ) , PageBlockCover ( PageBlockCover ) , PageBlockEmbedded ( PageBlockEmbedded ) , PageBlockEmbeddedPost ( PageBlockEmbeddedPost ) , PageBlockCollage ( PageBlockCollage ) , PageBlockSlideshow ( PageBlockSlideshow ) , PageBlockChatLink ( PageBlockChatLink ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum AuthenticationCodeType { AuthenticationCodeTypeTelegramMessage ( AuthenticationCodeTypeTelegramMessage ) , AuthenticationCodeTypeSms ( AuthenticationCodeTypeSms ) , AuthenticationCodeTypeCall ( AuthenticationCodeTypeCall ) , AuthenticationCodeTypeFlashCall ( AuthenticationCodeTypeFlashCall ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum DeviceToken { DeviceTokenGoogleCloudMessaging ( DeviceTokenGoogleCloudMessaging ) , DeviceTokenApplePush ( DeviceTokenApplePush ) , DeviceTokenApplePushVoIP ( DeviceTokenApplePushVoIP ) , DeviceTokenWindowsPush ( DeviceTokenWindowsPush ) , DeviceTokenMicrosoftPush ( DeviceTokenMicrosoftPush ) , DeviceTokenMicrosoftPushVoIP ( DeviceTokenMicrosoftPushVoIP ) , DeviceTokenWebPush ( DeviceTokenWebPush ) , DeviceTokenSimplePush ( DeviceTokenSimplePush ) , DeviceTokenUbuntuPush ( DeviceTokenUbuntuPush ) , DeviceTokenBlackBerryPush ( DeviceTokenBlackBerryPush ) , DeviceTokenTizenPush ( DeviceTokenTizenPush ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum InlineKeyboardButtonType { InlineKeyboardButtonTypeUrl ( InlineKeyboardButtonTypeUrl ) , InlineKeyboardButtonTypeCallback ( InlineKeyboardButtonTypeCallback ) , InlineKeyboardButtonTypeCallbackGame ( InlineKeyboardButtonTypeCallbackGame ) , InlineKeyboardButtonTypeSwitchInline ( InlineKeyboardButtonTypeSwitchInline ) , InlineKeyboardButtonTypeBuy ( InlineKeyboardButtonTypeBuy ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum NotificationSettingsScope { NotificationSettingsScopePrivateChats ( NotificationSettingsScopePrivateChats ) , NotificationSettingsScopeGroupChats ( NotificationSettingsScopeGroupChats ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum ChatReportReason { ChatReportReasonSpam ( ChatReportReasonSpam ) , ChatReportReasonViolence ( ChatReportReasonViolence ) , ChatReportReasonPornography ( ChatReportReasonPornography ) , ChatReportReasonCopyright ( ChatReportReasonCopyright ) , ChatReportReasonCustom ( ChatReportReasonCustom ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum CallState { CallStatePending ( CallStatePending ) , CallStateExchangingKeys ( CallStateExchangingKeys ) , CallStateReady ( CallStateReady ) , CallStateHangingUp ( CallStateHangingUp ) , CallStateDiscarded ( CallStateDiscarded ) , CallStateError ( CallStateError ) } # [ derive ( Serialize , Deserialize , Debug , Clone ) ] # [ serde ( rename_all = "camelCase" ) ] # [ serde ( tag = "@type" ) ] # [ doc = "" ] pub enum NetworkType { NetworkTypeNone ( NetworkTypeNone ) , NetworkTypeMobile ( NetworkTypeMobile ) , NetworkTypeMobileRoaming ( NetworkTypeMobileRoaming ) , NetworkTypeWiFi ( NetworkTypeWiFi ) , NetworkTypeOther ( NetworkTypeOther ) }