-
-
Save watzon/104098ec265463123d935aa6bd2ddbe3 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2021 - Chris Watson and contributors. | |
# | |
# Licensed under the MIT License. You should have received a copy of the license | |
# with this project. By using this project you agree to abide by all terms | |
# contained therein. | |
# This module contains generated, raw MTProto types for Telegram's user API. | |
# It is not advised to modify this code directly, other than to test | |
# changes. All changes should be made in the code generator. | |
module Proton::TL | |
# The schema layer from which the definitions were generated. | |
LAYER = 123 | |
module Root | |
abstract class IAccessPointRule < TLObject; end | |
abstract class IAccountDaysTtl < TLObject; end | |
abstract class IAuthorization < TLObject; end | |
abstract class IAutoDownloadSettings < TLObject; end | |
abstract class IBadMsgNotification < TLObject; end | |
abstract class IBadServerSalt < TLObject; end | |
abstract class IBankCardOpenUrl < TLObject; end | |
abstract class IBaseTheme < TLObject; end | |
abstract class IBaseThemeArctic < TLObject; end | |
abstract class IBaseThemeClassic < TLObject; end | |
abstract class IBaseThemeDay < TLObject; end | |
abstract class IBaseThemeNight < TLObject; end | |
abstract class IBaseThemeTinted < TLObject; end | |
abstract class IBindAuthKeyInner < TLObject; end | |
abstract class IBotCommand < TLObject; end | |
abstract class IBotInfo < TLObject; end | |
abstract class IBotInlineMediaResult < TLObject; end | |
abstract class IBotInlineMessage < TLObject; end | |
abstract class IBotInlineMessageMediaAuto < TLObject; end | |
abstract class IBotInlineMessageMediaContact < TLObject; end | |
abstract class IBotInlineMessageMediaGeo < TLObject; end | |
abstract class IBotInlineMessageMediaVenue < TLObject; end | |
abstract class IBotInlineMessageText < TLObject; end | |
abstract class IBotInlineResult < TLObject; end | |
abstract class ICdnConfig < TLObject; end | |
abstract class ICdnPublicKey < TLObject; end | |
abstract class IChannel < TLObject; end | |
abstract class IChannelAdminLogEvent < TLObject; end | |
abstract class IChannelAdminLogEventAction < TLObject; end | |
abstract class IChannelAdminLogEventActionChangeAbout < TLObject; end | |
abstract class IChannelAdminLogEventActionChangeLinkedChat < TLObject; end | |
abstract class IChannelAdminLogEventActionChangeLocation < TLObject; end | |
abstract class IChannelAdminLogEventActionChangePhoto < TLObject; end | |
abstract class IChannelAdminLogEventActionChangeStickerSet < TLObject; end | |
abstract class IChannelAdminLogEventActionChangeTitle < TLObject; end | |
abstract class IChannelAdminLogEventActionChangeUsername < TLObject; end | |
abstract class IChannelAdminLogEventActionDefaultBannedRights < TLObject; end | |
abstract class IChannelAdminLogEventActionDeleteMessage < TLObject; end | |
abstract class IChannelAdminLogEventActionDiscardGroupCall < TLObject; end | |
abstract class IChannelAdminLogEventActionEditMessage < TLObject; end | |
abstract class IChannelAdminLogEventActionParticipantInvite < TLObject; end | |
abstract class IChannelAdminLogEventActionParticipantJoin < TLObject; end | |
abstract class IChannelAdminLogEventActionParticipantLeave < TLObject; end | |
abstract class IChannelAdminLogEventActionParticipantMute < TLObject; end | |
abstract class IChannelAdminLogEventActionParticipantToggleAdmin < TLObject; end | |
abstract class IChannelAdminLogEventActionParticipantToggleBan < TLObject; end | |
abstract class IChannelAdminLogEventActionParticipantUnmute < TLObject; end | |
abstract class IChannelAdminLogEventActionStartGroupCall < TLObject; end | |
abstract class IChannelAdminLogEventActionStopPoll < TLObject; end | |
abstract class IChannelAdminLogEventActionToggleGroupCallSetting < TLObject; end | |
abstract class IChannelAdminLogEventActionToggleInvites < TLObject; end | |
abstract class IChannelAdminLogEventActionTogglePreHistoryHidden < TLObject; end | |
abstract class IChannelAdminLogEventActionToggleSignatures < TLObject; end | |
abstract class IChannelAdminLogEventActionToggleSlowMode < TLObject; end | |
abstract class IChannelAdminLogEventActionUpdatePinned < TLObject; end | |
abstract class IChannelAdminLogEventsFilter < TLObject; end | |
abstract class IChannelForbidden < TLObject; end | |
abstract class IChannelFull < TLObject; end | |
abstract class IChannelLocation < TLObject; end | |
abstract class IChannelLocationEmpty < TLObject; end | |
abstract class IChannelMessagesFilter < TLObject; end | |
abstract class IChannelMessagesFilterEmpty < TLObject; end | |
abstract class IChannelParticipant < TLObject; end | |
abstract class IChannelParticipantAdmin < TLObject; end | |
abstract class IChannelParticipantBanned < TLObject; end | |
abstract class IChannelParticipantCreator < TLObject; end | |
abstract class IChannelParticipantLeft < TLObject; end | |
abstract class IChannelParticipantSelf < TLObject; end | |
abstract class IChannelParticipantsAdmins < TLObject; end | |
abstract class IChannelParticipantsBanned < TLObject; end | |
abstract class IChannelParticipantsBots < TLObject; end | |
abstract class IChannelParticipantsContacts < TLObject; end | |
abstract class IChannelParticipantsFilter < TLObject; end | |
abstract class IChannelParticipantsKicked < TLObject; end | |
abstract class IChannelParticipantsMentions < TLObject; end | |
abstract class IChannelParticipantsRecent < TLObject; end | |
abstract class IChannelParticipantsSearch < TLObject; end | |
abstract class IChat < TLObject; end | |
abstract class IChatAdminRights < TLObject; end | |
abstract class IChatBannedRights < TLObject; end | |
abstract class IChatEmpty < TLObject; end | |
abstract class IChatForbidden < TLObject; end | |
abstract class IChatFull < TLObject; end | |
abstract class IChatInvite < TLObject; end | |
abstract class IChatInviteAlready < TLObject; end | |
abstract class IChatInviteEmpty < TLObject; end | |
abstract class IChatInviteExported < TLObject; end | |
abstract class IChatInvitePeek < TLObject; end | |
abstract class IChatOnlines < TLObject; end | |
abstract class IChatParticipant < TLObject; end | |
abstract class IChatParticipantAdmin < TLObject; end | |
abstract class IChatParticipantCreator < TLObject; end | |
abstract class IChatParticipants < TLObject; end | |
abstract class IChatParticipantsForbidden < TLObject; end | |
abstract class IChatPhoto < TLObject; end | |
abstract class IChatPhotoEmpty < TLObject; end | |
abstract class IClientDhInnerData < TLObject; end | |
abstract class ICodeSettings < TLObject; end | |
abstract class IConfig < TLObject; end | |
abstract class IContact < TLObject; end | |
abstract class IContactStatus < TLObject; end | |
abstract class IDataJson < TLObject; end | |
abstract class IDcOption < TLObject; end | |
abstract class IDestroyAuthKeyFail < TLObject; end | |
abstract class IDestroyAuthKeyNone < TLObject; end | |
abstract class IDestroyAuthKeyOk < TLObject; end | |
abstract class IDestroyAuthKeyRes < TLObject; end | |
abstract class IDestroySessionNone < TLObject; end | |
abstract class IDestroySessionOk < TLObject; end | |
abstract class IDestroySessionRes < TLObject; end | |
abstract class IDhGenFail < TLObject; end | |
abstract class IDhGenOk < TLObject; end | |
abstract class IDhGenRetry < TLObject; end | |
abstract class IDialog < TLObject; end | |
abstract class IDialogFilter < TLObject; end | |
abstract class IDialogFilterSuggested < TLObject; end | |
abstract class IDialogFolder < TLObject; end | |
abstract class IDialogPeer < TLObject; end | |
abstract class IDialogPeerFolder < TLObject; end | |
abstract class IDocument < TLObject; end | |
abstract class IDocumentAttribute < TLObject; end | |
abstract class IDocumentAttributeAnimated < TLObject; end | |
abstract class IDocumentAttributeAudio < TLObject; end | |
abstract class IDocumentAttributeFilename < TLObject; end | |
abstract class IDocumentAttributeHasStickers < TLObject; end | |
abstract class IDocumentAttributeImageSize < TLObject; end | |
abstract class IDocumentAttributeSticker < TLObject; end | |
abstract class IDocumentAttributeVideo < TLObject; end | |
abstract class IDocumentEmpty < TLObject; end | |
abstract class IDraftMessage < TLObject; end | |
abstract class IDraftMessageEmpty < TLObject; end | |
abstract class IEmojiKeyword < TLObject; end | |
abstract class IEmojiKeywordDeleted < TLObject; end | |
abstract class IEmojiKeywordsDifference < TLObject; end | |
abstract class IEmojiLanguage < TLObject; end | |
abstract class IEmojiUrl < TLObject; end | |
abstract class IEncryptedChat < TLObject; end | |
abstract class IEncryptedChatDiscarded < TLObject; end | |
abstract class IEncryptedChatEmpty < TLObject; end | |
abstract class IEncryptedChatRequested < TLObject; end | |
abstract class IEncryptedChatWaiting < TLObject; end | |
abstract class IEncryptedFile < TLObject; end | |
abstract class IEncryptedFileEmpty < TLObject; end | |
abstract class IEncryptedMessage < TLObject; end | |
abstract class IEncryptedMessageService < TLObject; end | |
abstract class IExportedChatInvite < TLObject; end | |
abstract class IExportedMessageLink < TLObject; end | |
abstract class IFileHash < TLObject; end | |
abstract class IFileLocation < TLObject; end | |
abstract class IFileLocationToBeDeprecated < TLObject; end | |
abstract class IFolder < TLObject; end | |
abstract class IFolderPeer < TLObject; end | |
abstract class IFutureSalt < TLObject; end | |
abstract class IFutureSalts < TLObject; end | |
abstract class IGame < TLObject; end | |
abstract class IGeoPoint < TLObject; end | |
abstract class IGeoPointEmpty < TLObject; end | |
abstract class IGlobalPrivacySettings < TLObject; end | |
abstract class IGroupCall < TLObject; end | |
abstract class IGroupCallDiscarded < TLObject; end | |
abstract class IGroupCallParticipant < TLObject; end | |
abstract class IHighScore < TLObject; end | |
abstract class IHttpWait < TLObject; end | |
abstract class IImportedContact < TLObject; end | |
abstract class IInlineBotSwitchPm < TLObject; end | |
abstract class IInlineQueryPeerType < TLObject; end | |
abstract class IInlineQueryPeerTypeBroadcast < TLObject; end | |
abstract class IInlineQueryPeerTypeChat < TLObject; end | |
abstract class IInlineQueryPeerTypeMegagroup < TLObject; end | |
abstract class IInlineQueryPeerTypePm < TLObject; end | |
abstract class IInlineQueryPeerTypeSameBotPm < TLObject; end | |
abstract class IInputAppEvent < TLObject; end | |
abstract class IInputBotInlineMessage < TLObject; end | |
abstract class IInputBotInlineMessageGame < TLObject; end | |
abstract class IInputBotInlineMessageId < TLObject; end | |
abstract class IInputBotInlineMessageMediaAuto < TLObject; end | |
abstract class IInputBotInlineMessageMediaContact < TLObject; end | |
abstract class IInputBotInlineMessageMediaGeo < TLObject; end | |
abstract class IInputBotInlineMessageMediaVenue < TLObject; end | |
abstract class IInputBotInlineMessageText < TLObject; end | |
abstract class IInputBotInlineResult < TLObject; end | |
abstract class IInputBotInlineResultDocument < TLObject; end | |
abstract class IInputBotInlineResultGame < TLObject; end | |
abstract class IInputBotInlineResultPhoto < TLObject; end | |
abstract class IInputChannel < TLObject; end | |
abstract class IInputChannelEmpty < TLObject; end | |
abstract class IInputChannelFromMessage < TLObject; end | |
abstract class IInputChatPhoto < TLObject; end | |
abstract class IInputChatPhotoEmpty < TLObject; end | |
abstract class IInputChatUploadedPhoto < TLObject; end | |
abstract class IInputCheckPasswordEmpty < TLObject; end | |
abstract class IInputCheckPasswordSrp < TLObject; end | |
abstract class IInputClientProxy < TLObject; end | |
abstract class IInputContact < TLObject; end | |
abstract class IInputDialogPeer < TLObject; end | |
abstract class IInputDialogPeerFolder < TLObject; end | |
abstract class IInputDocument < TLObject; end | |
abstract class IInputDocumentEmpty < TLObject; end | |
abstract class IInputDocumentFileLocation < TLObject; end | |
abstract class IInputEncryptedChat < TLObject; end | |
abstract class IInputEncryptedFile < TLObject; end | |
abstract class IInputEncryptedFileBigUploaded < TLObject; end | |
abstract class IInputEncryptedFileEmpty < TLObject; end | |
abstract class IInputEncryptedFileLocation < TLObject; end | |
abstract class IInputEncryptedFileUploaded < TLObject; end | |
abstract class IInputFile < TLObject; end | |
abstract class IInputFileBig < TLObject; end | |
abstract class IInputFileLocation < TLObject; end | |
abstract class IInputFolderPeer < TLObject; end | |
abstract class IInputGame < TLObject; end | |
abstract class IInputGameId < TLObject; end | |
abstract class IInputGameShortName < TLObject; end | |
abstract class IInputGeoPoint < TLObject; end | |
abstract class IInputGeoPointEmpty < TLObject; end | |
abstract class IInputGroupCall < TLObject; end | |
abstract class IInputKeyboardButtonUrlAuth < TLObject; end | |
abstract class IInputMedia < TLObject; end | |
abstract class IInputMediaContact < TLObject; end | |
abstract class IInputMediaDice < TLObject; end | |
abstract class IInputMediaDocument < TLObject; end | |
abstract class IInputMediaDocumentExternal < TLObject; end | |
abstract class IInputMediaEmpty < TLObject; end | |
abstract class IInputMediaGame < TLObject; end | |
abstract class IInputMediaGeoLive < TLObject; end | |
abstract class IInputMediaGeoPoint < TLObject; end | |
abstract class IInputMediaInvoice < TLObject; end | |
abstract class IInputMediaPhoto < TLObject; end | |
abstract class IInputMediaPhotoExternal < TLObject; end | |
abstract class IInputMediaPoll < TLObject; end | |
abstract class IInputMediaUploadedDocument < TLObject; end | |
abstract class IInputMediaUploadedPhoto < TLObject; end | |
abstract class IInputMediaVenue < TLObject; end | |
abstract class IInputMessage < TLObject; end | |
abstract class IInputMessageCallbackQuery < TLObject; end | |
abstract class IInputMessageEntityMentionName < TLObject; end | |
abstract class IInputMessageId < TLObject; end | |
abstract class IInputMessagePinned < TLObject; end | |
abstract class IInputMessageReplyTo < TLObject; end | |
abstract class IInputMessagesFilterChatPhotos < TLObject; end | |
abstract class IInputMessagesFilterContacts < TLObject; end | |
abstract class IInputMessagesFilterDocument < TLObject; end | |
abstract class IInputMessagesFilterEmpty < TLObject; end | |
abstract class IInputMessagesFilterGeo < TLObject; end | |
abstract class IInputMessagesFilterGif < TLObject; end | |
abstract class IInputMessagesFilterMusic < TLObject; end | |
abstract class IInputMessagesFilterMyMentions < TLObject; end | |
abstract class IInputMessagesFilterPhoneCalls < TLObject; end | |
abstract class IInputMessagesFilterPhotoVideo < TLObject; end | |
abstract class IInputMessagesFilterPhotos < TLObject; end | |
abstract class IInputMessagesFilterPinned < TLObject; end | |
abstract class IInputMessagesFilterRoundVideo < TLObject; end | |
abstract class IInputMessagesFilterRoundVoice < TLObject; end | |
abstract class IInputMessagesFilterUrl < TLObject; end | |
abstract class IInputMessagesFilterVideo < TLObject; end | |
abstract class IInputMessagesFilterVoice < TLObject; end | |
abstract class IInputNotifyBroadcasts < TLObject; end | |
abstract class IInputNotifyChats < TLObject; end | |
abstract class IInputNotifyPeer < TLObject; end | |
abstract class IInputNotifyUsers < TLObject; end | |
abstract class IInputPaymentCredentials < TLObject; end | |
abstract class IInputPaymentCredentialsAndroidPay < TLObject; end | |
abstract class IInputPaymentCredentialsApplePay < TLObject; end | |
abstract class IInputPaymentCredentialsSaved < TLObject; end | |
abstract class IInputPeer < TLObject; end | |
abstract class IInputPeerChannel < TLObject; end | |
abstract class IInputPeerChannelFromMessage < TLObject; end | |
abstract class IInputPeerChat < TLObject; end | |
abstract class IInputPeerEmpty < TLObject; end | |
abstract class IInputPeerNotifySettings < TLObject; end | |
abstract class IInputPeerPhotoFileLocation < TLObject; end | |
abstract class IInputPeerSelf < TLObject; end | |
abstract class IInputPeerUser < TLObject; end | |
abstract class IInputPeerUserFromMessage < TLObject; end | |
abstract class IInputPhoneCall < TLObject; end | |
abstract class IInputPhoneContact < TLObject; end | |
abstract class IInputPhoto < TLObject; end | |
abstract class IInputPhotoEmpty < TLObject; end | |
abstract class IInputPhotoFileLocation < TLObject; end | |
abstract class IInputPhotoLegacyFileLocation < TLObject; end | |
abstract class IInputPrivacyKey < TLObject; end | |
abstract class IInputPrivacyKeyAddedByPhone < TLObject; end | |
abstract class IInputPrivacyKeyChatInvite < TLObject; end | |
abstract class IInputPrivacyKeyForwards < TLObject; end | |
abstract class IInputPrivacyKeyPhoneCall < TLObject; end | |
abstract class IInputPrivacyKeyPhoneNumber < TLObject; end | |
abstract class IInputPrivacyKeyPhoneP2P < TLObject; end | |
abstract class IInputPrivacyKeyProfilePhoto < TLObject; end | |
abstract class IInputPrivacyKeyStatusTimestamp < TLObject; end | |
abstract class IInputPrivacyRule < TLObject; end | |
abstract class IInputPrivacyValueAllowAll < TLObject; end | |
abstract class IInputPrivacyValueAllowChatParticipants < TLObject; end | |
abstract class IInputPrivacyValueAllowContacts < TLObject; end | |
abstract class IInputPrivacyValueAllowUsers < TLObject; end | |
abstract class IInputPrivacyValueDisallowAll < TLObject; end | |
abstract class IInputPrivacyValueDisallowChatParticipants < TLObject; end | |
abstract class IInputPrivacyValueDisallowContacts < TLObject; end | |
abstract class IInputPrivacyValueDisallowUsers < TLObject; end | |
abstract class IInputReportReasonChildAbuse < TLObject; end | |
abstract class IInputReportReasonCopyright < TLObject; end | |
abstract class IInputReportReasonGeoIrrelevant < TLObject; end | |
abstract class IInputReportReasonOther < TLObject; end | |
abstract class IInputReportReasonPornography < TLObject; end | |
abstract class IInputReportReasonSpam < TLObject; end | |
abstract class IInputReportReasonViolence < TLObject; end | |
abstract class IInputSecureFile < TLObject; end | |
abstract class IInputSecureFileLocation < TLObject; end | |
abstract class IInputSecureFileUploaded < TLObject; end | |
abstract class IInputSecureValue < TLObject; end | |
abstract class IInputSingleMedia < TLObject; end | |
abstract class IInputStickerSet < TLObject; end | |
abstract class IInputStickerSetAnimatedEmoji < TLObject; end | |
abstract class IInputStickerSetDice < TLObject; end | |
abstract class IInputStickerSetEmpty < TLObject; end | |
abstract class IInputStickerSetId < TLObject; end | |
abstract class IInputStickerSetItem < TLObject; end | |
abstract class IInputStickerSetShortName < TLObject; end | |
abstract class IInputStickerSetThumb < TLObject; end | |
abstract class IInputStickeredMedia < TLObject; end | |
abstract class IInputStickeredMediaDocument < TLObject; end | |
abstract class IInputStickeredMediaPhoto < TLObject; end | |
abstract class IInputTakeoutFileLocation < TLObject; end | |
abstract class IInputTheme < TLObject; end | |
abstract class IInputThemeSettings < TLObject; end | |
abstract class IInputThemeSlug < TLObject; end | |
abstract class IInputUser < TLObject; end | |
abstract class IInputUserEmpty < TLObject; end | |
abstract class IInputUserFromMessage < TLObject; end | |
abstract class IInputUserSelf < TLObject; end | |
abstract class IInputWallPaper < TLObject; end | |
abstract class IInputWallPaperNoFile < TLObject; end | |
abstract class IInputWallPaperSlug < TLObject; end | |
abstract class IInputWebDocument < TLObject; end | |
abstract class IInputWebFileGeoPointLocation < TLObject; end | |
abstract class IInputWebFileLocation < TLObject; end | |
abstract class IInvoice < TLObject; end | |
abstract class IIpPort < TLObject; end | |
abstract class IIpPortSecret < TLObject; end | |
abstract class IJsonArray < TLObject; end | |
abstract class IJsonBool < TLObject; end | |
abstract class IJsonNull < TLObject; end | |
abstract class IJsonNumber < TLObject; end | |
abstract class IJsonObject < TLObject; end | |
abstract class IJsonObjectValue < TLObject; end | |
abstract class IJsonString < TLObject; end | |
abstract class IJsonValue < TLObject; end | |
abstract class IKeyboardButton < TLObject; end | |
abstract class IKeyboardButtonBuy < TLObject; end | |
abstract class IKeyboardButtonCallback < TLObject; end | |
abstract class IKeyboardButtonGame < TLObject; end | |
abstract class IKeyboardButtonRequestGeoLocation < TLObject; end | |
abstract class IKeyboardButtonRequestPhone < TLObject; end | |
abstract class IKeyboardButtonRequestPoll < TLObject; end | |
abstract class IKeyboardButtonRow < TLObject; end | |
abstract class IKeyboardButtonSwitchInline < TLObject; end | |
abstract class IKeyboardButtonUrl < TLObject; end | |
abstract class IKeyboardButtonUrlAuth < TLObject; end | |
abstract class ILabeledPrice < TLObject; end | |
abstract class ILangPackDifference < TLObject; end | |
abstract class ILangPackLanguage < TLObject; end | |
abstract class ILangPackString < TLObject; end | |
abstract class ILangPackStringDeleted < TLObject; end | |
abstract class ILangPackStringPluralized < TLObject; end | |
abstract class IMaskCoords < TLObject; end | |
abstract class IMessage < TLObject; end | |
abstract class IMessageAction < TLObject; end | |
abstract class IMessageActionBotAllowed < TLObject; end | |
abstract class IMessageActionChannelCreate < TLObject; end | |
abstract class IMessageActionChannelMigrateFrom < TLObject; end | |
abstract class IMessageActionChatAddUser < TLObject; end | |
abstract class IMessageActionChatCreate < TLObject; end | |
abstract class IMessageActionChatDeletePhoto < TLObject; end | |
abstract class IMessageActionChatDeleteUser < TLObject; end | |
abstract class IMessageActionChatEditPhoto < TLObject; end | |
abstract class IMessageActionChatEditTitle < TLObject; end | |
abstract class IMessageActionChatJoinedByLink < TLObject; end | |
abstract class IMessageActionChatMigrateTo < TLObject; end | |
abstract class IMessageActionContactSignUp < TLObject; end | |
abstract class IMessageActionCustomAction < TLObject; end | |
abstract class IMessageActionEmpty < TLObject; end | |
abstract class IMessageActionGameScore < TLObject; end | |
abstract class IMessageActionGeoProximityReached < TLObject; end | |
abstract class IMessageActionGroupCall < TLObject; end | |
abstract class IMessageActionHistoryClear < TLObject; end | |
abstract class IMessageActionInviteToGroupCall < TLObject; end | |
abstract class IMessageActionPaymentSent < TLObject; end | |
abstract class IMessageActionPaymentSentMe < TLObject; end | |
abstract class IMessageActionPhoneCall < TLObject; end | |
abstract class IMessageActionPinMessage < TLObject; end | |
abstract class IMessageActionScreenshotTaken < TLObject; end | |
abstract class IMessageActionSecureValuesSent < TLObject; end | |
abstract class IMessageActionSecureValuesSentMe < TLObject; end | |
abstract class IMessageEmpty < TLObject; end | |
abstract class IMessageEntity < TLObject; end | |
abstract class IMessageEntityBankCard < TLObject; end | |
abstract class IMessageEntityBlockquote < TLObject; end | |
abstract class IMessageEntityBold < TLObject; end | |
abstract class IMessageEntityBotCommand < TLObject; end | |
abstract class IMessageEntityCashtag < TLObject; end | |
abstract class IMessageEntityCode < TLObject; end | |
abstract class IMessageEntityEmail < TLObject; end | |
abstract class IMessageEntityHashtag < TLObject; end | |
abstract class IMessageEntityItalic < TLObject; end | |
abstract class IMessageEntityMention < TLObject; end | |
abstract class IMessageEntityMentionName < TLObject; end | |
abstract class IMessageEntityPhone < TLObject; end | |
abstract class IMessageEntityPre < TLObject; end | |
abstract class IMessageEntityStrike < TLObject; end | |
abstract class IMessageEntityTextUrl < TLObject; end | |
abstract class IMessageEntityUnderline < TLObject; end | |
abstract class IMessageEntityUnknown < TLObject; end | |
abstract class IMessageEntityUrl < TLObject; end | |
abstract class IMessageFwdHeader < TLObject; end | |
abstract class IMessageInteractionCounters < TLObject; end | |
abstract class IMessageMedia < TLObject; end | |
abstract class IMessageMediaContact < TLObject; end | |
abstract class IMessageMediaDice < TLObject; end | |
abstract class IMessageMediaDocument < TLObject; end | |
abstract class IMessageMediaEmpty < TLObject; end | |
abstract class IMessageMediaGame < TLObject; end | |
abstract class IMessageMediaGeo < TLObject; end | |
abstract class IMessageMediaGeoLive < TLObject; end | |
abstract class IMessageMediaInvoice < TLObject; end | |
abstract class IMessageMediaPhoto < TLObject; end | |
abstract class IMessageMediaPoll < TLObject; end | |
abstract class IMessageMediaUnsupported < TLObject; end | |
abstract class IMessageMediaVenue < TLObject; end | |
abstract class IMessageMediaWebPage < TLObject; end | |
abstract class IMessageRange < TLObject; end | |
abstract class IMessageReplies < TLObject; end | |
abstract class IMessageReplyHeader < TLObject; end | |
abstract class IMessageService < TLObject; end | |
abstract class IMessageUserVote < TLObject; end | |
abstract class IMessageUserVoteInputOption < TLObject; end | |
abstract class IMessageUserVoteMultiple < TLObject; end | |
abstract class IMessageViews < TLObject; end | |
abstract class IMessagesFilter < TLObject; end | |
abstract class IMsgDetailedInfo < TLObject; end | |
abstract class IMsgNewDetailedInfo < TLObject; end | |
abstract class IMsgResendAnsReq < TLObject; end | |
abstract class IMsgResendReq < TLObject; end | |
abstract class IMsgsAck < TLObject; end | |
abstract class IMsgsAllInfo < TLObject; end | |
abstract class IMsgsStateInfo < TLObject; end | |
abstract class IMsgsStateReq < TLObject; end | |
abstract class INearestDc < TLObject; end | |
abstract class INewSession < TLObject; end | |
abstract class INewSessionCreated < TLObject; end | |
abstract class INotifyBroadcasts < TLObject; end | |
abstract class INotifyChats < TLObject; end | |
abstract class INotifyPeer < TLObject; end | |
abstract class INotifyUsers < TLObject; end | |
abstract class IPQInnerData < TLObject; end | |
abstract class IPQInnerDataDc < TLObject; end | |
abstract class IPQInnerDataTemp < TLObject; end | |
abstract class IPQInnerDataTempDc < TLObject; end | |
abstract class IPage < TLObject; end | |
abstract class IPageBlock < TLObject; end | |
abstract class IPageBlockAnchor < TLObject; end | |
abstract class IPageBlockAudio < TLObject; end | |
abstract class IPageBlockAuthorDate < TLObject; end | |
abstract class IPageBlockBlockquote < TLObject; end | |
abstract class IPageBlockChannel < TLObject; end | |
abstract class IPageBlockCollage < TLObject; end | |
abstract class IPageBlockCover < TLObject; end | |
abstract class IPageBlockDetails < TLObject; end | |
abstract class IPageBlockDivider < TLObject; end | |
abstract class IPageBlockEmbed < TLObject; end | |
abstract class IPageBlockEmbedPost < TLObject; end | |
abstract class IPageBlockFooter < TLObject; end | |
abstract class IPageBlockHeader < TLObject; end | |
abstract class IPageBlockKicker < TLObject; end | |
abstract class IPageBlockList < TLObject; end | |
abstract class IPageBlockMap < TLObject; end | |
abstract class IPageBlockOrderedList < TLObject; end | |
abstract class IPageBlockParagraph < TLObject; end | |
abstract class IPageBlockPhoto < TLObject; end | |
abstract class IPageBlockPreformatted < TLObject; end | |
abstract class IPageBlockPullquote < TLObject; end | |
abstract class IPageBlockRelatedArticles < TLObject; end | |
abstract class IPageBlockSlideshow < TLObject; end | |
abstract class IPageBlockSubheader < TLObject; end | |
abstract class IPageBlockSubtitle < TLObject; end | |
abstract class IPageBlockTable < TLObject; end | |
abstract class IPageBlockTitle < TLObject; end | |
abstract class IPageBlockUnsupported < TLObject; end | |
abstract class IPageBlockVideo < TLObject; end | |
abstract class IPageCaption < TLObject; end | |
abstract class IPageListItem < TLObject; end | |
abstract class IPageListItemBlocks < TLObject; end | |
abstract class IPageListItemText < TLObject; end | |
abstract class IPageListOrderedItem < TLObject; end | |
abstract class IPageListOrderedItemBlocks < TLObject; end | |
abstract class IPageListOrderedItemText < TLObject; end | |
abstract class IPageRelatedArticle < TLObject; end | |
abstract class IPageTableCell < TLObject; end | |
abstract class IPageTableRow < TLObject; end | |
abstract class IPasswordKdfAlgo < TLObject; end | |
abstract class IPasswordKdfAlgoSha256Sha256Pbkdf2Hmacsha512iter100000Sha256ModPow < TLObject; end | |
abstract class IPasswordKdfAlgoUnknown < TLObject; end | |
abstract class IPaymentCharge < TLObject; end | |
abstract class IPaymentRequestedInfo < TLObject; end | |
abstract class IPaymentSavedCredentials < TLObject; end | |
abstract class IPaymentSavedCredentialsCard < TLObject; end | |
abstract class IPeer < TLObject; end | |
abstract class IPeerBlocked < TLObject; end | |
abstract class IPeerChannel < TLObject; end | |
abstract class IPeerChat < TLObject; end | |
abstract class IPeerLocated < TLObject; end | |
abstract class IPeerNotifySettings < TLObject; end | |
abstract class IPeerSelfLocated < TLObject; end | |
abstract class IPeerSettings < TLObject; end | |
abstract class IPeerUser < TLObject; end | |
abstract class IPhoneCall < TLObject; end | |
abstract class IPhoneCallAccepted < TLObject; end | |
abstract class IPhoneCallDiscardReason < TLObject; end | |
abstract class IPhoneCallDiscardReasonBusy < TLObject; end | |
abstract class IPhoneCallDiscardReasonDisconnect < TLObject; end | |
abstract class IPhoneCallDiscardReasonHangup < TLObject; end | |
abstract class IPhoneCallDiscardReasonMissed < TLObject; end | |
abstract class IPhoneCallDiscarded < TLObject; end | |
abstract class IPhoneCallEmpty < TLObject; end | |
abstract class IPhoneCallProtocol < TLObject; end | |
abstract class IPhoneCallRequested < TLObject; end | |
abstract class IPhoneCallWaiting < TLObject; end | |
abstract class IPhoneConnection < TLObject; end | |
abstract class IPhoneConnectionWebrtc < TLObject; end | |
abstract class IPhoto < TLObject; end | |
abstract class IPhotoCachedSize < TLObject; end | |
abstract class IPhotoEmpty < TLObject; end | |
abstract class IPhotoPathSize < TLObject; end | |
abstract class IPhotoSize < TLObject; end | |
abstract class IPhotoSizeEmpty < TLObject; end | |
abstract class IPhotoSizeProgressive < TLObject; end | |
abstract class IPhotoStrippedSize < TLObject; end | |
abstract class IPoll < TLObject; end | |
abstract class IPollAnswer < TLObject; end | |
abstract class IPollAnswerVoters < TLObject; end | |
abstract class IPollResults < TLObject; end | |
abstract class IPong < TLObject; end | |
abstract class IPopularContact < TLObject; end | |
abstract class IPostAddress < TLObject; end | |
abstract class IPrivacyKey < TLObject; end | |
abstract class IPrivacyKeyAddedByPhone < TLObject; end | |
abstract class IPrivacyKeyChatInvite < TLObject; end | |
abstract class IPrivacyKeyForwards < TLObject; end | |
abstract class IPrivacyKeyPhoneCall < TLObject; end | |
abstract class IPrivacyKeyPhoneNumber < TLObject; end | |
abstract class IPrivacyKeyPhoneP2P < TLObject; end | |
abstract class IPrivacyKeyProfilePhoto < TLObject; end | |
abstract class IPrivacyKeyStatusTimestamp < TLObject; end | |
abstract class IPrivacyRule < TLObject; end | |
abstract class IPrivacyValueAllowAll < TLObject; end | |
abstract class IPrivacyValueAllowChatParticipants < TLObject; end | |
abstract class IPrivacyValueAllowContacts < TLObject; end | |
abstract class IPrivacyValueAllowUsers < TLObject; end | |
abstract class IPrivacyValueDisallowAll < TLObject; end | |
abstract class IPrivacyValueDisallowChatParticipants < TLObject; end | |
abstract class IPrivacyValueDisallowContacts < TLObject; end | |
abstract class IPrivacyValueDisallowUsers < TLObject; end | |
abstract class IReceivedNotifyMessage < TLObject; end | |
abstract class IRecentMeUrl < TLObject; end | |
abstract class IRecentMeUrlChat < TLObject; end | |
abstract class IRecentMeUrlChatInvite < TLObject; end | |
abstract class IRecentMeUrlStickerSet < TLObject; end | |
abstract class IRecentMeUrlUnknown < TLObject; end | |
abstract class IRecentMeUrlUser < TLObject; end | |
abstract class IReplyInlineMarkup < TLObject; end | |
abstract class IReplyKeyboardForceReply < TLObject; end | |
abstract class IReplyKeyboardHide < TLObject; end | |
abstract class IReplyKeyboardMarkup < TLObject; end | |
abstract class IReplyMarkup < TLObject; end | |
abstract class IReportReason < TLObject; end | |
abstract class IResPq < TLObject; end | |
abstract class IRestrictionReason < TLObject; end | |
abstract class IRichText < TLObject; end | |
abstract class IRpcAnswerDropped < TLObject; end | |
abstract class IRpcAnswerDroppedRunning < TLObject; end | |
abstract class IRpcAnswerUnknown < TLObject; end | |
abstract class IRpcDropAnswer < TLObject; end | |
abstract class IRpcError < TLObject; end | |
abstract class ISavedContact < TLObject; end | |
abstract class ISavedPhoneContact < TLObject; end | |
abstract class ISecureCredentialsEncrypted < TLObject; end | |
abstract class ISecureData < TLObject; end | |
abstract class ISecureFile < TLObject; end | |
abstract class ISecureFileEmpty < TLObject; end | |
abstract class ISecurePasswordKdfAlgo < TLObject; end | |
abstract class ISecurePasswordKdfAlgoPbkdf2Hmacsha512iter100000 < TLObject; end | |
abstract class ISecurePasswordKdfAlgoSha512 < TLObject; end | |
abstract class ISecurePasswordKdfAlgoUnknown < TLObject; end | |
abstract class ISecurePlainData < TLObject; end | |
abstract class ISecurePlainEmail < TLObject; end | |
abstract class ISecurePlainPhone < TLObject; end | |
abstract class ISecureRequiredType < TLObject; end | |
abstract class ISecureRequiredTypeOneOf < TLObject; end | |
abstract class ISecureSecretSettings < TLObject; end | |
abstract class ISecureValue < TLObject; end | |
abstract class ISecureValueError < TLObject; end | |
abstract class ISecureValueErrorData < TLObject; end | |
abstract class ISecureValueErrorFile < TLObject; end | |
abstract class ISecureValueErrorFiles < TLObject; end | |
abstract class ISecureValueErrorFrontSide < TLObject; end | |
abstract class ISecureValueErrorReverseSide < TLObject; end | |
abstract class ISecureValueErrorSelfie < TLObject; end | |
abstract class ISecureValueErrorTranslationFile < TLObject; end | |
abstract class ISecureValueErrorTranslationFiles < TLObject; end | |
abstract class ISecureValueHash < TLObject; end | |
abstract class ISecureValueType < TLObject; end | |
abstract class ISecureValueTypeAddress < TLObject; end | |
abstract class ISecureValueTypeBankStatement < TLObject; end | |
abstract class ISecureValueTypeDriverLicense < TLObject; end | |
abstract class ISecureValueTypeEmail < TLObject; end | |
abstract class ISecureValueTypeIdentityCard < TLObject; end | |
abstract class ISecureValueTypeInternalPassport < TLObject; end | |
abstract class ISecureValueTypePassport < TLObject; end | |
abstract class ISecureValueTypePassportRegistration < TLObject; end | |
abstract class ISecureValueTypePersonalDetails < TLObject; end | |
abstract class ISecureValueTypePhone < TLObject; end | |
abstract class ISecureValueTypeRentalAgreement < TLObject; end | |
abstract class ISecureValueTypeTemporaryRegistration < TLObject; end | |
abstract class ISecureValueTypeUtilityBill < TLObject; end | |
abstract class ISendMessageAction < TLObject; end | |
abstract class ISendMessageCancelAction < TLObject; end | |
abstract class ISendMessageChooseContactAction < TLObject; end | |
abstract class ISendMessageGamePlayAction < TLObject; end | |
abstract class ISendMessageGeoLocationAction < TLObject; end | |
abstract class ISendMessageRecordAudioAction < TLObject; end | |
abstract class ISendMessageRecordRoundAction < TLObject; end | |
abstract class ISendMessageRecordVideoAction < TLObject; end | |
abstract class ISendMessageTypingAction < TLObject; end | |
abstract class ISendMessageUploadAudioAction < TLObject; end | |
abstract class ISendMessageUploadDocumentAction < TLObject; end | |
abstract class ISendMessageUploadPhotoAction < TLObject; end | |
abstract class ISendMessageUploadRoundAction < TLObject; end | |
abstract class ISendMessageUploadVideoAction < TLObject; end | |
abstract class IServerDhInnerData < TLObject; end | |
abstract class IServerDhParams < TLObject; end | |
abstract class IServerDhParamsFail < TLObject; end | |
abstract class IServerDhParamsOk < TLObject; end | |
abstract class ISetClientDhParamsAnswer < TLObject; end | |
abstract class IShippingOption < TLObject; end | |
abstract class ISpeakingInGroupCallAction < TLObject; end | |
abstract class IStatsAbsValueAndPrev < TLObject; end | |
abstract class IStatsDateRangeDays < TLObject; end | |
abstract class IStatsGraph < TLObject; end | |
abstract class IStatsGraphAsync < TLObject; end | |
abstract class IStatsGraphError < TLObject; end | |
abstract class IStatsGroupTopAdmin < TLObject; end | |
abstract class IStatsGroupTopInviter < TLObject; end | |
abstract class IStatsGroupTopPoster < TLObject; end | |
abstract class IStatsPercentValue < TLObject; end | |
abstract class IStatsUrl < TLObject; end | |
abstract class IStickerPack < TLObject; end | |
abstract class IStickerSet < TLObject; end | |
abstract class IStickerSetCovered < TLObject; end | |
abstract class IStickerSetMultiCovered < TLObject; end | |
abstract class ITextAnchor < TLObject; end | |
abstract class ITextBold < TLObject; end | |
abstract class ITextConcat < TLObject; end | |
abstract class ITextEmail < TLObject; end | |
abstract class ITextEmpty < TLObject; end | |
abstract class ITextFixed < TLObject; end | |
abstract class ITextImage < TLObject; end | |
abstract class ITextItalic < TLObject; end | |
abstract class ITextMarked < TLObject; end | |
abstract class ITextPhone < TLObject; end | |
abstract class ITextPlain < TLObject; end | |
abstract class ITextStrike < TLObject; end | |
abstract class ITextSubscript < TLObject; end | |
abstract class ITextSuperscript < TLObject; end | |
abstract class ITextUnderline < TLObject; end | |
abstract class ITextUrl < TLObject; end | |
abstract class ITheme < TLObject; end | |
abstract class IThemeSettings < TLObject; end | |
abstract class ITlsBlock < TLObject; end | |
abstract class ITlsBlockDomain < TLObject; end | |
abstract class ITlsBlockGrease < TLObject; end | |
abstract class ITlsBlockPublicKey < TLObject; end | |
abstract class ITlsBlockRandom < TLObject; end | |
abstract class ITlsBlockScope < TLObject; end | |
abstract class ITlsBlockString < TLObject; end | |
abstract class ITlsBlockZero < TLObject; end | |
abstract class ITlsClientHello < TLObject; end | |
abstract class ITopPeer < TLObject; end | |
abstract class ITopPeerCategory < TLObject; end | |
abstract class ITopPeerCategoryBotsInline < TLObject; end | |
abstract class ITopPeerCategoryBotsPm < TLObject; end | |
abstract class ITopPeerCategoryChannels < TLObject; end | |
abstract class ITopPeerCategoryCorrespondents < TLObject; end | |
abstract class ITopPeerCategoryForwardChats < TLObject; end | |
abstract class ITopPeerCategoryForwardUsers < TLObject; end | |
abstract class ITopPeerCategoryGroups < TLObject; end | |
abstract class ITopPeerCategoryPeers < TLObject; end | |
abstract class ITopPeerCategoryPhoneCalls < TLObject; end | |
abstract class IUpdate < TLObject; end | |
abstract class IUpdateBotCallbackQuery < TLObject; end | |
abstract class IUpdateBotInlineQuery < TLObject; end | |
abstract class IUpdateBotInlineSend < TLObject; end | |
abstract class IUpdateBotPrecheckoutQuery < TLObject; end | |
abstract class IUpdateBotShippingQuery < TLObject; end | |
abstract class IUpdateBotWebhookJson < TLObject; end | |
abstract class IUpdateBotWebhookJsonQuery < TLObject; end | |
abstract class IUpdateChannel < TLObject; end | |
abstract class IUpdateChannelAvailableMessages < TLObject; end | |
abstract class IUpdateChannelMessageForwards < TLObject; end | |
abstract class IUpdateChannelMessageViews < TLObject; end | |
abstract class IUpdateChannelParticipant < TLObject; end | |
abstract class IUpdateChannelReadMessagesContents < TLObject; end | |
abstract class IUpdateChannelTooLong < TLObject; end | |
abstract class IUpdateChannelUserTyping < TLObject; end | |
abstract class IUpdateChannelWebPage < TLObject; end | |
abstract class IUpdateChat < TLObject; end | |
abstract class IUpdateChatDefaultBannedRights < TLObject; end | |
abstract class IUpdateChatParticipantAdd < TLObject; end | |
abstract class IUpdateChatParticipantAdmin < TLObject; end | |
abstract class IUpdateChatParticipantDelete < TLObject; end | |
abstract class IUpdateChatParticipants < TLObject; end | |
abstract class IUpdateChatUserTyping < TLObject; end | |
abstract class IUpdateConfig < TLObject; end | |
abstract class IUpdateContactsReset < TLObject; end | |
abstract class IUpdateDcOptions < TLObject; end | |
abstract class IUpdateDeleteChannelMessages < TLObject; end | |
abstract class IUpdateDeleteMessages < TLObject; end | |
abstract class IUpdateDeleteScheduledMessages < TLObject; end | |
abstract class IUpdateDialogFilter < TLObject; end | |
abstract class IUpdateDialogFilterOrder < TLObject; end | |
abstract class IUpdateDialogFilters < TLObject; end | |
abstract class IUpdateDialogPinned < TLObject; end | |
abstract class IUpdateDialogUnreadMark < TLObject; end | |
abstract class IUpdateDraftMessage < TLObject; end | |
abstract class IUpdateEditChannelMessage < TLObject; end | |
abstract class IUpdateEditMessage < TLObject; end | |
abstract class IUpdateEncryptedChatTyping < TLObject; end | |
abstract class IUpdateEncryptedMessagesRead < TLObject; end | |
abstract class IUpdateEncryption < TLObject; end | |
abstract class IUpdateFavedStickers < TLObject; end | |
abstract class IUpdateFolderPeers < TLObject; end | |
abstract class IUpdateGeoLiveViewed < TLObject; end | |
abstract class IUpdateGroupCall < TLObject; end | |
abstract class IUpdateGroupCallParticipants < TLObject; end | |
abstract class IUpdateInlineBotCallbackQuery < TLObject; end | |
abstract class IUpdateLangPack < TLObject; end | |
abstract class IUpdateLangPackTooLong < TLObject; end | |
abstract class IUpdateLoginToken < TLObject; end | |
abstract class IUpdateMessageId < TLObject; end | |
abstract class IUpdateMessagePoll < TLObject; end | |
abstract class IUpdateMessagePollVote < TLObject; end | |
abstract class IUpdateNewChannelMessage < TLObject; end | |
abstract class IUpdateNewEncryptedMessage < TLObject; end | |
abstract class IUpdateNewMessage < TLObject; end | |
abstract class IUpdateNewScheduledMessage < TLObject; end | |
abstract class IUpdateNewStickerSet < TLObject; end | |
abstract class IUpdateNotifySettings < TLObject; end | |
abstract class IUpdatePeerBlocked < TLObject; end | |
abstract class IUpdatePeerLocated < TLObject; end | |
abstract class IUpdatePeerSettings < TLObject; end | |
abstract class IUpdatePhoneCall < TLObject; end | |
abstract class IUpdatePhoneCallSignalingData < TLObject; end | |
abstract class IUpdatePinnedChannelMessages < TLObject; end | |
abstract class IUpdatePinnedDialogs < TLObject; end | |
abstract class IUpdatePinnedMessages < TLObject; end | |
abstract class IUpdatePrivacy < TLObject; end | |
abstract class IUpdatePtsChanged < TLObject; end | |
abstract class IUpdateReadChannelDiscussionInbox < TLObject; end | |
abstract class IUpdateReadChannelDiscussionOutbox < TLObject; end | |
abstract class IUpdateReadChannelInbox < TLObject; end | |
abstract class IUpdateReadChannelOutbox < TLObject; end | |
abstract class IUpdateReadFeaturedStickers < TLObject; end | |
abstract class IUpdateReadHistoryInbox < TLObject; end | |
abstract class IUpdateReadHistoryOutbox < TLObject; end | |
abstract class IUpdateReadMessagesContents < TLObject; end | |
abstract class IUpdateRecentStickers < TLObject; end | |
abstract class IUpdateSavedGifs < TLObject; end | |
abstract class IUpdateServiceNotification < TLObject; end | |
abstract class IUpdateShort < TLObject; end | |
abstract class IUpdateShortChatMessage < TLObject; end | |
abstract class IUpdateShortMessage < TLObject; end | |
abstract class IUpdateShortSentMessage < TLObject; end | |
abstract class IUpdateStickerSets < TLObject; end | |
abstract class IUpdateStickerSetsOrder < TLObject; end | |
abstract class IUpdateTheme < TLObject; end | |
abstract class IUpdateUserName < TLObject; end | |
abstract class IUpdateUserPhone < TLObject; end | |
abstract class IUpdateUserPhoto < TLObject; end | |
abstract class IUpdateUserStatus < TLObject; end | |
abstract class IUpdateUserTyping < TLObject; end | |
abstract class IUpdateWebPage < TLObject; end | |
abstract class IUpdates < TLObject; end | |
abstract class IUpdatesCombined < TLObject; end | |
abstract class IUpdatesTooLong < TLObject; end | |
abstract class IUrlAuthResult < TLObject; end | |
abstract class IUrlAuthResultAccepted < TLObject; end | |
abstract class IUrlAuthResultDefault < TLObject; end | |
abstract class IUrlAuthResultRequest < TLObject; end | |
abstract class IUser < TLObject; end | |
abstract class IUserEmpty < TLObject; end | |
abstract class IUserFull < TLObject; end | |
abstract class IUserProfilePhoto < TLObject; end | |
abstract class IUserProfilePhotoEmpty < TLObject; end | |
abstract class IUserStatus < TLObject; end | |
abstract class IUserStatusEmpty < TLObject; end | |
abstract class IUserStatusLastMonth < TLObject; end | |
abstract class IUserStatusLastWeek < TLObject; end | |
abstract class IUserStatusOffline < TLObject; end | |
abstract class IUserStatusOnline < TLObject; end | |
abstract class IUserStatusRecently < TLObject; end | |
abstract class IVideoSize < TLObject; end | |
abstract class IWallPaper < TLObject; end | |
abstract class IWallPaperNoFile < TLObject; end | |
abstract class IWallPaperSettings < TLObject; end | |
abstract class IWebAuthorization < TLObject; end | |
abstract class IWebDocument < TLObject; end | |
abstract class IWebDocumentNoProxy < TLObject; end | |
abstract class IWebPage < TLObject; end | |
abstract class IWebPageAttribute < TLObject; end | |
abstract class IWebPageAttributeTheme < TLObject; end | |
abstract class IWebPageEmpty < TLObject; end | |
abstract class IWebPageNotModified < TLObject; end | |
abstract class IWebPagePending < TLObject; end | |
class AccessPointRule < IAccessPointRule | |
CONSTRUCTOR_ID = 0x4679B65F | |
property phone_prefix_rules : Bytes | |
property dc_id : Int32 | |
property ips : Array(Root::IIpPort) | |
def initialize(@phone_prefix_rules : Bytes, @dc_id : Int32, @ips : Array(Root::IIpPort)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@phone_prefix_rules.tl_serialize(io) | |
@dc_id.tl_serialize(io) | |
@ips.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
phone_prefix_rules = Bytes.tl_deserialize(io) | |
dc_id = Int32.tl_deserialize(io) | |
ips = Array(Root::IpPort).tl_deserialize(io) | |
new(phone_prefix_rules: phone_prefix_rules, dc_id: dc_id, ips: ips) | |
end | |
end | |
class AccountDaysTtl < IAccountDaysTtl | |
CONSTRUCTOR_ID = 0xB8D0AFDF | |
property days : Int32 | |
def initialize(@days : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@days.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
days = Int32.tl_deserialize(io) | |
new(days: days) | |
end | |
end | |
class Authorization < IAuthorization | |
CONSTRUCTOR_ID = 0xAD01D61D | |
property hash : Int64 | |
property device_model : String | |
property platform : String | |
property system_version : String | |
property api_id : Int32 | |
property app_name : String | |
property app_version : String | |
property date_created : Int32 | |
property date_active : Int32 | |
property ip : String | |
property country : String | |
property region : String | |
property current : Bool | |
property official_app : Bool | |
property password_pending : Bool | |
def initialize(@hash : Int64, @device_model : String, @platform : String, @system_version : String, @api_id : Int32, @app_name : String, @app_version : String, @date_created : Int32, @date_active : Int32, @ip : String, @country : String, @region : String, @current : Bool = nil, @official_app : Bool = nil, @password_pending : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @current ? 1 : 0 | @official_app ? 2 : 0 | @password_pending ? 4 : 0).tl_serialize(io) | |
if current = @current | |
current.tl_serialize(io) | |
end | |
if official_app = @official_app | |
official_app.tl_serialize(io) | |
end | |
if password_pending = @password_pending | |
password_pending.tl_serialize(io) | |
end | |
@hash.tl_serialize(io) | |
@device_model.tl_serialize(io) | |
@platform.tl_serialize(io) | |
@system_version.tl_serialize(io) | |
@api_id.tl_serialize(io) | |
@app_name.tl_serialize(io) | |
@app_version.tl_serialize(io) | |
@date_created.tl_serialize(io) | |
@date_active.tl_serialize(io) | |
@ip.tl_serialize(io) | |
@country.tl_serialize(io) | |
@region.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
current = (flags & 1) != 0 | |
official_app = (flags & 2) != 0 | |
password_pending = (flags & 4) != 0 | |
hash = Int64.tl_deserialize(io) | |
device_model = String.tl_deserialize(io) | |
platform = String.tl_deserialize(io) | |
system_version = String.tl_deserialize(io) | |
api_id = Int32.tl_deserialize(io) | |
app_name = String.tl_deserialize(io) | |
app_version = String.tl_deserialize(io) | |
date_created = Int32.tl_deserialize(io) | |
date_active = Int32.tl_deserialize(io) | |
ip = String.tl_deserialize(io) | |
country = String.tl_deserialize(io) | |
region = String.tl_deserialize(io) | |
new(current: current, official_app: official_app, password_pending: password_pending, hash: hash, device_model: device_model, platform: platform, system_version: system_version, api_id: api_id, app_name: app_name, app_version: app_version, date_created: date_created, date_active: date_active, ip: ip, country: country, region: region) | |
end | |
end | |
class AutoDownloadSettings < IAutoDownloadSettings | |
CONSTRUCTOR_ID = 0xE04232F3 | |
property photo_size_max : Int32 | |
property video_size_max : Int32 | |
property file_size_max : Int32 | |
property video_upload_maxbitrate : Int32 | |
property disabled : Bool | |
property video_preload_large : Bool | |
property audio_preload_next : Bool | |
property phonecalls_less_data : Bool | |
def initialize(@photo_size_max : Int32, @video_size_max : Int32, @file_size_max : Int32, @video_upload_maxbitrate : Int32, @disabled : Bool = nil, @video_preload_large : Bool = nil, @audio_preload_next : Bool = nil, @phonecalls_less_data : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @disabled ? 1 : 0 | @video_preload_large ? 2 : 0 | @audio_preload_next ? 4 : 0 | @phonecalls_less_data ? 8 : 0).tl_serialize(io) | |
if disabled = @disabled | |
disabled.tl_serialize(io) | |
end | |
if video_preload_large = @video_preload_large | |
video_preload_large.tl_serialize(io) | |
end | |
if audio_preload_next = @audio_preload_next | |
audio_preload_next.tl_serialize(io) | |
end | |
if phonecalls_less_data = @phonecalls_less_data | |
phonecalls_less_data.tl_serialize(io) | |
end | |
@photo_size_max.tl_serialize(io) | |
@video_size_max.tl_serialize(io) | |
@file_size_max.tl_serialize(io) | |
@video_upload_maxbitrate.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
disabled = (flags & 1) != 0 | |
video_preload_large = (flags & 2) != 0 | |
audio_preload_next = (flags & 4) != 0 | |
phonecalls_less_data = (flags & 8) != 0 | |
photo_size_max = Int32.tl_deserialize(io) | |
video_size_max = Int32.tl_deserialize(io) | |
file_size_max = Int32.tl_deserialize(io) | |
video_upload_maxbitrate = Int32.tl_deserialize(io) | |
new(disabled: disabled, video_preload_large: video_preload_large, audio_preload_next: audio_preload_next, phonecalls_less_data: phonecalls_less_data, photo_size_max: photo_size_max, video_size_max: video_size_max, file_size_max: file_size_max, video_upload_maxbitrate: video_upload_maxbitrate) | |
end | |
end | |
class BadMsgNotification < IBadMsgNotification | |
CONSTRUCTOR_ID = 0xA7EFF811 | |
property bad_msg_id : Int64 | |
property bad_msg_seqno : Int32 | |
property error_code : Int32 | |
def initialize(@bad_msg_id : Int64, @bad_msg_seqno : Int32, @error_code : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@bad_msg_id.tl_serialize(io) | |
@bad_msg_seqno.tl_serialize(io) | |
@error_code.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
bad_msg_id = Int64.tl_deserialize(io) | |
bad_msg_seqno = Int32.tl_deserialize(io) | |
error_code = Int32.tl_deserialize(io) | |
new(bad_msg_id: bad_msg_id, bad_msg_seqno: bad_msg_seqno, error_code: error_code) | |
end | |
end | |
class BadServerSalt < IBadMsgNotification | |
CONSTRUCTOR_ID = 0xEDAB447B | |
property bad_msg_id : Int64 | |
property bad_msg_seqno : Int32 | |
property error_code : Int32 | |
property new_server_salt : Int64 | |
def initialize(@bad_msg_id : Int64, @bad_msg_seqno : Int32, @error_code : Int32, @new_server_salt : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@bad_msg_id.tl_serialize(io) | |
@bad_msg_seqno.tl_serialize(io) | |
@error_code.tl_serialize(io) | |
@new_server_salt.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
bad_msg_id = Int64.tl_deserialize(io) | |
bad_msg_seqno = Int32.tl_deserialize(io) | |
error_code = Int32.tl_deserialize(io) | |
new_server_salt = Int64.tl_deserialize(io) | |
new(bad_msg_id: bad_msg_id, bad_msg_seqno: bad_msg_seqno, error_code: error_code, new_server_salt: new_server_salt) | |
end | |
end | |
class BankCardOpenUrl < IBankCardOpenUrl | |
CONSTRUCTOR_ID = 0xF568028A | |
property url : String | |
property name : String | |
def initialize(@url : String, @name : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@url.tl_serialize(io) | |
@name.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
url = String.tl_deserialize(io) | |
name = String.tl_deserialize(io) | |
new(url: url, name: name) | |
end | |
end | |
class BaseThemeArctic < IBaseTheme | |
CONSTRUCTOR_ID = 0x5B11125A | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class BaseThemeClassic < IBaseTheme | |
CONSTRUCTOR_ID = 0xC3A12462 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class BaseThemeDay < IBaseTheme | |
CONSTRUCTOR_ID = 0xFBD81688 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class BaseThemeNight < IBaseTheme | |
CONSTRUCTOR_ID = 0xB7B31EA8 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class BaseThemeTinted < IBaseTheme | |
CONSTRUCTOR_ID = 0x6D5F77EE | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class BindAuthKeyInner < IBindAuthKeyInner | |
CONSTRUCTOR_ID = 0x75A3F765 | |
property nonce : Int64 | |
property temp_auth_key_id : Int64 | |
property perm_auth_key_id : Int64 | |
property temp_session_id : Int64 | |
property expires_at : Int32 | |
def initialize(@nonce : Int64, @temp_auth_key_id : Int64, @perm_auth_key_id : Int64, @temp_session_id : Int64, @expires_at : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@nonce.tl_serialize(io) | |
@temp_auth_key_id.tl_serialize(io) | |
@perm_auth_key_id.tl_serialize(io) | |
@temp_session_id.tl_serialize(io) | |
@expires_at.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
nonce = Int64.tl_deserialize(io) | |
temp_auth_key_id = Int64.tl_deserialize(io) | |
perm_auth_key_id = Int64.tl_deserialize(io) | |
temp_session_id = Int64.tl_deserialize(io) | |
expires_at = Int32.tl_deserialize(io) | |
new(nonce: nonce, temp_auth_key_id: temp_auth_key_id, perm_auth_key_id: perm_auth_key_id, temp_session_id: temp_session_id, expires_at: expires_at) | |
end | |
end | |
class BotCommand < IBotCommand | |
CONSTRUCTOR_ID = 0xC27AC8C7 | |
property command : String | |
property description : String | |
def initialize(@command : String, @description : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@command.tl_serialize(io) | |
@description.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
command = String.tl_deserialize(io) | |
description = String.tl_deserialize(io) | |
new(command: command, description: description) | |
end | |
end | |
class BotInfo < IBotInfo | |
CONSTRUCTOR_ID = 0x98E81D3A | |
property user_id : Int32 | |
property description : String | |
property commands : Array(Root::IBotCommand) | |
def initialize(@user_id : Int32, @description : String, @commands : Array(Root::IBotCommand)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
@description.tl_serialize(io) | |
@commands.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
description = String.tl_deserialize(io) | |
commands = Array(Root::BotCommand).tl_deserialize(io) | |
new(user_id: user_id, description: description, commands: commands) | |
end | |
end | |
class BotInlineMediaResult < IBotInlineResult | |
CONSTRUCTOR_ID = 0x17DB940B | |
property id : String | |
property type : String | |
property send_message : Root::IBotInlineMessage | |
property photo : Root::IPhoto? | |
property document : Root::IDocument? | |
property title : String? | |
property description : String? | |
def initialize(@id : String, @type : String, @send_message : Root::IBotInlineMessage, @photo : Root::IPhoto? = nil, @document : Root::IDocument? = nil, @title : String? = nil, @description : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @photo ? 1 : 0 | @document ? 2 : 0 | @title ? 4 : 0 | @description ? 8 : 0).tl_serialize(io) | |
@id.tl_serialize(io) | |
@type.tl_serialize(io) | |
if photo = @photo | |
photo.tl_serialize(io) | |
end | |
if document = @document | |
document.tl_serialize(io) | |
end | |
if title = @title | |
title.tl_serialize(io) | |
end | |
if description = @description | |
description.tl_serialize(io) | |
end | |
@send_message.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
id = String.tl_deserialize(io) | |
type = String.tl_deserialize(io) | |
photo = (flags & 1) != 0 ? Root::Photo.tl_deserialize(io) : nil | |
document = (flags & 2) != 0 ? Root::Document.tl_deserialize(io) : nil | |
title = (flags & 4) != 0 ? String.tl_deserialize(io) : nil | |
description = (flags & 8) != 0 ? String.tl_deserialize(io) : nil | |
send_message = Root::BotInlineMessage.tl_deserialize(io) | |
new(id: id, type: type, photo: photo, document: document, title: title, description: description, send_message: send_message) | |
end | |
end | |
class BotInlineMessageMediaAuto < IBotInlineMessage | |
CONSTRUCTOR_ID = 0x764CF810 | |
property message : String | |
property entities : Array(Root::IMessageEntity)? | |
property reply_markup : Root::IReplyMarkup? | |
def initialize(@message : String, @entities : Array(Root::IMessageEntity)? = nil, @reply_markup : Root::IReplyMarkup? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @entities ? 2 : 0 | @reply_markup ? 4 : 0).tl_serialize(io) | |
@message.tl_serialize(io) | |
if entities = @entities | |
entities.tl_serialize(io) | |
end | |
if reply_markup = @reply_markup | |
reply_markup.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
message = String.tl_deserialize(io) | |
entities = (flags & 2) != 0 ? Array(Root::MessageEntity).tl_deserialize(io) : nil | |
reply_markup = (flags & 4) != 0 ? Root::ReplyMarkup.tl_deserialize(io) : nil | |
new(message: message, entities: entities, reply_markup: reply_markup) | |
end | |
end | |
class BotInlineMessageMediaContact < IBotInlineMessage | |
CONSTRUCTOR_ID = 0x18D1CDC2 | |
property phone_number : String | |
property first_name : String | |
property last_name : String | |
property vcard : String | |
property reply_markup : Root::IReplyMarkup? | |
def initialize(@phone_number : String, @first_name : String, @last_name : String, @vcard : String, @reply_markup : Root::IReplyMarkup? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @reply_markup ? 4 : 0).tl_serialize(io) | |
@phone_number.tl_serialize(io) | |
@first_name.tl_serialize(io) | |
@last_name.tl_serialize(io) | |
@vcard.tl_serialize(io) | |
if reply_markup = @reply_markup | |
reply_markup.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
phone_number = String.tl_deserialize(io) | |
first_name = String.tl_deserialize(io) | |
last_name = String.tl_deserialize(io) | |
vcard = String.tl_deserialize(io) | |
reply_markup = (flags & 4) != 0 ? Root::ReplyMarkup.tl_deserialize(io) : nil | |
new(phone_number: phone_number, first_name: first_name, last_name: last_name, vcard: vcard, reply_markup: reply_markup) | |
end | |
end | |
class BotInlineMessageMediaGeo < IBotInlineMessage | |
CONSTRUCTOR_ID = 0x051846FD | |
property geo : Root::IGeoPoint | |
property heading : Int32? | |
property period : Int32? | |
property proximity_notification_radius : Int32? | |
property reply_markup : Root::IReplyMarkup? | |
def initialize(@geo : Root::IGeoPoint, @heading : Int32? = nil, @period : Int32? = nil, @proximity_notification_radius : Int32? = nil, @reply_markup : Root::IReplyMarkup? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @heading ? 1 : 0 | @period ? 2 : 0 | @proximity_notification_radius ? 8 : 0 | @reply_markup ? 4 : 0).tl_serialize(io) | |
@geo.tl_serialize(io) | |
if heading = @heading | |
heading.tl_serialize(io) | |
end | |
if period = @period | |
period.tl_serialize(io) | |
end | |
if proximity_notification_radius = @proximity_notification_radius | |
proximity_notification_radius.tl_serialize(io) | |
end | |
if reply_markup = @reply_markup | |
reply_markup.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
geo = Root::GeoPoint.tl_deserialize(io) | |
heading = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
period = (flags & 2) != 0 ? Int32.tl_deserialize(io) : nil | |
proximity_notification_radius = (flags & 8) != 0 ? Int32.tl_deserialize(io) : nil | |
reply_markup = (flags & 4) != 0 ? Root::ReplyMarkup.tl_deserialize(io) : nil | |
new(geo: geo, heading: heading, period: period, proximity_notification_radius: proximity_notification_radius, reply_markup: reply_markup) | |
end | |
end | |
class BotInlineMessageMediaVenue < IBotInlineMessage | |
CONSTRUCTOR_ID = 0x8A86659C | |
property geo : Root::IGeoPoint | |
property title : String | |
property address : String | |
property provider : String | |
property venue_id : String | |
property venue_type : String | |
property reply_markup : Root::IReplyMarkup? | |
def initialize(@geo : Root::IGeoPoint, @title : String, @address : String, @provider : String, @venue_id : String, @venue_type : String, @reply_markup : Root::IReplyMarkup? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @reply_markup ? 4 : 0).tl_serialize(io) | |
@geo.tl_serialize(io) | |
@title.tl_serialize(io) | |
@address.tl_serialize(io) | |
@provider.tl_serialize(io) | |
@venue_id.tl_serialize(io) | |
@venue_type.tl_serialize(io) | |
if reply_markup = @reply_markup | |
reply_markup.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
geo = Root::GeoPoint.tl_deserialize(io) | |
title = String.tl_deserialize(io) | |
address = String.tl_deserialize(io) | |
provider = String.tl_deserialize(io) | |
venue_id = String.tl_deserialize(io) | |
venue_type = String.tl_deserialize(io) | |
reply_markup = (flags & 4) != 0 ? Root::ReplyMarkup.tl_deserialize(io) : nil | |
new(geo: geo, title: title, address: address, provider: provider, venue_id: venue_id, venue_type: venue_type, reply_markup: reply_markup) | |
end | |
end | |
class BotInlineMessageText < IBotInlineMessage | |
CONSTRUCTOR_ID = 0x8C7F65E2 | |
property message : String | |
property no_webpage : Bool | |
property entities : Array(Root::IMessageEntity)? | |
property reply_markup : Root::IReplyMarkup? | |
def initialize(@message : String, @no_webpage : Bool = nil, @entities : Array(Root::IMessageEntity)? = nil, @reply_markup : Root::IReplyMarkup? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @no_webpage ? 1 : 0 | @entities ? 2 : 0 | @reply_markup ? 4 : 0).tl_serialize(io) | |
if no_webpage = @no_webpage | |
no_webpage.tl_serialize(io) | |
end | |
@message.tl_serialize(io) | |
if entities = @entities | |
entities.tl_serialize(io) | |
end | |
if reply_markup = @reply_markup | |
reply_markup.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
no_webpage = (flags & 1) != 0 | |
message = String.tl_deserialize(io) | |
entities = (flags & 2) != 0 ? Array(Root::MessageEntity).tl_deserialize(io) : nil | |
reply_markup = (flags & 4) != 0 ? Root::ReplyMarkup.tl_deserialize(io) : nil | |
new(no_webpage: no_webpage, message: message, entities: entities, reply_markup: reply_markup) | |
end | |
end | |
class BotInlineResult < IBotInlineResult | |
CONSTRUCTOR_ID = 0x11965F3A | |
property id : String | |
property type : String | |
property send_message : Root::IBotInlineMessage | |
property title : String? | |
property description : String? | |
property url : String? | |
property thumb : Root::IWebDocument? | |
property content : Root::IWebDocument? | |
def initialize(@id : String, @type : String, @send_message : Root::IBotInlineMessage, @title : String? = nil, @description : String? = nil, @url : String? = nil, @thumb : Root::IWebDocument? = nil, @content : Root::IWebDocument? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @title ? 2 : 0 | @description ? 4 : 0 | @url ? 8 : 0 | @thumb ? 16 : 0 | @content ? 32 : 0).tl_serialize(io) | |
@id.tl_serialize(io) | |
@type.tl_serialize(io) | |
if title = @title | |
title.tl_serialize(io) | |
end | |
if description = @description | |
description.tl_serialize(io) | |
end | |
if url = @url | |
url.tl_serialize(io) | |
end | |
if thumb = @thumb | |
thumb.tl_serialize(io) | |
end | |
if content = @content | |
content.tl_serialize(io) | |
end | |
@send_message.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
id = String.tl_deserialize(io) | |
type = String.tl_deserialize(io) | |
title = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
description = (flags & 4) != 0 ? String.tl_deserialize(io) : nil | |
url = (flags & 8) != 0 ? String.tl_deserialize(io) : nil | |
thumb = (flags & 16) != 0 ? Root::WebDocument.tl_deserialize(io) : nil | |
content = (flags & 32) != 0 ? Root::WebDocument.tl_deserialize(io) : nil | |
send_message = Root::BotInlineMessage.tl_deserialize(io) | |
new(id: id, type: type, title: title, description: description, url: url, thumb: thumb, content: content, send_message: send_message) | |
end | |
end | |
class CdnConfig < ICdnConfig | |
CONSTRUCTOR_ID = 0x5725E40A | |
property public_keys : Array(Root::ICdnPublicKey) | |
def initialize(@public_keys : Array(Root::ICdnPublicKey)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@public_keys.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
public_keys = Array(Root::CdnPublicKey).tl_deserialize(io) | |
new(public_keys: public_keys) | |
end | |
end | |
class CdnPublicKey < ICdnPublicKey | |
CONSTRUCTOR_ID = 0xC982EABA | |
property dc_id : Int32 | |
property public_key : String | |
def initialize(@dc_id : Int32, @public_key : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@dc_id.tl_serialize(io) | |
@public_key.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
dc_id = Int32.tl_deserialize(io) | |
public_key = String.tl_deserialize(io) | |
new(dc_id: dc_id, public_key: public_key) | |
end | |
end | |
class Channel < IChat | |
CONSTRUCTOR_ID = 0xD31A961E | |
property version : Int32 | |
property date : Int32 | |
property photo : Root::IChatPhoto | |
property title : String | |
property id : Int32 | |
property default_banned_rights : Root::IChatBannedRights? | |
property banned_rights : Root::IChatBannedRights? | |
property admin_rights : Root::IChatAdminRights? | |
property restriction_reason : Array(Root::IRestrictionReason)? | |
property username : String? | |
property access_hash : Int64? | |
property call_not_empty : Bool | |
property call_active : Bool | |
property slowmode_enabled : Bool | |
property has_geo : Bool | |
property has_link : Bool | |
property scam : Bool | |
property min : Bool | |
property signatures : Bool | |
property restricted : Bool | |
property megagroup : Bool | |
property verified : Bool | |
property broadcast : Bool | |
property left : Bool | |
property creator : Bool | |
property participants_count : Int32? | |
def initialize(@version : Int32, @date : Int32, @photo : Root::IChatPhoto, @title : String, @id : Int32, @default_banned_rights : Root::IChatBannedRights? = nil, @banned_rights : Root::IChatBannedRights? = nil, @admin_rights : Root::IChatAdminRights? = nil, @restriction_reason : Array(Root::IRestrictionReason)? = nil, @username : String? = nil, @access_hash : Int64? = nil, @call_not_empty : Bool = nil, @call_active : Bool = nil, @slowmode_enabled : Bool = nil, @has_geo : Bool = nil, @has_link : Bool = nil, @scam : Bool = nil, @min : Bool = nil, @signatures : Bool = nil, @restricted : Bool = nil, @megagroup : Bool = nil, @verified : Bool = nil, @broadcast : Bool = nil, @left : Bool = nil, @creator : Bool = nil, @participants_count : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @creator ? 1 : 0 | @left ? 4 : 0 | @broadcast ? 32 : 0 | @verified ? 128 : 0 | @megagroup ? 256 : 0 | @restricted ? 512 : 0 | @signatures ? 2048 : 0 | @min ? 4096 : 0 | @scam ? 524288 : 0 | @has_link ? 1048576 : 0 | @has_geo ? 2097152 : 0 | @slowmode_enabled ? 4194304 : 0 | @call_active ? 8388608 : 0 | @call_not_empty ? 16777216 : 0 | @access_hash ? 8192 : 0 | @username ? 64 : 0 | @restriction_reason ? 512 : 0 | @admin_rights ? 16384 : 0 | @banned_rights ? 32768 : 0 | @default_banned_rights ? 262144 : 0 | @participants_count ? 131072 : 0).tl_serialize(io) | |
if creator = @creator | |
creator.tl_serialize(io) | |
end | |
if left = @left | |
left.tl_serialize(io) | |
end | |
if broadcast = @broadcast | |
broadcast.tl_serialize(io) | |
end | |
if verified = @verified | |
verified.tl_serialize(io) | |
end | |
if megagroup = @megagroup | |
megagroup.tl_serialize(io) | |
end | |
if restricted = @restricted | |
restricted.tl_serialize(io) | |
end | |
if signatures = @signatures | |
signatures.tl_serialize(io) | |
end | |
if min = @min | |
min.tl_serialize(io) | |
end | |
if scam = @scam | |
scam.tl_serialize(io) | |
end | |
if has_link = @has_link | |
has_link.tl_serialize(io) | |
end | |
if has_geo = @has_geo | |
has_geo.tl_serialize(io) | |
end | |
if slowmode_enabled = @slowmode_enabled | |
slowmode_enabled.tl_serialize(io) | |
end | |
if call_active = @call_active | |
call_active.tl_serialize(io) | |
end | |
if call_not_empty = @call_not_empty | |
call_not_empty.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
if access_hash = @access_hash | |
access_hash.tl_serialize(io) | |
end | |
@title.tl_serialize(io) | |
if username = @username | |
username.tl_serialize(io) | |
end | |
@photo.tl_serialize(io) | |
@date.tl_serialize(io) | |
@version.tl_serialize(io) | |
if restriction_reason = @restriction_reason | |
restriction_reason.tl_serialize(io) | |
end | |
if admin_rights = @admin_rights | |
admin_rights.tl_serialize(io) | |
end | |
if banned_rights = @banned_rights | |
banned_rights.tl_serialize(io) | |
end | |
if default_banned_rights = @default_banned_rights | |
default_banned_rights.tl_serialize(io) | |
end | |
if participants_count = @participants_count | |
participants_count.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
creator = (flags & 1) != 0 | |
left = (flags & 4) != 0 | |
broadcast = (flags & 32) != 0 | |
verified = (flags & 128) != 0 | |
megagroup = (flags & 256) != 0 | |
restricted = (flags & 512) != 0 | |
signatures = (flags & 2048) != 0 | |
min = (flags & 4096) != 0 | |
scam = (flags & 524288) != 0 | |
has_link = (flags & 1048576) != 0 | |
has_geo = (flags & 2097152) != 0 | |
slowmode_enabled = (flags & 4194304) != 0 | |
call_active = (flags & 8388608) != 0 | |
call_not_empty = (flags & 16777216) != 0 | |
id = Int32.tl_deserialize(io) | |
access_hash = (flags & 8192) != 0 ? Int64.tl_deserialize(io) : nil | |
title = String.tl_deserialize(io) | |
username = (flags & 64) != 0 ? String.tl_deserialize(io) : nil | |
photo = Root::ChatPhoto.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
version = Int32.tl_deserialize(io) | |
restriction_reason = (flags & 512) != 0 ? Array(Root::RestrictionReason).tl_deserialize(io) : nil | |
admin_rights = (flags & 16384) != 0 ? Root::ChatAdminRights.tl_deserialize(io) : nil | |
banned_rights = (flags & 32768) != 0 ? Root::ChatBannedRights.tl_deserialize(io) : nil | |
default_banned_rights = (flags & 262144) != 0 ? Root::ChatBannedRights.tl_deserialize(io) : nil | |
participants_count = (flags & 131072) != 0 ? Int32.tl_deserialize(io) : nil | |
new(creator: creator, left: left, broadcast: broadcast, verified: verified, megagroup: megagroup, restricted: restricted, signatures: signatures, min: min, scam: scam, has_link: has_link, has_geo: has_geo, slowmode_enabled: slowmode_enabled, call_active: call_active, call_not_empty: call_not_empty, id: id, access_hash: access_hash, title: title, username: username, photo: photo, date: date, version: version, restriction_reason: restriction_reason, admin_rights: admin_rights, banned_rights: banned_rights, default_banned_rights: default_banned_rights, participants_count: participants_count) | |
end | |
end | |
class ChannelAdminLogEvent < IChannelAdminLogEvent | |
CONSTRUCTOR_ID = 0x3B5A3E40 | |
property id : Int64 | |
property date : Int32 | |
property user_id : Int32 | |
property action : Root::IChannelAdminLogEventAction | |
def initialize(@id : Int64, @date : Int32, @user_id : Int32, @action : Root::IChannelAdminLogEventAction) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@date.tl_serialize(io) | |
@user_id.tl_serialize(io) | |
@action.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
user_id = Int32.tl_deserialize(io) | |
action = Root::ChannelAdminLogEventAction.tl_deserialize(io) | |
new(id: id, date: date, user_id: user_id, action: action) | |
end | |
end | |
class ChannelAdminLogEventActionChangeAbout < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0x55188A2E | |
property prev_value : String | |
property new_value : String | |
def initialize(@prev_value : String, @new_value : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@prev_value.tl_serialize(io) | |
@new_value.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
prev_value = String.tl_deserialize(io) | |
new_value = String.tl_deserialize(io) | |
new(prev_value: prev_value, new_value: new_value) | |
end | |
end | |
class ChannelAdminLogEventActionChangeLinkedChat < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0xA26F881B | |
property prev_value : Int32 | |
property new_value : Int32 | |
def initialize(@prev_value : Int32, @new_value : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@prev_value.tl_serialize(io) | |
@new_value.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
prev_value = Int32.tl_deserialize(io) | |
new_value = Int32.tl_deserialize(io) | |
new(prev_value: prev_value, new_value: new_value) | |
end | |
end | |
class ChannelAdminLogEventActionChangeLocation < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0x0E6B76AE | |
property prev_value : Root::IChannelLocation | |
property new_value : Root::IChannelLocation | |
def initialize(@prev_value : Root::IChannelLocation, @new_value : Root::IChannelLocation) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@prev_value.tl_serialize(io) | |
@new_value.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
prev_value = Root::ChannelLocation.tl_deserialize(io) | |
new_value = Root::ChannelLocation.tl_deserialize(io) | |
new(prev_value: prev_value, new_value: new_value) | |
end | |
end | |
class ChannelAdminLogEventActionChangePhoto < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0x434BD2AF | |
property prev_photo : Root::IPhoto | |
property new_photo : Root::IPhoto | |
def initialize(@prev_photo : Root::IPhoto, @new_photo : Root::IPhoto) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@prev_photo.tl_serialize(io) | |
@new_photo.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
prev_photo = Root::Photo.tl_deserialize(io) | |
new_photo = Root::Photo.tl_deserialize(io) | |
new(prev_photo: prev_photo, new_photo: new_photo) | |
end | |
end | |
class ChannelAdminLogEventActionChangeStickerSet < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0xB1C3CAA7 | |
property prev_stickerset : Root::IInputStickerSet | |
property new_stickerset : Root::IInputStickerSet | |
def initialize(@prev_stickerset : Root::IInputStickerSet, @new_stickerset : Root::IInputStickerSet) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@prev_stickerset.tl_serialize(io) | |
@new_stickerset.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
prev_stickerset = Root::InputStickerSet.tl_deserialize(io) | |
new_stickerset = Root::InputStickerSet.tl_deserialize(io) | |
new(prev_stickerset: prev_stickerset, new_stickerset: new_stickerset) | |
end | |
end | |
class ChannelAdminLogEventActionChangeTitle < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0xE6DFB825 | |
property prev_value : String | |
property new_value : String | |
def initialize(@prev_value : String, @new_value : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@prev_value.tl_serialize(io) | |
@new_value.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
prev_value = String.tl_deserialize(io) | |
new_value = String.tl_deserialize(io) | |
new(prev_value: prev_value, new_value: new_value) | |
end | |
end | |
class ChannelAdminLogEventActionChangeUsername < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0x6A4AFC38 | |
property prev_value : String | |
property new_value : String | |
def initialize(@prev_value : String, @new_value : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@prev_value.tl_serialize(io) | |
@new_value.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
prev_value = String.tl_deserialize(io) | |
new_value = String.tl_deserialize(io) | |
new(prev_value: prev_value, new_value: new_value) | |
end | |
end | |
class ChannelAdminLogEventActionDefaultBannedRights < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0x2DF5FC0A | |
property prev_banned_rights : Root::IChatBannedRights | |
property new_banned_rights : Root::IChatBannedRights | |
def initialize(@prev_banned_rights : Root::IChatBannedRights, @new_banned_rights : Root::IChatBannedRights) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@prev_banned_rights.tl_serialize(io) | |
@new_banned_rights.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
prev_banned_rights = Root::ChatBannedRights.tl_deserialize(io) | |
new_banned_rights = Root::ChatBannedRights.tl_deserialize(io) | |
new(prev_banned_rights: prev_banned_rights, new_banned_rights: new_banned_rights) | |
end | |
end | |
class ChannelAdminLogEventActionDeleteMessage < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0x42E047BB | |
property message : Root::IMessage | |
def initialize(@message : Root::IMessage) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@message.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
message = Root::Message.tl_deserialize(io) | |
new(message: message) | |
end | |
end | |
class ChannelAdminLogEventActionDiscardGroupCall < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0xDB9F9140 | |
property call : Root::IInputGroupCall | |
def initialize(@call : Root::IInputGroupCall) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@call.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
call = Root::InputGroupCall.tl_deserialize(io) | |
new(call: call) | |
end | |
end | |
class ChannelAdminLogEventActionEditMessage < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0x709B2405 | |
property prev_message : Root::IMessage | |
property new_message : Root::IMessage | |
def initialize(@prev_message : Root::IMessage, @new_message : Root::IMessage) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@prev_message.tl_serialize(io) | |
@new_message.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
prev_message = Root::Message.tl_deserialize(io) | |
new_message = Root::Message.tl_deserialize(io) | |
new(prev_message: prev_message, new_message: new_message) | |
end | |
end | |
class ChannelAdminLogEventActionParticipantInvite < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0xE31C34D8 | |
property participant : Root::IChannelParticipant | |
def initialize(@participant : Root::IChannelParticipant) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@participant.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
participant = Root::ChannelParticipant.tl_deserialize(io) | |
new(participant: participant) | |
end | |
end | |
class ChannelAdminLogEventActionParticipantJoin < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0x183040D3 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class ChannelAdminLogEventActionParticipantLeave < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0xF89777F2 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class ChannelAdminLogEventActionParticipantMute < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0xF92424D2 | |
property participant : Root::IGroupCallParticipant | |
def initialize(@participant : Root::IGroupCallParticipant) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@participant.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
participant = Root::GroupCallParticipant.tl_deserialize(io) | |
new(participant: participant) | |
end | |
end | |
class ChannelAdminLogEventActionParticipantToggleAdmin < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0xD5676710 | |
property prev_participant : Root::IChannelParticipant | |
property new_participant : Root::IChannelParticipant | |
def initialize(@prev_participant : Root::IChannelParticipant, @new_participant : Root::IChannelParticipant) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@prev_participant.tl_serialize(io) | |
@new_participant.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
prev_participant = Root::ChannelParticipant.tl_deserialize(io) | |
new_participant = Root::ChannelParticipant.tl_deserialize(io) | |
new(prev_participant: prev_participant, new_participant: new_participant) | |
end | |
end | |
class ChannelAdminLogEventActionParticipantToggleBan < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0xE6D83D7E | |
property prev_participant : Root::IChannelParticipant | |
property new_participant : Root::IChannelParticipant | |
def initialize(@prev_participant : Root::IChannelParticipant, @new_participant : Root::IChannelParticipant) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@prev_participant.tl_serialize(io) | |
@new_participant.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
prev_participant = Root::ChannelParticipant.tl_deserialize(io) | |
new_participant = Root::ChannelParticipant.tl_deserialize(io) | |
new(prev_participant: prev_participant, new_participant: new_participant) | |
end | |
end | |
class ChannelAdminLogEventActionParticipantUnmute < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0xE64429C0 | |
property participant : Root::IGroupCallParticipant | |
def initialize(@participant : Root::IGroupCallParticipant) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@participant.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
participant = Root::GroupCallParticipant.tl_deserialize(io) | |
new(participant: participant) | |
end | |
end | |
class ChannelAdminLogEventActionStartGroupCall < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0x23209745 | |
property call : Root::IInputGroupCall | |
def initialize(@call : Root::IInputGroupCall) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@call.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
call = Root::InputGroupCall.tl_deserialize(io) | |
new(call: call) | |
end | |
end | |
class ChannelAdminLogEventActionStopPoll < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0x8F079643 | |
property message : Root::IMessage | |
def initialize(@message : Root::IMessage) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@message.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
message = Root::Message.tl_deserialize(io) | |
new(message: message) | |
end | |
end | |
class ChannelAdminLogEventActionToggleGroupCallSetting < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0x56D6A247 | |
property join_muted : Bool | |
def initialize(@join_muted : Bool) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@join_muted.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
join_muted = Bool.tl_deserialize(io) | |
new(join_muted: join_muted) | |
end | |
end | |
class ChannelAdminLogEventActionToggleInvites < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0x1B7907AE | |
property new_value : Bool | |
def initialize(@new_value : Bool) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@new_value.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new_value = Bool.tl_deserialize(io) | |
new(new_value: new_value) | |
end | |
end | |
class ChannelAdminLogEventActionTogglePreHistoryHidden < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0x5F5C95F1 | |
property new_value : Bool | |
def initialize(@new_value : Bool) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@new_value.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new_value = Bool.tl_deserialize(io) | |
new(new_value: new_value) | |
end | |
end | |
class ChannelAdminLogEventActionToggleSignatures < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0x26AE0971 | |
property new_value : Bool | |
def initialize(@new_value : Bool) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@new_value.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new_value = Bool.tl_deserialize(io) | |
new(new_value: new_value) | |
end | |
end | |
class ChannelAdminLogEventActionToggleSlowMode < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0x53909779 | |
property prev_value : Int32 | |
property new_value : Int32 | |
def initialize(@prev_value : Int32, @new_value : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@prev_value.tl_serialize(io) | |
@new_value.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
prev_value = Int32.tl_deserialize(io) | |
new_value = Int32.tl_deserialize(io) | |
new(prev_value: prev_value, new_value: new_value) | |
end | |
end | |
class ChannelAdminLogEventActionUpdatePinned < IChannelAdminLogEventAction | |
CONSTRUCTOR_ID = 0xE9E82C18 | |
property message : Root::IMessage | |
def initialize(@message : Root::IMessage) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@message.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
message = Root::Message.tl_deserialize(io) | |
new(message: message) | |
end | |
end | |
class ChannelAdminLogEventsFilter < IChannelAdminLogEventsFilter | |
CONSTRUCTOR_ID = 0xEA107AE4 | |
property join : Bool | |
property leave : Bool | |
property invite : Bool | |
property ban : Bool | |
property unban : Bool | |
property kick : Bool | |
property unkick : Bool | |
property promote : Bool | |
property demote : Bool | |
property info : Bool | |
property settings : Bool | |
property pinned : Bool | |
property edit : Bool | |
property delete : Bool | |
property group_call : Bool | |
def initialize(@join : Bool = nil, @leave : Bool = nil, @invite : Bool = nil, @ban : Bool = nil, @unban : Bool = nil, @kick : Bool = nil, @unkick : Bool = nil, @promote : Bool = nil, @demote : Bool = nil, @info : Bool = nil, @settings : Bool = nil, @pinned : Bool = nil, @edit : Bool = nil, @delete : Bool = nil, @group_call : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @join ? 1 : 0 | @leave ? 2 : 0 | @invite ? 4 : 0 | @ban ? 8 : 0 | @unban ? 16 : 0 | @kick ? 32 : 0 | @unkick ? 64 : 0 | @promote ? 128 : 0 | @demote ? 256 : 0 | @info ? 512 : 0 | @settings ? 1024 : 0 | @pinned ? 2048 : 0 | @edit ? 4096 : 0 | @delete ? 8192 : 0 | @group_call ? 16384 : 0).tl_serialize(io) | |
if join = @join | |
join.tl_serialize(io) | |
end | |
if leave = @leave | |
leave.tl_serialize(io) | |
end | |
if invite = @invite | |
invite.tl_serialize(io) | |
end | |
if ban = @ban | |
ban.tl_serialize(io) | |
end | |
if unban = @unban | |
unban.tl_serialize(io) | |
end | |
if kick = @kick | |
kick.tl_serialize(io) | |
end | |
if unkick = @unkick | |
unkick.tl_serialize(io) | |
end | |
if promote = @promote | |
promote.tl_serialize(io) | |
end | |
if demote = @demote | |
demote.tl_serialize(io) | |
end | |
if info = @info | |
info.tl_serialize(io) | |
end | |
if settings = @settings | |
settings.tl_serialize(io) | |
end | |
if pinned = @pinned | |
pinned.tl_serialize(io) | |
end | |
if edit = @edit | |
edit.tl_serialize(io) | |
end | |
if delete = @delete | |
delete.tl_serialize(io) | |
end | |
if group_call = @group_call | |
group_call.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
join = (flags & 1) != 0 | |
leave = (flags & 2) != 0 | |
invite = (flags & 4) != 0 | |
ban = (flags & 8) != 0 | |
unban = (flags & 16) != 0 | |
kick = (flags & 32) != 0 | |
unkick = (flags & 64) != 0 | |
promote = (flags & 128) != 0 | |
demote = (flags & 256) != 0 | |
info = (flags & 512) != 0 | |
settings = (flags & 1024) != 0 | |
pinned = (flags & 2048) != 0 | |
edit = (flags & 4096) != 0 | |
delete = (flags & 8192) != 0 | |
group_call = (flags & 16384) != 0 | |
new(join: join, leave: leave, invite: invite, ban: ban, unban: unban, kick: kick, unkick: unkick, promote: promote, demote: demote, info: info, settings: settings, pinned: pinned, edit: edit, delete: delete, group_call: group_call) | |
end | |
end | |
class ChannelForbidden < IChat | |
CONSTRUCTOR_ID = 0x289DA732 | |
property id : Int32 | |
property access_hash : Int64 | |
property title : String | |
property broadcast : Bool | |
property megagroup : Bool | |
property until_date : Int32? | |
def initialize(@id : Int32, @access_hash : Int64, @title : String, @broadcast : Bool = nil, @megagroup : Bool = nil, @until_date : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @broadcast ? 32 : 0 | @megagroup ? 256 : 0 | @until_date ? 65536 : 0).tl_serialize(io) | |
if broadcast = @broadcast | |
broadcast.tl_serialize(io) | |
end | |
if megagroup = @megagroup | |
megagroup.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@title.tl_serialize(io) | |
if until_date = @until_date | |
until_date.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
broadcast = (flags & 32) != 0 | |
megagroup = (flags & 256) != 0 | |
id = Int32.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
title = String.tl_deserialize(io) | |
until_date = (flags & 65536) != 0 ? Int32.tl_deserialize(io) : nil | |
new(broadcast: broadcast, megagroup: megagroup, id: id, access_hash: access_hash, title: title, until_date: until_date) | |
end | |
end | |
class ChannelFull < IChatFull | |
CONSTRUCTOR_ID = 0xEF3A6ACD | |
property pts : Int32 | |
property bot_info : Array(Root::IBotInfo) | |
property exported_invite : Root::IExportedChatInvite | |
property notify_settings : Root::IPeerNotifySettings | |
property chat_photo : Root::IPhoto | |
property unread_count : Int32 | |
property read_outbox_max_id : Int32 | |
property read_inbox_max_id : Int32 | |
property about : String | |
property id : Int32 | |
property can_view_participants : Bool | |
property stats_dc : Int32? | |
property slowmode_next_send_date : Int32? | |
property slowmode_seconds : Int32? | |
property location : Root::IChannelLocation? | |
property linked_chat_id : Int32? | |
property folder_id : Int32? | |
property available_min_id : Int32? | |
property stickerset : Root::IStickerSet? | |
property pinned_msg_id : Int32? | |
property migrated_from_max_id : Int32? | |
property migrated_from_chat_id : Int32? | |
property can_set_username : Bool | |
property can_set_stickers : Bool | |
property hidden_prehistory : Bool | |
property can_set_location : Bool | |
property has_scheduled : Bool | |
property can_view_stats : Bool | |
property blocked : Bool | |
property online_count : Int32? | |
property banned_count : Int32? | |
property kicked_count : Int32? | |
property admins_count : Int32? | |
property participants_count : Int32? | |
property call : Root::IInputGroupCall? | |
def initialize(@pts : Int32, @bot_info : Array(Root::IBotInfo), @exported_invite : Root::IExportedChatInvite, @notify_settings : Root::IPeerNotifySettings, @chat_photo : Root::IPhoto, @unread_count : Int32, @read_outbox_max_id : Int32, @read_inbox_max_id : Int32, @about : String, @id : Int32, @can_view_participants : Bool = nil, @stats_dc : Int32? = nil, @slowmode_next_send_date : Int32? = nil, @slowmode_seconds : Int32? = nil, @location : Root::IChannelLocation? = nil, @linked_chat_id : Int32? = nil, @folder_id : Int32? = nil, @available_min_id : Int32? = nil, @stickerset : Root::IStickerSet? = nil, @pinned_msg_id : Int32? = nil, @migrated_from_max_id : Int32? = nil, @migrated_from_chat_id : Int32? = nil, @can_set_username : Bool = nil, @can_set_stickers : Bool = nil, @hidden_prehistory : Bool = nil, @can_set_location : Bool = nil, @has_scheduled : Bool = nil, @can_view_stats : Bool = nil, @blocked : Bool = nil, @online_count : Int32? = nil, @banned_count : Int32? = nil, @kicked_count : Int32? = nil, @admins_count : Int32? = nil, @participants_count : Int32? = nil, @call : Root::IInputGroupCall? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @can_view_participants ? 8 : 0 | @can_set_username ? 64 : 0 | @can_set_stickers ? 128 : 0 | @hidden_prehistory ? 1024 : 0 | @can_set_location ? 65536 : 0 | @has_scheduled ? 524288 : 0 | @can_view_stats ? 1048576 : 0 | @blocked ? 4194304 : 0 | @participants_count ? 1 : 0 | @admins_count ? 2 : 0 | @kicked_count ? 4 : 0 | @banned_count ? 4 : 0 | @online_count ? 8192 : 0 | @migrated_from_chat_id ? 16 : 0 | @migrated_from_max_id ? 16 : 0 | @pinned_msg_id ? 32 : 0 | @stickerset ? 256 : 0 | @available_min_id ? 512 : 0 | @folder_id ? 2048 : 0 | @linked_chat_id ? 16384 : 0 | @location ? 32768 : 0 | @slowmode_seconds ? 131072 : 0 | @slowmode_next_send_date ? 262144 : 0 | @stats_dc ? 4096 : 0 | @call ? 2097152 : 0).tl_serialize(io) | |
if can_view_participants = @can_view_participants | |
can_view_participants.tl_serialize(io) | |
end | |
if can_set_username = @can_set_username | |
can_set_username.tl_serialize(io) | |
end | |
if can_set_stickers = @can_set_stickers | |
can_set_stickers.tl_serialize(io) | |
end | |
if hidden_prehistory = @hidden_prehistory | |
hidden_prehistory.tl_serialize(io) | |
end | |
if can_set_location = @can_set_location | |
can_set_location.tl_serialize(io) | |
end | |
if has_scheduled = @has_scheduled | |
has_scheduled.tl_serialize(io) | |
end | |
if can_view_stats = @can_view_stats | |
can_view_stats.tl_serialize(io) | |
end | |
if blocked = @blocked | |
blocked.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@about.tl_serialize(io) | |
if participants_count = @participants_count | |
participants_count.tl_serialize(io) | |
end | |
if admins_count = @admins_count | |
admins_count.tl_serialize(io) | |
end | |
if kicked_count = @kicked_count | |
kicked_count.tl_serialize(io) | |
end | |
if banned_count = @banned_count | |
banned_count.tl_serialize(io) | |
end | |
if online_count = @online_count | |
online_count.tl_serialize(io) | |
end | |
@read_inbox_max_id.tl_serialize(io) | |
@read_outbox_max_id.tl_serialize(io) | |
@unread_count.tl_serialize(io) | |
@chat_photo.tl_serialize(io) | |
@notify_settings.tl_serialize(io) | |
@exported_invite.tl_serialize(io) | |
@bot_info.tl_serialize(io) | |
if migrated_from_chat_id = @migrated_from_chat_id | |
migrated_from_chat_id.tl_serialize(io) | |
end | |
if migrated_from_max_id = @migrated_from_max_id | |
migrated_from_max_id.tl_serialize(io) | |
end | |
if pinned_msg_id = @pinned_msg_id | |
pinned_msg_id.tl_serialize(io) | |
end | |
if stickerset = @stickerset | |
stickerset.tl_serialize(io) | |
end | |
if available_min_id = @available_min_id | |
available_min_id.tl_serialize(io) | |
end | |
if folder_id = @folder_id | |
folder_id.tl_serialize(io) | |
end | |
if linked_chat_id = @linked_chat_id | |
linked_chat_id.tl_serialize(io) | |
end | |
if location = @location | |
location.tl_serialize(io) | |
end | |
if slowmode_seconds = @slowmode_seconds | |
slowmode_seconds.tl_serialize(io) | |
end | |
if slowmode_next_send_date = @slowmode_next_send_date | |
slowmode_next_send_date.tl_serialize(io) | |
end | |
if stats_dc = @stats_dc | |
stats_dc.tl_serialize(io) | |
end | |
@pts.tl_serialize(io) | |
if call = @call | |
call.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
can_view_participants = (flags & 8) != 0 | |
can_set_username = (flags & 64) != 0 | |
can_set_stickers = (flags & 128) != 0 | |
hidden_prehistory = (flags & 1024) != 0 | |
can_set_location = (flags & 65536) != 0 | |
has_scheduled = (flags & 524288) != 0 | |
can_view_stats = (flags & 1048576) != 0 | |
blocked = (flags & 4194304) != 0 | |
id = Int32.tl_deserialize(io) | |
about = String.tl_deserialize(io) | |
participants_count = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
admins_count = (flags & 2) != 0 ? Int32.tl_deserialize(io) : nil | |
kicked_count = (flags & 4) != 0 ? Int32.tl_deserialize(io) : nil | |
banned_count = (flags & 4) != 0 ? Int32.tl_deserialize(io) : nil | |
online_count = (flags & 8192) != 0 ? Int32.tl_deserialize(io) : nil | |
read_inbox_max_id = Int32.tl_deserialize(io) | |
read_outbox_max_id = Int32.tl_deserialize(io) | |
unread_count = Int32.tl_deserialize(io) | |
chat_photo = Root::Photo.tl_deserialize(io) | |
notify_settings = Root::PeerNotifySettings.tl_deserialize(io) | |
exported_invite = Root::ExportedChatInvite.tl_deserialize(io) | |
bot_info = Array(Root::BotInfo).tl_deserialize(io) | |
migrated_from_chat_id = (flags & 16) != 0 ? Int32.tl_deserialize(io) : nil | |
migrated_from_max_id = (flags & 16) != 0 ? Int32.tl_deserialize(io) : nil | |
pinned_msg_id = (flags & 32) != 0 ? Int32.tl_deserialize(io) : nil | |
stickerset = (flags & 256) != 0 ? Root::StickerSet.tl_deserialize(io) : nil | |
available_min_id = (flags & 512) != 0 ? Int32.tl_deserialize(io) : nil | |
folder_id = (flags & 2048) != 0 ? Int32.tl_deserialize(io) : nil | |
linked_chat_id = (flags & 16384) != 0 ? Int32.tl_deserialize(io) : nil | |
location = (flags & 32768) != 0 ? Root::ChannelLocation.tl_deserialize(io) : nil | |
slowmode_seconds = (flags & 131072) != 0 ? Int32.tl_deserialize(io) : nil | |
slowmode_next_send_date = (flags & 262144) != 0 ? Int32.tl_deserialize(io) : nil | |
stats_dc = (flags & 4096) != 0 ? Int32.tl_deserialize(io) : nil | |
pts = Int32.tl_deserialize(io) | |
call = (flags & 2097152) != 0 ? Root::InputGroupCall.tl_deserialize(io) : nil | |
new(can_view_participants: can_view_participants, can_set_username: can_set_username, can_set_stickers: can_set_stickers, hidden_prehistory: hidden_prehistory, can_set_location: can_set_location, has_scheduled: has_scheduled, can_view_stats: can_view_stats, blocked: blocked, id: id, about: about, participants_count: participants_count, admins_count: admins_count, kicked_count: kicked_count, banned_count: banned_count, online_count: online_count, read_inbox_max_id: read_inbox_max_id, read_outbox_max_id: read_outbox_max_id, unread_count: unread_count, chat_photo: chat_photo, notify_settings: notify_settings, exported_invite: exported_invite, bot_info: bot_info, migrated_from_chat_id: migrated_from_chat_id, migrated_from_max_id: migrated_from_max_id, pinned_msg_id: pinned_msg_id, stickerset: stickerset, available_min_id: available_min_id, folder_id: folder_id, linked_chat_id: linked_chat_id, location: location, slowmode_seconds: slowmode_seconds, slowmode_next_send_date: slowmode_next_send_date, stats_dc: stats_dc, pts: pts, call: call) | |
end | |
end | |
class ChannelLocation < IChannelLocation | |
CONSTRUCTOR_ID = 0x209B82DB | |
property geo_point : Root::IGeoPoint | |
property address : String | |
def initialize(@geo_point : Root::IGeoPoint, @address : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@geo_point.tl_serialize(io) | |
@address.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
geo_point = Root::GeoPoint.tl_deserialize(io) | |
address = String.tl_deserialize(io) | |
new(geo_point: geo_point, address: address) | |
end | |
end | |
class ChannelLocationEmpty < IChannelLocation | |
CONSTRUCTOR_ID = 0xBFB5AD8B | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class ChannelMessagesFilter < IChannelMessagesFilter | |
CONSTRUCTOR_ID = 0xCD77D957 | |
property ranges : Array(Root::IMessageRange) | |
property exclude_new_messages : Bool | |
def initialize(@ranges : Array(Root::IMessageRange), @exclude_new_messages : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @exclude_new_messages ? 2 : 0).tl_serialize(io) | |
if exclude_new_messages = @exclude_new_messages | |
exclude_new_messages.tl_serialize(io) | |
end | |
@ranges.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
exclude_new_messages = (flags & 2) != 0 | |
ranges = Array(Root::MessageRange).tl_deserialize(io) | |
new(exclude_new_messages: exclude_new_messages, ranges: ranges) | |
end | |
end | |
class ChannelMessagesFilterEmpty < IChannelMessagesFilter | |
CONSTRUCTOR_ID = 0x94D42EE7 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class ChannelParticipant < IChannelParticipant | |
CONSTRUCTOR_ID = 0x15EBAC1D | |
property user_id : Int32 | |
property date : Int32 | |
def initialize(@user_id : Int32, @date : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
@date.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
new(user_id: user_id, date: date) | |
end | |
end | |
class ChannelParticipantAdmin < IChannelParticipant | |
CONSTRUCTOR_ID = 0xCCBEBBAF | |
property user_id : Int32 | |
property promoted_by : Int32 | |
property date : Int32 | |
property admin_rights : Root::IChatAdminRights | |
property can_edit : Bool | |
property is_self : Bool | |
property inviter_id : Int32? | |
property rank : String? | |
def initialize(@user_id : Int32, @promoted_by : Int32, @date : Int32, @admin_rights : Root::IChatAdminRights, @can_edit : Bool = nil, @is_self : Bool = nil, @inviter_id : Int32? = nil, @rank : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @can_edit ? 1 : 0 | @is_self ? 2 : 0 | @inviter_id ? 2 : 0 | @rank ? 4 : 0).tl_serialize(io) | |
if can_edit = @can_edit | |
can_edit.tl_serialize(io) | |
end | |
if is_self = @is_self | |
is_self.tl_serialize(io) | |
end | |
@user_id.tl_serialize(io) | |
if inviter_id = @inviter_id | |
inviter_id.tl_serialize(io) | |
end | |
@promoted_by.tl_serialize(io) | |
@date.tl_serialize(io) | |
@admin_rights.tl_serialize(io) | |
if rank = @rank | |
rank.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
can_edit = (flags & 1) != 0 | |
is_self = (flags & 2) != 0 | |
user_id = Int32.tl_deserialize(io) | |
inviter_id = (flags & 2) != 0 ? Int32.tl_deserialize(io) : nil | |
promoted_by = Int32.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
admin_rights = Root::ChatAdminRights.tl_deserialize(io) | |
rank = (flags & 4) != 0 ? String.tl_deserialize(io) : nil | |
new(can_edit: can_edit, is_self: is_self, user_id: user_id, inviter_id: inviter_id, promoted_by: promoted_by, date: date, admin_rights: admin_rights, rank: rank) | |
end | |
end | |
class ChannelParticipantBanned < IChannelParticipant | |
CONSTRUCTOR_ID = 0x1C0FACAF | |
property user_id : Int32 | |
property kicked_by : Int32 | |
property date : Int32 | |
property banned_rights : Root::IChatBannedRights | |
property left : Bool | |
def initialize(@user_id : Int32, @kicked_by : Int32, @date : Int32, @banned_rights : Root::IChatBannedRights, @left : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @left ? 1 : 0).tl_serialize(io) | |
if left = @left | |
left.tl_serialize(io) | |
end | |
@user_id.tl_serialize(io) | |
@kicked_by.tl_serialize(io) | |
@date.tl_serialize(io) | |
@banned_rights.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
left = (flags & 1) != 0 | |
user_id = Int32.tl_deserialize(io) | |
kicked_by = Int32.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
banned_rights = Root::ChatBannedRights.tl_deserialize(io) | |
new(left: left, user_id: user_id, kicked_by: kicked_by, date: date, banned_rights: banned_rights) | |
end | |
end | |
class ChannelParticipantCreator < IChannelParticipant | |
CONSTRUCTOR_ID = 0x447DCA4B | |
property user_id : Int32 | |
property admin_rights : Root::IChatAdminRights | |
property rank : String? | |
def initialize(@user_id : Int32, @admin_rights : Root::IChatAdminRights, @rank : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @rank ? 1 : 0).tl_serialize(io) | |
@user_id.tl_serialize(io) | |
@admin_rights.tl_serialize(io) | |
if rank = @rank | |
rank.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
user_id = Int32.tl_deserialize(io) | |
admin_rights = Root::ChatAdminRights.tl_deserialize(io) | |
rank = (flags & 1) != 0 ? String.tl_deserialize(io) : nil | |
new(user_id: user_id, admin_rights: admin_rights, rank: rank) | |
end | |
end | |
class ChannelParticipantLeft < IChannelParticipant | |
CONSTRUCTOR_ID = 0xC3C6796B | |
property user_id : Int32 | |
def initialize(@user_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
new(user_id: user_id) | |
end | |
end | |
class ChannelParticipantSelf < IChannelParticipant | |
CONSTRUCTOR_ID = 0xA3289A6D | |
property user_id : Int32 | |
property inviter_id : Int32 | |
property date : Int32 | |
def initialize(@user_id : Int32, @inviter_id : Int32, @date : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
@inviter_id.tl_serialize(io) | |
@date.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
inviter_id = Int32.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
new(user_id: user_id, inviter_id: inviter_id, date: date) | |
end | |
end | |
class ChannelParticipantsAdmins < IChannelParticipantsFilter | |
CONSTRUCTOR_ID = 0xB4608969 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class ChannelParticipantsBanned < IChannelParticipantsFilter | |
CONSTRUCTOR_ID = 0x1427A5E1 | |
property q : String | |
def initialize(@q : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@q.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
q = String.tl_deserialize(io) | |
new(q: q) | |
end | |
end | |
class ChannelParticipantsBots < IChannelParticipantsFilter | |
CONSTRUCTOR_ID = 0xB0D1865B | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class ChannelParticipantsContacts < IChannelParticipantsFilter | |
CONSTRUCTOR_ID = 0xBB6AE88D | |
property q : String | |
def initialize(@q : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@q.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
q = String.tl_deserialize(io) | |
new(q: q) | |
end | |
end | |
class ChannelParticipantsKicked < IChannelParticipantsFilter | |
CONSTRUCTOR_ID = 0xA3B54985 | |
property q : String | |
def initialize(@q : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@q.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
q = String.tl_deserialize(io) | |
new(q: q) | |
end | |
end | |
class ChannelParticipantsMentions < IChannelParticipantsFilter | |
CONSTRUCTOR_ID = 0xE04B5CEB | |
property q : String? | |
property top_msg_id : Int32? | |
def initialize(@q : String? = nil, @top_msg_id : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @q ? 1 : 0 | @top_msg_id ? 2 : 0).tl_serialize(io) | |
if q = @q | |
q.tl_serialize(io) | |
end | |
if top_msg_id = @top_msg_id | |
top_msg_id.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
q = (flags & 1) != 0 ? String.tl_deserialize(io) : nil | |
top_msg_id = (flags & 2) != 0 ? Int32.tl_deserialize(io) : nil | |
new(q: q, top_msg_id: top_msg_id) | |
end | |
end | |
class ChannelParticipantsRecent < IChannelParticipantsFilter | |
CONSTRUCTOR_ID = 0xDE3F3C79 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class ChannelParticipantsSearch < IChannelParticipantsFilter | |
CONSTRUCTOR_ID = 0x0656AC4B | |
property q : String | |
def initialize(@q : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@q.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
q = String.tl_deserialize(io) | |
new(q: q) | |
end | |
end | |
class Chat < IChat | |
CONSTRUCTOR_ID = 0x3BDA1BDE | |
property id : Int32 | |
property title : String | |
property photo : Root::IChatPhoto | |
property participants_count : Int32 | |
property date : Int32 | |
property version : Int32 | |
property creator : Bool | |
property kicked : Bool | |
property left : Bool | |
property deactivated : Bool | |
property call_active : Bool | |
property call_not_empty : Bool | |
property migrated_to : Root::IInputChannel? | |
property admin_rights : Root::IChatAdminRights? | |
property default_banned_rights : Root::IChatBannedRights? | |
def initialize(@id : Int32, @title : String, @photo : Root::IChatPhoto, @participants_count : Int32, @date : Int32, @version : Int32, @creator : Bool = nil, @kicked : Bool = nil, @left : Bool = nil, @deactivated : Bool = nil, @call_active : Bool = nil, @call_not_empty : Bool = nil, @migrated_to : Root::IInputChannel? = nil, @admin_rights : Root::IChatAdminRights? = nil, @default_banned_rights : Root::IChatBannedRights? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @creator ? 1 : 0 | @kicked ? 2 : 0 | @left ? 4 : 0 | @deactivated ? 32 : 0 | @call_active ? 8388608 : 0 | @call_not_empty ? 16777216 : 0 | @migrated_to ? 64 : 0 | @admin_rights ? 16384 : 0 | @default_banned_rights ? 262144 : 0).tl_serialize(io) | |
if creator = @creator | |
creator.tl_serialize(io) | |
end | |
if kicked = @kicked | |
kicked.tl_serialize(io) | |
end | |
if left = @left | |
left.tl_serialize(io) | |
end | |
if deactivated = @deactivated | |
deactivated.tl_serialize(io) | |
end | |
if call_active = @call_active | |
call_active.tl_serialize(io) | |
end | |
if call_not_empty = @call_not_empty | |
call_not_empty.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@title.tl_serialize(io) | |
@photo.tl_serialize(io) | |
@participants_count.tl_serialize(io) | |
@date.tl_serialize(io) | |
@version.tl_serialize(io) | |
if migrated_to = @migrated_to | |
migrated_to.tl_serialize(io) | |
end | |
if admin_rights = @admin_rights | |
admin_rights.tl_serialize(io) | |
end | |
if default_banned_rights = @default_banned_rights | |
default_banned_rights.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
creator = (flags & 1) != 0 | |
kicked = (flags & 2) != 0 | |
left = (flags & 4) != 0 | |
deactivated = (flags & 32) != 0 | |
call_active = (flags & 8388608) != 0 | |
call_not_empty = (flags & 16777216) != 0 | |
id = Int32.tl_deserialize(io) | |
title = String.tl_deserialize(io) | |
photo = Root::ChatPhoto.tl_deserialize(io) | |
participants_count = Int32.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
version = Int32.tl_deserialize(io) | |
migrated_to = (flags & 64) != 0 ? Root::InputChannel.tl_deserialize(io) : nil | |
admin_rights = (flags & 16384) != 0 ? Root::ChatAdminRights.tl_deserialize(io) : nil | |
default_banned_rights = (flags & 262144) != 0 ? Root::ChatBannedRights.tl_deserialize(io) : nil | |
new(creator: creator, kicked: kicked, left: left, deactivated: deactivated, call_active: call_active, call_not_empty: call_not_empty, id: id, title: title, photo: photo, participants_count: participants_count, date: date, version: version, migrated_to: migrated_to, admin_rights: admin_rights, default_banned_rights: default_banned_rights) | |
end | |
end | |
class ChatAdminRights < IChatAdminRights | |
CONSTRUCTOR_ID = 0x5FB224D5 | |
property change_info : Bool | |
property post_messages : Bool | |
property edit_messages : Bool | |
property delete_messages : Bool | |
property ban_users : Bool | |
property invite_users : Bool | |
property pin_messages : Bool | |
property add_admins : Bool | |
property anonymous : Bool | |
property manage_call : Bool | |
def initialize(@change_info : Bool = nil, @post_messages : Bool = nil, @edit_messages : Bool = nil, @delete_messages : Bool = nil, @ban_users : Bool = nil, @invite_users : Bool = nil, @pin_messages : Bool = nil, @add_admins : Bool = nil, @anonymous : Bool = nil, @manage_call : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @change_info ? 1 : 0 | @post_messages ? 2 : 0 | @edit_messages ? 4 : 0 | @delete_messages ? 8 : 0 | @ban_users ? 16 : 0 | @invite_users ? 32 : 0 | @pin_messages ? 128 : 0 | @add_admins ? 512 : 0 | @anonymous ? 1024 : 0 | @manage_call ? 2048 : 0).tl_serialize(io) | |
if change_info = @change_info | |
change_info.tl_serialize(io) | |
end | |
if post_messages = @post_messages | |
post_messages.tl_serialize(io) | |
end | |
if edit_messages = @edit_messages | |
edit_messages.tl_serialize(io) | |
end | |
if delete_messages = @delete_messages | |
delete_messages.tl_serialize(io) | |
end | |
if ban_users = @ban_users | |
ban_users.tl_serialize(io) | |
end | |
if invite_users = @invite_users | |
invite_users.tl_serialize(io) | |
end | |
if pin_messages = @pin_messages | |
pin_messages.tl_serialize(io) | |
end | |
if add_admins = @add_admins | |
add_admins.tl_serialize(io) | |
end | |
if anonymous = @anonymous | |
anonymous.tl_serialize(io) | |
end | |
if manage_call = @manage_call | |
manage_call.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
change_info = (flags & 1) != 0 | |
post_messages = (flags & 2) != 0 | |
edit_messages = (flags & 4) != 0 | |
delete_messages = (flags & 8) != 0 | |
ban_users = (flags & 16) != 0 | |
invite_users = (flags & 32) != 0 | |
pin_messages = (flags & 128) != 0 | |
add_admins = (flags & 512) != 0 | |
anonymous = (flags & 1024) != 0 | |
manage_call = (flags & 2048) != 0 | |
new(change_info: change_info, post_messages: post_messages, edit_messages: edit_messages, delete_messages: delete_messages, ban_users: ban_users, invite_users: invite_users, pin_messages: pin_messages, add_admins: add_admins, anonymous: anonymous, manage_call: manage_call) | |
end | |
end | |
class ChatBannedRights < IChatBannedRights | |
CONSTRUCTOR_ID = 0x9F120418 | |
property until_date : Int32 | |
property view_messages : Bool | |
property send_messages : Bool | |
property send_media : Bool | |
property send_stickers : Bool | |
property send_gifs : Bool | |
property send_games : Bool | |
property send_inline : Bool | |
property embed_links : Bool | |
property send_polls : Bool | |
property change_info : Bool | |
property invite_users : Bool | |
property pin_messages : Bool | |
def initialize(@until_date : Int32, @view_messages : Bool = nil, @send_messages : Bool = nil, @send_media : Bool = nil, @send_stickers : Bool = nil, @send_gifs : Bool = nil, @send_games : Bool = nil, @send_inline : Bool = nil, @embed_links : Bool = nil, @send_polls : Bool = nil, @change_info : Bool = nil, @invite_users : Bool = nil, @pin_messages : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @view_messages ? 1 : 0 | @send_messages ? 2 : 0 | @send_media ? 4 : 0 | @send_stickers ? 8 : 0 | @send_gifs ? 16 : 0 | @send_games ? 32 : 0 | @send_inline ? 64 : 0 | @embed_links ? 128 : 0 | @send_polls ? 256 : 0 | @change_info ? 1024 : 0 | @invite_users ? 32768 : 0 | @pin_messages ? 131072 : 0).tl_serialize(io) | |
if view_messages = @view_messages | |
view_messages.tl_serialize(io) | |
end | |
if send_messages = @send_messages | |
send_messages.tl_serialize(io) | |
end | |
if send_media = @send_media | |
send_media.tl_serialize(io) | |
end | |
if send_stickers = @send_stickers | |
send_stickers.tl_serialize(io) | |
end | |
if send_gifs = @send_gifs | |
send_gifs.tl_serialize(io) | |
end | |
if send_games = @send_games | |
send_games.tl_serialize(io) | |
end | |
if send_inline = @send_inline | |
send_inline.tl_serialize(io) | |
end | |
if embed_links = @embed_links | |
embed_links.tl_serialize(io) | |
end | |
if send_polls = @send_polls | |
send_polls.tl_serialize(io) | |
end | |
if change_info = @change_info | |
change_info.tl_serialize(io) | |
end | |
if invite_users = @invite_users | |
invite_users.tl_serialize(io) | |
end | |
if pin_messages = @pin_messages | |
pin_messages.tl_serialize(io) | |
end | |
@until_date.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
view_messages = (flags & 1) != 0 | |
send_messages = (flags & 2) != 0 | |
send_media = (flags & 4) != 0 | |
send_stickers = (flags & 8) != 0 | |
send_gifs = (flags & 16) != 0 | |
send_games = (flags & 32) != 0 | |
send_inline = (flags & 64) != 0 | |
embed_links = (flags & 128) != 0 | |
send_polls = (flags & 256) != 0 | |
change_info = (flags & 1024) != 0 | |
invite_users = (flags & 32768) != 0 | |
pin_messages = (flags & 131072) != 0 | |
until_date = Int32.tl_deserialize(io) | |
new(view_messages: view_messages, send_messages: send_messages, send_media: send_media, send_stickers: send_stickers, send_gifs: send_gifs, send_games: send_games, send_inline: send_inline, embed_links: embed_links, send_polls: send_polls, change_info: change_info, invite_users: invite_users, pin_messages: pin_messages, until_date: until_date) | |
end | |
end | |
class ChatEmpty < IChat | |
CONSTRUCTOR_ID = 0x9BA2D800 | |
property id : Int32 | |
def initialize(@id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int32.tl_deserialize(io) | |
new(id: id) | |
end | |
end | |
class ChatForbidden < IChat | |
CONSTRUCTOR_ID = 0x07328BDB | |
property id : Int32 | |
property title : String | |
def initialize(@id : Int32, @title : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@title.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int32.tl_deserialize(io) | |
title = String.tl_deserialize(io) | |
new(id: id, title: title) | |
end | |
end | |
class ChatFull < IChatFull | |
CONSTRUCTOR_ID = 0x0DC8C181 | |
property id : Int32 | |
property about : String | |
property participants : Root::IChatParticipants | |
property notify_settings : Root::IPeerNotifySettings | |
property exported_invite : Root::IExportedChatInvite | |
property can_set_username : Bool | |
property has_scheduled : Bool | |
property chat_photo : Root::IPhoto? | |
property bot_info : Array(Root::IBotInfo)? | |
property pinned_msg_id : Int32? | |
property folder_id : Int32? | |
property call : Root::IInputGroupCall? | |
def initialize(@id : Int32, @about : String, @participants : Root::IChatParticipants, @notify_settings : Root::IPeerNotifySettings, @exported_invite : Root::IExportedChatInvite, @can_set_username : Bool = nil, @has_scheduled : Bool = nil, @chat_photo : Root::IPhoto? = nil, @bot_info : Array(Root::IBotInfo)? = nil, @pinned_msg_id : Int32? = nil, @folder_id : Int32? = nil, @call : Root::IInputGroupCall? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @can_set_username ? 128 : 0 | @has_scheduled ? 256 : 0 | @chat_photo ? 4 : 0 | @bot_info ? 8 : 0 | @pinned_msg_id ? 64 : 0 | @folder_id ? 2048 : 0 | @call ? 4096 : 0).tl_serialize(io) | |
if can_set_username = @can_set_username | |
can_set_username.tl_serialize(io) | |
end | |
if has_scheduled = @has_scheduled | |
has_scheduled.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@about.tl_serialize(io) | |
@participants.tl_serialize(io) | |
if chat_photo = @chat_photo | |
chat_photo.tl_serialize(io) | |
end | |
@notify_settings.tl_serialize(io) | |
@exported_invite.tl_serialize(io) | |
if bot_info = @bot_info | |
bot_info.tl_serialize(io) | |
end | |
if pinned_msg_id = @pinned_msg_id | |
pinned_msg_id.tl_serialize(io) | |
end | |
if folder_id = @folder_id | |
folder_id.tl_serialize(io) | |
end | |
if call = @call | |
call.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
can_set_username = (flags & 128) != 0 | |
has_scheduled = (flags & 256) != 0 | |
id = Int32.tl_deserialize(io) | |
about = String.tl_deserialize(io) | |
participants = Root::ChatParticipants.tl_deserialize(io) | |
chat_photo = (flags & 4) != 0 ? Root::Photo.tl_deserialize(io) : nil | |
notify_settings = Root::PeerNotifySettings.tl_deserialize(io) | |
exported_invite = Root::ExportedChatInvite.tl_deserialize(io) | |
bot_info = (flags & 8) != 0 ? Array(Root::BotInfo).tl_deserialize(io) : nil | |
pinned_msg_id = (flags & 64) != 0 ? Int32.tl_deserialize(io) : nil | |
folder_id = (flags & 2048) != 0 ? Int32.tl_deserialize(io) : nil | |
call = (flags & 4096) != 0 ? Root::InputGroupCall.tl_deserialize(io) : nil | |
new(can_set_username: can_set_username, has_scheduled: has_scheduled, id: id, about: about, participants: participants, chat_photo: chat_photo, notify_settings: notify_settings, exported_invite: exported_invite, bot_info: bot_info, pinned_msg_id: pinned_msg_id, folder_id: folder_id, call: call) | |
end | |
end | |
class ChatInvite < IChatInvite | |
CONSTRUCTOR_ID = 0xDFC2F58E | |
property title : String | |
property photo : Root::IPhoto | |
property participants_count : Int32 | |
property channel : Bool | |
property broadcast : Bool | |
property public : Bool | |
property megagroup : Bool | |
property participants : Array(Root::IUser)? | |
def initialize(@title : String, @photo : Root::IPhoto, @participants_count : Int32, @channel : Bool = nil, @broadcast : Bool = nil, @public : Bool = nil, @megagroup : Bool = nil, @participants : Array(Root::IUser)? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @channel ? 1 : 0 | @broadcast ? 2 : 0 | @public ? 4 : 0 | @megagroup ? 8 : 0 | @participants ? 16 : 0).tl_serialize(io) | |
if channel = @channel | |
channel.tl_serialize(io) | |
end | |
if broadcast = @broadcast | |
broadcast.tl_serialize(io) | |
end | |
if public = @public | |
public.tl_serialize(io) | |
end | |
if megagroup = @megagroup | |
megagroup.tl_serialize(io) | |
end | |
@title.tl_serialize(io) | |
@photo.tl_serialize(io) | |
@participants_count.tl_serialize(io) | |
if participants = @participants | |
participants.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
channel = (flags & 1) != 0 | |
broadcast = (flags & 2) != 0 | |
public = (flags & 4) != 0 | |
megagroup = (flags & 8) != 0 | |
title = String.tl_deserialize(io) | |
photo = Root::Photo.tl_deserialize(io) | |
participants_count = Int32.tl_deserialize(io) | |
participants = (flags & 16) != 0 ? Array(Root::User).tl_deserialize(io) : nil | |
new(channel: channel, broadcast: broadcast, public: public, megagroup: megagroup, title: title, photo: photo, participants_count: participants_count, participants: participants) | |
end | |
end | |
class ChatInviteAlready < IChatInvite | |
CONSTRUCTOR_ID = 0x5A686D7C | |
property chat : Root::IChat | |
def initialize(@chat : Root::IChat) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@chat.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
chat = Root::Chat.tl_deserialize(io) | |
new(chat: chat) | |
end | |
end | |
class ChatInviteEmpty < IExportedChatInvite | |
CONSTRUCTOR_ID = 0x69DF3769 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class ChatInviteExported < IExportedChatInvite | |
CONSTRUCTOR_ID = 0xFC2E05BC | |
property link : String | |
def initialize(@link : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@link.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
link = String.tl_deserialize(io) | |
new(link: link) | |
end | |
end | |
class ChatInvitePeek < IChatInvite | |
CONSTRUCTOR_ID = 0x61695CB0 | |
property chat : Root::IChat | |
property expires : Int32 | |
def initialize(@chat : Root::IChat, @expires : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@chat.tl_serialize(io) | |
@expires.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
chat = Root::Chat.tl_deserialize(io) | |
expires = Int32.tl_deserialize(io) | |
new(chat: chat, expires: expires) | |
end | |
end | |
class ChatOnlines < IChatOnlines | |
CONSTRUCTOR_ID = 0xF041E250 | |
property onlines : Int32 | |
def initialize(@onlines : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@onlines.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
onlines = Int32.tl_deserialize(io) | |
new(onlines: onlines) | |
end | |
end | |
class ChatParticipant < IChatParticipant | |
CONSTRUCTOR_ID = 0xC8D7493E | |
property user_id : Int32 | |
property inviter_id : Int32 | |
property date : Int32 | |
def initialize(@user_id : Int32, @inviter_id : Int32, @date : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
@inviter_id.tl_serialize(io) | |
@date.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
inviter_id = Int32.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
new(user_id: user_id, inviter_id: inviter_id, date: date) | |
end | |
end | |
class ChatParticipantAdmin < IChatParticipant | |
CONSTRUCTOR_ID = 0xE2D6E436 | |
property user_id : Int32 | |
property inviter_id : Int32 | |
property date : Int32 | |
def initialize(@user_id : Int32, @inviter_id : Int32, @date : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
@inviter_id.tl_serialize(io) | |
@date.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
inviter_id = Int32.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
new(user_id: user_id, inviter_id: inviter_id, date: date) | |
end | |
end | |
class ChatParticipantCreator < IChatParticipant | |
CONSTRUCTOR_ID = 0xDA13538A | |
property user_id : Int32 | |
def initialize(@user_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
new(user_id: user_id) | |
end | |
end | |
class ChatParticipants < IChatParticipants | |
CONSTRUCTOR_ID = 0x3F460FED | |
property chat_id : Int32 | |
property participants : Array(Root::IChatParticipant) | |
property version : Int32 | |
def initialize(@chat_id : Int32, @participants : Array(Root::IChatParticipant), @version : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@chat_id.tl_serialize(io) | |
@participants.tl_serialize(io) | |
@version.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
chat_id = Int32.tl_deserialize(io) | |
participants = Array(Root::ChatParticipant).tl_deserialize(io) | |
version = Int32.tl_deserialize(io) | |
new(chat_id: chat_id, participants: participants, version: version) | |
end | |
end | |
class ChatParticipantsForbidden < IChatParticipants | |
CONSTRUCTOR_ID = 0xFC900C2B | |
property chat_id : Int32 | |
property self_participant : Root::IChatParticipant? | |
def initialize(@chat_id : Int32, @self_participant : Root::IChatParticipant? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @self_participant ? 1 : 0).tl_serialize(io) | |
@chat_id.tl_serialize(io) | |
if self_participant = @self_participant | |
self_participant.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
chat_id = Int32.tl_deserialize(io) | |
self_participant = (flags & 1) != 0 ? Root::ChatParticipant.tl_deserialize(io) : nil | |
new(chat_id: chat_id, self_participant: self_participant) | |
end | |
end | |
class ChatPhoto < IChatPhoto | |
CONSTRUCTOR_ID = 0xD20B9F3C | |
property photo_small : Root::IFileLocation | |
property photo_big : Root::IFileLocation | |
property dc_id : Int32 | |
property has_video : Bool | |
def initialize(@photo_small : Root::IFileLocation, @photo_big : Root::IFileLocation, @dc_id : Int32, @has_video : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @has_video ? 1 : 0).tl_serialize(io) | |
if has_video = @has_video | |
has_video.tl_serialize(io) | |
end | |
@photo_small.tl_serialize(io) | |
@photo_big.tl_serialize(io) | |
@dc_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
has_video = (flags & 1) != 0 | |
photo_small = Root::FileLocation.tl_deserialize(io) | |
photo_big = Root::FileLocation.tl_deserialize(io) | |
dc_id = Int32.tl_deserialize(io) | |
new(has_video: has_video, photo_small: photo_small, photo_big: photo_big, dc_id: dc_id) | |
end | |
end | |
class ChatPhotoEmpty < IChatPhoto | |
CONSTRUCTOR_ID = 0x37C1011C | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class ClientDhInnerData < IClientDhInnerData | |
CONSTRUCTOR_ID = 0x6643B654 | |
property nonce : TL::I128 | |
property server_nonce : TL::I128 | |
property retry_id : Int64 | |
property g_b : Bytes | |
def initialize(@nonce : TL::I128, @server_nonce : TL::I128, @retry_id : Int64, @g_b : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@nonce.tl_serialize(io) | |
@server_nonce.tl_serialize(io) | |
@retry_id.tl_serialize(io) | |
@g_b.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
nonce = TL::I128.tl_deserialize(io) | |
server_nonce = TL::I128.tl_deserialize(io) | |
retry_id = Int64.tl_deserialize(io) | |
g_b = Bytes.tl_deserialize(io) | |
new(nonce: nonce, server_nonce: server_nonce, retry_id: retry_id, g_b: g_b) | |
end | |
end | |
class CodeSettings < ICodeSettings | |
CONSTRUCTOR_ID = 0xDEBEBE83 | |
property allow_flashcall : Bool | |
property current_number : Bool | |
property allow_app_hash : Bool | |
def initialize(@allow_flashcall : Bool = nil, @current_number : Bool = nil, @allow_app_hash : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @allow_flashcall ? 1 : 0 | @current_number ? 2 : 0 | @allow_app_hash ? 16 : 0).tl_serialize(io) | |
if allow_flashcall = @allow_flashcall | |
allow_flashcall.tl_serialize(io) | |
end | |
if current_number = @current_number | |
current_number.tl_serialize(io) | |
end | |
if allow_app_hash = @allow_app_hash | |
allow_app_hash.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
allow_flashcall = (flags & 1) != 0 | |
current_number = (flags & 2) != 0 | |
allow_app_hash = (flags & 16) != 0 | |
new(allow_flashcall: allow_flashcall, current_number: current_number, allow_app_hash: allow_app_hash) | |
end | |
end | |
class Config < IConfig | |
CONSTRUCTOR_ID = 0x330B4067 | |
property push_chat_period_ms : Int32 | |
property push_chat_limit : Int32 | |
property saved_gifs_limit : Int32 | |
property edit_time_limit : Int32 | |
property revoke_time_limit : Int32 | |
property revoke_pm_time_limit : Int32 | |
property rating_e_decay : Int32 | |
property stickers_recent_limit : Int32 | |
property stickers_faved_limit : Int32 | |
property channels_read_media_period : Int32 | |
property pinned_dialogs_count_max : Int32 | |
property pinned_infolder_count_max : Int32 | |
property call_receive_timeout_ms : Int32 | |
property call_ring_timeout_ms : Int32 | |
property call_connect_timeout_ms : Int32 | |
property call_packet_timeout_ms : Int32 | |
property me_url_prefix : String | |
property caption_length_max : Int32 | |
property message_length_max : Int32 | |
property webfile_dc_id : Int32 | |
property notify_default_delay_ms : Int32 | |
property notify_cloud_delay_ms : Int32 | |
property date : Int32 | |
property expires : Int32 | |
property test_mode : Bool | |
property this_dc : Int32 | |
property dc_options : Array(Root::IDcOption) | |
property dc_txt_domain_name : String | |
property chat_size_max : Int32 | |
property megagroup_size_max : Int32 | |
property forwarded_count_max : Int32 | |
property online_update_period_ms : Int32 | |
property offline_blur_timeout_ms : Int32 | |
property offline_idle_timeout_ms : Int32 | |
property online_cloud_timeout_ms : Int32 | |
property lang_pack_version : Int32? | |
property suggested_lang_code : String? | |
property phonecalls_enabled : Bool | |
property default_p2p_contacts : Bool | |
property preload_featured_stickers : Bool | |
property static_maps_provider : String? | |
property img_search_username : String? | |
property venue_search_username : String? | |
property gif_search_username : String? | |
property autoupdate_url_prefix : String? | |
property ignore_phone_entities : Bool | |
property revoke_pm_inbox : Bool | |
property blocked_mode : Bool | |
property pfs_enabled : Bool | |
property tmp_sessions : Int32? | |
property base_lang_pack_version : Int32? | |
def initialize(@push_chat_period_ms : Int32, @push_chat_limit : Int32, @saved_gifs_limit : Int32, @edit_time_limit : Int32, @revoke_time_limit : Int32, @revoke_pm_time_limit : Int32, @rating_e_decay : Int32, @stickers_recent_limit : Int32, @stickers_faved_limit : Int32, @channels_read_media_period : Int32, @pinned_dialogs_count_max : Int32, @pinned_infolder_count_max : Int32, @call_receive_timeout_ms : Int32, @call_ring_timeout_ms : Int32, @call_connect_timeout_ms : Int32, @call_packet_timeout_ms : Int32, @me_url_prefix : String, @caption_length_max : Int32, @message_length_max : Int32, @webfile_dc_id : Int32, @notify_default_delay_ms : Int32, @notify_cloud_delay_ms : Int32, @date : Int32, @expires : Int32, @test_mode : Bool, @this_dc : Int32, @dc_options : Array(Root::IDcOption), @dc_txt_domain_name : String, @chat_size_max : Int32, @megagroup_size_max : Int32, @forwarded_count_max : Int32, @online_update_period_ms : Int32, @offline_blur_timeout_ms : Int32, @offline_idle_timeout_ms : Int32, @online_cloud_timeout_ms : Int32, @lang_pack_version : Int32? = nil, @suggested_lang_code : String? = nil, @phonecalls_enabled : Bool = nil, @default_p2p_contacts : Bool = nil, @preload_featured_stickers : Bool = nil, @static_maps_provider : String? = nil, @img_search_username : String? = nil, @venue_search_username : String? = nil, @gif_search_username : String? = nil, @autoupdate_url_prefix : String? = nil, @ignore_phone_entities : Bool = nil, @revoke_pm_inbox : Bool = nil, @blocked_mode : Bool = nil, @pfs_enabled : Bool = nil, @tmp_sessions : Int32? = nil, @base_lang_pack_version : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @phonecalls_enabled ? 2 : 0 | @default_p2p_contacts ? 8 : 0 | @preload_featured_stickers ? 16 : 0 | @ignore_phone_entities ? 32 : 0 | @revoke_pm_inbox ? 64 : 0 | @blocked_mode ? 256 : 0 | @pfs_enabled ? 8192 : 0 | @tmp_sessions ? 1 : 0 | @autoupdate_url_prefix ? 128 : 0 | @gif_search_username ? 512 : 0 | @venue_search_username ? 1024 : 0 | @img_search_username ? 2048 : 0 | @static_maps_provider ? 4096 : 0 | @suggested_lang_code ? 4 : 0 | @lang_pack_version ? 4 : 0 | @base_lang_pack_version ? 4 : 0).tl_serialize(io) | |
if phonecalls_enabled = @phonecalls_enabled | |
phonecalls_enabled.tl_serialize(io) | |
end | |
if default_p2p_contacts = @default_p2p_contacts | |
default_p2p_contacts.tl_serialize(io) | |
end | |
if preload_featured_stickers = @preload_featured_stickers | |
preload_featured_stickers.tl_serialize(io) | |
end | |
if ignore_phone_entities = @ignore_phone_entities | |
ignore_phone_entities.tl_serialize(io) | |
end | |
if revoke_pm_inbox = @revoke_pm_inbox | |
revoke_pm_inbox.tl_serialize(io) | |
end | |
if blocked_mode = @blocked_mode | |
blocked_mode.tl_serialize(io) | |
end | |
if pfs_enabled = @pfs_enabled | |
pfs_enabled.tl_serialize(io) | |
end | |
@date.tl_serialize(io) | |
@expires.tl_serialize(io) | |
@test_mode.tl_serialize(io) | |
@this_dc.tl_serialize(io) | |
@dc_options.tl_serialize(io) | |
@dc_txt_domain_name.tl_serialize(io) | |
@chat_size_max.tl_serialize(io) | |
@megagroup_size_max.tl_serialize(io) | |
@forwarded_count_max.tl_serialize(io) | |
@online_update_period_ms.tl_serialize(io) | |
@offline_blur_timeout_ms.tl_serialize(io) | |
@offline_idle_timeout_ms.tl_serialize(io) | |
@online_cloud_timeout_ms.tl_serialize(io) | |
@notify_cloud_delay_ms.tl_serialize(io) | |
@notify_default_delay_ms.tl_serialize(io) | |
@push_chat_period_ms.tl_serialize(io) | |
@push_chat_limit.tl_serialize(io) | |
@saved_gifs_limit.tl_serialize(io) | |
@edit_time_limit.tl_serialize(io) | |
@revoke_time_limit.tl_serialize(io) | |
@revoke_pm_time_limit.tl_serialize(io) | |
@rating_e_decay.tl_serialize(io) | |
@stickers_recent_limit.tl_serialize(io) | |
@stickers_faved_limit.tl_serialize(io) | |
@channels_read_media_period.tl_serialize(io) | |
if tmp_sessions = @tmp_sessions | |
tmp_sessions.tl_serialize(io) | |
end | |
@pinned_dialogs_count_max.tl_serialize(io) | |
@pinned_infolder_count_max.tl_serialize(io) | |
@call_receive_timeout_ms.tl_serialize(io) | |
@call_ring_timeout_ms.tl_serialize(io) | |
@call_connect_timeout_ms.tl_serialize(io) | |
@call_packet_timeout_ms.tl_serialize(io) | |
@me_url_prefix.tl_serialize(io) | |
if autoupdate_url_prefix = @autoupdate_url_prefix | |
autoupdate_url_prefix.tl_serialize(io) | |
end | |
if gif_search_username = @gif_search_username | |
gif_search_username.tl_serialize(io) | |
end | |
if venue_search_username = @venue_search_username | |
venue_search_username.tl_serialize(io) | |
end | |
if img_search_username = @img_search_username | |
img_search_username.tl_serialize(io) | |
end | |
if static_maps_provider = @static_maps_provider | |
static_maps_provider.tl_serialize(io) | |
end | |
@caption_length_max.tl_serialize(io) | |
@message_length_max.tl_serialize(io) | |
@webfile_dc_id.tl_serialize(io) | |
if suggested_lang_code = @suggested_lang_code | |
suggested_lang_code.tl_serialize(io) | |
end | |
if lang_pack_version = @lang_pack_version | |
lang_pack_version.tl_serialize(io) | |
end | |
if base_lang_pack_version = @base_lang_pack_version | |
base_lang_pack_version.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
phonecalls_enabled = (flags & 2) != 0 | |
default_p2p_contacts = (flags & 8) != 0 | |
preload_featured_stickers = (flags & 16) != 0 | |
ignore_phone_entities = (flags & 32) != 0 | |
revoke_pm_inbox = (flags & 64) != 0 | |
blocked_mode = (flags & 256) != 0 | |
pfs_enabled = (flags & 8192) != 0 | |
date = Int32.tl_deserialize(io) | |
expires = Int32.tl_deserialize(io) | |
test_mode = Bool.tl_deserialize(io) | |
this_dc = Int32.tl_deserialize(io) | |
dc_options = Array(Root::DcOption).tl_deserialize(io) | |
dc_txt_domain_name = String.tl_deserialize(io) | |
chat_size_max = Int32.tl_deserialize(io) | |
megagroup_size_max = Int32.tl_deserialize(io) | |
forwarded_count_max = Int32.tl_deserialize(io) | |
online_update_period_ms = Int32.tl_deserialize(io) | |
offline_blur_timeout_ms = Int32.tl_deserialize(io) | |
offline_idle_timeout_ms = Int32.tl_deserialize(io) | |
online_cloud_timeout_ms = Int32.tl_deserialize(io) | |
notify_cloud_delay_ms = Int32.tl_deserialize(io) | |
notify_default_delay_ms = Int32.tl_deserialize(io) | |
push_chat_period_ms = Int32.tl_deserialize(io) | |
push_chat_limit = Int32.tl_deserialize(io) | |
saved_gifs_limit = Int32.tl_deserialize(io) | |
edit_time_limit = Int32.tl_deserialize(io) | |
revoke_time_limit = Int32.tl_deserialize(io) | |
revoke_pm_time_limit = Int32.tl_deserialize(io) | |
rating_e_decay = Int32.tl_deserialize(io) | |
stickers_recent_limit = Int32.tl_deserialize(io) | |
stickers_faved_limit = Int32.tl_deserialize(io) | |
channels_read_media_period = Int32.tl_deserialize(io) | |
tmp_sessions = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
pinned_dialogs_count_max = Int32.tl_deserialize(io) | |
pinned_infolder_count_max = Int32.tl_deserialize(io) | |
call_receive_timeout_ms = Int32.tl_deserialize(io) | |
call_ring_timeout_ms = Int32.tl_deserialize(io) | |
call_connect_timeout_ms = Int32.tl_deserialize(io) | |
call_packet_timeout_ms = Int32.tl_deserialize(io) | |
me_url_prefix = String.tl_deserialize(io) | |
autoupdate_url_prefix = (flags & 128) != 0 ? String.tl_deserialize(io) : nil | |
gif_search_username = (flags & 512) != 0 ? String.tl_deserialize(io) : nil | |
venue_search_username = (flags & 1024) != 0 ? String.tl_deserialize(io) : nil | |
img_search_username = (flags & 2048) != 0 ? String.tl_deserialize(io) : nil | |
static_maps_provider = (flags & 4096) != 0 ? String.tl_deserialize(io) : nil | |
caption_length_max = Int32.tl_deserialize(io) | |
message_length_max = Int32.tl_deserialize(io) | |
webfile_dc_id = Int32.tl_deserialize(io) | |
suggested_lang_code = (flags & 4) != 0 ? String.tl_deserialize(io) : nil | |
lang_pack_version = (flags & 4) != 0 ? Int32.tl_deserialize(io) : nil | |
base_lang_pack_version = (flags & 4) != 0 ? Int32.tl_deserialize(io) : nil | |
new(phonecalls_enabled: phonecalls_enabled, default_p2p_contacts: default_p2p_contacts, preload_featured_stickers: preload_featured_stickers, ignore_phone_entities: ignore_phone_entities, revoke_pm_inbox: revoke_pm_inbox, blocked_mode: blocked_mode, pfs_enabled: pfs_enabled, date: date, expires: expires, test_mode: test_mode, this_dc: this_dc, dc_options: dc_options, dc_txt_domain_name: dc_txt_domain_name, chat_size_max: chat_size_max, megagroup_size_max: megagroup_size_max, forwarded_count_max: forwarded_count_max, online_update_period_ms: online_update_period_ms, offline_blur_timeout_ms: offline_blur_timeout_ms, offline_idle_timeout_ms: offline_idle_timeout_ms, online_cloud_timeout_ms: online_cloud_timeout_ms, notify_cloud_delay_ms: notify_cloud_delay_ms, notify_default_delay_ms: notify_default_delay_ms, push_chat_period_ms: push_chat_period_ms, push_chat_limit: push_chat_limit, saved_gifs_limit: saved_gifs_limit, edit_time_limit: edit_time_limit, revoke_time_limit: revoke_time_limit, revoke_pm_time_limit: revoke_pm_time_limit, rating_e_decay: rating_e_decay, stickers_recent_limit: stickers_recent_limit, stickers_faved_limit: stickers_faved_limit, channels_read_media_period: channels_read_media_period, tmp_sessions: tmp_sessions, pinned_dialogs_count_max: pinned_dialogs_count_max, pinned_infolder_count_max: pinned_infolder_count_max, call_receive_timeout_ms: call_receive_timeout_ms, call_ring_timeout_ms: call_ring_timeout_ms, call_connect_timeout_ms: call_connect_timeout_ms, call_packet_timeout_ms: call_packet_timeout_ms, me_url_prefix: me_url_prefix, autoupdate_url_prefix: autoupdate_url_prefix, gif_search_username: gif_search_username, venue_search_username: venue_search_username, img_search_username: img_search_username, static_maps_provider: static_maps_provider, caption_length_max: caption_length_max, message_length_max: message_length_max, webfile_dc_id: webfile_dc_id, suggested_lang_code: suggested_lang_code, lang_pack_version: lang_pack_version, base_lang_pack_version: base_lang_pack_version) | |
end | |
end | |
class Contact < IContact | |
CONSTRUCTOR_ID = 0xF911C994 | |
property user_id : Int32 | |
property mutual : Bool | |
def initialize(@user_id : Int32, @mutual : Bool) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
@mutual.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
mutual = Bool.tl_deserialize(io) | |
new(user_id: user_id, mutual: mutual) | |
end | |
end | |
class ContactStatus < IContactStatus | |
CONSTRUCTOR_ID = 0xD3680C61 | |
property user_id : Int32 | |
property status : Root::IUserStatus | |
def initialize(@user_id : Int32, @status : Root::IUserStatus) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
@status.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
status = Root::UserStatus.tl_deserialize(io) | |
new(user_id: user_id, status: status) | |
end | |
end | |
class DataJson < IDataJson | |
CONSTRUCTOR_ID = 0x7D748D04 | |
property data : String | |
def initialize(@data : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@data.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
data = String.tl_deserialize(io) | |
new(data: data) | |
end | |
end | |
class DcOption < IDcOption | |
CONSTRUCTOR_ID = 0x18B7A10D | |
property id : Int32 | |
property ip_address : String | |
property port : Int32 | |
property ipv6 : Bool | |
property media_only : Bool | |
property tcpo_only : Bool | |
property cdn : Bool | |
property static : Bool | |
property secret : Bytes? | |
def initialize(@id : Int32, @ip_address : String, @port : Int32, @ipv6 : Bool = nil, @media_only : Bool = nil, @tcpo_only : Bool = nil, @cdn : Bool = nil, @static : Bool = nil, @secret : Bytes? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @ipv6 ? 1 : 0 | @media_only ? 2 : 0 | @tcpo_only ? 4 : 0 | @cdn ? 8 : 0 | @static ? 16 : 0 | @secret ? 1024 : 0).tl_serialize(io) | |
if ipv6 = @ipv6 | |
ipv6.tl_serialize(io) | |
end | |
if media_only = @media_only | |
media_only.tl_serialize(io) | |
end | |
if tcpo_only = @tcpo_only | |
tcpo_only.tl_serialize(io) | |
end | |
if cdn = @cdn | |
cdn.tl_serialize(io) | |
end | |
if static = @static | |
static.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@ip_address.tl_serialize(io) | |
@port.tl_serialize(io) | |
if secret = @secret | |
secret.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
ipv6 = (flags & 1) != 0 | |
media_only = (flags & 2) != 0 | |
tcpo_only = (flags & 4) != 0 | |
cdn = (flags & 8) != 0 | |
static = (flags & 16) != 0 | |
id = Int32.tl_deserialize(io) | |
ip_address = String.tl_deserialize(io) | |
port = Int32.tl_deserialize(io) | |
secret = (flags & 1024) != 0 ? Bytes.tl_deserialize(io) : nil | |
new(ipv6: ipv6, media_only: media_only, tcpo_only: tcpo_only, cdn: cdn, static: static, id: id, ip_address: ip_address, port: port, secret: secret) | |
end | |
end | |
class DestroyAuthKeyFail < IDestroyAuthKeyRes | |
CONSTRUCTOR_ID = 0xEA109B13 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class DestroyAuthKeyNone < IDestroyAuthKeyRes | |
CONSTRUCTOR_ID = 0x0A9F2259 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class DestroyAuthKeyOk < IDestroyAuthKeyRes | |
CONSTRUCTOR_ID = 0xF660E1D4 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class DestroySessionNone < IDestroySessionRes | |
CONSTRUCTOR_ID = 0x62D350C9 | |
property session_id : Int64 | |
def initialize(@session_id : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@session_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
session_id = Int64.tl_deserialize(io) | |
new(session_id: session_id) | |
end | |
end | |
class DestroySessionOk < IDestroySessionRes | |
CONSTRUCTOR_ID = 0xE22045FC | |
property session_id : Int64 | |
def initialize(@session_id : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@session_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
session_id = Int64.tl_deserialize(io) | |
new(session_id: session_id) | |
end | |
end | |
class DhGenFail < ISetClientDhParamsAnswer | |
CONSTRUCTOR_ID = 0xA69DAE02 | |
property nonce : TL::I128 | |
property server_nonce : TL::I128 | |
property new_nonce_hash3 : TL::I128 | |
def initialize(@nonce : TL::I128, @server_nonce : TL::I128, @new_nonce_hash3 : TL::I128) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@nonce.tl_serialize(io) | |
@server_nonce.tl_serialize(io) | |
@new_nonce_hash3.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
nonce = TL::I128.tl_deserialize(io) | |
server_nonce = TL::I128.tl_deserialize(io) | |
new_nonce_hash3 = TL::I128.tl_deserialize(io) | |
new(nonce: nonce, server_nonce: server_nonce, new_nonce_hash3: new_nonce_hash3) | |
end | |
end | |
class DhGenOk < ISetClientDhParamsAnswer | |
CONSTRUCTOR_ID = 0x3BCBF734 | |
property nonce : TL::I128 | |
property server_nonce : TL::I128 | |
property new_nonce_hash1 : TL::I128 | |
def initialize(@nonce : TL::I128, @server_nonce : TL::I128, @new_nonce_hash1 : TL::I128) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@nonce.tl_serialize(io) | |
@server_nonce.tl_serialize(io) | |
@new_nonce_hash1.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
nonce = TL::I128.tl_deserialize(io) | |
server_nonce = TL::I128.tl_deserialize(io) | |
new_nonce_hash1 = TL::I128.tl_deserialize(io) | |
new(nonce: nonce, server_nonce: server_nonce, new_nonce_hash1: new_nonce_hash1) | |
end | |
end | |
class DhGenRetry < ISetClientDhParamsAnswer | |
CONSTRUCTOR_ID = 0x46DC1FB9 | |
property nonce : TL::I128 | |
property server_nonce : TL::I128 | |
property new_nonce_hash2 : TL::I128 | |
def initialize(@nonce : TL::I128, @server_nonce : TL::I128, @new_nonce_hash2 : TL::I128) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@nonce.tl_serialize(io) | |
@server_nonce.tl_serialize(io) | |
@new_nonce_hash2.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
nonce = TL::I128.tl_deserialize(io) | |
server_nonce = TL::I128.tl_deserialize(io) | |
new_nonce_hash2 = TL::I128.tl_deserialize(io) | |
new(nonce: nonce, server_nonce: server_nonce, new_nonce_hash2: new_nonce_hash2) | |
end | |
end | |
class Dialog < IDialog | |
CONSTRUCTOR_ID = 0x2C171F72 | |
property peer : Root::IPeer | |
property top_message : Int32 | |
property read_inbox_max_id : Int32 | |
property read_outbox_max_id : Int32 | |
property unread_count : Int32 | |
property unread_mentions_count : Int32 | |
property notify_settings : Root::IPeerNotifySettings | |
property pinned : Bool | |
property unread_mark : Bool | |
property pts : Int32? | |
property draft : Root::IDraftMessage? | |
property folder_id : Int32? | |
def initialize(@peer : Root::IPeer, @top_message : Int32, @read_inbox_max_id : Int32, @read_outbox_max_id : Int32, @unread_count : Int32, @unread_mentions_count : Int32, @notify_settings : Root::IPeerNotifySettings, @pinned : Bool = nil, @unread_mark : Bool = nil, @pts : Int32? = nil, @draft : Root::IDraftMessage? = nil, @folder_id : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @pinned ? 4 : 0 | @unread_mark ? 8 : 0 | @pts ? 1 : 0 | @draft ? 2 : 0 | @folder_id ? 16 : 0).tl_serialize(io) | |
if pinned = @pinned | |
pinned.tl_serialize(io) | |
end | |
if unread_mark = @unread_mark | |
unread_mark.tl_serialize(io) | |
end | |
@peer.tl_serialize(io) | |
@top_message.tl_serialize(io) | |
@read_inbox_max_id.tl_serialize(io) | |
@read_outbox_max_id.tl_serialize(io) | |
@unread_count.tl_serialize(io) | |
@unread_mentions_count.tl_serialize(io) | |
@notify_settings.tl_serialize(io) | |
if pts = @pts | |
pts.tl_serialize(io) | |
end | |
if draft = @draft | |
draft.tl_serialize(io) | |
end | |
if folder_id = @folder_id | |
folder_id.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
pinned = (flags & 4) != 0 | |
unread_mark = (flags & 8) != 0 | |
peer = Root::Peer.tl_deserialize(io) | |
top_message = Int32.tl_deserialize(io) | |
read_inbox_max_id = Int32.tl_deserialize(io) | |
read_outbox_max_id = Int32.tl_deserialize(io) | |
unread_count = Int32.tl_deserialize(io) | |
unread_mentions_count = Int32.tl_deserialize(io) | |
notify_settings = Root::PeerNotifySettings.tl_deserialize(io) | |
pts = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
draft = (flags & 2) != 0 ? Root::DraftMessage.tl_deserialize(io) : nil | |
folder_id = (flags & 16) != 0 ? Int32.tl_deserialize(io) : nil | |
new(pinned: pinned, unread_mark: unread_mark, peer: peer, top_message: top_message, read_inbox_max_id: read_inbox_max_id, read_outbox_max_id: read_outbox_max_id, unread_count: unread_count, unread_mentions_count: unread_mentions_count, notify_settings: notify_settings, pts: pts, draft: draft, folder_id: folder_id) | |
end | |
end | |
class DialogFilter < IDialogFilter | |
CONSTRUCTOR_ID = 0x7438F7E8 | |
property id : Int32 | |
property title : String | |
property pinned_peers : Array(Root::IInputPeer) | |
property include_peers : Array(Root::IInputPeer) | |
property exclude_peers : Array(Root::IInputPeer) | |
property contacts : Bool | |
property non_contacts : Bool | |
property groups : Bool | |
property broadcasts : Bool | |
property bots : Bool | |
property exclude_muted : Bool | |
property exclude_read : Bool | |
property exclude_archived : Bool | |
property emoticon : String? | |
def initialize(@id : Int32, @title : String, @pinned_peers : Array(Root::IInputPeer), @include_peers : Array(Root::IInputPeer), @exclude_peers : Array(Root::IInputPeer), @contacts : Bool = nil, @non_contacts : Bool = nil, @groups : Bool = nil, @broadcasts : Bool = nil, @bots : Bool = nil, @exclude_muted : Bool = nil, @exclude_read : Bool = nil, @exclude_archived : Bool = nil, @emoticon : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @contacts ? 1 : 0 | @non_contacts ? 2 : 0 | @groups ? 4 : 0 | @broadcasts ? 8 : 0 | @bots ? 16 : 0 | @exclude_muted ? 2048 : 0 | @exclude_read ? 4096 : 0 | @exclude_archived ? 8192 : 0 | @emoticon ? 33554432 : 0).tl_serialize(io) | |
if contacts = @contacts | |
contacts.tl_serialize(io) | |
end | |
if non_contacts = @non_contacts | |
non_contacts.tl_serialize(io) | |
end | |
if groups = @groups | |
groups.tl_serialize(io) | |
end | |
if broadcasts = @broadcasts | |
broadcasts.tl_serialize(io) | |
end | |
if bots = @bots | |
bots.tl_serialize(io) | |
end | |
if exclude_muted = @exclude_muted | |
exclude_muted.tl_serialize(io) | |
end | |
if exclude_read = @exclude_read | |
exclude_read.tl_serialize(io) | |
end | |
if exclude_archived = @exclude_archived | |
exclude_archived.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@title.tl_serialize(io) | |
if emoticon = @emoticon | |
emoticon.tl_serialize(io) | |
end | |
@pinned_peers.tl_serialize(io) | |
@include_peers.tl_serialize(io) | |
@exclude_peers.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
contacts = (flags & 1) != 0 | |
non_contacts = (flags & 2) != 0 | |
groups = (flags & 4) != 0 | |
broadcasts = (flags & 8) != 0 | |
bots = (flags & 16) != 0 | |
exclude_muted = (flags & 2048) != 0 | |
exclude_read = (flags & 4096) != 0 | |
exclude_archived = (flags & 8192) != 0 | |
id = Int32.tl_deserialize(io) | |
title = String.tl_deserialize(io) | |
emoticon = (flags & 33554432) != 0 ? String.tl_deserialize(io) : nil | |
pinned_peers = Array(Root::InputPeer).tl_deserialize(io) | |
include_peers = Array(Root::InputPeer).tl_deserialize(io) | |
exclude_peers = Array(Root::InputPeer).tl_deserialize(io) | |
new(contacts: contacts, non_contacts: non_contacts, groups: groups, broadcasts: broadcasts, bots: bots, exclude_muted: exclude_muted, exclude_read: exclude_read, exclude_archived: exclude_archived, id: id, title: title, emoticon: emoticon, pinned_peers: pinned_peers, include_peers: include_peers, exclude_peers: exclude_peers) | |
end | |
end | |
class DialogFilterSuggested < IDialogFilterSuggested | |
CONSTRUCTOR_ID = 0x77744D4A | |
property filter : Root::IDialogFilter | |
property description : String | |
def initialize(@filter : Root::IDialogFilter, @description : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@filter.tl_serialize(io) | |
@description.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
filter = Root::DialogFilter.tl_deserialize(io) | |
description = String.tl_deserialize(io) | |
new(filter: filter, description: description) | |
end | |
end | |
class DialogFolder < IDialog | |
CONSTRUCTOR_ID = 0x71BD134C | |
property folder : Root::IFolder | |
property peer : Root::IPeer | |
property top_message : Int32 | |
property unread_muted_peers_count : Int32 | |
property unread_unmuted_peers_count : Int32 | |
property unread_muted_messages_count : Int32 | |
property unread_unmuted_messages_count : Int32 | |
property pinned : Bool | |
def initialize(@folder : Root::IFolder, @peer : Root::IPeer, @top_message : Int32, @unread_muted_peers_count : Int32, @unread_unmuted_peers_count : Int32, @unread_muted_messages_count : Int32, @unread_unmuted_messages_count : Int32, @pinned : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @pinned ? 4 : 0).tl_serialize(io) | |
if pinned = @pinned | |
pinned.tl_serialize(io) | |
end | |
@folder.tl_serialize(io) | |
@peer.tl_serialize(io) | |
@top_message.tl_serialize(io) | |
@unread_muted_peers_count.tl_serialize(io) | |
@unread_unmuted_peers_count.tl_serialize(io) | |
@unread_muted_messages_count.tl_serialize(io) | |
@unread_unmuted_messages_count.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
pinned = (flags & 4) != 0 | |
folder = Root::Folder.tl_deserialize(io) | |
peer = Root::Peer.tl_deserialize(io) | |
top_message = Int32.tl_deserialize(io) | |
unread_muted_peers_count = Int32.tl_deserialize(io) | |
unread_unmuted_peers_count = Int32.tl_deserialize(io) | |
unread_muted_messages_count = Int32.tl_deserialize(io) | |
unread_unmuted_messages_count = Int32.tl_deserialize(io) | |
new(pinned: pinned, folder: folder, peer: peer, top_message: top_message, unread_muted_peers_count: unread_muted_peers_count, unread_unmuted_peers_count: unread_unmuted_peers_count, unread_muted_messages_count: unread_muted_messages_count, unread_unmuted_messages_count: unread_unmuted_messages_count) | |
end | |
end | |
class DialogPeer < IDialogPeer | |
CONSTRUCTOR_ID = 0xE56DBF05 | |
property peer : Root::IPeer | |
def initialize(@peer : Root::IPeer) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peer.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peer = Root::Peer.tl_deserialize(io) | |
new(peer: peer) | |
end | |
end | |
class DialogPeerFolder < IDialogPeer | |
CONSTRUCTOR_ID = 0x514519E2 | |
property folder_id : Int32 | |
def initialize(@folder_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@folder_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
folder_id = Int32.tl_deserialize(io) | |
new(folder_id: folder_id) | |
end | |
end | |
class Document < IDocument | |
CONSTRUCTOR_ID = 0x1E87342B | |
property id : Int64 | |
property access_hash : Int64 | |
property file_reference : Bytes | |
property date : Int32 | |
property mime_type : String | |
property size : Int32 | |
property dc_id : Int32 | |
property attributes : Array(Root::IDocumentAttribute) | |
property thumbs : Array(Root::IPhotoSize)? | |
property video_thumbs : Array(Root::IVideoSize)? | |
def initialize(@id : Int64, @access_hash : Int64, @file_reference : Bytes, @date : Int32, @mime_type : String, @size : Int32, @dc_id : Int32, @attributes : Array(Root::IDocumentAttribute), @thumbs : Array(Root::IPhotoSize)? = nil, @video_thumbs : Array(Root::IVideoSize)? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @thumbs ? 1 : 0 | @video_thumbs ? 2 : 0).tl_serialize(io) | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@file_reference.tl_serialize(io) | |
@date.tl_serialize(io) | |
@mime_type.tl_serialize(io) | |
@size.tl_serialize(io) | |
if thumbs = @thumbs | |
thumbs.tl_serialize(io) | |
end | |
if video_thumbs = @video_thumbs | |
video_thumbs.tl_serialize(io) | |
end | |
@dc_id.tl_serialize(io) | |
@attributes.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
file_reference = Bytes.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
mime_type = String.tl_deserialize(io) | |
size = Int32.tl_deserialize(io) | |
thumbs = (flags & 1) != 0 ? Array(Root::PhotoSize).tl_deserialize(io) : nil | |
video_thumbs = (flags & 2) != 0 ? Array(Root::VideoSize).tl_deserialize(io) : nil | |
dc_id = Int32.tl_deserialize(io) | |
attributes = Array(Root::DocumentAttribute).tl_deserialize(io) | |
new(id: id, access_hash: access_hash, file_reference: file_reference, date: date, mime_type: mime_type, size: size, thumbs: thumbs, video_thumbs: video_thumbs, dc_id: dc_id, attributes: attributes) | |
end | |
end | |
class DocumentAttributeAnimated < IDocumentAttribute | |
CONSTRUCTOR_ID = 0x11B58939 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class DocumentAttributeAudio < IDocumentAttribute | |
CONSTRUCTOR_ID = 0x9852F9C6 | |
property duration : Int32 | |
property voice : Bool | |
property title : String? | |
property performer : String? | |
property waveform : Bytes? | |
def initialize(@duration : Int32, @voice : Bool = nil, @title : String? = nil, @performer : String? = nil, @waveform : Bytes? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @voice ? 1024 : 0 | @title ? 1 : 0 | @performer ? 2 : 0 | @waveform ? 4 : 0).tl_serialize(io) | |
if voice = @voice | |
voice.tl_serialize(io) | |
end | |
@duration.tl_serialize(io) | |
if title = @title | |
title.tl_serialize(io) | |
end | |
if performer = @performer | |
performer.tl_serialize(io) | |
end | |
if waveform = @waveform | |
waveform.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
voice = (flags & 1024) != 0 | |
duration = Int32.tl_deserialize(io) | |
title = (flags & 1) != 0 ? String.tl_deserialize(io) : nil | |
performer = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
waveform = (flags & 4) != 0 ? Bytes.tl_deserialize(io) : nil | |
new(voice: voice, duration: duration, title: title, performer: performer, waveform: waveform) | |
end | |
end | |
class DocumentAttributeFilename < IDocumentAttribute | |
CONSTRUCTOR_ID = 0x15590068 | |
property file_name : String | |
def initialize(@file_name : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@file_name.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
file_name = String.tl_deserialize(io) | |
new(file_name: file_name) | |
end | |
end | |
class DocumentAttributeHasStickers < IDocumentAttribute | |
CONSTRUCTOR_ID = 0x9801D2F7 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class DocumentAttributeImageSize < IDocumentAttribute | |
CONSTRUCTOR_ID = 0x6C37C15C | |
property w : Int32 | |
property h : Int32 | |
def initialize(@w : Int32, @h : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@w.tl_serialize(io) | |
@h.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
w = Int32.tl_deserialize(io) | |
h = Int32.tl_deserialize(io) | |
new(w: w, h: h) | |
end | |
end | |
class DocumentAttributeSticker < IDocumentAttribute | |
CONSTRUCTOR_ID = 0x6319D612 | |
property alt : String | |
property stickerset : Root::IInputStickerSet | |
property mask : Bool | |
property mask_coords : Root::IMaskCoords? | |
def initialize(@alt : String, @stickerset : Root::IInputStickerSet, @mask : Bool = nil, @mask_coords : Root::IMaskCoords? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @mask ? 2 : 0 | @mask_coords ? 1 : 0).tl_serialize(io) | |
if mask = @mask | |
mask.tl_serialize(io) | |
end | |
@alt.tl_serialize(io) | |
@stickerset.tl_serialize(io) | |
if mask_coords = @mask_coords | |
mask_coords.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
mask = (flags & 2) != 0 | |
alt = String.tl_deserialize(io) | |
stickerset = Root::InputStickerSet.tl_deserialize(io) | |
mask_coords = (flags & 1) != 0 ? Root::MaskCoords.tl_deserialize(io) : nil | |
new(mask: mask, alt: alt, stickerset: stickerset, mask_coords: mask_coords) | |
end | |
end | |
class DocumentAttributeVideo < IDocumentAttribute | |
CONSTRUCTOR_ID = 0x0EF02CE6 | |
property duration : Int32 | |
property w : Int32 | |
property h : Int32 | |
property round_message : Bool | |
property supports_streaming : Bool | |
def initialize(@duration : Int32, @w : Int32, @h : Int32, @round_message : Bool = nil, @supports_streaming : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @round_message ? 1 : 0 | @supports_streaming ? 2 : 0).tl_serialize(io) | |
if round_message = @round_message | |
round_message.tl_serialize(io) | |
end | |
if supports_streaming = @supports_streaming | |
supports_streaming.tl_serialize(io) | |
end | |
@duration.tl_serialize(io) | |
@w.tl_serialize(io) | |
@h.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
round_message = (flags & 1) != 0 | |
supports_streaming = (flags & 2) != 0 | |
duration = Int32.tl_deserialize(io) | |
w = Int32.tl_deserialize(io) | |
h = Int32.tl_deserialize(io) | |
new(round_message: round_message, supports_streaming: supports_streaming, duration: duration, w: w, h: h) | |
end | |
end | |
class DocumentEmpty < IDocument | |
CONSTRUCTOR_ID = 0x36F8C871 | |
property id : Int64 | |
def initialize(@id : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
new(id: id) | |
end | |
end | |
class DraftMessage < IDraftMessage | |
CONSTRUCTOR_ID = 0xFD8E711F | |
property message : String | |
property date : Int32 | |
property no_webpage : Bool | |
property reply_to_msg_id : Int32? | |
property entities : Array(Root::IMessageEntity)? | |
def initialize(@message : String, @date : Int32, @no_webpage : Bool = nil, @reply_to_msg_id : Int32? = nil, @entities : Array(Root::IMessageEntity)? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @no_webpage ? 2 : 0 | @reply_to_msg_id ? 1 : 0 | @entities ? 8 : 0).tl_serialize(io) | |
if no_webpage = @no_webpage | |
no_webpage.tl_serialize(io) | |
end | |
if reply_to_msg_id = @reply_to_msg_id | |
reply_to_msg_id.tl_serialize(io) | |
end | |
@message.tl_serialize(io) | |
if entities = @entities | |
entities.tl_serialize(io) | |
end | |
@date.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
no_webpage = (flags & 2) != 0 | |
reply_to_msg_id = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
message = String.tl_deserialize(io) | |
entities = (flags & 8) != 0 ? Array(Root::MessageEntity).tl_deserialize(io) : nil | |
date = Int32.tl_deserialize(io) | |
new(no_webpage: no_webpage, reply_to_msg_id: reply_to_msg_id, message: message, entities: entities, date: date) | |
end | |
end | |
class DraftMessageEmpty < IDraftMessage | |
CONSTRUCTOR_ID = 0x1B0C841A | |
property date : Int32? | |
def initialize(@date : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @date ? 1 : 0).tl_serialize(io) | |
if date = @date | |
date.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
date = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
new(date: date) | |
end | |
end | |
class EmojiKeyword < IEmojiKeyword | |
CONSTRUCTOR_ID = 0xD5B3B9F9 | |
property keyword : String | |
property emoticons : Array(String) | |
def initialize(@keyword : String, @emoticons : Array(String)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@keyword.tl_serialize(io) | |
@emoticons.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
keyword = String.tl_deserialize(io) | |
emoticons = Array(String).tl_deserialize(io) | |
new(keyword: keyword, emoticons: emoticons) | |
end | |
end | |
class EmojiKeywordDeleted < IEmojiKeyword | |
CONSTRUCTOR_ID = 0x236DF622 | |
property keyword : String | |
property emoticons : Array(String) | |
def initialize(@keyword : String, @emoticons : Array(String)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@keyword.tl_serialize(io) | |
@emoticons.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
keyword = String.tl_deserialize(io) | |
emoticons = Array(String).tl_deserialize(io) | |
new(keyword: keyword, emoticons: emoticons) | |
end | |
end | |
class EmojiKeywordsDifference < IEmojiKeywordsDifference | |
CONSTRUCTOR_ID = 0x5CC761BD | |
property lang_code : String | |
property from_version : Int32 | |
property version : Int32 | |
property keywords : Array(Root::IEmojiKeyword) | |
def initialize(@lang_code : String, @from_version : Int32, @version : Int32, @keywords : Array(Root::IEmojiKeyword)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@lang_code.tl_serialize(io) | |
@from_version.tl_serialize(io) | |
@version.tl_serialize(io) | |
@keywords.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
lang_code = String.tl_deserialize(io) | |
from_version = Int32.tl_deserialize(io) | |
version = Int32.tl_deserialize(io) | |
keywords = Array(Root::EmojiKeyword).tl_deserialize(io) | |
new(lang_code: lang_code, from_version: from_version, version: version, keywords: keywords) | |
end | |
end | |
class EmojiLanguage < IEmojiLanguage | |
CONSTRUCTOR_ID = 0xB3FB5361 | |
property lang_code : String | |
def initialize(@lang_code : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@lang_code.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
lang_code = String.tl_deserialize(io) | |
new(lang_code: lang_code) | |
end | |
end | |
class EmojiUrl < IEmojiUrl | |
CONSTRUCTOR_ID = 0xA575739D | |
property url : String | |
def initialize(@url : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@url.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
url = String.tl_deserialize(io) | |
new(url: url) | |
end | |
end | |
class EncryptedChat < IEncryptedChat | |
CONSTRUCTOR_ID = 0xFA56CE36 | |
property id : Int32 | |
property access_hash : Int64 | |
property date : Int32 | |
property admin_id : Int32 | |
property participant_id : Int32 | |
property g_a_or_b : Bytes | |
property key_fingerprint : Int64 | |
def initialize(@id : Int32, @access_hash : Int64, @date : Int32, @admin_id : Int32, @participant_id : Int32, @g_a_or_b : Bytes, @key_fingerprint : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@date.tl_serialize(io) | |
@admin_id.tl_serialize(io) | |
@participant_id.tl_serialize(io) | |
@g_a_or_b.tl_serialize(io) | |
@key_fingerprint.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int32.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
admin_id = Int32.tl_deserialize(io) | |
participant_id = Int32.tl_deserialize(io) | |
g_a_or_b = Bytes.tl_deserialize(io) | |
key_fingerprint = Int64.tl_deserialize(io) | |
new(id: id, access_hash: access_hash, date: date, admin_id: admin_id, participant_id: participant_id, g_a_or_b: g_a_or_b, key_fingerprint: key_fingerprint) | |
end | |
end | |
class EncryptedChatDiscarded < IEncryptedChat | |
CONSTRUCTOR_ID = 0x13D6DD27 | |
property id : Int32 | |
def initialize(@id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int32.tl_deserialize(io) | |
new(id: id) | |
end | |
end | |
class EncryptedChatEmpty < IEncryptedChat | |
CONSTRUCTOR_ID = 0xAB7EC0A0 | |
property id : Int32 | |
def initialize(@id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int32.tl_deserialize(io) | |
new(id: id) | |
end | |
end | |
class EncryptedChatRequested < IEncryptedChat | |
CONSTRUCTOR_ID = 0x62718A82 | |
property id : Int32 | |
property access_hash : Int64 | |
property date : Int32 | |
property admin_id : Int32 | |
property participant_id : Int32 | |
property g_a : Bytes | |
property folder_id : Int32? | |
def initialize(@id : Int32, @access_hash : Int64, @date : Int32, @admin_id : Int32, @participant_id : Int32, @g_a : Bytes, @folder_id : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @folder_id ? 1 : 0).tl_serialize(io) | |
if folder_id = @folder_id | |
folder_id.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@date.tl_serialize(io) | |
@admin_id.tl_serialize(io) | |
@participant_id.tl_serialize(io) | |
@g_a.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
folder_id = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
id = Int32.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
admin_id = Int32.tl_deserialize(io) | |
participant_id = Int32.tl_deserialize(io) | |
g_a = Bytes.tl_deserialize(io) | |
new(folder_id: folder_id, id: id, access_hash: access_hash, date: date, admin_id: admin_id, participant_id: participant_id, g_a: g_a) | |
end | |
end | |
class EncryptedChatWaiting < IEncryptedChat | |
CONSTRUCTOR_ID = 0x3BF703DC | |
property id : Int32 | |
property access_hash : Int64 | |
property date : Int32 | |
property admin_id : Int32 | |
property participant_id : Int32 | |
def initialize(@id : Int32, @access_hash : Int64, @date : Int32, @admin_id : Int32, @participant_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@date.tl_serialize(io) | |
@admin_id.tl_serialize(io) | |
@participant_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int32.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
admin_id = Int32.tl_deserialize(io) | |
participant_id = Int32.tl_deserialize(io) | |
new(id: id, access_hash: access_hash, date: date, admin_id: admin_id, participant_id: participant_id) | |
end | |
end | |
class EncryptedFile < IEncryptedFile | |
CONSTRUCTOR_ID = 0x4A70994C | |
property id : Int64 | |
property access_hash : Int64 | |
property size : Int32 | |
property dc_id : Int32 | |
property key_fingerprint : Int32 | |
def initialize(@id : Int64, @access_hash : Int64, @size : Int32, @dc_id : Int32, @key_fingerprint : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@size.tl_serialize(io) | |
@dc_id.tl_serialize(io) | |
@key_fingerprint.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
size = Int32.tl_deserialize(io) | |
dc_id = Int32.tl_deserialize(io) | |
key_fingerprint = Int32.tl_deserialize(io) | |
new(id: id, access_hash: access_hash, size: size, dc_id: dc_id, key_fingerprint: key_fingerprint) | |
end | |
end | |
class EncryptedFileEmpty < IEncryptedFile | |
CONSTRUCTOR_ID = 0xC21F497E | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class EncryptedMessage < IEncryptedMessage | |
CONSTRUCTOR_ID = 0xED18C118 | |
property random_id : Int64 | |
property chat_id : Int32 | |
property date : Int32 | |
property bytes : Bytes | |
property file : Root::IEncryptedFile | |
def initialize(@random_id : Int64, @chat_id : Int32, @date : Int32, @bytes : Bytes, @file : Root::IEncryptedFile) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@random_id.tl_serialize(io) | |
@chat_id.tl_serialize(io) | |
@date.tl_serialize(io) | |
@bytes.tl_serialize(io) | |
@file.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
random_id = Int64.tl_deserialize(io) | |
chat_id = Int32.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
bytes = Bytes.tl_deserialize(io) | |
file = Root::EncryptedFile.tl_deserialize(io) | |
new(random_id: random_id, chat_id: chat_id, date: date, bytes: bytes, file: file) | |
end | |
end | |
class EncryptedMessageService < IEncryptedMessage | |
CONSTRUCTOR_ID = 0x23734B06 | |
property random_id : Int64 | |
property chat_id : Int32 | |
property date : Int32 | |
property bytes : Bytes | |
def initialize(@random_id : Int64, @chat_id : Int32, @date : Int32, @bytes : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@random_id.tl_serialize(io) | |
@chat_id.tl_serialize(io) | |
@date.tl_serialize(io) | |
@bytes.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
random_id = Int64.tl_deserialize(io) | |
chat_id = Int32.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
bytes = Bytes.tl_deserialize(io) | |
new(random_id: random_id, chat_id: chat_id, date: date, bytes: bytes) | |
end | |
end | |
class ExportedMessageLink < IExportedMessageLink | |
CONSTRUCTOR_ID = 0x5DAB1AF4 | |
property link : String | |
property html : String | |
def initialize(@link : String, @html : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@link.tl_serialize(io) | |
@html.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
link = String.tl_deserialize(io) | |
html = String.tl_deserialize(io) | |
new(link: link, html: html) | |
end | |
end | |
class FileHash < IFileHash | |
CONSTRUCTOR_ID = 0x6242C773 | |
property offset : Int32 | |
property limit : Int32 | |
property hash : Bytes | |
def initialize(@offset : Int32, @limit : Int32, @hash : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@offset.tl_serialize(io) | |
@limit.tl_serialize(io) | |
@hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
offset = Int32.tl_deserialize(io) | |
limit = Int32.tl_deserialize(io) | |
hash = Bytes.tl_deserialize(io) | |
new(offset: offset, limit: limit, hash: hash) | |
end | |
end | |
class FileLocationToBeDeprecated < IFileLocation | |
CONSTRUCTOR_ID = 0xBC7FC6CD | |
property volume_id : Int64 | |
property local_id : Int32 | |
def initialize(@volume_id : Int64, @local_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@volume_id.tl_serialize(io) | |
@local_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
volume_id = Int64.tl_deserialize(io) | |
local_id = Int32.tl_deserialize(io) | |
new(volume_id: volume_id, local_id: local_id) | |
end | |
end | |
class Folder < IFolder | |
CONSTRUCTOR_ID = 0xFF544E65 | |
property id : Int32 | |
property title : String | |
property autofill_new_broadcasts : Bool | |
property autofill_public_groups : Bool | |
property autofill_new_correspondents : Bool | |
property photo : Root::IChatPhoto? | |
def initialize(@id : Int32, @title : String, @autofill_new_broadcasts : Bool = nil, @autofill_public_groups : Bool = nil, @autofill_new_correspondents : Bool = nil, @photo : Root::IChatPhoto? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @autofill_new_broadcasts ? 1 : 0 | @autofill_public_groups ? 2 : 0 | @autofill_new_correspondents ? 4 : 0 | @photo ? 8 : 0).tl_serialize(io) | |
if autofill_new_broadcasts = @autofill_new_broadcasts | |
autofill_new_broadcasts.tl_serialize(io) | |
end | |
if autofill_public_groups = @autofill_public_groups | |
autofill_public_groups.tl_serialize(io) | |
end | |
if autofill_new_correspondents = @autofill_new_correspondents | |
autofill_new_correspondents.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@title.tl_serialize(io) | |
if photo = @photo | |
photo.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
autofill_new_broadcasts = (flags & 1) != 0 | |
autofill_public_groups = (flags & 2) != 0 | |
autofill_new_correspondents = (flags & 4) != 0 | |
id = Int32.tl_deserialize(io) | |
title = String.tl_deserialize(io) | |
photo = (flags & 8) != 0 ? Root::ChatPhoto.tl_deserialize(io) : nil | |
new(autofill_new_broadcasts: autofill_new_broadcasts, autofill_public_groups: autofill_public_groups, autofill_new_correspondents: autofill_new_correspondents, id: id, title: title, photo: photo) | |
end | |
end | |
class FolderPeer < IFolderPeer | |
CONSTRUCTOR_ID = 0xE9BAA668 | |
property peer : Root::IPeer | |
property folder_id : Int32 | |
def initialize(@peer : Root::IPeer, @folder_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peer.tl_serialize(io) | |
@folder_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peer = Root::Peer.tl_deserialize(io) | |
folder_id = Int32.tl_deserialize(io) | |
new(peer: peer, folder_id: folder_id) | |
end | |
end | |
class FutureSalt < IFutureSalt | |
CONSTRUCTOR_ID = 0x0949D9DC | |
property valid_since : Int32 | |
property valid_until : Int32 | |
property salt : Int64 | |
def initialize(@valid_since : Int32, @valid_until : Int32, @salt : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@valid_since.tl_serialize(io) | |
@valid_until.tl_serialize(io) | |
@salt.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
valid_since = Int32.tl_deserialize(io) | |
valid_until = Int32.tl_deserialize(io) | |
salt = Int64.tl_deserialize(io) | |
new(valid_since: valid_since, valid_until: valid_until, salt: salt) | |
end | |
end | |
class FutureSalts < IFutureSalts | |
CONSTRUCTOR_ID = 0xAE500895 | |
property req_msg_id : Int64 | |
property now : Int32 | |
property salts : Array(Root::IFutureSalt) | |
def initialize(@req_msg_id : Int64, @now : Int32, @salts : Array(Root::IFutureSalt)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@req_msg_id.tl_serialize(io) | |
@now.tl_serialize(io) | |
@salts.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
req_msg_id = Int64.tl_deserialize(io) | |
now = Int32.tl_deserialize(io) | |
salts = Array(Root::FutureSalt).tl_deserialize(io) | |
new(req_msg_id: req_msg_id, now: now, salts: salts) | |
end | |
end | |
class Game < IGame | |
CONSTRUCTOR_ID = 0xBDF9653B | |
property id : Int64 | |
property access_hash : Int64 | |
property short_name : String | |
property title : String | |
property description : String | |
property photo : Root::IPhoto | |
property document : Root::IDocument? | |
def initialize(@id : Int64, @access_hash : Int64, @short_name : String, @title : String, @description : String, @photo : Root::IPhoto, @document : Root::IDocument? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @document ? 1 : 0).tl_serialize(io) | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@short_name.tl_serialize(io) | |
@title.tl_serialize(io) | |
@description.tl_serialize(io) | |
@photo.tl_serialize(io) | |
if document = @document | |
document.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
short_name = String.tl_deserialize(io) | |
title = String.tl_deserialize(io) | |
description = String.tl_deserialize(io) | |
photo = Root::Photo.tl_deserialize(io) | |
document = (flags & 1) != 0 ? Root::Document.tl_deserialize(io) : nil | |
new(id: id, access_hash: access_hash, short_name: short_name, title: title, description: description, photo: photo, document: document) | |
end | |
end | |
class GeoPoint < IGeoPoint | |
CONSTRUCTOR_ID = 0xB2A2F663 | |
property long : Float64 | |
property lat : Float64 | |
property access_hash : Int64 | |
property accuracy_radius : Int32? | |
def initialize(@long : Float64, @lat : Float64, @access_hash : Int64, @accuracy_radius : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @accuracy_radius ? 1 : 0).tl_serialize(io) | |
@long.tl_serialize(io) | |
@lat.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
if accuracy_radius = @accuracy_radius | |
accuracy_radius.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
long = Float64.tl_deserialize(io) | |
lat = Float64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
accuracy_radius = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
new(long: long, lat: lat, access_hash: access_hash, accuracy_radius: accuracy_radius) | |
end | |
end | |
class GeoPointEmpty < IGeoPoint | |
CONSTRUCTOR_ID = 0x1117DD5F | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class GlobalPrivacySettings < IGlobalPrivacySettings | |
CONSTRUCTOR_ID = 0xBEA2F424 | |
property archive_and_mute_new_noncontact_peers : Bool? | |
def initialize(@archive_and_mute_new_noncontact_peers : Bool? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @archive_and_mute_new_noncontact_peers ? 1 : 0).tl_serialize(io) | |
if archive_and_mute_new_noncontact_peers = @archive_and_mute_new_noncontact_peers | |
archive_and_mute_new_noncontact_peers.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
archive_and_mute_new_noncontact_peers = (flags & 1) != 0 ? Bool.tl_deserialize(io) : nil | |
new(archive_and_mute_new_noncontact_peers: archive_and_mute_new_noncontact_peers) | |
end | |
end | |
class GroupCall < IGroupCall | |
CONSTRUCTOR_ID = 0x55903081 | |
property id : Int64 | |
property access_hash : Int64 | |
property participants_count : Int32 | |
property version : Int32 | |
property join_muted : Bool | |
property can_change_join_muted : Bool | |
property params : Root::IDataJson? | |
def initialize(@id : Int64, @access_hash : Int64, @participants_count : Int32, @version : Int32, @join_muted : Bool = nil, @can_change_join_muted : Bool = nil, @params : Root::IDataJson? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @join_muted ? 2 : 0 | @can_change_join_muted ? 4 : 0 | @params ? 1 : 0).tl_serialize(io) | |
if join_muted = @join_muted | |
join_muted.tl_serialize(io) | |
end | |
if can_change_join_muted = @can_change_join_muted | |
can_change_join_muted.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@participants_count.tl_serialize(io) | |
if params = @params | |
params.tl_serialize(io) | |
end | |
@version.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
join_muted = (flags & 2) != 0 | |
can_change_join_muted = (flags & 4) != 0 | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
participants_count = Int32.tl_deserialize(io) | |
params = (flags & 1) != 0 ? Root::DataJson.tl_deserialize(io) : nil | |
version = Int32.tl_deserialize(io) | |
new(join_muted: join_muted, can_change_join_muted: can_change_join_muted, id: id, access_hash: access_hash, participants_count: participants_count, params: params, version: version) | |
end | |
end | |
class GroupCallDiscarded < IGroupCall | |
CONSTRUCTOR_ID = 0x7780BCB4 | |
property id : Int64 | |
property access_hash : Int64 | |
property duration : Int32 | |
def initialize(@id : Int64, @access_hash : Int64, @duration : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@duration.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
duration = Int32.tl_deserialize(io) | |
new(id: id, access_hash: access_hash, duration: duration) | |
end | |
end | |
class GroupCallParticipant < IGroupCallParticipant | |
CONSTRUCTOR_ID = 0x56B087C9 | |
property user_id : Int32 | |
property date : Int32 | |
property source : Int32 | |
property muted : Bool | |
property left : Bool | |
property can_self_unmute : Bool | |
property just_joined : Bool | |
property versioned : Bool | |
property active_date : Int32? | |
def initialize(@user_id : Int32, @date : Int32, @source : Int32, @muted : Bool = nil, @left : Bool = nil, @can_self_unmute : Bool = nil, @just_joined : Bool = nil, @versioned : Bool = nil, @active_date : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @muted ? 1 : 0 | @left ? 2 : 0 | @can_self_unmute ? 4 : 0 | @just_joined ? 16 : 0 | @versioned ? 32 : 0 | @active_date ? 8 : 0).tl_serialize(io) | |
if muted = @muted | |
muted.tl_serialize(io) | |
end | |
if left = @left | |
left.tl_serialize(io) | |
end | |
if can_self_unmute = @can_self_unmute | |
can_self_unmute.tl_serialize(io) | |
end | |
if just_joined = @just_joined | |
just_joined.tl_serialize(io) | |
end | |
if versioned = @versioned | |
versioned.tl_serialize(io) | |
end | |
@user_id.tl_serialize(io) | |
@date.tl_serialize(io) | |
if active_date = @active_date | |
active_date.tl_serialize(io) | |
end | |
@source.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
muted = (flags & 1) != 0 | |
left = (flags & 2) != 0 | |
can_self_unmute = (flags & 4) != 0 | |
just_joined = (flags & 16) != 0 | |
versioned = (flags & 32) != 0 | |
user_id = Int32.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
active_date = (flags & 8) != 0 ? Int32.tl_deserialize(io) : nil | |
source = Int32.tl_deserialize(io) | |
new(muted: muted, left: left, can_self_unmute: can_self_unmute, just_joined: just_joined, versioned: versioned, user_id: user_id, date: date, active_date: active_date, source: source) | |
end | |
end | |
class HighScore < IHighScore | |
CONSTRUCTOR_ID = 0x58FFFCD0 | |
property pos : Int32 | |
property user_id : Int32 | |
property score : Int32 | |
def initialize(@pos : Int32, @user_id : Int32, @score : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@pos.tl_serialize(io) | |
@user_id.tl_serialize(io) | |
@score.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
pos = Int32.tl_deserialize(io) | |
user_id = Int32.tl_deserialize(io) | |
score = Int32.tl_deserialize(io) | |
new(pos: pos, user_id: user_id, score: score) | |
end | |
end | |
class HttpWait < IHttpWait | |
CONSTRUCTOR_ID = 0x9299359F | |
property max_delay : Int32 | |
property wait_after : Int32 | |
property max_wait : Int32 | |
def initialize(@max_delay : Int32, @wait_after : Int32, @max_wait : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@max_delay.tl_serialize(io) | |
@wait_after.tl_serialize(io) | |
@max_wait.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
max_delay = Int32.tl_deserialize(io) | |
wait_after = Int32.tl_deserialize(io) | |
max_wait = Int32.tl_deserialize(io) | |
new(max_delay: max_delay, wait_after: wait_after, max_wait: max_wait) | |
end | |
end | |
class ImportedContact < IImportedContact | |
CONSTRUCTOR_ID = 0xD0028438 | |
property user_id : Int32 | |
property client_id : Int64 | |
def initialize(@user_id : Int32, @client_id : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
@client_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
client_id = Int64.tl_deserialize(io) | |
new(user_id: user_id, client_id: client_id) | |
end | |
end | |
class InlineBotSwitchPm < IInlineBotSwitchPm | |
CONSTRUCTOR_ID = 0x3C20629F | |
property text : String | |
property start_param : String | |
def initialize(@text : String, @start_param : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
@start_param.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = String.tl_deserialize(io) | |
start_param = String.tl_deserialize(io) | |
new(text: text, start_param: start_param) | |
end | |
end | |
class InlineQueryPeerTypeBroadcast < IInlineQueryPeerType | |
CONSTRUCTOR_ID = 0x6334EE9A | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InlineQueryPeerTypeChat < IInlineQueryPeerType | |
CONSTRUCTOR_ID = 0xD766C50A | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InlineQueryPeerTypeMegagroup < IInlineQueryPeerType | |
CONSTRUCTOR_ID = 0x5EC4BE43 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InlineQueryPeerTypePm < IInlineQueryPeerType | |
CONSTRUCTOR_ID = 0x833C0FAC | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InlineQueryPeerTypeSameBotPm < IInlineQueryPeerType | |
CONSTRUCTOR_ID = 0x3081ED9D | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputAppEvent < IInputAppEvent | |
CONSTRUCTOR_ID = 0x1D1B1245 | |
property time : Float64 | |
property type : String | |
property peer : Int64 | |
property data : Root::IJsonValue | |
def initialize(@time : Float64, @type : String, @peer : Int64, @data : Root::IJsonValue) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@time.tl_serialize(io) | |
@type.tl_serialize(io) | |
@peer.tl_serialize(io) | |
@data.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
time = Float64.tl_deserialize(io) | |
type = String.tl_deserialize(io) | |
peer = Int64.tl_deserialize(io) | |
data = Root::JsonValue.tl_deserialize(io) | |
new(time: time, type: type, peer: peer, data: data) | |
end | |
end | |
class InputBotInlineMessageGame < IInputBotInlineMessage | |
CONSTRUCTOR_ID = 0x4B425864 | |
property reply_markup : Root::IReplyMarkup? | |
def initialize(@reply_markup : Root::IReplyMarkup? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @reply_markup ? 4 : 0).tl_serialize(io) | |
if reply_markup = @reply_markup | |
reply_markup.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
reply_markup = (flags & 4) != 0 ? Root::ReplyMarkup.tl_deserialize(io) : nil | |
new(reply_markup: reply_markup) | |
end | |
end | |
class InputBotInlineMessageId < IInputBotInlineMessageId | |
CONSTRUCTOR_ID = 0x890C3D89 | |
property dc_id : Int32 | |
property id : Int64 | |
property access_hash : Int64 | |
def initialize(@dc_id : Int32, @id : Int64, @access_hash : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@dc_id.tl_serialize(io) | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
dc_id = Int32.tl_deserialize(io) | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
new(dc_id: dc_id, id: id, access_hash: access_hash) | |
end | |
end | |
class InputBotInlineMessageMediaAuto < IInputBotInlineMessage | |
CONSTRUCTOR_ID = 0x3380C786 | |
property message : String | |
property entities : Array(Root::IMessageEntity)? | |
property reply_markup : Root::IReplyMarkup? | |
def initialize(@message : String, @entities : Array(Root::IMessageEntity)? = nil, @reply_markup : Root::IReplyMarkup? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @entities ? 2 : 0 | @reply_markup ? 4 : 0).tl_serialize(io) | |
@message.tl_serialize(io) | |
if entities = @entities | |
entities.tl_serialize(io) | |
end | |
if reply_markup = @reply_markup | |
reply_markup.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
message = String.tl_deserialize(io) | |
entities = (flags & 2) != 0 ? Array(Root::MessageEntity).tl_deserialize(io) : nil | |
reply_markup = (flags & 4) != 0 ? Root::ReplyMarkup.tl_deserialize(io) : nil | |
new(message: message, entities: entities, reply_markup: reply_markup) | |
end | |
end | |
class InputBotInlineMessageMediaContact < IInputBotInlineMessage | |
CONSTRUCTOR_ID = 0xA6EDBFFD | |
property phone_number : String | |
property first_name : String | |
property last_name : String | |
property vcard : String | |
property reply_markup : Root::IReplyMarkup? | |
def initialize(@phone_number : String, @first_name : String, @last_name : String, @vcard : String, @reply_markup : Root::IReplyMarkup? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @reply_markup ? 4 : 0).tl_serialize(io) | |
@phone_number.tl_serialize(io) | |
@first_name.tl_serialize(io) | |
@last_name.tl_serialize(io) | |
@vcard.tl_serialize(io) | |
if reply_markup = @reply_markup | |
reply_markup.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
phone_number = String.tl_deserialize(io) | |
first_name = String.tl_deserialize(io) | |
last_name = String.tl_deserialize(io) | |
vcard = String.tl_deserialize(io) | |
reply_markup = (flags & 4) != 0 ? Root::ReplyMarkup.tl_deserialize(io) : nil | |
new(phone_number: phone_number, first_name: first_name, last_name: last_name, vcard: vcard, reply_markup: reply_markup) | |
end | |
end | |
class InputBotInlineMessageMediaGeo < IInputBotInlineMessage | |
CONSTRUCTOR_ID = 0x96929A85 | |
property geo_point : Root::IInputGeoPoint | |
property heading : Int32? | |
property period : Int32? | |
property proximity_notification_radius : Int32? | |
property reply_markup : Root::IReplyMarkup? | |
def initialize(@geo_point : Root::IInputGeoPoint, @heading : Int32? = nil, @period : Int32? = nil, @proximity_notification_radius : Int32? = nil, @reply_markup : Root::IReplyMarkup? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @heading ? 1 : 0 | @period ? 2 : 0 | @proximity_notification_radius ? 8 : 0 | @reply_markup ? 4 : 0).tl_serialize(io) | |
@geo_point.tl_serialize(io) | |
if heading = @heading | |
heading.tl_serialize(io) | |
end | |
if period = @period | |
period.tl_serialize(io) | |
end | |
if proximity_notification_radius = @proximity_notification_radius | |
proximity_notification_radius.tl_serialize(io) | |
end | |
if reply_markup = @reply_markup | |
reply_markup.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
geo_point = Root::InputGeoPoint.tl_deserialize(io) | |
heading = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
period = (flags & 2) != 0 ? Int32.tl_deserialize(io) : nil | |
proximity_notification_radius = (flags & 8) != 0 ? Int32.tl_deserialize(io) : nil | |
reply_markup = (flags & 4) != 0 ? Root::ReplyMarkup.tl_deserialize(io) : nil | |
new(geo_point: geo_point, heading: heading, period: period, proximity_notification_radius: proximity_notification_radius, reply_markup: reply_markup) | |
end | |
end | |
class InputBotInlineMessageMediaVenue < IInputBotInlineMessage | |
CONSTRUCTOR_ID = 0x417BBF11 | |
property geo_point : Root::IInputGeoPoint | |
property title : String | |
property address : String | |
property provider : String | |
property venue_id : String | |
property venue_type : String | |
property reply_markup : Root::IReplyMarkup? | |
def initialize(@geo_point : Root::IInputGeoPoint, @title : String, @address : String, @provider : String, @venue_id : String, @venue_type : String, @reply_markup : Root::IReplyMarkup? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @reply_markup ? 4 : 0).tl_serialize(io) | |
@geo_point.tl_serialize(io) | |
@title.tl_serialize(io) | |
@address.tl_serialize(io) | |
@provider.tl_serialize(io) | |
@venue_id.tl_serialize(io) | |
@venue_type.tl_serialize(io) | |
if reply_markup = @reply_markup | |
reply_markup.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
geo_point = Root::InputGeoPoint.tl_deserialize(io) | |
title = String.tl_deserialize(io) | |
address = String.tl_deserialize(io) | |
provider = String.tl_deserialize(io) | |
venue_id = String.tl_deserialize(io) | |
venue_type = String.tl_deserialize(io) | |
reply_markup = (flags & 4) != 0 ? Root::ReplyMarkup.tl_deserialize(io) : nil | |
new(geo_point: geo_point, title: title, address: address, provider: provider, venue_id: venue_id, venue_type: venue_type, reply_markup: reply_markup) | |
end | |
end | |
class InputBotInlineMessageText < IInputBotInlineMessage | |
CONSTRUCTOR_ID = 0x3DCD7A87 | |
property message : String | |
property no_webpage : Bool | |
property entities : Array(Root::IMessageEntity)? | |
property reply_markup : Root::IReplyMarkup? | |
def initialize(@message : String, @no_webpage : Bool = nil, @entities : Array(Root::IMessageEntity)? = nil, @reply_markup : Root::IReplyMarkup? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @no_webpage ? 1 : 0 | @entities ? 2 : 0 | @reply_markup ? 4 : 0).tl_serialize(io) | |
if no_webpage = @no_webpage | |
no_webpage.tl_serialize(io) | |
end | |
@message.tl_serialize(io) | |
if entities = @entities | |
entities.tl_serialize(io) | |
end | |
if reply_markup = @reply_markup | |
reply_markup.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
no_webpage = (flags & 1) != 0 | |
message = String.tl_deserialize(io) | |
entities = (flags & 2) != 0 ? Array(Root::MessageEntity).tl_deserialize(io) : nil | |
reply_markup = (flags & 4) != 0 ? Root::ReplyMarkup.tl_deserialize(io) : nil | |
new(no_webpage: no_webpage, message: message, entities: entities, reply_markup: reply_markup) | |
end | |
end | |
class InputBotInlineResult < IInputBotInlineResult | |
CONSTRUCTOR_ID = 0x88BF9319 | |
property id : String | |
property type : String | |
property send_message : Root::IInputBotInlineMessage | |
property title : String? | |
property description : String? | |
property url : String? | |
property thumb : Root::IInputWebDocument? | |
property content : Root::IInputWebDocument? | |
def initialize(@id : String, @type : String, @send_message : Root::IInputBotInlineMessage, @title : String? = nil, @description : String? = nil, @url : String? = nil, @thumb : Root::IInputWebDocument? = nil, @content : Root::IInputWebDocument? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @title ? 2 : 0 | @description ? 4 : 0 | @url ? 8 : 0 | @thumb ? 16 : 0 | @content ? 32 : 0).tl_serialize(io) | |
@id.tl_serialize(io) | |
@type.tl_serialize(io) | |
if title = @title | |
title.tl_serialize(io) | |
end | |
if description = @description | |
description.tl_serialize(io) | |
end | |
if url = @url | |
url.tl_serialize(io) | |
end | |
if thumb = @thumb | |
thumb.tl_serialize(io) | |
end | |
if content = @content | |
content.tl_serialize(io) | |
end | |
@send_message.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
id = String.tl_deserialize(io) | |
type = String.tl_deserialize(io) | |
title = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
description = (flags & 4) != 0 ? String.tl_deserialize(io) : nil | |
url = (flags & 8) != 0 ? String.tl_deserialize(io) : nil | |
thumb = (flags & 16) != 0 ? Root::InputWebDocument.tl_deserialize(io) : nil | |
content = (flags & 32) != 0 ? Root::InputWebDocument.tl_deserialize(io) : nil | |
send_message = Root::InputBotInlineMessage.tl_deserialize(io) | |
new(id: id, type: type, title: title, description: description, url: url, thumb: thumb, content: content, send_message: send_message) | |
end | |
end | |
class InputBotInlineResultDocument < IInputBotInlineResult | |
CONSTRUCTOR_ID = 0xFFF8FDC4 | |
property id : String | |
property type : String | |
property document : Root::IInputDocument | |
property send_message : Root::IInputBotInlineMessage | |
property title : String? | |
property description : String? | |
def initialize(@id : String, @type : String, @document : Root::IInputDocument, @send_message : Root::IInputBotInlineMessage, @title : String? = nil, @description : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @title ? 2 : 0 | @description ? 4 : 0).tl_serialize(io) | |
@id.tl_serialize(io) | |
@type.tl_serialize(io) | |
if title = @title | |
title.tl_serialize(io) | |
end | |
if description = @description | |
description.tl_serialize(io) | |
end | |
@document.tl_serialize(io) | |
@send_message.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
id = String.tl_deserialize(io) | |
type = String.tl_deserialize(io) | |
title = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
description = (flags & 4) != 0 ? String.tl_deserialize(io) : nil | |
document = Root::InputDocument.tl_deserialize(io) | |
send_message = Root::InputBotInlineMessage.tl_deserialize(io) | |
new(id: id, type: type, title: title, description: description, document: document, send_message: send_message) | |
end | |
end | |
class InputBotInlineResultGame < IInputBotInlineResult | |
CONSTRUCTOR_ID = 0x4FA417F2 | |
property id : String | |
property short_name : String | |
property send_message : Root::IInputBotInlineMessage | |
def initialize(@id : String, @short_name : String, @send_message : Root::IInputBotInlineMessage) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@short_name.tl_serialize(io) | |
@send_message.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = String.tl_deserialize(io) | |
short_name = String.tl_deserialize(io) | |
send_message = Root::InputBotInlineMessage.tl_deserialize(io) | |
new(id: id, short_name: short_name, send_message: send_message) | |
end | |
end | |
class InputBotInlineResultPhoto < IInputBotInlineResult | |
CONSTRUCTOR_ID = 0xA8D864A7 | |
property id : String | |
property type : String | |
property photo : Root::IInputPhoto | |
property send_message : Root::IInputBotInlineMessage | |
def initialize(@id : String, @type : String, @photo : Root::IInputPhoto, @send_message : Root::IInputBotInlineMessage) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@type.tl_serialize(io) | |
@photo.tl_serialize(io) | |
@send_message.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = String.tl_deserialize(io) | |
type = String.tl_deserialize(io) | |
photo = Root::InputPhoto.tl_deserialize(io) | |
send_message = Root::InputBotInlineMessage.tl_deserialize(io) | |
new(id: id, type: type, photo: photo, send_message: send_message) | |
end | |
end | |
class InputChannel < IInputChannel | |
CONSTRUCTOR_ID = 0xAFEB712E | |
property channel_id : Int32 | |
property access_hash : Int64 | |
def initialize(@channel_id : Int32, @access_hash : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@channel_id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
channel_id = Int32.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
new(channel_id: channel_id, access_hash: access_hash) | |
end | |
end | |
class InputChannelEmpty < IInputChannel | |
CONSTRUCTOR_ID = 0xEE8C1E86 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputChannelFromMessage < IInputChannel | |
CONSTRUCTOR_ID = 0x2A286531 | |
property peer : Root::IInputPeer | |
property msg_id : Int32 | |
property channel_id : Int32 | |
def initialize(@peer : Root::IInputPeer, @msg_id : Int32, @channel_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peer.tl_serialize(io) | |
@msg_id.tl_serialize(io) | |
@channel_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peer = Root::InputPeer.tl_deserialize(io) | |
msg_id = Int32.tl_deserialize(io) | |
channel_id = Int32.tl_deserialize(io) | |
new(peer: peer, msg_id: msg_id, channel_id: channel_id) | |
end | |
end | |
class InputChatPhoto < IInputChatPhoto | |
CONSTRUCTOR_ID = 0x8953AD37 | |
property id : Root::IInputPhoto | |
def initialize(@id : Root::IInputPhoto) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Root::InputPhoto.tl_deserialize(io) | |
new(id: id) | |
end | |
end | |
class InputChatPhotoEmpty < IInputChatPhoto | |
CONSTRUCTOR_ID = 0x1CA48F57 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputChatUploadedPhoto < IInputChatPhoto | |
CONSTRUCTOR_ID = 0xC642724E | |
property file : Root::IInputFile? | |
property video : Root::IInputFile? | |
property video_start_ts : Float64? | |
def initialize(@file : Root::IInputFile? = nil, @video : Root::IInputFile? = nil, @video_start_ts : Float64? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @file ? 1 : 0 | @video ? 2 : 0 | @video_start_ts ? 4 : 0).tl_serialize(io) | |
if file = @file | |
file.tl_serialize(io) | |
end | |
if video = @video | |
video.tl_serialize(io) | |
end | |
if video_start_ts = @video_start_ts | |
video_start_ts.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
file = (flags & 1) != 0 ? Root::InputFile.tl_deserialize(io) : nil | |
video = (flags & 2) != 0 ? Root::InputFile.tl_deserialize(io) : nil | |
video_start_ts = (flags & 4) != 0 ? Float64.tl_deserialize(io) : nil | |
new(file: file, video: video, video_start_ts: video_start_ts) | |
end | |
end | |
class InputCheckPasswordEmpty < IInputCheckPasswordSrp | |
CONSTRUCTOR_ID = 0x9880F658 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputCheckPasswordSrp < IInputCheckPasswordSrp | |
CONSTRUCTOR_ID = 0xD27FF082 | |
property srp_id : Int64 | |
property a : Bytes | |
property m1 : Bytes | |
def initialize(@srp_id : Int64, @a : Bytes, @m1 : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@srp_id.tl_serialize(io) | |
@a.tl_serialize(io) | |
@m1.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
srp_id = Int64.tl_deserialize(io) | |
a = Bytes.tl_deserialize(io) | |
m1 = Bytes.tl_deserialize(io) | |
new(srp_id: srp_id, a: a, m1: m1) | |
end | |
end | |
class InputClientProxy < IInputClientProxy | |
CONSTRUCTOR_ID = 0x75588B3F | |
property address : String | |
property port : Int32 | |
def initialize(@address : String, @port : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@address.tl_serialize(io) | |
@port.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
address = String.tl_deserialize(io) | |
port = Int32.tl_deserialize(io) | |
new(address: address, port: port) | |
end | |
end | |
class InputDialogPeer < IInputDialogPeer | |
CONSTRUCTOR_ID = 0xFCAAFEB7 | |
property peer : Root::IInputPeer | |
def initialize(@peer : Root::IInputPeer) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peer.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peer = Root::InputPeer.tl_deserialize(io) | |
new(peer: peer) | |
end | |
end | |
class InputDialogPeerFolder < IInputDialogPeer | |
CONSTRUCTOR_ID = 0x64600527 | |
property folder_id : Int32 | |
def initialize(@folder_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@folder_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
folder_id = Int32.tl_deserialize(io) | |
new(folder_id: folder_id) | |
end | |
end | |
class InputDocument < IInputDocument | |
CONSTRUCTOR_ID = 0x1ABFB575 | |
property id : Int64 | |
property access_hash : Int64 | |
property file_reference : Bytes | |
def initialize(@id : Int64, @access_hash : Int64, @file_reference : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@file_reference.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
file_reference = Bytes.tl_deserialize(io) | |
new(id: id, access_hash: access_hash, file_reference: file_reference) | |
end | |
end | |
class InputDocumentEmpty < IInputDocument | |
CONSTRUCTOR_ID = 0x72F0EAAE | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputDocumentFileLocation < IInputFileLocation | |
CONSTRUCTOR_ID = 0xBAD07584 | |
property id : Int64 | |
property access_hash : Int64 | |
property file_reference : Bytes | |
property thumb_size : String | |
def initialize(@id : Int64, @access_hash : Int64, @file_reference : Bytes, @thumb_size : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@file_reference.tl_serialize(io) | |
@thumb_size.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
file_reference = Bytes.tl_deserialize(io) | |
thumb_size = String.tl_deserialize(io) | |
new(id: id, access_hash: access_hash, file_reference: file_reference, thumb_size: thumb_size) | |
end | |
end | |
class InputEncryptedChat < IInputEncryptedChat | |
CONSTRUCTOR_ID = 0xF141B5E1 | |
property chat_id : Int32 | |
property access_hash : Int64 | |
def initialize(@chat_id : Int32, @access_hash : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@chat_id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
chat_id = Int32.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
new(chat_id: chat_id, access_hash: access_hash) | |
end | |
end | |
class InputEncryptedFile < IInputEncryptedFile | |
CONSTRUCTOR_ID = 0x5A17B5E5 | |
property id : Int64 | |
property access_hash : Int64 | |
def initialize(@id : Int64, @access_hash : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
new(id: id, access_hash: access_hash) | |
end | |
end | |
class InputEncryptedFileBigUploaded < IInputEncryptedFile | |
CONSTRUCTOR_ID = 0x2DC173C8 | |
property id : Int64 | |
property parts : Int32 | |
property key_fingerprint : Int32 | |
def initialize(@id : Int64, @parts : Int32, @key_fingerprint : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@parts.tl_serialize(io) | |
@key_fingerprint.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
parts = Int32.tl_deserialize(io) | |
key_fingerprint = Int32.tl_deserialize(io) | |
new(id: id, parts: parts, key_fingerprint: key_fingerprint) | |
end | |
end | |
class InputEncryptedFileEmpty < IInputEncryptedFile | |
CONSTRUCTOR_ID = 0x1837C364 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputEncryptedFileLocation < IInputFileLocation | |
CONSTRUCTOR_ID = 0xF5235D55 | |
property id : Int64 | |
property access_hash : Int64 | |
def initialize(@id : Int64, @access_hash : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
new(id: id, access_hash: access_hash) | |
end | |
end | |
class InputEncryptedFileUploaded < IInputEncryptedFile | |
CONSTRUCTOR_ID = 0x64BD0306 | |
property id : Int64 | |
property parts : Int32 | |
property md5_checksum : String | |
property key_fingerprint : Int32 | |
def initialize(@id : Int64, @parts : Int32, @md5_checksum : String, @key_fingerprint : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@parts.tl_serialize(io) | |
@md5_checksum.tl_serialize(io) | |
@key_fingerprint.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
parts = Int32.tl_deserialize(io) | |
md5_checksum = String.tl_deserialize(io) | |
key_fingerprint = Int32.tl_deserialize(io) | |
new(id: id, parts: parts, md5_checksum: md5_checksum, key_fingerprint: key_fingerprint) | |
end | |
end | |
class InputFile < IInputFile | |
CONSTRUCTOR_ID = 0xF52FF27F | |
property id : Int64 | |
property parts : Int32 | |
property name : String | |
property md5_checksum : String | |
def initialize(@id : Int64, @parts : Int32, @name : String, @md5_checksum : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@parts.tl_serialize(io) | |
@name.tl_serialize(io) | |
@md5_checksum.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
parts = Int32.tl_deserialize(io) | |
name = String.tl_deserialize(io) | |
md5_checksum = String.tl_deserialize(io) | |
new(id: id, parts: parts, name: name, md5_checksum: md5_checksum) | |
end | |
end | |
class InputFileBig < IInputFile | |
CONSTRUCTOR_ID = 0xFA4F0BB5 | |
property id : Int64 | |
property parts : Int32 | |
property name : String | |
def initialize(@id : Int64, @parts : Int32, @name : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@parts.tl_serialize(io) | |
@name.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
parts = Int32.tl_deserialize(io) | |
name = String.tl_deserialize(io) | |
new(id: id, parts: parts, name: name) | |
end | |
end | |
class InputFileLocation < IInputFileLocation | |
CONSTRUCTOR_ID = 0xDFDAABE1 | |
property volume_id : Int64 | |
property local_id : Int32 | |
property secret : Int64 | |
property file_reference : Bytes | |
def initialize(@volume_id : Int64, @local_id : Int32, @secret : Int64, @file_reference : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@volume_id.tl_serialize(io) | |
@local_id.tl_serialize(io) | |
@secret.tl_serialize(io) | |
@file_reference.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
volume_id = Int64.tl_deserialize(io) | |
local_id = Int32.tl_deserialize(io) | |
secret = Int64.tl_deserialize(io) | |
file_reference = Bytes.tl_deserialize(io) | |
new(volume_id: volume_id, local_id: local_id, secret: secret, file_reference: file_reference) | |
end | |
end | |
class InputFolderPeer < IInputFolderPeer | |
CONSTRUCTOR_ID = 0xFBD2C296 | |
property peer : Root::IInputPeer | |
property folder_id : Int32 | |
def initialize(@peer : Root::IInputPeer, @folder_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peer.tl_serialize(io) | |
@folder_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peer = Root::InputPeer.tl_deserialize(io) | |
folder_id = Int32.tl_deserialize(io) | |
new(peer: peer, folder_id: folder_id) | |
end | |
end | |
class InputGameId < IInputGame | |
CONSTRUCTOR_ID = 0x032C3E77 | |
property id : Int64 | |
property access_hash : Int64 | |
def initialize(@id : Int64, @access_hash : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
new(id: id, access_hash: access_hash) | |
end | |
end | |
class InputGameShortName < IInputGame | |
CONSTRUCTOR_ID = 0xC331E80A | |
property bot_id : Root::IInputUser | |
property short_name : String | |
def initialize(@bot_id : Root::IInputUser, @short_name : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@bot_id.tl_serialize(io) | |
@short_name.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
bot_id = Root::InputUser.tl_deserialize(io) | |
short_name = String.tl_deserialize(io) | |
new(bot_id: bot_id, short_name: short_name) | |
end | |
end | |
class InputGeoPoint < IInputGeoPoint | |
CONSTRUCTOR_ID = 0x48222FAF | |
property lat : Float64 | |
property long : Float64 | |
property accuracy_radius : Int32? | |
def initialize(@lat : Float64, @long : Float64, @accuracy_radius : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @accuracy_radius ? 1 : 0).tl_serialize(io) | |
@lat.tl_serialize(io) | |
@long.tl_serialize(io) | |
if accuracy_radius = @accuracy_radius | |
accuracy_radius.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
lat = Float64.tl_deserialize(io) | |
long = Float64.tl_deserialize(io) | |
accuracy_radius = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
new(lat: lat, long: long, accuracy_radius: accuracy_radius) | |
end | |
end | |
class InputGeoPointEmpty < IInputGeoPoint | |
CONSTRUCTOR_ID = 0xE4C123D6 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputGroupCall < IInputGroupCall | |
CONSTRUCTOR_ID = 0xD8AA840F | |
property id : Int64 | |
property access_hash : Int64 | |
def initialize(@id : Int64, @access_hash : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
new(id: id, access_hash: access_hash) | |
end | |
end | |
class InputKeyboardButtonUrlAuth < IKeyboardButton | |
CONSTRUCTOR_ID = 0xD02E7FD4 | |
property text : String | |
property url : String | |
property bot : Root::IInputUser | |
property request_write_access : Bool | |
property fwd_text : String? | |
def initialize(@text : String, @url : String, @bot : Root::IInputUser, @request_write_access : Bool = nil, @fwd_text : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @request_write_access ? 1 : 0 | @fwd_text ? 2 : 0).tl_serialize(io) | |
if request_write_access = @request_write_access | |
request_write_access.tl_serialize(io) | |
end | |
@text.tl_serialize(io) | |
if fwd_text = @fwd_text | |
fwd_text.tl_serialize(io) | |
end | |
@url.tl_serialize(io) | |
@bot.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
request_write_access = (flags & 1) != 0 | |
text = String.tl_deserialize(io) | |
fwd_text = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
url = String.tl_deserialize(io) | |
bot = Root::InputUser.tl_deserialize(io) | |
new(request_write_access: request_write_access, text: text, fwd_text: fwd_text, url: url, bot: bot) | |
end | |
end | |
class InputMediaContact < IInputMedia | |
CONSTRUCTOR_ID = 0xF8AB7DFB | |
property phone_number : String | |
property first_name : String | |
property last_name : String | |
property vcard : String | |
def initialize(@phone_number : String, @first_name : String, @last_name : String, @vcard : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@phone_number.tl_serialize(io) | |
@first_name.tl_serialize(io) | |
@last_name.tl_serialize(io) | |
@vcard.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
phone_number = String.tl_deserialize(io) | |
first_name = String.tl_deserialize(io) | |
last_name = String.tl_deserialize(io) | |
vcard = String.tl_deserialize(io) | |
new(phone_number: phone_number, first_name: first_name, last_name: last_name, vcard: vcard) | |
end | |
end | |
class InputMediaDice < IInputMedia | |
CONSTRUCTOR_ID = 0xE66FBF7B | |
property emoticon : String | |
def initialize(@emoticon : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@emoticon.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
emoticon = String.tl_deserialize(io) | |
new(emoticon: emoticon) | |
end | |
end | |
class InputMediaDocument < IInputMedia | |
CONSTRUCTOR_ID = 0x33473058 | |
property id : Root::IInputDocument | |
property ttl_seconds : Int32? | |
property query : String? | |
def initialize(@id : Root::IInputDocument, @ttl_seconds : Int32? = nil, @query : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @ttl_seconds ? 1 : 0 | @query ? 2 : 0).tl_serialize(io) | |
@id.tl_serialize(io) | |
if ttl_seconds = @ttl_seconds | |
ttl_seconds.tl_serialize(io) | |
end | |
if query = @query | |
query.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
id = Root::InputDocument.tl_deserialize(io) | |
ttl_seconds = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
query = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
new(id: id, ttl_seconds: ttl_seconds, query: query) | |
end | |
end | |
class InputMediaDocumentExternal < IInputMedia | |
CONSTRUCTOR_ID = 0xFB52DC99 | |
property url : String | |
property ttl_seconds : Int32? | |
def initialize(@url : String, @ttl_seconds : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @ttl_seconds ? 1 : 0).tl_serialize(io) | |
@url.tl_serialize(io) | |
if ttl_seconds = @ttl_seconds | |
ttl_seconds.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
url = String.tl_deserialize(io) | |
ttl_seconds = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
new(url: url, ttl_seconds: ttl_seconds) | |
end | |
end | |
class InputMediaEmpty < IInputMedia | |
CONSTRUCTOR_ID = 0x9664F57F | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputMediaGame < IInputMedia | |
CONSTRUCTOR_ID = 0xD33F43F3 | |
property id : Root::IInputGame | |
def initialize(@id : Root::IInputGame) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Root::InputGame.tl_deserialize(io) | |
new(id: id) | |
end | |
end | |
class InputMediaGeoLive < IInputMedia | |
CONSTRUCTOR_ID = 0x971FA843 | |
property geo_point : Root::IInputGeoPoint | |
property stopped : Bool | |
property heading : Int32? | |
property period : Int32? | |
property proximity_notification_radius : Int32? | |
def initialize(@geo_point : Root::IInputGeoPoint, @stopped : Bool = nil, @heading : Int32? = nil, @period : Int32? = nil, @proximity_notification_radius : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @stopped ? 1 : 0 | @heading ? 4 : 0 | @period ? 2 : 0 | @proximity_notification_radius ? 8 : 0).tl_serialize(io) | |
if stopped = @stopped | |
stopped.tl_serialize(io) | |
end | |
@geo_point.tl_serialize(io) | |
if heading = @heading | |
heading.tl_serialize(io) | |
end | |
if period = @period | |
period.tl_serialize(io) | |
end | |
if proximity_notification_radius = @proximity_notification_radius | |
proximity_notification_radius.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
stopped = (flags & 1) != 0 | |
geo_point = Root::InputGeoPoint.tl_deserialize(io) | |
heading = (flags & 4) != 0 ? Int32.tl_deserialize(io) : nil | |
period = (flags & 2) != 0 ? Int32.tl_deserialize(io) : nil | |
proximity_notification_radius = (flags & 8) != 0 ? Int32.tl_deserialize(io) : nil | |
new(stopped: stopped, geo_point: geo_point, heading: heading, period: period, proximity_notification_radius: proximity_notification_radius) | |
end | |
end | |
class InputMediaGeoPoint < IInputMedia | |
CONSTRUCTOR_ID = 0xF9C44144 | |
property geo_point : Root::IInputGeoPoint | |
def initialize(@geo_point : Root::IInputGeoPoint) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@geo_point.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
geo_point = Root::InputGeoPoint.tl_deserialize(io) | |
new(geo_point: geo_point) | |
end | |
end | |
class InputMediaInvoice < IInputMedia | |
CONSTRUCTOR_ID = 0xF4E096C3 | |
property title : String | |
property description : String | |
property invoice : Root::IInvoice | |
property payload : Bytes | |
property provider : String | |
property provider_data : Root::IDataJson | |
property start_param : String | |
property photo : Root::IInputWebDocument? | |
def initialize(@title : String, @description : String, @invoice : Root::IInvoice, @payload : Bytes, @provider : String, @provider_data : Root::IDataJson, @start_param : String, @photo : Root::IInputWebDocument? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @photo ? 1 : 0).tl_serialize(io) | |
@title.tl_serialize(io) | |
@description.tl_serialize(io) | |
if photo = @photo | |
photo.tl_serialize(io) | |
end | |
@invoice.tl_serialize(io) | |
@payload.tl_serialize(io) | |
@provider.tl_serialize(io) | |
@provider_data.tl_serialize(io) | |
@start_param.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
title = String.tl_deserialize(io) | |
description = String.tl_deserialize(io) | |
photo = (flags & 1) != 0 ? Root::InputWebDocument.tl_deserialize(io) : nil | |
invoice = Root::Invoice.tl_deserialize(io) | |
payload = Bytes.tl_deserialize(io) | |
provider = String.tl_deserialize(io) | |
provider_data = Root::DataJson.tl_deserialize(io) | |
start_param = String.tl_deserialize(io) | |
new(title: title, description: description, photo: photo, invoice: invoice, payload: payload, provider: provider, provider_data: provider_data, start_param: start_param) | |
end | |
end | |
class InputMediaPhoto < IInputMedia | |
CONSTRUCTOR_ID = 0xB3BA0635 | |
property id : Root::IInputPhoto | |
property ttl_seconds : Int32? | |
def initialize(@id : Root::IInputPhoto, @ttl_seconds : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @ttl_seconds ? 1 : 0).tl_serialize(io) | |
@id.tl_serialize(io) | |
if ttl_seconds = @ttl_seconds | |
ttl_seconds.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
id = Root::InputPhoto.tl_deserialize(io) | |
ttl_seconds = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
new(id: id, ttl_seconds: ttl_seconds) | |
end | |
end | |
class InputMediaPhotoExternal < IInputMedia | |
CONSTRUCTOR_ID = 0xE5BBFE1A | |
property url : String | |
property ttl_seconds : Int32? | |
def initialize(@url : String, @ttl_seconds : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @ttl_seconds ? 1 : 0).tl_serialize(io) | |
@url.tl_serialize(io) | |
if ttl_seconds = @ttl_seconds | |
ttl_seconds.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
url = String.tl_deserialize(io) | |
ttl_seconds = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
new(url: url, ttl_seconds: ttl_seconds) | |
end | |
end | |
class InputMediaPoll < IInputMedia | |
CONSTRUCTOR_ID = 0x0F94E5F1 | |
property poll : Root::IPoll | |
property correct_answers : Array(Bytes)? | |
property solution : String? | |
property solution_entities : Array(Root::IMessageEntity)? | |
def initialize(@poll : Root::IPoll, @correct_answers : Array(Bytes)? = nil, @solution : String? = nil, @solution_entities : Array(Root::IMessageEntity)? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @correct_answers ? 1 : 0 | @solution ? 2 : 0 | @solution_entities ? 2 : 0).tl_serialize(io) | |
@poll.tl_serialize(io) | |
if correct_answers = @correct_answers | |
correct_answers.tl_serialize(io) | |
end | |
if solution = @solution | |
solution.tl_serialize(io) | |
end | |
if solution_entities = @solution_entities | |
solution_entities.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
poll = Root::Poll.tl_deserialize(io) | |
correct_answers = (flags & 1) != 0 ? Array(Bytes).tl_deserialize(io) : nil | |
solution = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
solution_entities = (flags & 2) != 0 ? Array(Root::MessageEntity).tl_deserialize(io) : nil | |
new(poll: poll, correct_answers: correct_answers, solution: solution, solution_entities: solution_entities) | |
end | |
end | |
class InputMediaUploadedDocument < IInputMedia | |
CONSTRUCTOR_ID = 0x5B38C6C1 | |
property file : Root::IInputFile | |
property mime_type : String | |
property attributes : Array(Root::IDocumentAttribute) | |
property nosound_video : Bool | |
property force_file : Bool | |
property thumb : Root::IInputFile? | |
property stickers : Array(Root::IInputDocument)? | |
property ttl_seconds : Int32? | |
def initialize(@file : Root::IInputFile, @mime_type : String, @attributes : Array(Root::IDocumentAttribute), @nosound_video : Bool = nil, @force_file : Bool = nil, @thumb : Root::IInputFile? = nil, @stickers : Array(Root::IInputDocument)? = nil, @ttl_seconds : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @nosound_video ? 8 : 0 | @force_file ? 16 : 0 | @thumb ? 4 : 0 | @stickers ? 1 : 0 | @ttl_seconds ? 2 : 0).tl_serialize(io) | |
if nosound_video = @nosound_video | |
nosound_video.tl_serialize(io) | |
end | |
if force_file = @force_file | |
force_file.tl_serialize(io) | |
end | |
@file.tl_serialize(io) | |
if thumb = @thumb | |
thumb.tl_serialize(io) | |
end | |
@mime_type.tl_serialize(io) | |
@attributes.tl_serialize(io) | |
if stickers = @stickers | |
stickers.tl_serialize(io) | |
end | |
if ttl_seconds = @ttl_seconds | |
ttl_seconds.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
nosound_video = (flags & 8) != 0 | |
force_file = (flags & 16) != 0 | |
file = Root::InputFile.tl_deserialize(io) | |
thumb = (flags & 4) != 0 ? Root::InputFile.tl_deserialize(io) : nil | |
mime_type = String.tl_deserialize(io) | |
attributes = Array(Root::DocumentAttribute).tl_deserialize(io) | |
stickers = (flags & 1) != 0 ? Array(Root::InputDocument).tl_deserialize(io) : nil | |
ttl_seconds = (flags & 2) != 0 ? Int32.tl_deserialize(io) : nil | |
new(nosound_video: nosound_video, force_file: force_file, file: file, thumb: thumb, mime_type: mime_type, attributes: attributes, stickers: stickers, ttl_seconds: ttl_seconds) | |
end | |
end | |
class InputMediaUploadedPhoto < IInputMedia | |
CONSTRUCTOR_ID = 0x1E287D04 | |
property file : Root::IInputFile | |
property stickers : Array(Root::IInputDocument)? | |
property ttl_seconds : Int32? | |
def initialize(@file : Root::IInputFile, @stickers : Array(Root::IInputDocument)? = nil, @ttl_seconds : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @stickers ? 1 : 0 | @ttl_seconds ? 2 : 0).tl_serialize(io) | |
@file.tl_serialize(io) | |
if stickers = @stickers | |
stickers.tl_serialize(io) | |
end | |
if ttl_seconds = @ttl_seconds | |
ttl_seconds.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
file = Root::InputFile.tl_deserialize(io) | |
stickers = (flags & 1) != 0 ? Array(Root::InputDocument).tl_deserialize(io) : nil | |
ttl_seconds = (flags & 2) != 0 ? Int32.tl_deserialize(io) : nil | |
new(file: file, stickers: stickers, ttl_seconds: ttl_seconds) | |
end | |
end | |
class InputMediaVenue < IInputMedia | |
CONSTRUCTOR_ID = 0xC13D1C11 | |
property geo_point : Root::IInputGeoPoint | |
property title : String | |
property address : String | |
property provider : String | |
property venue_id : String | |
property venue_type : String | |
def initialize(@geo_point : Root::IInputGeoPoint, @title : String, @address : String, @provider : String, @venue_id : String, @venue_type : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@geo_point.tl_serialize(io) | |
@title.tl_serialize(io) | |
@address.tl_serialize(io) | |
@provider.tl_serialize(io) | |
@venue_id.tl_serialize(io) | |
@venue_type.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
geo_point = Root::InputGeoPoint.tl_deserialize(io) | |
title = String.tl_deserialize(io) | |
address = String.tl_deserialize(io) | |
provider = String.tl_deserialize(io) | |
venue_id = String.tl_deserialize(io) | |
venue_type = String.tl_deserialize(io) | |
new(geo_point: geo_point, title: title, address: address, provider: provider, venue_id: venue_id, venue_type: venue_type) | |
end | |
end | |
class InputMessageCallbackQuery < IInputMessage | |
CONSTRUCTOR_ID = 0xACFA1A7E | |
property id : Int32 | |
property query_id : Int64 | |
def initialize(@id : Int32, @query_id : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@query_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int32.tl_deserialize(io) | |
query_id = Int64.tl_deserialize(io) | |
new(id: id, query_id: query_id) | |
end | |
end | |
class InputMessageEntityMentionName < IMessageEntity | |
CONSTRUCTOR_ID = 0x208E68C9 | |
property offset : Int32 | |
property length : Int32 | |
property user_id : Root::IInputUser | |
def initialize(@offset : Int32, @length : Int32, @user_id : Root::IInputUser) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@offset.tl_serialize(io) | |
@length.tl_serialize(io) | |
@user_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
offset = Int32.tl_deserialize(io) | |
length = Int32.tl_deserialize(io) | |
user_id = Root::InputUser.tl_deserialize(io) | |
new(offset: offset, length: length, user_id: user_id) | |
end | |
end | |
class InputMessageId < IInputMessage | |
CONSTRUCTOR_ID = 0xA676A322 | |
property id : Int32 | |
def initialize(@id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int32.tl_deserialize(io) | |
new(id: id) | |
end | |
end | |
class InputMessagePinned < IInputMessage | |
CONSTRUCTOR_ID = 0x86872538 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputMessageReplyTo < IInputMessage | |
CONSTRUCTOR_ID = 0xBAD88395 | |
property id : Int32 | |
def initialize(@id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int32.tl_deserialize(io) | |
new(id: id) | |
end | |
end | |
class InputMessagesFilterChatPhotos < IMessagesFilter | |
CONSTRUCTOR_ID = 0x3A20ECB8 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputMessagesFilterContacts < IMessagesFilter | |
CONSTRUCTOR_ID = 0xE062DB83 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputMessagesFilterDocument < IMessagesFilter | |
CONSTRUCTOR_ID = 0x9EDDF188 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputMessagesFilterEmpty < IMessagesFilter | |
CONSTRUCTOR_ID = 0x57E2F66C | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputMessagesFilterGeo < IMessagesFilter | |
CONSTRUCTOR_ID = 0xE7026D0D | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputMessagesFilterGif < IMessagesFilter | |
CONSTRUCTOR_ID = 0xFFC86587 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputMessagesFilterMusic < IMessagesFilter | |
CONSTRUCTOR_ID = 0x3751B49E | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputMessagesFilterMyMentions < IMessagesFilter | |
CONSTRUCTOR_ID = 0xC1F8E69A | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputMessagesFilterPhoneCalls < IMessagesFilter | |
CONSTRUCTOR_ID = 0x80C99768 | |
property missed : Bool | |
def initialize(@missed : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @missed ? 1 : 0).tl_serialize(io) | |
if missed = @missed | |
missed.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
missed = (flags & 1) != 0 | |
new(missed: missed) | |
end | |
end | |
class InputMessagesFilterPhotoVideo < IMessagesFilter | |
CONSTRUCTOR_ID = 0x56E9F0E4 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputMessagesFilterPhotos < IMessagesFilter | |
CONSTRUCTOR_ID = 0x9609A51C | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputMessagesFilterPinned < IMessagesFilter | |
CONSTRUCTOR_ID = 0x1BB00451 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputMessagesFilterRoundVideo < IMessagesFilter | |
CONSTRUCTOR_ID = 0xB549DA53 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputMessagesFilterRoundVoice < IMessagesFilter | |
CONSTRUCTOR_ID = 0x7A7C17A4 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputMessagesFilterUrl < IMessagesFilter | |
CONSTRUCTOR_ID = 0x7EF0DD87 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputMessagesFilterVideo < IMessagesFilter | |
CONSTRUCTOR_ID = 0x9FC00E65 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputMessagesFilterVoice < IMessagesFilter | |
CONSTRUCTOR_ID = 0x50F5C392 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputNotifyBroadcasts < IInputNotifyPeer | |
CONSTRUCTOR_ID = 0xB1DB7C7E | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputNotifyChats < IInputNotifyPeer | |
CONSTRUCTOR_ID = 0x4A95E84E | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputNotifyPeer < IInputNotifyPeer | |
CONSTRUCTOR_ID = 0xB8BC5B0C | |
property peer : Root::IInputPeer | |
def initialize(@peer : Root::IInputPeer) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peer.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peer = Root::InputPeer.tl_deserialize(io) | |
new(peer: peer) | |
end | |
end | |
class InputNotifyUsers < IInputNotifyPeer | |
CONSTRUCTOR_ID = 0x193B4417 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputPaymentCredentials < IInputPaymentCredentials | |
CONSTRUCTOR_ID = 0x3417D728 | |
property data : Root::IDataJson | |
property save : Bool | |
def initialize(@data : Root::IDataJson, @save : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @save ? 1 : 0).tl_serialize(io) | |
if save = @save | |
save.tl_serialize(io) | |
end | |
@data.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
save = (flags & 1) != 0 | |
data = Root::DataJson.tl_deserialize(io) | |
new(save: save, data: data) | |
end | |
end | |
class InputPaymentCredentialsAndroidPay < IInputPaymentCredentials | |
CONSTRUCTOR_ID = 0xCA05D50E | |
property payment_token : Root::IDataJson | |
property google_transaction_id : String | |
def initialize(@payment_token : Root::IDataJson, @google_transaction_id : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@payment_token.tl_serialize(io) | |
@google_transaction_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
payment_token = Root::DataJson.tl_deserialize(io) | |
google_transaction_id = String.tl_deserialize(io) | |
new(payment_token: payment_token, google_transaction_id: google_transaction_id) | |
end | |
end | |
class InputPaymentCredentialsApplePay < IInputPaymentCredentials | |
CONSTRUCTOR_ID = 0x0AA1C39F | |
property payment_data : Root::IDataJson | |
def initialize(@payment_data : Root::IDataJson) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@payment_data.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
payment_data = Root::DataJson.tl_deserialize(io) | |
new(payment_data: payment_data) | |
end | |
end | |
class InputPaymentCredentialsSaved < IInputPaymentCredentials | |
CONSTRUCTOR_ID = 0xC10EB2CF | |
property id : String | |
property tmp_password : Bytes | |
def initialize(@id : String, @tmp_password : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@tmp_password.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = String.tl_deserialize(io) | |
tmp_password = Bytes.tl_deserialize(io) | |
new(id: id, tmp_password: tmp_password) | |
end | |
end | |
class InputPeerChannel < IInputPeer | |
CONSTRUCTOR_ID = 0x20ADAEF8 | |
property channel_id : Int32 | |
property access_hash : Int64 | |
def initialize(@channel_id : Int32, @access_hash : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@channel_id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
channel_id = Int32.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
new(channel_id: channel_id, access_hash: access_hash) | |
end | |
end | |
class InputPeerChannelFromMessage < IInputPeer | |
CONSTRUCTOR_ID = 0x9C95F7BB | |
property peer : Root::IInputPeer | |
property msg_id : Int32 | |
property channel_id : Int32 | |
def initialize(@peer : Root::IInputPeer, @msg_id : Int32, @channel_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peer.tl_serialize(io) | |
@msg_id.tl_serialize(io) | |
@channel_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peer = Root::InputPeer.tl_deserialize(io) | |
msg_id = Int32.tl_deserialize(io) | |
channel_id = Int32.tl_deserialize(io) | |
new(peer: peer, msg_id: msg_id, channel_id: channel_id) | |
end | |
end | |
class InputPeerChat < IInputPeer | |
CONSTRUCTOR_ID = 0x179BE863 | |
property chat_id : Int32 | |
def initialize(@chat_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@chat_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
chat_id = Int32.tl_deserialize(io) | |
new(chat_id: chat_id) | |
end | |
end | |
class InputPeerEmpty < IInputPeer | |
CONSTRUCTOR_ID = 0x7F3B18EA | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputPeerNotifySettings < IInputPeerNotifySettings | |
CONSTRUCTOR_ID = 0x9C3D198E | |
property show_previews : Bool? | |
property silent : Bool? | |
property mute_until : Int32? | |
property sound : String? | |
def initialize(@show_previews : Bool? = nil, @silent : Bool? = nil, @mute_until : Int32? = nil, @sound : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @show_previews ? 1 : 0 | @silent ? 2 : 0 | @mute_until ? 4 : 0 | @sound ? 8 : 0).tl_serialize(io) | |
if show_previews = @show_previews | |
show_previews.tl_serialize(io) | |
end | |
if silent = @silent | |
silent.tl_serialize(io) | |
end | |
if mute_until = @mute_until | |
mute_until.tl_serialize(io) | |
end | |
if sound = @sound | |
sound.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
show_previews = (flags & 1) != 0 ? Bool.tl_deserialize(io) : nil | |
silent = (flags & 2) != 0 ? Bool.tl_deserialize(io) : nil | |
mute_until = (flags & 4) != 0 ? Int32.tl_deserialize(io) : nil | |
sound = (flags & 8) != 0 ? String.tl_deserialize(io) : nil | |
new(show_previews: show_previews, silent: silent, mute_until: mute_until, sound: sound) | |
end | |
end | |
class InputPeerPhotoFileLocation < IInputFileLocation | |
CONSTRUCTOR_ID = 0x27D69997 | |
property peer : Root::IInputPeer | |
property volume_id : Int64 | |
property local_id : Int32 | |
property big : Bool | |
def initialize(@peer : Root::IInputPeer, @volume_id : Int64, @local_id : Int32, @big : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @big ? 1 : 0).tl_serialize(io) | |
if big = @big | |
big.tl_serialize(io) | |
end | |
@peer.tl_serialize(io) | |
@volume_id.tl_serialize(io) | |
@local_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
big = (flags & 1) != 0 | |
peer = Root::InputPeer.tl_deserialize(io) | |
volume_id = Int64.tl_deserialize(io) | |
local_id = Int32.tl_deserialize(io) | |
new(big: big, peer: peer, volume_id: volume_id, local_id: local_id) | |
end | |
end | |
class InputPeerSelf < IInputPeer | |
CONSTRUCTOR_ID = 0x7DA07EC9 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputPeerUser < IInputPeer | |
CONSTRUCTOR_ID = 0x7B8E7DE6 | |
property user_id : Int32 | |
property access_hash : Int64 | |
def initialize(@user_id : Int32, @access_hash : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
new(user_id: user_id, access_hash: access_hash) | |
end | |
end | |
class InputPeerUserFromMessage < IInputPeer | |
CONSTRUCTOR_ID = 0x17BAE2E6 | |
property peer : Root::IInputPeer | |
property msg_id : Int32 | |
property user_id : Int32 | |
def initialize(@peer : Root::IInputPeer, @msg_id : Int32, @user_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peer.tl_serialize(io) | |
@msg_id.tl_serialize(io) | |
@user_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peer = Root::InputPeer.tl_deserialize(io) | |
msg_id = Int32.tl_deserialize(io) | |
user_id = Int32.tl_deserialize(io) | |
new(peer: peer, msg_id: msg_id, user_id: user_id) | |
end | |
end | |
class InputPhoneCall < IInputPhoneCall | |
CONSTRUCTOR_ID = 0x1E36FDED | |
property id : Int64 | |
property access_hash : Int64 | |
def initialize(@id : Int64, @access_hash : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
new(id: id, access_hash: access_hash) | |
end | |
end | |
class InputPhoneContact < IInputContact | |
CONSTRUCTOR_ID = 0xF392B7F4 | |
property client_id : Int64 | |
property phone : String | |
property first_name : String | |
property last_name : String | |
def initialize(@client_id : Int64, @phone : String, @first_name : String, @last_name : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@client_id.tl_serialize(io) | |
@phone.tl_serialize(io) | |
@first_name.tl_serialize(io) | |
@last_name.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
client_id = Int64.tl_deserialize(io) | |
phone = String.tl_deserialize(io) | |
first_name = String.tl_deserialize(io) | |
last_name = String.tl_deserialize(io) | |
new(client_id: client_id, phone: phone, first_name: first_name, last_name: last_name) | |
end | |
end | |
class InputPhoto < IInputPhoto | |
CONSTRUCTOR_ID = 0x3BB3B94A | |
property id : Int64 | |
property access_hash : Int64 | |
property file_reference : Bytes | |
def initialize(@id : Int64, @access_hash : Int64, @file_reference : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@file_reference.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
file_reference = Bytes.tl_deserialize(io) | |
new(id: id, access_hash: access_hash, file_reference: file_reference) | |
end | |
end | |
class InputPhotoEmpty < IInputPhoto | |
CONSTRUCTOR_ID = 0x1CD7BF0D | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputPhotoFileLocation < IInputFileLocation | |
CONSTRUCTOR_ID = 0x40181FFE | |
property id : Int64 | |
property access_hash : Int64 | |
property file_reference : Bytes | |
property thumb_size : String | |
def initialize(@id : Int64, @access_hash : Int64, @file_reference : Bytes, @thumb_size : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@file_reference.tl_serialize(io) | |
@thumb_size.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
file_reference = Bytes.tl_deserialize(io) | |
thumb_size = String.tl_deserialize(io) | |
new(id: id, access_hash: access_hash, file_reference: file_reference, thumb_size: thumb_size) | |
end | |
end | |
class InputPhotoLegacyFileLocation < IInputFileLocation | |
CONSTRUCTOR_ID = 0xD83466F3 | |
property id : Int64 | |
property access_hash : Int64 | |
property file_reference : Bytes | |
property volume_id : Int64 | |
property local_id : Int32 | |
property secret : Int64 | |
def initialize(@id : Int64, @access_hash : Int64, @file_reference : Bytes, @volume_id : Int64, @local_id : Int32, @secret : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@file_reference.tl_serialize(io) | |
@volume_id.tl_serialize(io) | |
@local_id.tl_serialize(io) | |
@secret.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
file_reference = Bytes.tl_deserialize(io) | |
volume_id = Int64.tl_deserialize(io) | |
local_id = Int32.tl_deserialize(io) | |
secret = Int64.tl_deserialize(io) | |
new(id: id, access_hash: access_hash, file_reference: file_reference, volume_id: volume_id, local_id: local_id, secret: secret) | |
end | |
end | |
class InputPrivacyKeyAddedByPhone < IInputPrivacyKey | |
CONSTRUCTOR_ID = 0xD1219BDD | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputPrivacyKeyChatInvite < IInputPrivacyKey | |
CONSTRUCTOR_ID = 0xBDFB0426 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputPrivacyKeyForwards < IInputPrivacyKey | |
CONSTRUCTOR_ID = 0xA4DD4C08 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputPrivacyKeyPhoneCall < IInputPrivacyKey | |
CONSTRUCTOR_ID = 0xFABADC5F | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputPrivacyKeyPhoneNumber < IInputPrivacyKey | |
CONSTRUCTOR_ID = 0x0352DAFA | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputPrivacyKeyPhoneP2P < IInputPrivacyKey | |
CONSTRUCTOR_ID = 0xDB9E70D2 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputPrivacyKeyProfilePhoto < IInputPrivacyKey | |
CONSTRUCTOR_ID = 0x5719BACC | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputPrivacyKeyStatusTimestamp < IInputPrivacyKey | |
CONSTRUCTOR_ID = 0x4F96CB18 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputPrivacyValueAllowAll < IInputPrivacyRule | |
CONSTRUCTOR_ID = 0x184B35CE | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputPrivacyValueAllowChatParticipants < IInputPrivacyRule | |
CONSTRUCTOR_ID = 0x4C81C1BA | |
property chats : Array(Int32) | |
def initialize(@chats : Array(Int32)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@chats.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
chats = Array(Int32).tl_deserialize(io) | |
new(chats: chats) | |
end | |
end | |
class InputPrivacyValueAllowContacts < IInputPrivacyRule | |
CONSTRUCTOR_ID = 0x0D09E07B | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputPrivacyValueAllowUsers < IInputPrivacyRule | |
CONSTRUCTOR_ID = 0x131CC67F | |
property users : Array(Root::IInputUser) | |
def initialize(@users : Array(Root::IInputUser)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
users = Array(Root::InputUser).tl_deserialize(io) | |
new(users: users) | |
end | |
end | |
class InputPrivacyValueDisallowAll < IInputPrivacyRule | |
CONSTRUCTOR_ID = 0xD66B66C9 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputPrivacyValueDisallowChatParticipants < IInputPrivacyRule | |
CONSTRUCTOR_ID = 0xD82363AF | |
property chats : Array(Int32) | |
def initialize(@chats : Array(Int32)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@chats.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
chats = Array(Int32).tl_deserialize(io) | |
new(chats: chats) | |
end | |
end | |
class InputPrivacyValueDisallowContacts < IInputPrivacyRule | |
CONSTRUCTOR_ID = 0x0BA52007 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputPrivacyValueDisallowUsers < IInputPrivacyRule | |
CONSTRUCTOR_ID = 0x90110467 | |
property users : Array(Root::IInputUser) | |
def initialize(@users : Array(Root::IInputUser)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
users = Array(Root::InputUser).tl_deserialize(io) | |
new(users: users) | |
end | |
end | |
class InputReportReasonChildAbuse < IReportReason | |
CONSTRUCTOR_ID = 0xADF44EE3 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputReportReasonCopyright < IReportReason | |
CONSTRUCTOR_ID = 0x9B89F93A | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputReportReasonGeoIrrelevant < IReportReason | |
CONSTRUCTOR_ID = 0xDBD4FEED | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputReportReasonOther < IReportReason | |
CONSTRUCTOR_ID = 0xE1746D0A | |
property text : String | |
def initialize(@text : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = String.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class InputReportReasonPornography < IReportReason | |
CONSTRUCTOR_ID = 0x2E59D922 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputReportReasonSpam < IReportReason | |
CONSTRUCTOR_ID = 0x58DBCAB8 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputReportReasonViolence < IReportReason | |
CONSTRUCTOR_ID = 0x1E22C78D | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputSecureFile < IInputSecureFile | |
CONSTRUCTOR_ID = 0x5367E5BE | |
property id : Int64 | |
property access_hash : Int64 | |
def initialize(@id : Int64, @access_hash : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
new(id: id, access_hash: access_hash) | |
end | |
end | |
class InputSecureFileLocation < IInputFileLocation | |
CONSTRUCTOR_ID = 0xCBC7EE28 | |
property id : Int64 | |
property access_hash : Int64 | |
def initialize(@id : Int64, @access_hash : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
new(id: id, access_hash: access_hash) | |
end | |
end | |
class InputSecureFileUploaded < IInputSecureFile | |
CONSTRUCTOR_ID = 0x3334B0F0 | |
property id : Int64 | |
property parts : Int32 | |
property md5_checksum : String | |
property file_hash : Bytes | |
property secret : Bytes | |
def initialize(@id : Int64, @parts : Int32, @md5_checksum : String, @file_hash : Bytes, @secret : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@parts.tl_serialize(io) | |
@md5_checksum.tl_serialize(io) | |
@file_hash.tl_serialize(io) | |
@secret.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
parts = Int32.tl_deserialize(io) | |
md5_checksum = String.tl_deserialize(io) | |
file_hash = Bytes.tl_deserialize(io) | |
secret = Bytes.tl_deserialize(io) | |
new(id: id, parts: parts, md5_checksum: md5_checksum, file_hash: file_hash, secret: secret) | |
end | |
end | |
class InputSecureValue < IInputSecureValue | |
CONSTRUCTOR_ID = 0xDB21D0A7 | |
property type : Root::ISecureValueType | |
property data : Root::ISecureData? | |
property front_side : Root::IInputSecureFile? | |
property reverse_side : Root::IInputSecureFile? | |
property selfie : Root::IInputSecureFile? | |
property translation : Array(Root::IInputSecureFile)? | |
property files : Array(Root::IInputSecureFile)? | |
property plain_data : Root::ISecurePlainData? | |
def initialize(@type : Root::ISecureValueType, @data : Root::ISecureData? = nil, @front_side : Root::IInputSecureFile? = nil, @reverse_side : Root::IInputSecureFile? = nil, @selfie : Root::IInputSecureFile? = nil, @translation : Array(Root::IInputSecureFile)? = nil, @files : Array(Root::IInputSecureFile)? = nil, @plain_data : Root::ISecurePlainData? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @data ? 1 : 0 | @front_side ? 2 : 0 | @reverse_side ? 4 : 0 | @selfie ? 8 : 0 | @translation ? 64 : 0 | @files ? 16 : 0 | @plain_data ? 32 : 0).tl_serialize(io) | |
@type.tl_serialize(io) | |
if data = @data | |
data.tl_serialize(io) | |
end | |
if front_side = @front_side | |
front_side.tl_serialize(io) | |
end | |
if reverse_side = @reverse_side | |
reverse_side.tl_serialize(io) | |
end | |
if selfie = @selfie | |
selfie.tl_serialize(io) | |
end | |
if translation = @translation | |
translation.tl_serialize(io) | |
end | |
if files = @files | |
files.tl_serialize(io) | |
end | |
if plain_data = @plain_data | |
plain_data.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
type = Root::SecureValueType.tl_deserialize(io) | |
data = (flags & 1) != 0 ? Root::SecureData.tl_deserialize(io) : nil | |
front_side = (flags & 2) != 0 ? Root::InputSecureFile.tl_deserialize(io) : nil | |
reverse_side = (flags & 4) != 0 ? Root::InputSecureFile.tl_deserialize(io) : nil | |
selfie = (flags & 8) != 0 ? Root::InputSecureFile.tl_deserialize(io) : nil | |
translation = (flags & 64) != 0 ? Array(Root::InputSecureFile).tl_deserialize(io) : nil | |
files = (flags & 16) != 0 ? Array(Root::InputSecureFile).tl_deserialize(io) : nil | |
plain_data = (flags & 32) != 0 ? Root::SecurePlainData.tl_deserialize(io) : nil | |
new(type: type, data: data, front_side: front_side, reverse_side: reverse_side, selfie: selfie, translation: translation, files: files, plain_data: plain_data) | |
end | |
end | |
class InputSingleMedia < IInputSingleMedia | |
CONSTRUCTOR_ID = 0x1CC6E91F | |
property media : Root::IInputMedia | |
property random_id : Int64 | |
property message : String | |
property entities : Array(Root::IMessageEntity)? | |
def initialize(@media : Root::IInputMedia, @random_id : Int64, @message : String, @entities : Array(Root::IMessageEntity)? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @entities ? 1 : 0).tl_serialize(io) | |
@media.tl_serialize(io) | |
@random_id.tl_serialize(io) | |
@message.tl_serialize(io) | |
if entities = @entities | |
entities.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
media = Root::InputMedia.tl_deserialize(io) | |
random_id = Int64.tl_deserialize(io) | |
message = String.tl_deserialize(io) | |
entities = (flags & 1) != 0 ? Array(Root::MessageEntity).tl_deserialize(io) : nil | |
new(media: media, random_id: random_id, message: message, entities: entities) | |
end | |
end | |
class InputStickerSetAnimatedEmoji < IInputStickerSet | |
CONSTRUCTOR_ID = 0x028703C8 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputStickerSetDice < IInputStickerSet | |
CONSTRUCTOR_ID = 0xE67F520E | |
property emoticon : String | |
def initialize(@emoticon : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@emoticon.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
emoticon = String.tl_deserialize(io) | |
new(emoticon: emoticon) | |
end | |
end | |
class InputStickerSetEmpty < IInputStickerSet | |
CONSTRUCTOR_ID = 0xFFB62B95 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputStickerSetId < IInputStickerSet | |
CONSTRUCTOR_ID = 0x9DE7A269 | |
property id : Int64 | |
property access_hash : Int64 | |
def initialize(@id : Int64, @access_hash : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
new(id: id, access_hash: access_hash) | |
end | |
end | |
class InputStickerSetItem < IInputStickerSetItem | |
CONSTRUCTOR_ID = 0xFFA0A496 | |
property document : Root::IInputDocument | |
property emoji : String | |
property mask_coords : Root::IMaskCoords? | |
def initialize(@document : Root::IInputDocument, @emoji : String, @mask_coords : Root::IMaskCoords? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @mask_coords ? 1 : 0).tl_serialize(io) | |
@document.tl_serialize(io) | |
@emoji.tl_serialize(io) | |
if mask_coords = @mask_coords | |
mask_coords.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
document = Root::InputDocument.tl_deserialize(io) | |
emoji = String.tl_deserialize(io) | |
mask_coords = (flags & 1) != 0 ? Root::MaskCoords.tl_deserialize(io) : nil | |
new(document: document, emoji: emoji, mask_coords: mask_coords) | |
end | |
end | |
class InputStickerSetShortName < IInputStickerSet | |
CONSTRUCTOR_ID = 0x861CC8A0 | |
property short_name : String | |
def initialize(@short_name : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@short_name.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
short_name = String.tl_deserialize(io) | |
new(short_name: short_name) | |
end | |
end | |
class InputStickerSetThumb < IInputFileLocation | |
CONSTRUCTOR_ID = 0x0DBAEAE9 | |
property stickerset : Root::IInputStickerSet | |
property volume_id : Int64 | |
property local_id : Int32 | |
def initialize(@stickerset : Root::IInputStickerSet, @volume_id : Int64, @local_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@stickerset.tl_serialize(io) | |
@volume_id.tl_serialize(io) | |
@local_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
stickerset = Root::InputStickerSet.tl_deserialize(io) | |
volume_id = Int64.tl_deserialize(io) | |
local_id = Int32.tl_deserialize(io) | |
new(stickerset: stickerset, volume_id: volume_id, local_id: local_id) | |
end | |
end | |
class InputStickeredMediaDocument < IInputStickeredMedia | |
CONSTRUCTOR_ID = 0x0438865B | |
property id : Root::IInputDocument | |
def initialize(@id : Root::IInputDocument) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Root::InputDocument.tl_deserialize(io) | |
new(id: id) | |
end | |
end | |
class InputStickeredMediaPhoto < IInputStickeredMedia | |
CONSTRUCTOR_ID = 0x4A992157 | |
property id : Root::IInputPhoto | |
def initialize(@id : Root::IInputPhoto) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Root::InputPhoto.tl_deserialize(io) | |
new(id: id) | |
end | |
end | |
class InputTakeoutFileLocation < IInputFileLocation | |
CONSTRUCTOR_ID = 0x29BE5899 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputTheme < IInputTheme | |
CONSTRUCTOR_ID = 0x3C5693E9 | |
property id : Int64 | |
property access_hash : Int64 | |
def initialize(@id : Int64, @access_hash : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
new(id: id, access_hash: access_hash) | |
end | |
end | |
class InputThemeSettings < IInputThemeSettings | |
CONSTRUCTOR_ID = 0xBD507CD1 | |
property base_theme : Root::IBaseTheme | |
property accent_color : Int32 | |
property message_top_color : Int32? | |
property message_bottom_color : Int32? | |
property wallpaper : Root::IInputWallPaper? | |
property wallpaper_settings : Root::IWallPaperSettings? | |
def initialize(@base_theme : Root::IBaseTheme, @accent_color : Int32, @message_top_color : Int32? = nil, @message_bottom_color : Int32? = nil, @wallpaper : Root::IInputWallPaper? = nil, @wallpaper_settings : Root::IWallPaperSettings? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @message_top_color ? 1 : 0 | @message_bottom_color ? 1 : 0 | @wallpaper ? 2 : 0 | @wallpaper_settings ? 2 : 0).tl_serialize(io) | |
@base_theme.tl_serialize(io) | |
@accent_color.tl_serialize(io) | |
if message_top_color = @message_top_color | |
message_top_color.tl_serialize(io) | |
end | |
if message_bottom_color = @message_bottom_color | |
message_bottom_color.tl_serialize(io) | |
end | |
if wallpaper = @wallpaper | |
wallpaper.tl_serialize(io) | |
end | |
if wallpaper_settings = @wallpaper_settings | |
wallpaper_settings.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
base_theme = Root::BaseTheme.tl_deserialize(io) | |
accent_color = Int32.tl_deserialize(io) | |
message_top_color = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
message_bottom_color = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
wallpaper = (flags & 2) != 0 ? Root::InputWallPaper.tl_deserialize(io) : nil | |
wallpaper_settings = (flags & 2) != 0 ? Root::WallPaperSettings.tl_deserialize(io) : nil | |
new(base_theme: base_theme, accent_color: accent_color, message_top_color: message_top_color, message_bottom_color: message_bottom_color, wallpaper: wallpaper, wallpaper_settings: wallpaper_settings) | |
end | |
end | |
class InputThemeSlug < IInputTheme | |
CONSTRUCTOR_ID = 0xF5890DF1 | |
property slug : String | |
def initialize(@slug : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@slug.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
slug = String.tl_deserialize(io) | |
new(slug: slug) | |
end | |
end | |
class InputUser < IInputUser | |
CONSTRUCTOR_ID = 0xD8292816 | |
property user_id : Int32 | |
property access_hash : Int64 | |
def initialize(@user_id : Int32, @access_hash : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
new(user_id: user_id, access_hash: access_hash) | |
end | |
end | |
class InputUserEmpty < IInputUser | |
CONSTRUCTOR_ID = 0xB98886CF | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputUserFromMessage < IInputUser | |
CONSTRUCTOR_ID = 0x2D117597 | |
property peer : Root::IInputPeer | |
property msg_id : Int32 | |
property user_id : Int32 | |
def initialize(@peer : Root::IInputPeer, @msg_id : Int32, @user_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peer.tl_serialize(io) | |
@msg_id.tl_serialize(io) | |
@user_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peer = Root::InputPeer.tl_deserialize(io) | |
msg_id = Int32.tl_deserialize(io) | |
user_id = Int32.tl_deserialize(io) | |
new(peer: peer, msg_id: msg_id, user_id: user_id) | |
end | |
end | |
class InputUserSelf < IInputUser | |
CONSTRUCTOR_ID = 0xF7C1B13F | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputWallPaper < IInputWallPaper | |
CONSTRUCTOR_ID = 0xE630B979 | |
property id : Int64 | |
property access_hash : Int64 | |
def initialize(@id : Int64, @access_hash : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
new(id: id, access_hash: access_hash) | |
end | |
end | |
class InputWallPaperNoFile < IInputWallPaper | |
CONSTRUCTOR_ID = 0x8427BBAC | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InputWallPaperSlug < IInputWallPaper | |
CONSTRUCTOR_ID = 0x72091C80 | |
property slug : String | |
def initialize(@slug : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@slug.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
slug = String.tl_deserialize(io) | |
new(slug: slug) | |
end | |
end | |
class InputWebDocument < IInputWebDocument | |
CONSTRUCTOR_ID = 0x9BED434D | |
property url : String | |
property size : Int32 | |
property mime_type : String | |
property attributes : Array(Root::IDocumentAttribute) | |
def initialize(@url : String, @size : Int32, @mime_type : String, @attributes : Array(Root::IDocumentAttribute)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@url.tl_serialize(io) | |
@size.tl_serialize(io) | |
@mime_type.tl_serialize(io) | |
@attributes.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
url = String.tl_deserialize(io) | |
size = Int32.tl_deserialize(io) | |
mime_type = String.tl_deserialize(io) | |
attributes = Array(Root::DocumentAttribute).tl_deserialize(io) | |
new(url: url, size: size, mime_type: mime_type, attributes: attributes) | |
end | |
end | |
class InputWebFileGeoPointLocation < IInputWebFileLocation | |
CONSTRUCTOR_ID = 0x9F2221C9 | |
property geo_point : Root::IInputGeoPoint | |
property access_hash : Int64 | |
property w : Int32 | |
property h : Int32 | |
property zoom : Int32 | |
property scale : Int32 | |
def initialize(@geo_point : Root::IInputGeoPoint, @access_hash : Int64, @w : Int32, @h : Int32, @zoom : Int32, @scale : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@geo_point.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@w.tl_serialize(io) | |
@h.tl_serialize(io) | |
@zoom.tl_serialize(io) | |
@scale.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
geo_point = Root::InputGeoPoint.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
w = Int32.tl_deserialize(io) | |
h = Int32.tl_deserialize(io) | |
zoom = Int32.tl_deserialize(io) | |
scale = Int32.tl_deserialize(io) | |
new(geo_point: geo_point, access_hash: access_hash, w: w, h: h, zoom: zoom, scale: scale) | |
end | |
end | |
class InputWebFileLocation < IInputWebFileLocation | |
CONSTRUCTOR_ID = 0xC239D686 | |
property url : String | |
property access_hash : Int64 | |
def initialize(@url : String, @access_hash : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@url.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
url = String.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
new(url: url, access_hash: access_hash) | |
end | |
end | |
class Invoice < IInvoice | |
CONSTRUCTOR_ID = 0xC30AA358 | |
property currency : String | |
property prices : Array(Root::ILabeledPrice) | |
property test : Bool | |
property name_requested : Bool | |
property phone_requested : Bool | |
property email_requested : Bool | |
property shipping_address_requested : Bool | |
property flexible : Bool | |
property phone_to_provider : Bool | |
property email_to_provider : Bool | |
def initialize(@currency : String, @prices : Array(Root::ILabeledPrice), @test : Bool = nil, @name_requested : Bool = nil, @phone_requested : Bool = nil, @email_requested : Bool = nil, @shipping_address_requested : Bool = nil, @flexible : Bool = nil, @phone_to_provider : Bool = nil, @email_to_provider : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @test ? 1 : 0 | @name_requested ? 2 : 0 | @phone_requested ? 4 : 0 | @email_requested ? 8 : 0 | @shipping_address_requested ? 16 : 0 | @flexible ? 32 : 0 | @phone_to_provider ? 64 : 0 | @email_to_provider ? 128 : 0).tl_serialize(io) | |
if test = @test | |
test.tl_serialize(io) | |
end | |
if name_requested = @name_requested | |
name_requested.tl_serialize(io) | |
end | |
if phone_requested = @phone_requested | |
phone_requested.tl_serialize(io) | |
end | |
if email_requested = @email_requested | |
email_requested.tl_serialize(io) | |
end | |
if shipping_address_requested = @shipping_address_requested | |
shipping_address_requested.tl_serialize(io) | |
end | |
if flexible = @flexible | |
flexible.tl_serialize(io) | |
end | |
if phone_to_provider = @phone_to_provider | |
phone_to_provider.tl_serialize(io) | |
end | |
if email_to_provider = @email_to_provider | |
email_to_provider.tl_serialize(io) | |
end | |
@currency.tl_serialize(io) | |
@prices.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
test = (flags & 1) != 0 | |
name_requested = (flags & 2) != 0 | |
phone_requested = (flags & 4) != 0 | |
email_requested = (flags & 8) != 0 | |
shipping_address_requested = (flags & 16) != 0 | |
flexible = (flags & 32) != 0 | |
phone_to_provider = (flags & 64) != 0 | |
email_to_provider = (flags & 128) != 0 | |
currency = String.tl_deserialize(io) | |
prices = Array(Root::LabeledPrice).tl_deserialize(io) | |
new(test: test, name_requested: name_requested, phone_requested: phone_requested, email_requested: email_requested, shipping_address_requested: shipping_address_requested, flexible: flexible, phone_to_provider: phone_to_provider, email_to_provider: email_to_provider, currency: currency, prices: prices) | |
end | |
end | |
class IpPort < IIpPort | |
CONSTRUCTOR_ID = 0xD433AD73 | |
property ipv4 : Int32 | |
property port : Int32 | |
def initialize(@ipv4 : Int32, @port : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@ipv4.tl_serialize(io) | |
@port.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
ipv4 = Int32.tl_deserialize(io) | |
port = Int32.tl_deserialize(io) | |
new(ipv4: ipv4, port: port) | |
end | |
end | |
class IpPortSecret < IIpPort | |
CONSTRUCTOR_ID = 0x37982646 | |
property ipv4 : Int32 | |
property port : Int32 | |
property secret : Bytes | |
def initialize(@ipv4 : Int32, @port : Int32, @secret : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@ipv4.tl_serialize(io) | |
@port.tl_serialize(io) | |
@secret.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
ipv4 = Int32.tl_deserialize(io) | |
port = Int32.tl_deserialize(io) | |
secret = Bytes.tl_deserialize(io) | |
new(ipv4: ipv4, port: port, secret: secret) | |
end | |
end | |
class JsonArray < IJsonValue | |
CONSTRUCTOR_ID = 0xF7444763 | |
property value : Array(Root::IJsonValue) | |
def initialize(@value : Array(Root::IJsonValue)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@value.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
value = Array(Root::JsonValue).tl_deserialize(io) | |
new(value: value) | |
end | |
end | |
class JsonBool < IJsonValue | |
CONSTRUCTOR_ID = 0xC7345E6A | |
property value : Bool | |
def initialize(@value : Bool) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@value.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
value = Bool.tl_deserialize(io) | |
new(value: value) | |
end | |
end | |
class JsonNull < IJsonValue | |
CONSTRUCTOR_ID = 0x3F6D7B68 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class JsonNumber < IJsonValue | |
CONSTRUCTOR_ID = 0x2BE0DFA4 | |
property value : Float64 | |
def initialize(@value : Float64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@value.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
value = Float64.tl_deserialize(io) | |
new(value: value) | |
end | |
end | |
class JsonObject < IJsonValue | |
CONSTRUCTOR_ID = 0x99C1D49D | |
property value : Array(Root::IJsonObjectValue) | |
def initialize(@value : Array(Root::IJsonObjectValue)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@value.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
value = Array(Root::JsonObjectValue).tl_deserialize(io) | |
new(value: value) | |
end | |
end | |
class JsonObjectValue < IJsonObjectValue | |
CONSTRUCTOR_ID = 0xC0DE1BD9 | |
property key : String | |
property value : Root::IJsonValue | |
def initialize(@key : String, @value : Root::IJsonValue) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@key.tl_serialize(io) | |
@value.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
key = String.tl_deserialize(io) | |
value = Root::JsonValue.tl_deserialize(io) | |
new(key: key, value: value) | |
end | |
end | |
class JsonString < IJsonValue | |
CONSTRUCTOR_ID = 0xB71E767A | |
property value : String | |
def initialize(@value : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@value.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
value = String.tl_deserialize(io) | |
new(value: value) | |
end | |
end | |
class KeyboardButton < IKeyboardButton | |
CONSTRUCTOR_ID = 0xA2FA4880 | |
property text : String | |
def initialize(@text : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = String.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class KeyboardButtonBuy < IKeyboardButton | |
CONSTRUCTOR_ID = 0xAFD93FBB | |
property text : String | |
def initialize(@text : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = String.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class KeyboardButtonCallback < IKeyboardButton | |
CONSTRUCTOR_ID = 0x35BBDB6B | |
property text : String | |
property data : Bytes | |
property requires_password : Bool | |
def initialize(@text : String, @data : Bytes, @requires_password : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @requires_password ? 1 : 0).tl_serialize(io) | |
if requires_password = @requires_password | |
requires_password.tl_serialize(io) | |
end | |
@text.tl_serialize(io) | |
@data.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
requires_password = (flags & 1) != 0 | |
text = String.tl_deserialize(io) | |
data = Bytes.tl_deserialize(io) | |
new(requires_password: requires_password, text: text, data: data) | |
end | |
end | |
class KeyboardButtonGame < IKeyboardButton | |
CONSTRUCTOR_ID = 0x50F41CCF | |
property text : String | |
def initialize(@text : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = String.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class KeyboardButtonRequestGeoLocation < IKeyboardButton | |
CONSTRUCTOR_ID = 0xFC796B3F | |
property text : String | |
def initialize(@text : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = String.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class KeyboardButtonRequestPhone < IKeyboardButton | |
CONSTRUCTOR_ID = 0xB16A6C29 | |
property text : String | |
def initialize(@text : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = String.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class KeyboardButtonRequestPoll < IKeyboardButton | |
CONSTRUCTOR_ID = 0xBBC7515D | |
property text : String | |
property quiz : Bool? | |
def initialize(@text : String, @quiz : Bool? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @quiz ? 1 : 0).tl_serialize(io) | |
if quiz = @quiz | |
quiz.tl_serialize(io) | |
end | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
quiz = (flags & 1) != 0 ? Bool.tl_deserialize(io) : nil | |
text = String.tl_deserialize(io) | |
new(quiz: quiz, text: text) | |
end | |
end | |
class KeyboardButtonRow < IKeyboardButtonRow | |
CONSTRUCTOR_ID = 0x77608B83 | |
property buttons : Array(Root::IKeyboardButton) | |
def initialize(@buttons : Array(Root::IKeyboardButton)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@buttons.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
buttons = Array(Root::KeyboardButton).tl_deserialize(io) | |
new(buttons: buttons) | |
end | |
end | |
class KeyboardButtonSwitchInline < IKeyboardButton | |
CONSTRUCTOR_ID = 0x0568A748 | |
property text : String | |
property query : String | |
property same_peer : Bool | |
def initialize(@text : String, @query : String, @same_peer : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @same_peer ? 1 : 0).tl_serialize(io) | |
if same_peer = @same_peer | |
same_peer.tl_serialize(io) | |
end | |
@text.tl_serialize(io) | |
@query.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
same_peer = (flags & 1) != 0 | |
text = String.tl_deserialize(io) | |
query = String.tl_deserialize(io) | |
new(same_peer: same_peer, text: text, query: query) | |
end | |
end | |
class KeyboardButtonUrl < IKeyboardButton | |
CONSTRUCTOR_ID = 0x258AFF05 | |
property text : String | |
property url : String | |
def initialize(@text : String, @url : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
@url.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = String.tl_deserialize(io) | |
url = String.tl_deserialize(io) | |
new(text: text, url: url) | |
end | |
end | |
class KeyboardButtonUrlAuth < IKeyboardButton | |
CONSTRUCTOR_ID = 0x10B78D29 | |
property text : String | |
property url : String | |
property button_id : Int32 | |
property fwd_text : String? | |
def initialize(@text : String, @url : String, @button_id : Int32, @fwd_text : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @fwd_text ? 1 : 0).tl_serialize(io) | |
@text.tl_serialize(io) | |
if fwd_text = @fwd_text | |
fwd_text.tl_serialize(io) | |
end | |
@url.tl_serialize(io) | |
@button_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
text = String.tl_deserialize(io) | |
fwd_text = (flags & 1) != 0 ? String.tl_deserialize(io) : nil | |
url = String.tl_deserialize(io) | |
button_id = Int32.tl_deserialize(io) | |
new(text: text, fwd_text: fwd_text, url: url, button_id: button_id) | |
end | |
end | |
class LabeledPrice < ILabeledPrice | |
CONSTRUCTOR_ID = 0xCB296BF8 | |
property label : String | |
property amount : Int64 | |
def initialize(@label : String, @amount : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@label.tl_serialize(io) | |
@amount.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
label = String.tl_deserialize(io) | |
amount = Int64.tl_deserialize(io) | |
new(label: label, amount: amount) | |
end | |
end | |
class LangPackDifference < ILangPackDifference | |
CONSTRUCTOR_ID = 0xF385C1F6 | |
property lang_code : String | |
property from_version : Int32 | |
property version : Int32 | |
property strings : Array(Root::ILangPackString) | |
def initialize(@lang_code : String, @from_version : Int32, @version : Int32, @strings : Array(Root::ILangPackString)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@lang_code.tl_serialize(io) | |
@from_version.tl_serialize(io) | |
@version.tl_serialize(io) | |
@strings.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
lang_code = String.tl_deserialize(io) | |
from_version = Int32.tl_deserialize(io) | |
version = Int32.tl_deserialize(io) | |
strings = Array(Root::LangPackString).tl_deserialize(io) | |
new(lang_code: lang_code, from_version: from_version, version: version, strings: strings) | |
end | |
end | |
class LangPackLanguage < ILangPackLanguage | |
CONSTRUCTOR_ID = 0xEECA5CE3 | |
property name : String | |
property native_name : String | |
property lang_code : String | |
property plural_code : String | |
property strings_count : Int32 | |
property translated_count : Int32 | |
property translations_url : String | |
property official : Bool | |
property rtl : Bool | |
property beta : Bool | |
property base_lang_code : String? | |
def initialize(@name : String, @native_name : String, @lang_code : String, @plural_code : String, @strings_count : Int32, @translated_count : Int32, @translations_url : String, @official : Bool = nil, @rtl : Bool = nil, @beta : Bool = nil, @base_lang_code : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @official ? 1 : 0 | @rtl ? 4 : 0 | @beta ? 8 : 0 | @base_lang_code ? 2 : 0).tl_serialize(io) | |
if official = @official | |
official.tl_serialize(io) | |
end | |
if rtl = @rtl | |
rtl.tl_serialize(io) | |
end | |
if beta = @beta | |
beta.tl_serialize(io) | |
end | |
@name.tl_serialize(io) | |
@native_name.tl_serialize(io) | |
@lang_code.tl_serialize(io) | |
if base_lang_code = @base_lang_code | |
base_lang_code.tl_serialize(io) | |
end | |
@plural_code.tl_serialize(io) | |
@strings_count.tl_serialize(io) | |
@translated_count.tl_serialize(io) | |
@translations_url.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
official = (flags & 1) != 0 | |
rtl = (flags & 4) != 0 | |
beta = (flags & 8) != 0 | |
name = String.tl_deserialize(io) | |
native_name = String.tl_deserialize(io) | |
lang_code = String.tl_deserialize(io) | |
base_lang_code = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
plural_code = String.tl_deserialize(io) | |
strings_count = Int32.tl_deserialize(io) | |
translated_count = Int32.tl_deserialize(io) | |
translations_url = String.tl_deserialize(io) | |
new(official: official, rtl: rtl, beta: beta, name: name, native_name: native_name, lang_code: lang_code, base_lang_code: base_lang_code, plural_code: plural_code, strings_count: strings_count, translated_count: translated_count, translations_url: translations_url) | |
end | |
end | |
class LangPackString < ILangPackString | |
CONSTRUCTOR_ID = 0xCAD181F6 | |
property key : String | |
property value : String | |
def initialize(@key : String, @value : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@key.tl_serialize(io) | |
@value.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
key = String.tl_deserialize(io) | |
value = String.tl_deserialize(io) | |
new(key: key, value: value) | |
end | |
end | |
class LangPackStringDeleted < ILangPackString | |
CONSTRUCTOR_ID = 0x2979EEB2 | |
property key : String | |
def initialize(@key : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@key.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
key = String.tl_deserialize(io) | |
new(key: key) | |
end | |
end | |
class LangPackStringPluralized < ILangPackString | |
CONSTRUCTOR_ID = 0x6C47AC9F | |
property key : String | |
property other_value : String | |
property zero_value : String? | |
property one_value : String? | |
property two_value : String? | |
property few_value : String? | |
property many_value : String? | |
def initialize(@key : String, @other_value : String, @zero_value : String? = nil, @one_value : String? = nil, @two_value : String? = nil, @few_value : String? = nil, @many_value : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @zero_value ? 1 : 0 | @one_value ? 2 : 0 | @two_value ? 4 : 0 | @few_value ? 8 : 0 | @many_value ? 16 : 0).tl_serialize(io) | |
@key.tl_serialize(io) | |
if zero_value = @zero_value | |
zero_value.tl_serialize(io) | |
end | |
if one_value = @one_value | |
one_value.tl_serialize(io) | |
end | |
if two_value = @two_value | |
two_value.tl_serialize(io) | |
end | |
if few_value = @few_value | |
few_value.tl_serialize(io) | |
end | |
if many_value = @many_value | |
many_value.tl_serialize(io) | |
end | |
@other_value.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
key = String.tl_deserialize(io) | |
zero_value = (flags & 1) != 0 ? String.tl_deserialize(io) : nil | |
one_value = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
two_value = (flags & 4) != 0 ? String.tl_deserialize(io) : nil | |
few_value = (flags & 8) != 0 ? String.tl_deserialize(io) : nil | |
many_value = (flags & 16) != 0 ? String.tl_deserialize(io) : nil | |
other_value = String.tl_deserialize(io) | |
new(key: key, zero_value: zero_value, one_value: one_value, two_value: two_value, few_value: few_value, many_value: many_value, other_value: other_value) | |
end | |
end | |
class MaskCoords < IMaskCoords | |
CONSTRUCTOR_ID = 0xAED6DBB2 | |
property n : Int32 | |
property x : Float64 | |
property y : Float64 | |
property zoom : Float64 | |
def initialize(@n : Int32, @x : Float64, @y : Float64, @zoom : Float64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@n.tl_serialize(io) | |
@x.tl_serialize(io) | |
@y.tl_serialize(io) | |
@zoom.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
n = Int32.tl_deserialize(io) | |
x = Float64.tl_deserialize(io) | |
y = Float64.tl_deserialize(io) | |
zoom = Float64.tl_deserialize(io) | |
new(n: n, x: x, y: y, zoom: zoom) | |
end | |
end | |
class Message < IMessage | |
CONSTRUCTOR_ID = 0x58AE39C9 | |
property id : Int32 | |
property message : String | |
property peer_id : Root::IPeer | |
property date : Int32 | |
property grouped_id : Int64? | |
property post_author : String? | |
property edit_date : Int32? | |
property replies : Root::IMessageReplies? | |
property forwards : Int32? | |
property views : Int32? | |
property entities : Array(Root::IMessageEntity)? | |
property reply_markup : Root::IReplyMarkup? | |
property media : Root::IMessageMedia? | |
property reply_to : Root::IMessageReplyHeader? | |
property via_bot_id : Int32? | |
property fwd_from : Root::IMessageFwdHeader? | |
property from_id : Root::IPeer? | |
property pinned : Bool | |
property edit_hide : Bool | |
property legacy : Bool | |
property from_scheduled : Bool | |
property post : Bool | |
property silent : Bool | |
property media_unread : Bool | |
property mentioned : Bool | |
property outgoing : Bool | |
property restriction_reason : Array(Root::IRestrictionReason)? | |
def initialize(@id : Int32, @message : String, @peer_id : Root::IPeer, @date : Int32, @grouped_id : Int64? = nil, @post_author : String? = nil, @edit_date : Int32? = nil, @replies : Root::IMessageReplies? = nil, @forwards : Int32? = nil, @views : Int32? = nil, @entities : Array(Root::IMessageEntity)? = nil, @reply_markup : Root::IReplyMarkup? = nil, @media : Root::IMessageMedia? = nil, @reply_to : Root::IMessageReplyHeader? = nil, @via_bot_id : Int32? = nil, @fwd_from : Root::IMessageFwdHeader? = nil, @from_id : Root::IPeer? = nil, @pinned : Bool = nil, @edit_hide : Bool = nil, @legacy : Bool = nil, @from_scheduled : Bool = nil, @post : Bool = nil, @silent : Bool = nil, @media_unread : Bool = nil, @mentioned : Bool = nil, @outgoing : Bool = nil, @restriction_reason : Array(Root::IRestrictionReason)? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @outgoing ? 2 : 0 | @mentioned ? 16 : 0 | @media_unread ? 32 : 0 | @silent ? 8192 : 0 | @post ? 16384 : 0 | @from_scheduled ? 262144 : 0 | @legacy ? 524288 : 0 | @edit_hide ? 2097152 : 0 | @pinned ? 16777216 : 0 | @from_id ? 256 : 0 | @fwd_from ? 4 : 0 | @via_bot_id ? 2048 : 0 | @reply_to ? 8 : 0 | @media ? 512 : 0 | @reply_markup ? 64 : 0 | @entities ? 128 : 0 | @views ? 1024 : 0 | @forwards ? 1024 : 0 | @replies ? 8388608 : 0 | @edit_date ? 32768 : 0 | @post_author ? 65536 : 0 | @grouped_id ? 131072 : 0 | @restriction_reason ? 4194304 : 0).tl_serialize(io) | |
if outgoing = @outgoing | |
outgoing.tl_serialize(io) | |
end | |
if mentioned = @mentioned | |
mentioned.tl_serialize(io) | |
end | |
if media_unread = @media_unread | |
media_unread.tl_serialize(io) | |
end | |
if silent = @silent | |
silent.tl_serialize(io) | |
end | |
if post = @post | |
post.tl_serialize(io) | |
end | |
if from_scheduled = @from_scheduled | |
from_scheduled.tl_serialize(io) | |
end | |
if legacy = @legacy | |
legacy.tl_serialize(io) | |
end | |
if edit_hide = @edit_hide | |
edit_hide.tl_serialize(io) | |
end | |
if pinned = @pinned | |
pinned.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
if from_id = @from_id | |
from_id.tl_serialize(io) | |
end | |
@peer_id.tl_serialize(io) | |
if fwd_from = @fwd_from | |
fwd_from.tl_serialize(io) | |
end | |
if via_bot_id = @via_bot_id | |
via_bot_id.tl_serialize(io) | |
end | |
if reply_to = @reply_to | |
reply_to.tl_serialize(io) | |
end | |
@date.tl_serialize(io) | |
@message.tl_serialize(io) | |
if media = @media | |
media.tl_serialize(io) | |
end | |
if reply_markup = @reply_markup | |
reply_markup.tl_serialize(io) | |
end | |
if entities = @entities | |
entities.tl_serialize(io) | |
end | |
if views = @views | |
views.tl_serialize(io) | |
end | |
if forwards = @forwards | |
forwards.tl_serialize(io) | |
end | |
if replies = @replies | |
replies.tl_serialize(io) | |
end | |
if edit_date = @edit_date | |
edit_date.tl_serialize(io) | |
end | |
if post_author = @post_author | |
post_author.tl_serialize(io) | |
end | |
if grouped_id = @grouped_id | |
grouped_id.tl_serialize(io) | |
end | |
if restriction_reason = @restriction_reason | |
restriction_reason.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
outgoing = (flags & 2) != 0 | |
mentioned = (flags & 16) != 0 | |
media_unread = (flags & 32) != 0 | |
silent = (flags & 8192) != 0 | |
post = (flags & 16384) != 0 | |
from_scheduled = (flags & 262144) != 0 | |
legacy = (flags & 524288) != 0 | |
edit_hide = (flags & 2097152) != 0 | |
pinned = (flags & 16777216) != 0 | |
id = Int32.tl_deserialize(io) | |
from_id = (flags & 256) != 0 ? Root::Peer.tl_deserialize(io) : nil | |
peer_id = Root::Peer.tl_deserialize(io) | |
fwd_from = (flags & 4) != 0 ? Root::MessageFwdHeader.tl_deserialize(io) : nil | |
via_bot_id = (flags & 2048) != 0 ? Int32.tl_deserialize(io) : nil | |
reply_to = (flags & 8) != 0 ? Root::MessageReplyHeader.tl_deserialize(io) : nil | |
date = Int32.tl_deserialize(io) | |
message = String.tl_deserialize(io) | |
media = (flags & 512) != 0 ? Root::MessageMedia.tl_deserialize(io) : nil | |
reply_markup = (flags & 64) != 0 ? Root::ReplyMarkup.tl_deserialize(io) : nil | |
entities = (flags & 128) != 0 ? Array(Root::MessageEntity).tl_deserialize(io) : nil | |
views = (flags & 1024) != 0 ? Int32.tl_deserialize(io) : nil | |
forwards = (flags & 1024) != 0 ? Int32.tl_deserialize(io) : nil | |
replies = (flags & 8388608) != 0 ? Root::MessageReplies.tl_deserialize(io) : nil | |
edit_date = (flags & 32768) != 0 ? Int32.tl_deserialize(io) : nil | |
post_author = (flags & 65536) != 0 ? String.tl_deserialize(io) : nil | |
grouped_id = (flags & 131072) != 0 ? Int64.tl_deserialize(io) : nil | |
restriction_reason = (flags & 4194304) != 0 ? Array(Root::RestrictionReason).tl_deserialize(io) : nil | |
new(outgoing: outgoing, mentioned: mentioned, media_unread: media_unread, silent: silent, post: post, from_scheduled: from_scheduled, legacy: legacy, edit_hide: edit_hide, pinned: pinned, id: id, from_id: from_id, peer_id: peer_id, fwd_from: fwd_from, via_bot_id: via_bot_id, reply_to: reply_to, date: date, message: message, media: media, reply_markup: reply_markup, entities: entities, views: views, forwards: forwards, replies: replies, edit_date: edit_date, post_author: post_author, grouped_id: grouped_id, restriction_reason: restriction_reason) | |
end | |
end | |
class MessageActionBotAllowed < IMessageAction | |
CONSTRUCTOR_ID = 0xABE9AFFE | |
property domain : String | |
def initialize(@domain : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@domain.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
domain = String.tl_deserialize(io) | |
new(domain: domain) | |
end | |
end | |
class MessageActionChannelCreate < IMessageAction | |
CONSTRUCTOR_ID = 0x95D2AC92 | |
property title : String | |
def initialize(@title : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@title.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
title = String.tl_deserialize(io) | |
new(title: title) | |
end | |
end | |
class MessageActionChannelMigrateFrom < IMessageAction | |
CONSTRUCTOR_ID = 0xB055EAEE | |
property title : String | |
property chat_id : Int32 | |
def initialize(@title : String, @chat_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@title.tl_serialize(io) | |
@chat_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
title = String.tl_deserialize(io) | |
chat_id = Int32.tl_deserialize(io) | |
new(title: title, chat_id: chat_id) | |
end | |
end | |
class MessageActionChatAddUser < IMessageAction | |
CONSTRUCTOR_ID = 0x488A7337 | |
property users : Array(Int32) | |
def initialize(@users : Array(Int32)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
users = Array(Int32).tl_deserialize(io) | |
new(users: users) | |
end | |
end | |
class MessageActionChatCreate < IMessageAction | |
CONSTRUCTOR_ID = 0xA6638B9A | |
property title : String | |
property users : Array(Int32) | |
def initialize(@title : String, @users : Array(Int32)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@title.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
title = String.tl_deserialize(io) | |
users = Array(Int32).tl_deserialize(io) | |
new(title: title, users: users) | |
end | |
end | |
class MessageActionChatDeletePhoto < IMessageAction | |
CONSTRUCTOR_ID = 0x95E3FBEF | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class MessageActionChatDeleteUser < IMessageAction | |
CONSTRUCTOR_ID = 0xB2AE9B0C | |
property user_id : Int32 | |
def initialize(@user_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
new(user_id: user_id) | |
end | |
end | |
class MessageActionChatEditPhoto < IMessageAction | |
CONSTRUCTOR_ID = 0x7FCB13A8 | |
property photo : Root::IPhoto | |
def initialize(@photo : Root::IPhoto) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@photo.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
photo = Root::Photo.tl_deserialize(io) | |
new(photo: photo) | |
end | |
end | |
class MessageActionChatEditTitle < IMessageAction | |
CONSTRUCTOR_ID = 0xB5A1CE5A | |
property title : String | |
def initialize(@title : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@title.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
title = String.tl_deserialize(io) | |
new(title: title) | |
end | |
end | |
class MessageActionChatJoinedByLink < IMessageAction | |
CONSTRUCTOR_ID = 0xF89CF5E8 | |
property inviter_id : Int32 | |
def initialize(@inviter_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@inviter_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
inviter_id = Int32.tl_deserialize(io) | |
new(inviter_id: inviter_id) | |
end | |
end | |
class MessageActionChatMigrateTo < IMessageAction | |
CONSTRUCTOR_ID = 0x51BDB021 | |
property channel_id : Int32 | |
def initialize(@channel_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@channel_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
channel_id = Int32.tl_deserialize(io) | |
new(channel_id: channel_id) | |
end | |
end | |
class MessageActionContactSignUp < IMessageAction | |
CONSTRUCTOR_ID = 0xF3F25F76 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class MessageActionCustomAction < IMessageAction | |
CONSTRUCTOR_ID = 0xFAE69F56 | |
property message : String | |
def initialize(@message : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@message.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
message = String.tl_deserialize(io) | |
new(message: message) | |
end | |
end | |
class MessageActionEmpty < IMessageAction | |
CONSTRUCTOR_ID = 0xB6AEF7B0 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class MessageActionGameScore < IMessageAction | |
CONSTRUCTOR_ID = 0x92A72876 | |
property game_id : Int64 | |
property score : Int32 | |
def initialize(@game_id : Int64, @score : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@game_id.tl_serialize(io) | |
@score.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
game_id = Int64.tl_deserialize(io) | |
score = Int32.tl_deserialize(io) | |
new(game_id: game_id, score: score) | |
end | |
end | |
class MessageActionGeoProximityReached < IMessageAction | |
CONSTRUCTOR_ID = 0x98E0D697 | |
property from_id : Root::IPeer | |
property to_id : Root::IPeer | |
property distance : Int32 | |
def initialize(@from_id : Root::IPeer, @to_id : Root::IPeer, @distance : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@from_id.tl_serialize(io) | |
@to_id.tl_serialize(io) | |
@distance.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
from_id = Root::Peer.tl_deserialize(io) | |
to_id = Root::Peer.tl_deserialize(io) | |
distance = Int32.tl_deserialize(io) | |
new(from_id: from_id, to_id: to_id, distance: distance) | |
end | |
end | |
class MessageActionGroupCall < IMessageAction | |
CONSTRUCTOR_ID = 0x7A0D7F42 | |
property call : Root::IInputGroupCall | |
property duration : Int32? | |
def initialize(@call : Root::IInputGroupCall, @duration : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @duration ? 1 : 0).tl_serialize(io) | |
@call.tl_serialize(io) | |
if duration = @duration | |
duration.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
call = Root::InputGroupCall.tl_deserialize(io) | |
duration = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
new(call: call, duration: duration) | |
end | |
end | |
class MessageActionHistoryClear < IMessageAction | |
CONSTRUCTOR_ID = 0x9FBAB604 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class MessageActionInviteToGroupCall < IMessageAction | |
CONSTRUCTOR_ID = 0x76B9F11A | |
property call : Root::IInputGroupCall | |
property users : Array(Int32) | |
def initialize(@call : Root::IInputGroupCall, @users : Array(Int32)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@call.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
call = Root::InputGroupCall.tl_deserialize(io) | |
users = Array(Int32).tl_deserialize(io) | |
new(call: call, users: users) | |
end | |
end | |
class MessageActionPaymentSent < IMessageAction | |
CONSTRUCTOR_ID = 0x40699CD0 | |
property currency : String | |
property total_amount : Int64 | |
def initialize(@currency : String, @total_amount : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@currency.tl_serialize(io) | |
@total_amount.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
currency = String.tl_deserialize(io) | |
total_amount = Int64.tl_deserialize(io) | |
new(currency: currency, total_amount: total_amount) | |
end | |
end | |
class MessageActionPaymentSentMe < IMessageAction | |
CONSTRUCTOR_ID = 0x8F31B327 | |
property currency : String | |
property total_amount : Int64 | |
property payload : Bytes | |
property charge : Root::IPaymentCharge | |
property info : Root::IPaymentRequestedInfo? | |
property shipping_option_id : String? | |
def initialize(@currency : String, @total_amount : Int64, @payload : Bytes, @charge : Root::IPaymentCharge, @info : Root::IPaymentRequestedInfo? = nil, @shipping_option_id : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @info ? 1 : 0 | @shipping_option_id ? 2 : 0).tl_serialize(io) | |
@currency.tl_serialize(io) | |
@total_amount.tl_serialize(io) | |
@payload.tl_serialize(io) | |
if info = @info | |
info.tl_serialize(io) | |
end | |
if shipping_option_id = @shipping_option_id | |
shipping_option_id.tl_serialize(io) | |
end | |
@charge.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
currency = String.tl_deserialize(io) | |
total_amount = Int64.tl_deserialize(io) | |
payload = Bytes.tl_deserialize(io) | |
info = (flags & 1) != 0 ? Root::PaymentRequestedInfo.tl_deserialize(io) : nil | |
shipping_option_id = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
charge = Root::PaymentCharge.tl_deserialize(io) | |
new(currency: currency, total_amount: total_amount, payload: payload, info: info, shipping_option_id: shipping_option_id, charge: charge) | |
end | |
end | |
class MessageActionPhoneCall < IMessageAction | |
CONSTRUCTOR_ID = 0x80E11A7F | |
property call_id : Int64 | |
property video : Bool | |
property reason : Root::IPhoneCallDiscardReason? | |
property duration : Int32? | |
def initialize(@call_id : Int64, @video : Bool = nil, @reason : Root::IPhoneCallDiscardReason? = nil, @duration : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @video ? 4 : 0 | @reason ? 1 : 0 | @duration ? 2 : 0).tl_serialize(io) | |
if video = @video | |
video.tl_serialize(io) | |
end | |
@call_id.tl_serialize(io) | |
if reason = @reason | |
reason.tl_serialize(io) | |
end | |
if duration = @duration | |
duration.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
video = (flags & 4) != 0 | |
call_id = Int64.tl_deserialize(io) | |
reason = (flags & 1) != 0 ? Root::PhoneCallDiscardReason.tl_deserialize(io) : nil | |
duration = (flags & 2) != 0 ? Int32.tl_deserialize(io) : nil | |
new(video: video, call_id: call_id, reason: reason, duration: duration) | |
end | |
end | |
class MessageActionPinMessage < IMessageAction | |
CONSTRUCTOR_ID = 0x94BD38ED | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class MessageActionScreenshotTaken < IMessageAction | |
CONSTRUCTOR_ID = 0x4792929B | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class MessageActionSecureValuesSent < IMessageAction | |
CONSTRUCTOR_ID = 0xD95C6154 | |
property types : Array(Root::ISecureValueType) | |
def initialize(@types : Array(Root::ISecureValueType)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@types.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
types = Array(Root::SecureValueType).tl_deserialize(io) | |
new(types: types) | |
end | |
end | |
class MessageActionSecureValuesSentMe < IMessageAction | |
CONSTRUCTOR_ID = 0x1B287353 | |
property values : Array(Root::ISecureValue) | |
property credentials : Root::ISecureCredentialsEncrypted | |
def initialize(@values : Array(Root::ISecureValue), @credentials : Root::ISecureCredentialsEncrypted) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@values.tl_serialize(io) | |
@credentials.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
values = Array(Root::SecureValue).tl_deserialize(io) | |
credentials = Root::SecureCredentialsEncrypted.tl_deserialize(io) | |
new(values: values, credentials: credentials) | |
end | |
end | |
class MessageEmpty < IMessage | |
CONSTRUCTOR_ID = 0x83E5DE54 | |
property id : Int32 | |
def initialize(@id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int32.tl_deserialize(io) | |
new(id: id) | |
end | |
end | |
class MessageEntityBankCard < IMessageEntity | |
CONSTRUCTOR_ID = 0x761E6AF4 | |
property offset : Int32 | |
property length : Int32 | |
def initialize(@offset : Int32, @length : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@offset.tl_serialize(io) | |
@length.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
offset = Int32.tl_deserialize(io) | |
length = Int32.tl_deserialize(io) | |
new(offset: offset, length: length) | |
end | |
end | |
class MessageEntityBlockquote < IMessageEntity | |
CONSTRUCTOR_ID = 0x020DF5D0 | |
property offset : Int32 | |
property length : Int32 | |
def initialize(@offset : Int32, @length : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@offset.tl_serialize(io) | |
@length.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
offset = Int32.tl_deserialize(io) | |
length = Int32.tl_deserialize(io) | |
new(offset: offset, length: length) | |
end | |
end | |
class MessageEntityBold < IMessageEntity | |
CONSTRUCTOR_ID = 0xBD610BC9 | |
property offset : Int32 | |
property length : Int32 | |
def initialize(@offset : Int32, @length : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@offset.tl_serialize(io) | |
@length.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
offset = Int32.tl_deserialize(io) | |
length = Int32.tl_deserialize(io) | |
new(offset: offset, length: length) | |
end | |
end | |
class MessageEntityBotCommand < IMessageEntity | |
CONSTRUCTOR_ID = 0x6CEF8AC7 | |
property offset : Int32 | |
property length : Int32 | |
def initialize(@offset : Int32, @length : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@offset.tl_serialize(io) | |
@length.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
offset = Int32.tl_deserialize(io) | |
length = Int32.tl_deserialize(io) | |
new(offset: offset, length: length) | |
end | |
end | |
class MessageEntityCashtag < IMessageEntity | |
CONSTRUCTOR_ID = 0x4C4E743F | |
property offset : Int32 | |
property length : Int32 | |
def initialize(@offset : Int32, @length : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@offset.tl_serialize(io) | |
@length.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
offset = Int32.tl_deserialize(io) | |
length = Int32.tl_deserialize(io) | |
new(offset: offset, length: length) | |
end | |
end | |
class MessageEntityCode < IMessageEntity | |
CONSTRUCTOR_ID = 0x28A20571 | |
property offset : Int32 | |
property length : Int32 | |
def initialize(@offset : Int32, @length : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@offset.tl_serialize(io) | |
@length.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
offset = Int32.tl_deserialize(io) | |
length = Int32.tl_deserialize(io) | |
new(offset: offset, length: length) | |
end | |
end | |
class MessageEntityEmail < IMessageEntity | |
CONSTRUCTOR_ID = 0x64E475C2 | |
property offset : Int32 | |
property length : Int32 | |
def initialize(@offset : Int32, @length : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@offset.tl_serialize(io) | |
@length.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
offset = Int32.tl_deserialize(io) | |
length = Int32.tl_deserialize(io) | |
new(offset: offset, length: length) | |
end | |
end | |
class MessageEntityHashtag < IMessageEntity | |
CONSTRUCTOR_ID = 0x6F635B0D | |
property offset : Int32 | |
property length : Int32 | |
def initialize(@offset : Int32, @length : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@offset.tl_serialize(io) | |
@length.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
offset = Int32.tl_deserialize(io) | |
length = Int32.tl_deserialize(io) | |
new(offset: offset, length: length) | |
end | |
end | |
class MessageEntityItalic < IMessageEntity | |
CONSTRUCTOR_ID = 0x826F8B60 | |
property offset : Int32 | |
property length : Int32 | |
def initialize(@offset : Int32, @length : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@offset.tl_serialize(io) | |
@length.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
offset = Int32.tl_deserialize(io) | |
length = Int32.tl_deserialize(io) | |
new(offset: offset, length: length) | |
end | |
end | |
class MessageEntityMention < IMessageEntity | |
CONSTRUCTOR_ID = 0xFA04579D | |
property offset : Int32 | |
property length : Int32 | |
def initialize(@offset : Int32, @length : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@offset.tl_serialize(io) | |
@length.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
offset = Int32.tl_deserialize(io) | |
length = Int32.tl_deserialize(io) | |
new(offset: offset, length: length) | |
end | |
end | |
class MessageEntityMentionName < IMessageEntity | |
CONSTRUCTOR_ID = 0x352DCA58 | |
property offset : Int32 | |
property length : Int32 | |
property user_id : Int32 | |
def initialize(@offset : Int32, @length : Int32, @user_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@offset.tl_serialize(io) | |
@length.tl_serialize(io) | |
@user_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
offset = Int32.tl_deserialize(io) | |
length = Int32.tl_deserialize(io) | |
user_id = Int32.tl_deserialize(io) | |
new(offset: offset, length: length, user_id: user_id) | |
end | |
end | |
class MessageEntityPhone < IMessageEntity | |
CONSTRUCTOR_ID = 0x9B69E34B | |
property offset : Int32 | |
property length : Int32 | |
def initialize(@offset : Int32, @length : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@offset.tl_serialize(io) | |
@length.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
offset = Int32.tl_deserialize(io) | |
length = Int32.tl_deserialize(io) | |
new(offset: offset, length: length) | |
end | |
end | |
class MessageEntityPre < IMessageEntity | |
CONSTRUCTOR_ID = 0x73924BE0 | |
property offset : Int32 | |
property length : Int32 | |
property language : String | |
def initialize(@offset : Int32, @length : Int32, @language : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@offset.tl_serialize(io) | |
@length.tl_serialize(io) | |
@language.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
offset = Int32.tl_deserialize(io) | |
length = Int32.tl_deserialize(io) | |
language = String.tl_deserialize(io) | |
new(offset: offset, length: length, language: language) | |
end | |
end | |
class MessageEntityStrike < IMessageEntity | |
CONSTRUCTOR_ID = 0xBF0693D4 | |
property offset : Int32 | |
property length : Int32 | |
def initialize(@offset : Int32, @length : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@offset.tl_serialize(io) | |
@length.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
offset = Int32.tl_deserialize(io) | |
length = Int32.tl_deserialize(io) | |
new(offset: offset, length: length) | |
end | |
end | |
class MessageEntityTextUrl < IMessageEntity | |
CONSTRUCTOR_ID = 0x76A6D327 | |
property offset : Int32 | |
property length : Int32 | |
property url : String | |
def initialize(@offset : Int32, @length : Int32, @url : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@offset.tl_serialize(io) | |
@length.tl_serialize(io) | |
@url.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
offset = Int32.tl_deserialize(io) | |
length = Int32.tl_deserialize(io) | |
url = String.tl_deserialize(io) | |
new(offset: offset, length: length, url: url) | |
end | |
end | |
class MessageEntityUnderline < IMessageEntity | |
CONSTRUCTOR_ID = 0x9C4E7E8B | |
property offset : Int32 | |
property length : Int32 | |
def initialize(@offset : Int32, @length : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@offset.tl_serialize(io) | |
@length.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
offset = Int32.tl_deserialize(io) | |
length = Int32.tl_deserialize(io) | |
new(offset: offset, length: length) | |
end | |
end | |
class MessageEntityUnknown < IMessageEntity | |
CONSTRUCTOR_ID = 0xBB92BA95 | |
property offset : Int32 | |
property length : Int32 | |
def initialize(@offset : Int32, @length : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@offset.tl_serialize(io) | |
@length.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
offset = Int32.tl_deserialize(io) | |
length = Int32.tl_deserialize(io) | |
new(offset: offset, length: length) | |
end | |
end | |
class MessageEntityUrl < IMessageEntity | |
CONSTRUCTOR_ID = 0x6ED02538 | |
property offset : Int32 | |
property length : Int32 | |
def initialize(@offset : Int32, @length : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@offset.tl_serialize(io) | |
@length.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
offset = Int32.tl_deserialize(io) | |
length = Int32.tl_deserialize(io) | |
new(offset: offset, length: length) | |
end | |
end | |
class MessageFwdHeader < IMessageFwdHeader | |
CONSTRUCTOR_ID = 0x5F777DCE | |
property date : Int32 | |
property from_id : Root::IPeer? | |
property from_name : String? | |
property channel_post : Int32? | |
property post_author : String? | |
property saved_from_peer : Root::IPeer? | |
property saved_from_msg_id : Int32? | |
property psa_type : String? | |
def initialize(@date : Int32, @from_id : Root::IPeer? = nil, @from_name : String? = nil, @channel_post : Int32? = nil, @post_author : String? = nil, @saved_from_peer : Root::IPeer? = nil, @saved_from_msg_id : Int32? = nil, @psa_type : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @from_id ? 1 : 0 | @from_name ? 32 : 0 | @channel_post ? 4 : 0 | @post_author ? 8 : 0 | @saved_from_peer ? 16 : 0 | @saved_from_msg_id ? 16 : 0 | @psa_type ? 64 : 0).tl_serialize(io) | |
if from_id = @from_id | |
from_id.tl_serialize(io) | |
end | |
if from_name = @from_name | |
from_name.tl_serialize(io) | |
end | |
@date.tl_serialize(io) | |
if channel_post = @channel_post | |
channel_post.tl_serialize(io) | |
end | |
if post_author = @post_author | |
post_author.tl_serialize(io) | |
end | |
if saved_from_peer = @saved_from_peer | |
saved_from_peer.tl_serialize(io) | |
end | |
if saved_from_msg_id = @saved_from_msg_id | |
saved_from_msg_id.tl_serialize(io) | |
end | |
if psa_type = @psa_type | |
psa_type.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
from_id = (flags & 1) != 0 ? Root::Peer.tl_deserialize(io) : nil | |
from_name = (flags & 32) != 0 ? String.tl_deserialize(io) : nil | |
date = Int32.tl_deserialize(io) | |
channel_post = (flags & 4) != 0 ? Int32.tl_deserialize(io) : nil | |
post_author = (flags & 8) != 0 ? String.tl_deserialize(io) : nil | |
saved_from_peer = (flags & 16) != 0 ? Root::Peer.tl_deserialize(io) : nil | |
saved_from_msg_id = (flags & 16) != 0 ? Int32.tl_deserialize(io) : nil | |
psa_type = (flags & 64) != 0 ? String.tl_deserialize(io) : nil | |
new(from_id: from_id, from_name: from_name, date: date, channel_post: channel_post, post_author: post_author, saved_from_peer: saved_from_peer, saved_from_msg_id: saved_from_msg_id, psa_type: psa_type) | |
end | |
end | |
class MessageInteractionCounters < IMessageInteractionCounters | |
CONSTRUCTOR_ID = 0xAD4FC9BD | |
property msg_id : Int32 | |
property views : Int32 | |
property forwards : Int32 | |
def initialize(@msg_id : Int32, @views : Int32, @forwards : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@msg_id.tl_serialize(io) | |
@views.tl_serialize(io) | |
@forwards.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
msg_id = Int32.tl_deserialize(io) | |
views = Int32.tl_deserialize(io) | |
forwards = Int32.tl_deserialize(io) | |
new(msg_id: msg_id, views: views, forwards: forwards) | |
end | |
end | |
class MessageMediaContact < IMessageMedia | |
CONSTRUCTOR_ID = 0xCBF24940 | |
property phone_number : String | |
property first_name : String | |
property last_name : String | |
property vcard : String | |
property user_id : Int32 | |
def initialize(@phone_number : String, @first_name : String, @last_name : String, @vcard : String, @user_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@phone_number.tl_serialize(io) | |
@first_name.tl_serialize(io) | |
@last_name.tl_serialize(io) | |
@vcard.tl_serialize(io) | |
@user_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
phone_number = String.tl_deserialize(io) | |
first_name = String.tl_deserialize(io) | |
last_name = String.tl_deserialize(io) | |
vcard = String.tl_deserialize(io) | |
user_id = Int32.tl_deserialize(io) | |
new(phone_number: phone_number, first_name: first_name, last_name: last_name, vcard: vcard, user_id: user_id) | |
end | |
end | |
class MessageMediaDice < IMessageMedia | |
CONSTRUCTOR_ID = 0x3F7EE58B | |
property value : Int32 | |
property emoticon : String | |
def initialize(@value : Int32, @emoticon : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@value.tl_serialize(io) | |
@emoticon.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
value = Int32.tl_deserialize(io) | |
emoticon = String.tl_deserialize(io) | |
new(value: value, emoticon: emoticon) | |
end | |
end | |
class MessageMediaDocument < IMessageMedia | |
CONSTRUCTOR_ID = 0x9CB070D7 | |
property document : Root::IDocument? | |
property ttl_seconds : Int32? | |
def initialize(@document : Root::IDocument? = nil, @ttl_seconds : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @document ? 1 : 0 | @ttl_seconds ? 4 : 0).tl_serialize(io) | |
if document = @document | |
document.tl_serialize(io) | |
end | |
if ttl_seconds = @ttl_seconds | |
ttl_seconds.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
document = (flags & 1) != 0 ? Root::Document.tl_deserialize(io) : nil | |
ttl_seconds = (flags & 4) != 0 ? Int32.tl_deserialize(io) : nil | |
new(document: document, ttl_seconds: ttl_seconds) | |
end | |
end | |
class MessageMediaEmpty < IMessageMedia | |
CONSTRUCTOR_ID = 0x3DED6320 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class MessageMediaGame < IMessageMedia | |
CONSTRUCTOR_ID = 0xFDB19008 | |
property game : Root::IGame | |
def initialize(@game : Root::IGame) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@game.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
game = Root::Game.tl_deserialize(io) | |
new(game: game) | |
end | |
end | |
class MessageMediaGeo < IMessageMedia | |
CONSTRUCTOR_ID = 0x56E0D474 | |
property geo : Root::IGeoPoint | |
def initialize(@geo : Root::IGeoPoint) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@geo.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
geo = Root::GeoPoint.tl_deserialize(io) | |
new(geo: geo) | |
end | |
end | |
class MessageMediaGeoLive < IMessageMedia | |
CONSTRUCTOR_ID = 0xB940C666 | |
property geo : Root::IGeoPoint | |
property period : Int32 | |
property heading : Int32? | |
property proximity_notification_radius : Int32? | |
def initialize(@geo : Root::IGeoPoint, @period : Int32, @heading : Int32? = nil, @proximity_notification_radius : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @heading ? 1 : 0 | @proximity_notification_radius ? 2 : 0).tl_serialize(io) | |
@geo.tl_serialize(io) | |
if heading = @heading | |
heading.tl_serialize(io) | |
end | |
@period.tl_serialize(io) | |
if proximity_notification_radius = @proximity_notification_radius | |
proximity_notification_radius.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
geo = Root::GeoPoint.tl_deserialize(io) | |
heading = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
period = Int32.tl_deserialize(io) | |
proximity_notification_radius = (flags & 2) != 0 ? Int32.tl_deserialize(io) : nil | |
new(geo: geo, heading: heading, period: period, proximity_notification_radius: proximity_notification_radius) | |
end | |
end | |
class MessageMediaInvoice < IMessageMedia | |
CONSTRUCTOR_ID = 0x84551347 | |
property title : String | |
property description : String | |
property currency : String | |
property total_amount : Int64 | |
property start_param : String | |
property shipping_address_requested : Bool | |
property test : Bool | |
property photo : Root::IWebDocument? | |
property receipt_msg_id : Int32? | |
def initialize(@title : String, @description : String, @currency : String, @total_amount : Int64, @start_param : String, @shipping_address_requested : Bool = nil, @test : Bool = nil, @photo : Root::IWebDocument? = nil, @receipt_msg_id : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @shipping_address_requested ? 2 : 0 | @test ? 8 : 0 | @photo ? 1 : 0 | @receipt_msg_id ? 4 : 0).tl_serialize(io) | |
if shipping_address_requested = @shipping_address_requested | |
shipping_address_requested.tl_serialize(io) | |
end | |
if test = @test | |
test.tl_serialize(io) | |
end | |
@title.tl_serialize(io) | |
@description.tl_serialize(io) | |
if photo = @photo | |
photo.tl_serialize(io) | |
end | |
if receipt_msg_id = @receipt_msg_id | |
receipt_msg_id.tl_serialize(io) | |
end | |
@currency.tl_serialize(io) | |
@total_amount.tl_serialize(io) | |
@start_param.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
shipping_address_requested = (flags & 2) != 0 | |
test = (flags & 8) != 0 | |
title = String.tl_deserialize(io) | |
description = String.tl_deserialize(io) | |
photo = (flags & 1) != 0 ? Root::WebDocument.tl_deserialize(io) : nil | |
receipt_msg_id = (flags & 4) != 0 ? Int32.tl_deserialize(io) : nil | |
currency = String.tl_deserialize(io) | |
total_amount = Int64.tl_deserialize(io) | |
start_param = String.tl_deserialize(io) | |
new(shipping_address_requested: shipping_address_requested, test: test, title: title, description: description, photo: photo, receipt_msg_id: receipt_msg_id, currency: currency, total_amount: total_amount, start_param: start_param) | |
end | |
end | |
class MessageMediaPhoto < IMessageMedia | |
CONSTRUCTOR_ID = 0x695150D7 | |
property photo : Root::IPhoto? | |
property ttl_seconds : Int32? | |
def initialize(@photo : Root::IPhoto? = nil, @ttl_seconds : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @photo ? 1 : 0 | @ttl_seconds ? 4 : 0).tl_serialize(io) | |
if photo = @photo | |
photo.tl_serialize(io) | |
end | |
if ttl_seconds = @ttl_seconds | |
ttl_seconds.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
photo = (flags & 1) != 0 ? Root::Photo.tl_deserialize(io) : nil | |
ttl_seconds = (flags & 4) != 0 ? Int32.tl_deserialize(io) : nil | |
new(photo: photo, ttl_seconds: ttl_seconds) | |
end | |
end | |
class MessageMediaPoll < IMessageMedia | |
CONSTRUCTOR_ID = 0x4BD6E798 | |
property poll : Root::IPoll | |
property results : Root::IPollResults | |
def initialize(@poll : Root::IPoll, @results : Root::IPollResults) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@poll.tl_serialize(io) | |
@results.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
poll = Root::Poll.tl_deserialize(io) | |
results = Root::PollResults.tl_deserialize(io) | |
new(poll: poll, results: results) | |
end | |
end | |
class MessageMediaUnsupported < IMessageMedia | |
CONSTRUCTOR_ID = 0x9F84F49E | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class MessageMediaVenue < IMessageMedia | |
CONSTRUCTOR_ID = 0x2EC0533F | |
property geo : Root::IGeoPoint | |
property title : String | |
property address : String | |
property provider : String | |
property venue_id : String | |
property venue_type : String | |
def initialize(@geo : Root::IGeoPoint, @title : String, @address : String, @provider : String, @venue_id : String, @venue_type : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@geo.tl_serialize(io) | |
@title.tl_serialize(io) | |
@address.tl_serialize(io) | |
@provider.tl_serialize(io) | |
@venue_id.tl_serialize(io) | |
@venue_type.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
geo = Root::GeoPoint.tl_deserialize(io) | |
title = String.tl_deserialize(io) | |
address = String.tl_deserialize(io) | |
provider = String.tl_deserialize(io) | |
venue_id = String.tl_deserialize(io) | |
venue_type = String.tl_deserialize(io) | |
new(geo: geo, title: title, address: address, provider: provider, venue_id: venue_id, venue_type: venue_type) | |
end | |
end | |
class MessageMediaWebPage < IMessageMedia | |
CONSTRUCTOR_ID = 0xA32DD600 | |
property webpage : Root::IWebPage | |
def initialize(@webpage : Root::IWebPage) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@webpage.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
webpage = Root::WebPage.tl_deserialize(io) | |
new(webpage: webpage) | |
end | |
end | |
class MessageRange < IMessageRange | |
CONSTRUCTOR_ID = 0x0AE30253 | |
property min_id : Int32 | |
property max_id : Int32 | |
def initialize(@min_id : Int32, @max_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@min_id.tl_serialize(io) | |
@max_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
min_id = Int32.tl_deserialize(io) | |
max_id = Int32.tl_deserialize(io) | |
new(min_id: min_id, max_id: max_id) | |
end | |
end | |
class MessageReplies < IMessageReplies | |
CONSTRUCTOR_ID = 0x4128FAAC | |
property replies : Int32 | |
property replies_pts : Int32 | |
property comments : Bool | |
property recent_repliers : Array(Root::IPeer)? | |
property channel_id : Int32? | |
property max_id : Int32? | |
property read_max_id : Int32? | |
def initialize(@replies : Int32, @replies_pts : Int32, @comments : Bool = nil, @recent_repliers : Array(Root::IPeer)? = nil, @channel_id : Int32? = nil, @max_id : Int32? = nil, @read_max_id : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @comments ? 1 : 0 | @recent_repliers ? 2 : 0 | @channel_id ? 1 : 0 | @max_id ? 4 : 0 | @read_max_id ? 8 : 0).tl_serialize(io) | |
if comments = @comments | |
comments.tl_serialize(io) | |
end | |
@replies.tl_serialize(io) | |
@replies_pts.tl_serialize(io) | |
if recent_repliers = @recent_repliers | |
recent_repliers.tl_serialize(io) | |
end | |
if channel_id = @channel_id | |
channel_id.tl_serialize(io) | |
end | |
if max_id = @max_id | |
max_id.tl_serialize(io) | |
end | |
if read_max_id = @read_max_id | |
read_max_id.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
comments = (flags & 1) != 0 | |
replies = Int32.tl_deserialize(io) | |
replies_pts = Int32.tl_deserialize(io) | |
recent_repliers = (flags & 2) != 0 ? Array(Root::Peer).tl_deserialize(io) : nil | |
channel_id = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
max_id = (flags & 4) != 0 ? Int32.tl_deserialize(io) : nil | |
read_max_id = (flags & 8) != 0 ? Int32.tl_deserialize(io) : nil | |
new(comments: comments, replies: replies, replies_pts: replies_pts, recent_repliers: recent_repliers, channel_id: channel_id, max_id: max_id, read_max_id: read_max_id) | |
end | |
end | |
class MessageReplyHeader < IMessageReplyHeader | |
CONSTRUCTOR_ID = 0xA6D57763 | |
property reply_to_msg_id : Int32 | |
property reply_to_peer_id : Root::IPeer? | |
property reply_to_top_id : Int32? | |
def initialize(@reply_to_msg_id : Int32, @reply_to_peer_id : Root::IPeer? = nil, @reply_to_top_id : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @reply_to_peer_id ? 1 : 0 | @reply_to_top_id ? 2 : 0).tl_serialize(io) | |
@reply_to_msg_id.tl_serialize(io) | |
if reply_to_peer_id = @reply_to_peer_id | |
reply_to_peer_id.tl_serialize(io) | |
end | |
if reply_to_top_id = @reply_to_top_id | |
reply_to_top_id.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
reply_to_msg_id = Int32.tl_deserialize(io) | |
reply_to_peer_id = (flags & 1) != 0 ? Root::Peer.tl_deserialize(io) : nil | |
reply_to_top_id = (flags & 2) != 0 ? Int32.tl_deserialize(io) : nil | |
new(reply_to_msg_id: reply_to_msg_id, reply_to_peer_id: reply_to_peer_id, reply_to_top_id: reply_to_top_id) | |
end | |
end | |
class MessageService < IMessage | |
CONSTRUCTOR_ID = 0x286FA604 | |
property id : Int32 | |
property peer_id : Root::IPeer | |
property date : Int32 | |
property action : Root::IMessageAction | |
property outgoing : Bool | |
property mentioned : Bool | |
property media_unread : Bool | |
property silent : Bool | |
property post : Bool | |
property legacy : Bool | |
property from_id : Root::IPeer? | |
property reply_to : Root::IMessageReplyHeader? | |
def initialize(@id : Int32, @peer_id : Root::IPeer, @date : Int32, @action : Root::IMessageAction, @outgoing : Bool = nil, @mentioned : Bool = nil, @media_unread : Bool = nil, @silent : Bool = nil, @post : Bool = nil, @legacy : Bool = nil, @from_id : Root::IPeer? = nil, @reply_to : Root::IMessageReplyHeader? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @outgoing ? 2 : 0 | @mentioned ? 16 : 0 | @media_unread ? 32 : 0 | @silent ? 8192 : 0 | @post ? 16384 : 0 | @legacy ? 524288 : 0 | @from_id ? 256 : 0 | @reply_to ? 8 : 0).tl_serialize(io) | |
if outgoing = @outgoing | |
outgoing.tl_serialize(io) | |
end | |
if mentioned = @mentioned | |
mentioned.tl_serialize(io) | |
end | |
if media_unread = @media_unread | |
media_unread.tl_serialize(io) | |
end | |
if silent = @silent | |
silent.tl_serialize(io) | |
end | |
if post = @post | |
post.tl_serialize(io) | |
end | |
if legacy = @legacy | |
legacy.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
if from_id = @from_id | |
from_id.tl_serialize(io) | |
end | |
@peer_id.tl_serialize(io) | |
if reply_to = @reply_to | |
reply_to.tl_serialize(io) | |
end | |
@date.tl_serialize(io) | |
@action.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
outgoing = (flags & 2) != 0 | |
mentioned = (flags & 16) != 0 | |
media_unread = (flags & 32) != 0 | |
silent = (flags & 8192) != 0 | |
post = (flags & 16384) != 0 | |
legacy = (flags & 524288) != 0 | |
id = Int32.tl_deserialize(io) | |
from_id = (flags & 256) != 0 ? Root::Peer.tl_deserialize(io) : nil | |
peer_id = Root::Peer.tl_deserialize(io) | |
reply_to = (flags & 8) != 0 ? Root::MessageReplyHeader.tl_deserialize(io) : nil | |
date = Int32.tl_deserialize(io) | |
action = Root::MessageAction.tl_deserialize(io) | |
new(outgoing: outgoing, mentioned: mentioned, media_unread: media_unread, silent: silent, post: post, legacy: legacy, id: id, from_id: from_id, peer_id: peer_id, reply_to: reply_to, date: date, action: action) | |
end | |
end | |
class MessageUserVote < IMessageUserVote | |
CONSTRUCTOR_ID = 0xA28E5559 | |
property user_id : Int32 | |
property option : Bytes | |
property date : Int32 | |
def initialize(@user_id : Int32, @option : Bytes, @date : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
@option.tl_serialize(io) | |
@date.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
option = Bytes.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
new(user_id: user_id, option: option, date: date) | |
end | |
end | |
class MessageUserVoteInputOption < IMessageUserVote | |
CONSTRUCTOR_ID = 0x36377430 | |
property user_id : Int32 | |
property date : Int32 | |
def initialize(@user_id : Int32, @date : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
@date.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
new(user_id: user_id, date: date) | |
end | |
end | |
class MessageUserVoteMultiple < IMessageUserVote | |
CONSTRUCTOR_ID = 0x0E8FE0DE | |
property user_id : Int32 | |
property options : Array(Bytes) | |
property date : Int32 | |
def initialize(@user_id : Int32, @options : Array(Bytes), @date : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
@options.tl_serialize(io) | |
@date.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
options = Array(Bytes).tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
new(user_id: user_id, options: options, date: date) | |
end | |
end | |
class MessageViews < IMessageViews | |
CONSTRUCTOR_ID = 0x455B853D | |
property views : Int32? | |
property forwards : Int32? | |
property replies : Root::IMessageReplies? | |
def initialize(@views : Int32? = nil, @forwards : Int32? = nil, @replies : Root::IMessageReplies? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @views ? 1 : 0 | @forwards ? 2 : 0 | @replies ? 4 : 0).tl_serialize(io) | |
if views = @views | |
views.tl_serialize(io) | |
end | |
if forwards = @forwards | |
forwards.tl_serialize(io) | |
end | |
if replies = @replies | |
replies.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
views = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
forwards = (flags & 2) != 0 ? Int32.tl_deserialize(io) : nil | |
replies = (flags & 4) != 0 ? Root::MessageReplies.tl_deserialize(io) : nil | |
new(views: views, forwards: forwards, replies: replies) | |
end | |
end | |
class MsgDetailedInfo < IMsgDetailedInfo | |
CONSTRUCTOR_ID = 0x276D3EC6 | |
property msg_id : Int64 | |
property answer_msg_id : Int64 | |
property bytes : Int32 | |
property status : Int32 | |
def initialize(@msg_id : Int64, @answer_msg_id : Int64, @bytes : Int32, @status : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@msg_id.tl_serialize(io) | |
@answer_msg_id.tl_serialize(io) | |
@bytes.tl_serialize(io) | |
@status.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
msg_id = Int64.tl_deserialize(io) | |
answer_msg_id = Int64.tl_deserialize(io) | |
bytes = Int32.tl_deserialize(io) | |
status = Int32.tl_deserialize(io) | |
new(msg_id: msg_id, answer_msg_id: answer_msg_id, bytes: bytes, status: status) | |
end | |
end | |
class MsgNewDetailedInfo < IMsgDetailedInfo | |
CONSTRUCTOR_ID = 0x809DB6DF | |
property answer_msg_id : Int64 | |
property bytes : Int32 | |
property status : Int32 | |
def initialize(@answer_msg_id : Int64, @bytes : Int32, @status : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@answer_msg_id.tl_serialize(io) | |
@bytes.tl_serialize(io) | |
@status.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
answer_msg_id = Int64.tl_deserialize(io) | |
bytes = Int32.tl_deserialize(io) | |
status = Int32.tl_deserialize(io) | |
new(answer_msg_id: answer_msg_id, bytes: bytes, status: status) | |
end | |
end | |
class MsgResendAnsReq < IMsgResendReq | |
CONSTRUCTOR_ID = 0x8610BAEB | |
property msg_ids : Array(Int64) | |
def initialize(@msg_ids : Array(Int64)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@msg_ids.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
msg_ids = Array(Int64).tl_deserialize(io) | |
new(msg_ids: msg_ids) | |
end | |
end | |
class MsgResendReq < IMsgResendReq | |
CONSTRUCTOR_ID = 0x7D861A08 | |
property msg_ids : Array(Int64) | |
def initialize(@msg_ids : Array(Int64)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@msg_ids.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
msg_ids = Array(Int64).tl_deserialize(io) | |
new(msg_ids: msg_ids) | |
end | |
end | |
class MsgsAck < IMsgsAck | |
CONSTRUCTOR_ID = 0x62D6B459 | |
property msg_ids : Array(Int64) | |
def initialize(@msg_ids : Array(Int64)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@msg_ids.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
msg_ids = Array(Int64).tl_deserialize(io) | |
new(msg_ids: msg_ids) | |
end | |
end | |
class MsgsAllInfo < IMsgsAllInfo | |
CONSTRUCTOR_ID = 0x8CC0D131 | |
property msg_ids : Array(Int64) | |
property info : Bytes | |
def initialize(@msg_ids : Array(Int64), @info : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@msg_ids.tl_serialize(io) | |
@info.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
msg_ids = Array(Int64).tl_deserialize(io) | |
info = Bytes.tl_deserialize(io) | |
new(msg_ids: msg_ids, info: info) | |
end | |
end | |
class MsgsStateInfo < IMsgsStateInfo | |
CONSTRUCTOR_ID = 0x04DEB57D | |
property req_msg_id : Int64 | |
property info : Bytes | |
def initialize(@req_msg_id : Int64, @info : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@req_msg_id.tl_serialize(io) | |
@info.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
req_msg_id = Int64.tl_deserialize(io) | |
info = Bytes.tl_deserialize(io) | |
new(req_msg_id: req_msg_id, info: info) | |
end | |
end | |
class MsgsStateReq < IMsgsStateReq | |
CONSTRUCTOR_ID = 0xDA69FB52 | |
property msg_ids : Array(Int64) | |
def initialize(@msg_ids : Array(Int64)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@msg_ids.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
msg_ids = Array(Int64).tl_deserialize(io) | |
new(msg_ids: msg_ids) | |
end | |
end | |
class NearestDc < INearestDc | |
CONSTRUCTOR_ID = 0x8E1A1775 | |
property country : String | |
property this_dc : Int32 | |
property nearest_dc : Int32 | |
def initialize(@country : String, @this_dc : Int32, @nearest_dc : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@country.tl_serialize(io) | |
@this_dc.tl_serialize(io) | |
@nearest_dc.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
country = String.tl_deserialize(io) | |
this_dc = Int32.tl_deserialize(io) | |
nearest_dc = Int32.tl_deserialize(io) | |
new(country: country, this_dc: this_dc, nearest_dc: nearest_dc) | |
end | |
end | |
class NewSessionCreated < INewSession | |
CONSTRUCTOR_ID = 0x9EC20908 | |
property first_msg_id : Int64 | |
property unique_id : Int64 | |
property server_salt : Int64 | |
def initialize(@first_msg_id : Int64, @unique_id : Int64, @server_salt : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@first_msg_id.tl_serialize(io) | |
@unique_id.tl_serialize(io) | |
@server_salt.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
first_msg_id = Int64.tl_deserialize(io) | |
unique_id = Int64.tl_deserialize(io) | |
server_salt = Int64.tl_deserialize(io) | |
new(first_msg_id: first_msg_id, unique_id: unique_id, server_salt: server_salt) | |
end | |
end | |
class NotifyBroadcasts < INotifyPeer | |
CONSTRUCTOR_ID = 0xD612E8EF | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class NotifyChats < INotifyPeer | |
CONSTRUCTOR_ID = 0xC007CEC3 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class NotifyPeer < INotifyPeer | |
CONSTRUCTOR_ID = 0x9FD40BD8 | |
property peer : Root::IPeer | |
def initialize(@peer : Root::IPeer) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peer.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peer = Root::Peer.tl_deserialize(io) | |
new(peer: peer) | |
end | |
end | |
class NotifyUsers < INotifyPeer | |
CONSTRUCTOR_ID = 0xB4C83B4C | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PQInnerData < IPQInnerData | |
CONSTRUCTOR_ID = 0x83C95AEC | |
property pq : Bytes | |
property p : Bytes | |
property q : Bytes | |
property nonce : TL::I128 | |
property server_nonce : TL::I128 | |
property new_nonce : TL::I256 | |
def initialize(@pq : Bytes, @p : Bytes, @q : Bytes, @nonce : TL::I128, @server_nonce : TL::I128, @new_nonce : TL::I256) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@pq.tl_serialize(io) | |
@p.tl_serialize(io) | |
@q.tl_serialize(io) | |
@nonce.tl_serialize(io) | |
@server_nonce.tl_serialize(io) | |
@new_nonce.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
pq = Bytes.tl_deserialize(io) | |
p = Bytes.tl_deserialize(io) | |
q = Bytes.tl_deserialize(io) | |
nonce = TL::I128.tl_deserialize(io) | |
server_nonce = TL::I128.tl_deserialize(io) | |
new_nonce = TL::I256.tl_deserialize(io) | |
new(pq: pq, p: p, q: q, nonce: nonce, server_nonce: server_nonce, new_nonce: new_nonce) | |
end | |
end | |
class PQInnerDataDc < IPQInnerData | |
CONSTRUCTOR_ID = 0xA9F55F95 | |
property pq : Bytes | |
property p : Bytes | |
property q : Bytes | |
property nonce : TL::I128 | |
property server_nonce : TL::I128 | |
property new_nonce : TL::I256 | |
property dc : Int32 | |
def initialize(@pq : Bytes, @p : Bytes, @q : Bytes, @nonce : TL::I128, @server_nonce : TL::I128, @new_nonce : TL::I256, @dc : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@pq.tl_serialize(io) | |
@p.tl_serialize(io) | |
@q.tl_serialize(io) | |
@nonce.tl_serialize(io) | |
@server_nonce.tl_serialize(io) | |
@new_nonce.tl_serialize(io) | |
@dc.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
pq = Bytes.tl_deserialize(io) | |
p = Bytes.tl_deserialize(io) | |
q = Bytes.tl_deserialize(io) | |
nonce = TL::I128.tl_deserialize(io) | |
server_nonce = TL::I128.tl_deserialize(io) | |
new_nonce = TL::I256.tl_deserialize(io) | |
dc = Int32.tl_deserialize(io) | |
new(pq: pq, p: p, q: q, nonce: nonce, server_nonce: server_nonce, new_nonce: new_nonce, dc: dc) | |
end | |
end | |
class PQInnerDataTemp < IPQInnerData | |
CONSTRUCTOR_ID = 0x3C6A84D4 | |
property pq : Bytes | |
property p : Bytes | |
property q : Bytes | |
property nonce : TL::I128 | |
property server_nonce : TL::I128 | |
property new_nonce : TL::I256 | |
property expires_in : Int32 | |
def initialize(@pq : Bytes, @p : Bytes, @q : Bytes, @nonce : TL::I128, @server_nonce : TL::I128, @new_nonce : TL::I256, @expires_in : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@pq.tl_serialize(io) | |
@p.tl_serialize(io) | |
@q.tl_serialize(io) | |
@nonce.tl_serialize(io) | |
@server_nonce.tl_serialize(io) | |
@new_nonce.tl_serialize(io) | |
@expires_in.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
pq = Bytes.tl_deserialize(io) | |
p = Bytes.tl_deserialize(io) | |
q = Bytes.tl_deserialize(io) | |
nonce = TL::I128.tl_deserialize(io) | |
server_nonce = TL::I128.tl_deserialize(io) | |
new_nonce = TL::I256.tl_deserialize(io) | |
expires_in = Int32.tl_deserialize(io) | |
new(pq: pq, p: p, q: q, nonce: nonce, server_nonce: server_nonce, new_nonce: new_nonce, expires_in: expires_in) | |
end | |
end | |
class PQInnerDataTempDc < IPQInnerData | |
CONSTRUCTOR_ID = 0x56FDDF88 | |
property pq : Bytes | |
property p : Bytes | |
property q : Bytes | |
property nonce : TL::I128 | |
property server_nonce : TL::I128 | |
property new_nonce : TL::I256 | |
property dc : Int32 | |
property expires_in : Int32 | |
def initialize(@pq : Bytes, @p : Bytes, @q : Bytes, @nonce : TL::I128, @server_nonce : TL::I128, @new_nonce : TL::I256, @dc : Int32, @expires_in : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@pq.tl_serialize(io) | |
@p.tl_serialize(io) | |
@q.tl_serialize(io) | |
@nonce.tl_serialize(io) | |
@server_nonce.tl_serialize(io) | |
@new_nonce.tl_serialize(io) | |
@dc.tl_serialize(io) | |
@expires_in.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
pq = Bytes.tl_deserialize(io) | |
p = Bytes.tl_deserialize(io) | |
q = Bytes.tl_deserialize(io) | |
nonce = TL::I128.tl_deserialize(io) | |
server_nonce = TL::I128.tl_deserialize(io) | |
new_nonce = TL::I256.tl_deserialize(io) | |
dc = Int32.tl_deserialize(io) | |
expires_in = Int32.tl_deserialize(io) | |
new(pq: pq, p: p, q: q, nonce: nonce, server_nonce: server_nonce, new_nonce: new_nonce, dc: dc, expires_in: expires_in) | |
end | |
end | |
class Page < IPage | |
CONSTRUCTOR_ID = 0x98657F0D | |
property url : String | |
property blocks : Array(Root::IPageBlock) | |
property photos : Array(Root::IPhoto) | |
property documents : Array(Root::IDocument) | |
property part : Bool | |
property rtl : Bool | |
property v2 : Bool | |
property views : Int32? | |
def initialize(@url : String, @blocks : Array(Root::IPageBlock), @photos : Array(Root::IPhoto), @documents : Array(Root::IDocument), @part : Bool = nil, @rtl : Bool = nil, @v2 : Bool = nil, @views : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @part ? 1 : 0 | @rtl ? 2 : 0 | @v2 ? 4 : 0 | @views ? 8 : 0).tl_serialize(io) | |
if part = @part | |
part.tl_serialize(io) | |
end | |
if rtl = @rtl | |
rtl.tl_serialize(io) | |
end | |
if v2 = @v2 | |
v2.tl_serialize(io) | |
end | |
@url.tl_serialize(io) | |
@blocks.tl_serialize(io) | |
@photos.tl_serialize(io) | |
@documents.tl_serialize(io) | |
if views = @views | |
views.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
part = (flags & 1) != 0 | |
rtl = (flags & 2) != 0 | |
v2 = (flags & 4) != 0 | |
url = String.tl_deserialize(io) | |
blocks = Array(Root::PageBlock).tl_deserialize(io) | |
photos = Array(Root::Photo).tl_deserialize(io) | |
documents = Array(Root::Document).tl_deserialize(io) | |
views = (flags & 8) != 0 ? Int32.tl_deserialize(io) : nil | |
new(part: part, rtl: rtl, v2: v2, url: url, blocks: blocks, photos: photos, documents: documents, views: views) | |
end | |
end | |
class PageBlockAnchor < IPageBlock | |
CONSTRUCTOR_ID = 0xCE0D37B0 | |
property name : String | |
def initialize(@name : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@name.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
name = String.tl_deserialize(io) | |
new(name: name) | |
end | |
end | |
class PageBlockAudio < IPageBlock | |
CONSTRUCTOR_ID = 0x804361EA | |
property audio_id : Int64 | |
property caption : Root::IPageCaption | |
def initialize(@audio_id : Int64, @caption : Root::IPageCaption) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@audio_id.tl_serialize(io) | |
@caption.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
audio_id = Int64.tl_deserialize(io) | |
caption = Root::PageCaption.tl_deserialize(io) | |
new(audio_id: audio_id, caption: caption) | |
end | |
end | |
class PageBlockAuthorDate < IPageBlock | |
CONSTRUCTOR_ID = 0xBAAFE5E0 | |
property author : Root::IRichText | |
property published_date : Int32 | |
def initialize(@author : Root::IRichText, @published_date : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@author.tl_serialize(io) | |
@published_date.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
author = Root::RichText.tl_deserialize(io) | |
published_date = Int32.tl_deserialize(io) | |
new(author: author, published_date: published_date) | |
end | |
end | |
class PageBlockBlockquote < IPageBlock | |
CONSTRUCTOR_ID = 0x263D7C26 | |
property text : Root::IRichText | |
property caption : Root::IRichText | |
def initialize(@text : Root::IRichText, @caption : Root::IRichText) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
@caption.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
caption = Root::RichText.tl_deserialize(io) | |
new(text: text, caption: caption) | |
end | |
end | |
class PageBlockChannel < IPageBlock | |
CONSTRUCTOR_ID = 0xEF1751B5 | |
property channel : Root::IChat | |
def initialize(@channel : Root::IChat) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@channel.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
channel = Root::Chat.tl_deserialize(io) | |
new(channel: channel) | |
end | |
end | |
class PageBlockCollage < IPageBlock | |
CONSTRUCTOR_ID = 0x65A0FA4D | |
property items : Array(Root::IPageBlock) | |
property caption : Root::IPageCaption | |
def initialize(@items : Array(Root::IPageBlock), @caption : Root::IPageCaption) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@items.tl_serialize(io) | |
@caption.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
items = Array(Root::PageBlock).tl_deserialize(io) | |
caption = Root::PageCaption.tl_deserialize(io) | |
new(items: items, caption: caption) | |
end | |
end | |
class PageBlockCover < IPageBlock | |
CONSTRUCTOR_ID = 0x39F23300 | |
property cover : Root::IPageBlock | |
def initialize(@cover : Root::IPageBlock) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@cover.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
cover = Root::PageBlock.tl_deserialize(io) | |
new(cover: cover) | |
end | |
end | |
class PageBlockDetails < IPageBlock | |
CONSTRUCTOR_ID = 0x76768BED | |
property blocks : Array(Root::IPageBlock) | |
property title : Root::IRichText | |
property open : Bool | |
def initialize(@blocks : Array(Root::IPageBlock), @title : Root::IRichText, @open : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @open ? 1 : 0).tl_serialize(io) | |
if open = @open | |
open.tl_serialize(io) | |
end | |
@blocks.tl_serialize(io) | |
@title.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
open = (flags & 1) != 0 | |
blocks = Array(Root::PageBlock).tl_deserialize(io) | |
title = Root::RichText.tl_deserialize(io) | |
new(open: open, blocks: blocks, title: title) | |
end | |
end | |
class PageBlockDivider < IPageBlock | |
CONSTRUCTOR_ID = 0xDB20B188 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PageBlockEmbed < IPageBlock | |
CONSTRUCTOR_ID = 0xA8718DC5 | |
property caption : Root::IPageCaption | |
property full_width : Bool | |
property allow_scrolling : Bool | |
property url : String? | |
property html : String? | |
property poster_photo_id : Int64? | |
property w : Int32? | |
property h : Int32? | |
def initialize(@caption : Root::IPageCaption, @full_width : Bool = nil, @allow_scrolling : Bool = nil, @url : String? = nil, @html : String? = nil, @poster_photo_id : Int64? = nil, @w : Int32? = nil, @h : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @full_width ? 1 : 0 | @allow_scrolling ? 8 : 0 | @url ? 2 : 0 | @html ? 4 : 0 | @poster_photo_id ? 16 : 0 | @w ? 32 : 0 | @h ? 32 : 0).tl_serialize(io) | |
if full_width = @full_width | |
full_width.tl_serialize(io) | |
end | |
if allow_scrolling = @allow_scrolling | |
allow_scrolling.tl_serialize(io) | |
end | |
if url = @url | |
url.tl_serialize(io) | |
end | |
if html = @html | |
html.tl_serialize(io) | |
end | |
if poster_photo_id = @poster_photo_id | |
poster_photo_id.tl_serialize(io) | |
end | |
if w = @w | |
w.tl_serialize(io) | |
end | |
if h = @h | |
h.tl_serialize(io) | |
end | |
@caption.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
full_width = (flags & 1) != 0 | |
allow_scrolling = (flags & 8) != 0 | |
url = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
html = (flags & 4) != 0 ? String.tl_deserialize(io) : nil | |
poster_photo_id = (flags & 16) != 0 ? Int64.tl_deserialize(io) : nil | |
w = (flags & 32) != 0 ? Int32.tl_deserialize(io) : nil | |
h = (flags & 32) != 0 ? Int32.tl_deserialize(io) : nil | |
caption = Root::PageCaption.tl_deserialize(io) | |
new(full_width: full_width, allow_scrolling: allow_scrolling, url: url, html: html, poster_photo_id: poster_photo_id, w: w, h: h, caption: caption) | |
end | |
end | |
class PageBlockEmbedPost < IPageBlock | |
CONSTRUCTOR_ID = 0xF259A80B | |
property url : String | |
property webpage_id : Int64 | |
property author_photo_id : Int64 | |
property author : String | |
property date : Int32 | |
property blocks : Array(Root::IPageBlock) | |
property caption : Root::IPageCaption | |
def initialize(@url : String, @webpage_id : Int64, @author_photo_id : Int64, @author : String, @date : Int32, @blocks : Array(Root::IPageBlock), @caption : Root::IPageCaption) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@url.tl_serialize(io) | |
@webpage_id.tl_serialize(io) | |
@author_photo_id.tl_serialize(io) | |
@author.tl_serialize(io) | |
@date.tl_serialize(io) | |
@blocks.tl_serialize(io) | |
@caption.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
url = String.tl_deserialize(io) | |
webpage_id = Int64.tl_deserialize(io) | |
author_photo_id = Int64.tl_deserialize(io) | |
author = String.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
blocks = Array(Root::PageBlock).tl_deserialize(io) | |
caption = Root::PageCaption.tl_deserialize(io) | |
new(url: url, webpage_id: webpage_id, author_photo_id: author_photo_id, author: author, date: date, blocks: blocks, caption: caption) | |
end | |
end | |
class PageBlockFooter < IPageBlock | |
CONSTRUCTOR_ID = 0x48870999 | |
property text : Root::IRichText | |
def initialize(@text : Root::IRichText) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class PageBlockHeader < IPageBlock | |
CONSTRUCTOR_ID = 0xBFD064EC | |
property text : Root::IRichText | |
def initialize(@text : Root::IRichText) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class PageBlockKicker < IPageBlock | |
CONSTRUCTOR_ID = 0x1E148390 | |
property text : Root::IRichText | |
def initialize(@text : Root::IRichText) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class PageBlockList < IPageBlock | |
CONSTRUCTOR_ID = 0xE4E88011 | |
property items : Array(Root::IPageListItem) | |
def initialize(@items : Array(Root::IPageListItem)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@items.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
items = Array(Root::PageListItem).tl_deserialize(io) | |
new(items: items) | |
end | |
end | |
class PageBlockMap < IPageBlock | |
CONSTRUCTOR_ID = 0xA44F3EF6 | |
property geo : Root::IGeoPoint | |
property zoom : Int32 | |
property w : Int32 | |
property h : Int32 | |
property caption : Root::IPageCaption | |
def initialize(@geo : Root::IGeoPoint, @zoom : Int32, @w : Int32, @h : Int32, @caption : Root::IPageCaption) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@geo.tl_serialize(io) | |
@zoom.tl_serialize(io) | |
@w.tl_serialize(io) | |
@h.tl_serialize(io) | |
@caption.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
geo = Root::GeoPoint.tl_deserialize(io) | |
zoom = Int32.tl_deserialize(io) | |
w = Int32.tl_deserialize(io) | |
h = Int32.tl_deserialize(io) | |
caption = Root::PageCaption.tl_deserialize(io) | |
new(geo: geo, zoom: zoom, w: w, h: h, caption: caption) | |
end | |
end | |
class PageBlockOrderedList < IPageBlock | |
CONSTRUCTOR_ID = 0x9A8AE1E1 | |
property items : Array(Root::IPageListOrderedItem) | |
def initialize(@items : Array(Root::IPageListOrderedItem)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@items.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
items = Array(Root::PageListOrderedItem).tl_deserialize(io) | |
new(items: items) | |
end | |
end | |
class PageBlockParagraph < IPageBlock | |
CONSTRUCTOR_ID = 0x467A0766 | |
property text : Root::IRichText | |
def initialize(@text : Root::IRichText) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class PageBlockPhoto < IPageBlock | |
CONSTRUCTOR_ID = 0x1759C560 | |
property photo_id : Int64 | |
property caption : Root::IPageCaption | |
property url : String? | |
property webpage_id : Int64? | |
def initialize(@photo_id : Int64, @caption : Root::IPageCaption, @url : String? = nil, @webpage_id : Int64? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @url ? 1 : 0 | @webpage_id ? 1 : 0).tl_serialize(io) | |
@photo_id.tl_serialize(io) | |
@caption.tl_serialize(io) | |
if url = @url | |
url.tl_serialize(io) | |
end | |
if webpage_id = @webpage_id | |
webpage_id.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
photo_id = Int64.tl_deserialize(io) | |
caption = Root::PageCaption.tl_deserialize(io) | |
url = (flags & 1) != 0 ? String.tl_deserialize(io) : nil | |
webpage_id = (flags & 1) != 0 ? Int64.tl_deserialize(io) : nil | |
new(photo_id: photo_id, caption: caption, url: url, webpage_id: webpage_id) | |
end | |
end | |
class PageBlockPreformatted < IPageBlock | |
CONSTRUCTOR_ID = 0xC070D93E | |
property text : Root::IRichText | |
property language : String | |
def initialize(@text : Root::IRichText, @language : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
@language.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
language = String.tl_deserialize(io) | |
new(text: text, language: language) | |
end | |
end | |
class PageBlockPullquote < IPageBlock | |
CONSTRUCTOR_ID = 0x4F4456D3 | |
property text : Root::IRichText | |
property caption : Root::IRichText | |
def initialize(@text : Root::IRichText, @caption : Root::IRichText) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
@caption.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
caption = Root::RichText.tl_deserialize(io) | |
new(text: text, caption: caption) | |
end | |
end | |
class PageBlockRelatedArticles < IPageBlock | |
CONSTRUCTOR_ID = 0x16115A96 | |
property title : Root::IRichText | |
property articles : Array(Root::IPageRelatedArticle) | |
def initialize(@title : Root::IRichText, @articles : Array(Root::IPageRelatedArticle)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@title.tl_serialize(io) | |
@articles.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
title = Root::RichText.tl_deserialize(io) | |
articles = Array(Root::PageRelatedArticle).tl_deserialize(io) | |
new(title: title, articles: articles) | |
end | |
end | |
class PageBlockSlideshow < IPageBlock | |
CONSTRUCTOR_ID = 0x031F9590 | |
property items : Array(Root::IPageBlock) | |
property caption : Root::IPageCaption | |
def initialize(@items : Array(Root::IPageBlock), @caption : Root::IPageCaption) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@items.tl_serialize(io) | |
@caption.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
items = Array(Root::PageBlock).tl_deserialize(io) | |
caption = Root::PageCaption.tl_deserialize(io) | |
new(items: items, caption: caption) | |
end | |
end | |
class PageBlockSubheader < IPageBlock | |
CONSTRUCTOR_ID = 0xF12BB6E1 | |
property text : Root::IRichText | |
def initialize(@text : Root::IRichText) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class PageBlockSubtitle < IPageBlock | |
CONSTRUCTOR_ID = 0x8FFA9A1F | |
property text : Root::IRichText | |
def initialize(@text : Root::IRichText) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class PageBlockTable < IPageBlock | |
CONSTRUCTOR_ID = 0xBF4DEA82 | |
property title : Root::IRichText | |
property rows : Array(Root::IPageTableRow) | |
property bordered : Bool | |
property striped : Bool | |
def initialize(@title : Root::IRichText, @rows : Array(Root::IPageTableRow), @bordered : Bool = nil, @striped : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @bordered ? 1 : 0 | @striped ? 2 : 0).tl_serialize(io) | |
if bordered = @bordered | |
bordered.tl_serialize(io) | |
end | |
if striped = @striped | |
striped.tl_serialize(io) | |
end | |
@title.tl_serialize(io) | |
@rows.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
bordered = (flags & 1) != 0 | |
striped = (flags & 2) != 0 | |
title = Root::RichText.tl_deserialize(io) | |
rows = Array(Root::PageTableRow).tl_deserialize(io) | |
new(bordered: bordered, striped: striped, title: title, rows: rows) | |
end | |
end | |
class PageBlockTitle < IPageBlock | |
CONSTRUCTOR_ID = 0x70ABC3FD | |
property text : Root::IRichText | |
def initialize(@text : Root::IRichText) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class PageBlockUnsupported < IPageBlock | |
CONSTRUCTOR_ID = 0x13567E8A | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PageBlockVideo < IPageBlock | |
CONSTRUCTOR_ID = 0x7C8FE7B6 | |
property video_id : Int64 | |
property caption : Root::IPageCaption | |
property autoplay : Bool | |
property loop : Bool | |
def initialize(@video_id : Int64, @caption : Root::IPageCaption, @autoplay : Bool = nil, @loop : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @autoplay ? 1 : 0 | @loop ? 2 : 0).tl_serialize(io) | |
if autoplay = @autoplay | |
autoplay.tl_serialize(io) | |
end | |
if loop = @loop | |
loop.tl_serialize(io) | |
end | |
@video_id.tl_serialize(io) | |
@caption.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
autoplay = (flags & 1) != 0 | |
loop = (flags & 2) != 0 | |
video_id = Int64.tl_deserialize(io) | |
caption = Root::PageCaption.tl_deserialize(io) | |
new(autoplay: autoplay, loop: loop, video_id: video_id, caption: caption) | |
end | |
end | |
class PageCaption < IPageCaption | |
CONSTRUCTOR_ID = 0x6F747657 | |
property text : Root::IRichText | |
property credit : Root::IRichText | |
def initialize(@text : Root::IRichText, @credit : Root::IRichText) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
@credit.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
credit = Root::RichText.tl_deserialize(io) | |
new(text: text, credit: credit) | |
end | |
end | |
class PageListItemBlocks < IPageListItem | |
CONSTRUCTOR_ID = 0x25E073FC | |
property blocks : Array(Root::IPageBlock) | |
def initialize(@blocks : Array(Root::IPageBlock)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@blocks.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
blocks = Array(Root::PageBlock).tl_deserialize(io) | |
new(blocks: blocks) | |
end | |
end | |
class PageListItemText < IPageListItem | |
CONSTRUCTOR_ID = 0xB92FB6CD | |
property text : Root::IRichText | |
def initialize(@text : Root::IRichText) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class PageListOrderedItemBlocks < IPageListOrderedItem | |
CONSTRUCTOR_ID = 0x98DD8936 | |
property num : String | |
property blocks : Array(Root::IPageBlock) | |
def initialize(@num : String, @blocks : Array(Root::IPageBlock)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@num.tl_serialize(io) | |
@blocks.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
num = String.tl_deserialize(io) | |
blocks = Array(Root::PageBlock).tl_deserialize(io) | |
new(num: num, blocks: blocks) | |
end | |
end | |
class PageListOrderedItemText < IPageListOrderedItem | |
CONSTRUCTOR_ID = 0x5E068047 | |
property num : String | |
property text : Root::IRichText | |
def initialize(@num : String, @text : Root::IRichText) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@num.tl_serialize(io) | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
num = String.tl_deserialize(io) | |
text = Root::RichText.tl_deserialize(io) | |
new(num: num, text: text) | |
end | |
end | |
class PageRelatedArticle < IPageRelatedArticle | |
CONSTRUCTOR_ID = 0xB390DC08 | |
property url : String | |
property webpage_id : Int64 | |
property title : String? | |
property description : String? | |
property photo_id : Int64? | |
property author : String? | |
property published_date : Int32? | |
def initialize(@url : String, @webpage_id : Int64, @title : String? = nil, @description : String? = nil, @photo_id : Int64? = nil, @author : String? = nil, @published_date : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @title ? 1 : 0 | @description ? 2 : 0 | @photo_id ? 4 : 0 | @author ? 8 : 0 | @published_date ? 16 : 0).tl_serialize(io) | |
@url.tl_serialize(io) | |
@webpage_id.tl_serialize(io) | |
if title = @title | |
title.tl_serialize(io) | |
end | |
if description = @description | |
description.tl_serialize(io) | |
end | |
if photo_id = @photo_id | |
photo_id.tl_serialize(io) | |
end | |
if author = @author | |
author.tl_serialize(io) | |
end | |
if published_date = @published_date | |
published_date.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
url = String.tl_deserialize(io) | |
webpage_id = Int64.tl_deserialize(io) | |
title = (flags & 1) != 0 ? String.tl_deserialize(io) : nil | |
description = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
photo_id = (flags & 4) != 0 ? Int64.tl_deserialize(io) : nil | |
author = (flags & 8) != 0 ? String.tl_deserialize(io) : nil | |
published_date = (flags & 16) != 0 ? Int32.tl_deserialize(io) : nil | |
new(url: url, webpage_id: webpage_id, title: title, description: description, photo_id: photo_id, author: author, published_date: published_date) | |
end | |
end | |
class PageTableCell < IPageTableCell | |
CONSTRUCTOR_ID = 0x34566B6A | |
property header : Bool | |
property align_center : Bool | |
property align_right : Bool | |
property valign_middle : Bool | |
property valign_bottom : Bool | |
property text : Root::IRichText? | |
property colspan : Int32? | |
property rowspan : Int32? | |
def initialize(@header : Bool = nil, @align_center : Bool = nil, @align_right : Bool = nil, @valign_middle : Bool = nil, @valign_bottom : Bool = nil, @text : Root::IRichText? = nil, @colspan : Int32? = nil, @rowspan : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @header ? 1 : 0 | @align_center ? 8 : 0 | @align_right ? 16 : 0 | @valign_middle ? 32 : 0 | @valign_bottom ? 64 : 0 | @text ? 128 : 0 | @colspan ? 2 : 0 | @rowspan ? 4 : 0).tl_serialize(io) | |
if header = @header | |
header.tl_serialize(io) | |
end | |
if align_center = @align_center | |
align_center.tl_serialize(io) | |
end | |
if align_right = @align_right | |
align_right.tl_serialize(io) | |
end | |
if valign_middle = @valign_middle | |
valign_middle.tl_serialize(io) | |
end | |
if valign_bottom = @valign_bottom | |
valign_bottom.tl_serialize(io) | |
end | |
if text = @text | |
text.tl_serialize(io) | |
end | |
if colspan = @colspan | |
colspan.tl_serialize(io) | |
end | |
if rowspan = @rowspan | |
rowspan.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
header = (flags & 1) != 0 | |
align_center = (flags & 8) != 0 | |
align_right = (flags & 16) != 0 | |
valign_middle = (flags & 32) != 0 | |
valign_bottom = (flags & 64) != 0 | |
text = (flags & 128) != 0 ? Root::RichText.tl_deserialize(io) : nil | |
colspan = (flags & 2) != 0 ? Int32.tl_deserialize(io) : nil | |
rowspan = (flags & 4) != 0 ? Int32.tl_deserialize(io) : nil | |
new(header: header, align_center: align_center, align_right: align_right, valign_middle: valign_middle, valign_bottom: valign_bottom, text: text, colspan: colspan, rowspan: rowspan) | |
end | |
end | |
class PageTableRow < IPageTableRow | |
CONSTRUCTOR_ID = 0xE0C0C5E5 | |
property cells : Array(Root::IPageTableCell) | |
def initialize(@cells : Array(Root::IPageTableCell)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@cells.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
cells = Array(Root::PageTableCell).tl_deserialize(io) | |
new(cells: cells) | |
end | |
end | |
class PasswordKdfAlgoSha256Sha256Pbkdf2Hmacsha512iter100000Sha256ModPow < IPasswordKdfAlgo | |
CONSTRUCTOR_ID = 0x3A912D4A | |
property salt1 : Bytes | |
property salt2 : Bytes | |
property g : Int32 | |
property p : Bytes | |
def initialize(@salt1 : Bytes, @salt2 : Bytes, @g : Int32, @p : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@salt1.tl_serialize(io) | |
@salt2.tl_serialize(io) | |
@g.tl_serialize(io) | |
@p.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
salt1 = Bytes.tl_deserialize(io) | |
salt2 = Bytes.tl_deserialize(io) | |
g = Int32.tl_deserialize(io) | |
p = Bytes.tl_deserialize(io) | |
new(salt1: salt1, salt2: salt2, g: g, p: p) | |
end | |
end | |
class PasswordKdfAlgoUnknown < IPasswordKdfAlgo | |
CONSTRUCTOR_ID = 0xD45AB096 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PaymentCharge < IPaymentCharge | |
CONSTRUCTOR_ID = 0xEA02C27E | |
property id : String | |
property provider_charge_id : String | |
def initialize(@id : String, @provider_charge_id : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@provider_charge_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = String.tl_deserialize(io) | |
provider_charge_id = String.tl_deserialize(io) | |
new(id: id, provider_charge_id: provider_charge_id) | |
end | |
end | |
class PaymentRequestedInfo < IPaymentRequestedInfo | |
CONSTRUCTOR_ID = 0x909C3F94 | |
property name : String? | |
property phone : String? | |
property email : String? | |
property shipping_address : Root::IPostAddress? | |
def initialize(@name : String? = nil, @phone : String? = nil, @email : String? = nil, @shipping_address : Root::IPostAddress? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @name ? 1 : 0 | @phone ? 2 : 0 | @email ? 4 : 0 | @shipping_address ? 8 : 0).tl_serialize(io) | |
if name = @name | |
name.tl_serialize(io) | |
end | |
if phone = @phone | |
phone.tl_serialize(io) | |
end | |
if email = @email | |
email.tl_serialize(io) | |
end | |
if shipping_address = @shipping_address | |
shipping_address.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
name = (flags & 1) != 0 ? String.tl_deserialize(io) : nil | |
phone = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
email = (flags & 4) != 0 ? String.tl_deserialize(io) : nil | |
shipping_address = (flags & 8) != 0 ? Root::PostAddress.tl_deserialize(io) : nil | |
new(name: name, phone: phone, email: email, shipping_address: shipping_address) | |
end | |
end | |
class PaymentSavedCredentialsCard < IPaymentSavedCredentials | |
CONSTRUCTOR_ID = 0xCDC27A1F | |
property id : String | |
property title : String | |
def initialize(@id : String, @title : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@title.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = String.tl_deserialize(io) | |
title = String.tl_deserialize(io) | |
new(id: id, title: title) | |
end | |
end | |
class PeerBlocked < IPeerBlocked | |
CONSTRUCTOR_ID = 0xE8FD8014 | |
property peer_id : Root::IPeer | |
property date : Int32 | |
def initialize(@peer_id : Root::IPeer, @date : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peer_id.tl_serialize(io) | |
@date.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peer_id = Root::Peer.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
new(peer_id: peer_id, date: date) | |
end | |
end | |
class PeerChannel < IPeer | |
CONSTRUCTOR_ID = 0xBDDDE532 | |
property channel_id : Int32 | |
def initialize(@channel_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@channel_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
channel_id = Int32.tl_deserialize(io) | |
new(channel_id: channel_id) | |
end | |
end | |
class PeerChat < IPeer | |
CONSTRUCTOR_ID = 0xBAD0E5BB | |
property chat_id : Int32 | |
def initialize(@chat_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@chat_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
chat_id = Int32.tl_deserialize(io) | |
new(chat_id: chat_id) | |
end | |
end | |
class PeerLocated < IPeerLocated | |
CONSTRUCTOR_ID = 0xCA461B5D | |
property peer : Root::IPeer | |
property expires : Int32 | |
property distance : Int32 | |
def initialize(@peer : Root::IPeer, @expires : Int32, @distance : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peer.tl_serialize(io) | |
@expires.tl_serialize(io) | |
@distance.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peer = Root::Peer.tl_deserialize(io) | |
expires = Int32.tl_deserialize(io) | |
distance = Int32.tl_deserialize(io) | |
new(peer: peer, expires: expires, distance: distance) | |
end | |
end | |
class PeerNotifySettings < IPeerNotifySettings | |
CONSTRUCTOR_ID = 0xAF509D20 | |
property show_previews : Bool? | |
property silent : Bool? | |
property mute_until : Int32? | |
property sound : String? | |
def initialize(@show_previews : Bool? = nil, @silent : Bool? = nil, @mute_until : Int32? = nil, @sound : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @show_previews ? 1 : 0 | @silent ? 2 : 0 | @mute_until ? 4 : 0 | @sound ? 8 : 0).tl_serialize(io) | |
if show_previews = @show_previews | |
show_previews.tl_serialize(io) | |
end | |
if silent = @silent | |
silent.tl_serialize(io) | |
end | |
if mute_until = @mute_until | |
mute_until.tl_serialize(io) | |
end | |
if sound = @sound | |
sound.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
show_previews = (flags & 1) != 0 ? Bool.tl_deserialize(io) : nil | |
silent = (flags & 2) != 0 ? Bool.tl_deserialize(io) : nil | |
mute_until = (flags & 4) != 0 ? Int32.tl_deserialize(io) : nil | |
sound = (flags & 8) != 0 ? String.tl_deserialize(io) : nil | |
new(show_previews: show_previews, silent: silent, mute_until: mute_until, sound: sound) | |
end | |
end | |
class PeerSelfLocated < IPeerLocated | |
CONSTRUCTOR_ID = 0xF8EC284B | |
property expires : Int32 | |
def initialize(@expires : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@expires.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
expires = Int32.tl_deserialize(io) | |
new(expires: expires) | |
end | |
end | |
class PeerSettings < IPeerSettings | |
CONSTRUCTOR_ID = 0x733F2961 | |
property report_spam : Bool | |
property add_contact : Bool | |
property block_contact : Bool | |
property share_contact : Bool | |
property need_contacts_exception : Bool | |
property report_geo : Bool | |
property autoarchived : Bool | |
property geo_distance : Int32? | |
def initialize(@report_spam : Bool = nil, @add_contact : Bool = nil, @block_contact : Bool = nil, @share_contact : Bool = nil, @need_contacts_exception : Bool = nil, @report_geo : Bool = nil, @autoarchived : Bool = nil, @geo_distance : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @report_spam ? 1 : 0 | @add_contact ? 2 : 0 | @block_contact ? 4 : 0 | @share_contact ? 8 : 0 | @need_contacts_exception ? 16 : 0 | @report_geo ? 32 : 0 | @autoarchived ? 128 : 0 | @geo_distance ? 64 : 0).tl_serialize(io) | |
if report_spam = @report_spam | |
report_spam.tl_serialize(io) | |
end | |
if add_contact = @add_contact | |
add_contact.tl_serialize(io) | |
end | |
if block_contact = @block_contact | |
block_contact.tl_serialize(io) | |
end | |
if share_contact = @share_contact | |
share_contact.tl_serialize(io) | |
end | |
if need_contacts_exception = @need_contacts_exception | |
need_contacts_exception.tl_serialize(io) | |
end | |
if report_geo = @report_geo | |
report_geo.tl_serialize(io) | |
end | |
if autoarchived = @autoarchived | |
autoarchived.tl_serialize(io) | |
end | |
if geo_distance = @geo_distance | |
geo_distance.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
report_spam = (flags & 1) != 0 | |
add_contact = (flags & 2) != 0 | |
block_contact = (flags & 4) != 0 | |
share_contact = (flags & 8) != 0 | |
need_contacts_exception = (flags & 16) != 0 | |
report_geo = (flags & 32) != 0 | |
autoarchived = (flags & 128) != 0 | |
geo_distance = (flags & 64) != 0 ? Int32.tl_deserialize(io) : nil | |
new(report_spam: report_spam, add_contact: add_contact, block_contact: block_contact, share_contact: share_contact, need_contacts_exception: need_contacts_exception, report_geo: report_geo, autoarchived: autoarchived, geo_distance: geo_distance) | |
end | |
end | |
class PeerUser < IPeer | |
CONSTRUCTOR_ID = 0x9DB1BC6D | |
property user_id : Int32 | |
def initialize(@user_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
new(user_id: user_id) | |
end | |
end | |
class PhoneCall < IPhoneCall | |
CONSTRUCTOR_ID = 0x8742AE7F | |
property id : Int64 | |
property access_hash : Int64 | |
property date : Int32 | |
property admin_id : Int32 | |
property participant_id : Int32 | |
property g_a_or_b : Bytes | |
property key_fingerprint : Int64 | |
property protocol : Root::IPhoneCallProtocol | |
property connections : Array(Root::IPhoneConnection) | |
property start_date : Int32 | |
property p2p_allowed : Bool | |
property video : Bool | |
def initialize(@id : Int64, @access_hash : Int64, @date : Int32, @admin_id : Int32, @participant_id : Int32, @g_a_or_b : Bytes, @key_fingerprint : Int64, @protocol : Root::IPhoneCallProtocol, @connections : Array(Root::IPhoneConnection), @start_date : Int32, @p2p_allowed : Bool = nil, @video : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @p2p_allowed ? 32 : 0 | @video ? 64 : 0).tl_serialize(io) | |
if p2p_allowed = @p2p_allowed | |
p2p_allowed.tl_serialize(io) | |
end | |
if video = @video | |
video.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@date.tl_serialize(io) | |
@admin_id.tl_serialize(io) | |
@participant_id.tl_serialize(io) | |
@g_a_or_b.tl_serialize(io) | |
@key_fingerprint.tl_serialize(io) | |
@protocol.tl_serialize(io) | |
@connections.tl_serialize(io) | |
@start_date.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
p2p_allowed = (flags & 32) != 0 | |
video = (flags & 64) != 0 | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
admin_id = Int32.tl_deserialize(io) | |
participant_id = Int32.tl_deserialize(io) | |
g_a_or_b = Bytes.tl_deserialize(io) | |
key_fingerprint = Int64.tl_deserialize(io) | |
protocol = Root::PhoneCallProtocol.tl_deserialize(io) | |
connections = Array(Root::PhoneConnection).tl_deserialize(io) | |
start_date = Int32.tl_deserialize(io) | |
new(p2p_allowed: p2p_allowed, video: video, id: id, access_hash: access_hash, date: date, admin_id: admin_id, participant_id: participant_id, g_a_or_b: g_a_or_b, key_fingerprint: key_fingerprint, protocol: protocol, connections: connections, start_date: start_date) | |
end | |
end | |
class PhoneCallAccepted < IPhoneCall | |
CONSTRUCTOR_ID = 0x997C454A | |
property id : Int64 | |
property access_hash : Int64 | |
property date : Int32 | |
property admin_id : Int32 | |
property participant_id : Int32 | |
property g_b : Bytes | |
property protocol : Root::IPhoneCallProtocol | |
property video : Bool | |
def initialize(@id : Int64, @access_hash : Int64, @date : Int32, @admin_id : Int32, @participant_id : Int32, @g_b : Bytes, @protocol : Root::IPhoneCallProtocol, @video : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @video ? 64 : 0).tl_serialize(io) | |
if video = @video | |
video.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@date.tl_serialize(io) | |
@admin_id.tl_serialize(io) | |
@participant_id.tl_serialize(io) | |
@g_b.tl_serialize(io) | |
@protocol.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
video = (flags & 64) != 0 | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
admin_id = Int32.tl_deserialize(io) | |
participant_id = Int32.tl_deserialize(io) | |
g_b = Bytes.tl_deserialize(io) | |
protocol = Root::PhoneCallProtocol.tl_deserialize(io) | |
new(video: video, id: id, access_hash: access_hash, date: date, admin_id: admin_id, participant_id: participant_id, g_b: g_b, protocol: protocol) | |
end | |
end | |
class PhoneCallDiscardReasonBusy < IPhoneCallDiscardReason | |
CONSTRUCTOR_ID = 0xFAF7E8C9 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PhoneCallDiscardReasonDisconnect < IPhoneCallDiscardReason | |
CONSTRUCTOR_ID = 0xE095C1A0 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PhoneCallDiscardReasonHangup < IPhoneCallDiscardReason | |
CONSTRUCTOR_ID = 0x57ADC690 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PhoneCallDiscardReasonMissed < IPhoneCallDiscardReason | |
CONSTRUCTOR_ID = 0x85E42301 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PhoneCallDiscarded < IPhoneCall | |
CONSTRUCTOR_ID = 0x50CA4DE1 | |
property id : Int64 | |
property need_rating : Bool | |
property need_debug : Bool | |
property video : Bool | |
property reason : Root::IPhoneCallDiscardReason? | |
property duration : Int32? | |
def initialize(@id : Int64, @need_rating : Bool = nil, @need_debug : Bool = nil, @video : Bool = nil, @reason : Root::IPhoneCallDiscardReason? = nil, @duration : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @need_rating ? 4 : 0 | @need_debug ? 8 : 0 | @video ? 64 : 0 | @reason ? 1 : 0 | @duration ? 2 : 0).tl_serialize(io) | |
if need_rating = @need_rating | |
need_rating.tl_serialize(io) | |
end | |
if need_debug = @need_debug | |
need_debug.tl_serialize(io) | |
end | |
if video = @video | |
video.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
if reason = @reason | |
reason.tl_serialize(io) | |
end | |
if duration = @duration | |
duration.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
need_rating = (flags & 4) != 0 | |
need_debug = (flags & 8) != 0 | |
video = (flags & 64) != 0 | |
id = Int64.tl_deserialize(io) | |
reason = (flags & 1) != 0 ? Root::PhoneCallDiscardReason.tl_deserialize(io) : nil | |
duration = (flags & 2) != 0 ? Int32.tl_deserialize(io) : nil | |
new(need_rating: need_rating, need_debug: need_debug, video: video, id: id, reason: reason, duration: duration) | |
end | |
end | |
class PhoneCallEmpty < IPhoneCall | |
CONSTRUCTOR_ID = 0x5366C915 | |
property id : Int64 | |
def initialize(@id : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
new(id: id) | |
end | |
end | |
class PhoneCallProtocol < IPhoneCallProtocol | |
CONSTRUCTOR_ID = 0xFC878FC8 | |
property min_layer : Int32 | |
property max_layer : Int32 | |
property library_versions : Array(String) | |
property udp_p2p : Bool | |
property udp_reflector : Bool | |
def initialize(@min_layer : Int32, @max_layer : Int32, @library_versions : Array(String), @udp_p2p : Bool = nil, @udp_reflector : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @udp_p2p ? 1 : 0 | @udp_reflector ? 2 : 0).tl_serialize(io) | |
if udp_p2p = @udp_p2p | |
udp_p2p.tl_serialize(io) | |
end | |
if udp_reflector = @udp_reflector | |
udp_reflector.tl_serialize(io) | |
end | |
@min_layer.tl_serialize(io) | |
@max_layer.tl_serialize(io) | |
@library_versions.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
udp_p2p = (flags & 1) != 0 | |
udp_reflector = (flags & 2) != 0 | |
min_layer = Int32.tl_deserialize(io) | |
max_layer = Int32.tl_deserialize(io) | |
library_versions = Array(String).tl_deserialize(io) | |
new(udp_p2p: udp_p2p, udp_reflector: udp_reflector, min_layer: min_layer, max_layer: max_layer, library_versions: library_versions) | |
end | |
end | |
class PhoneCallRequested < IPhoneCall | |
CONSTRUCTOR_ID = 0x87EABB53 | |
property id : Int64 | |
property access_hash : Int64 | |
property date : Int32 | |
property admin_id : Int32 | |
property participant_id : Int32 | |
property g_a_hash : Bytes | |
property protocol : Root::IPhoneCallProtocol | |
property video : Bool | |
def initialize(@id : Int64, @access_hash : Int64, @date : Int32, @admin_id : Int32, @participant_id : Int32, @g_a_hash : Bytes, @protocol : Root::IPhoneCallProtocol, @video : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @video ? 64 : 0).tl_serialize(io) | |
if video = @video | |
video.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@date.tl_serialize(io) | |
@admin_id.tl_serialize(io) | |
@participant_id.tl_serialize(io) | |
@g_a_hash.tl_serialize(io) | |
@protocol.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
video = (flags & 64) != 0 | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
admin_id = Int32.tl_deserialize(io) | |
participant_id = Int32.tl_deserialize(io) | |
g_a_hash = Bytes.tl_deserialize(io) | |
protocol = Root::PhoneCallProtocol.tl_deserialize(io) | |
new(video: video, id: id, access_hash: access_hash, date: date, admin_id: admin_id, participant_id: participant_id, g_a_hash: g_a_hash, protocol: protocol) | |
end | |
end | |
class PhoneCallWaiting < IPhoneCall | |
CONSTRUCTOR_ID = 0x1B8F4AD1 | |
property id : Int64 | |
property access_hash : Int64 | |
property date : Int32 | |
property admin_id : Int32 | |
property participant_id : Int32 | |
property protocol : Root::IPhoneCallProtocol | |
property video : Bool | |
property receive_date : Int32? | |
def initialize(@id : Int64, @access_hash : Int64, @date : Int32, @admin_id : Int32, @participant_id : Int32, @protocol : Root::IPhoneCallProtocol, @video : Bool = nil, @receive_date : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @video ? 64 : 0 | @receive_date ? 1 : 0).tl_serialize(io) | |
if video = @video | |
video.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@date.tl_serialize(io) | |
@admin_id.tl_serialize(io) | |
@participant_id.tl_serialize(io) | |
@protocol.tl_serialize(io) | |
if receive_date = @receive_date | |
receive_date.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
video = (flags & 64) != 0 | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
admin_id = Int32.tl_deserialize(io) | |
participant_id = Int32.tl_deserialize(io) | |
protocol = Root::PhoneCallProtocol.tl_deserialize(io) | |
receive_date = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
new(video: video, id: id, access_hash: access_hash, date: date, admin_id: admin_id, participant_id: participant_id, protocol: protocol, receive_date: receive_date) | |
end | |
end | |
class PhoneConnection < IPhoneConnection | |
CONSTRUCTOR_ID = 0x9D4C17C0 | |
property id : Int64 | |
property ip : String | |
property ipv6 : String | |
property port : Int32 | |
property peer_tag : Bytes | |
def initialize(@id : Int64, @ip : String, @ipv6 : String, @port : Int32, @peer_tag : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@ip.tl_serialize(io) | |
@ipv6.tl_serialize(io) | |
@port.tl_serialize(io) | |
@peer_tag.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
ip = String.tl_deserialize(io) | |
ipv6 = String.tl_deserialize(io) | |
port = Int32.tl_deserialize(io) | |
peer_tag = Bytes.tl_deserialize(io) | |
new(id: id, ip: ip, ipv6: ipv6, port: port, peer_tag: peer_tag) | |
end | |
end | |
class PhoneConnectionWebrtc < IPhoneConnection | |
CONSTRUCTOR_ID = 0x635FE375 | |
property id : Int64 | |
property ip : String | |
property ipv6 : String | |
property port : Int32 | |
property username : String | |
property password : String | |
property turn : Bool | |
property stun : Bool | |
def initialize(@id : Int64, @ip : String, @ipv6 : String, @port : Int32, @username : String, @password : String, @turn : Bool = nil, @stun : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @turn ? 1 : 0 | @stun ? 2 : 0).tl_serialize(io) | |
if turn = @turn | |
turn.tl_serialize(io) | |
end | |
if stun = @stun | |
stun.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@ip.tl_serialize(io) | |
@ipv6.tl_serialize(io) | |
@port.tl_serialize(io) | |
@username.tl_serialize(io) | |
@password.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
turn = (flags & 1) != 0 | |
stun = (flags & 2) != 0 | |
id = Int64.tl_deserialize(io) | |
ip = String.tl_deserialize(io) | |
ipv6 = String.tl_deserialize(io) | |
port = Int32.tl_deserialize(io) | |
username = String.tl_deserialize(io) | |
password = String.tl_deserialize(io) | |
new(turn: turn, stun: stun, id: id, ip: ip, ipv6: ipv6, port: port, username: username, password: password) | |
end | |
end | |
class Photo < IPhoto | |
CONSTRUCTOR_ID = 0xFB197A65 | |
property id : Int64 | |
property access_hash : Int64 | |
property file_reference : Bytes | |
property date : Int32 | |
property sizes : Array(Root::IPhotoSize) | |
property dc_id : Int32 | |
property has_stickers : Bool | |
property video_sizes : Array(Root::IVideoSize)? | |
def initialize(@id : Int64, @access_hash : Int64, @file_reference : Bytes, @date : Int32, @sizes : Array(Root::IPhotoSize), @dc_id : Int32, @has_stickers : Bool = nil, @video_sizes : Array(Root::IVideoSize)? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @has_stickers ? 1 : 0 | @video_sizes ? 2 : 0).tl_serialize(io) | |
if has_stickers = @has_stickers | |
has_stickers.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@file_reference.tl_serialize(io) | |
@date.tl_serialize(io) | |
@sizes.tl_serialize(io) | |
if video_sizes = @video_sizes | |
video_sizes.tl_serialize(io) | |
end | |
@dc_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
has_stickers = (flags & 1) != 0 | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
file_reference = Bytes.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
sizes = Array(Root::PhotoSize).tl_deserialize(io) | |
video_sizes = (flags & 2) != 0 ? Array(Root::VideoSize).tl_deserialize(io) : nil | |
dc_id = Int32.tl_deserialize(io) | |
new(has_stickers: has_stickers, id: id, access_hash: access_hash, file_reference: file_reference, date: date, sizes: sizes, video_sizes: video_sizes, dc_id: dc_id) | |
end | |
end | |
class PhotoCachedSize < IPhotoSize | |
CONSTRUCTOR_ID = 0xE9A734FA | |
property type : String | |
property location : Root::IFileLocation | |
property w : Int32 | |
property h : Int32 | |
property bytes : Bytes | |
def initialize(@type : String, @location : Root::IFileLocation, @w : Int32, @h : Int32, @bytes : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@type.tl_serialize(io) | |
@location.tl_serialize(io) | |
@w.tl_serialize(io) | |
@h.tl_serialize(io) | |
@bytes.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
type = String.tl_deserialize(io) | |
location = Root::FileLocation.tl_deserialize(io) | |
w = Int32.tl_deserialize(io) | |
h = Int32.tl_deserialize(io) | |
bytes = Bytes.tl_deserialize(io) | |
new(type: type, location: location, w: w, h: h, bytes: bytes) | |
end | |
end | |
class PhotoEmpty < IPhoto | |
CONSTRUCTOR_ID = 0x2331B22D | |
property id : Int64 | |
def initialize(@id : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
new(id: id) | |
end | |
end | |
class PhotoPathSize < IPhotoSize | |
CONSTRUCTOR_ID = 0xD8214D41 | |
property type : String | |
property bytes : Bytes | |
def initialize(@type : String, @bytes : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@type.tl_serialize(io) | |
@bytes.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
type = String.tl_deserialize(io) | |
bytes = Bytes.tl_deserialize(io) | |
new(type: type, bytes: bytes) | |
end | |
end | |
class PhotoSize < IPhotoSize | |
CONSTRUCTOR_ID = 0x77BFB61B | |
property type : String | |
property location : Root::IFileLocation | |
property w : Int32 | |
property h : Int32 | |
property size : Int32 | |
def initialize(@type : String, @location : Root::IFileLocation, @w : Int32, @h : Int32, @size : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@type.tl_serialize(io) | |
@location.tl_serialize(io) | |
@w.tl_serialize(io) | |
@h.tl_serialize(io) | |
@size.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
type = String.tl_deserialize(io) | |
location = Root::FileLocation.tl_deserialize(io) | |
w = Int32.tl_deserialize(io) | |
h = Int32.tl_deserialize(io) | |
size = Int32.tl_deserialize(io) | |
new(type: type, location: location, w: w, h: h, size: size) | |
end | |
end | |
class PhotoSizeEmpty < IPhotoSize | |
CONSTRUCTOR_ID = 0x0E17E23C | |
property type : String | |
def initialize(@type : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@type.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
type = String.tl_deserialize(io) | |
new(type: type) | |
end | |
end | |
class PhotoSizeProgressive < IPhotoSize | |
CONSTRUCTOR_ID = 0x5AA86A51 | |
property type : String | |
property location : Root::IFileLocation | |
property w : Int32 | |
property h : Int32 | |
property sizes : Array(Int32) | |
def initialize(@type : String, @location : Root::IFileLocation, @w : Int32, @h : Int32, @sizes : Array(Int32)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@type.tl_serialize(io) | |
@location.tl_serialize(io) | |
@w.tl_serialize(io) | |
@h.tl_serialize(io) | |
@sizes.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
type = String.tl_deserialize(io) | |
location = Root::FileLocation.tl_deserialize(io) | |
w = Int32.tl_deserialize(io) | |
h = Int32.tl_deserialize(io) | |
sizes = Array(Int32).tl_deserialize(io) | |
new(type: type, location: location, w: w, h: h, sizes: sizes) | |
end | |
end | |
class PhotoStrippedSize < IPhotoSize | |
CONSTRUCTOR_ID = 0xE0B0BC2E | |
property type : String | |
property bytes : Bytes | |
def initialize(@type : String, @bytes : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@type.tl_serialize(io) | |
@bytes.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
type = String.tl_deserialize(io) | |
bytes = Bytes.tl_deserialize(io) | |
new(type: type, bytes: bytes) | |
end | |
end | |
class Poll < IPoll | |
CONSTRUCTOR_ID = 0x86E18161 | |
property id : Int64 | |
property question : String | |
property answers : Array(Root::IPollAnswer) | |
property closed : Bool | |
property public_voters : Bool | |
property multiple_choice : Bool | |
property quiz : Bool | |
property close_period : Int32? | |
property close_date : Int32? | |
def initialize(@id : Int64, @question : String, @answers : Array(Root::IPollAnswer), @closed : Bool = nil, @public_voters : Bool = nil, @multiple_choice : Bool = nil, @quiz : Bool = nil, @close_period : Int32? = nil, @close_date : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
(0_u32 | @closed ? 1 : 0 | @public_voters ? 2 : 0 | @multiple_choice ? 4 : 0 | @quiz ? 8 : 0 | @close_period ? 16 : 0 | @close_date ? 32 : 0).tl_serialize(io) | |
if closed = @closed | |
closed.tl_serialize(io) | |
end | |
if public_voters = @public_voters | |
public_voters.tl_serialize(io) | |
end | |
if multiple_choice = @multiple_choice | |
multiple_choice.tl_serialize(io) | |
end | |
if quiz = @quiz | |
quiz.tl_serialize(io) | |
end | |
@question.tl_serialize(io) | |
@answers.tl_serialize(io) | |
if close_period = @close_period | |
close_period.tl_serialize(io) | |
end | |
if close_date = @close_date | |
close_date.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
flags = UInt32.tl_deserialize(io) | |
closed = (flags & 1) != 0 | |
public_voters = (flags & 2) != 0 | |
multiple_choice = (flags & 4) != 0 | |
quiz = (flags & 8) != 0 | |
question = String.tl_deserialize(io) | |
answers = Array(Root::PollAnswer).tl_deserialize(io) | |
close_period = (flags & 16) != 0 ? Int32.tl_deserialize(io) : nil | |
close_date = (flags & 32) != 0 ? Int32.tl_deserialize(io) : nil | |
new(id: id, closed: closed, public_voters: public_voters, multiple_choice: multiple_choice, quiz: quiz, question: question, answers: answers, close_period: close_period, close_date: close_date) | |
end | |
end | |
class PollAnswer < IPollAnswer | |
CONSTRUCTOR_ID = 0x6CA9C2E9 | |
property text : String | |
property option : Bytes | |
def initialize(@text : String, @option : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
@option.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = String.tl_deserialize(io) | |
option = Bytes.tl_deserialize(io) | |
new(text: text, option: option) | |
end | |
end | |
class PollAnswerVoters < IPollAnswerVoters | |
CONSTRUCTOR_ID = 0x3B6DDAD2 | |
property option : Bytes | |
property voters : Int32 | |
property chosen : Bool | |
property correct : Bool | |
def initialize(@option : Bytes, @voters : Int32, @chosen : Bool = nil, @correct : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @chosen ? 1 : 0 | @correct ? 2 : 0).tl_serialize(io) | |
if chosen = @chosen | |
chosen.tl_serialize(io) | |
end | |
if correct = @correct | |
correct.tl_serialize(io) | |
end | |
@option.tl_serialize(io) | |
@voters.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
chosen = (flags & 1) != 0 | |
correct = (flags & 2) != 0 | |
option = Bytes.tl_deserialize(io) | |
voters = Int32.tl_deserialize(io) | |
new(chosen: chosen, correct: correct, option: option, voters: voters) | |
end | |
end | |
class PollResults < IPollResults | |
CONSTRUCTOR_ID = 0xBADCC1A3 | |
property min : Bool | |
property results : Array(Root::IPollAnswerVoters)? | |
property total_voters : Int32? | |
property recent_voters : Array(Int32)? | |
property solution : String? | |
property solution_entities : Array(Root::IMessageEntity)? | |
def initialize(@min : Bool = nil, @results : Array(Root::IPollAnswerVoters)? = nil, @total_voters : Int32? = nil, @recent_voters : Array(Int32)? = nil, @solution : String? = nil, @solution_entities : Array(Root::IMessageEntity)? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @min ? 1 : 0 | @results ? 2 : 0 | @total_voters ? 4 : 0 | @recent_voters ? 8 : 0 | @solution ? 16 : 0 | @solution_entities ? 16 : 0).tl_serialize(io) | |
if min = @min | |
min.tl_serialize(io) | |
end | |
if results = @results | |
results.tl_serialize(io) | |
end | |
if total_voters = @total_voters | |
total_voters.tl_serialize(io) | |
end | |
if recent_voters = @recent_voters | |
recent_voters.tl_serialize(io) | |
end | |
if solution = @solution | |
solution.tl_serialize(io) | |
end | |
if solution_entities = @solution_entities | |
solution_entities.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
min = (flags & 1) != 0 | |
results = (flags & 2) != 0 ? Array(Root::PollAnswerVoters).tl_deserialize(io) : nil | |
total_voters = (flags & 4) != 0 ? Int32.tl_deserialize(io) : nil | |
recent_voters = (flags & 8) != 0 ? Array(Int32).tl_deserialize(io) : nil | |
solution = (flags & 16) != 0 ? String.tl_deserialize(io) : nil | |
solution_entities = (flags & 16) != 0 ? Array(Root::MessageEntity).tl_deserialize(io) : nil | |
new(min: min, results: results, total_voters: total_voters, recent_voters: recent_voters, solution: solution, solution_entities: solution_entities) | |
end | |
end | |
class Pong < IPong | |
CONSTRUCTOR_ID = 0x347773C5 | |
property msg_id : Int64 | |
property ping_id : Int64 | |
def initialize(@msg_id : Int64, @ping_id : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@msg_id.tl_serialize(io) | |
@ping_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
msg_id = Int64.tl_deserialize(io) | |
ping_id = Int64.tl_deserialize(io) | |
new(msg_id: msg_id, ping_id: ping_id) | |
end | |
end | |
class PopularContact < IPopularContact | |
CONSTRUCTOR_ID = 0x5CE14175 | |
property client_id : Int64 | |
property importers : Int32 | |
def initialize(@client_id : Int64, @importers : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@client_id.tl_serialize(io) | |
@importers.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
client_id = Int64.tl_deserialize(io) | |
importers = Int32.tl_deserialize(io) | |
new(client_id: client_id, importers: importers) | |
end | |
end | |
class PostAddress < IPostAddress | |
CONSTRUCTOR_ID = 0x1E8CAAEB | |
property street_line1 : String | |
property street_line2 : String | |
property city : String | |
property state : String | |
property country_iso2 : String | |
property post_code : String | |
def initialize(@street_line1 : String, @street_line2 : String, @city : String, @state : String, @country_iso2 : String, @post_code : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@street_line1.tl_serialize(io) | |
@street_line2.tl_serialize(io) | |
@city.tl_serialize(io) | |
@state.tl_serialize(io) | |
@country_iso2.tl_serialize(io) | |
@post_code.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
street_line1 = String.tl_deserialize(io) | |
street_line2 = String.tl_deserialize(io) | |
city = String.tl_deserialize(io) | |
state = String.tl_deserialize(io) | |
country_iso2 = String.tl_deserialize(io) | |
post_code = String.tl_deserialize(io) | |
new(street_line1: street_line1, street_line2: street_line2, city: city, state: state, country_iso2: country_iso2, post_code: post_code) | |
end | |
end | |
class PrivacyKeyAddedByPhone < IPrivacyKey | |
CONSTRUCTOR_ID = 0x42FFD42B | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PrivacyKeyChatInvite < IPrivacyKey | |
CONSTRUCTOR_ID = 0x500E6DFA | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PrivacyKeyForwards < IPrivacyKey | |
CONSTRUCTOR_ID = 0x69EC56A3 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PrivacyKeyPhoneCall < IPrivacyKey | |
CONSTRUCTOR_ID = 0x3D662B7B | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PrivacyKeyPhoneNumber < IPrivacyKey | |
CONSTRUCTOR_ID = 0xD19AE46D | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PrivacyKeyPhoneP2P < IPrivacyKey | |
CONSTRUCTOR_ID = 0x39491CC8 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PrivacyKeyProfilePhoto < IPrivacyKey | |
CONSTRUCTOR_ID = 0x96151FED | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PrivacyKeyStatusTimestamp < IPrivacyKey | |
CONSTRUCTOR_ID = 0xBC2EAB30 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PrivacyValueAllowAll < IPrivacyRule | |
CONSTRUCTOR_ID = 0x65427B82 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PrivacyValueAllowChatParticipants < IPrivacyRule | |
CONSTRUCTOR_ID = 0x18BE796B | |
property chats : Array(Int32) | |
def initialize(@chats : Array(Int32)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@chats.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
chats = Array(Int32).tl_deserialize(io) | |
new(chats: chats) | |
end | |
end | |
class PrivacyValueAllowContacts < IPrivacyRule | |
CONSTRUCTOR_ID = 0xFFFE1BAC | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PrivacyValueAllowUsers < IPrivacyRule | |
CONSTRUCTOR_ID = 0x4D5BBE0C | |
property users : Array(Int32) | |
def initialize(@users : Array(Int32)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
users = Array(Int32).tl_deserialize(io) | |
new(users: users) | |
end | |
end | |
class PrivacyValueDisallowAll < IPrivacyRule | |
CONSTRUCTOR_ID = 0x8B73E763 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PrivacyValueDisallowChatParticipants < IPrivacyRule | |
CONSTRUCTOR_ID = 0xACAE0690 | |
property chats : Array(Int32) | |
def initialize(@chats : Array(Int32)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@chats.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
chats = Array(Int32).tl_deserialize(io) | |
new(chats: chats) | |
end | |
end | |
class PrivacyValueDisallowContacts < IPrivacyRule | |
CONSTRUCTOR_ID = 0xF888FA1A | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PrivacyValueDisallowUsers < IPrivacyRule | |
CONSTRUCTOR_ID = 0x0C7F49B7 | |
property users : Array(Int32) | |
def initialize(@users : Array(Int32)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
users = Array(Int32).tl_deserialize(io) | |
new(users: users) | |
end | |
end | |
class ReceivedNotifyMessage < IReceivedNotifyMessage | |
CONSTRUCTOR_ID = 0xA384B779 | |
property id : Int32 | |
property flags : Int32 | |
def initialize(@id : Int32, @flags : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@flags.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int32.tl_deserialize(io) | |
flags = Int32.tl_deserialize(io) | |
new(id: id, flags: flags) | |
end | |
end | |
class RecentMeUrlChat < IRecentMeUrl | |
CONSTRUCTOR_ID = 0xA01B22F9 | |
property url : String | |
property chat_id : Int32 | |
def initialize(@url : String, @chat_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@url.tl_serialize(io) | |
@chat_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
url = String.tl_deserialize(io) | |
chat_id = Int32.tl_deserialize(io) | |
new(url: url, chat_id: chat_id) | |
end | |
end | |
class RecentMeUrlChatInvite < IRecentMeUrl | |
CONSTRUCTOR_ID = 0xEB49081D | |
property url : String | |
property chat_invite : Root::IChatInvite | |
def initialize(@url : String, @chat_invite : Root::IChatInvite) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@url.tl_serialize(io) | |
@chat_invite.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
url = String.tl_deserialize(io) | |
chat_invite = Root::ChatInvite.tl_deserialize(io) | |
new(url: url, chat_invite: chat_invite) | |
end | |
end | |
class RecentMeUrlStickerSet < IRecentMeUrl | |
CONSTRUCTOR_ID = 0xBC0A57DC | |
property url : String | |
property set : Root::IStickerSetCovered | |
def initialize(@url : String, @set : Root::IStickerSetCovered) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@url.tl_serialize(io) | |
@set.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
url = String.tl_deserialize(io) | |
set = Root::StickerSetCovered.tl_deserialize(io) | |
new(url: url, set: set) | |
end | |
end | |
class RecentMeUrlUnknown < IRecentMeUrl | |
CONSTRUCTOR_ID = 0x46E1D13D | |
property url : String | |
def initialize(@url : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@url.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
url = String.tl_deserialize(io) | |
new(url: url) | |
end | |
end | |
class RecentMeUrlUser < IRecentMeUrl | |
CONSTRUCTOR_ID = 0x8DBC3336 | |
property url : String | |
property user_id : Int32 | |
def initialize(@url : String, @user_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@url.tl_serialize(io) | |
@user_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
url = String.tl_deserialize(io) | |
user_id = Int32.tl_deserialize(io) | |
new(url: url, user_id: user_id) | |
end | |
end | |
class ReplyInlineMarkup < IReplyMarkup | |
CONSTRUCTOR_ID = 0x48A30254 | |
property rows : Array(Root::IKeyboardButtonRow) | |
def initialize(@rows : Array(Root::IKeyboardButtonRow)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@rows.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
rows = Array(Root::KeyboardButtonRow).tl_deserialize(io) | |
new(rows: rows) | |
end | |
end | |
class ReplyKeyboardForceReply < IReplyMarkup | |
CONSTRUCTOR_ID = 0xF4108AA0 | |
property single_use : Bool | |
property selective : Bool | |
def initialize(@single_use : Bool = nil, @selective : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @single_use ? 2 : 0 | @selective ? 4 : 0).tl_serialize(io) | |
if single_use = @single_use | |
single_use.tl_serialize(io) | |
end | |
if selective = @selective | |
selective.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
single_use = (flags & 2) != 0 | |
selective = (flags & 4) != 0 | |
new(single_use: single_use, selective: selective) | |
end | |
end | |
class ReplyKeyboardHide < IReplyMarkup | |
CONSTRUCTOR_ID = 0xA03E5B85 | |
property selective : Bool | |
def initialize(@selective : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @selective ? 4 : 0).tl_serialize(io) | |
if selective = @selective | |
selective.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
selective = (flags & 4) != 0 | |
new(selective: selective) | |
end | |
end | |
class ReplyKeyboardMarkup < IReplyMarkup | |
CONSTRUCTOR_ID = 0x3502758C | |
property rows : Array(Root::IKeyboardButtonRow) | |
property resize : Bool | |
property single_use : Bool | |
property selective : Bool | |
def initialize(@rows : Array(Root::IKeyboardButtonRow), @resize : Bool = nil, @single_use : Bool = nil, @selective : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @resize ? 1 : 0 | @single_use ? 2 : 0 | @selective ? 4 : 0).tl_serialize(io) | |
if resize = @resize | |
resize.tl_serialize(io) | |
end | |
if single_use = @single_use | |
single_use.tl_serialize(io) | |
end | |
if selective = @selective | |
selective.tl_serialize(io) | |
end | |
@rows.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
resize = (flags & 1) != 0 | |
single_use = (flags & 2) != 0 | |
selective = (flags & 4) != 0 | |
rows = Array(Root::KeyboardButtonRow).tl_deserialize(io) | |
new(resize: resize, single_use: single_use, selective: selective, rows: rows) | |
end | |
end | |
class ResPq < IResPq | |
CONSTRUCTOR_ID = 0x05162463 | |
property nonce : TL::I128 | |
property server_nonce : TL::I128 | |
property pq : Bytes | |
property server_public_key_fingerprints : Array(Int64) | |
def initialize(@nonce : TL::I128, @server_nonce : TL::I128, @pq : Bytes, @server_public_key_fingerprints : Array(Int64)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@nonce.tl_serialize(io) | |
@server_nonce.tl_serialize(io) | |
@pq.tl_serialize(io) | |
@server_public_key_fingerprints.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
nonce = TL::I128.tl_deserialize(io) | |
server_nonce = TL::I128.tl_deserialize(io) | |
pq = Bytes.tl_deserialize(io) | |
server_public_key_fingerprints = Array(Int64).tl_deserialize(io) | |
new(nonce: nonce, server_nonce: server_nonce, pq: pq, server_public_key_fingerprints: server_public_key_fingerprints) | |
end | |
end | |
class RestrictionReason < IRestrictionReason | |
CONSTRUCTOR_ID = 0xD072ACB4 | |
property platform : String | |
property reason : String | |
property text : String | |
def initialize(@platform : String, @reason : String, @text : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@platform.tl_serialize(io) | |
@reason.tl_serialize(io) | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
platform = String.tl_deserialize(io) | |
reason = String.tl_deserialize(io) | |
text = String.tl_deserialize(io) | |
new(platform: platform, reason: reason, text: text) | |
end | |
end | |
class RpcAnswerDropped < IRpcDropAnswer | |
CONSTRUCTOR_ID = 0xA43AD8B7 | |
property msg_id : Int64 | |
property seq_no : Int32 | |
property bytes : Int32 | |
def initialize(@msg_id : Int64, @seq_no : Int32, @bytes : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@msg_id.tl_serialize(io) | |
@seq_no.tl_serialize(io) | |
@bytes.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
msg_id = Int64.tl_deserialize(io) | |
seq_no = Int32.tl_deserialize(io) | |
bytes = Int32.tl_deserialize(io) | |
new(msg_id: msg_id, seq_no: seq_no, bytes: bytes) | |
end | |
end | |
class RpcAnswerDroppedRunning < IRpcDropAnswer | |
CONSTRUCTOR_ID = 0xCD78E586 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class RpcAnswerUnknown < IRpcDropAnswer | |
CONSTRUCTOR_ID = 0x5E2AD36E | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class RpcError < IRpcError | |
CONSTRUCTOR_ID = 0x2144CA19 | |
property error_code : Int32 | |
property error_message : String | |
def initialize(@error_code : Int32, @error_message : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@error_code.tl_serialize(io) | |
@error_message.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
error_code = Int32.tl_deserialize(io) | |
error_message = String.tl_deserialize(io) | |
new(error_code: error_code, error_message: error_message) | |
end | |
end | |
class SavedPhoneContact < ISavedContact | |
CONSTRUCTOR_ID = 0x1142BD56 | |
property phone : String | |
property first_name : String | |
property last_name : String | |
property date : Int32 | |
def initialize(@phone : String, @first_name : String, @last_name : String, @date : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@phone.tl_serialize(io) | |
@first_name.tl_serialize(io) | |
@last_name.tl_serialize(io) | |
@date.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
phone = String.tl_deserialize(io) | |
first_name = String.tl_deserialize(io) | |
last_name = String.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
new(phone: phone, first_name: first_name, last_name: last_name, date: date) | |
end | |
end | |
class SecureCredentialsEncrypted < ISecureCredentialsEncrypted | |
CONSTRUCTOR_ID = 0x33F0EA47 | |
property data : Bytes | |
property hash : Bytes | |
property secret : Bytes | |
def initialize(@data : Bytes, @hash : Bytes, @secret : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@data.tl_serialize(io) | |
@hash.tl_serialize(io) | |
@secret.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
data = Bytes.tl_deserialize(io) | |
hash = Bytes.tl_deserialize(io) | |
secret = Bytes.tl_deserialize(io) | |
new(data: data, hash: hash, secret: secret) | |
end | |
end | |
class SecureData < ISecureData | |
CONSTRUCTOR_ID = 0x8AEABEC3 | |
property data : Bytes | |
property data_hash : Bytes | |
property secret : Bytes | |
def initialize(@data : Bytes, @data_hash : Bytes, @secret : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@data.tl_serialize(io) | |
@data_hash.tl_serialize(io) | |
@secret.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
data = Bytes.tl_deserialize(io) | |
data_hash = Bytes.tl_deserialize(io) | |
secret = Bytes.tl_deserialize(io) | |
new(data: data, data_hash: data_hash, secret: secret) | |
end | |
end | |
class SecureFile < ISecureFile | |
CONSTRUCTOR_ID = 0xE0277A62 | |
property id : Int64 | |
property access_hash : Int64 | |
property size : Int32 | |
property dc_id : Int32 | |
property date : Int32 | |
property file_hash : Bytes | |
property secret : Bytes | |
def initialize(@id : Int64, @access_hash : Int64, @size : Int32, @dc_id : Int32, @date : Int32, @file_hash : Bytes, @secret : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@size.tl_serialize(io) | |
@dc_id.tl_serialize(io) | |
@date.tl_serialize(io) | |
@file_hash.tl_serialize(io) | |
@secret.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
size = Int32.tl_deserialize(io) | |
dc_id = Int32.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
file_hash = Bytes.tl_deserialize(io) | |
secret = Bytes.tl_deserialize(io) | |
new(id: id, access_hash: access_hash, size: size, dc_id: dc_id, date: date, file_hash: file_hash, secret: secret) | |
end | |
end | |
class SecureFileEmpty < ISecureFile | |
CONSTRUCTOR_ID = 0x64199744 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SecurePasswordKdfAlgoPbkdf2Hmacsha512iter100000 < ISecurePasswordKdfAlgo | |
CONSTRUCTOR_ID = 0xBBF2DDA0 | |
property salt : Bytes | |
def initialize(@salt : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@salt.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
salt = Bytes.tl_deserialize(io) | |
new(salt: salt) | |
end | |
end | |
class SecurePasswordKdfAlgoSha512 < ISecurePasswordKdfAlgo | |
CONSTRUCTOR_ID = 0x86471D92 | |
property salt : Bytes | |
def initialize(@salt : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@salt.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
salt = Bytes.tl_deserialize(io) | |
new(salt: salt) | |
end | |
end | |
class SecurePasswordKdfAlgoUnknown < ISecurePasswordKdfAlgo | |
CONSTRUCTOR_ID = 0x004A8537 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SecurePlainEmail < ISecurePlainData | |
CONSTRUCTOR_ID = 0x21EC5A5F | |
property email : String | |
def initialize(@email : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@email.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
email = String.tl_deserialize(io) | |
new(email: email) | |
end | |
end | |
class SecurePlainPhone < ISecurePlainData | |
CONSTRUCTOR_ID = 0x7D6099DD | |
property phone : String | |
def initialize(@phone : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@phone.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
phone = String.tl_deserialize(io) | |
new(phone: phone) | |
end | |
end | |
class SecureRequiredType < ISecureRequiredType | |
CONSTRUCTOR_ID = 0x829D99DA | |
property type : Root::ISecureValueType | |
property native_names : Bool | |
property selfie_required : Bool | |
property translation_required : Bool | |
def initialize(@type : Root::ISecureValueType, @native_names : Bool = nil, @selfie_required : Bool = nil, @translation_required : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @native_names ? 1 : 0 | @selfie_required ? 2 : 0 | @translation_required ? 4 : 0).tl_serialize(io) | |
if native_names = @native_names | |
native_names.tl_serialize(io) | |
end | |
if selfie_required = @selfie_required | |
selfie_required.tl_serialize(io) | |
end | |
if translation_required = @translation_required | |
translation_required.tl_serialize(io) | |
end | |
@type.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
native_names = (flags & 1) != 0 | |
selfie_required = (flags & 2) != 0 | |
translation_required = (flags & 4) != 0 | |
type = Root::SecureValueType.tl_deserialize(io) | |
new(native_names: native_names, selfie_required: selfie_required, translation_required: translation_required, type: type) | |
end | |
end | |
class SecureRequiredTypeOneOf < ISecureRequiredType | |
CONSTRUCTOR_ID = 0x027477B4 | |
property types : Array(Root::ISecureRequiredType) | |
def initialize(@types : Array(Root::ISecureRequiredType)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@types.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
types = Array(Root::SecureRequiredType).tl_deserialize(io) | |
new(types: types) | |
end | |
end | |
class SecureSecretSettings < ISecureSecretSettings | |
CONSTRUCTOR_ID = 0x1527BCAC | |
property secure_algo : Root::ISecurePasswordKdfAlgo | |
property secure_secret : Bytes | |
property secure_secret_id : Int64 | |
def initialize(@secure_algo : Root::ISecurePasswordKdfAlgo, @secure_secret : Bytes, @secure_secret_id : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@secure_algo.tl_serialize(io) | |
@secure_secret.tl_serialize(io) | |
@secure_secret_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
secure_algo = Root::SecurePasswordKdfAlgo.tl_deserialize(io) | |
secure_secret = Bytes.tl_deserialize(io) | |
secure_secret_id = Int64.tl_deserialize(io) | |
new(secure_algo: secure_algo, secure_secret: secure_secret, secure_secret_id: secure_secret_id) | |
end | |
end | |
class SecureValue < ISecureValue | |
CONSTRUCTOR_ID = 0x187FA0CA | |
property type : Root::ISecureValueType | |
property hash : Bytes | |
property data : Root::ISecureData? | |
property front_side : Root::ISecureFile? | |
property reverse_side : Root::ISecureFile? | |
property selfie : Root::ISecureFile? | |
property translation : Array(Root::ISecureFile)? | |
property files : Array(Root::ISecureFile)? | |
property plain_data : Root::ISecurePlainData? | |
def initialize(@type : Root::ISecureValueType, @hash : Bytes, @data : Root::ISecureData? = nil, @front_side : Root::ISecureFile? = nil, @reverse_side : Root::ISecureFile? = nil, @selfie : Root::ISecureFile? = nil, @translation : Array(Root::ISecureFile)? = nil, @files : Array(Root::ISecureFile)? = nil, @plain_data : Root::ISecurePlainData? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @data ? 1 : 0 | @front_side ? 2 : 0 | @reverse_side ? 4 : 0 | @selfie ? 8 : 0 | @translation ? 64 : 0 | @files ? 16 : 0 | @plain_data ? 32 : 0).tl_serialize(io) | |
@type.tl_serialize(io) | |
if data = @data | |
data.tl_serialize(io) | |
end | |
if front_side = @front_side | |
front_side.tl_serialize(io) | |
end | |
if reverse_side = @reverse_side | |
reverse_side.tl_serialize(io) | |
end | |
if selfie = @selfie | |
selfie.tl_serialize(io) | |
end | |
if translation = @translation | |
translation.tl_serialize(io) | |
end | |
if files = @files | |
files.tl_serialize(io) | |
end | |
if plain_data = @plain_data | |
plain_data.tl_serialize(io) | |
end | |
@hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
type = Root::SecureValueType.tl_deserialize(io) | |
data = (flags & 1) != 0 ? Root::SecureData.tl_deserialize(io) : nil | |
front_side = (flags & 2) != 0 ? Root::SecureFile.tl_deserialize(io) : nil | |
reverse_side = (flags & 4) != 0 ? Root::SecureFile.tl_deserialize(io) : nil | |
selfie = (flags & 8) != 0 ? Root::SecureFile.tl_deserialize(io) : nil | |
translation = (flags & 64) != 0 ? Array(Root::SecureFile).tl_deserialize(io) : nil | |
files = (flags & 16) != 0 ? Array(Root::SecureFile).tl_deserialize(io) : nil | |
plain_data = (flags & 32) != 0 ? Root::SecurePlainData.tl_deserialize(io) : nil | |
hash = Bytes.tl_deserialize(io) | |
new(type: type, data: data, front_side: front_side, reverse_side: reverse_side, selfie: selfie, translation: translation, files: files, plain_data: plain_data, hash: hash) | |
end | |
end | |
class SecureValueError < ISecureValueError | |
CONSTRUCTOR_ID = 0x869D758F | |
property type : Root::ISecureValueType | |
property hash : Bytes | |
property text : String | |
def initialize(@type : Root::ISecureValueType, @hash : Bytes, @text : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@type.tl_serialize(io) | |
@hash.tl_serialize(io) | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
type = Root::SecureValueType.tl_deserialize(io) | |
hash = Bytes.tl_deserialize(io) | |
text = String.tl_deserialize(io) | |
new(type: type, hash: hash, text: text) | |
end | |
end | |
class SecureValueErrorData < ISecureValueError | |
CONSTRUCTOR_ID = 0xE8A40BD9 | |
property type : Root::ISecureValueType | |
property data_hash : Bytes | |
property field : String | |
property text : String | |
def initialize(@type : Root::ISecureValueType, @data_hash : Bytes, @field : String, @text : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@type.tl_serialize(io) | |
@data_hash.tl_serialize(io) | |
@field.tl_serialize(io) | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
type = Root::SecureValueType.tl_deserialize(io) | |
data_hash = Bytes.tl_deserialize(io) | |
field = String.tl_deserialize(io) | |
text = String.tl_deserialize(io) | |
new(type: type, data_hash: data_hash, field: field, text: text) | |
end | |
end | |
class SecureValueErrorFile < ISecureValueError | |
CONSTRUCTOR_ID = 0x7A700873 | |
property type : Root::ISecureValueType | |
property file_hash : Bytes | |
property text : String | |
def initialize(@type : Root::ISecureValueType, @file_hash : Bytes, @text : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@type.tl_serialize(io) | |
@file_hash.tl_serialize(io) | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
type = Root::SecureValueType.tl_deserialize(io) | |
file_hash = Bytes.tl_deserialize(io) | |
text = String.tl_deserialize(io) | |
new(type: type, file_hash: file_hash, text: text) | |
end | |
end | |
class SecureValueErrorFiles < ISecureValueError | |
CONSTRUCTOR_ID = 0x666220E9 | |
property type : Root::ISecureValueType | |
property file_hash : Array(Bytes) | |
property text : String | |
def initialize(@type : Root::ISecureValueType, @file_hash : Array(Bytes), @text : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@type.tl_serialize(io) | |
@file_hash.tl_serialize(io) | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
type = Root::SecureValueType.tl_deserialize(io) | |
file_hash = Array(Bytes).tl_deserialize(io) | |
text = String.tl_deserialize(io) | |
new(type: type, file_hash: file_hash, text: text) | |
end | |
end | |
class SecureValueErrorFrontSide < ISecureValueError | |
CONSTRUCTOR_ID = 0x00BE3DFA | |
property type : Root::ISecureValueType | |
property file_hash : Bytes | |
property text : String | |
def initialize(@type : Root::ISecureValueType, @file_hash : Bytes, @text : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@type.tl_serialize(io) | |
@file_hash.tl_serialize(io) | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
type = Root::SecureValueType.tl_deserialize(io) | |
file_hash = Bytes.tl_deserialize(io) | |
text = String.tl_deserialize(io) | |
new(type: type, file_hash: file_hash, text: text) | |
end | |
end | |
class SecureValueErrorReverseSide < ISecureValueError | |
CONSTRUCTOR_ID = 0x868A2AA5 | |
property type : Root::ISecureValueType | |
property file_hash : Bytes | |
property text : String | |
def initialize(@type : Root::ISecureValueType, @file_hash : Bytes, @text : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@type.tl_serialize(io) | |
@file_hash.tl_serialize(io) | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
type = Root::SecureValueType.tl_deserialize(io) | |
file_hash = Bytes.tl_deserialize(io) | |
text = String.tl_deserialize(io) | |
new(type: type, file_hash: file_hash, text: text) | |
end | |
end | |
class SecureValueErrorSelfie < ISecureValueError | |
CONSTRUCTOR_ID = 0xE537CED6 | |
property type : Root::ISecureValueType | |
property file_hash : Bytes | |
property text : String | |
def initialize(@type : Root::ISecureValueType, @file_hash : Bytes, @text : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@type.tl_serialize(io) | |
@file_hash.tl_serialize(io) | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
type = Root::SecureValueType.tl_deserialize(io) | |
file_hash = Bytes.tl_deserialize(io) | |
text = String.tl_deserialize(io) | |
new(type: type, file_hash: file_hash, text: text) | |
end | |
end | |
class SecureValueErrorTranslationFile < ISecureValueError | |
CONSTRUCTOR_ID = 0xA1144770 | |
property type : Root::ISecureValueType | |
property file_hash : Bytes | |
property text : String | |
def initialize(@type : Root::ISecureValueType, @file_hash : Bytes, @text : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@type.tl_serialize(io) | |
@file_hash.tl_serialize(io) | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
type = Root::SecureValueType.tl_deserialize(io) | |
file_hash = Bytes.tl_deserialize(io) | |
text = String.tl_deserialize(io) | |
new(type: type, file_hash: file_hash, text: text) | |
end | |
end | |
class SecureValueErrorTranslationFiles < ISecureValueError | |
CONSTRUCTOR_ID = 0x34636DD8 | |
property type : Root::ISecureValueType | |
property file_hash : Array(Bytes) | |
property text : String | |
def initialize(@type : Root::ISecureValueType, @file_hash : Array(Bytes), @text : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@type.tl_serialize(io) | |
@file_hash.tl_serialize(io) | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
type = Root::SecureValueType.tl_deserialize(io) | |
file_hash = Array(Bytes).tl_deserialize(io) | |
text = String.tl_deserialize(io) | |
new(type: type, file_hash: file_hash, text: text) | |
end | |
end | |
class SecureValueHash < ISecureValueHash | |
CONSTRUCTOR_ID = 0xED1ECDB0 | |
property type : Root::ISecureValueType | |
property hash : Bytes | |
def initialize(@type : Root::ISecureValueType, @hash : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@type.tl_serialize(io) | |
@hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
type = Root::SecureValueType.tl_deserialize(io) | |
hash = Bytes.tl_deserialize(io) | |
new(type: type, hash: hash) | |
end | |
end | |
class SecureValueTypeAddress < ISecureValueType | |
CONSTRUCTOR_ID = 0xCBE31E26 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SecureValueTypeBankStatement < ISecureValueType | |
CONSTRUCTOR_ID = 0x89137C0D | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SecureValueTypeDriverLicense < ISecureValueType | |
CONSTRUCTOR_ID = 0x06E425C4 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SecureValueTypeEmail < ISecureValueType | |
CONSTRUCTOR_ID = 0x8E3CA7EE | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SecureValueTypeIdentityCard < ISecureValueType | |
CONSTRUCTOR_ID = 0xA0D0744B | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SecureValueTypeInternalPassport < ISecureValueType | |
CONSTRUCTOR_ID = 0x99A48F23 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SecureValueTypePassport < ISecureValueType | |
CONSTRUCTOR_ID = 0x3DAC6A00 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SecureValueTypePassportRegistration < ISecureValueType | |
CONSTRUCTOR_ID = 0x99E3806A | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SecureValueTypePersonalDetails < ISecureValueType | |
CONSTRUCTOR_ID = 0x9D2A81E3 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SecureValueTypePhone < ISecureValueType | |
CONSTRUCTOR_ID = 0xB320AADB | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SecureValueTypeRentalAgreement < ISecureValueType | |
CONSTRUCTOR_ID = 0x8B883488 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SecureValueTypeTemporaryRegistration < ISecureValueType | |
CONSTRUCTOR_ID = 0xEA02EC33 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SecureValueTypeUtilityBill < ISecureValueType | |
CONSTRUCTOR_ID = 0xFC36954E | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SendMessageCancelAction < ISendMessageAction | |
CONSTRUCTOR_ID = 0xFD5EC8F5 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SendMessageChooseContactAction < ISendMessageAction | |
CONSTRUCTOR_ID = 0x628CBC6F | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SendMessageGamePlayAction < ISendMessageAction | |
CONSTRUCTOR_ID = 0xDD6A8F48 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SendMessageGeoLocationAction < ISendMessageAction | |
CONSTRUCTOR_ID = 0x176F8BA1 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SendMessageRecordAudioAction < ISendMessageAction | |
CONSTRUCTOR_ID = 0xD52F73F7 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SendMessageRecordRoundAction < ISendMessageAction | |
CONSTRUCTOR_ID = 0x88F27FBC | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SendMessageRecordVideoAction < ISendMessageAction | |
CONSTRUCTOR_ID = 0xA187D66F | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SendMessageTypingAction < ISendMessageAction | |
CONSTRUCTOR_ID = 0x16BF744E | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SendMessageUploadAudioAction < ISendMessageAction | |
CONSTRUCTOR_ID = 0xF351D7AB | |
property progress : Int32 | |
def initialize(@progress : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@progress.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
progress = Int32.tl_deserialize(io) | |
new(progress: progress) | |
end | |
end | |
class SendMessageUploadDocumentAction < ISendMessageAction | |
CONSTRUCTOR_ID = 0xAA0CD9E4 | |
property progress : Int32 | |
def initialize(@progress : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@progress.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
progress = Int32.tl_deserialize(io) | |
new(progress: progress) | |
end | |
end | |
class SendMessageUploadPhotoAction < ISendMessageAction | |
CONSTRUCTOR_ID = 0xD1D34A26 | |
property progress : Int32 | |
def initialize(@progress : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@progress.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
progress = Int32.tl_deserialize(io) | |
new(progress: progress) | |
end | |
end | |
class SendMessageUploadRoundAction < ISendMessageAction | |
CONSTRUCTOR_ID = 0x243E1C66 | |
property progress : Int32 | |
def initialize(@progress : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@progress.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
progress = Int32.tl_deserialize(io) | |
new(progress: progress) | |
end | |
end | |
class SendMessageUploadVideoAction < ISendMessageAction | |
CONSTRUCTOR_ID = 0xE9763AEC | |
property progress : Int32 | |
def initialize(@progress : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@progress.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
progress = Int32.tl_deserialize(io) | |
new(progress: progress) | |
end | |
end | |
class ServerDhInnerData < IServerDhInnerData | |
CONSTRUCTOR_ID = 0xB5890DBA | |
property nonce : TL::I128 | |
property server_nonce : TL::I128 | |
property g : Int32 | |
property dh_prime : Bytes | |
property g_a : Bytes | |
property server_time : Int32 | |
def initialize(@nonce : TL::I128, @server_nonce : TL::I128, @g : Int32, @dh_prime : Bytes, @g_a : Bytes, @server_time : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@nonce.tl_serialize(io) | |
@server_nonce.tl_serialize(io) | |
@g.tl_serialize(io) | |
@dh_prime.tl_serialize(io) | |
@g_a.tl_serialize(io) | |
@server_time.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
nonce = TL::I128.tl_deserialize(io) | |
server_nonce = TL::I128.tl_deserialize(io) | |
g = Int32.tl_deserialize(io) | |
dh_prime = Bytes.tl_deserialize(io) | |
g_a = Bytes.tl_deserialize(io) | |
server_time = Int32.tl_deserialize(io) | |
new(nonce: nonce, server_nonce: server_nonce, g: g, dh_prime: dh_prime, g_a: g_a, server_time: server_time) | |
end | |
end | |
class ServerDhParamsFail < IServerDhParams | |
CONSTRUCTOR_ID = 0x79CB045D | |
property nonce : TL::I128 | |
property server_nonce : TL::I128 | |
property new_nonce_hash : TL::I128 | |
def initialize(@nonce : TL::I128, @server_nonce : TL::I128, @new_nonce_hash : TL::I128) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@nonce.tl_serialize(io) | |
@server_nonce.tl_serialize(io) | |
@new_nonce_hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
nonce = TL::I128.tl_deserialize(io) | |
server_nonce = TL::I128.tl_deserialize(io) | |
new_nonce_hash = TL::I128.tl_deserialize(io) | |
new(nonce: nonce, server_nonce: server_nonce, new_nonce_hash: new_nonce_hash) | |
end | |
end | |
class ServerDhParamsOk < IServerDhParams | |
CONSTRUCTOR_ID = 0xD0E8075C | |
property nonce : TL::I128 | |
property server_nonce : TL::I128 | |
property encrypted_answer : Bytes | |
def initialize(@nonce : TL::I128, @server_nonce : TL::I128, @encrypted_answer : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@nonce.tl_serialize(io) | |
@server_nonce.tl_serialize(io) | |
@encrypted_answer.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
nonce = TL::I128.tl_deserialize(io) | |
server_nonce = TL::I128.tl_deserialize(io) | |
encrypted_answer = Bytes.tl_deserialize(io) | |
new(nonce: nonce, server_nonce: server_nonce, encrypted_answer: encrypted_answer) | |
end | |
end | |
class ShippingOption < IShippingOption | |
CONSTRUCTOR_ID = 0xB6213CDF | |
property id : String | |
property title : String | |
property prices : Array(Root::ILabeledPrice) | |
def initialize(@id : String, @title : String, @prices : Array(Root::ILabeledPrice)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@title.tl_serialize(io) | |
@prices.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = String.tl_deserialize(io) | |
title = String.tl_deserialize(io) | |
prices = Array(Root::LabeledPrice).tl_deserialize(io) | |
new(id: id, title: title, prices: prices) | |
end | |
end | |
class SpeakingInGroupCallAction < ISendMessageAction | |
CONSTRUCTOR_ID = 0xD92C2285 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class StatsAbsValueAndPrev < IStatsAbsValueAndPrev | |
CONSTRUCTOR_ID = 0xCB43ACDE | |
property current : Float64 | |
property previous : Float64 | |
def initialize(@current : Float64, @previous : Float64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@current.tl_serialize(io) | |
@previous.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
current = Float64.tl_deserialize(io) | |
previous = Float64.tl_deserialize(io) | |
new(current: current, previous: previous) | |
end | |
end | |
class StatsDateRangeDays < IStatsDateRangeDays | |
CONSTRUCTOR_ID = 0xB637EDAF | |
property min_date : Int32 | |
property max_date : Int32 | |
def initialize(@min_date : Int32, @max_date : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@min_date.tl_serialize(io) | |
@max_date.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
min_date = Int32.tl_deserialize(io) | |
max_date = Int32.tl_deserialize(io) | |
new(min_date: min_date, max_date: max_date) | |
end | |
end | |
class StatsGraph < IStatsGraph | |
CONSTRUCTOR_ID = 0x8EA464B6 | |
property json : Root::IDataJson | |
property zoom_token : String? | |
def initialize(@json : Root::IDataJson, @zoom_token : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @zoom_token ? 1 : 0).tl_serialize(io) | |
@json.tl_serialize(io) | |
if zoom_token = @zoom_token | |
zoom_token.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
json = Root::DataJson.tl_deserialize(io) | |
zoom_token = (flags & 1) != 0 ? String.tl_deserialize(io) : nil | |
new(json: json, zoom_token: zoom_token) | |
end | |
end | |
class StatsGraphAsync < IStatsGraph | |
CONSTRUCTOR_ID = 0x4A27EB2D | |
property token : String | |
def initialize(@token : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@token.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
token = String.tl_deserialize(io) | |
new(token: token) | |
end | |
end | |
class StatsGraphError < IStatsGraph | |
CONSTRUCTOR_ID = 0xBEDC9822 | |
property error : String | |
def initialize(@error : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@error.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
error = String.tl_deserialize(io) | |
new(error: error) | |
end | |
end | |
class StatsGroupTopAdmin < IStatsGroupTopAdmin | |
CONSTRUCTOR_ID = 0x6014F412 | |
property user_id : Int32 | |
property deleted : Int32 | |
property kicked : Int32 | |
property banned : Int32 | |
def initialize(@user_id : Int32, @deleted : Int32, @kicked : Int32, @banned : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
@deleted.tl_serialize(io) | |
@kicked.tl_serialize(io) | |
@banned.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
deleted = Int32.tl_deserialize(io) | |
kicked = Int32.tl_deserialize(io) | |
banned = Int32.tl_deserialize(io) | |
new(user_id: user_id, deleted: deleted, kicked: kicked, banned: banned) | |
end | |
end | |
class StatsGroupTopInviter < IStatsGroupTopInviter | |
CONSTRUCTOR_ID = 0x31962A4C | |
property user_id : Int32 | |
property invitations : Int32 | |
def initialize(@user_id : Int32, @invitations : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
@invitations.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
invitations = Int32.tl_deserialize(io) | |
new(user_id: user_id, invitations: invitations) | |
end | |
end | |
class StatsGroupTopPoster < IStatsGroupTopPoster | |
CONSTRUCTOR_ID = 0x18F3D0F7 | |
property user_id : Int32 | |
property messages : Int32 | |
property avg_chars : Int32 | |
def initialize(@user_id : Int32, @messages : Int32, @avg_chars : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
@messages.tl_serialize(io) | |
@avg_chars.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
messages = Int32.tl_deserialize(io) | |
avg_chars = Int32.tl_deserialize(io) | |
new(user_id: user_id, messages: messages, avg_chars: avg_chars) | |
end | |
end | |
class StatsPercentValue < IStatsPercentValue | |
CONSTRUCTOR_ID = 0xCBCE2FE0 | |
property part : Float64 | |
property total : Float64 | |
def initialize(@part : Float64, @total : Float64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@part.tl_serialize(io) | |
@total.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
part = Float64.tl_deserialize(io) | |
total = Float64.tl_deserialize(io) | |
new(part: part, total: total) | |
end | |
end | |
class StatsUrl < IStatsUrl | |
CONSTRUCTOR_ID = 0x47A971E0 | |
property url : String | |
def initialize(@url : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@url.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
url = String.tl_deserialize(io) | |
new(url: url) | |
end | |
end | |
class StickerPack < IStickerPack | |
CONSTRUCTOR_ID = 0x12B299D4 | |
property emoticon : String | |
property documents : Array(Int64) | |
def initialize(@emoticon : String, @documents : Array(Int64)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@emoticon.tl_serialize(io) | |
@documents.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
emoticon = String.tl_deserialize(io) | |
documents = Array(Int64).tl_deserialize(io) | |
new(emoticon: emoticon, documents: documents) | |
end | |
end | |
class StickerSet < IStickerSet | |
CONSTRUCTOR_ID = 0x40E237A8 | |
property id : Int64 | |
property access_hash : Int64 | |
property title : String | |
property short_name : String | |
property count : Int32 | |
property hash : Int32 | |
property archived : Bool | |
property official : Bool | |
property masks : Bool | |
property animated : Bool | |
property installed_date : Int32? | |
property thumbs : Array(Root::IPhotoSize)? | |
property thumb_dc_id : Int32? | |
def initialize(@id : Int64, @access_hash : Int64, @title : String, @short_name : String, @count : Int32, @hash : Int32, @archived : Bool = nil, @official : Bool = nil, @masks : Bool = nil, @animated : Bool = nil, @installed_date : Int32? = nil, @thumbs : Array(Root::IPhotoSize)? = nil, @thumb_dc_id : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @archived ? 2 : 0 | @official ? 4 : 0 | @masks ? 8 : 0 | @animated ? 32 : 0 | @installed_date ? 1 : 0 | @thumbs ? 16 : 0 | @thumb_dc_id ? 16 : 0).tl_serialize(io) | |
if archived = @archived | |
archived.tl_serialize(io) | |
end | |
if official = @official | |
official.tl_serialize(io) | |
end | |
if masks = @masks | |
masks.tl_serialize(io) | |
end | |
if animated = @animated | |
animated.tl_serialize(io) | |
end | |
if installed_date = @installed_date | |
installed_date.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@title.tl_serialize(io) | |
@short_name.tl_serialize(io) | |
if thumbs = @thumbs | |
thumbs.tl_serialize(io) | |
end | |
if thumb_dc_id = @thumb_dc_id | |
thumb_dc_id.tl_serialize(io) | |
end | |
@count.tl_serialize(io) | |
@hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
archived = (flags & 2) != 0 | |
official = (flags & 4) != 0 | |
masks = (flags & 8) != 0 | |
animated = (flags & 32) != 0 | |
installed_date = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
title = String.tl_deserialize(io) | |
short_name = String.tl_deserialize(io) | |
thumbs = (flags & 16) != 0 ? Array(Root::PhotoSize).tl_deserialize(io) : nil | |
thumb_dc_id = (flags & 16) != 0 ? Int32.tl_deserialize(io) : nil | |
count = Int32.tl_deserialize(io) | |
hash = Int32.tl_deserialize(io) | |
new(archived: archived, official: official, masks: masks, animated: animated, installed_date: installed_date, id: id, access_hash: access_hash, title: title, short_name: short_name, thumbs: thumbs, thumb_dc_id: thumb_dc_id, count: count, hash: hash) | |
end | |
end | |
class StickerSetCovered < IStickerSetCovered | |
CONSTRUCTOR_ID = 0x6410A5D2 | |
property set : Root::IStickerSet | |
property cover : Root::IDocument | |
def initialize(@set : Root::IStickerSet, @cover : Root::IDocument) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@set.tl_serialize(io) | |
@cover.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
set = Root::StickerSet.tl_deserialize(io) | |
cover = Root::Document.tl_deserialize(io) | |
new(set: set, cover: cover) | |
end | |
end | |
class StickerSetMultiCovered < IStickerSetCovered | |
CONSTRUCTOR_ID = 0x3407E51B | |
property set : Root::IStickerSet | |
property covers : Array(Root::IDocument) | |
def initialize(@set : Root::IStickerSet, @covers : Array(Root::IDocument)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@set.tl_serialize(io) | |
@covers.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
set = Root::StickerSet.tl_deserialize(io) | |
covers = Array(Root::Document).tl_deserialize(io) | |
new(set: set, covers: covers) | |
end | |
end | |
class TextAnchor < IRichText | |
CONSTRUCTOR_ID = 0x35553762 | |
property text : Root::IRichText | |
property name : String | |
def initialize(@text : Root::IRichText, @name : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
@name.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
name = String.tl_deserialize(io) | |
new(text: text, name: name) | |
end | |
end | |
class TextBold < IRichText | |
CONSTRUCTOR_ID = 0x6724ABC4 | |
property text : Root::IRichText | |
def initialize(@text : Root::IRichText) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class TextConcat < IRichText | |
CONSTRUCTOR_ID = 0x7E6260D7 | |
property texts : Array(Root::IRichText) | |
def initialize(@texts : Array(Root::IRichText)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@texts.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
texts = Array(Root::RichText).tl_deserialize(io) | |
new(texts: texts) | |
end | |
end | |
class TextEmail < IRichText | |
CONSTRUCTOR_ID = 0xDE5A0DD6 | |
property text : Root::IRichText | |
property email : String | |
def initialize(@text : Root::IRichText, @email : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
@email.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
email = String.tl_deserialize(io) | |
new(text: text, email: email) | |
end | |
end | |
class TextEmpty < IRichText | |
CONSTRUCTOR_ID = 0xDC3D824F | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class TextFixed < IRichText | |
CONSTRUCTOR_ID = 0x6C3F19B9 | |
property text : Root::IRichText | |
def initialize(@text : Root::IRichText) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class TextImage < IRichText | |
CONSTRUCTOR_ID = 0x081CCF4F | |
property document_id : Int64 | |
property w : Int32 | |
property h : Int32 | |
def initialize(@document_id : Int64, @w : Int32, @h : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@document_id.tl_serialize(io) | |
@w.tl_serialize(io) | |
@h.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
document_id = Int64.tl_deserialize(io) | |
w = Int32.tl_deserialize(io) | |
h = Int32.tl_deserialize(io) | |
new(document_id: document_id, w: w, h: h) | |
end | |
end | |
class TextItalic < IRichText | |
CONSTRUCTOR_ID = 0xD912A59C | |
property text : Root::IRichText | |
def initialize(@text : Root::IRichText) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class TextMarked < IRichText | |
CONSTRUCTOR_ID = 0x034B8621 | |
property text : Root::IRichText | |
def initialize(@text : Root::IRichText) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class TextPhone < IRichText | |
CONSTRUCTOR_ID = 0x1CCB966A | |
property text : Root::IRichText | |
property phone : String | |
def initialize(@text : Root::IRichText, @phone : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
@phone.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
phone = String.tl_deserialize(io) | |
new(text: text, phone: phone) | |
end | |
end | |
class TextPlain < IRichText | |
CONSTRUCTOR_ID = 0x744694E0 | |
property text : String | |
def initialize(@text : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = String.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class TextStrike < IRichText | |
CONSTRUCTOR_ID = 0x9BF8BB95 | |
property text : Root::IRichText | |
def initialize(@text : Root::IRichText) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class TextSubscript < IRichText | |
CONSTRUCTOR_ID = 0xED6A8504 | |
property text : Root::IRichText | |
def initialize(@text : Root::IRichText) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class TextSuperscript < IRichText | |
CONSTRUCTOR_ID = 0xC7FB5E01 | |
property text : Root::IRichText | |
def initialize(@text : Root::IRichText) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class TextUnderline < IRichText | |
CONSTRUCTOR_ID = 0xC12622C4 | |
property text : Root::IRichText | |
def initialize(@text : Root::IRichText) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
new(text: text) | |
end | |
end | |
class TextUrl < IRichText | |
CONSTRUCTOR_ID = 0x3C2884C1 | |
property text : Root::IRichText | |
property url : String | |
property webpage_id : Int64 | |
def initialize(@text : Root::IRichText, @url : String, @webpage_id : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@text.tl_serialize(io) | |
@url.tl_serialize(io) | |
@webpage_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
text = Root::RichText.tl_deserialize(io) | |
url = String.tl_deserialize(io) | |
webpage_id = Int64.tl_deserialize(io) | |
new(text: text, url: url, webpage_id: webpage_id) | |
end | |
end | |
class Theme < ITheme | |
CONSTRUCTOR_ID = 0x028F1114 | |
property id : Int64 | |
property access_hash : Int64 | |
property slug : String | |
property title : String | |
property installs_count : Int32 | |
property creator : Bool | |
property default : Bool | |
property document : Root::IDocument? | |
property settings : Root::IThemeSettings? | |
def initialize(@id : Int64, @access_hash : Int64, @slug : String, @title : String, @installs_count : Int32, @creator : Bool = nil, @default : Bool = nil, @document : Root::IDocument? = nil, @settings : Root::IThemeSettings? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @creator ? 1 : 0 | @default ? 2 : 0 | @document ? 4 : 0 | @settings ? 8 : 0).tl_serialize(io) | |
if creator = @creator | |
creator.tl_serialize(io) | |
end | |
if default = @default | |
default.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@slug.tl_serialize(io) | |
@title.tl_serialize(io) | |
if document = @document | |
document.tl_serialize(io) | |
end | |
if settings = @settings | |
settings.tl_serialize(io) | |
end | |
@installs_count.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
creator = (flags & 1) != 0 | |
default = (flags & 2) != 0 | |
id = Int64.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
slug = String.tl_deserialize(io) | |
title = String.tl_deserialize(io) | |
document = (flags & 4) != 0 ? Root::Document.tl_deserialize(io) : nil | |
settings = (flags & 8) != 0 ? Root::ThemeSettings.tl_deserialize(io) : nil | |
installs_count = Int32.tl_deserialize(io) | |
new(creator: creator, default: default, id: id, access_hash: access_hash, slug: slug, title: title, document: document, settings: settings, installs_count: installs_count) | |
end | |
end | |
class ThemeSettings < IThemeSettings | |
CONSTRUCTOR_ID = 0x9C14984A | |
property base_theme : Root::IBaseTheme | |
property accent_color : Int32 | |
property message_top_color : Int32? | |
property message_bottom_color : Int32? | |
property wallpaper : Root::IWallPaper? | |
def initialize(@base_theme : Root::IBaseTheme, @accent_color : Int32, @message_top_color : Int32? = nil, @message_bottom_color : Int32? = nil, @wallpaper : Root::IWallPaper? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @message_top_color ? 1 : 0 | @message_bottom_color ? 1 : 0 | @wallpaper ? 2 : 0).tl_serialize(io) | |
@base_theme.tl_serialize(io) | |
@accent_color.tl_serialize(io) | |
if message_top_color = @message_top_color | |
message_top_color.tl_serialize(io) | |
end | |
if message_bottom_color = @message_bottom_color | |
message_bottom_color.tl_serialize(io) | |
end | |
if wallpaper = @wallpaper | |
wallpaper.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
base_theme = Root::BaseTheme.tl_deserialize(io) | |
accent_color = Int32.tl_deserialize(io) | |
message_top_color = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
message_bottom_color = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
wallpaper = (flags & 2) != 0 ? Root::WallPaper.tl_deserialize(io) : nil | |
new(base_theme: base_theme, accent_color: accent_color, message_top_color: message_top_color, message_bottom_color: message_bottom_color, wallpaper: wallpaper) | |
end | |
end | |
class TlsBlockDomain < ITlsBlock | |
CONSTRUCTOR_ID = 0x10E8636F | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class TlsBlockGrease < ITlsBlock | |
CONSTRUCTOR_ID = 0xE675A1C1 | |
property seed : Int32 | |
def initialize(@seed : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@seed.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
seed = Int32.tl_deserialize(io) | |
new(seed: seed) | |
end | |
end | |
class TlsBlockPublicKey < ITlsBlock | |
CONSTRUCTOR_ID = 0x9EB95B5C | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class TlsBlockRandom < ITlsBlock | |
CONSTRUCTOR_ID = 0x4D4DC41E | |
property length : Int32 | |
def initialize(@length : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@length.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
length = Int32.tl_deserialize(io) | |
new(length: length) | |
end | |
end | |
class TlsBlockScope < ITlsBlock | |
CONSTRUCTOR_ID = 0xE725D44F | |
property entries : Array(Root::ITlsBlock) | |
def initialize(@entries : Array(Root::ITlsBlock)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@entries.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
entries = Array(Root::TlsBlock).tl_deserialize(io) | |
new(entries: entries) | |
end | |
end | |
class TlsBlockString < ITlsBlock | |
CONSTRUCTOR_ID = 0xCC03E5A3 | |
property data : Bytes | |
def initialize(@data : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@data.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
data = Bytes.tl_deserialize(io) | |
new(data: data) | |
end | |
end | |
class TlsBlockZero < ITlsBlock | |
CONSTRUCTOR_ID = 0x09333AFB | |
property length : Int32 | |
def initialize(@length : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@length.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
length = Int32.tl_deserialize(io) | |
new(length: length) | |
end | |
end | |
class TlsClientHello < ITlsClientHello | |
CONSTRUCTOR_ID = 0x6C52C484 | |
property blocks : Array(Root::ITlsBlock) | |
def initialize(@blocks : Array(Root::ITlsBlock)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@blocks.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
blocks = Array(Root::TlsBlock).tl_deserialize(io) | |
new(blocks: blocks) | |
end | |
end | |
class TopPeer < ITopPeer | |
CONSTRUCTOR_ID = 0xEDCDC05B | |
property peer : Root::IPeer | |
property rating : Float64 | |
def initialize(@peer : Root::IPeer, @rating : Float64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peer.tl_serialize(io) | |
@rating.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peer = Root::Peer.tl_deserialize(io) | |
rating = Float64.tl_deserialize(io) | |
new(peer: peer, rating: rating) | |
end | |
end | |
class TopPeerCategoryBotsInline < ITopPeerCategory | |
CONSTRUCTOR_ID = 0x148677E2 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class TopPeerCategoryBotsPm < ITopPeerCategory | |
CONSTRUCTOR_ID = 0xAB661B5B | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class TopPeerCategoryChannels < ITopPeerCategory | |
CONSTRUCTOR_ID = 0x161D9628 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class TopPeerCategoryCorrespondents < ITopPeerCategory | |
CONSTRUCTOR_ID = 0x0637B7ED | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class TopPeerCategoryForwardChats < ITopPeerCategory | |
CONSTRUCTOR_ID = 0xFBEEC0F0 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class TopPeerCategoryForwardUsers < ITopPeerCategory | |
CONSTRUCTOR_ID = 0xA8406CA9 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class TopPeerCategoryGroups < ITopPeerCategory | |
CONSTRUCTOR_ID = 0xBD17A14A | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class TopPeerCategoryPeers < ITopPeerCategoryPeers | |
CONSTRUCTOR_ID = 0xFB834291 | |
property category : Root::ITopPeerCategory | |
property count : Int32 | |
property peers : Array(Root::ITopPeer) | |
def initialize(@category : Root::ITopPeerCategory, @count : Int32, @peers : Array(Root::ITopPeer)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@category.tl_serialize(io) | |
@count.tl_serialize(io) | |
@peers.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
category = Root::TopPeerCategory.tl_deserialize(io) | |
count = Int32.tl_deserialize(io) | |
peers = Array(Root::TopPeer).tl_deserialize(io) | |
new(category: category, count: count, peers: peers) | |
end | |
end | |
class TopPeerCategoryPhoneCalls < ITopPeerCategory | |
CONSTRUCTOR_ID = 0x1E76A78C | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class UpdateBotCallbackQuery < IUpdate | |
CONSTRUCTOR_ID = 0xE73547E1 | |
property query_id : Int64 | |
property user_id : Int32 | |
property peer : Root::IPeer | |
property msg_id : Int32 | |
property chat_instance : Int64 | |
property data : Bytes? | |
property game_short_name : String? | |
def initialize(@query_id : Int64, @user_id : Int32, @peer : Root::IPeer, @msg_id : Int32, @chat_instance : Int64, @data : Bytes? = nil, @game_short_name : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @data ? 1 : 0 | @game_short_name ? 2 : 0).tl_serialize(io) | |
@query_id.tl_serialize(io) | |
@user_id.tl_serialize(io) | |
@peer.tl_serialize(io) | |
@msg_id.tl_serialize(io) | |
@chat_instance.tl_serialize(io) | |
if data = @data | |
data.tl_serialize(io) | |
end | |
if game_short_name = @game_short_name | |
game_short_name.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
query_id = Int64.tl_deserialize(io) | |
user_id = Int32.tl_deserialize(io) | |
peer = Root::Peer.tl_deserialize(io) | |
msg_id = Int32.tl_deserialize(io) | |
chat_instance = Int64.tl_deserialize(io) | |
data = (flags & 1) != 0 ? Bytes.tl_deserialize(io) : nil | |
game_short_name = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
new(query_id: query_id, user_id: user_id, peer: peer, msg_id: msg_id, chat_instance: chat_instance, data: data, game_short_name: game_short_name) | |
end | |
end | |
class UpdateBotInlineQuery < IUpdate | |
CONSTRUCTOR_ID = 0x3F2038DB | |
property query_id : Int64 | |
property user_id : Int32 | |
property query : String | |
property offset : String | |
property geo : Root::IGeoPoint? | |
property peer_type : Root::IInlineQueryPeerType? | |
def initialize(@query_id : Int64, @user_id : Int32, @query : String, @offset : String, @geo : Root::IGeoPoint? = nil, @peer_type : Root::IInlineQueryPeerType? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @geo ? 1 : 0 | @peer_type ? 2 : 0).tl_serialize(io) | |
@query_id.tl_serialize(io) | |
@user_id.tl_serialize(io) | |
@query.tl_serialize(io) | |
if geo = @geo | |
geo.tl_serialize(io) | |
end | |
if peer_type = @peer_type | |
peer_type.tl_serialize(io) | |
end | |
@offset.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
query_id = Int64.tl_deserialize(io) | |
user_id = Int32.tl_deserialize(io) | |
query = String.tl_deserialize(io) | |
geo = (flags & 1) != 0 ? Root::GeoPoint.tl_deserialize(io) : nil | |
peer_type = (flags & 2) != 0 ? Root::InlineQueryPeerType.tl_deserialize(io) : nil | |
offset = String.tl_deserialize(io) | |
new(query_id: query_id, user_id: user_id, query: query, geo: geo, peer_type: peer_type, offset: offset) | |
end | |
end | |
class UpdateBotInlineSend < IUpdate | |
CONSTRUCTOR_ID = 0x0E48F964 | |
property user_id : Int32 | |
property query : String | |
property id : String | |
property geo : Root::IGeoPoint? | |
property msg_id : Root::IInputBotInlineMessageId? | |
def initialize(@user_id : Int32, @query : String, @id : String, @geo : Root::IGeoPoint? = nil, @msg_id : Root::IInputBotInlineMessageId? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @geo ? 1 : 0 | @msg_id ? 2 : 0).tl_serialize(io) | |
@user_id.tl_serialize(io) | |
@query.tl_serialize(io) | |
if geo = @geo | |
geo.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
if msg_id = @msg_id | |
msg_id.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
user_id = Int32.tl_deserialize(io) | |
query = String.tl_deserialize(io) | |
geo = (flags & 1) != 0 ? Root::GeoPoint.tl_deserialize(io) : nil | |
id = String.tl_deserialize(io) | |
msg_id = (flags & 2) != 0 ? Root::InputBotInlineMessageId.tl_deserialize(io) : nil | |
new(user_id: user_id, query: query, geo: geo, id: id, msg_id: msg_id) | |
end | |
end | |
class UpdateBotPrecheckoutQuery < IUpdate | |
CONSTRUCTOR_ID = 0x5D2F3AA9 | |
property query_id : Int64 | |
property user_id : Int32 | |
property payload : Bytes | |
property currency : String | |
property total_amount : Int64 | |
property info : Root::IPaymentRequestedInfo? | |
property shipping_option_id : String? | |
def initialize(@query_id : Int64, @user_id : Int32, @payload : Bytes, @currency : String, @total_amount : Int64, @info : Root::IPaymentRequestedInfo? = nil, @shipping_option_id : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @info ? 1 : 0 | @shipping_option_id ? 2 : 0).tl_serialize(io) | |
@query_id.tl_serialize(io) | |
@user_id.tl_serialize(io) | |
@payload.tl_serialize(io) | |
if info = @info | |
info.tl_serialize(io) | |
end | |
if shipping_option_id = @shipping_option_id | |
shipping_option_id.tl_serialize(io) | |
end | |
@currency.tl_serialize(io) | |
@total_amount.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
query_id = Int64.tl_deserialize(io) | |
user_id = Int32.tl_deserialize(io) | |
payload = Bytes.tl_deserialize(io) | |
info = (flags & 1) != 0 ? Root::PaymentRequestedInfo.tl_deserialize(io) : nil | |
shipping_option_id = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
currency = String.tl_deserialize(io) | |
total_amount = Int64.tl_deserialize(io) | |
new(query_id: query_id, user_id: user_id, payload: payload, info: info, shipping_option_id: shipping_option_id, currency: currency, total_amount: total_amount) | |
end | |
end | |
class UpdateBotShippingQuery < IUpdate | |
CONSTRUCTOR_ID = 0xE0CDC940 | |
property query_id : Int64 | |
property user_id : Int32 | |
property payload : Bytes | |
property shipping_address : Root::IPostAddress | |
def initialize(@query_id : Int64, @user_id : Int32, @payload : Bytes, @shipping_address : Root::IPostAddress) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@query_id.tl_serialize(io) | |
@user_id.tl_serialize(io) | |
@payload.tl_serialize(io) | |
@shipping_address.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
query_id = Int64.tl_deserialize(io) | |
user_id = Int32.tl_deserialize(io) | |
payload = Bytes.tl_deserialize(io) | |
shipping_address = Root::PostAddress.tl_deserialize(io) | |
new(query_id: query_id, user_id: user_id, payload: payload, shipping_address: shipping_address) | |
end | |
end | |
class UpdateBotWebhookJson < IUpdate | |
CONSTRUCTOR_ID = 0x8317C0C3 | |
property data : Root::IDataJson | |
def initialize(@data : Root::IDataJson) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@data.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
data = Root::DataJson.tl_deserialize(io) | |
new(data: data) | |
end | |
end | |
class UpdateBotWebhookJsonQuery < IUpdate | |
CONSTRUCTOR_ID = 0x9B9240A6 | |
property query_id : Int64 | |
property data : Root::IDataJson | |
property timeout : Int32 | |
def initialize(@query_id : Int64, @data : Root::IDataJson, @timeout : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@query_id.tl_serialize(io) | |
@data.tl_serialize(io) | |
@timeout.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
query_id = Int64.tl_deserialize(io) | |
data = Root::DataJson.tl_deserialize(io) | |
timeout = Int32.tl_deserialize(io) | |
new(query_id: query_id, data: data, timeout: timeout) | |
end | |
end | |
class UpdateChannel < IUpdate | |
CONSTRUCTOR_ID = 0xB6D45656 | |
property channel_id : Int32 | |
def initialize(@channel_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@channel_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
channel_id = Int32.tl_deserialize(io) | |
new(channel_id: channel_id) | |
end | |
end | |
class UpdateChannelAvailableMessages < IUpdate | |
CONSTRUCTOR_ID = 0x70DB6837 | |
property channel_id : Int32 | |
property available_min_id : Int32 | |
def initialize(@channel_id : Int32, @available_min_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@channel_id.tl_serialize(io) | |
@available_min_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
channel_id = Int32.tl_deserialize(io) | |
available_min_id = Int32.tl_deserialize(io) | |
new(channel_id: channel_id, available_min_id: available_min_id) | |
end | |
end | |
class UpdateChannelMessageForwards < IUpdate | |
CONSTRUCTOR_ID = 0x6E8A84DF | |
property channel_id : Int32 | |
property id : Int32 | |
property forwards : Int32 | |
def initialize(@channel_id : Int32, @id : Int32, @forwards : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@channel_id.tl_serialize(io) | |
@id.tl_serialize(io) | |
@forwards.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
channel_id = Int32.tl_deserialize(io) | |
id = Int32.tl_deserialize(io) | |
forwards = Int32.tl_deserialize(io) | |
new(channel_id: channel_id, id: id, forwards: forwards) | |
end | |
end | |
class UpdateChannelMessageViews < IUpdate | |
CONSTRUCTOR_ID = 0x98A12B4B | |
property channel_id : Int32 | |
property id : Int32 | |
property views : Int32 | |
def initialize(@channel_id : Int32, @id : Int32, @views : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@channel_id.tl_serialize(io) | |
@id.tl_serialize(io) | |
@views.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
channel_id = Int32.tl_deserialize(io) | |
id = Int32.tl_deserialize(io) | |
views = Int32.tl_deserialize(io) | |
new(channel_id: channel_id, id: id, views: views) | |
end | |
end | |
class UpdateChannelParticipant < IUpdate | |
CONSTRUCTOR_ID = 0x65D2B464 | |
property channel_id : Int32 | |
property date : Int32 | |
property user_id : Int32 | |
property qts : Int32 | |
property prev_participant : Root::IChannelParticipant? | |
property new_participant : Root::IChannelParticipant? | |
def initialize(@channel_id : Int32, @date : Int32, @user_id : Int32, @qts : Int32, @prev_participant : Root::IChannelParticipant? = nil, @new_participant : Root::IChannelParticipant? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @prev_participant ? 1 : 0 | @new_participant ? 2 : 0).tl_serialize(io) | |
@channel_id.tl_serialize(io) | |
@date.tl_serialize(io) | |
@user_id.tl_serialize(io) | |
if prev_participant = @prev_participant | |
prev_participant.tl_serialize(io) | |
end | |
if new_participant = @new_participant | |
new_participant.tl_serialize(io) | |
end | |
@qts.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
channel_id = Int32.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
user_id = Int32.tl_deserialize(io) | |
prev_participant = (flags & 1) != 0 ? Root::ChannelParticipant.tl_deserialize(io) : nil | |
new_participant = (flags & 2) != 0 ? Root::ChannelParticipant.tl_deserialize(io) : nil | |
qts = Int32.tl_deserialize(io) | |
new(channel_id: channel_id, date: date, user_id: user_id, prev_participant: prev_participant, new_participant: new_participant, qts: qts) | |
end | |
end | |
class UpdateChannelReadMessagesContents < IUpdate | |
CONSTRUCTOR_ID = 0x89893B45 | |
property channel_id : Int32 | |
property messages : Array(Int32) | |
def initialize(@channel_id : Int32, @messages : Array(Int32)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@channel_id.tl_serialize(io) | |
@messages.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
channel_id = Int32.tl_deserialize(io) | |
messages = Array(Int32).tl_deserialize(io) | |
new(channel_id: channel_id, messages: messages) | |
end | |
end | |
class UpdateChannelTooLong < IUpdate | |
CONSTRUCTOR_ID = 0xEB0467FB | |
property channel_id : Int32 | |
property pts : Int32? | |
def initialize(@channel_id : Int32, @pts : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @pts ? 1 : 0).tl_serialize(io) | |
@channel_id.tl_serialize(io) | |
if pts = @pts | |
pts.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
channel_id = Int32.tl_deserialize(io) | |
pts = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
new(channel_id: channel_id, pts: pts) | |
end | |
end | |
class UpdateChannelUserTyping < IUpdate | |
CONSTRUCTOR_ID = 0xFF2ABE9F | |
property channel_id : Int32 | |
property user_id : Int32 | |
property action : Root::ISendMessageAction | |
property top_msg_id : Int32? | |
def initialize(@channel_id : Int32, @user_id : Int32, @action : Root::ISendMessageAction, @top_msg_id : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @top_msg_id ? 1 : 0).tl_serialize(io) | |
@channel_id.tl_serialize(io) | |
if top_msg_id = @top_msg_id | |
top_msg_id.tl_serialize(io) | |
end | |
@user_id.tl_serialize(io) | |
@action.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
channel_id = Int32.tl_deserialize(io) | |
top_msg_id = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
user_id = Int32.tl_deserialize(io) | |
action = Root::SendMessageAction.tl_deserialize(io) | |
new(channel_id: channel_id, top_msg_id: top_msg_id, user_id: user_id, action: action) | |
end | |
end | |
class UpdateChannelWebPage < IUpdate | |
CONSTRUCTOR_ID = 0x40771900 | |
property channel_id : Int32 | |
property webpage : Root::IWebPage | |
property pts : Int32 | |
property pts_count : Int32 | |
def initialize(@channel_id : Int32, @webpage : Root::IWebPage, @pts : Int32, @pts_count : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@channel_id.tl_serialize(io) | |
@webpage.tl_serialize(io) | |
@pts.tl_serialize(io) | |
@pts_count.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
channel_id = Int32.tl_deserialize(io) | |
webpage = Root::WebPage.tl_deserialize(io) | |
pts = Int32.tl_deserialize(io) | |
pts_count = Int32.tl_deserialize(io) | |
new(channel_id: channel_id, webpage: webpage, pts: pts, pts_count: pts_count) | |
end | |
end | |
class UpdateChat < IUpdate | |
CONSTRUCTOR_ID = 0x1330A196 | |
property chat_id : Int32 | |
def initialize(@chat_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@chat_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
chat_id = Int32.tl_deserialize(io) | |
new(chat_id: chat_id) | |
end | |
end | |
class UpdateChatDefaultBannedRights < IUpdate | |
CONSTRUCTOR_ID = 0x54C01850 | |
property peer : Root::IPeer | |
property default_banned_rights : Root::IChatBannedRights | |
property version : Int32 | |
def initialize(@peer : Root::IPeer, @default_banned_rights : Root::IChatBannedRights, @version : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peer.tl_serialize(io) | |
@default_banned_rights.tl_serialize(io) | |
@version.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peer = Root::Peer.tl_deserialize(io) | |
default_banned_rights = Root::ChatBannedRights.tl_deserialize(io) | |
version = Int32.tl_deserialize(io) | |
new(peer: peer, default_banned_rights: default_banned_rights, version: version) | |
end | |
end | |
class UpdateChatParticipantAdd < IUpdate | |
CONSTRUCTOR_ID = 0xEA4B0E5C | |
property chat_id : Int32 | |
property user_id : Int32 | |
property inviter_id : Int32 | |
property date : Int32 | |
property version : Int32 | |
def initialize(@chat_id : Int32, @user_id : Int32, @inviter_id : Int32, @date : Int32, @version : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@chat_id.tl_serialize(io) | |
@user_id.tl_serialize(io) | |
@inviter_id.tl_serialize(io) | |
@date.tl_serialize(io) | |
@version.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
chat_id = Int32.tl_deserialize(io) | |
user_id = Int32.tl_deserialize(io) | |
inviter_id = Int32.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
version = Int32.tl_deserialize(io) | |
new(chat_id: chat_id, user_id: user_id, inviter_id: inviter_id, date: date, version: version) | |
end | |
end | |
class UpdateChatParticipantAdmin < IUpdate | |
CONSTRUCTOR_ID = 0xB6901959 | |
property chat_id : Int32 | |
property user_id : Int32 | |
property is_admin : Bool | |
property version : Int32 | |
def initialize(@chat_id : Int32, @user_id : Int32, @is_admin : Bool, @version : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@chat_id.tl_serialize(io) | |
@user_id.tl_serialize(io) | |
@is_admin.tl_serialize(io) | |
@version.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
chat_id = Int32.tl_deserialize(io) | |
user_id = Int32.tl_deserialize(io) | |
is_admin = Bool.tl_deserialize(io) | |
version = Int32.tl_deserialize(io) | |
new(chat_id: chat_id, user_id: user_id, is_admin: is_admin, version: version) | |
end | |
end | |
class UpdateChatParticipantDelete < IUpdate | |
CONSTRUCTOR_ID = 0x6E5F8C22 | |
property chat_id : Int32 | |
property user_id : Int32 | |
property version : Int32 | |
def initialize(@chat_id : Int32, @user_id : Int32, @version : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@chat_id.tl_serialize(io) | |
@user_id.tl_serialize(io) | |
@version.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
chat_id = Int32.tl_deserialize(io) | |
user_id = Int32.tl_deserialize(io) | |
version = Int32.tl_deserialize(io) | |
new(chat_id: chat_id, user_id: user_id, version: version) | |
end | |
end | |
class UpdateChatParticipants < IUpdate | |
CONSTRUCTOR_ID = 0x07761198 | |
property participants : Root::IChatParticipants | |
def initialize(@participants : Root::IChatParticipants) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@participants.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
participants = Root::ChatParticipants.tl_deserialize(io) | |
new(participants: participants) | |
end | |
end | |
class UpdateChatUserTyping < IUpdate | |
CONSTRUCTOR_ID = 0x9A65EA1F | |
property chat_id : Int32 | |
property user_id : Int32 | |
property action : Root::ISendMessageAction | |
def initialize(@chat_id : Int32, @user_id : Int32, @action : Root::ISendMessageAction) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@chat_id.tl_serialize(io) | |
@user_id.tl_serialize(io) | |
@action.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
chat_id = Int32.tl_deserialize(io) | |
user_id = Int32.tl_deserialize(io) | |
action = Root::SendMessageAction.tl_deserialize(io) | |
new(chat_id: chat_id, user_id: user_id, action: action) | |
end | |
end | |
class UpdateConfig < IUpdate | |
CONSTRUCTOR_ID = 0xA229DD06 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class UpdateContactsReset < IUpdate | |
CONSTRUCTOR_ID = 0x7084A7BE | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class UpdateDcOptions < IUpdate | |
CONSTRUCTOR_ID = 0x8E5E9873 | |
property dc_options : Array(Root::IDcOption) | |
def initialize(@dc_options : Array(Root::IDcOption)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@dc_options.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
dc_options = Array(Root::DcOption).tl_deserialize(io) | |
new(dc_options: dc_options) | |
end | |
end | |
class UpdateDeleteChannelMessages < IUpdate | |
CONSTRUCTOR_ID = 0xC37521C9 | |
property channel_id : Int32 | |
property messages : Array(Int32) | |
property pts : Int32 | |
property pts_count : Int32 | |
def initialize(@channel_id : Int32, @messages : Array(Int32), @pts : Int32, @pts_count : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@channel_id.tl_serialize(io) | |
@messages.tl_serialize(io) | |
@pts.tl_serialize(io) | |
@pts_count.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
channel_id = Int32.tl_deserialize(io) | |
messages = Array(Int32).tl_deserialize(io) | |
pts = Int32.tl_deserialize(io) | |
pts_count = Int32.tl_deserialize(io) | |
new(channel_id: channel_id, messages: messages, pts: pts, pts_count: pts_count) | |
end | |
end | |
class UpdateDeleteMessages < IUpdate | |
CONSTRUCTOR_ID = 0xA20DB0E5 | |
property messages : Array(Int32) | |
property pts : Int32 | |
property pts_count : Int32 | |
def initialize(@messages : Array(Int32), @pts : Int32, @pts_count : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@messages.tl_serialize(io) | |
@pts.tl_serialize(io) | |
@pts_count.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
messages = Array(Int32).tl_deserialize(io) | |
pts = Int32.tl_deserialize(io) | |
pts_count = Int32.tl_deserialize(io) | |
new(messages: messages, pts: pts, pts_count: pts_count) | |
end | |
end | |
class UpdateDeleteScheduledMessages < IUpdate | |
CONSTRUCTOR_ID = 0x90866CEE | |
property peer : Root::IPeer | |
property messages : Array(Int32) | |
def initialize(@peer : Root::IPeer, @messages : Array(Int32)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peer.tl_serialize(io) | |
@messages.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peer = Root::Peer.tl_deserialize(io) | |
messages = Array(Int32).tl_deserialize(io) | |
new(peer: peer, messages: messages) | |
end | |
end | |
class UpdateDialogFilter < IUpdate | |
CONSTRUCTOR_ID = 0x26FFDE7D | |
property id : Int32 | |
property filter : Root::IDialogFilter? | |
def initialize(@id : Int32, @filter : Root::IDialogFilter? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @filter ? 1 : 0).tl_serialize(io) | |
@id.tl_serialize(io) | |
if filter = @filter | |
filter.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
id = Int32.tl_deserialize(io) | |
filter = (flags & 1) != 0 ? Root::DialogFilter.tl_deserialize(io) : nil | |
new(id: id, filter: filter) | |
end | |
end | |
class UpdateDialogFilterOrder < IUpdate | |
CONSTRUCTOR_ID = 0xA5D72105 | |
property order : Array(Int32) | |
def initialize(@order : Array(Int32)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@order.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
order = Array(Int32).tl_deserialize(io) | |
new(order: order) | |
end | |
end | |
class UpdateDialogFilters < IUpdate | |
CONSTRUCTOR_ID = 0x3504914F | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class UpdateDialogPinned < IUpdate | |
CONSTRUCTOR_ID = 0x6E6FE51C | |
property peer : Root::IDialogPeer | |
property pinned : Bool | |
property folder_id : Int32? | |
def initialize(@peer : Root::IDialogPeer, @pinned : Bool = nil, @folder_id : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @pinned ? 1 : 0 | @folder_id ? 2 : 0).tl_serialize(io) | |
if pinned = @pinned | |
pinned.tl_serialize(io) | |
end | |
if folder_id = @folder_id | |
folder_id.tl_serialize(io) | |
end | |
@peer.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
pinned = (flags & 1) != 0 | |
folder_id = (flags & 2) != 0 ? Int32.tl_deserialize(io) : nil | |
peer = Root::DialogPeer.tl_deserialize(io) | |
new(pinned: pinned, folder_id: folder_id, peer: peer) | |
end | |
end | |
class UpdateDialogUnreadMark < IUpdate | |
CONSTRUCTOR_ID = 0xE16459C3 | |
property peer : Root::IDialogPeer | |
property unread : Bool | |
def initialize(@peer : Root::IDialogPeer, @unread : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @unread ? 1 : 0).tl_serialize(io) | |
if unread = @unread | |
unread.tl_serialize(io) | |
end | |
@peer.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
unread = (flags & 1) != 0 | |
peer = Root::DialogPeer.tl_deserialize(io) | |
new(unread: unread, peer: peer) | |
end | |
end | |
class UpdateDraftMessage < IUpdate | |
CONSTRUCTOR_ID = 0xEE2BB969 | |
property peer : Root::IPeer | |
property draft : Root::IDraftMessage | |
def initialize(@peer : Root::IPeer, @draft : Root::IDraftMessage) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peer.tl_serialize(io) | |
@draft.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peer = Root::Peer.tl_deserialize(io) | |
draft = Root::DraftMessage.tl_deserialize(io) | |
new(peer: peer, draft: draft) | |
end | |
end | |
class UpdateEditChannelMessage < IUpdate | |
CONSTRUCTOR_ID = 0x1B3F4DF7 | |
property message : Root::IMessage | |
property pts : Int32 | |
property pts_count : Int32 | |
def initialize(@message : Root::IMessage, @pts : Int32, @pts_count : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@message.tl_serialize(io) | |
@pts.tl_serialize(io) | |
@pts_count.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
message = Root::Message.tl_deserialize(io) | |
pts = Int32.tl_deserialize(io) | |
pts_count = Int32.tl_deserialize(io) | |
new(message: message, pts: pts, pts_count: pts_count) | |
end | |
end | |
class UpdateEditMessage < IUpdate | |
CONSTRUCTOR_ID = 0xE40370A3 | |
property message : Root::IMessage | |
property pts : Int32 | |
property pts_count : Int32 | |
def initialize(@message : Root::IMessage, @pts : Int32, @pts_count : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@message.tl_serialize(io) | |
@pts.tl_serialize(io) | |
@pts_count.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
message = Root::Message.tl_deserialize(io) | |
pts = Int32.tl_deserialize(io) | |
pts_count = Int32.tl_deserialize(io) | |
new(message: message, pts: pts, pts_count: pts_count) | |
end | |
end | |
class UpdateEncryptedChatTyping < IUpdate | |
CONSTRUCTOR_ID = 0x1710F156 | |
property chat_id : Int32 | |
def initialize(@chat_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@chat_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
chat_id = Int32.tl_deserialize(io) | |
new(chat_id: chat_id) | |
end | |
end | |
class UpdateEncryptedMessagesRead < IUpdate | |
CONSTRUCTOR_ID = 0x38FE25B7 | |
property chat_id : Int32 | |
property max_date : Int32 | |
property date : Int32 | |
def initialize(@chat_id : Int32, @max_date : Int32, @date : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@chat_id.tl_serialize(io) | |
@max_date.tl_serialize(io) | |
@date.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
chat_id = Int32.tl_deserialize(io) | |
max_date = Int32.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
new(chat_id: chat_id, max_date: max_date, date: date) | |
end | |
end | |
class UpdateEncryption < IUpdate | |
CONSTRUCTOR_ID = 0xB4A2E88D | |
property chat : Root::IEncryptedChat | |
property date : Int32 | |
def initialize(@chat : Root::IEncryptedChat, @date : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@chat.tl_serialize(io) | |
@date.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
chat = Root::EncryptedChat.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
new(chat: chat, date: date) | |
end | |
end | |
class UpdateFavedStickers < IUpdate | |
CONSTRUCTOR_ID = 0xE511996D | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class UpdateFolderPeers < IUpdate | |
CONSTRUCTOR_ID = 0x19360DC0 | |
property folder_peers : Array(Root::IFolderPeer) | |
property pts : Int32 | |
property pts_count : Int32 | |
def initialize(@folder_peers : Array(Root::IFolderPeer), @pts : Int32, @pts_count : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@folder_peers.tl_serialize(io) | |
@pts.tl_serialize(io) | |
@pts_count.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
folder_peers = Array(Root::FolderPeer).tl_deserialize(io) | |
pts = Int32.tl_deserialize(io) | |
pts_count = Int32.tl_deserialize(io) | |
new(folder_peers: folder_peers, pts: pts, pts_count: pts_count) | |
end | |
end | |
class UpdateGeoLiveViewed < IUpdate | |
CONSTRUCTOR_ID = 0x871FB939 | |
property peer : Root::IPeer | |
property msg_id : Int32 | |
def initialize(@peer : Root::IPeer, @msg_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peer.tl_serialize(io) | |
@msg_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peer = Root::Peer.tl_deserialize(io) | |
msg_id = Int32.tl_deserialize(io) | |
new(peer: peer, msg_id: msg_id) | |
end | |
end | |
class UpdateGroupCall < IUpdate | |
CONSTRUCTOR_ID = 0xA45EB99B | |
property chat_id : Int32 | |
property call : Root::IGroupCall | |
def initialize(@chat_id : Int32, @call : Root::IGroupCall) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@chat_id.tl_serialize(io) | |
@call.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
chat_id = Int32.tl_deserialize(io) | |
call = Root::GroupCall.tl_deserialize(io) | |
new(chat_id: chat_id, call: call) | |
end | |
end | |
class UpdateGroupCallParticipants < IUpdate | |
CONSTRUCTOR_ID = 0xF2EBDB4E | |
property call : Root::IInputGroupCall | |
property participants : Array(Root::IGroupCallParticipant) | |
property version : Int32 | |
def initialize(@call : Root::IInputGroupCall, @participants : Array(Root::IGroupCallParticipant), @version : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@call.tl_serialize(io) | |
@participants.tl_serialize(io) | |
@version.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
call = Root::InputGroupCall.tl_deserialize(io) | |
participants = Array(Root::GroupCallParticipant).tl_deserialize(io) | |
version = Int32.tl_deserialize(io) | |
new(call: call, participants: participants, version: version) | |
end | |
end | |
class UpdateInlineBotCallbackQuery < IUpdate | |
CONSTRUCTOR_ID = 0xF9D27A5A | |
property query_id : Int64 | |
property user_id : Int32 | |
property msg_id : Root::IInputBotInlineMessageId | |
property chat_instance : Int64 | |
property data : Bytes? | |
property game_short_name : String? | |
def initialize(@query_id : Int64, @user_id : Int32, @msg_id : Root::IInputBotInlineMessageId, @chat_instance : Int64, @data : Bytes? = nil, @game_short_name : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @data ? 1 : 0 | @game_short_name ? 2 : 0).tl_serialize(io) | |
@query_id.tl_serialize(io) | |
@user_id.tl_serialize(io) | |
@msg_id.tl_serialize(io) | |
@chat_instance.tl_serialize(io) | |
if data = @data | |
data.tl_serialize(io) | |
end | |
if game_short_name = @game_short_name | |
game_short_name.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
query_id = Int64.tl_deserialize(io) | |
user_id = Int32.tl_deserialize(io) | |
msg_id = Root::InputBotInlineMessageId.tl_deserialize(io) | |
chat_instance = Int64.tl_deserialize(io) | |
data = (flags & 1) != 0 ? Bytes.tl_deserialize(io) : nil | |
game_short_name = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
new(query_id: query_id, user_id: user_id, msg_id: msg_id, chat_instance: chat_instance, data: data, game_short_name: game_short_name) | |
end | |
end | |
class UpdateLangPack < IUpdate | |
CONSTRUCTOR_ID = 0x56022F4D | |
property difference : Root::ILangPackDifference | |
def initialize(@difference : Root::ILangPackDifference) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@difference.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
difference = Root::LangPackDifference.tl_deserialize(io) | |
new(difference: difference) | |
end | |
end | |
class UpdateLangPackTooLong < IUpdate | |
CONSTRUCTOR_ID = 0x46560264 | |
property lang_code : String | |
def initialize(@lang_code : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@lang_code.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
lang_code = String.tl_deserialize(io) | |
new(lang_code: lang_code) | |
end | |
end | |
class UpdateLoginToken < IUpdate | |
CONSTRUCTOR_ID = 0x564FE691 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class UpdateMessageId < IUpdate | |
CONSTRUCTOR_ID = 0x4E90BFD6 | |
property id : Int32 | |
property random_id : Int64 | |
def initialize(@id : Int32, @random_id : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@random_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int32.tl_deserialize(io) | |
random_id = Int64.tl_deserialize(io) | |
new(id: id, random_id: random_id) | |
end | |
end | |
class UpdateMessagePoll < IUpdate | |
CONSTRUCTOR_ID = 0xACA1657B | |
property poll_id : Int64 | |
property results : Root::IPollResults | |
property poll : Root::IPoll? | |
def initialize(@poll_id : Int64, @results : Root::IPollResults, @poll : Root::IPoll? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @poll ? 1 : 0).tl_serialize(io) | |
@poll_id.tl_serialize(io) | |
if poll = @poll | |
poll.tl_serialize(io) | |
end | |
@results.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
poll_id = Int64.tl_deserialize(io) | |
poll = (flags & 1) != 0 ? Root::Poll.tl_deserialize(io) : nil | |
results = Root::PollResults.tl_deserialize(io) | |
new(poll_id: poll_id, poll: poll, results: results) | |
end | |
end | |
class UpdateMessagePollVote < IUpdate | |
CONSTRUCTOR_ID = 0x42F88F2C | |
property poll_id : Int64 | |
property user_id : Int32 | |
property options : Array(Bytes) | |
def initialize(@poll_id : Int64, @user_id : Int32, @options : Array(Bytes)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@poll_id.tl_serialize(io) | |
@user_id.tl_serialize(io) | |
@options.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
poll_id = Int64.tl_deserialize(io) | |
user_id = Int32.tl_deserialize(io) | |
options = Array(Bytes).tl_deserialize(io) | |
new(poll_id: poll_id, user_id: user_id, options: options) | |
end | |
end | |
class UpdateNewChannelMessage < IUpdate | |
CONSTRUCTOR_ID = 0x62BA04D9 | |
property message : Root::IMessage | |
property pts : Int32 | |
property pts_count : Int32 | |
def initialize(@message : Root::IMessage, @pts : Int32, @pts_count : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@message.tl_serialize(io) | |
@pts.tl_serialize(io) | |
@pts_count.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
message = Root::Message.tl_deserialize(io) | |
pts = Int32.tl_deserialize(io) | |
pts_count = Int32.tl_deserialize(io) | |
new(message: message, pts: pts, pts_count: pts_count) | |
end | |
end | |
class UpdateNewEncryptedMessage < IUpdate | |
CONSTRUCTOR_ID = 0x12BCBD9A | |
property message : Root::IEncryptedMessage | |
property qts : Int32 | |
def initialize(@message : Root::IEncryptedMessage, @qts : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@message.tl_serialize(io) | |
@qts.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
message = Root::EncryptedMessage.tl_deserialize(io) | |
qts = Int32.tl_deserialize(io) | |
new(message: message, qts: qts) | |
end | |
end | |
class UpdateNewMessage < IUpdate | |
CONSTRUCTOR_ID = 0x1F2B0AFD | |
property message : Root::IMessage | |
property pts : Int32 | |
property pts_count : Int32 | |
def initialize(@message : Root::IMessage, @pts : Int32, @pts_count : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@message.tl_serialize(io) | |
@pts.tl_serialize(io) | |
@pts_count.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
message = Root::Message.tl_deserialize(io) | |
pts = Int32.tl_deserialize(io) | |
pts_count = Int32.tl_deserialize(io) | |
new(message: message, pts: pts, pts_count: pts_count) | |
end | |
end | |
class UpdateNewScheduledMessage < IUpdate | |
CONSTRUCTOR_ID = 0x39A51DFB | |
property message : Root::IMessage | |
def initialize(@message : Root::IMessage) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@message.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
message = Root::Message.tl_deserialize(io) | |
new(message: message) | |
end | |
end | |
class UpdateNewStickerSet < IUpdate | |
CONSTRUCTOR_ID = 0x688A30AA | |
property stickerset : Messages::IStickerSet | |
def initialize(@stickerset : Messages::IStickerSet) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@stickerset.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
stickerset = Messages::StickerSet.tl_deserialize(io) | |
new(stickerset: stickerset) | |
end | |
end | |
class UpdateNotifySettings < IUpdate | |
CONSTRUCTOR_ID = 0xBEC268EF | |
property peer : Root::INotifyPeer | |
property notify_settings : Root::IPeerNotifySettings | |
def initialize(@peer : Root::INotifyPeer, @notify_settings : Root::IPeerNotifySettings) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peer.tl_serialize(io) | |
@notify_settings.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peer = Root::NotifyPeer.tl_deserialize(io) | |
notify_settings = Root::PeerNotifySettings.tl_deserialize(io) | |
new(peer: peer, notify_settings: notify_settings) | |
end | |
end | |
class UpdatePeerBlocked < IUpdate | |
CONSTRUCTOR_ID = 0x246A4B22 | |
property peer_id : Root::IPeer | |
property blocked : Bool | |
def initialize(@peer_id : Root::IPeer, @blocked : Bool) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peer_id.tl_serialize(io) | |
@blocked.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peer_id = Root::Peer.tl_deserialize(io) | |
blocked = Bool.tl_deserialize(io) | |
new(peer_id: peer_id, blocked: blocked) | |
end | |
end | |
class UpdatePeerLocated < IUpdate | |
CONSTRUCTOR_ID = 0xB4AFCFB0 | |
property peers : Array(Root::IPeerLocated) | |
def initialize(@peers : Array(Root::IPeerLocated)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peers.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peers = Array(Root::PeerLocated).tl_deserialize(io) | |
new(peers: peers) | |
end | |
end | |
class UpdatePeerSettings < IUpdate | |
CONSTRUCTOR_ID = 0x6A7E7366 | |
property peer : Root::IPeer | |
property settings : Root::IPeerSettings | |
def initialize(@peer : Root::IPeer, @settings : Root::IPeerSettings) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peer.tl_serialize(io) | |
@settings.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peer = Root::Peer.tl_deserialize(io) | |
settings = Root::PeerSettings.tl_deserialize(io) | |
new(peer: peer, settings: settings) | |
end | |
end | |
class UpdatePhoneCall < IUpdate | |
CONSTRUCTOR_ID = 0xAB0F6B1E | |
property phone_call : Root::IPhoneCall | |
def initialize(@phone_call : Root::IPhoneCall) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@phone_call.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
phone_call = Root::PhoneCall.tl_deserialize(io) | |
new(phone_call: phone_call) | |
end | |
end | |
class UpdatePhoneCallSignalingData < IUpdate | |
CONSTRUCTOR_ID = 0x2661BF09 | |
property phone_call_id : Int64 | |
property data : Bytes | |
def initialize(@phone_call_id : Int64, @data : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@phone_call_id.tl_serialize(io) | |
@data.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
phone_call_id = Int64.tl_deserialize(io) | |
data = Bytes.tl_deserialize(io) | |
new(phone_call_id: phone_call_id, data: data) | |
end | |
end | |
class UpdatePinnedChannelMessages < IUpdate | |
CONSTRUCTOR_ID = 0x8588878B | |
property channel_id : Int32 | |
property messages : Array(Int32) | |
property pts : Int32 | |
property pts_count : Int32 | |
property pinned : Bool | |
def initialize(@channel_id : Int32, @messages : Array(Int32), @pts : Int32, @pts_count : Int32, @pinned : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @pinned ? 1 : 0).tl_serialize(io) | |
if pinned = @pinned | |
pinned.tl_serialize(io) | |
end | |
@channel_id.tl_serialize(io) | |
@messages.tl_serialize(io) | |
@pts.tl_serialize(io) | |
@pts_count.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
pinned = (flags & 1) != 0 | |
channel_id = Int32.tl_deserialize(io) | |
messages = Array(Int32).tl_deserialize(io) | |
pts = Int32.tl_deserialize(io) | |
pts_count = Int32.tl_deserialize(io) | |
new(pinned: pinned, channel_id: channel_id, messages: messages, pts: pts, pts_count: pts_count) | |
end | |
end | |
class UpdatePinnedDialogs < IUpdate | |
CONSTRUCTOR_ID = 0xFA0F3CA2 | |
property folder_id : Int32? | |
property order : Array(Root::IDialogPeer)? | |
def initialize(@folder_id : Int32? = nil, @order : Array(Root::IDialogPeer)? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @folder_id ? 2 : 0 | @order ? 1 : 0).tl_serialize(io) | |
if folder_id = @folder_id | |
folder_id.tl_serialize(io) | |
end | |
if order = @order | |
order.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
folder_id = (flags & 2) != 0 ? Int32.tl_deserialize(io) : nil | |
order = (flags & 1) != 0 ? Array(Root::DialogPeer).tl_deserialize(io) : nil | |
new(folder_id: folder_id, order: order) | |
end | |
end | |
class UpdatePinnedMessages < IUpdate | |
CONSTRUCTOR_ID = 0xED85EAB5 | |
property peer : Root::IPeer | |
property messages : Array(Int32) | |
property pts : Int32 | |
property pts_count : Int32 | |
property pinned : Bool | |
def initialize(@peer : Root::IPeer, @messages : Array(Int32), @pts : Int32, @pts_count : Int32, @pinned : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @pinned ? 1 : 0).tl_serialize(io) | |
if pinned = @pinned | |
pinned.tl_serialize(io) | |
end | |
@peer.tl_serialize(io) | |
@messages.tl_serialize(io) | |
@pts.tl_serialize(io) | |
@pts_count.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
pinned = (flags & 1) != 0 | |
peer = Root::Peer.tl_deserialize(io) | |
messages = Array(Int32).tl_deserialize(io) | |
pts = Int32.tl_deserialize(io) | |
pts_count = Int32.tl_deserialize(io) | |
new(pinned: pinned, peer: peer, messages: messages, pts: pts, pts_count: pts_count) | |
end | |
end | |
class UpdatePrivacy < IUpdate | |
CONSTRUCTOR_ID = 0xEE3B272A | |
property key : Root::IPrivacyKey | |
property rules : Array(Root::IPrivacyRule) | |
def initialize(@key : Root::IPrivacyKey, @rules : Array(Root::IPrivacyRule)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@key.tl_serialize(io) | |
@rules.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
key = Root::PrivacyKey.tl_deserialize(io) | |
rules = Array(Root::PrivacyRule).tl_deserialize(io) | |
new(key: key, rules: rules) | |
end | |
end | |
class UpdatePtsChanged < IUpdate | |
CONSTRUCTOR_ID = 0x3354678F | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class UpdateReadChannelDiscussionInbox < IUpdate | |
CONSTRUCTOR_ID = 0x1CC7DE54 | |
property channel_id : Int32 | |
property top_msg_id : Int32 | |
property read_max_id : Int32 | |
property broadcast_id : Int32? | |
property broadcast_post : Int32? | |
def initialize(@channel_id : Int32, @top_msg_id : Int32, @read_max_id : Int32, @broadcast_id : Int32? = nil, @broadcast_post : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @broadcast_id ? 1 : 0 | @broadcast_post ? 1 : 0).tl_serialize(io) | |
@channel_id.tl_serialize(io) | |
@top_msg_id.tl_serialize(io) | |
@read_max_id.tl_serialize(io) | |
if broadcast_id = @broadcast_id | |
broadcast_id.tl_serialize(io) | |
end | |
if broadcast_post = @broadcast_post | |
broadcast_post.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
channel_id = Int32.tl_deserialize(io) | |
top_msg_id = Int32.tl_deserialize(io) | |
read_max_id = Int32.tl_deserialize(io) | |
broadcast_id = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
broadcast_post = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
new(channel_id: channel_id, top_msg_id: top_msg_id, read_max_id: read_max_id, broadcast_id: broadcast_id, broadcast_post: broadcast_post) | |
end | |
end | |
class UpdateReadChannelDiscussionOutbox < IUpdate | |
CONSTRUCTOR_ID = 0x4638A26C | |
property channel_id : Int32 | |
property top_msg_id : Int32 | |
property read_max_id : Int32 | |
def initialize(@channel_id : Int32, @top_msg_id : Int32, @read_max_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@channel_id.tl_serialize(io) | |
@top_msg_id.tl_serialize(io) | |
@read_max_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
channel_id = Int32.tl_deserialize(io) | |
top_msg_id = Int32.tl_deserialize(io) | |
read_max_id = Int32.tl_deserialize(io) | |
new(channel_id: channel_id, top_msg_id: top_msg_id, read_max_id: read_max_id) | |
end | |
end | |
class UpdateReadChannelInbox < IUpdate | |
CONSTRUCTOR_ID = 0x330B5424 | |
property channel_id : Int32 | |
property max_id : Int32 | |
property still_unread_count : Int32 | |
property pts : Int32 | |
property folder_id : Int32? | |
def initialize(@channel_id : Int32, @max_id : Int32, @still_unread_count : Int32, @pts : Int32, @folder_id : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @folder_id ? 1 : 0).tl_serialize(io) | |
if folder_id = @folder_id | |
folder_id.tl_serialize(io) | |
end | |
@channel_id.tl_serialize(io) | |
@max_id.tl_serialize(io) | |
@still_unread_count.tl_serialize(io) | |
@pts.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
folder_id = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
channel_id = Int32.tl_deserialize(io) | |
max_id = Int32.tl_deserialize(io) | |
still_unread_count = Int32.tl_deserialize(io) | |
pts = Int32.tl_deserialize(io) | |
new(folder_id: folder_id, channel_id: channel_id, max_id: max_id, still_unread_count: still_unread_count, pts: pts) | |
end | |
end | |
class UpdateReadChannelOutbox < IUpdate | |
CONSTRUCTOR_ID = 0x25D6C9C7 | |
property channel_id : Int32 | |
property max_id : Int32 | |
def initialize(@channel_id : Int32, @max_id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@channel_id.tl_serialize(io) | |
@max_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
channel_id = Int32.tl_deserialize(io) | |
max_id = Int32.tl_deserialize(io) | |
new(channel_id: channel_id, max_id: max_id) | |
end | |
end | |
class UpdateReadFeaturedStickers < IUpdate | |
CONSTRUCTOR_ID = 0x571D2742 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class UpdateReadHistoryInbox < IUpdate | |
CONSTRUCTOR_ID = 0x9C974FDF | |
property peer : Root::IPeer | |
property max_id : Int32 | |
property still_unread_count : Int32 | |
property pts : Int32 | |
property pts_count : Int32 | |
property folder_id : Int32? | |
def initialize(@peer : Root::IPeer, @max_id : Int32, @still_unread_count : Int32, @pts : Int32, @pts_count : Int32, @folder_id : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @folder_id ? 1 : 0).tl_serialize(io) | |
if folder_id = @folder_id | |
folder_id.tl_serialize(io) | |
end | |
@peer.tl_serialize(io) | |
@max_id.tl_serialize(io) | |
@still_unread_count.tl_serialize(io) | |
@pts.tl_serialize(io) | |
@pts_count.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
folder_id = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
peer = Root::Peer.tl_deserialize(io) | |
max_id = Int32.tl_deserialize(io) | |
still_unread_count = Int32.tl_deserialize(io) | |
pts = Int32.tl_deserialize(io) | |
pts_count = Int32.tl_deserialize(io) | |
new(folder_id: folder_id, peer: peer, max_id: max_id, still_unread_count: still_unread_count, pts: pts, pts_count: pts_count) | |
end | |
end | |
class UpdateReadHistoryOutbox < IUpdate | |
CONSTRUCTOR_ID = 0x2F2F21BF | |
property peer : Root::IPeer | |
property max_id : Int32 | |
property pts : Int32 | |
property pts_count : Int32 | |
def initialize(@peer : Root::IPeer, @max_id : Int32, @pts : Int32, @pts_count : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@peer.tl_serialize(io) | |
@max_id.tl_serialize(io) | |
@pts.tl_serialize(io) | |
@pts_count.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
peer = Root::Peer.tl_deserialize(io) | |
max_id = Int32.tl_deserialize(io) | |
pts = Int32.tl_deserialize(io) | |
pts_count = Int32.tl_deserialize(io) | |
new(peer: peer, max_id: max_id, pts: pts, pts_count: pts_count) | |
end | |
end | |
class UpdateReadMessagesContents < IUpdate | |
CONSTRUCTOR_ID = 0x68C13933 | |
property messages : Array(Int32) | |
property pts : Int32 | |
property pts_count : Int32 | |
def initialize(@messages : Array(Int32), @pts : Int32, @pts_count : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@messages.tl_serialize(io) | |
@pts.tl_serialize(io) | |
@pts_count.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
messages = Array(Int32).tl_deserialize(io) | |
pts = Int32.tl_deserialize(io) | |
pts_count = Int32.tl_deserialize(io) | |
new(messages: messages, pts: pts, pts_count: pts_count) | |
end | |
end | |
class UpdateRecentStickers < IUpdate | |
CONSTRUCTOR_ID = 0x9A422C20 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class UpdateSavedGifs < IUpdate | |
CONSTRUCTOR_ID = 0x9375341E | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class UpdateServiceNotification < IUpdate | |
CONSTRUCTOR_ID = 0xEBE46819 | |
property type : String | |
property message : String | |
property media : Root::IMessageMedia | |
property entities : Array(Root::IMessageEntity) | |
property popup : Bool | |
property inbox_date : Int32? | |
def initialize(@type : String, @message : String, @media : Root::IMessageMedia, @entities : Array(Root::IMessageEntity), @popup : Bool = nil, @inbox_date : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @popup ? 1 : 0 | @inbox_date ? 2 : 0).tl_serialize(io) | |
if popup = @popup | |
popup.tl_serialize(io) | |
end | |
if inbox_date = @inbox_date | |
inbox_date.tl_serialize(io) | |
end | |
@type.tl_serialize(io) | |
@message.tl_serialize(io) | |
@media.tl_serialize(io) | |
@entities.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
popup = (flags & 1) != 0 | |
inbox_date = (flags & 2) != 0 ? Int32.tl_deserialize(io) : nil | |
type = String.tl_deserialize(io) | |
message = String.tl_deserialize(io) | |
media = Root::MessageMedia.tl_deserialize(io) | |
entities = Array(Root::MessageEntity).tl_deserialize(io) | |
new(popup: popup, inbox_date: inbox_date, type: type, message: message, media: media, entities: entities) | |
end | |
end | |
class UpdateShort < IUpdates | |
CONSTRUCTOR_ID = 0x78D4DEC1 | |
property update : Root::IUpdate | |
property date : Int32 | |
def initialize(@update : Root::IUpdate, @date : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@update.tl_serialize(io) | |
@date.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
update = Root::Update.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
new(update: update, date: date) | |
end | |
end | |
class UpdateShortChatMessage < IUpdates | |
CONSTRUCTOR_ID = 0x402D5DBB | |
property id : Int32 | |
property from_id : Int32 | |
property chat_id : Int32 | |
property message : String | |
property pts : Int32 | |
property pts_count : Int32 | |
property date : Int32 | |
property outgoing : Bool | |
property mentioned : Bool | |
property media_unread : Bool | |
property silent : Bool | |
property fwd_from : Root::IMessageFwdHeader? | |
property via_bot_id : Int32? | |
property reply_to : Root::IMessageReplyHeader? | |
property entities : Array(Root::IMessageEntity)? | |
def initialize(@id : Int32, @from_id : Int32, @chat_id : Int32, @message : String, @pts : Int32, @pts_count : Int32, @date : Int32, @outgoing : Bool = nil, @mentioned : Bool = nil, @media_unread : Bool = nil, @silent : Bool = nil, @fwd_from : Root::IMessageFwdHeader? = nil, @via_bot_id : Int32? = nil, @reply_to : Root::IMessageReplyHeader? = nil, @entities : Array(Root::IMessageEntity)? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @outgoing ? 2 : 0 | @mentioned ? 16 : 0 | @media_unread ? 32 : 0 | @silent ? 8192 : 0 | @fwd_from ? 4 : 0 | @via_bot_id ? 2048 : 0 | @reply_to ? 8 : 0 | @entities ? 128 : 0).tl_serialize(io) | |
if outgoing = @outgoing | |
outgoing.tl_serialize(io) | |
end | |
if mentioned = @mentioned | |
mentioned.tl_serialize(io) | |
end | |
if media_unread = @media_unread | |
media_unread.tl_serialize(io) | |
end | |
if silent = @silent | |
silent.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@from_id.tl_serialize(io) | |
@chat_id.tl_serialize(io) | |
@message.tl_serialize(io) | |
@pts.tl_serialize(io) | |
@pts_count.tl_serialize(io) | |
@date.tl_serialize(io) | |
if fwd_from = @fwd_from | |
fwd_from.tl_serialize(io) | |
end | |
if via_bot_id = @via_bot_id | |
via_bot_id.tl_serialize(io) | |
end | |
if reply_to = @reply_to | |
reply_to.tl_serialize(io) | |
end | |
if entities = @entities | |
entities.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
outgoing = (flags & 2) != 0 | |
mentioned = (flags & 16) != 0 | |
media_unread = (flags & 32) != 0 | |
silent = (flags & 8192) != 0 | |
id = Int32.tl_deserialize(io) | |
from_id = Int32.tl_deserialize(io) | |
chat_id = Int32.tl_deserialize(io) | |
message = String.tl_deserialize(io) | |
pts = Int32.tl_deserialize(io) | |
pts_count = Int32.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
fwd_from = (flags & 4) != 0 ? Root::MessageFwdHeader.tl_deserialize(io) : nil | |
via_bot_id = (flags & 2048) != 0 ? Int32.tl_deserialize(io) : nil | |
reply_to = (flags & 8) != 0 ? Root::MessageReplyHeader.tl_deserialize(io) : nil | |
entities = (flags & 128) != 0 ? Array(Root::MessageEntity).tl_deserialize(io) : nil | |
new(outgoing: outgoing, mentioned: mentioned, media_unread: media_unread, silent: silent, id: id, from_id: from_id, chat_id: chat_id, message: message, pts: pts, pts_count: pts_count, date: date, fwd_from: fwd_from, via_bot_id: via_bot_id, reply_to: reply_to, entities: entities) | |
end | |
end | |
class UpdateShortMessage < IUpdates | |
CONSTRUCTOR_ID = 0x2296D2C8 | |
property id : Int32 | |
property user_id : Int32 | |
property message : String | |
property pts : Int32 | |
property pts_count : Int32 | |
property date : Int32 | |
property outgoing : Bool | |
property mentioned : Bool | |
property media_unread : Bool | |
property silent : Bool | |
property fwd_from : Root::IMessageFwdHeader? | |
property via_bot_id : Int32? | |
property reply_to : Root::IMessageReplyHeader? | |
property entities : Array(Root::IMessageEntity)? | |
def initialize(@id : Int32, @user_id : Int32, @message : String, @pts : Int32, @pts_count : Int32, @date : Int32, @outgoing : Bool = nil, @mentioned : Bool = nil, @media_unread : Bool = nil, @silent : Bool = nil, @fwd_from : Root::IMessageFwdHeader? = nil, @via_bot_id : Int32? = nil, @reply_to : Root::IMessageReplyHeader? = nil, @entities : Array(Root::IMessageEntity)? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @outgoing ? 2 : 0 | @mentioned ? 16 : 0 | @media_unread ? 32 : 0 | @silent ? 8192 : 0 | @fwd_from ? 4 : 0 | @via_bot_id ? 2048 : 0 | @reply_to ? 8 : 0 | @entities ? 128 : 0).tl_serialize(io) | |
if outgoing = @outgoing | |
outgoing.tl_serialize(io) | |
end | |
if mentioned = @mentioned | |
mentioned.tl_serialize(io) | |
end | |
if media_unread = @media_unread | |
media_unread.tl_serialize(io) | |
end | |
if silent = @silent | |
silent.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@user_id.tl_serialize(io) | |
@message.tl_serialize(io) | |
@pts.tl_serialize(io) | |
@pts_count.tl_serialize(io) | |
@date.tl_serialize(io) | |
if fwd_from = @fwd_from | |
fwd_from.tl_serialize(io) | |
end | |
if via_bot_id = @via_bot_id | |
via_bot_id.tl_serialize(io) | |
end | |
if reply_to = @reply_to | |
reply_to.tl_serialize(io) | |
end | |
if entities = @entities | |
entities.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
outgoing = (flags & 2) != 0 | |
mentioned = (flags & 16) != 0 | |
media_unread = (flags & 32) != 0 | |
silent = (flags & 8192) != 0 | |
id = Int32.tl_deserialize(io) | |
user_id = Int32.tl_deserialize(io) | |
message = String.tl_deserialize(io) | |
pts = Int32.tl_deserialize(io) | |
pts_count = Int32.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
fwd_from = (flags & 4) != 0 ? Root::MessageFwdHeader.tl_deserialize(io) : nil | |
via_bot_id = (flags & 2048) != 0 ? Int32.tl_deserialize(io) : nil | |
reply_to = (flags & 8) != 0 ? Root::MessageReplyHeader.tl_deserialize(io) : nil | |
entities = (flags & 128) != 0 ? Array(Root::MessageEntity).tl_deserialize(io) : nil | |
new(outgoing: outgoing, mentioned: mentioned, media_unread: media_unread, silent: silent, id: id, user_id: user_id, message: message, pts: pts, pts_count: pts_count, date: date, fwd_from: fwd_from, via_bot_id: via_bot_id, reply_to: reply_to, entities: entities) | |
end | |
end | |
class UpdateShortSentMessage < IUpdates | |
CONSTRUCTOR_ID = 0x11F1331C | |
property id : Int32 | |
property pts : Int32 | |
property pts_count : Int32 | |
property date : Int32 | |
property outgoing : Bool | |
property media : Root::IMessageMedia? | |
property entities : Array(Root::IMessageEntity)? | |
def initialize(@id : Int32, @pts : Int32, @pts_count : Int32, @date : Int32, @outgoing : Bool = nil, @media : Root::IMessageMedia? = nil, @entities : Array(Root::IMessageEntity)? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @outgoing ? 2 : 0 | @media ? 512 : 0 | @entities ? 128 : 0).tl_serialize(io) | |
if outgoing = @outgoing | |
outgoing.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@pts.tl_serialize(io) | |
@pts_count.tl_serialize(io) | |
@date.tl_serialize(io) | |
if media = @media | |
media.tl_serialize(io) | |
end | |
if entities = @entities | |
entities.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
outgoing = (flags & 2) != 0 | |
id = Int32.tl_deserialize(io) | |
pts = Int32.tl_deserialize(io) | |
pts_count = Int32.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
media = (flags & 512) != 0 ? Root::MessageMedia.tl_deserialize(io) : nil | |
entities = (flags & 128) != 0 ? Array(Root::MessageEntity).tl_deserialize(io) : nil | |
new(outgoing: outgoing, id: id, pts: pts, pts_count: pts_count, date: date, media: media, entities: entities) | |
end | |
end | |
class UpdateStickerSets < IUpdate | |
CONSTRUCTOR_ID = 0x43AE3DEC | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class UpdateStickerSetsOrder < IUpdate | |
CONSTRUCTOR_ID = 0x0BB2D201 | |
property order : Array(Int64) | |
property masks : Bool | |
def initialize(@order : Array(Int64), @masks : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @masks ? 1 : 0).tl_serialize(io) | |
if masks = @masks | |
masks.tl_serialize(io) | |
end | |
@order.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
masks = (flags & 1) != 0 | |
order = Array(Int64).tl_deserialize(io) | |
new(masks: masks, order: order) | |
end | |
end | |
class UpdateTheme < IUpdate | |
CONSTRUCTOR_ID = 0x8216FBA3 | |
property theme : Root::ITheme | |
def initialize(@theme : Root::ITheme) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@theme.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
theme = Root::Theme.tl_deserialize(io) | |
new(theme: theme) | |
end | |
end | |
class UpdateUserName < IUpdate | |
CONSTRUCTOR_ID = 0xA7332B73 | |
property user_id : Int32 | |
property first_name : String | |
property last_name : String | |
property username : String | |
def initialize(@user_id : Int32, @first_name : String, @last_name : String, @username : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
@first_name.tl_serialize(io) | |
@last_name.tl_serialize(io) | |
@username.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
first_name = String.tl_deserialize(io) | |
last_name = String.tl_deserialize(io) | |
username = String.tl_deserialize(io) | |
new(user_id: user_id, first_name: first_name, last_name: last_name, username: username) | |
end | |
end | |
class UpdateUserPhone < IUpdate | |
CONSTRUCTOR_ID = 0x12B9417B | |
property user_id : Int32 | |
property phone : String | |
def initialize(@user_id : Int32, @phone : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
@phone.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
phone = String.tl_deserialize(io) | |
new(user_id: user_id, phone: phone) | |
end | |
end | |
class UpdateUserPhoto < IUpdate | |
CONSTRUCTOR_ID = 0x95313B0C | |
property user_id : Int32 | |
property date : Int32 | |
property photo : Root::IUserProfilePhoto | |
property previous : Bool | |
def initialize(@user_id : Int32, @date : Int32, @photo : Root::IUserProfilePhoto, @previous : Bool) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
@date.tl_serialize(io) | |
@photo.tl_serialize(io) | |
@previous.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
photo = Root::UserProfilePhoto.tl_deserialize(io) | |
previous = Bool.tl_deserialize(io) | |
new(user_id: user_id, date: date, photo: photo, previous: previous) | |
end | |
end | |
class UpdateUserStatus < IUpdate | |
CONSTRUCTOR_ID = 0x1BFBD823 | |
property user_id : Int32 | |
property status : Root::IUserStatus | |
def initialize(@user_id : Int32, @status : Root::IUserStatus) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
@status.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
status = Root::UserStatus.tl_deserialize(io) | |
new(user_id: user_id, status: status) | |
end | |
end | |
class UpdateUserTyping < IUpdate | |
CONSTRUCTOR_ID = 0x5C486927 | |
property user_id : Int32 | |
property action : Root::ISendMessageAction | |
def initialize(@user_id : Int32, @action : Root::ISendMessageAction) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@user_id.tl_serialize(io) | |
@action.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
user_id = Int32.tl_deserialize(io) | |
action = Root::SendMessageAction.tl_deserialize(io) | |
new(user_id: user_id, action: action) | |
end | |
end | |
class UpdateWebPage < IUpdate | |
CONSTRUCTOR_ID = 0x7F891213 | |
property webpage : Root::IWebPage | |
property pts : Int32 | |
property pts_count : Int32 | |
def initialize(@webpage : Root::IWebPage, @pts : Int32, @pts_count : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@webpage.tl_serialize(io) | |
@pts.tl_serialize(io) | |
@pts_count.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
webpage = Root::WebPage.tl_deserialize(io) | |
pts = Int32.tl_deserialize(io) | |
pts_count = Int32.tl_deserialize(io) | |
new(webpage: webpage, pts: pts, pts_count: pts_count) | |
end | |
end | |
class Updates < IUpdates | |
CONSTRUCTOR_ID = 0x74AE4240 | |
property updates : Array(Root::IUpdate) | |
property users : Array(Root::IUser) | |
property chats : Array(Root::IChat) | |
property date : Int32 | |
property seq : Int32 | |
def initialize(@updates : Array(Root::IUpdate), @users : Array(Root::IUser), @chats : Array(Root::IChat), @date : Int32, @seq : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@updates.tl_serialize(io) | |
@users.tl_serialize(io) | |
@chats.tl_serialize(io) | |
@date.tl_serialize(io) | |
@seq.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
updates = Array(Root::Update).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
chats = Array(Root::Chat).tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
seq = Int32.tl_deserialize(io) | |
new(updates: updates, users: users, chats: chats, date: date, seq: seq) | |
end | |
end | |
class UpdatesCombined < IUpdates | |
CONSTRUCTOR_ID = 0x725B04C3 | |
property updates : Array(Root::IUpdate) | |
property users : Array(Root::IUser) | |
property chats : Array(Root::IChat) | |
property date : Int32 | |
property seq_start : Int32 | |
property seq : Int32 | |
def initialize(@updates : Array(Root::IUpdate), @users : Array(Root::IUser), @chats : Array(Root::IChat), @date : Int32, @seq_start : Int32, @seq : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@updates.tl_serialize(io) | |
@users.tl_serialize(io) | |
@chats.tl_serialize(io) | |
@date.tl_serialize(io) | |
@seq_start.tl_serialize(io) | |
@seq.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
updates = Array(Root::Update).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
chats = Array(Root::Chat).tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
seq_start = Int32.tl_deserialize(io) | |
seq = Int32.tl_deserialize(io) | |
new(updates: updates, users: users, chats: chats, date: date, seq_start: seq_start, seq: seq) | |
end | |
end | |
class UpdatesTooLong < IUpdates | |
CONSTRUCTOR_ID = 0xE317AF7E | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class UrlAuthResultAccepted < IUrlAuthResult | |
CONSTRUCTOR_ID = 0x8F8C0E4E | |
property url : String | |
def initialize(@url : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@url.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
url = String.tl_deserialize(io) | |
new(url: url) | |
end | |
end | |
class UrlAuthResultDefault < IUrlAuthResult | |
CONSTRUCTOR_ID = 0xA9D6DB1F | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class UrlAuthResultRequest < IUrlAuthResult | |
CONSTRUCTOR_ID = 0x92D33A0E | |
property bot : Root::IUser | |
property domain : String | |
property request_write_access : Bool | |
def initialize(@bot : Root::IUser, @domain : String, @request_write_access : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @request_write_access ? 1 : 0).tl_serialize(io) | |
if request_write_access = @request_write_access | |
request_write_access.tl_serialize(io) | |
end | |
@bot.tl_serialize(io) | |
@domain.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
request_write_access = (flags & 1) != 0 | |
bot = Root::User.tl_deserialize(io) | |
domain = String.tl_deserialize(io) | |
new(request_write_access: request_write_access, bot: bot, domain: domain) | |
end | |
end | |
class User < IUser | |
CONSTRUCTOR_ID = 0x938458C1 | |
property id : Int32 | |
property bot_inline_placeholder : String? | |
property restriction_reason : Array(Root::IRestrictionReason)? | |
property bot_info_version : Int32? | |
property status : Root::IUserStatus? | |
property photo : Root::IUserProfilePhoto? | |
property phone : String? | |
property username : String? | |
property last_name : String? | |
property first_name : String? | |
property access_hash : Int64? | |
property apply_min_photo : Bool | |
property scam : Bool | |
property support : Bool | |
property bot_inline_geo : Bool | |
property min : Bool | |
property restricted : Bool | |
property verified : Bool | |
property bot_nochats : Bool | |
property bot_chat_history : Bool | |
property bot : Bool | |
property deleted : Bool | |
property mutual_contact : Bool | |
property contact : Bool | |
property is_self : Bool | |
property lang_code : String? | |
def initialize(@id : Int32, @bot_inline_placeholder : String? = nil, @restriction_reason : Array(Root::IRestrictionReason)? = nil, @bot_info_version : Int32? = nil, @status : Root::IUserStatus? = nil, @photo : Root::IUserProfilePhoto? = nil, @phone : String? = nil, @username : String? = nil, @last_name : String? = nil, @first_name : String? = nil, @access_hash : Int64? = nil, @apply_min_photo : Bool = nil, @scam : Bool = nil, @support : Bool = nil, @bot_inline_geo : Bool = nil, @min : Bool = nil, @restricted : Bool = nil, @verified : Bool = nil, @bot_nochats : Bool = nil, @bot_chat_history : Bool = nil, @bot : Bool = nil, @deleted : Bool = nil, @mutual_contact : Bool = nil, @contact : Bool = nil, @is_self : Bool = nil, @lang_code : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @is_self ? 1024 : 0 | @contact ? 2048 : 0 | @mutual_contact ? 4096 : 0 | @deleted ? 8192 : 0 | @bot ? 16384 : 0 | @bot_chat_history ? 32768 : 0 | @bot_nochats ? 65536 : 0 | @verified ? 131072 : 0 | @restricted ? 262144 : 0 | @min ? 1048576 : 0 | @bot_inline_geo ? 2097152 : 0 | @support ? 8388608 : 0 | @scam ? 16777216 : 0 | @apply_min_photo ? 33554432 : 0 | @access_hash ? 1 : 0 | @first_name ? 2 : 0 | @last_name ? 4 : 0 | @username ? 8 : 0 | @phone ? 16 : 0 | @photo ? 32 : 0 | @status ? 64 : 0 | @bot_info_version ? 16384 : 0 | @restriction_reason ? 262144 : 0 | @bot_inline_placeholder ? 524288 : 0 | @lang_code ? 4194304 : 0).tl_serialize(io) | |
if is_self = @is_self | |
is_self.tl_serialize(io) | |
end | |
if contact = @contact | |
contact.tl_serialize(io) | |
end | |
if mutual_contact = @mutual_contact | |
mutual_contact.tl_serialize(io) | |
end | |
if deleted = @deleted | |
deleted.tl_serialize(io) | |
end | |
if bot = @bot | |
bot.tl_serialize(io) | |
end | |
if bot_chat_history = @bot_chat_history | |
bot_chat_history.tl_serialize(io) | |
end | |
if bot_nochats = @bot_nochats | |
bot_nochats.tl_serialize(io) | |
end | |
if verified = @verified | |
verified.tl_serialize(io) | |
end | |
if restricted = @restricted | |
restricted.tl_serialize(io) | |
end | |
if min = @min | |
min.tl_serialize(io) | |
end | |
if bot_inline_geo = @bot_inline_geo | |
bot_inline_geo.tl_serialize(io) | |
end | |
if support = @support | |
support.tl_serialize(io) | |
end | |
if scam = @scam | |
scam.tl_serialize(io) | |
end | |
if apply_min_photo = @apply_min_photo | |
apply_min_photo.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
if access_hash = @access_hash | |
access_hash.tl_serialize(io) | |
end | |
if first_name = @first_name | |
first_name.tl_serialize(io) | |
end | |
if last_name = @last_name | |
last_name.tl_serialize(io) | |
end | |
if username = @username | |
username.tl_serialize(io) | |
end | |
if phone = @phone | |
phone.tl_serialize(io) | |
end | |
if photo = @photo | |
photo.tl_serialize(io) | |
end | |
if status = @status | |
status.tl_serialize(io) | |
end | |
if bot_info_version = @bot_info_version | |
bot_info_version.tl_serialize(io) | |
end | |
if restriction_reason = @restriction_reason | |
restriction_reason.tl_serialize(io) | |
end | |
if bot_inline_placeholder = @bot_inline_placeholder | |
bot_inline_placeholder.tl_serialize(io) | |
end | |
if lang_code = @lang_code | |
lang_code.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
is_self = (flags & 1024) != 0 | |
contact = (flags & 2048) != 0 | |
mutual_contact = (flags & 4096) != 0 | |
deleted = (flags & 8192) != 0 | |
bot = (flags & 16384) != 0 | |
bot_chat_history = (flags & 32768) != 0 | |
bot_nochats = (flags & 65536) != 0 | |
verified = (flags & 131072) != 0 | |
restricted = (flags & 262144) != 0 | |
min = (flags & 1048576) != 0 | |
bot_inline_geo = (flags & 2097152) != 0 | |
support = (flags & 8388608) != 0 | |
scam = (flags & 16777216) != 0 | |
apply_min_photo = (flags & 33554432) != 0 | |
id = Int32.tl_deserialize(io) | |
access_hash = (flags & 1) != 0 ? Int64.tl_deserialize(io) : nil | |
first_name = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
last_name = (flags & 4) != 0 ? String.tl_deserialize(io) : nil | |
username = (flags & 8) != 0 ? String.tl_deserialize(io) : nil | |
phone = (flags & 16) != 0 ? String.tl_deserialize(io) : nil | |
photo = (flags & 32) != 0 ? Root::UserProfilePhoto.tl_deserialize(io) : nil | |
status = (flags & 64) != 0 ? Root::UserStatus.tl_deserialize(io) : nil | |
bot_info_version = (flags & 16384) != 0 ? Int32.tl_deserialize(io) : nil | |
restriction_reason = (flags & 262144) != 0 ? Array(Root::RestrictionReason).tl_deserialize(io) : nil | |
bot_inline_placeholder = (flags & 524288) != 0 ? String.tl_deserialize(io) : nil | |
lang_code = (flags & 4194304) != 0 ? String.tl_deserialize(io) : nil | |
new(is_self: is_self, contact: contact, mutual_contact: mutual_contact, deleted: deleted, bot: bot, bot_chat_history: bot_chat_history, bot_nochats: bot_nochats, verified: verified, restricted: restricted, min: min, bot_inline_geo: bot_inline_geo, support: support, scam: scam, apply_min_photo: apply_min_photo, id: id, access_hash: access_hash, first_name: first_name, last_name: last_name, username: username, phone: phone, photo: photo, status: status, bot_info_version: bot_info_version, restriction_reason: restriction_reason, bot_inline_placeholder: bot_inline_placeholder, lang_code: lang_code) | |
end | |
end | |
class UserEmpty < IUser | |
CONSTRUCTOR_ID = 0x200250BA | |
property id : Int32 | |
def initialize(@id : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int32.tl_deserialize(io) | |
new(id: id) | |
end | |
end | |
class UserFull < IUserFull | |
CONSTRUCTOR_ID = 0xEDF17C12 | |
property user : Root::IUser | |
property settings : Root::IPeerSettings | |
property notify_settings : Root::IPeerNotifySettings | |
property common_chats_count : Int32 | |
property blocked : Bool | |
property phone_calls_available : Bool | |
property phone_calls_private : Bool | |
property can_pin_message : Bool | |
property has_scheduled : Bool | |
property video_calls_available : Bool | |
property about : String? | |
property profile_photo : Root::IPhoto? | |
property bot_info : Root::IBotInfo? | |
property pinned_msg_id : Int32? | |
property folder_id : Int32? | |
def initialize(@user : Root::IUser, @settings : Root::IPeerSettings, @notify_settings : Root::IPeerNotifySettings, @common_chats_count : Int32, @blocked : Bool = nil, @phone_calls_available : Bool = nil, @phone_calls_private : Bool = nil, @can_pin_message : Bool = nil, @has_scheduled : Bool = nil, @video_calls_available : Bool = nil, @about : String? = nil, @profile_photo : Root::IPhoto? = nil, @bot_info : Root::IBotInfo? = nil, @pinned_msg_id : Int32? = nil, @folder_id : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @blocked ? 1 : 0 | @phone_calls_available ? 16 : 0 | @phone_calls_private ? 32 : 0 | @can_pin_message ? 128 : 0 | @has_scheduled ? 4096 : 0 | @video_calls_available ? 8192 : 0 | @about ? 2 : 0 | @profile_photo ? 4 : 0 | @bot_info ? 8 : 0 | @pinned_msg_id ? 64 : 0 | @folder_id ? 2048 : 0).tl_serialize(io) | |
if blocked = @blocked | |
blocked.tl_serialize(io) | |
end | |
if phone_calls_available = @phone_calls_available | |
phone_calls_available.tl_serialize(io) | |
end | |
if phone_calls_private = @phone_calls_private | |
phone_calls_private.tl_serialize(io) | |
end | |
if can_pin_message = @can_pin_message | |
can_pin_message.tl_serialize(io) | |
end | |
if has_scheduled = @has_scheduled | |
has_scheduled.tl_serialize(io) | |
end | |
if video_calls_available = @video_calls_available | |
video_calls_available.tl_serialize(io) | |
end | |
@user.tl_serialize(io) | |
if about = @about | |
about.tl_serialize(io) | |
end | |
@settings.tl_serialize(io) | |
if profile_photo = @profile_photo | |
profile_photo.tl_serialize(io) | |
end | |
@notify_settings.tl_serialize(io) | |
if bot_info = @bot_info | |
bot_info.tl_serialize(io) | |
end | |
if pinned_msg_id = @pinned_msg_id | |
pinned_msg_id.tl_serialize(io) | |
end | |
@common_chats_count.tl_serialize(io) | |
if folder_id = @folder_id | |
folder_id.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
blocked = (flags & 1) != 0 | |
phone_calls_available = (flags & 16) != 0 | |
phone_calls_private = (flags & 32) != 0 | |
can_pin_message = (flags & 128) != 0 | |
has_scheduled = (flags & 4096) != 0 | |
video_calls_available = (flags & 8192) != 0 | |
user = Root::User.tl_deserialize(io) | |
about = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
settings = Root::PeerSettings.tl_deserialize(io) | |
profile_photo = (flags & 4) != 0 ? Root::Photo.tl_deserialize(io) : nil | |
notify_settings = Root::PeerNotifySettings.tl_deserialize(io) | |
bot_info = (flags & 8) != 0 ? Root::BotInfo.tl_deserialize(io) : nil | |
pinned_msg_id = (flags & 64) != 0 ? Int32.tl_deserialize(io) : nil | |
common_chats_count = Int32.tl_deserialize(io) | |
folder_id = (flags & 2048) != 0 ? Int32.tl_deserialize(io) : nil | |
new(blocked: blocked, phone_calls_available: phone_calls_available, phone_calls_private: phone_calls_private, can_pin_message: can_pin_message, has_scheduled: has_scheduled, video_calls_available: video_calls_available, user: user, about: about, settings: settings, profile_photo: profile_photo, notify_settings: notify_settings, bot_info: bot_info, pinned_msg_id: pinned_msg_id, common_chats_count: common_chats_count, folder_id: folder_id) | |
end | |
end | |
class UserProfilePhoto < IUserProfilePhoto | |
CONSTRUCTOR_ID = 0x69D3AB26 | |
property photo_id : Int64 | |
property photo_small : Root::IFileLocation | |
property photo_big : Root::IFileLocation | |
property dc_id : Int32 | |
property has_video : Bool | |
def initialize(@photo_id : Int64, @photo_small : Root::IFileLocation, @photo_big : Root::IFileLocation, @dc_id : Int32, @has_video : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @has_video ? 1 : 0).tl_serialize(io) | |
if has_video = @has_video | |
has_video.tl_serialize(io) | |
end | |
@photo_id.tl_serialize(io) | |
@photo_small.tl_serialize(io) | |
@photo_big.tl_serialize(io) | |
@dc_id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
has_video = (flags & 1) != 0 | |
photo_id = Int64.tl_deserialize(io) | |
photo_small = Root::FileLocation.tl_deserialize(io) | |
photo_big = Root::FileLocation.tl_deserialize(io) | |
dc_id = Int32.tl_deserialize(io) | |
new(has_video: has_video, photo_id: photo_id, photo_small: photo_small, photo_big: photo_big, dc_id: dc_id) | |
end | |
end | |
class UserProfilePhotoEmpty < IUserProfilePhoto | |
CONSTRUCTOR_ID = 0x4F11BAE1 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class UserStatusEmpty < IUserStatus | |
CONSTRUCTOR_ID = 0x09D05049 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class UserStatusLastMonth < IUserStatus | |
CONSTRUCTOR_ID = 0x77EBC742 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class UserStatusLastWeek < IUserStatus | |
CONSTRUCTOR_ID = 0x07BF09FC | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class UserStatusOffline < IUserStatus | |
CONSTRUCTOR_ID = 0x008C703F | |
property was_online : Int32 | |
def initialize(@was_online : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@was_online.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
was_online = Int32.tl_deserialize(io) | |
new(was_online: was_online) | |
end | |
end | |
class UserStatusOnline < IUserStatus | |
CONSTRUCTOR_ID = 0xEDB93949 | |
property expires : Int32 | |
def initialize(@expires : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@expires.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
expires = Int32.tl_deserialize(io) | |
new(expires: expires) | |
end | |
end | |
class UserStatusRecently < IUserStatus | |
CONSTRUCTOR_ID = 0xE26F42F1 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class VideoSize < IVideoSize | |
CONSTRUCTOR_ID = 0xE831C556 | |
property type : String | |
property location : Root::IFileLocation | |
property w : Int32 | |
property h : Int32 | |
property size : Int32 | |
property video_start_ts : Float64? | |
def initialize(@type : String, @location : Root::IFileLocation, @w : Int32, @h : Int32, @size : Int32, @video_start_ts : Float64? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @video_start_ts ? 1 : 0).tl_serialize(io) | |
@type.tl_serialize(io) | |
@location.tl_serialize(io) | |
@w.tl_serialize(io) | |
@h.tl_serialize(io) | |
@size.tl_serialize(io) | |
if video_start_ts = @video_start_ts | |
video_start_ts.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
type = String.tl_deserialize(io) | |
location = Root::FileLocation.tl_deserialize(io) | |
w = Int32.tl_deserialize(io) | |
h = Int32.tl_deserialize(io) | |
size = Int32.tl_deserialize(io) | |
video_start_ts = (flags & 1) != 0 ? Float64.tl_deserialize(io) : nil | |
new(type: type, location: location, w: w, h: h, size: size, video_start_ts: video_start_ts) | |
end | |
end | |
class WallPaper < IWallPaper | |
CONSTRUCTOR_ID = 0xA437C3ED | |
property id : Int64 | |
property access_hash : Int64 | |
property slug : String | |
property document : Root::IDocument | |
property creator : Bool | |
property default : Bool | |
property pattern : Bool | |
property dark : Bool | |
property settings : Root::IWallPaperSettings? | |
def initialize(@id : Int64, @access_hash : Int64, @slug : String, @document : Root::IDocument, @creator : Bool = nil, @default : Bool = nil, @pattern : Bool = nil, @dark : Bool = nil, @settings : Root::IWallPaperSettings? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
(0_u32 | @creator ? 1 : 0 | @default ? 2 : 0 | @pattern ? 8 : 0 | @dark ? 16 : 0 | @settings ? 4 : 0).tl_serialize(io) | |
if creator = @creator | |
creator.tl_serialize(io) | |
end | |
if default = @default | |
default.tl_serialize(io) | |
end | |
if pattern = @pattern | |
pattern.tl_serialize(io) | |
end | |
if dark = @dark | |
dark.tl_serialize(io) | |
end | |
@access_hash.tl_serialize(io) | |
@slug.tl_serialize(io) | |
@document.tl_serialize(io) | |
if settings = @settings | |
settings.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
flags = UInt32.tl_deserialize(io) | |
creator = (flags & 1) != 0 | |
default = (flags & 2) != 0 | |
pattern = (flags & 8) != 0 | |
dark = (flags & 16) != 0 | |
access_hash = Int64.tl_deserialize(io) | |
slug = String.tl_deserialize(io) | |
document = Root::Document.tl_deserialize(io) | |
settings = (flags & 4) != 0 ? Root::WallPaperSettings.tl_deserialize(io) : nil | |
new(id: id, creator: creator, default: default, pattern: pattern, dark: dark, access_hash: access_hash, slug: slug, document: document, settings: settings) | |
end | |
end | |
class WallPaperNoFile < IWallPaper | |
CONSTRUCTOR_ID = 0x8AF40B25 | |
property default : Bool | |
property dark : Bool | |
property settings : Root::IWallPaperSettings? | |
def initialize(@default : Bool = nil, @dark : Bool = nil, @settings : Root::IWallPaperSettings? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @default ? 2 : 0 | @dark ? 16 : 0 | @settings ? 4 : 0).tl_serialize(io) | |
if default = @default | |
default.tl_serialize(io) | |
end | |
if dark = @dark | |
dark.tl_serialize(io) | |
end | |
if settings = @settings | |
settings.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
default = (flags & 2) != 0 | |
dark = (flags & 16) != 0 | |
settings = (flags & 4) != 0 ? Root::WallPaperSettings.tl_deserialize(io) : nil | |
new(default: default, dark: dark, settings: settings) | |
end | |
end | |
class WallPaperSettings < IWallPaperSettings | |
CONSTRUCTOR_ID = 0x05086CF8 | |
property blur : Bool | |
property motion : Bool | |
property background_color : Int32? | |
property second_background_color : Int32? | |
property intensity : Int32? | |
property rotation : Int32? | |
def initialize(@blur : Bool = nil, @motion : Bool = nil, @background_color : Int32? = nil, @second_background_color : Int32? = nil, @intensity : Int32? = nil, @rotation : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @blur ? 2 : 0 | @motion ? 4 : 0 | @background_color ? 1 : 0 | @second_background_color ? 16 : 0 | @intensity ? 8 : 0 | @rotation ? 16 : 0).tl_serialize(io) | |
if blur = @blur | |
blur.tl_serialize(io) | |
end | |
if motion = @motion | |
motion.tl_serialize(io) | |
end | |
if background_color = @background_color | |
background_color.tl_serialize(io) | |
end | |
if second_background_color = @second_background_color | |
second_background_color.tl_serialize(io) | |
end | |
if intensity = @intensity | |
intensity.tl_serialize(io) | |
end | |
if rotation = @rotation | |
rotation.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
blur = (flags & 2) != 0 | |
motion = (flags & 4) != 0 | |
background_color = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
second_background_color = (flags & 16) != 0 ? Int32.tl_deserialize(io) : nil | |
intensity = (flags & 8) != 0 ? Int32.tl_deserialize(io) : nil | |
rotation = (flags & 16) != 0 ? Int32.tl_deserialize(io) : nil | |
new(blur: blur, motion: motion, background_color: background_color, second_background_color: second_background_color, intensity: intensity, rotation: rotation) | |
end | |
end | |
class WebAuthorization < IWebAuthorization | |
CONSTRUCTOR_ID = 0xCAC943F2 | |
property hash : Int64 | |
property bot_id : Int32 | |
property domain : String | |
property browser : String | |
property platform : String | |
property date_created : Int32 | |
property date_active : Int32 | |
property ip : String | |
property region : String | |
def initialize(@hash : Int64, @bot_id : Int32, @domain : String, @browser : String, @platform : String, @date_created : Int32, @date_active : Int32, @ip : String, @region : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@hash.tl_serialize(io) | |
@bot_id.tl_serialize(io) | |
@domain.tl_serialize(io) | |
@browser.tl_serialize(io) | |
@platform.tl_serialize(io) | |
@date_created.tl_serialize(io) | |
@date_active.tl_serialize(io) | |
@ip.tl_serialize(io) | |
@region.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
hash = Int64.tl_deserialize(io) | |
bot_id = Int32.tl_deserialize(io) | |
domain = String.tl_deserialize(io) | |
browser = String.tl_deserialize(io) | |
platform = String.tl_deserialize(io) | |
date_created = Int32.tl_deserialize(io) | |
date_active = Int32.tl_deserialize(io) | |
ip = String.tl_deserialize(io) | |
region = String.tl_deserialize(io) | |
new(hash: hash, bot_id: bot_id, domain: domain, browser: browser, platform: platform, date_created: date_created, date_active: date_active, ip: ip, region: region) | |
end | |
end | |
class WebDocument < IWebDocument | |
CONSTRUCTOR_ID = 0x1C570ED1 | |
property url : String | |
property access_hash : Int64 | |
property size : Int32 | |
property mime_type : String | |
property attributes : Array(Root::IDocumentAttribute) | |
def initialize(@url : String, @access_hash : Int64, @size : Int32, @mime_type : String, @attributes : Array(Root::IDocumentAttribute)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@url.tl_serialize(io) | |
@access_hash.tl_serialize(io) | |
@size.tl_serialize(io) | |
@mime_type.tl_serialize(io) | |
@attributes.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
url = String.tl_deserialize(io) | |
access_hash = Int64.tl_deserialize(io) | |
size = Int32.tl_deserialize(io) | |
mime_type = String.tl_deserialize(io) | |
attributes = Array(Root::DocumentAttribute).tl_deserialize(io) | |
new(url: url, access_hash: access_hash, size: size, mime_type: mime_type, attributes: attributes) | |
end | |
end | |
class WebDocumentNoProxy < IWebDocument | |
CONSTRUCTOR_ID = 0xF9C8BCC6 | |
property url : String | |
property size : Int32 | |
property mime_type : String | |
property attributes : Array(Root::IDocumentAttribute) | |
def initialize(@url : String, @size : Int32, @mime_type : String, @attributes : Array(Root::IDocumentAttribute)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@url.tl_serialize(io) | |
@size.tl_serialize(io) | |
@mime_type.tl_serialize(io) | |
@attributes.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
url = String.tl_deserialize(io) | |
size = Int32.tl_deserialize(io) | |
mime_type = String.tl_deserialize(io) | |
attributes = Array(Root::DocumentAttribute).tl_deserialize(io) | |
new(url: url, size: size, mime_type: mime_type, attributes: attributes) | |
end | |
end | |
class WebPage < IWebPage | |
CONSTRUCTOR_ID = 0xE89C45B2 | |
property id : Int64 | |
property url : String | |
property display_url : String | |
property hash : Int32 | |
property cached_page : Root::IPage? | |
property document : Root::IDocument? | |
property author : String? | |
property duration : Int32? | |
property embed_height : Int32? | |
property embed_width : Int32? | |
property embed_type : String? | |
property embed_url : String? | |
property photo : Root::IPhoto? | |
property description : String? | |
property title : String? | |
property site_name : String? | |
property type : String? | |
property attributes : Array(Root::IWebPageAttribute)? | |
def initialize(@id : Int64, @url : String, @display_url : String, @hash : Int32, @cached_page : Root::IPage? = nil, @document : Root::IDocument? = nil, @author : String? = nil, @duration : Int32? = nil, @embed_height : Int32? = nil, @embed_width : Int32? = nil, @embed_type : String? = nil, @embed_url : String? = nil, @photo : Root::IPhoto? = nil, @description : String? = nil, @title : String? = nil, @site_name : String? = nil, @type : String? = nil, @attributes : Array(Root::IWebPageAttribute)? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @type ? 1 : 0 | @site_name ? 2 : 0 | @title ? 4 : 0 | @description ? 8 : 0 | @photo ? 16 : 0 | @embed_url ? 32 : 0 | @embed_type ? 32 : 0 | @embed_width ? 64 : 0 | @embed_height ? 64 : 0 | @duration ? 128 : 0 | @author ? 256 : 0 | @document ? 512 : 0 | @cached_page ? 1024 : 0 | @attributes ? 4096 : 0).tl_serialize(io) | |
@id.tl_serialize(io) | |
@url.tl_serialize(io) | |
@display_url.tl_serialize(io) | |
@hash.tl_serialize(io) | |
if type = @type | |
type.tl_serialize(io) | |
end | |
if site_name = @site_name | |
site_name.tl_serialize(io) | |
end | |
if title = @title | |
title.tl_serialize(io) | |
end | |
if description = @description | |
description.tl_serialize(io) | |
end | |
if photo = @photo | |
photo.tl_serialize(io) | |
end | |
if embed_url = @embed_url | |
embed_url.tl_serialize(io) | |
end | |
if embed_type = @embed_type | |
embed_type.tl_serialize(io) | |
end | |
if embed_width = @embed_width | |
embed_width.tl_serialize(io) | |
end | |
if embed_height = @embed_height | |
embed_height.tl_serialize(io) | |
end | |
if duration = @duration | |
duration.tl_serialize(io) | |
end | |
if author = @author | |
author.tl_serialize(io) | |
end | |
if document = @document | |
document.tl_serialize(io) | |
end | |
if cached_page = @cached_page | |
cached_page.tl_serialize(io) | |
end | |
if attributes = @attributes | |
attributes.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
id = Int64.tl_deserialize(io) | |
url = String.tl_deserialize(io) | |
display_url = String.tl_deserialize(io) | |
hash = Int32.tl_deserialize(io) | |
type = (flags & 1) != 0 ? String.tl_deserialize(io) : nil | |
site_name = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
title = (flags & 4) != 0 ? String.tl_deserialize(io) : nil | |
description = (flags & 8) != 0 ? String.tl_deserialize(io) : nil | |
photo = (flags & 16) != 0 ? Root::Photo.tl_deserialize(io) : nil | |
embed_url = (flags & 32) != 0 ? String.tl_deserialize(io) : nil | |
embed_type = (flags & 32) != 0 ? String.tl_deserialize(io) : nil | |
embed_width = (flags & 64) != 0 ? Int32.tl_deserialize(io) : nil | |
embed_height = (flags & 64) != 0 ? Int32.tl_deserialize(io) : nil | |
duration = (flags & 128) != 0 ? Int32.tl_deserialize(io) : nil | |
author = (flags & 256) != 0 ? String.tl_deserialize(io) : nil | |
document = (flags & 512) != 0 ? Root::Document.tl_deserialize(io) : nil | |
cached_page = (flags & 1024) != 0 ? Root::Page.tl_deserialize(io) : nil | |
attributes = (flags & 4096) != 0 ? Array(Root::WebPageAttribute).tl_deserialize(io) : nil | |
new(id: id, url: url, display_url: display_url, hash: hash, type: type, site_name: site_name, title: title, description: description, photo: photo, embed_url: embed_url, embed_type: embed_type, embed_width: embed_width, embed_height: embed_height, duration: duration, author: author, document: document, cached_page: cached_page, attributes: attributes) | |
end | |
end | |
class WebPageAttributeTheme < IWebPageAttribute | |
CONSTRUCTOR_ID = 0x54B56617 | |
property documents : Array(Root::IDocument)? | |
property settings : Root::IThemeSettings? | |
def initialize(@documents : Array(Root::IDocument)? = nil, @settings : Root::IThemeSettings? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @documents ? 1 : 0 | @settings ? 2 : 0).tl_serialize(io) | |
if documents = @documents | |
documents.tl_serialize(io) | |
end | |
if settings = @settings | |
settings.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
documents = (flags & 1) != 0 ? Array(Root::Document).tl_deserialize(io) : nil | |
settings = (flags & 2) != 0 ? Root::ThemeSettings.tl_deserialize(io) : nil | |
new(documents: documents, settings: settings) | |
end | |
end | |
class WebPageEmpty < IWebPage | |
CONSTRUCTOR_ID = 0xEB1477E8 | |
property id : Int64 | |
def initialize(@id : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
new(id: id) | |
end | |
end | |
class WebPageNotModified < IWebPage | |
CONSTRUCTOR_ID = 0x7311CA11 | |
property cached_page_views : Int32? | |
def initialize(@cached_page_views : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @cached_page_views ? 1 : 0).tl_serialize(io) | |
if cached_page_views = @cached_page_views | |
cached_page_views.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
cached_page_views = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
new(cached_page_views: cached_page_views) | |
end | |
end | |
class WebPagePending < IWebPage | |
CONSTRUCTOR_ID = 0xC586DA1C | |
property id : Int64 | |
property date : Int32 | |
def initialize(@id : Int64, @date : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@date.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
new(id: id, date: date) | |
end | |
end | |
end | |
module Channels | |
abstract class IAdminLogResults < TLObject; end | |
abstract class IChannelParticipant < TLObject; end | |
abstract class IChannelParticipants < TLObject; end | |
abstract class IChannelParticipantsNotModified < TLObject; end | |
class AdminLogResults < IAdminLogResults | |
CONSTRUCTOR_ID = 0xED8AF74D | |
property events : Array(Root::IChannelAdminLogEvent) | |
property chats : Array(Root::IChat) | |
property users : Array(Root::IUser) | |
def initialize(@events : Array(Root::IChannelAdminLogEvent), @chats : Array(Root::IChat), @users : Array(Root::IUser)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@events.tl_serialize(io) | |
@chats.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
events = Array(Root::ChannelAdminLogEvent).tl_deserialize(io) | |
chats = Array(Root::Chat).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(events: events, chats: chats, users: users) | |
end | |
end | |
class ChannelParticipant < IChannelParticipant | |
CONSTRUCTOR_ID = 0xD0D9B163 | |
property participant : Root::IChannelParticipant | |
property users : Array(Root::IUser) | |
def initialize(@participant : Root::IChannelParticipant, @users : Array(Root::IUser)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@participant.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
participant = Root::ChannelParticipant.tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(participant: participant, users: users) | |
end | |
end | |
class ChannelParticipants < IChannelParticipants | |
CONSTRUCTOR_ID = 0xF56EE2A8 | |
property count : Int32 | |
property participants : Array(Root::IChannelParticipant) | |
property users : Array(Root::IUser) | |
def initialize(@count : Int32, @participants : Array(Root::IChannelParticipant), @users : Array(Root::IUser)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@count.tl_serialize(io) | |
@participants.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
count = Int32.tl_deserialize(io) | |
participants = Array(Root::ChannelParticipant).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(count: count, participants: participants, users: users) | |
end | |
end | |
class ChannelParticipantsNotModified < IChannelParticipants | |
CONSTRUCTOR_ID = 0xF0173FE9 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
end | |
module Messages | |
abstract class IAffectedHistory < TLObject; end | |
abstract class IAffectedMessages < TLObject; end | |
abstract class IAllStickers < TLObject; end | |
abstract class IAllStickersNotModified < TLObject; end | |
abstract class IArchivedStickers < TLObject; end | |
abstract class IBotCallbackAnswer < TLObject; end | |
abstract class IBotResults < TLObject; end | |
abstract class IChannelMessages < TLObject; end | |
abstract class IChatFull < TLObject; end | |
abstract class IChats < TLObject; end | |
abstract class IChatsSlice < TLObject; end | |
abstract class IDhConfig < TLObject; end | |
abstract class IDhConfigNotModified < TLObject; end | |
abstract class IDialogs < TLObject; end | |
abstract class IDialogsNotModified < TLObject; end | |
abstract class IDialogsSlice < TLObject; end | |
abstract class IDiscussionMessage < TLObject; end | |
abstract class IFavedStickers < TLObject; end | |
abstract class IFavedStickersNotModified < TLObject; end | |
abstract class IFeaturedStickers < TLObject; end | |
abstract class IFeaturedStickersNotModified < TLObject; end | |
abstract class IFoundStickerSets < TLObject; end | |
abstract class IFoundStickerSetsNotModified < TLObject; end | |
abstract class IHighScores < TLObject; end | |
abstract class IInactiveChats < TLObject; end | |
abstract class IMessageEditData < TLObject; end | |
abstract class IMessageViews < TLObject; end | |
abstract class IMessages < TLObject; end | |
abstract class IMessagesNotModified < TLObject; end | |
abstract class IMessagesSlice < TLObject; end | |
abstract class IPeerDialogs < TLObject; end | |
abstract class IRecentStickers < TLObject; end | |
abstract class IRecentStickersNotModified < TLObject; end | |
abstract class ISavedGifs < TLObject; end | |
abstract class ISavedGifsNotModified < TLObject; end | |
abstract class ISearchCounter < TLObject; end | |
abstract class ISentEncryptedFile < TLObject; end | |
abstract class ISentEncryptedMessage < TLObject; end | |
abstract class IStickerSet < TLObject; end | |
abstract class IStickerSetInstallResult < TLObject; end | |
abstract class IStickerSetInstallResultArchive < TLObject; end | |
abstract class IStickerSetInstallResultSuccess < TLObject; end | |
abstract class IStickers < TLObject; end | |
abstract class IStickersNotModified < TLObject; end | |
abstract class IVotesList < TLObject; end | |
class AffectedHistory < IAffectedHistory | |
CONSTRUCTOR_ID = 0xB45C69D1 | |
property pts : Int32 | |
property pts_count : Int32 | |
property offset : Int32 | |
def initialize(@pts : Int32, @pts_count : Int32, @offset : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@pts.tl_serialize(io) | |
@pts_count.tl_serialize(io) | |
@offset.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
pts = Int32.tl_deserialize(io) | |
pts_count = Int32.tl_deserialize(io) | |
offset = Int32.tl_deserialize(io) | |
new(pts: pts, pts_count: pts_count, offset: offset) | |
end | |
end | |
class AffectedMessages < IAffectedMessages | |
CONSTRUCTOR_ID = 0x84D19185 | |
property pts : Int32 | |
property pts_count : Int32 | |
def initialize(@pts : Int32, @pts_count : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@pts.tl_serialize(io) | |
@pts_count.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
pts = Int32.tl_deserialize(io) | |
pts_count = Int32.tl_deserialize(io) | |
new(pts: pts, pts_count: pts_count) | |
end | |
end | |
class AllStickers < IAllStickers | |
CONSTRUCTOR_ID = 0xEDFD405F | |
property hash : Int32 | |
property sets : Array(Root::IStickerSet) | |
def initialize(@hash : Int32, @sets : Array(Root::IStickerSet)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@hash.tl_serialize(io) | |
@sets.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
hash = Int32.tl_deserialize(io) | |
sets = Array(Root::StickerSet).tl_deserialize(io) | |
new(hash: hash, sets: sets) | |
end | |
end | |
class AllStickersNotModified < IAllStickers | |
CONSTRUCTOR_ID = 0xE86602C3 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class ArchivedStickers < IArchivedStickers | |
CONSTRUCTOR_ID = 0x4FCBA9C8 | |
property count : Int32 | |
property sets : Array(Root::IStickerSetCovered) | |
def initialize(@count : Int32, @sets : Array(Root::IStickerSetCovered)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@count.tl_serialize(io) | |
@sets.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
count = Int32.tl_deserialize(io) | |
sets = Array(Root::StickerSetCovered).tl_deserialize(io) | |
new(count: count, sets: sets) | |
end | |
end | |
class BotCallbackAnswer < IBotCallbackAnswer | |
CONSTRUCTOR_ID = 0x36585EA4 | |
property cache_time : Int32 | |
property alert : Bool | |
property has_url : Bool | |
property native_ui : Bool | |
property message : String? | |
property url : String? | |
def initialize(@cache_time : Int32, @alert : Bool = nil, @has_url : Bool = nil, @native_ui : Bool = nil, @message : String? = nil, @url : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @alert ? 2 : 0 | @has_url ? 8 : 0 | @native_ui ? 16 : 0 | @message ? 1 : 0 | @url ? 4 : 0).tl_serialize(io) | |
if alert = @alert | |
alert.tl_serialize(io) | |
end | |
if has_url = @has_url | |
has_url.tl_serialize(io) | |
end | |
if native_ui = @native_ui | |
native_ui.tl_serialize(io) | |
end | |
if message = @message | |
message.tl_serialize(io) | |
end | |
if url = @url | |
url.tl_serialize(io) | |
end | |
@cache_time.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
alert = (flags & 2) != 0 | |
has_url = (flags & 8) != 0 | |
native_ui = (flags & 16) != 0 | |
message = (flags & 1) != 0 ? String.tl_deserialize(io) : nil | |
url = (flags & 4) != 0 ? String.tl_deserialize(io) : nil | |
cache_time = Int32.tl_deserialize(io) | |
new(alert: alert, has_url: has_url, native_ui: native_ui, message: message, url: url, cache_time: cache_time) | |
end | |
end | |
class BotResults < IBotResults | |
CONSTRUCTOR_ID = 0x947CA848 | |
property query_id : Int64 | |
property results : Array(Root::IBotInlineResult) | |
property cache_time : Int32 | |
property users : Array(Root::IUser) | |
property gallery : Bool | |
property next_offset : String? | |
property switch_pm : Root::IInlineBotSwitchPm? | |
def initialize(@query_id : Int64, @results : Array(Root::IBotInlineResult), @cache_time : Int32, @users : Array(Root::IUser), @gallery : Bool = nil, @next_offset : String? = nil, @switch_pm : Root::IInlineBotSwitchPm? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @gallery ? 1 : 0 | @next_offset ? 2 : 0 | @switch_pm ? 4 : 0).tl_serialize(io) | |
if gallery = @gallery | |
gallery.tl_serialize(io) | |
end | |
@query_id.tl_serialize(io) | |
if next_offset = @next_offset | |
next_offset.tl_serialize(io) | |
end | |
if switch_pm = @switch_pm | |
switch_pm.tl_serialize(io) | |
end | |
@results.tl_serialize(io) | |
@cache_time.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
gallery = (flags & 1) != 0 | |
query_id = Int64.tl_deserialize(io) | |
next_offset = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
switch_pm = (flags & 4) != 0 ? Root::InlineBotSwitchPm.tl_deserialize(io) : nil | |
results = Array(Root::BotInlineResult).tl_deserialize(io) | |
cache_time = Int32.tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(gallery: gallery, query_id: query_id, next_offset: next_offset, switch_pm: switch_pm, results: results, cache_time: cache_time, users: users) | |
end | |
end | |
class ChannelMessages < IMessages | |
CONSTRUCTOR_ID = 0x64479808 | |
property pts : Int32 | |
property count : Int32 | |
property messages : Array(Root::IMessage) | |
property chats : Array(Root::IChat) | |
property users : Array(Root::IUser) | |
property inexact : Bool | |
property offset_id_offset : Int32? | |
def initialize(@pts : Int32, @count : Int32, @messages : Array(Root::IMessage), @chats : Array(Root::IChat), @users : Array(Root::IUser), @inexact : Bool = nil, @offset_id_offset : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @inexact ? 2 : 0 | @offset_id_offset ? 4 : 0).tl_serialize(io) | |
if inexact = @inexact | |
inexact.tl_serialize(io) | |
end | |
@pts.tl_serialize(io) | |
@count.tl_serialize(io) | |
if offset_id_offset = @offset_id_offset | |
offset_id_offset.tl_serialize(io) | |
end | |
@messages.tl_serialize(io) | |
@chats.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
inexact = (flags & 2) != 0 | |
pts = Int32.tl_deserialize(io) | |
count = Int32.tl_deserialize(io) | |
offset_id_offset = (flags & 4) != 0 ? Int32.tl_deserialize(io) : nil | |
messages = Array(Root::Message).tl_deserialize(io) | |
chats = Array(Root::Chat).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(inexact: inexact, pts: pts, count: count, offset_id_offset: offset_id_offset, messages: messages, chats: chats, users: users) | |
end | |
end | |
class ChatFull < IChatFull | |
CONSTRUCTOR_ID = 0xE5D7D19C | |
property full_chat : Root::IChatFull | |
property chats : Array(Root::IChat) | |
property users : Array(Root::IUser) | |
def initialize(@full_chat : Root::IChatFull, @chats : Array(Root::IChat), @users : Array(Root::IUser)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@full_chat.tl_serialize(io) | |
@chats.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
full_chat = Root::ChatFull.tl_deserialize(io) | |
chats = Array(Root::Chat).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(full_chat: full_chat, chats: chats, users: users) | |
end | |
end | |
class Chats < IChats | |
CONSTRUCTOR_ID = 0x64FF9FD5 | |
property chats : Array(Root::IChat) | |
def initialize(@chats : Array(Root::IChat)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@chats.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
chats = Array(Root::Chat).tl_deserialize(io) | |
new(chats: chats) | |
end | |
end | |
class ChatsSlice < IChats | |
CONSTRUCTOR_ID = 0x9CD81144 | |
property count : Int32 | |
property chats : Array(Root::IChat) | |
def initialize(@count : Int32, @chats : Array(Root::IChat)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@count.tl_serialize(io) | |
@chats.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
count = Int32.tl_deserialize(io) | |
chats = Array(Root::Chat).tl_deserialize(io) | |
new(count: count, chats: chats) | |
end | |
end | |
class DhConfig < IDhConfig | |
CONSTRUCTOR_ID = 0x2C221EDD | |
property g : Int32 | |
property p : Bytes | |
property version : Int32 | |
property random : Bytes | |
def initialize(@g : Int32, @p : Bytes, @version : Int32, @random : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@g.tl_serialize(io) | |
@p.tl_serialize(io) | |
@version.tl_serialize(io) | |
@random.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
g = Int32.tl_deserialize(io) | |
p = Bytes.tl_deserialize(io) | |
version = Int32.tl_deserialize(io) | |
random = Bytes.tl_deserialize(io) | |
new(g: g, p: p, version: version, random: random) | |
end | |
end | |
class DhConfigNotModified < IDhConfig | |
CONSTRUCTOR_ID = 0xC0E24635 | |
property random : Bytes | |
def initialize(@random : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@random.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
random = Bytes.tl_deserialize(io) | |
new(random: random) | |
end | |
end | |
class Dialogs < IDialogs | |
CONSTRUCTOR_ID = 0x15BA6C40 | |
property dialogs : Array(Root::IDialog) | |
property messages : Array(Root::IMessage) | |
property chats : Array(Root::IChat) | |
property users : Array(Root::IUser) | |
def initialize(@dialogs : Array(Root::IDialog), @messages : Array(Root::IMessage), @chats : Array(Root::IChat), @users : Array(Root::IUser)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@dialogs.tl_serialize(io) | |
@messages.tl_serialize(io) | |
@chats.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
dialogs = Array(Root::Dialog).tl_deserialize(io) | |
messages = Array(Root::Message).tl_deserialize(io) | |
chats = Array(Root::Chat).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(dialogs: dialogs, messages: messages, chats: chats, users: users) | |
end | |
end | |
class DialogsNotModified < IDialogs | |
CONSTRUCTOR_ID = 0xF0E3E596 | |
property count : Int32 | |
def initialize(@count : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@count.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
count = Int32.tl_deserialize(io) | |
new(count: count) | |
end | |
end | |
class DialogsSlice < IDialogs | |
CONSTRUCTOR_ID = 0x71E094F3 | |
property count : Int32 | |
property dialogs : Array(Root::IDialog) | |
property messages : Array(Root::IMessage) | |
property chats : Array(Root::IChat) | |
property users : Array(Root::IUser) | |
def initialize(@count : Int32, @dialogs : Array(Root::IDialog), @messages : Array(Root::IMessage), @chats : Array(Root::IChat), @users : Array(Root::IUser)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@count.tl_serialize(io) | |
@dialogs.tl_serialize(io) | |
@messages.tl_serialize(io) | |
@chats.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
count = Int32.tl_deserialize(io) | |
dialogs = Array(Root::Dialog).tl_deserialize(io) | |
messages = Array(Root::Message).tl_deserialize(io) | |
chats = Array(Root::Chat).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(count: count, dialogs: dialogs, messages: messages, chats: chats, users: users) | |
end | |
end | |
class DiscussionMessage < IDiscussionMessage | |
CONSTRUCTOR_ID = 0xF5DD8F9D | |
property messages : Array(Root::IMessage) | |
property chats : Array(Root::IChat) | |
property users : Array(Root::IUser) | |
property max_id : Int32? | |
property read_inbox_max_id : Int32? | |
property read_outbox_max_id : Int32? | |
def initialize(@messages : Array(Root::IMessage), @chats : Array(Root::IChat), @users : Array(Root::IUser), @max_id : Int32? = nil, @read_inbox_max_id : Int32? = nil, @read_outbox_max_id : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @max_id ? 1 : 0 | @read_inbox_max_id ? 2 : 0 | @read_outbox_max_id ? 4 : 0).tl_serialize(io) | |
@messages.tl_serialize(io) | |
if max_id = @max_id | |
max_id.tl_serialize(io) | |
end | |
if read_inbox_max_id = @read_inbox_max_id | |
read_inbox_max_id.tl_serialize(io) | |
end | |
if read_outbox_max_id = @read_outbox_max_id | |
read_outbox_max_id.tl_serialize(io) | |
end | |
@chats.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
messages = Array(Root::Message).tl_deserialize(io) | |
max_id = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
read_inbox_max_id = (flags & 2) != 0 ? Int32.tl_deserialize(io) : nil | |
read_outbox_max_id = (flags & 4) != 0 ? Int32.tl_deserialize(io) : nil | |
chats = Array(Root::Chat).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(messages: messages, max_id: max_id, read_inbox_max_id: read_inbox_max_id, read_outbox_max_id: read_outbox_max_id, chats: chats, users: users) | |
end | |
end | |
class FavedStickers < IFavedStickers | |
CONSTRUCTOR_ID = 0xF37F2F16 | |
property hash : Int32 | |
property packs : Array(Root::IStickerPack) | |
property stickers : Array(Root::IDocument) | |
def initialize(@hash : Int32, @packs : Array(Root::IStickerPack), @stickers : Array(Root::IDocument)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@hash.tl_serialize(io) | |
@packs.tl_serialize(io) | |
@stickers.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
hash = Int32.tl_deserialize(io) | |
packs = Array(Root::StickerPack).tl_deserialize(io) | |
stickers = Array(Root::Document).tl_deserialize(io) | |
new(hash: hash, packs: packs, stickers: stickers) | |
end | |
end | |
class FavedStickersNotModified < IFavedStickers | |
CONSTRUCTOR_ID = 0x9E8FA6D3 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class FeaturedStickers < IFeaturedStickers | |
CONSTRUCTOR_ID = 0xB6ABC341 | |
property hash : Int32 | |
property count : Int32 | |
property sets : Array(Root::IStickerSetCovered) | |
property unread : Array(Int64) | |
def initialize(@hash : Int32, @count : Int32, @sets : Array(Root::IStickerSetCovered), @unread : Array(Int64)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@hash.tl_serialize(io) | |
@count.tl_serialize(io) | |
@sets.tl_serialize(io) | |
@unread.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
hash = Int32.tl_deserialize(io) | |
count = Int32.tl_deserialize(io) | |
sets = Array(Root::StickerSetCovered).tl_deserialize(io) | |
unread = Array(Int64).tl_deserialize(io) | |
new(hash: hash, count: count, sets: sets, unread: unread) | |
end | |
end | |
class FeaturedStickersNotModified < IFeaturedStickers | |
CONSTRUCTOR_ID = 0xC6DC0C66 | |
property count : Int32 | |
def initialize(@count : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@count.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
count = Int32.tl_deserialize(io) | |
new(count: count) | |
end | |
end | |
class FoundStickerSets < IFoundStickerSets | |
CONSTRUCTOR_ID = 0x5108D648 | |
property hash : Int32 | |
property sets : Array(Root::IStickerSetCovered) | |
def initialize(@hash : Int32, @sets : Array(Root::IStickerSetCovered)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@hash.tl_serialize(io) | |
@sets.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
hash = Int32.tl_deserialize(io) | |
sets = Array(Root::StickerSetCovered).tl_deserialize(io) | |
new(hash: hash, sets: sets) | |
end | |
end | |
class FoundStickerSetsNotModified < IFoundStickerSets | |
CONSTRUCTOR_ID = 0x0D54B65D | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class HighScores < IHighScores | |
CONSTRUCTOR_ID = 0x9A3BFD99 | |
property scores : Array(Root::IHighScore) | |
property users : Array(Root::IUser) | |
def initialize(@scores : Array(Root::IHighScore), @users : Array(Root::IUser)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@scores.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
scores = Array(Root::HighScore).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(scores: scores, users: users) | |
end | |
end | |
class InactiveChats < IInactiveChats | |
CONSTRUCTOR_ID = 0xA927FEC5 | |
property dates : Array(Int32) | |
property chats : Array(Root::IChat) | |
property users : Array(Root::IUser) | |
def initialize(@dates : Array(Int32), @chats : Array(Root::IChat), @users : Array(Root::IUser)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@dates.tl_serialize(io) | |
@chats.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
dates = Array(Int32).tl_deserialize(io) | |
chats = Array(Root::Chat).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(dates: dates, chats: chats, users: users) | |
end | |
end | |
class MessageEditData < IMessageEditData | |
CONSTRUCTOR_ID = 0x26B5DDE6 | |
property caption : Bool | |
def initialize(@caption : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @caption ? 1 : 0).tl_serialize(io) | |
if caption = @caption | |
caption.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
caption = (flags & 1) != 0 | |
new(caption: caption) | |
end | |
end | |
class MessageViews < IMessageViews | |
CONSTRUCTOR_ID = 0xB6C4F543 | |
property views : Array(Root::IMessageViews) | |
property chats : Array(Root::IChat) | |
property users : Array(Root::IUser) | |
def initialize(@views : Array(Root::IMessageViews), @chats : Array(Root::IChat), @users : Array(Root::IUser)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@views.tl_serialize(io) | |
@chats.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
views = Array(Root::MessageViews).tl_deserialize(io) | |
chats = Array(Root::Chat).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(views: views, chats: chats, users: users) | |
end | |
end | |
class Messages < IMessages | |
CONSTRUCTOR_ID = 0x8C718E87 | |
property messages : Array(Root::IMessage) | |
property chats : Array(Root::IChat) | |
property users : Array(Root::IUser) | |
def initialize(@messages : Array(Root::IMessage), @chats : Array(Root::IChat), @users : Array(Root::IUser)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@messages.tl_serialize(io) | |
@chats.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
messages = Array(Root::Message).tl_deserialize(io) | |
chats = Array(Root::Chat).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(messages: messages, chats: chats, users: users) | |
end | |
end | |
class MessagesNotModified < IMessages | |
CONSTRUCTOR_ID = 0x74535F21 | |
property count : Int32 | |
def initialize(@count : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@count.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
count = Int32.tl_deserialize(io) | |
new(count: count) | |
end | |
end | |
class MessagesSlice < IMessages | |
CONSTRUCTOR_ID = 0x3A54685E | |
property count : Int32 | |
property messages : Array(Root::IMessage) | |
property chats : Array(Root::IChat) | |
property users : Array(Root::IUser) | |
property inexact : Bool | |
property next_rate : Int32? | |
property offset_id_offset : Int32? | |
def initialize(@count : Int32, @messages : Array(Root::IMessage), @chats : Array(Root::IChat), @users : Array(Root::IUser), @inexact : Bool = nil, @next_rate : Int32? = nil, @offset_id_offset : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @inexact ? 2 : 0 | @next_rate ? 1 : 0 | @offset_id_offset ? 4 : 0).tl_serialize(io) | |
if inexact = @inexact | |
inexact.tl_serialize(io) | |
end | |
@count.tl_serialize(io) | |
if next_rate = @next_rate | |
next_rate.tl_serialize(io) | |
end | |
if offset_id_offset = @offset_id_offset | |
offset_id_offset.tl_serialize(io) | |
end | |
@messages.tl_serialize(io) | |
@chats.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
inexact = (flags & 2) != 0 | |
count = Int32.tl_deserialize(io) | |
next_rate = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
offset_id_offset = (flags & 4) != 0 ? Int32.tl_deserialize(io) : nil | |
messages = Array(Root::Message).tl_deserialize(io) | |
chats = Array(Root::Chat).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(inexact: inexact, count: count, next_rate: next_rate, offset_id_offset: offset_id_offset, messages: messages, chats: chats, users: users) | |
end | |
end | |
class PeerDialogs < IPeerDialogs | |
CONSTRUCTOR_ID = 0x3371C354 | |
property dialogs : Array(Root::IDialog) | |
property messages : Array(Root::IMessage) | |
property chats : Array(Root::IChat) | |
property users : Array(Root::IUser) | |
property state : Updates::IState | |
def initialize(@dialogs : Array(Root::IDialog), @messages : Array(Root::IMessage), @chats : Array(Root::IChat), @users : Array(Root::IUser), @state : Updates::IState) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@dialogs.tl_serialize(io) | |
@messages.tl_serialize(io) | |
@chats.tl_serialize(io) | |
@users.tl_serialize(io) | |
@state.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
dialogs = Array(Root::Dialog).tl_deserialize(io) | |
messages = Array(Root::Message).tl_deserialize(io) | |
chats = Array(Root::Chat).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
state = Updates::State.tl_deserialize(io) | |
new(dialogs: dialogs, messages: messages, chats: chats, users: users, state: state) | |
end | |
end | |
class RecentStickers < IRecentStickers | |
CONSTRUCTOR_ID = 0x22F3AFB3 | |
property hash : Int32 | |
property packs : Array(Root::IStickerPack) | |
property stickers : Array(Root::IDocument) | |
property dates : Array(Int32) | |
def initialize(@hash : Int32, @packs : Array(Root::IStickerPack), @stickers : Array(Root::IDocument), @dates : Array(Int32)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@hash.tl_serialize(io) | |
@packs.tl_serialize(io) | |
@stickers.tl_serialize(io) | |
@dates.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
hash = Int32.tl_deserialize(io) | |
packs = Array(Root::StickerPack).tl_deserialize(io) | |
stickers = Array(Root::Document).tl_deserialize(io) | |
dates = Array(Int32).tl_deserialize(io) | |
new(hash: hash, packs: packs, stickers: stickers, dates: dates) | |
end | |
end | |
class RecentStickersNotModified < IRecentStickers | |
CONSTRUCTOR_ID = 0x0B17F890 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SavedGifs < ISavedGifs | |
CONSTRUCTOR_ID = 0x2E0709A5 | |
property hash : Int32 | |
property gifs : Array(Root::IDocument) | |
def initialize(@hash : Int32, @gifs : Array(Root::IDocument)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@hash.tl_serialize(io) | |
@gifs.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
hash = Int32.tl_deserialize(io) | |
gifs = Array(Root::Document).tl_deserialize(io) | |
new(hash: hash, gifs: gifs) | |
end | |
end | |
class SavedGifsNotModified < ISavedGifs | |
CONSTRUCTOR_ID = 0xE8025CA2 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class SearchCounter < ISearchCounter | |
CONSTRUCTOR_ID = 0xE844EBFF | |
property filter : Root::IMessagesFilter | |
property count : Int32 | |
property inexact : Bool | |
def initialize(@filter : Root::IMessagesFilter, @count : Int32, @inexact : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @inexact ? 2 : 0).tl_serialize(io) | |
if inexact = @inexact | |
inexact.tl_serialize(io) | |
end | |
@filter.tl_serialize(io) | |
@count.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
inexact = (flags & 2) != 0 | |
filter = Root::MessagesFilter.tl_deserialize(io) | |
count = Int32.tl_deserialize(io) | |
new(inexact: inexact, filter: filter, count: count) | |
end | |
end | |
class SentEncryptedFile < ISentEncryptedMessage | |
CONSTRUCTOR_ID = 0x9493FF32 | |
property date : Int32 | |
property file : Root::IEncryptedFile | |
def initialize(@date : Int32, @file : Root::IEncryptedFile) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@date.tl_serialize(io) | |
@file.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
date = Int32.tl_deserialize(io) | |
file = Root::EncryptedFile.tl_deserialize(io) | |
new(date: date, file: file) | |
end | |
end | |
class SentEncryptedMessage < ISentEncryptedMessage | |
CONSTRUCTOR_ID = 0x560F8935 | |
property date : Int32 | |
def initialize(@date : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@date.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
date = Int32.tl_deserialize(io) | |
new(date: date) | |
end | |
end | |
class StickerSet < IStickerSet | |
CONSTRUCTOR_ID = 0xB60A24A6 | |
property set : Root::IStickerSet | |
property packs : Array(Root::IStickerPack) | |
property documents : Array(Root::IDocument) | |
def initialize(@set : Root::IStickerSet, @packs : Array(Root::IStickerPack), @documents : Array(Root::IDocument)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@set.tl_serialize(io) | |
@packs.tl_serialize(io) | |
@documents.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
set = Root::StickerSet.tl_deserialize(io) | |
packs = Array(Root::StickerPack).tl_deserialize(io) | |
documents = Array(Root::Document).tl_deserialize(io) | |
new(set: set, packs: packs, documents: documents) | |
end | |
end | |
class StickerSetInstallResultArchive < IStickerSetInstallResult | |
CONSTRUCTOR_ID = 0x35E410A8 | |
property sets : Array(Root::IStickerSetCovered) | |
def initialize(@sets : Array(Root::IStickerSetCovered)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@sets.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
sets = Array(Root::StickerSetCovered).tl_deserialize(io) | |
new(sets: sets) | |
end | |
end | |
class StickerSetInstallResultSuccess < IStickerSetInstallResult | |
CONSTRUCTOR_ID = 0x38641628 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class Stickers < IStickers | |
CONSTRUCTOR_ID = 0xE4599BBD | |
property hash : Int32 | |
property stickers : Array(Root::IDocument) | |
def initialize(@hash : Int32, @stickers : Array(Root::IDocument)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@hash.tl_serialize(io) | |
@stickers.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
hash = Int32.tl_deserialize(io) | |
stickers = Array(Root::Document).tl_deserialize(io) | |
new(hash: hash, stickers: stickers) | |
end | |
end | |
class StickersNotModified < IStickers | |
CONSTRUCTOR_ID = 0xF1749A22 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class VotesList < IVotesList | |
CONSTRUCTOR_ID = 0x0823F649 | |
property count : Int32 | |
property votes : Array(Root::IMessageUserVote) | |
property users : Array(Root::IUser) | |
property next_offset : String? | |
def initialize(@count : Int32, @votes : Array(Root::IMessageUserVote), @users : Array(Root::IUser), @next_offset : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @next_offset ? 1 : 0).tl_serialize(io) | |
@count.tl_serialize(io) | |
@votes.tl_serialize(io) | |
@users.tl_serialize(io) | |
if next_offset = @next_offset | |
next_offset.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
count = Int32.tl_deserialize(io) | |
votes = Array(Root::MessageUserVote).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
next_offset = (flags & 1) != 0 ? String.tl_deserialize(io) : nil | |
new(count: count, votes: votes, users: users, next_offset: next_offset) | |
end | |
end | |
end | |
module Help | |
abstract class IAppUpdate < TLObject; end | |
abstract class IConfigSimple < TLObject; end | |
abstract class ICountriesList < TLObject; end | |
abstract class ICountriesListNotModified < TLObject; end | |
abstract class ICountry < TLObject; end | |
abstract class ICountryCode < TLObject; end | |
abstract class IDeepLinkInfo < TLObject; end | |
abstract class IDeepLinkInfoEmpty < TLObject; end | |
abstract class IInviteText < TLObject; end | |
abstract class INoAppUpdate < TLObject; end | |
abstract class IPassportConfig < TLObject; end | |
abstract class IPassportConfigNotModified < TLObject; end | |
abstract class IPromoData < TLObject; end | |
abstract class IPromoDataEmpty < TLObject; end | |
abstract class IRecentMeUrls < TLObject; end | |
abstract class ISupport < TLObject; end | |
abstract class ISupportName < TLObject; end | |
abstract class ITermsOfService < TLObject; end | |
abstract class ITermsOfServiceUpdate < TLObject; end | |
abstract class ITermsOfServiceUpdateEmpty < TLObject; end | |
abstract class IUserInfo < TLObject; end | |
abstract class IUserInfoEmpty < TLObject; end | |
class AppUpdate < IAppUpdate | |
CONSTRUCTOR_ID = 0x1DA7158F | |
property id : Int32 | |
property version : String | |
property text : String | |
property entities : Array(Root::IMessageEntity) | |
property can_not_skip : Bool | |
property document : Root::IDocument? | |
property url : String? | |
def initialize(@id : Int32, @version : String, @text : String, @entities : Array(Root::IMessageEntity), @can_not_skip : Bool = nil, @document : Root::IDocument? = nil, @url : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @can_not_skip ? 1 : 0 | @document ? 2 : 0 | @url ? 4 : 0).tl_serialize(io) | |
if can_not_skip = @can_not_skip | |
can_not_skip.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@version.tl_serialize(io) | |
@text.tl_serialize(io) | |
@entities.tl_serialize(io) | |
if document = @document | |
document.tl_serialize(io) | |
end | |
if url = @url | |
url.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
can_not_skip = (flags & 1) != 0 | |
id = Int32.tl_deserialize(io) | |
version = String.tl_deserialize(io) | |
text = String.tl_deserialize(io) | |
entities = Array(Root::MessageEntity).tl_deserialize(io) | |
document = (flags & 2) != 0 ? Root::Document.tl_deserialize(io) : nil | |
url = (flags & 4) != 0 ? String.tl_deserialize(io) : nil | |
new(can_not_skip: can_not_skip, id: id, version: version, text: text, entities: entities, document: document, url: url) | |
end | |
end | |
class ConfigSimple < IConfigSimple | |
CONSTRUCTOR_ID = 0x5A592A6C | |
property date : Int32 | |
property expires : Int32 | |
property rules : Array(Root::IAccessPointRule) | |
def initialize(@date : Int32, @expires : Int32, @rules : Array(Root::IAccessPointRule)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@date.tl_serialize(io) | |
@expires.tl_serialize(io) | |
@rules.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
date = Int32.tl_deserialize(io) | |
expires = Int32.tl_deserialize(io) | |
rules = Array(Root::AccessPointRule).tl_deserialize(io) | |
new(date: date, expires: expires, rules: rules) | |
end | |
end | |
class CountriesList < ICountriesList | |
CONSTRUCTOR_ID = 0x87D0759E | |
property countries : Array(Help::ICountry) | |
property hash : Int32 | |
def initialize(@countries : Array(Help::ICountry), @hash : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@countries.tl_serialize(io) | |
@hash.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
countries = Array(Help::Country).tl_deserialize(io) | |
hash = Int32.tl_deserialize(io) | |
new(countries: countries, hash: hash) | |
end | |
end | |
class CountriesListNotModified < ICountriesList | |
CONSTRUCTOR_ID = 0x93CC1F32 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class Country < ICountry | |
CONSTRUCTOR_ID = 0xC3878E23 | |
property iso2 : String | |
property default_name : String | |
property country_codes : Array(Help::ICountryCode) | |
property hidden : Bool | |
property name : String? | |
def initialize(@iso2 : String, @default_name : String, @country_codes : Array(Help::ICountryCode), @hidden : Bool = nil, @name : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @hidden ? 1 : 0 | @name ? 2 : 0).tl_serialize(io) | |
if hidden = @hidden | |
hidden.tl_serialize(io) | |
end | |
@iso2.tl_serialize(io) | |
@default_name.tl_serialize(io) | |
if name = @name | |
name.tl_serialize(io) | |
end | |
@country_codes.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
hidden = (flags & 1) != 0 | |
iso2 = String.tl_deserialize(io) | |
default_name = String.tl_deserialize(io) | |
name = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
country_codes = Array(Help::CountryCode).tl_deserialize(io) | |
new(hidden: hidden, iso2: iso2, default_name: default_name, name: name, country_codes: country_codes) | |
end | |
end | |
class CountryCode < ICountryCode | |
CONSTRUCTOR_ID = 0x4203C5EF | |
property country_code : String | |
property prefixes : Array(String)? | |
property patterns : Array(String)? | |
def initialize(@country_code : String, @prefixes : Array(String)? = nil, @patterns : Array(String)? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @prefixes ? 1 : 0 | @patterns ? 2 : 0).tl_serialize(io) | |
@country_code.tl_serialize(io) | |
if prefixes = @prefixes | |
prefixes.tl_serialize(io) | |
end | |
if patterns = @patterns | |
patterns.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
country_code = String.tl_deserialize(io) | |
prefixes = (flags & 1) != 0 ? Array(String).tl_deserialize(io) : nil | |
patterns = (flags & 2) != 0 ? Array(String).tl_deserialize(io) : nil | |
new(country_code: country_code, prefixes: prefixes, patterns: patterns) | |
end | |
end | |
class DeepLinkInfo < IDeepLinkInfo | |
CONSTRUCTOR_ID = 0x6A4EE832 | |
property message : String | |
property update_app : Bool | |
property entities : Array(Root::IMessageEntity)? | |
def initialize(@message : String, @update_app : Bool = nil, @entities : Array(Root::IMessageEntity)? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @update_app ? 1 : 0 | @entities ? 2 : 0).tl_serialize(io) | |
if update_app = @update_app | |
update_app.tl_serialize(io) | |
end | |
@message.tl_serialize(io) | |
if entities = @entities | |
entities.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
update_app = (flags & 1) != 0 | |
message = String.tl_deserialize(io) | |
entities = (flags & 2) != 0 ? Array(Root::MessageEntity).tl_deserialize(io) : nil | |
new(update_app: update_app, message: message, entities: entities) | |
end | |
end | |
class DeepLinkInfoEmpty < IDeepLinkInfo | |
CONSTRUCTOR_ID = 0x66AFA166 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class InviteText < IInviteText | |
CONSTRUCTOR_ID = 0x18CB9F78 | |
property message : String | |
def initialize(@message : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@message.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
message = String.tl_deserialize(io) | |
new(message: message) | |
end | |
end | |
class NoAppUpdate < IAppUpdate | |
CONSTRUCTOR_ID = 0xC45A6536 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PassportConfig < IPassportConfig | |
CONSTRUCTOR_ID = 0xA098D6AF | |
property hash : Int32 | |
property countries_langs : Root::IDataJson | |
def initialize(@hash : Int32, @countries_langs : Root::IDataJson) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@hash.tl_serialize(io) | |
@countries_langs.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
hash = Int32.tl_deserialize(io) | |
countries_langs = Root::DataJson.tl_deserialize(io) | |
new(hash: hash, countries_langs: countries_langs) | |
end | |
end | |
class PassportConfigNotModified < IPassportConfig | |
CONSTRUCTOR_ID = 0xBFB9F457 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class PromoData < IPromoData | |
CONSTRUCTOR_ID = 0x8C39793F | |
property expires : Int32 | |
property peer : Root::IPeer | |
property chats : Array(Root::IChat) | |
property users : Array(Root::IUser) | |
property proxy : Bool | |
property psa_type : String? | |
property psa_message : String? | |
def initialize(@expires : Int32, @peer : Root::IPeer, @chats : Array(Root::IChat), @users : Array(Root::IUser), @proxy : Bool = nil, @psa_type : String? = nil, @psa_message : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @proxy ? 1 : 0 | @psa_type ? 2 : 0 | @psa_message ? 4 : 0).tl_serialize(io) | |
if proxy = @proxy | |
proxy.tl_serialize(io) | |
end | |
@expires.tl_serialize(io) | |
@peer.tl_serialize(io) | |
@chats.tl_serialize(io) | |
@users.tl_serialize(io) | |
if psa_type = @psa_type | |
psa_type.tl_serialize(io) | |
end | |
if psa_message = @psa_message | |
psa_message.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
proxy = (flags & 1) != 0 | |
expires = Int32.tl_deserialize(io) | |
peer = Root::Peer.tl_deserialize(io) | |
chats = Array(Root::Chat).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
psa_type = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
psa_message = (flags & 4) != 0 ? String.tl_deserialize(io) : nil | |
new(proxy: proxy, expires: expires, peer: peer, chats: chats, users: users, psa_type: psa_type, psa_message: psa_message) | |
end | |
end | |
class PromoDataEmpty < IPromoData | |
CONSTRUCTOR_ID = 0x98F6AC75 | |
property expires : Int32 | |
def initialize(@expires : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@expires.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
expires = Int32.tl_deserialize(io) | |
new(expires: expires) | |
end | |
end | |
class RecentMeUrls < IRecentMeUrls | |
CONSTRUCTOR_ID = 0x0E0310D7 | |
property urls : Array(Root::IRecentMeUrl) | |
property chats : Array(Root::IChat) | |
property users : Array(Root::IUser) | |
def initialize(@urls : Array(Root::IRecentMeUrl), @chats : Array(Root::IChat), @users : Array(Root::IUser)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@urls.tl_serialize(io) | |
@chats.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
urls = Array(Root::RecentMeUrl).tl_deserialize(io) | |
chats = Array(Root::Chat).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(urls: urls, chats: chats, users: users) | |
end | |
end | |
class Support < ISupport | |
CONSTRUCTOR_ID = 0x17C6B5F6 | |
property phone_number : String | |
property user : Root::IUser | |
def initialize(@phone_number : String, @user : Root::IUser) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@phone_number.tl_serialize(io) | |
@user.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
phone_number = String.tl_deserialize(io) | |
user = Root::User.tl_deserialize(io) | |
new(phone_number: phone_number, user: user) | |
end | |
end | |
class SupportName < ISupportName | |
CONSTRUCTOR_ID = 0x8C05F1C9 | |
property name : String | |
def initialize(@name : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@name.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
name = String.tl_deserialize(io) | |
new(name: name) | |
end | |
end | |
class TermsOfService < ITermsOfService | |
CONSTRUCTOR_ID = 0x780A0310 | |
property id : Root::IDataJson | |
property text : String | |
property entities : Array(Root::IMessageEntity) | |
property popup : Bool | |
property min_age_confirm : Int32? | |
def initialize(@id : Root::IDataJson, @text : String, @entities : Array(Root::IMessageEntity), @popup : Bool = nil, @min_age_confirm : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @popup ? 1 : 0 | @min_age_confirm ? 2 : 0).tl_serialize(io) | |
if popup = @popup | |
popup.tl_serialize(io) | |
end | |
@id.tl_serialize(io) | |
@text.tl_serialize(io) | |
@entities.tl_serialize(io) | |
if min_age_confirm = @min_age_confirm | |
min_age_confirm.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
popup = (flags & 1) != 0 | |
id = Root::DataJson.tl_deserialize(io) | |
text = String.tl_deserialize(io) | |
entities = Array(Root::MessageEntity).tl_deserialize(io) | |
min_age_confirm = (flags & 2) != 0 ? Int32.tl_deserialize(io) : nil | |
new(popup: popup, id: id, text: text, entities: entities, min_age_confirm: min_age_confirm) | |
end | |
end | |
class TermsOfServiceUpdate < ITermsOfServiceUpdate | |
CONSTRUCTOR_ID = 0x28ECF961 | |
property expires : Int32 | |
property terms_of_service : Help::ITermsOfService | |
def initialize(@expires : Int32, @terms_of_service : Help::ITermsOfService) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@expires.tl_serialize(io) | |
@terms_of_service.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
expires = Int32.tl_deserialize(io) | |
terms_of_service = Help::TermsOfService.tl_deserialize(io) | |
new(expires: expires, terms_of_service: terms_of_service) | |
end | |
end | |
class TermsOfServiceUpdateEmpty < ITermsOfServiceUpdate | |
CONSTRUCTOR_ID = 0xE3309F7F | |
property expires : Int32 | |
def initialize(@expires : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@expires.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
expires = Int32.tl_deserialize(io) | |
new(expires: expires) | |
end | |
end | |
class UserInfo < IUserInfo | |
CONSTRUCTOR_ID = 0x01EB3758 | |
property message : String | |
property entities : Array(Root::IMessageEntity) | |
property author : String | |
property date : Int32 | |
def initialize(@message : String, @entities : Array(Root::IMessageEntity), @author : String, @date : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@message.tl_serialize(io) | |
@entities.tl_serialize(io) | |
@author.tl_serialize(io) | |
@date.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
message = String.tl_deserialize(io) | |
entities = Array(Root::MessageEntity).tl_deserialize(io) | |
author = String.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
new(message: message, entities: entities, author: author, date: date) | |
end | |
end | |
class UserInfoEmpty < IUserInfo | |
CONSTRUCTOR_ID = 0xF3AE2EED | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
end | |
module Auth | |
abstract class IAuthorization < TLObject; end | |
abstract class IAuthorizationSignUpRequired < TLObject; end | |
abstract class ICodeType < TLObject; end | |
abstract class ICodeTypeCall < TLObject; end | |
abstract class ICodeTypeFlashCall < TLObject; end | |
abstract class ICodeTypeSms < TLObject; end | |
abstract class IExportedAuthorization < TLObject; end | |
abstract class ILoginToken < TLObject; end | |
abstract class ILoginTokenMigrateTo < TLObject; end | |
abstract class ILoginTokenSuccess < TLObject; end | |
abstract class IPasswordRecovery < TLObject; end | |
abstract class ISentCode < TLObject; end | |
abstract class ISentCodeType < TLObject; end | |
abstract class ISentCodeTypeApp < TLObject; end | |
abstract class ISentCodeTypeCall < TLObject; end | |
abstract class ISentCodeTypeFlashCall < TLObject; end | |
abstract class ISentCodeTypeSms < TLObject; end | |
class Authorization < IAuthorization | |
CONSTRUCTOR_ID = 0xCD050916 | |
property user : Root::IUser | |
property tmp_sessions : Int32? | |
def initialize(@user : Root::IUser, @tmp_sessions : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @tmp_sessions ? 1 : 0).tl_serialize(io) | |
if tmp_sessions = @tmp_sessions | |
tmp_sessions.tl_serialize(io) | |
end | |
@user.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
tmp_sessions = (flags & 1) != 0 ? Int32.tl_deserialize(io) : nil | |
user = Root::User.tl_deserialize(io) | |
new(tmp_sessions: tmp_sessions, user: user) | |
end | |
end | |
class AuthorizationSignUpRequired < IAuthorization | |
CONSTRUCTOR_ID = 0x44747E9A | |
property terms_of_service : Help::ITermsOfService? | |
def initialize(@terms_of_service : Help::ITermsOfService? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @terms_of_service ? 1 : 0).tl_serialize(io) | |
if terms_of_service = @terms_of_service | |
terms_of_service.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
terms_of_service = (flags & 1) != 0 ? Help::TermsOfService.tl_deserialize(io) : nil | |
new(terms_of_service: terms_of_service) | |
end | |
end | |
class CodeTypeCall < ICodeType | |
CONSTRUCTOR_ID = 0x741CD3E3 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class CodeTypeFlashCall < ICodeType | |
CONSTRUCTOR_ID = 0x226CCEFB | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class CodeTypeSms < ICodeType | |
CONSTRUCTOR_ID = 0x72A3158C | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class ExportedAuthorization < IExportedAuthorization | |
CONSTRUCTOR_ID = 0xDF969C2D | |
property id : Int32 | |
property bytes : Bytes | |
def initialize(@id : Int32, @bytes : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
@bytes.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int32.tl_deserialize(io) | |
bytes = Bytes.tl_deserialize(io) | |
new(id: id, bytes: bytes) | |
end | |
end | |
class LoginToken < ILoginToken | |
CONSTRUCTOR_ID = 0x629F1980 | |
property expires : Int32 | |
property token : Bytes | |
def initialize(@expires : Int32, @token : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@expires.tl_serialize(io) | |
@token.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
expires = Int32.tl_deserialize(io) | |
token = Bytes.tl_deserialize(io) | |
new(expires: expires, token: token) | |
end | |
end | |
class LoginTokenMigrateTo < ILoginToken | |
CONSTRUCTOR_ID = 0x068E9916 | |
property dc_id : Int32 | |
property token : Bytes | |
def initialize(@dc_id : Int32, @token : Bytes) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@dc_id.tl_serialize(io) | |
@token.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
dc_id = Int32.tl_deserialize(io) | |
token = Bytes.tl_deserialize(io) | |
new(dc_id: dc_id, token: token) | |
end | |
end | |
class LoginTokenSuccess < ILoginToken | |
CONSTRUCTOR_ID = 0x390D5C5E | |
property authorization : Auth::IAuthorization | |
def initialize(@authorization : Auth::IAuthorization) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@authorization.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
authorization = Auth::Authorization.tl_deserialize(io) | |
new(authorization: authorization) | |
end | |
end | |
class PasswordRecovery < IPasswordRecovery | |
CONSTRUCTOR_ID = 0x137948A5 | |
property email_pattern : String | |
def initialize(@email_pattern : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@email_pattern.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
email_pattern = String.tl_deserialize(io) | |
new(email_pattern: email_pattern) | |
end | |
end | |
class SentCode < ISentCode | |
CONSTRUCTOR_ID = 0x5E002502 | |
property type : Auth::ISentCodeType | |
property phone_code_hash : String | |
property next_type : Auth::ICodeType? | |
property timeout : Int32? | |
def initialize(@type : Auth::ISentCodeType, @phone_code_hash : String, @next_type : Auth::ICodeType? = nil, @timeout : Int32? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @next_type ? 2 : 0 | @timeout ? 4 : 0).tl_serialize(io) | |
@type.tl_serialize(io) | |
@phone_code_hash.tl_serialize(io) | |
if next_type = @next_type | |
next_type.tl_serialize(io) | |
end | |
if timeout = @timeout | |
timeout.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
type = Auth::SentCodeType.tl_deserialize(io) | |
phone_code_hash = String.tl_deserialize(io) | |
next_type = (flags & 2) != 0 ? Auth::CodeType.tl_deserialize(io) : nil | |
timeout = (flags & 4) != 0 ? Int32.tl_deserialize(io) : nil | |
new(type: type, phone_code_hash: phone_code_hash, next_type: next_type, timeout: timeout) | |
end | |
end | |
class SentCodeTypeApp < ISentCodeType | |
CONSTRUCTOR_ID = 0x3DBB5986 | |
property length : Int32 | |
def initialize(@length : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@length.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
length = Int32.tl_deserialize(io) | |
new(length: length) | |
end | |
end | |
class SentCodeTypeCall < ISentCodeType | |
CONSTRUCTOR_ID = 0x5353E5A7 | |
property length : Int32 | |
def initialize(@length : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@length.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
length = Int32.tl_deserialize(io) | |
new(length: length) | |
end | |
end | |
class SentCodeTypeFlashCall < ISentCodeType | |
CONSTRUCTOR_ID = 0xAB03C6D9 | |
property pattern : String | |
def initialize(@pattern : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@pattern.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
pattern = String.tl_deserialize(io) | |
new(pattern: pattern) | |
end | |
end | |
class SentCodeTypeSms < ISentCodeType | |
CONSTRUCTOR_ID = 0xC000BBA2 | |
property length : Int32 | |
def initialize(@length : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@length.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
length = Int32.tl_deserialize(io) | |
new(length: length) | |
end | |
end | |
end | |
module Account | |
abstract class IAuthorizationForm < TLObject; end | |
abstract class IAuthorizations < TLObject; end | |
abstract class IAutoDownloadSettings < TLObject; end | |
abstract class IContentSettings < TLObject; end | |
abstract class IPassword < TLObject; end | |
abstract class IPasswordInputSettings < TLObject; end | |
abstract class IPasswordSettings < TLObject; end | |
abstract class IPrivacyRules < TLObject; end | |
abstract class ISentEmailCode < TLObject; end | |
abstract class ITakeout < TLObject; end | |
abstract class IThemes < TLObject; end | |
abstract class IThemesNotModified < TLObject; end | |
abstract class ITmpPassword < TLObject; end | |
abstract class IWallPapers < TLObject; end | |
abstract class IWallPapersNotModified < TLObject; end | |
abstract class IWebAuthorizations < TLObject; end | |
class AuthorizationForm < IAuthorizationForm | |
CONSTRUCTOR_ID = 0xAD2E1CD8 | |
property required_types : Array(Root::ISecureRequiredType) | |
property values : Array(Root::ISecureValue) | |
property errors : Array(Root::ISecureValueError) | |
property users : Array(Root::IUser) | |
property privacy_policy_url : String? | |
def initialize(@required_types : Array(Root::ISecureRequiredType), @values : Array(Root::ISecureValue), @errors : Array(Root::ISecureValueError), @users : Array(Root::IUser), @privacy_policy_url : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @privacy_policy_url ? 1 : 0).tl_serialize(io) | |
@required_types.tl_serialize(io) | |
@values.tl_serialize(io) | |
@errors.tl_serialize(io) | |
@users.tl_serialize(io) | |
if privacy_policy_url = @privacy_policy_url | |
privacy_policy_url.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
required_types = Array(Root::SecureRequiredType).tl_deserialize(io) | |
values = Array(Root::SecureValue).tl_deserialize(io) | |
errors = Array(Root::SecureValueError).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
privacy_policy_url = (flags & 1) != 0 ? String.tl_deserialize(io) : nil | |
new(required_types: required_types, values: values, errors: errors, users: users, privacy_policy_url: privacy_policy_url) | |
end | |
end | |
class Authorizations < IAuthorizations | |
CONSTRUCTOR_ID = 0x1250ABDE | |
property authorizations : Array(Root::IAuthorization) | |
def initialize(@authorizations : Array(Root::IAuthorization)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@authorizations.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
authorizations = Array(Root::Authorization).tl_deserialize(io) | |
new(authorizations: authorizations) | |
end | |
end | |
class AutoDownloadSettings < IAutoDownloadSettings | |
CONSTRUCTOR_ID = 0x63CACF26 | |
property low : Root::IAutoDownloadSettings | |
property medium : Root::IAutoDownloadSettings | |
property high : Root::IAutoDownloadSettings | |
def initialize(@low : Root::IAutoDownloadSettings, @medium : Root::IAutoDownloadSettings, @high : Root::IAutoDownloadSettings) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@low.tl_serialize(io) | |
@medium.tl_serialize(io) | |
@high.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
low = Root::AutoDownloadSettings.tl_deserialize(io) | |
medium = Root::AutoDownloadSettings.tl_deserialize(io) | |
high = Root::AutoDownloadSettings.tl_deserialize(io) | |
new(low: low, medium: medium, high: high) | |
end | |
end | |
class ContentSettings < IContentSettings | |
CONSTRUCTOR_ID = 0x57E28221 | |
property sensitive_enabled : Bool | |
property sensitive_can_change : Bool | |
def initialize(@sensitive_enabled : Bool = nil, @sensitive_can_change : Bool = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @sensitive_enabled ? 1 : 0 | @sensitive_can_change ? 2 : 0).tl_serialize(io) | |
if sensitive_enabled = @sensitive_enabled | |
sensitive_enabled.tl_serialize(io) | |
end | |
if sensitive_can_change = @sensitive_can_change | |
sensitive_can_change.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
sensitive_enabled = (flags & 1) != 0 | |
sensitive_can_change = (flags & 2) != 0 | |
new(sensitive_enabled: sensitive_enabled, sensitive_can_change: sensitive_can_change) | |
end | |
end | |
class Password < IPassword | |
CONSTRUCTOR_ID = 0xAD2641F8 | |
property new_algo : Root::IPasswordKdfAlgo | |
property new_secure_algo : Root::ISecurePasswordKdfAlgo | |
property secure_random : Bytes | |
property has_recovery : Bool | |
property has_secure_values : Bool | |
property has_password : Bool | |
property current_algo : Root::IPasswordKdfAlgo? | |
property srp_b : Bytes? | |
property srp_id : Int64? | |
property hint : String? | |
property email_unconfirmed_pattern : String? | |
def initialize(@new_algo : Root::IPasswordKdfAlgo, @new_secure_algo : Root::ISecurePasswordKdfAlgo, @secure_random : Bytes, @has_recovery : Bool = nil, @has_secure_values : Bool = nil, @has_password : Bool = nil, @current_algo : Root::IPasswordKdfAlgo? = nil, @srp_b : Bytes? = nil, @srp_id : Int64? = nil, @hint : String? = nil, @email_unconfirmed_pattern : String? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @has_recovery ? 1 : 0 | @has_secure_values ? 2 : 0 | @has_password ? 4 : 0 | @current_algo ? 4 : 0 | @srp_b ? 4 : 0 | @srp_id ? 4 : 0 | @hint ? 8 : 0 | @email_unconfirmed_pattern ? 16 : 0).tl_serialize(io) | |
if has_recovery = @has_recovery | |
has_recovery.tl_serialize(io) | |
end | |
if has_secure_values = @has_secure_values | |
has_secure_values.tl_serialize(io) | |
end | |
if has_password = @has_password | |
has_password.tl_serialize(io) | |
end | |
if current_algo = @current_algo | |
current_algo.tl_serialize(io) | |
end | |
if srp_b = @srp_b | |
srp_b.tl_serialize(io) | |
end | |
if srp_id = @srp_id | |
srp_id.tl_serialize(io) | |
end | |
if hint = @hint | |
hint.tl_serialize(io) | |
end | |
if email_unconfirmed_pattern = @email_unconfirmed_pattern | |
email_unconfirmed_pattern.tl_serialize(io) | |
end | |
@new_algo.tl_serialize(io) | |
@new_secure_algo.tl_serialize(io) | |
@secure_random.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
has_recovery = (flags & 1) != 0 | |
has_secure_values = (flags & 2) != 0 | |
has_password = (flags & 4) != 0 | |
current_algo = (flags & 4) != 0 ? Root::PasswordKdfAlgo.tl_deserialize(io) : nil | |
srp_b = (flags & 4) != 0 ? Bytes.tl_deserialize(io) : nil | |
srp_id = (flags & 4) != 0 ? Int64.tl_deserialize(io) : nil | |
hint = (flags & 8) != 0 ? String.tl_deserialize(io) : nil | |
email_unconfirmed_pattern = (flags & 16) != 0 ? String.tl_deserialize(io) : nil | |
new_algo = Root::PasswordKdfAlgo.tl_deserialize(io) | |
new_secure_algo = Root::SecurePasswordKdfAlgo.tl_deserialize(io) | |
secure_random = Bytes.tl_deserialize(io) | |
new(has_recovery: has_recovery, has_secure_values: has_secure_values, has_password: has_password, current_algo: current_algo, srp_b: srp_b, srp_id: srp_id, hint: hint, email_unconfirmed_pattern: email_unconfirmed_pattern, new_algo: new_algo, new_secure_algo: new_secure_algo, secure_random: secure_random) | |
end | |
end | |
class PasswordInputSettings < IPasswordInputSettings | |
CONSTRUCTOR_ID = 0xC23727C9 | |
property new_algo : Root::IPasswordKdfAlgo? | |
property new_password_hash : Bytes? | |
property hint : String? | |
property email : String? | |
property new_secure_settings : Root::ISecureSecretSettings? | |
def initialize(@new_algo : Root::IPasswordKdfAlgo? = nil, @new_password_hash : Bytes? = nil, @hint : String? = nil, @email : String? = nil, @new_secure_settings : Root::ISecureSecretSettings? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @new_algo ? 1 : 0 | @new_password_hash ? 1 : 0 | @hint ? 1 : 0 | @email ? 2 : 0 | @new_secure_settings ? 4 : 0).tl_serialize(io) | |
if new_algo = @new_algo | |
new_algo.tl_serialize(io) | |
end | |
if new_password_hash = @new_password_hash | |
new_password_hash.tl_serialize(io) | |
end | |
if hint = @hint | |
hint.tl_serialize(io) | |
end | |
if email = @email | |
email.tl_serialize(io) | |
end | |
if new_secure_settings = @new_secure_settings | |
new_secure_settings.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
new_algo = (flags & 1) != 0 ? Root::PasswordKdfAlgo.tl_deserialize(io) : nil | |
new_password_hash = (flags & 1) != 0 ? Bytes.tl_deserialize(io) : nil | |
hint = (flags & 1) != 0 ? String.tl_deserialize(io) : nil | |
email = (flags & 2) != 0 ? String.tl_deserialize(io) : nil | |
new_secure_settings = (flags & 4) != 0 ? Root::SecureSecretSettings.tl_deserialize(io) : nil | |
new(new_algo: new_algo, new_password_hash: new_password_hash, hint: hint, email: email, new_secure_settings: new_secure_settings) | |
end | |
end | |
class PasswordSettings < IPasswordSettings | |
CONSTRUCTOR_ID = 0x9A5C33E5 | |
property email : String? | |
property secure_settings : Root::ISecureSecretSettings? | |
def initialize(@email : String? = nil, @secure_settings : Root::ISecureSecretSettings? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @email ? 1 : 0 | @secure_settings ? 2 : 0).tl_serialize(io) | |
if email = @email | |
email.tl_serialize(io) | |
end | |
if secure_settings = @secure_settings | |
secure_settings.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
email = (flags & 1) != 0 ? String.tl_deserialize(io) : nil | |
secure_settings = (flags & 2) != 0 ? Root::SecureSecretSettings.tl_deserialize(io) : nil | |
new(email: email, secure_settings: secure_settings) | |
end | |
end | |
class PrivacyRules < IPrivacyRules | |
CONSTRUCTOR_ID = 0x50A04E45 | |
property rules : Array(Root::IPrivacyRule) | |
property chats : Array(Root::IChat) | |
property users : Array(Root::IUser) | |
def initialize(@rules : Array(Root::IPrivacyRule), @chats : Array(Root::IChat), @users : Array(Root::IUser)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@rules.tl_serialize(io) | |
@chats.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
rules = Array(Root::PrivacyRule).tl_deserialize(io) | |
chats = Array(Root::Chat).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(rules: rules, chats: chats, users: users) | |
end | |
end | |
class SentEmailCode < ISentEmailCode | |
CONSTRUCTOR_ID = 0x811F854F | |
property email_pattern : String | |
property length : Int32 | |
def initialize(@email_pattern : String, @length : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@email_pattern.tl_serialize(io) | |
@length.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
email_pattern = String.tl_deserialize(io) | |
length = Int32.tl_deserialize(io) | |
new(email_pattern: email_pattern, length: length) | |
end | |
end | |
class Takeout < ITakeout | |
CONSTRUCTOR_ID = 0x4DBA4501 | |
property id : Int64 | |
def initialize(@id : Int64) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@id.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
id = Int64.tl_deserialize(io) | |
new(id: id) | |
end | |
end | |
class Themes < IThemes | |
CONSTRUCTOR_ID = 0x7F676421 | |
property hash : Int32 | |
property themes : Array(Root::ITheme) | |
def initialize(@hash : Int32, @themes : Array(Root::ITheme)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@hash.tl_serialize(io) | |
@themes.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
hash = Int32.tl_deserialize(io) | |
themes = Array(Root::Theme).tl_deserialize(io) | |
new(hash: hash, themes: themes) | |
end | |
end | |
class ThemesNotModified < IThemes | |
CONSTRUCTOR_ID = 0xF41EB622 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class TmpPassword < ITmpPassword | |
CONSTRUCTOR_ID = 0xDB64FD34 | |
property tmp_password : Bytes | |
property valid_until : Int32 | |
def initialize(@tmp_password : Bytes, @valid_until : Int32) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@tmp_password.tl_serialize(io) | |
@valid_until.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
tmp_password = Bytes.tl_deserialize(io) | |
valid_until = Int32.tl_deserialize(io) | |
new(tmp_password: tmp_password, valid_until: valid_until) | |
end | |
end | |
class WallPapers < IWallPapers | |
CONSTRUCTOR_ID = 0x702B65A9 | |
property hash : Int32 | |
property wallpapers : Array(Root::IWallPaper) | |
def initialize(@hash : Int32, @wallpapers : Array(Root::IWallPaper)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@hash.tl_serialize(io) | |
@wallpapers.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
hash = Int32.tl_deserialize(io) | |
wallpapers = Array(Root::WallPaper).tl_deserialize(io) | |
new(hash: hash, wallpapers: wallpapers) | |
end | |
end | |
class WallPapersNotModified < IWallPapers | |
CONSTRUCTOR_ID = 0x1C199183 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class WebAuthorizations < IWebAuthorizations | |
CONSTRUCTOR_ID = 0xED56C9FC | |
property authorizations : Array(Root::IWebAuthorization) | |
property users : Array(Root::IUser) | |
def initialize(@authorizations : Array(Root::IWebAuthorization), @users : Array(Root::IUser)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@authorizations.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
authorizations = Array(Root::WebAuthorization).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(authorizations: authorizations, users: users) | |
end | |
end | |
end | |
module Payments | |
abstract class IBankCardData < TLObject; end | |
abstract class IPaymentForm < TLObject; end | |
abstract class IPaymentReceipt < TLObject; end | |
abstract class IPaymentResult < TLObject; end | |
abstract class IPaymentVerificationNeeded < TLObject; end | |
abstract class ISavedInfo < TLObject; end | |
abstract class IValidatedRequestedInfo < TLObject; end | |
class BankCardData < IBankCardData | |
CONSTRUCTOR_ID = 0x3E24E573 | |
property title : String | |
property open_urls : Array(Root::IBankCardOpenUrl) | |
def initialize(@title : String, @open_urls : Array(Root::IBankCardOpenUrl)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@title.tl_serialize(io) | |
@open_urls.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
title = String.tl_deserialize(io) | |
open_urls = Array(Root::BankCardOpenUrl).tl_deserialize(io) | |
new(title: title, open_urls: open_urls) | |
end | |
end | |
class PaymentForm < IPaymentForm | |
CONSTRUCTOR_ID = 0x3F56AEA3 | |
property bot_id : Int32 | |
property invoice : Root::IInvoice | |
property provider_id : Int32 | |
property url : String | |
property users : Array(Root::IUser) | |
property can_save_credentials : Bool | |
property password_missing : Bool | |
property native_provider : String? | |
property native_params : Root::IDataJson? | |
property saved_info : Root::IPaymentRequestedInfo? | |
property saved_credentials : Root::IPaymentSavedCredentials? | |
def initialize(@bot_id : Int32, @invoice : Root::IInvoice, @provider_id : Int32, @url : String, @users : Array(Root::IUser), @can_save_credentials : Bool = nil, @password_missing : Bool = nil, @native_provider : String? = nil, @native_params : Root::IDataJson? = nil, @saved_info : Root::IPaymentRequestedInfo? = nil, @saved_credentials : Root::IPaymentSavedCredentials? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @can_save_credentials ? 4 : 0 | @password_missing ? 8 : 0 | @native_provider ? 16 : 0 | @native_params ? 16 : 0 | @saved_info ? 1 : 0 | @saved_credentials ? 2 : 0).tl_serialize(io) | |
if can_save_credentials = @can_save_credentials | |
can_save_credentials.tl_serialize(io) | |
end | |
if password_missing = @password_missing | |
password_missing.tl_serialize(io) | |
end | |
@bot_id.tl_serialize(io) | |
@invoice.tl_serialize(io) | |
@provider_id.tl_serialize(io) | |
@url.tl_serialize(io) | |
if native_provider = @native_provider | |
native_provider.tl_serialize(io) | |
end | |
if native_params = @native_params | |
native_params.tl_serialize(io) | |
end | |
if saved_info = @saved_info | |
saved_info.tl_serialize(io) | |
end | |
if saved_credentials = @saved_credentials | |
saved_credentials.tl_serialize(io) | |
end | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
can_save_credentials = (flags & 4) != 0 | |
password_missing = (flags & 8) != 0 | |
bot_id = Int32.tl_deserialize(io) | |
invoice = Root::Invoice.tl_deserialize(io) | |
provider_id = Int32.tl_deserialize(io) | |
url = String.tl_deserialize(io) | |
native_provider = (flags & 16) != 0 ? String.tl_deserialize(io) : nil | |
native_params = (flags & 16) != 0 ? Root::DataJson.tl_deserialize(io) : nil | |
saved_info = (flags & 1) != 0 ? Root::PaymentRequestedInfo.tl_deserialize(io) : nil | |
saved_credentials = (flags & 2) != 0 ? Root::PaymentSavedCredentials.tl_deserialize(io) : nil | |
users = Array(Root::User).tl_deserialize(io) | |
new(can_save_credentials: can_save_credentials, password_missing: password_missing, bot_id: bot_id, invoice: invoice, provider_id: provider_id, url: url, native_provider: native_provider, native_params: native_params, saved_info: saved_info, saved_credentials: saved_credentials, users: users) | |
end | |
end | |
class PaymentReceipt < IPaymentReceipt | |
CONSTRUCTOR_ID = 0x500911E1 | |
property date : Int32 | |
property bot_id : Int32 | |
property invoice : Root::IInvoice | |
property provider_id : Int32 | |
property currency : String | |
property total_amount : Int64 | |
property credentials_title : String | |
property users : Array(Root::IUser) | |
property info : Root::IPaymentRequestedInfo? | |
property shipping : Root::IShippingOption? | |
def initialize(@date : Int32, @bot_id : Int32, @invoice : Root::IInvoice, @provider_id : Int32, @currency : String, @total_amount : Int64, @credentials_title : String, @users : Array(Root::IUser), @info : Root::IPaymentRequestedInfo? = nil, @shipping : Root::IShippingOption? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @info ? 1 : 0 | @shipping ? 2 : 0).tl_serialize(io) | |
@date.tl_serialize(io) | |
@bot_id.tl_serialize(io) | |
@invoice.tl_serialize(io) | |
@provider_id.tl_serialize(io) | |
if info = @info | |
info.tl_serialize(io) | |
end | |
if shipping = @shipping | |
shipping.tl_serialize(io) | |
end | |
@currency.tl_serialize(io) | |
@total_amount.tl_serialize(io) | |
@credentials_title.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
date = Int32.tl_deserialize(io) | |
bot_id = Int32.tl_deserialize(io) | |
invoice = Root::Invoice.tl_deserialize(io) | |
provider_id = Int32.tl_deserialize(io) | |
info = (flags & 1) != 0 ? Root::PaymentRequestedInfo.tl_deserialize(io) : nil | |
shipping = (flags & 2) != 0 ? Root::ShippingOption.tl_deserialize(io) : nil | |
currency = String.tl_deserialize(io) | |
total_amount = Int64.tl_deserialize(io) | |
credentials_title = String.tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(date: date, bot_id: bot_id, invoice: invoice, provider_id: provider_id, info: info, shipping: shipping, currency: currency, total_amount: total_amount, credentials_title: credentials_title, users: users) | |
end | |
end | |
class PaymentResult < IPaymentResult | |
CONSTRUCTOR_ID = 0x4E5F810D | |
property updates : Root::IUpdates | |
def initialize(@updates : Root::IUpdates) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@updates.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
updates = Root::Updates.tl_deserialize(io) | |
new(updates: updates) | |
end | |
end | |
class PaymentVerificationNeeded < IPaymentResult | |
CONSTRUCTOR_ID = 0xD8411139 | |
property url : String | |
def initialize(@url : String) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@url.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
url = String.tl_deserialize(io) | |
new(url: url) | |
end | |
end | |
class SavedInfo < ISavedInfo | |
CONSTRUCTOR_ID = 0xFB8FE43C | |
property has_saved_credentials : Bool | |
property saved_info : Root::IPaymentRequestedInfo? | |
def initialize(@has_saved_credentials : Bool = nil, @saved_info : Root::IPaymentRequestedInfo? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @has_saved_credentials ? 2 : 0 | @saved_info ? 1 : 0).tl_serialize(io) | |
if has_saved_credentials = @has_saved_credentials | |
has_saved_credentials.tl_serialize(io) | |
end | |
if saved_info = @saved_info | |
saved_info.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
has_saved_credentials = (flags & 2) != 0 | |
saved_info = (flags & 1) != 0 ? Root::PaymentRequestedInfo.tl_deserialize(io) : nil | |
new(has_saved_credentials: has_saved_credentials, saved_info: saved_info) | |
end | |
end | |
class ValidatedRequestedInfo < IValidatedRequestedInfo | |
CONSTRUCTOR_ID = 0xD1451883 | |
property id : String? | |
property shipping_options : Array(Root::IShippingOption)? | |
def initialize(@id : String? = nil, @shipping_options : Array(Root::IShippingOption)? = nil) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
(0_u32 | @id ? 1 : 0 | @shipping_options ? 2 : 0).tl_serialize(io) | |
if id = @id | |
id.tl_serialize(io) | |
end | |
if shipping_options = @shipping_options | |
shipping_options.tl_serialize(io) | |
end | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
flags = UInt32.tl_deserialize(io) | |
id = (flags & 1) != 0 ? String.tl_deserialize(io) : nil | |
shipping_options = (flags & 2) != 0 ? Array(Root::ShippingOption).tl_deserialize(io) : nil | |
new(id: id, shipping_options: shipping_options) | |
end | |
end | |
end | |
module Contacts | |
abstract class IBlocked < TLObject; end | |
abstract class IBlockedSlice < TLObject; end | |
abstract class IContacts < TLObject; end | |
abstract class IContactsNotModified < TLObject; end | |
abstract class IFound < TLObject; end | |
abstract class IImportedContacts < TLObject; end | |
abstract class IResolvedPeer < TLObject; end | |
abstract class ITopPeers < TLObject; end | |
abstract class ITopPeersDisabled < TLObject; end | |
abstract class ITopPeersNotModified < TLObject; end | |
class Blocked < IBlocked | |
CONSTRUCTOR_ID = 0x0ADE1591 | |
property blocked : Array(Root::IPeerBlocked) | |
property chats : Array(Root::IChat) | |
property users : Array(Root::IUser) | |
def initialize(@blocked : Array(Root::IPeerBlocked), @chats : Array(Root::IChat), @users : Array(Root::IUser)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@blocked.tl_serialize(io) | |
@chats.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
blocked = Array(Root::PeerBlocked).tl_deserialize(io) | |
chats = Array(Root::Chat).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(blocked: blocked, chats: chats, users: users) | |
end | |
end | |
class BlockedSlice < IBlocked | |
CONSTRUCTOR_ID = 0xE1664194 | |
property count : Int32 | |
property blocked : Array(Root::IPeerBlocked) | |
property chats : Array(Root::IChat) | |
property users : Array(Root::IUser) | |
def initialize(@count : Int32, @blocked : Array(Root::IPeerBlocked), @chats : Array(Root::IChat), @users : Array(Root::IUser)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@count.tl_serialize(io) | |
@blocked.tl_serialize(io) | |
@chats.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
count = Int32.tl_deserialize(io) | |
blocked = Array(Root::PeerBlocked).tl_deserialize(io) | |
chats = Array(Root::Chat).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(count: count, blocked: blocked, chats: chats, users: users) | |
end | |
end | |
class Contacts < IContacts | |
CONSTRUCTOR_ID = 0xEAE87E42 | |
property contacts : Array(Root::IContact) | |
property saved_count : Int32 | |
property users : Array(Root::IUser) | |
def initialize(@contacts : Array(Root::IContact), @saved_count : Int32, @users : Array(Root::IUser)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@contacts.tl_serialize(io) | |
@saved_count.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
contacts = Array(Root::Contact).tl_deserialize(io) | |
saved_count = Int32.tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(contacts: contacts, saved_count: saved_count, users: users) | |
end | |
end | |
class ContactsNotModified < IContacts | |
CONSTRUCTOR_ID = 0xB74BA9D2 | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
new() | |
end | |
end | |
class Found < IFound | |
CONSTRUCTOR_ID = 0xB3134D9D | |
property my_results : Array(Root::IPeer) | |
property results : Array(Root::IPeer) | |
property chats : Array(Root::IChat) | |
property users : Array(Root::IUser) | |
def initialize(@my_results : Array(Root::IPeer), @results : Array(Root::IPeer), @chats : Array(Root::IChat), @users : Array(Root::IUser)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@my_results.tl_serialize(io) | |
@results.tl_serialize(io) | |
@chats.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
my_results = Array(Root::Peer).tl_deserialize(io) | |
results = Array(Root::Peer).tl_deserialize(io) | |
chats = Array(Root::Chat).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(my_results: my_results, results: results, chats: chats, users: users) | |
end | |
end | |
class ImportedContacts < IImportedContacts | |
CONSTRUCTOR_ID = 0x77D01C3B | |
property imported : Array(Root::IImportedContact) | |
property popular_invites : Array(Root::IPopularContact) | |
property retry_contacts : Array(Int64) | |
property users : Array(Root::IUser) | |
def initialize(@imported : Array(Root::IImportedContact), @popular_invites : Array(Root::IPopularContact), @retry_contacts : Array(Int64), @users : Array(Root::IUser)) | |
end | |
def tl_serialize(io, boxed = false) | |
CONSTRUCTOR_ID.tl_serialize(io) if boxed | |
@imported.tl_serialize(io) | |
@popular_invites.tl_serialize(io) | |
@retry_contacts.tl_serialize(io) | |
@users.tl_serialize(io) | |
end | |
def self.tl_deserialize(io, boxed = false) | |
if boxed | |
constructor_id = UInt64.tl_deserialize(io) | |
raise "Invalid constructor_id" unless constructor_id == CONSTRUCTOR_ID | |
end | |
imported = Array(Root::ImportedContact).tl_deserialize(io) | |
popular_invites = Array(Root::PopularContact).tl_deserialize(io) | |
retry_contacts = Array(Int64).tl_deserialize(io) | |
users = Array(Root::User).tl_deserialize(io) | |
new(imported: imported, popular_invites: popular_invites, retry_contacts: retry_contacts, users: users) | |
end | |
end | |
class ResolvedPeer < IResolvedPeer | |
CONSTRUCTOR_ID = 0x7F077AD9 | |
property peer : Root::IPeer | |
property chats : Array(Root::IChat) | |
property users : Array(Root::IUser) | |
def initialize(@peer : Root::IPeer, @ch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment