Advertisement
FrayxRulez

Untitled

Apr 5th, 2016
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 53.35 KB | None | 0 0
  1.     public static partial class TLFactory
  2.     {
  3.         public static T Read<T>(ProtoReader from)
  4.         {
  5.             if (typeof(T) == typeof(UInt32))
  6.                 return (T)(Object)from.ReadUInt32();
  7.             else if (typeof(T) == typeof(UInt64))
  8.                 return (T)(Object)from.ReadUInt64();
  9.             else if (typeof(T) == typeof(Double))
  10.                 return (T)(Object)from.ReadDouble();
  11.             else if (typeof(T) == typeof(String))
  12.                 return (T)(Object)from.ReadString();
  13.             else if (typeof(T) == typeof(Byte[]))
  14.                 return (T)(Object)from.ReadByteArray();
  15.             else if (typeof(T) == typeof(TLInt128))
  16.                 return (T)(Object)new TLInt128(from);
  17.             else if (typeof(T) == typeof(TLInt256))
  18.                 return (T)(Object)new TLInt256(from);
  19.  
  20.             return Read<T>(from, (TLTypes)from.ReadUInt32());
  21.         }
  22.     }
  23.  
  24.     public static partial class TLFactory
  25.     {
  26.         public static T Read<T>(ProtoReader from, TLTypes type)
  27.         {
  28.             switch (type)
  29.             {
  30.                 case TLTypes.ReqPQ: return (T)(Object)new TLReqPQ(from);
  31.                 case TLTypes.ReqDHParams: return (T)(Object)new TLReqDHParams(from);
  32.                 case TLTypes.SetClientDHParams: return (T)(Object)new TLSetClientDHParams(from);
  33.                 case TLTypes.RpcDropAnswer: return (T)(Object)new TLRpcDropAnswer(from);
  34.                 case TLTypes.GetFutureSalts: return (T)(Object)new TLGetFutureSalts(from);
  35.                 case TLTypes.Ping: return (T)(Object)new TLPing(from);
  36.                 case TLTypes.PingDelayDisconnect: return (T)(Object)new TLPingDelayDisconnect(from);
  37.                 case TLTypes.DestroySession: return (T)(Object)new TLDestroySession(from);
  38.                 case TLTypes.RegisterSaveDeveloperInfo: return (T)(Object)new TLRegisterSaveDeveloperInfo(from);
  39.                 //case TLTypes.InvokeAfterMsg: return (T)(Object)new TLInvokeAfterMsg(from);
  40.                 //case TLTypes.InvokeAfterMsgs: return (T)(Object)new TLInvokeAfterMsgs(from);
  41.                 //case TLTypes.InitConnection: return (T)(Object)new TLInitConnection(from);
  42.                 //case TLTypes.InvokeWithLayer: return (T)(Object)new TLInvokeWithLayer(from);
  43.                 //case TLTypes.InvokeWithoutUpdates: return (T)(Object)new TLInvokeWithoutUpdates(from);
  44.                 case TLTypes.AuthCheckPhone: return (T)(Object)new TLAuthCheckPhone(from);
  45.                 case TLTypes.AuthSendCode: return (T)(Object)new TLAuthSendCode(from);
  46.                 case TLTypes.AuthSignUp: return (T)(Object)new TLAuthSignUp(from);
  47.                 case TLTypes.AuthSignIn: return (T)(Object)new TLAuthSignIn(from);
  48.                 case TLTypes.AuthLogOut: return (T)(Object)new TLAuthLogOut(from);
  49.                 case TLTypes.AuthResetAuthorizations: return (T)(Object)new TLAuthResetAuthorizations(from);
  50.                 case TLTypes.AuthSendInvites: return (T)(Object)new TLAuthSendInvites(from);
  51.                 case TLTypes.AuthExportAuthorization: return (T)(Object)new TLAuthExportAuthorization(from);
  52.                 case TLTypes.AuthImportAuthorization: return (T)(Object)new TLAuthImportAuthorization(from);
  53.                 case TLTypes.AuthBindTempAuthKey: return (T)(Object)new TLAuthBindTempAuthKey(from);
  54.                 case TLTypes.AuthImportBotAuthorization: return (T)(Object)new TLAuthImportBotAuthorization(from);
  55.                 case TLTypes.AuthCheckPassword: return (T)(Object)new TLAuthCheckPassword(from);
  56.                 case TLTypes.AuthRequestPasswordRecovery: return (T)(Object)new TLAuthRequestPasswordRecovery(from);
  57.                 case TLTypes.AuthRecoverPassword: return (T)(Object)new TLAuthRecoverPassword(from);
  58.                 case TLTypes.AuthResendCode: return (T)(Object)new TLAuthResendCode(from);
  59.                 case TLTypes.AuthCancelCode: return (T)(Object)new TLAuthCancelCode(from);
  60.                 case TLTypes.AccountRegisterDevice: return (T)(Object)new TLAccountRegisterDevice(from);
  61.                 case TLTypes.AccountUnregisterDevice: return (T)(Object)new TLAccountUnregisterDevice(from);
  62.                 case TLTypes.AccountUpdateNotifySettings: return (T)(Object)new TLAccountUpdateNotifySettings(from);
  63.                 case TLTypes.AccountGetNotifySettings: return (T)(Object)new TLAccountGetNotifySettings(from);
  64.                 case TLTypes.AccountResetNotifySettings: return (T)(Object)new TLAccountResetNotifySettings(from);
  65.                 case TLTypes.AccountUpdateProfile: return (T)(Object)new TLAccountUpdateProfile(from);
  66.                 case TLTypes.AccountUpdateStatus: return (T)(Object)new TLAccountUpdateStatus(from);
  67.                 case TLTypes.AccountGetWallPapers: return (T)(Object)new TLAccountGetWallPapers(from);
  68.                 case TLTypes.AccountReportPeer: return (T)(Object)new TLAccountReportPeer(from);
  69.                 case TLTypes.AccountCheckUsername: return (T)(Object)new TLAccountCheckUsername(from);
  70.                 case TLTypes.AccountUpdateUsername: return (T)(Object)new TLAccountUpdateUsername(from);
  71.                 case TLTypes.AccountGetPrivacy: return (T)(Object)new TLAccountGetPrivacy(from);
  72.                 case TLTypes.AccountSetPrivacy: return (T)(Object)new TLAccountSetPrivacy(from);
  73.                 case TLTypes.AccountDeleteAccount: return (T)(Object)new TLAccountDeleteAccount(from);
  74.                 case TLTypes.AccountGetAccountTTL: return (T)(Object)new TLAccountGetAccountTTL(from);
  75.                 case TLTypes.AccountSetAccountTTL: return (T)(Object)new TLAccountSetAccountTTL(from);
  76.                 case TLTypes.AccountSendChangePhoneCode: return (T)(Object)new TLAccountSendChangePhoneCode(from);
  77.                 case TLTypes.AccountChangePhone: return (T)(Object)new TLAccountChangePhone(from);
  78.                 case TLTypes.AccountUpdateDeviceLocked: return (T)(Object)new TLAccountUpdateDeviceLocked(from);
  79.                 case TLTypes.AccountGetAuthorizations: return (T)(Object)new TLAccountGetAuthorizations(from);
  80.                 case TLTypes.AccountResetAuthorization: return (T)(Object)new TLAccountResetAuthorization(from);
  81.                 case TLTypes.AccountGetPassword: return (T)(Object)new TLAccountGetPassword(from);
  82.                 case TLTypes.AccountGetPasswordSettings: return (T)(Object)new TLAccountGetPasswordSettings(from);
  83.                 case TLTypes.AccountUpdatePasswordSettings: return (T)(Object)new TLAccountUpdatePasswordSettings(from);
  84.                 case TLTypes.UsersGetUsers: return (T)(Object)new TLUsersGetUsers(from);
  85.                 case TLTypes.UsersGetFullUser: return (T)(Object)new TLUsersGetFullUser(from);
  86.                 case TLTypes.ContactsGetStatuses: return (T)(Object)new TLContactsGetStatuses(from);
  87.                 case TLTypes.ContactsGetContacts: return (T)(Object)new TLContactsGetContacts(from);
  88.                 case TLTypes.ContactsImportContacts: return (T)(Object)new TLContactsImportContacts(from);
  89.                 case TLTypes.ContactsDeleteContact: return (T)(Object)new TLContactsDeleteContact(from);
  90.                 case TLTypes.ContactsDeleteContacts: return (T)(Object)new TLContactsDeleteContacts(from);
  91.                 case TLTypes.ContactsBlock: return (T)(Object)new TLContactsBlock(from);
  92.                 case TLTypes.ContactsUnblock: return (T)(Object)new TLContactsUnblock(from);
  93.                 case TLTypes.ContactsGetBlocked: return (T)(Object)new TLContactsGetBlocked(from);
  94.                 case TLTypes.ContactsExportCard: return (T)(Object)new TLContactsExportCard(from);
  95.                 case TLTypes.ContactsImportCard: return (T)(Object)new TLContactsImportCard(from);
  96.                 case TLTypes.ContactsSearch: return (T)(Object)new TLContactsSearch(from);
  97.                 case TLTypes.ContactsResolveUsername: return (T)(Object)new TLContactsResolveUsername(from);
  98.                 case TLTypes.MessagesGetMessages: return (T)(Object)new TLMessagesGetMessages(from);
  99.                 case TLTypes.MessagesGetDialogs: return (T)(Object)new TLMessagesGetDialogs(from);
  100.                 case TLTypes.MessagesGetHistory: return (T)(Object)new TLMessagesGetHistory(from);
  101.                 case TLTypes.MessagesSearch: return (T)(Object)new TLMessagesSearch(from);
  102.                 case TLTypes.MessagesReadHistory: return (T)(Object)new TLMessagesReadHistory(from);
  103.                 case TLTypes.MessagesDeleteHistory: return (T)(Object)new TLMessagesDeleteHistory(from);
  104.                 case TLTypes.MessagesDeleteMessages: return (T)(Object)new TLMessagesDeleteMessages(from);
  105.                 case TLTypes.MessagesReceivedMessages: return (T)(Object)new TLMessagesReceivedMessages(from);
  106.                 case TLTypes.MessagesSetTyping: return (T)(Object)new TLMessagesSetTyping(from);
  107.                 case TLTypes.MessagesSendMessage: return (T)(Object)new TLMessagesSendMessage(from);
  108.                 case TLTypes.MessagesSendMedia: return (T)(Object)new TLMessagesSendMedia(from);
  109.                 case TLTypes.MessagesForwardMessages: return (T)(Object)new TLMessagesForwardMessages(from);
  110.                 case TLTypes.MessagesReportSpam: return (T)(Object)new TLMessagesReportSpam(from);
  111.                 case TLTypes.MessagesHideReportSpam: return (T)(Object)new TLMessagesHideReportSpam(from);
  112.                 case TLTypes.MessagesGetPeerSettings: return (T)(Object)new TLMessagesGetPeerSettings(from);
  113.                 case TLTypes.MessagesGetChats: return (T)(Object)new TLMessagesGetChats(from);
  114.                 case TLTypes.MessagesGetFullChat: return (T)(Object)new TLMessagesGetFullChat(from);
  115.                 case TLTypes.MessagesEditChatTitle: return (T)(Object)new TLMessagesEditChatTitle(from);
  116.                 case TLTypes.MessagesEditChatPhoto: return (T)(Object)new TLMessagesEditChatPhoto(from);
  117.                 case TLTypes.MessagesAddChatUser: return (T)(Object)new TLMessagesAddChatUser(from);
  118.                 case TLTypes.MessagesDeleteChatUser: return (T)(Object)new TLMessagesDeleteChatUser(from);
  119.                 case TLTypes.MessagesCreateChat: return (T)(Object)new TLMessagesCreateChat(from);
  120.                 case TLTypes.MessagesForwardMessage: return (T)(Object)new TLMessagesForwardMessage(from);
  121.                 case TLTypes.MessagesSendBroadcast: return (T)(Object)new TLMessagesSendBroadcast(from);
  122.                 case TLTypes.MessagesGetDhConfig: return (T)(Object)new TLMessagesGetDhConfig(from);
  123.                 case TLTypes.MessagesRequestEncryption: return (T)(Object)new TLMessagesRequestEncryption(from);
  124.                 case TLTypes.MessagesAcceptEncryption: return (T)(Object)new TLMessagesAcceptEncryption(from);
  125.                 case TLTypes.MessagesDiscardEncryption: return (T)(Object)new TLMessagesDiscardEncryption(from);
  126.                 case TLTypes.MessagesSetEncryptedTyping: return (T)(Object)new TLMessagesSetEncryptedTyping(from);
  127.                 case TLTypes.MessagesReadEncryptedHistory: return (T)(Object)new TLMessagesReadEncryptedHistory(from);
  128.                 case TLTypes.MessagesSendEncrypted: return (T)(Object)new TLMessagesSendEncrypted(from);
  129.                 case TLTypes.MessagesSendEncryptedFile: return (T)(Object)new TLMessagesSendEncryptedFile(from);
  130.                 case TLTypes.MessagesSendEncryptedService: return (T)(Object)new TLMessagesSendEncryptedService(from);
  131.                 case TLTypes.MessagesReceivedQueue: return (T)(Object)new TLMessagesReceivedQueue(from);
  132.                 case TLTypes.MessagesReadMessageContents: return (T)(Object)new TLMessagesReadMessageContents(from);
  133.                 case TLTypes.MessagesGetStickers: return (T)(Object)new TLMessagesGetStickers(from);
  134.                 case TLTypes.MessagesGetAllStickers: return (T)(Object)new TLMessagesGetAllStickers(from);
  135.                 case TLTypes.MessagesGetWebPagePreview: return (T)(Object)new TLMessagesGetWebPagePreview(from);
  136.                 case TLTypes.MessagesExportChatInvite: return (T)(Object)new TLMessagesExportChatInvite(from);
  137.                 case TLTypes.MessagesCheckChatInvite: return (T)(Object)new TLMessagesCheckChatInvite(from);
  138.                 case TLTypes.MessagesImportChatInvite: return (T)(Object)new TLMessagesImportChatInvite(from);
  139.                 case TLTypes.MessagesGetStickerSet: return (T)(Object)new TLMessagesGetStickerSet(from);
  140.                 case TLTypes.MessagesInstallStickerSet: return (T)(Object)new TLMessagesInstallStickerSet(from);
  141.                 case TLTypes.MessagesUninstallStickerSet: return (T)(Object)new TLMessagesUninstallStickerSet(from);
  142.                 case TLTypes.MessagesStartBot: return (T)(Object)new TLMessagesStartBot(from);
  143.                 case TLTypes.MessagesGetMessagesViews: return (T)(Object)new TLMessagesGetMessagesViews(from);
  144.                 case TLTypes.MessagesToggleChatAdmins: return (T)(Object)new TLMessagesToggleChatAdmins(from);
  145.                 case TLTypes.MessagesEditChatAdmin: return (T)(Object)new TLMessagesEditChatAdmin(from);
  146.                 case TLTypes.MessagesMigrateChat: return (T)(Object)new TLMessagesMigrateChat(from);
  147.                 case TLTypes.MessagesSearchGlobal: return (T)(Object)new TLMessagesSearchGlobal(from);
  148.                 case TLTypes.MessagesReorderStickerSets: return (T)(Object)new TLMessagesReorderStickerSets(from);
  149.                 case TLTypes.MessagesGetDocumentByHash: return (T)(Object)new TLMessagesGetDocumentByHash(from);
  150.                 case TLTypes.MessagesSearchGifs: return (T)(Object)new TLMessagesSearchGifs(from);
  151.                 case TLTypes.MessagesGetSavedGifs: return (T)(Object)new TLMessagesGetSavedGifs(from);
  152.                 case TLTypes.MessagesSaveGif: return (T)(Object)new TLMessagesSaveGif(from);
  153.                 case TLTypes.MessagesGetInlineBotResults: return (T)(Object)new TLMessagesGetInlineBotResults(from);
  154.                 case TLTypes.MessagesSetInlineBotResults: return (T)(Object)new TLMessagesSetInlineBotResults(from);
  155.                 case TLTypes.MessagesSendInlineBotResult: return (T)(Object)new TLMessagesSendInlineBotResult(from);
  156.                 case TLTypes.UpdatesGetState: return (T)(Object)new TLUpdatesGetState(from);
  157.                 case TLTypes.UpdatesGetDifference: return (T)(Object)new TLUpdatesGetDifference(from);
  158.                 case TLTypes.UpdatesGetChannelDifference: return (T)(Object)new TLUpdatesGetChannelDifference(from);
  159.                 case TLTypes.PhotosUpdateProfilePhoto: return (T)(Object)new TLPhotosUpdateProfilePhoto(from);
  160.                 case TLTypes.PhotosUploadProfilePhoto: return (T)(Object)new TLPhotosUploadProfilePhoto(from);
  161.                 case TLTypes.PhotosDeletePhotos: return (T)(Object)new TLPhotosDeletePhotos(from);
  162.                 case TLTypes.PhotosGetUserPhotos: return (T)(Object)new TLPhotosGetUserPhotos(from);
  163.                 case TLTypes.UploadSaveFilePart: return (T)(Object)new TLUploadSaveFilePart(from);
  164.                 case TLTypes.UploadGetFile: return (T)(Object)new TLUploadGetFile(from);
  165.                 case TLTypes.UploadSaveBigFilePart: return (T)(Object)new TLUploadSaveBigFilePart(from);
  166.                 case TLTypes.HelpGetConfig: return (T)(Object)new TLHelpGetConfig(from);
  167.                 case TLTypes.HelpGetNearestDc: return (T)(Object)new TLHelpGetNearestDc(from);
  168.                 case TLTypes.HelpGetAppUpdate: return (T)(Object)new TLHelpGetAppUpdate(from);
  169.                 case TLTypes.HelpSaveAppLog: return (T)(Object)new TLHelpSaveAppLog(from);
  170.                 case TLTypes.HelpGetInviteText: return (T)(Object)new TLHelpGetInviteText(from);
  171.                 case TLTypes.HelpGetSupport: return (T)(Object)new TLHelpGetSupport(from);
  172.                 case TLTypes.HelpGetAppChangelog: return (T)(Object)new TLHelpGetAppChangelog(from);
  173.                 case TLTypes.HelpGetTermsOfService: return (T)(Object)new TLHelpGetTermsOfService(from);
  174.                 case TLTypes.ChannelsGetDialogs: return (T)(Object)new TLChannelsGetDialogs(from);
  175.                 case TLTypes.ChannelsGetImportantHistory: return (T)(Object)new TLChannelsGetImportantHistory(from);
  176.                 case TLTypes.ChannelsReadHistory: return (T)(Object)new TLChannelsReadHistory(from);
  177.                 case TLTypes.ChannelsDeleteMessages: return (T)(Object)new TLChannelsDeleteMessages(from);
  178.                 case TLTypes.ChannelsDeleteUserHistory: return (T)(Object)new TLChannelsDeleteUserHistory(from);
  179.                 case TLTypes.ChannelsReportSpam: return (T)(Object)new TLChannelsReportSpam(from);
  180.                 case TLTypes.ChannelsGetMessages: return (T)(Object)new TLChannelsGetMessages(from);
  181.                 case TLTypes.ChannelsGetParticipants: return (T)(Object)new TLChannelsGetParticipants(from);
  182.                 case TLTypes.ChannelsGetParticipant: return (T)(Object)new TLChannelsGetParticipant(from);
  183.                 case TLTypes.ChannelsGetChannels: return (T)(Object)new TLChannelsGetChannels(from);
  184.                 case TLTypes.ChannelsGetFullChannel: return (T)(Object)new TLChannelsGetFullChannel(from);
  185.                 case TLTypes.ChannelsCreateChannel: return (T)(Object)new TLChannelsCreateChannel(from);
  186.                 case TLTypes.ChannelsEditAbout: return (T)(Object)new TLChannelsEditAbout(from);
  187.                 case TLTypes.ChannelsEditAdmin: return (T)(Object)new TLChannelsEditAdmin(from);
  188.                 case TLTypes.ChannelsEditTitle: return (T)(Object)new TLChannelsEditTitle(from);
  189.                 case TLTypes.ChannelsEditPhoto: return (T)(Object)new TLChannelsEditPhoto(from);
  190.                 case TLTypes.ChannelsToggleComments: return (T)(Object)new TLChannelsToggleComments(from);
  191.                 case TLTypes.ChannelsCheckUsername: return (T)(Object)new TLChannelsCheckUsername(from);
  192.                 case TLTypes.ChannelsUpdateUsername: return (T)(Object)new TLChannelsUpdateUsername(from);
  193.                 case TLTypes.ChannelsJoinChannel: return (T)(Object)new TLChannelsJoinChannel(from);
  194.                 case TLTypes.ChannelsLeaveChannel: return (T)(Object)new TLChannelsLeaveChannel(from);
  195.                 case TLTypes.ChannelsInviteToChannel: return (T)(Object)new TLChannelsInviteToChannel(from);
  196.                 case TLTypes.ChannelsKickFromChannel: return (T)(Object)new TLChannelsKickFromChannel(from);
  197.                 case TLTypes.ChannelsExportInvite: return (T)(Object)new TLChannelsExportInvite(from);
  198.                 case TLTypes.ChannelsDeleteChannel: return (T)(Object)new TLChannelsDeleteChannel(from);
  199.                 case TLTypes.ChannelsToggleInvites: return (T)(Object)new TLChannelsToggleInvites(from);
  200.                 case TLTypes.ChannelsExportMessageLink: return (T)(Object)new TLChannelsExportMessageLink(from);
  201.                 case TLTypes.ChannelsToggleSignatures: return (T)(Object)new TLChannelsToggleSignatures(from);
  202.                 case TLTypes.ChannelsGetMessageEditData: return (T)(Object)new TLChannelsGetMessageEditData(from);
  203.                 case TLTypes.ChannelsEditMessage: return (T)(Object)new TLChannelsEditMessage(from);
  204.                 case TLTypes.ChannelsUpdatePinnedMessage: return (T)(Object)new TLChannelsUpdatePinnedMessage(from);
  205.                 case TLTypes.ResPQ: return (T)(Object)new TLResPQ(from);
  206.                 case TLTypes.PQInnerData: return (T)(Object)new TLPQInnerData(from);
  207.                 case TLTypes.ServerDHParamsFail: return (T)(Object)new TLServerDHParamsFail(from);
  208.                 case TLTypes.ServerDHParamsOk: return (T)(Object)new TLServerDHParamsOk(from);
  209.                 case TLTypes.ServerDHInnerData: return (T)(Object)new TLServerDHInnerData(from);
  210.                 case TLTypes.ClientDHInnerData: return (T)(Object)new TLClientDHInnerData(from);
  211.                 case TLTypes.DHGenOk: return (T)(Object)new TLDHGenOk(from);
  212.                 case TLTypes.DHGenRetry: return (T)(Object)new TLDHGenRetry(from);
  213.                 case TLTypes.DHGenFail: return (T)(Object)new TLDHGenFail(from);
  214.                 case TLTypes.MsgsAck: return (T)(Object)new TLMsgsAck(from);
  215.                 case TLTypes.BadMsgNotification: return (T)(Object)new TLBadMsgNotificationSuper(from);
  216.                 case TLTypes.BadServerSalt: return (T)(Object)new TLBadServerSalt(from);
  217.                 case TLTypes.MsgsStateReq: return (T)(Object)new TLMsgsStateReq(from);
  218.                 case TLTypes.MsgsStateInfo: return (T)(Object)new TLMsgsStateInfo(from);
  219.                 case TLTypes.MsgsAllInfo: return (T)(Object)new TLMsgsAllInfo(from);
  220.                 case TLTypes.MsgDetailedInfo: return (T)(Object)new TLMsgDetailedInfoSuper(from);
  221.                 case TLTypes.MsgNewDetailedInfo: return (T)(Object)new TLMsgNewDetailedInfo(from);
  222.                 case TLTypes.MsgResendReq: return (T)(Object)new TLMsgResendReq(from);
  223.                 case TLTypes.RpcError: return (T)(Object)new TLRpcError(from);
  224.                 case TLTypes.RpcAnswerUnknown: return (T)(Object)new TLRpcAnswerUnknown(from);
  225.                 case TLTypes.RpcAnswerDroppedRunning: return (T)(Object)new TLRpcAnswerDroppedRunning(from);
  226.                 case TLTypes.RpcAnswerDropped: return (T)(Object)new TLRpcAnswerDropped(from);
  227.                 case TLTypes.FutureSalt: return (T)(Object)new TLFutureSalt(from);
  228.                 case TLTypes.FutureSalts: return (T)(Object)new TLFutureSalts(from);
  229.                 case TLTypes.Pong: return (T)(Object)new TLPong(from);
  230.                 case TLTypes.DestroySessionOk: return (T)(Object)new TLDestroySessionOk(from);
  231.                 case TLTypes.DestroySessionNone: return (T)(Object)new TLDestroySessionNone(from);
  232.                 case TLTypes.NewSessionCreated: return (T)(Object)new TLNewSessionCreated(from);
  233.                 case TLTypes.HttpWait: return (T)(Object)new TLHttpWait(from);
  234.                 case TLTypes.BoolFalse: return (T)(Object)new TLBoolFalse(from);
  235.                 case TLTypes.BoolTrue: return (T)(Object)new TLBoolTrue(from);
  236.                 case TLTypes.True: return (T)(Object)new TLTrue(from);
  237.                 case TLTypes.Error: return (T)(Object)new TLError(from);
  238.                 case TLTypes.Null: return (T)(Object)new TLNull(from);
  239.                 case TLTypes.InputPeerEmpty: return (T)(Object)new TLInputPeerEmpty(from);
  240.                 case TLTypes.InputPeerSelf: return (T)(Object)new TLInputPeerSelf(from);
  241.                 case TLTypes.InputPeerChat: return (T)(Object)new TLInputPeerChat(from);
  242.                 case TLTypes.InputPeerUser: return (T)(Object)new TLInputPeerUser(from);
  243.                 case TLTypes.InputPeerChannel: return (T)(Object)new TLInputPeerChannel(from);
  244.                 case TLTypes.InputUserEmpty: return (T)(Object)new TLInputUserEmpty(from);
  245.                 case TLTypes.InputUserSelf: return (T)(Object)new TLInputUserSelf(from);
  246.                 case TLTypes.InputUser: return (T)(Object)new TLInputUserSuper(from);
  247.                 case TLTypes.InputPhoneContact: return (T)(Object)new TLInputPhoneContact(from);
  248.                 case TLTypes.InputFile: return (T)(Object)new TLInputFileSuper(from);
  249.                 case TLTypes.InputFileBig: return (T)(Object)new TLInputFileBig(from);
  250.                 case TLTypes.InputMediaEmpty: return (T)(Object)new TLInputMediaEmpty(from);
  251.                 case TLTypes.InputMediaUploadedPhoto: return (T)(Object)new TLInputMediaUploadedPhoto(from);
  252.                 case TLTypes.InputMediaPhoto: return (T)(Object)new TLInputMediaPhoto(from);
  253.                 case TLTypes.InputMediaGeoPoint: return (T)(Object)new TLInputMediaGeoPoint(from);
  254.                 case TLTypes.InputMediaContact: return (T)(Object)new TLInputMediaContact(from);
  255.                 case TLTypes.InputMediaUploadedDocument: return (T)(Object)new TLInputMediaUploadedDocument(from);
  256.                 case TLTypes.InputMediaUploadedThumbDocument: return (T)(Object)new TLInputMediaUploadedThumbDocument(from);
  257.                 case TLTypes.InputMediaDocument: return (T)(Object)new TLInputMediaDocument(from);
  258.                 case TLTypes.InputMediaVenue: return (T)(Object)new TLInputMediaVenue(from);
  259.                 case TLTypes.InputMediaGifExternal: return (T)(Object)new TLInputMediaGifExternal(from);
  260.                 case TLTypes.InputChatPhotoEmpty: return (T)(Object)new TLInputChatPhotoEmpty(from);
  261.                 case TLTypes.InputChatUploadedPhoto: return (T)(Object)new TLInputChatUploadedPhoto(from);
  262.                 case TLTypes.InputChatPhoto: return (T)(Object)new TLInputChatPhotoSuper(from);
  263.                 case TLTypes.InputGeoPointEmpty: return (T)(Object)new TLInputGeoPointEmpty(from);
  264.                 case TLTypes.InputGeoPoint: return (T)(Object)new TLInputGeoPointSuper(from);
  265.                 case TLTypes.InputPhotoEmpty: return (T)(Object)new TLInputPhotoEmpty(from);
  266.                 case TLTypes.InputPhoto: return (T)(Object)new TLInputPhotoSuper(from);
  267.                 case TLTypes.InputFileLocation: return (T)(Object)new TLInputFileLocationSuper(from);
  268.                 case TLTypes.InputEncryptedFileLocation: return (T)(Object)new TLInputEncryptedFileLocation(from);
  269.                 case TLTypes.InputDocumentFileLocation: return (T)(Object)new TLInputDocumentFileLocation(from);
  270.                 case TLTypes.InputPhotoCropAuto: return (T)(Object)new TLInputPhotoCropAuto(from);
  271.                 case TLTypes.InputPhotoCrop: return (T)(Object)new TLInputPhotoCropSuper(from);
  272.                 case TLTypes.InputAppEvent: return (T)(Object)new TLInputAppEvent(from);
  273.                 case TLTypes.PeerUser: return (T)(Object)new TLPeerUser(from);
  274.                 case TLTypes.PeerChat: return (T)(Object)new TLPeerChat(from);
  275.                 case TLTypes.PeerChannel: return (T)(Object)new TLPeerChannel(from);
  276.                 case TLTypes.StorageFileUnknown: return (T)(Object)new TLStorageFileUnknown(from);
  277.                 case TLTypes.StorageFileJpeg: return (T)(Object)new TLStorageFileJpeg(from);
  278.                 case TLTypes.StorageFileGif: return (T)(Object)new TLStorageFileGif(from);
  279.                 case TLTypes.StorageFilePng: return (T)(Object)new TLStorageFilePng(from);
  280.                 case TLTypes.StorageFilePdf: return (T)(Object)new TLStorageFilePdf(from);
  281.                 case TLTypes.StorageFileMp3: return (T)(Object)new TLStorageFileMp3(from);
  282.                 case TLTypes.StorageFileMov: return (T)(Object)new TLStorageFileMov(from);
  283.                 case TLTypes.StorageFilePartial: return (T)(Object)new TLStorageFilePartial(from);
  284.                 case TLTypes.StorageFileMp4: return (T)(Object)new TLStorageFileMp4(from);
  285.                 case TLTypes.StorageFileWebp: return (T)(Object)new TLStorageFileWebp(from);
  286.                 case TLTypes.FileLocationUnavailable: return (T)(Object)new TLFileLocationUnavailable(from);
  287.                 case TLTypes.FileLocation: return (T)(Object)new TLFileLocationSuper(from);
  288.                 case TLTypes.UserEmpty: return (T)(Object)new TLUserEmpty(from);
  289.                 case TLTypes.User: return (T)(Object)new TLUserSuper(from);
  290.                 case TLTypes.UserProfilePhotoEmpty: return (T)(Object)new TLUserProfilePhotoEmpty(from);
  291.                 case TLTypes.UserProfilePhoto: return (T)(Object)new TLUserProfilePhotoSuper(from);
  292.                 case TLTypes.UserStatusEmpty: return (T)(Object)new TLUserStatusEmpty(from);
  293.                 case TLTypes.UserStatusOnline: return (T)(Object)new TLUserStatusOnline(from);
  294.                 case TLTypes.UserStatusOffline: return (T)(Object)new TLUserStatusOffline(from);
  295.                 case TLTypes.UserStatusRecently: return (T)(Object)new TLUserStatusRecently(from);
  296.                 case TLTypes.UserStatusLastWeek: return (T)(Object)new TLUserStatusLastWeek(from);
  297.                 case TLTypes.UserStatusLastMonth: return (T)(Object)new TLUserStatusLastMonth(from);
  298.                 case TLTypes.ChatEmpty: return (T)(Object)new TLChatEmpty(from);
  299.                 case TLTypes.Chat: return (T)(Object)new TLChatSuper(from);
  300.                 case TLTypes.ChatForbidden: return (T)(Object)new TLChatForbidden(from);
  301.                 case TLTypes.Channel: return (T)(Object)new TLChannel(from);
  302.                 case TLTypes.ChannelForbidden: return (T)(Object)new TLChannelForbidden(from);
  303.                 case TLTypes.ChatFull: return (T)(Object)new TLChatFullSuper(from);
  304.                 case TLTypes.ChannelFull: return (T)(Object)new TLChannelFull(from);
  305.                 case TLTypes.ChatParticipant: return (T)(Object)new TLChatParticipantSuper(from);
  306.                 case TLTypes.ChatParticipantCreator: return (T)(Object)new TLChatParticipantCreator(from);
  307.                 case TLTypes.ChatParticipantAdmin: return (T)(Object)new TLChatParticipantAdmin(from);
  308.                 case TLTypes.ChatParticipantsForbidden: return (T)(Object)new TLChatParticipantsForbidden(from);
  309.                 case TLTypes.ChatParticipants: return (T)(Object)new TLChatParticipantsSuper(from);
  310.                 case TLTypes.ChatPhotoEmpty: return (T)(Object)new TLChatPhotoEmpty(from);
  311.                 case TLTypes.ChatPhoto: return (T)(Object)new TLChatPhotoSuper(from);
  312.                 case TLTypes.MessageEmpty: return (T)(Object)new TLMessageEmpty(from);
  313.                 case TLTypes.Message: return (T)(Object)new TLMessageSuper(from);
  314.                 case TLTypes.MessageService: return (T)(Object)new TLMessageService(from);
  315.                 case TLTypes.MessageMediaEmpty: return (T)(Object)new TLMessageMediaEmpty(from);
  316.                 case TLTypes.MessageMediaPhoto: return (T)(Object)new TLMessageMediaPhoto(from);
  317.                 case TLTypes.MessageMediaGeo: return (T)(Object)new TLMessageMediaGeo(from);
  318.                 case TLTypes.MessageMediaContact: return (T)(Object)new TLMessageMediaContact(from);
  319.                 case TLTypes.MessageMediaUnsupported: return (T)(Object)new TLMessageMediaUnsupported(from);
  320.                 case TLTypes.MessageMediaDocument: return (T)(Object)new TLMessageMediaDocument(from);
  321.                 case TLTypes.MessageMediaWebPage: return (T)(Object)new TLMessageMediaWebPage(from);
  322.                 case TLTypes.MessageMediaVenue: return (T)(Object)new TLMessageMediaVenue(from);
  323.                 case TLTypes.MessageActionEmpty: return (T)(Object)new TLMessageActionEmpty(from);
  324.                 case TLTypes.MessageActionChatCreate: return (T)(Object)new TLMessageActionChatCreate(from);
  325.                 case TLTypes.MessageActionChatEditTitle: return (T)(Object)new TLMessageActionChatEditTitle(from);
  326.                 case TLTypes.MessageActionChatEditPhoto: return (T)(Object)new TLMessageActionChatEditPhoto(from);
  327.                 case TLTypes.MessageActionChatDeletePhoto: return (T)(Object)new TLMessageActionChatDeletePhoto(from);
  328.                 case TLTypes.MessageActionChatAddUser: return (T)(Object)new TLMessageActionChatAddUser(from);
  329.                 case TLTypes.MessageActionChatDeleteUser: return (T)(Object)new TLMessageActionChatDeleteUser(from);
  330.                 case TLTypes.MessageActionChatJoinedByLink: return (T)(Object)new TLMessageActionChatJoinedByLink(from);
  331.                 case TLTypes.MessageActionChannelCreate: return (T)(Object)new TLMessageActionChannelCreate(from);
  332.                 case TLTypes.MessageActionChatMigrateTo: return (T)(Object)new TLMessageActionChatMigrateTo(from);
  333.                 case TLTypes.MessageActionChannelMigrateFrom: return (T)(Object)new TLMessageActionChannelMigrateFrom(from);
  334.                 case TLTypes.MessageActionPinMessage: return (T)(Object)new TLMessageActionPinMessage(from);
  335.                 case TLTypes.Dialog: return (T)(Object)new TLDialogSuper(from);
  336.                 case TLTypes.DialogChannel: return (T)(Object)new TLDialogChannel(from);
  337.                 case TLTypes.PhotoEmpty: return (T)(Object)new TLPhotoEmpty(from);
  338.                 case TLTypes.Photo: return (T)(Object)new TLPhotoSuper(from);
  339.                 case TLTypes.PhotoSizeEmpty: return (T)(Object)new TLPhotoSizeEmpty(from);
  340.                 case TLTypes.PhotoSize: return (T)(Object)new TLPhotoSizeSuper(from);
  341.                 case TLTypes.PhotoCachedSize: return (T)(Object)new TLPhotoCachedSize(from);
  342.                 case TLTypes.GeoPointEmpty: return (T)(Object)new TLGeoPointEmpty(from);
  343.                 case TLTypes.GeoPoint: return (T)(Object)new TLGeoPointSuper(from);
  344.                 case TLTypes.AuthCheckedPhone: return (T)(Object)new TLAuthCheckedPhone(from);
  345.                 case TLTypes.AuthSentCode: return (T)(Object)new TLAuthSentCode(from);
  346.                 case TLTypes.AuthAuthorization: return (T)(Object)new TLAuthAuthorization(from);
  347.                 case TLTypes.AuthExportedAuthorization: return (T)(Object)new TLAuthExportedAuthorization(from);
  348.                 case TLTypes.InputNotifyPeer: return (T)(Object)new TLInputNotifyPeerSuper(from);
  349.                 case TLTypes.InputNotifyUsers: return (T)(Object)new TLInputNotifyUsers(from);
  350.                 case TLTypes.InputNotifyChats: return (T)(Object)new TLInputNotifyChats(from);
  351.                 case TLTypes.InputNotifyAll: return (T)(Object)new TLInputNotifyAll(from);
  352.                 case TLTypes.InputPeerNotifyEventsEmpty: return (T)(Object)new TLInputPeerNotifyEventsEmpty(from);
  353.                 case TLTypes.InputPeerNotifyEventsAll: return (T)(Object)new TLInputPeerNotifyEventsAll(from);
  354.                 case TLTypes.InputPeerNotifySettings: return (T)(Object)new TLInputPeerNotifySettings(from);
  355.                 case TLTypes.PeerNotifyEventsEmpty: return (T)(Object)new TLPeerNotifyEventsEmpty(from);
  356.                 case TLTypes.PeerNotifyEventsAll: return (T)(Object)new TLPeerNotifyEventsAll(from);
  357.                 case TLTypes.PeerNotifySettingsEmpty: return (T)(Object)new TLPeerNotifySettingsEmpty(from);
  358.                 case TLTypes.PeerNotifySettings: return (T)(Object)new TLPeerNotifySettingsSuper(from);
  359.                 case TLTypes.PeerSettings: return (T)(Object)new TLPeerSettings(from);
  360.                 case TLTypes.WallPaper: return (T)(Object)new TLWallPaperSuper(from);
  361.                 case TLTypes.WallPaperSolid: return (T)(Object)new TLWallPaperSolid(from);
  362.                 case TLTypes.InputReportReasonSpam: return (T)(Object)new TLInputReportReasonSpam(from);
  363.                 case TLTypes.InputReportReasonViolence: return (T)(Object)new TLInputReportReasonViolence(from);
  364.                 case TLTypes.InputReportReasonPornography: return (T)(Object)new TLInputReportReasonPornography(from);
  365.                 case TLTypes.InputReportReasonOther: return (T)(Object)new TLInputReportReasonOther(from);
  366.                 case TLTypes.UserFull: return (T)(Object)new TLUserFull(from);
  367.                 case TLTypes.Contact: return (T)(Object)new TLContact(from);
  368.                 case TLTypes.ImportedContact: return (T)(Object)new TLImportedContact(from);
  369.                 case TLTypes.ContactBlocked: return (T)(Object)new TLContactBlocked(from);
  370.                 case TLTypes.ContactStatus: return (T)(Object)new TLContactStatus(from);
  371.                 case TLTypes.ContactsLink: return (T)(Object)new TLContactsLink(from);
  372.                 case TLTypes.ContactsContactsNotModified: return (T)(Object)new TLContactsContactsNotModified(from);
  373.                 case TLTypes.ContactsContacts: return (T)(Object)new TLContactsContactsSuper(from);
  374.                 case TLTypes.ContactsImportedContacts: return (T)(Object)new TLContactsImportedContacts(from);
  375.                 case TLTypes.ContactsBlocked: return (T)(Object)new TLContactsBlockedSuper(from);
  376.                 case TLTypes.ContactsBlockedSlice: return (T)(Object)new TLContactsBlockedSlice(from);
  377.                 case TLTypes.MessagesDialogs: return (T)(Object)new TLMessagesDialogsSuper(from);
  378.                 case TLTypes.MessagesDialogsSlice: return (T)(Object)new TLMessagesDialogsSlice(from);
  379.                 case TLTypes.MessagesMessages: return (T)(Object)new TLMessagesMessagesSuper(from);
  380.                 case TLTypes.MessagesMessagesSlice: return (T)(Object)new TLMessagesMessagesSlice(from);
  381.                 case TLTypes.MessagesChannelMessages: return (T)(Object)new TLMessagesChannelMessages(from);
  382.                 case TLTypes.MessagesChats: return (T)(Object)new TLMessagesChats(from);
  383.                 case TLTypes.MessagesChatFull: return (T)(Object)new TLMessagesChatFull(from);
  384.                 case TLTypes.MessagesAffectedHistory: return (T)(Object)new TLMessagesAffectedHistory(from);
  385.                 case TLTypes.InputMessagesFilterEmpty: return (T)(Object)new TLInputMessagesFilterEmpty(from);
  386.                 case TLTypes.InputMessagesFilterPhotos: return (T)(Object)new TLInputMessagesFilterPhotos(from);
  387.                 case TLTypes.InputMessagesFilterVideo: return (T)(Object)new TLInputMessagesFilterVideo(from);
  388.                 case TLTypes.InputMessagesFilterPhotoVideo: return (T)(Object)new TLInputMessagesFilterPhotoVideo(from);
  389.                 case TLTypes.InputMessagesFilterPhotoVideoDocuments: return (T)(Object)new TLInputMessagesFilterPhotoVideoDocuments(from);
  390.                 case TLTypes.InputMessagesFilterDocument: return (T)(Object)new TLInputMessagesFilterDocument(from);
  391.                 case TLTypes.InputMessagesFilterUrl: return (T)(Object)new TLInputMessagesFilterUrl(from);
  392.                 case TLTypes.InputMessagesFilterGif: return (T)(Object)new TLInputMessagesFilterGif(from);
  393.                 case TLTypes.InputMessagesFilterVoice: return (T)(Object)new TLInputMessagesFilterVoice(from);
  394.                 case TLTypes.InputMessagesFilterMusic: return (T)(Object)new TLInputMessagesFilterMusic(from);
  395.                 case TLTypes.UpdateNewMessage: return (T)(Object)new TLUpdateNewMessage(from);
  396.                 case TLTypes.UpdateMessageID: return (T)(Object)new TLUpdateMessageID(from);
  397.                 case TLTypes.UpdateDeleteMessages: return (T)(Object)new TLUpdateDeleteMessages(from);
  398.                 case TLTypes.UpdateUserTyping: return (T)(Object)new TLUpdateUserTyping(from);
  399.                 case TLTypes.UpdateChatUserTyping: return (T)(Object)new TLUpdateChatUserTyping(from);
  400.                 case TLTypes.UpdateChatParticipants: return (T)(Object)new TLUpdateChatParticipants(from);
  401.                 case TLTypes.UpdateUserStatus: return (T)(Object)new TLUpdateUserStatus(from);
  402.                 case TLTypes.UpdateUserName: return (T)(Object)new TLUpdateUserName(from);
  403.                 case TLTypes.UpdateUserPhoto: return (T)(Object)new TLUpdateUserPhoto(from);
  404.                 case TLTypes.UpdateContactRegistered: return (T)(Object)new TLUpdateContactRegistered(from);
  405.                 case TLTypes.UpdateContactLink: return (T)(Object)new TLUpdateContactLink(from);
  406.                 case TLTypes.UpdateNewAuthorization: return (T)(Object)new TLUpdateNewAuthorization(from);
  407.                 case TLTypes.UpdateNewEncryptedMessage: return (T)(Object)new TLUpdateNewEncryptedMessage(from);
  408.                 case TLTypes.UpdateEncryptedChatTyping: return (T)(Object)new TLUpdateEncryptedChatTyping(from);
  409.                 case TLTypes.UpdateEncryption: return (T)(Object)new TLUpdateEncryption(from);
  410.                 case TLTypes.UpdateEncryptedMessagesRead: return (T)(Object)new TLUpdateEncryptedMessagesRead(from);
  411.                 case TLTypes.UpdateChatParticipantAdd: return (T)(Object)new TLUpdateChatParticipantAdd(from);
  412.                 case TLTypes.UpdateChatParticipantDelete: return (T)(Object)new TLUpdateChatParticipantDelete(from);
  413.                 case TLTypes.UpdateDcOptions: return (T)(Object)new TLUpdateDcOptions(from);
  414.                 case TLTypes.UpdateUserBlocked: return (T)(Object)new TLUpdateUserBlocked(from);
  415.                 case TLTypes.UpdateNotifySettings: return (T)(Object)new TLUpdateNotifySettings(from);
  416.                 case TLTypes.UpdateServiceNotification: return (T)(Object)new TLUpdateServiceNotification(from);
  417.                 case TLTypes.UpdatePrivacy: return (T)(Object)new TLUpdatePrivacy(from);
  418.                 case TLTypes.UpdateUserPhone: return (T)(Object)new TLUpdateUserPhone(from);
  419.                 case TLTypes.UpdateReadHistoryInbox: return (T)(Object)new TLUpdateReadHistoryInbox(from);
  420.                 case TLTypes.UpdateReadHistoryOutbox: return (T)(Object)new TLUpdateReadHistoryOutbox(from);
  421.                 case TLTypes.UpdateWebPage: return (T)(Object)new TLUpdateWebPage(from);
  422.                 case TLTypes.UpdateReadMessagesContents: return (T)(Object)new TLUpdateReadMessagesContents(from);
  423.                 case TLTypes.UpdateChannelTooLong: return (T)(Object)new TLUpdateChannelTooLong(from);
  424.                 case TLTypes.UpdateChannel: return (T)(Object)new TLUpdateChannel(from);
  425.                 case TLTypes.UpdateChannelGroup: return (T)(Object)new TLUpdateChannelGroup(from);
  426.                 case TLTypes.UpdateNewChannelMessage: return (T)(Object)new TLUpdateNewChannelMessage(from);
  427.                 case TLTypes.UpdateReadChannelInbox: return (T)(Object)new TLUpdateReadChannelInbox(from);
  428.                 case TLTypes.UpdateDeleteChannelMessages: return (T)(Object)new TLUpdateDeleteChannelMessages(from);
  429.                 case TLTypes.UpdateChannelMessageViews: return (T)(Object)new TLUpdateChannelMessageViews(from);
  430.                 case TLTypes.UpdateChatAdmins: return (T)(Object)new TLUpdateChatAdmins(from);
  431.                 case TLTypes.UpdateChatParticipantAdmin: return (T)(Object)new TLUpdateChatParticipantAdmin(from);
  432.                 case TLTypes.UpdateNewStickerSet: return (T)(Object)new TLUpdateNewStickerSet(from);
  433.                 case TLTypes.UpdateStickerSetsOrder: return (T)(Object)new TLUpdateStickerSetsOrder(from);
  434.                 case TLTypes.UpdateStickerSets: return (T)(Object)new TLUpdateStickerSets(from);
  435.                 case TLTypes.UpdateSavedGifs: return (T)(Object)new TLUpdateSavedGifs(from);
  436.                 case TLTypes.UpdateBotInlineQuery: return (T)(Object)new TLUpdateBotInlineQuery(from);
  437.                 case TLTypes.UpdateBotInlineSend: return (T)(Object)new TLUpdateBotInlineSend(from);
  438.                 case TLTypes.UpdateEditChannelMessage: return (T)(Object)new TLUpdateEditChannelMessage(from);
  439.                 case TLTypes.UpdateChannelPinnedMessage: return (T)(Object)new TLUpdateChannelPinnedMessage(from);
  440.                 case TLTypes.UpdatesState: return (T)(Object)new TLUpdatesState(from);
  441.                 case TLTypes.UpdatesDifferenceEmpty: return (T)(Object)new TLUpdatesDifferenceEmpty(from);
  442.                 case TLTypes.UpdatesDifference: return (T)(Object)new TLUpdatesDifferenceSuper(from);
  443.                 case TLTypes.UpdatesDifferenceSlice: return (T)(Object)new TLUpdatesDifferenceSlice(from);
  444.                 case TLTypes.UpdatesTooLong: return (T)(Object)new TLUpdatesTooLong(from);
  445.                 case TLTypes.UpdateShortMessage: return (T)(Object)new TLUpdateShortMessage(from);
  446.                 case TLTypes.UpdateShortChatMessage: return (T)(Object)new TLUpdateShortChatMessage(from);
  447.                 case TLTypes.UpdateShort: return (T)(Object)new TLUpdateShort(from);
  448.                 case TLTypes.UpdatesCombined: return (T)(Object)new TLUpdatesCombined(from);
  449.                 case TLTypes.Updates: return (T)(Object)new TLUpdatesSuper(from);
  450.                 case TLTypes.UpdateShortSentMessage: return (T)(Object)new TLUpdateShortSentMessage(from);
  451.                 case TLTypes.PhotosPhotos: return (T)(Object)new TLPhotosPhotosSuper(from);
  452.                 case TLTypes.PhotosPhotosSlice: return (T)(Object)new TLPhotosPhotosSlice(from);
  453.                 case TLTypes.PhotosPhoto: return (T)(Object)new TLPhotosPhoto(from);
  454.                 case TLTypes.UploadFile: return (T)(Object)new TLUploadFile(from);
  455.                 case TLTypes.DcOption: return (T)(Object)new TLDcOption(from);
  456.                 case TLTypes.Config: return (T)(Object)new TLConfig(from);
  457.                 case TLTypes.NearestDc: return (T)(Object)new TLNearestDc(from);
  458.                 case TLTypes.HelpAppUpdate: return (T)(Object)new TLHelpAppUpdateSuper(from);
  459.                 case TLTypes.HelpNoAppUpdate: return (T)(Object)new TLHelpNoAppUpdate(from);
  460.                 case TLTypes.HelpInviteText: return (T)(Object)new TLHelpInviteText(from);
  461.                 case TLTypes.EncryptedChatEmpty: return (T)(Object)new TLEncryptedChatEmpty(from);
  462.                 case TLTypes.EncryptedChatWaiting: return (T)(Object)new TLEncryptedChatWaiting(from);
  463.                 case TLTypes.EncryptedChatRequested: return (T)(Object)new TLEncryptedChatRequested(from);
  464.                 case TLTypes.EncryptedChat: return (T)(Object)new TLEncryptedChatSuper(from);
  465.                 case TLTypes.EncryptedChatDiscarded: return (T)(Object)new TLEncryptedChatDiscarded(from);
  466.                 case TLTypes.InputEncryptedChat: return (T)(Object)new TLInputEncryptedChat(from);
  467.                 case TLTypes.EncryptedFileEmpty: return (T)(Object)new TLEncryptedFileEmpty(from);
  468.                 case TLTypes.EncryptedFile: return (T)(Object)new TLEncryptedFileSuper(from);
  469.                 case TLTypes.InputEncryptedFileEmpty: return (T)(Object)new TLInputEncryptedFileEmpty(from);
  470.                 case TLTypes.InputEncryptedFileUploaded: return (T)(Object)new TLInputEncryptedFileUploaded(from);
  471.                 case TLTypes.InputEncryptedFile: return (T)(Object)new TLInputEncryptedFileSuper(from);
  472.                 case TLTypes.InputEncryptedFileBigUploaded: return (T)(Object)new TLInputEncryptedFileBigUploaded(from);
  473.                 case TLTypes.EncryptedMessage: return (T)(Object)new TLEncryptedMessageSuper(from);
  474.                 case TLTypes.EncryptedMessageService: return (T)(Object)new TLEncryptedMessageService(from);
  475.                 case TLTypes.MessagesDHConfigNotModified: return (T)(Object)new TLMessagesDHConfigNotModified(from);
  476.                 case TLTypes.MessagesDHConfig: return (T)(Object)new TLMessagesDHConfigSuper(from);
  477.                 case TLTypes.MessagesSentEncryptedMessage: return (T)(Object)new TLMessagesSentEncryptedMessageSuper(from);
  478.                 case TLTypes.MessagesSentEncryptedFile: return (T)(Object)new TLMessagesSentEncryptedFile(from);
  479.                 case TLTypes.InputDocumentEmpty: return (T)(Object)new TLInputDocumentEmpty(from);
  480.                 case TLTypes.InputDocument: return (T)(Object)new TLInputDocumentSuper(from);
  481.                 case TLTypes.DocumentEmpty: return (T)(Object)new TLDocumentEmpty(from);
  482.                 case TLTypes.Document: return (T)(Object)new TLDocumentSuper(from);
  483.                 case TLTypes.HelpSupport: return (T)(Object)new TLHelpSupport(from);
  484.                 case TLTypes.NotifyPeer: return (T)(Object)new TLNotifyPeerSuper(from);
  485.                 case TLTypes.NotifyUsers: return (T)(Object)new TLNotifyUsers(from);
  486.                 case TLTypes.NotifyChats: return (T)(Object)new TLNotifyChats(from);
  487.                 case TLTypes.NotifyAll: return (T)(Object)new TLNotifyAll(from);
  488.                 case TLTypes.SendMessageTypingAction: return (T)(Object)new TLSendMessageTypingAction(from);
  489.                 case TLTypes.SendMessageCancelAction: return (T)(Object)new TLSendMessageCancelAction(from);
  490.                 case TLTypes.SendMessageRecordVideoAction: return (T)(Object)new TLSendMessageRecordVideoAction(from);
  491.                 case TLTypes.SendMessageUploadVideoAction: return (T)(Object)new TLSendMessageUploadVideoAction(from);
  492.                 case TLTypes.SendMessageRecordAudioAction: return (T)(Object)new TLSendMessageRecordAudioAction(from);
  493.                 case TLTypes.SendMessageUploadAudioAction: return (T)(Object)new TLSendMessageUploadAudioAction(from);
  494.                 case TLTypes.SendMessageUploadPhotoAction: return (T)(Object)new TLSendMessageUploadPhotoAction(from);
  495.                 case TLTypes.SendMessageUploadDocumentAction: return (T)(Object)new TLSendMessageUploadDocumentAction(from);
  496.                 case TLTypes.SendMessageGeoLocationAction: return (T)(Object)new TLSendMessageGeoLocationAction(from);
  497.                 case TLTypes.SendMessageChooseContactAction: return (T)(Object)new TLSendMessageChooseContactAction(from);
  498.                 case TLTypes.ContactsFound: return (T)(Object)new TLContactsFound(from);
  499.                 case TLTypes.InputPrivacyKeyStatusTimestamp: return (T)(Object)new TLInputPrivacyKeyStatusTimestamp(from);
  500.                 case TLTypes.InputPrivacyKeyChatInvite: return (T)(Object)new TLInputPrivacyKeyChatInvite(from);
  501.                 case TLTypes.PrivacyKeyStatusTimestamp: return (T)(Object)new TLPrivacyKeyStatusTimestamp(from);
  502.                 case TLTypes.PrivacyKeyChatInvite: return (T)(Object)new TLPrivacyKeyChatInvite(from);
  503.                 case TLTypes.InputPrivacyValueAllowContacts: return (T)(Object)new TLInputPrivacyValueAllowContacts(from);
  504.                 case TLTypes.InputPrivacyValueAllowAll: return (T)(Object)new TLInputPrivacyValueAllowAll(from);
  505.                 case TLTypes.InputPrivacyValueAllowUsers: return (T)(Object)new TLInputPrivacyValueAllowUsers(from);
  506.                 case TLTypes.InputPrivacyValueDisallowContacts: return (T)(Object)new TLInputPrivacyValueDisallowContacts(from);
  507.                 case TLTypes.InputPrivacyValueDisallowAll: return (T)(Object)new TLInputPrivacyValueDisallowAll(from);
  508.                 case TLTypes.InputPrivacyValueDisallowUsers: return (T)(Object)new TLInputPrivacyValueDisallowUsers(from);
  509.                 case TLTypes.PrivacyValueAllowContacts: return (T)(Object)new TLPrivacyValueAllowContacts(from);
  510.                 case TLTypes.PrivacyValueAllowAll: return (T)(Object)new TLPrivacyValueAllowAll(from);
  511.                 case TLTypes.PrivacyValueAllowUsers: return (T)(Object)new TLPrivacyValueAllowUsers(from);
  512.                 case TLTypes.PrivacyValueDisallowContacts: return (T)(Object)new TLPrivacyValueDisallowContacts(from);
  513.                 case TLTypes.PrivacyValueDisallowAll: return (T)(Object)new TLPrivacyValueDisallowAll(from);
  514.                 case TLTypes.PrivacyValueDisallowUsers: return (T)(Object)new TLPrivacyValueDisallowUsers(from);
  515.                 case TLTypes.AccountPrivacyRules: return (T)(Object)new TLAccountPrivacyRules(from);
  516.                 case TLTypes.AccountDaysTTL: return (T)(Object)new TLAccountDaysTTL(from);
  517.                 case TLTypes.DocumentAttributeImageSize: return (T)(Object)new TLDocumentAttributeImageSize(from);
  518.                 case TLTypes.DocumentAttributeAnimated: return (T)(Object)new TLDocumentAttributeAnimated(from);
  519.                 case TLTypes.DocumentAttributeSticker: return (T)(Object)new TLDocumentAttributeSticker(from);
  520.                 case TLTypes.DocumentAttributeVideo: return (T)(Object)new TLDocumentAttributeVideo(from);
  521.                 case TLTypes.DocumentAttributeAudio: return (T)(Object)new TLDocumentAttributeAudio(from);
  522.                 case TLTypes.DocumentAttributeFilename: return (T)(Object)new TLDocumentAttributeFilename(from);
  523.                 case TLTypes.MessagesStickersNotModified: return (T)(Object)new TLMessagesStickersNotModified(from);
  524.                 case TLTypes.MessagesStickers: return (T)(Object)new TLMessagesStickersSuper(from);
  525.                 case TLTypes.StickerPack: return (T)(Object)new TLStickerPack(from);
  526.                 case TLTypes.MessagesAllStickersNotModified: return (T)(Object)new TLMessagesAllStickersNotModified(from);
  527.                 case TLTypes.MessagesAllStickers: return (T)(Object)new TLMessagesAllStickersSuper(from);
  528.                 case TLTypes.DisabledFeature: return (T)(Object)new TLDisabledFeature(from);
  529.                 case TLTypes.MessagesAffectedMessages: return (T)(Object)new TLMessagesAffectedMessages(from);
  530.                 case TLTypes.ContactLinkUnknown: return (T)(Object)new TLContactLinkUnknown(from);
  531.                 case TLTypes.ContactLinkNone: return (T)(Object)new TLContactLinkNone(from);
  532.                 case TLTypes.ContactLinkHasPhone: return (T)(Object)new TLContactLinkHasPhone(from);
  533.                 case TLTypes.ContactLinkContact: return (T)(Object)new TLContactLinkContact(from);
  534.                 case TLTypes.WebPageEmpty: return (T)(Object)new TLWebPageEmpty(from);
  535.                 case TLTypes.WebPagePending: return (T)(Object)new TLWebPagePending(from);
  536.                 case TLTypes.WebPage: return (T)(Object)new TLWebPageSuper(from);
  537.                 case TLTypes.Authorization: return (T)(Object)new TLAuthorization(from);
  538.                 case TLTypes.AccountAuthorizations: return (T)(Object)new TLAccountAuthorizations(from);
  539.                 case TLTypes.AccountNoPassword: return (T)(Object)new TLAccountNoPassword(from);
  540.                 case TLTypes.AccountPassword: return (T)(Object)new TLAccountPasswordSuper(from);
  541.                 case TLTypes.AccountPasswordSettings: return (T)(Object)new TLAccountPasswordSettings(from);
  542.                 case TLTypes.AccountPasswordInputSettings: return (T)(Object)new TLAccountPasswordInputSettings(from);
  543.                 case TLTypes.AuthPasswordRecovery: return (T)(Object)new TLAuthPasswordRecovery(from);
  544.                 case TLTypes.ReceivedNotifyMessage: return (T)(Object)new TLReceivedNotifyMessage(from);
  545.                 case TLTypes.ChatInviteEmpty: return (T)(Object)new TLChatInviteEmpty(from);
  546.                 case TLTypes.ChatInviteExported: return (T)(Object)new TLChatInviteExported(from);
  547.                 case TLTypes.ChatInviteAlready: return (T)(Object)new TLChatInviteAlready(from);
  548.                 case TLTypes.ChatInvite: return (T)(Object)new TLChatInviteSuper(from);
  549.                 case TLTypes.InputStickerSetEmpty: return (T)(Object)new TLInputStickerSetEmpty(from);
  550.                 case TLTypes.InputStickerSetID: return (T)(Object)new TLInputStickerSetID(from);
  551.                 case TLTypes.InputStickerSetShortName: return (T)(Object)new TLInputStickerSetShortName(from);
  552.                 case TLTypes.StickerSet: return (T)(Object)new TLStickerSet(from);
  553.                 case TLTypes.MessagesStickerSet: return (T)(Object)new TLMessagesStickerSet(from);
  554.                 case TLTypes.BotCommand: return (T)(Object)new TLBotCommand(from);
  555.                 case TLTypes.BotInfo: return (T)(Object)new TLBotInfo(from);
  556.                 case TLTypes.KeyboardButton: return (T)(Object)new TLKeyboardButton(from);
  557.                 case TLTypes.KeyboardButtonRow: return (T)(Object)new TLKeyboardButtonRow(from);
  558.                 case TLTypes.ReplyKeyboardHide: return (T)(Object)new TLReplyKeyboardHide(from);
  559.                 case TLTypes.ReplyKeyboardForceReply: return (T)(Object)new TLReplyKeyboardForceReply(from);
  560.                 case TLTypes.ReplyKeyboardMarkup: return (T)(Object)new TLReplyKeyboardMarkup(from);
  561.                 case TLTypes.HelpAppChangelogEmpty: return (T)(Object)new TLHelpAppChangelogEmpty(from);
  562.                 case TLTypes.HelpAppChangelog: return (T)(Object)new TLHelpAppChangelogSuper(from);
  563.                 case TLTypes.MessageEntityUnknown: return (T)(Object)new TLMessageEntityUnknown(from);
  564.                 case TLTypes.MessageEntityMention: return (T)(Object)new TLMessageEntityMention(from);
  565.                 case TLTypes.MessageEntityHashtag: return (T)(Object)new TLMessageEntityHashtag(from);
  566.                 case TLTypes.MessageEntityBotCommand: return (T)(Object)new TLMessageEntityBotCommand(from);
  567.                 case TLTypes.MessageEntityUrl: return (T)(Object)new TLMessageEntityUrl(from);
  568.                 case TLTypes.MessageEntityEmail: return (T)(Object)new TLMessageEntityEmail(from);
  569.                 case TLTypes.MessageEntityBold: return (T)(Object)new TLMessageEntityBold(from);
  570.                 case TLTypes.MessageEntityItalic: return (T)(Object)new TLMessageEntityItalic(from);
  571.                 case TLTypes.MessageEntityCode: return (T)(Object)new TLMessageEntityCode(from);
  572.                 case TLTypes.MessageEntityPre: return (T)(Object)new TLMessageEntityPre(from);
  573.                 case TLTypes.MessageEntityTextUrl: return (T)(Object)new TLMessageEntityTextUrl(from);
  574.                 case TLTypes.InputChannelEmpty: return (T)(Object)new TLInputChannelEmpty(from);
  575.                 case TLTypes.InputChannel: return (T)(Object)new TLInputChannelSuper(from);
  576.                 case TLTypes.ContactsResolvedPeer: return (T)(Object)new TLContactsResolvedPeer(from);
  577.                 case TLTypes.MessageRange: return (T)(Object)new TLMessageRange(from);
  578.                 case TLTypes.MessageGroup: return (T)(Object)new TLMessageGroup(from);
  579.                 case TLTypes.UpdatesChannelDifferenceEmpty: return (T)(Object)new TLUpdatesChannelDifferenceEmpty(from);
  580.                 case TLTypes.UpdatesChannelDifferenceTooLong: return (T)(Object)new TLUpdatesChannelDifferenceTooLong(from);
  581.                 case TLTypes.UpdatesChannelDifference: return (T)(Object)new TLUpdatesChannelDifferenceSuper(from);
  582.                 case TLTypes.ChannelMessagesFilterEmpty: return (T)(Object)new TLChannelMessagesFilterEmpty(from);
  583.                 case TLTypes.ChannelMessagesFilter: return (T)(Object)new TLChannelMessagesFilterSuper(from);
  584.                 case TLTypes.ChannelMessagesFilterCollapsed: return (T)(Object)new TLChannelMessagesFilterCollapsed(from);
  585.                 case TLTypes.ChannelParticipant: return (T)(Object)new TLChannelParticipantSuper(from);
  586.                 case TLTypes.ChannelParticipantSelf: return (T)(Object)new TLChannelParticipantSelf(from);
  587.                 case TLTypes.ChannelParticipantModerator: return (T)(Object)new TLChannelParticipantModerator(from);
  588.                 case TLTypes.ChannelParticipantEditor: return (T)(Object)new TLChannelParticipantEditor(from);
  589.                 case TLTypes.ChannelParticipantKicked: return (T)(Object)new TLChannelParticipantKicked(from);
  590.                 case TLTypes.ChannelParticipantCreator: return (T)(Object)new TLChannelParticipantCreator(from);
  591.                 case TLTypes.ChannelParticipantsRecent: return (T)(Object)new TLChannelParticipantsRecent(from);
  592.                 case TLTypes.ChannelParticipantsAdmins: return (T)(Object)new TLChannelParticipantsAdmins(from);
  593.                 case TLTypes.ChannelParticipantsKicked: return (T)(Object)new TLChannelParticipantsKicked(from);
  594.                 case TLTypes.ChannelParticipantsBots: return (T)(Object)new TLChannelParticipantsBots(from);
  595.                 case TLTypes.ChannelRoleEmpty: return (T)(Object)new TLChannelRoleEmpty(from);
  596.                 case TLTypes.ChannelRoleModerator: return (T)(Object)new TLChannelRoleModerator(from);
  597.                 case TLTypes.ChannelRoleEditor: return (T)(Object)new TLChannelRoleEditor(from);
  598.                 case TLTypes.ChannelsChannelParticipants: return (T)(Object)new TLChannelsChannelParticipants(from);
  599.                 case TLTypes.ChannelsChannelParticipant: return (T)(Object)new TLChannelsChannelParticipant(from);
  600.                 case TLTypes.HelpTermsOfService: return (T)(Object)new TLHelpTermsOfService(from);
  601.                 case TLTypes.FoundGif: return (T)(Object)new TLFoundGifSuper(from);
  602.                 case TLTypes.FoundGifCached: return (T)(Object)new TLFoundGifCached(from);
  603.                 case TLTypes.MessagesFoundGifs: return (T)(Object)new TLMessagesFoundGifs(from);
  604.                 case TLTypes.MessagesSavedGifsNotModified: return (T)(Object)new TLMessagesSavedGifsNotModified(from);
  605.                 case TLTypes.MessagesSavedGifs: return (T)(Object)new TLMessagesSavedGifsSuper(from);
  606.                 case TLTypes.InputBotInlineMessageMediaAuto: return (T)(Object)new TLInputBotInlineMessageMediaAuto(from);
  607.                 case TLTypes.InputBotInlineMessageText: return (T)(Object)new TLInputBotInlineMessageText(from);
  608.                 case TLTypes.InputBotInlineResult: return (T)(Object)new TLInputBotInlineResult(from);
  609.                 case TLTypes.BotInlineMessageMediaAuto: return (T)(Object)new TLBotInlineMessageMediaAuto(from);
  610.                 case TLTypes.BotInlineMessageText: return (T)(Object)new TLBotInlineMessageText(from);
  611.                 case TLTypes.BotInlineMediaResultDocument: return (T)(Object)new TLBotInlineMediaResultDocument(from);
  612.                 case TLTypes.BotInlineMediaResultPhoto: return (T)(Object)new TLBotInlineMediaResultPhoto(from);
  613.                 case TLTypes.BotInlineResult: return (T)(Object)new TLBotInlineResultSuper(from);
  614.                 case TLTypes.MessagesBotResults: return (T)(Object)new TLMessagesBotResults(from);
  615.                 case TLTypes.ExportedMessageLink: return (T)(Object)new TLExportedMessageLink(from);
  616.                 case TLTypes.MessageFwdHeader: return (T)(Object)new TLMessageFwdHeader(from);
  617.                 case TLTypes.ChannelsMessageEditData: return (T)(Object)new TLChannelsMessageEditData(from);
  618.                 case TLTypes.AuthCodeTypeSms: return (T)(Object)new TLAuthCodeTypeSms(from);
  619.                 case TLTypes.AuthCodeTypeCall: return (T)(Object)new TLAuthCodeTypeCall(from);
  620.                 case TLTypes.AuthCodeTypeFlashCall: return (T)(Object)new TLAuthCodeTypeFlashCall(from);
  621.                 case TLTypes.AuthSentCodeTypeApp: return (T)(Object)new TLAuthSentCodeTypeApp(from);
  622.                 case TLTypes.AuthSentCodeTypeSms: return (T)(Object)new TLAuthSentCodeTypeSms(from);
  623.                 case TLTypes.AuthSentCodeTypeCall: return (T)(Object)new TLAuthSentCodeTypeCall(from);
  624.                 case TLTypes.AuthSentCodeTypeFlashCall: return (T)(Object)new TLAuthSentCodeTypeFlashCall(from);
  625.                 default: throw new InvalidOperationException();
  626.             }
  627.         }
  628.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement