diff --git a/submodules/TelegramApi/Sources/Api0.swift b/submodules/TelegramApi/Sources/Api0.swift index f31c43958b..bab13dafb5 100644 --- a/submodules/TelegramApi/Sources/Api0.swift +++ b/submodules/TelegramApi/Sources/Api0.swift @@ -11,8 +11,8 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-457104426] = { return Api.InputGeoPoint.parse_inputGeoPointEmpty($0) } dict[1210199983] = { return Api.InputGeoPoint.parse_inputGeoPoint($0) } dict[-784000893] = { return Api.payments.ValidatedRequestedInfo.parse_validatedRequestedInfo($0) } - dict[2055070967] = { return Api.ChatFull.parse_channelFull($0) } dict[-213431562] = { return Api.ChatFull.parse_chatFull($0) } + dict[2055070967] = { return Api.ChatFull.parse_channelFull($0) } dict[-1159937629] = { return Api.PollResults.parse_pollResults($0) } dict[-925415106] = { return Api.ChatParticipant.parse_chatParticipant($0) } dict[-636267638] = { return Api.ChatParticipant.parse_chatParticipantCreator($0) } @@ -21,6 +21,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[16030880] = { return Api.updates.Difference.parse_difference($0) } dict[-1459938943] = { return Api.updates.Difference.parse_differenceSlice($0) } dict[1258196845] = { return Api.updates.Difference.parse_differenceTooLong($0) } + dict[1200838592] = { return Api.SchemeMethod.parse_schemeMethod($0) } dict[1462101002] = { return Api.CdnConfig.parse_cdnConfig($0) } dict[324435594] = { return Api.PageBlock.parse_pageBlockUnsupported($0) } dict[1890305021] = { return Api.PageBlock.parse_pageBlockTitle($0) } @@ -33,20 +34,20 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[1216809369] = { return Api.PageBlock.parse_pageBlockFooter($0) } dict[-618614392] = { return Api.PageBlock.parse_pageBlockDivider($0) } dict[-837994576] = { return Api.PageBlock.parse_pageBlockAnchor($0) } + dict[-454524911] = { return Api.PageBlock.parse_pageBlockList($0) } dict[641563686] = { return Api.PageBlock.parse_pageBlockBlockquote($0) } dict[1329878739] = { return Api.PageBlock.parse_pageBlockPullquote($0) } - dict[972174080] = { return Api.PageBlock.parse_pageBlockCover($0) } - dict[-283684427] = { return Api.PageBlock.parse_pageBlockChannel($0) } - dict[504660880] = { return Api.PageBlock.parse_pageBlockKicker($0) } - dict[-1085412734] = { return Api.PageBlock.parse_pageBlockTable($0) } dict[391759200] = { return Api.PageBlock.parse_pageBlockPhoto($0) } dict[2089805750] = { return Api.PageBlock.parse_pageBlockVideo($0) } - dict[-2143067670] = { return Api.PageBlock.parse_pageBlockAudio($0) } + dict[972174080] = { return Api.PageBlock.parse_pageBlockCover($0) } dict[-1468953147] = { return Api.PageBlock.parse_pageBlockEmbed($0) } dict[-229005301] = { return Api.PageBlock.parse_pageBlockEmbedPost($0) } dict[1705048653] = { return Api.PageBlock.parse_pageBlockCollage($0) } dict[52401552] = { return Api.PageBlock.parse_pageBlockSlideshow($0) } - dict[-454524911] = { return Api.PageBlock.parse_pageBlockList($0) } + dict[-283684427] = { return Api.PageBlock.parse_pageBlockChannel($0) } + dict[-2143067670] = { return Api.PageBlock.parse_pageBlockAudio($0) } + dict[504660880] = { return Api.PageBlock.parse_pageBlockKicker($0) } + dict[-1085412734] = { return Api.PageBlock.parse_pageBlockTable($0) } dict[-1702174239] = { return Api.PageBlock.parse_pageBlockOrderedList($0) } dict[1987480557] = { return Api.PageBlock.parse_pageBlockDetails($0) } dict[370236054] = { return Api.PageBlock.parse_pageBlockRelatedArticles($0) } @@ -66,10 +67,10 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[590459437] = { return Api.Photo.parse_photoEmpty($0) } dict[-82216347] = { return Api.Photo.parse_photo($0) } dict[-1683826688] = { return Api.Chat.parse_chatEmpty($0) } - dict[120753115] = { return Api.Chat.parse_chatForbidden($0) } - dict[681420594] = { return Api.Chat.parse_channelForbidden($0) } dict[1004149726] = { return Api.Chat.parse_chat($0) } + dict[120753115] = { return Api.Chat.parse_chatForbidden($0) } dict[-753232354] = { return Api.Chat.parse_channel($0) } + dict[681420594] = { return Api.Chat.parse_channelForbidden($0) } dict[1202287072] = { return Api.StatsURL.parse_statsURL($0) } dict[1516793212] = { return Api.ChatInvite.parse_chatInviteAlready($0) } dict[-540871282] = { return Api.ChatInvite.parse_chatInvite($0) } @@ -109,13 +110,15 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-302941166] = { return Api.UserFull.parse_userFull($0) } dict[-292807034] = { return Api.InputChannel.parse_inputChannelEmpty($0) } dict[-1343524562] = { return Api.InputChannel.parse_inputChannel($0) } + dict[707290417] = { return Api.InputChannel.parse_inputChannelFromMessage($0) } dict[414687501] = { return Api.DcOption.parse_dcOption($0) } dict[997055186] = { return Api.PollAnswerVoters.parse_pollAnswerVoters($0) } dict[-1705233435] = { return Api.account.PasswordSettings.parse_passwordSettings($0) } + dict[-1945767479] = { return Api.help.SupportName.parse_supportName($0) } dict[-288727837] = { return Api.LangPackLanguage.parse_langPackLanguage($0) } dict[-399391402] = { return Api.VideoSize.parse_videoSize($0) } - dict[-1000708810] = { return Api.help.AppUpdate.parse_noAppUpdate($0) } dict[497489295] = { return Api.help.AppUpdate.parse_appUpdate($0) } + dict[-1000708810] = { return Api.help.AppUpdate.parse_noAppUpdate($0) } dict[-209337866] = { return Api.LangPackDifference.parse_langPackDifference($0) } dict[84438264] = { return Api.WallPaperSettings.parse_wallPaperSettings($0) } dict[-1519029347] = { return Api.EmojiURL.parse_emojiURL($0) } @@ -138,10 +141,12 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[1690108678] = { return Api.InputEncryptedFile.parse_inputEncryptedFileUploaded($0) } dict[1511503333] = { return Api.InputEncryptedFile.parse_inputEncryptedFile($0) } dict[767652808] = { return Api.InputEncryptedFile.parse_inputEncryptedFileBigUploaded($0) } + dict[1304052993] = { return Api.account.Takeout.parse_takeout($0) } dict[-1456996667] = { return Api.messages.InactiveChats.parse_inactiveChats($0) } - dict[1690708501] = { return Api.GroupCallParticipant.parse_groupCallParticipant($0) } + dict[2023913382] = { return Api.GroupCallParticipant.parse_groupCallParticipant($0) } dict[1443858741] = { return Api.messages.SentEncryptedMessage.parse_sentEncryptedMessage($0) } dict[-1802240206] = { return Api.messages.SentEncryptedMessage.parse_sentEncryptedFile($0) } + dict[289586518] = { return Api.SavedContact.parse_savedPhoneContact($0) } dict[1571494644] = { return Api.ExportedMessageLink.parse_exportedMessageLink($0) } dict[-855308010] = { return Api.auth.Authorization.parse_authorization($0) } dict[1148485274] = { return Api.auth.Authorization.parse_authorizationSignUpRequired($0) } @@ -150,6 +155,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-1649296275] = { return Api.Peer.parse_peerUser($0) } dict[-1160714821] = { return Api.Peer.parse_peerChat($0) } dict[-1109531342] = { return Api.Peer.parse_peerChannel($0) } + dict[410107472] = { return Api.messages.ExportedChatInvite.parse_exportedChatInvite($0) } dict[-1868808300] = { return Api.PaymentRequestedInfo.parse_paymentRequestedInfo($0) } dict[164646985] = { return Api.UserStatus.parse_userStatusEmpty($0) } dict[-306628279] = { return Api.UserStatus.parse_userStatusOnline($0) } @@ -203,12 +209,14 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-337352679] = { return Api.Update.parse_updateServiceNotification($0) } dict[-298113238] = { return Api.Update.parse_updatePrivacy($0) } dict[314130811] = { return Api.Update.parse_updateUserPhone($0) } + dict[-1667805217] = { return Api.Update.parse_updateReadHistoryInbox($0) } dict[791617983] = { return Api.Update.parse_updateReadHistoryOutbox($0) } dict[2139689491] = { return Api.Update.parse_updateWebPage($0) } dict[1757493555] = { return Api.Update.parse_updateReadMessagesContents($0) } dict[-352032773] = { return Api.Update.parse_updateChannelTooLong($0) } dict[-1227598250] = { return Api.Update.parse_updateChannel($0) } dict[1656358105] = { return Api.Update.parse_updateNewChannelMessage($0) } + dict[856380452] = { return Api.Update.parse_updateReadChannelInbox($0) } dict[-1015733815] = { return Api.Update.parse_updateDeleteChannelMessages($0) } dict[-1734268085] = { return Api.Update.parse_updateChannelMessageViews($0) } dict[-1232070311] = { return Api.Update.parse_updateChatParticipantAdmin($0) } @@ -216,6 +224,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[196268545] = { return Api.Update.parse_updateStickerSetsOrder($0) } dict[1135492588] = { return Api.Update.parse_updateStickerSets($0) } dict[-1821035490] = { return Api.Update.parse_updateSavedGifs($0) } + dict[1059076315] = { return Api.Update.parse_updateBotInlineQuery($0) } dict[239663460] = { return Api.Update.parse_updateBotInlineSend($0) } dict[457133559] = { return Api.Update.parse_updateEditChannelMessage($0) } dict[-415938591] = { return Api.Update.parse_updateBotCallbackQuery($0) } @@ -228,25 +237,23 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-1574314746] = { return Api.Update.parse_updateConfig($0) } dict[861169551] = { return Api.Update.parse_updatePtsChanged($0) } dict[1081547008] = { return Api.Update.parse_updateChannelWebPage($0) } + dict[1852826908] = { return Api.Update.parse_updateDialogPinned($0) } + dict[-99664734] = { return Api.Update.parse_updatePinnedDialogs($0) } dict[-2095595325] = { return Api.Update.parse_updateBotWebhookJSON($0) } dict[-1684914010] = { return Api.Update.parse_updateBotWebhookJSONQuery($0) } dict[-523384512] = { return Api.Update.parse_updateBotShippingQuery($0) } dict[1563376297] = { return Api.Update.parse_updateBotPrecheckoutQuery($0) } dict[-1425052898] = { return Api.Update.parse_updatePhoneCall($0) } + dict[1180041828] = { return Api.Update.parse_updateLangPackTooLong($0) } dict[1442983757] = { return Api.Update.parse_updateLangPack($0) } dict[-451831443] = { return Api.Update.parse_updateFavedStickers($0) } dict[-1987495099] = { return Api.Update.parse_updateChannelReadMessagesContents($0) } dict[1887741886] = { return Api.Update.parse_updateContactsReset($0) } dict[1893427255] = { return Api.Update.parse_updateChannelAvailableMessages($0) } dict[-513517117] = { return Api.Update.parse_updateDialogUnreadMark($0) } - dict[1180041828] = { return Api.Update.parse_updateLangPackTooLong($0) } dict[-1398708869] = { return Api.Update.parse_updateMessagePoll($0) } dict[1421875280] = { return Api.Update.parse_updateChatDefaultBannedRights($0) } dict[422972864] = { return Api.Update.parse_updateFolderPeers($0) } - dict[1852826908] = { return Api.Update.parse_updateDialogPinned($0) } - dict[-99664734] = { return Api.Update.parse_updatePinnedDialogs($0) } - dict[856380452] = { return Api.Update.parse_updateReadChannelInbox($0) } - dict[-1667805217] = { return Api.Update.parse_updateReadHistoryInbox($0) } dict[1786671974] = { return Api.Update.parse_updatePeerSettings($0) } dict[-1263546448] = { return Api.Update.parse_updatePeerLocated($0) } dict[967122427] = { return Api.Update.parse_updateNewScheduledMessage($0) } @@ -270,15 +277,14 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[321954198] = { return Api.Update.parse_updateChat($0) } dict[-219423922] = { return Api.Update.parse_updateGroupCallParticipants($0) } dict[-1537295973] = { return Api.Update.parse_updateGroupCall($0) } - dict[1059076315] = { return Api.Update.parse_updateBotInlineQuery($0) } dict[136574537] = { return Api.messages.VotesList.parse_votesList($0) } dict[1558266229] = { return Api.PopularContact.parse_popularContact($0) } dict[-373643672] = { return Api.FolderPeer.parse_folderPeer($0) } dict[367766557] = { return Api.ChannelParticipant.parse_channelParticipant($0) } dict[-1557620115] = { return Api.ChannelParticipant.parse_channelParticipantSelf($0) } - dict[470789295] = { return Api.ChannelParticipant.parse_channelParticipantBanned($0) } - dict[-859915345] = { return Api.ChannelParticipant.parse_channelParticipantAdmin($0) } dict[1149094475] = { return Api.ChannelParticipant.parse_channelParticipantCreator($0) } + dict[-859915345] = { return Api.ChannelParticipant.parse_channelParticipantAdmin($0) } + dict[470789295] = { return Api.ChannelParticipant.parse_channelParticipantBanned($0) } dict[-1010402965] = { return Api.ChannelParticipant.parse_channelParticipantLeft($0) } dict[-1567730343] = { return Api.MessageUserVote.parse_messageUserVote($0) } dict[909603888] = { return Api.MessageUserVote.parse_messageUserVoteInputOption($0) } @@ -287,9 +293,9 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-513392236] = { return Api.contacts.Blocked.parse_blockedSlice($0) } dict[-55902537] = { return Api.InputDialogPeer.parse_inputDialogPeer($0) } dict[1684014375] = { return Api.InputDialogPeer.parse_inputDialogPeerFolder($0) } - dict[-994444869] = { return Api.Error.parse_error($0) } dict[-1560655744] = { return Api.KeyboardButton.parse_keyboardButton($0) } dict[629866245] = { return Api.KeyboardButton.parse_keyboardButtonUrl($0) } + dict[901503851] = { return Api.KeyboardButton.parse_keyboardButtonCallback($0) } dict[-1318425559] = { return Api.KeyboardButton.parse_keyboardButtonRequestPhone($0) } dict[-59151553] = { return Api.KeyboardButton.parse_keyboardButtonRequestGeoLocation($0) } dict[90744648] = { return Api.KeyboardButton.parse_keyboardButtonSwitchInline($0) } @@ -298,7 +304,6 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[280464681] = { return Api.KeyboardButton.parse_keyboardButtonUrlAuth($0) } dict[-802258988] = { return Api.KeyboardButton.parse_inputKeyboardButtonUrlAuth($0) } dict[-1144565411] = { return Api.KeyboardButton.parse_keyboardButtonRequestPoll($0) } - dict[901503851] = { return Api.KeyboardButton.parse_keyboardButtonCallback($0) } dict[-748155807] = { return Api.ContactStatus.parse_contactStatus($0) } dict[1679398724] = { return Api.SecureFile.parse_secureFileEmpty($0) } dict[-534283678] = { return Api.SecureFile.parse_secureFile($0) } @@ -320,35 +325,35 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[1881892265] = { return Api.account.WallPapers.parse_wallPapers($0) } dict[1012306921] = { return Api.InputTheme.parse_inputTheme($0) } dict[-175567375] = { return Api.InputTheme.parse_inputThemeSlug($0) } - dict[1158290442] = { return Api.messages.FoundGifs.parse_foundGifs($0) } dict[-1132476723] = { return Api.FileLocation.parse_fileLocationToBeDeprecated($0) } dict[-2032041631] = { return Api.Poll.parse_poll($0) } + dict[-1195615476] = { return Api.InputNotifyPeer.parse_inputNotifyPeer($0) } dict[423314455] = { return Api.InputNotifyPeer.parse_inputNotifyUsers($0) } dict[1251338318] = { return Api.InputNotifyPeer.parse_inputNotifyChats($0) } dict[-1311015810] = { return Api.InputNotifyPeer.parse_inputNotifyBroadcasts($0) } - dict[-1195615476] = { return Api.InputNotifyPeer.parse_inputNotifyPeer($0) } dict[-317144808] = { return Api.EncryptedMessage.parse_encryptedMessage($0) } dict[594758406] = { return Api.EncryptedMessage.parse_encryptedMessageService($0) } dict[-566281095] = { return Api.ChannelParticipantsFilter.parse_channelParticipantsRecent($0) } dict[-1268741783] = { return Api.ChannelParticipantsFilter.parse_channelParticipantsAdmins($0) } + dict[-1548400251] = { return Api.ChannelParticipantsFilter.parse_channelParticipantsKicked($0) } dict[-1328445861] = { return Api.ChannelParticipantsFilter.parse_channelParticipantsBots($0) } dict[338142689] = { return Api.ChannelParticipantsFilter.parse_channelParticipantsBanned($0) } dict[106343499] = { return Api.ChannelParticipantsFilter.parse_channelParticipantsSearch($0) } - dict[-1548400251] = { return Api.ChannelParticipantsFilter.parse_channelParticipantsKicked($0) } dict[-1150621555] = { return Api.ChannelParticipantsFilter.parse_channelParticipantsContacts($0) } dict[-531931925] = { return Api.ChannelParticipantsFilter.parse_channelParticipantsMentions($0) } dict[-350980120] = { return Api.WebPage.parse_webPageEmpty($0) } dict[-981018084] = { return Api.WebPage.parse_webPagePending($0) } dict[-392411726] = { return Api.WebPage.parse_webPage($0) } dict[1930545681] = { return Api.WebPage.parse_webPageNotModified($0) } - dict[1036876423] = { return Api.InputBotInlineMessage.parse_inputBotInlineMessageText($0) } - dict[1262639204] = { return Api.InputBotInlineMessage.parse_inputBotInlineMessageGame($0) } dict[864077702] = { return Api.InputBotInlineMessage.parse_inputBotInlineMessageMediaAuto($0) } + dict[1036876423] = { return Api.InputBotInlineMessage.parse_inputBotInlineMessageText($0) } + dict[-1768777083] = { return Api.InputBotInlineMessage.parse_inputBotInlineMessageMediaGeo($0) } dict[1098628881] = { return Api.InputBotInlineMessage.parse_inputBotInlineMessageMediaVenue($0) } dict[-1494368259] = { return Api.InputBotInlineMessage.parse_inputBotInlineMessageMediaContact($0) } - dict[-1768777083] = { return Api.InputBotInlineMessage.parse_inputBotInlineMessageMediaGeo($0) } + dict[1262639204] = { return Api.InputBotInlineMessage.parse_inputBotInlineMessageGame($0) } dict[2002815875] = { return Api.KeyboardButtonRow.parse_keyboardButtonRow($0) } dict[1088567208] = { return Api.StickerSet.parse_stickerSet($0) } + dict[-1111085620] = { return Api.messages.ExportedChatInvites.parse_exportedChatInvites($0) } dict[354925740] = { return Api.SecureSecretSettings.parse_secureSecretSettings($0) } dict[539045032] = { return Api.photos.Photo.parse_photo($0) } dict[-208488460] = { return Api.InputContact.parse_inputPhoneContact($0) } @@ -373,38 +378,40 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[2131196633] = { return Api.contacts.ResolvedPeer.parse_resolvedPeer($0) } dict[-1964327229] = { return Api.SecureData.parse_secureData($0) } dict[-1771768449] = { return Api.InputMedia.parse_inputMediaEmpty($0) } - dict[-104578748] = { return Api.InputMedia.parse_inputMediaGeoPoint($0) } - dict[1212395773] = { return Api.InputMedia.parse_inputMediaGifExternal($0) } - dict[-750828557] = { return Api.InputMedia.parse_inputMediaGame($0) } - dict[-1052959727] = { return Api.InputMedia.parse_inputMediaVenue($0) } - dict[-186607933] = { return Api.InputMedia.parse_inputMediaInvoice($0) } dict[505969924] = { return Api.InputMedia.parse_inputMediaUploadedPhoto($0) } - dict[1530447553] = { return Api.InputMedia.parse_inputMediaUploadedDocument($0) } dict[-1279654347] = { return Api.InputMedia.parse_inputMediaPhoto($0) } + dict[-104578748] = { return Api.InputMedia.parse_inputMediaGeoPoint($0) } + dict[-122978821] = { return Api.InputMedia.parse_inputMediaContact($0) } + dict[1530447553] = { return Api.InputMedia.parse_inputMediaUploadedDocument($0) } + dict[860303448] = { return Api.InputMedia.parse_inputMediaDocument($0) } + dict[-1052959727] = { return Api.InputMedia.parse_inputMediaVenue($0) } dict[-440664550] = { return Api.InputMedia.parse_inputMediaPhotoExternal($0) } dict[-78455655] = { return Api.InputMedia.parse_inputMediaDocumentExternal($0) } - dict[-122978821] = { return Api.InputMedia.parse_inputMediaContact($0) } + dict[-750828557] = { return Api.InputMedia.parse_inputMediaGame($0) } + dict[-186607933] = { return Api.InputMedia.parse_inputMediaInvoice($0) } + dict[-1759532989] = { return Api.InputMedia.parse_inputMediaGeoLive($0) } dict[261416433] = { return Api.InputMedia.parse_inputMediaPoll($0) } dict[-428884101] = { return Api.InputMedia.parse_inputMediaDice($0) } - dict[-1759532989] = { return Api.InputMedia.parse_inputMediaGeoLive($0) } - dict[860303448] = { return Api.InputMedia.parse_inputMediaDocument($0) } dict[2134579434] = { return Api.InputPeer.parse_inputPeerEmpty($0) } dict[2107670217] = { return Api.InputPeer.parse_inputPeerSelf($0) } dict[396093539] = { return Api.InputPeer.parse_inputPeerChat($0) } dict[2072935910] = { return Api.InputPeer.parse_inputPeerUser($0) } dict[548253432] = { return Api.InputPeer.parse_inputPeerChannel($0) } + dict[398123750] = { return Api.InputPeer.parse_inputPeerUserFromMessage($0) } + dict[-1667893317] = { return Api.InputPeer.parse_inputPeerChannelFromMessage($0) } dict[568808380] = { return Api.upload.WebFile.parse_webFile($0) } dict[-116274796] = { return Api.Contact.parse_contact($0) } dict[-1078332329] = { return Api.help.PassportConfig.parse_passportConfigNotModified($0) } dict[-1600596305] = { return Api.help.PassportConfig.parse_passportConfig($0) } dict[1648543603] = { return Api.FileHash.parse_fileHash($0) } - dict[400266251] = { return Api.BotInlineResult.parse_botInlineMediaResult($0) } dict[295067450] = { return Api.BotInlineResult.parse_botInlineResult($0) } + dict[400266251] = { return Api.BotInlineResult.parse_botInlineMediaResult($0) } dict[911761060] = { return Api.messages.BotCallbackAnswer.parse_botCallbackAnswer($0) } dict[1314881805] = { return Api.payments.PaymentResult.parse_paymentResult($0) } dict[-666824391] = { return Api.payments.PaymentResult.parse_paymentVerificationNeeded($0) } dict[1694474197] = { return Api.messages.Chats.parse_chats($0) } dict[-1663561404] = { return Api.messages.Chats.parse_chatsSlice($0) } + dict[-2118733814] = { return Api.messages.ChatInviteImporters.parse_chatInviteImporters($0) } dict[-659913713] = { return Api.InputGroupCall.parse_inputGroupCall($0) } dict[482797855] = { return Api.InputSingleMedia.parse_inputSingleMedia($0) } dict[1163625789] = { return Api.MessageViews.parse_messageViews($0) } @@ -421,6 +428,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-421545947] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionChangeTitle($0) } dict[1427671598] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionChangeAbout($0) } dict[1783299128] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionChangeUsername($0) } + dict[1129042607] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionChangePhoto($0) } dict[460916654] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionToggleInvites($0) } dict[648939889] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionToggleSignatures($0) } dict[-370660328] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionUpdatePinned($0) } @@ -435,7 +443,6 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[1599903217] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionTogglePreHistoryHidden($0) } dict[771095562] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionDefaultBannedRights($0) } dict[-1895328189] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionStopPoll($0) } - dict[1129042607] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionChangePhoto($0) } dict[-1569748965] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionChangeLinkedChat($0) } dict[241923758] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionChangeLocation($0) } dict[1401984889] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionToggleSlowMode($0) } @@ -454,6 +461,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-1036572727] = { return Api.account.PasswordInputSettings.parse_passwordInputSettings($0) } dict[878078826] = { return Api.PageTableCell.parse_pageTableCell($0) } dict[-1626209256] = { return Api.ChatBannedRights.parse_chatBannedRights($0) } + dict[1968737087] = { return Api.InputClientProxy.parse_inputClientProxy($0) } dict[649453030] = { return Api.messages.MessageEditData.parse_messageEditData($0) } dict[-886477832] = { return Api.LabeledPrice.parse_labeledPrice($0) } dict[-438840932] = { return Api.messages.ChatFull.parse_chatFull($0) } @@ -467,15 +475,15 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[1490799288] = { return Api.ReportReason.parse_inputReportReasonSpam($0) } dict[505595789] = { return Api.ReportReason.parse_inputReportReasonViolence($0) } dict[777640226] = { return Api.ReportReason.parse_inputReportReasonPornography($0) } + dict[-1376497949] = { return Api.ReportReason.parse_inputReportReasonChildAbuse($0) } dict[-512463606] = { return Api.ReportReason.parse_inputReportReasonOther($0) } dict[-1685456582] = { return Api.ReportReason.parse_inputReportReasonCopyright($0) } - dict[-1376497949] = { return Api.ReportReason.parse_inputReportReasonChildAbuse($0) } dict[-606798099] = { return Api.ReportReason.parse_inputReportReasonGeoIrrelevant($0) } dict[-170010905] = { return Api.ReportReason.parse_inputReportReasonFake($0) } dict[-247351839] = { return Api.InputEncryptedChat.parse_inputEncryptedChat($0) } dict[-524237339] = { return Api.PageTableRow.parse_pageTableRow($0) } - dict[-40996577] = { return Api.DraftMessage.parse_draftMessage($0) } dict[453805082] = { return Api.DraftMessage.parse_draftMessageEmpty($0) } + dict[-40996577] = { return Api.DraftMessage.parse_draftMessage($0) } dict[-1014526429] = { return Api.help.Country.parse_country($0) } dict[418631927] = { return Api.StatsGroupTopPoster.parse_statsGroupTopPoster($0) } dict[-2128640689] = { return Api.account.SentEmailCode.parse_sentEmailCode($0) } @@ -491,13 +499,13 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-2036501105] = { return Api.SecureValueError.parse_secureValueError($0) } dict[-1592506512] = { return Api.SecureValueError.parse_secureValueErrorTranslationFile($0) } dict[878931416] = { return Api.SecureValueError.parse_secureValueErrorTranslationFiles($0) } + dict[-6249322] = { return Api.InputStickerSetItem.parse_inputStickerSetItem($0) } dict[-1728664459] = { return Api.help.PromoData.parse_promoDataEmpty($0) } dict[-1942390465] = { return Api.help.PromoData.parse_promoData($0) } dict[-1613493288] = { return Api.NotifyPeer.parse_notifyPeer($0) } dict[-1261946036] = { return Api.NotifyPeer.parse_notifyUsers($0) } dict[-1073230141] = { return Api.NotifyPeer.parse_notifyChats($0) } dict[-703403793] = { return Api.NotifyPeer.parse_notifyBroadcasts($0) } - dict[-582464156] = { return Api.wallet.KeySecretSalt.parse_secretSalt($0) } dict[1335282456] = { return Api.InputPrivacyKey.parse_inputPrivacyKeyStatusTimestamp($0) } dict[-1107622874] = { return Api.InputPrivacyKey.parse_inputPrivacyKeyChatInvite($0) } dict[-88417185] = { return Api.InputPrivacyKey.parse_inputPrivacyKeyPhoneCall($0) } @@ -519,13 +527,14 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-316748368] = { return Api.SecureValueHash.parse_secureValueHash($0) } dict[1722485756] = { return Api.phone.GroupCall.parse_groupCall($0) } dict[-398136321] = { return Api.messages.SearchCounter.parse_searchCounter($0) } - dict[-2128698738] = { return Api.auth.CheckedPhone.parse_checkedPhone($0) } dict[-1188055347] = { return Api.PageListItem.parse_pageListItemText($0) } dict[635466748] = { return Api.PageListItem.parse_pageListItemBlocks($0) } dict[-386039788] = { return Api.PeerBlocked.parse_peerBlocked($0) } dict[-1182234929] = { return Api.InputUser.parse_inputUserEmpty($0) } dict[-138301121] = { return Api.InputUser.parse_inputUserSelf($0) } dict[-668391402] = { return Api.InputUser.parse_inputUser($0) } + dict[756118935] = { return Api.InputUser.parse_inputUserFromMessage($0) } + dict[-1461589623] = { return Api.SchemeType.parse_schemeType($0) } dict[-1738178803] = { return Api.Page.parse_page($0) } dict[871426631] = { return Api.SecureCredentialsEncrypted.parse_secureCredentialsEncrypted($0) } dict[-875679776] = { return Api.StatsPercentValue.parse_statsPercentValue($0) } @@ -546,6 +555,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-1032140601] = { return Api.BotCommand.parse_botCommand($0) } dict[1474462241] = { return Api.account.ContentSettings.parse_contentSettings($0) } dict[-1661028051] = { return Api.phone.GroupParticipants.parse_groupParticipants($0) } + dict[507405952] = { return Api.ChatInviteImporter.parse_chatInviteImporter($0) } dict[-2066640507] = { return Api.messages.AffectedMessages.parse_affectedMessages($0) } dict[-402498398] = { return Api.messages.SavedGifs.parse_savedGifsNotModified($0) } dict[772213157] = { return Api.messages.SavedGifs.parse_savedGifs($0) } @@ -557,51 +567,50 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-1502174430] = { return Api.InputMessage.parse_inputMessageID($0) } dict[-1160215659] = { return Api.InputMessage.parse_inputMessageReplyTo($0) } dict[-2037963464] = { return Api.InputMessage.parse_inputMessagePinned($0) } + dict[-1392895362] = { return Api.InputMessage.parse_inputMessageCallbackQuery($0) } dict[-58224696] = { return Api.PhoneCallProtocol.parse_phoneCallProtocol($0) } dict[-1237848657] = { return Api.StatsDateRangeDays.parse_statsDateRangeDays($0) } dict[-275956116] = { return Api.messages.AffectedFoundMessages.parse_affectedFoundMessages($0) } - dict[-1567175714] = { return Api.MessageFwdAuthor.parse_messageFwdAuthor($0) } dict[-1539849235] = { return Api.WallPaper.parse_wallPaper($0) } dict[-1963717851] = { return Api.WallPaper.parse_wallPaperNoFile($0) } dict[-1938715001] = { return Api.messages.Messages.parse_messages($0) } - dict[1951620897] = { return Api.messages.Messages.parse_messagesNotModified($0) } - dict[1682413576] = { return Api.messages.Messages.parse_channelMessages($0) } dict[978610270] = { return Api.messages.Messages.parse_messagesSlice($0) } + dict[1682413576] = { return Api.messages.Messages.parse_channelMessages($0) } + dict[1951620897] = { return Api.messages.Messages.parse_messagesNotModified($0) } dict[-1022713000] = { return Api.Invoice.parse_invoice($0) } dict[1933519201] = { return Api.PeerSettings.parse_peerSettings($0) } dict[1577067778] = { return Api.auth.SentCode.parse_sentCode($0) } dict[480546647] = { return Api.InputChatPhoto.parse_inputChatPhotoEmpty($0) } - dict[-1991004873] = { return Api.InputChatPhoto.parse_inputChatPhoto($0) } dict[-968723890] = { return Api.InputChatPhoto.parse_inputChatUploadedPhoto($0) } + dict[-1991004873] = { return Api.InputChatPhoto.parse_inputChatPhoto($0) } dict[-1228606141] = { return Api.messages.MessageViews.parse_messageViews($0) } dict[375566091] = { return Api.messages.HistoryImport.parse_historyImport($0) } dict[-368917890] = { return Api.PaymentCharge.parse_paymentCharge($0) } dict[-1387279939] = { return Api.MessageInteractionCounters.parse_messageInteractionCounters($0) } dict[-1107852396] = { return Api.stats.BroadcastStats.parse_broadcastStats($0) } dict[-484987010] = { return Api.Updates.parse_updatesTooLong($0) } + dict[580309704] = { return Api.Updates.parse_updateShortMessage($0) } + dict[1076714939] = { return Api.Updates.parse_updateShortChatMessage($0) } dict[2027216577] = { return Api.Updates.parse_updateShort($0) } dict[1918567619] = { return Api.Updates.parse_updatesCombined($0) } dict[1957577280] = { return Api.Updates.parse_updates($0) } dict[301019932] = { return Api.Updates.parse_updateShortSentMessage($0) } - dict[580309704] = { return Api.Updates.parse_updateShortMessage($0) } - dict[1076714939] = { return Api.Updates.parse_updateShortChatMessage($0) } dict[-276825834] = { return Api.stats.MegagroupStats.parse_megagroupStats($0) } dict[-884757282] = { return Api.StatsAbsValueAndPrev.parse_statsAbsValueAndPrev($0) } dict[1038967584] = { return Api.MessageMedia.parse_messageMediaEmpty($0) } + dict[1766936791] = { return Api.MessageMedia.parse_messageMediaPhoto($0) } dict[1457575028] = { return Api.MessageMedia.parse_messageMediaGeo($0) } + dict[-873313984] = { return Api.MessageMedia.parse_messageMediaContact($0) } dict[-1618676578] = { return Api.MessageMedia.parse_messageMediaUnsupported($0) } + dict[-1666158377] = { return Api.MessageMedia.parse_messageMediaDocument($0) } dict[-1557277184] = { return Api.MessageMedia.parse_messageMediaWebPage($0) } + dict[784356159] = { return Api.MessageMedia.parse_messageMediaVenue($0) } dict[-38694904] = { return Api.MessageMedia.parse_messageMediaGame($0) } dict[-2074799289] = { return Api.MessageMedia.parse_messageMediaInvoice($0) } - dict[784356159] = { return Api.MessageMedia.parse_messageMediaVenue($0) } - dict[1766936791] = { return Api.MessageMedia.parse_messageMediaPhoto($0) } - dict[-1666158377] = { return Api.MessageMedia.parse_messageMediaDocument($0) } - dict[-873313984] = { return Api.MessageMedia.parse_messageMediaContact($0) } + dict[-1186937242] = { return Api.MessageMedia.parse_messageMediaGeoLive($0) } dict[1272375192] = { return Api.MessageMedia.parse_messageMediaPoll($0) } dict[1065280907] = { return Api.MessageMedia.parse_messageMediaDice($0) } - dict[-1186937242] = { return Api.MessageMedia.parse_messageMediaGeoLive($0) } dict[-842892769] = { return Api.PaymentSavedCredentials.parse_paymentSavedCredentialsCard($0) } - dict[1450380236] = { return Api.Null.parse_null($0) } dict[1923290508] = { return Api.auth.CodeType.parse_codeTypeSms($0) } dict[1948046307] = { return Api.auth.CodeType.parse_codeTypeCall($0) } dict[577556219] = { return Api.auth.CodeType.parse_codeTypeFlashCall($0) } @@ -630,21 +639,21 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-427863538] = { return Api.InputStickerSet.parse_inputStickerSetDice($0) } dict[-1729618630] = { return Api.BotInfo.parse_botInfo($0) } dict[-1519637954] = { return Api.updates.State.parse_state($0) } - dict[372165663] = { return Api.FoundGif.parse_foundGif($0) } - dict[-1670052855] = { return Api.FoundGif.parse_foundGifCached($0) } dict[537022650] = { return Api.User.parse_userEmpty($0) } dict[-1820043071] = { return Api.User.parse_user($0) } + dict[-1868117372] = { return Api.Message.parse_messageEmpty($0) } dict[1487813065] = { return Api.Message.parse_message($0) } dict[678405636] = { return Api.Message.parse_messageService($0) } - dict[-1868117372] = { return Api.Message.parse_messageEmpty($0) } dict[831924812] = { return Api.StatsGroupTopInviter.parse_statsGroupTopInviter($0) } dict[186120336] = { return Api.messages.RecentStickers.parse_recentStickersNotModified($0) } dict[586395571] = { return Api.messages.RecentStickers.parse_recentStickers($0) } - dict[-182231723] = { return Api.InputFileLocation.parse_inputEncryptedFileLocation($0) } - dict[-876089816] = { return Api.InputFileLocation.parse_inputSecureFileLocation($0) } dict[-539317279] = { return Api.InputFileLocation.parse_inputFileLocation($0) } - dict[1075322878] = { return Api.InputFileLocation.parse_inputPhotoFileLocation($0) } + dict[-182231723] = { return Api.InputFileLocation.parse_inputEncryptedFileLocation($0) } dict[-1160743548] = { return Api.InputFileLocation.parse_inputDocumentFileLocation($0) } + dict[-876089816] = { return Api.InputFileLocation.parse_inputSecureFileLocation($0) } + dict[700340377] = { return Api.InputFileLocation.parse_inputTakeoutFileLocation($0) } + dict[1075322878] = { return Api.InputFileLocation.parse_inputPhotoFileLocation($0) } + dict[-667654413] = { return Api.InputFileLocation.parse_inputPhotoLegacyFileLocation($0) } dict[668375447] = { return Api.InputFileLocation.parse_inputPeerPhotoFileLocation($0) } dict[230353641] = { return Api.InputFileLocation.parse_inputStickerSetThumb($0) } dict[286776671] = { return Api.GeoPoint.parse_geoPointEmpty($0) } @@ -691,8 +700,8 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[1816636575] = { return Api.LangPackString.parse_langPackStringPluralized($0) } dict[695856818] = { return Api.LangPackString.parse_langPackStringDeleted($0) } dict[-1036396922] = { return Api.InputWebFileLocation.parse_inputWebFileLocation($0) } - dict[1430205163] = { return Api.InputWebFileLocation.parse_inputWebFileGeoMessageLocation($0) } dict[-1625153079] = { return Api.InputWebFileLocation.parse_inputWebFileGeoPointLocation($0) } + dict[-1275374751] = { return Api.EmojiLanguage.parse_emojiLanguage($0) } dict[1601666510] = { return Api.MessageFwdHeader.parse_messageFwdHeader($0) } dict[-1012849566] = { return Api.BaseTheme.parse_baseThemeClassic($0) } dict[-69724536] = { return Api.BaseTheme.parse_baseThemeDay($0) } @@ -704,7 +713,6 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-1777752804] = { return Api.MessagesFilter.parse_inputMessagesFilterPhotos($0) } dict[-1614803355] = { return Api.MessagesFilter.parse_inputMessagesFilterVideo($0) } dict[1458172132] = { return Api.MessagesFilter.parse_inputMessagesFilterPhotoVideo($0) } - dict[-648121413] = { return Api.MessagesFilter.parse_inputMessagesFilterPhotoVideoDocuments($0) } dict[-1629621880] = { return Api.MessagesFilter.parse_inputMessagesFilterDocument($0) } dict[2129714567] = { return Api.MessagesFilter.parse_inputMessagesFilterUrl($0) } dict[-3644025] = { return Api.MessagesFilter.parse_inputMessagesFilterGif($0) } @@ -715,7 +723,6 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[2054952868] = { return Api.MessagesFilter.parse_inputMessagesFilterRoundVoice($0) } dict[-1253451181] = { return Api.MessagesFilter.parse_inputMessagesFilterRoundVideo($0) } dict[-1040652646] = { return Api.MessagesFilter.parse_inputMessagesFilterMyMentions($0) } - dict[1187706024] = { return Api.MessagesFilter.parse_inputMessagesFilterMyMentionsUnread($0) } dict[-419271411] = { return Api.MessagesFilter.parse_inputMessagesFilterGeo($0) } dict[-530392189] = { return Api.MessagesFilter.parse_inputMessagesFilterContacts($0) } dict[464520273] = { return Api.MessagesFilter.parse_inputMessagesFilterPinned($0) } @@ -727,13 +734,12 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[594408994] = { return Api.EmojiKeyword.parse_emojiKeywordDeleted($0) } dict[-290921362] = { return Api.upload.CdnFile.parse_cdnFileReuploadNeeded($0) } dict[-1449145777] = { return Api.upload.CdnFile.parse_cdnFile($0) } - dict[1984136919] = { return Api.wallet.LiteResponse.parse_liteResponse($0) } dict[415997816] = { return Api.help.InviteText.parse_inviteText($0) } - dict[-1937807902] = { return Api.BotInlineMessage.parse_botInlineMessageText($0) } dict[1984755728] = { return Api.BotInlineMessage.parse_botInlineMessageMediaAuto($0) } + dict[-1937807902] = { return Api.BotInlineMessage.parse_botInlineMessageText($0) } + dict[85477117] = { return Api.BotInlineMessage.parse_botInlineMessageMediaGeo($0) } dict[-1970903652] = { return Api.BotInlineMessage.parse_botInlineMessageMediaVenue($0) } dict[416402882] = { return Api.BotInlineMessage.parse_botInlineMessageMediaContact($0) } - dict[85477117] = { return Api.BotInlineMessage.parse_botInlineMessageMediaGeo($0) } dict[-1673717362] = { return Api.InputPeerNotifySettings.parse_inputPeerNotifySettings($0) } dict[-1634752813] = { return Api.messages.FavedStickers.parse_favedStickersNotModified($0) } dict[-209768682] = { return Api.messages.FavedStickers.parse_favedStickers($0) } @@ -761,13 +767,14 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-368907213] = { return Api.SecureValueType.parse_secureValueTypeTemporaryRegistration($0) } dict[-1289704741] = { return Api.SecureValueType.parse_secureValueTypePhone($0) } dict[-1908627474] = { return Api.SecureValueType.parse_secureValueTypeEmail($0) } + dict[1315894878] = { return Api.Scheme.parse_scheme($0) } dict[-732254058] = { return Api.PasswordKdfAlgo.parse_passwordKdfAlgoUnknown($0) } dict[982592842] = { return Api.PasswordKdfAlgo.parse_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow($0) } dict[-1390001672] = { return Api.account.Password.parse_password($0) } + dict[-2000710887] = { return Api.InputBotInlineResult.parse_inputBotInlineResult($0) } dict[-1462213465] = { return Api.InputBotInlineResult.parse_inputBotInlineResultPhoto($0) } dict[-459324] = { return Api.InputBotInlineResult.parse_inputBotInlineResultDocument($0) } dict[1336154098] = { return Api.InputBotInlineResult.parse_inputBotInlineResultGame($0) } - dict[-2000710887] = { return Api.InputBotInlineResult.parse_inputBotInlineResult($0) } dict[1352683077] = { return Api.account.PrivacyRules.parse_privacyRules($0) } dict[-123988] = { return Api.PrivacyRule.parse_privacyValueAllowContacts($0) } dict[1698855810] = { return Api.PrivacyRule.parse_privacyValueAllowAll($0) } @@ -814,23 +821,23 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[1674235686] = { return Api.account.AutoDownloadSettings.parse_autoDownloadSettings($0) } dict[-445792507] = { return Api.DialogPeer.parse_dialogPeer($0) } dict[1363483106] = { return Api.DialogPeer.parse_dialogPeerFolder($0) } - dict[-104284986] = { return Api.WebDocument.parse_webDocumentNoProxy($0) } dict[475467473] = { return Api.WebDocument.parse_webDocument($0) } + dict[-104284986] = { return Api.WebDocument.parse_webDocumentNoProxy($0) } dict[42930452] = { return Api.Theme.parse_theme($0) } dict[-1290580579] = { return Api.contacts.Found.parse_found($0) } dict[-368018716] = { return Api.ChannelAdminLogEventsFilter.parse_channelAdminLogEventsFilter($0) } dict[-1676371894] = { return Api.ThemeSettings.parse_themeSettings($0) } - dict[1889961234] = { return Api.PeerNotifySettings.parse_peerNotifySettingsEmpty($0) } dict[-1353671392] = { return Api.PeerNotifySettings.parse_peerNotifySettings($0) } dict[-1995686519] = { return Api.InputBotInlineMessageID.parse_inputBotInlineMessageID($0) } + dict[565550063] = { return Api.SchemeParam.parse_schemeParam($0) } dict[-1282352120] = { return Api.PageRelatedArticle.parse_pageRelatedArticle($0) } dict[313694676] = { return Api.StickerPack.parse_stickerPack($0) } dict[1326562017] = { return Api.UserProfilePhoto.parse_userProfilePhotoEmpty($0) } dict[1775479590] = { return Api.UserProfilePhoto.parse_userProfilePhoto($0) } dict[-74456004] = { return Api.payments.SavedInfo.parse_savedInfo($0) } dict[1041346555] = { return Api.updates.ChannelDifference.parse_channelDifferenceEmpty($0) } - dict[543450958] = { return Api.updates.ChannelDifference.parse_channelDifference($0) } dict[-1531132162] = { return Api.updates.ChannelDifference.parse_channelDifferenceTooLong($0) } + dict[543450958] = { return Api.updates.ChannelDifference.parse_channelDifference($0) } dict[-1815339214] = { return Api.help.CountriesList.parse_countriesListNotModified($0) } dict[-2016381538] = { return Api.help.CountriesList.parse_countriesList($0) } dict[-309659827] = { return Api.channels.AdminLogResults.parse_adminLogResults($0) } @@ -868,8 +875,8 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-1730311882] = { return Api.PageListOrderedItem.parse_pageListOrderedItemBlocks($0) } dict[-1417756512] = { return Api.EncryptedChat.parse_encryptedChatEmpty($0) } dict[1006044124] = { return Api.EncryptedChat.parse_encryptedChatWaiting($0) } - dict[-94974410] = { return Api.EncryptedChat.parse_encryptedChat($0) } dict[1651608194] = { return Api.EncryptedChat.parse_encryptedChatRequested($0) } + dict[-94974410] = { return Api.EncryptedChat.parse_encryptedChat($0) } dict[505183301] = { return Api.EncryptedChat.parse_encryptedChatDiscarded($0) } dict[-901375139] = { return Api.PeerLocated.parse_peerLocated($0) } dict[-118740917] = { return Api.PeerLocated.parse_peerSelfLocated($0) } @@ -954,6 +961,8 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.updates.Difference: _1.serialize(buffer, boxed) + case let _1 as Api.SchemeMethod: + _1.serialize(buffer, boxed) case let _1 as Api.CdnConfig: _1.serialize(buffer, boxed) case let _1 as Api.PageBlock: @@ -998,6 +1007,8 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.account.PasswordSettings: _1.serialize(buffer, boxed) + case let _1 as Api.help.SupportName: + _1.serialize(buffer, boxed) case let _1 as Api.LangPackLanguage: _1.serialize(buffer, boxed) case let _1 as Api.VideoSize: @@ -1022,12 +1033,16 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.InputEncryptedFile: _1.serialize(buffer, boxed) + case let _1 as Api.account.Takeout: + _1.serialize(buffer, boxed) case let _1 as Api.messages.InactiveChats: _1.serialize(buffer, boxed) case let _1 as Api.GroupCallParticipant: _1.serialize(buffer, boxed) case let _1 as Api.messages.SentEncryptedMessage: _1.serialize(buffer, boxed) + case let _1 as Api.SavedContact: + _1.serialize(buffer, boxed) case let _1 as Api.ExportedMessageLink: _1.serialize(buffer, boxed) case let _1 as Api.auth.Authorization: @@ -1036,6 +1051,8 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.Peer: _1.serialize(buffer, boxed) + case let _1 as Api.messages.ExportedChatInvite: + _1.serialize(buffer, boxed) case let _1 as Api.PaymentRequestedInfo: _1.serialize(buffer, boxed) case let _1 as Api.UserStatus: @@ -1064,8 +1081,6 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.InputDialogPeer: _1.serialize(buffer, boxed) - case let _1 as Api.Error: - _1.serialize(buffer, boxed) case let _1 as Api.KeyboardButton: _1.serialize(buffer, boxed) case let _1 as Api.ContactStatus: @@ -1088,8 +1103,6 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.InputTheme: _1.serialize(buffer, boxed) - case let _1 as Api.messages.FoundGifs: - _1.serialize(buffer, boxed) case let _1 as Api.FileLocation: _1.serialize(buffer, boxed) case let _1 as Api.Poll: @@ -1108,6 +1121,8 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.StickerSet: _1.serialize(buffer, boxed) + case let _1 as Api.messages.ExportedChatInvites: + _1.serialize(buffer, boxed) case let _1 as Api.SecureSecretSettings: _1.serialize(buffer, boxed) case let _1 as Api.photos.Photo: @@ -1154,6 +1169,8 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.messages.Chats: _1.serialize(buffer, boxed) + case let _1 as Api.messages.ChatInviteImporters: + _1.serialize(buffer, boxed) case let _1 as Api.InputGroupCall: _1.serialize(buffer, boxed) case let _1 as Api.InputSingleMedia: @@ -1180,6 +1197,8 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.ChatBannedRights: _1.serialize(buffer, boxed) + case let _1 as Api.InputClientProxy: + _1.serialize(buffer, boxed) case let _1 as Api.messages.MessageEditData: _1.serialize(buffer, boxed) case let _1 as Api.LabeledPrice: @@ -1218,12 +1237,12 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.SecureValueError: _1.serialize(buffer, boxed) + case let _1 as Api.InputStickerSetItem: + _1.serialize(buffer, boxed) case let _1 as Api.help.PromoData: _1.serialize(buffer, boxed) case let _1 as Api.NotifyPeer: _1.serialize(buffer, boxed) - case let _1 as Api.wallet.KeySecretSalt: - _1.serialize(buffer, boxed) case let _1 as Api.InputPrivacyKey: _1.serialize(buffer, boxed) case let _1 as Api.help.RecentMeUrls: @@ -1246,14 +1265,14 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.messages.SearchCounter: _1.serialize(buffer, boxed) - case let _1 as Api.auth.CheckedPhone: - _1.serialize(buffer, boxed) case let _1 as Api.PageListItem: _1.serialize(buffer, boxed) case let _1 as Api.PeerBlocked: _1.serialize(buffer, boxed) case let _1 as Api.InputUser: _1.serialize(buffer, boxed) + case let _1 as Api.SchemeType: + _1.serialize(buffer, boxed) case let _1 as Api.Page: _1.serialize(buffer, boxed) case let _1 as Api.SecureCredentialsEncrypted: @@ -1284,6 +1303,8 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.phone.GroupParticipants: _1.serialize(buffer, boxed) + case let _1 as Api.ChatInviteImporter: + _1.serialize(buffer, boxed) case let _1 as Api.messages.AffectedMessages: _1.serialize(buffer, boxed) case let _1 as Api.messages.SavedGifs: @@ -1304,8 +1325,6 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.messages.AffectedFoundMessages: _1.serialize(buffer, boxed) - case let _1 as Api.MessageFwdAuthor: - _1.serialize(buffer, boxed) case let _1 as Api.WallPaper: _1.serialize(buffer, boxed) case let _1 as Api.messages.Messages: @@ -1338,8 +1357,6 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.PaymentSavedCredentials: _1.serialize(buffer, boxed) - case let _1 as Api.Null: - _1.serialize(buffer, boxed) case let _1 as Api.auth.CodeType: _1.serialize(buffer, boxed) case let _1 as Api.DocumentAttribute: @@ -1366,8 +1383,6 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.updates.State: _1.serialize(buffer, boxed) - case let _1 as Api.FoundGif: - _1.serialize(buffer, boxed) case let _1 as Api.User: _1.serialize(buffer, boxed) case let _1 as Api.Message: @@ -1432,6 +1447,8 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.InputWebFileLocation: _1.serialize(buffer, boxed) + case let _1 as Api.EmojiLanguage: + _1.serialize(buffer, boxed) case let _1 as Api.MessageFwdHeader: _1.serialize(buffer, boxed) case let _1 as Api.BaseTheme: @@ -1448,8 +1465,6 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.upload.CdnFile: _1.serialize(buffer, boxed) - case let _1 as Api.wallet.LiteResponse: - _1.serialize(buffer, boxed) case let _1 as Api.help.InviteText: _1.serialize(buffer, boxed) case let _1 as Api.BotInlineMessage: @@ -1476,6 +1491,8 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.SecureValueType: _1.serialize(buffer, boxed) + case let _1 as Api.Scheme: + _1.serialize(buffer, boxed) case let _1 as Api.PasswordKdfAlgo: _1.serialize(buffer, boxed) case let _1 as Api.account.Password: @@ -1510,6 +1527,8 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.InputBotInlineMessageID: _1.serialize(buffer, boxed) + case let _1 as Api.SchemeParam: + _1.serialize(buffer, boxed) case let _1 as Api.PageRelatedArticle: _1.serialize(buffer, boxed) case let _1 as Api.StickerPack: diff --git a/submodules/TelegramApi/Sources/Api1.swift b/submodules/TelegramApi/Sources/Api1.swift index dfb1bc6bcb..691696da2c 100644 --- a/submodules/TelegramApi/Sources/Api1.swift +++ b/submodules/TelegramApi/Sources/Api1.swift @@ -219,6 +219,52 @@ public struct messages { } } + } + public enum ExportedChatInvite: TypeConstructorDescription { + case exportedChatInvite(invite: Api.ExportedChatInvite, users: [Api.User]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .exportedChatInvite(let invite, let users): + if boxed { + buffer.appendInt32(410107472) + } + invite.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .exportedChatInvite(let invite, let users): + return ("exportedChatInvite", [("invite", invite), ("users", users)]) + } + } + + public static func parse_exportedChatInvite(_ reader: BufferReader) -> ExportedChatInvite? { + var _1: Api.ExportedChatInvite? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite + } + var _2: [Api.User]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.messages.ExportedChatInvite.exportedChatInvite(invite: _1!, users: _2!) + } + else { + return nil + } + } + } public enum VotesList: TypeConstructorDescription { case votesList(flags: Int32, count: Int32, votes: [Api.MessageUserVote], users: [Api.User], nextOffset: String?) @@ -394,19 +440,24 @@ public struct messages { } } - public enum FoundGifs: TypeConstructorDescription { - case foundGifs(nextOffset: Int32, results: [Api.FoundGif]) + public enum ExportedChatInvites: TypeConstructorDescription { + case exportedChatInvites(count: Int32, invites: [Api.ExportedChatInvite], users: [Api.User]) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .foundGifs(let nextOffset, let results): + case .exportedChatInvites(let count, let invites, let users): if boxed { - buffer.appendInt32(1158290442) + buffer.appendInt32(-1111085620) } - serializeInt32(nextOffset, buffer: buffer, boxed: false) + serializeInt32(count, buffer: buffer, boxed: false) buffer.appendInt32(481674261) - buffer.appendInt32(Int32(results.count)) - for item in results { + buffer.appendInt32(Int32(invites.count)) + for item in invites { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { item.serialize(buffer, true) } break @@ -415,22 +466,27 @@ public struct messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .foundGifs(let nextOffset, let results): - return ("foundGifs", [("nextOffset", nextOffset), ("results", results)]) + case .exportedChatInvites(let count, let invites, let users): + return ("exportedChatInvites", [("count", count), ("invites", invites), ("users", users)]) } } - public static func parse_foundGifs(_ reader: BufferReader) -> FoundGifs? { + public static func parse_exportedChatInvites(_ reader: BufferReader) -> ExportedChatInvites? { var _1: Int32? _1 = reader.readInt32() - var _2: [Api.FoundGif]? + var _2: [Api.ExportedChatInvite]? if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.FoundGif.self) + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ExportedChatInvite.self) + } + var _3: [Api.User]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) } let _c1 = _1 != nil let _c2 = _2 != nil - if _c1 && _c2 { - return Api.messages.FoundGifs.foundGifs(nextOffset: _1!, results: _2!) + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.messages.ExportedChatInvites.exportedChatInvites(count: _1!, invites: _2!, users: _3!) } else { return nil @@ -625,6 +681,60 @@ public struct messages { } } + } + public enum ChatInviteImporters: TypeConstructorDescription { + case chatInviteImporters(count: Int32, importers: [Api.ChatInviteImporter], users: [Api.User]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .chatInviteImporters(let count, let importers, let users): + if boxed { + buffer.appendInt32(-2118733814) + } + serializeInt32(count, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(importers.count)) + for item in importers { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .chatInviteImporters(let count, let importers, let users): + return ("chatInviteImporters", [("count", count), ("importers", importers), ("users", users)]) + } + } + + public static func parse_chatInviteImporters(_ reader: BufferReader) -> ChatInviteImporters? { + var _1: Int32? + _1 = reader.readInt32() + var _2: [Api.ChatInviteImporter]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ChatInviteImporter.self) + } + var _3: [Api.User]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.messages.ChatInviteImporters.chatInviteImporters(count: _1!, importers: _2!, users: _3!) + } + else { + return nil + } + } + } public enum DhConfig: TypeConstructorDescription { case dhConfigNotModified(random: Buffer) @@ -1182,9 +1292,9 @@ public struct messages { } public enum Messages: TypeConstructorDescription { case messages(messages: [Api.Message], chats: [Api.Chat], users: [Api.User]) - case messagesNotModified(count: Int32) - case channelMessages(flags: Int32, pts: Int32, count: Int32, offsetIdOffset: Int32?, messages: [Api.Message], chats: [Api.Chat], users: [Api.User]) case messagesSlice(flags: Int32, count: Int32, nextRate: Int32?, offsetIdOffset: Int32?, messages: [Api.Message], chats: [Api.Chat], users: [Api.User]) + case channelMessages(flags: Int32, pts: Int32, count: Int32, offsetIdOffset: Int32?, messages: [Api.Message], chats: [Api.Chat], users: [Api.User]) + case messagesNotModified(count: Int32) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { @@ -1208,36 +1318,6 @@ public struct messages { item.serialize(buffer, true) } break - case .messagesNotModified(let count): - if boxed { - buffer.appendInt32(1951620897) - } - serializeInt32(count, buffer: buffer, boxed: false) - break - case .channelMessages(let flags, let pts, let count, let offsetIdOffset, let messages, let chats, let users): - if boxed { - buffer.appendInt32(1682413576) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(count, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(offsetIdOffset!, buffer: buffer, boxed: false)} - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(messages.count)) - for item in messages { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(chats.count)) - for item in chats { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - break case .messagesSlice(let flags, let count, let nextRate, let offsetIdOffset, let messages, let chats, let users): if boxed { buffer.appendInt32(978610270) @@ -1262,6 +1342,36 @@ public struct messages { item.serialize(buffer, true) } break + case .channelMessages(let flags, let pts, let count, let offsetIdOffset, let messages, let chats, let users): + if boxed { + buffer.appendInt32(1682413576) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(count, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(offsetIdOffset!, buffer: buffer, boxed: false)} + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(messages.count)) + for item in messages { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(chats.count)) + for item in chats { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + break + case .messagesNotModified(let count): + if boxed { + buffer.appendInt32(1951620897) + } + serializeInt32(count, buffer: buffer, boxed: false) + break } } @@ -1269,12 +1379,12 @@ public struct messages { switch self { case .messages(let messages, let chats, let users): return ("messages", [("messages", messages), ("chats", chats), ("users", users)]) - case .messagesNotModified(let count): - return ("messagesNotModified", [("count", count)]) - case .channelMessages(let flags, let pts, let count, let offsetIdOffset, let messages, let chats, let users): - return ("channelMessages", [("flags", flags), ("pts", pts), ("count", count), ("offsetIdOffset", offsetIdOffset), ("messages", messages), ("chats", chats), ("users", users)]) case .messagesSlice(let flags, let count, let nextRate, let offsetIdOffset, let messages, let chats, let users): return ("messagesSlice", [("flags", flags), ("count", count), ("nextRate", nextRate), ("offsetIdOffset", offsetIdOffset), ("messages", messages), ("chats", chats), ("users", users)]) + case .channelMessages(let flags, let pts, let count, let offsetIdOffset, let messages, let chats, let users): + return ("channelMessages", [("flags", flags), ("pts", pts), ("count", count), ("offsetIdOffset", offsetIdOffset), ("messages", messages), ("chats", chats), ("users", users)]) + case .messagesNotModified(let count): + return ("messagesNotModified", [("count", count)]) } } @@ -1301,12 +1411,36 @@ public struct messages { return nil } } - public static func parse_messagesNotModified(_ reader: BufferReader) -> Messages? { + public static func parse_messagesSlice(_ reader: BufferReader) -> Messages? { var _1: Int32? _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } + var _4: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_4 = reader.readInt32() } + var _5: [Api.Message]? + if let _ = reader.readInt32() { + _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Message.self) + } + var _6: [Api.Chat]? + if let _ = reader.readInt32() { + _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) + } + var _7: [Api.User]? + if let _ = reader.readInt32() { + _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } let _c1 = _1 != nil - if _c1 { - return Api.messages.Messages.messagesNotModified(count: _1!) + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.messages.Messages.messagesSlice(flags: _1!, count: _2!, nextRate: _3, offsetIdOffset: _4, messages: _5!, chats: _6!, users: _7!) } else { return nil @@ -1347,36 +1481,12 @@ public struct messages { return nil } } - public static func parse_messagesSlice(_ reader: BufferReader) -> Messages? { + public static func parse_messagesNotModified(_ reader: BufferReader) -> Messages? { var _1: Int32? _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } - var _4: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_4 = reader.readInt32() } - var _5: [Api.Message]? - if let _ = reader.readInt32() { - _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Message.self) - } - var _6: [Api.Chat]? - if let _ = reader.readInt32() { - _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) - } - var _7: [Api.User]? - if let _ = reader.readInt32() { - _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.messages.Messages.messagesSlice(flags: _1!, count: _2!, nextRate: _3, offsetIdOffset: _4, messages: _5!, chats: _6!, users: _7!) + if _c1 { + return Api.messages.Messages.messagesNotModified(count: _1!) } else { return nil @@ -2176,11 +2286,31 @@ public extension Api { } public enum ChatFull: TypeConstructorDescription { - case channelFull(flags: Int32, id: Int32, about: String, participantsCount: Int32?, adminsCount: Int32?, kickedCount: Int32?, bannedCount: Int32?, onlineCount: Int32?, readInboxMaxId: Int32, readOutboxMaxId: Int32, unreadCount: Int32, chatPhoto: Api.Photo, notifySettings: Api.PeerNotifySettings, exportedInvite: Api.ExportedChatInvite?, botInfo: [Api.BotInfo], migratedFromChatId: Int32?, migratedFromMaxId: Int32?, pinnedMsgId: Int32?, stickerset: Api.StickerSet?, availableMinId: Int32?, folderId: Int32?, linkedChatId: Int32?, location: Api.ChannelLocation?, slowmodeSeconds: Int32?, slowmodeNextSendDate: Int32?, statsDc: Int32?, pts: Int32, call: Api.InputGroupCall?) case chatFull(flags: Int32, id: Int32, about: String, participants: Api.ChatParticipants, chatPhoto: Api.Photo?, notifySettings: Api.PeerNotifySettings, exportedInvite: Api.ExportedChatInvite?, botInfo: [Api.BotInfo]?, pinnedMsgId: Int32?, folderId: Int32?, call: Api.InputGroupCall?) + case channelFull(flags: Int32, id: Int32, about: String, participantsCount: Int32?, adminsCount: Int32?, kickedCount: Int32?, bannedCount: Int32?, onlineCount: Int32?, readInboxMaxId: Int32, readOutboxMaxId: Int32, unreadCount: Int32, chatPhoto: Api.Photo, notifySettings: Api.PeerNotifySettings, exportedInvite: Api.ExportedChatInvite?, botInfo: [Api.BotInfo], migratedFromChatId: Int32?, migratedFromMaxId: Int32?, pinnedMsgId: Int32?, stickerset: Api.StickerSet?, availableMinId: Int32?, folderId: Int32?, linkedChatId: Int32?, location: Api.ChannelLocation?, slowmodeSeconds: Int32?, slowmodeNextSendDate: Int32?, statsDc: Int32?, pts: Int32, call: Api.InputGroupCall?) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { + case .chatFull(let flags, let id, let about, let participants, let chatPhoto, let notifySettings, let exportedInvite, let botInfo, let pinnedMsgId, let folderId, let call): + if boxed { + buffer.appendInt32(-213431562) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + serializeString(about, buffer: buffer, boxed: false) + participants.serialize(buffer, true) + if Int(flags) & Int(1 << 2) != 0 {chatPhoto!.serialize(buffer, true)} + notifySettings.serialize(buffer, true) + if Int(flags) & Int(1 << 13) != 0 {exportedInvite!.serialize(buffer, true)} + if Int(flags) & Int(1 << 3) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(botInfo!.count)) + for item in botInfo! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 6) != 0 {serializeInt32(pinnedMsgId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 11) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 12) != 0 {call!.serialize(buffer, true)} + break case .channelFull(let flags, let id, let about, let participantsCount, let adminsCount, let kickedCount, let bannedCount, let onlineCount, let readInboxMaxId, let readOutboxMaxId, let unreadCount, let chatPhoto, let notifySettings, let exportedInvite, let botInfo, let migratedFromChatId, let migratedFromMaxId, let pinnedMsgId, let stickerset, let availableMinId, let folderId, let linkedChatId, let location, let slowmodeSeconds, let slowmodeNextSendDate, let statsDc, let pts, let call): if boxed { buffer.appendInt32(2055070967) @@ -2218,38 +2348,71 @@ public extension Api { serializeInt32(pts, buffer: buffer, boxed: false) if Int(flags) & Int(1 << 21) != 0 {call!.serialize(buffer, true)} break - case .chatFull(let flags, let id, let about, let participants, let chatPhoto, let notifySettings, let exportedInvite, let botInfo, let pinnedMsgId, let folderId, let call): - if boxed { - buffer.appendInt32(-213431562) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - serializeString(about, buffer: buffer, boxed: false) - participants.serialize(buffer, true) - if Int(flags) & Int(1 << 2) != 0 {chatPhoto!.serialize(buffer, true)} - notifySettings.serialize(buffer, true) - if Int(flags) & Int(1 << 13) != 0 {exportedInvite!.serialize(buffer, true)} - if Int(flags) & Int(1 << 3) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(botInfo!.count)) - for item in botInfo! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 6) != 0 {serializeInt32(pinnedMsgId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 11) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 12) != 0 {call!.serialize(buffer, true)} - break } } public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .channelFull(let flags, let id, let about, let participantsCount, let adminsCount, let kickedCount, let bannedCount, let onlineCount, let readInboxMaxId, let readOutboxMaxId, let unreadCount, let chatPhoto, let notifySettings, let exportedInvite, let botInfo, let migratedFromChatId, let migratedFromMaxId, let pinnedMsgId, let stickerset, let availableMinId, let folderId, let linkedChatId, let location, let slowmodeSeconds, let slowmodeNextSendDate, let statsDc, let pts, let call): - return ("channelFull", [("flags", flags), ("id", id), ("about", about), ("participantsCount", participantsCount), ("adminsCount", adminsCount), ("kickedCount", kickedCount), ("bannedCount", bannedCount), ("onlineCount", onlineCount), ("readInboxMaxId", readInboxMaxId), ("readOutboxMaxId", readOutboxMaxId), ("unreadCount", unreadCount), ("chatPhoto", chatPhoto), ("notifySettings", notifySettings), ("exportedInvite", exportedInvite), ("botInfo", botInfo), ("migratedFromChatId", migratedFromChatId), ("migratedFromMaxId", migratedFromMaxId), ("pinnedMsgId", pinnedMsgId), ("stickerset", stickerset), ("availableMinId", availableMinId), ("folderId", folderId), ("linkedChatId", linkedChatId), ("location", location), ("slowmodeSeconds", slowmodeSeconds), ("slowmodeNextSendDate", slowmodeNextSendDate), ("statsDc", statsDc), ("pts", pts), ("call", call)]) case .chatFull(let flags, let id, let about, let participants, let chatPhoto, let notifySettings, let exportedInvite, let botInfo, let pinnedMsgId, let folderId, let call): return ("chatFull", [("flags", flags), ("id", id), ("about", about), ("participants", participants), ("chatPhoto", chatPhoto), ("notifySettings", notifySettings), ("exportedInvite", exportedInvite), ("botInfo", botInfo), ("pinnedMsgId", pinnedMsgId), ("folderId", folderId), ("call", call)]) + case .channelFull(let flags, let id, let about, let participantsCount, let adminsCount, let kickedCount, let bannedCount, let onlineCount, let readInboxMaxId, let readOutboxMaxId, let unreadCount, let chatPhoto, let notifySettings, let exportedInvite, let botInfo, let migratedFromChatId, let migratedFromMaxId, let pinnedMsgId, let stickerset, let availableMinId, let folderId, let linkedChatId, let location, let slowmodeSeconds, let slowmodeNextSendDate, let statsDc, let pts, let call): + return ("channelFull", [("flags", flags), ("id", id), ("about", about), ("participantsCount", participantsCount), ("adminsCount", adminsCount), ("kickedCount", kickedCount), ("bannedCount", bannedCount), ("onlineCount", onlineCount), ("readInboxMaxId", readInboxMaxId), ("readOutboxMaxId", readOutboxMaxId), ("unreadCount", unreadCount), ("chatPhoto", chatPhoto), ("notifySettings", notifySettings), ("exportedInvite", exportedInvite), ("botInfo", botInfo), ("migratedFromChatId", migratedFromChatId), ("migratedFromMaxId", migratedFromMaxId), ("pinnedMsgId", pinnedMsgId), ("stickerset", stickerset), ("availableMinId", availableMinId), ("folderId", folderId), ("linkedChatId", linkedChatId), ("location", location), ("slowmodeSeconds", slowmodeSeconds), ("slowmodeNextSendDate", slowmodeNextSendDate), ("statsDc", statsDc), ("pts", pts), ("call", call)]) } } + public static func parse_chatFull(_ reader: BufferReader) -> ChatFull? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: String? + _3 = parseString(reader) + var _4: Api.ChatParticipants? + if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.ChatParticipants + } + var _5: Api.Photo? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.Photo + } } + var _6: Api.PeerNotifySettings? + if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.PeerNotifySettings + } + var _7: Api.ExportedChatInvite? + if Int(_1!) & Int(1 << 13) != 0 {if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite + } } + var _8: [Api.BotInfo]? + if Int(_1!) & Int(1 << 3) != 0 {if let _ = reader.readInt32() { + _8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.BotInfo.self) + } } + var _9: Int32? + if Int(_1!) & Int(1 << 6) != 0 {_9 = reader.readInt32() } + var _10: Int32? + if Int(_1!) & Int(1 << 11) != 0 {_10 = reader.readInt32() } + var _11: Api.InputGroupCall? + if Int(_1!) & Int(1 << 12) != 0 {if let signature = reader.readInt32() { + _11 = Api.parse(reader, signature: signature) as? Api.InputGroupCall + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c6 = _6 != nil + let _c7 = (Int(_1!) & Int(1 << 13) == 0) || _7 != nil + let _c8 = (Int(_1!) & Int(1 << 3) == 0) || _8 != nil + let _c9 = (Int(_1!) & Int(1 << 6) == 0) || _9 != nil + let _c10 = (Int(_1!) & Int(1 << 11) == 0) || _10 != nil + let _c11 = (Int(_1!) & Int(1 << 12) == 0) || _11 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { + return Api.ChatFull.chatFull(flags: _1!, id: _2!, about: _3!, participants: _4!, chatPhoto: _5, notifySettings: _6!, exportedInvite: _7, botInfo: _8, pinnedMsgId: _9, folderId: _10, call: _11) + } + else { + return nil + } + } public static func parse_channelFull(_ reader: BufferReader) -> ChatFull? { var _1: Int32? _1 = reader.readInt32() @@ -2356,59 +2519,6 @@ public extension Api { return nil } } - public static func parse_chatFull(_ reader: BufferReader) -> ChatFull? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: String? - _3 = parseString(reader) - var _4: Api.ChatParticipants? - if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.ChatParticipants - } - var _5: Api.Photo? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.Photo - } } - var _6: Api.PeerNotifySettings? - if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.PeerNotifySettings - } - var _7: Api.ExportedChatInvite? - if Int(_1!) & Int(1 << 13) != 0 {if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite - } } - var _8: [Api.BotInfo]? - if Int(_1!) & Int(1 << 3) != 0 {if let _ = reader.readInt32() { - _8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.BotInfo.self) - } } - var _9: Int32? - if Int(_1!) & Int(1 << 6) != 0 {_9 = reader.readInt32() } - var _10: Int32? - if Int(_1!) & Int(1 << 11) != 0 {_10 = reader.readInt32() } - var _11: Api.InputGroupCall? - if Int(_1!) & Int(1 << 12) != 0 {if let signature = reader.readInt32() { - _11 = Api.parse(reader, signature: signature) as? Api.InputGroupCall - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 13) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 3) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 6) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 11) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 12) == 0) || _11 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { - return Api.ChatFull.chatFull(flags: _1!, id: _2!, about: _3!, participants: _4!, chatPhoto: _5, notifySettings: _6!, exportedInvite: _7, botInfo: _8, pinnedMsgId: _9, folderId: _10, call: _11) - } - else { - return nil - } - } } public enum PollResults: TypeConstructorDescription { @@ -2572,6 +2682,58 @@ public extension Api { } } + } + public enum SchemeMethod: TypeConstructorDescription { + case schemeMethod(id: Int32, method: String, params: [Api.SchemeParam], type: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .schemeMethod(let id, let method, let params, let type): + if boxed { + buffer.appendInt32(1200838592) + } + serializeInt32(id, buffer: buffer, boxed: false) + serializeString(method, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(params.count)) + for item in params { + item.serialize(buffer, true) + } + serializeString(type, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .schemeMethod(let id, let method, let params, let type): + return ("schemeMethod", [("id", id), ("method", method), ("params", params), ("type", type)]) + } + } + + public static func parse_schemeMethod(_ reader: BufferReader) -> SchemeMethod? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: [Api.SchemeParam]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SchemeParam.self) + } + var _4: String? + _4 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.SchemeMethod.schemeMethod(id: _1!, method: _2!, params: _3!, type: _4!) + } + else { + return nil + } + } + } public enum CdnConfig: TypeConstructorDescription { case cdnConfig(publicKeys: [Api.CdnPublicKey]) @@ -2625,20 +2787,20 @@ public extension Api { case pageBlockFooter(text: Api.RichText) case pageBlockDivider case pageBlockAnchor(name: String) + case pageBlockList(items: [Api.PageListItem]) case pageBlockBlockquote(text: Api.RichText, caption: Api.RichText) case pageBlockPullquote(text: Api.RichText, caption: Api.RichText) - case pageBlockCover(cover: Api.PageBlock) - case pageBlockChannel(channel: Api.Chat) - case pageBlockKicker(text: Api.RichText) - case pageBlockTable(flags: Int32, title: Api.RichText, rows: [Api.PageTableRow]) case pageBlockPhoto(flags: Int32, photoId: Int64, caption: Api.PageCaption, url: String?, webpageId: Int64?) case pageBlockVideo(flags: Int32, videoId: Int64, caption: Api.PageCaption) - case pageBlockAudio(audioId: Int64, caption: Api.PageCaption) + case pageBlockCover(cover: Api.PageBlock) case pageBlockEmbed(flags: Int32, url: String?, html: String?, posterPhotoId: Int64?, w: Int32?, h: Int32?, caption: Api.PageCaption) case pageBlockEmbedPost(url: String, webpageId: Int64, authorPhotoId: Int64, author: String, date: Int32, blocks: [Api.PageBlock], caption: Api.PageCaption) case pageBlockCollage(items: [Api.PageBlock], caption: Api.PageCaption) case pageBlockSlideshow(items: [Api.PageBlock], caption: Api.PageCaption) - case pageBlockList(items: [Api.PageListItem]) + case pageBlockChannel(channel: Api.Chat) + case pageBlockAudio(audioId: Int64, caption: Api.PageCaption) + case pageBlockKicker(text: Api.RichText) + case pageBlockTable(flags: Int32, title: Api.RichText, rows: [Api.PageTableRow]) case pageBlockOrderedList(items: [Api.PageListOrderedItem]) case pageBlockDetails(flags: Int32, blocks: [Api.PageBlock], title: Api.RichText) case pageBlockRelatedArticles(title: Api.RichText, articles: [Api.PageRelatedArticle]) @@ -2714,6 +2876,16 @@ public extension Api { } serializeString(name, buffer: buffer, boxed: false) break + case .pageBlockList(let items): + if boxed { + buffer.appendInt32(-454524911) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(items.count)) + for item in items { + item.serialize(buffer, true) + } + break case .pageBlockBlockquote(let text, let caption): if boxed { buffer.appendInt32(641563686) @@ -2728,36 +2900,6 @@ public extension Api { text.serialize(buffer, true) caption.serialize(buffer, true) break - case .pageBlockCover(let cover): - if boxed { - buffer.appendInt32(972174080) - } - cover.serialize(buffer, true) - break - case .pageBlockChannel(let channel): - if boxed { - buffer.appendInt32(-283684427) - } - channel.serialize(buffer, true) - break - case .pageBlockKicker(let text): - if boxed { - buffer.appendInt32(504660880) - } - text.serialize(buffer, true) - break - case .pageBlockTable(let flags, let title, let rows): - if boxed { - buffer.appendInt32(-1085412734) - } - serializeInt32(flags, buffer: buffer, boxed: false) - title.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(rows.count)) - for item in rows { - item.serialize(buffer, true) - } - break case .pageBlockPhoto(let flags, let photoId, let caption, let url, let webpageId): if boxed { buffer.appendInt32(391759200) @@ -2776,12 +2918,11 @@ public extension Api { serializeInt64(videoId, buffer: buffer, boxed: false) caption.serialize(buffer, true) break - case .pageBlockAudio(let audioId, let caption): + case .pageBlockCover(let cover): if boxed { - buffer.appendInt32(-2143067670) + buffer.appendInt32(972174080) } - serializeInt64(audioId, buffer: buffer, boxed: false) - caption.serialize(buffer, true) + cover.serialize(buffer, true) break case .pageBlockEmbed(let flags, let url, let html, let posterPhotoId, let w, let h, let caption): if boxed { @@ -2833,13 +2974,34 @@ public extension Api { } caption.serialize(buffer, true) break - case .pageBlockList(let items): + case .pageBlockChannel(let channel): if boxed { - buffer.appendInt32(-454524911) + buffer.appendInt32(-283684427) } + channel.serialize(buffer, true) + break + case .pageBlockAudio(let audioId, let caption): + if boxed { + buffer.appendInt32(-2143067670) + } + serializeInt64(audioId, buffer: buffer, boxed: false) + caption.serialize(buffer, true) + break + case .pageBlockKicker(let text): + if boxed { + buffer.appendInt32(504660880) + } + text.serialize(buffer, true) + break + case .pageBlockTable(let flags, let title, let rows): + if boxed { + buffer.appendInt32(-1085412734) + } + serializeInt32(flags, buffer: buffer, boxed: false) + title.serialize(buffer, true) buffer.appendInt32(481674261) - buffer.appendInt32(Int32(items.count)) - for item in items { + buffer.appendInt32(Int32(rows.count)) + for item in rows { item.serialize(buffer, true) } break @@ -2913,24 +3075,18 @@ public extension Api { return ("pageBlockDivider", []) case .pageBlockAnchor(let name): return ("pageBlockAnchor", [("name", name)]) + case .pageBlockList(let items): + return ("pageBlockList", [("items", items)]) case .pageBlockBlockquote(let text, let caption): return ("pageBlockBlockquote", [("text", text), ("caption", caption)]) case .pageBlockPullquote(let text, let caption): return ("pageBlockPullquote", [("text", text), ("caption", caption)]) - case .pageBlockCover(let cover): - return ("pageBlockCover", [("cover", cover)]) - case .pageBlockChannel(let channel): - return ("pageBlockChannel", [("channel", channel)]) - case .pageBlockKicker(let text): - return ("pageBlockKicker", [("text", text)]) - case .pageBlockTable(let flags, let title, let rows): - return ("pageBlockTable", [("flags", flags), ("title", title), ("rows", rows)]) case .pageBlockPhoto(let flags, let photoId, let caption, let url, let webpageId): return ("pageBlockPhoto", [("flags", flags), ("photoId", photoId), ("caption", caption), ("url", url), ("webpageId", webpageId)]) case .pageBlockVideo(let flags, let videoId, let caption): return ("pageBlockVideo", [("flags", flags), ("videoId", videoId), ("caption", caption)]) - case .pageBlockAudio(let audioId, let caption): - return ("pageBlockAudio", [("audioId", audioId), ("caption", caption)]) + case .pageBlockCover(let cover): + return ("pageBlockCover", [("cover", cover)]) case .pageBlockEmbed(let flags, let url, let html, let posterPhotoId, let w, let h, let caption): return ("pageBlockEmbed", [("flags", flags), ("url", url), ("html", html), ("posterPhotoId", posterPhotoId), ("w", w), ("h", h), ("caption", caption)]) case .pageBlockEmbedPost(let url, let webpageId, let authorPhotoId, let author, let date, let blocks, let caption): @@ -2939,8 +3095,14 @@ public extension Api { return ("pageBlockCollage", [("items", items), ("caption", caption)]) case .pageBlockSlideshow(let items, let caption): return ("pageBlockSlideshow", [("items", items), ("caption", caption)]) - case .pageBlockList(let items): - return ("pageBlockList", [("items", items)]) + case .pageBlockChannel(let channel): + return ("pageBlockChannel", [("channel", channel)]) + case .pageBlockAudio(let audioId, let caption): + return ("pageBlockAudio", [("audioId", audioId), ("caption", caption)]) + case .pageBlockKicker(let text): + return ("pageBlockKicker", [("text", text)]) + case .pageBlockTable(let flags, let title, let rows): + return ("pageBlockTable", [("flags", flags), ("title", title), ("rows", rows)]) case .pageBlockOrderedList(let items): return ("pageBlockOrderedList", [("items", items)]) case .pageBlockDetails(let flags, let blocks, let title): @@ -3079,6 +3241,19 @@ public extension Api { return nil } } + public static func parse_pageBlockList(_ reader: BufferReader) -> PageBlock? { + var _1: [Api.PageListItem]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageListItem.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.PageBlock.pageBlockList(items: _1!) + } + else { + return nil + } + } public static func parse_pageBlockBlockquote(_ reader: BufferReader) -> PageBlock? { var _1: Api.RichText? if let signature = reader.readInt32() { @@ -3115,66 +3290,6 @@ public extension Api { return nil } } - public static func parse_pageBlockCover(_ reader: BufferReader) -> PageBlock? { - var _1: Api.PageBlock? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.PageBlock - } - let _c1 = _1 != nil - if _c1 { - return Api.PageBlock.pageBlockCover(cover: _1!) - } - else { - return nil - } - } - public static func parse_pageBlockChannel(_ reader: BufferReader) -> PageBlock? { - var _1: Api.Chat? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Chat - } - let _c1 = _1 != nil - if _c1 { - return Api.PageBlock.pageBlockChannel(channel: _1!) - } - else { - return nil - } - } - public static func parse_pageBlockKicker(_ reader: BufferReader) -> PageBlock? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - if _c1 { - return Api.PageBlock.pageBlockKicker(text: _1!) - } - else { - return nil - } - } - public static func parse_pageBlockTable(_ reader: BufferReader) -> PageBlock? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.RichText? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.RichText - } - var _3: [Api.PageTableRow]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageTableRow.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.PageBlock.pageBlockTable(flags: _1!, title: _2!, rows: _3!) - } - else { - return nil - } - } public static func parse_pageBlockPhoto(_ reader: BufferReader) -> PageBlock? { var _1: Int32? _1 = reader.readInt32() @@ -3219,17 +3334,14 @@ public extension Api { return nil } } - public static func parse_pageBlockAudio(_ reader: BufferReader) -> PageBlock? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Api.PageCaption? + public static func parse_pageBlockCover(_ reader: BufferReader) -> PageBlock? { + var _1: Api.PageBlock? if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.PageCaption + _1 = Api.parse(reader, signature: signature) as? Api.PageBlock } let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.PageBlock.pageBlockAudio(audioId: _1!, caption: _2!) + if _c1 { + return Api.PageBlock.pageBlockCover(cover: _1!) } else { return nil @@ -3335,14 +3447,64 @@ public extension Api { return nil } } - public static func parse_pageBlockList(_ reader: BufferReader) -> PageBlock? { - var _1: [Api.PageListItem]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageListItem.self) + public static func parse_pageBlockChannel(_ reader: BufferReader) -> PageBlock? { + var _1: Api.Chat? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Chat } let _c1 = _1 != nil if _c1 { - return Api.PageBlock.pageBlockList(items: _1!) + return Api.PageBlock.pageBlockChannel(channel: _1!) + } + else { + return nil + } + } + public static func parse_pageBlockAudio(_ reader: BufferReader) -> PageBlock? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Api.PageCaption? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.PageCaption + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.PageBlock.pageBlockAudio(audioId: _1!, caption: _2!) + } + else { + return nil + } + } + public static func parse_pageBlockKicker(_ reader: BufferReader) -> PageBlock? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + if _c1 { + return Api.PageBlock.pageBlockKicker(text: _1!) + } + else { + return nil + } + } + public static func parse_pageBlockTable(_ reader: BufferReader) -> PageBlock? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.RichText? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.RichText + } + var _3: [Api.PageTableRow]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageTableRow.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.PageBlock.pageBlockTable(flags: _1!, title: _2!, rows: _3!) } else { return nil @@ -3731,10 +3893,10 @@ public extension Api { } public enum Chat: TypeConstructorDescription { case chatEmpty(id: Int32) - case chatForbidden(id: Int32, title: String) - case channelForbidden(flags: Int32, id: Int32, accessHash: Int64, title: String, untilDate: Int32?) case chat(flags: Int32, id: Int32, title: String, photo: Api.ChatPhoto, participantsCount: Int32, date: Int32, version: Int32, migratedTo: Api.InputChannel?, adminRights: Api.ChatAdminRights?, defaultBannedRights: Api.ChatBannedRights?) + case chatForbidden(id: Int32, title: String) case channel(flags: Int32, id: Int32, accessHash: Int64?, title: String, username: String?, photo: Api.ChatPhoto, date: Int32, version: Int32, restrictionReason: [Api.RestrictionReason]?, adminRights: Api.ChatAdminRights?, bannedRights: Api.ChatBannedRights?, defaultBannedRights: Api.ChatBannedRights?, participantsCount: Int32?) + case channelForbidden(flags: Int32, id: Int32, accessHash: Int64, title: String, untilDate: Int32?) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { @@ -3744,23 +3906,6 @@ public extension Api { } serializeInt32(id, buffer: buffer, boxed: false) break - case .chatForbidden(let id, let title): - if boxed { - buffer.appendInt32(120753115) - } - serializeInt32(id, buffer: buffer, boxed: false) - serializeString(title, buffer: buffer, boxed: false) - break - case .channelForbidden(let flags, let id, let accessHash, let title, let untilDate): - if boxed { - buffer.appendInt32(681420594) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeString(title, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 16) != 0 {serializeInt32(untilDate!, buffer: buffer, boxed: false)} - break case .chat(let flags, let id, let title, let photo, let participantsCount, let date, let version, let migratedTo, let adminRights, let defaultBannedRights): if boxed { buffer.appendInt32(1004149726) @@ -3776,6 +3921,13 @@ public extension Api { if Int(flags) & Int(1 << 14) != 0 {adminRights!.serialize(buffer, true)} if Int(flags) & Int(1 << 18) != 0 {defaultBannedRights!.serialize(buffer, true)} break + case .chatForbidden(let id, let title): + if boxed { + buffer.appendInt32(120753115) + } + serializeInt32(id, buffer: buffer, boxed: false) + serializeString(title, buffer: buffer, boxed: false) + break case .channel(let flags, let id, let accessHash, let title, let username, let photo, let date, let version, let restrictionReason, let adminRights, let bannedRights, let defaultBannedRights, let participantsCount): if boxed { buffer.appendInt32(-753232354) @@ -3798,6 +3950,16 @@ public extension Api { if Int(flags) & Int(1 << 18) != 0 {defaultBannedRights!.serialize(buffer, true)} if Int(flags) & Int(1 << 17) != 0 {serializeInt32(participantsCount!, buffer: buffer, boxed: false)} break + case .channelForbidden(let flags, let id, let accessHash, let title, let untilDate): + if boxed { + buffer.appendInt32(681420594) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeString(title, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 16) != 0 {serializeInt32(untilDate!, buffer: buffer, boxed: false)} + break } } @@ -3805,14 +3967,14 @@ public extension Api { switch self { case .chatEmpty(let id): return ("chatEmpty", [("id", id)]) - case .chatForbidden(let id, let title): - return ("chatForbidden", [("id", id), ("title", title)]) - case .channelForbidden(let flags, let id, let accessHash, let title, let untilDate): - return ("channelForbidden", [("flags", flags), ("id", id), ("accessHash", accessHash), ("title", title), ("untilDate", untilDate)]) case .chat(let flags, let id, let title, let photo, let participantsCount, let date, let version, let migratedTo, let adminRights, let defaultBannedRights): return ("chat", [("flags", flags), ("id", id), ("title", title), ("photo", photo), ("participantsCount", participantsCount), ("date", date), ("version", version), ("migratedTo", migratedTo), ("adminRights", adminRights), ("defaultBannedRights", defaultBannedRights)]) + case .chatForbidden(let id, let title): + return ("chatForbidden", [("id", id), ("title", title)]) case .channel(let flags, let id, let accessHash, let title, let username, let photo, let date, let version, let restrictionReason, let adminRights, let bannedRights, let defaultBannedRights, let participantsCount): return ("channel", [("flags", flags), ("id", id), ("accessHash", accessHash), ("title", title), ("username", username), ("photo", photo), ("date", date), ("version", version), ("restrictionReason", restrictionReason), ("adminRights", adminRights), ("bannedRights", bannedRights), ("defaultBannedRights", defaultBannedRights), ("participantsCount", participantsCount)]) + case .channelForbidden(let flags, let id, let accessHash, let title, let untilDate): + return ("channelForbidden", [("flags", flags), ("id", id), ("accessHash", accessHash), ("title", title), ("untilDate", untilDate)]) } } @@ -3827,43 +3989,6 @@ public extension Api { return nil } } - public static func parse_chatForbidden(_ reader: BufferReader) -> Chat? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Chat.chatForbidden(id: _1!, title: _2!) - } - else { - return nil - } - } - public static func parse_channelForbidden(_ reader: BufferReader) -> Chat? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int64? - _3 = reader.readInt64() - var _4: String? - _4 = parseString(reader) - var _5: Int32? - if Int(_1!) & Int(1 << 16) != 0 {_5 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 16) == 0) || _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.Chat.channelForbidden(flags: _1!, id: _2!, accessHash: _3!, title: _4!, untilDate: _5) - } - else { - return nil - } - } public static func parse_chat(_ reader: BufferReader) -> Chat? { var _1: Int32? _1 = reader.readInt32() @@ -3910,6 +4035,20 @@ public extension Api { return nil } } + public static func parse_chatForbidden(_ reader: BufferReader) -> Chat? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Chat.chatForbidden(id: _1!, title: _2!) + } + else { + return nil + } + } public static func parse_channel(_ reader: BufferReader) -> Chat? { var _1: Int32? _1 = reader.readInt32() @@ -3967,6 +4106,29 @@ public extension Api { return nil } } + public static func parse_channelForbidden(_ reader: BufferReader) -> Chat? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int64? + _3 = reader.readInt64() + var _4: String? + _4 = parseString(reader) + var _5: Int32? + if Int(_1!) & Int(1 << 16) != 0 {_5 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 16) == 0) || _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.Chat.channelForbidden(flags: _1!, id: _2!, accessHash: _3!, title: _4!, untilDate: _5) + } + else { + return nil + } + } } public enum StatsURL: TypeConstructorDescription { @@ -4950,6 +5112,7 @@ public extension Api { public enum InputChannel: TypeConstructorDescription { case inputChannelEmpty case inputChannel(channelId: Int32, accessHash: Int64) + case inputChannelFromMessage(peer: Api.InputPeer, msgId: Int32, channelId: Int32) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { @@ -4966,6 +5129,14 @@ public extension Api { serializeInt32(channelId, buffer: buffer, boxed: false) serializeInt64(accessHash, buffer: buffer, boxed: false) break + case .inputChannelFromMessage(let peer, let msgId, let channelId): + if boxed { + buffer.appendInt32(707290417) + } + peer.serialize(buffer, true) + serializeInt32(msgId, buffer: buffer, boxed: false) + serializeInt32(channelId, buffer: buffer, boxed: false) + break } } @@ -4975,6 +5146,8 @@ public extension Api { return ("inputChannelEmpty", []) case .inputChannel(let channelId, let accessHash): return ("inputChannel", [("channelId", channelId), ("accessHash", accessHash)]) + case .inputChannelFromMessage(let peer, let msgId, let channelId): + return ("inputChannelFromMessage", [("peer", peer), ("msgId", msgId), ("channelId", channelId)]) } } @@ -4995,6 +5168,25 @@ public extension Api { return nil } } + public static func parse_inputChannelFromMessage(_ reader: BufferReader) -> InputChannel? { + var _1: Api.InputPeer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputPeer + } + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.InputChannel.inputChannelFromMessage(peer: _1!, msgId: _2!, channelId: _3!) + } + else { + return nil + } + } } public enum DcOption: TypeConstructorDescription { @@ -5562,13 +5754,13 @@ public extension Api { } public enum GroupCallParticipant: TypeConstructorDescription { - case groupCallParticipant(flags: Int32, userId: Int32, date: Int32, activeDate: Int32?, source: Int32, volume: Int32?) + case groupCallParticipant(flags: Int32, userId: Int32, date: Int32, activeDate: Int32?, source: Int32, volume: Int32?, params: Api.DataJSON?) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .groupCallParticipant(let flags, let userId, let date, let activeDate, let source, let volume): + case .groupCallParticipant(let flags, let userId, let date, let activeDate, let source, let volume, let params): if boxed { - buffer.appendInt32(1690708501) + buffer.appendInt32(2023913382) } serializeInt32(flags, buffer: buffer, boxed: false) serializeInt32(userId, buffer: buffer, boxed: false) @@ -5576,14 +5768,15 @@ public extension Api { if Int(flags) & Int(1 << 3) != 0 {serializeInt32(activeDate!, buffer: buffer, boxed: false)} serializeInt32(source, buffer: buffer, boxed: false) if Int(flags) & Int(1 << 7) != 0 {serializeInt32(volume!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 6) != 0 {params!.serialize(buffer, true)} break } } public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .groupCallParticipant(let flags, let userId, let date, let activeDate, let source, let volume): - return ("groupCallParticipant", [("flags", flags), ("userId", userId), ("date", date), ("activeDate", activeDate), ("source", source), ("volume", volume)]) + case .groupCallParticipant(let flags, let userId, let date, let activeDate, let source, let volume, let params): + return ("groupCallParticipant", [("flags", flags), ("userId", userId), ("date", date), ("activeDate", activeDate), ("source", source), ("volume", volume), ("params", params)]) } } @@ -5600,14 +5793,65 @@ public extension Api { _5 = reader.readInt32() var _6: Int32? if Int(_1!) & Int(1 << 7) != 0 {_6 = reader.readInt32() } + var _7: Api.DataJSON? + if Int(_1!) & Int(1 << 6) != 0 {if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.DataJSON + } } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil let _c5 = _5 != nil let _c6 = (Int(_1!) & Int(1 << 7) == 0) || _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.GroupCallParticipant.groupCallParticipant(flags: _1!, userId: _2!, date: _3!, activeDate: _4, source: _5!, volume: _6) + let _c7 = (Int(_1!) & Int(1 << 6) == 0) || _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.GroupCallParticipant.groupCallParticipant(flags: _1!, userId: _2!, date: _3!, activeDate: _4, source: _5!, volume: _6, params: _7) + } + else { + return nil + } + } + + } + public enum SavedContact: TypeConstructorDescription { + case savedPhoneContact(phone: String, firstName: String, lastName: String, date: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .savedPhoneContact(let phone, let firstName, let lastName, let date): + if boxed { + buffer.appendInt32(289586518) + } + serializeString(phone, buffer: buffer, boxed: false) + serializeString(firstName, buffer: buffer, boxed: false) + serializeString(lastName, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .savedPhoneContact(let phone, let firstName, let lastName, let date): + return ("savedPhoneContact", [("phone", phone), ("firstName", firstName), ("lastName", lastName), ("date", date)]) + } + } + + public static func parse_savedPhoneContact(_ reader: BufferReader) -> SavedContact? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: Int32? + _4 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.SavedContact.savedPhoneContact(phone: _1!, firstName: _2!, lastName: _3!, date: _4!) } else { return nil @@ -6508,12 +6752,14 @@ public extension Api { case updateServiceNotification(flags: Int32, inboxDate: Int32?, type: String, message: String, media: Api.MessageMedia, entities: [Api.MessageEntity]) case updatePrivacy(key: Api.PrivacyKey, rules: [Api.PrivacyRule]) case updateUserPhone(userId: Int32, phone: String) + case updateReadHistoryInbox(flags: Int32, folderId: Int32?, peer: Api.Peer, maxId: Int32, stillUnreadCount: Int32, pts: Int32, ptsCount: Int32) case updateReadHistoryOutbox(peer: Api.Peer, maxId: Int32, pts: Int32, ptsCount: Int32) case updateWebPage(webpage: Api.WebPage, pts: Int32, ptsCount: Int32) case updateReadMessagesContents(messages: [Int32], pts: Int32, ptsCount: Int32) case updateChannelTooLong(flags: Int32, channelId: Int32, pts: Int32?) case updateChannel(channelId: Int32) case updateNewChannelMessage(message: Api.Message, pts: Int32, ptsCount: Int32) + case updateReadChannelInbox(flags: Int32, folderId: Int32?, channelId: Int32, maxId: Int32, stillUnreadCount: Int32, pts: Int32) case updateDeleteChannelMessages(channelId: Int32, messages: [Int32], pts: Int32, ptsCount: Int32) case updateChannelMessageViews(channelId: Int32, id: Int32, views: Int32) case updateChatParticipantAdmin(chatId: Int32, userId: Int32, isAdmin: Api.Bool, version: Int32) @@ -6521,6 +6767,7 @@ public extension Api { case updateStickerSetsOrder(flags: Int32, order: [Int64]) case updateStickerSets case updateSavedGifs + case updateBotInlineQuery(flags: Int32, queryId: Int64, userId: Int32, query: String, geo: Api.GeoPoint?, peerType: Api.InlineQueryPeerType?, offset: String) case updateBotInlineSend(flags: Int32, userId: Int32, query: String, geo: Api.GeoPoint?, id: String, msgId: Api.InputBotInlineMessageID?) case updateEditChannelMessage(message: Api.Message, pts: Int32, ptsCount: Int32) case updateBotCallbackQuery(flags: Int32, queryId: Int64, userId: Int32, peer: Api.Peer, msgId: Int32, chatInstance: Int64, data: Buffer?, gameShortName: String?) @@ -6533,25 +6780,23 @@ public extension Api { case updateConfig case updatePtsChanged case updateChannelWebPage(channelId: Int32, webpage: Api.WebPage, pts: Int32, ptsCount: Int32) + case updateDialogPinned(flags: Int32, folderId: Int32?, peer: Api.DialogPeer) + case updatePinnedDialogs(flags: Int32, folderId: Int32?, order: [Api.DialogPeer]?) case updateBotWebhookJSON(data: Api.DataJSON) case updateBotWebhookJSONQuery(queryId: Int64, data: Api.DataJSON, timeout: Int32) case updateBotShippingQuery(queryId: Int64, userId: Int32, payload: Buffer, shippingAddress: Api.PostAddress) case updateBotPrecheckoutQuery(flags: Int32, queryId: Int64, userId: Int32, payload: Buffer, info: Api.PaymentRequestedInfo?, shippingOptionId: String?, currency: String, totalAmount: Int64) case updatePhoneCall(phoneCall: Api.PhoneCall) + case updateLangPackTooLong(langCode: String) case updateLangPack(difference: Api.LangPackDifference) case updateFavedStickers case updateChannelReadMessagesContents(channelId: Int32, messages: [Int32]) case updateContactsReset case updateChannelAvailableMessages(channelId: Int32, availableMinId: Int32) case updateDialogUnreadMark(flags: Int32, peer: Api.DialogPeer) - case updateLangPackTooLong(langCode: String) case updateMessagePoll(flags: Int32, pollId: Int64, poll: Api.Poll?, results: Api.PollResults) case updateChatDefaultBannedRights(peer: Api.Peer, defaultBannedRights: Api.ChatBannedRights, version: Int32) case updateFolderPeers(folderPeers: [Api.FolderPeer], pts: Int32, ptsCount: Int32) - case updateDialogPinned(flags: Int32, folderId: Int32?, peer: Api.DialogPeer) - case updatePinnedDialogs(flags: Int32, folderId: Int32?, order: [Api.DialogPeer]?) - case updateReadChannelInbox(flags: Int32, folderId: Int32?, channelId: Int32, maxId: Int32, stillUnreadCount: Int32, pts: Int32) - case updateReadHistoryInbox(flags: Int32, folderId: Int32?, peer: Api.Peer, maxId: Int32, stillUnreadCount: Int32, pts: Int32, ptsCount: Int32) case updatePeerSettings(peer: Api.Peer, settings: Api.PeerSettings) case updatePeerLocated(peers: [Api.PeerLocated]) case updateNewScheduledMessage(message: Api.Message) @@ -6575,7 +6820,6 @@ public extension Api { case updateChat(chatId: Int32) case updateGroupCallParticipants(call: Api.InputGroupCall, participants: [Api.GroupCallParticipant], version: Int32) case updateGroupCall(chatId: Int32, call: Api.GroupCall) - case updateBotInlineQuery(flags: Int32, queryId: Int64, userId: Int32, query: String, geo: Api.GeoPoint?, peerType: Api.InlineQueryPeerType?, offset: String) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { @@ -6748,6 +6992,18 @@ public extension Api { serializeInt32(userId, buffer: buffer, boxed: false) serializeString(phone, buffer: buffer, boxed: false) break + case .updateReadHistoryInbox(let flags, let folderId, let peer, let maxId, let stillUnreadCount, let pts, let ptsCount): + if boxed { + buffer.appendInt32(-1667805217) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} + peer.serialize(buffer, true) + serializeInt32(maxId, buffer: buffer, boxed: false) + serializeInt32(stillUnreadCount, buffer: buffer, boxed: false) + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(ptsCount, buffer: buffer, boxed: false) + break case .updateReadHistoryOutbox(let peer, let maxId, let pts, let ptsCount): if boxed { buffer.appendInt32(791617983) @@ -6799,6 +7055,17 @@ public extension Api { serializeInt32(pts, buffer: buffer, boxed: false) serializeInt32(ptsCount, buffer: buffer, boxed: false) break + case .updateReadChannelInbox(let flags, let folderId, let channelId, let maxId, let stillUnreadCount, let pts): + if boxed { + buffer.appendInt32(856380452) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} + serializeInt32(channelId, buffer: buffer, boxed: false) + serializeInt32(maxId, buffer: buffer, boxed: false) + serializeInt32(stillUnreadCount, buffer: buffer, boxed: false) + serializeInt32(pts, buffer: buffer, boxed: false) + break case .updateDeleteChannelMessages(let channelId, let messages, let pts, let ptsCount): if boxed { buffer.appendInt32(-1015733815) @@ -6857,6 +7124,18 @@ public extension Api { buffer.appendInt32(-1821035490) } + break + case .updateBotInlineQuery(let flags, let queryId, let userId, let query, let geo, let peerType, let offset): + if boxed { + buffer.appendInt32(1059076315) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(queryId, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + serializeString(query, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {geo!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {peerType!.serialize(buffer, true)} + serializeString(offset, buffer: buffer, boxed: false) break case .updateBotInlineSend(let flags, let userId, let query, let geo, let id, let msgId): if boxed { @@ -6957,6 +7236,26 @@ public extension Api { serializeInt32(pts, buffer: buffer, boxed: false) serializeInt32(ptsCount, buffer: buffer, boxed: false) break + case .updateDialogPinned(let flags, let folderId, let peer): + if boxed { + buffer.appendInt32(1852826908) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} + peer.serialize(buffer, true) + break + case .updatePinnedDialogs(let flags, let folderId, let order): + if boxed { + buffer.appendInt32(-99664734) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 0) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(order!.count)) + for item in order! { + item.serialize(buffer, true) + }} + break case .updateBotWebhookJSON(let data): if boxed { buffer.appendInt32(-2095595325) @@ -6999,6 +7298,12 @@ public extension Api { } phoneCall.serialize(buffer, true) break + case .updateLangPackTooLong(let langCode): + if boxed { + buffer.appendInt32(1180041828) + } + serializeString(langCode, buffer: buffer, boxed: false) + break case .updateLangPack(let difference): if boxed { buffer.appendInt32(1442983757) @@ -7042,12 +7347,6 @@ public extension Api { serializeInt32(flags, buffer: buffer, boxed: false) peer.serialize(buffer, true) break - case .updateLangPackTooLong(let langCode): - if boxed { - buffer.appendInt32(1180041828) - } - serializeString(langCode, buffer: buffer, boxed: false) - break case .updateMessagePoll(let flags, let pollId, let poll, let results): if boxed { buffer.appendInt32(-1398708869) @@ -7077,49 +7376,6 @@ public extension Api { serializeInt32(pts, buffer: buffer, boxed: false) serializeInt32(ptsCount, buffer: buffer, boxed: false) break - case .updateDialogPinned(let flags, let folderId, let peer): - if boxed { - buffer.appendInt32(1852826908) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} - peer.serialize(buffer, true) - break - case .updatePinnedDialogs(let flags, let folderId, let order): - if boxed { - buffer.appendInt32(-99664734) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 0) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(order!.count)) - for item in order! { - item.serialize(buffer, true) - }} - break - case .updateReadChannelInbox(let flags, let folderId, let channelId, let maxId, let stillUnreadCount, let pts): - if boxed { - buffer.appendInt32(856380452) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} - serializeInt32(channelId, buffer: buffer, boxed: false) - serializeInt32(maxId, buffer: buffer, boxed: false) - serializeInt32(stillUnreadCount, buffer: buffer, boxed: false) - serializeInt32(pts, buffer: buffer, boxed: false) - break - case .updateReadHistoryInbox(let flags, let folderId, let peer, let maxId, let stillUnreadCount, let pts, let ptsCount): - if boxed { - buffer.appendInt32(-1667805217) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} - peer.serialize(buffer, true) - serializeInt32(maxId, buffer: buffer, boxed: false) - serializeInt32(stillUnreadCount, buffer: buffer, boxed: false) - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(ptsCount, buffer: buffer, boxed: false) - break case .updatePeerSettings(let peer, let settings): if boxed { buffer.appendInt32(1786671974) @@ -7325,18 +7581,6 @@ public extension Api { serializeInt32(chatId, buffer: buffer, boxed: false) call.serialize(buffer, true) break - case .updateBotInlineQuery(let flags, let queryId, let userId, let query, let geo, let peerType, let offset): - if boxed { - buffer.appendInt32(1059076315) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(queryId, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - serializeString(query, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {geo!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {peerType!.serialize(buffer, true)} - serializeString(offset, buffer: buffer, boxed: false) - break } } @@ -7382,6 +7626,8 @@ public extension Api { return ("updatePrivacy", [("key", key), ("rules", rules)]) case .updateUserPhone(let userId, let phone): return ("updateUserPhone", [("userId", userId), ("phone", phone)]) + case .updateReadHistoryInbox(let flags, let folderId, let peer, let maxId, let stillUnreadCount, let pts, let ptsCount): + return ("updateReadHistoryInbox", [("flags", flags), ("folderId", folderId), ("peer", peer), ("maxId", maxId), ("stillUnreadCount", stillUnreadCount), ("pts", pts), ("ptsCount", ptsCount)]) case .updateReadHistoryOutbox(let peer, let maxId, let pts, let ptsCount): return ("updateReadHistoryOutbox", [("peer", peer), ("maxId", maxId), ("pts", pts), ("ptsCount", ptsCount)]) case .updateWebPage(let webpage, let pts, let ptsCount): @@ -7394,6 +7640,8 @@ public extension Api { return ("updateChannel", [("channelId", channelId)]) case .updateNewChannelMessage(let message, let pts, let ptsCount): return ("updateNewChannelMessage", [("message", message), ("pts", pts), ("ptsCount", ptsCount)]) + case .updateReadChannelInbox(let flags, let folderId, let channelId, let maxId, let stillUnreadCount, let pts): + return ("updateReadChannelInbox", [("flags", flags), ("folderId", folderId), ("channelId", channelId), ("maxId", maxId), ("stillUnreadCount", stillUnreadCount), ("pts", pts)]) case .updateDeleteChannelMessages(let channelId, let messages, let pts, let ptsCount): return ("updateDeleteChannelMessages", [("channelId", channelId), ("messages", messages), ("pts", pts), ("ptsCount", ptsCount)]) case .updateChannelMessageViews(let channelId, let id, let views): @@ -7408,6 +7656,8 @@ public extension Api { return ("updateStickerSets", []) case .updateSavedGifs: return ("updateSavedGifs", []) + case .updateBotInlineQuery(let flags, let queryId, let userId, let query, let geo, let peerType, let offset): + return ("updateBotInlineQuery", [("flags", flags), ("queryId", queryId), ("userId", userId), ("query", query), ("geo", geo), ("peerType", peerType), ("offset", offset)]) case .updateBotInlineSend(let flags, let userId, let query, let geo, let id, let msgId): return ("updateBotInlineSend", [("flags", flags), ("userId", userId), ("query", query), ("geo", geo), ("id", id), ("msgId", msgId)]) case .updateEditChannelMessage(let message, let pts, let ptsCount): @@ -7432,6 +7682,10 @@ public extension Api { return ("updatePtsChanged", []) case .updateChannelWebPage(let channelId, let webpage, let pts, let ptsCount): return ("updateChannelWebPage", [("channelId", channelId), ("webpage", webpage), ("pts", pts), ("ptsCount", ptsCount)]) + case .updateDialogPinned(let flags, let folderId, let peer): + return ("updateDialogPinned", [("flags", flags), ("folderId", folderId), ("peer", peer)]) + case .updatePinnedDialogs(let flags, let folderId, let order): + return ("updatePinnedDialogs", [("flags", flags), ("folderId", folderId), ("order", order)]) case .updateBotWebhookJSON(let data): return ("updateBotWebhookJSON", [("data", data)]) case .updateBotWebhookJSONQuery(let queryId, let data, let timeout): @@ -7442,6 +7696,8 @@ public extension Api { return ("updateBotPrecheckoutQuery", [("flags", flags), ("queryId", queryId), ("userId", userId), ("payload", payload), ("info", info), ("shippingOptionId", shippingOptionId), ("currency", currency), ("totalAmount", totalAmount)]) case .updatePhoneCall(let phoneCall): return ("updatePhoneCall", [("phoneCall", phoneCall)]) + case .updateLangPackTooLong(let langCode): + return ("updateLangPackTooLong", [("langCode", langCode)]) case .updateLangPack(let difference): return ("updateLangPack", [("difference", difference)]) case .updateFavedStickers: @@ -7454,22 +7710,12 @@ public extension Api { return ("updateChannelAvailableMessages", [("channelId", channelId), ("availableMinId", availableMinId)]) case .updateDialogUnreadMark(let flags, let peer): return ("updateDialogUnreadMark", [("flags", flags), ("peer", peer)]) - case .updateLangPackTooLong(let langCode): - return ("updateLangPackTooLong", [("langCode", langCode)]) case .updateMessagePoll(let flags, let pollId, let poll, let results): return ("updateMessagePoll", [("flags", flags), ("pollId", pollId), ("poll", poll), ("results", results)]) case .updateChatDefaultBannedRights(let peer, let defaultBannedRights, let version): return ("updateChatDefaultBannedRights", [("peer", peer), ("defaultBannedRights", defaultBannedRights), ("version", version)]) case .updateFolderPeers(let folderPeers, let pts, let ptsCount): return ("updateFolderPeers", [("folderPeers", folderPeers), ("pts", pts), ("ptsCount", ptsCount)]) - case .updateDialogPinned(let flags, let folderId, let peer): - return ("updateDialogPinned", [("flags", flags), ("folderId", folderId), ("peer", peer)]) - case .updatePinnedDialogs(let flags, let folderId, let order): - return ("updatePinnedDialogs", [("flags", flags), ("folderId", folderId), ("order", order)]) - case .updateReadChannelInbox(let flags, let folderId, let channelId, let maxId, let stillUnreadCount, let pts): - return ("updateReadChannelInbox", [("flags", flags), ("folderId", folderId), ("channelId", channelId), ("maxId", maxId), ("stillUnreadCount", stillUnreadCount), ("pts", pts)]) - case .updateReadHistoryInbox(let flags, let folderId, let peer, let maxId, let stillUnreadCount, let pts, let ptsCount): - return ("updateReadHistoryInbox", [("flags", flags), ("folderId", folderId), ("peer", peer), ("maxId", maxId), ("stillUnreadCount", stillUnreadCount), ("pts", pts), ("ptsCount", ptsCount)]) case .updatePeerSettings(let peer, let settings): return ("updatePeerSettings", [("peer", peer), ("settings", settings)]) case .updatePeerLocated(let peers): @@ -7516,8 +7762,6 @@ public extension Api { return ("updateGroupCallParticipants", [("call", call), ("participants", participants), ("version", version)]) case .updateGroupCall(let chatId, let call): return ("updateGroupCall", [("chatId", chatId), ("call", call)]) - case .updateBotInlineQuery(let flags, let queryId, let userId, let query, let geo, let peerType, let offset): - return ("updateBotInlineQuery", [("flags", flags), ("queryId", queryId), ("userId", userId), ("query", query), ("geo", geo), ("peerType", peerType), ("offset", offset)]) } } @@ -7874,6 +8118,37 @@ public extension Api { return nil } } + public static func parse_updateReadHistoryInbox(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } + var _3: Api.Peer? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + var _6: Int32? + _6 = reader.readInt32() + var _7: Int32? + _7 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.Update.updateReadHistoryInbox(flags: _1!, folderId: _2, peer: _3!, maxId: _4!, stillUnreadCount: _5!, pts: _6!, ptsCount: _7!) + } + else { + return nil + } + } public static func parse_updateReadHistoryOutbox(_ reader: BufferReader) -> Update? { var _1: Api.Peer? if let signature = reader.readInt32() { @@ -7981,6 +8256,32 @@ public extension Api { return nil } } + public static func parse_updateReadChannelInbox(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + var _6: Int32? + _6 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.Update.updateReadChannelInbox(flags: _1!, folderId: _2, channelId: _3!, maxId: _4!, stillUnreadCount: _5!, pts: _6!) + } + else { + return nil + } + } public static func parse_updateDeleteChannelMessages(_ reader: BufferReader) -> Update? { var _1: Int32? _1 = reader.readInt32() @@ -8077,6 +8378,39 @@ public extension Api { public static func parse_updateSavedGifs(_ reader: BufferReader) -> Update? { return Api.Update.updateSavedGifs } + public static func parse_updateBotInlineQuery(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Int32? + _3 = reader.readInt32() + var _4: String? + _4 = parseString(reader) + var _5: Api.GeoPoint? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.GeoPoint + } } + var _6: Api.InlineQueryPeerType? + if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.InlineQueryPeerType + } } + var _7: String? + _7 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c7 = _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.Update.updateBotInlineQuery(flags: _1!, queryId: _2!, userId: _3!, query: _4!, geo: _5, peerType: _6, offset: _7!) + } + else { + return nil + } + } public static func parse_updateBotInlineSend(_ reader: BufferReader) -> Update? { var _1: Int32? _1 = reader.readInt32() @@ -8276,6 +8610,44 @@ public extension Api { return nil } } + public static func parse_updateDialogPinned(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_2 = reader.readInt32() } + var _3: Api.DialogPeer? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.DialogPeer + } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateDialogPinned(flags: _1!, folderId: _2, peer: _3!) + } + else { + return nil + } + } + public static func parse_updatePinnedDialogs(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_2 = reader.readInt32() } + var _3: [Api.DialogPeer]? + if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DialogPeer.self) + } } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updatePinnedDialogs(flags: _1!, folderId: _2, order: _3) + } + else { + return nil + } + } public static func parse_updateBotWebhookJSON(_ reader: BufferReader) -> Update? { var _1: Api.DataJSON? if let signature = reader.readInt32() { @@ -8377,6 +8749,17 @@ public extension Api { return nil } } + public static func parse_updateLangPackTooLong(_ reader: BufferReader) -> Update? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.Update.updateLangPackTooLong(langCode: _1!) + } + else { + return nil + } + } public static func parse_updateLangPack(_ reader: BufferReader) -> Update? { var _1: Api.LangPackDifference? if let signature = reader.readInt32() { @@ -8442,17 +8825,6 @@ public extension Api { return nil } } - public static func parse_updateLangPackTooLong(_ reader: BufferReader) -> Update? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.Update.updateLangPackTooLong(langCode: _1!) - } - else { - return nil - } - } public static func parse_updateMessagePoll(_ reader: BufferReader) -> Update? { var _1: Int32? _1 = reader.readInt32() @@ -8517,101 +8889,6 @@ public extension Api { return nil } } - public static func parse_updateDialogPinned(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_2 = reader.readInt32() } - var _3: Api.DialogPeer? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.DialogPeer - } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateDialogPinned(flags: _1!, folderId: _2, peer: _3!) - } - else { - return nil - } - } - public static func parse_updatePinnedDialogs(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_2 = reader.readInt32() } - var _3: [Api.DialogPeer]? - if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DialogPeer.self) - } } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updatePinnedDialogs(flags: _1!, folderId: _2, order: _3) - } - else { - return nil - } - } - public static func parse_updateReadChannelInbox(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - var _6: Int32? - _6 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.Update.updateReadChannelInbox(flags: _1!, folderId: _2, channelId: _3!, maxId: _4!, stillUnreadCount: _5!, pts: _6!) - } - else { - return nil - } - } - public static func parse_updateReadHistoryInbox(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } - var _3: Api.Peer? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - var _6: Int32? - _6 = reader.readInt32() - var _7: Int32? - _7 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.Update.updateReadHistoryInbox(flags: _1!, folderId: _2, peer: _3!, maxId: _4!, stillUnreadCount: _5!, pts: _6!, ptsCount: _7!) - } - else { - return nil - } - } public static func parse_updatePeerSettings(_ reader: BufferReader) -> Update? { var _1: Api.Peer? if let signature = reader.readInt32() { @@ -9010,39 +9287,6 @@ public extension Api { return nil } } - public static func parse_updateBotInlineQuery(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Int32? - _3 = reader.readInt32() - var _4: String? - _4 = parseString(reader) - var _5: Api.GeoPoint? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.GeoPoint - } } - var _6: Api.InlineQueryPeerType? - if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.InlineQueryPeerType - } } - var _7: String? - _7 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil - let _c7 = _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.Update.updateBotInlineQuery(flags: _1!, queryId: _2!, userId: _3!, query: _4!, geo: _5, peerType: _6, offset: _7!) - } - else { - return nil - } - } } public enum PopularContact: TypeConstructorDescription { @@ -9126,9 +9370,9 @@ public extension Api { public enum ChannelParticipant: TypeConstructorDescription { case channelParticipant(userId: Int32, date: Int32) case channelParticipantSelf(userId: Int32, inviterId: Int32, date: Int32) - case channelParticipantBanned(flags: Int32, userId: Int32, kickedBy: Int32, date: Int32, bannedRights: Api.ChatBannedRights) - case channelParticipantAdmin(flags: Int32, userId: Int32, inviterId: Int32?, promotedBy: Int32, date: Int32, adminRights: Api.ChatAdminRights, rank: String?) case channelParticipantCreator(flags: Int32, userId: Int32, adminRights: Api.ChatAdminRights, rank: String?) + case channelParticipantAdmin(flags: Int32, userId: Int32, inviterId: Int32?, promotedBy: Int32, date: Int32, adminRights: Api.ChatAdminRights, rank: String?) + case channelParticipantBanned(flags: Int32, userId: Int32, kickedBy: Int32, date: Int32, bannedRights: Api.ChatBannedRights) case channelParticipantLeft(userId: Int32) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { @@ -9148,15 +9392,14 @@ public extension Api { serializeInt32(inviterId, buffer: buffer, boxed: false) serializeInt32(date, buffer: buffer, boxed: false) break - case .channelParticipantBanned(let flags, let userId, let kickedBy, let date, let bannedRights): + case .channelParticipantCreator(let flags, let userId, let adminRights, let rank): if boxed { - buffer.appendInt32(470789295) + buffer.appendInt32(1149094475) } serializeInt32(flags, buffer: buffer, boxed: false) serializeInt32(userId, buffer: buffer, boxed: false) - serializeInt32(kickedBy, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - bannedRights.serialize(buffer, true) + adminRights.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeString(rank!, buffer: buffer, boxed: false)} break case .channelParticipantAdmin(let flags, let userId, let inviterId, let promotedBy, let date, let adminRights, let rank): if boxed { @@ -9170,14 +9413,15 @@ public extension Api { adminRights.serialize(buffer, true) if Int(flags) & Int(1 << 2) != 0 {serializeString(rank!, buffer: buffer, boxed: false)} break - case .channelParticipantCreator(let flags, let userId, let adminRights, let rank): + case .channelParticipantBanned(let flags, let userId, let kickedBy, let date, let bannedRights): if boxed { - buffer.appendInt32(1149094475) + buffer.appendInt32(470789295) } serializeInt32(flags, buffer: buffer, boxed: false) serializeInt32(userId, buffer: buffer, boxed: false) - adminRights.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeString(rank!, buffer: buffer, boxed: false)} + serializeInt32(kickedBy, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + bannedRights.serialize(buffer, true) break case .channelParticipantLeft(let userId): if boxed { @@ -9194,12 +9438,12 @@ public extension Api { return ("channelParticipant", [("userId", userId), ("date", date)]) case .channelParticipantSelf(let userId, let inviterId, let date): return ("channelParticipantSelf", [("userId", userId), ("inviterId", inviterId), ("date", date)]) - case .channelParticipantBanned(let flags, let userId, let kickedBy, let date, let bannedRights): - return ("channelParticipantBanned", [("flags", flags), ("userId", userId), ("kickedBy", kickedBy), ("date", date), ("bannedRights", bannedRights)]) - case .channelParticipantAdmin(let flags, let userId, let inviterId, let promotedBy, let date, let adminRights, let rank): - return ("channelParticipantAdmin", [("flags", flags), ("userId", userId), ("inviterId", inviterId), ("promotedBy", promotedBy), ("date", date), ("adminRights", adminRights), ("rank", rank)]) case .channelParticipantCreator(let flags, let userId, let adminRights, let rank): return ("channelParticipantCreator", [("flags", flags), ("userId", userId), ("adminRights", adminRights), ("rank", rank)]) + case .channelParticipantAdmin(let flags, let userId, let inviterId, let promotedBy, let date, let adminRights, let rank): + return ("channelParticipantAdmin", [("flags", flags), ("userId", userId), ("inviterId", inviterId), ("promotedBy", promotedBy), ("date", date), ("adminRights", adminRights), ("rank", rank)]) + case .channelParticipantBanned(let flags, let userId, let kickedBy, let date, let bannedRights): + return ("channelParticipantBanned", [("flags", flags), ("userId", userId), ("kickedBy", kickedBy), ("date", date), ("bannedRights", bannedRights)]) case .channelParticipantLeft(let userId): return ("channelParticipantLeft", [("userId", userId)]) } @@ -9236,26 +9480,23 @@ public extension Api { return nil } } - public static func parse_channelParticipantBanned(_ reader: BufferReader) -> ChannelParticipant? { + public static func parse_channelParticipantCreator(_ reader: BufferReader) -> ChannelParticipant? { var _1: Int32? _1 = reader.readInt32() var _2: Int32? _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Api.ChatBannedRights? + var _3: Api.ChatAdminRights? if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.ChatBannedRights + _3 = Api.parse(reader, signature: signature) as? Api.ChatAdminRights } + var _4: String? + if Int(_1!) & Int(1 << 0) != 0 {_4 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.ChannelParticipant.channelParticipantBanned(flags: _1!, userId: _2!, kickedBy: _3!, date: _4!, bannedRights: _5!) + let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.ChannelParticipant.channelParticipantCreator(flags: _1!, userId: _2!, adminRights: _3!, rank: _4) } else { return nil @@ -9292,23 +9533,26 @@ public extension Api { return nil } } - public static func parse_channelParticipantCreator(_ reader: BufferReader) -> ChannelParticipant? { + public static func parse_channelParticipantBanned(_ reader: BufferReader) -> ChannelParticipant? { var _1: Int32? _1 = reader.readInt32() var _2: Int32? _2 = reader.readInt32() - var _3: Api.ChatAdminRights? + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Api.ChatBannedRights? if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.ChatAdminRights + _5 = Api.parse(reader, signature: signature) as? Api.ChatBannedRights } - var _4: String? - if Int(_1!) & Int(1 << 0) != 0 {_4 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.ChannelParticipant.channelParticipantCreator(flags: _1!, userId: _2!, adminRights: _3!, rank: _4) + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.ChannelParticipant.channelParticipantBanned(flags: _1!, userId: _2!, kickedBy: _3!, date: _4!, bannedRights: _5!) } else { return nil @@ -9482,48 +9726,11 @@ public extension Api { } } - } - public enum Error: TypeConstructorDescription { - case error(code: Int32, text: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .error(let code, let text): - if boxed { - buffer.appendInt32(-994444869) - } - serializeInt32(code, buffer: buffer, boxed: false) - serializeString(text, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .error(let code, let text): - return ("error", [("code", code), ("text", text)]) - } - } - - public static func parse_error(_ reader: BufferReader) -> Error? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Error.error(code: _1!, text: _2!) - } - else { - return nil - } - } - } public enum KeyboardButton: TypeConstructorDescription { case keyboardButton(text: String) case keyboardButtonUrl(text: String, url: String) + case keyboardButtonCallback(flags: Int32, text: String, data: Buffer) case keyboardButtonRequestPhone(text: String) case keyboardButtonRequestGeoLocation(text: String) case keyboardButtonSwitchInline(flags: Int32, text: String, query: String) @@ -9532,7 +9739,6 @@ public extension Api { case keyboardButtonUrlAuth(flags: Int32, text: String, fwdText: String?, url: String, buttonId: Int32) case inputKeyboardButtonUrlAuth(flags: Int32, text: String, fwdText: String?, url: String, bot: Api.InputUser) case keyboardButtonRequestPoll(flags: Int32, quiz: Api.Bool?, text: String) - case keyboardButtonCallback(flags: Int32, text: String, data: Buffer) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { @@ -9549,6 +9755,14 @@ public extension Api { serializeString(text, buffer: buffer, boxed: false) serializeString(url, buffer: buffer, boxed: false) break + case .keyboardButtonCallback(let flags, let text, let data): + if boxed { + buffer.appendInt32(901503851) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(text, buffer: buffer, boxed: false) + serializeBytes(data, buffer: buffer, boxed: false) + break case .keyboardButtonRequestPhone(let text): if boxed { buffer.appendInt32(-1318425559) @@ -9609,14 +9823,6 @@ public extension Api { if Int(flags) & Int(1 << 0) != 0 {quiz!.serialize(buffer, true)} serializeString(text, buffer: buffer, boxed: false) break - case .keyboardButtonCallback(let flags, let text, let data): - if boxed { - buffer.appendInt32(901503851) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(text, buffer: buffer, boxed: false) - serializeBytes(data, buffer: buffer, boxed: false) - break } } @@ -9626,6 +9832,8 @@ public extension Api { return ("keyboardButton", [("text", text)]) case .keyboardButtonUrl(let text, let url): return ("keyboardButtonUrl", [("text", text), ("url", url)]) + case .keyboardButtonCallback(let flags, let text, let data): + return ("keyboardButtonCallback", [("flags", flags), ("text", text), ("data", data)]) case .keyboardButtonRequestPhone(let text): return ("keyboardButtonRequestPhone", [("text", text)]) case .keyboardButtonRequestGeoLocation(let text): @@ -9642,8 +9850,6 @@ public extension Api { return ("inputKeyboardButtonUrlAuth", [("flags", flags), ("text", text), ("fwdText", fwdText), ("url", url), ("bot", bot)]) case .keyboardButtonRequestPoll(let flags, let quiz, let text): return ("keyboardButtonRequestPoll", [("flags", flags), ("quiz", quiz), ("text", text)]) - case .keyboardButtonCallback(let flags, let text, let data): - return ("keyboardButtonCallback", [("flags", flags), ("text", text), ("data", data)]) } } @@ -9672,6 +9878,23 @@ public extension Api { return nil } } + public static func parse_keyboardButtonCallback(_ reader: BufferReader) -> KeyboardButton? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: Buffer? + _3 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.KeyboardButton.keyboardButtonCallback(flags: _1!, text: _2!, data: _3!) + } + else { + return nil + } + } public static func parse_keyboardButtonRequestPhone(_ reader: BufferReader) -> KeyboardButton? { var _1: String? _1 = parseString(reader) @@ -9800,23 +10023,6 @@ public extension Api { return nil } } - public static func parse_keyboardButtonCallback(_ reader: BufferReader) -> KeyboardButton? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: Buffer? - _3 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.KeyboardButton.keyboardButtonCallback(flags: _1!, text: _2!, data: _3!) - } - else { - return nil - } - } } public enum ContactStatus: TypeConstructorDescription { @@ -10366,13 +10572,19 @@ public extension Api { } public enum InputNotifyPeer: TypeConstructorDescription { + case inputNotifyPeer(peer: Api.InputPeer) case inputNotifyUsers case inputNotifyChats case inputNotifyBroadcasts - case inputNotifyPeer(peer: Api.InputPeer) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { + case .inputNotifyPeer(let peer): + if boxed { + buffer.appendInt32(-1195615476) + } + peer.serialize(buffer, true) + break case .inputNotifyUsers: if boxed { buffer.appendInt32(423314455) @@ -10390,38 +10602,23 @@ public extension Api { buffer.appendInt32(-1311015810) } - break - case .inputNotifyPeer(let peer): - if boxed { - buffer.appendInt32(-1195615476) - } - peer.serialize(buffer, true) break } } public func descriptionFields() -> (String, [(String, Any)]) { switch self { + case .inputNotifyPeer(let peer): + return ("inputNotifyPeer", [("peer", peer)]) case .inputNotifyUsers: return ("inputNotifyUsers", []) case .inputNotifyChats: return ("inputNotifyChats", []) case .inputNotifyBroadcasts: return ("inputNotifyBroadcasts", []) - case .inputNotifyPeer(let peer): - return ("inputNotifyPeer", [("peer", peer)]) } } - public static func parse_inputNotifyUsers(_ reader: BufferReader) -> InputNotifyPeer? { - return Api.InputNotifyPeer.inputNotifyUsers - } - public static func parse_inputNotifyChats(_ reader: BufferReader) -> InputNotifyPeer? { - return Api.InputNotifyPeer.inputNotifyChats - } - public static func parse_inputNotifyBroadcasts(_ reader: BufferReader) -> InputNotifyPeer? { - return Api.InputNotifyPeer.inputNotifyBroadcasts - } public static func parse_inputNotifyPeer(_ reader: BufferReader) -> InputNotifyPeer? { var _1: Api.InputPeer? if let signature = reader.readInt32() { @@ -10435,6 +10632,15 @@ public extension Api { return nil } } + public static func parse_inputNotifyUsers(_ reader: BufferReader) -> InputNotifyPeer? { + return Api.InputNotifyPeer.inputNotifyUsers + } + public static func parse_inputNotifyChats(_ reader: BufferReader) -> InputNotifyPeer? { + return Api.InputNotifyPeer.inputNotifyChats + } + public static func parse_inputNotifyBroadcasts(_ reader: BufferReader) -> InputNotifyPeer? { + return Api.InputNotifyPeer.inputNotifyBroadcasts + } } public enum EncryptedMessage: TypeConstructorDescription { @@ -10524,10 +10730,10 @@ public extension Api { public enum ChannelParticipantsFilter: TypeConstructorDescription { case channelParticipantsRecent case channelParticipantsAdmins + case channelParticipantsKicked(q: String) case channelParticipantsBots case channelParticipantsBanned(q: String) case channelParticipantsSearch(q: String) - case channelParticipantsKicked(q: String) case channelParticipantsContacts(q: String) case channelParticipantsMentions(flags: Int32, q: String?, topMsgId: Int32?) @@ -10544,6 +10750,12 @@ public extension Api { buffer.appendInt32(-1268741783) } + break + case .channelParticipantsKicked(let q): + if boxed { + buffer.appendInt32(-1548400251) + } + serializeString(q, buffer: buffer, boxed: false) break case .channelParticipantsBots: if boxed { @@ -10563,12 +10775,6 @@ public extension Api { } serializeString(q, buffer: buffer, boxed: false) break - case .channelParticipantsKicked(let q): - if boxed { - buffer.appendInt32(-1548400251) - } - serializeString(q, buffer: buffer, boxed: false) - break case .channelParticipantsContacts(let q): if boxed { buffer.appendInt32(-1150621555) @@ -10592,14 +10798,14 @@ public extension Api { return ("channelParticipantsRecent", []) case .channelParticipantsAdmins: return ("channelParticipantsAdmins", []) + case .channelParticipantsKicked(let q): + return ("channelParticipantsKicked", [("q", q)]) case .channelParticipantsBots: return ("channelParticipantsBots", []) case .channelParticipantsBanned(let q): return ("channelParticipantsBanned", [("q", q)]) case .channelParticipantsSearch(let q): return ("channelParticipantsSearch", [("q", q)]) - case .channelParticipantsKicked(let q): - return ("channelParticipantsKicked", [("q", q)]) case .channelParticipantsContacts(let q): return ("channelParticipantsContacts", [("q", q)]) case .channelParticipantsMentions(let flags, let q, let topMsgId): @@ -10613,6 +10819,17 @@ public extension Api { public static func parse_channelParticipantsAdmins(_ reader: BufferReader) -> ChannelParticipantsFilter? { return Api.ChannelParticipantsFilter.channelParticipantsAdmins } + public static func parse_channelParticipantsKicked(_ reader: BufferReader) -> ChannelParticipantsFilter? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.ChannelParticipantsFilter.channelParticipantsKicked(q: _1!) + } + else { + return nil + } + } public static func parse_channelParticipantsBots(_ reader: BufferReader) -> ChannelParticipantsFilter? { return Api.ChannelParticipantsFilter.channelParticipantsBots } @@ -10638,17 +10855,6 @@ public extension Api { return nil } } - public static func parse_channelParticipantsKicked(_ reader: BufferReader) -> ChannelParticipantsFilter? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.ChannelParticipantsFilter.channelParticipantsKicked(q: _1!) - } - else { - return nil - } - } public static func parse_channelParticipantsContacts(_ reader: BufferReader) -> ChannelParticipantsFilter? { var _1: String? _1 = parseString(reader) @@ -10866,15 +11072,28 @@ public extension Api { } public enum InputBotInlineMessage: TypeConstructorDescription { - case inputBotInlineMessageText(flags: Int32, message: String, entities: [Api.MessageEntity]?, replyMarkup: Api.ReplyMarkup?) - case inputBotInlineMessageGame(flags: Int32, replyMarkup: Api.ReplyMarkup?) case inputBotInlineMessageMediaAuto(flags: Int32, message: String, entities: [Api.MessageEntity]?, replyMarkup: Api.ReplyMarkup?) + case inputBotInlineMessageText(flags: Int32, message: String, entities: [Api.MessageEntity]?, replyMarkup: Api.ReplyMarkup?) + case inputBotInlineMessageMediaGeo(flags: Int32, geoPoint: Api.InputGeoPoint, heading: Int32?, period: Int32?, proximityNotificationRadius: Int32?, replyMarkup: Api.ReplyMarkup?) case inputBotInlineMessageMediaVenue(flags: Int32, geoPoint: Api.InputGeoPoint, title: String, address: String, provider: String, venueId: String, venueType: String, replyMarkup: Api.ReplyMarkup?) case inputBotInlineMessageMediaContact(flags: Int32, phoneNumber: String, firstName: String, lastName: String, vcard: String, replyMarkup: Api.ReplyMarkup?) - case inputBotInlineMessageMediaGeo(flags: Int32, geoPoint: Api.InputGeoPoint, heading: Int32?, period: Int32?, proximityNotificationRadius: Int32?, replyMarkup: Api.ReplyMarkup?) + case inputBotInlineMessageGame(flags: Int32, replyMarkup: Api.ReplyMarkup?) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { + case .inputBotInlineMessageMediaAuto(let flags, let message, let entities, let replyMarkup): + if boxed { + buffer.appendInt32(864077702) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(message, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities!.count)) + for item in entities! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} + break case .inputBotInlineMessageText(let flags, let message, let entities, let replyMarkup): if boxed { buffer.appendInt32(1036876423) @@ -10888,24 +11107,15 @@ public extension Api { }} if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} break - case .inputBotInlineMessageGame(let flags, let replyMarkup): + case .inputBotInlineMessageMediaGeo(let flags, let geoPoint, let heading, let period, let proximityNotificationRadius, let replyMarkup): if boxed { - buffer.appendInt32(1262639204) + buffer.appendInt32(-1768777083) } serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} - break - case .inputBotInlineMessageMediaAuto(let flags, let message, let entities, let replyMarkup): - if boxed { - buffer.appendInt32(864077702) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(message, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities!.count)) - for item in entities! { - item.serialize(buffer, true) - }} + geoPoint.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(heading!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(period!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeInt32(proximityNotificationRadius!, buffer: buffer, boxed: false)} if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} break case .inputBotInlineMessageMediaVenue(let flags, let geoPoint, let title, let address, let provider, let venueId, let venueType, let replyMarkup): @@ -10932,15 +11142,11 @@ public extension Api { serializeString(vcard, buffer: buffer, boxed: false) if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} break - case .inputBotInlineMessageMediaGeo(let flags, let geoPoint, let heading, let period, let proximityNotificationRadius, let replyMarkup): + case .inputBotInlineMessageGame(let flags, let replyMarkup): if boxed { - buffer.appendInt32(-1768777083) + buffer.appendInt32(1262639204) } serializeInt32(flags, buffer: buffer, boxed: false) - geoPoint.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(heading!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(period!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeInt32(proximityNotificationRadius!, buffer: buffer, boxed: false)} if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} break } @@ -10948,21 +11154,45 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .inputBotInlineMessageText(let flags, let message, let entities, let replyMarkup): - return ("inputBotInlineMessageText", [("flags", flags), ("message", message), ("entities", entities), ("replyMarkup", replyMarkup)]) - case .inputBotInlineMessageGame(let flags, let replyMarkup): - return ("inputBotInlineMessageGame", [("flags", flags), ("replyMarkup", replyMarkup)]) case .inputBotInlineMessageMediaAuto(let flags, let message, let entities, let replyMarkup): return ("inputBotInlineMessageMediaAuto", [("flags", flags), ("message", message), ("entities", entities), ("replyMarkup", replyMarkup)]) + case .inputBotInlineMessageText(let flags, let message, let entities, let replyMarkup): + return ("inputBotInlineMessageText", [("flags", flags), ("message", message), ("entities", entities), ("replyMarkup", replyMarkup)]) + case .inputBotInlineMessageMediaGeo(let flags, let geoPoint, let heading, let period, let proximityNotificationRadius, let replyMarkup): + return ("inputBotInlineMessageMediaGeo", [("flags", flags), ("geoPoint", geoPoint), ("heading", heading), ("period", period), ("proximityNotificationRadius", proximityNotificationRadius), ("replyMarkup", replyMarkup)]) case .inputBotInlineMessageMediaVenue(let flags, let geoPoint, let title, let address, let provider, let venueId, let venueType, let replyMarkup): return ("inputBotInlineMessageMediaVenue", [("flags", flags), ("geoPoint", geoPoint), ("title", title), ("address", address), ("provider", provider), ("venueId", venueId), ("venueType", venueType), ("replyMarkup", replyMarkup)]) case .inputBotInlineMessageMediaContact(let flags, let phoneNumber, let firstName, let lastName, let vcard, let replyMarkup): return ("inputBotInlineMessageMediaContact", [("flags", flags), ("phoneNumber", phoneNumber), ("firstName", firstName), ("lastName", lastName), ("vcard", vcard), ("replyMarkup", replyMarkup)]) - case .inputBotInlineMessageMediaGeo(let flags, let geoPoint, let heading, let period, let proximityNotificationRadius, let replyMarkup): - return ("inputBotInlineMessageMediaGeo", [("flags", flags), ("geoPoint", geoPoint), ("heading", heading), ("period", period), ("proximityNotificationRadius", proximityNotificationRadius), ("replyMarkup", replyMarkup)]) + case .inputBotInlineMessageGame(let flags, let replyMarkup): + return ("inputBotInlineMessageGame", [("flags", flags), ("replyMarkup", replyMarkup)]) } } + public static func parse_inputBotInlineMessageMediaAuto(_ reader: BufferReader) -> InputBotInlineMessage? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: [Api.MessageEntity]? + if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) + } } + var _4: Api.ReplyMarkup? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputBotInlineMessage.inputBotInlineMessageMediaAuto(flags: _1!, message: _2!, entities: _3, replyMarkup: _4) + } + else { + return nil + } + } public static func parse_inputBotInlineMessageText(_ reader: BufferReader) -> InputBotInlineMessage? { var _1: Int32? _1 = reader.readInt32() @@ -10987,41 +11217,31 @@ public extension Api { return nil } } - public static func parse_inputBotInlineMessageGame(_ reader: BufferReader) -> InputBotInlineMessage? { + public static func parse_inputBotInlineMessageMediaGeo(_ reader: BufferReader) -> InputBotInlineMessage? { var _1: Int32? _1 = reader.readInt32() - var _2: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup - } } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 2) == 0) || _2 != nil - if _c1 && _c2 { - return Api.InputBotInlineMessage.inputBotInlineMessageGame(flags: _1!, replyMarkup: _2) + var _2: Api.InputGeoPoint? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.InputGeoPoint } - else { - return nil - } - } - public static func parse_inputBotInlineMessageMediaAuto(_ reader: BufferReader) -> InputBotInlineMessage? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) - } } - var _4: Api.ReplyMarkup? + var _3: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } + var _4: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt32() } + var _5: Int32? + if Int(_1!) & Int(1 << 3) != 0 {_5 = reader.readInt32() } + var _6: Api.ReplyMarkup? if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup + _6 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputBotInlineMessage.inputBotInlineMessageMediaAuto(flags: _1!, message: _2!, entities: _3, replyMarkup: _4) + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.InputBotInlineMessage.inputBotInlineMessageMediaGeo(flags: _1!, geoPoint: _2!, heading: _3, period: _4, proximityNotificationRadius: _5, replyMarkup: _6) } else { return nil @@ -11091,31 +11311,17 @@ public extension Api { return nil } } - public static func parse_inputBotInlineMessageMediaGeo(_ reader: BufferReader) -> InputBotInlineMessage? { + public static func parse_inputBotInlineMessageGame(_ reader: BufferReader) -> InputBotInlineMessage? { var _1: Int32? _1 = reader.readInt32() - var _2: Api.InputGeoPoint? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.InputGeoPoint - } - var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } - var _4: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt32() } - var _5: Int32? - if Int(_1!) & Int(1 << 3) != 0 {_5 = reader.readInt32() } - var _6: Api.ReplyMarkup? + var _2: Api.ReplyMarkup? if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup + _2 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup } } let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.InputBotInlineMessage.inputBotInlineMessageMediaGeo(flags: _1!, geoPoint: _2!, heading: _3, period: _4, proximityNotificationRadius: _5, replyMarkup: _6) + let _c2 = (Int(_1!) & Int(1 << 2) == 0) || _2 != nil + if _c1 && _c2 { + return Api.InputBotInlineMessage.inputBotInlineMessageGame(flags: _1!, replyMarkup: _2) } else { return nil @@ -11671,21 +11877,20 @@ public extension Api { } public enum InputMedia: TypeConstructorDescription { case inputMediaEmpty - case inputMediaGeoPoint(geoPoint: Api.InputGeoPoint) - case inputMediaGifExternal(url: String, q: String) - case inputMediaGame(id: Api.InputGame) - case inputMediaVenue(geoPoint: Api.InputGeoPoint, title: String, address: String, provider: String, venueId: String, venueType: String) - case inputMediaInvoice(flags: Int32, title: String, description: String, photo: Api.InputWebDocument?, invoice: Api.Invoice, payload: Buffer, provider: String, providerData: Api.DataJSON, startParam: String) case inputMediaUploadedPhoto(flags: Int32, file: Api.InputFile, stickers: [Api.InputDocument]?, ttlSeconds: Int32?) - case inputMediaUploadedDocument(flags: Int32, file: Api.InputFile, thumb: Api.InputFile?, mimeType: String, attributes: [Api.DocumentAttribute], stickers: [Api.InputDocument]?, ttlSeconds: Int32?) case inputMediaPhoto(flags: Int32, id: Api.InputPhoto, ttlSeconds: Int32?) + case inputMediaGeoPoint(geoPoint: Api.InputGeoPoint) + case inputMediaContact(phoneNumber: String, firstName: String, lastName: String, vcard: String) + case inputMediaUploadedDocument(flags: Int32, file: Api.InputFile, thumb: Api.InputFile?, mimeType: String, attributes: [Api.DocumentAttribute], stickers: [Api.InputDocument]?, ttlSeconds: Int32?) + case inputMediaDocument(flags: Int32, id: Api.InputDocument, ttlSeconds: Int32?, query: String?) + case inputMediaVenue(geoPoint: Api.InputGeoPoint, title: String, address: String, provider: String, venueId: String, venueType: String) case inputMediaPhotoExternal(flags: Int32, url: String, ttlSeconds: Int32?) case inputMediaDocumentExternal(flags: Int32, url: String, ttlSeconds: Int32?) - case inputMediaContact(phoneNumber: String, firstName: String, lastName: String, vcard: String) + case inputMediaGame(id: Api.InputGame) + case inputMediaInvoice(flags: Int32, title: String, description: String, photo: Api.InputWebDocument?, invoice: Api.Invoice, payload: Buffer, provider: String, providerData: Api.DataJSON, startParam: String) + case inputMediaGeoLive(flags: Int32, geoPoint: Api.InputGeoPoint, heading: Int32?, period: Int32?, proximityNotificationRadius: Int32?) case inputMediaPoll(flags: Int32, poll: Api.Poll, correctAnswers: [Buffer]?, solution: String?, solutionEntities: [Api.MessageEntity]?) case inputMediaDice(emoticon: String) - case inputMediaGeoLive(flags: Int32, geoPoint: Api.InputGeoPoint, heading: Int32?, period: Int32?, proximityNotificationRadius: Int32?) - case inputMediaDocument(flags: Int32, id: Api.InputDocument, ttlSeconds: Int32?, query: String?) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { @@ -11694,50 +11899,6 @@ public extension Api { buffer.appendInt32(-1771768449) } - break - case .inputMediaGeoPoint(let geoPoint): - if boxed { - buffer.appendInt32(-104578748) - } - geoPoint.serialize(buffer, true) - break - case .inputMediaGifExternal(let url, let q): - if boxed { - buffer.appendInt32(1212395773) - } - serializeString(url, buffer: buffer, boxed: false) - serializeString(q, buffer: buffer, boxed: false) - break - case .inputMediaGame(let id): - if boxed { - buffer.appendInt32(-750828557) - } - id.serialize(buffer, true) - break - case .inputMediaVenue(let geoPoint, let title, let address, let provider, let venueId, let venueType): - if boxed { - buffer.appendInt32(-1052959727) - } - geoPoint.serialize(buffer, true) - serializeString(title, buffer: buffer, boxed: false) - serializeString(address, buffer: buffer, boxed: false) - serializeString(provider, buffer: buffer, boxed: false) - serializeString(venueId, buffer: buffer, boxed: false) - serializeString(venueType, buffer: buffer, boxed: false) - break - case .inputMediaInvoice(let flags, let title, let description, let photo, let invoice, let payload, let provider, let providerData, let startParam): - if boxed { - buffer.appendInt32(-186607933) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(title, buffer: buffer, boxed: false) - serializeString(description, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {photo!.serialize(buffer, true)} - invoice.serialize(buffer, true) - serializeBytes(payload, buffer: buffer, boxed: false) - serializeString(provider, buffer: buffer, boxed: false) - providerData.serialize(buffer, true) - serializeString(startParam, buffer: buffer, boxed: false) break case .inputMediaUploadedPhoto(let flags, let file, let stickers, let ttlSeconds): if boxed { @@ -11752,6 +11913,29 @@ public extension Api { }} if Int(flags) & Int(1 << 1) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} break + case .inputMediaPhoto(let flags, let id, let ttlSeconds): + if boxed { + buffer.appendInt32(-1279654347) + } + serializeInt32(flags, buffer: buffer, boxed: false) + id.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} + break + case .inputMediaGeoPoint(let geoPoint): + if boxed { + buffer.appendInt32(-104578748) + } + geoPoint.serialize(buffer, true) + break + case .inputMediaContact(let phoneNumber, let firstName, let lastName, let vcard): + if boxed { + buffer.appendInt32(-122978821) + } + serializeString(phoneNumber, buffer: buffer, boxed: false) + serializeString(firstName, buffer: buffer, boxed: false) + serializeString(lastName, buffer: buffer, boxed: false) + serializeString(vcard, buffer: buffer, boxed: false) + break case .inputMediaUploadedDocument(let flags, let file, let thumb, let mimeType, let attributes, let stickers, let ttlSeconds): if boxed { buffer.appendInt32(1530447553) @@ -11772,13 +11956,25 @@ public extension Api { }} if Int(flags) & Int(1 << 1) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} break - case .inputMediaPhoto(let flags, let id, let ttlSeconds): + case .inputMediaDocument(let flags, let id, let ttlSeconds, let query): if boxed { - buffer.appendInt32(-1279654347) + buffer.appendInt32(860303448) } serializeInt32(flags, buffer: buffer, boxed: false) id.serialize(buffer, true) if Int(flags) & Int(1 << 0) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeString(query!, buffer: buffer, boxed: false)} + break + case .inputMediaVenue(let geoPoint, let title, let address, let provider, let venueId, let venueType): + if boxed { + buffer.appendInt32(-1052959727) + } + geoPoint.serialize(buffer, true) + serializeString(title, buffer: buffer, boxed: false) + serializeString(address, buffer: buffer, boxed: false) + serializeString(provider, buffer: buffer, boxed: false) + serializeString(venueId, buffer: buffer, boxed: false) + serializeString(venueType, buffer: buffer, boxed: false) break case .inputMediaPhotoExternal(let flags, let url, let ttlSeconds): if boxed { @@ -11796,14 +11992,35 @@ public extension Api { serializeString(url, buffer: buffer, boxed: false) if Int(flags) & Int(1 << 0) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} break - case .inputMediaContact(let phoneNumber, let firstName, let lastName, let vcard): + case .inputMediaGame(let id): if boxed { - buffer.appendInt32(-122978821) + buffer.appendInt32(-750828557) } - serializeString(phoneNumber, buffer: buffer, boxed: false) - serializeString(firstName, buffer: buffer, boxed: false) - serializeString(lastName, buffer: buffer, boxed: false) - serializeString(vcard, buffer: buffer, boxed: false) + id.serialize(buffer, true) + break + case .inputMediaInvoice(let flags, let title, let description, let photo, let invoice, let payload, let provider, let providerData, let startParam): + if boxed { + buffer.appendInt32(-186607933) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(title, buffer: buffer, boxed: false) + serializeString(description, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {photo!.serialize(buffer, true)} + invoice.serialize(buffer, true) + serializeBytes(payload, buffer: buffer, boxed: false) + serializeString(provider, buffer: buffer, boxed: false) + providerData.serialize(buffer, true) + serializeString(startParam, buffer: buffer, boxed: false) + break + case .inputMediaGeoLive(let flags, let geoPoint, let heading, let period, let proximityNotificationRadius): + if boxed { + buffer.appendInt32(-1759532989) + } + serializeInt32(flags, buffer: buffer, boxed: false) + geoPoint.serialize(buffer, true) + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(heading!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(period!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeInt32(proximityNotificationRadius!, buffer: buffer, boxed: false)} break case .inputMediaPoll(let flags, let poll, let correctAnswers, let solution, let solutionEntities): if boxed { @@ -11829,25 +12046,6 @@ public extension Api { } serializeString(emoticon, buffer: buffer, boxed: false) break - case .inputMediaGeoLive(let flags, let geoPoint, let heading, let period, let proximityNotificationRadius): - if boxed { - buffer.appendInt32(-1759532989) - } - serializeInt32(flags, buffer: buffer, boxed: false) - geoPoint.serialize(buffer, true) - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(heading!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(period!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeInt32(proximityNotificationRadius!, buffer: buffer, boxed: false)} - break - case .inputMediaDocument(let flags, let id, let ttlSeconds, let query): - if boxed { - buffer.appendInt32(860303448) - } - serializeInt32(flags, buffer: buffer, boxed: false) - id.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeString(query!, buffer: buffer, boxed: false)} - break } } @@ -11855,42 +12053,83 @@ public extension Api { switch self { case .inputMediaEmpty: return ("inputMediaEmpty", []) - case .inputMediaGeoPoint(let geoPoint): - return ("inputMediaGeoPoint", [("geoPoint", geoPoint)]) - case .inputMediaGifExternal(let url, let q): - return ("inputMediaGifExternal", [("url", url), ("q", q)]) - case .inputMediaGame(let id): - return ("inputMediaGame", [("id", id)]) - case .inputMediaVenue(let geoPoint, let title, let address, let provider, let venueId, let venueType): - return ("inputMediaVenue", [("geoPoint", geoPoint), ("title", title), ("address", address), ("provider", provider), ("venueId", venueId), ("venueType", venueType)]) - case .inputMediaInvoice(let flags, let title, let description, let photo, let invoice, let payload, let provider, let providerData, let startParam): - return ("inputMediaInvoice", [("flags", flags), ("title", title), ("description", description), ("photo", photo), ("invoice", invoice), ("payload", payload), ("provider", provider), ("providerData", providerData), ("startParam", startParam)]) case .inputMediaUploadedPhoto(let flags, let file, let stickers, let ttlSeconds): return ("inputMediaUploadedPhoto", [("flags", flags), ("file", file), ("stickers", stickers), ("ttlSeconds", ttlSeconds)]) - case .inputMediaUploadedDocument(let flags, let file, let thumb, let mimeType, let attributes, let stickers, let ttlSeconds): - return ("inputMediaUploadedDocument", [("flags", flags), ("file", file), ("thumb", thumb), ("mimeType", mimeType), ("attributes", attributes), ("stickers", stickers), ("ttlSeconds", ttlSeconds)]) case .inputMediaPhoto(let flags, let id, let ttlSeconds): return ("inputMediaPhoto", [("flags", flags), ("id", id), ("ttlSeconds", ttlSeconds)]) + case .inputMediaGeoPoint(let geoPoint): + return ("inputMediaGeoPoint", [("geoPoint", geoPoint)]) + case .inputMediaContact(let phoneNumber, let firstName, let lastName, let vcard): + return ("inputMediaContact", [("phoneNumber", phoneNumber), ("firstName", firstName), ("lastName", lastName), ("vcard", vcard)]) + case .inputMediaUploadedDocument(let flags, let file, let thumb, let mimeType, let attributes, let stickers, let ttlSeconds): + return ("inputMediaUploadedDocument", [("flags", flags), ("file", file), ("thumb", thumb), ("mimeType", mimeType), ("attributes", attributes), ("stickers", stickers), ("ttlSeconds", ttlSeconds)]) + case .inputMediaDocument(let flags, let id, let ttlSeconds, let query): + return ("inputMediaDocument", [("flags", flags), ("id", id), ("ttlSeconds", ttlSeconds), ("query", query)]) + case .inputMediaVenue(let geoPoint, let title, let address, let provider, let venueId, let venueType): + return ("inputMediaVenue", [("geoPoint", geoPoint), ("title", title), ("address", address), ("provider", provider), ("venueId", venueId), ("venueType", venueType)]) case .inputMediaPhotoExternal(let flags, let url, let ttlSeconds): return ("inputMediaPhotoExternal", [("flags", flags), ("url", url), ("ttlSeconds", ttlSeconds)]) case .inputMediaDocumentExternal(let flags, let url, let ttlSeconds): return ("inputMediaDocumentExternal", [("flags", flags), ("url", url), ("ttlSeconds", ttlSeconds)]) - case .inputMediaContact(let phoneNumber, let firstName, let lastName, let vcard): - return ("inputMediaContact", [("phoneNumber", phoneNumber), ("firstName", firstName), ("lastName", lastName), ("vcard", vcard)]) + case .inputMediaGame(let id): + return ("inputMediaGame", [("id", id)]) + case .inputMediaInvoice(let flags, let title, let description, let photo, let invoice, let payload, let provider, let providerData, let startParam): + return ("inputMediaInvoice", [("flags", flags), ("title", title), ("description", description), ("photo", photo), ("invoice", invoice), ("payload", payload), ("provider", provider), ("providerData", providerData), ("startParam", startParam)]) + case .inputMediaGeoLive(let flags, let geoPoint, let heading, let period, let proximityNotificationRadius): + return ("inputMediaGeoLive", [("flags", flags), ("geoPoint", geoPoint), ("heading", heading), ("period", period), ("proximityNotificationRadius", proximityNotificationRadius)]) case .inputMediaPoll(let flags, let poll, let correctAnswers, let solution, let solutionEntities): return ("inputMediaPoll", [("flags", flags), ("poll", poll), ("correctAnswers", correctAnswers), ("solution", solution), ("solutionEntities", solutionEntities)]) case .inputMediaDice(let emoticon): return ("inputMediaDice", [("emoticon", emoticon)]) - case .inputMediaGeoLive(let flags, let geoPoint, let heading, let period, let proximityNotificationRadius): - return ("inputMediaGeoLive", [("flags", flags), ("geoPoint", geoPoint), ("heading", heading), ("period", period), ("proximityNotificationRadius", proximityNotificationRadius)]) - case .inputMediaDocument(let flags, let id, let ttlSeconds, let query): - return ("inputMediaDocument", [("flags", flags), ("id", id), ("ttlSeconds", ttlSeconds), ("query", query)]) } } public static func parse_inputMediaEmpty(_ reader: BufferReader) -> InputMedia? { return Api.InputMedia.inputMediaEmpty } + public static func parse_inputMediaUploadedPhoto(_ reader: BufferReader) -> InputMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.InputFile? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.InputFile + } + var _3: [Api.InputDocument]? + if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputDocument.self) + } } + var _4: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputMedia.inputMediaUploadedPhoto(flags: _1!, file: _2!, stickers: _3, ttlSeconds: _4) + } + else { + return nil + } + } + public static func parse_inputMediaPhoto(_ reader: BufferReader) -> InputMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.InputPhoto? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.InputPhoto + } + var _3: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.InputMedia.inputMediaPhoto(flags: _1!, id: _2!, ttlSeconds: _3) + } + else { + return nil + } + } public static func parse_inputMediaGeoPoint(_ reader: BufferReader) -> InputMedia? { var _1: Api.InputGeoPoint? if let signature = reader.readInt32() { @@ -11904,28 +12143,80 @@ public extension Api { return nil } } - public static func parse_inputMediaGifExternal(_ reader: BufferReader) -> InputMedia? { + public static func parse_inputMediaContact(_ reader: BufferReader) -> InputMedia? { var _1: String? _1 = parseString(reader) var _2: String? _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) let _c1 = _1 != nil let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputMedia.inputMediaGifExternal(url: _1!, q: _2!) + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputMedia.inputMediaContact(phoneNumber: _1!, firstName: _2!, lastName: _3!, vcard: _4!) } else { return nil } } - public static func parse_inputMediaGame(_ reader: BufferReader) -> InputMedia? { - var _1: Api.InputGame? + public static func parse_inputMediaUploadedDocument(_ reader: BufferReader) -> InputMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.InputFile? if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputGame + _2 = Api.parse(reader, signature: signature) as? Api.InputFile } + var _3: Api.InputFile? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.InputFile + } } + var _4: String? + _4 = parseString(reader) + var _5: [Api.DocumentAttribute]? + if let _ = reader.readInt32() { + _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DocumentAttribute.self) + } + var _6: [Api.InputDocument]? + if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { + _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputDocument.self) + } } + var _7: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_7 = reader.readInt32() } let _c1 = _1 != nil - if _c1 { - return Api.InputMedia.inputMediaGame(id: _1!) + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.InputMedia.inputMediaUploadedDocument(flags: _1!, file: _2!, thumb: _3, mimeType: _4!, attributes: _5!, stickers: _6, ttlSeconds: _7) + } + else { + return nil + } + } + public static func parse_inputMediaDocument(_ reader: BufferReader) -> InputMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.InputDocument? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.InputDocument + } + var _3: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } + var _4: String? + if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputMedia.inputMediaDocument(flags: _1!, id: _2!, ttlSeconds: _3, query: _4) } else { return nil @@ -11959,6 +12250,53 @@ public extension Api { return nil } } + public static func parse_inputMediaPhotoExternal(_ reader: BufferReader) -> InputMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.InputMedia.inputMediaPhotoExternal(flags: _1!, url: _2!, ttlSeconds: _3) + } + else { + return nil + } + } + public static func parse_inputMediaDocumentExternal(_ reader: BufferReader) -> InputMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.InputMedia.inputMediaDocumentExternal(flags: _1!, url: _2!, ttlSeconds: _3) + } + else { + return nil + } + } + public static func parse_inputMediaGame(_ reader: BufferReader) -> InputMedia? { + var _1: Api.InputGame? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputGame + } + let _c1 = _1 != nil + if _c1 { + return Api.InputMedia.inputMediaGame(id: _1!) + } + else { + return nil + } + } public static func parse_inputMediaInvoice(_ reader: BufferReader) -> InputMedia? { var _1: Int32? _1 = reader.readInt32() @@ -12000,135 +12338,26 @@ public extension Api { return nil } } - public static func parse_inputMediaUploadedPhoto(_ reader: BufferReader) -> InputMedia? { + public static func parse_inputMediaGeoLive(_ reader: BufferReader) -> InputMedia? { var _1: Int32? _1 = reader.readInt32() - var _2: Api.InputFile? + var _2: Api.InputGeoPoint? if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.InputFile + _2 = Api.parse(reader, signature: signature) as? Api.InputGeoPoint } - var _3: [Api.InputDocument]? - if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputDocument.self) - } } + var _3: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_3 = reader.readInt32() } var _4: Int32? if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputMedia.inputMediaUploadedPhoto(flags: _1!, file: _2!, stickers: _3, ttlSeconds: _4) - } - else { - return nil - } - } - public static func parse_inputMediaUploadedDocument(_ reader: BufferReader) -> InputMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.InputFile? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.InputFile - } - var _3: Api.InputFile? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.InputFile - } } - var _4: String? - _4 = parseString(reader) - var _5: [Api.DocumentAttribute]? - if let _ = reader.readInt32() { - _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DocumentAttribute.self) - } - var _6: [Api.InputDocument]? - if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { - _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputDocument.self) - } } - var _7: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_7 = reader.readInt32() } + var _5: Int32? + if Int(_1!) & Int(1 << 3) != 0 {_5 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.InputMedia.inputMediaUploadedDocument(flags: _1!, file: _2!, thumb: _3, mimeType: _4!, attributes: _5!, stickers: _6, ttlSeconds: _7) - } - else { - return nil - } - } - public static func parse_inputMediaPhoto(_ reader: BufferReader) -> InputMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.InputPhoto? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.InputPhoto - } - var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.InputMedia.inputMediaPhoto(flags: _1!, id: _2!, ttlSeconds: _3) - } - else { - return nil - } - } - public static func parse_inputMediaPhotoExternal(_ reader: BufferReader) -> InputMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.InputMedia.inputMediaPhotoExternal(flags: _1!, url: _2!, ttlSeconds: _3) - } - else { - return nil - } - } - public static func parse_inputMediaDocumentExternal(_ reader: BufferReader) -> InputMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.InputMedia.inputMediaDocumentExternal(flags: _1!, url: _2!, ttlSeconds: _3) - } - else { - return nil - } - } - public static func parse_inputMediaContact(_ reader: BufferReader) -> InputMedia? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputMedia.inputMediaContact(phoneNumber: _1!, firstName: _2!, lastName: _3!, vcard: _4!) + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.InputMedia.inputMediaGeoLive(flags: _1!, geoPoint: _2!, heading: _3, period: _4, proximityNotificationRadius: _5) } else { return nil @@ -12174,61 +12403,16 @@ public extension Api { return nil } } - public static func parse_inputMediaGeoLive(_ reader: BufferReader) -> InputMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.InputGeoPoint? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.InputGeoPoint - } - var _3: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_3 = reader.readInt32() } - var _4: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt32() } - var _5: Int32? - if Int(_1!) & Int(1 << 3) != 0 {_5 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.InputMedia.inputMediaGeoLive(flags: _1!, geoPoint: _2!, heading: _3, period: _4, proximityNotificationRadius: _5) - } - else { - return nil - } - } - public static func parse_inputMediaDocument(_ reader: BufferReader) -> InputMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.InputDocument? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.InputDocument - } - var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } - var _4: String? - if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputMedia.inputMediaDocument(flags: _1!, id: _2!, ttlSeconds: _3, query: _4) - } - else { - return nil - } - } } - public enum InputPeer: TypeConstructorDescription { + indirect public enum InputPeer: TypeConstructorDescription { case inputPeerEmpty case inputPeerSelf case inputPeerChat(chatId: Int32) case inputPeerUser(userId: Int32, accessHash: Int64) case inputPeerChannel(channelId: Int32, accessHash: Int64) + case inputPeerUserFromMessage(peer: Api.InputPeer, msgId: Int32, userId: Int32) + case inputPeerChannelFromMessage(peer: Api.InputPeer, msgId: Int32, channelId: Int32) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { @@ -12264,6 +12448,22 @@ public extension Api { serializeInt32(channelId, buffer: buffer, boxed: false) serializeInt64(accessHash, buffer: buffer, boxed: false) break + case .inputPeerUserFromMessage(let peer, let msgId, let userId): + if boxed { + buffer.appendInt32(398123750) + } + peer.serialize(buffer, true) + serializeInt32(msgId, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + break + case .inputPeerChannelFromMessage(let peer, let msgId, let channelId): + if boxed { + buffer.appendInt32(-1667893317) + } + peer.serialize(buffer, true) + serializeInt32(msgId, buffer: buffer, boxed: false) + serializeInt32(channelId, buffer: buffer, boxed: false) + break } } @@ -12279,6 +12479,10 @@ public extension Api { return ("inputPeerUser", [("userId", userId), ("accessHash", accessHash)]) case .inputPeerChannel(let channelId, let accessHash): return ("inputPeerChannel", [("channelId", channelId), ("accessHash", accessHash)]) + case .inputPeerUserFromMessage(let peer, let msgId, let userId): + return ("inputPeerUserFromMessage", [("peer", peer), ("msgId", msgId), ("userId", userId)]) + case .inputPeerChannelFromMessage(let peer, let msgId, let channelId): + return ("inputPeerChannelFromMessage", [("peer", peer), ("msgId", msgId), ("channelId", channelId)]) } } @@ -12327,6 +12531,44 @@ public extension Api { return nil } } + public static func parse_inputPeerUserFromMessage(_ reader: BufferReader) -> InputPeer? { + var _1: Api.InputPeer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputPeer + } + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.InputPeer.inputPeerUserFromMessage(peer: _1!, msgId: _2!, userId: _3!) + } + else { + return nil + } + } + public static func parse_inputPeerChannelFromMessage(_ reader: BufferReader) -> InputPeer? { + var _1: Api.InputPeer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputPeer + } + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.InputPeer.inputPeerChannelFromMessage(peer: _1!, msgId: _2!, channelId: _3!) + } + else { + return nil + } + } } public enum Contact: TypeConstructorDescription { @@ -12412,24 +12654,11 @@ public extension Api { } public enum BotInlineResult: TypeConstructorDescription { - case botInlineMediaResult(flags: Int32, id: String, type: String, photo: Api.Photo?, document: Api.Document?, title: String?, description: String?, sendMessage: Api.BotInlineMessage) case botInlineResult(flags: Int32, id: String, type: String, title: String?, description: String?, url: String?, thumb: Api.WebDocument?, content: Api.WebDocument?, sendMessage: Api.BotInlineMessage) + case botInlineMediaResult(flags: Int32, id: String, type: String, photo: Api.Photo?, document: Api.Document?, title: String?, description: String?, sendMessage: Api.BotInlineMessage) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .botInlineMediaResult(let flags, let id, let type, let photo, let document, let title, let description, let sendMessage): - if boxed { - buffer.appendInt32(400266251) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(id, buffer: buffer, boxed: false) - serializeString(type, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {photo!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {document!.serialize(buffer, true)} - if Int(flags) & Int(1 << 2) != 0 {serializeString(title!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeString(description!, buffer: buffer, boxed: false)} - sendMessage.serialize(buffer, true) - break case .botInlineResult(let flags, let id, let type, let title, let description, let url, let thumb, let content, let sendMessage): if boxed { buffer.appendInt32(295067450) @@ -12444,56 +12673,31 @@ public extension Api { if Int(flags) & Int(1 << 5) != 0 {content!.serialize(buffer, true)} sendMessage.serialize(buffer, true) break + case .botInlineMediaResult(let flags, let id, let type, let photo, let document, let title, let description, let sendMessage): + if boxed { + buffer.appendInt32(400266251) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(id, buffer: buffer, boxed: false) + serializeString(type, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {photo!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {document!.serialize(buffer, true)} + if Int(flags) & Int(1 << 2) != 0 {serializeString(title!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeString(description!, buffer: buffer, boxed: false)} + sendMessage.serialize(buffer, true) + break } } public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .botInlineMediaResult(let flags, let id, let type, let photo, let document, let title, let description, let sendMessage): - return ("botInlineMediaResult", [("flags", flags), ("id", id), ("type", type), ("photo", photo), ("document", document), ("title", title), ("description", description), ("sendMessage", sendMessage)]) case .botInlineResult(let flags, let id, let type, let title, let description, let url, let thumb, let content, let sendMessage): return ("botInlineResult", [("flags", flags), ("id", id), ("type", type), ("title", title), ("description", description), ("url", url), ("thumb", thumb), ("content", content), ("sendMessage", sendMessage)]) + case .botInlineMediaResult(let flags, let id, let type, let photo, let document, let title, let description, let sendMessage): + return ("botInlineMediaResult", [("flags", flags), ("id", id), ("type", type), ("photo", photo), ("document", document), ("title", title), ("description", description), ("sendMessage", sendMessage)]) } } - public static func parse_botInlineMediaResult(_ reader: BufferReader) -> BotInlineResult? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: Api.Photo? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.Photo - } } - var _5: Api.Document? - if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.Document - } } - var _6: String? - if Int(_1!) & Int(1 << 2) != 0 {_6 = parseString(reader) } - var _7: String? - if Int(_1!) & Int(1 << 3) != 0 {_7 = parseString(reader) } - var _8: Api.BotInlineMessage? - if let signature = reader.readInt32() { - _8 = Api.parse(reader, signature: signature) as? Api.BotInlineMessage - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil - let _c8 = _8 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { - return Api.BotInlineResult.botInlineMediaResult(flags: _1!, id: _2!, type: _3!, photo: _4, document: _5, title: _6, description: _7, sendMessage: _8!) - } - else { - return nil - } - } public static func parse_botInlineResult(_ reader: BufferReader) -> BotInlineResult? { var _1: Int32? _1 = reader.readInt32() @@ -12535,6 +12739,44 @@ public extension Api { return nil } } + public static func parse_botInlineMediaResult(_ reader: BufferReader) -> BotInlineResult? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: Api.Photo? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.Photo + } } + var _5: Api.Document? + if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.Document + } } + var _6: String? + if Int(_1!) & Int(1 << 2) != 0 {_6 = parseString(reader) } + var _7: String? + if Int(_1!) & Int(1 << 3) != 0 {_7 = parseString(reader) } + var _8: Api.BotInlineMessage? + if let signature = reader.readInt32() { + _8 = Api.parse(reader, signature: signature) as? Api.BotInlineMessage + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil + let _c8 = _8 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { + return Api.BotInlineResult.botInlineMediaResult(flags: _1!, id: _2!, type: _3!, photo: _4, document: _5, title: _6, description: _7, sendMessage: _8!) + } + else { + return nil + } + } } public enum InputGroupCall: TypeConstructorDescription { @@ -12851,6 +13093,7 @@ public extension Api { case channelAdminLogEventActionChangeTitle(prevValue: String, newValue: String) case channelAdminLogEventActionChangeAbout(prevValue: String, newValue: String) case channelAdminLogEventActionChangeUsername(prevValue: String, newValue: String) + case channelAdminLogEventActionChangePhoto(prevPhoto: Api.Photo, newPhoto: Api.Photo) case channelAdminLogEventActionToggleInvites(newValue: Api.Bool) case channelAdminLogEventActionToggleSignatures(newValue: Api.Bool) case channelAdminLogEventActionUpdatePinned(message: Api.Message) @@ -12865,7 +13108,6 @@ public extension Api { case channelAdminLogEventActionTogglePreHistoryHidden(newValue: Api.Bool) case channelAdminLogEventActionDefaultBannedRights(prevBannedRights: Api.ChatBannedRights, newBannedRights: Api.ChatBannedRights) case channelAdminLogEventActionStopPoll(message: Api.Message) - case channelAdminLogEventActionChangePhoto(prevPhoto: Api.Photo, newPhoto: Api.Photo) case channelAdminLogEventActionChangeLinkedChat(prevValue: Int32, newValue: Int32) case channelAdminLogEventActionChangeLocation(prevValue: Api.ChannelLocation, newValue: Api.ChannelLocation) case channelAdminLogEventActionToggleSlowMode(prevValue: Int32, newValue: Int32) @@ -12898,6 +13140,13 @@ public extension Api { serializeString(prevValue, buffer: buffer, boxed: false) serializeString(newValue, buffer: buffer, boxed: false) break + case .channelAdminLogEventActionChangePhoto(let prevPhoto, let newPhoto): + if boxed { + buffer.appendInt32(1129042607) + } + prevPhoto.serialize(buffer, true) + newPhoto.serialize(buffer, true) + break case .channelAdminLogEventActionToggleInvites(let newValue): if boxed { buffer.appendInt32(460916654) @@ -12987,13 +13236,6 @@ public extension Api { } message.serialize(buffer, true) break - case .channelAdminLogEventActionChangePhoto(let prevPhoto, let newPhoto): - if boxed { - buffer.appendInt32(1129042607) - } - prevPhoto.serialize(buffer, true) - newPhoto.serialize(buffer, true) - break case .channelAdminLogEventActionChangeLinkedChat(let prevValue, let newValue): if boxed { buffer.appendInt32(-1569748965) @@ -13056,6 +13298,8 @@ public extension Api { return ("channelAdminLogEventActionChangeAbout", [("prevValue", prevValue), ("newValue", newValue)]) case .channelAdminLogEventActionChangeUsername(let prevValue, let newValue): return ("channelAdminLogEventActionChangeUsername", [("prevValue", prevValue), ("newValue", newValue)]) + case .channelAdminLogEventActionChangePhoto(let prevPhoto, let newPhoto): + return ("channelAdminLogEventActionChangePhoto", [("prevPhoto", prevPhoto), ("newPhoto", newPhoto)]) case .channelAdminLogEventActionToggleInvites(let newValue): return ("channelAdminLogEventActionToggleInvites", [("newValue", newValue)]) case .channelAdminLogEventActionToggleSignatures(let newValue): @@ -13084,8 +13328,6 @@ public extension Api { return ("channelAdminLogEventActionDefaultBannedRights", [("prevBannedRights", prevBannedRights), ("newBannedRights", newBannedRights)]) case .channelAdminLogEventActionStopPoll(let message): return ("channelAdminLogEventActionStopPoll", [("message", message)]) - case .channelAdminLogEventActionChangePhoto(let prevPhoto, let newPhoto): - return ("channelAdminLogEventActionChangePhoto", [("prevPhoto", prevPhoto), ("newPhoto", newPhoto)]) case .channelAdminLogEventActionChangeLinkedChat(let prevValue, let newValue): return ("channelAdminLogEventActionChangeLinkedChat", [("prevValue", prevValue), ("newValue", newValue)]) case .channelAdminLogEventActionChangeLocation(let prevValue, let newValue): @@ -13147,6 +13389,24 @@ public extension Api { return nil } } + public static func parse_channelAdminLogEventActionChangePhoto(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.Photo? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Photo + } + var _2: Api.Photo? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Photo + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionChangePhoto(prevPhoto: _1!, newPhoto: _2!) + } + else { + return nil + } + } public static func parse_channelAdminLogEventActionToggleInvites(_ reader: BufferReader) -> ChannelAdminLogEventAction? { var _1: Api.Bool? if let signature = reader.readInt32() { @@ -13334,24 +13594,6 @@ public extension Api { return nil } } - public static func parse_channelAdminLogEventActionChangePhoto(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.Photo? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Photo - } - var _2: Api.Photo? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Photo - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionChangePhoto(prevPhoto: _1!, newPhoto: _2!) - } - else { - return nil - } - } public static func parse_channelAdminLogEventActionChangeLinkedChat(_ reader: BufferReader) -> ChannelAdminLogEventAction? { var _1: Int32? _1 = reader.readInt32() @@ -13688,6 +13930,44 @@ public extension Api { } } + } + public enum InputClientProxy: TypeConstructorDescription { + case inputClientProxy(address: String, port: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputClientProxy(let address, let port): + if boxed { + buffer.appendInt32(1968737087) + } + serializeString(address, buffer: buffer, boxed: false) + serializeInt32(port, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputClientProxy(let address, let port): + return ("inputClientProxy", [("address", address), ("port", port)]) + } + } + + public static func parse_inputClientProxy(_ reader: BufferReader) -> InputClientProxy? { + var _1: String? + _1 = parseString(reader) + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputClientProxy.inputClientProxy(address: _1!, port: _2!) + } + else { + return nil + } + } + } public enum LabeledPrice: TypeConstructorDescription { case labeledPrice(label: String, amount: Int64) @@ -13821,9 +14101,9 @@ public extension Api { case inputReportReasonSpam case inputReportReasonViolence case inputReportReasonPornography + case inputReportReasonChildAbuse case inputReportReasonOther(text: String) case inputReportReasonCopyright - case inputReportReasonChildAbuse case inputReportReasonGeoIrrelevant case inputReportReasonFake @@ -13846,6 +14126,12 @@ public extension Api { buffer.appendInt32(777640226) } + break + case .inputReportReasonChildAbuse: + if boxed { + buffer.appendInt32(-1376497949) + } + break case .inputReportReasonOther(let text): if boxed { @@ -13858,12 +14144,6 @@ public extension Api { buffer.appendInt32(-1685456582) } - break - case .inputReportReasonChildAbuse: - if boxed { - buffer.appendInt32(-1376497949) - } - break case .inputReportReasonGeoIrrelevant: if boxed { @@ -13888,12 +14168,12 @@ public extension Api { return ("inputReportReasonViolence", []) case .inputReportReasonPornography: return ("inputReportReasonPornography", []) + case .inputReportReasonChildAbuse: + return ("inputReportReasonChildAbuse", []) case .inputReportReasonOther(let text): return ("inputReportReasonOther", [("text", text)]) case .inputReportReasonCopyright: return ("inputReportReasonCopyright", []) - case .inputReportReasonChildAbuse: - return ("inputReportReasonChildAbuse", []) case .inputReportReasonGeoIrrelevant: return ("inputReportReasonGeoIrrelevant", []) case .inputReportReasonFake: @@ -13910,6 +14190,9 @@ public extension Api { public static func parse_inputReportReasonPornography(_ reader: BufferReader) -> ReportReason? { return Api.ReportReason.inputReportReasonPornography } + public static func parse_inputReportReasonChildAbuse(_ reader: BufferReader) -> ReportReason? { + return Api.ReportReason.inputReportReasonChildAbuse + } public static func parse_inputReportReasonOther(_ reader: BufferReader) -> ReportReason? { var _1: String? _1 = parseString(reader) @@ -13924,9 +14207,6 @@ public extension Api { public static func parse_inputReportReasonCopyright(_ reader: BufferReader) -> ReportReason? { return Api.ReportReason.inputReportReasonCopyright } - public static func parse_inputReportReasonChildAbuse(_ reader: BufferReader) -> ReportReason? { - return Api.ReportReason.inputReportReasonChildAbuse - } public static func parse_inputReportReasonGeoIrrelevant(_ reader: BufferReader) -> ReportReason? { return Api.ReportReason.inputReportReasonGeoIrrelevant } @@ -14014,11 +14294,18 @@ public extension Api { } public enum DraftMessage: TypeConstructorDescription { - case draftMessage(flags: Int32, replyToMsgId: Int32?, message: String, entities: [Api.MessageEntity]?, date: Int32) case draftMessageEmpty(flags: Int32, date: Int32?) + case draftMessage(flags: Int32, replyToMsgId: Int32?, message: String, entities: [Api.MessageEntity]?, date: Int32) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { + case .draftMessageEmpty(let flags, let date): + if boxed { + buffer.appendInt32(453805082) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(date!, buffer: buffer, boxed: false)} + break case .draftMessage(let flags, let replyToMsgId, let message, let entities, let date): if boxed { buffer.appendInt32(-40996577) @@ -14033,25 +14320,32 @@ public extension Api { }} serializeInt32(date, buffer: buffer, boxed: false) break - case .draftMessageEmpty(let flags, let date): - if boxed { - buffer.appendInt32(453805082) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(date!, buffer: buffer, boxed: false)} - break } } public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .draftMessage(let flags, let replyToMsgId, let message, let entities, let date): - return ("draftMessage", [("flags", flags), ("replyToMsgId", replyToMsgId), ("message", message), ("entities", entities), ("date", date)]) case .draftMessageEmpty(let flags, let date): return ("draftMessageEmpty", [("flags", flags), ("date", date)]) + case .draftMessage(let flags, let replyToMsgId, let message, let entities, let date): + return ("draftMessage", [("flags", flags), ("replyToMsgId", replyToMsgId), ("message", message), ("entities", entities), ("date", date)]) } } + public static func parse_draftMessageEmpty(_ reader: BufferReader) -> DraftMessage? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + if _c1 && _c2 { + return Api.DraftMessage.draftMessageEmpty(flags: _1!, date: _2) + } + else { + return nil + } + } public static func parse_draftMessage(_ reader: BufferReader) -> DraftMessage? { var _1: Int32? _1 = reader.readInt32() @@ -14077,20 +14371,6 @@ public extension Api { return nil } } - public static func parse_draftMessageEmpty(_ reader: BufferReader) -> DraftMessage? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - if _c1 && _c2 { - return Api.DraftMessage.draftMessageEmpty(flags: _1!, date: _2) - } - else { - return nil - } - } } public enum StatsGroupTopPoster: TypeConstructorDescription { @@ -14530,6 +14810,56 @@ public extension Api { } } + } + public enum InputStickerSetItem: TypeConstructorDescription { + case inputStickerSetItem(flags: Int32, document: Api.InputDocument, emoji: String, maskCoords: Api.MaskCoords?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputStickerSetItem(let flags, let document, let emoji, let maskCoords): + if boxed { + buffer.appendInt32(-6249322) + } + serializeInt32(flags, buffer: buffer, boxed: false) + document.serialize(buffer, true) + serializeString(emoji, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {maskCoords!.serialize(buffer, true)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputStickerSetItem(let flags, let document, let emoji, let maskCoords): + return ("inputStickerSetItem", [("flags", flags), ("document", document), ("emoji", emoji), ("maskCoords", maskCoords)]) + } + } + + public static func parse_inputStickerSetItem(_ reader: BufferReader) -> InputStickerSetItem? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.InputDocument? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.InputDocument + } + var _3: String? + _3 = parseString(reader) + var _4: Api.MaskCoords? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.MaskCoords + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputStickerSetItem.inputStickerSetItem(flags: _1!, document: _2!, emoji: _3!, maskCoords: _4) + } + else { + return nil + } + } + } public enum NotifyPeer: TypeConstructorDescription { case notifyPeer(peer: Api.Peer) @@ -15245,6 +15575,7 @@ public extension Api { case inputUserEmpty case inputUserSelf case inputUser(userId: Int32, accessHash: Int64) + case inputUserFromMessage(peer: Api.InputPeer, msgId: Int32, userId: Int32) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { @@ -15267,6 +15598,14 @@ public extension Api { serializeInt32(userId, buffer: buffer, boxed: false) serializeInt64(accessHash, buffer: buffer, boxed: false) break + case .inputUserFromMessage(let peer, let msgId, let userId): + if boxed { + buffer.appendInt32(756118935) + } + peer.serialize(buffer, true) + serializeInt32(msgId, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + break } } @@ -15278,6 +15617,8 @@ public extension Api { return ("inputUserSelf", []) case .inputUser(let userId, let accessHash): return ("inputUser", [("userId", userId), ("accessHash", accessHash)]) + case .inputUserFromMessage(let peer, let msgId, let userId): + return ("inputUserFromMessage", [("peer", peer), ("msgId", msgId), ("userId", userId)]) } } @@ -15301,6 +15642,77 @@ public extension Api { return nil } } + public static func parse_inputUserFromMessage(_ reader: BufferReader) -> InputUser? { + var _1: Api.InputPeer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputPeer + } + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.InputUser.inputUserFromMessage(peer: _1!, msgId: _2!, userId: _3!) + } + else { + return nil + } + } + + } + public enum SchemeType: TypeConstructorDescription { + case schemeType(id: Int32, predicate: String, params: [Api.SchemeParam], type: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .schemeType(let id, let predicate, let params, let type): + if boxed { + buffer.appendInt32(-1461589623) + } + serializeInt32(id, buffer: buffer, boxed: false) + serializeString(predicate, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(params.count)) + for item in params { + item.serialize(buffer, true) + } + serializeString(type, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .schemeType(let id, let predicate, let params, let type): + return ("schemeType", [("id", id), ("predicate", predicate), ("params", params), ("type", type)]) + } + } + + public static func parse_schemeType(_ reader: BufferReader) -> SchemeType? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: [Api.SchemeParam]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SchemeParam.self) + } + var _4: String? + _4 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.SchemeType.schemeType(id: _1!, predicate: _2!, params: _3!, type: _4!) + } + else { + return nil + } + } } public enum Page: TypeConstructorDescription { @@ -16016,6 +16428,44 @@ public extension Api { } } + } + public enum ChatInviteImporter: TypeConstructorDescription { + case chatInviteImporter(userId: Int32, date: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .chatInviteImporter(let userId, let date): + if boxed { + buffer.appendInt32(507405952) + } + serializeInt32(userId, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .chatInviteImporter(let userId, let date): + return ("chatInviteImporter", [("userId", userId), ("date", date)]) + } + } + + public static func parse_chatInviteImporter(_ reader: BufferReader) -> ChatInviteImporter? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ChatInviteImporter.chatInviteImporter(userId: _1!, date: _2!) + } + else { + return nil + } + } + } public enum CdnPublicKey: TypeConstructorDescription { case cdnPublicKey(dcId: Int32, publicKey: String) @@ -16187,6 +16637,7 @@ public extension Api { case inputMessageID(id: Int32) case inputMessageReplyTo(id: Int32) case inputMessagePinned + case inputMessageCallbackQuery(id: Int32, queryId: Int64) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { @@ -16207,6 +16658,13 @@ public extension Api { buffer.appendInt32(-2037963464) } + break + case .inputMessageCallbackQuery(let id, let queryId): + if boxed { + buffer.appendInt32(-1392895362) + } + serializeInt32(id, buffer: buffer, boxed: false) + serializeInt64(queryId, buffer: buffer, boxed: false) break } } @@ -16219,6 +16677,8 @@ public extension Api { return ("inputMessageReplyTo", [("id", id)]) case .inputMessagePinned: return ("inputMessagePinned", []) + case .inputMessageCallbackQuery(let id, let queryId): + return ("inputMessageCallbackQuery", [("id", id), ("queryId", queryId)]) } } @@ -16247,6 +16707,20 @@ public extension Api { public static func parse_inputMessagePinned(_ reader: BufferReader) -> InputMessage? { return Api.InputMessage.inputMessagePinned } + public static func parse_inputMessageCallbackQuery(_ reader: BufferReader) -> InputMessage? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputMessage.inputMessageCallbackQuery(id: _1!, queryId: _2!) + } + else { + return nil + } + } } public enum PhoneCallProtocol: TypeConstructorDescription { @@ -16338,40 +16812,6 @@ public extension Api { } } - } - public enum MessageFwdAuthor: TypeConstructorDescription { - case messageFwdAuthor(channelId: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .messageFwdAuthor(let channelId): - if boxed { - buffer.appendInt32(-1567175714) - } - serializeInt32(channelId, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .messageFwdAuthor(let channelId): - return ("messageFwdAuthor", [("channelId", channelId)]) - } - } - - public static func parse_messageFwdAuthor(_ reader: BufferReader) -> MessageFwdAuthor? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.MessageFwdAuthor.messageFwdAuthor(channelId: _1!) - } - else { - return nil - } - } - } public enum WallPaper: TypeConstructorDescription { case wallPaper(id: Int64, flags: Int32, accessHash: Int64, slug: String, document: Api.Document, settings: Api.WallPaperSettings?) @@ -16545,8 +16985,8 @@ public extension Api { } public enum InputChatPhoto: TypeConstructorDescription { case inputChatPhotoEmpty - case inputChatPhoto(id: Api.InputPhoto) case inputChatUploadedPhoto(flags: Int32, file: Api.InputFile?, video: Api.InputFile?, videoStartTs: Double?) + case inputChatPhoto(id: Api.InputPhoto) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { @@ -16555,12 +16995,6 @@ public extension Api { buffer.appendInt32(480546647) } - break - case .inputChatPhoto(let id): - if boxed { - buffer.appendInt32(-1991004873) - } - id.serialize(buffer, true) break case .inputChatUploadedPhoto(let flags, let file, let video, let videoStartTs): if boxed { @@ -16571,6 +17005,12 @@ public extension Api { if Int(flags) & Int(1 << 1) != 0 {video!.serialize(buffer, true)} if Int(flags) & Int(1 << 2) != 0 {serializeDouble(videoStartTs!, buffer: buffer, boxed: false)} break + case .inputChatPhoto(let id): + if boxed { + buffer.appendInt32(-1991004873) + } + id.serialize(buffer, true) + break } } @@ -16578,29 +17018,16 @@ public extension Api { switch self { case .inputChatPhotoEmpty: return ("inputChatPhotoEmpty", []) - case .inputChatPhoto(let id): - return ("inputChatPhoto", [("id", id)]) case .inputChatUploadedPhoto(let flags, let file, let video, let videoStartTs): return ("inputChatUploadedPhoto", [("flags", flags), ("file", file), ("video", video), ("videoStartTs", videoStartTs)]) + case .inputChatPhoto(let id): + return ("inputChatPhoto", [("id", id)]) } } public static func parse_inputChatPhotoEmpty(_ reader: BufferReader) -> InputChatPhoto? { return Api.InputChatPhoto.inputChatPhotoEmpty } - public static func parse_inputChatPhoto(_ reader: BufferReader) -> InputChatPhoto? { - var _1: Api.InputPhoto? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputPhoto - } - let _c1 = _1 != nil - if _c1 { - return Api.InputChatPhoto.inputChatPhoto(id: _1!) - } - else { - return nil - } - } public static func parse_inputChatUploadedPhoto(_ reader: BufferReader) -> InputChatPhoto? { var _1: Int32? _1 = reader.readInt32() @@ -16625,6 +17052,19 @@ public extension Api { return nil } } + public static func parse_inputChatPhoto(_ reader: BufferReader) -> InputChatPhoto? { + var _1: Api.InputPhoto? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputPhoto + } + let _c1 = _1 != nil + if _c1 { + return Api.InputChatPhoto.inputChatPhoto(id: _1!) + } + else { + return nil + } + } } public enum PaymentCharge: TypeConstructorDescription { @@ -16709,12 +17149,12 @@ public extension Api { } public enum Updates: TypeConstructorDescription { case updatesTooLong + case updateShortMessage(flags: Int32, id: Int32, userId: Int32, message: String, pts: Int32, ptsCount: Int32, date: Int32, fwdFrom: Api.MessageFwdHeader?, viaBotId: Int32?, replyTo: Api.MessageReplyHeader?, entities: [Api.MessageEntity]?) + case updateShortChatMessage(flags: Int32, id: Int32, fromId: Int32, chatId: Int32, message: String, pts: Int32, ptsCount: Int32, date: Int32, fwdFrom: Api.MessageFwdHeader?, viaBotId: Int32?, replyTo: Api.MessageReplyHeader?, entities: [Api.MessageEntity]?) case updateShort(update: Api.Update, date: Int32) case updatesCombined(updates: [Api.Update], users: [Api.User], chats: [Api.Chat], date: Int32, seqStart: Int32, seq: Int32) case updates(updates: [Api.Update], users: [Api.User], chats: [Api.Chat], date: Int32, seq: Int32) case updateShortSentMessage(flags: Int32, id: Int32, pts: Int32, ptsCount: Int32, date: Int32, media: Api.MessageMedia?, entities: [Api.MessageEntity]?) - case updateShortMessage(flags: Int32, id: Int32, userId: Int32, message: String, pts: Int32, ptsCount: Int32, date: Int32, fwdFrom: Api.MessageFwdHeader?, viaBotId: Int32?, replyTo: Api.MessageReplyHeader?, entities: [Api.MessageEntity]?) - case updateShortChatMessage(flags: Int32, id: Int32, fromId: Int32, chatId: Int32, message: String, pts: Int32, ptsCount: Int32, date: Int32, fwdFrom: Api.MessageFwdHeader?, viaBotId: Int32?, replyTo: Api.MessageReplyHeader?, entities: [Api.MessageEntity]?) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { @@ -16723,6 +17163,47 @@ public extension Api { buffer.appendInt32(-484987010) } + break + case .updateShortMessage(let flags, let id, let userId, let message, let pts, let ptsCount, let date, let fwdFrom, let viaBotId, let replyTo, let entities): + if boxed { + buffer.appendInt32(580309704) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + serializeString(message, buffer: buffer, boxed: false) + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(ptsCount, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 2) != 0 {fwdFrom!.serialize(buffer, true)} + if Int(flags) & Int(1 << 11) != 0 {serializeInt32(viaBotId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {replyTo!.serialize(buffer, true)} + if Int(flags) & Int(1 << 7) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities!.count)) + for item in entities! { + item.serialize(buffer, true) + }} + break + case .updateShortChatMessage(let flags, let id, let fromId, let chatId, let message, let pts, let ptsCount, let date, let fwdFrom, let viaBotId, let replyTo, let entities): + if boxed { + buffer.appendInt32(1076714939) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + serializeInt32(fromId, buffer: buffer, boxed: false) + serializeInt32(chatId, buffer: buffer, boxed: false) + serializeString(message, buffer: buffer, boxed: false) + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(ptsCount, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 2) != 0 {fwdFrom!.serialize(buffer, true)} + if Int(flags) & Int(1 << 11) != 0 {serializeInt32(viaBotId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {replyTo!.serialize(buffer, true)} + if Int(flags) & Int(1 << 7) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities!.count)) + for item in entities! { + item.serialize(buffer, true) + }} break case .updateShort(let update, let date): if boxed { @@ -16792,47 +17273,6 @@ public extension Api { item.serialize(buffer, true) }} break - case .updateShortMessage(let flags, let id, let userId, let message, let pts, let ptsCount, let date, let fwdFrom, let viaBotId, let replyTo, let entities): - if boxed { - buffer.appendInt32(580309704) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - serializeString(message, buffer: buffer, boxed: false) - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(ptsCount, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {fwdFrom!.serialize(buffer, true)} - if Int(flags) & Int(1 << 11) != 0 {serializeInt32(viaBotId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {replyTo!.serialize(buffer, true)} - if Int(flags) & Int(1 << 7) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities!.count)) - for item in entities! { - item.serialize(buffer, true) - }} - break - case .updateShortChatMessage(let flags, let id, let fromId, let chatId, let message, let pts, let ptsCount, let date, let fwdFrom, let viaBotId, let replyTo, let entities): - if boxed { - buffer.appendInt32(1076714939) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - serializeInt32(fromId, buffer: buffer, boxed: false) - serializeInt32(chatId, buffer: buffer, boxed: false) - serializeString(message, buffer: buffer, boxed: false) - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(ptsCount, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {fwdFrom!.serialize(buffer, true)} - if Int(flags) & Int(1 << 11) != 0 {serializeInt32(viaBotId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {replyTo!.serialize(buffer, true)} - if Int(flags) & Int(1 << 7) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities!.count)) - for item in entities! { - item.serialize(buffer, true) - }} - break } } @@ -16840,6 +17280,10 @@ public extension Api { switch self { case .updatesTooLong: return ("updatesTooLong", []) + case .updateShortMessage(let flags, let id, let userId, let message, let pts, let ptsCount, let date, let fwdFrom, let viaBotId, let replyTo, let entities): + return ("updateShortMessage", [("flags", flags), ("id", id), ("userId", userId), ("message", message), ("pts", pts), ("ptsCount", ptsCount), ("date", date), ("fwdFrom", fwdFrom), ("viaBotId", viaBotId), ("replyTo", replyTo), ("entities", entities)]) + case .updateShortChatMessage(let flags, let id, let fromId, let chatId, let message, let pts, let ptsCount, let date, let fwdFrom, let viaBotId, let replyTo, let entities): + return ("updateShortChatMessage", [("flags", flags), ("id", id), ("fromId", fromId), ("chatId", chatId), ("message", message), ("pts", pts), ("ptsCount", ptsCount), ("date", date), ("fwdFrom", fwdFrom), ("viaBotId", viaBotId), ("replyTo", replyTo), ("entities", entities)]) case .updateShort(let update, let date): return ("updateShort", [("update", update), ("date", date)]) case .updatesCombined(let updates, let users, let chats, let date, let seqStart, let seq): @@ -16848,16 +17292,109 @@ public extension Api { return ("updates", [("updates", updates), ("users", users), ("chats", chats), ("date", date), ("seq", seq)]) case .updateShortSentMessage(let flags, let id, let pts, let ptsCount, let date, let media, let entities): return ("updateShortSentMessage", [("flags", flags), ("id", id), ("pts", pts), ("ptsCount", ptsCount), ("date", date), ("media", media), ("entities", entities)]) - case .updateShortMessage(let flags, let id, let userId, let message, let pts, let ptsCount, let date, let fwdFrom, let viaBotId, let replyTo, let entities): - return ("updateShortMessage", [("flags", flags), ("id", id), ("userId", userId), ("message", message), ("pts", pts), ("ptsCount", ptsCount), ("date", date), ("fwdFrom", fwdFrom), ("viaBotId", viaBotId), ("replyTo", replyTo), ("entities", entities)]) - case .updateShortChatMessage(let flags, let id, let fromId, let chatId, let message, let pts, let ptsCount, let date, let fwdFrom, let viaBotId, let replyTo, let entities): - return ("updateShortChatMessage", [("flags", flags), ("id", id), ("fromId", fromId), ("chatId", chatId), ("message", message), ("pts", pts), ("ptsCount", ptsCount), ("date", date), ("fwdFrom", fwdFrom), ("viaBotId", viaBotId), ("replyTo", replyTo), ("entities", entities)]) } } public static func parse_updatesTooLong(_ reader: BufferReader) -> Updates? { return Api.Updates.updatesTooLong } + public static func parse_updateShortMessage(_ reader: BufferReader) -> Updates? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: String? + _4 = parseString(reader) + var _5: Int32? + _5 = reader.readInt32() + var _6: Int32? + _6 = reader.readInt32() + var _7: Int32? + _7 = reader.readInt32() + var _8: Api.MessageFwdHeader? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _8 = Api.parse(reader, signature: signature) as? Api.MessageFwdHeader + } } + var _9: Int32? + if Int(_1!) & Int(1 << 11) != 0 {_9 = reader.readInt32() } + var _10: Api.MessageReplyHeader? + if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { + _10 = Api.parse(reader, signature: signature) as? Api.MessageReplyHeader + } } + var _11: [Api.MessageEntity]? + if Int(_1!) & Int(1 << 7) != 0 {if let _ = reader.readInt32() { + _11 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil + let _c9 = (Int(_1!) & Int(1 << 11) == 0) || _9 != nil + let _c10 = (Int(_1!) & Int(1 << 3) == 0) || _10 != nil + let _c11 = (Int(_1!) & Int(1 << 7) == 0) || _11 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { + return Api.Updates.updateShortMessage(flags: _1!, id: _2!, userId: _3!, message: _4!, pts: _5!, ptsCount: _6!, date: _7!, fwdFrom: _8, viaBotId: _9, replyTo: _10, entities: _11) + } + else { + return nil + } + } + public static func parse_updateShortChatMessage(_ reader: BufferReader) -> Updates? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: String? + _5 = parseString(reader) + var _6: Int32? + _6 = reader.readInt32() + var _7: Int32? + _7 = reader.readInt32() + var _8: Int32? + _8 = reader.readInt32() + var _9: Api.MessageFwdHeader? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _9 = Api.parse(reader, signature: signature) as? Api.MessageFwdHeader + } } + var _10: Int32? + if Int(_1!) & Int(1 << 11) != 0 {_10 = reader.readInt32() } + var _11: Api.MessageReplyHeader? + if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { + _11 = Api.parse(reader, signature: signature) as? Api.MessageReplyHeader + } } + var _12: [Api.MessageEntity]? + if Int(_1!) & Int(1 << 7) != 0 {if let _ = reader.readInt32() { + _12 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = _8 != nil + let _c9 = (Int(_1!) & Int(1 << 2) == 0) || _9 != nil + let _c10 = (Int(_1!) & Int(1 << 11) == 0) || _10 != nil + let _c11 = (Int(_1!) & Int(1 << 3) == 0) || _11 != nil + let _c12 = (Int(_1!) & Int(1 << 7) == 0) || _12 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 { + return Api.Updates.updateShortChatMessage(flags: _1!, id: _2!, fromId: _3!, chatId: _4!, message: _5!, pts: _6!, ptsCount: _7!, date: _8!, fwdFrom: _9, viaBotId: _10, replyTo: _11, entities: _12) + } + else { + return nil + } + } public static func parse_updateShort(_ reader: BufferReader) -> Updates? { var _1: Api.Update? if let signature = reader.readInt32() { @@ -16968,103 +17505,6 @@ public extension Api { return nil } } - public static func parse_updateShortMessage(_ reader: BufferReader) -> Updates? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: String? - _4 = parseString(reader) - var _5: Int32? - _5 = reader.readInt32() - var _6: Int32? - _6 = reader.readInt32() - var _7: Int32? - _7 = reader.readInt32() - var _8: Api.MessageFwdHeader? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _8 = Api.parse(reader, signature: signature) as? Api.MessageFwdHeader - } } - var _9: Int32? - if Int(_1!) & Int(1 << 11) != 0 {_9 = reader.readInt32() } - var _10: Api.MessageReplyHeader? - if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { - _10 = Api.parse(reader, signature: signature) as? Api.MessageReplyHeader - } } - var _11: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 7) != 0 {if let _ = reader.readInt32() { - _11 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 11) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 3) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 7) == 0) || _11 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { - return Api.Updates.updateShortMessage(flags: _1!, id: _2!, userId: _3!, message: _4!, pts: _5!, ptsCount: _6!, date: _7!, fwdFrom: _8, viaBotId: _9, replyTo: _10, entities: _11) - } - else { - return nil - } - } - public static func parse_updateShortChatMessage(_ reader: BufferReader) -> Updates? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: String? - _5 = parseString(reader) - var _6: Int32? - _6 = reader.readInt32() - var _7: Int32? - _7 = reader.readInt32() - var _8: Int32? - _8 = reader.readInt32() - var _9: Api.MessageFwdHeader? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _9 = Api.parse(reader, signature: signature) as? Api.MessageFwdHeader - } } - var _10: Int32? - if Int(_1!) & Int(1 << 11) != 0 {_10 = reader.readInt32() } - var _11: Api.MessageReplyHeader? - if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { - _11 = Api.parse(reader, signature: signature) as? Api.MessageReplyHeader - } } - var _12: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 7) != 0 {if let _ = reader.readInt32() { - _12 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = _8 != nil - let _c9 = (Int(_1!) & Int(1 << 2) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 11) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 3) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 7) == 0) || _12 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 { - return Api.Updates.updateShortChatMessage(flags: _1!, id: _2!, fromId: _3!, chatId: _4!, message: _5!, pts: _6!, ptsCount: _7!, date: _8!, fwdFrom: _9, viaBotId: _10, replyTo: _11, entities: _12) - } - else { - return nil - } - } } public enum StatsAbsValueAndPrev: TypeConstructorDescription { @@ -17107,18 +17547,18 @@ public extension Api { } public enum MessageMedia: TypeConstructorDescription { case messageMediaEmpty + case messageMediaPhoto(flags: Int32, photo: Api.Photo?, ttlSeconds: Int32?) case messageMediaGeo(geo: Api.GeoPoint) + case messageMediaContact(phoneNumber: String, firstName: String, lastName: String, vcard: String, userId: Int32) case messageMediaUnsupported + case messageMediaDocument(flags: Int32, document: Api.Document?, ttlSeconds: Int32?) case messageMediaWebPage(webpage: Api.WebPage) + case messageMediaVenue(geo: Api.GeoPoint, title: String, address: String, provider: String, venueId: String, venueType: String) case messageMediaGame(game: Api.Game) case messageMediaInvoice(flags: Int32, title: String, description: String, photo: Api.WebDocument?, receiptMsgId: Int32?, currency: String, totalAmount: Int64, startParam: String) - case messageMediaVenue(geo: Api.GeoPoint, title: String, address: String, provider: String, venueId: String, venueType: String) - case messageMediaPhoto(flags: Int32, photo: Api.Photo?, ttlSeconds: Int32?) - case messageMediaDocument(flags: Int32, document: Api.Document?, ttlSeconds: Int32?) - case messageMediaContact(phoneNumber: String, firstName: String, lastName: String, vcard: String, userId: Int32) + case messageMediaGeoLive(flags: Int32, geo: Api.GeoPoint, heading: Int32?, period: Int32, proximityNotificationRadius: Int32?) case messageMediaPoll(poll: Api.Poll, results: Api.PollResults) case messageMediaDice(value: Int32, emoticon: String) - case messageMediaGeoLive(flags: Int32, geo: Api.GeoPoint, heading: Int32?, period: Int32, proximityNotificationRadius: Int32?) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { @@ -17127,6 +17567,14 @@ public extension Api { buffer.appendInt32(1038967584) } + break + case .messageMediaPhoto(let flags, let photo, let ttlSeconds): + if boxed { + buffer.appendInt32(1766936791) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {photo!.serialize(buffer, true)} + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} break case .messageMediaGeo(let geo): if boxed { @@ -17134,11 +17582,29 @@ public extension Api { } geo.serialize(buffer, true) break + case .messageMediaContact(let phoneNumber, let firstName, let lastName, let vcard, let userId): + if boxed { + buffer.appendInt32(-873313984) + } + serializeString(phoneNumber, buffer: buffer, boxed: false) + serializeString(firstName, buffer: buffer, boxed: false) + serializeString(lastName, buffer: buffer, boxed: false) + serializeString(vcard, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + break case .messageMediaUnsupported: if boxed { buffer.appendInt32(-1618676578) } + break + case .messageMediaDocument(let flags, let document, let ttlSeconds): + if boxed { + buffer.appendInt32(-1666158377) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {document!.serialize(buffer, true)} + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} break case .messageMediaWebPage(let webpage): if boxed { @@ -17146,6 +17612,17 @@ public extension Api { } webpage.serialize(buffer, true) break + case .messageMediaVenue(let geo, let title, let address, let provider, let venueId, let venueType): + if boxed { + buffer.appendInt32(784356159) + } + geo.serialize(buffer, true) + serializeString(title, buffer: buffer, boxed: false) + serializeString(address, buffer: buffer, boxed: false) + serializeString(provider, buffer: buffer, boxed: false) + serializeString(venueId, buffer: buffer, boxed: false) + serializeString(venueType, buffer: buffer, boxed: false) + break case .messageMediaGame(let game): if boxed { buffer.appendInt32(-38694904) @@ -17165,42 +17642,15 @@ public extension Api { serializeInt64(totalAmount, buffer: buffer, boxed: false) serializeString(startParam, buffer: buffer, boxed: false) break - case .messageMediaVenue(let geo, let title, let address, let provider, let venueId, let venueType): + case .messageMediaGeoLive(let flags, let geo, let heading, let period, let proximityNotificationRadius): if boxed { - buffer.appendInt32(784356159) + buffer.appendInt32(-1186937242) } + serializeInt32(flags, buffer: buffer, boxed: false) geo.serialize(buffer, true) - serializeString(title, buffer: buffer, boxed: false) - serializeString(address, buffer: buffer, boxed: false) - serializeString(provider, buffer: buffer, boxed: false) - serializeString(venueId, buffer: buffer, boxed: false) - serializeString(venueType, buffer: buffer, boxed: false) - break - case .messageMediaPhoto(let flags, let photo, let ttlSeconds): - if boxed { - buffer.appendInt32(1766936791) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {photo!.serialize(buffer, true)} - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} - break - case .messageMediaDocument(let flags, let document, let ttlSeconds): - if boxed { - buffer.appendInt32(-1666158377) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {document!.serialize(buffer, true)} - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} - break - case .messageMediaContact(let phoneNumber, let firstName, let lastName, let vcard, let userId): - if boxed { - buffer.appendInt32(-873313984) - } - serializeString(phoneNumber, buffer: buffer, boxed: false) - serializeString(firstName, buffer: buffer, boxed: false) - serializeString(lastName, buffer: buffer, boxed: false) - serializeString(vcard, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(heading!, buffer: buffer, boxed: false)} + serializeInt32(period, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(proximityNotificationRadius!, buffer: buffer, boxed: false)} break case .messageMediaPoll(let poll, let results): if boxed { @@ -17216,16 +17666,6 @@ public extension Api { serializeInt32(value, buffer: buffer, boxed: false) serializeString(emoticon, buffer: buffer, boxed: false) break - case .messageMediaGeoLive(let flags, let geo, let heading, let period, let proximityNotificationRadius): - if boxed { - buffer.appendInt32(-1186937242) - } - serializeInt32(flags, buffer: buffer, boxed: false) - geo.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(heading!, buffer: buffer, boxed: false)} - serializeInt32(period, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(proximityNotificationRadius!, buffer: buffer, boxed: false)} - break } } @@ -17233,36 +17673,55 @@ public extension Api { switch self { case .messageMediaEmpty: return ("messageMediaEmpty", []) + case .messageMediaPhoto(let flags, let photo, let ttlSeconds): + return ("messageMediaPhoto", [("flags", flags), ("photo", photo), ("ttlSeconds", ttlSeconds)]) case .messageMediaGeo(let geo): return ("messageMediaGeo", [("geo", geo)]) + case .messageMediaContact(let phoneNumber, let firstName, let lastName, let vcard, let userId): + return ("messageMediaContact", [("phoneNumber", phoneNumber), ("firstName", firstName), ("lastName", lastName), ("vcard", vcard), ("userId", userId)]) case .messageMediaUnsupported: return ("messageMediaUnsupported", []) + case .messageMediaDocument(let flags, let document, let ttlSeconds): + return ("messageMediaDocument", [("flags", flags), ("document", document), ("ttlSeconds", ttlSeconds)]) case .messageMediaWebPage(let webpage): return ("messageMediaWebPage", [("webpage", webpage)]) + case .messageMediaVenue(let geo, let title, let address, let provider, let venueId, let venueType): + return ("messageMediaVenue", [("geo", geo), ("title", title), ("address", address), ("provider", provider), ("venueId", venueId), ("venueType", venueType)]) case .messageMediaGame(let game): return ("messageMediaGame", [("game", game)]) case .messageMediaInvoice(let flags, let title, let description, let photo, let receiptMsgId, let currency, let totalAmount, let startParam): return ("messageMediaInvoice", [("flags", flags), ("title", title), ("description", description), ("photo", photo), ("receiptMsgId", receiptMsgId), ("currency", currency), ("totalAmount", totalAmount), ("startParam", startParam)]) - case .messageMediaVenue(let geo, let title, let address, let provider, let venueId, let venueType): - return ("messageMediaVenue", [("geo", geo), ("title", title), ("address", address), ("provider", provider), ("venueId", venueId), ("venueType", venueType)]) - case .messageMediaPhoto(let flags, let photo, let ttlSeconds): - return ("messageMediaPhoto", [("flags", flags), ("photo", photo), ("ttlSeconds", ttlSeconds)]) - case .messageMediaDocument(let flags, let document, let ttlSeconds): - return ("messageMediaDocument", [("flags", flags), ("document", document), ("ttlSeconds", ttlSeconds)]) - case .messageMediaContact(let phoneNumber, let firstName, let lastName, let vcard, let userId): - return ("messageMediaContact", [("phoneNumber", phoneNumber), ("firstName", firstName), ("lastName", lastName), ("vcard", vcard), ("userId", userId)]) + case .messageMediaGeoLive(let flags, let geo, let heading, let period, let proximityNotificationRadius): + return ("messageMediaGeoLive", [("flags", flags), ("geo", geo), ("heading", heading), ("period", period), ("proximityNotificationRadius", proximityNotificationRadius)]) case .messageMediaPoll(let poll, let results): return ("messageMediaPoll", [("poll", poll), ("results", results)]) case .messageMediaDice(let value, let emoticon): return ("messageMediaDice", [("value", value), ("emoticon", emoticon)]) - case .messageMediaGeoLive(let flags, let geo, let heading, let period, let proximityNotificationRadius): - return ("messageMediaGeoLive", [("flags", flags), ("geo", geo), ("heading", heading), ("period", period), ("proximityNotificationRadius", proximityNotificationRadius)]) } } public static func parse_messageMediaEmpty(_ reader: BufferReader) -> MessageMedia? { return Api.MessageMedia.messageMediaEmpty } + public static func parse_messageMediaPhoto(_ reader: BufferReader) -> MessageMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.Photo? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Photo + } } + var _3: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_3 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.MessageMedia.messageMediaPhoto(flags: _1!, photo: _2, ttlSeconds: _3) + } + else { + return nil + } + } public static func parse_messageMediaGeo(_ reader: BufferReader) -> MessageMedia? { var _1: Api.GeoPoint? if let signature = reader.readInt32() { @@ -17276,9 +17735,51 @@ public extension Api { return nil } } + public static func parse_messageMediaContact(_ reader: BufferReader) -> MessageMedia? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + var _5: Int32? + _5 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.MessageMedia.messageMediaContact(phoneNumber: _1!, firstName: _2!, lastName: _3!, vcard: _4!, userId: _5!) + } + else { + return nil + } + } public static func parse_messageMediaUnsupported(_ reader: BufferReader) -> MessageMedia? { return Api.MessageMedia.messageMediaUnsupported } + public static func parse_messageMediaDocument(_ reader: BufferReader) -> MessageMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.Document? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Document + } } + var _3: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_3 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.MessageMedia.messageMediaDocument(flags: _1!, document: _2, ttlSeconds: _3) + } + else { + return nil + } + } public static func parse_messageMediaWebPage(_ reader: BufferReader) -> MessageMedia? { var _1: Api.WebPage? if let signature = reader.readInt32() { @@ -17292,6 +17793,34 @@ public extension Api { return nil } } + public static func parse_messageMediaVenue(_ reader: BufferReader) -> MessageMedia? { + var _1: Api.GeoPoint? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.GeoPoint + } + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + var _5: String? + _5 = parseString(reader) + var _6: String? + _6 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.MessageMedia.messageMediaVenue(geo: _1!, title: _2!, address: _3!, provider: _4!, venueId: _5!, venueType: _6!) + } + else { + return nil + } + } public static func parse_messageMediaGame(_ reader: BufferReader) -> MessageMedia? { var _1: Api.Game? if let signature = reader.readInt32() { @@ -17339,90 +17868,26 @@ public extension Api { return nil } } - public static func parse_messageMediaVenue(_ reader: BufferReader) -> MessageMedia? { - var _1: Api.GeoPoint? + public static func parse_messageMediaGeoLive(_ reader: BufferReader) -> MessageMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.GeoPoint? if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.GeoPoint + _2 = Api.parse(reader, signature: signature) as? Api.GeoPoint } - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - var _5: String? - _5 = parseString(reader) - var _6: String? - _6 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.MessageMedia.messageMediaVenue(geo: _1!, title: _2!, address: _3!, provider: _4!, venueId: _5!, venueType: _6!) - } - else { - return nil - } - } - public static func parse_messageMediaPhoto(_ reader: BufferReader) -> MessageMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.Photo? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Photo - } } var _3: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_3 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.MessageMedia.messageMediaPhoto(flags: _1!, photo: _2, ttlSeconds: _3) - } - else { - return nil - } - } - public static func parse_messageMediaDocument(_ reader: BufferReader) -> MessageMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.Document? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Document - } } - var _3: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_3 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.MessageMedia.messageMediaDocument(flags: _1!, document: _2, ttlSeconds: _3) - } - else { - return nil - } - } - public static func parse_messageMediaContact(_ reader: BufferReader) -> MessageMedia? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) + if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } + var _4: Int32? + _4 = reader.readInt32() var _5: Int32? - _5 = reader.readInt32() + if Int(_1!) & Int(1 << 1) != 0 {_5 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = _3 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil let _c4 = _4 != nil - let _c5 = _5 != nil + let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.MessageMedia.messageMediaContact(phoneNumber: _1!, firstName: _2!, lastName: _3!, vcard: _4!, userId: _5!) + return Api.MessageMedia.messageMediaGeoLive(flags: _1!, geo: _2!, heading: _3, period: _4!, proximityNotificationRadius: _5) } else { return nil @@ -17460,31 +17925,6 @@ public extension Api { return nil } } - public static func parse_messageMediaGeoLive(_ reader: BufferReader) -> MessageMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.GeoPoint? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.GeoPoint - } - var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_5 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.MessageMedia.messageMediaGeoLive(flags: _1!, geo: _2!, heading: _3, period: _4!, proximityNotificationRadius: _5) - } - else { - return nil - } - } } public enum PaymentSavedCredentials: TypeConstructorDescription { @@ -17524,32 +17964,6 @@ public extension Api { } } - } - public enum Null: TypeConstructorDescription { - case null - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .null: - if boxed { - buffer.appendInt32(1450380236) - } - - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .null: - return ("null", []) - } - } - - public static func parse_null(_ reader: BufferReader) -> Null? { - return Api.Null.null - } - } public enum DocumentAttribute: TypeConstructorDescription { case documentAttributeImageSize(w: Int32, h: Int32) @@ -18104,92 +18518,6 @@ public extension Api { } } - } - public enum FoundGif: TypeConstructorDescription { - case foundGif(url: String, thumbUrl: String, contentUrl: String, contentType: String, w: Int32, h: Int32) - case foundGifCached(url: String, photo: Api.Photo, document: Api.Document) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .foundGif(let url, let thumbUrl, let contentUrl, let contentType, let w, let h): - if boxed { - buffer.appendInt32(372165663) - } - serializeString(url, buffer: buffer, boxed: false) - serializeString(thumbUrl, buffer: buffer, boxed: false) - serializeString(contentUrl, buffer: buffer, boxed: false) - serializeString(contentType, buffer: buffer, boxed: false) - serializeInt32(w, buffer: buffer, boxed: false) - serializeInt32(h, buffer: buffer, boxed: false) - break - case .foundGifCached(let url, let photo, let document): - if boxed { - buffer.appendInt32(-1670052855) - } - serializeString(url, buffer: buffer, boxed: false) - photo.serialize(buffer, true) - document.serialize(buffer, true) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .foundGif(let url, let thumbUrl, let contentUrl, let contentType, let w, let h): - return ("foundGif", [("url", url), ("thumbUrl", thumbUrl), ("contentUrl", contentUrl), ("contentType", contentType), ("w", w), ("h", h)]) - case .foundGifCached(let url, let photo, let document): - return ("foundGifCached", [("url", url), ("photo", photo), ("document", document)]) - } - } - - public static func parse_foundGif(_ reader: BufferReader) -> FoundGif? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - var _5: Int32? - _5 = reader.readInt32() - var _6: Int32? - _6 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.FoundGif.foundGif(url: _1!, thumbUrl: _2!, contentUrl: _3!, contentType: _4!, w: _5!, h: _6!) - } - else { - return nil - } - } - public static func parse_foundGifCached(_ reader: BufferReader) -> FoundGif? { - var _1: String? - _1 = parseString(reader) - var _2: Api.Photo? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Photo - } - var _3: Api.Document? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.Document - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.FoundGif.foundGifCached(url: _1!, photo: _2!, document: _3!) - } - else { - return nil - } - } - } public enum User: TypeConstructorDescription { case userEmpty(id: Int32) @@ -18304,12 +18632,20 @@ public extension Api { } public enum Message: TypeConstructorDescription { + case messageEmpty(flags: Int32, id: Int32, peerId: Api.Peer?) case message(flags: Int32, id: Int32, fromId: Api.Peer?, peerId: Api.Peer, fwdFrom: Api.MessageFwdHeader?, viaBotId: Int32?, replyTo: Api.MessageReplyHeader?, date: Int32, message: String, media: Api.MessageMedia?, replyMarkup: Api.ReplyMarkup?, entities: [Api.MessageEntity]?, views: Int32?, forwards: Int32?, replies: Api.MessageReplies?, editDate: Int32?, postAuthor: String?, groupedId: Int64?, restrictionReason: [Api.RestrictionReason]?) case messageService(flags: Int32, id: Int32, fromId: Api.Peer?, peerId: Api.Peer, replyTo: Api.MessageReplyHeader?, date: Int32, action: Api.MessageAction) - case messageEmpty(flags: Int32, id: Int32, peerId: Api.Peer?) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { + case .messageEmpty(let flags, let id, let peerId): + if boxed { + buffer.appendInt32(-1868117372) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {peerId!.serialize(buffer, true)} + break case .message(let flags, let id, let fromId, let peerId, let fwdFrom, let viaBotId, let replyTo, let date, let message, let media, let replyMarkup, let entities, let views, let forwards, let replies, let editDate, let postAuthor, let groupedId, let restrictionReason): if boxed { buffer.appendInt32(1487813065) @@ -18354,28 +18690,39 @@ public extension Api { serializeInt32(date, buffer: buffer, boxed: false) action.serialize(buffer, true) break - case .messageEmpty(let flags, let id, let peerId): - if boxed { - buffer.appendInt32(-1868117372) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {peerId!.serialize(buffer, true)} - break } } public func descriptionFields() -> (String, [(String, Any)]) { switch self { + case .messageEmpty(let flags, let id, let peerId): + return ("messageEmpty", [("flags", flags), ("id", id), ("peerId", peerId)]) case .message(let flags, let id, let fromId, let peerId, let fwdFrom, let viaBotId, let replyTo, let date, let message, let media, let replyMarkup, let entities, let views, let forwards, let replies, let editDate, let postAuthor, let groupedId, let restrictionReason): return ("message", [("flags", flags), ("id", id), ("fromId", fromId), ("peerId", peerId), ("fwdFrom", fwdFrom), ("viaBotId", viaBotId), ("replyTo", replyTo), ("date", date), ("message", message), ("media", media), ("replyMarkup", replyMarkup), ("entities", entities), ("views", views), ("forwards", forwards), ("replies", replies), ("editDate", editDate), ("postAuthor", postAuthor), ("groupedId", groupedId), ("restrictionReason", restrictionReason)]) case .messageService(let flags, let id, let fromId, let peerId, let replyTo, let date, let action): return ("messageService", [("flags", flags), ("id", id), ("fromId", fromId), ("peerId", peerId), ("replyTo", replyTo), ("date", date), ("action", action)]) - case .messageEmpty(let flags, let id, let peerId): - return ("messageEmpty", [("flags", flags), ("id", id), ("peerId", peerId)]) } } + public static func parse_messageEmpty(_ reader: BufferReader) -> Message? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Api.Peer? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.Peer + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.Message.messageEmpty(flags: _1!, id: _2!, peerId: _3) + } + else { + return nil + } + } public static func parse_message(_ reader: BufferReader) -> Message? { var _1: Int32? _1 = reader.readInt32() @@ -18496,25 +18843,6 @@ public extension Api { return nil } } - public static func parse_messageEmpty(_ reader: BufferReader) -> Message? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Api.Peer? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.Peer - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.Message.messageEmpty(flags: _1!, id: _2!, peerId: _3) - } - else { - return nil - } - } } public enum StatsGroupTopInviter: TypeConstructorDescription { @@ -18556,30 +18884,18 @@ public extension Api { } public enum InputFileLocation: TypeConstructorDescription { - case inputEncryptedFileLocation(id: Int64, accessHash: Int64) - case inputSecureFileLocation(id: Int64, accessHash: Int64) case inputFileLocation(volumeId: Int64, localId: Int32, secret: Int64, fileReference: Buffer) - case inputPhotoFileLocation(id: Int64, accessHash: Int64, fileReference: Buffer, thumbSize: String) + case inputEncryptedFileLocation(id: Int64, accessHash: Int64) case inputDocumentFileLocation(id: Int64, accessHash: Int64, fileReference: Buffer, thumbSize: String) + case inputSecureFileLocation(id: Int64, accessHash: Int64) + case inputTakeoutFileLocation + case inputPhotoFileLocation(id: Int64, accessHash: Int64, fileReference: Buffer, thumbSize: String) + case inputPhotoLegacyFileLocation(id: Int64, accessHash: Int64, fileReference: Buffer, volumeId: Int64, localId: Int32, secret: Int64) case inputPeerPhotoFileLocation(flags: Int32, peer: Api.InputPeer, volumeId: Int64, localId: Int32) case inputStickerSetThumb(stickerset: Api.InputStickerSet, volumeId: Int64, localId: Int32) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .inputEncryptedFileLocation(let id, let accessHash): - if boxed { - buffer.appendInt32(-182231723) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - break - case .inputSecureFileLocation(let id, let accessHash): - if boxed { - buffer.appendInt32(-876089816) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - break case .inputFileLocation(let volumeId, let localId, let secret, let fileReference): if boxed { buffer.appendInt32(-539317279) @@ -18588,6 +18904,35 @@ public extension Api { serializeInt32(localId, buffer: buffer, boxed: false) serializeInt64(secret, buffer: buffer, boxed: false) serializeBytes(fileReference, buffer: buffer, boxed: false) + break + case .inputEncryptedFileLocation(let id, let accessHash): + if boxed { + buffer.appendInt32(-182231723) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + break + case .inputDocumentFileLocation(let id, let accessHash, let fileReference, let thumbSize): + if boxed { + buffer.appendInt32(-1160743548) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeBytes(fileReference, buffer: buffer, boxed: false) + serializeString(thumbSize, buffer: buffer, boxed: false) + break + case .inputSecureFileLocation(let id, let accessHash): + if boxed { + buffer.appendInt32(-876089816) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + break + case .inputTakeoutFileLocation: + if boxed { + buffer.appendInt32(700340377) + } + break case .inputPhotoFileLocation(let id, let accessHash, let fileReference, let thumbSize): if boxed { @@ -18598,14 +18943,16 @@ public extension Api { serializeBytes(fileReference, buffer: buffer, boxed: false) serializeString(thumbSize, buffer: buffer, boxed: false) break - case .inputDocumentFileLocation(let id, let accessHash, let fileReference, let thumbSize): + case .inputPhotoLegacyFileLocation(let id, let accessHash, let fileReference, let volumeId, let localId, let secret): if boxed { - buffer.appendInt32(-1160743548) + buffer.appendInt32(-667654413) } serializeInt64(id, buffer: buffer, boxed: false) serializeInt64(accessHash, buffer: buffer, boxed: false) serializeBytes(fileReference, buffer: buffer, boxed: false) - serializeString(thumbSize, buffer: buffer, boxed: false) + serializeInt64(volumeId, buffer: buffer, boxed: false) + serializeInt32(localId, buffer: buffer, boxed: false) + serializeInt64(secret, buffer: buffer, boxed: false) break case .inputPeerPhotoFileLocation(let flags, let peer, let volumeId, let localId): if boxed { @@ -18629,16 +18976,20 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .inputEncryptedFileLocation(let id, let accessHash): - return ("inputEncryptedFileLocation", [("id", id), ("accessHash", accessHash)]) - case .inputSecureFileLocation(let id, let accessHash): - return ("inputSecureFileLocation", [("id", id), ("accessHash", accessHash)]) case .inputFileLocation(let volumeId, let localId, let secret, let fileReference): return ("inputFileLocation", [("volumeId", volumeId), ("localId", localId), ("secret", secret), ("fileReference", fileReference)]) - case .inputPhotoFileLocation(let id, let accessHash, let fileReference, let thumbSize): - return ("inputPhotoFileLocation", [("id", id), ("accessHash", accessHash), ("fileReference", fileReference), ("thumbSize", thumbSize)]) + case .inputEncryptedFileLocation(let id, let accessHash): + return ("inputEncryptedFileLocation", [("id", id), ("accessHash", accessHash)]) case .inputDocumentFileLocation(let id, let accessHash, let fileReference, let thumbSize): return ("inputDocumentFileLocation", [("id", id), ("accessHash", accessHash), ("fileReference", fileReference), ("thumbSize", thumbSize)]) + case .inputSecureFileLocation(let id, let accessHash): + return ("inputSecureFileLocation", [("id", id), ("accessHash", accessHash)]) + case .inputTakeoutFileLocation: + return ("inputTakeoutFileLocation", []) + case .inputPhotoFileLocation(let id, let accessHash, let fileReference, let thumbSize): + return ("inputPhotoFileLocation", [("id", id), ("accessHash", accessHash), ("fileReference", fileReference), ("thumbSize", thumbSize)]) + case .inputPhotoLegacyFileLocation(let id, let accessHash, let fileReference, let volumeId, let localId, let secret): + return ("inputPhotoLegacyFileLocation", [("id", id), ("accessHash", accessHash), ("fileReference", fileReference), ("volumeId", volumeId), ("localId", localId), ("secret", secret)]) case .inputPeerPhotoFileLocation(let flags, let peer, let volumeId, let localId): return ("inputPeerPhotoFileLocation", [("flags", flags), ("peer", peer), ("volumeId", volumeId), ("localId", localId)]) case .inputStickerSetThumb(let stickerset, let volumeId, let localId): @@ -18646,34 +18997,6 @@ public extension Api { } } - public static func parse_inputEncryptedFileLocation(_ reader: BufferReader) -> InputFileLocation? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputFileLocation.inputEncryptedFileLocation(id: _1!, accessHash: _2!) - } - else { - return nil - } - } - public static func parse_inputSecureFileLocation(_ reader: BufferReader) -> InputFileLocation? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputFileLocation.inputSecureFileLocation(id: _1!, accessHash: _2!) - } - else { - return nil - } - } public static func parse_inputFileLocation(_ reader: BufferReader) -> InputFileLocation? { var _1: Int64? _1 = reader.readInt64() @@ -18694,6 +19017,57 @@ public extension Api { return nil } } + public static func parse_inputEncryptedFileLocation(_ reader: BufferReader) -> InputFileLocation? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputFileLocation.inputEncryptedFileLocation(id: _1!, accessHash: _2!) + } + else { + return nil + } + } + public static func parse_inputDocumentFileLocation(_ reader: BufferReader) -> InputFileLocation? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int64? + _2 = reader.readInt64() + var _3: Buffer? + _3 = parseBytes(reader) + var _4: String? + _4 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputFileLocation.inputDocumentFileLocation(id: _1!, accessHash: _2!, fileReference: _3!, thumbSize: _4!) + } + else { + return nil + } + } + public static func parse_inputSecureFileLocation(_ reader: BufferReader) -> InputFileLocation? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputFileLocation.inputSecureFileLocation(id: _1!, accessHash: _2!) + } + else { + return nil + } + } + public static func parse_inputTakeoutFileLocation(_ reader: BufferReader) -> InputFileLocation? { + return Api.InputFileLocation.inputTakeoutFileLocation + } public static func parse_inputPhotoFileLocation(_ reader: BufferReader) -> InputFileLocation? { var _1: Int64? _1 = reader.readInt64() @@ -18714,21 +19088,27 @@ public extension Api { return nil } } - public static func parse_inputDocumentFileLocation(_ reader: BufferReader) -> InputFileLocation? { + public static func parse_inputPhotoLegacyFileLocation(_ reader: BufferReader) -> InputFileLocation? { var _1: Int64? _1 = reader.readInt64() var _2: Int64? _2 = reader.readInt64() var _3: Buffer? _3 = parseBytes(reader) - var _4: String? - _4 = parseString(reader) + var _4: Int64? + _4 = reader.readInt64() + var _5: Int32? + _5 = reader.readInt32() + var _6: Int64? + _6 = reader.readInt64() let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputFileLocation.inputDocumentFileLocation(id: _1!, accessHash: _2!, fileReference: _3!, thumbSize: _4!) + let _c5 = _5 != nil + let _c6 = _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.InputFileLocation.inputPhotoLegacyFileLocation(id: _1!, accessHash: _2!, fileReference: _3!, volumeId: _4!, localId: _5!, secret: _6!) } else { return nil @@ -20059,7 +20439,6 @@ public extension Api { } public enum InputWebFileLocation: TypeConstructorDescription { case inputWebFileLocation(url: String, accessHash: Int64) - case inputWebFileGeoMessageLocation(peer: Api.InputPeer, msgId: Int32, w: Int32, h: Int32, zoom: Int32, scale: Int32) case inputWebFileGeoPointLocation(geoPoint: Api.InputGeoPoint, accessHash: Int64, w: Int32, h: Int32, zoom: Int32, scale: Int32) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { @@ -20071,17 +20450,6 @@ public extension Api { serializeString(url, buffer: buffer, boxed: false) serializeInt64(accessHash, buffer: buffer, boxed: false) break - case .inputWebFileGeoMessageLocation(let peer, let msgId, let w, let h, let zoom, let scale): - if boxed { - buffer.appendInt32(1430205163) - } - peer.serialize(buffer, true) - serializeInt32(msgId, buffer: buffer, boxed: false) - serializeInt32(w, buffer: buffer, boxed: false) - serializeInt32(h, buffer: buffer, boxed: false) - serializeInt32(zoom, buffer: buffer, boxed: false) - serializeInt32(scale, buffer: buffer, boxed: false) - break case .inputWebFileGeoPointLocation(let geoPoint, let accessHash, let w, let h, let zoom, let scale): if boxed { buffer.appendInt32(-1625153079) @@ -20100,8 +20468,6 @@ public extension Api { switch self { case .inputWebFileLocation(let url, let accessHash): return ("inputWebFileLocation", [("url", url), ("accessHash", accessHash)]) - case .inputWebFileGeoMessageLocation(let peer, let msgId, let w, let h, let zoom, let scale): - return ("inputWebFileGeoMessageLocation", [("peer", peer), ("msgId", msgId), ("w", w), ("h", h), ("zoom", zoom), ("scale", scale)]) case .inputWebFileGeoPointLocation(let geoPoint, let accessHash, let w, let h, let zoom, let scale): return ("inputWebFileGeoPointLocation", [("geoPoint", geoPoint), ("accessHash", accessHash), ("w", w), ("h", h), ("zoom", zoom), ("scale", scale)]) } @@ -20121,34 +20487,6 @@ public extension Api { return nil } } - public static func parse_inputWebFileGeoMessageLocation(_ reader: BufferReader) -> InputWebFileLocation? { - var _1: Api.InputPeer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputPeer - } - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - var _6: Int32? - _6 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.InputWebFileLocation.inputWebFileGeoMessageLocation(peer: _1!, msgId: _2!, w: _3!, h: _4!, zoom: _5!, scale: _6!) - } - else { - return nil - } - } public static func parse_inputWebFileGeoPointLocation(_ reader: BufferReader) -> InputWebFileLocation? { var _1: Api.InputGeoPoint? if let signature = reader.readInt32() { @@ -20178,6 +20516,40 @@ public extension Api { } } + } + public enum EmojiLanguage: TypeConstructorDescription { + case emojiLanguage(langCode: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .emojiLanguage(let langCode): + if boxed { + buffer.appendInt32(-1275374751) + } + serializeString(langCode, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .emojiLanguage(let langCode): + return ("emojiLanguage", [("langCode", langCode)]) + } + } + + public static func parse_emojiLanguage(_ reader: BufferReader) -> EmojiLanguage? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.EmojiLanguage.emojiLanguage(langCode: _1!) + } + else { + return nil + } + } + } public enum MessageFwdHeader: TypeConstructorDescription { case messageFwdHeader(flags: Int32, fromId: Api.Peer?, fromName: String?, date: Int32, channelPost: Int32?, postAuthor: String?, savedFromPeer: Api.Peer?, savedFromMsgId: Int32?, psaType: String?) @@ -20328,7 +20700,6 @@ public extension Api { case inputMessagesFilterPhotos case inputMessagesFilterVideo case inputMessagesFilterPhotoVideo - case inputMessagesFilterPhotoVideoDocuments case inputMessagesFilterDocument case inputMessagesFilterUrl case inputMessagesFilterGif @@ -20339,7 +20710,6 @@ public extension Api { case inputMessagesFilterRoundVoice case inputMessagesFilterRoundVideo case inputMessagesFilterMyMentions - case inputMessagesFilterMyMentionsUnread case inputMessagesFilterGeo case inputMessagesFilterContacts case inputMessagesFilterPinned @@ -20369,12 +20739,6 @@ public extension Api { buffer.appendInt32(1458172132) } - break - case .inputMessagesFilterPhotoVideoDocuments: - if boxed { - buffer.appendInt32(-648121413) - } - break case .inputMessagesFilterDocument: if boxed { @@ -20435,12 +20799,6 @@ public extension Api { buffer.appendInt32(-1040652646) } - break - case .inputMessagesFilterMyMentionsUnread: - if boxed { - buffer.appendInt32(1187706024) - } - break case .inputMessagesFilterGeo: if boxed { @@ -20473,8 +20831,6 @@ public extension Api { return ("inputMessagesFilterVideo", []) case .inputMessagesFilterPhotoVideo: return ("inputMessagesFilterPhotoVideo", []) - case .inputMessagesFilterPhotoVideoDocuments: - return ("inputMessagesFilterPhotoVideoDocuments", []) case .inputMessagesFilterDocument: return ("inputMessagesFilterDocument", []) case .inputMessagesFilterUrl: @@ -20495,8 +20851,6 @@ public extension Api { return ("inputMessagesFilterRoundVideo", []) case .inputMessagesFilterMyMentions: return ("inputMessagesFilterMyMentions", []) - case .inputMessagesFilterMyMentionsUnread: - return ("inputMessagesFilterMyMentionsUnread", []) case .inputMessagesFilterGeo: return ("inputMessagesFilterGeo", []) case .inputMessagesFilterContacts: @@ -20518,9 +20872,6 @@ public extension Api { public static func parse_inputMessagesFilterPhotoVideo(_ reader: BufferReader) -> MessagesFilter? { return Api.MessagesFilter.inputMessagesFilterPhotoVideo } - public static func parse_inputMessagesFilterPhotoVideoDocuments(_ reader: BufferReader) -> MessagesFilter? { - return Api.MessagesFilter.inputMessagesFilterPhotoVideoDocuments - } public static func parse_inputMessagesFilterDocument(_ reader: BufferReader) -> MessagesFilter? { return Api.MessagesFilter.inputMessagesFilterDocument } @@ -20559,9 +20910,6 @@ public extension Api { public static func parse_inputMessagesFilterMyMentions(_ reader: BufferReader) -> MessagesFilter? { return Api.MessagesFilter.inputMessagesFilterMyMentions } - public static func parse_inputMessagesFilterMyMentionsUnread(_ reader: BufferReader) -> MessagesFilter? { - return Api.MessagesFilter.inputMessagesFilterMyMentionsUnread - } public static func parse_inputMessagesFilterGeo(_ reader: BufferReader) -> MessagesFilter? { return Api.MessagesFilter.inputMessagesFilterGeo } @@ -20648,14 +20996,27 @@ public extension Api { } public enum BotInlineMessage: TypeConstructorDescription { - case botInlineMessageText(flags: Int32, message: String, entities: [Api.MessageEntity]?, replyMarkup: Api.ReplyMarkup?) case botInlineMessageMediaAuto(flags: Int32, message: String, entities: [Api.MessageEntity]?, replyMarkup: Api.ReplyMarkup?) + case botInlineMessageText(flags: Int32, message: String, entities: [Api.MessageEntity]?, replyMarkup: Api.ReplyMarkup?) + case botInlineMessageMediaGeo(flags: Int32, geo: Api.GeoPoint, heading: Int32?, period: Int32?, proximityNotificationRadius: Int32?, replyMarkup: Api.ReplyMarkup?) case botInlineMessageMediaVenue(flags: Int32, geo: Api.GeoPoint, title: String, address: String, provider: String, venueId: String, venueType: String, replyMarkup: Api.ReplyMarkup?) case botInlineMessageMediaContact(flags: Int32, phoneNumber: String, firstName: String, lastName: String, vcard: String, replyMarkup: Api.ReplyMarkup?) - case botInlineMessageMediaGeo(flags: Int32, geo: Api.GeoPoint, heading: Int32?, period: Int32?, proximityNotificationRadius: Int32?, replyMarkup: Api.ReplyMarkup?) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { + case .botInlineMessageMediaAuto(let flags, let message, let entities, let replyMarkup): + if boxed { + buffer.appendInt32(1984755728) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(message, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities!.count)) + for item in entities! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} + break case .botInlineMessageText(let flags, let message, let entities, let replyMarkup): if boxed { buffer.appendInt32(-1937807902) @@ -20669,17 +21030,15 @@ public extension Api { }} if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} break - case .botInlineMessageMediaAuto(let flags, let message, let entities, let replyMarkup): + case .botInlineMessageMediaGeo(let flags, let geo, let heading, let period, let proximityNotificationRadius, let replyMarkup): if boxed { - buffer.appendInt32(1984755728) + buffer.appendInt32(85477117) } serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(message, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities!.count)) - for item in entities! { - item.serialize(buffer, true) - }} + geo.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(heading!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(period!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeInt32(proximityNotificationRadius!, buffer: buffer, boxed: false)} if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} break case .botInlineMessageMediaVenue(let flags, let geo, let title, let address, let provider, let venueId, let venueType, let replyMarkup): @@ -20706,35 +21065,48 @@ public extension Api { serializeString(vcard, buffer: buffer, boxed: false) if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} break - case .botInlineMessageMediaGeo(let flags, let geo, let heading, let period, let proximityNotificationRadius, let replyMarkup): - if boxed { - buffer.appendInt32(85477117) - } - serializeInt32(flags, buffer: buffer, boxed: false) - geo.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(heading!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(period!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeInt32(proximityNotificationRadius!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} - break } } public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .botInlineMessageText(let flags, let message, let entities, let replyMarkup): - return ("botInlineMessageText", [("flags", flags), ("message", message), ("entities", entities), ("replyMarkup", replyMarkup)]) case .botInlineMessageMediaAuto(let flags, let message, let entities, let replyMarkup): return ("botInlineMessageMediaAuto", [("flags", flags), ("message", message), ("entities", entities), ("replyMarkup", replyMarkup)]) + case .botInlineMessageText(let flags, let message, let entities, let replyMarkup): + return ("botInlineMessageText", [("flags", flags), ("message", message), ("entities", entities), ("replyMarkup", replyMarkup)]) + case .botInlineMessageMediaGeo(let flags, let geo, let heading, let period, let proximityNotificationRadius, let replyMarkup): + return ("botInlineMessageMediaGeo", [("flags", flags), ("geo", geo), ("heading", heading), ("period", period), ("proximityNotificationRadius", proximityNotificationRadius), ("replyMarkup", replyMarkup)]) case .botInlineMessageMediaVenue(let flags, let geo, let title, let address, let provider, let venueId, let venueType, let replyMarkup): return ("botInlineMessageMediaVenue", [("flags", flags), ("geo", geo), ("title", title), ("address", address), ("provider", provider), ("venueId", venueId), ("venueType", venueType), ("replyMarkup", replyMarkup)]) case .botInlineMessageMediaContact(let flags, let phoneNumber, let firstName, let lastName, let vcard, let replyMarkup): return ("botInlineMessageMediaContact", [("flags", flags), ("phoneNumber", phoneNumber), ("firstName", firstName), ("lastName", lastName), ("vcard", vcard), ("replyMarkup", replyMarkup)]) - case .botInlineMessageMediaGeo(let flags, let geo, let heading, let period, let proximityNotificationRadius, let replyMarkup): - return ("botInlineMessageMediaGeo", [("flags", flags), ("geo", geo), ("heading", heading), ("period", period), ("proximityNotificationRadius", proximityNotificationRadius), ("replyMarkup", replyMarkup)]) } } + public static func parse_botInlineMessageMediaAuto(_ reader: BufferReader) -> BotInlineMessage? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: [Api.MessageEntity]? + if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) + } } + var _4: Api.ReplyMarkup? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.BotInlineMessage.botInlineMessageMediaAuto(flags: _1!, message: _2!, entities: _3, replyMarkup: _4) + } + else { + return nil + } + } public static func parse_botInlineMessageText(_ reader: BufferReader) -> BotInlineMessage? { var _1: Int32? _1 = reader.readInt32() @@ -20759,25 +21131,31 @@ public extension Api { return nil } } - public static func parse_botInlineMessageMediaAuto(_ reader: BufferReader) -> BotInlineMessage? { + public static func parse_botInlineMessageMediaGeo(_ reader: BufferReader) -> BotInlineMessage? { var _1: Int32? _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) - } } - var _4: Api.ReplyMarkup? + var _2: Api.GeoPoint? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.GeoPoint + } + var _3: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } + var _4: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt32() } + var _5: Int32? + if Int(_1!) & Int(1 << 3) != 0 {_5 = reader.readInt32() } + var _6: Api.ReplyMarkup? if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup + _6 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.BotInlineMessage.botInlineMessageMediaAuto(flags: _1!, message: _2!, entities: _3, replyMarkup: _4) + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.BotInlineMessage.botInlineMessageMediaGeo(flags: _1!, geo: _2!, heading: _3, period: _4, proximityNotificationRadius: _5, replyMarkup: _6) } else { return nil @@ -20847,36 +21225,6 @@ public extension Api { return nil } } - public static func parse_botInlineMessageMediaGeo(_ reader: BufferReader) -> BotInlineMessage? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.GeoPoint? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.GeoPoint - } - var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } - var _4: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt32() } - var _5: Int32? - if Int(_1!) & Int(1 << 3) != 0 {_5 = reader.readInt32() } - var _6: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.BotInlineMessage.botInlineMessageMediaGeo(flags: _1!, geo: _2!, heading: _3, period: _4, proximityNotificationRadius: _5, replyMarkup: _6) - } - else { - return nil - } - } } public enum InputPeerNotifySettings: TypeConstructorDescription { @@ -21420,6 +21768,64 @@ public extension Api { return Api.SecureValueType.secureValueTypeEmail } + } + public enum Scheme: TypeConstructorDescription { + case scheme(schemeRaw: String, types: [Api.SchemeType], methods: [Api.SchemeMethod], version: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .scheme(let schemeRaw, let types, let methods, let version): + if boxed { + buffer.appendInt32(1315894878) + } + serializeString(schemeRaw, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(types.count)) + for item in types { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(methods.count)) + for item in methods { + item.serialize(buffer, true) + } + serializeInt32(version, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .scheme(let schemeRaw, let types, let methods, let version): + return ("scheme", [("schemeRaw", schemeRaw), ("types", types), ("methods", methods), ("version", version)]) + } + } + + public static func parse_scheme(_ reader: BufferReader) -> Scheme? { + var _1: String? + _1 = parseString(reader) + var _2: [Api.SchemeType]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SchemeType.self) + } + var _3: [Api.SchemeMethod]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SchemeMethod.self) + } + var _4: Int32? + _4 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.Scheme.scheme(schemeRaw: _1!, types: _2!, methods: _3!, version: _4!) + } + else { + return nil + } + } + } public enum PasswordKdfAlgo: TypeConstructorDescription { case passwordKdfAlgoUnknown @@ -21480,13 +21886,27 @@ public extension Api { } public enum InputBotInlineResult: TypeConstructorDescription { + case inputBotInlineResult(flags: Int32, id: String, type: String, title: String?, description: String?, url: String?, thumb: Api.InputWebDocument?, content: Api.InputWebDocument?, sendMessage: Api.InputBotInlineMessage) case inputBotInlineResultPhoto(id: String, type: String, photo: Api.InputPhoto, sendMessage: Api.InputBotInlineMessage) case inputBotInlineResultDocument(flags: Int32, id: String, type: String, title: String?, description: String?, document: Api.InputDocument, sendMessage: Api.InputBotInlineMessage) case inputBotInlineResultGame(id: String, shortName: String, sendMessage: Api.InputBotInlineMessage) - case inputBotInlineResult(flags: Int32, id: String, type: String, title: String?, description: String?, url: String?, thumb: Api.InputWebDocument?, content: Api.InputWebDocument?, sendMessage: Api.InputBotInlineMessage) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { + case .inputBotInlineResult(let flags, let id, let type, let title, let description, let url, let thumb, let content, let sendMessage): + if boxed { + buffer.appendInt32(-2000710887) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(id, buffer: buffer, boxed: false) + serializeString(type, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeString(title!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeString(description!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeString(url!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 4) != 0 {thumb!.serialize(buffer, true)} + if Int(flags) & Int(1 << 5) != 0 {content!.serialize(buffer, true)} + sendMessage.serialize(buffer, true) + break case .inputBotInlineResultPhoto(let id, let type, let photo, let sendMessage): if boxed { buffer.appendInt32(-1462213465) @@ -21516,36 +21936,63 @@ public extension Api { serializeString(shortName, buffer: buffer, boxed: false) sendMessage.serialize(buffer, true) break - case .inputBotInlineResult(let flags, let id, let type, let title, let description, let url, let thumb, let content, let sendMessage): - if boxed { - buffer.appendInt32(-2000710887) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(id, buffer: buffer, boxed: false) - serializeString(type, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeString(title!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeString(description!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeString(url!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 4) != 0 {thumb!.serialize(buffer, true)} - if Int(flags) & Int(1 << 5) != 0 {content!.serialize(buffer, true)} - sendMessage.serialize(buffer, true) - break } } public func descriptionFields() -> (String, [(String, Any)]) { switch self { + case .inputBotInlineResult(let flags, let id, let type, let title, let description, let url, let thumb, let content, let sendMessage): + return ("inputBotInlineResult", [("flags", flags), ("id", id), ("type", type), ("title", title), ("description", description), ("url", url), ("thumb", thumb), ("content", content), ("sendMessage", sendMessage)]) case .inputBotInlineResultPhoto(let id, let type, let photo, let sendMessage): return ("inputBotInlineResultPhoto", [("id", id), ("type", type), ("photo", photo), ("sendMessage", sendMessage)]) case .inputBotInlineResultDocument(let flags, let id, let type, let title, let description, let document, let sendMessage): return ("inputBotInlineResultDocument", [("flags", flags), ("id", id), ("type", type), ("title", title), ("description", description), ("document", document), ("sendMessage", sendMessage)]) case .inputBotInlineResultGame(let id, let shortName, let sendMessage): return ("inputBotInlineResultGame", [("id", id), ("shortName", shortName), ("sendMessage", sendMessage)]) - case .inputBotInlineResult(let flags, let id, let type, let title, let description, let url, let thumb, let content, let sendMessage): - return ("inputBotInlineResult", [("flags", flags), ("id", id), ("type", type), ("title", title), ("description", description), ("url", url), ("thumb", thumb), ("content", content), ("sendMessage", sendMessage)]) } } + public static func parse_inputBotInlineResult(_ reader: BufferReader) -> InputBotInlineResult? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: String? + if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } + var _5: String? + if Int(_1!) & Int(1 << 2) != 0 {_5 = parseString(reader) } + var _6: String? + if Int(_1!) & Int(1 << 3) != 0 {_6 = parseString(reader) } + var _7: Api.InputWebDocument? + if Int(_1!) & Int(1 << 4) != 0 {if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.InputWebDocument + } } + var _8: Api.InputWebDocument? + if Int(_1!) & Int(1 << 5) != 0 {if let signature = reader.readInt32() { + _8 = Api.parse(reader, signature: signature) as? Api.InputWebDocument + } } + var _9: Api.InputBotInlineMessage? + if let signature = reader.readInt32() { + _9 = Api.parse(reader, signature: signature) as? Api.InputBotInlineMessage + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil + let _c8 = (Int(_1!) & Int(1 << 5) == 0) || _8 != nil + let _c9 = _9 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { + return Api.InputBotInlineResult.inputBotInlineResult(flags: _1!, id: _2!, type: _3!, title: _4, description: _5, url: _6, thumb: _7, content: _8, sendMessage: _9!) + } + else { + return nil + } + } public static func parse_inputBotInlineResultPhoto(_ reader: BufferReader) -> InputBotInlineResult? { var _1: String? _1 = parseString(reader) @@ -21622,47 +22069,6 @@ public extension Api { return nil } } - public static func parse_inputBotInlineResult(_ reader: BufferReader) -> InputBotInlineResult? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: String? - if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } - var _5: String? - if Int(_1!) & Int(1 << 2) != 0 {_5 = parseString(reader) } - var _6: String? - if Int(_1!) & Int(1 << 3) != 0 {_6 = parseString(reader) } - var _7: Api.InputWebDocument? - if Int(_1!) & Int(1 << 4) != 0 {if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.InputWebDocument - } } - var _8: Api.InputWebDocument? - if Int(_1!) & Int(1 << 5) != 0 {if let signature = reader.readInt32() { - _8 = Api.parse(reader, signature: signature) as? Api.InputWebDocument - } } - var _9: Api.InputBotInlineMessage? - if let signature = reader.readInt32() { - _9 = Api.parse(reader, signature: signature) as? Api.InputBotInlineMessage - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 5) == 0) || _8 != nil - let _c9 = _9 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { - return Api.InputBotInlineResult.inputBotInlineResult(flags: _1!, id: _2!, type: _3!, title: _4, description: _5, url: _6, thumb: _7, content: _8, sendMessage: _9!) - } - else { - return nil - } - } } public enum PrivacyRule: TypeConstructorDescription { @@ -22784,24 +23190,11 @@ public extension Api { } public enum WebDocument: TypeConstructorDescription { - case webDocumentNoProxy(url: String, size: Int32, mimeType: String, attributes: [Api.DocumentAttribute]) case webDocument(url: String, accessHash: Int64, size: Int32, mimeType: String, attributes: [Api.DocumentAttribute]) + case webDocumentNoProxy(url: String, size: Int32, mimeType: String, attributes: [Api.DocumentAttribute]) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .webDocumentNoProxy(let url, let size, let mimeType, let attributes): - if boxed { - buffer.appendInt32(-104284986) - } - serializeString(url, buffer: buffer, boxed: false) - serializeInt32(size, buffer: buffer, boxed: false) - serializeString(mimeType, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(attributes.count)) - for item in attributes { - item.serialize(buffer, true) - } - break case .webDocument(let url, let accessHash, let size, let mimeType, let attributes): if boxed { buffer.appendInt32(475467473) @@ -22816,40 +23209,31 @@ public extension Api { item.serialize(buffer, true) } break + case .webDocumentNoProxy(let url, let size, let mimeType, let attributes): + if boxed { + buffer.appendInt32(-104284986) + } + serializeString(url, buffer: buffer, boxed: false) + serializeInt32(size, buffer: buffer, boxed: false) + serializeString(mimeType, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(attributes.count)) + for item in attributes { + item.serialize(buffer, true) + } + break } } public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .webDocumentNoProxy(let url, let size, let mimeType, let attributes): - return ("webDocumentNoProxy", [("url", url), ("size", size), ("mimeType", mimeType), ("attributes", attributes)]) case .webDocument(let url, let accessHash, let size, let mimeType, let attributes): return ("webDocument", [("url", url), ("accessHash", accessHash), ("size", size), ("mimeType", mimeType), ("attributes", attributes)]) + case .webDocumentNoProxy(let url, let size, let mimeType, let attributes): + return ("webDocumentNoProxy", [("url", url), ("size", size), ("mimeType", mimeType), ("attributes", attributes)]) } } - public static func parse_webDocumentNoProxy(_ reader: BufferReader) -> WebDocument? { - var _1: String? - _1 = parseString(reader) - var _2: Int32? - _2 = reader.readInt32() - var _3: String? - _3 = parseString(reader) - var _4: [Api.DocumentAttribute]? - if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DocumentAttribute.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.WebDocument.webDocumentNoProxy(url: _1!, size: _2!, mimeType: _3!, attributes: _4!) - } - else { - return nil - } - } public static func parse_webDocument(_ reader: BufferReader) -> WebDocument? { var _1: String? _1 = parseString(reader) @@ -22875,6 +23259,28 @@ public extension Api { return nil } } + public static func parse_webDocumentNoProxy(_ reader: BufferReader) -> WebDocument? { + var _1: String? + _1 = parseString(reader) + var _2: Int32? + _2 = reader.readInt32() + var _3: String? + _3 = parseString(reader) + var _4: [Api.DocumentAttribute]? + if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DocumentAttribute.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.WebDocument.webDocumentNoProxy(url: _1!, size: _2!, mimeType: _3!, attributes: _4!) + } + else { + return nil + } + } } public enum Theme: TypeConstructorDescription { @@ -23036,17 +23442,10 @@ public extension Api { } public enum PeerNotifySettings: TypeConstructorDescription { - case peerNotifySettingsEmpty case peerNotifySettings(flags: Int32, showPreviews: Api.Bool?, silent: Api.Bool?, muteUntil: Int32?, sound: String?) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .peerNotifySettingsEmpty: - if boxed { - buffer.appendInt32(1889961234) - } - - break case .peerNotifySettings(let flags, let showPreviews, let silent, let muteUntil, let sound): if boxed { buffer.appendInt32(-1353671392) @@ -23062,16 +23461,11 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .peerNotifySettingsEmpty: - return ("peerNotifySettingsEmpty", []) case .peerNotifySettings(let flags, let showPreviews, let silent, let muteUntil, let sound): return ("peerNotifySettings", [("flags", flags), ("showPreviews", showPreviews), ("silent", silent), ("muteUntil", muteUntil), ("sound", sound)]) } } - public static func parse_peerNotifySettingsEmpty(_ reader: BufferReader) -> PeerNotifySettings? { - return Api.PeerNotifySettings.peerNotifySettingsEmpty - } public static func parse_peerNotifySettings(_ reader: BufferReader) -> PeerNotifySettings? { var _1: Int32? _1 = reader.readInt32() @@ -23142,6 +23536,44 @@ public extension Api { } } + } + public enum SchemeParam: TypeConstructorDescription { + case schemeParam(name: String, type: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .schemeParam(let name, let type): + if boxed { + buffer.appendInt32(565550063) + } + serializeString(name, buffer: buffer, boxed: false) + serializeString(type, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .schemeParam(let name, let type): + return ("schemeParam", [("name", name), ("type", type)]) + } + } + + public static func parse_schemeParam(_ reader: BufferReader) -> SchemeParam? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.SchemeParam.schemeParam(name: _1!, type: _2!) + } + else { + return nil + } + } + } public enum PageRelatedArticle: TypeConstructorDescription { case pageRelatedArticle(flags: Int32, url: String, webpageId: Int64, title: String?, description: String?, photoId: Int64?, author: String?, publishedDate: Int32?) @@ -24012,8 +24444,8 @@ public extension Api { public enum EncryptedChat: TypeConstructorDescription { case encryptedChatEmpty(id: Int32) case encryptedChatWaiting(id: Int32, accessHash: Int64, date: Int32, adminId: Int32, participantId: Int32) - case encryptedChat(id: Int32, accessHash: Int64, date: Int32, adminId: Int32, participantId: Int32, gAOrB: Buffer, keyFingerprint: Int64) case encryptedChatRequested(flags: Int32, folderId: Int32?, id: Int32, accessHash: Int64, date: Int32, adminId: Int32, participantId: Int32, gA: Buffer) + case encryptedChat(id: Int32, accessHash: Int64, date: Int32, adminId: Int32, participantId: Int32, gAOrB: Buffer, keyFingerprint: Int64) case encryptedChatDiscarded(flags: Int32, id: Int32) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { @@ -24034,18 +24466,6 @@ public extension Api { serializeInt32(adminId, buffer: buffer, boxed: false) serializeInt32(participantId, buffer: buffer, boxed: false) break - case .encryptedChat(let id, let accessHash, let date, let adminId, let participantId, let gAOrB, let keyFingerprint): - if boxed { - buffer.appendInt32(-94974410) - } - serializeInt32(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - serializeInt32(adminId, buffer: buffer, boxed: false) - serializeInt32(participantId, buffer: buffer, boxed: false) - serializeBytes(gAOrB, buffer: buffer, boxed: false) - serializeInt64(keyFingerprint, buffer: buffer, boxed: false) - break case .encryptedChatRequested(let flags, let folderId, let id, let accessHash, let date, let adminId, let participantId, let gA): if boxed { buffer.appendInt32(1651608194) @@ -24059,6 +24479,18 @@ public extension Api { serializeInt32(participantId, buffer: buffer, boxed: false) serializeBytes(gA, buffer: buffer, boxed: false) break + case .encryptedChat(let id, let accessHash, let date, let adminId, let participantId, let gAOrB, let keyFingerprint): + if boxed { + buffer.appendInt32(-94974410) + } + serializeInt32(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + serializeInt32(adminId, buffer: buffer, boxed: false) + serializeInt32(participantId, buffer: buffer, boxed: false) + serializeBytes(gAOrB, buffer: buffer, boxed: false) + serializeInt64(keyFingerprint, buffer: buffer, boxed: false) + break case .encryptedChatDiscarded(let flags, let id): if boxed { buffer.appendInt32(505183301) @@ -24075,10 +24507,10 @@ public extension Api { return ("encryptedChatEmpty", [("id", id)]) case .encryptedChatWaiting(let id, let accessHash, let date, let adminId, let participantId): return ("encryptedChatWaiting", [("id", id), ("accessHash", accessHash), ("date", date), ("adminId", adminId), ("participantId", participantId)]) - case .encryptedChat(let id, let accessHash, let date, let adminId, let participantId, let gAOrB, let keyFingerprint): - return ("encryptedChat", [("id", id), ("accessHash", accessHash), ("date", date), ("adminId", adminId), ("participantId", participantId), ("gAOrB", gAOrB), ("keyFingerprint", keyFingerprint)]) case .encryptedChatRequested(let flags, let folderId, let id, let accessHash, let date, let adminId, let participantId, let gA): return ("encryptedChatRequested", [("flags", flags), ("folderId", folderId), ("id", id), ("accessHash", accessHash), ("date", date), ("adminId", adminId), ("participantId", participantId), ("gA", gA)]) + case .encryptedChat(let id, let accessHash, let date, let adminId, let participantId, let gAOrB, let keyFingerprint): + return ("encryptedChat", [("id", id), ("accessHash", accessHash), ("date", date), ("adminId", adminId), ("participantId", participantId), ("gAOrB", gAOrB), ("keyFingerprint", keyFingerprint)]) case .encryptedChatDiscarded(let flags, let id): return ("encryptedChatDiscarded", [("flags", flags), ("id", id)]) } @@ -24118,35 +24550,6 @@ public extension Api { return nil } } - public static func parse_encryptedChat(_ reader: BufferReader) -> EncryptedChat? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - var _6: Buffer? - _6 = parseBytes(reader) - var _7: Int64? - _7 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.EncryptedChat.encryptedChat(id: _1!, accessHash: _2!, date: _3!, adminId: _4!, participantId: _5!, gAOrB: _6!, keyFingerprint: _7!) - } - else { - return nil - } - } public static func parse_encryptedChatRequested(_ reader: BufferReader) -> EncryptedChat? { var _1: Int32? _1 = reader.readInt32() @@ -24179,6 +24582,35 @@ public extension Api { return nil } } + public static func parse_encryptedChat(_ reader: BufferReader) -> EncryptedChat? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + var _6: Buffer? + _6 = parseBytes(reader) + var _7: Int64? + _7 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.EncryptedChat.encryptedChat(id: _1!, accessHash: _2!, date: _3!, adminId: _4!, participantId: _5!, gAOrB: _6!, keyFingerprint: _7!) + } + else { + return nil + } + } public static func parse_encryptedChatDiscarded(_ reader: BufferReader) -> EncryptedChat? { var _1: Int32? _1 = reader.readInt32() diff --git a/submodules/TelegramApi/Sources/Api2.swift b/submodules/TelegramApi/Sources/Api2.swift index 125328e1af..7f9aceb2f5 100644 --- a/submodules/TelegramApi/Sources/Api2.swift +++ b/submodules/TelegramApi/Sources/Api2.swift @@ -1075,42 +1075,6 @@ public struct auth { } } - } - public enum CheckedPhone: TypeConstructorDescription { - case checkedPhone(phoneRegistered: Api.Bool) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .checkedPhone(let phoneRegistered): - if boxed { - buffer.appendInt32(-2128698738) - } - phoneRegistered.serialize(buffer, true) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .checkedPhone(let phoneRegistered): - return ("checkedPhone", [("phoneRegistered", phoneRegistered)]) - } - } - - public static func parse_checkedPhone(_ reader: BufferReader) -> CheckedPhone? { - var _1: Api.Bool? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Bool - } - let _c1 = _1 != nil - if _c1 { - return Api.auth.CheckedPhone.checkedPhone(phoneRegistered: _1!) - } - else { - return nil - } - } - } public enum SentCode: TypeConstructorDescription { case sentCode(flags: Int32, type: Api.auth.SentCodeType, phoneCodeHash: String, nextType: Api.auth.CodeType?, timeout: Int32?) diff --git a/submodules/TelegramApi/Sources/Api3.swift b/submodules/TelegramApi/Sources/Api3.swift index 9bd1e6a927..90c8887bc9 100644 --- a/submodules/TelegramApi/Sources/Api3.swift +++ b/submodules/TelegramApi/Sources/Api3.swift @@ -1469,78 +1469,6 @@ public struct account { } } public extension Api { -public struct wallet { - public enum KeySecretSalt: TypeConstructorDescription { - case secretSalt(salt: Buffer) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .secretSalt(let salt): - if boxed { - buffer.appendInt32(-582464156) - } - serializeBytes(salt, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .secretSalt(let salt): - return ("secretSalt", [("salt", salt)]) - } - } - - public static func parse_secretSalt(_ reader: BufferReader) -> KeySecretSalt? { - var _1: Buffer? - _1 = parseBytes(reader) - let _c1 = _1 != nil - if _c1 { - return Api.wallet.KeySecretSalt.secretSalt(salt: _1!) - } - else { - return nil - } - } - - } - public enum LiteResponse: TypeConstructorDescription { - case liteResponse(response: Buffer) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .liteResponse(let response): - if boxed { - buffer.appendInt32(1984136919) - } - serializeBytes(response, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .liteResponse(let response): - return ("liteResponse", [("response", response)]) - } - } - - public static func parse_liteResponse(_ reader: BufferReader) -> LiteResponse? { - var _1: Buffer? - _1 = parseBytes(reader) - let _c1 = _1 != nil - if _c1 { - return Api.wallet.LiteResponse.liteResponse(response: _1!) - } - else { - return nil - } - } - - } -} -} -public extension Api { public struct photos { public enum Photo: TypeConstructorDescription { case photo(photo: Api.Photo, users: [Api.User]) @@ -1855,37 +1783,6 @@ public struct phone { public extension Api { public struct functions { public struct messages { - public static func forwardMessage(peer: Api.InputPeer, id: Int32, randomId: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(865483769) - peer.serialize(buffer, true) - serializeInt32(id, buffer: buffer, boxed: false) - serializeInt64(randomId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.forwardMessage", parameters: [("peer", peer), ("id", id), ("randomId", randomId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func searchGifs(q: String, offset: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1080395925) - serializeString(q, buffer: buffer, boxed: false) - serializeInt32(offset, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.searchGifs", parameters: [("q", q), ("offset", offset)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.FoundGifs? in - let reader = BufferReader(buffer) - var result: Api.messages.FoundGifs? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.FoundGifs - } - return result - }) - } - public static func getMessages(id: [Api.InputMessage]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { let buffer = Buffer() buffer.appendInt32(1673946374) @@ -2257,6 +2154,22 @@ public extension Api { }) } + public static func deleteChatUser(flags: Int32, chatId: Int32, userId: Api.InputUser) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-986430054) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(chatId, buffer: buffer, boxed: false) + userId.serialize(buffer, true) + return (FunctionDescription(name: "messages.deleteChatUser", parameters: [("flags", flags), ("chatId", chatId), ("userId", userId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + public static func createChat(users: [Api.InputUser], title: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { let buffer = Buffer() buffer.appendInt32(164303470) @@ -2323,6 +2236,21 @@ public extension Api { }) } + public static func discardEncryption(flags: Int32, chatId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-208425312) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(chatId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.discardEncryption", parameters: [("flags", flags), ("chatId", chatId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + public static func setEncryptedTyping(peer: Api.InputEncryptedChat, typing: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { let buffer = Buffer() buffer.appendInt32(2031374829) @@ -2499,23 +2427,6 @@ public extension Api { }) } - public static func exportChatInvite(flags: Int32, peer: Api.InputPeer, expireDate: Int32?, usageLimit: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(347716823) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(expireDate!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(usageLimit!, buffer: buffer, boxed: false)} - return (FunctionDescription(name: "messages.exportChatInvite", parameters: [("flags", flags), ("peer", peer), ("expireDate", expireDate), ("usageLimit", usageLimit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.ExportedChatInvite? in - let reader = BufferReader(buffer) - var result: Api.ExportedChatInvite? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite - } - return result - }) - } - public static func checkChatInvite(hash: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { let buffer = Buffer() buffer.appendInt32(1051570619) @@ -3990,90 +3901,6 @@ public extension Api { }) } - public static func getExportedChatInvites(flags: Int32, peer: Api.InputPeer, adminId: Api.InputUser?, offsetLink: String?, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1838984707) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {adminId!.serialize(buffer, true)} - if Int(flags) & Int(1 << 2) != 0 {serializeString(offsetLink!, buffer: buffer, boxed: false)} - serializeInt32(limit, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getExportedChatInvites", parameters: [("flags", flags), ("peer", peer), ("adminId", adminId), ("offsetLink", offsetLink), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.ExportedChatInvites? in - let reader = BufferReader(buffer) - var result: Api.messages.ExportedChatInvites? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.ExportedChatInvites - } - return result - }) - } - - public static func editExportedChatInvite(flags: Int32, peer: Api.InputPeer, link: String, expireDate: Int32?, usageLimit: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(48562110) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - serializeString(link, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(expireDate!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(usageLimit!, buffer: buffer, boxed: false)} - return (FunctionDescription(name: "messages.editExportedChatInvite", parameters: [("flags", flags), ("peer", peer), ("link", link), ("expireDate", expireDate), ("usageLimit", usageLimit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.ExportedChatInvite? in - let reader = BufferReader(buffer) - var result: Api.messages.ExportedChatInvite? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.ExportedChatInvite - } - return result - }) - } - - public static func getExportedChatInvite(peer: Api.InputPeer, link: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1937010524) - peer.serialize(buffer, true) - serializeString(link, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getExportedChatInvite", parameters: [("peer", peer), ("link", link)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.ExportedChatInvite? in - let reader = BufferReader(buffer) - var result: Api.messages.ExportedChatInvite? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.ExportedChatInvite - } - return result - }) - } - - public static func getChatInviteImporters(peer: Api.InputPeer, link: String, offsetDate: Int32, offsetUser: Api.InputUser, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(654013065) - peer.serialize(buffer, true) - serializeString(link, buffer: buffer, boxed: false) - serializeInt32(offsetDate, buffer: buffer, boxed: false) - offsetUser.serialize(buffer, true) - serializeInt32(limit, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getChatInviteImporters", parameters: [("peer", peer), ("link", link), ("offsetDate", offsetDate), ("offsetUser", offsetUser), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.ChatInviteImporters? in - let reader = BufferReader(buffer) - var result: Api.messages.ChatInviteImporters? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.ChatInviteImporters - } - return result - }) - } - - public static func discardEncryption(flags: Int32, chatId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-208425312) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(chatId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.discardEncryption", parameters: [("flags", flags), ("chatId", chatId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - public static func deleteChat(chatId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { let buffer = Buffer() buffer.appendInt32(-2094760687) @@ -4164,53 +3991,108 @@ public extension Api { }) } - public static func deleteChatUser(flags: Int32, chatId: Int32, userId: Api.InputUser) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + public static func exportChatInvite(flags: Int32, peer: Api.InputPeer, expireDate: Int32?, usageLimit: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { let buffer = Buffer() - buffer.appendInt32(-986430054) + buffer.appendInt32(347716823) serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(chatId, buffer: buffer, boxed: false) - userId.serialize(buffer, true) - return (FunctionDescription(name: "messages.deleteChatUser", parameters: [("flags", flags), ("chatId", chatId), ("userId", userId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + peer.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(expireDate!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(usageLimit!, buffer: buffer, boxed: false)} + return (FunctionDescription(name: "messages.exportChatInvite", parameters: [("flags", flags), ("peer", peer), ("expireDate", expireDate), ("usageLimit", usageLimit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.ExportedChatInvite? in let reader = BufferReader(buffer) - var result: Api.Updates? + var result: Api.ExportedChatInvite? if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates + result = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite + } + return result + }) + } + + public static func getExportedChatInvites(flags: Int32, peer: Api.InputPeer, adminId: Api.InputUser?, offsetDate: Int32?, offsetLink: String?, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1785900140) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {adminId!.serialize(buffer, true)} + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(offsetDate!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeString(offsetLink!, buffer: buffer, boxed: false)} + serializeInt32(limit, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getExportedChatInvites", parameters: [("flags", flags), ("peer", peer), ("adminId", adminId), ("offsetDate", offsetDate), ("offsetLink", offsetLink), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.ExportedChatInvites? in + let reader = BufferReader(buffer) + var result: Api.messages.ExportedChatInvites? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.ExportedChatInvites + } + return result + }) + } + + public static func editExportedChatInvite(flags: Int32, peer: Api.InputPeer, link: String, expireDate: Int32?, usageLimit: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(48562110) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + serializeString(link, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(expireDate!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(usageLimit!, buffer: buffer, boxed: false)} + return (FunctionDescription(name: "messages.editExportedChatInvite", parameters: [("flags", flags), ("peer", peer), ("link", link), ("expireDate", expireDate), ("usageLimit", usageLimit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.ExportedChatInvite? in + let reader = BufferReader(buffer) + var result: Api.messages.ExportedChatInvite? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.ExportedChatInvite + } + return result + }) + } + + public static func deleteRevokedExportedChatInvites(peer: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1375999075) + peer.serialize(buffer, true) + return (FunctionDescription(name: "messages.deleteRevokedExportedChatInvites", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func deleteExportedChatInvite(peer: Api.InputPeer, link: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-731601877) + peer.serialize(buffer, true) + serializeString(link, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.deleteExportedChatInvite", parameters: [("peer", peer), ("link", link)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getChatInviteImporters(peer: Api.InputPeer, link: String, offsetDate: Int32, offsetUser: Api.InputUser, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(654013065) + peer.serialize(buffer, true) + serializeString(link, buffer: buffer, boxed: false) + serializeInt32(offsetDate, buffer: buffer, boxed: false) + offsetUser.serialize(buffer, true) + serializeInt32(limit, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getChatInviteImporters", parameters: [("peer", peer), ("link", link), ("offsetDate", offsetDate), ("offsetUser", offsetUser), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.ChatInviteImporters? in + let reader = BufferReader(buffer) + var result: Api.messages.ChatInviteImporters? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.ChatInviteImporters } return result }) } } public struct channels { - public static func kickFromChannel(channel: Api.InputChannel, userId: Api.InputUser, kicked: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1502421484) - channel.serialize(buffer, true) - userId.serialize(buffer, true) - kicked.serialize(buffer, true) - return (FunctionDescription(name: "channels.kickFromChannel", parameters: [("channel", channel), ("userId", userId), ("kicked", kicked)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func getBroadcastsForDiscussion() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(445117188) - - return (FunctionDescription(name: "channels.getBroadcastsForDiscussion", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Chats? in - let reader = BufferReader(buffer) - var result: Api.messages.Chats? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.Chats - } - return result - }) - } - public static func readHistory(channel: Api.InputChannel, maxId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { let buffer = Buffer() buffer.appendInt32(-871347913) @@ -4962,39 +4844,6 @@ public extension Api { } } public struct auth { - public static func checkPhone(phoneNumber: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1877286395) - serializeString(phoneNumber, buffer: buffer, boxed: false) - return (FunctionDescription(name: "auth.checkPhone", parameters: [("phoneNumber", phoneNumber)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.CheckedPhone? in - let reader = BufferReader(buffer) - var result: Api.auth.CheckedPhone? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.auth.CheckedPhone - } - return result - }) - } - - public static func sendInvites(phoneNumbers: [String], message: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1998331287) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(phoneNumbers.count)) - for item in phoneNumbers { - serializeString(item, buffer: buffer, boxed: false) - } - serializeString(message, buffer: buffer, boxed: false) - return (FunctionDescription(name: "auth.sendInvites", parameters: [("phoneNumbers", phoneNumbers), ("message", message)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - public static func sendCode(phoneNumber: String, apiId: Int32, apiHash: String, settings: Api.CodeSettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { let buffer = Buffer() buffer.appendInt32(-1502141361) @@ -5376,38 +5225,6 @@ public extension Api { } } public struct contacts { - public static func exportCard() -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Int32]>) { - let buffer = Buffer() - buffer.appendInt32(-2065352905) - - return (FunctionDescription(name: "contacts.exportCard", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Int32]? in - let reader = BufferReader(buffer) - var result: [Int32]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) - } - return result - }) - } - - public static func importCard(exportCard: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1340184318) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(exportCard.count)) - for item in exportCard { - serializeInt32(item, buffer: buffer, boxed: false) - } - return (FunctionDescription(name: "contacts.importCard", parameters: [("exportCard", exportCard)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.User? in - let reader = BufferReader(buffer) - var result: Api.User? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.User - } - return result - }) - } - public static func getContactIDs(hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Int32]>) { let buffer = Buffer() buffer.appendInt32(749357634) @@ -5714,6 +5531,20 @@ public extension Api { } } public struct help { + public static func getScheme(version: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-608789858) + serializeInt32(version, buffer: buffer, boxed: false) + return (FunctionDescription(name: "help.getScheme", parameters: [("version", version)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Scheme? in + let reader = BufferReader(buffer) + var result: Api.Scheme? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Scheme + } + return result + }) + } + public static func test() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { let buffer = Buffer() buffer.appendInt32(-1058929929) @@ -7369,35 +7200,6 @@ public extension Api { }) } } - public struct wallet { - public static func sendLiteRequest(body: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-490089666) - serializeBytes(body, buffer: buffer, boxed: false) - return (FunctionDescription(name: "wallet.sendLiteRequest", parameters: [("body", body)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.wallet.LiteResponse? in - let reader = BufferReader(buffer) - var result: Api.wallet.LiteResponse? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.wallet.LiteResponse - } - return result - }) - } - - public static func getKeySecretSalt(revoke: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(190313286) - revoke.serialize(buffer, true) - return (FunctionDescription(name: "wallet.getKeySecretSalt", parameters: [("revoke", revoke)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.wallet.KeySecretSalt? in - let reader = BufferReader(buffer) - var result: Api.wallet.KeySecretSalt? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.wallet.KeySecretSalt - } - return result - }) - } - } public struct langpack { public static func getLangPack(langPack: String, langCode: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { let buffer = Buffer() diff --git a/submodules/TelegramCallsUI/Sources/PresentationGroupCall.swift b/submodules/TelegramCallsUI/Sources/PresentationGroupCall.swift index 2f08e4f761..92b98db1da 100644 --- a/submodules/TelegramCallsUI/Sources/PresentationGroupCall.swift +++ b/submodules/TelegramCallsUI/Sources/PresentationGroupCall.swift @@ -1233,7 +1233,7 @@ public final class PresentationGroupCallImpl: PresentationGroupCall { self.isRequestingMissingSsrcs = true let requestedSsrcs = self.missingSsrcs - self.missingSsrcsDisposable.set((getGroupCallParticipants(account: self.account, callId: callInfo.id, accessHash: callInfo.accessHash, ssrcs: Array(requestedSsrcs), offset: "", limit: 100) + self.missingSsrcsDisposable.set((getGroupCallParticipants(account: self.account, callId: callInfo.id, accessHash: callInfo.accessHash, offset: "", ssrcs: Array(requestedSsrcs), limit: 100) |> deliverOnMainQueue).start(next: { [weak self] state in guard let strongSelf = self else { return diff --git a/submodules/TelegramCallsUI/Sources/VoiceChatController.swift b/submodules/TelegramCallsUI/Sources/VoiceChatController.swift index 1ad740c281..dbec8233cf 100644 --- a/submodules/TelegramCallsUI/Sources/VoiceChatController.swift +++ b/submodules/TelegramCallsUI/Sources/VoiceChatController.swift @@ -300,6 +300,7 @@ public final class VoiceChatController: ViewController { private final class Interaction { let updateIsMuted: (PeerId, Bool) -> Void + let openPeer: (PeerId) -> Void let openInvite: () -> Void let peerContextAction: (PeerEntry, ASDisplayNode, ContextGesture?) -> Void let setPeerIdWithRevealedOptions: (PeerId?, PeerId?) -> Void @@ -309,12 +310,14 @@ public final class VoiceChatController: ViewController { init( updateIsMuted: @escaping (PeerId, Bool) -> Void, + openPeer: @escaping (PeerId) -> Void, openInvite: @escaping () -> Void, peerContextAction: @escaping (PeerEntry, ASDisplayNode, ContextGesture?) -> Void, setPeerIdWithRevealedOptions: @escaping (PeerId?, PeerId?) -> Void, getPeerVideo: @escaping (UInt32) -> GroupVideoNode? ) { self.updateIsMuted = updateIsMuted + self.openPeer = openPeer self.openInvite = openInvite self.peerContextAction = peerContextAction self.setPeerIdWithRevealedOptions = setPeerIdWithRevealedOptions @@ -1026,6 +1029,17 @@ public final class VoiceChatController: ViewController { }), true)) } + items.append(.action(ContextMenuActionItem(text: "Toggle Full Screen", icon: { theme in + return nil + }, action: { _, f in + guard let strongSelf = self else { + return + } + + strongSelf.itemInteraction?.openPeer(peer.id) + f(.default) + }))) + if peer.id != strongSelf.context.account.peerId { if let callState = strongSelf.callState, (callState.canManageCall || callState.adminIds.contains(strongSelf.context.account.peerId)) { if callState.adminIds.contains(peer.id) { @@ -1358,6 +1372,8 @@ public final class VoiceChatController: ViewController { self.audioOutputNode.addTarget(self, action: #selector(self.audioOutputPressed), forControlEvents: .touchUpInside) + self.cameraButtonNode.addTarget(self, action: #selector(self.cameraPressed), forControlEvents: .touchUpInside) + self.optionsButton.contextAction = { [weak self] sourceNode, gesture in guard let strongSelf = self, let controller = strongSelf.controller else { return diff --git a/submodules/TelegramCallsUI/Sources/VoiceChatParticipantItem.swift b/submodules/TelegramCallsUI/Sources/VoiceChatParticipantItem.swift index b308130752..1927f9efbf 100644 --- a/submodules/TelegramCallsUI/Sources/VoiceChatParticipantItem.swift +++ b/submodules/TelegramCallsUI/Sources/VoiceChatParticipantItem.swift @@ -76,7 +76,7 @@ final class VoiceChatParticipantItem: ListViewItem { let action: ((ASDisplayNode) -> Void)? let contextAction: ((ASDisplayNode, ContextGesture?) -> Void)? - public init(presentationData: ItemListPresentationData, dateTimeFormat: PresentationDateTimeFormat, nameDisplayOrder: PresentationPersonNameOrder, context: AccountContext, peer: Peer, ssrc: UInt32?, presence: PeerPresence?, text: ParticipantText, icon: Icon, enabled: Bool, selectable: Bool, getAudioLevel: (() -> Signal)?, revealOptions: [RevealOption], revealed: Bool?, setPeerIdWithRevealedOptions: @escaping (PeerId?, PeerId?) -> Void, action: ((ASDisplayNode) -> Void)?, contextAction: ((ASDisplayNode, ContextGesture?) -> Void)? = nil) { + public init(presentationData: ItemListPresentationData, dateTimeFormat: PresentationDateTimeFormat, nameDisplayOrder: PresentationPersonNameOrder, context: AccountContext, peer: Peer, ssrc: UInt32?, presence: PeerPresence?, text: ParticipantText, icon: Icon, enabled: Bool, selectable: Bool, getAudioLevel: (() -> Signal)?, getVideo: @escaping () -> GroupVideoNode?, revealOptions: [RevealOption], revealed: Bool?, setPeerIdWithRevealedOptions: @escaping (PeerId?, PeerId?) -> Void, action: ((ASDisplayNode) -> Void)?, contextAction: ((ASDisplayNode, ContextGesture?) -> Void)? = nil) { self.presentationData = presentationData self.dateTimeFormat = dateTimeFormat self.nameDisplayOrder = nameDisplayOrder diff --git a/submodules/TelegramCore/Sources/GlobalNotificationSettings.swift b/submodules/TelegramCore/Sources/GlobalNotificationSettings.swift index 5b10b8ac7d..e94f5f9610 100644 --- a/submodules/TelegramCore/Sources/GlobalNotificationSettings.swift +++ b/submodules/TelegramCore/Sources/GlobalNotificationSettings.swift @@ -7,8 +7,6 @@ import SyncCore extension MessageNotificationSettings { init(apiSettings: Api.PeerNotifySettings) { switch apiSettings { - case .peerNotifySettingsEmpty: - self = .defaultSettings case let .peerNotifySettings(_, showPreviews, _, muteUntil, sound): let displayPreviews: Bool if let showPreviews = showPreviews, case .boolFalse = showPreviews { diff --git a/submodules/TelegramCore/Sources/InvitationLinks.swift b/submodules/TelegramCore/Sources/InvitationLinks.swift index 4e73e90850..3ebaa614fd 100644 --- a/submodules/TelegramCore/Sources/InvitationLinks.swift +++ b/submodules/TelegramCore/Sources/InvitationLinks.swift @@ -11,7 +11,7 @@ public func revokePersistentPeerExportedInvitation(account: Account, peerId: Pee if let peer = transaction.getPeer(peerId), let inputPeer = apiInputPeer(peer) { let flags: Int32 = (1 << 2) if let _ = peer as? TelegramChannel { - return account.network.request(Api.functions.messages.exportChatInvite(peer: inputPeer)) + return account.network.request(Api.functions.messages.exportChatInvite(flags: flags, peer: inputPeer, expireDate: nil, usageLimit: nil)) |> retryRequest |> mapToSignal { result -> Signal in return account.postbox.transaction { transaction -> ExportedInvitation? in @@ -30,7 +30,7 @@ public func revokePersistentPeerExportedInvitation(account: Account, peerId: Pee } } } else if let _ = peer as? TelegramGroup { - return account.network.request(Api.functions.messages.exportChatInvite(peer: inputPeer)) + return account.network.request(Api.functions.messages.exportChatInvite(flags: flags, peer: inputPeer, expireDate: nil, usageLimit: nil)) |> retryRequest |> mapToSignal { result -> Signal in return account.postbox.transaction { transaction -> ExportedInvitation? in diff --git a/submodules/TelegramCore/Sources/ManagedGlobalNotificationSettings.swift b/submodules/TelegramCore/Sources/ManagedGlobalNotificationSettings.swift index 9987f93d5e..59a36400ff 100644 --- a/submodules/TelegramCore/Sources/ManagedGlobalNotificationSettings.swift +++ b/submodules/TelegramCore/Sources/ManagedGlobalNotificationSettings.swift @@ -114,8 +114,6 @@ private func fetchedNotificationSettings(network: Network) -> Signal map { chats, users, channels, contactsJoinedMuted in let chatsSettings: MessageNotificationSettings switch chats { - case .peerNotifySettingsEmpty: - chatsSettings = MessageNotificationSettings.defaultSettings case let .peerNotifySettings(_, showPreviews, _, muteUntil, sound): let enabled: Bool if muteUntil != nil && muteUntil != 0 { @@ -134,8 +132,6 @@ private func fetchedNotificationSettings(network: Network) -> Signal Signal mapToSignal { (nextRate, lowerBound, inputPeer) in return account.network.request(Api.functions.messages.searchGlobal(flags: flags, folderId: folderId, q: query, filter: filter, minDate: minDate ?? 0, maxDate: maxDate ?? (Int32.max - 1), offsetRate: nextRate, offsetPeer: inputPeer, offsetId: lowerBound?.id.id ?? 0, limit: limit), automaticFloodWait: false) diff --git a/submodules/TelegramCore/Sources/Serialization.swift b/submodules/TelegramCore/Sources/Serialization.swift index a6c8eed708..f0775e12ba 100644 --- a/submodules/TelegramCore/Sources/Serialization.swift +++ b/submodules/TelegramCore/Sources/Serialization.swift @@ -210,7 +210,7 @@ public class BoxedMessage: NSObject { public class Serialization: NSObject, MTSerialization { public func currentLayer() -> UInt { - return 124 + return 125 } public func parseMessage(_ data: Data!) -> Any! { diff --git a/submodules/TelegramCore/Sources/TelegramPeerNotificationSettings.swift b/submodules/TelegramCore/Sources/TelegramPeerNotificationSettings.swift index 7276bfe940..e1316054e2 100644 --- a/submodules/TelegramCore/Sources/TelegramPeerNotificationSettings.swift +++ b/submodules/TelegramCore/Sources/TelegramPeerNotificationSettings.swift @@ -7,8 +7,6 @@ import SyncCore extension TelegramPeerNotificationSettings { convenience init(apiSettings: Api.PeerNotifySettings) { switch apiSettings { - case .peerNotifySettingsEmpty: - self.init(muteState: .unmuted, messageSound: .bundledModern(id: 0), displayPreviews: .default) case let .peerNotifySettings(_, showPreviews, _, muteUntil, sound): let muteState: PeerMuteState if let muteUntil = muteUntil { diff --git a/tools/ipadiff.py b/tools/ipadiff.py index e64a561f50..885ba3047c 100644 --- a/tools/ipadiff.py +++ b/tools/ipadiff.py @@ -237,6 +237,8 @@ def ipadiff(self_base_path, ipa1, ipa2): ipa1_dir = tempdir + '/ipa1' ipa2_dir = tempdir + '/ipa2' + print('ipa1_dir = {}'.format(ipa1_dir)) + ZipFile(ipa1, 'r').extractall(path=ipa1_dir) ZipFile(ipa2, 'r').extractall(path=ipa2_dir) (ipa1_dirs, ipa1_files) = get_file_list(base_app_dir(ipa1_dir)) @@ -307,4 +309,8 @@ if len(sys.argv) != 3: print('Usage: ipadiff ipa1 ipa2') sys.exit(1) -ipadiff(os.path.dirname(sys.argv[0]), sys.argv[1], sys.argv[2]) +my_path = os.path.abspath(os.path.expanduser(sys.argv[0])) +print('path={}'.format(os.path.dirname(my_path))) + + +ipadiff(os.path.dirname(my_path), sys.argv[1], sys.argv[2])