tdlight-java/src/main/java/it/ernytech/tdlib/TdApi.java

55914 lines
1.5 MiB

package it.ernytech.tdlib;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.lang.IllegalStateException;
import java.io.IOException;
import java.io.DataInput;
public class TdApi {
public abstract static class Object {
public native String toString();
public abstract int getConstructor();
public byte[] serialize() throws IOException {
try(var baos = new ByteArrayOutputStream()) {
try(var out = new DataOutputStream(baos)) {
serialize(out);
return baos.toByteArray();
}
}
}
public abstract void serialize(DataOutputStream out) throws IOException;
}
public abstract static class Function extends Object {
public native String toString();
}
public static class Deserializer {
public static Object deserialize(DataInput input) throws IOException {
switch(input.readInt()) {
case AccountTtl.CONSTRUCTOR:
return new AccountTtl(input);
case Address.CONSTRUCTOR:
return new Address(input);
case Animation.CONSTRUCTOR:
return new Animation(input);
case Animations.CONSTRUCTOR:
return new Animations(input);
case Audio.CONSTRUCTOR:
return new Audio(input);
case AuthenticationCodeInfo.CONSTRUCTOR:
return new AuthenticationCodeInfo(input);
case AuthenticationCodeTypeTelegramMessage.CONSTRUCTOR:
return new AuthenticationCodeTypeTelegramMessage(input);
case AuthenticationCodeTypeSms.CONSTRUCTOR:
return new AuthenticationCodeTypeSms(input);
case AuthenticationCodeTypeCall.CONSTRUCTOR:
return new AuthenticationCodeTypeCall(input);
case AuthenticationCodeTypeFlashCall.CONSTRUCTOR:
return new AuthenticationCodeTypeFlashCall(input);
case AuthorizationStateWaitTdlibParameters.CONSTRUCTOR:
return new AuthorizationStateWaitTdlibParameters(input);
case AuthorizationStateWaitEncryptionKey.CONSTRUCTOR:
return new AuthorizationStateWaitEncryptionKey(input);
case AuthorizationStateWaitPhoneNumber.CONSTRUCTOR:
return new AuthorizationStateWaitPhoneNumber(input);
case AuthorizationStateWaitCode.CONSTRUCTOR:
return new AuthorizationStateWaitCode(input);
case AuthorizationStateWaitOtherDeviceConfirmation.CONSTRUCTOR:
return new AuthorizationStateWaitOtherDeviceConfirmation(input);
case AuthorizationStateWaitRegistration.CONSTRUCTOR:
return new AuthorizationStateWaitRegistration(input);
case AuthorizationStateWaitPassword.CONSTRUCTOR:
return new AuthorizationStateWaitPassword(input);
case AuthorizationStateReady.CONSTRUCTOR:
return new AuthorizationStateReady(input);
case AuthorizationStateLoggingOut.CONSTRUCTOR:
return new AuthorizationStateLoggingOut(input);
case AuthorizationStateClosing.CONSTRUCTOR:
return new AuthorizationStateClosing(input);
case AuthorizationStateClosed.CONSTRUCTOR:
return new AuthorizationStateClosed(input);
case AutoDownloadSettings.CONSTRUCTOR:
return new AutoDownloadSettings(input);
case AutoDownloadSettingsPresets.CONSTRUCTOR:
return new AutoDownloadSettingsPresets(input);
case Background.CONSTRUCTOR:
return new Background(input);
case BackgroundFillSolid.CONSTRUCTOR:
return new BackgroundFillSolid(input);
case BackgroundFillGradient.CONSTRUCTOR:
return new BackgroundFillGradient(input);
case BackgroundTypeWallpaper.CONSTRUCTOR:
return new BackgroundTypeWallpaper(input);
case BackgroundTypePattern.CONSTRUCTOR:
return new BackgroundTypePattern(input);
case BackgroundTypeFill.CONSTRUCTOR:
return new BackgroundTypeFill(input);
case Backgrounds.CONSTRUCTOR:
return new Backgrounds(input);
case BankCardActionOpenUrl.CONSTRUCTOR:
return new BankCardActionOpenUrl(input);
case BankCardInfo.CONSTRUCTOR:
return new BankCardInfo(input);
case BasicGroup.CONSTRUCTOR:
return new BasicGroup(input);
case BasicGroupFullInfo.CONSTRUCTOR:
return new BasicGroupFullInfo(input);
case BotCommand.CONSTRUCTOR:
return new BotCommand(input);
case BotInfo.CONSTRUCTOR:
return new BotInfo(input);
case Call.CONSTRUCTOR:
return new Call(input);
case CallConnection.CONSTRUCTOR:
return new CallConnection(input);
case CallDiscardReasonEmpty.CONSTRUCTOR:
return new CallDiscardReasonEmpty(input);
case CallDiscardReasonMissed.CONSTRUCTOR:
return new CallDiscardReasonMissed(input);
case CallDiscardReasonDeclined.CONSTRUCTOR:
return new CallDiscardReasonDeclined(input);
case CallDiscardReasonDisconnected.CONSTRUCTOR:
return new CallDiscardReasonDisconnected(input);
case CallDiscardReasonHungUp.CONSTRUCTOR:
return new CallDiscardReasonHungUp(input);
case CallId.CONSTRUCTOR:
return new CallId(input);
case CallProblemEcho.CONSTRUCTOR:
return new CallProblemEcho(input);
case CallProblemNoise.CONSTRUCTOR:
return new CallProblemNoise(input);
case CallProblemInterruptions.CONSTRUCTOR:
return new CallProblemInterruptions(input);
case CallProblemDistortedSpeech.CONSTRUCTOR:
return new CallProblemDistortedSpeech(input);
case CallProblemSilentLocal.CONSTRUCTOR:
return new CallProblemSilentLocal(input);
case CallProblemSilentRemote.CONSTRUCTOR:
return new CallProblemSilentRemote(input);
case CallProblemDropped.CONSTRUCTOR:
return new CallProblemDropped(input);
case CallProtocol.CONSTRUCTOR:
return new CallProtocol(input);
case CallStatePending.CONSTRUCTOR:
return new CallStatePending(input);
case CallStateExchangingKeys.CONSTRUCTOR:
return new CallStateExchangingKeys(input);
case CallStateReady.CONSTRUCTOR:
return new CallStateReady(input);
case CallStateHangingUp.CONSTRUCTOR:
return new CallStateHangingUp(input);
case CallStateDiscarded.CONSTRUCTOR:
return new CallStateDiscarded(input);
case CallStateError.CONSTRUCTOR:
return new CallStateError(input);
case CallbackQueryAnswer.CONSTRUCTOR:
return new CallbackQueryAnswer(input);
case CallbackQueryPayloadData.CONSTRUCTOR:
return new CallbackQueryPayloadData(input);
case CallbackQueryPayloadGame.CONSTRUCTOR:
return new CallbackQueryPayloadGame(input);
case CanTransferOwnershipResultOk.CONSTRUCTOR:
return new CanTransferOwnershipResultOk(input);
case CanTransferOwnershipResultPasswordNeeded.CONSTRUCTOR:
return new CanTransferOwnershipResultPasswordNeeded(input);
case CanTransferOwnershipResultPasswordTooFresh.CONSTRUCTOR:
return new CanTransferOwnershipResultPasswordTooFresh(input);
case CanTransferOwnershipResultSessionTooFresh.CONSTRUCTOR:
return new CanTransferOwnershipResultSessionTooFresh(input);
case Chat.CONSTRUCTOR:
return new Chat(input);
case ChatActionTyping.CONSTRUCTOR:
return new ChatActionTyping(input);
case ChatActionRecordingVideo.CONSTRUCTOR:
return new ChatActionRecordingVideo(input);
case ChatActionUploadingVideo.CONSTRUCTOR:
return new ChatActionUploadingVideo(input);
case ChatActionRecordingVoiceNote.CONSTRUCTOR:
return new ChatActionRecordingVoiceNote(input);
case ChatActionUploadingVoiceNote.CONSTRUCTOR:
return new ChatActionUploadingVoiceNote(input);
case ChatActionUploadingPhoto.CONSTRUCTOR:
return new ChatActionUploadingPhoto(input);
case ChatActionUploadingDocument.CONSTRUCTOR:
return new ChatActionUploadingDocument(input);
case ChatActionChoosingLocation.CONSTRUCTOR:
return new ChatActionChoosingLocation(input);
case ChatActionChoosingContact.CONSTRUCTOR:
return new ChatActionChoosingContact(input);
case ChatActionStartPlayingGame.CONSTRUCTOR:
return new ChatActionStartPlayingGame(input);
case ChatActionRecordingVideoNote.CONSTRUCTOR:
return new ChatActionRecordingVideoNote(input);
case ChatActionUploadingVideoNote.CONSTRUCTOR:
return new ChatActionUploadingVideoNote(input);
case ChatActionCancel.CONSTRUCTOR:
return new ChatActionCancel(input);
case ChatActionBarReportSpam.CONSTRUCTOR:
return new ChatActionBarReportSpam(input);
case ChatActionBarReportUnrelatedLocation.CONSTRUCTOR:
return new ChatActionBarReportUnrelatedLocation(input);
case ChatActionBarReportAddBlock.CONSTRUCTOR:
return new ChatActionBarReportAddBlock(input);
case ChatActionBarAddContact.CONSTRUCTOR:
return new ChatActionBarAddContact(input);
case ChatActionBarSharePhoneNumber.CONSTRUCTOR:
return new ChatActionBarSharePhoneNumber(input);
case ChatAdministrator.CONSTRUCTOR:
return new ChatAdministrator(input);
case ChatAdministrators.CONSTRUCTOR:
return new ChatAdministrators(input);
case ChatEvent.CONSTRUCTOR:
return new ChatEvent(input);
case ChatEventMessageEdited.CONSTRUCTOR:
return new ChatEventMessageEdited(input);
case ChatEventMessageDeleted.CONSTRUCTOR:
return new ChatEventMessageDeleted(input);
case ChatEventPollStopped.CONSTRUCTOR:
return new ChatEventPollStopped(input);
case ChatEventMessagePinned.CONSTRUCTOR:
return new ChatEventMessagePinned(input);
case ChatEventMessageUnpinned.CONSTRUCTOR:
return new ChatEventMessageUnpinned(input);
case ChatEventMemberJoined.CONSTRUCTOR:
return new ChatEventMemberJoined(input);
case ChatEventMemberLeft.CONSTRUCTOR:
return new ChatEventMemberLeft(input);
case ChatEventMemberInvited.CONSTRUCTOR:
return new ChatEventMemberInvited(input);
case ChatEventMemberPromoted.CONSTRUCTOR:
return new ChatEventMemberPromoted(input);
case ChatEventMemberRestricted.CONSTRUCTOR:
return new ChatEventMemberRestricted(input);
case ChatEventTitleChanged.CONSTRUCTOR:
return new ChatEventTitleChanged(input);
case ChatEventPermissionsChanged.CONSTRUCTOR:
return new ChatEventPermissionsChanged(input);
case ChatEventDescriptionChanged.CONSTRUCTOR:
return new ChatEventDescriptionChanged(input);
case ChatEventUsernameChanged.CONSTRUCTOR:
return new ChatEventUsernameChanged(input);
case ChatEventPhotoChanged.CONSTRUCTOR:
return new ChatEventPhotoChanged(input);
case ChatEventInvitesToggled.CONSTRUCTOR:
return new ChatEventInvitesToggled(input);
case ChatEventLinkedChatChanged.CONSTRUCTOR:
return new ChatEventLinkedChatChanged(input);
case ChatEventSlowModeDelayChanged.CONSTRUCTOR:
return new ChatEventSlowModeDelayChanged(input);
case ChatEventSignMessagesToggled.CONSTRUCTOR:
return new ChatEventSignMessagesToggled(input);
case ChatEventStickerSetChanged.CONSTRUCTOR:
return new ChatEventStickerSetChanged(input);
case ChatEventLocationChanged.CONSTRUCTOR:
return new ChatEventLocationChanged(input);
case ChatEventIsAllHistoryAvailableToggled.CONSTRUCTOR:
return new ChatEventIsAllHistoryAvailableToggled(input);
case ChatEventLogFilters.CONSTRUCTOR:
return new ChatEventLogFilters(input);
case ChatEvents.CONSTRUCTOR:
return new ChatEvents(input);
case ChatInviteLink.CONSTRUCTOR:
return new ChatInviteLink(input);
case ChatInviteLinkInfo.CONSTRUCTOR:
return new ChatInviteLinkInfo(input);
case ChatListMain.CONSTRUCTOR:
return new ChatListMain(input);
case ChatListArchive.CONSTRUCTOR:
return new ChatListArchive(input);
case ChatLocation.CONSTRUCTOR:
return new ChatLocation(input);
case ChatMember.CONSTRUCTOR:
return new ChatMember(input);
case ChatMemberStatusCreator.CONSTRUCTOR:
return new ChatMemberStatusCreator(input);
case ChatMemberStatusAdministrator.CONSTRUCTOR:
return new ChatMemberStatusAdministrator(input);
case ChatMemberStatusMember.CONSTRUCTOR:
return new ChatMemberStatusMember(input);
case ChatMemberStatusRestricted.CONSTRUCTOR:
return new ChatMemberStatusRestricted(input);
case ChatMemberStatusLeft.CONSTRUCTOR:
return new ChatMemberStatusLeft(input);
case ChatMemberStatusBanned.CONSTRUCTOR:
return new ChatMemberStatusBanned(input);
case ChatMembers.CONSTRUCTOR:
return new ChatMembers(input);
case ChatMembersFilterContacts.CONSTRUCTOR:
return new ChatMembersFilterContacts(input);
case ChatMembersFilterAdministrators.CONSTRUCTOR:
return new ChatMembersFilterAdministrators(input);
case ChatMembersFilterMembers.CONSTRUCTOR:
return new ChatMembersFilterMembers(input);
case ChatMembersFilterRestricted.CONSTRUCTOR:
return new ChatMembersFilterRestricted(input);
case ChatMembersFilterBanned.CONSTRUCTOR:
return new ChatMembersFilterBanned(input);
case ChatMembersFilterBots.CONSTRUCTOR:
return new ChatMembersFilterBots(input);
case ChatNearby.CONSTRUCTOR:
return new ChatNearby(input);
case ChatNotificationSettings.CONSTRUCTOR:
return new ChatNotificationSettings(input);
case ChatPermissions.CONSTRUCTOR:
return new ChatPermissions(input);
case ChatPhoto.CONSTRUCTOR:
return new ChatPhoto(input);
case ChatReportReasonSpam.CONSTRUCTOR:
return new ChatReportReasonSpam(input);
case ChatReportReasonViolence.CONSTRUCTOR:
return new ChatReportReasonViolence(input);
case ChatReportReasonPornography.CONSTRUCTOR:
return new ChatReportReasonPornography(input);
case ChatReportReasonChildAbuse.CONSTRUCTOR:
return new ChatReportReasonChildAbuse(input);
case ChatReportReasonCopyright.CONSTRUCTOR:
return new ChatReportReasonCopyright(input);
case ChatReportReasonUnrelatedLocation.CONSTRUCTOR:
return new ChatReportReasonUnrelatedLocation(input);
case ChatReportReasonCustom.CONSTRUCTOR:
return new ChatReportReasonCustom(input);
case ChatStatistics.CONSTRUCTOR:
return new ChatStatistics(input);
case ChatStatisticsMessageInteractionCounters.CONSTRUCTOR:
return new ChatStatisticsMessageInteractionCounters(input);
case ChatTypePrivate.CONSTRUCTOR:
return new ChatTypePrivate(input);
case ChatTypeBasicGroup.CONSTRUCTOR:
return new ChatTypeBasicGroup(input);
case ChatTypeSupergroup.CONSTRUCTOR:
return new ChatTypeSupergroup(input);
case ChatTypeSecret.CONSTRUCTOR:
return new ChatTypeSecret(input);
case Chats.CONSTRUCTOR:
return new Chats(input);
case ChatsNearby.CONSTRUCTOR:
return new ChatsNearby(input);
case CheckChatUsernameResultOk.CONSTRUCTOR:
return new CheckChatUsernameResultOk(input);
case CheckChatUsernameResultUsernameInvalid.CONSTRUCTOR:
return new CheckChatUsernameResultUsernameInvalid(input);
case CheckChatUsernameResultUsernameOccupied.CONSTRUCTOR:
return new CheckChatUsernameResultUsernameOccupied(input);
case CheckChatUsernameResultPublicChatsTooMuch.CONSTRUCTOR:
return new CheckChatUsernameResultPublicChatsTooMuch(input);
case CheckChatUsernameResultPublicGroupsUnavailable.CONSTRUCTOR:
return new CheckChatUsernameResultPublicGroupsUnavailable(input);
case ConnectedWebsite.CONSTRUCTOR:
return new ConnectedWebsite(input);
case ConnectedWebsites.CONSTRUCTOR:
return new ConnectedWebsites(input);
case ConnectionStateWaitingForNetwork.CONSTRUCTOR:
return new ConnectionStateWaitingForNetwork(input);
case ConnectionStateConnectingToProxy.CONSTRUCTOR:
return new ConnectionStateConnectingToProxy(input);
case ConnectionStateConnecting.CONSTRUCTOR:
return new ConnectionStateConnecting(input);
case ConnectionStateUpdating.CONSTRUCTOR:
return new ConnectionStateUpdating(input);
case ConnectionStateReady.CONSTRUCTOR:
return new ConnectionStateReady(input);
case Contact.CONSTRUCTOR:
return new Contact(input);
case Count.CONSTRUCTOR:
return new Count(input);
case CustomRequestResult.CONSTRUCTOR:
return new CustomRequestResult(input);
case DatabaseStatistics.CONSTRUCTOR:
return new DatabaseStatistics(input);
case Date.CONSTRUCTOR:
return new Date(input);
case DateRange.CONSTRUCTOR:
return new DateRange(input);
case DatedFile.CONSTRUCTOR:
return new DatedFile(input);
case DeepLinkInfo.CONSTRUCTOR:
return new DeepLinkInfo(input);
case DeviceTokenFirebaseCloudMessaging.CONSTRUCTOR:
return new DeviceTokenFirebaseCloudMessaging(input);
case DeviceTokenApplePush.CONSTRUCTOR:
return new DeviceTokenApplePush(input);
case DeviceTokenApplePushVoIP.CONSTRUCTOR:
return new DeviceTokenApplePushVoIP(input);
case DeviceTokenWindowsPush.CONSTRUCTOR:
return new DeviceTokenWindowsPush(input);
case DeviceTokenMicrosoftPush.CONSTRUCTOR:
return new DeviceTokenMicrosoftPush(input);
case DeviceTokenMicrosoftPushVoIP.CONSTRUCTOR:
return new DeviceTokenMicrosoftPushVoIP(input);
case DeviceTokenWebPush.CONSTRUCTOR:
return new DeviceTokenWebPush(input);
case DeviceTokenSimplePush.CONSTRUCTOR:
return new DeviceTokenSimplePush(input);
case DeviceTokenUbuntuPush.CONSTRUCTOR:
return new DeviceTokenUbuntuPush(input);
case DeviceTokenBlackBerryPush.CONSTRUCTOR:
return new DeviceTokenBlackBerryPush(input);
case DeviceTokenTizenPush.CONSTRUCTOR:
return new DeviceTokenTizenPush(input);
case Document.CONSTRUCTOR:
return new Document(input);
case DraftMessage.CONSTRUCTOR:
return new DraftMessage(input);
case EmailAddressAuthenticationCodeInfo.CONSTRUCTOR:
return new EmailAddressAuthenticationCodeInfo(input);
case Emojis.CONSTRUCTOR:
return new Emojis(input);
case EncryptedCredentials.CONSTRUCTOR:
return new EncryptedCredentials(input);
case EncryptedPassportElement.CONSTRUCTOR:
return new EncryptedPassportElement(input);
case Error.CONSTRUCTOR:
return new Error(input);
case File.CONSTRUCTOR:
return new File(input);
case FilePart.CONSTRUCTOR:
return new FilePart(input);
case FileTypeNone.CONSTRUCTOR:
return new FileTypeNone(input);
case FileTypeAnimation.CONSTRUCTOR:
return new FileTypeAnimation(input);
case FileTypeAudio.CONSTRUCTOR:
return new FileTypeAudio(input);
case FileTypeDocument.CONSTRUCTOR:
return new FileTypeDocument(input);
case FileTypePhoto.CONSTRUCTOR:
return new FileTypePhoto(input);
case FileTypeProfilePhoto.CONSTRUCTOR:
return new FileTypeProfilePhoto(input);
case FileTypeSecret.CONSTRUCTOR:
return new FileTypeSecret(input);
case FileTypeSecretThumbnail.CONSTRUCTOR:
return new FileTypeSecretThumbnail(input);
case FileTypeSecure.CONSTRUCTOR:
return new FileTypeSecure(input);
case FileTypeSticker.CONSTRUCTOR:
return new FileTypeSticker(input);
case FileTypeThumbnail.CONSTRUCTOR:
return new FileTypeThumbnail(input);
case FileTypeUnknown.CONSTRUCTOR:
return new FileTypeUnknown(input);
case FileTypeVideo.CONSTRUCTOR:
return new FileTypeVideo(input);
case FileTypeVideoNote.CONSTRUCTOR:
return new FileTypeVideoNote(input);
case FileTypeVoiceNote.CONSTRUCTOR:
return new FileTypeVoiceNote(input);
case FileTypeWallpaper.CONSTRUCTOR:
return new FileTypeWallpaper(input);
case FormattedText.CONSTRUCTOR:
return new FormattedText(input);
case FoundMessages.CONSTRUCTOR:
return new FoundMessages(input);
case Game.CONSTRUCTOR:
return new Game(input);
case GameHighScore.CONSTRUCTOR:
return new GameHighScore(input);
case GameHighScores.CONSTRUCTOR:
return new GameHighScores(input);
case Hashtags.CONSTRUCTOR:
return new Hashtags(input);
case HttpUrl.CONSTRUCTOR:
return new HttpUrl(input);
case IdentityDocument.CONSTRUCTOR:
return new IdentityDocument(input);
case ImportedContacts.CONSTRUCTOR:
return new ImportedContacts(input);
case InlineKeyboardButton.CONSTRUCTOR:
return new InlineKeyboardButton(input);
case InlineKeyboardButtonTypeUrl.CONSTRUCTOR:
return new InlineKeyboardButtonTypeUrl(input);
case InlineKeyboardButtonTypeLoginUrl.CONSTRUCTOR:
return new InlineKeyboardButtonTypeLoginUrl(input);
case InlineKeyboardButtonTypeCallback.CONSTRUCTOR:
return new InlineKeyboardButtonTypeCallback(input);
case InlineKeyboardButtonTypeCallbackGame.CONSTRUCTOR:
return new InlineKeyboardButtonTypeCallbackGame(input);
case InlineKeyboardButtonTypeSwitchInline.CONSTRUCTOR:
return new InlineKeyboardButtonTypeSwitchInline(input);
case InlineKeyboardButtonTypeBuy.CONSTRUCTOR:
return new InlineKeyboardButtonTypeBuy(input);
case InlineQueryResultArticle.CONSTRUCTOR:
return new InlineQueryResultArticle(input);
case InlineQueryResultContact.CONSTRUCTOR:
return new InlineQueryResultContact(input);
case InlineQueryResultLocation.CONSTRUCTOR:
return new InlineQueryResultLocation(input);
case InlineQueryResultVenue.CONSTRUCTOR:
return new InlineQueryResultVenue(input);
case InlineQueryResultGame.CONSTRUCTOR:
return new InlineQueryResultGame(input);
case InlineQueryResultAnimation.CONSTRUCTOR:
return new InlineQueryResultAnimation(input);
case InlineQueryResultAudio.CONSTRUCTOR:
return new InlineQueryResultAudio(input);
case InlineQueryResultDocument.CONSTRUCTOR:
return new InlineQueryResultDocument(input);
case InlineQueryResultPhoto.CONSTRUCTOR:
return new InlineQueryResultPhoto(input);
case InlineQueryResultSticker.CONSTRUCTOR:
return new InlineQueryResultSticker(input);
case InlineQueryResultVideo.CONSTRUCTOR:
return new InlineQueryResultVideo(input);
case InlineQueryResultVoiceNote.CONSTRUCTOR:
return new InlineQueryResultVoiceNote(input);
case InlineQueryResults.CONSTRUCTOR:
return new InlineQueryResults(input);
case InputBackgroundLocal.CONSTRUCTOR:
return new InputBackgroundLocal(input);
case InputBackgroundRemote.CONSTRUCTOR:
return new InputBackgroundRemote(input);
case InputCredentialsSaved.CONSTRUCTOR:
return new InputCredentialsSaved(input);
case InputCredentialsNew.CONSTRUCTOR:
return new InputCredentialsNew(input);
case InputCredentialsAndroidPay.CONSTRUCTOR:
return new InputCredentialsAndroidPay(input);
case InputCredentialsApplePay.CONSTRUCTOR:
return new InputCredentialsApplePay(input);
case InputFileId.CONSTRUCTOR:
return new InputFileId(input);
case InputFileRemote.CONSTRUCTOR:
return new InputFileRemote(input);
case InputFileLocal.CONSTRUCTOR:
return new InputFileLocal(input);
case InputFileGenerated.CONSTRUCTOR:
return new InputFileGenerated(input);
case InputIdentityDocument.CONSTRUCTOR:
return new InputIdentityDocument(input);
case InputInlineQueryResultAnimatedGif.CONSTRUCTOR:
return new InputInlineQueryResultAnimatedGif(input);
case InputInlineQueryResultAnimatedMpeg4.CONSTRUCTOR:
return new InputInlineQueryResultAnimatedMpeg4(input);
case InputInlineQueryResultArticle.CONSTRUCTOR:
return new InputInlineQueryResultArticle(input);
case InputInlineQueryResultAudio.CONSTRUCTOR:
return new InputInlineQueryResultAudio(input);
case InputInlineQueryResultContact.CONSTRUCTOR:
return new InputInlineQueryResultContact(input);
case InputInlineQueryResultDocument.CONSTRUCTOR:
return new InputInlineQueryResultDocument(input);
case InputInlineQueryResultGame.CONSTRUCTOR:
return new InputInlineQueryResultGame(input);
case InputInlineQueryResultLocation.CONSTRUCTOR:
return new InputInlineQueryResultLocation(input);
case InputInlineQueryResultPhoto.CONSTRUCTOR:
return new InputInlineQueryResultPhoto(input);
case InputInlineQueryResultSticker.CONSTRUCTOR:
return new InputInlineQueryResultSticker(input);
case InputInlineQueryResultVenue.CONSTRUCTOR:
return new InputInlineQueryResultVenue(input);
case InputInlineQueryResultVideo.CONSTRUCTOR:
return new InputInlineQueryResultVideo(input);
case InputInlineQueryResultVoiceNote.CONSTRUCTOR:
return new InputInlineQueryResultVoiceNote(input);
case InputMessageText.CONSTRUCTOR:
return new InputMessageText(input);
case InputMessageAnimation.CONSTRUCTOR:
return new InputMessageAnimation(input);
case InputMessageAudio.CONSTRUCTOR:
return new InputMessageAudio(input);
case InputMessageDocument.CONSTRUCTOR:
return new InputMessageDocument(input);
case InputMessagePhoto.CONSTRUCTOR:
return new InputMessagePhoto(input);
case InputMessageSticker.CONSTRUCTOR:
return new InputMessageSticker(input);
case InputMessageVideo.CONSTRUCTOR:
return new InputMessageVideo(input);
case InputMessageVideoNote.CONSTRUCTOR:
return new InputMessageVideoNote(input);
case InputMessageVoiceNote.CONSTRUCTOR:
return new InputMessageVoiceNote(input);
case InputMessageLocation.CONSTRUCTOR:
return new InputMessageLocation(input);
case InputMessageVenue.CONSTRUCTOR:
return new InputMessageVenue(input);
case InputMessageContact.CONSTRUCTOR:
return new InputMessageContact(input);
case InputMessageDice.CONSTRUCTOR:
return new InputMessageDice(input);
case InputMessageGame.CONSTRUCTOR:
return new InputMessageGame(input);
case InputMessageInvoice.CONSTRUCTOR:
return new InputMessageInvoice(input);
case InputMessagePoll.CONSTRUCTOR:
return new InputMessagePoll(input);
case InputMessageForwarded.CONSTRUCTOR:
return new InputMessageForwarded(input);
case InputPassportElementPersonalDetails.CONSTRUCTOR:
return new InputPassportElementPersonalDetails(input);
case InputPassportElementPassport.CONSTRUCTOR:
return new InputPassportElementPassport(input);
case InputPassportElementDriverLicense.CONSTRUCTOR:
return new InputPassportElementDriverLicense(input);
case InputPassportElementIdentityCard.CONSTRUCTOR:
return new InputPassportElementIdentityCard(input);
case InputPassportElementInternalPassport.CONSTRUCTOR:
return new InputPassportElementInternalPassport(input);
case InputPassportElementAddress.CONSTRUCTOR:
return new InputPassportElementAddress(input);
case InputPassportElementUtilityBill.CONSTRUCTOR:
return new InputPassportElementUtilityBill(input);
case InputPassportElementBankStatement.CONSTRUCTOR:
return new InputPassportElementBankStatement(input);
case InputPassportElementRentalAgreement.CONSTRUCTOR:
return new InputPassportElementRentalAgreement(input);
case InputPassportElementPassportRegistration.CONSTRUCTOR:
return new InputPassportElementPassportRegistration(input);
case InputPassportElementTemporaryRegistration.CONSTRUCTOR:
return new InputPassportElementTemporaryRegistration(input);
case InputPassportElementPhoneNumber.CONSTRUCTOR:
return new InputPassportElementPhoneNumber(input);
case InputPassportElementEmailAddress.CONSTRUCTOR:
return new InputPassportElementEmailAddress(input);
case InputPassportElementError.CONSTRUCTOR:
return new InputPassportElementError(input);
case InputPassportElementErrorSourceUnspecified.CONSTRUCTOR:
return new InputPassportElementErrorSourceUnspecified(input);
case InputPassportElementErrorSourceDataField.CONSTRUCTOR:
return new InputPassportElementErrorSourceDataField(input);
case InputPassportElementErrorSourceFrontSide.CONSTRUCTOR:
return new InputPassportElementErrorSourceFrontSide(input);
case InputPassportElementErrorSourceReverseSide.CONSTRUCTOR:
return new InputPassportElementErrorSourceReverseSide(input);
case InputPassportElementErrorSourceSelfie.CONSTRUCTOR:
return new InputPassportElementErrorSourceSelfie(input);
case InputPassportElementErrorSourceTranslationFile.CONSTRUCTOR:
return new InputPassportElementErrorSourceTranslationFile(input);
case InputPassportElementErrorSourceTranslationFiles.CONSTRUCTOR:
return new InputPassportElementErrorSourceTranslationFiles(input);
case InputPassportElementErrorSourceFile.CONSTRUCTOR:
return new InputPassportElementErrorSourceFile(input);
case InputPassportElementErrorSourceFiles.CONSTRUCTOR:
return new InputPassportElementErrorSourceFiles(input);
case InputPersonalDocument.CONSTRUCTOR:
return new InputPersonalDocument(input);
case InputStickerStatic.CONSTRUCTOR:
return new InputStickerStatic(input);
case InputStickerAnimated.CONSTRUCTOR:
return new InputStickerAnimated(input);
case InputThumbnail.CONSTRUCTOR:
return new InputThumbnail(input);
case Invoice.CONSTRUCTOR:
return new Invoice(input);
case JsonObjectMember.CONSTRUCTOR:
return new JsonObjectMember(input);
case JsonValueNull.CONSTRUCTOR:
return new JsonValueNull(input);
case JsonValueBoolean.CONSTRUCTOR:
return new JsonValueBoolean(input);
case JsonValueNumber.CONSTRUCTOR:
return new JsonValueNumber(input);
case JsonValueString.CONSTRUCTOR:
return new JsonValueString(input);
case JsonValueArray.CONSTRUCTOR:
return new JsonValueArray(input);
case JsonValueObject.CONSTRUCTOR:
return new JsonValueObject(input);
case KeyboardButton.CONSTRUCTOR:
return new KeyboardButton(input);
case KeyboardButtonTypeText.CONSTRUCTOR:
return new KeyboardButtonTypeText(input);
case KeyboardButtonTypeRequestPhoneNumber.CONSTRUCTOR:
return new KeyboardButtonTypeRequestPhoneNumber(input);
case KeyboardButtonTypeRequestLocation.CONSTRUCTOR:
return new KeyboardButtonTypeRequestLocation(input);
case KeyboardButtonTypeRequestPoll.CONSTRUCTOR:
return new KeyboardButtonTypeRequestPoll(input);
case LabeledPricePart.CONSTRUCTOR:
return new LabeledPricePart(input);
case LanguagePackInfo.CONSTRUCTOR:
return new LanguagePackInfo(input);
case LanguagePackString.CONSTRUCTOR:
return new LanguagePackString(input);
case LanguagePackStringValueOrdinary.CONSTRUCTOR:
return new LanguagePackStringValueOrdinary(input);
case LanguagePackStringValuePluralized.CONSTRUCTOR:
return new LanguagePackStringValuePluralized(input);
case LanguagePackStringValueDeleted.CONSTRUCTOR:
return new LanguagePackStringValueDeleted(input);
case LanguagePackStrings.CONSTRUCTOR:
return new LanguagePackStrings(input);
case LocalFile.CONSTRUCTOR:
return new LocalFile(input);
case LocalizationTargetInfo.CONSTRUCTOR:
return new LocalizationTargetInfo(input);
case Location.CONSTRUCTOR:
return new Location(input);
case LogStreamDefault.CONSTRUCTOR:
return new LogStreamDefault(input);
case LogStreamFile.CONSTRUCTOR:
return new LogStreamFile(input);
case LogStreamEmpty.CONSTRUCTOR:
return new LogStreamEmpty(input);
case LogTags.CONSTRUCTOR:
return new LogTags(input);
case LogVerbosityLevel.CONSTRUCTOR:
return new LogVerbosityLevel(input);
case LoginUrlInfoOpen.CONSTRUCTOR:
return new LoginUrlInfoOpen(input);
case LoginUrlInfoRequestConfirmation.CONSTRUCTOR:
return new LoginUrlInfoRequestConfirmation(input);
case MaskPointForehead.CONSTRUCTOR:
return new MaskPointForehead(input);
case MaskPointEyes.CONSTRUCTOR:
return new MaskPointEyes(input);
case MaskPointMouth.CONSTRUCTOR:
return new MaskPointMouth(input);
case MaskPointChin.CONSTRUCTOR:
return new MaskPointChin(input);
case MaskPosition.CONSTRUCTOR:
return new MaskPosition(input);
case Message.CONSTRUCTOR:
return new Message(input);
case MessageText.CONSTRUCTOR:
return new MessageText(input);
case MessageAnimation.CONSTRUCTOR:
return new MessageAnimation(input);
case MessageAudio.CONSTRUCTOR:
return new MessageAudio(input);
case MessageDocument.CONSTRUCTOR:
return new MessageDocument(input);
case MessagePhoto.CONSTRUCTOR:
return new MessagePhoto(input);
case MessageExpiredPhoto.CONSTRUCTOR:
return new MessageExpiredPhoto(input);
case MessageSticker.CONSTRUCTOR:
return new MessageSticker(input);
case MessageVideo.CONSTRUCTOR:
return new MessageVideo(input);
case MessageExpiredVideo.CONSTRUCTOR:
return new MessageExpiredVideo(input);
case MessageVideoNote.CONSTRUCTOR:
return new MessageVideoNote(input);
case MessageVoiceNote.CONSTRUCTOR:
return new MessageVoiceNote(input);
case MessageLocation.CONSTRUCTOR:
return new MessageLocation(input);
case MessageVenue.CONSTRUCTOR:
return new MessageVenue(input);
case MessageContact.CONSTRUCTOR:
return new MessageContact(input);
case MessageDice.CONSTRUCTOR:
return new MessageDice(input);
case MessageGame.CONSTRUCTOR:
return new MessageGame(input);
case MessagePoll.CONSTRUCTOR:
return new MessagePoll(input);
case MessageInvoice.CONSTRUCTOR:
return new MessageInvoice(input);
case MessageCall.CONSTRUCTOR:
return new MessageCall(input);
case MessageBasicGroupChatCreate.CONSTRUCTOR:
return new MessageBasicGroupChatCreate(input);
case MessageSupergroupChatCreate.CONSTRUCTOR:
return new MessageSupergroupChatCreate(input);
case MessageChatChangeTitle.CONSTRUCTOR:
return new MessageChatChangeTitle(input);
case MessageChatChangePhoto.CONSTRUCTOR:
return new MessageChatChangePhoto(input);
case MessageChatDeletePhoto.CONSTRUCTOR:
return new MessageChatDeletePhoto(input);
case MessageChatAddMembers.CONSTRUCTOR:
return new MessageChatAddMembers(input);
case MessageChatJoinByLink.CONSTRUCTOR:
return new MessageChatJoinByLink(input);
case MessageChatDeleteMember.CONSTRUCTOR:
return new MessageChatDeleteMember(input);
case MessageChatUpgradeTo.CONSTRUCTOR:
return new MessageChatUpgradeTo(input);
case MessageChatUpgradeFrom.CONSTRUCTOR:
return new MessageChatUpgradeFrom(input);
case MessagePinMessage.CONSTRUCTOR:
return new MessagePinMessage(input);
case MessageScreenshotTaken.CONSTRUCTOR:
return new MessageScreenshotTaken(input);
case MessageChatSetTtl.CONSTRUCTOR:
return new MessageChatSetTtl(input);
case MessageCustomServiceAction.CONSTRUCTOR:
return new MessageCustomServiceAction(input);
case MessageGameScore.CONSTRUCTOR:
return new MessageGameScore(input);
case MessagePaymentSuccessful.CONSTRUCTOR:
return new MessagePaymentSuccessful(input);
case MessagePaymentSuccessfulBot.CONSTRUCTOR:
return new MessagePaymentSuccessfulBot(input);
case MessageContactRegistered.CONSTRUCTOR:
return new MessageContactRegistered(input);
case MessageWebsiteConnected.CONSTRUCTOR:
return new MessageWebsiteConnected(input);
case MessagePassportDataSent.CONSTRUCTOR:
return new MessagePassportDataSent(input);
case MessagePassportDataReceived.CONSTRUCTOR:
return new MessagePassportDataReceived(input);
case MessageUnsupported.CONSTRUCTOR:
return new MessageUnsupported(input);
case MessageForwardInfo.CONSTRUCTOR:
return new MessageForwardInfo(input);
case MessageForwardOriginUser.CONSTRUCTOR:
return new MessageForwardOriginUser(input);
case MessageForwardOriginHiddenUser.CONSTRUCTOR:
return new MessageForwardOriginHiddenUser(input);
case MessageForwardOriginChannel.CONSTRUCTOR:
return new MessageForwardOriginChannel(input);
case MessageLinkInfo.CONSTRUCTOR:
return new MessageLinkInfo(input);
case MessageSchedulingStateSendAtDate.CONSTRUCTOR:
return new MessageSchedulingStateSendAtDate(input);
case MessageSchedulingStateSendWhenOnline.CONSTRUCTOR:
return new MessageSchedulingStateSendWhenOnline(input);
case MessageSendingStatePending.CONSTRUCTOR:
return new MessageSendingStatePending(input);
case MessageSendingStateFailed.CONSTRUCTOR:
return new MessageSendingStateFailed(input);
case Messages.CONSTRUCTOR:
return new Messages(input);
case Minithumbnail.CONSTRUCTOR:
return new Minithumbnail(input);
case NetworkStatistics.CONSTRUCTOR:
return new NetworkStatistics(input);
case NetworkStatisticsEntryFile.CONSTRUCTOR:
return new NetworkStatisticsEntryFile(input);
case NetworkStatisticsEntryCall.CONSTRUCTOR:
return new NetworkStatisticsEntryCall(input);
case NetworkTypeNone.CONSTRUCTOR:
return new NetworkTypeNone(input);
case NetworkTypeMobile.CONSTRUCTOR:
return new NetworkTypeMobile(input);
case NetworkTypeMobileRoaming.CONSTRUCTOR:
return new NetworkTypeMobileRoaming(input);
case NetworkTypeWiFi.CONSTRUCTOR:
return new NetworkTypeWiFi(input);
case NetworkTypeOther.CONSTRUCTOR:
return new NetworkTypeOther(input);
case Notification.CONSTRUCTOR:
return new Notification(input);
case NotificationGroup.CONSTRUCTOR:
return new NotificationGroup(input);
case NotificationGroupTypeMessages.CONSTRUCTOR:
return new NotificationGroupTypeMessages(input);
case NotificationGroupTypeMentions.CONSTRUCTOR:
return new NotificationGroupTypeMentions(input);
case NotificationGroupTypeSecretChat.CONSTRUCTOR:
return new NotificationGroupTypeSecretChat(input);
case NotificationGroupTypeCalls.CONSTRUCTOR:
return new NotificationGroupTypeCalls(input);
case NotificationSettingsScopePrivateChats.CONSTRUCTOR:
return new NotificationSettingsScopePrivateChats(input);
case NotificationSettingsScopeGroupChats.CONSTRUCTOR:
return new NotificationSettingsScopeGroupChats(input);
case NotificationSettingsScopeChannelChats.CONSTRUCTOR:
return new NotificationSettingsScopeChannelChats(input);
case NotificationTypeNewMessage.CONSTRUCTOR:
return new NotificationTypeNewMessage(input);
case NotificationTypeNewSecretChat.CONSTRUCTOR:
return new NotificationTypeNewSecretChat(input);
case NotificationTypeNewCall.CONSTRUCTOR:
return new NotificationTypeNewCall(input);
case NotificationTypeNewPushMessage.CONSTRUCTOR:
return new NotificationTypeNewPushMessage(input);
case Ok.CONSTRUCTOR:
return new Ok(input);
case OptionValueBoolean.CONSTRUCTOR:
return new OptionValueBoolean(input);
case OptionValueEmpty.CONSTRUCTOR:
return new OptionValueEmpty(input);
case OptionValueInteger.CONSTRUCTOR:
return new OptionValueInteger(input);
case OptionValueString.CONSTRUCTOR:
return new OptionValueString(input);
case OrderInfo.CONSTRUCTOR:
return new OrderInfo(input);
case PageBlockTitle.CONSTRUCTOR:
return new PageBlockTitle(input);
case PageBlockSubtitle.CONSTRUCTOR:
return new PageBlockSubtitle(input);
case PageBlockAuthorDate.CONSTRUCTOR:
return new PageBlockAuthorDate(input);
case PageBlockHeader.CONSTRUCTOR:
return new PageBlockHeader(input);
case PageBlockSubheader.CONSTRUCTOR:
return new PageBlockSubheader(input);
case PageBlockKicker.CONSTRUCTOR:
return new PageBlockKicker(input);
case PageBlockParagraph.CONSTRUCTOR:
return new PageBlockParagraph(input);
case PageBlockPreformatted.CONSTRUCTOR:
return new PageBlockPreformatted(input);
case PageBlockFooter.CONSTRUCTOR:
return new PageBlockFooter(input);
case PageBlockDivider.CONSTRUCTOR:
return new PageBlockDivider(input);
case PageBlockAnchor.CONSTRUCTOR:
return new PageBlockAnchor(input);
case PageBlockList.CONSTRUCTOR:
return new PageBlockList(input);
case PageBlockBlockQuote.CONSTRUCTOR:
return new PageBlockBlockQuote(input);
case PageBlockPullQuote.CONSTRUCTOR:
return new PageBlockPullQuote(input);
case PageBlockAnimation.CONSTRUCTOR:
return new PageBlockAnimation(input);
case PageBlockAudio.CONSTRUCTOR:
return new PageBlockAudio(input);
case PageBlockPhoto.CONSTRUCTOR:
return new PageBlockPhoto(input);
case PageBlockVideo.CONSTRUCTOR:
return new PageBlockVideo(input);
case PageBlockVoiceNote.CONSTRUCTOR:
return new PageBlockVoiceNote(input);
case PageBlockCover.CONSTRUCTOR:
return new PageBlockCover(input);
case PageBlockEmbedded.CONSTRUCTOR:
return new PageBlockEmbedded(input);
case PageBlockEmbeddedPost.CONSTRUCTOR:
return new PageBlockEmbeddedPost(input);
case PageBlockCollage.CONSTRUCTOR:
return new PageBlockCollage(input);
case PageBlockSlideshow.CONSTRUCTOR:
return new PageBlockSlideshow(input);
case PageBlockChatLink.CONSTRUCTOR:
return new PageBlockChatLink(input);
case PageBlockTable.CONSTRUCTOR:
return new PageBlockTable(input);
case PageBlockDetails.CONSTRUCTOR:
return new PageBlockDetails(input);
case PageBlockRelatedArticles.CONSTRUCTOR:
return new PageBlockRelatedArticles(input);
case PageBlockMap.CONSTRUCTOR:
return new PageBlockMap(input);
case PageBlockCaption.CONSTRUCTOR:
return new PageBlockCaption(input);
case PageBlockHorizontalAlignmentLeft.CONSTRUCTOR:
return new PageBlockHorizontalAlignmentLeft(input);
case PageBlockHorizontalAlignmentCenter.CONSTRUCTOR:
return new PageBlockHorizontalAlignmentCenter(input);
case PageBlockHorizontalAlignmentRight.CONSTRUCTOR:
return new PageBlockHorizontalAlignmentRight(input);
case PageBlockListItem.CONSTRUCTOR:
return new PageBlockListItem(input);
case PageBlockRelatedArticle.CONSTRUCTOR:
return new PageBlockRelatedArticle(input);
case PageBlockTableCell.CONSTRUCTOR:
return new PageBlockTableCell(input);
case PageBlockVerticalAlignmentTop.CONSTRUCTOR:
return new PageBlockVerticalAlignmentTop(input);
case PageBlockVerticalAlignmentMiddle.CONSTRUCTOR:
return new PageBlockVerticalAlignmentMiddle(input);
case PageBlockVerticalAlignmentBottom.CONSTRUCTOR:
return new PageBlockVerticalAlignmentBottom(input);
case PassportAuthorizationForm.CONSTRUCTOR:
return new PassportAuthorizationForm(input);
case PassportElementPersonalDetails.CONSTRUCTOR:
return new PassportElementPersonalDetails(input);
case PassportElementPassport.CONSTRUCTOR:
return new PassportElementPassport(input);
case PassportElementDriverLicense.CONSTRUCTOR:
return new PassportElementDriverLicense(input);
case PassportElementIdentityCard.CONSTRUCTOR:
return new PassportElementIdentityCard(input);
case PassportElementInternalPassport.CONSTRUCTOR:
return new PassportElementInternalPassport(input);
case PassportElementAddress.CONSTRUCTOR:
return new PassportElementAddress(input);
case PassportElementUtilityBill.CONSTRUCTOR:
return new PassportElementUtilityBill(input);
case PassportElementBankStatement.CONSTRUCTOR:
return new PassportElementBankStatement(input);
case PassportElementRentalAgreement.CONSTRUCTOR:
return new PassportElementRentalAgreement(input);
case PassportElementPassportRegistration.CONSTRUCTOR:
return new PassportElementPassportRegistration(input);
case PassportElementTemporaryRegistration.CONSTRUCTOR:
return new PassportElementTemporaryRegistration(input);
case PassportElementPhoneNumber.CONSTRUCTOR:
return new PassportElementPhoneNumber(input);
case PassportElementEmailAddress.CONSTRUCTOR:
return new PassportElementEmailAddress(input);
case PassportElementError.CONSTRUCTOR:
return new PassportElementError(input);
case PassportElementErrorSourceUnspecified.CONSTRUCTOR:
return new PassportElementErrorSourceUnspecified(input);
case PassportElementErrorSourceDataField.CONSTRUCTOR:
return new PassportElementErrorSourceDataField(input);
case PassportElementErrorSourceFrontSide.CONSTRUCTOR:
return new PassportElementErrorSourceFrontSide(input);
case PassportElementErrorSourceReverseSide.CONSTRUCTOR:
return new PassportElementErrorSourceReverseSide(input);
case PassportElementErrorSourceSelfie.CONSTRUCTOR:
return new PassportElementErrorSourceSelfie(input);
case PassportElementErrorSourceTranslationFile.CONSTRUCTOR:
return new PassportElementErrorSourceTranslationFile(input);
case PassportElementErrorSourceTranslationFiles.CONSTRUCTOR:
return new PassportElementErrorSourceTranslationFiles(input);
case PassportElementErrorSourceFile.CONSTRUCTOR:
return new PassportElementErrorSourceFile(input);
case PassportElementErrorSourceFiles.CONSTRUCTOR:
return new PassportElementErrorSourceFiles(input);
case PassportElementTypePersonalDetails.CONSTRUCTOR:
return new PassportElementTypePersonalDetails(input);
case PassportElementTypePassport.CONSTRUCTOR:
return new PassportElementTypePassport(input);
case PassportElementTypeDriverLicense.CONSTRUCTOR:
return new PassportElementTypeDriverLicense(input);
case PassportElementTypeIdentityCard.CONSTRUCTOR:
return new PassportElementTypeIdentityCard(input);
case PassportElementTypeInternalPassport.CONSTRUCTOR:
return new PassportElementTypeInternalPassport(input);
case PassportElementTypeAddress.CONSTRUCTOR:
return new PassportElementTypeAddress(input);
case PassportElementTypeUtilityBill.CONSTRUCTOR:
return new PassportElementTypeUtilityBill(input);
case PassportElementTypeBankStatement.CONSTRUCTOR:
return new PassportElementTypeBankStatement(input);
case PassportElementTypeRentalAgreement.CONSTRUCTOR:
return new PassportElementTypeRentalAgreement(input);
case PassportElementTypePassportRegistration.CONSTRUCTOR:
return new PassportElementTypePassportRegistration(input);
case PassportElementTypeTemporaryRegistration.CONSTRUCTOR:
return new PassportElementTypeTemporaryRegistration(input);
case PassportElementTypePhoneNumber.CONSTRUCTOR:
return new PassportElementTypePhoneNumber(input);
case PassportElementTypeEmailAddress.CONSTRUCTOR:
return new PassportElementTypeEmailAddress(input);
case PassportElements.CONSTRUCTOR:
return new PassportElements(input);
case PassportElementsWithErrors.CONSTRUCTOR:
return new PassportElementsWithErrors(input);
case PassportRequiredElement.CONSTRUCTOR:
return new PassportRequiredElement(input);
case PassportSuitableElement.CONSTRUCTOR:
return new PassportSuitableElement(input);
case PasswordState.CONSTRUCTOR:
return new PasswordState(input);
case PaymentForm.CONSTRUCTOR:
return new PaymentForm(input);
case PaymentReceipt.CONSTRUCTOR:
return new PaymentReceipt(input);
case PaymentResult.CONSTRUCTOR:
return new PaymentResult(input);
case PaymentsProviderStripe.CONSTRUCTOR:
return new PaymentsProviderStripe(input);
case PersonalDetails.CONSTRUCTOR:
return new PersonalDetails(input);
case PersonalDocument.CONSTRUCTOR:
return new PersonalDocument(input);
case PhoneNumberAuthenticationSettings.CONSTRUCTOR:
return new PhoneNumberAuthenticationSettings(input);
case Photo.CONSTRUCTOR:
return new Photo(input);
case PhotoSize.CONSTRUCTOR:
return new PhotoSize(input);
case Poll.CONSTRUCTOR:
return new Poll(input);
case PollOption.CONSTRUCTOR:
return new PollOption(input);
case PollTypeRegular.CONSTRUCTOR:
return new PollTypeRegular(input);
case PollTypeQuiz.CONSTRUCTOR:
return new PollTypeQuiz(input);
case ProfilePhoto.CONSTRUCTOR:
return new ProfilePhoto(input);
case Proxies.CONSTRUCTOR:
return new Proxies(input);
case Proxy.CONSTRUCTOR:
return new Proxy(input);
case ProxyTypeSocks5.CONSTRUCTOR:
return new ProxyTypeSocks5(input);
case ProxyTypeHttp.CONSTRUCTOR:
return new ProxyTypeHttp(input);
case ProxyTypeMtproto.CONSTRUCTOR:
return new ProxyTypeMtproto(input);
case PublicChatTypeHasUsername.CONSTRUCTOR:
return new PublicChatTypeHasUsername(input);
case PublicChatTypeIsLocationBased.CONSTRUCTOR:
return new PublicChatTypeIsLocationBased(input);
case PublicMessageLink.CONSTRUCTOR:
return new PublicMessageLink(input);
case PushMessageContentHidden.CONSTRUCTOR:
return new PushMessageContentHidden(input);
case PushMessageContentAnimation.CONSTRUCTOR:
return new PushMessageContentAnimation(input);
case PushMessageContentAudio.CONSTRUCTOR:
return new PushMessageContentAudio(input);
case PushMessageContentContact.CONSTRUCTOR:
return new PushMessageContentContact(input);
case PushMessageContentContactRegistered.CONSTRUCTOR:
return new PushMessageContentContactRegistered(input);
case PushMessageContentDocument.CONSTRUCTOR:
return new PushMessageContentDocument(input);
case PushMessageContentGame.CONSTRUCTOR:
return new PushMessageContentGame(input);
case PushMessageContentGameScore.CONSTRUCTOR:
return new PushMessageContentGameScore(input);
case PushMessageContentInvoice.CONSTRUCTOR:
return new PushMessageContentInvoice(input);
case PushMessageContentLocation.CONSTRUCTOR:
return new PushMessageContentLocation(input);
case PushMessageContentPhoto.CONSTRUCTOR:
return new PushMessageContentPhoto(input);
case PushMessageContentPoll.CONSTRUCTOR:
return new PushMessageContentPoll(input);
case PushMessageContentScreenshotTaken.CONSTRUCTOR:
return new PushMessageContentScreenshotTaken(input);
case PushMessageContentSticker.CONSTRUCTOR:
return new PushMessageContentSticker(input);
case PushMessageContentText.CONSTRUCTOR:
return new PushMessageContentText(input);
case PushMessageContentVideo.CONSTRUCTOR:
return new PushMessageContentVideo(input);
case PushMessageContentVideoNote.CONSTRUCTOR:
return new PushMessageContentVideoNote(input);
case PushMessageContentVoiceNote.CONSTRUCTOR:
return new PushMessageContentVoiceNote(input);
case PushMessageContentBasicGroupChatCreate.CONSTRUCTOR:
return new PushMessageContentBasicGroupChatCreate(input);
case PushMessageContentChatAddMembers.CONSTRUCTOR:
return new PushMessageContentChatAddMembers(input);
case PushMessageContentChatChangePhoto.CONSTRUCTOR:
return new PushMessageContentChatChangePhoto(input);
case PushMessageContentChatChangeTitle.CONSTRUCTOR:
return new PushMessageContentChatChangeTitle(input);
case PushMessageContentChatDeleteMember.CONSTRUCTOR:
return new PushMessageContentChatDeleteMember(input);
case PushMessageContentChatJoinByLink.CONSTRUCTOR:
return new PushMessageContentChatJoinByLink(input);
case PushMessageContentMessageForwards.CONSTRUCTOR:
return new PushMessageContentMessageForwards(input);
case PushMessageContentMediaAlbum.CONSTRUCTOR:
return new PushMessageContentMediaAlbum(input);
case PushReceiverId.CONSTRUCTOR:
return new PushReceiverId(input);
case RecoveryEmailAddress.CONSTRUCTOR:
return new RecoveryEmailAddress(input);
case RemoteFile.CONSTRUCTOR:
return new RemoteFile(input);
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
return new ReplyMarkupRemoveKeyboard(input);
case ReplyMarkupForceReply.CONSTRUCTOR:
return new ReplyMarkupForceReply(input);
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
return new ReplyMarkupShowKeyboard(input);
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
return new ReplyMarkupInlineKeyboard(input);
case RichTextPlain.CONSTRUCTOR:
return new RichTextPlain(input);
case RichTextBold.CONSTRUCTOR:
return new RichTextBold(input);
case RichTextItalic.CONSTRUCTOR:
return new RichTextItalic(input);
case RichTextUnderline.CONSTRUCTOR:
return new RichTextUnderline(input);
case RichTextStrikethrough.CONSTRUCTOR:
return new RichTextStrikethrough(input);
case RichTextFixed.CONSTRUCTOR:
return new RichTextFixed(input);
case RichTextUrl.CONSTRUCTOR:
return new RichTextUrl(input);
case RichTextEmailAddress.CONSTRUCTOR:
return new RichTextEmailAddress(input);
case RichTextSubscript.CONSTRUCTOR:
return new RichTextSubscript(input);
case RichTextSuperscript.CONSTRUCTOR:
return new RichTextSuperscript(input);
case RichTextMarked.CONSTRUCTOR:
return new RichTextMarked(input);
case RichTextPhoneNumber.CONSTRUCTOR:
return new RichTextPhoneNumber(input);
case RichTextIcon.CONSTRUCTOR:
return new RichTextIcon(input);
case RichTextReference.CONSTRUCTOR:
return new RichTextReference(input);
case RichTextAnchor.CONSTRUCTOR:
return new RichTextAnchor(input);
case RichTextAnchorLink.CONSTRUCTOR:
return new RichTextAnchorLink(input);
case RichTexts.CONSTRUCTOR:
return new RichTexts(input);
case SavedCredentials.CONSTRUCTOR:
return new SavedCredentials(input);
case ScopeNotificationSettings.CONSTRUCTOR:
return new ScopeNotificationSettings(input);
case SearchMessagesFilterEmpty.CONSTRUCTOR:
return new SearchMessagesFilterEmpty(input);
case SearchMessagesFilterAnimation.CONSTRUCTOR:
return new SearchMessagesFilterAnimation(input);
case SearchMessagesFilterAudio.CONSTRUCTOR:
return new SearchMessagesFilterAudio(input);
case SearchMessagesFilterDocument.CONSTRUCTOR:
return new SearchMessagesFilterDocument(input);
case SearchMessagesFilterPhoto.CONSTRUCTOR:
return new SearchMessagesFilterPhoto(input);
case SearchMessagesFilterVideo.CONSTRUCTOR:
return new SearchMessagesFilterVideo(input);
case SearchMessagesFilterVoiceNote.CONSTRUCTOR:
return new SearchMessagesFilterVoiceNote(input);
case SearchMessagesFilterPhotoAndVideo.CONSTRUCTOR:
return new SearchMessagesFilterPhotoAndVideo(input);
case SearchMessagesFilterUrl.CONSTRUCTOR:
return new SearchMessagesFilterUrl(input);
case SearchMessagesFilterChatPhoto.CONSTRUCTOR:
return new SearchMessagesFilterChatPhoto(input);
case SearchMessagesFilterCall.CONSTRUCTOR:
return new SearchMessagesFilterCall(input);
case SearchMessagesFilterMissedCall.CONSTRUCTOR:
return new SearchMessagesFilterMissedCall(input);
case SearchMessagesFilterVideoNote.CONSTRUCTOR:
return new SearchMessagesFilterVideoNote(input);
case SearchMessagesFilterVoiceAndVideoNote.CONSTRUCTOR:
return new SearchMessagesFilterVoiceAndVideoNote(input);
case SearchMessagesFilterMention.CONSTRUCTOR:
return new SearchMessagesFilterMention(input);
case SearchMessagesFilterUnreadMention.CONSTRUCTOR:
return new SearchMessagesFilterUnreadMention(input);
case Seconds.CONSTRUCTOR:
return new Seconds(input);
case SecretChat.CONSTRUCTOR:
return new SecretChat(input);
case SecretChatStatePending.CONSTRUCTOR:
return new SecretChatStatePending(input);
case SecretChatStateReady.CONSTRUCTOR:
return new SecretChatStateReady(input);
case SecretChatStateClosed.CONSTRUCTOR:
return new SecretChatStateClosed(input);
case SendMessageOptions.CONSTRUCTOR:
return new SendMessageOptions(input);
case Session.CONSTRUCTOR:
return new Session(input);
case Sessions.CONSTRUCTOR:
return new Sessions(input);
case ShippingOption.CONSTRUCTOR:
return new ShippingOption(input);
case StatisticsGraphData.CONSTRUCTOR:
return new StatisticsGraphData(input);
case StatisticsGraphAsync.CONSTRUCTOR:
return new StatisticsGraphAsync(input);
case StatisticsGraphError.CONSTRUCTOR:
return new StatisticsGraphError(input);
case StatisticsValue.CONSTRUCTOR:
return new StatisticsValue(input);
case Sticker.CONSTRUCTOR:
return new Sticker(input);
case StickerSet.CONSTRUCTOR:
return new StickerSet(input);
case StickerSetInfo.CONSTRUCTOR:
return new StickerSetInfo(input);
case StickerSets.CONSTRUCTOR:
return new StickerSets(input);
case Stickers.CONSTRUCTOR:
return new Stickers(input);
case StorageStatistics.CONSTRUCTOR:
return new StorageStatistics(input);
case StorageStatisticsByChat.CONSTRUCTOR:
return new StorageStatisticsByChat(input);
case StorageStatisticsByFileType.CONSTRUCTOR:
return new StorageStatisticsByFileType(input);
case StorageStatisticsFast.CONSTRUCTOR:
return new StorageStatisticsFast(input);
case Supergroup.CONSTRUCTOR:
return new Supergroup(input);
case SupergroupFullInfo.CONSTRUCTOR:
return new SupergroupFullInfo(input);
case SupergroupMembersFilterRecent.CONSTRUCTOR:
return new SupergroupMembersFilterRecent(input);
case SupergroupMembersFilterContacts.CONSTRUCTOR:
return new SupergroupMembersFilterContacts(input);
case SupergroupMembersFilterAdministrators.CONSTRUCTOR:
return new SupergroupMembersFilterAdministrators(input);
case SupergroupMembersFilterSearch.CONSTRUCTOR:
return new SupergroupMembersFilterSearch(input);
case SupergroupMembersFilterRestricted.CONSTRUCTOR:
return new SupergroupMembersFilterRestricted(input);
case SupergroupMembersFilterBanned.CONSTRUCTOR:
return new SupergroupMembersFilterBanned(input);
case SupergroupMembersFilterBots.CONSTRUCTOR:
return new SupergroupMembersFilterBots(input);
case TMeUrl.CONSTRUCTOR:
return new TMeUrl(input);
case TMeUrlTypeUser.CONSTRUCTOR:
return new TMeUrlTypeUser(input);
case TMeUrlTypeSupergroup.CONSTRUCTOR:
return new TMeUrlTypeSupergroup(input);
case TMeUrlTypeChatInvite.CONSTRUCTOR:
return new TMeUrlTypeChatInvite(input);
case TMeUrlTypeStickerSet.CONSTRUCTOR:
return new TMeUrlTypeStickerSet(input);
case TMeUrls.CONSTRUCTOR:
return new TMeUrls(input);
case TdlibParameters.CONSTRUCTOR:
return new TdlibParameters(input);
case TemporaryPasswordState.CONSTRUCTOR:
return new TemporaryPasswordState(input);
case TermsOfService.CONSTRUCTOR:
return new TermsOfService(input);
case TestBytes.CONSTRUCTOR:
return new TestBytes(input);
case TestInt.CONSTRUCTOR:
return new TestInt(input);
case TestString.CONSTRUCTOR:
return new TestString(input);
case TestVectorInt.CONSTRUCTOR:
return new TestVectorInt(input);
case TestVectorIntObject.CONSTRUCTOR:
return new TestVectorIntObject(input);
case TestVectorString.CONSTRUCTOR:
return new TestVectorString(input);
case TestVectorStringObject.CONSTRUCTOR:
return new TestVectorStringObject(input);
case Text.CONSTRUCTOR:
return new Text(input);
case TextEntities.CONSTRUCTOR:
return new TextEntities(input);
case TextEntity.CONSTRUCTOR:
return new TextEntity(input);
case TextEntityTypeMention.CONSTRUCTOR:
return new TextEntityTypeMention(input);
case TextEntityTypeHashtag.CONSTRUCTOR:
return new TextEntityTypeHashtag(input);
case TextEntityTypeCashtag.CONSTRUCTOR:
return new TextEntityTypeCashtag(input);
case TextEntityTypeBotCommand.CONSTRUCTOR:
return new TextEntityTypeBotCommand(input);
case TextEntityTypeUrl.CONSTRUCTOR:
return new TextEntityTypeUrl(input);
case TextEntityTypeEmailAddress.CONSTRUCTOR:
return new TextEntityTypeEmailAddress(input);
case TextEntityTypePhoneNumber.CONSTRUCTOR:
return new TextEntityTypePhoneNumber(input);
case TextEntityTypeBankCardNumber.CONSTRUCTOR:
return new TextEntityTypeBankCardNumber(input);
case TextEntityTypeBold.CONSTRUCTOR:
return new TextEntityTypeBold(input);
case TextEntityTypeItalic.CONSTRUCTOR:
return new TextEntityTypeItalic(input);
case TextEntityTypeUnderline.CONSTRUCTOR:
return new TextEntityTypeUnderline(input);
case TextEntityTypeStrikethrough.CONSTRUCTOR:
return new TextEntityTypeStrikethrough(input);
case TextEntityTypeCode.CONSTRUCTOR:
return new TextEntityTypeCode(input);
case TextEntityTypePre.CONSTRUCTOR:
return new TextEntityTypePre(input);
case TextEntityTypePreCode.CONSTRUCTOR:
return new TextEntityTypePreCode(input);
case TextEntityTypeTextUrl.CONSTRUCTOR:
return new TextEntityTypeTextUrl(input);
case TextEntityTypeMentionName.CONSTRUCTOR:
return new TextEntityTypeMentionName(input);
case TextParseModeMarkdown.CONSTRUCTOR:
return new TextParseModeMarkdown(input);
case TextParseModeHTML.CONSTRUCTOR:
return new TextParseModeHTML(input);
case TopChatCategoryUsers.CONSTRUCTOR:
return new TopChatCategoryUsers(input);
case TopChatCategoryBots.CONSTRUCTOR:
return new TopChatCategoryBots(input);
case TopChatCategoryGroups.CONSTRUCTOR:
return new TopChatCategoryGroups(input);
case TopChatCategoryChannels.CONSTRUCTOR:
return new TopChatCategoryChannels(input);
case TopChatCategoryInlineBots.CONSTRUCTOR:
return new TopChatCategoryInlineBots(input);
case TopChatCategoryCalls.CONSTRUCTOR:
return new TopChatCategoryCalls(input);
case TopChatCategoryForwardChats.CONSTRUCTOR:
return new TopChatCategoryForwardChats(input);
case UpdateAuthorizationState.CONSTRUCTOR:
return new UpdateAuthorizationState(input);
case UpdateNewMessage.CONSTRUCTOR:
return new UpdateNewMessage(input);
case UpdateMessageSendAcknowledged.CONSTRUCTOR:
return new UpdateMessageSendAcknowledged(input);
case UpdateMessageSendSucceeded.CONSTRUCTOR:
return new UpdateMessageSendSucceeded(input);
case UpdateMessageSendFailed.CONSTRUCTOR:
return new UpdateMessageSendFailed(input);
case UpdateMessageContent.CONSTRUCTOR:
return new UpdateMessageContent(input);
case UpdateMessageEdited.CONSTRUCTOR:
return new UpdateMessageEdited(input);
case UpdateMessageViews.CONSTRUCTOR:
return new UpdateMessageViews(input);
case UpdateMessageContentOpened.CONSTRUCTOR:
return new UpdateMessageContentOpened(input);
case UpdateMessageMentionRead.CONSTRUCTOR:
return new UpdateMessageMentionRead(input);
case UpdateMessageLiveLocationViewed.CONSTRUCTOR:
return new UpdateMessageLiveLocationViewed(input);
case UpdateNewChat.CONSTRUCTOR:
return new UpdateNewChat(input);
case UpdateChatChatList.CONSTRUCTOR:
return new UpdateChatChatList(input);
case UpdateChatTitle.CONSTRUCTOR:
return new UpdateChatTitle(input);
case UpdateChatPhoto.CONSTRUCTOR:
return new UpdateChatPhoto(input);
case UpdateChatPermissions.CONSTRUCTOR:
return new UpdateChatPermissions(input);
case UpdateChatLastMessage.CONSTRUCTOR:
return new UpdateChatLastMessage(input);
case UpdateChatOrder.CONSTRUCTOR:
return new UpdateChatOrder(input);
case UpdateChatIsPinned.CONSTRUCTOR:
return new UpdateChatIsPinned(input);
case UpdateChatIsMarkedAsUnread.CONSTRUCTOR:
return new UpdateChatIsMarkedAsUnread(input);
case UpdateChatIsSponsored.CONSTRUCTOR:
return new UpdateChatIsSponsored(input);
case UpdateChatHasScheduledMessages.CONSTRUCTOR:
return new UpdateChatHasScheduledMessages(input);
case UpdateChatDefaultDisableNotification.CONSTRUCTOR:
return new UpdateChatDefaultDisableNotification(input);
case UpdateChatReadInbox.CONSTRUCTOR:
return new UpdateChatReadInbox(input);
case UpdateChatReadOutbox.CONSTRUCTOR:
return new UpdateChatReadOutbox(input);
case UpdateChatUnreadMentionCount.CONSTRUCTOR:
return new UpdateChatUnreadMentionCount(input);
case UpdateChatNotificationSettings.CONSTRUCTOR:
return new UpdateChatNotificationSettings(input);
case UpdateScopeNotificationSettings.CONSTRUCTOR:
return new UpdateScopeNotificationSettings(input);
case UpdateChatActionBar.CONSTRUCTOR:
return new UpdateChatActionBar(input);
case UpdateChatPinnedMessage.CONSTRUCTOR:
return new UpdateChatPinnedMessage(input);
case UpdateChatReplyMarkup.CONSTRUCTOR:
return new UpdateChatReplyMarkup(input);
case UpdateChatDraftMessage.CONSTRUCTOR:
return new UpdateChatDraftMessage(input);
case UpdateChatOnlineMemberCount.CONSTRUCTOR:
return new UpdateChatOnlineMemberCount(input);
case UpdateNotification.CONSTRUCTOR:
return new UpdateNotification(input);
case UpdateNotificationGroup.CONSTRUCTOR:
return new UpdateNotificationGroup(input);
case UpdateActiveNotifications.CONSTRUCTOR:
return new UpdateActiveNotifications(input);
case UpdateHavePendingNotifications.CONSTRUCTOR:
return new UpdateHavePendingNotifications(input);
case UpdateDeleteMessages.CONSTRUCTOR:
return new UpdateDeleteMessages(input);
case UpdateUserChatAction.CONSTRUCTOR:
return new UpdateUserChatAction(input);
case UpdateUserStatus.CONSTRUCTOR:
return new UpdateUserStatus(input);
case UpdateUser.CONSTRUCTOR:
return new UpdateUser(input);
case UpdateBasicGroup.CONSTRUCTOR:
return new UpdateBasicGroup(input);
case UpdateSupergroup.CONSTRUCTOR:
return new UpdateSupergroup(input);
case UpdateSecretChat.CONSTRUCTOR:
return new UpdateSecretChat(input);
case UpdateUserFullInfo.CONSTRUCTOR:
return new UpdateUserFullInfo(input);
case UpdateBasicGroupFullInfo.CONSTRUCTOR:
return new UpdateBasicGroupFullInfo(input);
case UpdateSupergroupFullInfo.CONSTRUCTOR:
return new UpdateSupergroupFullInfo(input);
case UpdateServiceNotification.CONSTRUCTOR:
return new UpdateServiceNotification(input);
case UpdateFile.CONSTRUCTOR:
return new UpdateFile(input);
case UpdateFileGenerationStart.CONSTRUCTOR:
return new UpdateFileGenerationStart(input);
case UpdateFileGenerationStop.CONSTRUCTOR:
return new UpdateFileGenerationStop(input);
case UpdateCall.CONSTRUCTOR:
return new UpdateCall(input);
case UpdateUserPrivacySettingRules.CONSTRUCTOR:
return new UpdateUserPrivacySettingRules(input);
case UpdateUnreadMessageCount.CONSTRUCTOR:
return new UpdateUnreadMessageCount(input);
case UpdateUnreadChatCount.CONSTRUCTOR:
return new UpdateUnreadChatCount(input);
case UpdateOption.CONSTRUCTOR:
return new UpdateOption(input);
case UpdateStickerSet.CONSTRUCTOR:
return new UpdateStickerSet(input);
case UpdateInstalledStickerSets.CONSTRUCTOR:
return new UpdateInstalledStickerSets(input);
case UpdateTrendingStickerSets.CONSTRUCTOR:
return new UpdateTrendingStickerSets(input);
case UpdateRecentStickers.CONSTRUCTOR:
return new UpdateRecentStickers(input);
case UpdateFavoriteStickers.CONSTRUCTOR:
return new UpdateFavoriteStickers(input);
case UpdateSavedAnimations.CONSTRUCTOR:
return new UpdateSavedAnimations(input);
case UpdateSelectedBackground.CONSTRUCTOR:
return new UpdateSelectedBackground(input);
case UpdateLanguagePackStrings.CONSTRUCTOR:
return new UpdateLanguagePackStrings(input);
case UpdateConnectionState.CONSTRUCTOR:
return new UpdateConnectionState(input);
case UpdateTermsOfService.CONSTRUCTOR:
return new UpdateTermsOfService(input);
case UpdateUsersNearby.CONSTRUCTOR:
return new UpdateUsersNearby(input);
case UpdateDiceEmojis.CONSTRUCTOR:
return new UpdateDiceEmojis(input);
case UpdateNewInlineQuery.CONSTRUCTOR:
return new UpdateNewInlineQuery(input);
case UpdateNewChosenInlineResult.CONSTRUCTOR:
return new UpdateNewChosenInlineResult(input);
case UpdateNewCallbackQuery.CONSTRUCTOR:
return new UpdateNewCallbackQuery(input);
case UpdateNewInlineCallbackQuery.CONSTRUCTOR:
return new UpdateNewInlineCallbackQuery(input);
case UpdateNewShippingQuery.CONSTRUCTOR:
return new UpdateNewShippingQuery(input);
case UpdateNewPreCheckoutQuery.CONSTRUCTOR:
return new UpdateNewPreCheckoutQuery(input);
case UpdateNewCustomEvent.CONSTRUCTOR:
return new UpdateNewCustomEvent(input);
case UpdateNewCustomQuery.CONSTRUCTOR:
return new UpdateNewCustomQuery(input);
case UpdatePoll.CONSTRUCTOR:
return new UpdatePoll(input);
case UpdatePollAnswer.CONSTRUCTOR:
return new UpdatePollAnswer(input);
case Updates.CONSTRUCTOR:
return new Updates(input);
case User.CONSTRUCTOR:
return new User(input);
case UserFullInfo.CONSTRUCTOR:
return new UserFullInfo(input);
case UserPrivacySettingShowStatus.CONSTRUCTOR:
return new UserPrivacySettingShowStatus(input);
case UserPrivacySettingShowProfilePhoto.CONSTRUCTOR:
return new UserPrivacySettingShowProfilePhoto(input);
case UserPrivacySettingShowLinkInForwardedMessages.CONSTRUCTOR:
return new UserPrivacySettingShowLinkInForwardedMessages(input);
case UserPrivacySettingShowPhoneNumber.CONSTRUCTOR:
return new UserPrivacySettingShowPhoneNumber(input);
case UserPrivacySettingAllowChatInvites.CONSTRUCTOR:
return new UserPrivacySettingAllowChatInvites(input);
case UserPrivacySettingAllowCalls.CONSTRUCTOR:
return new UserPrivacySettingAllowCalls(input);
case UserPrivacySettingAllowPeerToPeerCalls.CONSTRUCTOR:
return new UserPrivacySettingAllowPeerToPeerCalls(input);
case UserPrivacySettingAllowFindingByPhoneNumber.CONSTRUCTOR:
return new UserPrivacySettingAllowFindingByPhoneNumber(input);
case UserPrivacySettingRuleAllowAll.CONSTRUCTOR:
return new UserPrivacySettingRuleAllowAll(input);
case UserPrivacySettingRuleAllowContacts.CONSTRUCTOR:
return new UserPrivacySettingRuleAllowContacts(input);
case UserPrivacySettingRuleAllowUsers.CONSTRUCTOR:
return new UserPrivacySettingRuleAllowUsers(input);
case UserPrivacySettingRuleAllowChatMembers.CONSTRUCTOR:
return new UserPrivacySettingRuleAllowChatMembers(input);
case UserPrivacySettingRuleRestrictAll.CONSTRUCTOR:
return new UserPrivacySettingRuleRestrictAll(input);
case UserPrivacySettingRuleRestrictContacts.CONSTRUCTOR:
return new UserPrivacySettingRuleRestrictContacts(input);
case UserPrivacySettingRuleRestrictUsers.CONSTRUCTOR:
return new UserPrivacySettingRuleRestrictUsers(input);
case UserPrivacySettingRuleRestrictChatMembers.CONSTRUCTOR:
return new UserPrivacySettingRuleRestrictChatMembers(input);
case UserPrivacySettingRules.CONSTRUCTOR:
return new UserPrivacySettingRules(input);
case UserProfilePhoto.CONSTRUCTOR:
return new UserProfilePhoto(input);
case UserProfilePhotos.CONSTRUCTOR:
return new UserProfilePhotos(input);
case UserStatusEmpty.CONSTRUCTOR:
return new UserStatusEmpty(input);
case UserStatusOnline.CONSTRUCTOR:
return new UserStatusOnline(input);
case UserStatusOffline.CONSTRUCTOR:
return new UserStatusOffline(input);
case UserStatusRecently.CONSTRUCTOR:
return new UserStatusRecently(input);
case UserStatusLastWeek.CONSTRUCTOR:
return new UserStatusLastWeek(input);
case UserStatusLastMonth.CONSTRUCTOR:
return new UserStatusLastMonth(input);
case UserTypeRegular.CONSTRUCTOR:
return new UserTypeRegular(input);
case UserTypeDeleted.CONSTRUCTOR:
return new UserTypeDeleted(input);
case UserTypeBot.CONSTRUCTOR:
return new UserTypeBot(input);
case UserTypeUnknown.CONSTRUCTOR:
return new UserTypeUnknown(input);
case Users.CONSTRUCTOR:
return new Users(input);
case ValidatedOrderInfo.CONSTRUCTOR:
return new ValidatedOrderInfo(input);
case Venue.CONSTRUCTOR:
return new Venue(input);
case Video.CONSTRUCTOR:
return new Video(input);
case VideoNote.CONSTRUCTOR:
return new VideoNote(input);
case VoiceNote.CONSTRUCTOR:
return new VoiceNote(input);
case WebPage.CONSTRUCTOR:
return new WebPage(input);
case WebPageInstantView.CONSTRUCTOR:
return new WebPageInstantView(input);
case AcceptCall.CONSTRUCTOR:
return new AcceptCall(input);
case AcceptTermsOfService.CONSTRUCTOR:
return new AcceptTermsOfService(input);
case AddChatMember.CONSTRUCTOR:
return new AddChatMember(input);
case AddChatMembers.CONSTRUCTOR:
return new AddChatMembers(input);
case AddContact.CONSTRUCTOR:
return new AddContact(input);
case AddCustomServerLanguagePack.CONSTRUCTOR:
return new AddCustomServerLanguagePack(input);
case AddFavoriteSticker.CONSTRUCTOR:
return new AddFavoriteSticker(input);
case AddLocalMessage.CONSTRUCTOR:
return new AddLocalMessage(input);
case AddLogMessage.CONSTRUCTOR:
return new AddLogMessage(input);
case AddNetworkStatistics.CONSTRUCTOR:
return new AddNetworkStatistics(input);
case AddProxy.CONSTRUCTOR:
return new AddProxy(input);
case AddRecentSticker.CONSTRUCTOR:
return new AddRecentSticker(input);
case AddRecentlyFoundChat.CONSTRUCTOR:
return new AddRecentlyFoundChat(input);
case AddSavedAnimation.CONSTRUCTOR:
return new AddSavedAnimation(input);
case AddStickerToSet.CONSTRUCTOR:
return new AddStickerToSet(input);
case AnswerCallbackQuery.CONSTRUCTOR:
return new AnswerCallbackQuery(input);
case AnswerCustomQuery.CONSTRUCTOR:
return new AnswerCustomQuery(input);
case AnswerInlineQuery.CONSTRUCTOR:
return new AnswerInlineQuery(input);
case AnswerPreCheckoutQuery.CONSTRUCTOR:
return new AnswerPreCheckoutQuery(input);
case AnswerShippingQuery.CONSTRUCTOR:
return new AnswerShippingQuery(input);
case BlockUser.CONSTRUCTOR:
return new BlockUser(input);
case CanTransferOwnership.CONSTRUCTOR:
return new CanTransferOwnership(input);
case CancelDownloadFile.CONSTRUCTOR:
return new CancelDownloadFile(input);
case CancelUploadFile.CONSTRUCTOR:
return new CancelUploadFile(input);
case ChangeImportedContacts.CONSTRUCTOR:
return new ChangeImportedContacts(input);
case ChangePhoneNumber.CONSTRUCTOR:
return new ChangePhoneNumber(input);
case ChangeStickerSet.CONSTRUCTOR:
return new ChangeStickerSet(input);
case CheckAuthenticationBotToken.CONSTRUCTOR:
return new CheckAuthenticationBotToken(input);
case CheckAuthenticationCode.CONSTRUCTOR:
return new CheckAuthenticationCode(input);
case CheckAuthenticationPassword.CONSTRUCTOR:
return new CheckAuthenticationPassword(input);
case CheckChangePhoneNumberCode.CONSTRUCTOR:
return new CheckChangePhoneNumberCode(input);
case CheckChatInviteLink.CONSTRUCTOR:
return new CheckChatInviteLink(input);
case CheckChatUsername.CONSTRUCTOR:
return new CheckChatUsername(input);
case CheckCreatedPublicChatsLimit.CONSTRUCTOR:
return new CheckCreatedPublicChatsLimit(input);
case CheckDatabaseEncryptionKey.CONSTRUCTOR:
return new CheckDatabaseEncryptionKey(input);
case CheckEmailAddressVerificationCode.CONSTRUCTOR:
return new CheckEmailAddressVerificationCode(input);
case CheckPhoneNumberConfirmationCode.CONSTRUCTOR:
return new CheckPhoneNumberConfirmationCode(input);
case CheckPhoneNumberVerificationCode.CONSTRUCTOR:
return new CheckPhoneNumberVerificationCode(input);
case CheckRecoveryEmailAddressCode.CONSTRUCTOR:
return new CheckRecoveryEmailAddressCode(input);
case CleanFileName.CONSTRUCTOR:
return new CleanFileName(input);
case ClearAllDraftMessages.CONSTRUCTOR:
return new ClearAllDraftMessages(input);
case ClearImportedContacts.CONSTRUCTOR:
return new ClearImportedContacts(input);
case ClearRecentStickers.CONSTRUCTOR:
return new ClearRecentStickers(input);
case ClearRecentlyFoundChats.CONSTRUCTOR:
return new ClearRecentlyFoundChats(input);
case Close.CONSTRUCTOR:
return new Close(input);
case CloseChat.CONSTRUCTOR:
return new CloseChat(input);
case CloseSecretChat.CONSTRUCTOR:
return new CloseSecretChat(input);
case ConfirmQrCodeAuthentication.CONSTRUCTOR:
return new ConfirmQrCodeAuthentication(input);
case CreateBasicGroupChat.CONSTRUCTOR:
return new CreateBasicGroupChat(input);
case CreateCall.CONSTRUCTOR:
return new CreateCall(input);
case CreateNewBasicGroupChat.CONSTRUCTOR:
return new CreateNewBasicGroupChat(input);
case CreateNewSecretChat.CONSTRUCTOR:
return new CreateNewSecretChat(input);
case CreateNewStickerSet.CONSTRUCTOR:
return new CreateNewStickerSet(input);
case CreateNewSupergroupChat.CONSTRUCTOR:
return new CreateNewSupergroupChat(input);
case CreatePrivateChat.CONSTRUCTOR:
return new CreatePrivateChat(input);
case CreateSecretChat.CONSTRUCTOR:
return new CreateSecretChat(input);
case CreateSupergroupChat.CONSTRUCTOR:
return new CreateSupergroupChat(input);
case CreateTemporaryPassword.CONSTRUCTOR:
return new CreateTemporaryPassword(input);
case DeleteAccount.CONSTRUCTOR:
return new DeleteAccount(input);
case DeleteChatHistory.CONSTRUCTOR:
return new DeleteChatHistory(input);
case DeleteChatMessagesFromUser.CONSTRUCTOR:
return new DeleteChatMessagesFromUser(input);
case DeleteChatReplyMarkup.CONSTRUCTOR:
return new DeleteChatReplyMarkup(input);
case DeleteFile.CONSTRUCTOR:
return new DeleteFile(input);
case DeleteLanguagePack.CONSTRUCTOR:
return new DeleteLanguagePack(input);
case DeleteMessages.CONSTRUCTOR:
return new DeleteMessages(input);
case DeletePassportElement.CONSTRUCTOR:
return new DeletePassportElement(input);
case DeleteProfilePhoto.CONSTRUCTOR:
return new DeleteProfilePhoto(input);
case DeleteSavedCredentials.CONSTRUCTOR:
return new DeleteSavedCredentials(input);
case DeleteSavedOrderInfo.CONSTRUCTOR:
return new DeleteSavedOrderInfo(input);
case DeleteSupergroup.CONSTRUCTOR:
return new DeleteSupergroup(input);
case Destroy.CONSTRUCTOR:
return new Destroy(input);
case DisableProxy.CONSTRUCTOR:
return new DisableProxy(input);
case DiscardCall.CONSTRUCTOR:
return new DiscardCall(input);
case DisconnectAllWebsites.CONSTRUCTOR:
return new DisconnectAllWebsites(input);
case DisconnectWebsite.CONSTRUCTOR:
return new DisconnectWebsite(input);
case DownloadFile.CONSTRUCTOR:
return new DownloadFile(input);
case EditCustomLanguagePackInfo.CONSTRUCTOR:
return new EditCustomLanguagePackInfo(input);
case EditInlineMessageCaption.CONSTRUCTOR:
return new EditInlineMessageCaption(input);
case EditInlineMessageLiveLocation.CONSTRUCTOR:
return new EditInlineMessageLiveLocation(input);
case EditInlineMessageMedia.CONSTRUCTOR:
return new EditInlineMessageMedia(input);
case EditInlineMessageReplyMarkup.CONSTRUCTOR:
return new EditInlineMessageReplyMarkup(input);
case EditInlineMessageText.CONSTRUCTOR:
return new EditInlineMessageText(input);
case EditMessageCaption.CONSTRUCTOR:
return new EditMessageCaption(input);
case EditMessageLiveLocation.CONSTRUCTOR:
return new EditMessageLiveLocation(input);
case EditMessageMedia.CONSTRUCTOR:
return new EditMessageMedia(input);
case EditMessageReplyMarkup.CONSTRUCTOR:
return new EditMessageReplyMarkup(input);
case EditMessageSchedulingState.CONSTRUCTOR:
return new EditMessageSchedulingState(input);
case EditMessageText.CONSTRUCTOR:
return new EditMessageText(input);
case EditProxy.CONSTRUCTOR:
return new EditProxy(input);
case EnableProxy.CONSTRUCTOR:
return new EnableProxy(input);
case FinishFileGeneration.CONSTRUCTOR:
return new FinishFileGeneration(input);
case ForwardMessages.CONSTRUCTOR:
return new ForwardMessages(input);
case GenerateChatInviteLink.CONSTRUCTOR:
return new GenerateChatInviteLink(input);
case GetAccountTtl.CONSTRUCTOR:
return new GetAccountTtl(input);
case GetActiveLiveLocationMessages.CONSTRUCTOR:
return new GetActiveLiveLocationMessages(input);
case GetActiveSessions.CONSTRUCTOR:
return new GetActiveSessions(input);
case GetAllPassportElements.CONSTRUCTOR:
return new GetAllPassportElements(input);
case GetApplicationConfig.CONSTRUCTOR:
return new GetApplicationConfig(input);
case GetArchivedStickerSets.CONSTRUCTOR:
return new GetArchivedStickerSets(input);
case GetAttachedStickerSets.CONSTRUCTOR:
return new GetAttachedStickerSets(input);
case GetAuthorizationState.CONSTRUCTOR:
return new GetAuthorizationState(input);
case GetAutoDownloadSettingsPresets.CONSTRUCTOR:
return new GetAutoDownloadSettingsPresets(input);
case GetBackgroundUrl.CONSTRUCTOR:
return new GetBackgroundUrl(input);
case GetBackgrounds.CONSTRUCTOR:
return new GetBackgrounds(input);
case GetBankCardInfo.CONSTRUCTOR:
return new GetBankCardInfo(input);
case GetBasicGroup.CONSTRUCTOR:
return new GetBasicGroup(input);
case GetBasicGroupFullInfo.CONSTRUCTOR:
return new GetBasicGroupFullInfo(input);
case GetBlockedUsers.CONSTRUCTOR:
return new GetBlockedUsers(input);
case GetCallbackQueryAnswer.CONSTRUCTOR:
return new GetCallbackQueryAnswer(input);
case GetChat.CONSTRUCTOR:
return new GetChat(input);
case GetChatAdministrators.CONSTRUCTOR:
return new GetChatAdministrators(input);
case GetChatEventLog.CONSTRUCTOR:
return new GetChatEventLog(input);
case GetChatHistory.CONSTRUCTOR:
return new GetChatHistory(input);
case GetChatMember.CONSTRUCTOR:
return new GetChatMember(input);
case GetChatMessageByDate.CONSTRUCTOR:
return new GetChatMessageByDate(input);
case GetChatMessageCount.CONSTRUCTOR:
return new GetChatMessageCount(input);
case GetChatNotificationSettingsExceptions.CONSTRUCTOR:
return new GetChatNotificationSettingsExceptions(input);
case GetChatPinnedMessage.CONSTRUCTOR:
return new GetChatPinnedMessage(input);
case GetChatScheduledMessages.CONSTRUCTOR:
return new GetChatScheduledMessages(input);
case GetChatStatistics.CONSTRUCTOR:
return new GetChatStatistics(input);
case GetChatStatisticsGraph.CONSTRUCTOR:
return new GetChatStatisticsGraph(input);
case GetChatStatisticsUrl.CONSTRUCTOR:
return new GetChatStatisticsUrl(input);
case GetChats.CONSTRUCTOR:
return new GetChats(input);
case GetConnectedWebsites.CONSTRUCTOR:
return new GetConnectedWebsites(input);
case GetContacts.CONSTRUCTOR:
return new GetContacts(input);
case GetCountryCode.CONSTRUCTOR:
return new GetCountryCode(input);
case GetCreatedPublicChats.CONSTRUCTOR:
return new GetCreatedPublicChats(input);
case GetCurrentState.CONSTRUCTOR:
return new GetCurrentState(input);
case GetDatabaseStatistics.CONSTRUCTOR:
return new GetDatabaseStatistics(input);
case GetDeepLinkInfo.CONSTRUCTOR:
return new GetDeepLinkInfo(input);
case GetEmojiSuggestionsUrl.CONSTRUCTOR:
return new GetEmojiSuggestionsUrl(input);
case GetFavoriteStickers.CONSTRUCTOR:
return new GetFavoriteStickers(input);
case GetFile.CONSTRUCTOR:
return new GetFile(input);
case GetFileDownloadedPrefixSize.CONSTRUCTOR:
return new GetFileDownloadedPrefixSize(input);
case GetFileExtension.CONSTRUCTOR:
return new GetFileExtension(input);
case GetFileMimeType.CONSTRUCTOR:
return new GetFileMimeType(input);
case GetGameHighScores.CONSTRUCTOR:
return new GetGameHighScores(input);
case GetGroupsInCommon.CONSTRUCTOR:
return new GetGroupsInCommon(input);
case GetImportedContactCount.CONSTRUCTOR:
return new GetImportedContactCount(input);
case GetInactiveSupergroupChats.CONSTRUCTOR:
return new GetInactiveSupergroupChats(input);
case GetInlineGameHighScores.CONSTRUCTOR:
return new GetInlineGameHighScores(input);
case GetInlineQueryResults.CONSTRUCTOR:
return new GetInlineQueryResults(input);
case GetInstalledStickerSets.CONSTRUCTOR:
return new GetInstalledStickerSets(input);
case GetInviteText.CONSTRUCTOR:
return new GetInviteText(input);
case GetJsonString.CONSTRUCTOR:
return new GetJsonString(input);
case GetJsonValue.CONSTRUCTOR:
return new GetJsonValue(input);
case GetLanguagePackInfo.CONSTRUCTOR:
return new GetLanguagePackInfo(input);
case GetLanguagePackString.CONSTRUCTOR:
return new GetLanguagePackString(input);
case GetLanguagePackStrings.CONSTRUCTOR:
return new GetLanguagePackStrings(input);
case GetLocalizationTargetInfo.CONSTRUCTOR:
return new GetLocalizationTargetInfo(input);
case GetLogStream.CONSTRUCTOR:
return new GetLogStream(input);
case GetLogTagVerbosityLevel.CONSTRUCTOR:
return new GetLogTagVerbosityLevel(input);
case GetLogTags.CONSTRUCTOR:
return new GetLogTags(input);
case GetLogVerbosityLevel.CONSTRUCTOR:
return new GetLogVerbosityLevel(input);
case GetLoginUrl.CONSTRUCTOR:
return new GetLoginUrl(input);
case GetLoginUrlInfo.CONSTRUCTOR:
return new GetLoginUrlInfo(input);
case GetMapThumbnailFile.CONSTRUCTOR:
return new GetMapThumbnailFile(input);
case GetMarkdownText.CONSTRUCTOR:
return new GetMarkdownText(input);
case GetMe.CONSTRUCTOR:
return new GetMe(input);
case GetMessage.CONSTRUCTOR:
return new GetMessage(input);
case GetMessageLink.CONSTRUCTOR:
return new GetMessageLink(input);
case GetMessageLinkInfo.CONSTRUCTOR:
return new GetMessageLinkInfo(input);
case GetMessageLocally.CONSTRUCTOR:
return new GetMessageLocally(input);
case GetMessages.CONSTRUCTOR:
return new GetMessages(input);
case GetNetworkStatistics.CONSTRUCTOR:
return new GetNetworkStatistics(input);
case GetOption.CONSTRUCTOR:
return new GetOption(input);
case GetPassportAuthorizationForm.CONSTRUCTOR:
return new GetPassportAuthorizationForm(input);
case GetPassportAuthorizationFormAvailableElements.CONSTRUCTOR:
return new GetPassportAuthorizationFormAvailableElements(input);
case GetPassportElement.CONSTRUCTOR:
return new GetPassportElement(input);
case GetPasswordState.CONSTRUCTOR:
return new GetPasswordState(input);
case GetPaymentForm.CONSTRUCTOR:
return new GetPaymentForm(input);
case GetPaymentReceipt.CONSTRUCTOR:
return new GetPaymentReceipt(input);
case GetPollVoters.CONSTRUCTOR:
return new GetPollVoters(input);
case GetPreferredCountryLanguage.CONSTRUCTOR:
return new GetPreferredCountryLanguage(input);
case GetProxies.CONSTRUCTOR:
return new GetProxies(input);
case GetProxyLink.CONSTRUCTOR:
return new GetProxyLink(input);
case GetPublicMessageLink.CONSTRUCTOR:
return new GetPublicMessageLink(input);
case GetPushReceiverId.CONSTRUCTOR:
return new GetPushReceiverId(input);
case GetRecentInlineBots.CONSTRUCTOR:
return new GetRecentInlineBots(input);
case GetRecentStickers.CONSTRUCTOR:
return new GetRecentStickers(input);
case GetRecentlyVisitedTMeUrls.CONSTRUCTOR:
return new GetRecentlyVisitedTMeUrls(input);
case GetRecoveryEmailAddress.CONSTRUCTOR:
return new GetRecoveryEmailAddress(input);
case GetRemoteFile.CONSTRUCTOR:
return new GetRemoteFile(input);
case GetRepliedMessage.CONSTRUCTOR:
return new GetRepliedMessage(input);
case GetSavedAnimations.CONSTRUCTOR:
return new GetSavedAnimations(input);
case GetSavedOrderInfo.CONSTRUCTOR:
return new GetSavedOrderInfo(input);
case GetScopeNotificationSettings.CONSTRUCTOR:
return new GetScopeNotificationSettings(input);
case GetSecretChat.CONSTRUCTOR:
return new GetSecretChat(input);
case GetStickerEmojis.CONSTRUCTOR:
return new GetStickerEmojis(input);
case GetStickerSet.CONSTRUCTOR:
return new GetStickerSet(input);
case GetStickers.CONSTRUCTOR:
return new GetStickers(input);
case GetStorageStatistics.CONSTRUCTOR:
return new GetStorageStatistics(input);
case GetStorageStatisticsFast.CONSTRUCTOR:
return new GetStorageStatisticsFast(input);
case GetSuitableDiscussionChats.CONSTRUCTOR:
return new GetSuitableDiscussionChats(input);
case GetSupergroup.CONSTRUCTOR:
return new GetSupergroup(input);
case GetSupergroupFullInfo.CONSTRUCTOR:
return new GetSupergroupFullInfo(input);
case GetSupergroupMembers.CONSTRUCTOR:
return new GetSupergroupMembers(input);
case GetSupportUser.CONSTRUCTOR:
return new GetSupportUser(input);
case GetTemporaryPasswordState.CONSTRUCTOR:
return new GetTemporaryPasswordState(input);
case GetTextEntities.CONSTRUCTOR:
return new GetTextEntities(input);
case GetTopChats.CONSTRUCTOR:
return new GetTopChats(input);
case GetTrendingStickerSets.CONSTRUCTOR:
return new GetTrendingStickerSets(input);
case GetUser.CONSTRUCTOR:
return new GetUser(input);
case GetUserFullInfo.CONSTRUCTOR:
return new GetUserFullInfo(input);
case GetUserPrivacySettingRules.CONSTRUCTOR:
return new GetUserPrivacySettingRules(input);
case GetUserProfilePhotos.CONSTRUCTOR:
return new GetUserProfilePhotos(input);
case GetWebPageInstantView.CONSTRUCTOR:
return new GetWebPageInstantView(input);
case GetWebPagePreview.CONSTRUCTOR:
return new GetWebPagePreview(input);
case ImportContacts.CONSTRUCTOR:
return new ImportContacts(input);
case JoinChat.CONSTRUCTOR:
return new JoinChat(input);
case JoinChatByInviteLink.CONSTRUCTOR:
return new JoinChatByInviteLink(input);
case LeaveChat.CONSTRUCTOR:
return new LeaveChat(input);
case LogOut.CONSTRUCTOR:
return new LogOut(input);
case OpenChat.CONSTRUCTOR:
return new OpenChat(input);
case OpenMessageContent.CONSTRUCTOR:
return new OpenMessageContent(input);
case OptimizeStorage.CONSTRUCTOR:
return new OptimizeStorage(input);
case ParseMarkdown.CONSTRUCTOR:
return new ParseMarkdown(input);
case ParseTextEntities.CONSTRUCTOR:
return new ParseTextEntities(input);
case PinChatMessage.CONSTRUCTOR:
return new PinChatMessage(input);
case PingProxy.CONSTRUCTOR:
return new PingProxy(input);
case ProcessPushNotification.CONSTRUCTOR:
return new ProcessPushNotification(input);
case ReadAllChatMentions.CONSTRUCTOR:
return new ReadAllChatMentions(input);
case ReadFilePart.CONSTRUCTOR:
return new ReadFilePart(input);
case RecoverAuthenticationPassword.CONSTRUCTOR:
return new RecoverAuthenticationPassword(input);
case RecoverPassword.CONSTRUCTOR:
return new RecoverPassword(input);
case RegisterDevice.CONSTRUCTOR:
return new RegisterDevice(input);
case RegisterUser.CONSTRUCTOR:
return new RegisterUser(input);
case RemoveBackground.CONSTRUCTOR:
return new RemoveBackground(input);
case RemoveChatActionBar.CONSTRUCTOR:
return new RemoveChatActionBar(input);
case RemoveContacts.CONSTRUCTOR:
return new RemoveContacts(input);
case RemoveFavoriteSticker.CONSTRUCTOR:
return new RemoveFavoriteSticker(input);
case RemoveNotification.CONSTRUCTOR:
return new RemoveNotification(input);
case RemoveNotificationGroup.CONSTRUCTOR:
return new RemoveNotificationGroup(input);
case RemoveProxy.CONSTRUCTOR:
return new RemoveProxy(input);
case RemoveRecentHashtag.CONSTRUCTOR:
return new RemoveRecentHashtag(input);
case RemoveRecentSticker.CONSTRUCTOR:
return new RemoveRecentSticker(input);
case RemoveRecentlyFoundChat.CONSTRUCTOR:
return new RemoveRecentlyFoundChat(input);
case RemoveSavedAnimation.CONSTRUCTOR:
return new RemoveSavedAnimation(input);
case RemoveStickerFromSet.CONSTRUCTOR:
return new RemoveStickerFromSet(input);
case RemoveTopChat.CONSTRUCTOR:
return new RemoveTopChat(input);
case ReorderInstalledStickerSets.CONSTRUCTOR:
return new ReorderInstalledStickerSets(input);
case ReportChat.CONSTRUCTOR:
return new ReportChat(input);
case ReportSupergroupSpam.CONSTRUCTOR:
return new ReportSupergroupSpam(input);
case RequestAuthenticationPasswordRecovery.CONSTRUCTOR:
return new RequestAuthenticationPasswordRecovery(input);
case RequestPasswordRecovery.CONSTRUCTOR:
return new RequestPasswordRecovery(input);
case RequestQrCodeAuthentication.CONSTRUCTOR:
return new RequestQrCodeAuthentication(input);
case ResendAuthenticationCode.CONSTRUCTOR:
return new ResendAuthenticationCode(input);
case ResendChangePhoneNumberCode.CONSTRUCTOR:
return new ResendChangePhoneNumberCode(input);
case ResendEmailAddressVerificationCode.CONSTRUCTOR:
return new ResendEmailAddressVerificationCode(input);
case ResendMessages.CONSTRUCTOR:
return new ResendMessages(input);
case ResendPhoneNumberConfirmationCode.CONSTRUCTOR:
return new ResendPhoneNumberConfirmationCode(input);
case ResendPhoneNumberVerificationCode.CONSTRUCTOR:
return new ResendPhoneNumberVerificationCode(input);
case ResendRecoveryEmailAddressCode.CONSTRUCTOR:
return new ResendRecoveryEmailAddressCode(input);
case ResetAllNotificationSettings.CONSTRUCTOR:
return new ResetAllNotificationSettings(input);
case ResetBackgrounds.CONSTRUCTOR:
return new ResetBackgrounds(input);
case ResetNetworkStatistics.CONSTRUCTOR:
return new ResetNetworkStatistics(input);
case SaveApplicationLogEvent.CONSTRUCTOR:
return new SaveApplicationLogEvent(input);
case SearchBackground.CONSTRUCTOR:
return new SearchBackground(input);
case SearchCallMessages.CONSTRUCTOR:
return new SearchCallMessages(input);
case SearchChatMembers.CONSTRUCTOR:
return new SearchChatMembers(input);
case SearchChatMessages.CONSTRUCTOR:
return new SearchChatMessages(input);
case SearchChatRecentLocationMessages.CONSTRUCTOR:
return new SearchChatRecentLocationMessages(input);
case SearchChats.CONSTRUCTOR:
return new SearchChats(input);
case SearchChatsNearby.CONSTRUCTOR:
return new SearchChatsNearby(input);
case SearchChatsOnServer.CONSTRUCTOR:
return new SearchChatsOnServer(input);
case SearchContacts.CONSTRUCTOR:
return new SearchContacts(input);
case SearchEmojis.CONSTRUCTOR:
return new SearchEmojis(input);
case SearchHashtags.CONSTRUCTOR:
return new SearchHashtags(input);
case SearchInstalledStickerSets.CONSTRUCTOR:
return new SearchInstalledStickerSets(input);
case SearchMessages.CONSTRUCTOR:
return new SearchMessages(input);
case SearchPublicChat.CONSTRUCTOR:
return new SearchPublicChat(input);
case SearchPublicChats.CONSTRUCTOR:
return new SearchPublicChats(input);
case SearchSecretMessages.CONSTRUCTOR:
return new SearchSecretMessages(input);
case SearchStickerSet.CONSTRUCTOR:
return new SearchStickerSet(input);
case SearchStickerSets.CONSTRUCTOR:
return new SearchStickerSets(input);
case SearchStickers.CONSTRUCTOR:
return new SearchStickers(input);
case SendBotStartMessage.CONSTRUCTOR:
return new SendBotStartMessage(input);
case SendCallDebugInformation.CONSTRUCTOR:
return new SendCallDebugInformation(input);
case SendCallRating.CONSTRUCTOR:
return new SendCallRating(input);
case SendChatAction.CONSTRUCTOR:
return new SendChatAction(input);
case SendChatScreenshotTakenNotification.CONSTRUCTOR:
return new SendChatScreenshotTakenNotification(input);
case SendChatSetTtlMessage.CONSTRUCTOR:
return new SendChatSetTtlMessage(input);
case SendCustomRequest.CONSTRUCTOR:
return new SendCustomRequest(input);
case SendEmailAddressVerificationCode.CONSTRUCTOR:
return new SendEmailAddressVerificationCode(input);
case SendInlineQueryResultMessage.CONSTRUCTOR:
return new SendInlineQueryResultMessage(input);
case SendMessage.CONSTRUCTOR:
return new SendMessage(input);
case SendMessageAlbum.CONSTRUCTOR:
return new SendMessageAlbum(input);
case SendPassportAuthorizationForm.CONSTRUCTOR:
return new SendPassportAuthorizationForm(input);
case SendPaymentForm.CONSTRUCTOR:
return new SendPaymentForm(input);
case SendPhoneNumberConfirmationCode.CONSTRUCTOR:
return new SendPhoneNumberConfirmationCode(input);
case SendPhoneNumberVerificationCode.CONSTRUCTOR:
return new SendPhoneNumberVerificationCode(input);
case SetAccountTtl.CONSTRUCTOR:
return new SetAccountTtl(input);
case SetAlarm.CONSTRUCTOR:
return new SetAlarm(input);
case SetAuthenticationPhoneNumber.CONSTRUCTOR:
return new SetAuthenticationPhoneNumber(input);
case SetAutoDownloadSettings.CONSTRUCTOR:
return new SetAutoDownloadSettings(input);
case SetBackground.CONSTRUCTOR:
return new SetBackground(input);
case SetBio.CONSTRUCTOR:
return new SetBio(input);
case SetBotUpdatesStatus.CONSTRUCTOR:
return new SetBotUpdatesStatus(input);
case SetChatChatList.CONSTRUCTOR:
return new SetChatChatList(input);
case SetChatClientData.CONSTRUCTOR:
return new SetChatClientData(input);
case SetChatDescription.CONSTRUCTOR:
return new SetChatDescription(input);
case SetChatDiscussionGroup.CONSTRUCTOR:
return new SetChatDiscussionGroup(input);
case SetChatDraftMessage.CONSTRUCTOR:
return new SetChatDraftMessage(input);
case SetChatLocation.CONSTRUCTOR:
return new SetChatLocation(input);
case SetChatMemberStatus.CONSTRUCTOR:
return new SetChatMemberStatus(input);
case SetChatNotificationSettings.CONSTRUCTOR:
return new SetChatNotificationSettings(input);
case SetChatPermissions.CONSTRUCTOR:
return new SetChatPermissions(input);
case SetChatPhoto.CONSTRUCTOR:
return new SetChatPhoto(input);
case SetChatSlowModeDelay.CONSTRUCTOR:
return new SetChatSlowModeDelay(input);
case SetChatTitle.CONSTRUCTOR:
return new SetChatTitle(input);
case SetCommands.CONSTRUCTOR:
return new SetCommands(input);
case SetCustomLanguagePack.CONSTRUCTOR:
return new SetCustomLanguagePack(input);
case SetCustomLanguagePackString.CONSTRUCTOR:
return new SetCustomLanguagePackString(input);
case SetDatabaseEncryptionKey.CONSTRUCTOR:
return new SetDatabaseEncryptionKey(input);
case SetFileGenerationProgress.CONSTRUCTOR:
return new SetFileGenerationProgress(input);
case SetGameScore.CONSTRUCTOR:
return new SetGameScore(input);
case SetInlineGameScore.CONSTRUCTOR:
return new SetInlineGameScore(input);
case SetLocation.CONSTRUCTOR:
return new SetLocation(input);
case SetLogStream.CONSTRUCTOR:
return new SetLogStream(input);
case SetLogTagVerbosityLevel.CONSTRUCTOR:
return new SetLogTagVerbosityLevel(input);
case SetLogVerbosityLevel.CONSTRUCTOR:
return new SetLogVerbosityLevel(input);
case SetName.CONSTRUCTOR:
return new SetName(input);
case SetNetworkType.CONSTRUCTOR:
return new SetNetworkType(input);
case SetOption.CONSTRUCTOR:
return new SetOption(input);
case SetPassportElement.CONSTRUCTOR:
return new SetPassportElement(input);
case SetPassportElementErrors.CONSTRUCTOR:
return new SetPassportElementErrors(input);
case SetPassword.CONSTRUCTOR:
return new SetPassword(input);
case SetPinnedChats.CONSTRUCTOR:
return new SetPinnedChats(input);
case SetPollAnswer.CONSTRUCTOR:
return new SetPollAnswer(input);
case SetProfilePhoto.CONSTRUCTOR:
return new SetProfilePhoto(input);
case SetRecoveryEmailAddress.CONSTRUCTOR:
return new SetRecoveryEmailAddress(input);
case SetScopeNotificationSettings.CONSTRUCTOR:
return new SetScopeNotificationSettings(input);
case SetStickerPositionInSet.CONSTRUCTOR:
return new SetStickerPositionInSet(input);
case SetStickerSetThumbnail.CONSTRUCTOR:
return new SetStickerSetThumbnail(input);
case SetSupergroupStickerSet.CONSTRUCTOR:
return new SetSupergroupStickerSet(input);
case SetSupergroupUsername.CONSTRUCTOR:
return new SetSupergroupUsername(input);
case SetTdlibParameters.CONSTRUCTOR:
return new SetTdlibParameters(input);
case SetUserPrivacySettingRules.CONSTRUCTOR:
return new SetUserPrivacySettingRules(input);
case SetUsername.CONSTRUCTOR:
return new SetUsername(input);
case SharePhoneNumber.CONSTRUCTOR:
return new SharePhoneNumber(input);
case StopPoll.CONSTRUCTOR:
return new StopPoll(input);
case SynchronizeLanguagePack.CONSTRUCTOR:
return new SynchronizeLanguagePack(input);
case TerminateAllOtherSessions.CONSTRUCTOR:
return new TerminateAllOtherSessions(input);
case TerminateSession.CONSTRUCTOR:
return new TerminateSession(input);
case TestCallBytes.CONSTRUCTOR:
return new TestCallBytes(input);
case TestCallEmpty.CONSTRUCTOR:
return new TestCallEmpty(input);
case TestCallString.CONSTRUCTOR:
return new TestCallString(input);
case TestCallVectorInt.CONSTRUCTOR:
return new TestCallVectorInt(input);
case TestCallVectorIntObject.CONSTRUCTOR:
return new TestCallVectorIntObject(input);
case TestCallVectorString.CONSTRUCTOR:
return new TestCallVectorString(input);
case TestCallVectorStringObject.CONSTRUCTOR:
return new TestCallVectorStringObject(input);
case TestGetDifference.CONSTRUCTOR:
return new TestGetDifference(input);
case TestNetwork.CONSTRUCTOR:
return new TestNetwork(input);
case TestProxy.CONSTRUCTOR:
return new TestProxy(input);
case TestReturnError.CONSTRUCTOR:
return new TestReturnError(input);
case TestSquareInt.CONSTRUCTOR:
return new TestSquareInt(input);
case TestUseUpdate.CONSTRUCTOR:
return new TestUseUpdate(input);
case ToggleChatDefaultDisableNotification.CONSTRUCTOR:
return new ToggleChatDefaultDisableNotification(input);
case ToggleChatIsMarkedAsUnread.CONSTRUCTOR:
return new ToggleChatIsMarkedAsUnread(input);
case ToggleChatIsPinned.CONSTRUCTOR:
return new ToggleChatIsPinned(input);
case ToggleSupergroupIsAllHistoryAvailable.CONSTRUCTOR:
return new ToggleSupergroupIsAllHistoryAvailable(input);
case ToggleSupergroupSignMessages.CONSTRUCTOR:
return new ToggleSupergroupSignMessages(input);
case TransferChatOwnership.CONSTRUCTOR:
return new TransferChatOwnership(input);
case UnblockUser.CONSTRUCTOR:
return new UnblockUser(input);
case UnpinChatMessage.CONSTRUCTOR:
return new UnpinChatMessage(input);
case UpgradeBasicGroupChatToSupergroupChat.CONSTRUCTOR:
return new UpgradeBasicGroupChatToSupergroupChat(input);
case UploadFile.CONSTRUCTOR:
return new UploadFile(input);
case UploadStickerFile.CONSTRUCTOR:
return new UploadStickerFile(input);
case ValidateOrderInfo.CONSTRUCTOR:
return new ValidateOrderInfo(input);
case ViewMessages.CONSTRUCTOR:
return new ViewMessages(input);
case ViewTrendingStickerSets.CONSTRUCTOR:
return new ViewTrendingStickerSets(input);
case WriteGeneratedFilePart.CONSTRUCTOR:
return new WriteGeneratedFilePart(input);
default:
throw new UnsupportedOperationException();
}
}
}
public abstract static class AuthenticationCodeType extends Object {}
public abstract static class AuthorizationState extends Object {}
public abstract static class BackgroundFill extends Object {}
public abstract static class BackgroundType extends Object {}
public abstract static class CallDiscardReason extends Object {}
public abstract static class CallProblem extends Object {}
public abstract static class CallState extends Object {}
public abstract static class CallbackQueryPayload extends Object {}
public abstract static class CanTransferOwnershipResult extends Object {}
public abstract static class ChatAction extends Object {}
public abstract static class ChatActionBar extends Object {}
public abstract static class ChatEventAction extends Object {}
public abstract static class ChatList extends Object {}
public abstract static class ChatMemberStatus extends Object {}
public abstract static class ChatMembersFilter extends Object {}
public abstract static class ChatReportReason extends Object {}
public abstract static class ChatType extends Object {}
public abstract static class CheckChatUsernameResult extends Object {}
public abstract static class ConnectionState extends Object {}
public abstract static class DeviceToken extends Object {}
public abstract static class FileType extends Object {}
public abstract static class InlineKeyboardButtonType extends Object {}
public abstract static class InlineQueryResult extends Object {}
public abstract static class InputBackground extends Object {}
public abstract static class InputCredentials extends Object {}
public abstract static class InputFile extends Object {}
public abstract static class InputInlineQueryResult extends Object {}
public abstract static class InputMessageContent extends Object {}
public abstract static class InputPassportElement extends Object {}
public abstract static class InputPassportElementErrorSource extends Object {}
public abstract static class InputSticker extends Object {}
public abstract static class JsonValue extends Object {}
public abstract static class KeyboardButtonType extends Object {}
public abstract static class LanguagePackStringValue extends Object {}
public abstract static class LogStream extends Object {}
public abstract static class LoginUrlInfo extends Object {}
public abstract static class MaskPoint extends Object {}
public abstract static class MessageContent extends Object {}
public abstract static class MessageForwardOrigin extends Object {}
public abstract static class MessageSchedulingState extends Object {}
public abstract static class MessageSendingState extends Object {}
public abstract static class NetworkStatisticsEntry extends Object {}
public abstract static class NetworkType extends Object {}
public abstract static class NotificationGroupType extends Object {}
public abstract static class NotificationSettingsScope extends Object {}
public abstract static class NotificationType extends Object {}
public abstract static class OptionValue extends Object {}
public abstract static class PageBlock extends Object {}
public abstract static class PageBlockHorizontalAlignment extends Object {}
public abstract static class PageBlockVerticalAlignment extends Object {}
public abstract static class PassportElement extends Object {}
public abstract static class PassportElementErrorSource extends Object {}
public abstract static class PassportElementType extends Object {}
public abstract static class PollType extends Object {}
public abstract static class ProxyType extends Object {}
public abstract static class PublicChatType extends Object {}
public abstract static class PushMessageContent extends Object {}
public abstract static class ReplyMarkup extends Object {}
public abstract static class RichText extends Object {}
public abstract static class SearchMessagesFilter extends Object {}
public abstract static class SecretChatState extends Object {}
public abstract static class StatisticsGraph extends Object {}
public abstract static class SupergroupMembersFilter extends Object {}
public abstract static class TMeUrlType extends Object {}
public abstract static class TextEntityType extends Object {}
public abstract static class TextParseMode extends Object {}
public abstract static class TopChatCategory extends Object {}
public abstract static class Update extends Object {}
public abstract static class UserPrivacySetting extends Object {}
public abstract static class UserPrivacySettingRule extends Object {}
public abstract static class UserStatus extends Object {}
public abstract static class UserType extends Object {}
public static class AccountTtl extends Object {
public int days;
public static final int CONSTRUCTOR = 1324495492;
public AccountTtl() {}
public AccountTtl(int days) {
this.days = days;
}
public AccountTtl(DataInput input) throws IOException {
this.days = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.days);
}
}
public static class Address extends Object {
public String countryCode;
public String state;
public String city;
public String streetLine1;
public String streetLine2;
public String postalCode;
public static final int CONSTRUCTOR = -2043654342;
public Address() {}
public Address(String countryCode, String state, String city, String streetLine1, String streetLine2, String postalCode) {
this.countryCode = countryCode;
this.state = state;
this.city = city;
this.streetLine1 = streetLine1;
this.streetLine2 = streetLine2;
this.postalCode = postalCode;
}
public Address(DataInput input) throws IOException {
if (input.readBoolean()) {
var countryCodeTmp = new byte[input.readInt()];
input.readFully(countryCodeTmp);
this.countryCode = new String(countryCodeTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var stateTmp = new byte[input.readInt()];
input.readFully(stateTmp);
this.state = new String(stateTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var cityTmp = new byte[input.readInt()];
input.readFully(cityTmp);
this.city = new String(cityTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var streetLine1Tmp = new byte[input.readInt()];
input.readFully(streetLine1Tmp);
this.streetLine1 = new String(streetLine1Tmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var streetLine2Tmp = new byte[input.readInt()];
input.readFully(streetLine2Tmp);
this.streetLine2 = new String(streetLine2Tmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var postalCodeTmp = new byte[input.readInt()];
input.readFully(postalCodeTmp);
this.postalCode = new String(postalCodeTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.countryCode == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var countryCodeTmp = this.countryCode.getBytes(StandardCharsets.UTF_8);
output.writeInt(countryCodeTmp.length);
output.write(countryCodeTmp);
}
if (this.state == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var stateTmp = this.state.getBytes(StandardCharsets.UTF_8);
output.writeInt(stateTmp.length);
output.write(stateTmp);
}
if (this.city == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var cityTmp = this.city.getBytes(StandardCharsets.UTF_8);
output.writeInt(cityTmp.length);
output.write(cityTmp);
}
if (this.streetLine1 == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var streetLine1Tmp = this.streetLine1.getBytes(StandardCharsets.UTF_8);
output.writeInt(streetLine1Tmp.length);
output.write(streetLine1Tmp);
}
if (this.streetLine2 == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var streetLine2Tmp = this.streetLine2.getBytes(StandardCharsets.UTF_8);
output.writeInt(streetLine2Tmp.length);
output.write(streetLine2Tmp);
}
if (this.postalCode == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var postalCodeTmp = this.postalCode.getBytes(StandardCharsets.UTF_8);
output.writeInt(postalCodeTmp.length);
output.write(postalCodeTmp);
}
}
}
public static class Animation extends Object {
public int duration;
public int width;
public int height;
public String fileName;
public String mimeType;
public Minithumbnail minithumbnail;
public PhotoSize thumbnail;
public File animation;
public static final int CONSTRUCTOR = -1629245379;
public Animation() {}
public Animation(int duration, int width, int height, String fileName, String mimeType, Minithumbnail minithumbnail, PhotoSize thumbnail, File animation) {
this.duration = duration;
this.width = width;
this.height = height;
this.fileName = fileName;
this.mimeType = mimeType;
this.minithumbnail = minithumbnail;
this.thumbnail = thumbnail;
this.animation = animation;
}
public Animation(DataInput input) throws IOException {
this.duration = input.readInt();
this.width = input.readInt();
this.height = input.readInt();
if (input.readBoolean()) {
var fileNameTmp = new byte[input.readInt()];
input.readFully(fileNameTmp);
this.fileName = new String(fileNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var mimeTypeTmp = new byte[input.readInt()];
input.readFully(mimeTypeTmp);
this.mimeType = new String(mimeTypeTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Minithumbnail.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.minithumbnail = new Minithumbnail(input);
}
if (input.readBoolean()) {
if (PhotoSize.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.thumbnail = new PhotoSize(input);
}
if (input.readBoolean()) {
if (File.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.animation = new File(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.duration);
output.writeInt(this.width);
output.writeInt(this.height);
if (this.fileName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var fileNameTmp = this.fileName.getBytes(StandardCharsets.UTF_8);
output.writeInt(fileNameTmp.length);
output.write(fileNameTmp);
}
if (this.mimeType == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var mimeTypeTmp = this.mimeType.getBytes(StandardCharsets.UTF_8);
output.writeInt(mimeTypeTmp.length);
output.write(mimeTypeTmp);
}
if (this.minithumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.minithumbnail.serialize(output);
}
if (this.thumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.thumbnail.serialize(output);
}
if (this.animation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.animation.serialize(output);
}
}
}
public static class Animations extends Object {
public Animation[] animations;
public static final int CONSTRUCTOR = 344216945;
public Animations() {}
public Animations(Animation[] animations) {
this.animations = animations;
}
public Animations(DataInput input) throws IOException {
if (input.readBoolean()) {
this.animations = new Animation[input.readInt()];
for (int i = 0; i < this.animations.length; i++) {
if (Animation.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.animations[i] = new Animation(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.animations == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.animations.length);
for (int i = 0; i < this.animations.length; i++) {
this.animations[i].serialize(output);
}
}
}
}
public static class Audio extends Object {
public int duration;
public String title;
public String performer;
public String fileName;
public String mimeType;
public Minithumbnail albumCoverMinithumbnail;
public PhotoSize albumCoverThumbnail;
public File audio;
public static final int CONSTRUCTOR = 1475294302;
public Audio() {}
public Audio(int duration, String title, String performer, String fileName, String mimeType, Minithumbnail albumCoverMinithumbnail, PhotoSize albumCoverThumbnail, File audio) {
this.duration = duration;
this.title = title;
this.performer = performer;
this.fileName = fileName;
this.mimeType = mimeType;
this.albumCoverMinithumbnail = albumCoverMinithumbnail;
this.albumCoverThumbnail = albumCoverThumbnail;
this.audio = audio;
}
public Audio(DataInput input) throws IOException {
this.duration = input.readInt();
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var performerTmp = new byte[input.readInt()];
input.readFully(performerTmp);
this.performer = new String(performerTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var fileNameTmp = new byte[input.readInt()];
input.readFully(fileNameTmp);
this.fileName = new String(fileNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var mimeTypeTmp = new byte[input.readInt()];
input.readFully(mimeTypeTmp);
this.mimeType = new String(mimeTypeTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Minithumbnail.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.albumCoverMinithumbnail = new Minithumbnail(input);
}
if (input.readBoolean()) {
if (PhotoSize.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.albumCoverThumbnail = new PhotoSize(input);
}
if (input.readBoolean()) {
if (File.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.audio = new File(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.duration);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.performer == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var performerTmp = this.performer.getBytes(StandardCharsets.UTF_8);
output.writeInt(performerTmp.length);
output.write(performerTmp);
}
if (this.fileName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var fileNameTmp = this.fileName.getBytes(StandardCharsets.UTF_8);
output.writeInt(fileNameTmp.length);
output.write(fileNameTmp);
}
if (this.mimeType == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var mimeTypeTmp = this.mimeType.getBytes(StandardCharsets.UTF_8);
output.writeInt(mimeTypeTmp.length);
output.write(mimeTypeTmp);
}
if (this.albumCoverMinithumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.albumCoverMinithumbnail.serialize(output);
}
if (this.albumCoverThumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.albumCoverThumbnail.serialize(output);
}
if (this.audio == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.audio.serialize(output);
}
}
}
public static class AuthenticationCodeInfo extends Object {
public String phoneNumber;
public AuthenticationCodeType type;
public AuthenticationCodeType nextType;
public int timeout;
public static final int CONSTRUCTOR = -860345416;
public AuthenticationCodeInfo() {}
public AuthenticationCodeInfo(String phoneNumber, AuthenticationCodeType type, AuthenticationCodeType nextType, int timeout) {
this.phoneNumber = phoneNumber;
this.type = type;
this.nextType = nextType;
this.timeout = timeout;
}
public AuthenticationCodeInfo(DataInput input) throws IOException {
if (input.readBoolean()) {
var phoneNumberTmp = new byte[input.readInt()];
input.readFully(phoneNumberTmp);
this.phoneNumber = new String(phoneNumberTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case AuthenticationCodeTypeTelegramMessage.CONSTRUCTOR:
this.type = new AuthenticationCodeTypeTelegramMessage(input);
break;
case AuthenticationCodeTypeSms.CONSTRUCTOR:
this.type = new AuthenticationCodeTypeSms(input);
break;
case AuthenticationCodeTypeCall.CONSTRUCTOR:
this.type = new AuthenticationCodeTypeCall(input);
break;
case AuthenticationCodeTypeFlashCall.CONSTRUCTOR:
this.type = new AuthenticationCodeTypeFlashCall(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case AuthenticationCodeTypeTelegramMessage.CONSTRUCTOR:
this.nextType = new AuthenticationCodeTypeTelegramMessage(input);
break;
case AuthenticationCodeTypeSms.CONSTRUCTOR:
this.nextType = new AuthenticationCodeTypeSms(input);
break;
case AuthenticationCodeTypeCall.CONSTRUCTOR:
this.nextType = new AuthenticationCodeTypeCall(input);
break;
case AuthenticationCodeTypeFlashCall.CONSTRUCTOR:
this.nextType = new AuthenticationCodeTypeFlashCall(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.timeout = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.phoneNumber == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var phoneNumberTmp = this.phoneNumber.getBytes(StandardCharsets.UTF_8);
output.writeInt(phoneNumberTmp.length);
output.write(phoneNumberTmp);
}
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
if (this.nextType == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.nextType.serialize(output);
}
output.writeInt(this.timeout);
}
}
public static class AuthenticationCodeTypeTelegramMessage extends AuthenticationCodeType {
public int length;
public static final int CONSTRUCTOR = 2079628074;
public AuthenticationCodeTypeTelegramMessage() {}
public AuthenticationCodeTypeTelegramMessage(int length) {
this.length = length;
}
public AuthenticationCodeTypeTelegramMessage(DataInput input) throws IOException {
this.length = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.length);
}
}
public static class AuthenticationCodeTypeSms extends AuthenticationCodeType {
public int length;
public static final int CONSTRUCTOR = 962650760;
public AuthenticationCodeTypeSms() {}
public AuthenticationCodeTypeSms(int length) {
this.length = length;
}
public AuthenticationCodeTypeSms(DataInput input) throws IOException {
this.length = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.length);
}
}
public static class AuthenticationCodeTypeCall extends AuthenticationCodeType {
public int length;
public static final int CONSTRUCTOR = 1636265063;
public AuthenticationCodeTypeCall() {}
public AuthenticationCodeTypeCall(int length) {
this.length = length;
}
public AuthenticationCodeTypeCall(DataInput input) throws IOException {
this.length = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.length);
}
}
public static class AuthenticationCodeTypeFlashCall extends AuthenticationCodeType {
public String pattern;
public static final int CONSTRUCTOR = 1395882402;
public AuthenticationCodeTypeFlashCall() {}
public AuthenticationCodeTypeFlashCall(String pattern) {
this.pattern = pattern;
}
public AuthenticationCodeTypeFlashCall(DataInput input) throws IOException {
if (input.readBoolean()) {
var patternTmp = new byte[input.readInt()];
input.readFully(patternTmp);
this.pattern = new String(patternTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.pattern == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var patternTmp = this.pattern.getBytes(StandardCharsets.UTF_8);
output.writeInt(patternTmp.length);
output.write(patternTmp);
}
}
}
public static class AuthorizationStateWaitTdlibParameters extends AuthorizationState {
public static final int CONSTRUCTOR = 904720988;
public AuthorizationStateWaitTdlibParameters() {}
public AuthorizationStateWaitTdlibParameters(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class AuthorizationStateWaitEncryptionKey extends AuthorizationState {
public boolean isEncrypted;
public static final int CONSTRUCTOR = 612103496;
public AuthorizationStateWaitEncryptionKey() {}
public AuthorizationStateWaitEncryptionKey(boolean isEncrypted) {
this.isEncrypted = isEncrypted;
}
public AuthorizationStateWaitEncryptionKey(DataInput input) throws IOException {
this.isEncrypted = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isEncrypted);
}
}
public static class AuthorizationStateWaitPhoneNumber extends AuthorizationState {
public static final int CONSTRUCTOR = 306402531;
public AuthorizationStateWaitPhoneNumber() {}
public AuthorizationStateWaitPhoneNumber(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class AuthorizationStateWaitCode extends AuthorizationState {
public AuthenticationCodeInfo codeInfo;
public static final int CONSTRUCTOR = 52643073;
public AuthorizationStateWaitCode() {}
public AuthorizationStateWaitCode(AuthenticationCodeInfo codeInfo) {
this.codeInfo = codeInfo;
}
public AuthorizationStateWaitCode(DataInput input) throws IOException {
if (input.readBoolean()) {
if (AuthenticationCodeInfo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.codeInfo = new AuthenticationCodeInfo(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.codeInfo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.codeInfo.serialize(output);
}
}
}
public static class AuthorizationStateWaitOtherDeviceConfirmation extends AuthorizationState {
public String link;
public static final int CONSTRUCTOR = 860166378;
public AuthorizationStateWaitOtherDeviceConfirmation() {}
public AuthorizationStateWaitOtherDeviceConfirmation(String link) {
this.link = link;
}
public AuthorizationStateWaitOtherDeviceConfirmation(DataInput input) throws IOException {
if (input.readBoolean()) {
var linkTmp = new byte[input.readInt()];
input.readFully(linkTmp);
this.link = new String(linkTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.link == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var linkTmp = this.link.getBytes(StandardCharsets.UTF_8);
output.writeInt(linkTmp.length);
output.write(linkTmp);
}
}
}
public static class AuthorizationStateWaitRegistration extends AuthorizationState {
public TermsOfService termsOfService;
public static final int CONSTRUCTOR = 550350511;
public AuthorizationStateWaitRegistration() {}
public AuthorizationStateWaitRegistration(TermsOfService termsOfService) {
this.termsOfService = termsOfService;
}
public AuthorizationStateWaitRegistration(DataInput input) throws IOException {
if (input.readBoolean()) {
if (TermsOfService.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.termsOfService = new TermsOfService(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.termsOfService == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.termsOfService.serialize(output);
}
}
}
public static class AuthorizationStateWaitPassword extends AuthorizationState {
public String passwordHint;
public boolean hasRecoveryEmailAddress;
public String recoveryEmailAddressPattern;
public static final int CONSTRUCTOR = 187548796;
public AuthorizationStateWaitPassword() {}
public AuthorizationStateWaitPassword(String passwordHint, boolean hasRecoveryEmailAddress, String recoveryEmailAddressPattern) {
this.passwordHint = passwordHint;
this.hasRecoveryEmailAddress = hasRecoveryEmailAddress;
this.recoveryEmailAddressPattern = recoveryEmailAddressPattern;
}
public AuthorizationStateWaitPassword(DataInput input) throws IOException {
if (input.readBoolean()) {
var passwordHintTmp = new byte[input.readInt()];
input.readFully(passwordHintTmp);
this.passwordHint = new String(passwordHintTmp, StandardCharsets.UTF_8);
}
this.hasRecoveryEmailAddress = input.readBoolean();
if (input.readBoolean()) {
var recoveryEmailAddressPatternTmp = new byte[input.readInt()];
input.readFully(recoveryEmailAddressPatternTmp);
this.recoveryEmailAddressPattern = new String(recoveryEmailAddressPatternTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.passwordHint == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var passwordHintTmp = this.passwordHint.getBytes(StandardCharsets.UTF_8);
output.writeInt(passwordHintTmp.length);
output.write(passwordHintTmp);
}
output.writeBoolean(this.hasRecoveryEmailAddress);
if (this.recoveryEmailAddressPattern == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var recoveryEmailAddressPatternTmp = this.recoveryEmailAddressPattern.getBytes(StandardCharsets.UTF_8);
output.writeInt(recoveryEmailAddressPatternTmp.length);
output.write(recoveryEmailAddressPatternTmp);
}
}
}
public static class AuthorizationStateReady extends AuthorizationState {
public static final int CONSTRUCTOR = -1834871737;
public AuthorizationStateReady() {}
public AuthorizationStateReady(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class AuthorizationStateLoggingOut extends AuthorizationState {
public static final int CONSTRUCTOR = 154449270;
public AuthorizationStateLoggingOut() {}
public AuthorizationStateLoggingOut(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class AuthorizationStateClosing extends AuthorizationState {
public static final int CONSTRUCTOR = 445855311;
public AuthorizationStateClosing() {}
public AuthorizationStateClosing(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class AuthorizationStateClosed extends AuthorizationState {
public static final int CONSTRUCTOR = 1526047584;
public AuthorizationStateClosed() {}
public AuthorizationStateClosed(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class AutoDownloadSettings extends Object {
public boolean isAutoDownloadEnabled;
public int maxPhotoFileSize;
public int maxVideoFileSize;
public int maxOtherFileSize;
public int videoUploadBitrate;
public boolean preloadLargeVideos;
public boolean preloadNextAudio;
public boolean useLessDataForCalls;
public static final int CONSTRUCTOR = -2144418333;
public AutoDownloadSettings() {}
public AutoDownloadSettings(boolean isAutoDownloadEnabled, int maxPhotoFileSize, int maxVideoFileSize, int maxOtherFileSize, int videoUploadBitrate, boolean preloadLargeVideos, boolean preloadNextAudio, boolean useLessDataForCalls) {
this.isAutoDownloadEnabled = isAutoDownloadEnabled;
this.maxPhotoFileSize = maxPhotoFileSize;
this.maxVideoFileSize = maxVideoFileSize;
this.maxOtherFileSize = maxOtherFileSize;
this.videoUploadBitrate = videoUploadBitrate;
this.preloadLargeVideos = preloadLargeVideos;
this.preloadNextAudio = preloadNextAudio;
this.useLessDataForCalls = useLessDataForCalls;
}
public AutoDownloadSettings(DataInput input) throws IOException {
this.isAutoDownloadEnabled = input.readBoolean();
this.maxPhotoFileSize = input.readInt();
this.maxVideoFileSize = input.readInt();
this.maxOtherFileSize = input.readInt();
this.videoUploadBitrate = input.readInt();
this.preloadLargeVideos = input.readBoolean();
this.preloadNextAudio = input.readBoolean();
this.useLessDataForCalls = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isAutoDownloadEnabled);
output.writeInt(this.maxPhotoFileSize);
output.writeInt(this.maxVideoFileSize);
output.writeInt(this.maxOtherFileSize);
output.writeInt(this.videoUploadBitrate);
output.writeBoolean(this.preloadLargeVideos);
output.writeBoolean(this.preloadNextAudio);
output.writeBoolean(this.useLessDataForCalls);
}
}
public static class AutoDownloadSettingsPresets extends Object {
public AutoDownloadSettings low;
public AutoDownloadSettings medium;
public AutoDownloadSettings high;
public static final int CONSTRUCTOR = -782099166;
public AutoDownloadSettingsPresets() {}
public AutoDownloadSettingsPresets(AutoDownloadSettings low, AutoDownloadSettings medium, AutoDownloadSettings high) {
this.low = low;
this.medium = medium;
this.high = high;
}
public AutoDownloadSettingsPresets(DataInput input) throws IOException {
if (input.readBoolean()) {
if (AutoDownloadSettings.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.low = new AutoDownloadSettings(input);
}
if (input.readBoolean()) {
if (AutoDownloadSettings.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.medium = new AutoDownloadSettings(input);
}
if (input.readBoolean()) {
if (AutoDownloadSettings.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.high = new AutoDownloadSettings(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.low == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.low.serialize(output);
}
if (this.medium == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.medium.serialize(output);
}
if (this.high == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.high.serialize(output);
}
}
}
public static class Background extends Object {
public long id;
public boolean isDefault;
public boolean isDark;
public String name;
public Document document;
public BackgroundType type;
public static final int CONSTRUCTOR = -429971172;
public Background() {}
public Background(long id, boolean isDefault, boolean isDark, String name, Document document, BackgroundType type) {
this.id = id;
this.isDefault = isDefault;
this.isDark = isDark;
this.name = name;
this.document = document;
this.type = type;
}
public Background(DataInput input) throws IOException {
this.id = input.readLong();
this.isDefault = input.readBoolean();
this.isDark = input.readBoolean();
if (input.readBoolean()) {
var nameTmp = new byte[input.readInt()];
input.readFully(nameTmp);
this.name = new String(nameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Document.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.document = new Document(input);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case BackgroundTypeWallpaper.CONSTRUCTOR:
this.type = new BackgroundTypeWallpaper(input);
break;
case BackgroundTypePattern.CONSTRUCTOR:
this.type = new BackgroundTypePattern(input);
break;
case BackgroundTypeFill.CONSTRUCTOR:
this.type = new BackgroundTypeFill(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.id);
output.writeBoolean(this.isDefault);
output.writeBoolean(this.isDark);
if (this.name == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nameTmp = this.name.getBytes(StandardCharsets.UTF_8);
output.writeInt(nameTmp.length);
output.write(nameTmp);
}
if (this.document == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.document.serialize(output);
}
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
}
}
public static class BackgroundFillSolid extends BackgroundFill {
public int color;
public static final int CONSTRUCTOR = 1010678813;
public BackgroundFillSolid() {}
public BackgroundFillSolid(int color) {
this.color = color;
}
public BackgroundFillSolid(DataInput input) throws IOException {
this.color = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.color);
}
}
public static class BackgroundFillGradient extends BackgroundFill {
public int topColor;
public int bottomColor;
public int rotationAngle;
public static final int CONSTRUCTOR = -1839206017;
public BackgroundFillGradient() {}
public BackgroundFillGradient(int topColor, int bottomColor, int rotationAngle) {
this.topColor = topColor;
this.bottomColor = bottomColor;
this.rotationAngle = rotationAngle;
}
public BackgroundFillGradient(DataInput input) throws IOException {
this.topColor = input.readInt();
this.bottomColor = input.readInt();
this.rotationAngle = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.topColor);
output.writeInt(this.bottomColor);
output.writeInt(this.rotationAngle);
}
}
public static class BackgroundTypeWallpaper extends BackgroundType {
public boolean isBlurred;
public boolean isMoving;
public static final int CONSTRUCTOR = 1972128891;
public BackgroundTypeWallpaper() {}
public BackgroundTypeWallpaper(boolean isBlurred, boolean isMoving) {
this.isBlurred = isBlurred;
this.isMoving = isMoving;
}
public BackgroundTypeWallpaper(DataInput input) throws IOException {
this.isBlurred = input.readBoolean();
this.isMoving = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isBlurred);
output.writeBoolean(this.isMoving);
}
}
public static class BackgroundTypePattern extends BackgroundType {
public BackgroundFill fill;
public int intensity;
public boolean isMoving;
public static final int CONSTRUCTOR = 649993914;
public BackgroundTypePattern() {}
public BackgroundTypePattern(BackgroundFill fill, int intensity, boolean isMoving) {
this.fill = fill;
this.intensity = intensity;
this.isMoving = isMoving;
}
public BackgroundTypePattern(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case BackgroundFillSolid.CONSTRUCTOR:
this.fill = new BackgroundFillSolid(input);
break;
case BackgroundFillGradient.CONSTRUCTOR:
this.fill = new BackgroundFillGradient(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.intensity = input.readInt();
this.isMoving = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.fill == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.fill.serialize(output);
}
output.writeInt(this.intensity);
output.writeBoolean(this.isMoving);
}
}
public static class BackgroundTypeFill extends BackgroundType {
public BackgroundFill fill;
public static final int CONSTRUCTOR = 993008684;
public BackgroundTypeFill() {}
public BackgroundTypeFill(BackgroundFill fill) {
this.fill = fill;
}
public BackgroundTypeFill(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case BackgroundFillSolid.CONSTRUCTOR:
this.fill = new BackgroundFillSolid(input);
break;
case BackgroundFillGradient.CONSTRUCTOR:
this.fill = new BackgroundFillGradient(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.fill == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.fill.serialize(output);
}
}
}
public static class Backgrounds extends Object {
public Background[] backgrounds;
public static final int CONSTRUCTOR = 724728704;
public Backgrounds() {}
public Backgrounds(Background[] backgrounds) {
this.backgrounds = backgrounds;
}
public Backgrounds(DataInput input) throws IOException {
if (input.readBoolean()) {
this.backgrounds = new Background[input.readInt()];
for (int i = 0; i < this.backgrounds.length; i++) {
if (Background.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.backgrounds[i] = new Background(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.backgrounds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.backgrounds.length);
for (int i = 0; i < this.backgrounds.length; i++) {
this.backgrounds[i].serialize(output);
}
}
}
}
public static class BankCardActionOpenUrl extends Object {
public String text;
public String url;
public static final int CONSTRUCTOR = -196454267;
public BankCardActionOpenUrl() {}
public BankCardActionOpenUrl(String text, String url) {
this.text = text;
this.url = url;
}
public BankCardActionOpenUrl(DataInput input) throws IOException {
if (input.readBoolean()) {
var textTmp = new byte[input.readInt()];
input.readFully(textTmp);
this.text = new String(textTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var textTmp = this.text.getBytes(StandardCharsets.UTF_8);
output.writeInt(textTmp.length);
output.write(textTmp);
}
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
}
}
public static class BankCardInfo extends Object {
public String title;
public BankCardActionOpenUrl[] actions;
public static final int CONSTRUCTOR = -2116647730;
public BankCardInfo() {}
public BankCardInfo(String title, BankCardActionOpenUrl[] actions) {
this.title = title;
this.actions = actions;
}
public BankCardInfo(DataInput input) throws IOException {
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
this.actions = new BankCardActionOpenUrl[input.readInt()];
for (int i = 0; i < this.actions.length; i++) {
if (BankCardActionOpenUrl.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.actions[i] = new BankCardActionOpenUrl(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.actions == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.actions.length);
for (int i = 0; i < this.actions.length; i++) {
this.actions[i].serialize(output);
}
}
}
}
public static class BasicGroup extends Object {
public int id;
public int memberCount;
public ChatMemberStatus status;
public boolean isActive;
public int upgradedToSupergroupId;
public static final int CONSTRUCTOR = -317839045;
public BasicGroup() {}
public BasicGroup(int id, int memberCount, ChatMemberStatus status, boolean isActive, int upgradedToSupergroupId) {
this.id = id;
this.memberCount = memberCount;
this.status = status;
this.isActive = isActive;
this.upgradedToSupergroupId = upgradedToSupergroupId;
}
public BasicGroup(DataInput input) throws IOException {
this.id = input.readInt();
this.memberCount = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatMemberStatusCreator.CONSTRUCTOR:
this.status = new ChatMemberStatusCreator(input);
break;
case ChatMemberStatusAdministrator.CONSTRUCTOR:
this.status = new ChatMemberStatusAdministrator(input);
break;
case ChatMemberStatusMember.CONSTRUCTOR:
this.status = new ChatMemberStatusMember(input);
break;
case ChatMemberStatusRestricted.CONSTRUCTOR:
this.status = new ChatMemberStatusRestricted(input);
break;
case ChatMemberStatusLeft.CONSTRUCTOR:
this.status = new ChatMemberStatusLeft(input);
break;
case ChatMemberStatusBanned.CONSTRUCTOR:
this.status = new ChatMemberStatusBanned(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.isActive = input.readBoolean();
this.upgradedToSupergroupId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.id);
output.writeInt(this.memberCount);
if (this.status == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.status.serialize(output);
}
output.writeBoolean(this.isActive);
output.writeInt(this.upgradedToSupergroupId);
}
}
public static class BasicGroupFullInfo extends Object {
public String description;
public int creatorUserId;
public ChatMember[] members;
public String inviteLink;
public static final int CONSTRUCTOR = 161500149;
public BasicGroupFullInfo() {}
public BasicGroupFullInfo(String description, int creatorUserId, ChatMember[] members, String inviteLink) {
this.description = description;
this.creatorUserId = creatorUserId;
this.members = members;
this.inviteLink = inviteLink;
}
public BasicGroupFullInfo(DataInput input) throws IOException {
if (input.readBoolean()) {
var descriptionTmp = new byte[input.readInt()];
input.readFully(descriptionTmp);
this.description = new String(descriptionTmp, StandardCharsets.UTF_8);
}
this.creatorUserId = input.readInt();
if (input.readBoolean()) {
this.members = new ChatMember[input.readInt()];
for (int i = 0; i < this.members.length; i++) {
if (ChatMember.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.members[i] = new ChatMember(input);
}
}
if (input.readBoolean()) {
var inviteLinkTmp = new byte[input.readInt()];
input.readFully(inviteLinkTmp);
this.inviteLink = new String(inviteLinkTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.description == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var descriptionTmp = this.description.getBytes(StandardCharsets.UTF_8);
output.writeInt(descriptionTmp.length);
output.write(descriptionTmp);
}
output.writeInt(this.creatorUserId);
if (this.members == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.members.length);
for (int i = 0; i < this.members.length; i++) {
this.members[i].serialize(output);
}
}
if (this.inviteLink == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var inviteLinkTmp = this.inviteLink.getBytes(StandardCharsets.UTF_8);
output.writeInt(inviteLinkTmp.length);
output.write(inviteLinkTmp);
}
}
}
public static class BotCommand extends Object {
public String command;
public String description;
public static final int CONSTRUCTOR = -1032140601;
public BotCommand() {}
public BotCommand(String command, String description) {
this.command = command;
this.description = description;
}
public BotCommand(DataInput input) throws IOException {
if (input.readBoolean()) {
var commandTmp = new byte[input.readInt()];
input.readFully(commandTmp);
this.command = new String(commandTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var descriptionTmp = new byte[input.readInt()];
input.readFully(descriptionTmp);
this.description = new String(descriptionTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.command == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var commandTmp = this.command.getBytes(StandardCharsets.UTF_8);
output.writeInt(commandTmp.length);
output.write(commandTmp);
}
if (this.description == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var descriptionTmp = this.description.getBytes(StandardCharsets.UTF_8);
output.writeInt(descriptionTmp.length);
output.write(descriptionTmp);
}
}
}
public static class BotInfo extends Object {
public String description;
public BotCommand[] commands;
public static final int CONSTRUCTOR = 1296528907;
public BotInfo() {}
public BotInfo(String description, BotCommand[] commands) {
this.description = description;
this.commands = commands;
}
public BotInfo(DataInput input) throws IOException {
if (input.readBoolean()) {
var descriptionTmp = new byte[input.readInt()];
input.readFully(descriptionTmp);
this.description = new String(descriptionTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
this.commands = new BotCommand[input.readInt()];
for (int i = 0; i < this.commands.length; i++) {
if (BotCommand.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.commands[i] = new BotCommand(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.description == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var descriptionTmp = this.description.getBytes(StandardCharsets.UTF_8);
output.writeInt(descriptionTmp.length);
output.write(descriptionTmp);
}
if (this.commands == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.commands.length);
for (int i = 0; i < this.commands.length; i++) {
this.commands[i].serialize(output);
}
}
}
}
public static class Call extends Object {
public int id;
public int userId;
public boolean isOutgoing;
public CallState state;
public static final int CONSTRUCTOR = -1837599107;
public Call() {}
public Call(int id, int userId, boolean isOutgoing, CallState state) {
this.id = id;
this.userId = userId;
this.isOutgoing = isOutgoing;
this.state = state;
}
public Call(DataInput input) throws IOException {
this.id = input.readInt();
this.userId = input.readInt();
this.isOutgoing = input.readBoolean();
if (input.readBoolean()) {
switch(input.readInt()) {
case CallStatePending.CONSTRUCTOR:
this.state = new CallStatePending(input);
break;
case CallStateExchangingKeys.CONSTRUCTOR:
this.state = new CallStateExchangingKeys(input);
break;
case CallStateReady.CONSTRUCTOR:
this.state = new CallStateReady(input);
break;
case CallStateHangingUp.CONSTRUCTOR:
this.state = new CallStateHangingUp(input);
break;
case CallStateDiscarded.CONSTRUCTOR:
this.state = new CallStateDiscarded(input);
break;
case CallStateError.CONSTRUCTOR:
this.state = new CallStateError(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.id);
output.writeInt(this.userId);
output.writeBoolean(this.isOutgoing);
if (this.state == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.state.serialize(output);
}
}
}
public static class CallConnection extends Object {
public long id;
public String ip;
public String ipv6;
public int port;
public byte[] peerTag;
public static final int CONSTRUCTOR = 1318542714;
public CallConnection() {}
public CallConnection(long id, String ip, String ipv6, int port, byte[] peerTag) {
this.id = id;
this.ip = ip;
this.ipv6 = ipv6;
this.port = port;
this.peerTag = peerTag;
}
public CallConnection(DataInput input) throws IOException {
this.id = input.readLong();
if (input.readBoolean()) {
var ipTmp = new byte[input.readInt()];
input.readFully(ipTmp);
this.ip = new String(ipTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var ipv6Tmp = new byte[input.readInt()];
input.readFully(ipv6Tmp);
this.ipv6 = new String(ipv6Tmp, StandardCharsets.UTF_8);
}
this.port = input.readInt();
if (input.readBoolean()) {
this.peerTag = new byte[input.readInt()];
input.readFully(this.peerTag);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.id);
if (this.ip == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var ipTmp = this.ip.getBytes(StandardCharsets.UTF_8);
output.writeInt(ipTmp.length);
output.write(ipTmp);
}
if (this.ipv6 == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var ipv6Tmp = this.ipv6.getBytes(StandardCharsets.UTF_8);
output.writeInt(ipv6Tmp.length);
output.write(ipv6Tmp);
}
output.writeInt(this.port);
if (this.peerTag == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.peerTag.length);
output.write(this.peerTag);
}
}
}
public static class CallDiscardReasonEmpty extends CallDiscardReason {
public static final int CONSTRUCTOR = -1258917949;
public CallDiscardReasonEmpty() {}
public CallDiscardReasonEmpty(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CallDiscardReasonMissed extends CallDiscardReason {
public static final int CONSTRUCTOR = 1680358012;
public CallDiscardReasonMissed() {}
public CallDiscardReasonMissed(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CallDiscardReasonDeclined extends CallDiscardReason {
public static final int CONSTRUCTOR = -1729926094;
public CallDiscardReasonDeclined() {}
public CallDiscardReasonDeclined(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CallDiscardReasonDisconnected extends CallDiscardReason {
public static final int CONSTRUCTOR = -1342872670;
public CallDiscardReasonDisconnected() {}
public CallDiscardReasonDisconnected(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CallDiscardReasonHungUp extends CallDiscardReason {
public static final int CONSTRUCTOR = 438216166;
public CallDiscardReasonHungUp() {}
public CallDiscardReasonHungUp(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CallId extends Object {
public int id;
public static final int CONSTRUCTOR = 65717769;
public CallId() {}
public CallId(int id) {
this.id = id;
}
public CallId(DataInput input) throws IOException {
this.id = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.id);
}
}
public static class CallProblemEcho extends CallProblem {
public static final int CONSTRUCTOR = 801116548;
public CallProblemEcho() {}
public CallProblemEcho(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CallProblemNoise extends CallProblem {
public static final int CONSTRUCTOR = 1053065359;
public CallProblemNoise() {}
public CallProblemNoise(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CallProblemInterruptions extends CallProblem {
public static final int CONSTRUCTOR = 1119493218;
public CallProblemInterruptions() {}
public CallProblemInterruptions(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CallProblemDistortedSpeech extends CallProblem {
public static final int CONSTRUCTOR = 379960581;
public CallProblemDistortedSpeech() {}
public CallProblemDistortedSpeech(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CallProblemSilentLocal extends CallProblem {
public static final int CONSTRUCTOR = 253652790;
public CallProblemSilentLocal() {}
public CallProblemSilentLocal(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CallProblemSilentRemote extends CallProblem {
public static final int CONSTRUCTOR = 573634714;
public CallProblemSilentRemote() {}
public CallProblemSilentRemote(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CallProblemDropped extends CallProblem {
public static final int CONSTRUCTOR = -1207311487;
public CallProblemDropped() {}
public CallProblemDropped(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CallProtocol extends Object {
public boolean udpP2p;
public boolean udpReflector;
public int minLayer;
public int maxLayer;
public String[] libraryVersions;
public static final int CONSTRUCTOR = -1075562897;
public CallProtocol() {}
public CallProtocol(boolean udpP2p, boolean udpReflector, int minLayer, int maxLayer, String[] libraryVersions) {
this.udpP2p = udpP2p;
this.udpReflector = udpReflector;
this.minLayer = minLayer;
this.maxLayer = maxLayer;
this.libraryVersions = libraryVersions;
}
public CallProtocol(DataInput input) throws IOException {
this.udpP2p = input.readBoolean();
this.udpReflector = input.readBoolean();
this.minLayer = input.readInt();
this.maxLayer = input.readInt();
if (input.readBoolean()) {
this.libraryVersions = new String[input.readInt()];
for (int i = 0; i < this.libraryVersions.length; i++) {
var libraryVersionsTmp = new byte[input.readInt()];
input.readFully(libraryVersionsTmp);
this.libraryVersions[i] = new String(libraryVersionsTmp, StandardCharsets.UTF_8);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.udpP2p);
output.writeBoolean(this.udpReflector);
output.writeInt(this.minLayer);
output.writeInt(this.maxLayer);
if (this.libraryVersions == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.libraryVersions.length);
for (int i = 0; i < this.libraryVersions.length; i++) {
var libraryVersionsTmp = this.libraryVersions[i].getBytes(StandardCharsets.UTF_8);
output.writeInt(libraryVersionsTmp.length);
output.write(libraryVersionsTmp);
}
}
}
}
public static class CallStatePending extends CallState {
public boolean isCreated;
public boolean isReceived;
public static final int CONSTRUCTOR = 1073048620;
public CallStatePending() {}
public CallStatePending(boolean isCreated, boolean isReceived) {
this.isCreated = isCreated;
this.isReceived = isReceived;
}
public CallStatePending(DataInput input) throws IOException {
this.isCreated = input.readBoolean();
this.isReceived = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isCreated);
output.writeBoolean(this.isReceived);
}
}
public static class CallStateExchangingKeys extends CallState {
public static final int CONSTRUCTOR = -1848149403;
public CallStateExchangingKeys() {}
public CallStateExchangingKeys(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CallStateReady extends CallState {
public CallProtocol protocol;
public CallConnection[] connections;
public String config;
public byte[] encryptionKey;
public String[] emojis;
public boolean allowP2p;
public static final int CONSTRUCTOR = 1848397705;
public CallStateReady() {}
public CallStateReady(CallProtocol protocol, CallConnection[] connections, String config, byte[] encryptionKey, String[] emojis, boolean allowP2p) {
this.protocol = protocol;
this.connections = connections;
this.config = config;
this.encryptionKey = encryptionKey;
this.emojis = emojis;
this.allowP2p = allowP2p;
}
public CallStateReady(DataInput input) throws IOException {
if (input.readBoolean()) {
if (CallProtocol.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.protocol = new CallProtocol(input);
}
if (input.readBoolean()) {
this.connections = new CallConnection[input.readInt()];
for (int i = 0; i < this.connections.length; i++) {
if (CallConnection.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.connections[i] = new CallConnection(input);
}
}
if (input.readBoolean()) {
var configTmp = new byte[input.readInt()];
input.readFully(configTmp);
this.config = new String(configTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
this.encryptionKey = new byte[input.readInt()];
input.readFully(this.encryptionKey);
}
if (input.readBoolean()) {
this.emojis = new String[input.readInt()];
for (int i = 0; i < this.emojis.length; i++) {
var emojisTmp = new byte[input.readInt()];
input.readFully(emojisTmp);
this.emojis[i] = new String(emojisTmp, StandardCharsets.UTF_8);
}
}
this.allowP2p = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.protocol == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.protocol.serialize(output);
}
if (this.connections == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.connections.length);
for (int i = 0; i < this.connections.length; i++) {
this.connections[i].serialize(output);
}
}
if (this.config == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var configTmp = this.config.getBytes(StandardCharsets.UTF_8);
output.writeInt(configTmp.length);
output.write(configTmp);
}
if (this.encryptionKey == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.encryptionKey.length);
output.write(this.encryptionKey);
}
if (this.emojis == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.emojis.length);
for (int i = 0; i < this.emojis.length; i++) {
var emojisTmp = this.emojis[i].getBytes(StandardCharsets.UTF_8);
output.writeInt(emojisTmp.length);
output.write(emojisTmp);
}
}
output.writeBoolean(this.allowP2p);
}
}
public static class CallStateHangingUp extends CallState {
public static final int CONSTRUCTOR = -2133790038;
public CallStateHangingUp() {}
public CallStateHangingUp(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CallStateDiscarded extends CallState {
public CallDiscardReason reason;
public boolean needRating;
public boolean needDebugInformation;
public static final int CONSTRUCTOR = -190853167;
public CallStateDiscarded() {}
public CallStateDiscarded(CallDiscardReason reason, boolean needRating, boolean needDebugInformation) {
this.reason = reason;
this.needRating = needRating;
this.needDebugInformation = needDebugInformation;
}
public CallStateDiscarded(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case CallDiscardReasonEmpty.CONSTRUCTOR:
this.reason = new CallDiscardReasonEmpty(input);
break;
case CallDiscardReasonMissed.CONSTRUCTOR:
this.reason = new CallDiscardReasonMissed(input);
break;
case CallDiscardReasonDeclined.CONSTRUCTOR:
this.reason = new CallDiscardReasonDeclined(input);
break;
case CallDiscardReasonDisconnected.CONSTRUCTOR:
this.reason = new CallDiscardReasonDisconnected(input);
break;
case CallDiscardReasonHungUp.CONSTRUCTOR:
this.reason = new CallDiscardReasonHungUp(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.needRating = input.readBoolean();
this.needDebugInformation = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.reason == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.reason.serialize(output);
}
output.writeBoolean(this.needRating);
output.writeBoolean(this.needDebugInformation);
}
}
public static class CallStateError extends CallState {
public Error error;
public static final int CONSTRUCTOR = -975215467;
public CallStateError() {}
public CallStateError(Error error) {
this.error = error;
}
public CallStateError(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Error.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.error = new Error(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.error == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.error.serialize(output);
}
}
}
public static class CallbackQueryAnswer extends Object {
public String text;
public boolean showAlert;
public String url;
public static final int CONSTRUCTOR = 360867933;
public CallbackQueryAnswer() {}
public CallbackQueryAnswer(String text, boolean showAlert, String url) {
this.text = text;
this.showAlert = showAlert;
this.url = url;
}
public CallbackQueryAnswer(DataInput input) throws IOException {
if (input.readBoolean()) {
var textTmp = new byte[input.readInt()];
input.readFully(textTmp);
this.text = new String(textTmp, StandardCharsets.UTF_8);
}
this.showAlert = input.readBoolean();
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var textTmp = this.text.getBytes(StandardCharsets.UTF_8);
output.writeInt(textTmp.length);
output.write(textTmp);
}
output.writeBoolean(this.showAlert);
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
}
}
public static class CallbackQueryPayloadData extends CallbackQueryPayload {
public byte[] data;
public static final int CONSTRUCTOR = -1977729946;
public CallbackQueryPayloadData() {}
public CallbackQueryPayloadData(byte[] data) {
this.data = data;
}
public CallbackQueryPayloadData(DataInput input) throws IOException {
if (input.readBoolean()) {
this.data = new byte[input.readInt()];
input.readFully(this.data);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.data == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.data.length);
output.write(this.data);
}
}
}
public static class CallbackQueryPayloadGame extends CallbackQueryPayload {
public String gameShortName;
public static final int CONSTRUCTOR = 1303571512;
public CallbackQueryPayloadGame() {}
public CallbackQueryPayloadGame(String gameShortName) {
this.gameShortName = gameShortName;
}
public CallbackQueryPayloadGame(DataInput input) throws IOException {
if (input.readBoolean()) {
var gameShortNameTmp = new byte[input.readInt()];
input.readFully(gameShortNameTmp);
this.gameShortName = new String(gameShortNameTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.gameShortName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var gameShortNameTmp = this.gameShortName.getBytes(StandardCharsets.UTF_8);
output.writeInt(gameShortNameTmp.length);
output.write(gameShortNameTmp);
}
}
}
public static class CanTransferOwnershipResultOk extends CanTransferOwnershipResult {
public static final int CONSTRUCTOR = -89881021;
public CanTransferOwnershipResultOk() {}
public CanTransferOwnershipResultOk(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CanTransferOwnershipResultPasswordNeeded extends CanTransferOwnershipResult {
public static final int CONSTRUCTOR = 1548372703;
public CanTransferOwnershipResultPasswordNeeded() {}
public CanTransferOwnershipResultPasswordNeeded(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CanTransferOwnershipResultPasswordTooFresh extends CanTransferOwnershipResult {
public int retryAfter;
public static final int CONSTRUCTOR = 811440913;
public CanTransferOwnershipResultPasswordTooFresh() {}
public CanTransferOwnershipResultPasswordTooFresh(int retryAfter) {
this.retryAfter = retryAfter;
}
public CanTransferOwnershipResultPasswordTooFresh(DataInput input) throws IOException {
this.retryAfter = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.retryAfter);
}
}
public static class CanTransferOwnershipResultSessionTooFresh extends CanTransferOwnershipResult {
public int retryAfter;
public static final int CONSTRUCTOR = 984664289;
public CanTransferOwnershipResultSessionTooFresh() {}
public CanTransferOwnershipResultSessionTooFresh(int retryAfter) {
this.retryAfter = retryAfter;
}
public CanTransferOwnershipResultSessionTooFresh(DataInput input) throws IOException {
this.retryAfter = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.retryAfter);
}
}
public static class Chat extends Object {
public long id;
public ChatType type;
public ChatList chatList;
public String title;
public ChatPhoto photo;
public ChatPermissions permissions;
public Message lastMessage;
public long order;
public boolean isPinned;
public boolean isMarkedAsUnread;
public boolean isSponsored;
public boolean hasScheduledMessages;
public boolean canBeDeletedOnlyForSelf;
public boolean canBeDeletedForAllUsers;
public boolean canBeReported;
public boolean defaultDisableNotification;
public int unreadCount;
public long lastReadInboxMessageId;
public long lastReadOutboxMessageId;
public int unreadMentionCount;
public ChatNotificationSettings notificationSettings;
public ChatActionBar actionBar;
public long pinnedMessageId;
public long replyMarkupMessageId;
public DraftMessage draftMessage;
public String clientData;
public static final int CONSTRUCTOR = -861487386;
public Chat() {}
public Chat(long id, ChatType type, ChatList chatList, String title, ChatPhoto photo, ChatPermissions permissions, Message lastMessage, long order, boolean isPinned, boolean isMarkedAsUnread, boolean isSponsored, boolean hasScheduledMessages, boolean canBeDeletedOnlyForSelf, boolean canBeDeletedForAllUsers, boolean canBeReported, boolean defaultDisableNotification, int unreadCount, long lastReadInboxMessageId, long lastReadOutboxMessageId, int unreadMentionCount, ChatNotificationSettings notificationSettings, ChatActionBar actionBar, long pinnedMessageId, long replyMarkupMessageId, DraftMessage draftMessage, String clientData) {
this.id = id;
this.type = type;
this.chatList = chatList;
this.title = title;
this.photo = photo;
this.permissions = permissions;
this.lastMessage = lastMessage;
this.order = order;
this.isPinned = isPinned;
this.isMarkedAsUnread = isMarkedAsUnread;
this.isSponsored = isSponsored;
this.hasScheduledMessages = hasScheduledMessages;
this.canBeDeletedOnlyForSelf = canBeDeletedOnlyForSelf;
this.canBeDeletedForAllUsers = canBeDeletedForAllUsers;
this.canBeReported = canBeReported;
this.defaultDisableNotification = defaultDisableNotification;
this.unreadCount = unreadCount;
this.lastReadInboxMessageId = lastReadInboxMessageId;
this.lastReadOutboxMessageId = lastReadOutboxMessageId;
this.unreadMentionCount = unreadMentionCount;
this.notificationSettings = notificationSettings;
this.actionBar = actionBar;
this.pinnedMessageId = pinnedMessageId;
this.replyMarkupMessageId = replyMarkupMessageId;
this.draftMessage = draftMessage;
this.clientData = clientData;
}
public Chat(DataInput input) throws IOException {
this.id = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatTypePrivate.CONSTRUCTOR:
this.type = new ChatTypePrivate(input);
break;
case ChatTypeBasicGroup.CONSTRUCTOR:
this.type = new ChatTypeBasicGroup(input);
break;
case ChatTypeSupergroup.CONSTRUCTOR:
this.type = new ChatTypeSupergroup(input);
break;
case ChatTypeSecret.CONSTRUCTOR:
this.type = new ChatTypeSecret(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatListMain.CONSTRUCTOR:
this.chatList = new ChatListMain(input);
break;
case ChatListArchive.CONSTRUCTOR:
this.chatList = new ChatListArchive(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (ChatPhoto.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.photo = new ChatPhoto(input);
}
if (input.readBoolean()) {
if (ChatPermissions.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.permissions = new ChatPermissions(input);
}
if (input.readBoolean()) {
if (Message.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.lastMessage = new Message(input);
}
this.order = input.readLong();
this.isPinned = input.readBoolean();
this.isMarkedAsUnread = input.readBoolean();
this.isSponsored = input.readBoolean();
this.hasScheduledMessages = input.readBoolean();
this.canBeDeletedOnlyForSelf = input.readBoolean();
this.canBeDeletedForAllUsers = input.readBoolean();
this.canBeReported = input.readBoolean();
this.defaultDisableNotification = input.readBoolean();
this.unreadCount = input.readInt();
this.lastReadInboxMessageId = input.readLong();
this.lastReadOutboxMessageId = input.readLong();
this.unreadMentionCount = input.readInt();
if (input.readBoolean()) {
if (ChatNotificationSettings.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.notificationSettings = new ChatNotificationSettings(input);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatActionBarReportSpam.CONSTRUCTOR:
this.actionBar = new ChatActionBarReportSpam(input);
break;
case ChatActionBarReportUnrelatedLocation.CONSTRUCTOR:
this.actionBar = new ChatActionBarReportUnrelatedLocation(input);
break;
case ChatActionBarReportAddBlock.CONSTRUCTOR:
this.actionBar = new ChatActionBarReportAddBlock(input);
break;
case ChatActionBarAddContact.CONSTRUCTOR:
this.actionBar = new ChatActionBarAddContact(input);
break;
case ChatActionBarSharePhoneNumber.CONSTRUCTOR:
this.actionBar = new ChatActionBarSharePhoneNumber(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.pinnedMessageId = input.readLong();
this.replyMarkupMessageId = input.readLong();
if (input.readBoolean()) {
if (DraftMessage.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.draftMessage = new DraftMessage(input);
}
if (input.readBoolean()) {
var clientDataTmp = new byte[input.readInt()];
input.readFully(clientDataTmp);
this.clientData = new String(clientDataTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.id);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
if (this.chatList == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.chatList.serialize(output);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.photo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.photo.serialize(output);
}
if (this.permissions == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.permissions.serialize(output);
}
if (this.lastMessage == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.lastMessage.serialize(output);
}
output.writeLong(this.order);
output.writeBoolean(this.isPinned);
output.writeBoolean(this.isMarkedAsUnread);
output.writeBoolean(this.isSponsored);
output.writeBoolean(this.hasScheduledMessages);
output.writeBoolean(this.canBeDeletedOnlyForSelf);
output.writeBoolean(this.canBeDeletedForAllUsers);
output.writeBoolean(this.canBeReported);
output.writeBoolean(this.defaultDisableNotification);
output.writeInt(this.unreadCount);
output.writeLong(this.lastReadInboxMessageId);
output.writeLong(this.lastReadOutboxMessageId);
output.writeInt(this.unreadMentionCount);
if (this.notificationSettings == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.notificationSettings.serialize(output);
}
if (this.actionBar == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.actionBar.serialize(output);
}
output.writeLong(this.pinnedMessageId);
output.writeLong(this.replyMarkupMessageId);
if (this.draftMessage == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.draftMessage.serialize(output);
}
if (this.clientData == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var clientDataTmp = this.clientData.getBytes(StandardCharsets.UTF_8);
output.writeInt(clientDataTmp.length);
output.write(clientDataTmp);
}
}
}
public static class ChatActionTyping extends ChatAction {
public static final int CONSTRUCTOR = 380122167;
public ChatActionTyping() {}
public ChatActionTyping(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatActionRecordingVideo extends ChatAction {
public static final int CONSTRUCTOR = 216553362;
public ChatActionRecordingVideo() {}
public ChatActionRecordingVideo(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatActionUploadingVideo extends ChatAction {
public int progress;
public static final int CONSTRUCTOR = 1234185270;
public ChatActionUploadingVideo() {}
public ChatActionUploadingVideo(int progress) {
this.progress = progress;
}
public ChatActionUploadingVideo(DataInput input) throws IOException {
this.progress = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.progress);
}
}
public static class ChatActionRecordingVoiceNote extends ChatAction {
public static final int CONSTRUCTOR = -808850058;
public ChatActionRecordingVoiceNote() {}
public ChatActionRecordingVoiceNote(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatActionUploadingVoiceNote extends ChatAction {
public int progress;
public static final int CONSTRUCTOR = -613643666;
public ChatActionUploadingVoiceNote() {}
public ChatActionUploadingVoiceNote(int progress) {
this.progress = progress;
}
public ChatActionUploadingVoiceNote(DataInput input) throws IOException {
this.progress = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.progress);
}
}
public static class ChatActionUploadingPhoto extends ChatAction {
public int progress;
public static final int CONSTRUCTOR = 654240583;
public ChatActionUploadingPhoto() {}
public ChatActionUploadingPhoto(int progress) {
this.progress = progress;
}
public ChatActionUploadingPhoto(DataInput input) throws IOException {
this.progress = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.progress);
}
}
public static class ChatActionUploadingDocument extends ChatAction {
public int progress;
public static final int CONSTRUCTOR = 167884362;
public ChatActionUploadingDocument() {}
public ChatActionUploadingDocument(int progress) {
this.progress = progress;
}
public ChatActionUploadingDocument(DataInput input) throws IOException {
this.progress = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.progress);
}
}
public static class ChatActionChoosingLocation extends ChatAction {
public static final int CONSTRUCTOR = -2017893596;
public ChatActionChoosingLocation() {}
public ChatActionChoosingLocation(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatActionChoosingContact extends ChatAction {
public static final int CONSTRUCTOR = -1222507496;
public ChatActionChoosingContact() {}
public ChatActionChoosingContact(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatActionStartPlayingGame extends ChatAction {
public static final int CONSTRUCTOR = -865884164;
public ChatActionStartPlayingGame() {}
public ChatActionStartPlayingGame(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatActionRecordingVideoNote extends ChatAction {
public static final int CONSTRUCTOR = 16523393;
public ChatActionRecordingVideoNote() {}
public ChatActionRecordingVideoNote(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatActionUploadingVideoNote extends ChatAction {
public int progress;
public static final int CONSTRUCTOR = 1172364918;
public ChatActionUploadingVideoNote() {}
public ChatActionUploadingVideoNote(int progress) {
this.progress = progress;
}
public ChatActionUploadingVideoNote(DataInput input) throws IOException {
this.progress = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.progress);
}
}
public static class ChatActionCancel extends ChatAction {
public static final int CONSTRUCTOR = 1160523958;
public ChatActionCancel() {}
public ChatActionCancel(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatActionBarReportSpam extends ChatActionBar {
public static final int CONSTRUCTOR = -1603417249;
public ChatActionBarReportSpam() {}
public ChatActionBarReportSpam(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatActionBarReportUnrelatedLocation extends ChatActionBar {
public static final int CONSTRUCTOR = 758175489;
public ChatActionBarReportUnrelatedLocation() {}
public ChatActionBarReportUnrelatedLocation(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatActionBarReportAddBlock extends ChatActionBar {
public static final int CONSTRUCTOR = -87894249;
public ChatActionBarReportAddBlock() {}
public ChatActionBarReportAddBlock(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatActionBarAddContact extends ChatActionBar {
public static final int CONSTRUCTOR = -733325295;
public ChatActionBarAddContact() {}
public ChatActionBarAddContact(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatActionBarSharePhoneNumber extends ChatActionBar {
public static final int CONSTRUCTOR = 35188697;
public ChatActionBarSharePhoneNumber() {}
public ChatActionBarSharePhoneNumber(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatAdministrator extends Object {
public int userId;
public String customTitle;
public boolean isOwner;
public static final int CONSTRUCTOR = 487220942;
public ChatAdministrator() {}
public ChatAdministrator(int userId, String customTitle, boolean isOwner) {
this.userId = userId;
this.customTitle = customTitle;
this.isOwner = isOwner;
}
public ChatAdministrator(DataInput input) throws IOException {
this.userId = input.readInt();
if (input.readBoolean()) {
var customTitleTmp = new byte[input.readInt()];
input.readFully(customTitleTmp);
this.customTitle = new String(customTitleTmp, StandardCharsets.UTF_8);
}
this.isOwner = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
if (this.customTitle == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var customTitleTmp = this.customTitle.getBytes(StandardCharsets.UTF_8);
output.writeInt(customTitleTmp.length);
output.write(customTitleTmp);
}
output.writeBoolean(this.isOwner);
}
}
public static class ChatAdministrators extends Object {
public ChatAdministrator[] administrators;
public static final int CONSTRUCTOR = -2126186435;
public ChatAdministrators() {}
public ChatAdministrators(ChatAdministrator[] administrators) {
this.administrators = administrators;
}
public ChatAdministrators(DataInput input) throws IOException {
if (input.readBoolean()) {
this.administrators = new ChatAdministrator[input.readInt()];
for (int i = 0; i < this.administrators.length; i++) {
if (ChatAdministrator.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.administrators[i] = new ChatAdministrator(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.administrators == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.administrators.length);
for (int i = 0; i < this.administrators.length; i++) {
this.administrators[i].serialize(output);
}
}
}
}
public static class ChatEvent extends Object {
public long id;
public int date;
public int userId;
public ChatEventAction action;
public static final int CONSTRUCTOR = -609912404;
public ChatEvent() {}
public ChatEvent(long id, int date, int userId, ChatEventAction action) {
this.id = id;
this.date = date;
this.userId = userId;
this.action = action;
}
public ChatEvent(DataInput input) throws IOException {
this.id = input.readLong();
this.date = input.readInt();
this.userId = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatEventMessageEdited.CONSTRUCTOR:
this.action = new ChatEventMessageEdited(input);
break;
case ChatEventMessageDeleted.CONSTRUCTOR:
this.action = new ChatEventMessageDeleted(input);
break;
case ChatEventPollStopped.CONSTRUCTOR:
this.action = new ChatEventPollStopped(input);
break;
case ChatEventMessagePinned.CONSTRUCTOR:
this.action = new ChatEventMessagePinned(input);
break;
case ChatEventMessageUnpinned.CONSTRUCTOR:
this.action = new ChatEventMessageUnpinned(input);
break;
case ChatEventMemberJoined.CONSTRUCTOR:
this.action = new ChatEventMemberJoined(input);
break;
case ChatEventMemberLeft.CONSTRUCTOR:
this.action = new ChatEventMemberLeft(input);
break;
case ChatEventMemberInvited.CONSTRUCTOR:
this.action = new ChatEventMemberInvited(input);
break;
case ChatEventMemberPromoted.CONSTRUCTOR:
this.action = new ChatEventMemberPromoted(input);
break;
case ChatEventMemberRestricted.CONSTRUCTOR:
this.action = new ChatEventMemberRestricted(input);
break;
case ChatEventTitleChanged.CONSTRUCTOR:
this.action = new ChatEventTitleChanged(input);
break;
case ChatEventPermissionsChanged.CONSTRUCTOR:
this.action = new ChatEventPermissionsChanged(input);
break;
case ChatEventDescriptionChanged.CONSTRUCTOR:
this.action = new ChatEventDescriptionChanged(input);
break;
case ChatEventUsernameChanged.CONSTRUCTOR:
this.action = new ChatEventUsernameChanged(input);
break;
case ChatEventPhotoChanged.CONSTRUCTOR:
this.action = new ChatEventPhotoChanged(input);
break;
case ChatEventInvitesToggled.CONSTRUCTOR:
this.action = new ChatEventInvitesToggled(input);
break;
case ChatEventLinkedChatChanged.CONSTRUCTOR:
this.action = new ChatEventLinkedChatChanged(input);
break;
case ChatEventSlowModeDelayChanged.CONSTRUCTOR:
this.action = new ChatEventSlowModeDelayChanged(input);
break;
case ChatEventSignMessagesToggled.CONSTRUCTOR:
this.action = new ChatEventSignMessagesToggled(input);
break;
case ChatEventStickerSetChanged.CONSTRUCTOR:
this.action = new ChatEventStickerSetChanged(input);
break;
case ChatEventLocationChanged.CONSTRUCTOR:
this.action = new ChatEventLocationChanged(input);
break;
case ChatEventIsAllHistoryAvailableToggled.CONSTRUCTOR:
this.action = new ChatEventIsAllHistoryAvailableToggled(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.id);
output.writeInt(this.date);
output.writeInt(this.userId);
if (this.action == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.action.serialize(output);
}
}
}
public static class ChatEventMessageEdited extends ChatEventAction {
public Message oldMessage;
public Message newMessage;
public static final int CONSTRUCTOR = -430967304;
public ChatEventMessageEdited() {}
public ChatEventMessageEdited(Message oldMessage, Message newMessage) {
this.oldMessage = oldMessage;
this.newMessage = newMessage;
}
public ChatEventMessageEdited(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Message.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.oldMessage = new Message(input);
}
if (input.readBoolean()) {
if (Message.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.newMessage = new Message(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.oldMessage == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.oldMessage.serialize(output);
}
if (this.newMessage == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.newMessage.serialize(output);
}
}
}
public static class ChatEventMessageDeleted extends ChatEventAction {
public Message message;
public static final int CONSTRUCTOR = -892974601;
public ChatEventMessageDeleted() {}
public ChatEventMessageDeleted(Message message) {
this.message = message;
}
public ChatEventMessageDeleted(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Message.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.message = new Message(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.message == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.message.serialize(output);
}
}
}
public static class ChatEventPollStopped extends ChatEventAction {
public Message message;
public static final int CONSTRUCTOR = 2009893861;
public ChatEventPollStopped() {}
public ChatEventPollStopped(Message message) {
this.message = message;
}
public ChatEventPollStopped(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Message.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.message = new Message(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.message == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.message.serialize(output);
}
}
}
public static class ChatEventMessagePinned extends ChatEventAction {
public Message message;
public static final int CONSTRUCTOR = 438742298;
public ChatEventMessagePinned() {}
public ChatEventMessagePinned(Message message) {
this.message = message;
}
public ChatEventMessagePinned(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Message.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.message = new Message(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.message == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.message.serialize(output);
}
}
}
public static class ChatEventMessageUnpinned extends ChatEventAction {
public static final int CONSTRUCTOR = 2002594849;
public ChatEventMessageUnpinned() {}
public ChatEventMessageUnpinned(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatEventMemberJoined extends ChatEventAction {
public static final int CONSTRUCTOR = -235468508;
public ChatEventMemberJoined() {}
public ChatEventMemberJoined(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatEventMemberLeft extends ChatEventAction {
public static final int CONSTRUCTOR = -948420593;
public ChatEventMemberLeft() {}
public ChatEventMemberLeft(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatEventMemberInvited extends ChatEventAction {
public int userId;
public ChatMemberStatus status;
public static final int CONSTRUCTOR = -2093688706;
public ChatEventMemberInvited() {}
public ChatEventMemberInvited(int userId, ChatMemberStatus status) {
this.userId = userId;
this.status = status;
}
public ChatEventMemberInvited(DataInput input) throws IOException {
this.userId = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatMemberStatusCreator.CONSTRUCTOR:
this.status = new ChatMemberStatusCreator(input);
break;
case ChatMemberStatusAdministrator.CONSTRUCTOR:
this.status = new ChatMemberStatusAdministrator(input);
break;
case ChatMemberStatusMember.CONSTRUCTOR:
this.status = new ChatMemberStatusMember(input);
break;
case ChatMemberStatusRestricted.CONSTRUCTOR:
this.status = new ChatMemberStatusRestricted(input);
break;
case ChatMemberStatusLeft.CONSTRUCTOR:
this.status = new ChatMemberStatusLeft(input);
break;
case ChatMemberStatusBanned.CONSTRUCTOR:
this.status = new ChatMemberStatusBanned(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
if (this.status == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.status.serialize(output);
}
}
}
public static class ChatEventMemberPromoted extends ChatEventAction {
public int userId;
public ChatMemberStatus oldStatus;
public ChatMemberStatus newStatus;
public static final int CONSTRUCTOR = 1887176186;
public ChatEventMemberPromoted() {}
public ChatEventMemberPromoted(int userId, ChatMemberStatus oldStatus, ChatMemberStatus newStatus) {
this.userId = userId;
this.oldStatus = oldStatus;
this.newStatus = newStatus;
}
public ChatEventMemberPromoted(DataInput input) throws IOException {
this.userId = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatMemberStatusCreator.CONSTRUCTOR:
this.oldStatus = new ChatMemberStatusCreator(input);
break;
case ChatMemberStatusAdministrator.CONSTRUCTOR:
this.oldStatus = new ChatMemberStatusAdministrator(input);
break;
case ChatMemberStatusMember.CONSTRUCTOR:
this.oldStatus = new ChatMemberStatusMember(input);
break;
case ChatMemberStatusRestricted.CONSTRUCTOR:
this.oldStatus = new ChatMemberStatusRestricted(input);
break;
case ChatMemberStatusLeft.CONSTRUCTOR:
this.oldStatus = new ChatMemberStatusLeft(input);
break;
case ChatMemberStatusBanned.CONSTRUCTOR:
this.oldStatus = new ChatMemberStatusBanned(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatMemberStatusCreator.CONSTRUCTOR:
this.newStatus = new ChatMemberStatusCreator(input);
break;
case ChatMemberStatusAdministrator.CONSTRUCTOR:
this.newStatus = new ChatMemberStatusAdministrator(input);
break;
case ChatMemberStatusMember.CONSTRUCTOR:
this.newStatus = new ChatMemberStatusMember(input);
break;
case ChatMemberStatusRestricted.CONSTRUCTOR:
this.newStatus = new ChatMemberStatusRestricted(input);
break;
case ChatMemberStatusLeft.CONSTRUCTOR:
this.newStatus = new ChatMemberStatusLeft(input);
break;
case ChatMemberStatusBanned.CONSTRUCTOR:
this.newStatus = new ChatMemberStatusBanned(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
if (this.oldStatus == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.oldStatus.serialize(output);
}
if (this.newStatus == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.newStatus.serialize(output);
}
}
}
public static class ChatEventMemberRestricted extends ChatEventAction {
public int userId;
public ChatMemberStatus oldStatus;
public ChatMemberStatus newStatus;
public static final int CONSTRUCTOR = 584946294;
public ChatEventMemberRestricted() {}
public ChatEventMemberRestricted(int userId, ChatMemberStatus oldStatus, ChatMemberStatus newStatus) {
this.userId = userId;
this.oldStatus = oldStatus;
this.newStatus = newStatus;
}
public ChatEventMemberRestricted(DataInput input) throws IOException {
this.userId = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatMemberStatusCreator.CONSTRUCTOR:
this.oldStatus = new ChatMemberStatusCreator(input);
break;
case ChatMemberStatusAdministrator.CONSTRUCTOR:
this.oldStatus = new ChatMemberStatusAdministrator(input);
break;
case ChatMemberStatusMember.CONSTRUCTOR:
this.oldStatus = new ChatMemberStatusMember(input);
break;
case ChatMemberStatusRestricted.CONSTRUCTOR:
this.oldStatus = new ChatMemberStatusRestricted(input);
break;
case ChatMemberStatusLeft.CONSTRUCTOR:
this.oldStatus = new ChatMemberStatusLeft(input);
break;
case ChatMemberStatusBanned.CONSTRUCTOR:
this.oldStatus = new ChatMemberStatusBanned(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatMemberStatusCreator.CONSTRUCTOR:
this.newStatus = new ChatMemberStatusCreator(input);
break;
case ChatMemberStatusAdministrator.CONSTRUCTOR:
this.newStatus = new ChatMemberStatusAdministrator(input);
break;
case ChatMemberStatusMember.CONSTRUCTOR:
this.newStatus = new ChatMemberStatusMember(input);
break;
case ChatMemberStatusRestricted.CONSTRUCTOR:
this.newStatus = new ChatMemberStatusRestricted(input);
break;
case ChatMemberStatusLeft.CONSTRUCTOR:
this.newStatus = new ChatMemberStatusLeft(input);
break;
case ChatMemberStatusBanned.CONSTRUCTOR:
this.newStatus = new ChatMemberStatusBanned(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
if (this.oldStatus == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.oldStatus.serialize(output);
}
if (this.newStatus == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.newStatus.serialize(output);
}
}
}
public static class ChatEventTitleChanged extends ChatEventAction {
public String oldTitle;
public String newTitle;
public static final int CONSTRUCTOR = 1134103250;
public ChatEventTitleChanged() {}
public ChatEventTitleChanged(String oldTitle, String newTitle) {
this.oldTitle = oldTitle;
this.newTitle = newTitle;
}
public ChatEventTitleChanged(DataInput input) throws IOException {
if (input.readBoolean()) {
var oldTitleTmp = new byte[input.readInt()];
input.readFully(oldTitleTmp);
this.oldTitle = new String(oldTitleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var newTitleTmp = new byte[input.readInt()];
input.readFully(newTitleTmp);
this.newTitle = new String(newTitleTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.oldTitle == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var oldTitleTmp = this.oldTitle.getBytes(StandardCharsets.UTF_8);
output.writeInt(oldTitleTmp.length);
output.write(oldTitleTmp);
}
if (this.newTitle == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var newTitleTmp = this.newTitle.getBytes(StandardCharsets.UTF_8);
output.writeInt(newTitleTmp.length);
output.write(newTitleTmp);
}
}
}
public static class ChatEventPermissionsChanged extends ChatEventAction {
public ChatPermissions oldPermissions;
public ChatPermissions newPermissions;
public static final int CONSTRUCTOR = -1311557720;
public ChatEventPermissionsChanged() {}
public ChatEventPermissionsChanged(ChatPermissions oldPermissions, ChatPermissions newPermissions) {
this.oldPermissions = oldPermissions;
this.newPermissions = newPermissions;
}
public ChatEventPermissionsChanged(DataInput input) throws IOException {
if (input.readBoolean()) {
if (ChatPermissions.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.oldPermissions = new ChatPermissions(input);
}
if (input.readBoolean()) {
if (ChatPermissions.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.newPermissions = new ChatPermissions(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.oldPermissions == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.oldPermissions.serialize(output);
}
if (this.newPermissions == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.newPermissions.serialize(output);
}
}
}
public static class ChatEventDescriptionChanged extends ChatEventAction {
public String oldDescription;
public String newDescription;
public static final int CONSTRUCTOR = 39112478;
public ChatEventDescriptionChanged() {}
public ChatEventDescriptionChanged(String oldDescription, String newDescription) {
this.oldDescription = oldDescription;
this.newDescription = newDescription;
}
public ChatEventDescriptionChanged(DataInput input) throws IOException {
if (input.readBoolean()) {
var oldDescriptionTmp = new byte[input.readInt()];
input.readFully(oldDescriptionTmp);
this.oldDescription = new String(oldDescriptionTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var newDescriptionTmp = new byte[input.readInt()];
input.readFully(newDescriptionTmp);
this.newDescription = new String(newDescriptionTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.oldDescription == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var oldDescriptionTmp = this.oldDescription.getBytes(StandardCharsets.UTF_8);
output.writeInt(oldDescriptionTmp.length);
output.write(oldDescriptionTmp);
}
if (this.newDescription == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var newDescriptionTmp = this.newDescription.getBytes(StandardCharsets.UTF_8);
output.writeInt(newDescriptionTmp.length);
output.write(newDescriptionTmp);
}
}
}
public static class ChatEventUsernameChanged extends ChatEventAction {
public String oldUsername;
public String newUsername;
public static final int CONSTRUCTOR = 1728558443;
public ChatEventUsernameChanged() {}
public ChatEventUsernameChanged(String oldUsername, String newUsername) {
this.oldUsername = oldUsername;
this.newUsername = newUsername;
}
public ChatEventUsernameChanged(DataInput input) throws IOException {
if (input.readBoolean()) {
var oldUsernameTmp = new byte[input.readInt()];
input.readFully(oldUsernameTmp);
this.oldUsername = new String(oldUsernameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var newUsernameTmp = new byte[input.readInt()];
input.readFully(newUsernameTmp);
this.newUsername = new String(newUsernameTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.oldUsername == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var oldUsernameTmp = this.oldUsername.getBytes(StandardCharsets.UTF_8);
output.writeInt(oldUsernameTmp.length);
output.write(oldUsernameTmp);
}
if (this.newUsername == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var newUsernameTmp = this.newUsername.getBytes(StandardCharsets.UTF_8);
output.writeInt(newUsernameTmp.length);
output.write(newUsernameTmp);
}
}
}
public static class ChatEventPhotoChanged extends ChatEventAction {
public Photo oldPhoto;
public Photo newPhoto;
public static final int CONSTRUCTOR = 1037662734;
public ChatEventPhotoChanged() {}
public ChatEventPhotoChanged(Photo oldPhoto, Photo newPhoto) {
this.oldPhoto = oldPhoto;
this.newPhoto = newPhoto;
}
public ChatEventPhotoChanged(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Photo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.oldPhoto = new Photo(input);
}
if (input.readBoolean()) {
if (Photo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.newPhoto = new Photo(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.oldPhoto == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.oldPhoto.serialize(output);
}
if (this.newPhoto == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.newPhoto.serialize(output);
}
}
}
public static class ChatEventInvitesToggled extends ChatEventAction {
public boolean canInviteUsers;
public static final int CONSTRUCTOR = -62548373;
public ChatEventInvitesToggled() {}
public ChatEventInvitesToggled(boolean canInviteUsers) {
this.canInviteUsers = canInviteUsers;
}
public ChatEventInvitesToggled(DataInput input) throws IOException {
this.canInviteUsers = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.canInviteUsers);
}
}
public static class ChatEventLinkedChatChanged extends ChatEventAction {
public long oldLinkedChatId;
public long newLinkedChatId;
public static final int CONSTRUCTOR = 1797419439;
public ChatEventLinkedChatChanged() {}
public ChatEventLinkedChatChanged(long oldLinkedChatId, long newLinkedChatId) {
this.oldLinkedChatId = oldLinkedChatId;
this.newLinkedChatId = newLinkedChatId;
}
public ChatEventLinkedChatChanged(DataInput input) throws IOException {
this.oldLinkedChatId = input.readLong();
this.newLinkedChatId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.oldLinkedChatId);
output.writeLong(this.newLinkedChatId);
}
}
public static class ChatEventSlowModeDelayChanged extends ChatEventAction {
public int oldSlowModeDelay;
public int newSlowModeDelay;
public static final int CONSTRUCTOR = -1653195765;
public ChatEventSlowModeDelayChanged() {}
public ChatEventSlowModeDelayChanged(int oldSlowModeDelay, int newSlowModeDelay) {
this.oldSlowModeDelay = oldSlowModeDelay;
this.newSlowModeDelay = newSlowModeDelay;
}
public ChatEventSlowModeDelayChanged(DataInput input) throws IOException {
this.oldSlowModeDelay = input.readInt();
this.newSlowModeDelay = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.oldSlowModeDelay);
output.writeInt(this.newSlowModeDelay);
}
}
public static class ChatEventSignMessagesToggled extends ChatEventAction {
public boolean signMessages;
public static final int CONSTRUCTOR = -1313265634;
public ChatEventSignMessagesToggled() {}
public ChatEventSignMessagesToggled(boolean signMessages) {
this.signMessages = signMessages;
}
public ChatEventSignMessagesToggled(DataInput input) throws IOException {
this.signMessages = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.signMessages);
}
}
public static class ChatEventStickerSetChanged extends ChatEventAction {
public long oldStickerSetId;
public long newStickerSetId;
public static final int CONSTRUCTOR = -1243130481;
public ChatEventStickerSetChanged() {}
public ChatEventStickerSetChanged(long oldStickerSetId, long newStickerSetId) {
this.oldStickerSetId = oldStickerSetId;
this.newStickerSetId = newStickerSetId;
}
public ChatEventStickerSetChanged(DataInput input) throws IOException {
this.oldStickerSetId = input.readLong();
this.newStickerSetId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.oldStickerSetId);
output.writeLong(this.newStickerSetId);
}
}
public static class ChatEventLocationChanged extends ChatEventAction {
public ChatLocation oldLocation;
public ChatLocation newLocation;
public static final int CONSTRUCTOR = -405930674;
public ChatEventLocationChanged() {}
public ChatEventLocationChanged(ChatLocation oldLocation, ChatLocation newLocation) {
this.oldLocation = oldLocation;
this.newLocation = newLocation;
}
public ChatEventLocationChanged(DataInput input) throws IOException {
if (input.readBoolean()) {
if (ChatLocation.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.oldLocation = new ChatLocation(input);
}
if (input.readBoolean()) {
if (ChatLocation.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.newLocation = new ChatLocation(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.oldLocation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.oldLocation.serialize(output);
}
if (this.newLocation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.newLocation.serialize(output);
}
}
}
public static class ChatEventIsAllHistoryAvailableToggled extends ChatEventAction {
public boolean isAllHistoryAvailable;
public static final int CONSTRUCTOR = -1599063019;
public ChatEventIsAllHistoryAvailableToggled() {}
public ChatEventIsAllHistoryAvailableToggled(boolean isAllHistoryAvailable) {
this.isAllHistoryAvailable = isAllHistoryAvailable;
}
public ChatEventIsAllHistoryAvailableToggled(DataInput input) throws IOException {
this.isAllHistoryAvailable = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isAllHistoryAvailable);
}
}
public static class ChatEventLogFilters extends Object {
public boolean messageEdits;
public boolean messageDeletions;
public boolean messagePins;
public boolean memberJoins;
public boolean memberLeaves;
public boolean memberInvites;
public boolean memberPromotions;
public boolean memberRestrictions;
public boolean infoChanges;
public boolean settingChanges;
public static final int CONSTRUCTOR = 941939684;
public ChatEventLogFilters() {}
public ChatEventLogFilters(boolean messageEdits, boolean messageDeletions, boolean messagePins, boolean memberJoins, boolean memberLeaves, boolean memberInvites, boolean memberPromotions, boolean memberRestrictions, boolean infoChanges, boolean settingChanges) {
this.messageEdits = messageEdits;
this.messageDeletions = messageDeletions;
this.messagePins = messagePins;
this.memberJoins = memberJoins;
this.memberLeaves = memberLeaves;
this.memberInvites = memberInvites;
this.memberPromotions = memberPromotions;
this.memberRestrictions = memberRestrictions;
this.infoChanges = infoChanges;
this.settingChanges = settingChanges;
}
public ChatEventLogFilters(DataInput input) throws IOException {
this.messageEdits = input.readBoolean();
this.messageDeletions = input.readBoolean();
this.messagePins = input.readBoolean();
this.memberJoins = input.readBoolean();
this.memberLeaves = input.readBoolean();
this.memberInvites = input.readBoolean();
this.memberPromotions = input.readBoolean();
this.memberRestrictions = input.readBoolean();
this.infoChanges = input.readBoolean();
this.settingChanges = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.messageEdits);
output.writeBoolean(this.messageDeletions);
output.writeBoolean(this.messagePins);
output.writeBoolean(this.memberJoins);
output.writeBoolean(this.memberLeaves);
output.writeBoolean(this.memberInvites);
output.writeBoolean(this.memberPromotions);
output.writeBoolean(this.memberRestrictions);
output.writeBoolean(this.infoChanges);
output.writeBoolean(this.settingChanges);
}
}
public static class ChatEvents extends Object {
public ChatEvent[] events;
public static final int CONSTRUCTOR = -585329664;
public ChatEvents() {}
public ChatEvents(ChatEvent[] events) {
this.events = events;
}
public ChatEvents(DataInput input) throws IOException {
if (input.readBoolean()) {
this.events = new ChatEvent[input.readInt()];
for (int i = 0; i < this.events.length; i++) {
if (ChatEvent.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.events[i] = new ChatEvent(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.events == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.events.length);
for (int i = 0; i < this.events.length; i++) {
this.events[i].serialize(output);
}
}
}
}
public static class ChatInviteLink extends Object {
public String inviteLink;
public static final int CONSTRUCTOR = -882072492;
public ChatInviteLink() {}
public ChatInviteLink(String inviteLink) {
this.inviteLink = inviteLink;
}
public ChatInviteLink(DataInput input) throws IOException {
if (input.readBoolean()) {
var inviteLinkTmp = new byte[input.readInt()];
input.readFully(inviteLinkTmp);
this.inviteLink = new String(inviteLinkTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.inviteLink == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var inviteLinkTmp = this.inviteLink.getBytes(StandardCharsets.UTF_8);
output.writeInt(inviteLinkTmp.length);
output.write(inviteLinkTmp);
}
}
}
public static class ChatInviteLinkInfo extends Object {
public long chatId;
public ChatType type;
public String title;
public ChatPhoto photo;
public int memberCount;
public int[] memberUserIds;
public boolean isPublic;
public static final int CONSTRUCTOR = -323394424;
public ChatInviteLinkInfo() {}
public ChatInviteLinkInfo(long chatId, ChatType type, String title, ChatPhoto photo, int memberCount, int[] memberUserIds, boolean isPublic) {
this.chatId = chatId;
this.type = type;
this.title = title;
this.photo = photo;
this.memberCount = memberCount;
this.memberUserIds = memberUserIds;
this.isPublic = isPublic;
}
public ChatInviteLinkInfo(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatTypePrivate.CONSTRUCTOR:
this.type = new ChatTypePrivate(input);
break;
case ChatTypeBasicGroup.CONSTRUCTOR:
this.type = new ChatTypeBasicGroup(input);
break;
case ChatTypeSupergroup.CONSTRUCTOR:
this.type = new ChatTypeSupergroup(input);
break;
case ChatTypeSecret.CONSTRUCTOR:
this.type = new ChatTypeSecret(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (ChatPhoto.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.photo = new ChatPhoto(input);
}
this.memberCount = input.readInt();
if (input.readBoolean()) {
this.memberUserIds = new int[input.readInt()];
for (int i = 0; i < this.memberUserIds.length; i++) {
this.memberUserIds[i] = input.readInt();
}
}
this.isPublic = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.photo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.photo.serialize(output);
}
output.writeInt(this.memberCount);
if (this.memberUserIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.memberUserIds.length);
for (int i = 0; i < this.memberUserIds.length; i++) {
output.writeInt(this.memberUserIds[i]);
}
}
output.writeBoolean(this.isPublic);
}
}
public static class ChatListMain extends ChatList {
public static final int CONSTRUCTOR = -400991316;
public ChatListMain() {}
public ChatListMain(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatListArchive extends ChatList {
public static final int CONSTRUCTOR = 362770115;
public ChatListArchive() {}
public ChatListArchive(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatLocation extends Object {
public Location location;
public String address;
public static final int CONSTRUCTOR = -1566863583;
public ChatLocation() {}
public ChatLocation(Location location, String address) {
this.location = location;
this.address = address;
}
public ChatLocation(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Location.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.location = new Location(input);
}
if (input.readBoolean()) {
var addressTmp = new byte[input.readInt()];
input.readFully(addressTmp);
this.address = new String(addressTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.location == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.location.serialize(output);
}
if (this.address == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var addressTmp = this.address.getBytes(StandardCharsets.UTF_8);
output.writeInt(addressTmp.length);
output.write(addressTmp);
}
}
}
public static class ChatMember extends Object {
public int userId;
public int inviterUserId;
public int joinedChatDate;
public ChatMemberStatus status;
public BotInfo botInfo;
public static final int CONSTRUCTOR = -806137076;
public ChatMember() {}
public ChatMember(int userId, int inviterUserId, int joinedChatDate, ChatMemberStatus status, BotInfo botInfo) {
this.userId = userId;
this.inviterUserId = inviterUserId;
this.joinedChatDate = joinedChatDate;
this.status = status;
this.botInfo = botInfo;
}
public ChatMember(DataInput input) throws IOException {
this.userId = input.readInt();
this.inviterUserId = input.readInt();
this.joinedChatDate = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatMemberStatusCreator.CONSTRUCTOR:
this.status = new ChatMemberStatusCreator(input);
break;
case ChatMemberStatusAdministrator.CONSTRUCTOR:
this.status = new ChatMemberStatusAdministrator(input);
break;
case ChatMemberStatusMember.CONSTRUCTOR:
this.status = new ChatMemberStatusMember(input);
break;
case ChatMemberStatusRestricted.CONSTRUCTOR:
this.status = new ChatMemberStatusRestricted(input);
break;
case ChatMemberStatusLeft.CONSTRUCTOR:
this.status = new ChatMemberStatusLeft(input);
break;
case ChatMemberStatusBanned.CONSTRUCTOR:
this.status = new ChatMemberStatusBanned(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
if (BotInfo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.botInfo = new BotInfo(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
output.writeInt(this.inviterUserId);
output.writeInt(this.joinedChatDate);
if (this.status == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.status.serialize(output);
}
if (this.botInfo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.botInfo.serialize(output);
}
}
}
public static class ChatMemberStatusCreator extends ChatMemberStatus {
public String customTitle;
public boolean isMember;
public static final int CONSTRUCTOR = 2038475849;
public ChatMemberStatusCreator() {}
public ChatMemberStatusCreator(String customTitle, boolean isMember) {
this.customTitle = customTitle;
this.isMember = isMember;
}
public ChatMemberStatusCreator(DataInput input) throws IOException {
if (input.readBoolean()) {
var customTitleTmp = new byte[input.readInt()];
input.readFully(customTitleTmp);
this.customTitle = new String(customTitleTmp, StandardCharsets.UTF_8);
}
this.isMember = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.customTitle == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var customTitleTmp = this.customTitle.getBytes(StandardCharsets.UTF_8);
output.writeInt(customTitleTmp.length);
output.write(customTitleTmp);
}
output.writeBoolean(this.isMember);
}
}
public static class ChatMemberStatusAdministrator extends ChatMemberStatus {
public String customTitle;
public boolean canBeEdited;
public boolean canChangeInfo;
public boolean canPostMessages;
public boolean canEditMessages;
public boolean canDeleteMessages;
public boolean canInviteUsers;
public boolean canRestrictMembers;
public boolean canPinMessages;
public boolean canPromoteMembers;
public static final int CONSTRUCTOR = 1800612058;
public ChatMemberStatusAdministrator() {}
public ChatMemberStatusAdministrator(String customTitle, boolean canBeEdited, boolean canChangeInfo, boolean canPostMessages, boolean canEditMessages, boolean canDeleteMessages, boolean canInviteUsers, boolean canRestrictMembers, boolean canPinMessages, boolean canPromoteMembers) {
this.customTitle = customTitle;
this.canBeEdited = canBeEdited;
this.canChangeInfo = canChangeInfo;
this.canPostMessages = canPostMessages;
this.canEditMessages = canEditMessages;
this.canDeleteMessages = canDeleteMessages;
this.canInviteUsers = canInviteUsers;
this.canRestrictMembers = canRestrictMembers;
this.canPinMessages = canPinMessages;
this.canPromoteMembers = canPromoteMembers;
}
public ChatMemberStatusAdministrator(DataInput input) throws IOException {
if (input.readBoolean()) {
var customTitleTmp = new byte[input.readInt()];
input.readFully(customTitleTmp);
this.customTitle = new String(customTitleTmp, StandardCharsets.UTF_8);
}
this.canBeEdited = input.readBoolean();
this.canChangeInfo = input.readBoolean();
this.canPostMessages = input.readBoolean();
this.canEditMessages = input.readBoolean();
this.canDeleteMessages = input.readBoolean();
this.canInviteUsers = input.readBoolean();
this.canRestrictMembers = input.readBoolean();
this.canPinMessages = input.readBoolean();
this.canPromoteMembers = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.customTitle == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var customTitleTmp = this.customTitle.getBytes(StandardCharsets.UTF_8);
output.writeInt(customTitleTmp.length);
output.write(customTitleTmp);
}
output.writeBoolean(this.canBeEdited);
output.writeBoolean(this.canChangeInfo);
output.writeBoolean(this.canPostMessages);
output.writeBoolean(this.canEditMessages);
output.writeBoolean(this.canDeleteMessages);
output.writeBoolean(this.canInviteUsers);
output.writeBoolean(this.canRestrictMembers);
output.writeBoolean(this.canPinMessages);
output.writeBoolean(this.canPromoteMembers);
}
}
public static class ChatMemberStatusMember extends ChatMemberStatus {
public static final int CONSTRUCTOR = 844723285;
public ChatMemberStatusMember() {}
public ChatMemberStatusMember(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatMemberStatusRestricted extends ChatMemberStatus {
public boolean isMember;
public int restrictedUntilDate;
public ChatPermissions permissions;
public static final int CONSTRUCTOR = 1661432998;
public ChatMemberStatusRestricted() {}
public ChatMemberStatusRestricted(boolean isMember, int restrictedUntilDate, ChatPermissions permissions) {
this.isMember = isMember;
this.restrictedUntilDate = restrictedUntilDate;
this.permissions = permissions;
}
public ChatMemberStatusRestricted(DataInput input) throws IOException {
this.isMember = input.readBoolean();
this.restrictedUntilDate = input.readInt();
if (input.readBoolean()) {
if (ChatPermissions.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.permissions = new ChatPermissions(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isMember);
output.writeInt(this.restrictedUntilDate);
if (this.permissions == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.permissions.serialize(output);
}
}
}
public static class ChatMemberStatusLeft extends ChatMemberStatus {
public static final int CONSTRUCTOR = -5815259;
public ChatMemberStatusLeft() {}
public ChatMemberStatusLeft(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatMemberStatusBanned extends ChatMemberStatus {
public int bannedUntilDate;
public static final int CONSTRUCTOR = -1653518666;
public ChatMemberStatusBanned() {}
public ChatMemberStatusBanned(int bannedUntilDate) {
this.bannedUntilDate = bannedUntilDate;
}
public ChatMemberStatusBanned(DataInput input) throws IOException {
this.bannedUntilDate = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.bannedUntilDate);
}
}
public static class ChatMembers extends Object {
public int totalCount;
public ChatMember[] members;
public static final int CONSTRUCTOR = -497558622;
public ChatMembers() {}
public ChatMembers(int totalCount, ChatMember[] members) {
this.totalCount = totalCount;
this.members = members;
}
public ChatMembers(DataInput input) throws IOException {
this.totalCount = input.readInt();
if (input.readBoolean()) {
this.members = new ChatMember[input.readInt()];
for (int i = 0; i < this.members.length; i++) {
if (ChatMember.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.members[i] = new ChatMember(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.totalCount);
if (this.members == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.members.length);
for (int i = 0; i < this.members.length; i++) {
this.members[i].serialize(output);
}
}
}
}
public static class ChatMembersFilterContacts extends ChatMembersFilter {
public static final int CONSTRUCTOR = 1774485671;
public ChatMembersFilterContacts() {}
public ChatMembersFilterContacts(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatMembersFilterAdministrators extends ChatMembersFilter {
public static final int CONSTRUCTOR = -1266893796;
public ChatMembersFilterAdministrators() {}
public ChatMembersFilterAdministrators(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatMembersFilterMembers extends ChatMembersFilter {
public static final int CONSTRUCTOR = 670504342;
public ChatMembersFilterMembers() {}
public ChatMembersFilterMembers(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatMembersFilterRestricted extends ChatMembersFilter {
public static final int CONSTRUCTOR = 1256282813;
public ChatMembersFilterRestricted() {}
public ChatMembersFilterRestricted(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatMembersFilterBanned extends ChatMembersFilter {
public static final int CONSTRUCTOR = -1863102648;
public ChatMembersFilterBanned() {}
public ChatMembersFilterBanned(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatMembersFilterBots extends ChatMembersFilter {
public static final int CONSTRUCTOR = -1422567288;
public ChatMembersFilterBots() {}
public ChatMembersFilterBots(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatNearby extends Object {
public long chatId;
public int distance;
public static final int CONSTRUCTOR = 48120405;
public ChatNearby() {}
public ChatNearby(long chatId, int distance) {
this.chatId = chatId;
this.distance = distance;
}
public ChatNearby(DataInput input) throws IOException {
this.chatId = input.readLong();
this.distance = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeInt(this.distance);
}
}
public static class ChatNotificationSettings extends Object {
public boolean useDefaultMuteFor;
public int muteFor;
public boolean useDefaultSound;
public String sound;
public boolean useDefaultShowPreview;
public boolean showPreview;
public boolean useDefaultDisablePinnedMessageNotifications;
public boolean disablePinnedMessageNotifications;
public boolean useDefaultDisableMentionNotifications;
public boolean disableMentionNotifications;
public static final int CONSTRUCTOR = 1503183218;
public ChatNotificationSettings() {}
public ChatNotificationSettings(boolean useDefaultMuteFor, int muteFor, boolean useDefaultSound, String sound, boolean useDefaultShowPreview, boolean showPreview, boolean useDefaultDisablePinnedMessageNotifications, boolean disablePinnedMessageNotifications, boolean useDefaultDisableMentionNotifications, boolean disableMentionNotifications) {
this.useDefaultMuteFor = useDefaultMuteFor;
this.muteFor = muteFor;
this.useDefaultSound = useDefaultSound;
this.sound = sound;
this.useDefaultShowPreview = useDefaultShowPreview;
this.showPreview = showPreview;
this.useDefaultDisablePinnedMessageNotifications = useDefaultDisablePinnedMessageNotifications;
this.disablePinnedMessageNotifications = disablePinnedMessageNotifications;
this.useDefaultDisableMentionNotifications = useDefaultDisableMentionNotifications;
this.disableMentionNotifications = disableMentionNotifications;
}
public ChatNotificationSettings(DataInput input) throws IOException {
this.useDefaultMuteFor = input.readBoolean();
this.muteFor = input.readInt();
this.useDefaultSound = input.readBoolean();
if (input.readBoolean()) {
var soundTmp = new byte[input.readInt()];
input.readFully(soundTmp);
this.sound = new String(soundTmp, StandardCharsets.UTF_8);
}
this.useDefaultShowPreview = input.readBoolean();
this.showPreview = input.readBoolean();
this.useDefaultDisablePinnedMessageNotifications = input.readBoolean();
this.disablePinnedMessageNotifications = input.readBoolean();
this.useDefaultDisableMentionNotifications = input.readBoolean();
this.disableMentionNotifications = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.useDefaultMuteFor);
output.writeInt(this.muteFor);
output.writeBoolean(this.useDefaultSound);
if (this.sound == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var soundTmp = this.sound.getBytes(StandardCharsets.UTF_8);
output.writeInt(soundTmp.length);
output.write(soundTmp);
}
output.writeBoolean(this.useDefaultShowPreview);
output.writeBoolean(this.showPreview);
output.writeBoolean(this.useDefaultDisablePinnedMessageNotifications);
output.writeBoolean(this.disablePinnedMessageNotifications);
output.writeBoolean(this.useDefaultDisableMentionNotifications);
output.writeBoolean(this.disableMentionNotifications);
}
}
public static class ChatPermissions extends Object {
public boolean canSendMessages;
public boolean canSendMediaMessages;
public boolean canSendPolls;
public boolean canSendOtherMessages;
public boolean canAddWebPagePreviews;
public boolean canChangeInfo;
public boolean canInviteUsers;
public boolean canPinMessages;
public static final int CONSTRUCTOR = 1584650463;
public ChatPermissions() {}
public ChatPermissions(boolean canSendMessages, boolean canSendMediaMessages, boolean canSendPolls, boolean canSendOtherMessages, boolean canAddWebPagePreviews, boolean canChangeInfo, boolean canInviteUsers, boolean canPinMessages) {
this.canSendMessages = canSendMessages;
this.canSendMediaMessages = canSendMediaMessages;
this.canSendPolls = canSendPolls;
this.canSendOtherMessages = canSendOtherMessages;
this.canAddWebPagePreviews = canAddWebPagePreviews;
this.canChangeInfo = canChangeInfo;
this.canInviteUsers = canInviteUsers;
this.canPinMessages = canPinMessages;
}
public ChatPermissions(DataInput input) throws IOException {
this.canSendMessages = input.readBoolean();
this.canSendMediaMessages = input.readBoolean();
this.canSendPolls = input.readBoolean();
this.canSendOtherMessages = input.readBoolean();
this.canAddWebPagePreviews = input.readBoolean();
this.canChangeInfo = input.readBoolean();
this.canInviteUsers = input.readBoolean();
this.canPinMessages = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.canSendMessages);
output.writeBoolean(this.canSendMediaMessages);
output.writeBoolean(this.canSendPolls);
output.writeBoolean(this.canSendOtherMessages);
output.writeBoolean(this.canAddWebPagePreviews);
output.writeBoolean(this.canChangeInfo);
output.writeBoolean(this.canInviteUsers);
output.writeBoolean(this.canPinMessages);
}
}
public static class ChatPhoto extends Object {
public File small;
public File big;
public static final int CONSTRUCTOR = -217062456;
public ChatPhoto() {}
public ChatPhoto(File small, File big) {
this.small = small;
this.big = big;
}
public ChatPhoto(DataInput input) throws IOException {
if (input.readBoolean()) {
if (File.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.small = new File(input);
}
if (input.readBoolean()) {
if (File.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.big = new File(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.small == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.small.serialize(output);
}
if (this.big == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.big.serialize(output);
}
}
}
public static class ChatReportReasonSpam extends ChatReportReason {
public static final int CONSTRUCTOR = -510848863;
public ChatReportReasonSpam() {}
public ChatReportReasonSpam(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatReportReasonViolence extends ChatReportReason {
public static final int CONSTRUCTOR = -1330235395;
public ChatReportReasonViolence() {}
public ChatReportReasonViolence(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatReportReasonPornography extends ChatReportReason {
public static final int CONSTRUCTOR = 722614385;
public ChatReportReasonPornography() {}
public ChatReportReasonPornography(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatReportReasonChildAbuse extends ChatReportReason {
public static final int CONSTRUCTOR = -1070686531;
public ChatReportReasonChildAbuse() {}
public ChatReportReasonChildAbuse(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatReportReasonCopyright extends ChatReportReason {
public static final int CONSTRUCTOR = 986898080;
public ChatReportReasonCopyright() {}
public ChatReportReasonCopyright(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatReportReasonUnrelatedLocation extends ChatReportReason {
public static final int CONSTRUCTOR = 2632403;
public ChatReportReasonUnrelatedLocation() {}
public ChatReportReasonUnrelatedLocation(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ChatReportReasonCustom extends ChatReportReason {
public String text;
public static final int CONSTRUCTOR = 544575454;
public ChatReportReasonCustom() {}
public ChatReportReasonCustom(String text) {
this.text = text;
}
public ChatReportReasonCustom(DataInput input) throws IOException {
if (input.readBoolean()) {
var textTmp = new byte[input.readInt()];
input.readFully(textTmp);
this.text = new String(textTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var textTmp = this.text.getBytes(StandardCharsets.UTF_8);
output.writeInt(textTmp.length);
output.write(textTmp);
}
}
}
public static class ChatStatistics extends Object {
public DateRange period;
public StatisticsValue memberCount;
public StatisticsValue meanViewCount;
public StatisticsValue meanShareCount;
public double enabledNotificationsPercentage;
public StatisticsGraph memberCountGraph;
public StatisticsGraph joinGraph;
public StatisticsGraph muteGraph;
public StatisticsGraph viewCountByHourGraph;
public StatisticsGraph viewCountBySourceGraph;
public StatisticsGraph joinBySourceGraph;
public StatisticsGraph languageGraph;
public StatisticsGraph messageInteractionGraph;
public StatisticsGraph instantViewInteractionGraph;
public ChatStatisticsMessageInteractionCounters[] recentMessageInteractions;
public static final int CONSTRUCTOR = -1209139741;
public ChatStatistics() {}
public ChatStatistics(DateRange period, StatisticsValue memberCount, StatisticsValue meanViewCount, StatisticsValue meanShareCount, double enabledNotificationsPercentage, StatisticsGraph memberCountGraph, StatisticsGraph joinGraph, StatisticsGraph muteGraph, StatisticsGraph viewCountByHourGraph, StatisticsGraph viewCountBySourceGraph, StatisticsGraph joinBySourceGraph, StatisticsGraph languageGraph, StatisticsGraph messageInteractionGraph, StatisticsGraph instantViewInteractionGraph, ChatStatisticsMessageInteractionCounters[] recentMessageInteractions) {
this.period = period;
this.memberCount = memberCount;
this.meanViewCount = meanViewCount;
this.meanShareCount = meanShareCount;
this.enabledNotificationsPercentage = enabledNotificationsPercentage;
this.memberCountGraph = memberCountGraph;
this.joinGraph = joinGraph;
this.muteGraph = muteGraph;
this.viewCountByHourGraph = viewCountByHourGraph;
this.viewCountBySourceGraph = viewCountBySourceGraph;
this.joinBySourceGraph = joinBySourceGraph;
this.languageGraph = languageGraph;
this.messageInteractionGraph = messageInteractionGraph;
this.instantViewInteractionGraph = instantViewInteractionGraph;
this.recentMessageInteractions = recentMessageInteractions;
}
public ChatStatistics(DataInput input) throws IOException {
if (input.readBoolean()) {
if (DateRange.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.period = new DateRange(input);
}
if (input.readBoolean()) {
if (StatisticsValue.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.memberCount = new StatisticsValue(input);
}
if (input.readBoolean()) {
if (StatisticsValue.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.meanViewCount = new StatisticsValue(input);
}
if (input.readBoolean()) {
if (StatisticsValue.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.meanShareCount = new StatisticsValue(input);
}
this.enabledNotificationsPercentage = input.readDouble();
if (input.readBoolean()) {
switch(input.readInt()) {
case StatisticsGraphData.CONSTRUCTOR:
this.memberCountGraph = new StatisticsGraphData(input);
break;
case StatisticsGraphAsync.CONSTRUCTOR:
this.memberCountGraph = new StatisticsGraphAsync(input);
break;
case StatisticsGraphError.CONSTRUCTOR:
this.memberCountGraph = new StatisticsGraphError(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case StatisticsGraphData.CONSTRUCTOR:
this.joinGraph = new StatisticsGraphData(input);
break;
case StatisticsGraphAsync.CONSTRUCTOR:
this.joinGraph = new StatisticsGraphAsync(input);
break;
case StatisticsGraphError.CONSTRUCTOR:
this.joinGraph = new StatisticsGraphError(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case StatisticsGraphData.CONSTRUCTOR:
this.muteGraph = new StatisticsGraphData(input);
break;
case StatisticsGraphAsync.CONSTRUCTOR:
this.muteGraph = new StatisticsGraphAsync(input);
break;
case StatisticsGraphError.CONSTRUCTOR:
this.muteGraph = new StatisticsGraphError(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case StatisticsGraphData.CONSTRUCTOR:
this.viewCountByHourGraph = new StatisticsGraphData(input);
break;
case StatisticsGraphAsync.CONSTRUCTOR:
this.viewCountByHourGraph = new StatisticsGraphAsync(input);
break;
case StatisticsGraphError.CONSTRUCTOR:
this.viewCountByHourGraph = new StatisticsGraphError(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case StatisticsGraphData.CONSTRUCTOR:
this.viewCountBySourceGraph = new StatisticsGraphData(input);
break;
case StatisticsGraphAsync.CONSTRUCTOR:
this.viewCountBySourceGraph = new StatisticsGraphAsync(input);
break;
case StatisticsGraphError.CONSTRUCTOR:
this.viewCountBySourceGraph = new StatisticsGraphError(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case StatisticsGraphData.CONSTRUCTOR:
this.joinBySourceGraph = new StatisticsGraphData(input);
break;
case StatisticsGraphAsync.CONSTRUCTOR:
this.joinBySourceGraph = new StatisticsGraphAsync(input);
break;
case StatisticsGraphError.CONSTRUCTOR:
this.joinBySourceGraph = new StatisticsGraphError(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case StatisticsGraphData.CONSTRUCTOR:
this.languageGraph = new StatisticsGraphData(input);
break;
case StatisticsGraphAsync.CONSTRUCTOR:
this.languageGraph = new StatisticsGraphAsync(input);
break;
case StatisticsGraphError.CONSTRUCTOR:
this.languageGraph = new StatisticsGraphError(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case StatisticsGraphData.CONSTRUCTOR:
this.messageInteractionGraph = new StatisticsGraphData(input);
break;
case StatisticsGraphAsync.CONSTRUCTOR:
this.messageInteractionGraph = new StatisticsGraphAsync(input);
break;
case StatisticsGraphError.CONSTRUCTOR:
this.messageInteractionGraph = new StatisticsGraphError(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case StatisticsGraphData.CONSTRUCTOR:
this.instantViewInteractionGraph = new StatisticsGraphData(input);
break;
case StatisticsGraphAsync.CONSTRUCTOR:
this.instantViewInteractionGraph = new StatisticsGraphAsync(input);
break;
case StatisticsGraphError.CONSTRUCTOR:
this.instantViewInteractionGraph = new StatisticsGraphError(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
this.recentMessageInteractions = new ChatStatisticsMessageInteractionCounters[input.readInt()];
for (int i = 0; i < this.recentMessageInteractions.length; i++) {
if (ChatStatisticsMessageInteractionCounters.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.recentMessageInteractions[i] = new ChatStatisticsMessageInteractionCounters(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.period == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.period.serialize(output);
}
if (this.memberCount == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.memberCount.serialize(output);
}
if (this.meanViewCount == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.meanViewCount.serialize(output);
}
if (this.meanShareCount == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.meanShareCount.serialize(output);
}
output.writeDouble(this.enabledNotificationsPercentage);
if (this.memberCountGraph == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.memberCountGraph.serialize(output);
}
if (this.joinGraph == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.joinGraph.serialize(output);
}
if (this.muteGraph == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.muteGraph.serialize(output);
}
if (this.viewCountByHourGraph == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.viewCountByHourGraph.serialize(output);
}
if (this.viewCountBySourceGraph == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.viewCountBySourceGraph.serialize(output);
}
if (this.joinBySourceGraph == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.joinBySourceGraph.serialize(output);
}
if (this.languageGraph == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.languageGraph.serialize(output);
}
if (this.messageInteractionGraph == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.messageInteractionGraph.serialize(output);
}
if (this.instantViewInteractionGraph == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.instantViewInteractionGraph.serialize(output);
}
if (this.recentMessageInteractions == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.recentMessageInteractions.length);
for (int i = 0; i < this.recentMessageInteractions.length; i++) {
this.recentMessageInteractions[i].serialize(output);
}
}
}
}
public static class ChatStatisticsMessageInteractionCounters extends Object {
public long messageId;
public int viewCount;
public int forwardCount;
public static final int CONSTRUCTOR = 928223898;
public ChatStatisticsMessageInteractionCounters() {}
public ChatStatisticsMessageInteractionCounters(long messageId, int viewCount, int forwardCount) {
this.messageId = messageId;
this.viewCount = viewCount;
this.forwardCount = forwardCount;
}
public ChatStatisticsMessageInteractionCounters(DataInput input) throws IOException {
this.messageId = input.readLong();
this.viewCount = input.readInt();
this.forwardCount = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.messageId);
output.writeInt(this.viewCount);
output.writeInt(this.forwardCount);
}
}
public static class ChatTypePrivate extends ChatType {
public int userId;
public static final int CONSTRUCTOR = 1700720838;
public ChatTypePrivate() {}
public ChatTypePrivate(int userId) {
this.userId = userId;
}
public ChatTypePrivate(DataInput input) throws IOException {
this.userId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
}
}
public static class ChatTypeBasicGroup extends ChatType {
public int basicGroupId;
public static final int CONSTRUCTOR = 21815278;
public ChatTypeBasicGroup() {}
public ChatTypeBasicGroup(int basicGroupId) {
this.basicGroupId = basicGroupId;
}
public ChatTypeBasicGroup(DataInput input) throws IOException {
this.basicGroupId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.basicGroupId);
}
}
public static class ChatTypeSupergroup extends ChatType {
public int supergroupId;
public boolean isChannel;
public static final int CONSTRUCTOR = 955152366;
public ChatTypeSupergroup() {}
public ChatTypeSupergroup(int supergroupId, boolean isChannel) {
this.supergroupId = supergroupId;
this.isChannel = isChannel;
}
public ChatTypeSupergroup(DataInput input) throws IOException {
this.supergroupId = input.readInt();
this.isChannel = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.supergroupId);
output.writeBoolean(this.isChannel);
}
}
public static class ChatTypeSecret extends ChatType {
public int secretChatId;
public int userId;
public static final int CONSTRUCTOR = 136722563;
public ChatTypeSecret() {}
public ChatTypeSecret(int secretChatId, int userId) {
this.secretChatId = secretChatId;
this.userId = userId;
}
public ChatTypeSecret(DataInput input) throws IOException {
this.secretChatId = input.readInt();
this.userId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.secretChatId);
output.writeInt(this.userId);
}
}
public static class Chats extends Object {
public long[] chatIds;
public static final int CONSTRUCTOR = -1687756019;
public Chats() {}
public Chats(long[] chatIds) {
this.chatIds = chatIds;
}
public Chats(DataInput input) throws IOException {
if (input.readBoolean()) {
this.chatIds = new long[input.readInt()];
for (int i = 0; i < this.chatIds.length; i++) {
this.chatIds[i] = input.readLong();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.chatIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.chatIds.length);
for (int i = 0; i < this.chatIds.length; i++) {
output.writeLong(this.chatIds[i]);
}
}
}
}
public static class ChatsNearby extends Object {
public ChatNearby[] usersNearby;
public ChatNearby[] supergroupsNearby;
public static final int CONSTRUCTOR = 187746081;
public ChatsNearby() {}
public ChatsNearby(ChatNearby[] usersNearby, ChatNearby[] supergroupsNearby) {
this.usersNearby = usersNearby;
this.supergroupsNearby = supergroupsNearby;
}
public ChatsNearby(DataInput input) throws IOException {
if (input.readBoolean()) {
this.usersNearby = new ChatNearby[input.readInt()];
for (int i = 0; i < this.usersNearby.length; i++) {
if (ChatNearby.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.usersNearby[i] = new ChatNearby(input);
}
}
if (input.readBoolean()) {
this.supergroupsNearby = new ChatNearby[input.readInt()];
for (int i = 0; i < this.supergroupsNearby.length; i++) {
if (ChatNearby.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.supergroupsNearby[i] = new ChatNearby(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.usersNearby == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.usersNearby.length);
for (int i = 0; i < this.usersNearby.length; i++) {
this.usersNearby[i].serialize(output);
}
}
if (this.supergroupsNearby == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.supergroupsNearby.length);
for (int i = 0; i < this.supergroupsNearby.length; i++) {
this.supergroupsNearby[i].serialize(output);
}
}
}
}
public static class CheckChatUsernameResultOk extends CheckChatUsernameResult {
public static final int CONSTRUCTOR = -1498956964;
public CheckChatUsernameResultOk() {}
public CheckChatUsernameResultOk(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CheckChatUsernameResultUsernameInvalid extends CheckChatUsernameResult {
public static final int CONSTRUCTOR = -636979370;
public CheckChatUsernameResultUsernameInvalid() {}
public CheckChatUsernameResultUsernameInvalid(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CheckChatUsernameResultUsernameOccupied extends CheckChatUsernameResult {
public static final int CONSTRUCTOR = 1320892201;
public CheckChatUsernameResultUsernameOccupied() {}
public CheckChatUsernameResultUsernameOccupied(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CheckChatUsernameResultPublicChatsTooMuch extends CheckChatUsernameResult {
public static final int CONSTRUCTOR = 858247741;
public CheckChatUsernameResultPublicChatsTooMuch() {}
public CheckChatUsernameResultPublicChatsTooMuch(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CheckChatUsernameResultPublicGroupsUnavailable extends CheckChatUsernameResult {
public static final int CONSTRUCTOR = -51833641;
public CheckChatUsernameResultPublicGroupsUnavailable() {}
public CheckChatUsernameResultPublicGroupsUnavailable(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ConnectedWebsite extends Object {
public long id;
public String domainName;
public int botUserId;
public String browser;
public String platform;
public int logInDate;
public int lastActiveDate;
public String ip;
public String location;
public static final int CONSTRUCTOR = -1538986855;
public ConnectedWebsite() {}
public ConnectedWebsite(long id, String domainName, int botUserId, String browser, String platform, int logInDate, int lastActiveDate, String ip, String location) {
this.id = id;
this.domainName = domainName;
this.botUserId = botUserId;
this.browser = browser;
this.platform = platform;
this.logInDate = logInDate;
this.lastActiveDate = lastActiveDate;
this.ip = ip;
this.location = location;
}
public ConnectedWebsite(DataInput input) throws IOException {
this.id = input.readLong();
if (input.readBoolean()) {
var domainNameTmp = new byte[input.readInt()];
input.readFully(domainNameTmp);
this.domainName = new String(domainNameTmp, StandardCharsets.UTF_8);
}
this.botUserId = input.readInt();
if (input.readBoolean()) {
var browserTmp = new byte[input.readInt()];
input.readFully(browserTmp);
this.browser = new String(browserTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var platformTmp = new byte[input.readInt()];
input.readFully(platformTmp);
this.platform = new String(platformTmp, StandardCharsets.UTF_8);
}
this.logInDate = input.readInt();
this.lastActiveDate = input.readInt();
if (input.readBoolean()) {
var ipTmp = new byte[input.readInt()];
input.readFully(ipTmp);
this.ip = new String(ipTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var locationTmp = new byte[input.readInt()];
input.readFully(locationTmp);
this.location = new String(locationTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.id);
if (this.domainName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var domainNameTmp = this.domainName.getBytes(StandardCharsets.UTF_8);
output.writeInt(domainNameTmp.length);
output.write(domainNameTmp);
}
output.writeInt(this.botUserId);
if (this.browser == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var browserTmp = this.browser.getBytes(StandardCharsets.UTF_8);
output.writeInt(browserTmp.length);
output.write(browserTmp);
}
if (this.platform == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var platformTmp = this.platform.getBytes(StandardCharsets.UTF_8);
output.writeInt(platformTmp.length);
output.write(platformTmp);
}
output.writeInt(this.logInDate);
output.writeInt(this.lastActiveDate);
if (this.ip == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var ipTmp = this.ip.getBytes(StandardCharsets.UTF_8);
output.writeInt(ipTmp.length);
output.write(ipTmp);
}
if (this.location == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var locationTmp = this.location.getBytes(StandardCharsets.UTF_8);
output.writeInt(locationTmp.length);
output.write(locationTmp);
}
}
}
public static class ConnectedWebsites extends Object {
public ConnectedWebsite[] websites;
public static final int CONSTRUCTOR = -1727949694;
public ConnectedWebsites() {}
public ConnectedWebsites(ConnectedWebsite[] websites) {
this.websites = websites;
}
public ConnectedWebsites(DataInput input) throws IOException {
if (input.readBoolean()) {
this.websites = new ConnectedWebsite[input.readInt()];
for (int i = 0; i < this.websites.length; i++) {
if (ConnectedWebsite.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.websites[i] = new ConnectedWebsite(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.websites == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.websites.length);
for (int i = 0; i < this.websites.length; i++) {
this.websites[i].serialize(output);
}
}
}
}
public static class ConnectionStateWaitingForNetwork extends ConnectionState {
public static final int CONSTRUCTOR = 1695405912;
public ConnectionStateWaitingForNetwork() {}
public ConnectionStateWaitingForNetwork(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ConnectionStateConnectingToProxy extends ConnectionState {
public static final int CONSTRUCTOR = -93187239;
public ConnectionStateConnectingToProxy() {}
public ConnectionStateConnectingToProxy(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ConnectionStateConnecting extends ConnectionState {
public static final int CONSTRUCTOR = -1298400670;
public ConnectionStateConnecting() {}
public ConnectionStateConnecting(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ConnectionStateUpdating extends ConnectionState {
public static final int CONSTRUCTOR = -188104009;
public ConnectionStateUpdating() {}
public ConnectionStateUpdating(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ConnectionStateReady extends ConnectionState {
public static final int CONSTRUCTOR = 48608492;
public ConnectionStateReady() {}
public ConnectionStateReady(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class Contact extends Object {
public String phoneNumber;
public String firstName;
public String lastName;
public String vcard;
public int userId;
public static final int CONSTRUCTOR = -1483002540;
public Contact() {}
public Contact(String phoneNumber, String firstName, String lastName, String vcard, int userId) {
this.phoneNumber = phoneNumber;
this.firstName = firstName;
this.lastName = lastName;
this.vcard = vcard;
this.userId = userId;
}
public Contact(DataInput input) throws IOException {
if (input.readBoolean()) {
var phoneNumberTmp = new byte[input.readInt()];
input.readFully(phoneNumberTmp);
this.phoneNumber = new String(phoneNumberTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var firstNameTmp = new byte[input.readInt()];
input.readFully(firstNameTmp);
this.firstName = new String(firstNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var lastNameTmp = new byte[input.readInt()];
input.readFully(lastNameTmp);
this.lastName = new String(lastNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var vcardTmp = new byte[input.readInt()];
input.readFully(vcardTmp);
this.vcard = new String(vcardTmp, StandardCharsets.UTF_8);
}
this.userId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.phoneNumber == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var phoneNumberTmp = this.phoneNumber.getBytes(StandardCharsets.UTF_8);
output.writeInt(phoneNumberTmp.length);
output.write(phoneNumberTmp);
}
if (this.firstName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var firstNameTmp = this.firstName.getBytes(StandardCharsets.UTF_8);
output.writeInt(firstNameTmp.length);
output.write(firstNameTmp);
}
if (this.lastName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var lastNameTmp = this.lastName.getBytes(StandardCharsets.UTF_8);
output.writeInt(lastNameTmp.length);
output.write(lastNameTmp);
}
if (this.vcard == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var vcardTmp = this.vcard.getBytes(StandardCharsets.UTF_8);
output.writeInt(vcardTmp.length);
output.write(vcardTmp);
}
output.writeInt(this.userId);
}
}
public static class Count extends Object {
public int count;
public static final int CONSTRUCTOR = 1295577348;
public Count() {}
public Count(int count) {
this.count = count;
}
public Count(DataInput input) throws IOException {
this.count = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.count);
}
}
public static class CustomRequestResult extends Object {
public String result;
public static final int CONSTRUCTOR = -2009960452;
public CustomRequestResult() {}
public CustomRequestResult(String result) {
this.result = result;
}
public CustomRequestResult(DataInput input) throws IOException {
if (input.readBoolean()) {
var resultTmp = new byte[input.readInt()];
input.readFully(resultTmp);
this.result = new String(resultTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.result == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var resultTmp = this.result.getBytes(StandardCharsets.UTF_8);
output.writeInt(resultTmp.length);
output.write(resultTmp);
}
}
}
public static class DatabaseStatistics extends Object {
public String statistics;
public static final int CONSTRUCTOR = -1123912880;
public DatabaseStatistics() {}
public DatabaseStatistics(String statistics) {
this.statistics = statistics;
}
public DatabaseStatistics(DataInput input) throws IOException {
if (input.readBoolean()) {
var statisticsTmp = new byte[input.readInt()];
input.readFully(statisticsTmp);
this.statistics = new String(statisticsTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.statistics == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var statisticsTmp = this.statistics.getBytes(StandardCharsets.UTF_8);
output.writeInt(statisticsTmp.length);
output.write(statisticsTmp);
}
}
}
public static class Date extends Object {
public int day;
public int month;
public int year;
public static final int CONSTRUCTOR = -277956960;
public Date() {}
public Date(int day, int month, int year) {
this.day = day;
this.month = month;
this.year = year;
}
public Date(DataInput input) throws IOException {
this.day = input.readInt();
this.month = input.readInt();
this.year = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.day);
output.writeInt(this.month);
output.writeInt(this.year);
}
}
public static class DateRange extends Object {
public int startDate;
public int endDate;
public static final int CONSTRUCTOR = 1360333926;
public DateRange() {}
public DateRange(int startDate, int endDate) {
this.startDate = startDate;
this.endDate = endDate;
}
public DateRange(DataInput input) throws IOException {
this.startDate = input.readInt();
this.endDate = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.startDate);
output.writeInt(this.endDate);
}
}
public static class DatedFile extends Object {
public File file;
public int date;
public static final int CONSTRUCTOR = -1840795491;
public DatedFile() {}
public DatedFile(File file, int date) {
this.file = file;
this.date = date;
}
public DatedFile(DataInput input) throws IOException {
if (input.readBoolean()) {
if (File.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.file = new File(input);
}
this.date = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.file == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.file.serialize(output);
}
output.writeInt(this.date);
}
}
public static class DeepLinkInfo extends Object {
public FormattedText text;
public boolean needUpdateApplication;
public static final int CONSTRUCTOR = 1864081662;
public DeepLinkInfo() {}
public DeepLinkInfo(FormattedText text, boolean needUpdateApplication) {
this.text = text;
this.needUpdateApplication = needUpdateApplication;
}
public DeepLinkInfo(DataInput input) throws IOException {
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.text = new FormattedText(input);
}
this.needUpdateApplication = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
output.writeBoolean(this.needUpdateApplication);
}
}
public static class DeviceTokenFirebaseCloudMessaging extends DeviceToken {
public String token;
public boolean encrypt;
public static final int CONSTRUCTOR = -797881849;
public DeviceTokenFirebaseCloudMessaging() {}
public DeviceTokenFirebaseCloudMessaging(String token, boolean encrypt) {
this.token = token;
this.encrypt = encrypt;
}
public DeviceTokenFirebaseCloudMessaging(DataInput input) throws IOException {
if (input.readBoolean()) {
var tokenTmp = new byte[input.readInt()];
input.readFully(tokenTmp);
this.token = new String(tokenTmp, StandardCharsets.UTF_8);
}
this.encrypt = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.token == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var tokenTmp = this.token.getBytes(StandardCharsets.UTF_8);
output.writeInt(tokenTmp.length);
output.write(tokenTmp);
}
output.writeBoolean(this.encrypt);
}
}
public static class DeviceTokenApplePush extends DeviceToken {
public String deviceToken;
public boolean isAppSandbox;
public static final int CONSTRUCTOR = 387541955;
public DeviceTokenApplePush() {}
public DeviceTokenApplePush(String deviceToken, boolean isAppSandbox) {
this.deviceToken = deviceToken;
this.isAppSandbox = isAppSandbox;
}
public DeviceTokenApplePush(DataInput input) throws IOException {
if (input.readBoolean()) {
var deviceTokenTmp = new byte[input.readInt()];
input.readFully(deviceTokenTmp);
this.deviceToken = new String(deviceTokenTmp, StandardCharsets.UTF_8);
}
this.isAppSandbox = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.deviceToken == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var deviceTokenTmp = this.deviceToken.getBytes(StandardCharsets.UTF_8);
output.writeInt(deviceTokenTmp.length);
output.write(deviceTokenTmp);
}
output.writeBoolean(this.isAppSandbox);
}
}
public static class DeviceTokenApplePushVoIP extends DeviceToken {
public String deviceToken;
public boolean isAppSandbox;
public boolean encrypt;
public static final int CONSTRUCTOR = 804275689;
public DeviceTokenApplePushVoIP() {}
public DeviceTokenApplePushVoIP(String deviceToken, boolean isAppSandbox, boolean encrypt) {
this.deviceToken = deviceToken;
this.isAppSandbox = isAppSandbox;
this.encrypt = encrypt;
}
public DeviceTokenApplePushVoIP(DataInput input) throws IOException {
if (input.readBoolean()) {
var deviceTokenTmp = new byte[input.readInt()];
input.readFully(deviceTokenTmp);
this.deviceToken = new String(deviceTokenTmp, StandardCharsets.UTF_8);
}
this.isAppSandbox = input.readBoolean();
this.encrypt = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.deviceToken == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var deviceTokenTmp = this.deviceToken.getBytes(StandardCharsets.UTF_8);
output.writeInt(deviceTokenTmp.length);
output.write(deviceTokenTmp);
}
output.writeBoolean(this.isAppSandbox);
output.writeBoolean(this.encrypt);
}
}
public static class DeviceTokenWindowsPush extends DeviceToken {
public String accessToken;
public static final int CONSTRUCTOR = -1410514289;
public DeviceTokenWindowsPush() {}
public DeviceTokenWindowsPush(String accessToken) {
this.accessToken = accessToken;
}
public DeviceTokenWindowsPush(DataInput input) throws IOException {
if (input.readBoolean()) {
var accessTokenTmp = new byte[input.readInt()];
input.readFully(accessTokenTmp);
this.accessToken = new String(accessTokenTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.accessToken == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var accessTokenTmp = this.accessToken.getBytes(StandardCharsets.UTF_8);
output.writeInt(accessTokenTmp.length);
output.write(accessTokenTmp);
}
}
}
public static class DeviceTokenMicrosoftPush extends DeviceToken {
public String channelUri;
public static final int CONSTRUCTOR = 1224269900;
public DeviceTokenMicrosoftPush() {}
public DeviceTokenMicrosoftPush(String channelUri) {
this.channelUri = channelUri;
}
public DeviceTokenMicrosoftPush(DataInput input) throws IOException {
if (input.readBoolean()) {
var channelUriTmp = new byte[input.readInt()];
input.readFully(channelUriTmp);
this.channelUri = new String(channelUriTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.channelUri == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var channelUriTmp = this.channelUri.getBytes(StandardCharsets.UTF_8);
output.writeInt(channelUriTmp.length);
output.write(channelUriTmp);
}
}
}
public static class DeviceTokenMicrosoftPushVoIP extends DeviceToken {
public String channelUri;
public static final int CONSTRUCTOR = -785603759;
public DeviceTokenMicrosoftPushVoIP() {}
public DeviceTokenMicrosoftPushVoIP(String channelUri) {
this.channelUri = channelUri;
}
public DeviceTokenMicrosoftPushVoIP(DataInput input) throws IOException {
if (input.readBoolean()) {
var channelUriTmp = new byte[input.readInt()];
input.readFully(channelUriTmp);
this.channelUri = new String(channelUriTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.channelUri == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var channelUriTmp = this.channelUri.getBytes(StandardCharsets.UTF_8);
output.writeInt(channelUriTmp.length);
output.write(channelUriTmp);
}
}
}
public static class DeviceTokenWebPush extends DeviceToken {
public String endpoint;
public String p256dhBase64url;
public String authBase64url;
public static final int CONSTRUCTOR = -1694507273;
public DeviceTokenWebPush() {}
public DeviceTokenWebPush(String endpoint, String p256dhBase64url, String authBase64url) {
this.endpoint = endpoint;
this.p256dhBase64url = p256dhBase64url;
this.authBase64url = authBase64url;
}
public DeviceTokenWebPush(DataInput input) throws IOException {
if (input.readBoolean()) {
var endpointTmp = new byte[input.readInt()];
input.readFully(endpointTmp);
this.endpoint = new String(endpointTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var p256dhBase64urlTmp = new byte[input.readInt()];
input.readFully(p256dhBase64urlTmp);
this.p256dhBase64url = new String(p256dhBase64urlTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var authBase64urlTmp = new byte[input.readInt()];
input.readFully(authBase64urlTmp);
this.authBase64url = new String(authBase64urlTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.endpoint == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var endpointTmp = this.endpoint.getBytes(StandardCharsets.UTF_8);
output.writeInt(endpointTmp.length);
output.write(endpointTmp);
}
if (this.p256dhBase64url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var p256dhBase64urlTmp = this.p256dhBase64url.getBytes(StandardCharsets.UTF_8);
output.writeInt(p256dhBase64urlTmp.length);
output.write(p256dhBase64urlTmp);
}
if (this.authBase64url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var authBase64urlTmp = this.authBase64url.getBytes(StandardCharsets.UTF_8);
output.writeInt(authBase64urlTmp.length);
output.write(authBase64urlTmp);
}
}
}
public static class DeviceTokenSimplePush extends DeviceToken {
public String endpoint;
public static final int CONSTRUCTOR = 49584736;
public DeviceTokenSimplePush() {}
public DeviceTokenSimplePush(String endpoint) {
this.endpoint = endpoint;
}
public DeviceTokenSimplePush(DataInput input) throws IOException {
if (input.readBoolean()) {
var endpointTmp = new byte[input.readInt()];
input.readFully(endpointTmp);
this.endpoint = new String(endpointTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.endpoint == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var endpointTmp = this.endpoint.getBytes(StandardCharsets.UTF_8);
output.writeInt(endpointTmp.length);
output.write(endpointTmp);
}
}
}
public static class DeviceTokenUbuntuPush extends DeviceToken {
public String token;
public static final int CONSTRUCTOR = 1782320422;
public DeviceTokenUbuntuPush() {}
public DeviceTokenUbuntuPush(String token) {
this.token = token;
}
public DeviceTokenUbuntuPush(DataInput input) throws IOException {
if (input.readBoolean()) {
var tokenTmp = new byte[input.readInt()];
input.readFully(tokenTmp);
this.token = new String(tokenTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.token == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var tokenTmp = this.token.getBytes(StandardCharsets.UTF_8);
output.writeInt(tokenTmp.length);
output.write(tokenTmp);
}
}
}
public static class DeviceTokenBlackBerryPush extends DeviceToken {
public String token;
public static final int CONSTRUCTOR = 1559167234;
public DeviceTokenBlackBerryPush() {}
public DeviceTokenBlackBerryPush(String token) {
this.token = token;
}
public DeviceTokenBlackBerryPush(DataInput input) throws IOException {
if (input.readBoolean()) {
var tokenTmp = new byte[input.readInt()];
input.readFully(tokenTmp);
this.token = new String(tokenTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.token == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var tokenTmp = this.token.getBytes(StandardCharsets.UTF_8);
output.writeInt(tokenTmp.length);
output.write(tokenTmp);
}
}
}
public static class DeviceTokenTizenPush extends DeviceToken {
public String regId;
public static final int CONSTRUCTOR = -1359947213;
public DeviceTokenTizenPush() {}
public DeviceTokenTizenPush(String regId) {
this.regId = regId;
}
public DeviceTokenTizenPush(DataInput input) throws IOException {
if (input.readBoolean()) {
var regIdTmp = new byte[input.readInt()];
input.readFully(regIdTmp);
this.regId = new String(regIdTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.regId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var regIdTmp = this.regId.getBytes(StandardCharsets.UTF_8);
output.writeInt(regIdTmp.length);
output.write(regIdTmp);
}
}
}
public static class Document extends Object {
public String fileName;
public String mimeType;
public Minithumbnail minithumbnail;
public PhotoSize thumbnail;
public File document;
public static final int CONSTRUCTOR = 21881988;
public Document() {}
public Document(String fileName, String mimeType, Minithumbnail minithumbnail, PhotoSize thumbnail, File document) {
this.fileName = fileName;
this.mimeType = mimeType;
this.minithumbnail = minithumbnail;
this.thumbnail = thumbnail;
this.document = document;
}
public Document(DataInput input) throws IOException {
if (input.readBoolean()) {
var fileNameTmp = new byte[input.readInt()];
input.readFully(fileNameTmp);
this.fileName = new String(fileNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var mimeTypeTmp = new byte[input.readInt()];
input.readFully(mimeTypeTmp);
this.mimeType = new String(mimeTypeTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Minithumbnail.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.minithumbnail = new Minithumbnail(input);
}
if (input.readBoolean()) {
if (PhotoSize.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.thumbnail = new PhotoSize(input);
}
if (input.readBoolean()) {
if (File.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.document = new File(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.fileName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var fileNameTmp = this.fileName.getBytes(StandardCharsets.UTF_8);
output.writeInt(fileNameTmp.length);
output.write(fileNameTmp);
}
if (this.mimeType == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var mimeTypeTmp = this.mimeType.getBytes(StandardCharsets.UTF_8);
output.writeInt(mimeTypeTmp.length);
output.write(mimeTypeTmp);
}
if (this.minithumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.minithumbnail.serialize(output);
}
if (this.thumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.thumbnail.serialize(output);
}
if (this.document == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.document.serialize(output);
}
}
}
public static class DraftMessage extends Object {
public long replyToMessageId;
public int date;
public InputMessageContent inputMessageText;
public static final int CONSTRUCTOR = 1373050112;
public DraftMessage() {}
public DraftMessage(long replyToMessageId, int date, InputMessageContent inputMessageText) {
this.replyToMessageId = replyToMessageId;
this.date = date;
this.inputMessageText = inputMessageText;
}
public DraftMessage(DataInput input) throws IOException {
this.replyToMessageId = input.readLong();
this.date = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case InputMessageText.CONSTRUCTOR:
this.inputMessageText = new InputMessageText(input);
break;
case InputMessageAnimation.CONSTRUCTOR:
this.inputMessageText = new InputMessageAnimation(input);
break;
case InputMessageAudio.CONSTRUCTOR:
this.inputMessageText = new InputMessageAudio(input);
break;
case InputMessageDocument.CONSTRUCTOR:
this.inputMessageText = new InputMessageDocument(input);
break;
case InputMessagePhoto.CONSTRUCTOR:
this.inputMessageText = new InputMessagePhoto(input);
break;
case InputMessageSticker.CONSTRUCTOR:
this.inputMessageText = new InputMessageSticker(input);
break;
case InputMessageVideo.CONSTRUCTOR:
this.inputMessageText = new InputMessageVideo(input);
break;
case InputMessageVideoNote.CONSTRUCTOR:
this.inputMessageText = new InputMessageVideoNote(input);
break;
case InputMessageVoiceNote.CONSTRUCTOR:
this.inputMessageText = new InputMessageVoiceNote(input);
break;
case InputMessageLocation.CONSTRUCTOR:
this.inputMessageText = new InputMessageLocation(input);
break;
case InputMessageVenue.CONSTRUCTOR:
this.inputMessageText = new InputMessageVenue(input);
break;
case InputMessageContact.CONSTRUCTOR:
this.inputMessageText = new InputMessageContact(input);
break;
case InputMessageDice.CONSTRUCTOR:
this.inputMessageText = new InputMessageDice(input);
break;
case InputMessageGame.CONSTRUCTOR:
this.inputMessageText = new InputMessageGame(input);
break;
case InputMessageInvoice.CONSTRUCTOR:
this.inputMessageText = new InputMessageInvoice(input);
break;
case InputMessagePoll.CONSTRUCTOR:
this.inputMessageText = new InputMessagePoll(input);
break;
case InputMessageForwarded.CONSTRUCTOR:
this.inputMessageText = new InputMessageForwarded(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.replyToMessageId);
output.writeInt(this.date);
if (this.inputMessageText == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.inputMessageText.serialize(output);
}
}
}
public static class EmailAddressAuthenticationCodeInfo extends Object {
public String emailAddressPattern;
public int length;
public static final int CONSTRUCTOR = 1151066659;
public EmailAddressAuthenticationCodeInfo() {}
public EmailAddressAuthenticationCodeInfo(String emailAddressPattern, int length) {
this.emailAddressPattern = emailAddressPattern;
this.length = length;
}
public EmailAddressAuthenticationCodeInfo(DataInput input) throws IOException {
if (input.readBoolean()) {
var emailAddressPatternTmp = new byte[input.readInt()];
input.readFully(emailAddressPatternTmp);
this.emailAddressPattern = new String(emailAddressPatternTmp, StandardCharsets.UTF_8);
}
this.length = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.emailAddressPattern == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var emailAddressPatternTmp = this.emailAddressPattern.getBytes(StandardCharsets.UTF_8);
output.writeInt(emailAddressPatternTmp.length);
output.write(emailAddressPatternTmp);
}
output.writeInt(this.length);
}
}
public static class Emojis extends Object {
public String[] emojis;
public static final int CONSTRUCTOR = 950339552;
public Emojis() {}
public Emojis(String[] emojis) {
this.emojis = emojis;
}
public Emojis(DataInput input) throws IOException {
if (input.readBoolean()) {
this.emojis = new String[input.readInt()];
for (int i = 0; i < this.emojis.length; i++) {
var emojisTmp = new byte[input.readInt()];
input.readFully(emojisTmp);
this.emojis[i] = new String(emojisTmp, StandardCharsets.UTF_8);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.emojis == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.emojis.length);
for (int i = 0; i < this.emojis.length; i++) {
var emojisTmp = this.emojis[i].getBytes(StandardCharsets.UTF_8);
output.writeInt(emojisTmp.length);
output.write(emojisTmp);
}
}
}
}
public static class EncryptedCredentials extends Object {
public byte[] data;
public byte[] hash;
public byte[] secret;
public static final int CONSTRUCTOR = 1331106766;
public EncryptedCredentials() {}
public EncryptedCredentials(byte[] data, byte[] hash, byte[] secret) {
this.data = data;
this.hash = hash;
this.secret = secret;
}
public EncryptedCredentials(DataInput input) throws IOException {
if (input.readBoolean()) {
this.data = new byte[input.readInt()];
input.readFully(this.data);
}
if (input.readBoolean()) {
this.hash = new byte[input.readInt()];
input.readFully(this.hash);
}
if (input.readBoolean()) {
this.secret = new byte[input.readInt()];
input.readFully(this.secret);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.data == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.data.length);
output.write(this.data);
}
if (this.hash == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.hash.length);
output.write(this.hash);
}
if (this.secret == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.secret.length);
output.write(this.secret);
}
}
}
public static class EncryptedPassportElement extends Object {
public PassportElementType type;
public byte[] data;
public DatedFile frontSide;
public DatedFile reverseSide;
public DatedFile selfie;
public DatedFile[] translation;
public DatedFile[] files;
public String value;
public String hash;
public static final int CONSTRUCTOR = 2002386193;
public EncryptedPassportElement() {}
public EncryptedPassportElement(PassportElementType type, byte[] data, DatedFile frontSide, DatedFile reverseSide, DatedFile selfie, DatedFile[] translation, DatedFile[] files, String value, String hash) {
this.type = type;
this.data = data;
this.frontSide = frontSide;
this.reverseSide = reverseSide;
this.selfie = selfie;
this.translation = translation;
this.files = files;
this.value = value;
this.hash = hash;
}
public EncryptedPassportElement(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case PassportElementTypePersonalDetails.CONSTRUCTOR:
this.type = new PassportElementTypePersonalDetails(input);
break;
case PassportElementTypePassport.CONSTRUCTOR:
this.type = new PassportElementTypePassport(input);
break;
case PassportElementTypeDriverLicense.CONSTRUCTOR:
this.type = new PassportElementTypeDriverLicense(input);
break;
case PassportElementTypeIdentityCard.CONSTRUCTOR:
this.type = new PassportElementTypeIdentityCard(input);
break;
case PassportElementTypeInternalPassport.CONSTRUCTOR:
this.type = new PassportElementTypeInternalPassport(input);
break;
case PassportElementTypeAddress.CONSTRUCTOR:
this.type = new PassportElementTypeAddress(input);
break;
case PassportElementTypeUtilityBill.CONSTRUCTOR:
this.type = new PassportElementTypeUtilityBill(input);
break;
case PassportElementTypeBankStatement.CONSTRUCTOR:
this.type = new PassportElementTypeBankStatement(input);
break;
case PassportElementTypeRentalAgreement.CONSTRUCTOR:
this.type = new PassportElementTypeRentalAgreement(input);
break;
case PassportElementTypePassportRegistration.CONSTRUCTOR:
this.type = new PassportElementTypePassportRegistration(input);
break;
case PassportElementTypeTemporaryRegistration.CONSTRUCTOR:
this.type = new PassportElementTypeTemporaryRegistration(input);
break;
case PassportElementTypePhoneNumber.CONSTRUCTOR:
this.type = new PassportElementTypePhoneNumber(input);
break;
case PassportElementTypeEmailAddress.CONSTRUCTOR:
this.type = new PassportElementTypeEmailAddress(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
this.data = new byte[input.readInt()];
input.readFully(this.data);
}
if (input.readBoolean()) {
if (DatedFile.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.frontSide = new DatedFile(input);
}
if (input.readBoolean()) {
if (DatedFile.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.reverseSide = new DatedFile(input);
}
if (input.readBoolean()) {
if (DatedFile.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.selfie = new DatedFile(input);
}
if (input.readBoolean()) {
this.translation = new DatedFile[input.readInt()];
for (int i = 0; i < this.translation.length; i++) {
if (DatedFile.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.translation[i] = new DatedFile(input);
}
}
if (input.readBoolean()) {
this.files = new DatedFile[input.readInt()];
for (int i = 0; i < this.files.length; i++) {
if (DatedFile.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.files[i] = new DatedFile(input);
}
}
if (input.readBoolean()) {
var valueTmp = new byte[input.readInt()];
input.readFully(valueTmp);
this.value = new String(valueTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var hashTmp = new byte[input.readInt()];
input.readFully(hashTmp);
this.hash = new String(hashTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
if (this.data == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.data.length);
output.write(this.data);
}
if (this.frontSide == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.frontSide.serialize(output);
}
if (this.reverseSide == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.reverseSide.serialize(output);
}
if (this.selfie == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.selfie.serialize(output);
}
if (this.translation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.translation.length);
for (int i = 0; i < this.translation.length; i++) {
this.translation[i].serialize(output);
}
}
if (this.files == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.files.length);
for (int i = 0; i < this.files.length; i++) {
this.files[i].serialize(output);
}
}
if (this.value == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var valueTmp = this.value.getBytes(StandardCharsets.UTF_8);
output.writeInt(valueTmp.length);
output.write(valueTmp);
}
if (this.hash == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var hashTmp = this.hash.getBytes(StandardCharsets.UTF_8);
output.writeInt(hashTmp.length);
output.write(hashTmp);
}
}
}
public static class Error extends Object {
public int code;
public String message;
public static final int CONSTRUCTOR = -1679978726;
public Error() {}
public Error(int code, String message) {
this.code = code;
this.message = message;
}
public Error(DataInput input) throws IOException {
this.code = input.readInt();
if (input.readBoolean()) {
var messageTmp = new byte[input.readInt()];
input.readFully(messageTmp);
this.message = new String(messageTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.code);
if (this.message == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var messageTmp = this.message.getBytes(StandardCharsets.UTF_8);
output.writeInt(messageTmp.length);
output.write(messageTmp);
}
}
}
public static class File extends Object {
public int id;
public int size;
public int expectedSize;
public LocalFile local;
public RemoteFile remote;
public static final int CONSTRUCTOR = 766337656;
public File() {}
public File(int id, int size, int expectedSize, LocalFile local, RemoteFile remote) {
this.id = id;
this.size = size;
this.expectedSize = expectedSize;
this.local = local;
this.remote = remote;
}
public File(DataInput input) throws IOException {
this.id = input.readInt();
this.size = input.readInt();
this.expectedSize = input.readInt();
if (input.readBoolean()) {
if (LocalFile.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.local = new LocalFile(input);
}
if (input.readBoolean()) {
if (RemoteFile.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.remote = new RemoteFile(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.id);
output.writeInt(this.size);
output.writeInt(this.expectedSize);
if (this.local == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.local.serialize(output);
}
if (this.remote == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.remote.serialize(output);
}
}
}
public static class FilePart extends Object {
public byte[] data;
public static final int CONSTRUCTOR = 911821878;
public FilePart() {}
public FilePart(byte[] data) {
this.data = data;
}
public FilePart(DataInput input) throws IOException {
if (input.readBoolean()) {
this.data = new byte[input.readInt()];
input.readFully(this.data);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.data == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.data.length);
output.write(this.data);
}
}
}
public static class FileTypeNone extends FileType {
public static final int CONSTRUCTOR = 2003009189;
public FileTypeNone() {}
public FileTypeNone(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class FileTypeAnimation extends FileType {
public static final int CONSTRUCTOR = -290816582;
public FileTypeAnimation() {}
public FileTypeAnimation(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class FileTypeAudio extends FileType {
public static final int CONSTRUCTOR = -709112160;
public FileTypeAudio() {}
public FileTypeAudio(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class FileTypeDocument extends FileType {
public static final int CONSTRUCTOR = -564722929;
public FileTypeDocument() {}
public FileTypeDocument(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class FileTypePhoto extends FileType {
public static final int CONSTRUCTOR = -1718914651;
public FileTypePhoto() {}
public FileTypePhoto(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class FileTypeProfilePhoto extends FileType {
public static final int CONSTRUCTOR = 1795089315;
public FileTypeProfilePhoto() {}
public FileTypeProfilePhoto(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class FileTypeSecret extends FileType {
public static final int CONSTRUCTOR = -1871899401;
public FileTypeSecret() {}
public FileTypeSecret(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class FileTypeSecretThumbnail extends FileType {
public static final int CONSTRUCTOR = -1401326026;
public FileTypeSecretThumbnail() {}
public FileTypeSecretThumbnail(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class FileTypeSecure extends FileType {
public static final int CONSTRUCTOR = -1419133146;
public FileTypeSecure() {}
public FileTypeSecure(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class FileTypeSticker extends FileType {
public static final int CONSTRUCTOR = 475233385;
public FileTypeSticker() {}
public FileTypeSticker(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class FileTypeThumbnail extends FileType {
public static final int CONSTRUCTOR = -12443298;
public FileTypeThumbnail() {}
public FileTypeThumbnail(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class FileTypeUnknown extends FileType {
public static final int CONSTRUCTOR = -2011566768;
public FileTypeUnknown() {}
public FileTypeUnknown(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class FileTypeVideo extends FileType {
public static final int CONSTRUCTOR = 1430816539;
public FileTypeVideo() {}
public FileTypeVideo(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class FileTypeVideoNote extends FileType {
public static final int CONSTRUCTOR = -518412385;
public FileTypeVideoNote() {}
public FileTypeVideoNote(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class FileTypeVoiceNote extends FileType {
public static final int CONSTRUCTOR = -588681661;
public FileTypeVoiceNote() {}
public FileTypeVoiceNote(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class FileTypeWallpaper extends FileType {
public static final int CONSTRUCTOR = 1854930076;
public FileTypeWallpaper() {}
public FileTypeWallpaper(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class FormattedText extends Object {
public String text;
public TextEntity[] entities;
public static final int CONSTRUCTOR = -252624564;
public FormattedText() {}
public FormattedText(String text, TextEntity[] entities) {
this.text = text;
this.entities = entities;
}
public FormattedText(DataInput input) throws IOException {
if (input.readBoolean()) {
var textTmp = new byte[input.readInt()];
input.readFully(textTmp);
this.text = new String(textTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
this.entities = new TextEntity[input.readInt()];
for (int i = 0; i < this.entities.length; i++) {
if (TextEntity.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.entities[i] = new TextEntity(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var textTmp = this.text.getBytes(StandardCharsets.UTF_8);
output.writeInt(textTmp.length);
output.write(textTmp);
}
if (this.entities == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.entities.length);
for (int i = 0; i < this.entities.length; i++) {
this.entities[i].serialize(output);
}
}
}
}
public static class FoundMessages extends Object {
public Message[] messages;
public long nextFromSearchId;
public static final int CONSTRUCTOR = 2135623881;
public FoundMessages() {}
public FoundMessages(Message[] messages, long nextFromSearchId) {
this.messages = messages;
this.nextFromSearchId = nextFromSearchId;
}
public FoundMessages(DataInput input) throws IOException {
if (input.readBoolean()) {
this.messages = new Message[input.readInt()];
for (int i = 0; i < this.messages.length; i++) {
if (Message.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.messages[i] = new Message(input);
}
}
this.nextFromSearchId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.messages == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.messages.length);
for (int i = 0; i < this.messages.length; i++) {
this.messages[i].serialize(output);
}
}
output.writeLong(this.nextFromSearchId);
}
}
public static class Game extends Object {
public long id;
public String shortName;
public String title;
public FormattedText text;
public String description;
public Photo photo;
public Animation animation;
public static final int CONSTRUCTOR = -1565597752;
public Game() {}
public Game(long id, String shortName, String title, FormattedText text, String description, Photo photo, Animation animation) {
this.id = id;
this.shortName = shortName;
this.title = title;
this.text = text;
this.description = description;
this.photo = photo;
this.animation = animation;
}
public Game(DataInput input) throws IOException {
this.id = input.readLong();
if (input.readBoolean()) {
var shortNameTmp = new byte[input.readInt()];
input.readFully(shortNameTmp);
this.shortName = new String(shortNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.text = new FormattedText(input);
}
if (input.readBoolean()) {
var descriptionTmp = new byte[input.readInt()];
input.readFully(descriptionTmp);
this.description = new String(descriptionTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Photo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.photo = new Photo(input);
}
if (input.readBoolean()) {
if (Animation.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.animation = new Animation(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.id);
if (this.shortName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var shortNameTmp = this.shortName.getBytes(StandardCharsets.UTF_8);
output.writeInt(shortNameTmp.length);
output.write(shortNameTmp);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
if (this.description == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var descriptionTmp = this.description.getBytes(StandardCharsets.UTF_8);
output.writeInt(descriptionTmp.length);
output.write(descriptionTmp);
}
if (this.photo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.photo.serialize(output);
}
if (this.animation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.animation.serialize(output);
}
}
}
public static class GameHighScore extends Object {
public int position;
public int userId;
public int score;
public static final int CONSTRUCTOR = -30778358;
public GameHighScore() {}
public GameHighScore(int position, int userId, int score) {
this.position = position;
this.userId = userId;
this.score = score;
}
public GameHighScore(DataInput input) throws IOException {
this.position = input.readInt();
this.userId = input.readInt();
this.score = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.position);
output.writeInt(this.userId);
output.writeInt(this.score);
}
}
public static class GameHighScores extends Object {
public GameHighScore[] scores;
public static final int CONSTRUCTOR = -725770727;
public GameHighScores() {}
public GameHighScores(GameHighScore[] scores) {
this.scores = scores;
}
public GameHighScores(DataInput input) throws IOException {
if (input.readBoolean()) {
this.scores = new GameHighScore[input.readInt()];
for (int i = 0; i < this.scores.length; i++) {
if (GameHighScore.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.scores[i] = new GameHighScore(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.scores == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.scores.length);
for (int i = 0; i < this.scores.length; i++) {
this.scores[i].serialize(output);
}
}
}
}
public static class Hashtags extends Object {
public String[] hashtags;
public static final int CONSTRUCTOR = 676798885;
public Hashtags() {}
public Hashtags(String[] hashtags) {
this.hashtags = hashtags;
}
public Hashtags(DataInput input) throws IOException {
if (input.readBoolean()) {
this.hashtags = new String[input.readInt()];
for (int i = 0; i < this.hashtags.length; i++) {
var hashtagsTmp = new byte[input.readInt()];
input.readFully(hashtagsTmp);
this.hashtags[i] = new String(hashtagsTmp, StandardCharsets.UTF_8);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.hashtags == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.hashtags.length);
for (int i = 0; i < this.hashtags.length; i++) {
var hashtagsTmp = this.hashtags[i].getBytes(StandardCharsets.UTF_8);
output.writeInt(hashtagsTmp.length);
output.write(hashtagsTmp);
}
}
}
}
public static class HttpUrl extends Object {
public String url;
public static final int CONSTRUCTOR = -2018019930;
public HttpUrl() {}
public HttpUrl(String url) {
this.url = url;
}
public HttpUrl(DataInput input) throws IOException {
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
}
}
public static class IdentityDocument extends Object {
public String number;
public Date expiryDate;
public DatedFile frontSide;
public DatedFile reverseSide;
public DatedFile selfie;
public DatedFile[] translation;
public static final int CONSTRUCTOR = 445952972;
public IdentityDocument() {}
public IdentityDocument(String number, Date expiryDate, DatedFile frontSide, DatedFile reverseSide, DatedFile selfie, DatedFile[] translation) {
this.number = number;
this.expiryDate = expiryDate;
this.frontSide = frontSide;
this.reverseSide = reverseSide;
this.selfie = selfie;
this.translation = translation;
}
public IdentityDocument(DataInput input) throws IOException {
if (input.readBoolean()) {
var numberTmp = new byte[input.readInt()];
input.readFully(numberTmp);
this.number = new String(numberTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Date.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.expiryDate = new Date(input);
}
if (input.readBoolean()) {
if (DatedFile.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.frontSide = new DatedFile(input);
}
if (input.readBoolean()) {
if (DatedFile.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.reverseSide = new DatedFile(input);
}
if (input.readBoolean()) {
if (DatedFile.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.selfie = new DatedFile(input);
}
if (input.readBoolean()) {
this.translation = new DatedFile[input.readInt()];
for (int i = 0; i < this.translation.length; i++) {
if (DatedFile.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.translation[i] = new DatedFile(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.number == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var numberTmp = this.number.getBytes(StandardCharsets.UTF_8);
output.writeInt(numberTmp.length);
output.write(numberTmp);
}
if (this.expiryDate == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.expiryDate.serialize(output);
}
if (this.frontSide == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.frontSide.serialize(output);
}
if (this.reverseSide == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.reverseSide.serialize(output);
}
if (this.selfie == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.selfie.serialize(output);
}
if (this.translation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.translation.length);
for (int i = 0; i < this.translation.length; i++) {
this.translation[i].serialize(output);
}
}
}
}
public static class ImportedContacts extends Object {
public int[] userIds;
public int[] importerCount;
public static final int CONSTRUCTOR = -741685354;
public ImportedContacts() {}
public ImportedContacts(int[] userIds, int[] importerCount) {
this.userIds = userIds;
this.importerCount = importerCount;
}
public ImportedContacts(DataInput input) throws IOException {
if (input.readBoolean()) {
this.userIds = new int[input.readInt()];
for (int i = 0; i < this.userIds.length; i++) {
this.userIds[i] = input.readInt();
}
}
if (input.readBoolean()) {
this.importerCount = new int[input.readInt()];
for (int i = 0; i < this.importerCount.length; i++) {
this.importerCount[i] = input.readInt();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.userIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.userIds.length);
for (int i = 0; i < this.userIds.length; i++) {
output.writeInt(this.userIds[i]);
}
}
if (this.importerCount == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.importerCount.length);
for (int i = 0; i < this.importerCount.length; i++) {
output.writeInt(this.importerCount[i]);
}
}
}
}
public static class InlineKeyboardButton extends Object {
public String text;
public InlineKeyboardButtonType type;
public static final int CONSTRUCTOR = -372105704;
public InlineKeyboardButton() {}
public InlineKeyboardButton(String text, InlineKeyboardButtonType type) {
this.text = text;
this.type = type;
}
public InlineKeyboardButton(DataInput input) throws IOException {
if (input.readBoolean()) {
var textTmp = new byte[input.readInt()];
input.readFully(textTmp);
this.text = new String(textTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InlineKeyboardButtonTypeUrl.CONSTRUCTOR:
this.type = new InlineKeyboardButtonTypeUrl(input);
break;
case InlineKeyboardButtonTypeLoginUrl.CONSTRUCTOR:
this.type = new InlineKeyboardButtonTypeLoginUrl(input);
break;
case InlineKeyboardButtonTypeCallback.CONSTRUCTOR:
this.type = new InlineKeyboardButtonTypeCallback(input);
break;
case InlineKeyboardButtonTypeCallbackGame.CONSTRUCTOR:
this.type = new InlineKeyboardButtonTypeCallbackGame(input);
break;
case InlineKeyboardButtonTypeSwitchInline.CONSTRUCTOR:
this.type = new InlineKeyboardButtonTypeSwitchInline(input);
break;
case InlineKeyboardButtonTypeBuy.CONSTRUCTOR:
this.type = new InlineKeyboardButtonTypeBuy(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var textTmp = this.text.getBytes(StandardCharsets.UTF_8);
output.writeInt(textTmp.length);
output.write(textTmp);
}
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
}
}
public static class InlineKeyboardButtonTypeUrl extends InlineKeyboardButtonType {
public String url;
public static final int CONSTRUCTOR = 1130741420;
public InlineKeyboardButtonTypeUrl() {}
public InlineKeyboardButtonTypeUrl(String url) {
this.url = url;
}
public InlineKeyboardButtonTypeUrl(DataInput input) throws IOException {
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
}
}
public static class InlineKeyboardButtonTypeLoginUrl extends InlineKeyboardButtonType {
public String url;
public int id;
public String forwardText;
public static final int CONSTRUCTOR = 281435539;
public InlineKeyboardButtonTypeLoginUrl() {}
public InlineKeyboardButtonTypeLoginUrl(String url, int id, String forwardText) {
this.url = url;
this.id = id;
this.forwardText = forwardText;
}
public InlineKeyboardButtonTypeLoginUrl(DataInput input) throws IOException {
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
this.id = input.readInt();
if (input.readBoolean()) {
var forwardTextTmp = new byte[input.readInt()];
input.readFully(forwardTextTmp);
this.forwardText = new String(forwardTextTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
output.writeInt(this.id);
if (this.forwardText == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var forwardTextTmp = this.forwardText.getBytes(StandardCharsets.UTF_8);
output.writeInt(forwardTextTmp.length);
output.write(forwardTextTmp);
}
}
}
public static class InlineKeyboardButtonTypeCallback extends InlineKeyboardButtonType {
public byte[] data;
public static final int CONSTRUCTOR = -1127515139;
public InlineKeyboardButtonTypeCallback() {}
public InlineKeyboardButtonTypeCallback(byte[] data) {
this.data = data;
}
public InlineKeyboardButtonTypeCallback(DataInput input) throws IOException {
if (input.readBoolean()) {
this.data = new byte[input.readInt()];
input.readFully(this.data);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.data == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.data.length);
output.write(this.data);
}
}
}
public static class InlineKeyboardButtonTypeCallbackGame extends InlineKeyboardButtonType {
public static final int CONSTRUCTOR = -383429528;
public InlineKeyboardButtonTypeCallbackGame() {}
public InlineKeyboardButtonTypeCallbackGame(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class InlineKeyboardButtonTypeSwitchInline extends InlineKeyboardButtonType {
public String query;
public boolean inCurrentChat;
public static final int CONSTRUCTOR = -2035563307;
public InlineKeyboardButtonTypeSwitchInline() {}
public InlineKeyboardButtonTypeSwitchInline(String query, boolean inCurrentChat) {
this.query = query;
this.inCurrentChat = inCurrentChat;
}
public InlineKeyboardButtonTypeSwitchInline(DataInput input) throws IOException {
if (input.readBoolean()) {
var queryTmp = new byte[input.readInt()];
input.readFully(queryTmp);
this.query = new String(queryTmp, StandardCharsets.UTF_8);
}
this.inCurrentChat = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.query == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var queryTmp = this.query.getBytes(StandardCharsets.UTF_8);
output.writeInt(queryTmp.length);
output.write(queryTmp);
}
output.writeBoolean(this.inCurrentChat);
}
}
public static class InlineKeyboardButtonTypeBuy extends InlineKeyboardButtonType {
public static final int CONSTRUCTOR = 1360739440;
public InlineKeyboardButtonTypeBuy() {}
public InlineKeyboardButtonTypeBuy(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class InlineQueryResultArticle extends InlineQueryResult {
public String id;
public String url;
public boolean hideUrl;
public String title;
public String description;
public PhotoSize thumbnail;
public static final int CONSTRUCTOR = -518366710;
public InlineQueryResultArticle() {}
public InlineQueryResultArticle(String id, String url, boolean hideUrl, String title, String description, PhotoSize thumbnail) {
this.id = id;
this.url = url;
this.hideUrl = hideUrl;
this.title = title;
this.description = description;
this.thumbnail = thumbnail;
}
public InlineQueryResultArticle(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
this.hideUrl = input.readBoolean();
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var descriptionTmp = new byte[input.readInt()];
input.readFully(descriptionTmp);
this.description = new String(descriptionTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (PhotoSize.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.thumbnail = new PhotoSize(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
output.writeBoolean(this.hideUrl);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.description == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var descriptionTmp = this.description.getBytes(StandardCharsets.UTF_8);
output.writeInt(descriptionTmp.length);
output.write(descriptionTmp);
}
if (this.thumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.thumbnail.serialize(output);
}
}
}
public static class InlineQueryResultContact extends InlineQueryResult {
public String id;
public Contact contact;
public PhotoSize thumbnail;
public static final int CONSTRUCTOR = 410081985;
public InlineQueryResultContact() {}
public InlineQueryResultContact(String id, Contact contact, PhotoSize thumbnail) {
this.id = id;
this.contact = contact;
this.thumbnail = thumbnail;
}
public InlineQueryResultContact(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Contact.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.contact = new Contact(input);
}
if (input.readBoolean()) {
if (PhotoSize.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.thumbnail = new PhotoSize(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.contact == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.contact.serialize(output);
}
if (this.thumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.thumbnail.serialize(output);
}
}
}
public static class InlineQueryResultLocation extends InlineQueryResult {
public String id;
public Location location;
public String title;
public PhotoSize thumbnail;
public static final int CONSTRUCTOR = -158305341;
public InlineQueryResultLocation() {}
public InlineQueryResultLocation(String id, Location location, String title, PhotoSize thumbnail) {
this.id = id;
this.location = location;
this.title = title;
this.thumbnail = thumbnail;
}
public InlineQueryResultLocation(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Location.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.location = new Location(input);
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (PhotoSize.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.thumbnail = new PhotoSize(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.location == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.location.serialize(output);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.thumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.thumbnail.serialize(output);
}
}
}
public static class InlineQueryResultVenue extends InlineQueryResult {
public String id;
public Venue venue;
public PhotoSize thumbnail;
public static final int CONSTRUCTOR = -1592932211;
public InlineQueryResultVenue() {}
public InlineQueryResultVenue(String id, Venue venue, PhotoSize thumbnail) {
this.id = id;
this.venue = venue;
this.thumbnail = thumbnail;
}
public InlineQueryResultVenue(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Venue.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.venue = new Venue(input);
}
if (input.readBoolean()) {
if (PhotoSize.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.thumbnail = new PhotoSize(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.venue == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.venue.serialize(output);
}
if (this.thumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.thumbnail.serialize(output);
}
}
}
public static class InlineQueryResultGame extends InlineQueryResult {
public String id;
public Game game;
public static final int CONSTRUCTOR = 1706916987;
public InlineQueryResultGame() {}
public InlineQueryResultGame(String id, Game game) {
this.id = id;
this.game = game;
}
public InlineQueryResultGame(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Game.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.game = new Game(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.game == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.game.serialize(output);
}
}
}
public static class InlineQueryResultAnimation extends InlineQueryResult {
public String id;
public Animation animation;
public String title;
public static final int CONSTRUCTOR = 2009984267;
public InlineQueryResultAnimation() {}
public InlineQueryResultAnimation(String id, Animation animation, String title) {
this.id = id;
this.animation = animation;
this.title = title;
}
public InlineQueryResultAnimation(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Animation.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.animation = new Animation(input);
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.animation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.animation.serialize(output);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
}
}
public static class InlineQueryResultAudio extends InlineQueryResult {
public String id;
public Audio audio;
public static final int CONSTRUCTOR = 842650360;
public InlineQueryResultAudio() {}
public InlineQueryResultAudio(String id, Audio audio) {
this.id = id;
this.audio = audio;
}
public InlineQueryResultAudio(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Audio.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.audio = new Audio(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.audio == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.audio.serialize(output);
}
}
}
public static class InlineQueryResultDocument extends InlineQueryResult {
public String id;
public Document document;
public String title;
public String description;
public static final int CONSTRUCTOR = -1491268539;
public InlineQueryResultDocument() {}
public InlineQueryResultDocument(String id, Document document, String title, String description) {
this.id = id;
this.document = document;
this.title = title;
this.description = description;
}
public InlineQueryResultDocument(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Document.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.document = new Document(input);
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var descriptionTmp = new byte[input.readInt()];
input.readFully(descriptionTmp);
this.description = new String(descriptionTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.document == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.document.serialize(output);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.description == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var descriptionTmp = this.description.getBytes(StandardCharsets.UTF_8);
output.writeInt(descriptionTmp.length);
output.write(descriptionTmp);
}
}
}
public static class InlineQueryResultPhoto extends InlineQueryResult {
public String id;
public Photo photo;
public String title;
public String description;
public static final int CONSTRUCTOR = 1848319440;
public InlineQueryResultPhoto() {}
public InlineQueryResultPhoto(String id, Photo photo, String title, String description) {
this.id = id;
this.photo = photo;
this.title = title;
this.description = description;
}
public InlineQueryResultPhoto(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Photo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.photo = new Photo(input);
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var descriptionTmp = new byte[input.readInt()];
input.readFully(descriptionTmp);
this.description = new String(descriptionTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.photo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.photo.serialize(output);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.description == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var descriptionTmp = this.description.getBytes(StandardCharsets.UTF_8);
output.writeInt(descriptionTmp.length);
output.write(descriptionTmp);
}
}
}
public static class InlineQueryResultSticker extends InlineQueryResult {
public String id;
public Sticker sticker;
public static final int CONSTRUCTOR = -1848224245;
public InlineQueryResultSticker() {}
public InlineQueryResultSticker(String id, Sticker sticker) {
this.id = id;
this.sticker = sticker;
}
public InlineQueryResultSticker(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Sticker.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.sticker = new Sticker(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.sticker == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.sticker.serialize(output);
}
}
}
public static class InlineQueryResultVideo extends InlineQueryResult {
public String id;
public Video video;
public String title;
public String description;
public static final int CONSTRUCTOR = -1373158683;
public InlineQueryResultVideo() {}
public InlineQueryResultVideo(String id, Video video, String title, String description) {
this.id = id;
this.video = video;
this.title = title;
this.description = description;
}
public InlineQueryResultVideo(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Video.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.video = new Video(input);
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var descriptionTmp = new byte[input.readInt()];
input.readFully(descriptionTmp);
this.description = new String(descriptionTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.video == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.video.serialize(output);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.description == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var descriptionTmp = this.description.getBytes(StandardCharsets.UTF_8);
output.writeInt(descriptionTmp.length);
output.write(descriptionTmp);
}
}
}
public static class InlineQueryResultVoiceNote extends InlineQueryResult {
public String id;
public VoiceNote voiceNote;
public String title;
public static final int CONSTRUCTOR = -1897393105;
public InlineQueryResultVoiceNote() {}
public InlineQueryResultVoiceNote(String id, VoiceNote voiceNote, String title) {
this.id = id;
this.voiceNote = voiceNote;
this.title = title;
}
public InlineQueryResultVoiceNote(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (VoiceNote.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.voiceNote = new VoiceNote(input);
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.voiceNote == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.voiceNote.serialize(output);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
}
}
public static class InlineQueryResults extends Object {
public long inlineQueryId;
public String nextOffset;
public InlineQueryResult[] results;
public String switchPmText;
public String switchPmParameter;
public static final int CONSTRUCTOR = 1000709656;
public InlineQueryResults() {}
public InlineQueryResults(long inlineQueryId, String nextOffset, InlineQueryResult[] results, String switchPmText, String switchPmParameter) {
this.inlineQueryId = inlineQueryId;
this.nextOffset = nextOffset;
this.results = results;
this.switchPmText = switchPmText;
this.switchPmParameter = switchPmParameter;
}
public InlineQueryResults(DataInput input) throws IOException {
this.inlineQueryId = input.readLong();
if (input.readBoolean()) {
var nextOffsetTmp = new byte[input.readInt()];
input.readFully(nextOffsetTmp);
this.nextOffset = new String(nextOffsetTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
this.results = new InlineQueryResult[input.readInt()];
for (int i = 0; i < this.results.length; i++) {
switch(input.readInt()) {
case InlineQueryResultArticle.CONSTRUCTOR:
this.results[i] = new InlineQueryResultArticle(input);
break;
case InlineQueryResultContact.CONSTRUCTOR:
this.results[i] = new InlineQueryResultContact(input);
break;
case InlineQueryResultLocation.CONSTRUCTOR:
this.results[i] = new InlineQueryResultLocation(input);
break;
case InlineQueryResultVenue.CONSTRUCTOR:
this.results[i] = new InlineQueryResultVenue(input);
break;
case InlineQueryResultGame.CONSTRUCTOR:
this.results[i] = new InlineQueryResultGame(input);
break;
case InlineQueryResultAnimation.CONSTRUCTOR:
this.results[i] = new InlineQueryResultAnimation(input);
break;
case InlineQueryResultAudio.CONSTRUCTOR:
this.results[i] = new InlineQueryResultAudio(input);
break;
case InlineQueryResultDocument.CONSTRUCTOR:
this.results[i] = new InlineQueryResultDocument(input);
break;
case InlineQueryResultPhoto.CONSTRUCTOR:
this.results[i] = new InlineQueryResultPhoto(input);
break;
case InlineQueryResultSticker.CONSTRUCTOR:
this.results[i] = new InlineQueryResultSticker(input);
break;
case InlineQueryResultVideo.CONSTRUCTOR:
this.results[i] = new InlineQueryResultVideo(input);
break;
case InlineQueryResultVoiceNote.CONSTRUCTOR:
this.results[i] = new InlineQueryResultVoiceNote(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
if (input.readBoolean()) {
var switchPmTextTmp = new byte[input.readInt()];
input.readFully(switchPmTextTmp);
this.switchPmText = new String(switchPmTextTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var switchPmParameterTmp = new byte[input.readInt()];
input.readFully(switchPmParameterTmp);
this.switchPmParameter = new String(switchPmParameterTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.inlineQueryId);
if (this.nextOffset == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nextOffsetTmp = this.nextOffset.getBytes(StandardCharsets.UTF_8);
output.writeInt(nextOffsetTmp.length);
output.write(nextOffsetTmp);
}
if (this.results == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.results.length);
for (int i = 0; i < this.results.length; i++) {
this.results[i].serialize(output);
}
}
if (this.switchPmText == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var switchPmTextTmp = this.switchPmText.getBytes(StandardCharsets.UTF_8);
output.writeInt(switchPmTextTmp.length);
output.write(switchPmTextTmp);
}
if (this.switchPmParameter == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var switchPmParameterTmp = this.switchPmParameter.getBytes(StandardCharsets.UTF_8);
output.writeInt(switchPmParameterTmp.length);
output.write(switchPmParameterTmp);
}
}
}
public static class InputBackgroundLocal extends InputBackground {
public InputFile background;
public static final int CONSTRUCTOR = -1747094364;
public InputBackgroundLocal() {}
public InputBackgroundLocal(InputFile background) {
this.background = background;
}
public InputBackgroundLocal(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.background = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.background = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.background = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.background = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.background == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.background.serialize(output);
}
}
}
public static class InputBackgroundRemote extends InputBackground {
public long backgroundId;
public static final int CONSTRUCTOR = -274976231;
public InputBackgroundRemote() {}
public InputBackgroundRemote(long backgroundId) {
this.backgroundId = backgroundId;
}
public InputBackgroundRemote(DataInput input) throws IOException {
this.backgroundId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.backgroundId);
}
}
public static class InputCredentialsSaved extends InputCredentials {
public String savedCredentialsId;
public static final int CONSTRUCTOR = -2034385364;
public InputCredentialsSaved() {}
public InputCredentialsSaved(String savedCredentialsId) {
this.savedCredentialsId = savedCredentialsId;
}
public InputCredentialsSaved(DataInput input) throws IOException {
if (input.readBoolean()) {
var savedCredentialsIdTmp = new byte[input.readInt()];
input.readFully(savedCredentialsIdTmp);
this.savedCredentialsId = new String(savedCredentialsIdTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.savedCredentialsId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var savedCredentialsIdTmp = this.savedCredentialsId.getBytes(StandardCharsets.UTF_8);
output.writeInt(savedCredentialsIdTmp.length);
output.write(savedCredentialsIdTmp);
}
}
}
public static class InputCredentialsNew extends InputCredentials {
public String data;
public boolean allowSave;
public static final int CONSTRUCTOR = -829689558;
public InputCredentialsNew() {}
public InputCredentialsNew(String data, boolean allowSave) {
this.data = data;
this.allowSave = allowSave;
}
public InputCredentialsNew(DataInput input) throws IOException {
if (input.readBoolean()) {
var dataTmp = new byte[input.readInt()];
input.readFully(dataTmp);
this.data = new String(dataTmp, StandardCharsets.UTF_8);
}
this.allowSave = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.data == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var dataTmp = this.data.getBytes(StandardCharsets.UTF_8);
output.writeInt(dataTmp.length);
output.write(dataTmp);
}
output.writeBoolean(this.allowSave);
}
}
public static class InputCredentialsAndroidPay extends InputCredentials {
public String data;
public static final int CONSTRUCTOR = 1979566832;
public InputCredentialsAndroidPay() {}
public InputCredentialsAndroidPay(String data) {
this.data = data;
}
public InputCredentialsAndroidPay(DataInput input) throws IOException {
if (input.readBoolean()) {
var dataTmp = new byte[input.readInt()];
input.readFully(dataTmp);
this.data = new String(dataTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.data == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var dataTmp = this.data.getBytes(StandardCharsets.UTF_8);
output.writeInt(dataTmp.length);
output.write(dataTmp);
}
}
}
public static class InputCredentialsApplePay extends InputCredentials {
public String data;
public static final int CONSTRUCTOR = -1246570799;
public InputCredentialsApplePay() {}
public InputCredentialsApplePay(String data) {
this.data = data;
}
public InputCredentialsApplePay(DataInput input) throws IOException {
if (input.readBoolean()) {
var dataTmp = new byte[input.readInt()];
input.readFully(dataTmp);
this.data = new String(dataTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.data == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var dataTmp = this.data.getBytes(StandardCharsets.UTF_8);
output.writeInt(dataTmp.length);
output.write(dataTmp);
}
}
}
public static class InputFileId extends InputFile {
public int id;
public static final int CONSTRUCTOR = 1788906253;
public InputFileId() {}
public InputFileId(int id) {
this.id = id;
}
public InputFileId(DataInput input) throws IOException {
this.id = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.id);
}
}
public static class InputFileRemote extends InputFile {
public String id;
public static final int CONSTRUCTOR = -107574466;
public InputFileRemote() {}
public InputFileRemote(String id) {
this.id = id;
}
public InputFileRemote(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
}
}
public static class InputFileLocal extends InputFile {
public String path;
public static final int CONSTRUCTOR = 2056030919;
public InputFileLocal() {}
public InputFileLocal(String path) {
this.path = path;
}
public InputFileLocal(DataInput input) throws IOException {
if (input.readBoolean()) {
var pathTmp = new byte[input.readInt()];
input.readFully(pathTmp);
this.path = new String(pathTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.path == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var pathTmp = this.path.getBytes(StandardCharsets.UTF_8);
output.writeInt(pathTmp.length);
output.write(pathTmp);
}
}
}
public static class InputFileGenerated extends InputFile {
public String originalPath;
public String conversion;
public int expectedSize;
public static final int CONSTRUCTOR = -1781351885;
public InputFileGenerated() {}
public InputFileGenerated(String originalPath, String conversion, int expectedSize) {
this.originalPath = originalPath;
this.conversion = conversion;
this.expectedSize = expectedSize;
}
public InputFileGenerated(DataInput input) throws IOException {
if (input.readBoolean()) {
var originalPathTmp = new byte[input.readInt()];
input.readFully(originalPathTmp);
this.originalPath = new String(originalPathTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var conversionTmp = new byte[input.readInt()];
input.readFully(conversionTmp);
this.conversion = new String(conversionTmp, StandardCharsets.UTF_8);
}
this.expectedSize = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.originalPath == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var originalPathTmp = this.originalPath.getBytes(StandardCharsets.UTF_8);
output.writeInt(originalPathTmp.length);
output.write(originalPathTmp);
}
if (this.conversion == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var conversionTmp = this.conversion.getBytes(StandardCharsets.UTF_8);
output.writeInt(conversionTmp.length);
output.write(conversionTmp);
}
output.writeInt(this.expectedSize);
}
}
public static class InputIdentityDocument extends Object {
public String number;
public Date expiryDate;
public InputFile frontSide;
public InputFile reverseSide;
public InputFile selfie;
public InputFile[] translation;
public static final int CONSTRUCTOR = -381776063;
public InputIdentityDocument() {}
public InputIdentityDocument(String number, Date expiryDate, InputFile frontSide, InputFile reverseSide, InputFile selfie, InputFile[] translation) {
this.number = number;
this.expiryDate = expiryDate;
this.frontSide = frontSide;
this.reverseSide = reverseSide;
this.selfie = selfie;
this.translation = translation;
}
public InputIdentityDocument(DataInput input) throws IOException {
if (input.readBoolean()) {
var numberTmp = new byte[input.readInt()];
input.readFully(numberTmp);
this.number = new String(numberTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Date.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.expiryDate = new Date(input);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.frontSide = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.frontSide = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.frontSide = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.frontSide = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.reverseSide = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.reverseSide = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.reverseSide = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.reverseSide = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.selfie = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.selfie = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.selfie = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.selfie = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
this.translation = new InputFile[input.readInt()];
for (int i = 0; i < this.translation.length; i++) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.translation[i] = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.translation[i] = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.translation[i] = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.translation[i] = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.number == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var numberTmp = this.number.getBytes(StandardCharsets.UTF_8);
output.writeInt(numberTmp.length);
output.write(numberTmp);
}
if (this.expiryDate == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.expiryDate.serialize(output);
}
if (this.frontSide == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.frontSide.serialize(output);
}
if (this.reverseSide == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.reverseSide.serialize(output);
}
if (this.selfie == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.selfie.serialize(output);
}
if (this.translation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.translation.length);
for (int i = 0; i < this.translation.length; i++) {
this.translation[i].serialize(output);
}
}
}
}
public static class InputInlineQueryResultAnimatedGif extends InputInlineQueryResult {
public String id;
public String title;
public String thumbnailUrl;
public String gifUrl;
public int gifDuration;
public int gifWidth;
public int gifHeight;
public ReplyMarkup replyMarkup;
public InputMessageContent inputMessageContent;
public static final int CONSTRUCTOR = -891474894;
public InputInlineQueryResultAnimatedGif() {}
public InputInlineQueryResultAnimatedGif(String id, String title, String thumbnailUrl, String gifUrl, int gifDuration, int gifWidth, int gifHeight, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) {
this.id = id;
this.title = title;
this.thumbnailUrl = thumbnailUrl;
this.gifUrl = gifUrl;
this.gifDuration = gifDuration;
this.gifWidth = gifWidth;
this.gifHeight = gifHeight;
this.replyMarkup = replyMarkup;
this.inputMessageContent = inputMessageContent;
}
public InputInlineQueryResultAnimatedGif(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var thumbnailUrlTmp = new byte[input.readInt()];
input.readFully(thumbnailUrlTmp);
this.thumbnailUrl = new String(thumbnailUrlTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var gifUrlTmp = new byte[input.readInt()];
input.readFully(gifUrlTmp);
this.gifUrl = new String(gifUrlTmp, StandardCharsets.UTF_8);
}
this.gifDuration = input.readInt();
this.gifWidth = input.readInt();
this.gifHeight = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputMessageText.CONSTRUCTOR:
this.inputMessageContent = new InputMessageText(input);
break;
case InputMessageAnimation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAnimation(input);
break;
case InputMessageAudio.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAudio(input);
break;
case InputMessageDocument.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDocument(input);
break;
case InputMessagePhoto.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePhoto(input);
break;
case InputMessageSticker.CONSTRUCTOR:
this.inputMessageContent = new InputMessageSticker(input);
break;
case InputMessageVideo.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideo(input);
break;
case InputMessageVideoNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideoNote(input);
break;
case InputMessageVoiceNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVoiceNote(input);
break;
case InputMessageLocation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageLocation(input);
break;
case InputMessageVenue.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVenue(input);
break;
case InputMessageContact.CONSTRUCTOR:
this.inputMessageContent = new InputMessageContact(input);
break;
case InputMessageDice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDice(input);
break;
case InputMessageGame.CONSTRUCTOR:
this.inputMessageContent = new InputMessageGame(input);
break;
case InputMessageInvoice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageInvoice(input);
break;
case InputMessagePoll.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePoll(input);
break;
case InputMessageForwarded.CONSTRUCTOR:
this.inputMessageContent = new InputMessageForwarded(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.thumbnailUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var thumbnailUrlTmp = this.thumbnailUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(thumbnailUrlTmp.length);
output.write(thumbnailUrlTmp);
}
if (this.gifUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var gifUrlTmp = this.gifUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(gifUrlTmp.length);
output.write(gifUrlTmp);
}
output.writeInt(this.gifDuration);
output.writeInt(this.gifWidth);
output.writeInt(this.gifHeight);
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
if (this.inputMessageContent == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.inputMessageContent.serialize(output);
}
}
}
public static class InputInlineQueryResultAnimatedMpeg4 extends InputInlineQueryResult {
public String id;
public String title;
public String thumbnailUrl;
public String mpeg4Url;
public int mpeg4Duration;
public int mpeg4Width;
public int mpeg4Height;
public ReplyMarkup replyMarkup;
public InputMessageContent inputMessageContent;
public static final int CONSTRUCTOR = -1629529888;
public InputInlineQueryResultAnimatedMpeg4() {}
public InputInlineQueryResultAnimatedMpeg4(String id, String title, String thumbnailUrl, String mpeg4Url, int mpeg4Duration, int mpeg4Width, int mpeg4Height, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) {
this.id = id;
this.title = title;
this.thumbnailUrl = thumbnailUrl;
this.mpeg4Url = mpeg4Url;
this.mpeg4Duration = mpeg4Duration;
this.mpeg4Width = mpeg4Width;
this.mpeg4Height = mpeg4Height;
this.replyMarkup = replyMarkup;
this.inputMessageContent = inputMessageContent;
}
public InputInlineQueryResultAnimatedMpeg4(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var thumbnailUrlTmp = new byte[input.readInt()];
input.readFully(thumbnailUrlTmp);
this.thumbnailUrl = new String(thumbnailUrlTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var mpeg4UrlTmp = new byte[input.readInt()];
input.readFully(mpeg4UrlTmp);
this.mpeg4Url = new String(mpeg4UrlTmp, StandardCharsets.UTF_8);
}
this.mpeg4Duration = input.readInt();
this.mpeg4Width = input.readInt();
this.mpeg4Height = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputMessageText.CONSTRUCTOR:
this.inputMessageContent = new InputMessageText(input);
break;
case InputMessageAnimation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAnimation(input);
break;
case InputMessageAudio.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAudio(input);
break;
case InputMessageDocument.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDocument(input);
break;
case InputMessagePhoto.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePhoto(input);
break;
case InputMessageSticker.CONSTRUCTOR:
this.inputMessageContent = new InputMessageSticker(input);
break;
case InputMessageVideo.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideo(input);
break;
case InputMessageVideoNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideoNote(input);
break;
case InputMessageVoiceNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVoiceNote(input);
break;
case InputMessageLocation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageLocation(input);
break;
case InputMessageVenue.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVenue(input);
break;
case InputMessageContact.CONSTRUCTOR:
this.inputMessageContent = new InputMessageContact(input);
break;
case InputMessageDice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDice(input);
break;
case InputMessageGame.CONSTRUCTOR:
this.inputMessageContent = new InputMessageGame(input);
break;
case InputMessageInvoice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageInvoice(input);
break;
case InputMessagePoll.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePoll(input);
break;
case InputMessageForwarded.CONSTRUCTOR:
this.inputMessageContent = new InputMessageForwarded(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.thumbnailUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var thumbnailUrlTmp = this.thumbnailUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(thumbnailUrlTmp.length);
output.write(thumbnailUrlTmp);
}
if (this.mpeg4Url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var mpeg4UrlTmp = this.mpeg4Url.getBytes(StandardCharsets.UTF_8);
output.writeInt(mpeg4UrlTmp.length);
output.write(mpeg4UrlTmp);
}
output.writeInt(this.mpeg4Duration);
output.writeInt(this.mpeg4Width);
output.writeInt(this.mpeg4Height);
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
if (this.inputMessageContent == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.inputMessageContent.serialize(output);
}
}
}
public static class InputInlineQueryResultArticle extends InputInlineQueryResult {
public String id;
public String url;
public boolean hideUrl;
public String title;
public String description;
public String thumbnailUrl;
public int thumbnailWidth;
public int thumbnailHeight;
public ReplyMarkup replyMarkup;
public InputMessageContent inputMessageContent;
public static final int CONSTRUCTOR = 1973670156;
public InputInlineQueryResultArticle() {}
public InputInlineQueryResultArticle(String id, String url, boolean hideUrl, String title, String description, String thumbnailUrl, int thumbnailWidth, int thumbnailHeight, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) {
this.id = id;
this.url = url;
this.hideUrl = hideUrl;
this.title = title;
this.description = description;
this.thumbnailUrl = thumbnailUrl;
this.thumbnailWidth = thumbnailWidth;
this.thumbnailHeight = thumbnailHeight;
this.replyMarkup = replyMarkup;
this.inputMessageContent = inputMessageContent;
}
public InputInlineQueryResultArticle(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
this.hideUrl = input.readBoolean();
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var descriptionTmp = new byte[input.readInt()];
input.readFully(descriptionTmp);
this.description = new String(descriptionTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var thumbnailUrlTmp = new byte[input.readInt()];
input.readFully(thumbnailUrlTmp);
this.thumbnailUrl = new String(thumbnailUrlTmp, StandardCharsets.UTF_8);
}
this.thumbnailWidth = input.readInt();
this.thumbnailHeight = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputMessageText.CONSTRUCTOR:
this.inputMessageContent = new InputMessageText(input);
break;
case InputMessageAnimation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAnimation(input);
break;
case InputMessageAudio.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAudio(input);
break;
case InputMessageDocument.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDocument(input);
break;
case InputMessagePhoto.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePhoto(input);
break;
case InputMessageSticker.CONSTRUCTOR:
this.inputMessageContent = new InputMessageSticker(input);
break;
case InputMessageVideo.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideo(input);
break;
case InputMessageVideoNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideoNote(input);
break;
case InputMessageVoiceNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVoiceNote(input);
break;
case InputMessageLocation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageLocation(input);
break;
case InputMessageVenue.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVenue(input);
break;
case InputMessageContact.CONSTRUCTOR:
this.inputMessageContent = new InputMessageContact(input);
break;
case InputMessageDice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDice(input);
break;
case InputMessageGame.CONSTRUCTOR:
this.inputMessageContent = new InputMessageGame(input);
break;
case InputMessageInvoice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageInvoice(input);
break;
case InputMessagePoll.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePoll(input);
break;
case InputMessageForwarded.CONSTRUCTOR:
this.inputMessageContent = new InputMessageForwarded(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
output.writeBoolean(this.hideUrl);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.description == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var descriptionTmp = this.description.getBytes(StandardCharsets.UTF_8);
output.writeInt(descriptionTmp.length);
output.write(descriptionTmp);
}
if (this.thumbnailUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var thumbnailUrlTmp = this.thumbnailUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(thumbnailUrlTmp.length);
output.write(thumbnailUrlTmp);
}
output.writeInt(this.thumbnailWidth);
output.writeInt(this.thumbnailHeight);
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
if (this.inputMessageContent == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.inputMessageContent.serialize(output);
}
}
}
public static class InputInlineQueryResultAudio extends InputInlineQueryResult {
public String id;
public String title;
public String performer;
public String audioUrl;
public int audioDuration;
public ReplyMarkup replyMarkup;
public InputMessageContent inputMessageContent;
public static final int CONSTRUCTOR = 1260139988;
public InputInlineQueryResultAudio() {}
public InputInlineQueryResultAudio(String id, String title, String performer, String audioUrl, int audioDuration, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) {
this.id = id;
this.title = title;
this.performer = performer;
this.audioUrl = audioUrl;
this.audioDuration = audioDuration;
this.replyMarkup = replyMarkup;
this.inputMessageContent = inputMessageContent;
}
public InputInlineQueryResultAudio(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var performerTmp = new byte[input.readInt()];
input.readFully(performerTmp);
this.performer = new String(performerTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var audioUrlTmp = new byte[input.readInt()];
input.readFully(audioUrlTmp);
this.audioUrl = new String(audioUrlTmp, StandardCharsets.UTF_8);
}
this.audioDuration = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputMessageText.CONSTRUCTOR:
this.inputMessageContent = new InputMessageText(input);
break;
case InputMessageAnimation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAnimation(input);
break;
case InputMessageAudio.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAudio(input);
break;
case InputMessageDocument.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDocument(input);
break;
case InputMessagePhoto.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePhoto(input);
break;
case InputMessageSticker.CONSTRUCTOR:
this.inputMessageContent = new InputMessageSticker(input);
break;
case InputMessageVideo.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideo(input);
break;
case InputMessageVideoNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideoNote(input);
break;
case InputMessageVoiceNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVoiceNote(input);
break;
case InputMessageLocation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageLocation(input);
break;
case InputMessageVenue.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVenue(input);
break;
case InputMessageContact.CONSTRUCTOR:
this.inputMessageContent = new InputMessageContact(input);
break;
case InputMessageDice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDice(input);
break;
case InputMessageGame.CONSTRUCTOR:
this.inputMessageContent = new InputMessageGame(input);
break;
case InputMessageInvoice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageInvoice(input);
break;
case InputMessagePoll.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePoll(input);
break;
case InputMessageForwarded.CONSTRUCTOR:
this.inputMessageContent = new InputMessageForwarded(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.performer == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var performerTmp = this.performer.getBytes(StandardCharsets.UTF_8);
output.writeInt(performerTmp.length);
output.write(performerTmp);
}
if (this.audioUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var audioUrlTmp = this.audioUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(audioUrlTmp.length);
output.write(audioUrlTmp);
}
output.writeInt(this.audioDuration);
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
if (this.inputMessageContent == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.inputMessageContent.serialize(output);
}
}
}
public static class InputInlineQueryResultContact extends InputInlineQueryResult {
public String id;
public Contact contact;
public String thumbnailUrl;
public int thumbnailWidth;
public int thumbnailHeight;
public ReplyMarkup replyMarkup;
public InputMessageContent inputMessageContent;
public static final int CONSTRUCTOR = 1846064594;
public InputInlineQueryResultContact() {}
public InputInlineQueryResultContact(String id, Contact contact, String thumbnailUrl, int thumbnailWidth, int thumbnailHeight, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) {
this.id = id;
this.contact = contact;
this.thumbnailUrl = thumbnailUrl;
this.thumbnailWidth = thumbnailWidth;
this.thumbnailHeight = thumbnailHeight;
this.replyMarkup = replyMarkup;
this.inputMessageContent = inputMessageContent;
}
public InputInlineQueryResultContact(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Contact.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.contact = new Contact(input);
}
if (input.readBoolean()) {
var thumbnailUrlTmp = new byte[input.readInt()];
input.readFully(thumbnailUrlTmp);
this.thumbnailUrl = new String(thumbnailUrlTmp, StandardCharsets.UTF_8);
}
this.thumbnailWidth = input.readInt();
this.thumbnailHeight = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputMessageText.CONSTRUCTOR:
this.inputMessageContent = new InputMessageText(input);
break;
case InputMessageAnimation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAnimation(input);
break;
case InputMessageAudio.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAudio(input);
break;
case InputMessageDocument.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDocument(input);
break;
case InputMessagePhoto.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePhoto(input);
break;
case InputMessageSticker.CONSTRUCTOR:
this.inputMessageContent = new InputMessageSticker(input);
break;
case InputMessageVideo.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideo(input);
break;
case InputMessageVideoNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideoNote(input);
break;
case InputMessageVoiceNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVoiceNote(input);
break;
case InputMessageLocation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageLocation(input);
break;
case InputMessageVenue.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVenue(input);
break;
case InputMessageContact.CONSTRUCTOR:
this.inputMessageContent = new InputMessageContact(input);
break;
case InputMessageDice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDice(input);
break;
case InputMessageGame.CONSTRUCTOR:
this.inputMessageContent = new InputMessageGame(input);
break;
case InputMessageInvoice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageInvoice(input);
break;
case InputMessagePoll.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePoll(input);
break;
case InputMessageForwarded.CONSTRUCTOR:
this.inputMessageContent = new InputMessageForwarded(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.contact == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.contact.serialize(output);
}
if (this.thumbnailUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var thumbnailUrlTmp = this.thumbnailUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(thumbnailUrlTmp.length);
output.write(thumbnailUrlTmp);
}
output.writeInt(this.thumbnailWidth);
output.writeInt(this.thumbnailHeight);
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
if (this.inputMessageContent == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.inputMessageContent.serialize(output);
}
}
}
public static class InputInlineQueryResultDocument extends InputInlineQueryResult {
public String id;
public String title;
public String description;
public String documentUrl;
public String mimeType;
public String thumbnailUrl;
public int thumbnailWidth;
public int thumbnailHeight;
public ReplyMarkup replyMarkup;
public InputMessageContent inputMessageContent;
public static final int CONSTRUCTOR = 578801869;
public InputInlineQueryResultDocument() {}
public InputInlineQueryResultDocument(String id, String title, String description, String documentUrl, String mimeType, String thumbnailUrl, int thumbnailWidth, int thumbnailHeight, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) {
this.id = id;
this.title = title;
this.description = description;
this.documentUrl = documentUrl;
this.mimeType = mimeType;
this.thumbnailUrl = thumbnailUrl;
this.thumbnailWidth = thumbnailWidth;
this.thumbnailHeight = thumbnailHeight;
this.replyMarkup = replyMarkup;
this.inputMessageContent = inputMessageContent;
}
public InputInlineQueryResultDocument(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var descriptionTmp = new byte[input.readInt()];
input.readFully(descriptionTmp);
this.description = new String(descriptionTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var documentUrlTmp = new byte[input.readInt()];
input.readFully(documentUrlTmp);
this.documentUrl = new String(documentUrlTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var mimeTypeTmp = new byte[input.readInt()];
input.readFully(mimeTypeTmp);
this.mimeType = new String(mimeTypeTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var thumbnailUrlTmp = new byte[input.readInt()];
input.readFully(thumbnailUrlTmp);
this.thumbnailUrl = new String(thumbnailUrlTmp, StandardCharsets.UTF_8);
}
this.thumbnailWidth = input.readInt();
this.thumbnailHeight = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputMessageText.CONSTRUCTOR:
this.inputMessageContent = new InputMessageText(input);
break;
case InputMessageAnimation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAnimation(input);
break;
case InputMessageAudio.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAudio(input);
break;
case InputMessageDocument.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDocument(input);
break;
case InputMessagePhoto.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePhoto(input);
break;
case InputMessageSticker.CONSTRUCTOR:
this.inputMessageContent = new InputMessageSticker(input);
break;
case InputMessageVideo.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideo(input);
break;
case InputMessageVideoNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideoNote(input);
break;
case InputMessageVoiceNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVoiceNote(input);
break;
case InputMessageLocation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageLocation(input);
break;
case InputMessageVenue.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVenue(input);
break;
case InputMessageContact.CONSTRUCTOR:
this.inputMessageContent = new InputMessageContact(input);
break;
case InputMessageDice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDice(input);
break;
case InputMessageGame.CONSTRUCTOR:
this.inputMessageContent = new InputMessageGame(input);
break;
case InputMessageInvoice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageInvoice(input);
break;
case InputMessagePoll.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePoll(input);
break;
case InputMessageForwarded.CONSTRUCTOR:
this.inputMessageContent = new InputMessageForwarded(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.description == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var descriptionTmp = this.description.getBytes(StandardCharsets.UTF_8);
output.writeInt(descriptionTmp.length);
output.write(descriptionTmp);
}
if (this.documentUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var documentUrlTmp = this.documentUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(documentUrlTmp.length);
output.write(documentUrlTmp);
}
if (this.mimeType == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var mimeTypeTmp = this.mimeType.getBytes(StandardCharsets.UTF_8);
output.writeInt(mimeTypeTmp.length);
output.write(mimeTypeTmp);
}
if (this.thumbnailUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var thumbnailUrlTmp = this.thumbnailUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(thumbnailUrlTmp.length);
output.write(thumbnailUrlTmp);
}
output.writeInt(this.thumbnailWidth);
output.writeInt(this.thumbnailHeight);
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
if (this.inputMessageContent == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.inputMessageContent.serialize(output);
}
}
}
public static class InputInlineQueryResultGame extends InputInlineQueryResult {
public String id;
public String gameShortName;
public ReplyMarkup replyMarkup;
public static final int CONSTRUCTOR = 966074327;
public InputInlineQueryResultGame() {}
public InputInlineQueryResultGame(String id, String gameShortName, ReplyMarkup replyMarkup) {
this.id = id;
this.gameShortName = gameShortName;
this.replyMarkup = replyMarkup;
}
public InputInlineQueryResultGame(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var gameShortNameTmp = new byte[input.readInt()];
input.readFully(gameShortNameTmp);
this.gameShortName = new String(gameShortNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.gameShortName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var gameShortNameTmp = this.gameShortName.getBytes(StandardCharsets.UTF_8);
output.writeInt(gameShortNameTmp.length);
output.write(gameShortNameTmp);
}
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
}
}
public static class InputInlineQueryResultLocation extends InputInlineQueryResult {
public String id;
public Location location;
public int livePeriod;
public String title;
public String thumbnailUrl;
public int thumbnailWidth;
public int thumbnailHeight;
public ReplyMarkup replyMarkup;
public InputMessageContent inputMessageContent;
public static final int CONSTRUCTOR = -1887650218;
public InputInlineQueryResultLocation() {}
public InputInlineQueryResultLocation(String id, Location location, int livePeriod, String title, String thumbnailUrl, int thumbnailWidth, int thumbnailHeight, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) {
this.id = id;
this.location = location;
this.livePeriod = livePeriod;
this.title = title;
this.thumbnailUrl = thumbnailUrl;
this.thumbnailWidth = thumbnailWidth;
this.thumbnailHeight = thumbnailHeight;
this.replyMarkup = replyMarkup;
this.inputMessageContent = inputMessageContent;
}
public InputInlineQueryResultLocation(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Location.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.location = new Location(input);
}
this.livePeriod = input.readInt();
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var thumbnailUrlTmp = new byte[input.readInt()];
input.readFully(thumbnailUrlTmp);
this.thumbnailUrl = new String(thumbnailUrlTmp, StandardCharsets.UTF_8);
}
this.thumbnailWidth = input.readInt();
this.thumbnailHeight = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputMessageText.CONSTRUCTOR:
this.inputMessageContent = new InputMessageText(input);
break;
case InputMessageAnimation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAnimation(input);
break;
case InputMessageAudio.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAudio(input);
break;
case InputMessageDocument.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDocument(input);
break;
case InputMessagePhoto.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePhoto(input);
break;
case InputMessageSticker.CONSTRUCTOR:
this.inputMessageContent = new InputMessageSticker(input);
break;
case InputMessageVideo.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideo(input);
break;
case InputMessageVideoNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideoNote(input);
break;
case InputMessageVoiceNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVoiceNote(input);
break;
case InputMessageLocation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageLocation(input);
break;
case InputMessageVenue.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVenue(input);
break;
case InputMessageContact.CONSTRUCTOR:
this.inputMessageContent = new InputMessageContact(input);
break;
case InputMessageDice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDice(input);
break;
case InputMessageGame.CONSTRUCTOR:
this.inputMessageContent = new InputMessageGame(input);
break;
case InputMessageInvoice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageInvoice(input);
break;
case InputMessagePoll.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePoll(input);
break;
case InputMessageForwarded.CONSTRUCTOR:
this.inputMessageContent = new InputMessageForwarded(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.location == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.location.serialize(output);
}
output.writeInt(this.livePeriod);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.thumbnailUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var thumbnailUrlTmp = this.thumbnailUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(thumbnailUrlTmp.length);
output.write(thumbnailUrlTmp);
}
output.writeInt(this.thumbnailWidth);
output.writeInt(this.thumbnailHeight);
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
if (this.inputMessageContent == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.inputMessageContent.serialize(output);
}
}
}
public static class InputInlineQueryResultPhoto extends InputInlineQueryResult {
public String id;
public String title;
public String description;
public String thumbnailUrl;
public String photoUrl;
public int photoWidth;
public int photoHeight;
public ReplyMarkup replyMarkup;
public InputMessageContent inputMessageContent;
public static final int CONSTRUCTOR = -1123338721;
public InputInlineQueryResultPhoto() {}
public InputInlineQueryResultPhoto(String id, String title, String description, String thumbnailUrl, String photoUrl, int photoWidth, int photoHeight, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) {
this.id = id;
this.title = title;
this.description = description;
this.thumbnailUrl = thumbnailUrl;
this.photoUrl = photoUrl;
this.photoWidth = photoWidth;
this.photoHeight = photoHeight;
this.replyMarkup = replyMarkup;
this.inputMessageContent = inputMessageContent;
}
public InputInlineQueryResultPhoto(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var descriptionTmp = new byte[input.readInt()];
input.readFully(descriptionTmp);
this.description = new String(descriptionTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var thumbnailUrlTmp = new byte[input.readInt()];
input.readFully(thumbnailUrlTmp);
this.thumbnailUrl = new String(thumbnailUrlTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var photoUrlTmp = new byte[input.readInt()];
input.readFully(photoUrlTmp);
this.photoUrl = new String(photoUrlTmp, StandardCharsets.UTF_8);
}
this.photoWidth = input.readInt();
this.photoHeight = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputMessageText.CONSTRUCTOR:
this.inputMessageContent = new InputMessageText(input);
break;
case InputMessageAnimation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAnimation(input);
break;
case InputMessageAudio.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAudio(input);
break;
case InputMessageDocument.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDocument(input);
break;
case InputMessagePhoto.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePhoto(input);
break;
case InputMessageSticker.CONSTRUCTOR:
this.inputMessageContent = new InputMessageSticker(input);
break;
case InputMessageVideo.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideo(input);
break;
case InputMessageVideoNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideoNote(input);
break;
case InputMessageVoiceNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVoiceNote(input);
break;
case InputMessageLocation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageLocation(input);
break;
case InputMessageVenue.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVenue(input);
break;
case InputMessageContact.CONSTRUCTOR:
this.inputMessageContent = new InputMessageContact(input);
break;
case InputMessageDice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDice(input);
break;
case InputMessageGame.CONSTRUCTOR:
this.inputMessageContent = new InputMessageGame(input);
break;
case InputMessageInvoice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageInvoice(input);
break;
case InputMessagePoll.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePoll(input);
break;
case InputMessageForwarded.CONSTRUCTOR:
this.inputMessageContent = new InputMessageForwarded(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.description == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var descriptionTmp = this.description.getBytes(StandardCharsets.UTF_8);
output.writeInt(descriptionTmp.length);
output.write(descriptionTmp);
}
if (this.thumbnailUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var thumbnailUrlTmp = this.thumbnailUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(thumbnailUrlTmp.length);
output.write(thumbnailUrlTmp);
}
if (this.photoUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var photoUrlTmp = this.photoUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(photoUrlTmp.length);
output.write(photoUrlTmp);
}
output.writeInt(this.photoWidth);
output.writeInt(this.photoHeight);
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
if (this.inputMessageContent == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.inputMessageContent.serialize(output);
}
}
}
public static class InputInlineQueryResultSticker extends InputInlineQueryResult {
public String id;
public String thumbnailUrl;
public String stickerUrl;
public int stickerWidth;
public int stickerHeight;
public ReplyMarkup replyMarkup;
public InputMessageContent inputMessageContent;
public static final int CONSTRUCTOR = 274007129;
public InputInlineQueryResultSticker() {}
public InputInlineQueryResultSticker(String id, String thumbnailUrl, String stickerUrl, int stickerWidth, int stickerHeight, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) {
this.id = id;
this.thumbnailUrl = thumbnailUrl;
this.stickerUrl = stickerUrl;
this.stickerWidth = stickerWidth;
this.stickerHeight = stickerHeight;
this.replyMarkup = replyMarkup;
this.inputMessageContent = inputMessageContent;
}
public InputInlineQueryResultSticker(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var thumbnailUrlTmp = new byte[input.readInt()];
input.readFully(thumbnailUrlTmp);
this.thumbnailUrl = new String(thumbnailUrlTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var stickerUrlTmp = new byte[input.readInt()];
input.readFully(stickerUrlTmp);
this.stickerUrl = new String(stickerUrlTmp, StandardCharsets.UTF_8);
}
this.stickerWidth = input.readInt();
this.stickerHeight = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputMessageText.CONSTRUCTOR:
this.inputMessageContent = new InputMessageText(input);
break;
case InputMessageAnimation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAnimation(input);
break;
case InputMessageAudio.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAudio(input);
break;
case InputMessageDocument.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDocument(input);
break;
case InputMessagePhoto.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePhoto(input);
break;
case InputMessageSticker.CONSTRUCTOR:
this.inputMessageContent = new InputMessageSticker(input);
break;
case InputMessageVideo.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideo(input);
break;
case InputMessageVideoNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideoNote(input);
break;
case InputMessageVoiceNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVoiceNote(input);
break;
case InputMessageLocation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageLocation(input);
break;
case InputMessageVenue.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVenue(input);
break;
case InputMessageContact.CONSTRUCTOR:
this.inputMessageContent = new InputMessageContact(input);
break;
case InputMessageDice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDice(input);
break;
case InputMessageGame.CONSTRUCTOR:
this.inputMessageContent = new InputMessageGame(input);
break;
case InputMessageInvoice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageInvoice(input);
break;
case InputMessagePoll.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePoll(input);
break;
case InputMessageForwarded.CONSTRUCTOR:
this.inputMessageContent = new InputMessageForwarded(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.thumbnailUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var thumbnailUrlTmp = this.thumbnailUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(thumbnailUrlTmp.length);
output.write(thumbnailUrlTmp);
}
if (this.stickerUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var stickerUrlTmp = this.stickerUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(stickerUrlTmp.length);
output.write(stickerUrlTmp);
}
output.writeInt(this.stickerWidth);
output.writeInt(this.stickerHeight);
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
if (this.inputMessageContent == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.inputMessageContent.serialize(output);
}
}
}
public static class InputInlineQueryResultVenue extends InputInlineQueryResult {
public String id;
public Venue venue;
public String thumbnailUrl;
public int thumbnailWidth;
public int thumbnailHeight;
public ReplyMarkup replyMarkup;
public InputMessageContent inputMessageContent;
public static final int CONSTRUCTOR = 541704509;
public InputInlineQueryResultVenue() {}
public InputInlineQueryResultVenue(String id, Venue venue, String thumbnailUrl, int thumbnailWidth, int thumbnailHeight, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) {
this.id = id;
this.venue = venue;
this.thumbnailUrl = thumbnailUrl;
this.thumbnailWidth = thumbnailWidth;
this.thumbnailHeight = thumbnailHeight;
this.replyMarkup = replyMarkup;
this.inputMessageContent = inputMessageContent;
}
public InputInlineQueryResultVenue(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Venue.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.venue = new Venue(input);
}
if (input.readBoolean()) {
var thumbnailUrlTmp = new byte[input.readInt()];
input.readFully(thumbnailUrlTmp);
this.thumbnailUrl = new String(thumbnailUrlTmp, StandardCharsets.UTF_8);
}
this.thumbnailWidth = input.readInt();
this.thumbnailHeight = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputMessageText.CONSTRUCTOR:
this.inputMessageContent = new InputMessageText(input);
break;
case InputMessageAnimation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAnimation(input);
break;
case InputMessageAudio.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAudio(input);
break;
case InputMessageDocument.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDocument(input);
break;
case InputMessagePhoto.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePhoto(input);
break;
case InputMessageSticker.CONSTRUCTOR:
this.inputMessageContent = new InputMessageSticker(input);
break;
case InputMessageVideo.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideo(input);
break;
case InputMessageVideoNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideoNote(input);
break;
case InputMessageVoiceNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVoiceNote(input);
break;
case InputMessageLocation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageLocation(input);
break;
case InputMessageVenue.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVenue(input);
break;
case InputMessageContact.CONSTRUCTOR:
this.inputMessageContent = new InputMessageContact(input);
break;
case InputMessageDice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDice(input);
break;
case InputMessageGame.CONSTRUCTOR:
this.inputMessageContent = new InputMessageGame(input);
break;
case InputMessageInvoice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageInvoice(input);
break;
case InputMessagePoll.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePoll(input);
break;
case InputMessageForwarded.CONSTRUCTOR:
this.inputMessageContent = new InputMessageForwarded(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.venue == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.venue.serialize(output);
}
if (this.thumbnailUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var thumbnailUrlTmp = this.thumbnailUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(thumbnailUrlTmp.length);
output.write(thumbnailUrlTmp);
}
output.writeInt(this.thumbnailWidth);
output.writeInt(this.thumbnailHeight);
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
if (this.inputMessageContent == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.inputMessageContent.serialize(output);
}
}
}
public static class InputInlineQueryResultVideo extends InputInlineQueryResult {
public String id;
public String title;
public String description;
public String thumbnailUrl;
public String videoUrl;
public String mimeType;
public int videoWidth;
public int videoHeight;
public int videoDuration;
public ReplyMarkup replyMarkup;
public InputMessageContent inputMessageContent;
public static final int CONSTRUCTOR = 1724073191;
public InputInlineQueryResultVideo() {}
public InputInlineQueryResultVideo(String id, String title, String description, String thumbnailUrl, String videoUrl, String mimeType, int videoWidth, int videoHeight, int videoDuration, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) {
this.id = id;
this.title = title;
this.description = description;
this.thumbnailUrl = thumbnailUrl;
this.videoUrl = videoUrl;
this.mimeType = mimeType;
this.videoWidth = videoWidth;
this.videoHeight = videoHeight;
this.videoDuration = videoDuration;
this.replyMarkup = replyMarkup;
this.inputMessageContent = inputMessageContent;
}
public InputInlineQueryResultVideo(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var descriptionTmp = new byte[input.readInt()];
input.readFully(descriptionTmp);
this.description = new String(descriptionTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var thumbnailUrlTmp = new byte[input.readInt()];
input.readFully(thumbnailUrlTmp);
this.thumbnailUrl = new String(thumbnailUrlTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var videoUrlTmp = new byte[input.readInt()];
input.readFully(videoUrlTmp);
this.videoUrl = new String(videoUrlTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var mimeTypeTmp = new byte[input.readInt()];
input.readFully(mimeTypeTmp);
this.mimeType = new String(mimeTypeTmp, StandardCharsets.UTF_8);
}
this.videoWidth = input.readInt();
this.videoHeight = input.readInt();
this.videoDuration = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputMessageText.CONSTRUCTOR:
this.inputMessageContent = new InputMessageText(input);
break;
case InputMessageAnimation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAnimation(input);
break;
case InputMessageAudio.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAudio(input);
break;
case InputMessageDocument.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDocument(input);
break;
case InputMessagePhoto.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePhoto(input);
break;
case InputMessageSticker.CONSTRUCTOR:
this.inputMessageContent = new InputMessageSticker(input);
break;
case InputMessageVideo.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideo(input);
break;
case InputMessageVideoNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideoNote(input);
break;
case InputMessageVoiceNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVoiceNote(input);
break;
case InputMessageLocation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageLocation(input);
break;
case InputMessageVenue.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVenue(input);
break;
case InputMessageContact.CONSTRUCTOR:
this.inputMessageContent = new InputMessageContact(input);
break;
case InputMessageDice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDice(input);
break;
case InputMessageGame.CONSTRUCTOR:
this.inputMessageContent = new InputMessageGame(input);
break;
case InputMessageInvoice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageInvoice(input);
break;
case InputMessagePoll.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePoll(input);
break;
case InputMessageForwarded.CONSTRUCTOR:
this.inputMessageContent = new InputMessageForwarded(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.description == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var descriptionTmp = this.description.getBytes(StandardCharsets.UTF_8);
output.writeInt(descriptionTmp.length);
output.write(descriptionTmp);
}
if (this.thumbnailUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var thumbnailUrlTmp = this.thumbnailUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(thumbnailUrlTmp.length);
output.write(thumbnailUrlTmp);
}
if (this.videoUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var videoUrlTmp = this.videoUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(videoUrlTmp.length);
output.write(videoUrlTmp);
}
if (this.mimeType == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var mimeTypeTmp = this.mimeType.getBytes(StandardCharsets.UTF_8);
output.writeInt(mimeTypeTmp.length);
output.write(mimeTypeTmp);
}
output.writeInt(this.videoWidth);
output.writeInt(this.videoHeight);
output.writeInt(this.videoDuration);
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
if (this.inputMessageContent == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.inputMessageContent.serialize(output);
}
}
}
public static class InputInlineQueryResultVoiceNote extends InputInlineQueryResult {
public String id;
public String title;
public String voiceNoteUrl;
public int voiceNoteDuration;
public ReplyMarkup replyMarkup;
public InputMessageContent inputMessageContent;
public static final int CONSTRUCTOR = -1790072503;
public InputInlineQueryResultVoiceNote() {}
public InputInlineQueryResultVoiceNote(String id, String title, String voiceNoteUrl, int voiceNoteDuration, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) {
this.id = id;
this.title = title;
this.voiceNoteUrl = voiceNoteUrl;
this.voiceNoteDuration = voiceNoteDuration;
this.replyMarkup = replyMarkup;
this.inputMessageContent = inputMessageContent;
}
public InputInlineQueryResultVoiceNote(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var voiceNoteUrlTmp = new byte[input.readInt()];
input.readFully(voiceNoteUrlTmp);
this.voiceNoteUrl = new String(voiceNoteUrlTmp, StandardCharsets.UTF_8);
}
this.voiceNoteDuration = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputMessageText.CONSTRUCTOR:
this.inputMessageContent = new InputMessageText(input);
break;
case InputMessageAnimation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAnimation(input);
break;
case InputMessageAudio.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAudio(input);
break;
case InputMessageDocument.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDocument(input);
break;
case InputMessagePhoto.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePhoto(input);
break;
case InputMessageSticker.CONSTRUCTOR:
this.inputMessageContent = new InputMessageSticker(input);
break;
case InputMessageVideo.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideo(input);
break;
case InputMessageVideoNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideoNote(input);
break;
case InputMessageVoiceNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVoiceNote(input);
break;
case InputMessageLocation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageLocation(input);
break;
case InputMessageVenue.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVenue(input);
break;
case InputMessageContact.CONSTRUCTOR:
this.inputMessageContent = new InputMessageContact(input);
break;
case InputMessageDice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDice(input);
break;
case InputMessageGame.CONSTRUCTOR:
this.inputMessageContent = new InputMessageGame(input);
break;
case InputMessageInvoice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageInvoice(input);
break;
case InputMessagePoll.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePoll(input);
break;
case InputMessageForwarded.CONSTRUCTOR:
this.inputMessageContent = new InputMessageForwarded(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.voiceNoteUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var voiceNoteUrlTmp = this.voiceNoteUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(voiceNoteUrlTmp.length);
output.write(voiceNoteUrlTmp);
}
output.writeInt(this.voiceNoteDuration);
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
if (this.inputMessageContent == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.inputMessageContent.serialize(output);
}
}
}
public static class InputMessageText extends InputMessageContent {
public FormattedText text;
public boolean disableWebPagePreview;
public boolean clearDraft;
public static final int CONSTRUCTOR = 247050392;
public InputMessageText() {}
public InputMessageText(FormattedText text, boolean disableWebPagePreview, boolean clearDraft) {
this.text = text;
this.disableWebPagePreview = disableWebPagePreview;
this.clearDraft = clearDraft;
}
public InputMessageText(DataInput input) throws IOException {
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.text = new FormattedText(input);
}
this.disableWebPagePreview = input.readBoolean();
this.clearDraft = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
output.writeBoolean(this.disableWebPagePreview);
output.writeBoolean(this.clearDraft);
}
}
public static class InputMessageAnimation extends InputMessageContent {
public InputFile animation;
public InputThumbnail thumbnail;
public int duration;
public int width;
public int height;
public FormattedText caption;
public static final int CONSTRUCTOR = 926542724;
public InputMessageAnimation() {}
public InputMessageAnimation(InputFile animation, InputThumbnail thumbnail, int duration, int width, int height, FormattedText caption) {
this.animation = animation;
this.thumbnail = thumbnail;
this.duration = duration;
this.width = width;
this.height = height;
this.caption = caption;
}
public InputMessageAnimation(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.animation = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.animation = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.animation = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.animation = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
if (InputThumbnail.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.thumbnail = new InputThumbnail(input);
}
this.duration = input.readInt();
this.width = input.readInt();
this.height = input.readInt();
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new FormattedText(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.animation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.animation.serialize(output);
}
if (this.thumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.thumbnail.serialize(output);
}
output.writeInt(this.duration);
output.writeInt(this.width);
output.writeInt(this.height);
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
}
}
public static class InputMessageAudio extends InputMessageContent {
public InputFile audio;
public InputThumbnail albumCoverThumbnail;
public int duration;
public String title;
public String performer;
public FormattedText caption;
public static final int CONSTRUCTOR = -626786126;
public InputMessageAudio() {}
public InputMessageAudio(InputFile audio, InputThumbnail albumCoverThumbnail, int duration, String title, String performer, FormattedText caption) {
this.audio = audio;
this.albumCoverThumbnail = albumCoverThumbnail;
this.duration = duration;
this.title = title;
this.performer = performer;
this.caption = caption;
}
public InputMessageAudio(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.audio = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.audio = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.audio = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.audio = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
if (InputThumbnail.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.albumCoverThumbnail = new InputThumbnail(input);
}
this.duration = input.readInt();
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var performerTmp = new byte[input.readInt()];
input.readFully(performerTmp);
this.performer = new String(performerTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new FormattedText(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.audio == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.audio.serialize(output);
}
if (this.albumCoverThumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.albumCoverThumbnail.serialize(output);
}
output.writeInt(this.duration);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.performer == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var performerTmp = this.performer.getBytes(StandardCharsets.UTF_8);
output.writeInt(performerTmp.length);
output.write(performerTmp);
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
}
}
public static class InputMessageDocument extends InputMessageContent {
public InputFile document;
public InputThumbnail thumbnail;
public FormattedText caption;
public static final int CONSTRUCTOR = 937970604;
public InputMessageDocument() {}
public InputMessageDocument(InputFile document, InputThumbnail thumbnail, FormattedText caption) {
this.document = document;
this.thumbnail = thumbnail;
this.caption = caption;
}
public InputMessageDocument(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.document = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.document = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.document = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.document = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
if (InputThumbnail.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.thumbnail = new InputThumbnail(input);
}
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new FormattedText(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.document == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.document.serialize(output);
}
if (this.thumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.thumbnail.serialize(output);
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
}
}
public static class InputMessagePhoto extends InputMessageContent {
public InputFile photo;
public InputThumbnail thumbnail;
public int[] addedStickerFileIds;
public int width;
public int height;
public FormattedText caption;
public int ttl;
public static final int CONSTRUCTOR = 1648801584;
public InputMessagePhoto() {}
public InputMessagePhoto(InputFile photo, InputThumbnail thumbnail, int[] addedStickerFileIds, int width, int height, FormattedText caption, int ttl) {
this.photo = photo;
this.thumbnail = thumbnail;
this.addedStickerFileIds = addedStickerFileIds;
this.width = width;
this.height = height;
this.caption = caption;
this.ttl = ttl;
}
public InputMessagePhoto(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.photo = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.photo = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.photo = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.photo = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
if (InputThumbnail.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.thumbnail = new InputThumbnail(input);
}
if (input.readBoolean()) {
this.addedStickerFileIds = new int[input.readInt()];
for (int i = 0; i < this.addedStickerFileIds.length; i++) {
this.addedStickerFileIds[i] = input.readInt();
}
}
this.width = input.readInt();
this.height = input.readInt();
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new FormattedText(input);
}
this.ttl = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.photo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.photo.serialize(output);
}
if (this.thumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.thumbnail.serialize(output);
}
if (this.addedStickerFileIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.addedStickerFileIds.length);
for (int i = 0; i < this.addedStickerFileIds.length; i++) {
output.writeInt(this.addedStickerFileIds[i]);
}
}
output.writeInt(this.width);
output.writeInt(this.height);
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
output.writeInt(this.ttl);
}
}
public static class InputMessageSticker extends InputMessageContent {
public InputFile sticker;
public InputThumbnail thumbnail;
public int width;
public int height;
public static final int CONSTRUCTOR = 740776325;
public InputMessageSticker() {}
public InputMessageSticker(InputFile sticker, InputThumbnail thumbnail, int width, int height) {
this.sticker = sticker;
this.thumbnail = thumbnail;
this.width = width;
this.height = height;
}
public InputMessageSticker(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.sticker = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.sticker = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.sticker = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.sticker = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
if (InputThumbnail.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.thumbnail = new InputThumbnail(input);
}
this.width = input.readInt();
this.height = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.sticker == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.sticker.serialize(output);
}
if (this.thumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.thumbnail.serialize(output);
}
output.writeInt(this.width);
output.writeInt(this.height);
}
}
public static class InputMessageVideo extends InputMessageContent {
public InputFile video;
public InputThumbnail thumbnail;
public int[] addedStickerFileIds;
public int duration;
public int width;
public int height;
public boolean supportsStreaming;
public FormattedText caption;
public int ttl;
public static final int CONSTRUCTOR = -2108486755;
public InputMessageVideo() {}
public InputMessageVideo(InputFile video, InputThumbnail thumbnail, int[] addedStickerFileIds, int duration, int width, int height, boolean supportsStreaming, FormattedText caption, int ttl) {
this.video = video;
this.thumbnail = thumbnail;
this.addedStickerFileIds = addedStickerFileIds;
this.duration = duration;
this.width = width;
this.height = height;
this.supportsStreaming = supportsStreaming;
this.caption = caption;
this.ttl = ttl;
}
public InputMessageVideo(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.video = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.video = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.video = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.video = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
if (InputThumbnail.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.thumbnail = new InputThumbnail(input);
}
if (input.readBoolean()) {
this.addedStickerFileIds = new int[input.readInt()];
for (int i = 0; i < this.addedStickerFileIds.length; i++) {
this.addedStickerFileIds[i] = input.readInt();
}
}
this.duration = input.readInt();
this.width = input.readInt();
this.height = input.readInt();
this.supportsStreaming = input.readBoolean();
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new FormattedText(input);
}
this.ttl = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.video == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.video.serialize(output);
}
if (this.thumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.thumbnail.serialize(output);
}
if (this.addedStickerFileIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.addedStickerFileIds.length);
for (int i = 0; i < this.addedStickerFileIds.length; i++) {
output.writeInt(this.addedStickerFileIds[i]);
}
}
output.writeInt(this.duration);
output.writeInt(this.width);
output.writeInt(this.height);
output.writeBoolean(this.supportsStreaming);
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
output.writeInt(this.ttl);
}
}
public static class InputMessageVideoNote extends InputMessageContent {
public InputFile videoNote;
public InputThumbnail thumbnail;
public int duration;
public int length;
public static final int CONSTRUCTOR = 279108859;
public InputMessageVideoNote() {}
public InputMessageVideoNote(InputFile videoNote, InputThumbnail thumbnail, int duration, int length) {
this.videoNote = videoNote;
this.thumbnail = thumbnail;
this.duration = duration;
this.length = length;
}
public InputMessageVideoNote(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.videoNote = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.videoNote = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.videoNote = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.videoNote = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
if (InputThumbnail.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.thumbnail = new InputThumbnail(input);
}
this.duration = input.readInt();
this.length = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.videoNote == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.videoNote.serialize(output);
}
if (this.thumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.thumbnail.serialize(output);
}
output.writeInt(this.duration);
output.writeInt(this.length);
}
}
public static class InputMessageVoiceNote extends InputMessageContent {
public InputFile voiceNote;
public int duration;
public byte[] waveform;
public FormattedText caption;
public static final int CONSTRUCTOR = 2136519657;
public InputMessageVoiceNote() {}
public InputMessageVoiceNote(InputFile voiceNote, int duration, byte[] waveform, FormattedText caption) {
this.voiceNote = voiceNote;
this.duration = duration;
this.waveform = waveform;
this.caption = caption;
}
public InputMessageVoiceNote(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.voiceNote = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.voiceNote = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.voiceNote = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.voiceNote = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.duration = input.readInt();
if (input.readBoolean()) {
this.waveform = new byte[input.readInt()];
input.readFully(this.waveform);
}
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new FormattedText(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.voiceNote == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.voiceNote.serialize(output);
}
output.writeInt(this.duration);
if (this.waveform == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.waveform.length);
output.write(this.waveform);
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
}
}
public static class InputMessageLocation extends InputMessageContent {
public Location location;
public int livePeriod;
public static final int CONSTRUCTOR = -1624179655;
public InputMessageLocation() {}
public InputMessageLocation(Location location, int livePeriod) {
this.location = location;
this.livePeriod = livePeriod;
}
public InputMessageLocation(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Location.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.location = new Location(input);
}
this.livePeriod = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.location == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.location.serialize(output);
}
output.writeInt(this.livePeriod);
}
}
public static class InputMessageVenue extends InputMessageContent {
public Venue venue;
public static final int CONSTRUCTOR = 1447926269;
public InputMessageVenue() {}
public InputMessageVenue(Venue venue) {
this.venue = venue;
}
public InputMessageVenue(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Venue.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.venue = new Venue(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.venue == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.venue.serialize(output);
}
}
}
public static class InputMessageContact extends InputMessageContent {
public Contact contact;
public static final int CONSTRUCTOR = -982446849;
public InputMessageContact() {}
public InputMessageContact(Contact contact) {
this.contact = contact;
}
public InputMessageContact(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Contact.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.contact = new Contact(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.contact == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.contact.serialize(output);
}
}
}
public static class InputMessageDice extends InputMessageContent {
public String emoji;
public boolean clearDraft;
public static final int CONSTRUCTOR = 841574313;
public InputMessageDice() {}
public InputMessageDice(String emoji, boolean clearDraft) {
this.emoji = emoji;
this.clearDraft = clearDraft;
}
public InputMessageDice(DataInput input) throws IOException {
if (input.readBoolean()) {
var emojiTmp = new byte[input.readInt()];
input.readFully(emojiTmp);
this.emoji = new String(emojiTmp, StandardCharsets.UTF_8);
}
this.clearDraft = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.emoji == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var emojiTmp = this.emoji.getBytes(StandardCharsets.UTF_8);
output.writeInt(emojiTmp.length);
output.write(emojiTmp);
}
output.writeBoolean(this.clearDraft);
}
}
public static class InputMessageGame extends InputMessageContent {
public int botUserId;
public String gameShortName;
public static final int CONSTRUCTOR = -1728000914;
public InputMessageGame() {}
public InputMessageGame(int botUserId, String gameShortName) {
this.botUserId = botUserId;
this.gameShortName = gameShortName;
}
public InputMessageGame(DataInput input) throws IOException {
this.botUserId = input.readInt();
if (input.readBoolean()) {
var gameShortNameTmp = new byte[input.readInt()];
input.readFully(gameShortNameTmp);
this.gameShortName = new String(gameShortNameTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.botUserId);
if (this.gameShortName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var gameShortNameTmp = this.gameShortName.getBytes(StandardCharsets.UTF_8);
output.writeInt(gameShortNameTmp.length);
output.write(gameShortNameTmp);
}
}
}
public static class InputMessageInvoice extends InputMessageContent {
public Invoice invoice;
public String title;
public String description;
public String photoUrl;
public int photoSize;
public int photoWidth;
public int photoHeight;
public byte[] payload;
public String providerToken;
public String providerData;
public String startParameter;
public static final int CONSTRUCTOR = 1038812175;
public InputMessageInvoice() {}
public InputMessageInvoice(Invoice invoice, String title, String description, String photoUrl, int photoSize, int photoWidth, int photoHeight, byte[] payload, String providerToken, String providerData, String startParameter) {
this.invoice = invoice;
this.title = title;
this.description = description;
this.photoUrl = photoUrl;
this.photoSize = photoSize;
this.photoWidth = photoWidth;
this.photoHeight = photoHeight;
this.payload = payload;
this.providerToken = providerToken;
this.providerData = providerData;
this.startParameter = startParameter;
}
public InputMessageInvoice(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Invoice.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.invoice = new Invoice(input);
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var descriptionTmp = new byte[input.readInt()];
input.readFully(descriptionTmp);
this.description = new String(descriptionTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var photoUrlTmp = new byte[input.readInt()];
input.readFully(photoUrlTmp);
this.photoUrl = new String(photoUrlTmp, StandardCharsets.UTF_8);
}
this.photoSize = input.readInt();
this.photoWidth = input.readInt();
this.photoHeight = input.readInt();
if (input.readBoolean()) {
this.payload = new byte[input.readInt()];
input.readFully(this.payload);
}
if (input.readBoolean()) {
var providerTokenTmp = new byte[input.readInt()];
input.readFully(providerTokenTmp);
this.providerToken = new String(providerTokenTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var providerDataTmp = new byte[input.readInt()];
input.readFully(providerDataTmp);
this.providerData = new String(providerDataTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var startParameterTmp = new byte[input.readInt()];
input.readFully(startParameterTmp);
this.startParameter = new String(startParameterTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.invoice == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.invoice.serialize(output);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.description == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var descriptionTmp = this.description.getBytes(StandardCharsets.UTF_8);
output.writeInt(descriptionTmp.length);
output.write(descriptionTmp);
}
if (this.photoUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var photoUrlTmp = this.photoUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(photoUrlTmp.length);
output.write(photoUrlTmp);
}
output.writeInt(this.photoSize);
output.writeInt(this.photoWidth);
output.writeInt(this.photoHeight);
if (this.payload == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.payload.length);
output.write(this.payload);
}
if (this.providerToken == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var providerTokenTmp = this.providerToken.getBytes(StandardCharsets.UTF_8);
output.writeInt(providerTokenTmp.length);
output.write(providerTokenTmp);
}
if (this.providerData == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var providerDataTmp = this.providerData.getBytes(StandardCharsets.UTF_8);
output.writeInt(providerDataTmp.length);
output.write(providerDataTmp);
}
if (this.startParameter == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var startParameterTmp = this.startParameter.getBytes(StandardCharsets.UTF_8);
output.writeInt(startParameterTmp.length);
output.write(startParameterTmp);
}
}
}
public static class InputMessagePoll extends InputMessageContent {
public String question;
public String[] options;
public boolean isAnonymous;
public PollType type;
public int openPeriod;
public int closeDate;
public boolean isClosed;
public static final int CONSTRUCTOR = 2054629900;
public InputMessagePoll() {}
public InputMessagePoll(String question, String[] options, boolean isAnonymous, PollType type, int openPeriod, int closeDate, boolean isClosed) {
this.question = question;
this.options = options;
this.isAnonymous = isAnonymous;
this.type = type;
this.openPeriod = openPeriod;
this.closeDate = closeDate;
this.isClosed = isClosed;
}
public InputMessagePoll(DataInput input) throws IOException {
if (input.readBoolean()) {
var questionTmp = new byte[input.readInt()];
input.readFully(questionTmp);
this.question = new String(questionTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
this.options = new String[input.readInt()];
for (int i = 0; i < this.options.length; i++) {
var optionsTmp = new byte[input.readInt()];
input.readFully(optionsTmp);
this.options[i] = new String(optionsTmp, StandardCharsets.UTF_8);
}
}
this.isAnonymous = input.readBoolean();
if (input.readBoolean()) {
switch(input.readInt()) {
case PollTypeRegular.CONSTRUCTOR:
this.type = new PollTypeRegular(input);
break;
case PollTypeQuiz.CONSTRUCTOR:
this.type = new PollTypeQuiz(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.openPeriod = input.readInt();
this.closeDate = input.readInt();
this.isClosed = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.question == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var questionTmp = this.question.getBytes(StandardCharsets.UTF_8);
output.writeInt(questionTmp.length);
output.write(questionTmp);
}
if (this.options == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.options.length);
for (int i = 0; i < this.options.length; i++) {
var optionsTmp = this.options[i].getBytes(StandardCharsets.UTF_8);
output.writeInt(optionsTmp.length);
output.write(optionsTmp);
}
}
output.writeBoolean(this.isAnonymous);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
output.writeInt(this.openPeriod);
output.writeInt(this.closeDate);
output.writeBoolean(this.isClosed);
}
}
public static class InputMessageForwarded extends InputMessageContent {
public long fromChatId;
public long messageId;
public boolean inGameShare;
public boolean sendCopy;
public boolean removeCaption;
public static final int CONSTRUCTOR = 1503132333;
public InputMessageForwarded() {}
public InputMessageForwarded(long fromChatId, long messageId, boolean inGameShare, boolean sendCopy, boolean removeCaption) {
this.fromChatId = fromChatId;
this.messageId = messageId;
this.inGameShare = inGameShare;
this.sendCopy = sendCopy;
this.removeCaption = removeCaption;
}
public InputMessageForwarded(DataInput input) throws IOException {
this.fromChatId = input.readLong();
this.messageId = input.readLong();
this.inGameShare = input.readBoolean();
this.sendCopy = input.readBoolean();
this.removeCaption = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.fromChatId);
output.writeLong(this.messageId);
output.writeBoolean(this.inGameShare);
output.writeBoolean(this.sendCopy);
output.writeBoolean(this.removeCaption);
}
}
public static class InputPassportElementPersonalDetails extends InputPassportElement {
public PersonalDetails personalDetails;
public static final int CONSTRUCTOR = 164791359;
public InputPassportElementPersonalDetails() {}
public InputPassportElementPersonalDetails(PersonalDetails personalDetails) {
this.personalDetails = personalDetails;
}
public InputPassportElementPersonalDetails(DataInput input) throws IOException {
if (input.readBoolean()) {
if (PersonalDetails.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.personalDetails = new PersonalDetails(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.personalDetails == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.personalDetails.serialize(output);
}
}
}
public static class InputPassportElementPassport extends InputPassportElement {
public InputIdentityDocument passport;
public static final int CONSTRUCTOR = -497011356;
public InputPassportElementPassport() {}
public InputPassportElementPassport(InputIdentityDocument passport) {
this.passport = passport;
}
public InputPassportElementPassport(DataInput input) throws IOException {
if (input.readBoolean()) {
if (InputIdentityDocument.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.passport = new InputIdentityDocument(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.passport == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.passport.serialize(output);
}
}
}
public static class InputPassportElementDriverLicense extends InputPassportElement {
public InputIdentityDocument driverLicense;
public static final int CONSTRUCTOR = 304813264;
public InputPassportElementDriverLicense() {}
public InputPassportElementDriverLicense(InputIdentityDocument driverLicense) {
this.driverLicense = driverLicense;
}
public InputPassportElementDriverLicense(DataInput input) throws IOException {
if (input.readBoolean()) {
if (InputIdentityDocument.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.driverLicense = new InputIdentityDocument(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.driverLicense == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.driverLicense.serialize(output);
}
}
}
public static class InputPassportElementIdentityCard extends InputPassportElement {
public InputIdentityDocument identityCard;
public static final int CONSTRUCTOR = -9963390;
public InputPassportElementIdentityCard() {}
public InputPassportElementIdentityCard(InputIdentityDocument identityCard) {
this.identityCard = identityCard;
}
public InputPassportElementIdentityCard(DataInput input) throws IOException {
if (input.readBoolean()) {
if (InputIdentityDocument.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.identityCard = new InputIdentityDocument(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.identityCard == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.identityCard.serialize(output);
}
}
}
public static class InputPassportElementInternalPassport extends InputPassportElement {
public InputIdentityDocument internalPassport;
public static final int CONSTRUCTOR = 715360043;
public InputPassportElementInternalPassport() {}
public InputPassportElementInternalPassport(InputIdentityDocument internalPassport) {
this.internalPassport = internalPassport;
}
public InputPassportElementInternalPassport(DataInput input) throws IOException {
if (input.readBoolean()) {
if (InputIdentityDocument.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.internalPassport = new InputIdentityDocument(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.internalPassport == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.internalPassport.serialize(output);
}
}
}
public static class InputPassportElementAddress extends InputPassportElement {
public Address address;
public static final int CONSTRUCTOR = 461630480;
public InputPassportElementAddress() {}
public InputPassportElementAddress(Address address) {
this.address = address;
}
public InputPassportElementAddress(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Address.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.address = new Address(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.address == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.address.serialize(output);
}
}
}
public static class InputPassportElementUtilityBill extends InputPassportElement {
public InputPersonalDocument utilityBill;
public static final int CONSTRUCTOR = 1389203841;
public InputPassportElementUtilityBill() {}
public InputPassportElementUtilityBill(InputPersonalDocument utilityBill) {
this.utilityBill = utilityBill;
}
public InputPassportElementUtilityBill(DataInput input) throws IOException {
if (input.readBoolean()) {
if (InputPersonalDocument.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.utilityBill = new InputPersonalDocument(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.utilityBill == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.utilityBill.serialize(output);
}
}
}
public static class InputPassportElementBankStatement extends InputPassportElement {
public InputPersonalDocument bankStatement;
public static final int CONSTRUCTOR = -26585208;
public InputPassportElementBankStatement() {}
public InputPassportElementBankStatement(InputPersonalDocument bankStatement) {
this.bankStatement = bankStatement;
}
public InputPassportElementBankStatement(DataInput input) throws IOException {
if (input.readBoolean()) {
if (InputPersonalDocument.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.bankStatement = new InputPersonalDocument(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.bankStatement == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.bankStatement.serialize(output);
}
}
}
public static class InputPassportElementRentalAgreement extends InputPassportElement {
public InputPersonalDocument rentalAgreement;
public static final int CONSTRUCTOR = 1736154155;
public InputPassportElementRentalAgreement() {}
public InputPassportElementRentalAgreement(InputPersonalDocument rentalAgreement) {
this.rentalAgreement = rentalAgreement;
}
public InputPassportElementRentalAgreement(DataInput input) throws IOException {
if (input.readBoolean()) {
if (InputPersonalDocument.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.rentalAgreement = new InputPersonalDocument(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.rentalAgreement == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.rentalAgreement.serialize(output);
}
}
}
public static class InputPassportElementPassportRegistration extends InputPassportElement {
public InputPersonalDocument passportRegistration;
public static final int CONSTRUCTOR = 1314562128;
public InputPassportElementPassportRegistration() {}
public InputPassportElementPassportRegistration(InputPersonalDocument passportRegistration) {
this.passportRegistration = passportRegistration;
}
public InputPassportElementPassportRegistration(DataInput input) throws IOException {
if (input.readBoolean()) {
if (InputPersonalDocument.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.passportRegistration = new InputPersonalDocument(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.passportRegistration == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.passportRegistration.serialize(output);
}
}
}
public static class InputPassportElementTemporaryRegistration extends InputPassportElement {
public InputPersonalDocument temporaryRegistration;
public static final int CONSTRUCTOR = -1913238047;
public InputPassportElementTemporaryRegistration() {}
public InputPassportElementTemporaryRegistration(InputPersonalDocument temporaryRegistration) {
this.temporaryRegistration = temporaryRegistration;
}
public InputPassportElementTemporaryRegistration(DataInput input) throws IOException {
if (input.readBoolean()) {
if (InputPersonalDocument.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.temporaryRegistration = new InputPersonalDocument(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.temporaryRegistration == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.temporaryRegistration.serialize(output);
}
}
}
public static class InputPassportElementPhoneNumber extends InputPassportElement {
public String phoneNumber;
public static final int CONSTRUCTOR = 1319357497;
public InputPassportElementPhoneNumber() {}
public InputPassportElementPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public InputPassportElementPhoneNumber(DataInput input) throws IOException {
if (input.readBoolean()) {
var phoneNumberTmp = new byte[input.readInt()];
input.readFully(phoneNumberTmp);
this.phoneNumber = new String(phoneNumberTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.phoneNumber == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var phoneNumberTmp = this.phoneNumber.getBytes(StandardCharsets.UTF_8);
output.writeInt(phoneNumberTmp.length);
output.write(phoneNumberTmp);
}
}
}
public static class InputPassportElementEmailAddress extends InputPassportElement {
public String emailAddress;
public static final int CONSTRUCTOR = -248605659;
public InputPassportElementEmailAddress() {}
public InputPassportElementEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
}
public InputPassportElementEmailAddress(DataInput input) throws IOException {
if (input.readBoolean()) {
var emailAddressTmp = new byte[input.readInt()];
input.readFully(emailAddressTmp);
this.emailAddress = new String(emailAddressTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.emailAddress == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var emailAddressTmp = this.emailAddress.getBytes(StandardCharsets.UTF_8);
output.writeInt(emailAddressTmp.length);
output.write(emailAddressTmp);
}
}
}
public static class InputPassportElementError extends Object {
public PassportElementType type;
public String message;
public InputPassportElementErrorSource source;
public static final int CONSTRUCTOR = 285756898;
public InputPassportElementError() {}
public InputPassportElementError(PassportElementType type, String message, InputPassportElementErrorSource source) {
this.type = type;
this.message = message;
this.source = source;
}
public InputPassportElementError(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case PassportElementTypePersonalDetails.CONSTRUCTOR:
this.type = new PassportElementTypePersonalDetails(input);
break;
case PassportElementTypePassport.CONSTRUCTOR:
this.type = new PassportElementTypePassport(input);
break;
case PassportElementTypeDriverLicense.CONSTRUCTOR:
this.type = new PassportElementTypeDriverLicense(input);
break;
case PassportElementTypeIdentityCard.CONSTRUCTOR:
this.type = new PassportElementTypeIdentityCard(input);
break;
case PassportElementTypeInternalPassport.CONSTRUCTOR:
this.type = new PassportElementTypeInternalPassport(input);
break;
case PassportElementTypeAddress.CONSTRUCTOR:
this.type = new PassportElementTypeAddress(input);
break;
case PassportElementTypeUtilityBill.CONSTRUCTOR:
this.type = new PassportElementTypeUtilityBill(input);
break;
case PassportElementTypeBankStatement.CONSTRUCTOR:
this.type = new PassportElementTypeBankStatement(input);
break;
case PassportElementTypeRentalAgreement.CONSTRUCTOR:
this.type = new PassportElementTypeRentalAgreement(input);
break;
case PassportElementTypePassportRegistration.CONSTRUCTOR:
this.type = new PassportElementTypePassportRegistration(input);
break;
case PassportElementTypeTemporaryRegistration.CONSTRUCTOR:
this.type = new PassportElementTypeTemporaryRegistration(input);
break;
case PassportElementTypePhoneNumber.CONSTRUCTOR:
this.type = new PassportElementTypePhoneNumber(input);
break;
case PassportElementTypeEmailAddress.CONSTRUCTOR:
this.type = new PassportElementTypeEmailAddress(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
var messageTmp = new byte[input.readInt()];
input.readFully(messageTmp);
this.message = new String(messageTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputPassportElementErrorSourceUnspecified.CONSTRUCTOR:
this.source = new InputPassportElementErrorSourceUnspecified(input);
break;
case InputPassportElementErrorSourceDataField.CONSTRUCTOR:
this.source = new InputPassportElementErrorSourceDataField(input);
break;
case InputPassportElementErrorSourceFrontSide.CONSTRUCTOR:
this.source = new InputPassportElementErrorSourceFrontSide(input);
break;
case InputPassportElementErrorSourceReverseSide.CONSTRUCTOR:
this.source = new InputPassportElementErrorSourceReverseSide(input);
break;
case InputPassportElementErrorSourceSelfie.CONSTRUCTOR:
this.source = new InputPassportElementErrorSourceSelfie(input);
break;
case InputPassportElementErrorSourceTranslationFile.CONSTRUCTOR:
this.source = new InputPassportElementErrorSourceTranslationFile(input);
break;
case InputPassportElementErrorSourceTranslationFiles.CONSTRUCTOR:
this.source = new InputPassportElementErrorSourceTranslationFiles(input);
break;
case InputPassportElementErrorSourceFile.CONSTRUCTOR:
this.source = new InputPassportElementErrorSourceFile(input);
break;
case InputPassportElementErrorSourceFiles.CONSTRUCTOR:
this.source = new InputPassportElementErrorSourceFiles(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
if (this.message == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var messageTmp = this.message.getBytes(StandardCharsets.UTF_8);
output.writeInt(messageTmp.length);
output.write(messageTmp);
}
if (this.source == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.source.serialize(output);
}
}
}
public static class InputPassportElementErrorSourceUnspecified extends InputPassportElementErrorSource {
public byte[] elementHash;
public static final int CONSTRUCTOR = 267230319;
public InputPassportElementErrorSourceUnspecified() {}
public InputPassportElementErrorSourceUnspecified(byte[] elementHash) {
this.elementHash = elementHash;
}
public InputPassportElementErrorSourceUnspecified(DataInput input) throws IOException {
if (input.readBoolean()) {
this.elementHash = new byte[input.readInt()];
input.readFully(this.elementHash);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.elementHash == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.elementHash.length);
output.write(this.elementHash);
}
}
}
public static class InputPassportElementErrorSourceDataField extends InputPassportElementErrorSource {
public String fieldName;
public byte[] dataHash;
public static final int CONSTRUCTOR = -426795002;
public InputPassportElementErrorSourceDataField() {}
public InputPassportElementErrorSourceDataField(String fieldName, byte[] dataHash) {
this.fieldName = fieldName;
this.dataHash = dataHash;
}
public InputPassportElementErrorSourceDataField(DataInput input) throws IOException {
if (input.readBoolean()) {
var fieldNameTmp = new byte[input.readInt()];
input.readFully(fieldNameTmp);
this.fieldName = new String(fieldNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
this.dataHash = new byte[input.readInt()];
input.readFully(this.dataHash);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.fieldName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var fieldNameTmp = this.fieldName.getBytes(StandardCharsets.UTF_8);
output.writeInt(fieldNameTmp.length);
output.write(fieldNameTmp);
}
if (this.dataHash == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.dataHash.length);
output.write(this.dataHash);
}
}
}
public static class InputPassportElementErrorSourceFrontSide extends InputPassportElementErrorSource {
public byte[] fileHash;
public static final int CONSTRUCTOR = 588023741;
public InputPassportElementErrorSourceFrontSide() {}
public InputPassportElementErrorSourceFrontSide(byte[] fileHash) {
this.fileHash = fileHash;
}
public InputPassportElementErrorSourceFrontSide(DataInput input) throws IOException {
if (input.readBoolean()) {
this.fileHash = new byte[input.readInt()];
input.readFully(this.fileHash);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.fileHash == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.fileHash.length);
output.write(this.fileHash);
}
}
}
public static class InputPassportElementErrorSourceReverseSide extends InputPassportElementErrorSource {
public byte[] fileHash;
public static final int CONSTRUCTOR = 413072891;
public InputPassportElementErrorSourceReverseSide() {}
public InputPassportElementErrorSourceReverseSide(byte[] fileHash) {
this.fileHash = fileHash;
}
public InputPassportElementErrorSourceReverseSide(DataInput input) throws IOException {
if (input.readBoolean()) {
this.fileHash = new byte[input.readInt()];
input.readFully(this.fileHash);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.fileHash == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.fileHash.length);
output.write(this.fileHash);
}
}
}
public static class InputPassportElementErrorSourceSelfie extends InputPassportElementErrorSource {
public byte[] fileHash;
public static final int CONSTRUCTOR = -773575528;
public InputPassportElementErrorSourceSelfie() {}
public InputPassportElementErrorSourceSelfie(byte[] fileHash) {
this.fileHash = fileHash;
}
public InputPassportElementErrorSourceSelfie(DataInput input) throws IOException {
if (input.readBoolean()) {
this.fileHash = new byte[input.readInt()];
input.readFully(this.fileHash);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.fileHash == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.fileHash.length);
output.write(this.fileHash);
}
}
}
public static class InputPassportElementErrorSourceTranslationFile extends InputPassportElementErrorSource {
public byte[] fileHash;
public static final int CONSTRUCTOR = 505842299;
public InputPassportElementErrorSourceTranslationFile() {}
public InputPassportElementErrorSourceTranslationFile(byte[] fileHash) {
this.fileHash = fileHash;
}
public InputPassportElementErrorSourceTranslationFile(DataInput input) throws IOException {
if (input.readBoolean()) {
this.fileHash = new byte[input.readInt()];
input.readFully(this.fileHash);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.fileHash == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.fileHash.length);
output.write(this.fileHash);
}
}
}
public static class InputPassportElementErrorSourceTranslationFiles extends InputPassportElementErrorSource {
public byte[][] fileHashes;
public static final int CONSTRUCTOR = -527254048;
public InputPassportElementErrorSourceTranslationFiles() {}
public InputPassportElementErrorSourceTranslationFiles(byte[][] fileHashes) {
this.fileHashes = fileHashes;
}
public InputPassportElementErrorSourceTranslationFiles(DataInput input) throws IOException {
if (input.readBoolean()) {
this.fileHashes = new byte[input.readInt()][];
for (int i = 0; i < this.fileHashes.length; i++) {
this.fileHashes[i] = new byte[input.readInt()];
input.readFully(this.fileHashes[i]);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.fileHashes == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.fileHashes.length);
for (int i = 0; i < this.fileHashes.length; i++) {
output.writeInt(this.fileHashes[i].length);
output.write(this.fileHashes[i]);
}
}
}
}
public static class InputPassportElementErrorSourceFile extends InputPassportElementErrorSource {
public byte[] fileHash;
public static final int CONSTRUCTOR = -298492469;
public InputPassportElementErrorSourceFile() {}
public InputPassportElementErrorSourceFile(byte[] fileHash) {
this.fileHash = fileHash;
}
public InputPassportElementErrorSourceFile(DataInput input) throws IOException {
if (input.readBoolean()) {
this.fileHash = new byte[input.readInt()];
input.readFully(this.fileHash);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.fileHash == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.fileHash.length);
output.write(this.fileHash);
}
}
}
public static class InputPassportElementErrorSourceFiles extends InputPassportElementErrorSource {
public byte[][] fileHashes;
public static final int CONSTRUCTOR = -2008541640;
public InputPassportElementErrorSourceFiles() {}
public InputPassportElementErrorSourceFiles(byte[][] fileHashes) {
this.fileHashes = fileHashes;
}
public InputPassportElementErrorSourceFiles(DataInput input) throws IOException {
if (input.readBoolean()) {
this.fileHashes = new byte[input.readInt()][];
for (int i = 0; i < this.fileHashes.length; i++) {
this.fileHashes[i] = new byte[input.readInt()];
input.readFully(this.fileHashes[i]);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.fileHashes == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.fileHashes.length);
for (int i = 0; i < this.fileHashes.length; i++) {
output.writeInt(this.fileHashes[i].length);
output.write(this.fileHashes[i]);
}
}
}
}
public static class InputPersonalDocument extends Object {
public InputFile[] files;
public InputFile[] translation;
public static final int CONSTRUCTOR = 1676966826;
public InputPersonalDocument() {}
public InputPersonalDocument(InputFile[] files, InputFile[] translation) {
this.files = files;
this.translation = translation;
}
public InputPersonalDocument(DataInput input) throws IOException {
if (input.readBoolean()) {
this.files = new InputFile[input.readInt()];
for (int i = 0; i < this.files.length; i++) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.files[i] = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.files[i] = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.files[i] = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.files[i] = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
if (input.readBoolean()) {
this.translation = new InputFile[input.readInt()];
for (int i = 0; i < this.translation.length; i++) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.translation[i] = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.translation[i] = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.translation[i] = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.translation[i] = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.files == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.files.length);
for (int i = 0; i < this.files.length; i++) {
this.files[i].serialize(output);
}
}
if (this.translation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.translation.length);
for (int i = 0; i < this.translation.length; i++) {
this.translation[i].serialize(output);
}
}
}
}
public static class InputStickerStatic extends InputSticker {
public InputFile sticker;
public String emojis;
public MaskPosition maskPosition;
public static final int CONSTRUCTOR = 1409680603;
public InputStickerStatic() {}
public InputStickerStatic(InputFile sticker, String emojis, MaskPosition maskPosition) {
this.sticker = sticker;
this.emojis = emojis;
this.maskPosition = maskPosition;
}
public InputStickerStatic(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.sticker = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.sticker = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.sticker = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.sticker = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
var emojisTmp = new byte[input.readInt()];
input.readFully(emojisTmp);
this.emojis = new String(emojisTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (MaskPosition.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.maskPosition = new MaskPosition(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.sticker == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.sticker.serialize(output);
}
if (this.emojis == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var emojisTmp = this.emojis.getBytes(StandardCharsets.UTF_8);
output.writeInt(emojisTmp.length);
output.write(emojisTmp);
}
if (this.maskPosition == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.maskPosition.serialize(output);
}
}
}
public static class InputStickerAnimated extends InputSticker {
public InputFile sticker;
public String emojis;
public static final int CONSTRUCTOR = -1127265952;
public InputStickerAnimated() {}
public InputStickerAnimated(InputFile sticker, String emojis) {
this.sticker = sticker;
this.emojis = emojis;
}
public InputStickerAnimated(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.sticker = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.sticker = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.sticker = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.sticker = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
var emojisTmp = new byte[input.readInt()];
input.readFully(emojisTmp);
this.emojis = new String(emojisTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.sticker == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.sticker.serialize(output);
}
if (this.emojis == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var emojisTmp = this.emojis.getBytes(StandardCharsets.UTF_8);
output.writeInt(emojisTmp.length);
output.write(emojisTmp);
}
}
}
public static class InputThumbnail extends Object {
public InputFile thumbnail;
public int width;
public int height;
public static final int CONSTRUCTOR = 1582387236;
public InputThumbnail() {}
public InputThumbnail(InputFile thumbnail, int width, int height) {
this.thumbnail = thumbnail;
this.width = width;
this.height = height;
}
public InputThumbnail(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.thumbnail = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.thumbnail = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.thumbnail = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.thumbnail = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.width = input.readInt();
this.height = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.thumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.thumbnail.serialize(output);
}
output.writeInt(this.width);
output.writeInt(this.height);
}
}
public static class Invoice extends Object {
public String currency;
public LabeledPricePart[] priceParts;
public boolean isTest;
public boolean needName;
public boolean needPhoneNumber;
public boolean needEmailAddress;
public boolean needShippingAddress;
public boolean sendPhoneNumberToProvider;
public boolean sendEmailAddressToProvider;
public boolean isFlexible;
public static final int CONSTRUCTOR = -368451690;
public Invoice() {}
public Invoice(String currency, LabeledPricePart[] priceParts, boolean isTest, boolean needName, boolean needPhoneNumber, boolean needEmailAddress, boolean needShippingAddress, boolean sendPhoneNumberToProvider, boolean sendEmailAddressToProvider, boolean isFlexible) {
this.currency = currency;
this.priceParts = priceParts;
this.isTest = isTest;
this.needName = needName;
this.needPhoneNumber = needPhoneNumber;
this.needEmailAddress = needEmailAddress;
this.needShippingAddress = needShippingAddress;
this.sendPhoneNumberToProvider = sendPhoneNumberToProvider;
this.sendEmailAddressToProvider = sendEmailAddressToProvider;
this.isFlexible = isFlexible;
}
public Invoice(DataInput input) throws IOException {
if (input.readBoolean()) {
var currencyTmp = new byte[input.readInt()];
input.readFully(currencyTmp);
this.currency = new String(currencyTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
this.priceParts = new LabeledPricePart[input.readInt()];
for (int i = 0; i < this.priceParts.length; i++) {
if (LabeledPricePart.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.priceParts[i] = new LabeledPricePart(input);
}
}
this.isTest = input.readBoolean();
this.needName = input.readBoolean();
this.needPhoneNumber = input.readBoolean();
this.needEmailAddress = input.readBoolean();
this.needShippingAddress = input.readBoolean();
this.sendPhoneNumberToProvider = input.readBoolean();
this.sendEmailAddressToProvider = input.readBoolean();
this.isFlexible = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.currency == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var currencyTmp = this.currency.getBytes(StandardCharsets.UTF_8);
output.writeInt(currencyTmp.length);
output.write(currencyTmp);
}
if (this.priceParts == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.priceParts.length);
for (int i = 0; i < this.priceParts.length; i++) {
this.priceParts[i].serialize(output);
}
}
output.writeBoolean(this.isTest);
output.writeBoolean(this.needName);
output.writeBoolean(this.needPhoneNumber);
output.writeBoolean(this.needEmailAddress);
output.writeBoolean(this.needShippingAddress);
output.writeBoolean(this.sendPhoneNumberToProvider);
output.writeBoolean(this.sendEmailAddressToProvider);
output.writeBoolean(this.isFlexible);
}
}
public static class JsonObjectMember extends Object {
public String key;
public JsonValue value;
public static final int CONSTRUCTOR = -1803309418;
public JsonObjectMember() {}
public JsonObjectMember(String key, JsonValue value) {
this.key = key;
this.value = value;
}
public JsonObjectMember(DataInput input) throws IOException {
if (input.readBoolean()) {
var keyTmp = new byte[input.readInt()];
input.readFully(keyTmp);
this.key = new String(keyTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case JsonValueNull.CONSTRUCTOR:
this.value = new JsonValueNull(input);
break;
case JsonValueBoolean.CONSTRUCTOR:
this.value = new JsonValueBoolean(input);
break;
case JsonValueNumber.CONSTRUCTOR:
this.value = new JsonValueNumber(input);
break;
case JsonValueString.CONSTRUCTOR:
this.value = new JsonValueString(input);
break;
case JsonValueArray.CONSTRUCTOR:
this.value = new JsonValueArray(input);
break;
case JsonValueObject.CONSTRUCTOR:
this.value = new JsonValueObject(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.key == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var keyTmp = this.key.getBytes(StandardCharsets.UTF_8);
output.writeInt(keyTmp.length);
output.write(keyTmp);
}
if (this.value == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.value.serialize(output);
}
}
}
public static class JsonValueNull extends JsonValue {
public static final int CONSTRUCTOR = -92872499;
public JsonValueNull() {}
public JsonValueNull(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class JsonValueBoolean extends JsonValue {
public boolean value;
public static final int CONSTRUCTOR = -2142186576;
public JsonValueBoolean() {}
public JsonValueBoolean(boolean value) {
this.value = value;
}
public JsonValueBoolean(DataInput input) throws IOException {
this.value = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.value);
}
}
public static class JsonValueNumber extends JsonValue {
public double value;
public static final int CONSTRUCTOR = -1010822033;
public JsonValueNumber() {}
public JsonValueNumber(double value) {
this.value = value;
}
public JsonValueNumber(DataInput input) throws IOException {
this.value = input.readDouble();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeDouble(this.value);
}
}
public static class JsonValueString extends JsonValue {
public String value;
public static final int CONSTRUCTOR = 1597947313;
public JsonValueString() {}
public JsonValueString(String value) {
this.value = value;
}
public JsonValueString(DataInput input) throws IOException {
if (input.readBoolean()) {
var valueTmp = new byte[input.readInt()];
input.readFully(valueTmp);
this.value = new String(valueTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.value == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var valueTmp = this.value.getBytes(StandardCharsets.UTF_8);
output.writeInt(valueTmp.length);
output.write(valueTmp);
}
}
}
public static class JsonValueArray extends JsonValue {
public JsonValue[] values;
public static final int CONSTRUCTOR = -183913546;
public JsonValueArray() {}
public JsonValueArray(JsonValue[] values) {
this.values = values;
}
public JsonValueArray(DataInput input) throws IOException {
if (input.readBoolean()) {
this.values = new JsonValue[input.readInt()];
for (int i = 0; i < this.values.length; i++) {
switch(input.readInt()) {
case JsonValueNull.CONSTRUCTOR:
this.values[i] = new JsonValueNull(input);
break;
case JsonValueBoolean.CONSTRUCTOR:
this.values[i] = new JsonValueBoolean(input);
break;
case JsonValueNumber.CONSTRUCTOR:
this.values[i] = new JsonValueNumber(input);
break;
case JsonValueString.CONSTRUCTOR:
this.values[i] = new JsonValueString(input);
break;
case JsonValueArray.CONSTRUCTOR:
this.values[i] = new JsonValueArray(input);
break;
case JsonValueObject.CONSTRUCTOR:
this.values[i] = new JsonValueObject(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.values == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.values.length);
for (int i = 0; i < this.values.length; i++) {
this.values[i].serialize(output);
}
}
}
}
public static class JsonValueObject extends JsonValue {
public JsonObjectMember[] members;
public static final int CONSTRUCTOR = 520252026;
public JsonValueObject() {}
public JsonValueObject(JsonObjectMember[] members) {
this.members = members;
}
public JsonValueObject(DataInput input) throws IOException {
if (input.readBoolean()) {
this.members = new JsonObjectMember[input.readInt()];
for (int i = 0; i < this.members.length; i++) {
if (JsonObjectMember.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.members[i] = new JsonObjectMember(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.members == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.members.length);
for (int i = 0; i < this.members.length; i++) {
this.members[i].serialize(output);
}
}
}
}
public static class KeyboardButton extends Object {
public String text;
public KeyboardButtonType type;
public static final int CONSTRUCTOR = -2069836172;
public KeyboardButton() {}
public KeyboardButton(String text, KeyboardButtonType type) {
this.text = text;
this.type = type;
}
public KeyboardButton(DataInput input) throws IOException {
if (input.readBoolean()) {
var textTmp = new byte[input.readInt()];
input.readFully(textTmp);
this.text = new String(textTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case KeyboardButtonTypeText.CONSTRUCTOR:
this.type = new KeyboardButtonTypeText(input);
break;
case KeyboardButtonTypeRequestPhoneNumber.CONSTRUCTOR:
this.type = new KeyboardButtonTypeRequestPhoneNumber(input);
break;
case KeyboardButtonTypeRequestLocation.CONSTRUCTOR:
this.type = new KeyboardButtonTypeRequestLocation(input);
break;
case KeyboardButtonTypeRequestPoll.CONSTRUCTOR:
this.type = new KeyboardButtonTypeRequestPoll(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var textTmp = this.text.getBytes(StandardCharsets.UTF_8);
output.writeInt(textTmp.length);
output.write(textTmp);
}
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
}
}
public static class KeyboardButtonTypeText extends KeyboardButtonType {
public static final int CONSTRUCTOR = -1773037256;
public KeyboardButtonTypeText() {}
public KeyboardButtonTypeText(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class KeyboardButtonTypeRequestPhoneNumber extends KeyboardButtonType {
public static final int CONSTRUCTOR = -1529235527;
public KeyboardButtonTypeRequestPhoneNumber() {}
public KeyboardButtonTypeRequestPhoneNumber(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class KeyboardButtonTypeRequestLocation extends KeyboardButtonType {
public static final int CONSTRUCTOR = -125661955;
public KeyboardButtonTypeRequestLocation() {}
public KeyboardButtonTypeRequestLocation(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class KeyboardButtonTypeRequestPoll extends KeyboardButtonType {
public boolean forceRegular;
public boolean forceQuiz;
public static final int CONSTRUCTOR = 1902435512;
public KeyboardButtonTypeRequestPoll() {}
public KeyboardButtonTypeRequestPoll(boolean forceRegular, boolean forceQuiz) {
this.forceRegular = forceRegular;
this.forceQuiz = forceQuiz;
}
public KeyboardButtonTypeRequestPoll(DataInput input) throws IOException {
this.forceRegular = input.readBoolean();
this.forceQuiz = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.forceRegular);
output.writeBoolean(this.forceQuiz);
}
}
public static class LabeledPricePart extends Object {
public String label;
public long amount;
public static final int CONSTRUCTOR = 552789798;
public LabeledPricePart() {}
public LabeledPricePart(String label, long amount) {
this.label = label;
this.amount = amount;
}
public LabeledPricePart(DataInput input) throws IOException {
if (input.readBoolean()) {
var labelTmp = new byte[input.readInt()];
input.readFully(labelTmp);
this.label = new String(labelTmp, StandardCharsets.UTF_8);
}
this.amount = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.label == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var labelTmp = this.label.getBytes(StandardCharsets.UTF_8);
output.writeInt(labelTmp.length);
output.write(labelTmp);
}
output.writeLong(this.amount);
}
}
public static class LanguagePackInfo extends Object {
public String id;
public String baseLanguagePackId;
public String name;
public String nativeName;
public String pluralCode;
public boolean isOfficial;
public boolean isRtl;
public boolean isBeta;
public boolean isInstalled;
public int totalStringCount;
public int translatedStringCount;
public int localStringCount;
public String translationUrl;
public static final int CONSTRUCTOR = 542199642;
public LanguagePackInfo() {}
public LanguagePackInfo(String id, String baseLanguagePackId, String name, String nativeName, String pluralCode, boolean isOfficial, boolean isRtl, boolean isBeta, boolean isInstalled, int totalStringCount, int translatedStringCount, int localStringCount, String translationUrl) {
this.id = id;
this.baseLanguagePackId = baseLanguagePackId;
this.name = name;
this.nativeName = nativeName;
this.pluralCode = pluralCode;
this.isOfficial = isOfficial;
this.isRtl = isRtl;
this.isBeta = isBeta;
this.isInstalled = isInstalled;
this.totalStringCount = totalStringCount;
this.translatedStringCount = translatedStringCount;
this.localStringCount = localStringCount;
this.translationUrl = translationUrl;
}
public LanguagePackInfo(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var baseLanguagePackIdTmp = new byte[input.readInt()];
input.readFully(baseLanguagePackIdTmp);
this.baseLanguagePackId = new String(baseLanguagePackIdTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var nameTmp = new byte[input.readInt()];
input.readFully(nameTmp);
this.name = new String(nameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var nativeNameTmp = new byte[input.readInt()];
input.readFully(nativeNameTmp);
this.nativeName = new String(nativeNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var pluralCodeTmp = new byte[input.readInt()];
input.readFully(pluralCodeTmp);
this.pluralCode = new String(pluralCodeTmp, StandardCharsets.UTF_8);
}
this.isOfficial = input.readBoolean();
this.isRtl = input.readBoolean();
this.isBeta = input.readBoolean();
this.isInstalled = input.readBoolean();
this.totalStringCount = input.readInt();
this.translatedStringCount = input.readInt();
this.localStringCount = input.readInt();
if (input.readBoolean()) {
var translationUrlTmp = new byte[input.readInt()];
input.readFully(translationUrlTmp);
this.translationUrl = new String(translationUrlTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.baseLanguagePackId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var baseLanguagePackIdTmp = this.baseLanguagePackId.getBytes(StandardCharsets.UTF_8);
output.writeInt(baseLanguagePackIdTmp.length);
output.write(baseLanguagePackIdTmp);
}
if (this.name == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nameTmp = this.name.getBytes(StandardCharsets.UTF_8);
output.writeInt(nameTmp.length);
output.write(nameTmp);
}
if (this.nativeName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nativeNameTmp = this.nativeName.getBytes(StandardCharsets.UTF_8);
output.writeInt(nativeNameTmp.length);
output.write(nativeNameTmp);
}
if (this.pluralCode == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var pluralCodeTmp = this.pluralCode.getBytes(StandardCharsets.UTF_8);
output.writeInt(pluralCodeTmp.length);
output.write(pluralCodeTmp);
}
output.writeBoolean(this.isOfficial);
output.writeBoolean(this.isRtl);
output.writeBoolean(this.isBeta);
output.writeBoolean(this.isInstalled);
output.writeInt(this.totalStringCount);
output.writeInt(this.translatedStringCount);
output.writeInt(this.localStringCount);
if (this.translationUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var translationUrlTmp = this.translationUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(translationUrlTmp.length);
output.write(translationUrlTmp);
}
}
}
public static class LanguagePackString extends Object {
public String key;
public LanguagePackStringValue value;
public static final int CONSTRUCTOR = 1307632736;
public LanguagePackString() {}
public LanguagePackString(String key, LanguagePackStringValue value) {
this.key = key;
this.value = value;
}
public LanguagePackString(DataInput input) throws IOException {
if (input.readBoolean()) {
var keyTmp = new byte[input.readInt()];
input.readFully(keyTmp);
this.key = new String(keyTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case LanguagePackStringValueOrdinary.CONSTRUCTOR:
this.value = new LanguagePackStringValueOrdinary(input);
break;
case LanguagePackStringValuePluralized.CONSTRUCTOR:
this.value = new LanguagePackStringValuePluralized(input);
break;
case LanguagePackStringValueDeleted.CONSTRUCTOR:
this.value = new LanguagePackStringValueDeleted(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.key == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var keyTmp = this.key.getBytes(StandardCharsets.UTF_8);
output.writeInt(keyTmp.length);
output.write(keyTmp);
}
if (this.value == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.value.serialize(output);
}
}
}
public static class LanguagePackStringValueOrdinary extends LanguagePackStringValue {
public String value;
public static final int CONSTRUCTOR = -249256352;
public LanguagePackStringValueOrdinary() {}
public LanguagePackStringValueOrdinary(String value) {
this.value = value;
}
public LanguagePackStringValueOrdinary(DataInput input) throws IOException {
if (input.readBoolean()) {
var valueTmp = new byte[input.readInt()];
input.readFully(valueTmp);
this.value = new String(valueTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.value == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var valueTmp = this.value.getBytes(StandardCharsets.UTF_8);
output.writeInt(valueTmp.length);
output.write(valueTmp);
}
}
}
public static class LanguagePackStringValuePluralized extends LanguagePackStringValue {
public String zeroValue;
public String oneValue;
public String twoValue;
public String fewValue;
public String manyValue;
public String otherValue;
public static final int CONSTRUCTOR = 1906840261;
public LanguagePackStringValuePluralized() {}
public LanguagePackStringValuePluralized(String zeroValue, String oneValue, String twoValue, String fewValue, String manyValue, String otherValue) {
this.zeroValue = zeroValue;
this.oneValue = oneValue;
this.twoValue = twoValue;
this.fewValue = fewValue;
this.manyValue = manyValue;
this.otherValue = otherValue;
}
public LanguagePackStringValuePluralized(DataInput input) throws IOException {
if (input.readBoolean()) {
var zeroValueTmp = new byte[input.readInt()];
input.readFully(zeroValueTmp);
this.zeroValue = new String(zeroValueTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var oneValueTmp = new byte[input.readInt()];
input.readFully(oneValueTmp);
this.oneValue = new String(oneValueTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var twoValueTmp = new byte[input.readInt()];
input.readFully(twoValueTmp);
this.twoValue = new String(twoValueTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var fewValueTmp = new byte[input.readInt()];
input.readFully(fewValueTmp);
this.fewValue = new String(fewValueTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var manyValueTmp = new byte[input.readInt()];
input.readFully(manyValueTmp);
this.manyValue = new String(manyValueTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var otherValueTmp = new byte[input.readInt()];
input.readFully(otherValueTmp);
this.otherValue = new String(otherValueTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.zeroValue == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var zeroValueTmp = this.zeroValue.getBytes(StandardCharsets.UTF_8);
output.writeInt(zeroValueTmp.length);
output.write(zeroValueTmp);
}
if (this.oneValue == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var oneValueTmp = this.oneValue.getBytes(StandardCharsets.UTF_8);
output.writeInt(oneValueTmp.length);
output.write(oneValueTmp);
}
if (this.twoValue == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var twoValueTmp = this.twoValue.getBytes(StandardCharsets.UTF_8);
output.writeInt(twoValueTmp.length);
output.write(twoValueTmp);
}
if (this.fewValue == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var fewValueTmp = this.fewValue.getBytes(StandardCharsets.UTF_8);
output.writeInt(fewValueTmp.length);
output.write(fewValueTmp);
}
if (this.manyValue == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var manyValueTmp = this.manyValue.getBytes(StandardCharsets.UTF_8);
output.writeInt(manyValueTmp.length);
output.write(manyValueTmp);
}
if (this.otherValue == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var otherValueTmp = this.otherValue.getBytes(StandardCharsets.UTF_8);
output.writeInt(otherValueTmp.length);
output.write(otherValueTmp);
}
}
}
public static class LanguagePackStringValueDeleted extends LanguagePackStringValue {
public static final int CONSTRUCTOR = 1834792698;
public LanguagePackStringValueDeleted() {}
public LanguagePackStringValueDeleted(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class LanguagePackStrings extends Object {
public LanguagePackString[] strings;
public static final int CONSTRUCTOR = 1172082922;
public LanguagePackStrings() {}
public LanguagePackStrings(LanguagePackString[] strings) {
this.strings = strings;
}
public LanguagePackStrings(DataInput input) throws IOException {
if (input.readBoolean()) {
this.strings = new LanguagePackString[input.readInt()];
for (int i = 0; i < this.strings.length; i++) {
if (LanguagePackString.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.strings[i] = new LanguagePackString(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.strings == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.strings.length);
for (int i = 0; i < this.strings.length; i++) {
this.strings[i].serialize(output);
}
}
}
}
public static class LocalFile extends Object {
public String path;
public boolean canBeDownloaded;
public boolean canBeDeleted;
public boolean isDownloadingActive;
public boolean isDownloadingCompleted;
public int downloadOffset;
public int downloadedPrefixSize;
public int downloadedSize;
public static final int CONSTRUCTOR = -1166400317;
public LocalFile() {}
public LocalFile(String path, boolean canBeDownloaded, boolean canBeDeleted, boolean isDownloadingActive, boolean isDownloadingCompleted, int downloadOffset, int downloadedPrefixSize, int downloadedSize) {
this.path = path;
this.canBeDownloaded = canBeDownloaded;
this.canBeDeleted = canBeDeleted;
this.isDownloadingActive = isDownloadingActive;
this.isDownloadingCompleted = isDownloadingCompleted;
this.downloadOffset = downloadOffset;
this.downloadedPrefixSize = downloadedPrefixSize;
this.downloadedSize = downloadedSize;
}
public LocalFile(DataInput input) throws IOException {
if (input.readBoolean()) {
var pathTmp = new byte[input.readInt()];
input.readFully(pathTmp);
this.path = new String(pathTmp, StandardCharsets.UTF_8);
}
this.canBeDownloaded = input.readBoolean();
this.canBeDeleted = input.readBoolean();
this.isDownloadingActive = input.readBoolean();
this.isDownloadingCompleted = input.readBoolean();
this.downloadOffset = input.readInt();
this.downloadedPrefixSize = input.readInt();
this.downloadedSize = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.path == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var pathTmp = this.path.getBytes(StandardCharsets.UTF_8);
output.writeInt(pathTmp.length);
output.write(pathTmp);
}
output.writeBoolean(this.canBeDownloaded);
output.writeBoolean(this.canBeDeleted);
output.writeBoolean(this.isDownloadingActive);
output.writeBoolean(this.isDownloadingCompleted);
output.writeInt(this.downloadOffset);
output.writeInt(this.downloadedPrefixSize);
output.writeInt(this.downloadedSize);
}
}
public static class LocalizationTargetInfo extends Object {
public LanguagePackInfo[] languagePacks;
public static final int CONSTRUCTOR = -2048670809;
public LocalizationTargetInfo() {}
public LocalizationTargetInfo(LanguagePackInfo[] languagePacks) {
this.languagePacks = languagePacks;
}
public LocalizationTargetInfo(DataInput input) throws IOException {
if (input.readBoolean()) {
this.languagePacks = new LanguagePackInfo[input.readInt()];
for (int i = 0; i < this.languagePacks.length; i++) {
if (LanguagePackInfo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.languagePacks[i] = new LanguagePackInfo(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.languagePacks == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.languagePacks.length);
for (int i = 0; i < this.languagePacks.length; i++) {
this.languagePacks[i].serialize(output);
}
}
}
}
public static class Location extends Object {
public double latitude;
public double longitude;
public static final int CONSTRUCTOR = 749028016;
public Location() {}
public Location(double latitude, double longitude) {
this.latitude = latitude;
this.longitude = longitude;
}
public Location(DataInput input) throws IOException {
this.latitude = input.readDouble();
this.longitude = input.readDouble();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeDouble(this.latitude);
output.writeDouble(this.longitude);
}
}
public static class LogStreamDefault extends LogStream {
public static final int CONSTRUCTOR = 1390581436;
public LogStreamDefault() {}
public LogStreamDefault(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class LogStreamFile extends LogStream {
public String path;
public long maxFileSize;
public static final int CONSTRUCTOR = -1880085930;
public LogStreamFile() {}
public LogStreamFile(String path, long maxFileSize) {
this.path = path;
this.maxFileSize = maxFileSize;
}
public LogStreamFile(DataInput input) throws IOException {
if (input.readBoolean()) {
var pathTmp = new byte[input.readInt()];
input.readFully(pathTmp);
this.path = new String(pathTmp, StandardCharsets.UTF_8);
}
this.maxFileSize = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.path == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var pathTmp = this.path.getBytes(StandardCharsets.UTF_8);
output.writeInt(pathTmp.length);
output.write(pathTmp);
}
output.writeLong(this.maxFileSize);
}
}
public static class LogStreamEmpty extends LogStream {
public static final int CONSTRUCTOR = -499912244;
public LogStreamEmpty() {}
public LogStreamEmpty(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class LogTags extends Object {
public String[] tags;
public static final int CONSTRUCTOR = -1604930601;
public LogTags() {}
public LogTags(String[] tags) {
this.tags = tags;
}
public LogTags(DataInput input) throws IOException {
if (input.readBoolean()) {
this.tags = new String[input.readInt()];
for (int i = 0; i < this.tags.length; i++) {
var tagsTmp = new byte[input.readInt()];
input.readFully(tagsTmp);
this.tags[i] = new String(tagsTmp, StandardCharsets.UTF_8);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.tags == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.tags.length);
for (int i = 0; i < this.tags.length; i++) {
var tagsTmp = this.tags[i].getBytes(StandardCharsets.UTF_8);
output.writeInt(tagsTmp.length);
output.write(tagsTmp);
}
}
}
}
public static class LogVerbosityLevel extends Object {
public int verbosityLevel;
public static final int CONSTRUCTOR = 1734624234;
public LogVerbosityLevel() {}
public LogVerbosityLevel(int verbosityLevel) {
this.verbosityLevel = verbosityLevel;
}
public LogVerbosityLevel(DataInput input) throws IOException {
this.verbosityLevel = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.verbosityLevel);
}
}
public static class LoginUrlInfoOpen extends LoginUrlInfo {
public String url;
public boolean skipConfirm;
public static final int CONSTRUCTOR = -1079045420;
public LoginUrlInfoOpen() {}
public LoginUrlInfoOpen(String url, boolean skipConfirm) {
this.url = url;
this.skipConfirm = skipConfirm;
}
public LoginUrlInfoOpen(DataInput input) throws IOException {
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
this.skipConfirm = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
output.writeBoolean(this.skipConfirm);
}
}
public static class LoginUrlInfoRequestConfirmation extends LoginUrlInfo {
public String url;
public String domain;
public int botUserId;
public boolean requestWriteAccess;
public static final int CONSTRUCTOR = -1761898342;
public LoginUrlInfoRequestConfirmation() {}
public LoginUrlInfoRequestConfirmation(String url, String domain, int botUserId, boolean requestWriteAccess) {
this.url = url;
this.domain = domain;
this.botUserId = botUserId;
this.requestWriteAccess = requestWriteAccess;
}
public LoginUrlInfoRequestConfirmation(DataInput input) throws IOException {
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var domainTmp = new byte[input.readInt()];
input.readFully(domainTmp);
this.domain = new String(domainTmp, StandardCharsets.UTF_8);
}
this.botUserId = input.readInt();
this.requestWriteAccess = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
if (this.domain == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var domainTmp = this.domain.getBytes(StandardCharsets.UTF_8);
output.writeInt(domainTmp.length);
output.write(domainTmp);
}
output.writeInt(this.botUserId);
output.writeBoolean(this.requestWriteAccess);
}
}
public static class MaskPointForehead extends MaskPoint {
public static final int CONSTRUCTOR = 1027512005;
public MaskPointForehead() {}
public MaskPointForehead(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class MaskPointEyes extends MaskPoint {
public static final int CONSTRUCTOR = 1748310861;
public MaskPointEyes() {}
public MaskPointEyes(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class MaskPointMouth extends MaskPoint {
public static final int CONSTRUCTOR = 411773406;
public MaskPointMouth() {}
public MaskPointMouth(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class MaskPointChin extends MaskPoint {
public static final int CONSTRUCTOR = 534995335;
public MaskPointChin() {}
public MaskPointChin(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class MaskPosition extends Object {
public MaskPoint point;
public double xShift;
public double yShift;
public double scale;
public static final int CONSTRUCTOR = -2097433026;
public MaskPosition() {}
public MaskPosition(MaskPoint point, double xShift, double yShift, double scale) {
this.point = point;
this.xShift = xShift;
this.yShift = yShift;
this.scale = scale;
}
public MaskPosition(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case MaskPointForehead.CONSTRUCTOR:
this.point = new MaskPointForehead(input);
break;
case MaskPointEyes.CONSTRUCTOR:
this.point = new MaskPointEyes(input);
break;
case MaskPointMouth.CONSTRUCTOR:
this.point = new MaskPointMouth(input);
break;
case MaskPointChin.CONSTRUCTOR:
this.point = new MaskPointChin(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.xShift = input.readDouble();
this.yShift = input.readDouble();
this.scale = input.readDouble();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.point == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.point.serialize(output);
}
output.writeDouble(this.xShift);
output.writeDouble(this.yShift);
output.writeDouble(this.scale);
}
}
public static class Message extends Object {
public long id;
public int senderUserId;
public long chatId;
public MessageSendingState sendingState;
public MessageSchedulingState schedulingState;
public boolean isOutgoing;
public boolean canBeEdited;
public boolean canBeForwarded;
public boolean canBeDeletedOnlyForSelf;
public boolean canBeDeletedForAllUsers;
public boolean isChannelPost;
public boolean containsUnreadMention;
public int date;
public int editDate;
public MessageForwardInfo forwardInfo;
public long replyToMessageId;
public int ttl;
public double ttlExpiresIn;
public int viaBotUserId;
public String authorSignature;
public int views;
public long mediaAlbumId;
public String restrictionReason;
public MessageContent content;
public ReplyMarkup replyMarkup;
public static final int CONSTRUCTOR = 1169109781;
public Message() {}
public Message(long id, int senderUserId, long chatId, MessageSendingState sendingState, MessageSchedulingState schedulingState, boolean isOutgoing, boolean canBeEdited, boolean canBeForwarded, boolean canBeDeletedOnlyForSelf, boolean canBeDeletedForAllUsers, boolean isChannelPost, boolean containsUnreadMention, int date, int editDate, MessageForwardInfo forwardInfo, long replyToMessageId, int ttl, double ttlExpiresIn, int viaBotUserId, String authorSignature, int views, long mediaAlbumId, String restrictionReason, MessageContent content, ReplyMarkup replyMarkup) {
this.id = id;
this.senderUserId = senderUserId;
this.chatId = chatId;
this.sendingState = sendingState;
this.schedulingState = schedulingState;
this.isOutgoing = isOutgoing;
this.canBeEdited = canBeEdited;
this.canBeForwarded = canBeForwarded;
this.canBeDeletedOnlyForSelf = canBeDeletedOnlyForSelf;
this.canBeDeletedForAllUsers = canBeDeletedForAllUsers;
this.isChannelPost = isChannelPost;
this.containsUnreadMention = containsUnreadMention;
this.date = date;
this.editDate = editDate;
this.forwardInfo = forwardInfo;
this.replyToMessageId = replyToMessageId;
this.ttl = ttl;
this.ttlExpiresIn = ttlExpiresIn;
this.viaBotUserId = viaBotUserId;
this.authorSignature = authorSignature;
this.views = views;
this.mediaAlbumId = mediaAlbumId;
this.restrictionReason = restrictionReason;
this.content = content;
this.replyMarkup = replyMarkup;
}
public Message(DataInput input) throws IOException {
this.id = input.readLong();
this.senderUserId = input.readInt();
this.chatId = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case MessageSendingStatePending.CONSTRUCTOR:
this.sendingState = new MessageSendingStatePending(input);
break;
case MessageSendingStateFailed.CONSTRUCTOR:
this.sendingState = new MessageSendingStateFailed(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case MessageSchedulingStateSendAtDate.CONSTRUCTOR:
this.schedulingState = new MessageSchedulingStateSendAtDate(input);
break;
case MessageSchedulingStateSendWhenOnline.CONSTRUCTOR:
this.schedulingState = new MessageSchedulingStateSendWhenOnline(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.isOutgoing = input.readBoolean();
this.canBeEdited = input.readBoolean();
this.canBeForwarded = input.readBoolean();
this.canBeDeletedOnlyForSelf = input.readBoolean();
this.canBeDeletedForAllUsers = input.readBoolean();
this.isChannelPost = input.readBoolean();
this.containsUnreadMention = input.readBoolean();
this.date = input.readInt();
this.editDate = input.readInt();
if (input.readBoolean()) {
if (MessageForwardInfo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.forwardInfo = new MessageForwardInfo(input);
}
this.replyToMessageId = input.readLong();
this.ttl = input.readInt();
this.ttlExpiresIn = input.readDouble();
this.viaBotUserId = input.readInt();
if (input.readBoolean()) {
var authorSignatureTmp = new byte[input.readInt()];
input.readFully(authorSignatureTmp);
this.authorSignature = new String(authorSignatureTmp, StandardCharsets.UTF_8);
}
this.views = input.readInt();
this.mediaAlbumId = input.readLong();
if (input.readBoolean()) {
var restrictionReasonTmp = new byte[input.readInt()];
input.readFully(restrictionReasonTmp);
this.restrictionReason = new String(restrictionReasonTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case MessageText.CONSTRUCTOR:
this.content = new MessageText(input);
break;
case MessageAnimation.CONSTRUCTOR:
this.content = new MessageAnimation(input);
break;
case MessageAudio.CONSTRUCTOR:
this.content = new MessageAudio(input);
break;
case MessageDocument.CONSTRUCTOR:
this.content = new MessageDocument(input);
break;
case MessagePhoto.CONSTRUCTOR:
this.content = new MessagePhoto(input);
break;
case MessageExpiredPhoto.CONSTRUCTOR:
this.content = new MessageExpiredPhoto(input);
break;
case MessageSticker.CONSTRUCTOR:
this.content = new MessageSticker(input);
break;
case MessageVideo.CONSTRUCTOR:
this.content = new MessageVideo(input);
break;
case MessageExpiredVideo.CONSTRUCTOR:
this.content = new MessageExpiredVideo(input);
break;
case MessageVideoNote.CONSTRUCTOR:
this.content = new MessageVideoNote(input);
break;
case MessageVoiceNote.CONSTRUCTOR:
this.content = new MessageVoiceNote(input);
break;
case MessageLocation.CONSTRUCTOR:
this.content = new MessageLocation(input);
break;
case MessageVenue.CONSTRUCTOR:
this.content = new MessageVenue(input);
break;
case MessageContact.CONSTRUCTOR:
this.content = new MessageContact(input);
break;
case MessageDice.CONSTRUCTOR:
this.content = new MessageDice(input);
break;
case MessageGame.CONSTRUCTOR:
this.content = new MessageGame(input);
break;
case MessagePoll.CONSTRUCTOR:
this.content = new MessagePoll(input);
break;
case MessageInvoice.CONSTRUCTOR:
this.content = new MessageInvoice(input);
break;
case MessageCall.CONSTRUCTOR:
this.content = new MessageCall(input);
break;
case MessageBasicGroupChatCreate.CONSTRUCTOR:
this.content = new MessageBasicGroupChatCreate(input);
break;
case MessageSupergroupChatCreate.CONSTRUCTOR:
this.content = new MessageSupergroupChatCreate(input);
break;
case MessageChatChangeTitle.CONSTRUCTOR:
this.content = new MessageChatChangeTitle(input);
break;
case MessageChatChangePhoto.CONSTRUCTOR:
this.content = new MessageChatChangePhoto(input);
break;
case MessageChatDeletePhoto.CONSTRUCTOR:
this.content = new MessageChatDeletePhoto(input);
break;
case MessageChatAddMembers.CONSTRUCTOR:
this.content = new MessageChatAddMembers(input);
break;
case MessageChatJoinByLink.CONSTRUCTOR:
this.content = new MessageChatJoinByLink(input);
break;
case MessageChatDeleteMember.CONSTRUCTOR:
this.content = new MessageChatDeleteMember(input);
break;
case MessageChatUpgradeTo.CONSTRUCTOR:
this.content = new MessageChatUpgradeTo(input);
break;
case MessageChatUpgradeFrom.CONSTRUCTOR:
this.content = new MessageChatUpgradeFrom(input);
break;
case MessagePinMessage.CONSTRUCTOR:
this.content = new MessagePinMessage(input);
break;
case MessageScreenshotTaken.CONSTRUCTOR:
this.content = new MessageScreenshotTaken(input);
break;
case MessageChatSetTtl.CONSTRUCTOR:
this.content = new MessageChatSetTtl(input);
break;
case MessageCustomServiceAction.CONSTRUCTOR:
this.content = new MessageCustomServiceAction(input);
break;
case MessageGameScore.CONSTRUCTOR:
this.content = new MessageGameScore(input);
break;
case MessagePaymentSuccessful.CONSTRUCTOR:
this.content = new MessagePaymentSuccessful(input);
break;
case MessagePaymentSuccessfulBot.CONSTRUCTOR:
this.content = new MessagePaymentSuccessfulBot(input);
break;
case MessageContactRegistered.CONSTRUCTOR:
this.content = new MessageContactRegistered(input);
break;
case MessageWebsiteConnected.CONSTRUCTOR:
this.content = new MessageWebsiteConnected(input);
break;
case MessagePassportDataSent.CONSTRUCTOR:
this.content = new MessagePassportDataSent(input);
break;
case MessagePassportDataReceived.CONSTRUCTOR:
this.content = new MessagePassportDataReceived(input);
break;
case MessageUnsupported.CONSTRUCTOR:
this.content = new MessageUnsupported(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.id);
output.writeInt(this.senderUserId);
output.writeLong(this.chatId);
if (this.sendingState == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.sendingState.serialize(output);
}
if (this.schedulingState == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.schedulingState.serialize(output);
}
output.writeBoolean(this.isOutgoing);
output.writeBoolean(this.canBeEdited);
output.writeBoolean(this.canBeForwarded);
output.writeBoolean(this.canBeDeletedOnlyForSelf);
output.writeBoolean(this.canBeDeletedForAllUsers);
output.writeBoolean(this.isChannelPost);
output.writeBoolean(this.containsUnreadMention);
output.writeInt(this.date);
output.writeInt(this.editDate);
if (this.forwardInfo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.forwardInfo.serialize(output);
}
output.writeLong(this.replyToMessageId);
output.writeInt(this.ttl);
output.writeDouble(this.ttlExpiresIn);
output.writeInt(this.viaBotUserId);
if (this.authorSignature == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var authorSignatureTmp = this.authorSignature.getBytes(StandardCharsets.UTF_8);
output.writeInt(authorSignatureTmp.length);
output.write(authorSignatureTmp);
}
output.writeInt(this.views);
output.writeLong(this.mediaAlbumId);
if (this.restrictionReason == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var restrictionReasonTmp = this.restrictionReason.getBytes(StandardCharsets.UTF_8);
output.writeInt(restrictionReasonTmp.length);
output.write(restrictionReasonTmp);
}
if (this.content == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.content.serialize(output);
}
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
}
}
public static class MessageText extends MessageContent {
public FormattedText text;
public WebPage webPage;
public static final int CONSTRUCTOR = 1989037971;
public MessageText() {}
public MessageText(FormattedText text, WebPage webPage) {
this.text = text;
this.webPage = webPage;
}
public MessageText(DataInput input) throws IOException {
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.text = new FormattedText(input);
}
if (input.readBoolean()) {
if (WebPage.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.webPage = new WebPage(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
if (this.webPage == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.webPage.serialize(output);
}
}
}
public static class MessageAnimation extends MessageContent {
public Animation animation;
public FormattedText caption;
public boolean isSecret;
public static final int CONSTRUCTOR = 1306939396;
public MessageAnimation() {}
public MessageAnimation(Animation animation, FormattedText caption, boolean isSecret) {
this.animation = animation;
this.caption = caption;
this.isSecret = isSecret;
}
public MessageAnimation(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Animation.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.animation = new Animation(input);
}
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new FormattedText(input);
}
this.isSecret = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.animation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.animation.serialize(output);
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
output.writeBoolean(this.isSecret);
}
}
public static class MessageAudio extends MessageContent {
public Audio audio;
public FormattedText caption;
public static final int CONSTRUCTOR = 276722716;
public MessageAudio() {}
public MessageAudio(Audio audio, FormattedText caption) {
this.audio = audio;
this.caption = caption;
}
public MessageAudio(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Audio.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.audio = new Audio(input);
}
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new FormattedText(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.audio == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.audio.serialize(output);
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
}
}
public static class MessageDocument extends MessageContent {
public Document document;
public FormattedText caption;
public static final int CONSTRUCTOR = 596945783;
public MessageDocument() {}
public MessageDocument(Document document, FormattedText caption) {
this.document = document;
this.caption = caption;
}
public MessageDocument(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Document.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.document = new Document(input);
}
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new FormattedText(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.document == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.document.serialize(output);
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
}
}
public static class MessagePhoto extends MessageContent {
public Photo photo;
public FormattedText caption;
public boolean isSecret;
public static final int CONSTRUCTOR = -1851395174;
public MessagePhoto() {}
public MessagePhoto(Photo photo, FormattedText caption, boolean isSecret) {
this.photo = photo;
this.caption = caption;
this.isSecret = isSecret;
}
public MessagePhoto(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Photo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.photo = new Photo(input);
}
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new FormattedText(input);
}
this.isSecret = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.photo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.photo.serialize(output);
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
output.writeBoolean(this.isSecret);
}
}
public static class MessageExpiredPhoto extends MessageContent {
public static final int CONSTRUCTOR = -1404641801;
public MessageExpiredPhoto() {}
public MessageExpiredPhoto(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class MessageSticker extends MessageContent {
public Sticker sticker;
public static final int CONSTRUCTOR = 1779022878;
public MessageSticker() {}
public MessageSticker(Sticker sticker) {
this.sticker = sticker;
}
public MessageSticker(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Sticker.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.sticker = new Sticker(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.sticker == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.sticker.serialize(output);
}
}
}
public static class MessageVideo extends MessageContent {
public Video video;
public FormattedText caption;
public boolean isSecret;
public static final int CONSTRUCTOR = 2021281344;
public MessageVideo() {}
public MessageVideo(Video video, FormattedText caption, boolean isSecret) {
this.video = video;
this.caption = caption;
this.isSecret = isSecret;
}
public MessageVideo(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Video.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.video = new Video(input);
}
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new FormattedText(input);
}
this.isSecret = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.video == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.video.serialize(output);
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
output.writeBoolean(this.isSecret);
}
}
public static class MessageExpiredVideo extends MessageContent {
public static final int CONSTRUCTOR = -1212209981;
public MessageExpiredVideo() {}
public MessageExpiredVideo(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class MessageVideoNote extends MessageContent {
public VideoNote videoNote;
public boolean isViewed;
public boolean isSecret;
public static final int CONSTRUCTOR = 963323014;
public MessageVideoNote() {}
public MessageVideoNote(VideoNote videoNote, boolean isViewed, boolean isSecret) {
this.videoNote = videoNote;
this.isViewed = isViewed;
this.isSecret = isSecret;
}
public MessageVideoNote(DataInput input) throws IOException {
if (input.readBoolean()) {
if (VideoNote.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.videoNote = new VideoNote(input);
}
this.isViewed = input.readBoolean();
this.isSecret = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.videoNote == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.videoNote.serialize(output);
}
output.writeBoolean(this.isViewed);
output.writeBoolean(this.isSecret);
}
}
public static class MessageVoiceNote extends MessageContent {
public VoiceNote voiceNote;
public FormattedText caption;
public boolean isListened;
public static final int CONSTRUCTOR = 527777781;
public MessageVoiceNote() {}
public MessageVoiceNote(VoiceNote voiceNote, FormattedText caption, boolean isListened) {
this.voiceNote = voiceNote;
this.caption = caption;
this.isListened = isListened;
}
public MessageVoiceNote(DataInput input) throws IOException {
if (input.readBoolean()) {
if (VoiceNote.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.voiceNote = new VoiceNote(input);
}
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new FormattedText(input);
}
this.isListened = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.voiceNote == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.voiceNote.serialize(output);
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
output.writeBoolean(this.isListened);
}
}
public static class MessageLocation extends MessageContent {
public Location location;
public int livePeriod;
public int expiresIn;
public static final int CONSTRUCTOR = -1301887786;
public MessageLocation() {}
public MessageLocation(Location location, int livePeriod, int expiresIn) {
this.location = location;
this.livePeriod = livePeriod;
this.expiresIn = expiresIn;
}
public MessageLocation(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Location.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.location = new Location(input);
}
this.livePeriod = input.readInt();
this.expiresIn = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.location == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.location.serialize(output);
}
output.writeInt(this.livePeriod);
output.writeInt(this.expiresIn);
}
}
public static class MessageVenue extends MessageContent {
public Venue venue;
public static final int CONSTRUCTOR = -2146492043;
public MessageVenue() {}
public MessageVenue(Venue venue) {
this.venue = venue;
}
public MessageVenue(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Venue.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.venue = new Venue(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.venue == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.venue.serialize(output);
}
}
}
public static class MessageContact extends MessageContent {
public Contact contact;
public static final int CONSTRUCTOR = -512684966;
public MessageContact() {}
public MessageContact(Contact contact) {
this.contact = contact;
}
public MessageContact(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Contact.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.contact = new Contact(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.contact == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.contact.serialize(output);
}
}
}
public static class MessageDice extends MessageContent {
public Sticker initialStateSticker;
public Sticker finalStateSticker;
public String emoji;
public int value;
public int successAnimationFrameNumber;
public static final int CONSTRUCTOR = -1350654849;
public MessageDice() {}
public MessageDice(Sticker initialStateSticker, Sticker finalStateSticker, String emoji, int value, int successAnimationFrameNumber) {
this.initialStateSticker = initialStateSticker;
this.finalStateSticker = finalStateSticker;
this.emoji = emoji;
this.value = value;
this.successAnimationFrameNumber = successAnimationFrameNumber;
}
public MessageDice(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Sticker.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.initialStateSticker = new Sticker(input);
}
if (input.readBoolean()) {
if (Sticker.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.finalStateSticker = new Sticker(input);
}
if (input.readBoolean()) {
var emojiTmp = new byte[input.readInt()];
input.readFully(emojiTmp);
this.emoji = new String(emojiTmp, StandardCharsets.UTF_8);
}
this.value = input.readInt();
this.successAnimationFrameNumber = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.initialStateSticker == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.initialStateSticker.serialize(output);
}
if (this.finalStateSticker == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.finalStateSticker.serialize(output);
}
if (this.emoji == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var emojiTmp = this.emoji.getBytes(StandardCharsets.UTF_8);
output.writeInt(emojiTmp.length);
output.write(emojiTmp);
}
output.writeInt(this.value);
output.writeInt(this.successAnimationFrameNumber);
}
}
public static class MessageGame extends MessageContent {
public Game game;
public static final int CONSTRUCTOR = -69441162;
public MessageGame() {}
public MessageGame(Game game) {
this.game = game;
}
public MessageGame(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Game.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.game = new Game(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.game == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.game.serialize(output);
}
}
}
public static class MessagePoll extends MessageContent {
public Poll poll;
public static final int CONSTRUCTOR = -662130099;
public MessagePoll() {}
public MessagePoll(Poll poll) {
this.poll = poll;
}
public MessagePoll(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Poll.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.poll = new Poll(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.poll == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.poll.serialize(output);
}
}
}
public static class MessageInvoice extends MessageContent {
public String title;
public String description;
public Photo photo;
public String currency;
public long totalAmount;
public String startParameter;
public boolean isTest;
public boolean needShippingAddress;
public long receiptMessageId;
public static final int CONSTRUCTOR = -1916671476;
public MessageInvoice() {}
public MessageInvoice(String title, String description, Photo photo, String currency, long totalAmount, String startParameter, boolean isTest, boolean needShippingAddress, long receiptMessageId) {
this.title = title;
this.description = description;
this.photo = photo;
this.currency = currency;
this.totalAmount = totalAmount;
this.startParameter = startParameter;
this.isTest = isTest;
this.needShippingAddress = needShippingAddress;
this.receiptMessageId = receiptMessageId;
}
public MessageInvoice(DataInput input) throws IOException {
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var descriptionTmp = new byte[input.readInt()];
input.readFully(descriptionTmp);
this.description = new String(descriptionTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Photo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.photo = new Photo(input);
}
if (input.readBoolean()) {
var currencyTmp = new byte[input.readInt()];
input.readFully(currencyTmp);
this.currency = new String(currencyTmp, StandardCharsets.UTF_8);
}
this.totalAmount = input.readLong();
if (input.readBoolean()) {
var startParameterTmp = new byte[input.readInt()];
input.readFully(startParameterTmp);
this.startParameter = new String(startParameterTmp, StandardCharsets.UTF_8);
}
this.isTest = input.readBoolean();
this.needShippingAddress = input.readBoolean();
this.receiptMessageId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.description == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var descriptionTmp = this.description.getBytes(StandardCharsets.UTF_8);
output.writeInt(descriptionTmp.length);
output.write(descriptionTmp);
}
if (this.photo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.photo.serialize(output);
}
if (this.currency == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var currencyTmp = this.currency.getBytes(StandardCharsets.UTF_8);
output.writeInt(currencyTmp.length);
output.write(currencyTmp);
}
output.writeLong(this.totalAmount);
if (this.startParameter == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var startParameterTmp = this.startParameter.getBytes(StandardCharsets.UTF_8);
output.writeInt(startParameterTmp.length);
output.write(startParameterTmp);
}
output.writeBoolean(this.isTest);
output.writeBoolean(this.needShippingAddress);
output.writeLong(this.receiptMessageId);
}
}
public static class MessageCall extends MessageContent {
public CallDiscardReason discardReason;
public int duration;
public static final int CONSTRUCTOR = 366512596;
public MessageCall() {}
public MessageCall(CallDiscardReason discardReason, int duration) {
this.discardReason = discardReason;
this.duration = duration;
}
public MessageCall(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case CallDiscardReasonEmpty.CONSTRUCTOR:
this.discardReason = new CallDiscardReasonEmpty(input);
break;
case CallDiscardReasonMissed.CONSTRUCTOR:
this.discardReason = new CallDiscardReasonMissed(input);
break;
case CallDiscardReasonDeclined.CONSTRUCTOR:
this.discardReason = new CallDiscardReasonDeclined(input);
break;
case CallDiscardReasonDisconnected.CONSTRUCTOR:
this.discardReason = new CallDiscardReasonDisconnected(input);
break;
case CallDiscardReasonHungUp.CONSTRUCTOR:
this.discardReason = new CallDiscardReasonHungUp(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.duration = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.discardReason == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.discardReason.serialize(output);
}
output.writeInt(this.duration);
}
}
public static class MessageBasicGroupChatCreate extends MessageContent {
public String title;
public int[] memberUserIds;
public static final int CONSTRUCTOR = 1575377646;
public MessageBasicGroupChatCreate() {}
public MessageBasicGroupChatCreate(String title, int[] memberUserIds) {
this.title = title;
this.memberUserIds = memberUserIds;
}
public MessageBasicGroupChatCreate(DataInput input) throws IOException {
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
this.memberUserIds = new int[input.readInt()];
for (int i = 0; i < this.memberUserIds.length; i++) {
this.memberUserIds[i] = input.readInt();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.memberUserIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.memberUserIds.length);
for (int i = 0; i < this.memberUserIds.length; i++) {
output.writeInt(this.memberUserIds[i]);
}
}
}
}
public static class MessageSupergroupChatCreate extends MessageContent {
public String title;
public static final int CONSTRUCTOR = -434325733;
public MessageSupergroupChatCreate() {}
public MessageSupergroupChatCreate(String title) {
this.title = title;
}
public MessageSupergroupChatCreate(DataInput input) throws IOException {
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
}
}
public static class MessageChatChangeTitle extends MessageContent {
public String title;
public static final int CONSTRUCTOR = 748272449;
public MessageChatChangeTitle() {}
public MessageChatChangeTitle(String title) {
this.title = title;
}
public MessageChatChangeTitle(DataInput input) throws IOException {
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
}
}
public static class MessageChatChangePhoto extends MessageContent {
public Photo photo;
public static final int CONSTRUCTOR = 319630249;
public MessageChatChangePhoto() {}
public MessageChatChangePhoto(Photo photo) {
this.photo = photo;
}
public MessageChatChangePhoto(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Photo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.photo = new Photo(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.photo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.photo.serialize(output);
}
}
}
public static class MessageChatDeletePhoto extends MessageContent {
public static final int CONSTRUCTOR = -184374809;
public MessageChatDeletePhoto() {}
public MessageChatDeletePhoto(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class MessageChatAddMembers extends MessageContent {
public int[] memberUserIds;
public static final int CONSTRUCTOR = 401228326;
public MessageChatAddMembers() {}
public MessageChatAddMembers(int[] memberUserIds) {
this.memberUserIds = memberUserIds;
}
public MessageChatAddMembers(DataInput input) throws IOException {
if (input.readBoolean()) {
this.memberUserIds = new int[input.readInt()];
for (int i = 0; i < this.memberUserIds.length; i++) {
this.memberUserIds[i] = input.readInt();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.memberUserIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.memberUserIds.length);
for (int i = 0; i < this.memberUserIds.length; i++) {
output.writeInt(this.memberUserIds[i]);
}
}
}
}
public static class MessageChatJoinByLink extends MessageContent {
public static final int CONSTRUCTOR = 1846493311;
public MessageChatJoinByLink() {}
public MessageChatJoinByLink(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class MessageChatDeleteMember extends MessageContent {
public int userId;
public static final int CONSTRUCTOR = 1164414043;
public MessageChatDeleteMember() {}
public MessageChatDeleteMember(int userId) {
this.userId = userId;
}
public MessageChatDeleteMember(DataInput input) throws IOException {
this.userId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
}
}
public static class MessageChatUpgradeTo extends MessageContent {
public int supergroupId;
public static final int CONSTRUCTOR = 1957816681;
public MessageChatUpgradeTo() {}
public MessageChatUpgradeTo(int supergroupId) {
this.supergroupId = supergroupId;
}
public MessageChatUpgradeTo(DataInput input) throws IOException {
this.supergroupId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.supergroupId);
}
}
public static class MessageChatUpgradeFrom extends MessageContent {
public String title;
public int basicGroupId;
public static final int CONSTRUCTOR = 1642272558;
public MessageChatUpgradeFrom() {}
public MessageChatUpgradeFrom(String title, int basicGroupId) {
this.title = title;
this.basicGroupId = basicGroupId;
}
public MessageChatUpgradeFrom(DataInput input) throws IOException {
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
this.basicGroupId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
output.writeInt(this.basicGroupId);
}
}
public static class MessagePinMessage extends MessageContent {
public long messageId;
public static final int CONSTRUCTOR = 953503801;
public MessagePinMessage() {}
public MessagePinMessage(long messageId) {
this.messageId = messageId;
}
public MessagePinMessage(DataInput input) throws IOException {
this.messageId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.messageId);
}
}
public static class MessageScreenshotTaken extends MessageContent {
public static final int CONSTRUCTOR = -1564971605;
public MessageScreenshotTaken() {}
public MessageScreenshotTaken(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class MessageChatSetTtl extends MessageContent {
public int ttl;
public static final int CONSTRUCTOR = 1810060209;
public MessageChatSetTtl() {}
public MessageChatSetTtl(int ttl) {
this.ttl = ttl;
}
public MessageChatSetTtl(DataInput input) throws IOException {
this.ttl = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.ttl);
}
}
public static class MessageCustomServiceAction extends MessageContent {
public String text;
public static final int CONSTRUCTOR = 1435879282;
public MessageCustomServiceAction() {}
public MessageCustomServiceAction(String text) {
this.text = text;
}
public MessageCustomServiceAction(DataInput input) throws IOException {
if (input.readBoolean()) {
var textTmp = new byte[input.readInt()];
input.readFully(textTmp);
this.text = new String(textTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var textTmp = this.text.getBytes(StandardCharsets.UTF_8);
output.writeInt(textTmp.length);
output.write(textTmp);
}
}
}
public static class MessageGameScore extends MessageContent {
public long gameMessageId;
public long gameId;
public int score;
public static final int CONSTRUCTOR = 1344904575;
public MessageGameScore() {}
public MessageGameScore(long gameMessageId, long gameId, int score) {
this.gameMessageId = gameMessageId;
this.gameId = gameId;
this.score = score;
}
public MessageGameScore(DataInput input) throws IOException {
this.gameMessageId = input.readLong();
this.gameId = input.readLong();
this.score = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.gameMessageId);
output.writeLong(this.gameId);
output.writeInt(this.score);
}
}
public static class MessagePaymentSuccessful extends MessageContent {
public long invoiceMessageId;
public String currency;
public long totalAmount;
public static final int CONSTRUCTOR = -595962993;
public MessagePaymentSuccessful() {}
public MessagePaymentSuccessful(long invoiceMessageId, String currency, long totalAmount) {
this.invoiceMessageId = invoiceMessageId;
this.currency = currency;
this.totalAmount = totalAmount;
}
public MessagePaymentSuccessful(DataInput input) throws IOException {
this.invoiceMessageId = input.readLong();
if (input.readBoolean()) {
var currencyTmp = new byte[input.readInt()];
input.readFully(currencyTmp);
this.currency = new String(currencyTmp, StandardCharsets.UTF_8);
}
this.totalAmount = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.invoiceMessageId);
if (this.currency == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var currencyTmp = this.currency.getBytes(StandardCharsets.UTF_8);
output.writeInt(currencyTmp.length);
output.write(currencyTmp);
}
output.writeLong(this.totalAmount);
}
}
public static class MessagePaymentSuccessfulBot extends MessageContent {
public long invoiceMessageId;
public String currency;
public long totalAmount;
public byte[] invoicePayload;
public String shippingOptionId;
public OrderInfo orderInfo;
public String telegramPaymentChargeId;
public String providerPaymentChargeId;
public static final int CONSTRUCTOR = -412310696;
public MessagePaymentSuccessfulBot() {}
public MessagePaymentSuccessfulBot(long invoiceMessageId, String currency, long totalAmount, byte[] invoicePayload, String shippingOptionId, OrderInfo orderInfo, String telegramPaymentChargeId, String providerPaymentChargeId) {
this.invoiceMessageId = invoiceMessageId;
this.currency = currency;
this.totalAmount = totalAmount;
this.invoicePayload = invoicePayload;
this.shippingOptionId = shippingOptionId;
this.orderInfo = orderInfo;
this.telegramPaymentChargeId = telegramPaymentChargeId;
this.providerPaymentChargeId = providerPaymentChargeId;
}
public MessagePaymentSuccessfulBot(DataInput input) throws IOException {
this.invoiceMessageId = input.readLong();
if (input.readBoolean()) {
var currencyTmp = new byte[input.readInt()];
input.readFully(currencyTmp);
this.currency = new String(currencyTmp, StandardCharsets.UTF_8);
}
this.totalAmount = input.readLong();
if (input.readBoolean()) {
this.invoicePayload = new byte[input.readInt()];
input.readFully(this.invoicePayload);
}
if (input.readBoolean()) {
var shippingOptionIdTmp = new byte[input.readInt()];
input.readFully(shippingOptionIdTmp);
this.shippingOptionId = new String(shippingOptionIdTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (OrderInfo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.orderInfo = new OrderInfo(input);
}
if (input.readBoolean()) {
var telegramPaymentChargeIdTmp = new byte[input.readInt()];
input.readFully(telegramPaymentChargeIdTmp);
this.telegramPaymentChargeId = new String(telegramPaymentChargeIdTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var providerPaymentChargeIdTmp = new byte[input.readInt()];
input.readFully(providerPaymentChargeIdTmp);
this.providerPaymentChargeId = new String(providerPaymentChargeIdTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.invoiceMessageId);
if (this.currency == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var currencyTmp = this.currency.getBytes(StandardCharsets.UTF_8);
output.writeInt(currencyTmp.length);
output.write(currencyTmp);
}
output.writeLong(this.totalAmount);
if (this.invoicePayload == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.invoicePayload.length);
output.write(this.invoicePayload);
}
if (this.shippingOptionId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var shippingOptionIdTmp = this.shippingOptionId.getBytes(StandardCharsets.UTF_8);
output.writeInt(shippingOptionIdTmp.length);
output.write(shippingOptionIdTmp);
}
if (this.orderInfo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.orderInfo.serialize(output);
}
if (this.telegramPaymentChargeId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var telegramPaymentChargeIdTmp = this.telegramPaymentChargeId.getBytes(StandardCharsets.UTF_8);
output.writeInt(telegramPaymentChargeIdTmp.length);
output.write(telegramPaymentChargeIdTmp);
}
if (this.providerPaymentChargeId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var providerPaymentChargeIdTmp = this.providerPaymentChargeId.getBytes(StandardCharsets.UTF_8);
output.writeInt(providerPaymentChargeIdTmp.length);
output.write(providerPaymentChargeIdTmp);
}
}
}
public static class MessageContactRegistered extends MessageContent {
public static final int CONSTRUCTOR = -1502020353;
public MessageContactRegistered() {}
public MessageContactRegistered(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class MessageWebsiteConnected extends MessageContent {
public String domainName;
public static final int CONSTRUCTOR = -1074551800;
public MessageWebsiteConnected() {}
public MessageWebsiteConnected(String domainName) {
this.domainName = domainName;
}
public MessageWebsiteConnected(DataInput input) throws IOException {
if (input.readBoolean()) {
var domainNameTmp = new byte[input.readInt()];
input.readFully(domainNameTmp);
this.domainName = new String(domainNameTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.domainName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var domainNameTmp = this.domainName.getBytes(StandardCharsets.UTF_8);
output.writeInt(domainNameTmp.length);
output.write(domainNameTmp);
}
}
}
public static class MessagePassportDataSent extends MessageContent {
public PassportElementType[] types;
public static final int CONSTRUCTOR = 1017405171;
public MessagePassportDataSent() {}
public MessagePassportDataSent(PassportElementType[] types) {
this.types = types;
}
public MessagePassportDataSent(DataInput input) throws IOException {
if (input.readBoolean()) {
this.types = new PassportElementType[input.readInt()];
for (int i = 0; i < this.types.length; i++) {
switch(input.readInt()) {
case PassportElementTypePersonalDetails.CONSTRUCTOR:
this.types[i] = new PassportElementTypePersonalDetails(input);
break;
case PassportElementTypePassport.CONSTRUCTOR:
this.types[i] = new PassportElementTypePassport(input);
break;
case PassportElementTypeDriverLicense.CONSTRUCTOR:
this.types[i] = new PassportElementTypeDriverLicense(input);
break;
case PassportElementTypeIdentityCard.CONSTRUCTOR:
this.types[i] = new PassportElementTypeIdentityCard(input);
break;
case PassportElementTypeInternalPassport.CONSTRUCTOR:
this.types[i] = new PassportElementTypeInternalPassport(input);
break;
case PassportElementTypeAddress.CONSTRUCTOR:
this.types[i] = new PassportElementTypeAddress(input);
break;
case PassportElementTypeUtilityBill.CONSTRUCTOR:
this.types[i] = new PassportElementTypeUtilityBill(input);
break;
case PassportElementTypeBankStatement.CONSTRUCTOR:
this.types[i] = new PassportElementTypeBankStatement(input);
break;
case PassportElementTypeRentalAgreement.CONSTRUCTOR:
this.types[i] = new PassportElementTypeRentalAgreement(input);
break;
case PassportElementTypePassportRegistration.CONSTRUCTOR:
this.types[i] = new PassportElementTypePassportRegistration(input);
break;
case PassportElementTypeTemporaryRegistration.CONSTRUCTOR:
this.types[i] = new PassportElementTypeTemporaryRegistration(input);
break;
case PassportElementTypePhoneNumber.CONSTRUCTOR:
this.types[i] = new PassportElementTypePhoneNumber(input);
break;
case PassportElementTypeEmailAddress.CONSTRUCTOR:
this.types[i] = new PassportElementTypeEmailAddress(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.types == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.types.length);
for (int i = 0; i < this.types.length; i++) {
this.types[i].serialize(output);
}
}
}
}
public static class MessagePassportDataReceived extends MessageContent {
public EncryptedPassportElement[] elements;
public EncryptedCredentials credentials;
public static final int CONSTRUCTOR = -1367863624;
public MessagePassportDataReceived() {}
public MessagePassportDataReceived(EncryptedPassportElement[] elements, EncryptedCredentials credentials) {
this.elements = elements;
this.credentials = credentials;
}
public MessagePassportDataReceived(DataInput input) throws IOException {
if (input.readBoolean()) {
this.elements = new EncryptedPassportElement[input.readInt()];
for (int i = 0; i < this.elements.length; i++) {
if (EncryptedPassportElement.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.elements[i] = new EncryptedPassportElement(input);
}
}
if (input.readBoolean()) {
if (EncryptedCredentials.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.credentials = new EncryptedCredentials(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.elements == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.elements.length);
for (int i = 0; i < this.elements.length; i++) {
this.elements[i].serialize(output);
}
}
if (this.credentials == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.credentials.serialize(output);
}
}
}
public static class MessageUnsupported extends MessageContent {
public static final int CONSTRUCTOR = -1816726139;
public MessageUnsupported() {}
public MessageUnsupported(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class MessageForwardInfo extends Object {
public MessageForwardOrigin origin;
public int date;
public long fromChatId;
public long fromMessageId;
public static final int CONSTRUCTOR = -1622371186;
public MessageForwardInfo() {}
public MessageForwardInfo(MessageForwardOrigin origin, int date, long fromChatId, long fromMessageId) {
this.origin = origin;
this.date = date;
this.fromChatId = fromChatId;
this.fromMessageId = fromMessageId;
}
public MessageForwardInfo(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case MessageForwardOriginUser.CONSTRUCTOR:
this.origin = new MessageForwardOriginUser(input);
break;
case MessageForwardOriginHiddenUser.CONSTRUCTOR:
this.origin = new MessageForwardOriginHiddenUser(input);
break;
case MessageForwardOriginChannel.CONSTRUCTOR:
this.origin = new MessageForwardOriginChannel(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.date = input.readInt();
this.fromChatId = input.readLong();
this.fromMessageId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.origin == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.origin.serialize(output);
}
output.writeInt(this.date);
output.writeLong(this.fromChatId);
output.writeLong(this.fromMessageId);
}
}
public static class MessageForwardOriginUser extends MessageForwardOrigin {
public int senderUserId;
public static final int CONSTRUCTOR = 2781520;
public MessageForwardOriginUser() {}
public MessageForwardOriginUser(int senderUserId) {
this.senderUserId = senderUserId;
}
public MessageForwardOriginUser(DataInput input) throws IOException {
this.senderUserId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.senderUserId);
}
}
public static class MessageForwardOriginHiddenUser extends MessageForwardOrigin {
public String senderName;
public static final int CONSTRUCTOR = -271257885;
public MessageForwardOriginHiddenUser() {}
public MessageForwardOriginHiddenUser(String senderName) {
this.senderName = senderName;
}
public MessageForwardOriginHiddenUser(DataInput input) throws IOException {
if (input.readBoolean()) {
var senderNameTmp = new byte[input.readInt()];
input.readFully(senderNameTmp);
this.senderName = new String(senderNameTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.senderName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var senderNameTmp = this.senderName.getBytes(StandardCharsets.UTF_8);
output.writeInt(senderNameTmp.length);
output.write(senderNameTmp);
}
}
}
public static class MessageForwardOriginChannel extends MessageForwardOrigin {
public long chatId;
public long messageId;
public String authorSignature;
public static final int CONSTRUCTOR = 1490730723;
public MessageForwardOriginChannel() {}
public MessageForwardOriginChannel(long chatId, long messageId, String authorSignature) {
this.chatId = chatId;
this.messageId = messageId;
this.authorSignature = authorSignature;
}
public MessageForwardOriginChannel(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
if (input.readBoolean()) {
var authorSignatureTmp = new byte[input.readInt()];
input.readFully(authorSignatureTmp);
this.authorSignature = new String(authorSignatureTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
if (this.authorSignature == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var authorSignatureTmp = this.authorSignature.getBytes(StandardCharsets.UTF_8);
output.writeInt(authorSignatureTmp.length);
output.write(authorSignatureTmp);
}
}
}
public static class MessageLinkInfo extends Object {
public boolean isPublic;
public long chatId;
public Message message;
public boolean forAlbum;
public static final int CONSTRUCTOR = 657372995;
public MessageLinkInfo() {}
public MessageLinkInfo(boolean isPublic, long chatId, Message message, boolean forAlbum) {
this.isPublic = isPublic;
this.chatId = chatId;
this.message = message;
this.forAlbum = forAlbum;
}
public MessageLinkInfo(DataInput input) throws IOException {
this.isPublic = input.readBoolean();
this.chatId = input.readLong();
if (input.readBoolean()) {
if (Message.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.message = new Message(input);
}
this.forAlbum = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isPublic);
output.writeLong(this.chatId);
if (this.message == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.message.serialize(output);
}
output.writeBoolean(this.forAlbum);
}
}
public static class MessageSchedulingStateSendAtDate extends MessageSchedulingState {
public int sendDate;
public static final int CONSTRUCTOR = -1485570073;
public MessageSchedulingStateSendAtDate() {}
public MessageSchedulingStateSendAtDate(int sendDate) {
this.sendDate = sendDate;
}
public MessageSchedulingStateSendAtDate(DataInput input) throws IOException {
this.sendDate = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.sendDate);
}
}
public static class MessageSchedulingStateSendWhenOnline extends MessageSchedulingState {
public static final int CONSTRUCTOR = 2092947464;
public MessageSchedulingStateSendWhenOnline() {}
public MessageSchedulingStateSendWhenOnline(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class MessageSendingStatePending extends MessageSendingState {
public static final int CONSTRUCTOR = -1381803582;
public MessageSendingStatePending() {}
public MessageSendingStatePending(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class MessageSendingStateFailed extends MessageSendingState {
public int errorCode;
public String errorMessage;
public boolean canRetry;
public double retryAfter;
public static final int CONSTRUCTOR = 2054476087;
public MessageSendingStateFailed() {}
public MessageSendingStateFailed(int errorCode, String errorMessage, boolean canRetry, double retryAfter) {
this.errorCode = errorCode;
this.errorMessage = errorMessage;
this.canRetry = canRetry;
this.retryAfter = retryAfter;
}
public MessageSendingStateFailed(DataInput input) throws IOException {
this.errorCode = input.readInt();
if (input.readBoolean()) {
var errorMessageTmp = new byte[input.readInt()];
input.readFully(errorMessageTmp);
this.errorMessage = new String(errorMessageTmp, StandardCharsets.UTF_8);
}
this.canRetry = input.readBoolean();
this.retryAfter = input.readDouble();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.errorCode);
if (this.errorMessage == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var errorMessageTmp = this.errorMessage.getBytes(StandardCharsets.UTF_8);
output.writeInt(errorMessageTmp.length);
output.write(errorMessageTmp);
}
output.writeBoolean(this.canRetry);
output.writeDouble(this.retryAfter);
}
}
public static class Messages extends Object {
public int totalCount;
public Message[] messages;
public static final int CONSTRUCTOR = -16498159;
public Messages() {}
public Messages(int totalCount, Message[] messages) {
this.totalCount = totalCount;
this.messages = messages;
}
public Messages(DataInput input) throws IOException {
this.totalCount = input.readInt();
if (input.readBoolean()) {
this.messages = new Message[input.readInt()];
for (int i = 0; i < this.messages.length; i++) {
if (Message.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.messages[i] = new Message(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.totalCount);
if (this.messages == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.messages.length);
for (int i = 0; i < this.messages.length; i++) {
this.messages[i].serialize(output);
}
}
}
}
public static class Minithumbnail extends Object {
public int width;
public int height;
public byte[] data;
public static final int CONSTRUCTOR = -328540758;
public Minithumbnail() {}
public Minithumbnail(int width, int height, byte[] data) {
this.width = width;
this.height = height;
this.data = data;
}
public Minithumbnail(DataInput input) throws IOException {
this.width = input.readInt();
this.height = input.readInt();
if (input.readBoolean()) {
this.data = new byte[input.readInt()];
input.readFully(this.data);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.width);
output.writeInt(this.height);
if (this.data == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.data.length);
output.write(this.data);
}
}
}
public static class NetworkStatistics extends Object {
public int sinceDate;
public NetworkStatisticsEntry[] entries;
public static final int CONSTRUCTOR = 1615554212;
public NetworkStatistics() {}
public NetworkStatistics(int sinceDate, NetworkStatisticsEntry[] entries) {
this.sinceDate = sinceDate;
this.entries = entries;
}
public NetworkStatistics(DataInput input) throws IOException {
this.sinceDate = input.readInt();
if (input.readBoolean()) {
this.entries = new NetworkStatisticsEntry[input.readInt()];
for (int i = 0; i < this.entries.length; i++) {
switch(input.readInt()) {
case NetworkStatisticsEntryFile.CONSTRUCTOR:
this.entries[i] = new NetworkStatisticsEntryFile(input);
break;
case NetworkStatisticsEntryCall.CONSTRUCTOR:
this.entries[i] = new NetworkStatisticsEntryCall(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.sinceDate);
if (this.entries == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.entries.length);
for (int i = 0; i < this.entries.length; i++) {
this.entries[i].serialize(output);
}
}
}
}
public static class NetworkStatisticsEntryFile extends NetworkStatisticsEntry {
public FileType fileType;
public NetworkType networkType;
public long sentBytes;
public long receivedBytes;
public static final int CONSTRUCTOR = 188452706;
public NetworkStatisticsEntryFile() {}
public NetworkStatisticsEntryFile(FileType fileType, NetworkType networkType, long sentBytes, long receivedBytes) {
this.fileType = fileType;
this.networkType = networkType;
this.sentBytes = sentBytes;
this.receivedBytes = receivedBytes;
}
public NetworkStatisticsEntryFile(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case FileTypeNone.CONSTRUCTOR:
this.fileType = new FileTypeNone(input);
break;
case FileTypeAnimation.CONSTRUCTOR:
this.fileType = new FileTypeAnimation(input);
break;
case FileTypeAudio.CONSTRUCTOR:
this.fileType = new FileTypeAudio(input);
break;
case FileTypeDocument.CONSTRUCTOR:
this.fileType = new FileTypeDocument(input);
break;
case FileTypePhoto.CONSTRUCTOR:
this.fileType = new FileTypePhoto(input);
break;
case FileTypeProfilePhoto.CONSTRUCTOR:
this.fileType = new FileTypeProfilePhoto(input);
break;
case FileTypeSecret.CONSTRUCTOR:
this.fileType = new FileTypeSecret(input);
break;
case FileTypeSecretThumbnail.CONSTRUCTOR:
this.fileType = new FileTypeSecretThumbnail(input);
break;
case FileTypeSecure.CONSTRUCTOR:
this.fileType = new FileTypeSecure(input);
break;
case FileTypeSticker.CONSTRUCTOR:
this.fileType = new FileTypeSticker(input);
break;
case FileTypeThumbnail.CONSTRUCTOR:
this.fileType = new FileTypeThumbnail(input);
break;
case FileTypeUnknown.CONSTRUCTOR:
this.fileType = new FileTypeUnknown(input);
break;
case FileTypeVideo.CONSTRUCTOR:
this.fileType = new FileTypeVideo(input);
break;
case FileTypeVideoNote.CONSTRUCTOR:
this.fileType = new FileTypeVideoNote(input);
break;
case FileTypeVoiceNote.CONSTRUCTOR:
this.fileType = new FileTypeVoiceNote(input);
break;
case FileTypeWallpaper.CONSTRUCTOR:
this.fileType = new FileTypeWallpaper(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case NetworkTypeNone.CONSTRUCTOR:
this.networkType = new NetworkTypeNone(input);
break;
case NetworkTypeMobile.CONSTRUCTOR:
this.networkType = new NetworkTypeMobile(input);
break;
case NetworkTypeMobileRoaming.CONSTRUCTOR:
this.networkType = new NetworkTypeMobileRoaming(input);
break;
case NetworkTypeWiFi.CONSTRUCTOR:
this.networkType = new NetworkTypeWiFi(input);
break;
case NetworkTypeOther.CONSTRUCTOR:
this.networkType = new NetworkTypeOther(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.sentBytes = input.readLong();
this.receivedBytes = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.fileType == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.fileType.serialize(output);
}
if (this.networkType == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.networkType.serialize(output);
}
output.writeLong(this.sentBytes);
output.writeLong(this.receivedBytes);
}
}
public static class NetworkStatisticsEntryCall extends NetworkStatisticsEntry {
public NetworkType networkType;
public long sentBytes;
public long receivedBytes;
public double duration;
public static final int CONSTRUCTOR = 737000365;
public NetworkStatisticsEntryCall() {}
public NetworkStatisticsEntryCall(NetworkType networkType, long sentBytes, long receivedBytes, double duration) {
this.networkType = networkType;
this.sentBytes = sentBytes;
this.receivedBytes = receivedBytes;
this.duration = duration;
}
public NetworkStatisticsEntryCall(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case NetworkTypeNone.CONSTRUCTOR:
this.networkType = new NetworkTypeNone(input);
break;
case NetworkTypeMobile.CONSTRUCTOR:
this.networkType = new NetworkTypeMobile(input);
break;
case NetworkTypeMobileRoaming.CONSTRUCTOR:
this.networkType = new NetworkTypeMobileRoaming(input);
break;
case NetworkTypeWiFi.CONSTRUCTOR:
this.networkType = new NetworkTypeWiFi(input);
break;
case NetworkTypeOther.CONSTRUCTOR:
this.networkType = new NetworkTypeOther(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.sentBytes = input.readLong();
this.receivedBytes = input.readLong();
this.duration = input.readDouble();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.networkType == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.networkType.serialize(output);
}
output.writeLong(this.sentBytes);
output.writeLong(this.receivedBytes);
output.writeDouble(this.duration);
}
}
public static class NetworkTypeNone extends NetworkType {
public static final int CONSTRUCTOR = -1971691759;
public NetworkTypeNone() {}
public NetworkTypeNone(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class NetworkTypeMobile extends NetworkType {
public static final int CONSTRUCTOR = 819228239;
public NetworkTypeMobile() {}
public NetworkTypeMobile(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class NetworkTypeMobileRoaming extends NetworkType {
public static final int CONSTRUCTOR = -1435199760;
public NetworkTypeMobileRoaming() {}
public NetworkTypeMobileRoaming(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class NetworkTypeWiFi extends NetworkType {
public static final int CONSTRUCTOR = -633872070;
public NetworkTypeWiFi() {}
public NetworkTypeWiFi(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class NetworkTypeOther extends NetworkType {
public static final int CONSTRUCTOR = 1942128539;
public NetworkTypeOther() {}
public NetworkTypeOther(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class Notification extends Object {
public int id;
public int date;
public boolean isSilent;
public NotificationType type;
public static final int CONSTRUCTOR = 788743120;
public Notification() {}
public Notification(int id, int date, boolean isSilent, NotificationType type) {
this.id = id;
this.date = date;
this.isSilent = isSilent;
this.type = type;
}
public Notification(DataInput input) throws IOException {
this.id = input.readInt();
this.date = input.readInt();
this.isSilent = input.readBoolean();
if (input.readBoolean()) {
switch(input.readInt()) {
case NotificationTypeNewMessage.CONSTRUCTOR:
this.type = new NotificationTypeNewMessage(input);
break;
case NotificationTypeNewSecretChat.CONSTRUCTOR:
this.type = new NotificationTypeNewSecretChat(input);
break;
case NotificationTypeNewCall.CONSTRUCTOR:
this.type = new NotificationTypeNewCall(input);
break;
case NotificationTypeNewPushMessage.CONSTRUCTOR:
this.type = new NotificationTypeNewPushMessage(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.id);
output.writeInt(this.date);
output.writeBoolean(this.isSilent);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
}
}
public static class NotificationGroup extends Object {
public int id;
public NotificationGroupType type;
public long chatId;
public int totalCount;
public Notification[] notifications;
public static final int CONSTRUCTOR = 780691541;
public NotificationGroup() {}
public NotificationGroup(int id, NotificationGroupType type, long chatId, int totalCount, Notification[] notifications) {
this.id = id;
this.type = type;
this.chatId = chatId;
this.totalCount = totalCount;
this.notifications = notifications;
}
public NotificationGroup(DataInput input) throws IOException {
this.id = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case NotificationGroupTypeMessages.CONSTRUCTOR:
this.type = new NotificationGroupTypeMessages(input);
break;
case NotificationGroupTypeMentions.CONSTRUCTOR:
this.type = new NotificationGroupTypeMentions(input);
break;
case NotificationGroupTypeSecretChat.CONSTRUCTOR:
this.type = new NotificationGroupTypeSecretChat(input);
break;
case NotificationGroupTypeCalls.CONSTRUCTOR:
this.type = new NotificationGroupTypeCalls(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.chatId = input.readLong();
this.totalCount = input.readInt();
if (input.readBoolean()) {
this.notifications = new Notification[input.readInt()];
for (int i = 0; i < this.notifications.length; i++) {
if (Notification.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.notifications[i] = new Notification(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.id);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
output.writeLong(this.chatId);
output.writeInt(this.totalCount);
if (this.notifications == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.notifications.length);
for (int i = 0; i < this.notifications.length; i++) {
this.notifications[i].serialize(output);
}
}
}
}
public static class NotificationGroupTypeMessages extends NotificationGroupType {
public static final int CONSTRUCTOR = -1702481123;
public NotificationGroupTypeMessages() {}
public NotificationGroupTypeMessages(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class NotificationGroupTypeMentions extends NotificationGroupType {
public static final int CONSTRUCTOR = -2050324051;
public NotificationGroupTypeMentions() {}
public NotificationGroupTypeMentions(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class NotificationGroupTypeSecretChat extends NotificationGroupType {
public static final int CONSTRUCTOR = 1390759476;
public NotificationGroupTypeSecretChat() {}
public NotificationGroupTypeSecretChat(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class NotificationGroupTypeCalls extends NotificationGroupType {
public static final int CONSTRUCTOR = 1379123538;
public NotificationGroupTypeCalls() {}
public NotificationGroupTypeCalls(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class NotificationSettingsScopePrivateChats extends NotificationSettingsScope {
public static final int CONSTRUCTOR = 937446759;
public NotificationSettingsScopePrivateChats() {}
public NotificationSettingsScopePrivateChats(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class NotificationSettingsScopeGroupChats extends NotificationSettingsScope {
public static final int CONSTRUCTOR = 1212142067;
public NotificationSettingsScopeGroupChats() {}
public NotificationSettingsScopeGroupChats(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class NotificationSettingsScopeChannelChats extends NotificationSettingsScope {
public static final int CONSTRUCTOR = 548013448;
public NotificationSettingsScopeChannelChats() {}
public NotificationSettingsScopeChannelChats(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class NotificationTypeNewMessage extends NotificationType {
public Message message;
public static final int CONSTRUCTOR = 1885935159;
public NotificationTypeNewMessage() {}
public NotificationTypeNewMessage(Message message) {
this.message = message;
}
public NotificationTypeNewMessage(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Message.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.message = new Message(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.message == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.message.serialize(output);
}
}
}
public static class NotificationTypeNewSecretChat extends NotificationType {
public static final int CONSTRUCTOR = 1198638768;
public NotificationTypeNewSecretChat() {}
public NotificationTypeNewSecretChat(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class NotificationTypeNewCall extends NotificationType {
public int callId;
public static final int CONSTRUCTOR = 1712734585;
public NotificationTypeNewCall() {}
public NotificationTypeNewCall(int callId) {
this.callId = callId;
}
public NotificationTypeNewCall(DataInput input) throws IOException {
this.callId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.callId);
}
}
public static class NotificationTypeNewPushMessage extends NotificationType {
public long messageId;
public int senderUserId;
public String senderName;
public boolean isOutgoing;
public PushMessageContent content;
public static final int CONSTRUCTOR = 999250657;
public NotificationTypeNewPushMessage() {}
public NotificationTypeNewPushMessage(long messageId, int senderUserId, String senderName, boolean isOutgoing, PushMessageContent content) {
this.messageId = messageId;
this.senderUserId = senderUserId;
this.senderName = senderName;
this.isOutgoing = isOutgoing;
this.content = content;
}
public NotificationTypeNewPushMessage(DataInput input) throws IOException {
this.messageId = input.readLong();
this.senderUserId = input.readInt();
if (input.readBoolean()) {
var senderNameTmp = new byte[input.readInt()];
input.readFully(senderNameTmp);
this.senderName = new String(senderNameTmp, StandardCharsets.UTF_8);
}
this.isOutgoing = input.readBoolean();
if (input.readBoolean()) {
switch(input.readInt()) {
case PushMessageContentHidden.CONSTRUCTOR:
this.content = new PushMessageContentHidden(input);
break;
case PushMessageContentAnimation.CONSTRUCTOR:
this.content = new PushMessageContentAnimation(input);
break;
case PushMessageContentAudio.CONSTRUCTOR:
this.content = new PushMessageContentAudio(input);
break;
case PushMessageContentContact.CONSTRUCTOR:
this.content = new PushMessageContentContact(input);
break;
case PushMessageContentContactRegistered.CONSTRUCTOR:
this.content = new PushMessageContentContactRegistered(input);
break;
case PushMessageContentDocument.CONSTRUCTOR:
this.content = new PushMessageContentDocument(input);
break;
case PushMessageContentGame.CONSTRUCTOR:
this.content = new PushMessageContentGame(input);
break;
case PushMessageContentGameScore.CONSTRUCTOR:
this.content = new PushMessageContentGameScore(input);
break;
case PushMessageContentInvoice.CONSTRUCTOR:
this.content = new PushMessageContentInvoice(input);
break;
case PushMessageContentLocation.CONSTRUCTOR:
this.content = new PushMessageContentLocation(input);
break;
case PushMessageContentPhoto.CONSTRUCTOR:
this.content = new PushMessageContentPhoto(input);
break;
case PushMessageContentPoll.CONSTRUCTOR:
this.content = new PushMessageContentPoll(input);
break;
case PushMessageContentScreenshotTaken.CONSTRUCTOR:
this.content = new PushMessageContentScreenshotTaken(input);
break;
case PushMessageContentSticker.CONSTRUCTOR:
this.content = new PushMessageContentSticker(input);
break;
case PushMessageContentText.CONSTRUCTOR:
this.content = new PushMessageContentText(input);
break;
case PushMessageContentVideo.CONSTRUCTOR:
this.content = new PushMessageContentVideo(input);
break;
case PushMessageContentVideoNote.CONSTRUCTOR:
this.content = new PushMessageContentVideoNote(input);
break;
case PushMessageContentVoiceNote.CONSTRUCTOR:
this.content = new PushMessageContentVoiceNote(input);
break;
case PushMessageContentBasicGroupChatCreate.CONSTRUCTOR:
this.content = new PushMessageContentBasicGroupChatCreate(input);
break;
case PushMessageContentChatAddMembers.CONSTRUCTOR:
this.content = new PushMessageContentChatAddMembers(input);
break;
case PushMessageContentChatChangePhoto.CONSTRUCTOR:
this.content = new PushMessageContentChatChangePhoto(input);
break;
case PushMessageContentChatChangeTitle.CONSTRUCTOR:
this.content = new PushMessageContentChatChangeTitle(input);
break;
case PushMessageContentChatDeleteMember.CONSTRUCTOR:
this.content = new PushMessageContentChatDeleteMember(input);
break;
case PushMessageContentChatJoinByLink.CONSTRUCTOR:
this.content = new PushMessageContentChatJoinByLink(input);
break;
case PushMessageContentMessageForwards.CONSTRUCTOR:
this.content = new PushMessageContentMessageForwards(input);
break;
case PushMessageContentMediaAlbum.CONSTRUCTOR:
this.content = new PushMessageContentMediaAlbum(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.messageId);
output.writeInt(this.senderUserId);
if (this.senderName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var senderNameTmp = this.senderName.getBytes(StandardCharsets.UTF_8);
output.writeInt(senderNameTmp.length);
output.write(senderNameTmp);
}
output.writeBoolean(this.isOutgoing);
if (this.content == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.content.serialize(output);
}
}
}
public static class Ok extends Object {
public static final int CONSTRUCTOR = -722616727;
public Ok() {}
public Ok(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class OptionValueBoolean extends OptionValue {
public boolean value;
public static final int CONSTRUCTOR = 63135518;
public OptionValueBoolean() {}
public OptionValueBoolean(boolean value) {
this.value = value;
}
public OptionValueBoolean(DataInput input) throws IOException {
this.value = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.value);
}
}
public static class OptionValueEmpty extends OptionValue {
public static final int CONSTRUCTOR = 918955155;
public OptionValueEmpty() {}
public OptionValueEmpty(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class OptionValueInteger extends OptionValue {
public int value;
public static final int CONSTRUCTOR = -1400911104;
public OptionValueInteger() {}
public OptionValueInteger(int value) {
this.value = value;
}
public OptionValueInteger(DataInput input) throws IOException {
this.value = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.value);
}
}
public static class OptionValueString extends OptionValue {
public String value;
public static final int CONSTRUCTOR = 756248212;
public OptionValueString() {}
public OptionValueString(String value) {
this.value = value;
}
public OptionValueString(DataInput input) throws IOException {
if (input.readBoolean()) {
var valueTmp = new byte[input.readInt()];
input.readFully(valueTmp);
this.value = new String(valueTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.value == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var valueTmp = this.value.getBytes(StandardCharsets.UTF_8);
output.writeInt(valueTmp.length);
output.write(valueTmp);
}
}
}
public static class OrderInfo extends Object {
public String name;
public String phoneNumber;
public String emailAddress;
public Address shippingAddress;
public static final int CONSTRUCTOR = 783997294;
public OrderInfo() {}
public OrderInfo(String name, String phoneNumber, String emailAddress, Address shippingAddress) {
this.name = name;
this.phoneNumber = phoneNumber;
this.emailAddress = emailAddress;
this.shippingAddress = shippingAddress;
}
public OrderInfo(DataInput input) throws IOException {
if (input.readBoolean()) {
var nameTmp = new byte[input.readInt()];
input.readFully(nameTmp);
this.name = new String(nameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var phoneNumberTmp = new byte[input.readInt()];
input.readFully(phoneNumberTmp);
this.phoneNumber = new String(phoneNumberTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var emailAddressTmp = new byte[input.readInt()];
input.readFully(emailAddressTmp);
this.emailAddress = new String(emailAddressTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Address.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.shippingAddress = new Address(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.name == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nameTmp = this.name.getBytes(StandardCharsets.UTF_8);
output.writeInt(nameTmp.length);
output.write(nameTmp);
}
if (this.phoneNumber == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var phoneNumberTmp = this.phoneNumber.getBytes(StandardCharsets.UTF_8);
output.writeInt(phoneNumberTmp.length);
output.write(phoneNumberTmp);
}
if (this.emailAddress == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var emailAddressTmp = this.emailAddress.getBytes(StandardCharsets.UTF_8);
output.writeInt(emailAddressTmp.length);
output.write(emailAddressTmp);
}
if (this.shippingAddress == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.shippingAddress.serialize(output);
}
}
}
public static class PageBlockTitle extends PageBlock {
public RichText title;
public static final int CONSTRUCTOR = 1629664784;
public PageBlockTitle() {}
public PageBlockTitle(RichText title) {
this.title = title;
}
public PageBlockTitle(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.title = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.title = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.title = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.title = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.title = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.title = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.title = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.title = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.title = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.title = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.title = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.title = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.title = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.title = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.title = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.title = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.title = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.title.serialize(output);
}
}
}
public static class PageBlockSubtitle extends PageBlock {
public RichText subtitle;
public static final int CONSTRUCTOR = 264524263;
public PageBlockSubtitle() {}
public PageBlockSubtitle(RichText subtitle) {
this.subtitle = subtitle;
}
public PageBlockSubtitle(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.subtitle = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.subtitle = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.subtitle = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.subtitle = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.subtitle = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.subtitle = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.subtitle = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.subtitle = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.subtitle = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.subtitle = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.subtitle = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.subtitle = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.subtitle = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.subtitle = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.subtitle = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.subtitle = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.subtitle = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.subtitle == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.subtitle.serialize(output);
}
}
}
public static class PageBlockAuthorDate extends PageBlock {
public RichText author;
public int publishDate;
public static final int CONSTRUCTOR = 1300231184;
public PageBlockAuthorDate() {}
public PageBlockAuthorDate(RichText author, int publishDate) {
this.author = author;
this.publishDate = publishDate;
}
public PageBlockAuthorDate(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.author = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.author = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.author = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.author = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.author = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.author = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.author = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.author = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.author = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.author = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.author = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.author = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.author = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.author = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.author = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.author = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.author = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.publishDate = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.author == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.author.serialize(output);
}
output.writeInt(this.publishDate);
}
}
public static class PageBlockHeader extends PageBlock {
public RichText header;
public static final int CONSTRUCTOR = 1402854811;
public PageBlockHeader() {}
public PageBlockHeader(RichText header) {
this.header = header;
}
public PageBlockHeader(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.header = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.header = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.header = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.header = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.header = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.header = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.header = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.header = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.header = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.header = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.header = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.header = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.header = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.header = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.header = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.header = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.header = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.header == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.header.serialize(output);
}
}
}
public static class PageBlockSubheader extends PageBlock {
public RichText subheader;
public static final int CONSTRUCTOR = 1263956774;
public PageBlockSubheader() {}
public PageBlockSubheader(RichText subheader) {
this.subheader = subheader;
}
public PageBlockSubheader(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.subheader = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.subheader = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.subheader = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.subheader = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.subheader = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.subheader = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.subheader = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.subheader = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.subheader = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.subheader = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.subheader = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.subheader = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.subheader = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.subheader = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.subheader = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.subheader = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.subheader = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.subheader == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.subheader.serialize(output);
}
}
}
public static class PageBlockKicker extends PageBlock {
public RichText kicker;
public static final int CONSTRUCTOR = 1361282635;
public PageBlockKicker() {}
public PageBlockKicker(RichText kicker) {
this.kicker = kicker;
}
public PageBlockKicker(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.kicker = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.kicker = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.kicker = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.kicker = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.kicker = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.kicker = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.kicker = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.kicker = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.kicker = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.kicker = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.kicker = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.kicker = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.kicker = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.kicker = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.kicker = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.kicker = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.kicker = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.kicker == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.kicker.serialize(output);
}
}
}
public static class PageBlockParagraph extends PageBlock {
public RichText text;
public static final int CONSTRUCTOR = 1182402406;
public PageBlockParagraph() {}
public PageBlockParagraph(RichText text) {
this.text = text;
}
public PageBlockParagraph(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.text = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.text = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.text = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.text = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.text = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.text = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.text = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.text = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.text = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.text = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.text = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.text = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.text = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.text = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.text = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.text = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.text = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
}
}
public static class PageBlockPreformatted extends PageBlock {
public RichText text;
public String language;
public static final int CONSTRUCTOR = -1066346178;
public PageBlockPreformatted() {}
public PageBlockPreformatted(RichText text, String language) {
this.text = text;
this.language = language;
}
public PageBlockPreformatted(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.text = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.text = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.text = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.text = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.text = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.text = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.text = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.text = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.text = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.text = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.text = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.text = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.text = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.text = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.text = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.text = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.text = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
var languageTmp = new byte[input.readInt()];
input.readFully(languageTmp);
this.language = new String(languageTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
if (this.language == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var languageTmp = this.language.getBytes(StandardCharsets.UTF_8);
output.writeInt(languageTmp.length);
output.write(languageTmp);
}
}
}
public static class PageBlockFooter extends PageBlock {
public RichText footer;
public static final int CONSTRUCTOR = 886429480;
public PageBlockFooter() {}
public PageBlockFooter(RichText footer) {
this.footer = footer;
}
public PageBlockFooter(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.footer = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.footer = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.footer = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.footer = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.footer = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.footer = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.footer = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.footer = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.footer = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.footer = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.footer = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.footer = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.footer = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.footer = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.footer = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.footer = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.footer = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.footer == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.footer.serialize(output);
}
}
}
public static class PageBlockDivider extends PageBlock {
public static final int CONSTRUCTOR = -618614392;
public PageBlockDivider() {}
public PageBlockDivider(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PageBlockAnchor extends PageBlock {
public String name;
public static final int CONSTRUCTOR = -837994576;
public PageBlockAnchor() {}
public PageBlockAnchor(String name) {
this.name = name;
}
public PageBlockAnchor(DataInput input) throws IOException {
if (input.readBoolean()) {
var nameTmp = new byte[input.readInt()];
input.readFully(nameTmp);
this.name = new String(nameTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.name == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nameTmp = this.name.getBytes(StandardCharsets.UTF_8);
output.writeInt(nameTmp.length);
output.write(nameTmp);
}
}
}
public static class PageBlockList extends PageBlock {
public PageBlockListItem[] items;
public static final int CONSTRUCTOR = -1037074852;
public PageBlockList() {}
public PageBlockList(PageBlockListItem[] items) {
this.items = items;
}
public PageBlockList(DataInput input) throws IOException {
if (input.readBoolean()) {
this.items = new PageBlockListItem[input.readInt()];
for (int i = 0; i < this.items.length; i++) {
if (PageBlockListItem.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.items[i] = new PageBlockListItem(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.items == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.items.length);
for (int i = 0; i < this.items.length; i++) {
this.items[i].serialize(output);
}
}
}
}
public static class PageBlockBlockQuote extends PageBlock {
public RichText text;
public RichText credit;
public static final int CONSTRUCTOR = 1657834142;
public PageBlockBlockQuote() {}
public PageBlockBlockQuote(RichText text, RichText credit) {
this.text = text;
this.credit = credit;
}
public PageBlockBlockQuote(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.text = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.text = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.text = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.text = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.text = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.text = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.text = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.text = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.text = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.text = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.text = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.text = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.text = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.text = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.text = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.text = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.text = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.credit = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.credit = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.credit = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.credit = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.credit = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.credit = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.credit = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.credit = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.credit = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.credit = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.credit = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.credit = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.credit = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.credit = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.credit = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.credit = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.credit = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
if (this.credit == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.credit.serialize(output);
}
}
}
public static class PageBlockPullQuote extends PageBlock {
public RichText text;
public RichText credit;
public static final int CONSTRUCTOR = 490242317;
public PageBlockPullQuote() {}
public PageBlockPullQuote(RichText text, RichText credit) {
this.text = text;
this.credit = credit;
}
public PageBlockPullQuote(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.text = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.text = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.text = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.text = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.text = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.text = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.text = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.text = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.text = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.text = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.text = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.text = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.text = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.text = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.text = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.text = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.text = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.credit = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.credit = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.credit = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.credit = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.credit = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.credit = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.credit = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.credit = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.credit = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.credit = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.credit = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.credit = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.credit = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.credit = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.credit = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.credit = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.credit = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
if (this.credit == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.credit.serialize(output);
}
}
}
public static class PageBlockAnimation extends PageBlock {
public Animation animation;
public PageBlockCaption caption;
public boolean needAutoplay;
public static final int CONSTRUCTOR = 1355669513;
public PageBlockAnimation() {}
public PageBlockAnimation(Animation animation, PageBlockCaption caption, boolean needAutoplay) {
this.animation = animation;
this.caption = caption;
this.needAutoplay = needAutoplay;
}
public PageBlockAnimation(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Animation.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.animation = new Animation(input);
}
if (input.readBoolean()) {
if (PageBlockCaption.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new PageBlockCaption(input);
}
this.needAutoplay = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.animation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.animation.serialize(output);
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
output.writeBoolean(this.needAutoplay);
}
}
public static class PageBlockAudio extends PageBlock {
public Audio audio;
public PageBlockCaption caption;
public static final int CONSTRUCTOR = -63371245;
public PageBlockAudio() {}
public PageBlockAudio(Audio audio, PageBlockCaption caption) {
this.audio = audio;
this.caption = caption;
}
public PageBlockAudio(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Audio.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.audio = new Audio(input);
}
if (input.readBoolean()) {
if (PageBlockCaption.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new PageBlockCaption(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.audio == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.audio.serialize(output);
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
}
}
public static class PageBlockPhoto extends PageBlock {
public Photo photo;
public PageBlockCaption caption;
public String url;
public static final int CONSTRUCTOR = 417601156;
public PageBlockPhoto() {}
public PageBlockPhoto(Photo photo, PageBlockCaption caption, String url) {
this.photo = photo;
this.caption = caption;
this.url = url;
}
public PageBlockPhoto(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Photo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.photo = new Photo(input);
}
if (input.readBoolean()) {
if (PageBlockCaption.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new PageBlockCaption(input);
}
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.photo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.photo.serialize(output);
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
}
}
public static class PageBlockVideo extends PageBlock {
public Video video;
public PageBlockCaption caption;
public boolean needAutoplay;
public boolean isLooped;
public static final int CONSTRUCTOR = 510041394;
public PageBlockVideo() {}
public PageBlockVideo(Video video, PageBlockCaption caption, boolean needAutoplay, boolean isLooped) {
this.video = video;
this.caption = caption;
this.needAutoplay = needAutoplay;
this.isLooped = isLooped;
}
public PageBlockVideo(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Video.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.video = new Video(input);
}
if (input.readBoolean()) {
if (PageBlockCaption.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new PageBlockCaption(input);
}
this.needAutoplay = input.readBoolean();
this.isLooped = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.video == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.video.serialize(output);
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
output.writeBoolean(this.needAutoplay);
output.writeBoolean(this.isLooped);
}
}
public static class PageBlockVoiceNote extends PageBlock {
public VoiceNote voiceNote;
public PageBlockCaption caption;
public static final int CONSTRUCTOR = 1823310463;
public PageBlockVoiceNote() {}
public PageBlockVoiceNote(VoiceNote voiceNote, PageBlockCaption caption) {
this.voiceNote = voiceNote;
this.caption = caption;
}
public PageBlockVoiceNote(DataInput input) throws IOException {
if (input.readBoolean()) {
if (VoiceNote.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.voiceNote = new VoiceNote(input);
}
if (input.readBoolean()) {
if (PageBlockCaption.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new PageBlockCaption(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.voiceNote == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.voiceNote.serialize(output);
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
}
}
public static class PageBlockCover extends PageBlock {
public PageBlock cover;
public static final int CONSTRUCTOR = 972174080;
public PageBlockCover() {}
public PageBlockCover(PageBlock cover) {
this.cover = cover;
}
public PageBlockCover(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case PageBlockTitle.CONSTRUCTOR:
this.cover = new PageBlockTitle(input);
break;
case PageBlockSubtitle.CONSTRUCTOR:
this.cover = new PageBlockSubtitle(input);
break;
case PageBlockAuthorDate.CONSTRUCTOR:
this.cover = new PageBlockAuthorDate(input);
break;
case PageBlockHeader.CONSTRUCTOR:
this.cover = new PageBlockHeader(input);
break;
case PageBlockSubheader.CONSTRUCTOR:
this.cover = new PageBlockSubheader(input);
break;
case PageBlockKicker.CONSTRUCTOR:
this.cover = new PageBlockKicker(input);
break;
case PageBlockParagraph.CONSTRUCTOR:
this.cover = new PageBlockParagraph(input);
break;
case PageBlockPreformatted.CONSTRUCTOR:
this.cover = new PageBlockPreformatted(input);
break;
case PageBlockFooter.CONSTRUCTOR:
this.cover = new PageBlockFooter(input);
break;
case PageBlockDivider.CONSTRUCTOR:
this.cover = new PageBlockDivider(input);
break;
case PageBlockAnchor.CONSTRUCTOR:
this.cover = new PageBlockAnchor(input);
break;
case PageBlockList.CONSTRUCTOR:
this.cover = new PageBlockList(input);
break;
case PageBlockBlockQuote.CONSTRUCTOR:
this.cover = new PageBlockBlockQuote(input);
break;
case PageBlockPullQuote.CONSTRUCTOR:
this.cover = new PageBlockPullQuote(input);
break;
case PageBlockAnimation.CONSTRUCTOR:
this.cover = new PageBlockAnimation(input);
break;
case PageBlockAudio.CONSTRUCTOR:
this.cover = new PageBlockAudio(input);
break;
case PageBlockPhoto.CONSTRUCTOR:
this.cover = new PageBlockPhoto(input);
break;
case PageBlockVideo.CONSTRUCTOR:
this.cover = new PageBlockVideo(input);
break;
case PageBlockVoiceNote.CONSTRUCTOR:
this.cover = new PageBlockVoiceNote(input);
break;
case PageBlockCover.CONSTRUCTOR:
this.cover = new PageBlockCover(input);
break;
case PageBlockEmbedded.CONSTRUCTOR:
this.cover = new PageBlockEmbedded(input);
break;
case PageBlockEmbeddedPost.CONSTRUCTOR:
this.cover = new PageBlockEmbeddedPost(input);
break;
case PageBlockCollage.CONSTRUCTOR:
this.cover = new PageBlockCollage(input);
break;
case PageBlockSlideshow.CONSTRUCTOR:
this.cover = new PageBlockSlideshow(input);
break;
case PageBlockChatLink.CONSTRUCTOR:
this.cover = new PageBlockChatLink(input);
break;
case PageBlockTable.CONSTRUCTOR:
this.cover = new PageBlockTable(input);
break;
case PageBlockDetails.CONSTRUCTOR:
this.cover = new PageBlockDetails(input);
break;
case PageBlockRelatedArticles.CONSTRUCTOR:
this.cover = new PageBlockRelatedArticles(input);
break;
case PageBlockMap.CONSTRUCTOR:
this.cover = new PageBlockMap(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.cover == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.cover.serialize(output);
}
}
}
public static class PageBlockEmbedded extends PageBlock {
public String url;
public String html;
public Photo posterPhoto;
public int width;
public int height;
public PageBlockCaption caption;
public boolean isFullWidth;
public boolean allowScrolling;
public static final int CONSTRUCTOR = -1942577763;
public PageBlockEmbedded() {}
public PageBlockEmbedded(String url, String html, Photo posterPhoto, int width, int height, PageBlockCaption caption, boolean isFullWidth, boolean allowScrolling) {
this.url = url;
this.html = html;
this.posterPhoto = posterPhoto;
this.width = width;
this.height = height;
this.caption = caption;
this.isFullWidth = isFullWidth;
this.allowScrolling = allowScrolling;
}
public PageBlockEmbedded(DataInput input) throws IOException {
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var htmlTmp = new byte[input.readInt()];
input.readFully(htmlTmp);
this.html = new String(htmlTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Photo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.posterPhoto = new Photo(input);
}
this.width = input.readInt();
this.height = input.readInt();
if (input.readBoolean()) {
if (PageBlockCaption.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new PageBlockCaption(input);
}
this.isFullWidth = input.readBoolean();
this.allowScrolling = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
if (this.html == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var htmlTmp = this.html.getBytes(StandardCharsets.UTF_8);
output.writeInt(htmlTmp.length);
output.write(htmlTmp);
}
if (this.posterPhoto == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.posterPhoto.serialize(output);
}
output.writeInt(this.width);
output.writeInt(this.height);
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
output.writeBoolean(this.isFullWidth);
output.writeBoolean(this.allowScrolling);
}
}
public static class PageBlockEmbeddedPost extends PageBlock {
public String url;
public String author;
public Photo authorPhoto;
public int date;
public PageBlock[] pageBlocks;
public PageBlockCaption caption;
public static final int CONSTRUCTOR = 397600949;
public PageBlockEmbeddedPost() {}
public PageBlockEmbeddedPost(String url, String author, Photo authorPhoto, int date, PageBlock[] pageBlocks, PageBlockCaption caption) {
this.url = url;
this.author = author;
this.authorPhoto = authorPhoto;
this.date = date;
this.pageBlocks = pageBlocks;
this.caption = caption;
}
public PageBlockEmbeddedPost(DataInput input) throws IOException {
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var authorTmp = new byte[input.readInt()];
input.readFully(authorTmp);
this.author = new String(authorTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Photo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.authorPhoto = new Photo(input);
}
this.date = input.readInt();
if (input.readBoolean()) {
this.pageBlocks = new PageBlock[input.readInt()];
for (int i = 0; i < this.pageBlocks.length; i++) {
switch(input.readInt()) {
case PageBlockTitle.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockTitle(input);
break;
case PageBlockSubtitle.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockSubtitle(input);
break;
case PageBlockAuthorDate.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAuthorDate(input);
break;
case PageBlockHeader.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockHeader(input);
break;
case PageBlockSubheader.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockSubheader(input);
break;
case PageBlockKicker.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockKicker(input);
break;
case PageBlockParagraph.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockParagraph(input);
break;
case PageBlockPreformatted.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockPreformatted(input);
break;
case PageBlockFooter.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockFooter(input);
break;
case PageBlockDivider.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockDivider(input);
break;
case PageBlockAnchor.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAnchor(input);
break;
case PageBlockList.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockList(input);
break;
case PageBlockBlockQuote.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockBlockQuote(input);
break;
case PageBlockPullQuote.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockPullQuote(input);
break;
case PageBlockAnimation.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAnimation(input);
break;
case PageBlockAudio.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAudio(input);
break;
case PageBlockPhoto.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockPhoto(input);
break;
case PageBlockVideo.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockVideo(input);
break;
case PageBlockVoiceNote.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockVoiceNote(input);
break;
case PageBlockCover.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockCover(input);
break;
case PageBlockEmbedded.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockEmbedded(input);
break;
case PageBlockEmbeddedPost.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockEmbeddedPost(input);
break;
case PageBlockCollage.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockCollage(input);
break;
case PageBlockSlideshow.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockSlideshow(input);
break;
case PageBlockChatLink.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockChatLink(input);
break;
case PageBlockTable.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockTable(input);
break;
case PageBlockDetails.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockDetails(input);
break;
case PageBlockRelatedArticles.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockRelatedArticles(input);
break;
case PageBlockMap.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockMap(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
if (input.readBoolean()) {
if (PageBlockCaption.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new PageBlockCaption(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
if (this.author == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var authorTmp = this.author.getBytes(StandardCharsets.UTF_8);
output.writeInt(authorTmp.length);
output.write(authorTmp);
}
if (this.authorPhoto == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.authorPhoto.serialize(output);
}
output.writeInt(this.date);
if (this.pageBlocks == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.pageBlocks.length);
for (int i = 0; i < this.pageBlocks.length; i++) {
this.pageBlocks[i].serialize(output);
}
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
}
}
public static class PageBlockCollage extends PageBlock {
public PageBlock[] pageBlocks;
public PageBlockCaption caption;
public static final int CONSTRUCTOR = 1163760110;
public PageBlockCollage() {}
public PageBlockCollage(PageBlock[] pageBlocks, PageBlockCaption caption) {
this.pageBlocks = pageBlocks;
this.caption = caption;
}
public PageBlockCollage(DataInput input) throws IOException {
if (input.readBoolean()) {
this.pageBlocks = new PageBlock[input.readInt()];
for (int i = 0; i < this.pageBlocks.length; i++) {
switch(input.readInt()) {
case PageBlockTitle.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockTitle(input);
break;
case PageBlockSubtitle.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockSubtitle(input);
break;
case PageBlockAuthorDate.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAuthorDate(input);
break;
case PageBlockHeader.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockHeader(input);
break;
case PageBlockSubheader.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockSubheader(input);
break;
case PageBlockKicker.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockKicker(input);
break;
case PageBlockParagraph.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockParagraph(input);
break;
case PageBlockPreformatted.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockPreformatted(input);
break;
case PageBlockFooter.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockFooter(input);
break;
case PageBlockDivider.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockDivider(input);
break;
case PageBlockAnchor.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAnchor(input);
break;
case PageBlockList.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockList(input);
break;
case PageBlockBlockQuote.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockBlockQuote(input);
break;
case PageBlockPullQuote.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockPullQuote(input);
break;
case PageBlockAnimation.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAnimation(input);
break;
case PageBlockAudio.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAudio(input);
break;
case PageBlockPhoto.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockPhoto(input);
break;
case PageBlockVideo.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockVideo(input);
break;
case PageBlockVoiceNote.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockVoiceNote(input);
break;
case PageBlockCover.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockCover(input);
break;
case PageBlockEmbedded.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockEmbedded(input);
break;
case PageBlockEmbeddedPost.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockEmbeddedPost(input);
break;
case PageBlockCollage.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockCollage(input);
break;
case PageBlockSlideshow.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockSlideshow(input);
break;
case PageBlockChatLink.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockChatLink(input);
break;
case PageBlockTable.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockTable(input);
break;
case PageBlockDetails.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockDetails(input);
break;
case PageBlockRelatedArticles.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockRelatedArticles(input);
break;
case PageBlockMap.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockMap(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
if (input.readBoolean()) {
if (PageBlockCaption.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new PageBlockCaption(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.pageBlocks == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.pageBlocks.length);
for (int i = 0; i < this.pageBlocks.length; i++) {
this.pageBlocks[i].serialize(output);
}
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
}
}
public static class PageBlockSlideshow extends PageBlock {
public PageBlock[] pageBlocks;
public PageBlockCaption caption;
public static final int CONSTRUCTOR = 539217375;
public PageBlockSlideshow() {}
public PageBlockSlideshow(PageBlock[] pageBlocks, PageBlockCaption caption) {
this.pageBlocks = pageBlocks;
this.caption = caption;
}
public PageBlockSlideshow(DataInput input) throws IOException {
if (input.readBoolean()) {
this.pageBlocks = new PageBlock[input.readInt()];
for (int i = 0; i < this.pageBlocks.length; i++) {
switch(input.readInt()) {
case PageBlockTitle.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockTitle(input);
break;
case PageBlockSubtitle.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockSubtitle(input);
break;
case PageBlockAuthorDate.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAuthorDate(input);
break;
case PageBlockHeader.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockHeader(input);
break;
case PageBlockSubheader.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockSubheader(input);
break;
case PageBlockKicker.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockKicker(input);
break;
case PageBlockParagraph.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockParagraph(input);
break;
case PageBlockPreformatted.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockPreformatted(input);
break;
case PageBlockFooter.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockFooter(input);
break;
case PageBlockDivider.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockDivider(input);
break;
case PageBlockAnchor.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAnchor(input);
break;
case PageBlockList.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockList(input);
break;
case PageBlockBlockQuote.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockBlockQuote(input);
break;
case PageBlockPullQuote.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockPullQuote(input);
break;
case PageBlockAnimation.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAnimation(input);
break;
case PageBlockAudio.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAudio(input);
break;
case PageBlockPhoto.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockPhoto(input);
break;
case PageBlockVideo.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockVideo(input);
break;
case PageBlockVoiceNote.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockVoiceNote(input);
break;
case PageBlockCover.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockCover(input);
break;
case PageBlockEmbedded.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockEmbedded(input);
break;
case PageBlockEmbeddedPost.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockEmbeddedPost(input);
break;
case PageBlockCollage.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockCollage(input);
break;
case PageBlockSlideshow.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockSlideshow(input);
break;
case PageBlockChatLink.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockChatLink(input);
break;
case PageBlockTable.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockTable(input);
break;
case PageBlockDetails.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockDetails(input);
break;
case PageBlockRelatedArticles.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockRelatedArticles(input);
break;
case PageBlockMap.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockMap(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
if (input.readBoolean()) {
if (PageBlockCaption.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new PageBlockCaption(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.pageBlocks == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.pageBlocks.length);
for (int i = 0; i < this.pageBlocks.length; i++) {
this.pageBlocks[i].serialize(output);
}
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
}
}
public static class PageBlockChatLink extends PageBlock {
public String title;
public ChatPhoto photo;
public String username;
public static final int CONSTRUCTOR = 214606645;
public PageBlockChatLink() {}
public PageBlockChatLink(String title, ChatPhoto photo, String username) {
this.title = title;
this.photo = photo;
this.username = username;
}
public PageBlockChatLink(DataInput input) throws IOException {
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (ChatPhoto.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.photo = new ChatPhoto(input);
}
if (input.readBoolean()) {
var usernameTmp = new byte[input.readInt()];
input.readFully(usernameTmp);
this.username = new String(usernameTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.photo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.photo.serialize(output);
}
if (this.username == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var usernameTmp = this.username.getBytes(StandardCharsets.UTF_8);
output.writeInt(usernameTmp.length);
output.write(usernameTmp);
}
}
}
public static class PageBlockTable extends PageBlock {
public RichText caption;
public PageBlockTableCell[][] cells;
public boolean isBordered;
public boolean isStriped;
public static final int CONSTRUCTOR = -942649288;
public PageBlockTable() {}
public PageBlockTable(RichText caption, PageBlockTableCell[][] cells, boolean isBordered, boolean isStriped) {
this.caption = caption;
this.cells = cells;
this.isBordered = isBordered;
this.isStriped = isStriped;
}
public PageBlockTable(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.caption = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.caption = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.caption = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.caption = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.caption = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.caption = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.caption = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.caption = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.caption = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.caption = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.caption = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.caption = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.caption = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.caption = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.caption = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.caption = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.caption = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
this.cells = new PageBlockTableCell[input.readInt()][];
for (int i = 0; i < this.cells.length; i++) {
this.cells[i] = new PageBlockTableCell[input.readInt()];
for (int j = 0; j < this.cells[i].length; j++) {
if (PageBlockTableCell.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.cells[i][j] = new PageBlockTableCell(input);
}
}
}
this.isBordered = input.readBoolean();
this.isStriped = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
if (this.cells == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.cells.length);
for (int i = 0; i < this.cells.length; i++) {
output.writeInt(this.cells[i].length);
for (int j = 0; j < this.cells[i].length; j++) {
this.cells[i][j].serialize(output);
}
}
}
output.writeBoolean(this.isBordered);
output.writeBoolean(this.isStriped);
}
}
public static class PageBlockDetails extends PageBlock {
public RichText header;
public PageBlock[] pageBlocks;
public boolean isOpen;
public static final int CONSTRUCTOR = -1599869809;
public PageBlockDetails() {}
public PageBlockDetails(RichText header, PageBlock[] pageBlocks, boolean isOpen) {
this.header = header;
this.pageBlocks = pageBlocks;
this.isOpen = isOpen;
}
public PageBlockDetails(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.header = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.header = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.header = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.header = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.header = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.header = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.header = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.header = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.header = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.header = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.header = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.header = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.header = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.header = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.header = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.header = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.header = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
this.pageBlocks = new PageBlock[input.readInt()];
for (int i = 0; i < this.pageBlocks.length; i++) {
switch(input.readInt()) {
case PageBlockTitle.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockTitle(input);
break;
case PageBlockSubtitle.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockSubtitle(input);
break;
case PageBlockAuthorDate.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAuthorDate(input);
break;
case PageBlockHeader.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockHeader(input);
break;
case PageBlockSubheader.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockSubheader(input);
break;
case PageBlockKicker.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockKicker(input);
break;
case PageBlockParagraph.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockParagraph(input);
break;
case PageBlockPreformatted.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockPreformatted(input);
break;
case PageBlockFooter.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockFooter(input);
break;
case PageBlockDivider.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockDivider(input);
break;
case PageBlockAnchor.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAnchor(input);
break;
case PageBlockList.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockList(input);
break;
case PageBlockBlockQuote.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockBlockQuote(input);
break;
case PageBlockPullQuote.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockPullQuote(input);
break;
case PageBlockAnimation.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAnimation(input);
break;
case PageBlockAudio.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAudio(input);
break;
case PageBlockPhoto.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockPhoto(input);
break;
case PageBlockVideo.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockVideo(input);
break;
case PageBlockVoiceNote.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockVoiceNote(input);
break;
case PageBlockCover.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockCover(input);
break;
case PageBlockEmbedded.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockEmbedded(input);
break;
case PageBlockEmbeddedPost.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockEmbeddedPost(input);
break;
case PageBlockCollage.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockCollage(input);
break;
case PageBlockSlideshow.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockSlideshow(input);
break;
case PageBlockChatLink.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockChatLink(input);
break;
case PageBlockTable.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockTable(input);
break;
case PageBlockDetails.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockDetails(input);
break;
case PageBlockRelatedArticles.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockRelatedArticles(input);
break;
case PageBlockMap.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockMap(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
this.isOpen = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.header == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.header.serialize(output);
}
if (this.pageBlocks == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.pageBlocks.length);
for (int i = 0; i < this.pageBlocks.length; i++) {
this.pageBlocks[i].serialize(output);
}
}
output.writeBoolean(this.isOpen);
}
}
public static class PageBlockRelatedArticles extends PageBlock {
public RichText header;
public PageBlockRelatedArticle[] articles;
public static final int CONSTRUCTOR = -1807324374;
public PageBlockRelatedArticles() {}
public PageBlockRelatedArticles(RichText header, PageBlockRelatedArticle[] articles) {
this.header = header;
this.articles = articles;
}
public PageBlockRelatedArticles(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.header = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.header = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.header = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.header = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.header = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.header = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.header = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.header = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.header = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.header = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.header = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.header = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.header = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.header = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.header = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.header = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.header = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
this.articles = new PageBlockRelatedArticle[input.readInt()];
for (int i = 0; i < this.articles.length; i++) {
if (PageBlockRelatedArticle.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.articles[i] = new PageBlockRelatedArticle(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.header == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.header.serialize(output);
}
if (this.articles == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.articles.length);
for (int i = 0; i < this.articles.length; i++) {
this.articles[i].serialize(output);
}
}
}
}
public static class PageBlockMap extends PageBlock {
public Location location;
public int zoom;
public int width;
public int height;
public PageBlockCaption caption;
public static final int CONSTRUCTOR = 1510961171;
public PageBlockMap() {}
public PageBlockMap(Location location, int zoom, int width, int height, PageBlockCaption caption) {
this.location = location;
this.zoom = zoom;
this.width = width;
this.height = height;
this.caption = caption;
}
public PageBlockMap(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Location.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.location = new Location(input);
}
this.zoom = input.readInt();
this.width = input.readInt();
this.height = input.readInt();
if (input.readBoolean()) {
if (PageBlockCaption.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new PageBlockCaption(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.location == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.location.serialize(output);
}
output.writeInt(this.zoom);
output.writeInt(this.width);
output.writeInt(this.height);
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
}
}
public static class PageBlockCaption extends Object {
public RichText text;
public RichText credit;
public static final int CONSTRUCTOR = -1180064650;
public PageBlockCaption() {}
public PageBlockCaption(RichText text, RichText credit) {
this.text = text;
this.credit = credit;
}
public PageBlockCaption(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.text = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.text = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.text = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.text = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.text = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.text = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.text = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.text = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.text = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.text = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.text = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.text = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.text = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.text = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.text = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.text = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.text = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.credit = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.credit = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.credit = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.credit = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.credit = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.credit = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.credit = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.credit = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.credit = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.credit = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.credit = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.credit = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.credit = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.credit = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.credit = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.credit = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.credit = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
if (this.credit == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.credit.serialize(output);
}
}
}
public static class PageBlockHorizontalAlignmentLeft extends PageBlockHorizontalAlignment {
public static final int CONSTRUCTOR = 848701417;
public PageBlockHorizontalAlignmentLeft() {}
public PageBlockHorizontalAlignmentLeft(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PageBlockHorizontalAlignmentCenter extends PageBlockHorizontalAlignment {
public static final int CONSTRUCTOR = -1009203990;
public PageBlockHorizontalAlignmentCenter() {}
public PageBlockHorizontalAlignmentCenter(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PageBlockHorizontalAlignmentRight extends PageBlockHorizontalAlignment {
public static final int CONSTRUCTOR = 1371369214;
public PageBlockHorizontalAlignmentRight() {}
public PageBlockHorizontalAlignmentRight(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PageBlockListItem extends Object {
public String label;
public PageBlock[] pageBlocks;
public static final int CONSTRUCTOR = 323186259;
public PageBlockListItem() {}
public PageBlockListItem(String label, PageBlock[] pageBlocks) {
this.label = label;
this.pageBlocks = pageBlocks;
}
public PageBlockListItem(DataInput input) throws IOException {
if (input.readBoolean()) {
var labelTmp = new byte[input.readInt()];
input.readFully(labelTmp);
this.label = new String(labelTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
this.pageBlocks = new PageBlock[input.readInt()];
for (int i = 0; i < this.pageBlocks.length; i++) {
switch(input.readInt()) {
case PageBlockTitle.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockTitle(input);
break;
case PageBlockSubtitle.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockSubtitle(input);
break;
case PageBlockAuthorDate.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAuthorDate(input);
break;
case PageBlockHeader.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockHeader(input);
break;
case PageBlockSubheader.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockSubheader(input);
break;
case PageBlockKicker.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockKicker(input);
break;
case PageBlockParagraph.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockParagraph(input);
break;
case PageBlockPreformatted.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockPreformatted(input);
break;
case PageBlockFooter.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockFooter(input);
break;
case PageBlockDivider.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockDivider(input);
break;
case PageBlockAnchor.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAnchor(input);
break;
case PageBlockList.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockList(input);
break;
case PageBlockBlockQuote.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockBlockQuote(input);
break;
case PageBlockPullQuote.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockPullQuote(input);
break;
case PageBlockAnimation.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAnimation(input);
break;
case PageBlockAudio.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAudio(input);
break;
case PageBlockPhoto.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockPhoto(input);
break;
case PageBlockVideo.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockVideo(input);
break;
case PageBlockVoiceNote.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockVoiceNote(input);
break;
case PageBlockCover.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockCover(input);
break;
case PageBlockEmbedded.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockEmbedded(input);
break;
case PageBlockEmbeddedPost.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockEmbeddedPost(input);
break;
case PageBlockCollage.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockCollage(input);
break;
case PageBlockSlideshow.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockSlideshow(input);
break;
case PageBlockChatLink.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockChatLink(input);
break;
case PageBlockTable.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockTable(input);
break;
case PageBlockDetails.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockDetails(input);
break;
case PageBlockRelatedArticles.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockRelatedArticles(input);
break;
case PageBlockMap.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockMap(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.label == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var labelTmp = this.label.getBytes(StandardCharsets.UTF_8);
output.writeInt(labelTmp.length);
output.write(labelTmp);
}
if (this.pageBlocks == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.pageBlocks.length);
for (int i = 0; i < this.pageBlocks.length; i++) {
this.pageBlocks[i].serialize(output);
}
}
}
}
public static class PageBlockRelatedArticle extends Object {
public String url;
public String title;
public String description;
public Photo photo;
public String author;
public int publishDate;
public static final int CONSTRUCTOR = 481199251;
public PageBlockRelatedArticle() {}
public PageBlockRelatedArticle(String url, String title, String description, Photo photo, String author, int publishDate) {
this.url = url;
this.title = title;
this.description = description;
this.photo = photo;
this.author = author;
this.publishDate = publishDate;
}
public PageBlockRelatedArticle(DataInput input) throws IOException {
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var descriptionTmp = new byte[input.readInt()];
input.readFully(descriptionTmp);
this.description = new String(descriptionTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Photo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.photo = new Photo(input);
}
if (input.readBoolean()) {
var authorTmp = new byte[input.readInt()];
input.readFully(authorTmp);
this.author = new String(authorTmp, StandardCharsets.UTF_8);
}
this.publishDate = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.description == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var descriptionTmp = this.description.getBytes(StandardCharsets.UTF_8);
output.writeInt(descriptionTmp.length);
output.write(descriptionTmp);
}
if (this.photo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.photo.serialize(output);
}
if (this.author == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var authorTmp = this.author.getBytes(StandardCharsets.UTF_8);
output.writeInt(authorTmp.length);
output.write(authorTmp);
}
output.writeInt(this.publishDate);
}
}
public static class PageBlockTableCell extends Object {
public RichText text;
public boolean isHeader;
public int colspan;
public int rowspan;
public PageBlockHorizontalAlignment align;
public PageBlockVerticalAlignment valign;
public static final int CONSTRUCTOR = 1417658214;
public PageBlockTableCell() {}
public PageBlockTableCell(RichText text, boolean isHeader, int colspan, int rowspan, PageBlockHorizontalAlignment align, PageBlockVerticalAlignment valign) {
this.text = text;
this.isHeader = isHeader;
this.colspan = colspan;
this.rowspan = rowspan;
this.align = align;
this.valign = valign;
}
public PageBlockTableCell(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.text = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.text = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.text = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.text = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.text = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.text = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.text = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.text = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.text = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.text = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.text = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.text = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.text = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.text = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.text = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.text = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.text = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.isHeader = input.readBoolean();
this.colspan = input.readInt();
this.rowspan = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case PageBlockHorizontalAlignmentLeft.CONSTRUCTOR:
this.align = new PageBlockHorizontalAlignmentLeft(input);
break;
case PageBlockHorizontalAlignmentCenter.CONSTRUCTOR:
this.align = new PageBlockHorizontalAlignmentCenter(input);
break;
case PageBlockHorizontalAlignmentRight.CONSTRUCTOR:
this.align = new PageBlockHorizontalAlignmentRight(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case PageBlockVerticalAlignmentTop.CONSTRUCTOR:
this.valign = new PageBlockVerticalAlignmentTop(input);
break;
case PageBlockVerticalAlignmentMiddle.CONSTRUCTOR:
this.valign = new PageBlockVerticalAlignmentMiddle(input);
break;
case PageBlockVerticalAlignmentBottom.CONSTRUCTOR:
this.valign = new PageBlockVerticalAlignmentBottom(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
output.writeBoolean(this.isHeader);
output.writeInt(this.colspan);
output.writeInt(this.rowspan);
if (this.align == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.align.serialize(output);
}
if (this.valign == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.valign.serialize(output);
}
}
}
public static class PageBlockVerticalAlignmentTop extends PageBlockVerticalAlignment {
public static final int CONSTRUCTOR = 195500454;
public PageBlockVerticalAlignmentTop() {}
public PageBlockVerticalAlignmentTop(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PageBlockVerticalAlignmentMiddle extends PageBlockVerticalAlignment {
public static final int CONSTRUCTOR = -2123096587;
public PageBlockVerticalAlignmentMiddle() {}
public PageBlockVerticalAlignmentMiddle(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PageBlockVerticalAlignmentBottom extends PageBlockVerticalAlignment {
public static final int CONSTRUCTOR = 2092531158;
public PageBlockVerticalAlignmentBottom() {}
public PageBlockVerticalAlignmentBottom(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PassportAuthorizationForm extends Object {
public int id;
public PassportRequiredElement[] requiredElements;
public String privacyPolicyUrl;
public static final int CONSTRUCTOR = -1070673218;
public PassportAuthorizationForm() {}
public PassportAuthorizationForm(int id, PassportRequiredElement[] requiredElements, String privacyPolicyUrl) {
this.id = id;
this.requiredElements = requiredElements;
this.privacyPolicyUrl = privacyPolicyUrl;
}
public PassportAuthorizationForm(DataInput input) throws IOException {
this.id = input.readInt();
if (input.readBoolean()) {
this.requiredElements = new PassportRequiredElement[input.readInt()];
for (int i = 0; i < this.requiredElements.length; i++) {
if (PassportRequiredElement.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.requiredElements[i] = new PassportRequiredElement(input);
}
}
if (input.readBoolean()) {
var privacyPolicyUrlTmp = new byte[input.readInt()];
input.readFully(privacyPolicyUrlTmp);
this.privacyPolicyUrl = new String(privacyPolicyUrlTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.id);
if (this.requiredElements == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.requiredElements.length);
for (int i = 0; i < this.requiredElements.length; i++) {
this.requiredElements[i].serialize(output);
}
}
if (this.privacyPolicyUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var privacyPolicyUrlTmp = this.privacyPolicyUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(privacyPolicyUrlTmp.length);
output.write(privacyPolicyUrlTmp);
}
}
}
public static class PassportElementPersonalDetails extends PassportElement {
public PersonalDetails personalDetails;
public static final int CONSTRUCTOR = 1217724035;
public PassportElementPersonalDetails() {}
public PassportElementPersonalDetails(PersonalDetails personalDetails) {
this.personalDetails = personalDetails;
}
public PassportElementPersonalDetails(DataInput input) throws IOException {
if (input.readBoolean()) {
if (PersonalDetails.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.personalDetails = new PersonalDetails(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.personalDetails == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.personalDetails.serialize(output);
}
}
}
public static class PassportElementPassport extends PassportElement {
public IdentityDocument passport;
public static final int CONSTRUCTOR = -263985373;
public PassportElementPassport() {}
public PassportElementPassport(IdentityDocument passport) {
this.passport = passport;
}
public PassportElementPassport(DataInput input) throws IOException {
if (input.readBoolean()) {
if (IdentityDocument.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.passport = new IdentityDocument(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.passport == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.passport.serialize(output);
}
}
}
public static class PassportElementDriverLicense extends PassportElement {
public IdentityDocument driverLicense;
public static final int CONSTRUCTOR = 1643580589;
public PassportElementDriverLicense() {}
public PassportElementDriverLicense(IdentityDocument driverLicense) {
this.driverLicense = driverLicense;
}
public PassportElementDriverLicense(DataInput input) throws IOException {
if (input.readBoolean()) {
if (IdentityDocument.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.driverLicense = new IdentityDocument(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.driverLicense == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.driverLicense.serialize(output);
}
}
}
public static class PassportElementIdentityCard extends PassportElement {
public IdentityDocument identityCard;
public static final int CONSTRUCTOR = 2083775797;
public PassportElementIdentityCard() {}
public PassportElementIdentityCard(IdentityDocument identityCard) {
this.identityCard = identityCard;
}
public PassportElementIdentityCard(DataInput input) throws IOException {
if (input.readBoolean()) {
if (IdentityDocument.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.identityCard = new IdentityDocument(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.identityCard == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.identityCard.serialize(output);
}
}
}
public static class PassportElementInternalPassport extends PassportElement {
public IdentityDocument internalPassport;
public static final int CONSTRUCTOR = 36220295;
public PassportElementInternalPassport() {}
public PassportElementInternalPassport(IdentityDocument internalPassport) {
this.internalPassport = internalPassport;
}
public PassportElementInternalPassport(DataInput input) throws IOException {
if (input.readBoolean()) {
if (IdentityDocument.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.internalPassport = new IdentityDocument(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.internalPassport == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.internalPassport.serialize(output);
}
}
}
public static class PassportElementAddress extends PassportElement {
public Address address;
public static final int CONSTRUCTOR = -782625232;
public PassportElementAddress() {}
public PassportElementAddress(Address address) {
this.address = address;
}
public PassportElementAddress(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Address.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.address = new Address(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.address == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.address.serialize(output);
}
}
}
public static class PassportElementUtilityBill extends PassportElement {
public PersonalDocument utilityBill;
public static final int CONSTRUCTOR = -234611246;
public PassportElementUtilityBill() {}
public PassportElementUtilityBill(PersonalDocument utilityBill) {
this.utilityBill = utilityBill;
}
public PassportElementUtilityBill(DataInput input) throws IOException {
if (input.readBoolean()) {
if (PersonalDocument.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.utilityBill = new PersonalDocument(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.utilityBill == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.utilityBill.serialize(output);
}
}
}
public static class PassportElementBankStatement extends PassportElement {
public PersonalDocument bankStatement;
public static final int CONSTRUCTOR = -366464408;
public PassportElementBankStatement() {}
public PassportElementBankStatement(PersonalDocument bankStatement) {
this.bankStatement = bankStatement;
}
public PassportElementBankStatement(DataInput input) throws IOException {
if (input.readBoolean()) {
if (PersonalDocument.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.bankStatement = new PersonalDocument(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.bankStatement == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.bankStatement.serialize(output);
}
}
}
public static class PassportElementRentalAgreement extends PassportElement {
public PersonalDocument rentalAgreement;
public static final int CONSTRUCTOR = -290141400;
public PassportElementRentalAgreement() {}
public PassportElementRentalAgreement(PersonalDocument rentalAgreement) {
this.rentalAgreement = rentalAgreement;
}
public PassportElementRentalAgreement(DataInput input) throws IOException {
if (input.readBoolean()) {
if (PersonalDocument.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.rentalAgreement = new PersonalDocument(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.rentalAgreement == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.rentalAgreement.serialize(output);
}
}
}
public static class PassportElementPassportRegistration extends PassportElement {
public PersonalDocument passportRegistration;
public static final int CONSTRUCTOR = 618323071;
public PassportElementPassportRegistration() {}
public PassportElementPassportRegistration(PersonalDocument passportRegistration) {
this.passportRegistration = passportRegistration;
}
public PassportElementPassportRegistration(DataInput input) throws IOException {
if (input.readBoolean()) {
if (PersonalDocument.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.passportRegistration = new PersonalDocument(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.passportRegistration == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.passportRegistration.serialize(output);
}
}
}
public static class PassportElementTemporaryRegistration extends PassportElement {
public PersonalDocument temporaryRegistration;
public static final int CONSTRUCTOR = 1237626864;
public PassportElementTemporaryRegistration() {}
public PassportElementTemporaryRegistration(PersonalDocument temporaryRegistration) {
this.temporaryRegistration = temporaryRegistration;
}
public PassportElementTemporaryRegistration(DataInput input) throws IOException {
if (input.readBoolean()) {
if (PersonalDocument.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.temporaryRegistration = new PersonalDocument(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.temporaryRegistration == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.temporaryRegistration.serialize(output);
}
}
}
public static class PassportElementPhoneNumber extends PassportElement {
public String phoneNumber;
public static final int CONSTRUCTOR = -1320118375;
public PassportElementPhoneNumber() {}
public PassportElementPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public PassportElementPhoneNumber(DataInput input) throws IOException {
if (input.readBoolean()) {
var phoneNumberTmp = new byte[input.readInt()];
input.readFully(phoneNumberTmp);
this.phoneNumber = new String(phoneNumberTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.phoneNumber == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var phoneNumberTmp = this.phoneNumber.getBytes(StandardCharsets.UTF_8);
output.writeInt(phoneNumberTmp.length);
output.write(phoneNumberTmp);
}
}
}
public static class PassportElementEmailAddress extends PassportElement {
public String emailAddress;
public static final int CONSTRUCTOR = -1528129531;
public PassportElementEmailAddress() {}
public PassportElementEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
}
public PassportElementEmailAddress(DataInput input) throws IOException {
if (input.readBoolean()) {
var emailAddressTmp = new byte[input.readInt()];
input.readFully(emailAddressTmp);
this.emailAddress = new String(emailAddressTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.emailAddress == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var emailAddressTmp = this.emailAddress.getBytes(StandardCharsets.UTF_8);
output.writeInt(emailAddressTmp.length);
output.write(emailAddressTmp);
}
}
}
public static class PassportElementError extends Object {
public PassportElementType type;
public String message;
public PassportElementErrorSource source;
public static final int CONSTRUCTOR = -1861902395;
public PassportElementError() {}
public PassportElementError(PassportElementType type, String message, PassportElementErrorSource source) {
this.type = type;
this.message = message;
this.source = source;
}
public PassportElementError(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case PassportElementTypePersonalDetails.CONSTRUCTOR:
this.type = new PassportElementTypePersonalDetails(input);
break;
case PassportElementTypePassport.CONSTRUCTOR:
this.type = new PassportElementTypePassport(input);
break;
case PassportElementTypeDriverLicense.CONSTRUCTOR:
this.type = new PassportElementTypeDriverLicense(input);
break;
case PassportElementTypeIdentityCard.CONSTRUCTOR:
this.type = new PassportElementTypeIdentityCard(input);
break;
case PassportElementTypeInternalPassport.CONSTRUCTOR:
this.type = new PassportElementTypeInternalPassport(input);
break;
case PassportElementTypeAddress.CONSTRUCTOR:
this.type = new PassportElementTypeAddress(input);
break;
case PassportElementTypeUtilityBill.CONSTRUCTOR:
this.type = new PassportElementTypeUtilityBill(input);
break;
case PassportElementTypeBankStatement.CONSTRUCTOR:
this.type = new PassportElementTypeBankStatement(input);
break;
case PassportElementTypeRentalAgreement.CONSTRUCTOR:
this.type = new PassportElementTypeRentalAgreement(input);
break;
case PassportElementTypePassportRegistration.CONSTRUCTOR:
this.type = new PassportElementTypePassportRegistration(input);
break;
case PassportElementTypeTemporaryRegistration.CONSTRUCTOR:
this.type = new PassportElementTypeTemporaryRegistration(input);
break;
case PassportElementTypePhoneNumber.CONSTRUCTOR:
this.type = new PassportElementTypePhoneNumber(input);
break;
case PassportElementTypeEmailAddress.CONSTRUCTOR:
this.type = new PassportElementTypeEmailAddress(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
var messageTmp = new byte[input.readInt()];
input.readFully(messageTmp);
this.message = new String(messageTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case PassportElementErrorSourceUnspecified.CONSTRUCTOR:
this.source = new PassportElementErrorSourceUnspecified(input);
break;
case PassportElementErrorSourceDataField.CONSTRUCTOR:
this.source = new PassportElementErrorSourceDataField(input);
break;
case PassportElementErrorSourceFrontSide.CONSTRUCTOR:
this.source = new PassportElementErrorSourceFrontSide(input);
break;
case PassportElementErrorSourceReverseSide.CONSTRUCTOR:
this.source = new PassportElementErrorSourceReverseSide(input);
break;
case PassportElementErrorSourceSelfie.CONSTRUCTOR:
this.source = new PassportElementErrorSourceSelfie(input);
break;
case PassportElementErrorSourceTranslationFile.CONSTRUCTOR:
this.source = new PassportElementErrorSourceTranslationFile(input);
break;
case PassportElementErrorSourceTranslationFiles.CONSTRUCTOR:
this.source = new PassportElementErrorSourceTranslationFiles(input);
break;
case PassportElementErrorSourceFile.CONSTRUCTOR:
this.source = new PassportElementErrorSourceFile(input);
break;
case PassportElementErrorSourceFiles.CONSTRUCTOR:
this.source = new PassportElementErrorSourceFiles(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
if (this.message == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var messageTmp = this.message.getBytes(StandardCharsets.UTF_8);
output.writeInt(messageTmp.length);
output.write(messageTmp);
}
if (this.source == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.source.serialize(output);
}
}
}
public static class PassportElementErrorSourceUnspecified extends PassportElementErrorSource {
public static final int CONSTRUCTOR = -378320830;
public PassportElementErrorSourceUnspecified() {}
public PassportElementErrorSourceUnspecified(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PassportElementErrorSourceDataField extends PassportElementErrorSource {
public String fieldName;
public static final int CONSTRUCTOR = -308650776;
public PassportElementErrorSourceDataField() {}
public PassportElementErrorSourceDataField(String fieldName) {
this.fieldName = fieldName;
}
public PassportElementErrorSourceDataField(DataInput input) throws IOException {
if (input.readBoolean()) {
var fieldNameTmp = new byte[input.readInt()];
input.readFully(fieldNameTmp);
this.fieldName = new String(fieldNameTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.fieldName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var fieldNameTmp = this.fieldName.getBytes(StandardCharsets.UTF_8);
output.writeInt(fieldNameTmp.length);
output.write(fieldNameTmp);
}
}
}
public static class PassportElementErrorSourceFrontSide extends PassportElementErrorSource {
public static final int CONSTRUCTOR = 1895658292;
public PassportElementErrorSourceFrontSide() {}
public PassportElementErrorSourceFrontSide(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PassportElementErrorSourceReverseSide extends PassportElementErrorSource {
public static final int CONSTRUCTOR = 1918630391;
public PassportElementErrorSourceReverseSide() {}
public PassportElementErrorSourceReverseSide(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PassportElementErrorSourceSelfie extends PassportElementErrorSource {
public static final int CONSTRUCTOR = -797043672;
public PassportElementErrorSourceSelfie() {}
public PassportElementErrorSourceSelfie(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PassportElementErrorSourceTranslationFile extends PassportElementErrorSource {
public int fileIndex;
public static final int CONSTRUCTOR = -689621228;
public PassportElementErrorSourceTranslationFile() {}
public PassportElementErrorSourceTranslationFile(int fileIndex) {
this.fileIndex = fileIndex;
}
public PassportElementErrorSourceTranslationFile(DataInput input) throws IOException {
this.fileIndex = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.fileIndex);
}
}
public static class PassportElementErrorSourceTranslationFiles extends PassportElementErrorSource {
public static final int CONSTRUCTOR = 581280796;
public PassportElementErrorSourceTranslationFiles() {}
public PassportElementErrorSourceTranslationFiles(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PassportElementErrorSourceFile extends PassportElementErrorSource {
public int fileIndex;
public static final int CONSTRUCTOR = 2020358960;
public PassportElementErrorSourceFile() {}
public PassportElementErrorSourceFile(int fileIndex) {
this.fileIndex = fileIndex;
}
public PassportElementErrorSourceFile(DataInput input) throws IOException {
this.fileIndex = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.fileIndex);
}
}
public static class PassportElementErrorSourceFiles extends PassportElementErrorSource {
public static final int CONSTRUCTOR = 1894164178;
public PassportElementErrorSourceFiles() {}
public PassportElementErrorSourceFiles(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PassportElementTypePersonalDetails extends PassportElementType {
public static final int CONSTRUCTOR = -1032136365;
public PassportElementTypePersonalDetails() {}
public PassportElementTypePersonalDetails(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PassportElementTypePassport extends PassportElementType {
public static final int CONSTRUCTOR = -436360376;
public PassportElementTypePassport() {}
public PassportElementTypePassport(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PassportElementTypeDriverLicense extends PassportElementType {
public static final int CONSTRUCTOR = 1827298379;
public PassportElementTypeDriverLicense() {}
public PassportElementTypeDriverLicense(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PassportElementTypeIdentityCard extends PassportElementType {
public static final int CONSTRUCTOR = -502356132;
public PassportElementTypeIdentityCard() {}
public PassportElementTypeIdentityCard(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PassportElementTypeInternalPassport extends PassportElementType {
public static final int CONSTRUCTOR = -793781959;
public PassportElementTypeInternalPassport() {}
public PassportElementTypeInternalPassport(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PassportElementTypeAddress extends PassportElementType {
public static final int CONSTRUCTOR = 496327874;
public PassportElementTypeAddress() {}
public PassportElementTypeAddress(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PassportElementTypeUtilityBill extends PassportElementType {
public static final int CONSTRUCTOR = 627084906;
public PassportElementTypeUtilityBill() {}
public PassportElementTypeUtilityBill(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PassportElementTypeBankStatement extends PassportElementType {
public static final int CONSTRUCTOR = 574095667;
public PassportElementTypeBankStatement() {}
public PassportElementTypeBankStatement(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PassportElementTypeRentalAgreement extends PassportElementType {
public static final int CONSTRUCTOR = -2060583280;
public PassportElementTypeRentalAgreement() {}
public PassportElementTypeRentalAgreement(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PassportElementTypePassportRegistration extends PassportElementType {
public static final int CONSTRUCTOR = -159478209;
public PassportElementTypePassportRegistration() {}
public PassportElementTypePassportRegistration(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PassportElementTypeTemporaryRegistration extends PassportElementType {
public static final int CONSTRUCTOR = 1092498527;
public PassportElementTypeTemporaryRegistration() {}
public PassportElementTypeTemporaryRegistration(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PassportElementTypePhoneNumber extends PassportElementType {
public static final int CONSTRUCTOR = -995361172;
public PassportElementTypePhoneNumber() {}
public PassportElementTypePhoneNumber(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PassportElementTypeEmailAddress extends PassportElementType {
public static final int CONSTRUCTOR = -79321405;
public PassportElementTypeEmailAddress() {}
public PassportElementTypeEmailAddress(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PassportElements extends Object {
public PassportElement[] elements;
public static final int CONSTRUCTOR = 1264617556;
public PassportElements() {}
public PassportElements(PassportElement[] elements) {
this.elements = elements;
}
public PassportElements(DataInput input) throws IOException {
if (input.readBoolean()) {
this.elements = new PassportElement[input.readInt()];
for (int i = 0; i < this.elements.length; i++) {
switch(input.readInt()) {
case PassportElementPersonalDetails.CONSTRUCTOR:
this.elements[i] = new PassportElementPersonalDetails(input);
break;
case PassportElementPassport.CONSTRUCTOR:
this.elements[i] = new PassportElementPassport(input);
break;
case PassportElementDriverLicense.CONSTRUCTOR:
this.elements[i] = new PassportElementDriverLicense(input);
break;
case PassportElementIdentityCard.CONSTRUCTOR:
this.elements[i] = new PassportElementIdentityCard(input);
break;
case PassportElementInternalPassport.CONSTRUCTOR:
this.elements[i] = new PassportElementInternalPassport(input);
break;
case PassportElementAddress.CONSTRUCTOR:
this.elements[i] = new PassportElementAddress(input);
break;
case PassportElementUtilityBill.CONSTRUCTOR:
this.elements[i] = new PassportElementUtilityBill(input);
break;
case PassportElementBankStatement.CONSTRUCTOR:
this.elements[i] = new PassportElementBankStatement(input);
break;
case PassportElementRentalAgreement.CONSTRUCTOR:
this.elements[i] = new PassportElementRentalAgreement(input);
break;
case PassportElementPassportRegistration.CONSTRUCTOR:
this.elements[i] = new PassportElementPassportRegistration(input);
break;
case PassportElementTemporaryRegistration.CONSTRUCTOR:
this.elements[i] = new PassportElementTemporaryRegistration(input);
break;
case PassportElementPhoneNumber.CONSTRUCTOR:
this.elements[i] = new PassportElementPhoneNumber(input);
break;
case PassportElementEmailAddress.CONSTRUCTOR:
this.elements[i] = new PassportElementEmailAddress(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.elements == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.elements.length);
for (int i = 0; i < this.elements.length; i++) {
this.elements[i].serialize(output);
}
}
}
}
public static class PassportElementsWithErrors extends Object {
public PassportElement[] elements;
public PassportElementError[] errors;
public static final int CONSTRUCTOR = 1308923044;
public PassportElementsWithErrors() {}
public PassportElementsWithErrors(PassportElement[] elements, PassportElementError[] errors) {
this.elements = elements;
this.errors = errors;
}
public PassportElementsWithErrors(DataInput input) throws IOException {
if (input.readBoolean()) {
this.elements = new PassportElement[input.readInt()];
for (int i = 0; i < this.elements.length; i++) {
switch(input.readInt()) {
case PassportElementPersonalDetails.CONSTRUCTOR:
this.elements[i] = new PassportElementPersonalDetails(input);
break;
case PassportElementPassport.CONSTRUCTOR:
this.elements[i] = new PassportElementPassport(input);
break;
case PassportElementDriverLicense.CONSTRUCTOR:
this.elements[i] = new PassportElementDriverLicense(input);
break;
case PassportElementIdentityCard.CONSTRUCTOR:
this.elements[i] = new PassportElementIdentityCard(input);
break;
case PassportElementInternalPassport.CONSTRUCTOR:
this.elements[i] = new PassportElementInternalPassport(input);
break;
case PassportElementAddress.CONSTRUCTOR:
this.elements[i] = new PassportElementAddress(input);
break;
case PassportElementUtilityBill.CONSTRUCTOR:
this.elements[i] = new PassportElementUtilityBill(input);
break;
case PassportElementBankStatement.CONSTRUCTOR:
this.elements[i] = new PassportElementBankStatement(input);
break;
case PassportElementRentalAgreement.CONSTRUCTOR:
this.elements[i] = new PassportElementRentalAgreement(input);
break;
case PassportElementPassportRegistration.CONSTRUCTOR:
this.elements[i] = new PassportElementPassportRegistration(input);
break;
case PassportElementTemporaryRegistration.CONSTRUCTOR:
this.elements[i] = new PassportElementTemporaryRegistration(input);
break;
case PassportElementPhoneNumber.CONSTRUCTOR:
this.elements[i] = new PassportElementPhoneNumber(input);
break;
case PassportElementEmailAddress.CONSTRUCTOR:
this.elements[i] = new PassportElementEmailAddress(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
if (input.readBoolean()) {
this.errors = new PassportElementError[input.readInt()];
for (int i = 0; i < this.errors.length; i++) {
if (PassportElementError.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.errors[i] = new PassportElementError(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.elements == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.elements.length);
for (int i = 0; i < this.elements.length; i++) {
this.elements[i].serialize(output);
}
}
if (this.errors == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.errors.length);
for (int i = 0; i < this.errors.length; i++) {
this.errors[i].serialize(output);
}
}
}
}
public static class PassportRequiredElement extends Object {
public PassportSuitableElement[] suitableElements;
public static final int CONSTRUCTOR = -1983641651;
public PassportRequiredElement() {}
public PassportRequiredElement(PassportSuitableElement[] suitableElements) {
this.suitableElements = suitableElements;
}
public PassportRequiredElement(DataInput input) throws IOException {
if (input.readBoolean()) {
this.suitableElements = new PassportSuitableElement[input.readInt()];
for (int i = 0; i < this.suitableElements.length; i++) {
if (PassportSuitableElement.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.suitableElements[i] = new PassportSuitableElement(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.suitableElements == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.suitableElements.length);
for (int i = 0; i < this.suitableElements.length; i++) {
this.suitableElements[i].serialize(output);
}
}
}
}
public static class PassportSuitableElement extends Object {
public PassportElementType type;
public boolean isSelfieRequired;
public boolean isTranslationRequired;
public boolean isNativeNameRequired;
public static final int CONSTRUCTOR = -789019876;
public PassportSuitableElement() {}
public PassportSuitableElement(PassportElementType type, boolean isSelfieRequired, boolean isTranslationRequired, boolean isNativeNameRequired) {
this.type = type;
this.isSelfieRequired = isSelfieRequired;
this.isTranslationRequired = isTranslationRequired;
this.isNativeNameRequired = isNativeNameRequired;
}
public PassportSuitableElement(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case PassportElementTypePersonalDetails.CONSTRUCTOR:
this.type = new PassportElementTypePersonalDetails(input);
break;
case PassportElementTypePassport.CONSTRUCTOR:
this.type = new PassportElementTypePassport(input);
break;
case PassportElementTypeDriverLicense.CONSTRUCTOR:
this.type = new PassportElementTypeDriverLicense(input);
break;
case PassportElementTypeIdentityCard.CONSTRUCTOR:
this.type = new PassportElementTypeIdentityCard(input);
break;
case PassportElementTypeInternalPassport.CONSTRUCTOR:
this.type = new PassportElementTypeInternalPassport(input);
break;
case PassportElementTypeAddress.CONSTRUCTOR:
this.type = new PassportElementTypeAddress(input);
break;
case PassportElementTypeUtilityBill.CONSTRUCTOR:
this.type = new PassportElementTypeUtilityBill(input);
break;
case PassportElementTypeBankStatement.CONSTRUCTOR:
this.type = new PassportElementTypeBankStatement(input);
break;
case PassportElementTypeRentalAgreement.CONSTRUCTOR:
this.type = new PassportElementTypeRentalAgreement(input);
break;
case PassportElementTypePassportRegistration.CONSTRUCTOR:
this.type = new PassportElementTypePassportRegistration(input);
break;
case PassportElementTypeTemporaryRegistration.CONSTRUCTOR:
this.type = new PassportElementTypeTemporaryRegistration(input);
break;
case PassportElementTypePhoneNumber.CONSTRUCTOR:
this.type = new PassportElementTypePhoneNumber(input);
break;
case PassportElementTypeEmailAddress.CONSTRUCTOR:
this.type = new PassportElementTypeEmailAddress(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.isSelfieRequired = input.readBoolean();
this.isTranslationRequired = input.readBoolean();
this.isNativeNameRequired = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
output.writeBoolean(this.isSelfieRequired);
output.writeBoolean(this.isTranslationRequired);
output.writeBoolean(this.isNativeNameRequired);
}
}
public static class PasswordState extends Object {
public boolean hasPassword;
public String passwordHint;
public boolean hasRecoveryEmailAddress;
public boolean hasPassportData;
public EmailAddressAuthenticationCodeInfo recoveryEmailAddressCodeInfo;
public static final int CONSTRUCTOR = -1154797731;
public PasswordState() {}
public PasswordState(boolean hasPassword, String passwordHint, boolean hasRecoveryEmailAddress, boolean hasPassportData, EmailAddressAuthenticationCodeInfo recoveryEmailAddressCodeInfo) {
this.hasPassword = hasPassword;
this.passwordHint = passwordHint;
this.hasRecoveryEmailAddress = hasRecoveryEmailAddress;
this.hasPassportData = hasPassportData;
this.recoveryEmailAddressCodeInfo = recoveryEmailAddressCodeInfo;
}
public PasswordState(DataInput input) throws IOException {
this.hasPassword = input.readBoolean();
if (input.readBoolean()) {
var passwordHintTmp = new byte[input.readInt()];
input.readFully(passwordHintTmp);
this.passwordHint = new String(passwordHintTmp, StandardCharsets.UTF_8);
}
this.hasRecoveryEmailAddress = input.readBoolean();
this.hasPassportData = input.readBoolean();
if (input.readBoolean()) {
if (EmailAddressAuthenticationCodeInfo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.recoveryEmailAddressCodeInfo = new EmailAddressAuthenticationCodeInfo(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.hasPassword);
if (this.passwordHint == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var passwordHintTmp = this.passwordHint.getBytes(StandardCharsets.UTF_8);
output.writeInt(passwordHintTmp.length);
output.write(passwordHintTmp);
}
output.writeBoolean(this.hasRecoveryEmailAddress);
output.writeBoolean(this.hasPassportData);
if (this.recoveryEmailAddressCodeInfo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.recoveryEmailAddressCodeInfo.serialize(output);
}
}
}
public static class PaymentForm extends Object {
public Invoice invoice;
public String url;
public PaymentsProviderStripe paymentsProvider;
public OrderInfo savedOrderInfo;
public SavedCredentials savedCredentials;
public boolean canSaveCredentials;
public boolean needPassword;
public static final int CONSTRUCTOR = -200418230;
public PaymentForm() {}
public PaymentForm(Invoice invoice, String url, PaymentsProviderStripe paymentsProvider, OrderInfo savedOrderInfo, SavedCredentials savedCredentials, boolean canSaveCredentials, boolean needPassword) {
this.invoice = invoice;
this.url = url;
this.paymentsProvider = paymentsProvider;
this.savedOrderInfo = savedOrderInfo;
this.savedCredentials = savedCredentials;
this.canSaveCredentials = canSaveCredentials;
this.needPassword = needPassword;
}
public PaymentForm(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Invoice.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.invoice = new Invoice(input);
}
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (PaymentsProviderStripe.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.paymentsProvider = new PaymentsProviderStripe(input);
}
if (input.readBoolean()) {
if (OrderInfo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.savedOrderInfo = new OrderInfo(input);
}
if (input.readBoolean()) {
if (SavedCredentials.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.savedCredentials = new SavedCredentials(input);
}
this.canSaveCredentials = input.readBoolean();
this.needPassword = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.invoice == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.invoice.serialize(output);
}
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
if (this.paymentsProvider == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.paymentsProvider.serialize(output);
}
if (this.savedOrderInfo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.savedOrderInfo.serialize(output);
}
if (this.savedCredentials == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.savedCredentials.serialize(output);
}
output.writeBoolean(this.canSaveCredentials);
output.writeBoolean(this.needPassword);
}
}
public static class PaymentReceipt extends Object {
public int date;
public int paymentsProviderUserId;
public Invoice invoice;
public OrderInfo orderInfo;
public ShippingOption shippingOption;
public String credentialsTitle;
public static final int CONSTRUCTOR = -1171223545;
public PaymentReceipt() {}
public PaymentReceipt(int date, int paymentsProviderUserId, Invoice invoice, OrderInfo orderInfo, ShippingOption shippingOption, String credentialsTitle) {
this.date = date;
this.paymentsProviderUserId = paymentsProviderUserId;
this.invoice = invoice;
this.orderInfo = orderInfo;
this.shippingOption = shippingOption;
this.credentialsTitle = credentialsTitle;
}
public PaymentReceipt(DataInput input) throws IOException {
this.date = input.readInt();
this.paymentsProviderUserId = input.readInt();
if (input.readBoolean()) {
if (Invoice.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.invoice = new Invoice(input);
}
if (input.readBoolean()) {
if (OrderInfo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.orderInfo = new OrderInfo(input);
}
if (input.readBoolean()) {
if (ShippingOption.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.shippingOption = new ShippingOption(input);
}
if (input.readBoolean()) {
var credentialsTitleTmp = new byte[input.readInt()];
input.readFully(credentialsTitleTmp);
this.credentialsTitle = new String(credentialsTitleTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.date);
output.writeInt(this.paymentsProviderUserId);
if (this.invoice == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.invoice.serialize(output);
}
if (this.orderInfo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.orderInfo.serialize(output);
}
if (this.shippingOption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.shippingOption.serialize(output);
}
if (this.credentialsTitle == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var credentialsTitleTmp = this.credentialsTitle.getBytes(StandardCharsets.UTF_8);
output.writeInt(credentialsTitleTmp.length);
output.write(credentialsTitleTmp);
}
}
}
public static class PaymentResult extends Object {
public boolean success;
public String verificationUrl;
public static final int CONSTRUCTOR = -804263843;
public PaymentResult() {}
public PaymentResult(boolean success, String verificationUrl) {
this.success = success;
this.verificationUrl = verificationUrl;
}
public PaymentResult(DataInput input) throws IOException {
this.success = input.readBoolean();
if (input.readBoolean()) {
var verificationUrlTmp = new byte[input.readInt()];
input.readFully(verificationUrlTmp);
this.verificationUrl = new String(verificationUrlTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.success);
if (this.verificationUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var verificationUrlTmp = this.verificationUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(verificationUrlTmp.length);
output.write(verificationUrlTmp);
}
}
}
public static class PaymentsProviderStripe extends Object {
public String publishableKey;
public boolean needCountry;
public boolean needPostalCode;
public boolean needCardholderName;
public static final int CONSTRUCTOR = 1090791032;
public PaymentsProviderStripe() {}
public PaymentsProviderStripe(String publishableKey, boolean needCountry, boolean needPostalCode, boolean needCardholderName) {
this.publishableKey = publishableKey;
this.needCountry = needCountry;
this.needPostalCode = needPostalCode;
this.needCardholderName = needCardholderName;
}
public PaymentsProviderStripe(DataInput input) throws IOException {
if (input.readBoolean()) {
var publishableKeyTmp = new byte[input.readInt()];
input.readFully(publishableKeyTmp);
this.publishableKey = new String(publishableKeyTmp, StandardCharsets.UTF_8);
}
this.needCountry = input.readBoolean();
this.needPostalCode = input.readBoolean();
this.needCardholderName = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.publishableKey == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var publishableKeyTmp = this.publishableKey.getBytes(StandardCharsets.UTF_8);
output.writeInt(publishableKeyTmp.length);
output.write(publishableKeyTmp);
}
output.writeBoolean(this.needCountry);
output.writeBoolean(this.needPostalCode);
output.writeBoolean(this.needCardholderName);
}
}
public static class PersonalDetails extends Object {
public String firstName;
public String middleName;
public String lastName;
public String nativeFirstName;
public String nativeMiddleName;
public String nativeLastName;
public Date birthdate;
public String gender;
public String countryCode;
public String residenceCountryCode;
public static final int CONSTRUCTOR = -1061656137;
public PersonalDetails() {}
public PersonalDetails(String firstName, String middleName, String lastName, String nativeFirstName, String nativeMiddleName, String nativeLastName, Date birthdate, String gender, String countryCode, String residenceCountryCode) {
this.firstName = firstName;
this.middleName = middleName;
this.lastName = lastName;
this.nativeFirstName = nativeFirstName;
this.nativeMiddleName = nativeMiddleName;
this.nativeLastName = nativeLastName;
this.birthdate = birthdate;
this.gender = gender;
this.countryCode = countryCode;
this.residenceCountryCode = residenceCountryCode;
}
public PersonalDetails(DataInput input) throws IOException {
if (input.readBoolean()) {
var firstNameTmp = new byte[input.readInt()];
input.readFully(firstNameTmp);
this.firstName = new String(firstNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var middleNameTmp = new byte[input.readInt()];
input.readFully(middleNameTmp);
this.middleName = new String(middleNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var lastNameTmp = new byte[input.readInt()];
input.readFully(lastNameTmp);
this.lastName = new String(lastNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var nativeFirstNameTmp = new byte[input.readInt()];
input.readFully(nativeFirstNameTmp);
this.nativeFirstName = new String(nativeFirstNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var nativeMiddleNameTmp = new byte[input.readInt()];
input.readFully(nativeMiddleNameTmp);
this.nativeMiddleName = new String(nativeMiddleNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var nativeLastNameTmp = new byte[input.readInt()];
input.readFully(nativeLastNameTmp);
this.nativeLastName = new String(nativeLastNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Date.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.birthdate = new Date(input);
}
if (input.readBoolean()) {
var genderTmp = new byte[input.readInt()];
input.readFully(genderTmp);
this.gender = new String(genderTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var countryCodeTmp = new byte[input.readInt()];
input.readFully(countryCodeTmp);
this.countryCode = new String(countryCodeTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var residenceCountryCodeTmp = new byte[input.readInt()];
input.readFully(residenceCountryCodeTmp);
this.residenceCountryCode = new String(residenceCountryCodeTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.firstName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var firstNameTmp = this.firstName.getBytes(StandardCharsets.UTF_8);
output.writeInt(firstNameTmp.length);
output.write(firstNameTmp);
}
if (this.middleName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var middleNameTmp = this.middleName.getBytes(StandardCharsets.UTF_8);
output.writeInt(middleNameTmp.length);
output.write(middleNameTmp);
}
if (this.lastName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var lastNameTmp = this.lastName.getBytes(StandardCharsets.UTF_8);
output.writeInt(lastNameTmp.length);
output.write(lastNameTmp);
}
if (this.nativeFirstName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nativeFirstNameTmp = this.nativeFirstName.getBytes(StandardCharsets.UTF_8);
output.writeInt(nativeFirstNameTmp.length);
output.write(nativeFirstNameTmp);
}
if (this.nativeMiddleName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nativeMiddleNameTmp = this.nativeMiddleName.getBytes(StandardCharsets.UTF_8);
output.writeInt(nativeMiddleNameTmp.length);
output.write(nativeMiddleNameTmp);
}
if (this.nativeLastName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nativeLastNameTmp = this.nativeLastName.getBytes(StandardCharsets.UTF_8);
output.writeInt(nativeLastNameTmp.length);
output.write(nativeLastNameTmp);
}
if (this.birthdate == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.birthdate.serialize(output);
}
if (this.gender == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var genderTmp = this.gender.getBytes(StandardCharsets.UTF_8);
output.writeInt(genderTmp.length);
output.write(genderTmp);
}
if (this.countryCode == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var countryCodeTmp = this.countryCode.getBytes(StandardCharsets.UTF_8);
output.writeInt(countryCodeTmp.length);
output.write(countryCodeTmp);
}
if (this.residenceCountryCode == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var residenceCountryCodeTmp = this.residenceCountryCode.getBytes(StandardCharsets.UTF_8);
output.writeInt(residenceCountryCodeTmp.length);
output.write(residenceCountryCodeTmp);
}
}
}
public static class PersonalDocument extends Object {
public DatedFile[] files;
public DatedFile[] translation;
public static final int CONSTRUCTOR = -1011634661;
public PersonalDocument() {}
public PersonalDocument(DatedFile[] files, DatedFile[] translation) {
this.files = files;
this.translation = translation;
}
public PersonalDocument(DataInput input) throws IOException {
if (input.readBoolean()) {
this.files = new DatedFile[input.readInt()];
for (int i = 0; i < this.files.length; i++) {
if (DatedFile.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.files[i] = new DatedFile(input);
}
}
if (input.readBoolean()) {
this.translation = new DatedFile[input.readInt()];
for (int i = 0; i < this.translation.length; i++) {
if (DatedFile.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.translation[i] = new DatedFile(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.files == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.files.length);
for (int i = 0; i < this.files.length; i++) {
this.files[i].serialize(output);
}
}
if (this.translation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.translation.length);
for (int i = 0; i < this.translation.length; i++) {
this.translation[i].serialize(output);
}
}
}
}
public static class PhoneNumberAuthenticationSettings extends Object {
public boolean allowFlashCall;
public boolean isCurrentPhoneNumber;
public boolean allowSmsRetrieverApi;
public static final int CONSTRUCTOR = -859198743;
public PhoneNumberAuthenticationSettings() {}
public PhoneNumberAuthenticationSettings(boolean allowFlashCall, boolean isCurrentPhoneNumber, boolean allowSmsRetrieverApi) {
this.allowFlashCall = allowFlashCall;
this.isCurrentPhoneNumber = isCurrentPhoneNumber;
this.allowSmsRetrieverApi = allowSmsRetrieverApi;
}
public PhoneNumberAuthenticationSettings(DataInput input) throws IOException {
this.allowFlashCall = input.readBoolean();
this.isCurrentPhoneNumber = input.readBoolean();
this.allowSmsRetrieverApi = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.allowFlashCall);
output.writeBoolean(this.isCurrentPhoneNumber);
output.writeBoolean(this.allowSmsRetrieverApi);
}
}
public static class Photo extends Object {
public boolean hasStickers;
public Minithumbnail minithumbnail;
public PhotoSize[] sizes;
public static final int CONSTRUCTOR = -2022871583;
public Photo() {}
public Photo(boolean hasStickers, Minithumbnail minithumbnail, PhotoSize[] sizes) {
this.hasStickers = hasStickers;
this.minithumbnail = minithumbnail;
this.sizes = sizes;
}
public Photo(DataInput input) throws IOException {
this.hasStickers = input.readBoolean();
if (input.readBoolean()) {
if (Minithumbnail.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.minithumbnail = new Minithumbnail(input);
}
if (input.readBoolean()) {
this.sizes = new PhotoSize[input.readInt()];
for (int i = 0; i < this.sizes.length; i++) {
if (PhotoSize.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.sizes[i] = new PhotoSize(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.hasStickers);
if (this.minithumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.minithumbnail.serialize(output);
}
if (this.sizes == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.sizes.length);
for (int i = 0; i < this.sizes.length; i++) {
this.sizes[i].serialize(output);
}
}
}
}
public static class PhotoSize extends Object {
public String type;
public File photo;
public int width;
public int height;
public static final int CONSTRUCTOR = 421980227;
public PhotoSize() {}
public PhotoSize(String type, File photo, int width, int height) {
this.type = type;
this.photo = photo;
this.width = width;
this.height = height;
}
public PhotoSize(DataInput input) throws IOException {
if (input.readBoolean()) {
var typeTmp = new byte[input.readInt()];
input.readFully(typeTmp);
this.type = new String(typeTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (File.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.photo = new File(input);
}
this.width = input.readInt();
this.height = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var typeTmp = this.type.getBytes(StandardCharsets.UTF_8);
output.writeInt(typeTmp.length);
output.write(typeTmp);
}
if (this.photo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.photo.serialize(output);
}
output.writeInt(this.width);
output.writeInt(this.height);
}
}
public static class Poll extends Object {
public long id;
public String question;
public PollOption[] options;
public int totalVoterCount;
public int[] recentVoterUserIds;
public boolean isAnonymous;
public PollType type;
public int openPeriod;
public int closeDate;
public boolean isClosed;
public static final int CONSTRUCTOR = 163256789;
public Poll() {}
public Poll(long id, String question, PollOption[] options, int totalVoterCount, int[] recentVoterUserIds, boolean isAnonymous, PollType type, int openPeriod, int closeDate, boolean isClosed) {
this.id = id;
this.question = question;
this.options = options;
this.totalVoterCount = totalVoterCount;
this.recentVoterUserIds = recentVoterUserIds;
this.isAnonymous = isAnonymous;
this.type = type;
this.openPeriod = openPeriod;
this.closeDate = closeDate;
this.isClosed = isClosed;
}
public Poll(DataInput input) throws IOException {
this.id = input.readLong();
if (input.readBoolean()) {
var questionTmp = new byte[input.readInt()];
input.readFully(questionTmp);
this.question = new String(questionTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
this.options = new PollOption[input.readInt()];
for (int i = 0; i < this.options.length; i++) {
if (PollOption.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.options[i] = new PollOption(input);
}
}
this.totalVoterCount = input.readInt();
if (input.readBoolean()) {
this.recentVoterUserIds = new int[input.readInt()];
for (int i = 0; i < this.recentVoterUserIds.length; i++) {
this.recentVoterUserIds[i] = input.readInt();
}
}
this.isAnonymous = input.readBoolean();
if (input.readBoolean()) {
switch(input.readInt()) {
case PollTypeRegular.CONSTRUCTOR:
this.type = new PollTypeRegular(input);
break;
case PollTypeQuiz.CONSTRUCTOR:
this.type = new PollTypeQuiz(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.openPeriod = input.readInt();
this.closeDate = input.readInt();
this.isClosed = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.id);
if (this.question == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var questionTmp = this.question.getBytes(StandardCharsets.UTF_8);
output.writeInt(questionTmp.length);
output.write(questionTmp);
}
if (this.options == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.options.length);
for (int i = 0; i < this.options.length; i++) {
this.options[i].serialize(output);
}
}
output.writeInt(this.totalVoterCount);
if (this.recentVoterUserIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.recentVoterUserIds.length);
for (int i = 0; i < this.recentVoterUserIds.length; i++) {
output.writeInt(this.recentVoterUserIds[i]);
}
}
output.writeBoolean(this.isAnonymous);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
output.writeInt(this.openPeriod);
output.writeInt(this.closeDate);
output.writeBoolean(this.isClosed);
}
}
public static class PollOption extends Object {
public String text;
public int voterCount;
public int votePercentage;
public boolean isChosen;
public boolean isBeingChosen;
public static final int CONSTRUCTOR = 1473893797;
public PollOption() {}
public PollOption(String text, int voterCount, int votePercentage, boolean isChosen, boolean isBeingChosen) {
this.text = text;
this.voterCount = voterCount;
this.votePercentage = votePercentage;
this.isChosen = isChosen;
this.isBeingChosen = isBeingChosen;
}
public PollOption(DataInput input) throws IOException {
if (input.readBoolean()) {
var textTmp = new byte[input.readInt()];
input.readFully(textTmp);
this.text = new String(textTmp, StandardCharsets.UTF_8);
}
this.voterCount = input.readInt();
this.votePercentage = input.readInt();
this.isChosen = input.readBoolean();
this.isBeingChosen = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var textTmp = this.text.getBytes(StandardCharsets.UTF_8);
output.writeInt(textTmp.length);
output.write(textTmp);
}
output.writeInt(this.voterCount);
output.writeInt(this.votePercentage);
output.writeBoolean(this.isChosen);
output.writeBoolean(this.isBeingChosen);
}
}
public static class PollTypeRegular extends PollType {
public boolean allowMultipleAnswers;
public static final int CONSTRUCTOR = 641265698;
public PollTypeRegular() {}
public PollTypeRegular(boolean allowMultipleAnswers) {
this.allowMultipleAnswers = allowMultipleAnswers;
}
public PollTypeRegular(DataInput input) throws IOException {
this.allowMultipleAnswers = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.allowMultipleAnswers);
}
}
public static class PollTypeQuiz extends PollType {
public int correctOptionId;
public FormattedText explanation;
public static final int CONSTRUCTOR = 657013913;
public PollTypeQuiz() {}
public PollTypeQuiz(int correctOptionId, FormattedText explanation) {
this.correctOptionId = correctOptionId;
this.explanation = explanation;
}
public PollTypeQuiz(DataInput input) throws IOException {
this.correctOptionId = input.readInt();
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.explanation = new FormattedText(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.correctOptionId);
if (this.explanation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.explanation.serialize(output);
}
}
}
public static class ProfilePhoto extends Object {
public long id;
public File small;
public File big;
public static final int CONSTRUCTOR = 978085937;
public ProfilePhoto() {}
public ProfilePhoto(long id, File small, File big) {
this.id = id;
this.small = small;
this.big = big;
}
public ProfilePhoto(DataInput input) throws IOException {
this.id = input.readLong();
if (input.readBoolean()) {
if (File.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.small = new File(input);
}
if (input.readBoolean()) {
if (File.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.big = new File(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.id);
if (this.small == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.small.serialize(output);
}
if (this.big == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.big.serialize(output);
}
}
}
public static class Proxies extends Object {
public Proxy[] proxies;
public static final int CONSTRUCTOR = 1200447205;
public Proxies() {}
public Proxies(Proxy[] proxies) {
this.proxies = proxies;
}
public Proxies(DataInput input) throws IOException {
if (input.readBoolean()) {
this.proxies = new Proxy[input.readInt()];
for (int i = 0; i < this.proxies.length; i++) {
if (Proxy.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.proxies[i] = new Proxy(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.proxies == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.proxies.length);
for (int i = 0; i < this.proxies.length; i++) {
this.proxies[i].serialize(output);
}
}
}
}
public static class Proxy extends Object {
public int id;
public String server;
public int port;
public int lastUsedDate;
public boolean isEnabled;
public ProxyType type;
public static final int CONSTRUCTOR = 196049779;
public Proxy() {}
public Proxy(int id, String server, int port, int lastUsedDate, boolean isEnabled, ProxyType type) {
this.id = id;
this.server = server;
this.port = port;
this.lastUsedDate = lastUsedDate;
this.isEnabled = isEnabled;
this.type = type;
}
public Proxy(DataInput input) throws IOException {
this.id = input.readInt();
if (input.readBoolean()) {
var serverTmp = new byte[input.readInt()];
input.readFully(serverTmp);
this.server = new String(serverTmp, StandardCharsets.UTF_8);
}
this.port = input.readInt();
this.lastUsedDate = input.readInt();
this.isEnabled = input.readBoolean();
if (input.readBoolean()) {
switch(input.readInt()) {
case ProxyTypeSocks5.CONSTRUCTOR:
this.type = new ProxyTypeSocks5(input);
break;
case ProxyTypeHttp.CONSTRUCTOR:
this.type = new ProxyTypeHttp(input);
break;
case ProxyTypeMtproto.CONSTRUCTOR:
this.type = new ProxyTypeMtproto(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.id);
if (this.server == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var serverTmp = this.server.getBytes(StandardCharsets.UTF_8);
output.writeInt(serverTmp.length);
output.write(serverTmp);
}
output.writeInt(this.port);
output.writeInt(this.lastUsedDate);
output.writeBoolean(this.isEnabled);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
}
}
public static class ProxyTypeSocks5 extends ProxyType {
public String username;
public String password;
public static final int CONSTRUCTOR = -890027341;
public ProxyTypeSocks5() {}
public ProxyTypeSocks5(String username, String password) {
this.username = username;
this.password = password;
}
public ProxyTypeSocks5(DataInput input) throws IOException {
if (input.readBoolean()) {
var usernameTmp = new byte[input.readInt()];
input.readFully(usernameTmp);
this.username = new String(usernameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var passwordTmp = new byte[input.readInt()];
input.readFully(passwordTmp);
this.password = new String(passwordTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.username == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var usernameTmp = this.username.getBytes(StandardCharsets.UTF_8);
output.writeInt(usernameTmp.length);
output.write(usernameTmp);
}
if (this.password == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var passwordTmp = this.password.getBytes(StandardCharsets.UTF_8);
output.writeInt(passwordTmp.length);
output.write(passwordTmp);
}
}
}
public static class ProxyTypeHttp extends ProxyType {
public String username;
public String password;
public boolean httpOnly;
public static final int CONSTRUCTOR = -1547188361;
public ProxyTypeHttp() {}
public ProxyTypeHttp(String username, String password, boolean httpOnly) {
this.username = username;
this.password = password;
this.httpOnly = httpOnly;
}
public ProxyTypeHttp(DataInput input) throws IOException {
if (input.readBoolean()) {
var usernameTmp = new byte[input.readInt()];
input.readFully(usernameTmp);
this.username = new String(usernameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var passwordTmp = new byte[input.readInt()];
input.readFully(passwordTmp);
this.password = new String(passwordTmp, StandardCharsets.UTF_8);
}
this.httpOnly = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.username == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var usernameTmp = this.username.getBytes(StandardCharsets.UTF_8);
output.writeInt(usernameTmp.length);
output.write(usernameTmp);
}
if (this.password == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var passwordTmp = this.password.getBytes(StandardCharsets.UTF_8);
output.writeInt(passwordTmp.length);
output.write(passwordTmp);
}
output.writeBoolean(this.httpOnly);
}
}
public static class ProxyTypeMtproto extends ProxyType {
public String secret;
public static final int CONSTRUCTOR = -1964826627;
public ProxyTypeMtproto() {}
public ProxyTypeMtproto(String secret) {
this.secret = secret;
}
public ProxyTypeMtproto(DataInput input) throws IOException {
if (input.readBoolean()) {
var secretTmp = new byte[input.readInt()];
input.readFully(secretTmp);
this.secret = new String(secretTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.secret == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var secretTmp = this.secret.getBytes(StandardCharsets.UTF_8);
output.writeInt(secretTmp.length);
output.write(secretTmp);
}
}
}
public static class PublicChatTypeHasUsername extends PublicChatType {
public static final int CONSTRUCTOR = 350789758;
public PublicChatTypeHasUsername() {}
public PublicChatTypeHasUsername(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PublicChatTypeIsLocationBased extends PublicChatType {
public static final int CONSTRUCTOR = 1183735952;
public PublicChatTypeIsLocationBased() {}
public PublicChatTypeIsLocationBased(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PublicMessageLink extends Object {
public String link;
public String html;
public static final int CONSTRUCTOR = -679603433;
public PublicMessageLink() {}
public PublicMessageLink(String link, String html) {
this.link = link;
this.html = html;
}
public PublicMessageLink(DataInput input) throws IOException {
if (input.readBoolean()) {
var linkTmp = new byte[input.readInt()];
input.readFully(linkTmp);
this.link = new String(linkTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var htmlTmp = new byte[input.readInt()];
input.readFully(htmlTmp);
this.html = new String(htmlTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.link == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var linkTmp = this.link.getBytes(StandardCharsets.UTF_8);
output.writeInt(linkTmp.length);
output.write(linkTmp);
}
if (this.html == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var htmlTmp = this.html.getBytes(StandardCharsets.UTF_8);
output.writeInt(htmlTmp.length);
output.write(htmlTmp);
}
}
}
public static class PushMessageContentHidden extends PushMessageContent {
public boolean isPinned;
public static final int CONSTRUCTOR = -316950436;
public PushMessageContentHidden() {}
public PushMessageContentHidden(boolean isPinned) {
this.isPinned = isPinned;
}
public PushMessageContentHidden(DataInput input) throws IOException {
this.isPinned = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isPinned);
}
}
public static class PushMessageContentAnimation extends PushMessageContent {
public Animation animation;
public String caption;
public boolean isPinned;
public static final int CONSTRUCTOR = 1034215396;
public PushMessageContentAnimation() {}
public PushMessageContentAnimation(Animation animation, String caption, boolean isPinned) {
this.animation = animation;
this.caption = caption;
this.isPinned = isPinned;
}
public PushMessageContentAnimation(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Animation.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.animation = new Animation(input);
}
if (input.readBoolean()) {
var captionTmp = new byte[input.readInt()];
input.readFully(captionTmp);
this.caption = new String(captionTmp, StandardCharsets.UTF_8);
}
this.isPinned = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.animation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.animation.serialize(output);
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var captionTmp = this.caption.getBytes(StandardCharsets.UTF_8);
output.writeInt(captionTmp.length);
output.write(captionTmp);
}
output.writeBoolean(this.isPinned);
}
}
public static class PushMessageContentAudio extends PushMessageContent {
public Audio audio;
public boolean isPinned;
public static final int CONSTRUCTOR = 381581426;
public PushMessageContentAudio() {}
public PushMessageContentAudio(Audio audio, boolean isPinned) {
this.audio = audio;
this.isPinned = isPinned;
}
public PushMessageContentAudio(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Audio.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.audio = new Audio(input);
}
this.isPinned = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.audio == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.audio.serialize(output);
}
output.writeBoolean(this.isPinned);
}
}
public static class PushMessageContentContact extends PushMessageContent {
public String name;
public boolean isPinned;
public static final int CONSTRUCTOR = -12219820;
public PushMessageContentContact() {}
public PushMessageContentContact(String name, boolean isPinned) {
this.name = name;
this.isPinned = isPinned;
}
public PushMessageContentContact(DataInput input) throws IOException {
if (input.readBoolean()) {
var nameTmp = new byte[input.readInt()];
input.readFully(nameTmp);
this.name = new String(nameTmp, StandardCharsets.UTF_8);
}
this.isPinned = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.name == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nameTmp = this.name.getBytes(StandardCharsets.UTF_8);
output.writeInt(nameTmp.length);
output.write(nameTmp);
}
output.writeBoolean(this.isPinned);
}
}
public static class PushMessageContentContactRegistered extends PushMessageContent {
public static final int CONSTRUCTOR = -303962720;
public PushMessageContentContactRegistered() {}
public PushMessageContentContactRegistered(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PushMessageContentDocument extends PushMessageContent {
public Document document;
public boolean isPinned;
public static final int CONSTRUCTOR = -458379775;
public PushMessageContentDocument() {}
public PushMessageContentDocument(Document document, boolean isPinned) {
this.document = document;
this.isPinned = isPinned;
}
public PushMessageContentDocument(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Document.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.document = new Document(input);
}
this.isPinned = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.document == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.document.serialize(output);
}
output.writeBoolean(this.isPinned);
}
}
public static class PushMessageContentGame extends PushMessageContent {
public String title;
public boolean isPinned;
public static final int CONSTRUCTOR = -515131109;
public PushMessageContentGame() {}
public PushMessageContentGame(String title, boolean isPinned) {
this.title = title;
this.isPinned = isPinned;
}
public PushMessageContentGame(DataInput input) throws IOException {
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
this.isPinned = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
output.writeBoolean(this.isPinned);
}
}
public static class PushMessageContentGameScore extends PushMessageContent {
public String title;
public int score;
public boolean isPinned;
public static final int CONSTRUCTOR = 901303688;
public PushMessageContentGameScore() {}
public PushMessageContentGameScore(String title, int score, boolean isPinned) {
this.title = title;
this.score = score;
this.isPinned = isPinned;
}
public PushMessageContentGameScore(DataInput input) throws IOException {
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
this.score = input.readInt();
this.isPinned = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
output.writeInt(this.score);
output.writeBoolean(this.isPinned);
}
}
public static class PushMessageContentInvoice extends PushMessageContent {
public String price;
public boolean isPinned;
public static final int CONSTRUCTOR = -1731687492;
public PushMessageContentInvoice() {}
public PushMessageContentInvoice(String price, boolean isPinned) {
this.price = price;
this.isPinned = isPinned;
}
public PushMessageContentInvoice(DataInput input) throws IOException {
if (input.readBoolean()) {
var priceTmp = new byte[input.readInt()];
input.readFully(priceTmp);
this.price = new String(priceTmp, StandardCharsets.UTF_8);
}
this.isPinned = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.price == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var priceTmp = this.price.getBytes(StandardCharsets.UTF_8);
output.writeInt(priceTmp.length);
output.write(priceTmp);
}
output.writeBoolean(this.isPinned);
}
}
public static class PushMessageContentLocation extends PushMessageContent {
public boolean isLive;
public boolean isPinned;
public static final int CONSTRUCTOR = -1288005709;
public PushMessageContentLocation() {}
public PushMessageContentLocation(boolean isLive, boolean isPinned) {
this.isLive = isLive;
this.isPinned = isPinned;
}
public PushMessageContentLocation(DataInput input) throws IOException {
this.isLive = input.readBoolean();
this.isPinned = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isLive);
output.writeBoolean(this.isPinned);
}
}
public static class PushMessageContentPhoto extends PushMessageContent {
public Photo photo;
public String caption;
public boolean isSecret;
public boolean isPinned;
public static final int CONSTRUCTOR = 140631122;
public PushMessageContentPhoto() {}
public PushMessageContentPhoto(Photo photo, String caption, boolean isSecret, boolean isPinned) {
this.photo = photo;
this.caption = caption;
this.isSecret = isSecret;
this.isPinned = isPinned;
}
public PushMessageContentPhoto(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Photo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.photo = new Photo(input);
}
if (input.readBoolean()) {
var captionTmp = new byte[input.readInt()];
input.readFully(captionTmp);
this.caption = new String(captionTmp, StandardCharsets.UTF_8);
}
this.isSecret = input.readBoolean();
this.isPinned = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.photo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.photo.serialize(output);
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var captionTmp = this.caption.getBytes(StandardCharsets.UTF_8);
output.writeInt(captionTmp.length);
output.write(captionTmp);
}
output.writeBoolean(this.isSecret);
output.writeBoolean(this.isPinned);
}
}
public static class PushMessageContentPoll extends PushMessageContent {
public String question;
public boolean isRegular;
public boolean isPinned;
public static final int CONSTRUCTOR = -44403654;
public PushMessageContentPoll() {}
public PushMessageContentPoll(String question, boolean isRegular, boolean isPinned) {
this.question = question;
this.isRegular = isRegular;
this.isPinned = isPinned;
}
public PushMessageContentPoll(DataInput input) throws IOException {
if (input.readBoolean()) {
var questionTmp = new byte[input.readInt()];
input.readFully(questionTmp);
this.question = new String(questionTmp, StandardCharsets.UTF_8);
}
this.isRegular = input.readBoolean();
this.isPinned = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.question == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var questionTmp = this.question.getBytes(StandardCharsets.UTF_8);
output.writeInt(questionTmp.length);
output.write(questionTmp);
}
output.writeBoolean(this.isRegular);
output.writeBoolean(this.isPinned);
}
}
public static class PushMessageContentScreenshotTaken extends PushMessageContent {
public static final int CONSTRUCTOR = 214245369;
public PushMessageContentScreenshotTaken() {}
public PushMessageContentScreenshotTaken(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PushMessageContentSticker extends PushMessageContent {
public Sticker sticker;
public String emoji;
public boolean isPinned;
public static final int CONSTRUCTOR = 1553513939;
public PushMessageContentSticker() {}
public PushMessageContentSticker(Sticker sticker, String emoji, boolean isPinned) {
this.sticker = sticker;
this.emoji = emoji;
this.isPinned = isPinned;
}
public PushMessageContentSticker(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Sticker.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.sticker = new Sticker(input);
}
if (input.readBoolean()) {
var emojiTmp = new byte[input.readInt()];
input.readFully(emojiTmp);
this.emoji = new String(emojiTmp, StandardCharsets.UTF_8);
}
this.isPinned = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.sticker == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.sticker.serialize(output);
}
if (this.emoji == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var emojiTmp = this.emoji.getBytes(StandardCharsets.UTF_8);
output.writeInt(emojiTmp.length);
output.write(emojiTmp);
}
output.writeBoolean(this.isPinned);
}
}
public static class PushMessageContentText extends PushMessageContent {
public String text;
public boolean isPinned;
public static final int CONSTRUCTOR = 274587305;
public PushMessageContentText() {}
public PushMessageContentText(String text, boolean isPinned) {
this.text = text;
this.isPinned = isPinned;
}
public PushMessageContentText(DataInput input) throws IOException {
if (input.readBoolean()) {
var textTmp = new byte[input.readInt()];
input.readFully(textTmp);
this.text = new String(textTmp, StandardCharsets.UTF_8);
}
this.isPinned = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var textTmp = this.text.getBytes(StandardCharsets.UTF_8);
output.writeInt(textTmp.length);
output.write(textTmp);
}
output.writeBoolean(this.isPinned);
}
}
public static class PushMessageContentVideo extends PushMessageContent {
public Video video;
public String caption;
public boolean isSecret;
public boolean isPinned;
public static final int CONSTRUCTOR = 310038831;
public PushMessageContentVideo() {}
public PushMessageContentVideo(Video video, String caption, boolean isSecret, boolean isPinned) {
this.video = video;
this.caption = caption;
this.isSecret = isSecret;
this.isPinned = isPinned;
}
public PushMessageContentVideo(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Video.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.video = new Video(input);
}
if (input.readBoolean()) {
var captionTmp = new byte[input.readInt()];
input.readFully(captionTmp);
this.caption = new String(captionTmp, StandardCharsets.UTF_8);
}
this.isSecret = input.readBoolean();
this.isPinned = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.video == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.video.serialize(output);
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var captionTmp = this.caption.getBytes(StandardCharsets.UTF_8);
output.writeInt(captionTmp.length);
output.write(captionTmp);
}
output.writeBoolean(this.isSecret);
output.writeBoolean(this.isPinned);
}
}
public static class PushMessageContentVideoNote extends PushMessageContent {
public VideoNote videoNote;
public boolean isPinned;
public static final int CONSTRUCTOR = -1122764417;
public PushMessageContentVideoNote() {}
public PushMessageContentVideoNote(VideoNote videoNote, boolean isPinned) {
this.videoNote = videoNote;
this.isPinned = isPinned;
}
public PushMessageContentVideoNote(DataInput input) throws IOException {
if (input.readBoolean()) {
if (VideoNote.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.videoNote = new VideoNote(input);
}
this.isPinned = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.videoNote == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.videoNote.serialize(output);
}
output.writeBoolean(this.isPinned);
}
}
public static class PushMessageContentVoiceNote extends PushMessageContent {
public VoiceNote voiceNote;
public boolean isPinned;
public static final int CONSTRUCTOR = 88910987;
public PushMessageContentVoiceNote() {}
public PushMessageContentVoiceNote(VoiceNote voiceNote, boolean isPinned) {
this.voiceNote = voiceNote;
this.isPinned = isPinned;
}
public PushMessageContentVoiceNote(DataInput input) throws IOException {
if (input.readBoolean()) {
if (VoiceNote.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.voiceNote = new VoiceNote(input);
}
this.isPinned = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.voiceNote == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.voiceNote.serialize(output);
}
output.writeBoolean(this.isPinned);
}
}
public static class PushMessageContentBasicGroupChatCreate extends PushMessageContent {
public static final int CONSTRUCTOR = -2114855172;
public PushMessageContentBasicGroupChatCreate() {}
public PushMessageContentBasicGroupChatCreate(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PushMessageContentChatAddMembers extends PushMessageContent {
public String memberName;
public boolean isCurrentUser;
public boolean isReturned;
public static final int CONSTRUCTOR = -1087145158;
public PushMessageContentChatAddMembers() {}
public PushMessageContentChatAddMembers(String memberName, boolean isCurrentUser, boolean isReturned) {
this.memberName = memberName;
this.isCurrentUser = isCurrentUser;
this.isReturned = isReturned;
}
public PushMessageContentChatAddMembers(DataInput input) throws IOException {
if (input.readBoolean()) {
var memberNameTmp = new byte[input.readInt()];
input.readFully(memberNameTmp);
this.memberName = new String(memberNameTmp, StandardCharsets.UTF_8);
}
this.isCurrentUser = input.readBoolean();
this.isReturned = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.memberName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var memberNameTmp = this.memberName.getBytes(StandardCharsets.UTF_8);
output.writeInt(memberNameTmp.length);
output.write(memberNameTmp);
}
output.writeBoolean(this.isCurrentUser);
output.writeBoolean(this.isReturned);
}
}
public static class PushMessageContentChatChangePhoto extends PushMessageContent {
public static final int CONSTRUCTOR = -1114222051;
public PushMessageContentChatChangePhoto() {}
public PushMessageContentChatChangePhoto(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PushMessageContentChatChangeTitle extends PushMessageContent {
public String title;
public static final int CONSTRUCTOR = -1964902749;
public PushMessageContentChatChangeTitle() {}
public PushMessageContentChatChangeTitle(String title) {
this.title = title;
}
public PushMessageContentChatChangeTitle(DataInput input) throws IOException {
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
}
}
public static class PushMessageContentChatDeleteMember extends PushMessageContent {
public String memberName;
public boolean isCurrentUser;
public boolean isLeft;
public static final int CONSTRUCTOR = 598714783;
public PushMessageContentChatDeleteMember() {}
public PushMessageContentChatDeleteMember(String memberName, boolean isCurrentUser, boolean isLeft) {
this.memberName = memberName;
this.isCurrentUser = isCurrentUser;
this.isLeft = isLeft;
}
public PushMessageContentChatDeleteMember(DataInput input) throws IOException {
if (input.readBoolean()) {
var memberNameTmp = new byte[input.readInt()];
input.readFully(memberNameTmp);
this.memberName = new String(memberNameTmp, StandardCharsets.UTF_8);
}
this.isCurrentUser = input.readBoolean();
this.isLeft = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.memberName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var memberNameTmp = this.memberName.getBytes(StandardCharsets.UTF_8);
output.writeInt(memberNameTmp.length);
output.write(memberNameTmp);
}
output.writeBoolean(this.isCurrentUser);
output.writeBoolean(this.isLeft);
}
}
public static class PushMessageContentChatJoinByLink extends PushMessageContent {
public static final int CONSTRUCTOR = 1553719113;
public PushMessageContentChatJoinByLink() {}
public PushMessageContentChatJoinByLink(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class PushMessageContentMessageForwards extends PushMessageContent {
public int totalCount;
public static final int CONSTRUCTOR = -1913083876;
public PushMessageContentMessageForwards() {}
public PushMessageContentMessageForwards(int totalCount) {
this.totalCount = totalCount;
}
public PushMessageContentMessageForwards(DataInput input) throws IOException {
this.totalCount = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.totalCount);
}
}
public static class PushMessageContentMediaAlbum extends PushMessageContent {
public int totalCount;
public boolean hasPhotos;
public boolean hasVideos;
public static final int CONSTRUCTOR = -874278109;
public PushMessageContentMediaAlbum() {}
public PushMessageContentMediaAlbum(int totalCount, boolean hasPhotos, boolean hasVideos) {
this.totalCount = totalCount;
this.hasPhotos = hasPhotos;
this.hasVideos = hasVideos;
}
public PushMessageContentMediaAlbum(DataInput input) throws IOException {
this.totalCount = input.readInt();
this.hasPhotos = input.readBoolean();
this.hasVideos = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.totalCount);
output.writeBoolean(this.hasPhotos);
output.writeBoolean(this.hasVideos);
}
}
public static class PushReceiverId extends Object {
public long id;
public static final int CONSTRUCTOR = 371056428;
public PushReceiverId() {}
public PushReceiverId(long id) {
this.id = id;
}
public PushReceiverId(DataInput input) throws IOException {
this.id = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.id);
}
}
public static class RecoveryEmailAddress extends Object {
public String recoveryEmailAddress;
public static final int CONSTRUCTOR = 1290526187;
public RecoveryEmailAddress() {}
public RecoveryEmailAddress(String recoveryEmailAddress) {
this.recoveryEmailAddress = recoveryEmailAddress;
}
public RecoveryEmailAddress(DataInput input) throws IOException {
if (input.readBoolean()) {
var recoveryEmailAddressTmp = new byte[input.readInt()];
input.readFully(recoveryEmailAddressTmp);
this.recoveryEmailAddress = new String(recoveryEmailAddressTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.recoveryEmailAddress == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var recoveryEmailAddressTmp = this.recoveryEmailAddress.getBytes(StandardCharsets.UTF_8);
output.writeInt(recoveryEmailAddressTmp.length);
output.write(recoveryEmailAddressTmp);
}
}
}
public static class RemoteFile extends Object {
public String id;
public String uniqueId;
public boolean isUploadingActive;
public boolean isUploadingCompleted;
public int uploadedSize;
public static final int CONSTRUCTOR = -1822143022;
public RemoteFile() {}
public RemoteFile(String id, String uniqueId, boolean isUploadingActive, boolean isUploadingCompleted, int uploadedSize) {
this.id = id;
this.uniqueId = uniqueId;
this.isUploadingActive = isUploadingActive;
this.isUploadingCompleted = isUploadingCompleted;
this.uploadedSize = uploadedSize;
}
public RemoteFile(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var uniqueIdTmp = new byte[input.readInt()];
input.readFully(uniqueIdTmp);
this.uniqueId = new String(uniqueIdTmp, StandardCharsets.UTF_8);
}
this.isUploadingActive = input.readBoolean();
this.isUploadingCompleted = input.readBoolean();
this.uploadedSize = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.uniqueId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var uniqueIdTmp = this.uniqueId.getBytes(StandardCharsets.UTF_8);
output.writeInt(uniqueIdTmp.length);
output.write(uniqueIdTmp);
}
output.writeBoolean(this.isUploadingActive);
output.writeBoolean(this.isUploadingCompleted);
output.writeInt(this.uploadedSize);
}
}
public static class ReplyMarkupRemoveKeyboard extends ReplyMarkup {
public boolean isPersonal;
public static final int CONSTRUCTOR = -691252879;
public ReplyMarkupRemoveKeyboard() {}
public ReplyMarkupRemoveKeyboard(boolean isPersonal) {
this.isPersonal = isPersonal;
}
public ReplyMarkupRemoveKeyboard(DataInput input) throws IOException {
this.isPersonal = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isPersonal);
}
}
public static class ReplyMarkupForceReply extends ReplyMarkup {
public boolean isPersonal;
public static final int CONSTRUCTOR = 1039104593;
public ReplyMarkupForceReply() {}
public ReplyMarkupForceReply(boolean isPersonal) {
this.isPersonal = isPersonal;
}
public ReplyMarkupForceReply(DataInput input) throws IOException {
this.isPersonal = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isPersonal);
}
}
public static class ReplyMarkupShowKeyboard extends ReplyMarkup {
public KeyboardButton[][] rows;
public boolean resizeKeyboard;
public boolean oneTime;
public boolean isPersonal;
public static final int CONSTRUCTOR = -992627133;
public ReplyMarkupShowKeyboard() {}
public ReplyMarkupShowKeyboard(KeyboardButton[][] rows, boolean resizeKeyboard, boolean oneTime, boolean isPersonal) {
this.rows = rows;
this.resizeKeyboard = resizeKeyboard;
this.oneTime = oneTime;
this.isPersonal = isPersonal;
}
public ReplyMarkupShowKeyboard(DataInput input) throws IOException {
if (input.readBoolean()) {
this.rows = new KeyboardButton[input.readInt()][];
for (int i = 0; i < this.rows.length; i++) {
this.rows[i] = new KeyboardButton[input.readInt()];
for (int j = 0; j < this.rows[i].length; j++) {
if (KeyboardButton.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.rows[i][j] = new KeyboardButton(input);
}
}
}
this.resizeKeyboard = input.readBoolean();
this.oneTime = input.readBoolean();
this.isPersonal = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.rows == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.rows.length);
for (int i = 0; i < this.rows.length; i++) {
output.writeInt(this.rows[i].length);
for (int j = 0; j < this.rows[i].length; j++) {
this.rows[i][j].serialize(output);
}
}
}
output.writeBoolean(this.resizeKeyboard);
output.writeBoolean(this.oneTime);
output.writeBoolean(this.isPersonal);
}
}
public static class ReplyMarkupInlineKeyboard extends ReplyMarkup {
public InlineKeyboardButton[][] rows;
public static final int CONSTRUCTOR = -619317658;
public ReplyMarkupInlineKeyboard() {}
public ReplyMarkupInlineKeyboard(InlineKeyboardButton[][] rows) {
this.rows = rows;
}
public ReplyMarkupInlineKeyboard(DataInput input) throws IOException {
if (input.readBoolean()) {
this.rows = new InlineKeyboardButton[input.readInt()][];
for (int i = 0; i < this.rows.length; i++) {
this.rows[i] = new InlineKeyboardButton[input.readInt()];
for (int j = 0; j < this.rows[i].length; j++) {
if (InlineKeyboardButton.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.rows[i][j] = new InlineKeyboardButton(input);
}
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.rows == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.rows.length);
for (int i = 0; i < this.rows.length; i++) {
output.writeInt(this.rows[i].length);
for (int j = 0; j < this.rows[i].length; j++) {
this.rows[i][j].serialize(output);
}
}
}
}
}
public static class RichTextPlain extends RichText {
public String text;
public static final int CONSTRUCTOR = 482617702;
public RichTextPlain() {}
public RichTextPlain(String text) {
this.text = text;
}
public RichTextPlain(DataInput input) throws IOException {
if (input.readBoolean()) {
var textTmp = new byte[input.readInt()];
input.readFully(textTmp);
this.text = new String(textTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var textTmp = this.text.getBytes(StandardCharsets.UTF_8);
output.writeInt(textTmp.length);
output.write(textTmp);
}
}
}
public static class RichTextBold extends RichText {
public RichText text;
public static final int CONSTRUCTOR = 1670844268;
public RichTextBold() {}
public RichTextBold(RichText text) {
this.text = text;
}
public RichTextBold(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.text = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.text = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.text = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.text = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.text = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.text = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.text = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.text = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.text = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.text = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.text = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.text = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.text = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.text = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.text = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.text = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.text = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
}
}
public static class RichTextItalic extends RichText {
public RichText text;
public static final int CONSTRUCTOR = 1853354047;
public RichTextItalic() {}
public RichTextItalic(RichText text) {
this.text = text;
}
public RichTextItalic(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.text = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.text = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.text = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.text = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.text = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.text = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.text = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.text = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.text = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.text = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.text = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.text = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.text = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.text = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.text = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.text = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.text = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
}
}
public static class RichTextUnderline extends RichText {
public RichText text;
public static final int CONSTRUCTOR = -536019572;
public RichTextUnderline() {}
public RichTextUnderline(RichText text) {
this.text = text;
}
public RichTextUnderline(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.text = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.text = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.text = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.text = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.text = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.text = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.text = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.text = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.text = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.text = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.text = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.text = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.text = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.text = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.text = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.text = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.text = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
}
}
public static class RichTextStrikethrough extends RichText {
public RichText text;
public static final int CONSTRUCTOR = 723413585;
public RichTextStrikethrough() {}
public RichTextStrikethrough(RichText text) {
this.text = text;
}
public RichTextStrikethrough(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.text = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.text = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.text = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.text = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.text = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.text = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.text = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.text = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.text = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.text = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.text = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.text = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.text = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.text = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.text = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.text = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.text = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
}
}
public static class RichTextFixed extends RichText {
public RichText text;
public static final int CONSTRUCTOR = -1271496249;
public RichTextFixed() {}
public RichTextFixed(RichText text) {
this.text = text;
}
public RichTextFixed(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.text = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.text = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.text = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.text = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.text = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.text = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.text = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.text = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.text = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.text = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.text = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.text = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.text = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.text = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.text = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.text = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.text = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
}
}
public static class RichTextUrl extends RichText {
public RichText text;
public String url;
public boolean isCached;
public static final int CONSTRUCTOR = 83939092;
public RichTextUrl() {}
public RichTextUrl(RichText text, String url, boolean isCached) {
this.text = text;
this.url = url;
this.isCached = isCached;
}
public RichTextUrl(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.text = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.text = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.text = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.text = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.text = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.text = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.text = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.text = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.text = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.text = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.text = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.text = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.text = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.text = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.text = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.text = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.text = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
this.isCached = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
output.writeBoolean(this.isCached);
}
}
public static class RichTextEmailAddress extends RichText {
public RichText text;
public String emailAddress;
public static final int CONSTRUCTOR = 40018679;
public RichTextEmailAddress() {}
public RichTextEmailAddress(RichText text, String emailAddress) {
this.text = text;
this.emailAddress = emailAddress;
}
public RichTextEmailAddress(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.text = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.text = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.text = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.text = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.text = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.text = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.text = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.text = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.text = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.text = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.text = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.text = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.text = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.text = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.text = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.text = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.text = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
var emailAddressTmp = new byte[input.readInt()];
input.readFully(emailAddressTmp);
this.emailAddress = new String(emailAddressTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
if (this.emailAddress == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var emailAddressTmp = this.emailAddress.getBytes(StandardCharsets.UTF_8);
output.writeInt(emailAddressTmp.length);
output.write(emailAddressTmp);
}
}
}
public static class RichTextSubscript extends RichText {
public RichText text;
public static final int CONSTRUCTOR = -868197812;
public RichTextSubscript() {}
public RichTextSubscript(RichText text) {
this.text = text;
}
public RichTextSubscript(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.text = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.text = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.text = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.text = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.text = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.text = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.text = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.text = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.text = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.text = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.text = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.text = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.text = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.text = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.text = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.text = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.text = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
}
}
public static class RichTextSuperscript extends RichText {
public RichText text;
public static final int CONSTRUCTOR = -382241437;
public RichTextSuperscript() {}
public RichTextSuperscript(RichText text) {
this.text = text;
}
public RichTextSuperscript(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.text = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.text = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.text = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.text = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.text = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.text = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.text = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.text = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.text = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.text = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.text = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.text = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.text = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.text = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.text = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.text = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.text = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
}
}
public static class RichTextMarked extends RichText {
public RichText text;
public static final int CONSTRUCTOR = -1271999614;
public RichTextMarked() {}
public RichTextMarked(RichText text) {
this.text = text;
}
public RichTextMarked(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.text = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.text = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.text = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.text = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.text = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.text = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.text = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.text = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.text = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.text = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.text = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.text = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.text = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.text = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.text = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.text = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.text = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
}
}
public static class RichTextPhoneNumber extends RichText {
public RichText text;
public String phoneNumber;
public static final int CONSTRUCTOR = 128521539;
public RichTextPhoneNumber() {}
public RichTextPhoneNumber(RichText text, String phoneNumber) {
this.text = text;
this.phoneNumber = phoneNumber;
}
public RichTextPhoneNumber(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.text = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.text = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.text = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.text = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.text = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.text = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.text = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.text = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.text = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.text = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.text = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.text = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.text = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.text = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.text = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.text = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.text = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
var phoneNumberTmp = new byte[input.readInt()];
input.readFully(phoneNumberTmp);
this.phoneNumber = new String(phoneNumberTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
if (this.phoneNumber == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var phoneNumberTmp = this.phoneNumber.getBytes(StandardCharsets.UTF_8);
output.writeInt(phoneNumberTmp.length);
output.write(phoneNumberTmp);
}
}
}
public static class RichTextIcon extends RichText {
public Document document;
public int width;
public int height;
public static final int CONSTRUCTOR = -1480316158;
public RichTextIcon() {}
public RichTextIcon(Document document, int width, int height) {
this.document = document;
this.width = width;
this.height = height;
}
public RichTextIcon(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Document.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.document = new Document(input);
}
this.width = input.readInt();
this.height = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.document == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.document.serialize(output);
}
output.writeInt(this.width);
output.writeInt(this.height);
}
}
public static class RichTextReference extends RichText {
public RichText text;
public RichText referenceText;
public String url;
public static final int CONSTRUCTOR = -144433301;
public RichTextReference() {}
public RichTextReference(RichText text, RichText referenceText, String url) {
this.text = text;
this.referenceText = referenceText;
this.url = url;
}
public RichTextReference(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.text = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.text = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.text = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.text = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.text = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.text = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.text = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.text = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.text = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.text = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.text = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.text = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.text = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.text = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.text = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.text = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.text = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.referenceText = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.referenceText = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.referenceText = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.referenceText = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.referenceText = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.referenceText = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.referenceText = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.referenceText = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.referenceText = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.referenceText = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.referenceText = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.referenceText = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.referenceText = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.referenceText = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.referenceText = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.referenceText = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.referenceText = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
if (this.referenceText == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.referenceText.serialize(output);
}
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
}
}
public static class RichTextAnchor extends RichText {
public String name;
public static final int CONSTRUCTOR = 1316950068;
public RichTextAnchor() {}
public RichTextAnchor(String name) {
this.name = name;
}
public RichTextAnchor(DataInput input) throws IOException {
if (input.readBoolean()) {
var nameTmp = new byte[input.readInt()];
input.readFully(nameTmp);
this.name = new String(nameTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.name == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nameTmp = this.name.getBytes(StandardCharsets.UTF_8);
output.writeInt(nameTmp.length);
output.write(nameTmp);
}
}
}
public static class RichTextAnchorLink extends RichText {
public RichText text;
public String name;
public String url;
public static final int CONSTRUCTOR = -367827961;
public RichTextAnchorLink() {}
public RichTextAnchorLink(RichText text, String name, String url) {
this.text = text;
this.name = name;
this.url = url;
}
public RichTextAnchorLink(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.text = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.text = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.text = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.text = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.text = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.text = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.text = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.text = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.text = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.text = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.text = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.text = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.text = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.text = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.text = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.text = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.text = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
var nameTmp = new byte[input.readInt()];
input.readFully(nameTmp);
this.name = new String(nameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
if (this.name == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nameTmp = this.name.getBytes(StandardCharsets.UTF_8);
output.writeInt(nameTmp.length);
output.write(nameTmp);
}
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
}
}
public static class RichTexts extends RichText {
public RichText[] texts;
public static final int CONSTRUCTOR = 1647457821;
public RichTexts() {}
public RichTexts(RichText[] texts) {
this.texts = texts;
}
public RichTexts(DataInput input) throws IOException {
if (input.readBoolean()) {
this.texts = new RichText[input.readInt()];
for (int i = 0; i < this.texts.length; i++) {
switch(input.readInt()) {
case RichTextPlain.CONSTRUCTOR:
this.texts[i] = new RichTextPlain(input);
break;
case RichTextBold.CONSTRUCTOR:
this.texts[i] = new RichTextBold(input);
break;
case RichTextItalic.CONSTRUCTOR:
this.texts[i] = new RichTextItalic(input);
break;
case RichTextUnderline.CONSTRUCTOR:
this.texts[i] = new RichTextUnderline(input);
break;
case RichTextStrikethrough.CONSTRUCTOR:
this.texts[i] = new RichTextStrikethrough(input);
break;
case RichTextFixed.CONSTRUCTOR:
this.texts[i] = new RichTextFixed(input);
break;
case RichTextUrl.CONSTRUCTOR:
this.texts[i] = new RichTextUrl(input);
break;
case RichTextEmailAddress.CONSTRUCTOR:
this.texts[i] = new RichTextEmailAddress(input);
break;
case RichTextSubscript.CONSTRUCTOR:
this.texts[i] = new RichTextSubscript(input);
break;
case RichTextSuperscript.CONSTRUCTOR:
this.texts[i] = new RichTextSuperscript(input);
break;
case RichTextMarked.CONSTRUCTOR:
this.texts[i] = new RichTextMarked(input);
break;
case RichTextPhoneNumber.CONSTRUCTOR:
this.texts[i] = new RichTextPhoneNumber(input);
break;
case RichTextIcon.CONSTRUCTOR:
this.texts[i] = new RichTextIcon(input);
break;
case RichTextReference.CONSTRUCTOR:
this.texts[i] = new RichTextReference(input);
break;
case RichTextAnchor.CONSTRUCTOR:
this.texts[i] = new RichTextAnchor(input);
break;
case RichTextAnchorLink.CONSTRUCTOR:
this.texts[i] = new RichTextAnchorLink(input);
break;
case RichTexts.CONSTRUCTOR:
this.texts[i] = new RichTexts(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.texts == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.texts.length);
for (int i = 0; i < this.texts.length; i++) {
this.texts[i].serialize(output);
}
}
}
}
public static class SavedCredentials extends Object {
public String id;
public String title;
public static final int CONSTRUCTOR = -370273060;
public SavedCredentials() {}
public SavedCredentials(String id, String title) {
this.id = id;
this.title = title;
}
public SavedCredentials(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
}
}
public static class ScopeNotificationSettings extends Object {
public int muteFor;
public String sound;
public boolean showPreview;
public boolean disablePinnedMessageNotifications;
public boolean disableMentionNotifications;
public static final int CONSTRUCTOR = -426103745;
public ScopeNotificationSettings() {}
public ScopeNotificationSettings(int muteFor, String sound, boolean showPreview, boolean disablePinnedMessageNotifications, boolean disableMentionNotifications) {
this.muteFor = muteFor;
this.sound = sound;
this.showPreview = showPreview;
this.disablePinnedMessageNotifications = disablePinnedMessageNotifications;
this.disableMentionNotifications = disableMentionNotifications;
}
public ScopeNotificationSettings(DataInput input) throws IOException {
this.muteFor = input.readInt();
if (input.readBoolean()) {
var soundTmp = new byte[input.readInt()];
input.readFully(soundTmp);
this.sound = new String(soundTmp, StandardCharsets.UTF_8);
}
this.showPreview = input.readBoolean();
this.disablePinnedMessageNotifications = input.readBoolean();
this.disableMentionNotifications = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.muteFor);
if (this.sound == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var soundTmp = this.sound.getBytes(StandardCharsets.UTF_8);
output.writeInt(soundTmp.length);
output.write(soundTmp);
}
output.writeBoolean(this.showPreview);
output.writeBoolean(this.disablePinnedMessageNotifications);
output.writeBoolean(this.disableMentionNotifications);
}
}
public static class SearchMessagesFilterEmpty extends SearchMessagesFilter {
public static final int CONSTRUCTOR = -869395657;
public SearchMessagesFilterEmpty() {}
public SearchMessagesFilterEmpty(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class SearchMessagesFilterAnimation extends SearchMessagesFilter {
public static final int CONSTRUCTOR = -155713339;
public SearchMessagesFilterAnimation() {}
public SearchMessagesFilterAnimation(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class SearchMessagesFilterAudio extends SearchMessagesFilter {
public static final int CONSTRUCTOR = 867505275;
public SearchMessagesFilterAudio() {}
public SearchMessagesFilterAudio(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class SearchMessagesFilterDocument extends SearchMessagesFilter {
public static final int CONSTRUCTOR = 1526331215;
public SearchMessagesFilterDocument() {}
public SearchMessagesFilterDocument(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class SearchMessagesFilterPhoto extends SearchMessagesFilter {
public static final int CONSTRUCTOR = 925932293;
public SearchMessagesFilterPhoto() {}
public SearchMessagesFilterPhoto(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class SearchMessagesFilterVideo extends SearchMessagesFilter {
public static final int CONSTRUCTOR = 115538222;
public SearchMessagesFilterVideo() {}
public SearchMessagesFilterVideo(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class SearchMessagesFilterVoiceNote extends SearchMessagesFilter {
public static final int CONSTRUCTOR = 1841439357;
public SearchMessagesFilterVoiceNote() {}
public SearchMessagesFilterVoiceNote(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class SearchMessagesFilterPhotoAndVideo extends SearchMessagesFilter {
public static final int CONSTRUCTOR = 1352130963;
public SearchMessagesFilterPhotoAndVideo() {}
public SearchMessagesFilterPhotoAndVideo(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class SearchMessagesFilterUrl extends SearchMessagesFilter {
public static final int CONSTRUCTOR = -1828724341;
public SearchMessagesFilterUrl() {}
public SearchMessagesFilterUrl(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class SearchMessagesFilterChatPhoto extends SearchMessagesFilter {
public static final int CONSTRUCTOR = -1247751329;
public SearchMessagesFilterChatPhoto() {}
public SearchMessagesFilterChatPhoto(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class SearchMessagesFilterCall extends SearchMessagesFilter {
public static final int CONSTRUCTOR = 1305231012;
public SearchMessagesFilterCall() {}
public SearchMessagesFilterCall(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class SearchMessagesFilterMissedCall extends SearchMessagesFilter {
public static final int CONSTRUCTOR = 970663098;
public SearchMessagesFilterMissedCall() {}
public SearchMessagesFilterMissedCall(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class SearchMessagesFilterVideoNote extends SearchMessagesFilter {
public static final int CONSTRUCTOR = 564323321;
public SearchMessagesFilterVideoNote() {}
public SearchMessagesFilterVideoNote(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class SearchMessagesFilterVoiceAndVideoNote extends SearchMessagesFilter {
public static final int CONSTRUCTOR = 664174819;
public SearchMessagesFilterVoiceAndVideoNote() {}
public SearchMessagesFilterVoiceAndVideoNote(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class SearchMessagesFilterMention extends SearchMessagesFilter {
public static final int CONSTRUCTOR = 2001258652;
public SearchMessagesFilterMention() {}
public SearchMessagesFilterMention(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class SearchMessagesFilterUnreadMention extends SearchMessagesFilter {
public static final int CONSTRUCTOR = -95769149;
public SearchMessagesFilterUnreadMention() {}
public SearchMessagesFilterUnreadMention(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class Seconds extends Object {
public double seconds;
public static final int CONSTRUCTOR = 959899022;
public Seconds() {}
public Seconds(double seconds) {
this.seconds = seconds;
}
public Seconds(DataInput input) throws IOException {
this.seconds = input.readDouble();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeDouble(this.seconds);
}
}
public static class SecretChat extends Object {
public int id;
public int userId;
public SecretChatState state;
public boolean isOutbound;
public int ttl;
public byte[] keyHash;
public int layer;
public static final int CONSTRUCTOR = 1279231629;
public SecretChat() {}
public SecretChat(int id, int userId, SecretChatState state, boolean isOutbound, int ttl, byte[] keyHash, int layer) {
this.id = id;
this.userId = userId;
this.state = state;
this.isOutbound = isOutbound;
this.ttl = ttl;
this.keyHash = keyHash;
this.layer = layer;
}
public SecretChat(DataInput input) throws IOException {
this.id = input.readInt();
this.userId = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case SecretChatStatePending.CONSTRUCTOR:
this.state = new SecretChatStatePending(input);
break;
case SecretChatStateReady.CONSTRUCTOR:
this.state = new SecretChatStateReady(input);
break;
case SecretChatStateClosed.CONSTRUCTOR:
this.state = new SecretChatStateClosed(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.isOutbound = input.readBoolean();
this.ttl = input.readInt();
if (input.readBoolean()) {
this.keyHash = new byte[input.readInt()];
input.readFully(this.keyHash);
}
this.layer = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.id);
output.writeInt(this.userId);
if (this.state == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.state.serialize(output);
}
output.writeBoolean(this.isOutbound);
output.writeInt(this.ttl);
if (this.keyHash == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.keyHash.length);
output.write(this.keyHash);
}
output.writeInt(this.layer);
}
}
public static class SecretChatStatePending extends SecretChatState {
public static final int CONSTRUCTOR = -1637050756;
public SecretChatStatePending() {}
public SecretChatStatePending(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class SecretChatStateReady extends SecretChatState {
public static final int CONSTRUCTOR = -1611352087;
public SecretChatStateReady() {}
public SecretChatStateReady(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class SecretChatStateClosed extends SecretChatState {
public static final int CONSTRUCTOR = -1945106707;
public SecretChatStateClosed() {}
public SecretChatStateClosed(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class SendMessageOptions extends Object {
public boolean disableNotification;
public boolean fromBackground;
public MessageSchedulingState schedulingState;
public static final int CONSTRUCTOR = 669760254;
public SendMessageOptions() {}
public SendMessageOptions(boolean disableNotification, boolean fromBackground, MessageSchedulingState schedulingState) {
this.disableNotification = disableNotification;
this.fromBackground = fromBackground;
this.schedulingState = schedulingState;
}
public SendMessageOptions(DataInput input) throws IOException {
this.disableNotification = input.readBoolean();
this.fromBackground = input.readBoolean();
if (input.readBoolean()) {
switch(input.readInt()) {
case MessageSchedulingStateSendAtDate.CONSTRUCTOR:
this.schedulingState = new MessageSchedulingStateSendAtDate(input);
break;
case MessageSchedulingStateSendWhenOnline.CONSTRUCTOR:
this.schedulingState = new MessageSchedulingStateSendWhenOnline(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.disableNotification);
output.writeBoolean(this.fromBackground);
if (this.schedulingState == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.schedulingState.serialize(output);
}
}
}
public static class Session extends Object {
public long id;
public boolean isCurrent;
public boolean isPasswordPending;
public int apiId;
public String applicationName;
public String applicationVersion;
public boolean isOfficialApplication;
public String deviceModel;
public String platform;
public String systemVersion;
public int logInDate;
public int lastActiveDate;
public String ip;
public String country;
public String region;
public static final int CONSTRUCTOR = 1920553176;
public Session() {}
public Session(long id, boolean isCurrent, boolean isPasswordPending, int apiId, String applicationName, String applicationVersion, boolean isOfficialApplication, String deviceModel, String platform, String systemVersion, int logInDate, int lastActiveDate, String ip, String country, String region) {
this.id = id;
this.isCurrent = isCurrent;
this.isPasswordPending = isPasswordPending;
this.apiId = apiId;
this.applicationName = applicationName;
this.applicationVersion = applicationVersion;
this.isOfficialApplication = isOfficialApplication;
this.deviceModel = deviceModel;
this.platform = platform;
this.systemVersion = systemVersion;
this.logInDate = logInDate;
this.lastActiveDate = lastActiveDate;
this.ip = ip;
this.country = country;
this.region = region;
}
public Session(DataInput input) throws IOException {
this.id = input.readLong();
this.isCurrent = input.readBoolean();
this.isPasswordPending = input.readBoolean();
this.apiId = input.readInt();
if (input.readBoolean()) {
var applicationNameTmp = new byte[input.readInt()];
input.readFully(applicationNameTmp);
this.applicationName = new String(applicationNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var applicationVersionTmp = new byte[input.readInt()];
input.readFully(applicationVersionTmp);
this.applicationVersion = new String(applicationVersionTmp, StandardCharsets.UTF_8);
}
this.isOfficialApplication = input.readBoolean();
if (input.readBoolean()) {
var deviceModelTmp = new byte[input.readInt()];
input.readFully(deviceModelTmp);
this.deviceModel = new String(deviceModelTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var platformTmp = new byte[input.readInt()];
input.readFully(platformTmp);
this.platform = new String(platformTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var systemVersionTmp = new byte[input.readInt()];
input.readFully(systemVersionTmp);
this.systemVersion = new String(systemVersionTmp, StandardCharsets.UTF_8);
}
this.logInDate = input.readInt();
this.lastActiveDate = input.readInt();
if (input.readBoolean()) {
var ipTmp = new byte[input.readInt()];
input.readFully(ipTmp);
this.ip = new String(ipTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var countryTmp = new byte[input.readInt()];
input.readFully(countryTmp);
this.country = new String(countryTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var regionTmp = new byte[input.readInt()];
input.readFully(regionTmp);
this.region = new String(regionTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.id);
output.writeBoolean(this.isCurrent);
output.writeBoolean(this.isPasswordPending);
output.writeInt(this.apiId);
if (this.applicationName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var applicationNameTmp = this.applicationName.getBytes(StandardCharsets.UTF_8);
output.writeInt(applicationNameTmp.length);
output.write(applicationNameTmp);
}
if (this.applicationVersion == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var applicationVersionTmp = this.applicationVersion.getBytes(StandardCharsets.UTF_8);
output.writeInt(applicationVersionTmp.length);
output.write(applicationVersionTmp);
}
output.writeBoolean(this.isOfficialApplication);
if (this.deviceModel == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var deviceModelTmp = this.deviceModel.getBytes(StandardCharsets.UTF_8);
output.writeInt(deviceModelTmp.length);
output.write(deviceModelTmp);
}
if (this.platform == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var platformTmp = this.platform.getBytes(StandardCharsets.UTF_8);
output.writeInt(platformTmp.length);
output.write(platformTmp);
}
if (this.systemVersion == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var systemVersionTmp = this.systemVersion.getBytes(StandardCharsets.UTF_8);
output.writeInt(systemVersionTmp.length);
output.write(systemVersionTmp);
}
output.writeInt(this.logInDate);
output.writeInt(this.lastActiveDate);
if (this.ip == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var ipTmp = this.ip.getBytes(StandardCharsets.UTF_8);
output.writeInt(ipTmp.length);
output.write(ipTmp);
}
if (this.country == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var countryTmp = this.country.getBytes(StandardCharsets.UTF_8);
output.writeInt(countryTmp.length);
output.write(countryTmp);
}
if (this.region == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var regionTmp = this.region.getBytes(StandardCharsets.UTF_8);
output.writeInt(regionTmp.length);
output.write(regionTmp);
}
}
}
public static class Sessions extends Object {
public Session[] sessions;
public static final int CONSTRUCTOR = -463118121;
public Sessions() {}
public Sessions(Session[] sessions) {
this.sessions = sessions;
}
public Sessions(DataInput input) throws IOException {
if (input.readBoolean()) {
this.sessions = new Session[input.readInt()];
for (int i = 0; i < this.sessions.length; i++) {
if (Session.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.sessions[i] = new Session(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.sessions == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.sessions.length);
for (int i = 0; i < this.sessions.length; i++) {
this.sessions[i].serialize(output);
}
}
}
}
public static class ShippingOption extends Object {
public String id;
public String title;
public LabeledPricePart[] priceParts;
public static final int CONSTRUCTOR = 1425690001;
public ShippingOption() {}
public ShippingOption(String id, String title, LabeledPricePart[] priceParts) {
this.id = id;
this.title = title;
this.priceParts = priceParts;
}
public ShippingOption(DataInput input) throws IOException {
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
this.priceParts = new LabeledPricePart[input.readInt()];
for (int i = 0; i < this.priceParts.length; i++) {
if (LabeledPricePart.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.priceParts[i] = new LabeledPricePart(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.priceParts == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.priceParts.length);
for (int i = 0; i < this.priceParts.length; i++) {
this.priceParts[i].serialize(output);
}
}
}
}
public static class StatisticsGraphData extends StatisticsGraph {
public String jsonData;
public String zoomToken;
public static final int CONSTRUCTOR = -1756117226;
public StatisticsGraphData() {}
public StatisticsGraphData(String jsonData, String zoomToken) {
this.jsonData = jsonData;
this.zoomToken = zoomToken;
}
public StatisticsGraphData(DataInput input) throws IOException {
if (input.readBoolean()) {
var jsonDataTmp = new byte[input.readInt()];
input.readFully(jsonDataTmp);
this.jsonData = new String(jsonDataTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var zoomTokenTmp = new byte[input.readInt()];
input.readFully(zoomTokenTmp);
this.zoomToken = new String(zoomTokenTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.jsonData == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var jsonDataTmp = this.jsonData.getBytes(StandardCharsets.UTF_8);
output.writeInt(jsonDataTmp.length);
output.write(jsonDataTmp);
}
if (this.zoomToken == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var zoomTokenTmp = this.zoomToken.getBytes(StandardCharsets.UTF_8);
output.writeInt(zoomTokenTmp.length);
output.write(zoomTokenTmp);
}
}
}
public static class StatisticsGraphAsync extends StatisticsGraph {
public String token;
public static final int CONSTRUCTOR = 1064479337;
public StatisticsGraphAsync() {}
public StatisticsGraphAsync(String token) {
this.token = token;
}
public StatisticsGraphAsync(DataInput input) throws IOException {
if (input.readBoolean()) {
var tokenTmp = new byte[input.readInt()];
input.readFully(tokenTmp);
this.token = new String(tokenTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.token == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var tokenTmp = this.token.getBytes(StandardCharsets.UTF_8);
output.writeInt(tokenTmp.length);
output.write(tokenTmp);
}
}
}
public static class StatisticsGraphError extends StatisticsGraph {
public String errorMessage;
public static final int CONSTRUCTOR = -61804431;
public StatisticsGraphError() {}
public StatisticsGraphError(String errorMessage) {
this.errorMessage = errorMessage;
}
public StatisticsGraphError(DataInput input) throws IOException {
if (input.readBoolean()) {
var errorMessageTmp = new byte[input.readInt()];
input.readFully(errorMessageTmp);
this.errorMessage = new String(errorMessageTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.errorMessage == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var errorMessageTmp = this.errorMessage.getBytes(StandardCharsets.UTF_8);
output.writeInt(errorMessageTmp.length);
output.write(errorMessageTmp);
}
}
}
public static class StatisticsValue extends Object {
public double value;
public double previousValue;
public double growthRatePercentage;
public static final int CONSTRUCTOR = 1147508964;
public StatisticsValue() {}
public StatisticsValue(double value, double previousValue, double growthRatePercentage) {
this.value = value;
this.previousValue = previousValue;
this.growthRatePercentage = growthRatePercentage;
}
public StatisticsValue(DataInput input) throws IOException {
this.value = input.readDouble();
this.previousValue = input.readDouble();
this.growthRatePercentage = input.readDouble();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeDouble(this.value);
output.writeDouble(this.previousValue);
output.writeDouble(this.growthRatePercentage);
}
}
public static class Sticker extends Object {
public long setId;
public int width;
public int height;
public String emoji;
public boolean isAnimated;
public boolean isMask;
public MaskPosition maskPosition;
public PhotoSize thumbnail;
public File sticker;
public static final int CONSTRUCTOR = -1835470627;
public Sticker() {}
public Sticker(long setId, int width, int height, String emoji, boolean isAnimated, boolean isMask, MaskPosition maskPosition, PhotoSize thumbnail, File sticker) {
this.setId = setId;
this.width = width;
this.height = height;
this.emoji = emoji;
this.isAnimated = isAnimated;
this.isMask = isMask;
this.maskPosition = maskPosition;
this.thumbnail = thumbnail;
this.sticker = sticker;
}
public Sticker(DataInput input) throws IOException {
this.setId = input.readLong();
this.width = input.readInt();
this.height = input.readInt();
if (input.readBoolean()) {
var emojiTmp = new byte[input.readInt()];
input.readFully(emojiTmp);
this.emoji = new String(emojiTmp, StandardCharsets.UTF_8);
}
this.isAnimated = input.readBoolean();
this.isMask = input.readBoolean();
if (input.readBoolean()) {
if (MaskPosition.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.maskPosition = new MaskPosition(input);
}
if (input.readBoolean()) {
if (PhotoSize.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.thumbnail = new PhotoSize(input);
}
if (input.readBoolean()) {
if (File.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.sticker = new File(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.setId);
output.writeInt(this.width);
output.writeInt(this.height);
if (this.emoji == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var emojiTmp = this.emoji.getBytes(StandardCharsets.UTF_8);
output.writeInt(emojiTmp.length);
output.write(emojiTmp);
}
output.writeBoolean(this.isAnimated);
output.writeBoolean(this.isMask);
if (this.maskPosition == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.maskPosition.serialize(output);
}
if (this.thumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.thumbnail.serialize(output);
}
if (this.sticker == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.sticker.serialize(output);
}
}
}
public static class StickerSet extends Object {
public long id;
public String title;
public String name;
public PhotoSize thumbnail;
public boolean isInstalled;
public boolean isArchived;
public boolean isOfficial;
public boolean isAnimated;
public boolean isMasks;
public boolean isViewed;
public Sticker[] stickers;
public Emojis[] emojis;
public static final int CONSTRUCTOR = 734588298;
public StickerSet() {}
public StickerSet(long id, String title, String name, PhotoSize thumbnail, boolean isInstalled, boolean isArchived, boolean isOfficial, boolean isAnimated, boolean isMasks, boolean isViewed, Sticker[] stickers, Emojis[] emojis) {
this.id = id;
this.title = title;
this.name = name;
this.thumbnail = thumbnail;
this.isInstalled = isInstalled;
this.isArchived = isArchived;
this.isOfficial = isOfficial;
this.isAnimated = isAnimated;
this.isMasks = isMasks;
this.isViewed = isViewed;
this.stickers = stickers;
this.emojis = emojis;
}
public StickerSet(DataInput input) throws IOException {
this.id = input.readLong();
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var nameTmp = new byte[input.readInt()];
input.readFully(nameTmp);
this.name = new String(nameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (PhotoSize.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.thumbnail = new PhotoSize(input);
}
this.isInstalled = input.readBoolean();
this.isArchived = input.readBoolean();
this.isOfficial = input.readBoolean();
this.isAnimated = input.readBoolean();
this.isMasks = input.readBoolean();
this.isViewed = input.readBoolean();
if (input.readBoolean()) {
this.stickers = new Sticker[input.readInt()];
for (int i = 0; i < this.stickers.length; i++) {
if (Sticker.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.stickers[i] = new Sticker(input);
}
}
if (input.readBoolean()) {
this.emojis = new Emojis[input.readInt()];
for (int i = 0; i < this.emojis.length; i++) {
if (Emojis.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.emojis[i] = new Emojis(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.id);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.name == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nameTmp = this.name.getBytes(StandardCharsets.UTF_8);
output.writeInt(nameTmp.length);
output.write(nameTmp);
}
if (this.thumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.thumbnail.serialize(output);
}
output.writeBoolean(this.isInstalled);
output.writeBoolean(this.isArchived);
output.writeBoolean(this.isOfficial);
output.writeBoolean(this.isAnimated);
output.writeBoolean(this.isMasks);
output.writeBoolean(this.isViewed);
if (this.stickers == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.stickers.length);
for (int i = 0; i < this.stickers.length; i++) {
this.stickers[i].serialize(output);
}
}
if (this.emojis == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.emojis.length);
for (int i = 0; i < this.emojis.length; i++) {
this.emojis[i].serialize(output);
}
}
}
}
public static class StickerSetInfo extends Object {
public long id;
public String title;
public String name;
public PhotoSize thumbnail;
public boolean isInstalled;
public boolean isArchived;
public boolean isOfficial;
public boolean isAnimated;
public boolean isMasks;
public boolean isViewed;
public int size;
public Sticker[] covers;
public static final int CONSTRUCTOR = 228054782;
public StickerSetInfo() {}
public StickerSetInfo(long id, String title, String name, PhotoSize thumbnail, boolean isInstalled, boolean isArchived, boolean isOfficial, boolean isAnimated, boolean isMasks, boolean isViewed, int size, Sticker[] covers) {
this.id = id;
this.title = title;
this.name = name;
this.thumbnail = thumbnail;
this.isInstalled = isInstalled;
this.isArchived = isArchived;
this.isOfficial = isOfficial;
this.isAnimated = isAnimated;
this.isMasks = isMasks;
this.isViewed = isViewed;
this.size = size;
this.covers = covers;
}
public StickerSetInfo(DataInput input) throws IOException {
this.id = input.readLong();
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var nameTmp = new byte[input.readInt()];
input.readFully(nameTmp);
this.name = new String(nameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (PhotoSize.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.thumbnail = new PhotoSize(input);
}
this.isInstalled = input.readBoolean();
this.isArchived = input.readBoolean();
this.isOfficial = input.readBoolean();
this.isAnimated = input.readBoolean();
this.isMasks = input.readBoolean();
this.isViewed = input.readBoolean();
this.size = input.readInt();
if (input.readBoolean()) {
this.covers = new Sticker[input.readInt()];
for (int i = 0; i < this.covers.length; i++) {
if (Sticker.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.covers[i] = new Sticker(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.id);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.name == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nameTmp = this.name.getBytes(StandardCharsets.UTF_8);
output.writeInt(nameTmp.length);
output.write(nameTmp);
}
if (this.thumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.thumbnail.serialize(output);
}
output.writeBoolean(this.isInstalled);
output.writeBoolean(this.isArchived);
output.writeBoolean(this.isOfficial);
output.writeBoolean(this.isAnimated);
output.writeBoolean(this.isMasks);
output.writeBoolean(this.isViewed);
output.writeInt(this.size);
if (this.covers == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.covers.length);
for (int i = 0; i < this.covers.length; i++) {
this.covers[i].serialize(output);
}
}
}
}
public static class StickerSets extends Object {
public int totalCount;
public StickerSetInfo[] sets;
public static final int CONSTRUCTOR = -1883828812;
public StickerSets() {}
public StickerSets(int totalCount, StickerSetInfo[] sets) {
this.totalCount = totalCount;
this.sets = sets;
}
public StickerSets(DataInput input) throws IOException {
this.totalCount = input.readInt();
if (input.readBoolean()) {
this.sets = new StickerSetInfo[input.readInt()];
for (int i = 0; i < this.sets.length; i++) {
if (StickerSetInfo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.sets[i] = new StickerSetInfo(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.totalCount);
if (this.sets == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.sets.length);
for (int i = 0; i < this.sets.length; i++) {
this.sets[i].serialize(output);
}
}
}
}
public static class Stickers extends Object {
public Sticker[] stickers;
public static final int CONSTRUCTOR = 1974859260;
public Stickers() {}
public Stickers(Sticker[] stickers) {
this.stickers = stickers;
}
public Stickers(DataInput input) throws IOException {
if (input.readBoolean()) {
this.stickers = new Sticker[input.readInt()];
for (int i = 0; i < this.stickers.length; i++) {
if (Sticker.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.stickers[i] = new Sticker(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.stickers == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.stickers.length);
for (int i = 0; i < this.stickers.length; i++) {
this.stickers[i].serialize(output);
}
}
}
}
public static class StorageStatistics extends Object {
public long size;
public int count;
public StorageStatisticsByChat[] byChat;
public static final int CONSTRUCTOR = 217237013;
public StorageStatistics() {}
public StorageStatistics(long size, int count, StorageStatisticsByChat[] byChat) {
this.size = size;
this.count = count;
this.byChat = byChat;
}
public StorageStatistics(DataInput input) throws IOException {
this.size = input.readLong();
this.count = input.readInt();
if (input.readBoolean()) {
this.byChat = new StorageStatisticsByChat[input.readInt()];
for (int i = 0; i < this.byChat.length; i++) {
if (StorageStatisticsByChat.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.byChat[i] = new StorageStatisticsByChat(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.size);
output.writeInt(this.count);
if (this.byChat == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.byChat.length);
for (int i = 0; i < this.byChat.length; i++) {
this.byChat[i].serialize(output);
}
}
}
}
public static class StorageStatisticsByChat extends Object {
public long chatId;
public long size;
public int count;
public StorageStatisticsByFileType[] byFileType;
public static final int CONSTRUCTOR = 635434531;
public StorageStatisticsByChat() {}
public StorageStatisticsByChat(long chatId, long size, int count, StorageStatisticsByFileType[] byFileType) {
this.chatId = chatId;
this.size = size;
this.count = count;
this.byFileType = byFileType;
}
public StorageStatisticsByChat(DataInput input) throws IOException {
this.chatId = input.readLong();
this.size = input.readLong();
this.count = input.readInt();
if (input.readBoolean()) {
this.byFileType = new StorageStatisticsByFileType[input.readInt()];
for (int i = 0; i < this.byFileType.length; i++) {
if (StorageStatisticsByFileType.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.byFileType[i] = new StorageStatisticsByFileType(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.size);
output.writeInt(this.count);
if (this.byFileType == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.byFileType.length);
for (int i = 0; i < this.byFileType.length; i++) {
this.byFileType[i].serialize(output);
}
}
}
}
public static class StorageStatisticsByFileType extends Object {
public FileType fileType;
public long size;
public int count;
public static final int CONSTRUCTOR = 714012840;
public StorageStatisticsByFileType() {}
public StorageStatisticsByFileType(FileType fileType, long size, int count) {
this.fileType = fileType;
this.size = size;
this.count = count;
}
public StorageStatisticsByFileType(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case FileTypeNone.CONSTRUCTOR:
this.fileType = new FileTypeNone(input);
break;
case FileTypeAnimation.CONSTRUCTOR:
this.fileType = new FileTypeAnimation(input);
break;
case FileTypeAudio.CONSTRUCTOR:
this.fileType = new FileTypeAudio(input);
break;
case FileTypeDocument.CONSTRUCTOR:
this.fileType = new FileTypeDocument(input);
break;
case FileTypePhoto.CONSTRUCTOR:
this.fileType = new FileTypePhoto(input);
break;
case FileTypeProfilePhoto.CONSTRUCTOR:
this.fileType = new FileTypeProfilePhoto(input);
break;
case FileTypeSecret.CONSTRUCTOR:
this.fileType = new FileTypeSecret(input);
break;
case FileTypeSecretThumbnail.CONSTRUCTOR:
this.fileType = new FileTypeSecretThumbnail(input);
break;
case FileTypeSecure.CONSTRUCTOR:
this.fileType = new FileTypeSecure(input);
break;
case FileTypeSticker.CONSTRUCTOR:
this.fileType = new FileTypeSticker(input);
break;
case FileTypeThumbnail.CONSTRUCTOR:
this.fileType = new FileTypeThumbnail(input);
break;
case FileTypeUnknown.CONSTRUCTOR:
this.fileType = new FileTypeUnknown(input);
break;
case FileTypeVideo.CONSTRUCTOR:
this.fileType = new FileTypeVideo(input);
break;
case FileTypeVideoNote.CONSTRUCTOR:
this.fileType = new FileTypeVideoNote(input);
break;
case FileTypeVoiceNote.CONSTRUCTOR:
this.fileType = new FileTypeVoiceNote(input);
break;
case FileTypeWallpaper.CONSTRUCTOR:
this.fileType = new FileTypeWallpaper(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.size = input.readLong();
this.count = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.fileType == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.fileType.serialize(output);
}
output.writeLong(this.size);
output.writeInt(this.count);
}
}
public static class StorageStatisticsFast extends Object {
public long filesSize;
public int fileCount;
public long databaseSize;
public long languagePackDatabaseSize;
public long logSize;
public static final int CONSTRUCTOR = -884922271;
public StorageStatisticsFast() {}
public StorageStatisticsFast(long filesSize, int fileCount, long databaseSize, long languagePackDatabaseSize, long logSize) {
this.filesSize = filesSize;
this.fileCount = fileCount;
this.databaseSize = databaseSize;
this.languagePackDatabaseSize = languagePackDatabaseSize;
this.logSize = logSize;
}
public StorageStatisticsFast(DataInput input) throws IOException {
this.filesSize = input.readLong();
this.fileCount = input.readInt();
this.databaseSize = input.readLong();
this.languagePackDatabaseSize = input.readLong();
this.logSize = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.filesSize);
output.writeInt(this.fileCount);
output.writeLong(this.databaseSize);
output.writeLong(this.languagePackDatabaseSize);
output.writeLong(this.logSize);
}
}
public static class Supergroup extends Object {
public int id;
public String username;
public int date;
public ChatMemberStatus status;
public int memberCount;
public boolean hasLinkedChat;
public boolean hasLocation;
public boolean signMessages;
public boolean isSlowModeEnabled;
public boolean isChannel;
public boolean isVerified;
public String restrictionReason;
public boolean isScam;
public static final int CONSTRUCTOR = -103091;
public Supergroup() {}
public Supergroup(int id, String username, int date, ChatMemberStatus status, int memberCount, boolean hasLinkedChat, boolean hasLocation, boolean signMessages, boolean isSlowModeEnabled, boolean isChannel, boolean isVerified, String restrictionReason, boolean isScam) {
this.id = id;
this.username = username;
this.date = date;
this.status = status;
this.memberCount = memberCount;
this.hasLinkedChat = hasLinkedChat;
this.hasLocation = hasLocation;
this.signMessages = signMessages;
this.isSlowModeEnabled = isSlowModeEnabled;
this.isChannel = isChannel;
this.isVerified = isVerified;
this.restrictionReason = restrictionReason;
this.isScam = isScam;
}
public Supergroup(DataInput input) throws IOException {
this.id = input.readInt();
if (input.readBoolean()) {
var usernameTmp = new byte[input.readInt()];
input.readFully(usernameTmp);
this.username = new String(usernameTmp, StandardCharsets.UTF_8);
}
this.date = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatMemberStatusCreator.CONSTRUCTOR:
this.status = new ChatMemberStatusCreator(input);
break;
case ChatMemberStatusAdministrator.CONSTRUCTOR:
this.status = new ChatMemberStatusAdministrator(input);
break;
case ChatMemberStatusMember.CONSTRUCTOR:
this.status = new ChatMemberStatusMember(input);
break;
case ChatMemberStatusRestricted.CONSTRUCTOR:
this.status = new ChatMemberStatusRestricted(input);
break;
case ChatMemberStatusLeft.CONSTRUCTOR:
this.status = new ChatMemberStatusLeft(input);
break;
case ChatMemberStatusBanned.CONSTRUCTOR:
this.status = new ChatMemberStatusBanned(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.memberCount = input.readInt();
this.hasLinkedChat = input.readBoolean();
this.hasLocation = input.readBoolean();
this.signMessages = input.readBoolean();
this.isSlowModeEnabled = input.readBoolean();
this.isChannel = input.readBoolean();
this.isVerified = input.readBoolean();
if (input.readBoolean()) {
var restrictionReasonTmp = new byte[input.readInt()];
input.readFully(restrictionReasonTmp);
this.restrictionReason = new String(restrictionReasonTmp, StandardCharsets.UTF_8);
}
this.isScam = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.id);
if (this.username == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var usernameTmp = this.username.getBytes(StandardCharsets.UTF_8);
output.writeInt(usernameTmp.length);
output.write(usernameTmp);
}
output.writeInt(this.date);
if (this.status == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.status.serialize(output);
}
output.writeInt(this.memberCount);
output.writeBoolean(this.hasLinkedChat);
output.writeBoolean(this.hasLocation);
output.writeBoolean(this.signMessages);
output.writeBoolean(this.isSlowModeEnabled);
output.writeBoolean(this.isChannel);
output.writeBoolean(this.isVerified);
if (this.restrictionReason == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var restrictionReasonTmp = this.restrictionReason.getBytes(StandardCharsets.UTF_8);
output.writeInt(restrictionReasonTmp.length);
output.write(restrictionReasonTmp);
}
output.writeBoolean(this.isScam);
}
}
public static class SupergroupFullInfo extends Object {
public String description;
public int memberCount;
public int administratorCount;
public int restrictedCount;
public int bannedCount;
public long linkedChatId;
public int slowModeDelay;
public double slowModeDelayExpiresIn;
public boolean canGetMembers;
public boolean canSetUsername;
public boolean canSetStickerSet;
public boolean canSetLocation;
public boolean canViewStatistics;
public boolean isAllHistoryAvailable;
public long stickerSetId;
public ChatLocation location;
public String inviteLink;
public int upgradedFromBasicGroupId;
public long upgradedFromMaxMessageId;
public static final int CONSTRUCTOR = -1562832718;
public SupergroupFullInfo() {}
public SupergroupFullInfo(String description, int memberCount, int administratorCount, int restrictedCount, int bannedCount, long linkedChatId, int slowModeDelay, double slowModeDelayExpiresIn, boolean canGetMembers, boolean canSetUsername, boolean canSetStickerSet, boolean canSetLocation, boolean canViewStatistics, boolean isAllHistoryAvailable, long stickerSetId, ChatLocation location, String inviteLink, int upgradedFromBasicGroupId, long upgradedFromMaxMessageId) {
this.description = description;
this.memberCount = memberCount;
this.administratorCount = administratorCount;
this.restrictedCount = restrictedCount;
this.bannedCount = bannedCount;
this.linkedChatId = linkedChatId;
this.slowModeDelay = slowModeDelay;
this.slowModeDelayExpiresIn = slowModeDelayExpiresIn;
this.canGetMembers = canGetMembers;
this.canSetUsername = canSetUsername;
this.canSetStickerSet = canSetStickerSet;
this.canSetLocation = canSetLocation;
this.canViewStatistics = canViewStatistics;
this.isAllHistoryAvailable = isAllHistoryAvailable;
this.stickerSetId = stickerSetId;
this.location = location;
this.inviteLink = inviteLink;
this.upgradedFromBasicGroupId = upgradedFromBasicGroupId;
this.upgradedFromMaxMessageId = upgradedFromMaxMessageId;
}
public SupergroupFullInfo(DataInput input) throws IOException {
if (input.readBoolean()) {
var descriptionTmp = new byte[input.readInt()];
input.readFully(descriptionTmp);
this.description = new String(descriptionTmp, StandardCharsets.UTF_8);
}
this.memberCount = input.readInt();
this.administratorCount = input.readInt();
this.restrictedCount = input.readInt();
this.bannedCount = input.readInt();
this.linkedChatId = input.readLong();
this.slowModeDelay = input.readInt();
this.slowModeDelayExpiresIn = input.readDouble();
this.canGetMembers = input.readBoolean();
this.canSetUsername = input.readBoolean();
this.canSetStickerSet = input.readBoolean();
this.canSetLocation = input.readBoolean();
this.canViewStatistics = input.readBoolean();
this.isAllHistoryAvailable = input.readBoolean();
this.stickerSetId = input.readLong();
if (input.readBoolean()) {
if (ChatLocation.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.location = new ChatLocation(input);
}
if (input.readBoolean()) {
var inviteLinkTmp = new byte[input.readInt()];
input.readFully(inviteLinkTmp);
this.inviteLink = new String(inviteLinkTmp, StandardCharsets.UTF_8);
}
this.upgradedFromBasicGroupId = input.readInt();
this.upgradedFromMaxMessageId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.description == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var descriptionTmp = this.description.getBytes(StandardCharsets.UTF_8);
output.writeInt(descriptionTmp.length);
output.write(descriptionTmp);
}
output.writeInt(this.memberCount);
output.writeInt(this.administratorCount);
output.writeInt(this.restrictedCount);
output.writeInt(this.bannedCount);
output.writeLong(this.linkedChatId);
output.writeInt(this.slowModeDelay);
output.writeDouble(this.slowModeDelayExpiresIn);
output.writeBoolean(this.canGetMembers);
output.writeBoolean(this.canSetUsername);
output.writeBoolean(this.canSetStickerSet);
output.writeBoolean(this.canSetLocation);
output.writeBoolean(this.canViewStatistics);
output.writeBoolean(this.isAllHistoryAvailable);
output.writeLong(this.stickerSetId);
if (this.location == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.location.serialize(output);
}
if (this.inviteLink == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var inviteLinkTmp = this.inviteLink.getBytes(StandardCharsets.UTF_8);
output.writeInt(inviteLinkTmp.length);
output.write(inviteLinkTmp);
}
output.writeInt(this.upgradedFromBasicGroupId);
output.writeLong(this.upgradedFromMaxMessageId);
}
}
public static class SupergroupMembersFilterRecent extends SupergroupMembersFilter {
public static final int CONSTRUCTOR = 1178199509;
public SupergroupMembersFilterRecent() {}
public SupergroupMembersFilterRecent(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class SupergroupMembersFilterContacts extends SupergroupMembersFilter {
public String query;
public static final int CONSTRUCTOR = -1282910856;
public SupergroupMembersFilterContacts() {}
public SupergroupMembersFilterContacts(String query) {
this.query = query;
}
public SupergroupMembersFilterContacts(DataInput input) throws IOException {
if (input.readBoolean()) {
var queryTmp = new byte[input.readInt()];
input.readFully(queryTmp);
this.query = new String(queryTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.query == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var queryTmp = this.query.getBytes(StandardCharsets.UTF_8);
output.writeInt(queryTmp.length);
output.write(queryTmp);
}
}
}
public static class SupergroupMembersFilterAdministrators extends SupergroupMembersFilter {
public static final int CONSTRUCTOR = -2097380265;
public SupergroupMembersFilterAdministrators() {}
public SupergroupMembersFilterAdministrators(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class SupergroupMembersFilterSearch extends SupergroupMembersFilter {
public String query;
public static final int CONSTRUCTOR = -1696358469;
public SupergroupMembersFilterSearch() {}
public SupergroupMembersFilterSearch(String query) {
this.query = query;
}
public SupergroupMembersFilterSearch(DataInput input) throws IOException {
if (input.readBoolean()) {
var queryTmp = new byte[input.readInt()];
input.readFully(queryTmp);
this.query = new String(queryTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.query == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var queryTmp = this.query.getBytes(StandardCharsets.UTF_8);
output.writeInt(queryTmp.length);
output.write(queryTmp);
}
}
}
public static class SupergroupMembersFilterRestricted extends SupergroupMembersFilter {
public String query;
public static final int CONSTRUCTOR = -1107800034;
public SupergroupMembersFilterRestricted() {}
public SupergroupMembersFilterRestricted(String query) {
this.query = query;
}
public SupergroupMembersFilterRestricted(DataInput input) throws IOException {
if (input.readBoolean()) {
var queryTmp = new byte[input.readInt()];
input.readFully(queryTmp);
this.query = new String(queryTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.query == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var queryTmp = this.query.getBytes(StandardCharsets.UTF_8);
output.writeInt(queryTmp.length);
output.write(queryTmp);
}
}
}
public static class SupergroupMembersFilterBanned extends SupergroupMembersFilter {
public String query;
public static final int CONSTRUCTOR = -1210621683;
public SupergroupMembersFilterBanned() {}
public SupergroupMembersFilterBanned(String query) {
this.query = query;
}
public SupergroupMembersFilterBanned(DataInput input) throws IOException {
if (input.readBoolean()) {
var queryTmp = new byte[input.readInt()];
input.readFully(queryTmp);
this.query = new String(queryTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.query == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var queryTmp = this.query.getBytes(StandardCharsets.UTF_8);
output.writeInt(queryTmp.length);
output.write(queryTmp);
}
}
}
public static class SupergroupMembersFilterBots extends SupergroupMembersFilter {
public static final int CONSTRUCTOR = 492138918;
public SupergroupMembersFilterBots() {}
public SupergroupMembersFilterBots(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TMeUrl extends Object {
public String url;
public TMeUrlType type;
public static final int CONSTRUCTOR = -1140786622;
public TMeUrl() {}
public TMeUrl(String url, TMeUrlType type) {
this.url = url;
this.type = type;
}
public TMeUrl(DataInput input) throws IOException {
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case TMeUrlTypeUser.CONSTRUCTOR:
this.type = new TMeUrlTypeUser(input);
break;
case TMeUrlTypeSupergroup.CONSTRUCTOR:
this.type = new TMeUrlTypeSupergroup(input);
break;
case TMeUrlTypeChatInvite.CONSTRUCTOR:
this.type = new TMeUrlTypeChatInvite(input);
break;
case TMeUrlTypeStickerSet.CONSTRUCTOR:
this.type = new TMeUrlTypeStickerSet(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
}
}
public static class TMeUrlTypeUser extends TMeUrlType {
public int userId;
public static final int CONSTRUCTOR = -1198700130;
public TMeUrlTypeUser() {}
public TMeUrlTypeUser(int userId) {
this.userId = userId;
}
public TMeUrlTypeUser(DataInput input) throws IOException {
this.userId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
}
}
public static class TMeUrlTypeSupergroup extends TMeUrlType {
public long supergroupId;
public static final int CONSTRUCTOR = -1353369944;
public TMeUrlTypeSupergroup() {}
public TMeUrlTypeSupergroup(long supergroupId) {
this.supergroupId = supergroupId;
}
public TMeUrlTypeSupergroup(DataInput input) throws IOException {
this.supergroupId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.supergroupId);
}
}
public static class TMeUrlTypeChatInvite extends TMeUrlType {
public ChatInviteLinkInfo info;
public static final int CONSTRUCTOR = 313907785;
public TMeUrlTypeChatInvite() {}
public TMeUrlTypeChatInvite(ChatInviteLinkInfo info) {
this.info = info;
}
public TMeUrlTypeChatInvite(DataInput input) throws IOException {
if (input.readBoolean()) {
if (ChatInviteLinkInfo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.info = new ChatInviteLinkInfo(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.info == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.info.serialize(output);
}
}
}
public static class TMeUrlTypeStickerSet extends TMeUrlType {
public long stickerSetId;
public static final int CONSTRUCTOR = 1602473196;
public TMeUrlTypeStickerSet() {}
public TMeUrlTypeStickerSet(long stickerSetId) {
this.stickerSetId = stickerSetId;
}
public TMeUrlTypeStickerSet(DataInput input) throws IOException {
this.stickerSetId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.stickerSetId);
}
}
public static class TMeUrls extends Object {
public TMeUrl[] urls;
public static final int CONSTRUCTOR = -1130595098;
public TMeUrls() {}
public TMeUrls(TMeUrl[] urls) {
this.urls = urls;
}
public TMeUrls(DataInput input) throws IOException {
if (input.readBoolean()) {
this.urls = new TMeUrl[input.readInt()];
for (int i = 0; i < this.urls.length; i++) {
if (TMeUrl.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.urls[i] = new TMeUrl(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.urls == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.urls.length);
for (int i = 0; i < this.urls.length; i++) {
this.urls[i].serialize(output);
}
}
}
}
public static class TdlibParameters extends Object {
public boolean useTestDc;
public String databaseDirectory;
public String filesDirectory;
public boolean useFileDatabase;
public boolean useChatInfoDatabase;
public boolean useMessageDatabase;
public boolean useSecretChats;
public int apiId;
public String apiHash;
public String systemLanguageCode;
public String deviceModel;
public String systemVersion;
public String applicationVersion;
public boolean enableStorageOptimizer;
public boolean ignoreFileNames;
public static final int CONSTRUCTOR = -761520773;
public TdlibParameters() {}
public TdlibParameters(boolean useTestDc, String databaseDirectory, String filesDirectory, boolean useFileDatabase, boolean useChatInfoDatabase, boolean useMessageDatabase, boolean useSecretChats, int apiId, String apiHash, String systemLanguageCode, String deviceModel, String systemVersion, String applicationVersion, boolean enableStorageOptimizer, boolean ignoreFileNames) {
this.useTestDc = useTestDc;
this.databaseDirectory = databaseDirectory;
this.filesDirectory = filesDirectory;
this.useFileDatabase = useFileDatabase;
this.useChatInfoDatabase = useChatInfoDatabase;
this.useMessageDatabase = useMessageDatabase;
this.useSecretChats = useSecretChats;
this.apiId = apiId;
this.apiHash = apiHash;
this.systemLanguageCode = systemLanguageCode;
this.deviceModel = deviceModel;
this.systemVersion = systemVersion;
this.applicationVersion = applicationVersion;
this.enableStorageOptimizer = enableStorageOptimizer;
this.ignoreFileNames = ignoreFileNames;
}
public TdlibParameters(DataInput input) throws IOException {
this.useTestDc = input.readBoolean();
if (input.readBoolean()) {
var databaseDirectoryTmp = new byte[input.readInt()];
input.readFully(databaseDirectoryTmp);
this.databaseDirectory = new String(databaseDirectoryTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var filesDirectoryTmp = new byte[input.readInt()];
input.readFully(filesDirectoryTmp);
this.filesDirectory = new String(filesDirectoryTmp, StandardCharsets.UTF_8);
}
this.useFileDatabase = input.readBoolean();
this.useChatInfoDatabase = input.readBoolean();
this.useMessageDatabase = input.readBoolean();
this.useSecretChats = input.readBoolean();
this.apiId = input.readInt();
if (input.readBoolean()) {
var apiHashTmp = new byte[input.readInt()];
input.readFully(apiHashTmp);
this.apiHash = new String(apiHashTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var systemLanguageCodeTmp = new byte[input.readInt()];
input.readFully(systemLanguageCodeTmp);
this.systemLanguageCode = new String(systemLanguageCodeTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var deviceModelTmp = new byte[input.readInt()];
input.readFully(deviceModelTmp);
this.deviceModel = new String(deviceModelTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var systemVersionTmp = new byte[input.readInt()];
input.readFully(systemVersionTmp);
this.systemVersion = new String(systemVersionTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var applicationVersionTmp = new byte[input.readInt()];
input.readFully(applicationVersionTmp);
this.applicationVersion = new String(applicationVersionTmp, StandardCharsets.UTF_8);
}
this.enableStorageOptimizer = input.readBoolean();
this.ignoreFileNames = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.useTestDc);
if (this.databaseDirectory == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var databaseDirectoryTmp = this.databaseDirectory.getBytes(StandardCharsets.UTF_8);
output.writeInt(databaseDirectoryTmp.length);
output.write(databaseDirectoryTmp);
}
if (this.filesDirectory == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var filesDirectoryTmp = this.filesDirectory.getBytes(StandardCharsets.UTF_8);
output.writeInt(filesDirectoryTmp.length);
output.write(filesDirectoryTmp);
}
output.writeBoolean(this.useFileDatabase);
output.writeBoolean(this.useChatInfoDatabase);
output.writeBoolean(this.useMessageDatabase);
output.writeBoolean(this.useSecretChats);
output.writeInt(this.apiId);
if (this.apiHash == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var apiHashTmp = this.apiHash.getBytes(StandardCharsets.UTF_8);
output.writeInt(apiHashTmp.length);
output.write(apiHashTmp);
}
if (this.systemLanguageCode == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var systemLanguageCodeTmp = this.systemLanguageCode.getBytes(StandardCharsets.UTF_8);
output.writeInt(systemLanguageCodeTmp.length);
output.write(systemLanguageCodeTmp);
}
if (this.deviceModel == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var deviceModelTmp = this.deviceModel.getBytes(StandardCharsets.UTF_8);
output.writeInt(deviceModelTmp.length);
output.write(deviceModelTmp);
}
if (this.systemVersion == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var systemVersionTmp = this.systemVersion.getBytes(StandardCharsets.UTF_8);
output.writeInt(systemVersionTmp.length);
output.write(systemVersionTmp);
}
if (this.applicationVersion == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var applicationVersionTmp = this.applicationVersion.getBytes(StandardCharsets.UTF_8);
output.writeInt(applicationVersionTmp.length);
output.write(applicationVersionTmp);
}
output.writeBoolean(this.enableStorageOptimizer);
output.writeBoolean(this.ignoreFileNames);
}
}
public static class TemporaryPasswordState extends Object {
public boolean hasPassword;
public int validFor;
public static final int CONSTRUCTOR = 939837410;
public TemporaryPasswordState() {}
public TemporaryPasswordState(boolean hasPassword, int validFor) {
this.hasPassword = hasPassword;
this.validFor = validFor;
}
public TemporaryPasswordState(DataInput input) throws IOException {
this.hasPassword = input.readBoolean();
this.validFor = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.hasPassword);
output.writeInt(this.validFor);
}
}
public static class TermsOfService extends Object {
public FormattedText text;
public int minUserAge;
public boolean showPopup;
public static final int CONSTRUCTOR = 739422597;
public TermsOfService() {}
public TermsOfService(FormattedText text, int minUserAge, boolean showPopup) {
this.text = text;
this.minUserAge = minUserAge;
this.showPopup = showPopup;
}
public TermsOfService(DataInput input) throws IOException {
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.text = new FormattedText(input);
}
this.minUserAge = input.readInt();
this.showPopup = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
output.writeInt(this.minUserAge);
output.writeBoolean(this.showPopup);
}
}
public static class TestBytes extends Object {
public byte[] value;
public static final int CONSTRUCTOR = -1541225250;
public TestBytes() {}
public TestBytes(byte[] value) {
this.value = value;
}
public TestBytes(DataInput input) throws IOException {
if (input.readBoolean()) {
this.value = new byte[input.readInt()];
input.readFully(this.value);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.value == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.value.length);
output.write(this.value);
}
}
}
public static class TestInt extends Object {
public int value;
public static final int CONSTRUCTOR = -574804983;
public TestInt() {}
public TestInt(int value) {
this.value = value;
}
public TestInt(DataInput input) throws IOException {
this.value = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.value);
}
}
public static class TestString extends Object {
public String value;
public static final int CONSTRUCTOR = -27891572;
public TestString() {}
public TestString(String value) {
this.value = value;
}
public TestString(DataInput input) throws IOException {
if (input.readBoolean()) {
var valueTmp = new byte[input.readInt()];
input.readFully(valueTmp);
this.value = new String(valueTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.value == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var valueTmp = this.value.getBytes(StandardCharsets.UTF_8);
output.writeInt(valueTmp.length);
output.write(valueTmp);
}
}
}
public static class TestVectorInt extends Object {
public int[] value;
public static final int CONSTRUCTOR = 593682027;
public TestVectorInt() {}
public TestVectorInt(int[] value) {
this.value = value;
}
public TestVectorInt(DataInput input) throws IOException {
if (input.readBoolean()) {
this.value = new int[input.readInt()];
for (int i = 0; i < this.value.length; i++) {
this.value[i] = input.readInt();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.value == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.value.length);
for (int i = 0; i < this.value.length; i++) {
output.writeInt(this.value[i]);
}
}
}
}
public static class TestVectorIntObject extends Object {
public TestInt[] value;
public static final int CONSTRUCTOR = 125891546;
public TestVectorIntObject() {}
public TestVectorIntObject(TestInt[] value) {
this.value = value;
}
public TestVectorIntObject(DataInput input) throws IOException {
if (input.readBoolean()) {
this.value = new TestInt[input.readInt()];
for (int i = 0; i < this.value.length; i++) {
if (TestInt.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.value[i] = new TestInt(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.value == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.value.length);
for (int i = 0; i < this.value.length; i++) {
this.value[i].serialize(output);
}
}
}
}
public static class TestVectorString extends Object {
public String[] value;
public static final int CONSTRUCTOR = 79339995;
public TestVectorString() {}
public TestVectorString(String[] value) {
this.value = value;
}
public TestVectorString(DataInput input) throws IOException {
if (input.readBoolean()) {
this.value = new String[input.readInt()];
for (int i = 0; i < this.value.length; i++) {
var valueTmp = new byte[input.readInt()];
input.readFully(valueTmp);
this.value[i] = new String(valueTmp, StandardCharsets.UTF_8);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.value == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.value.length);
for (int i = 0; i < this.value.length; i++) {
var valueTmp = this.value[i].getBytes(StandardCharsets.UTF_8);
output.writeInt(valueTmp.length);
output.write(valueTmp);
}
}
}
}
public static class TestVectorStringObject extends Object {
public TestString[] value;
public static final int CONSTRUCTOR = 80780537;
public TestVectorStringObject() {}
public TestVectorStringObject(TestString[] value) {
this.value = value;
}
public TestVectorStringObject(DataInput input) throws IOException {
if (input.readBoolean()) {
this.value = new TestString[input.readInt()];
for (int i = 0; i < this.value.length; i++) {
if (TestString.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.value[i] = new TestString(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.value == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.value.length);
for (int i = 0; i < this.value.length; i++) {
this.value[i].serialize(output);
}
}
}
}
public static class Text extends Object {
public String text;
public static final int CONSTRUCTOR = 578181272;
public Text() {}
public Text(String text) {
this.text = text;
}
public Text(DataInput input) throws IOException {
if (input.readBoolean()) {
var textTmp = new byte[input.readInt()];
input.readFully(textTmp);
this.text = new String(textTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var textTmp = this.text.getBytes(StandardCharsets.UTF_8);
output.writeInt(textTmp.length);
output.write(textTmp);
}
}
}
public static class TextEntities extends Object {
public TextEntity[] entities;
public static final int CONSTRUCTOR = -933199172;
public TextEntities() {}
public TextEntities(TextEntity[] entities) {
this.entities = entities;
}
public TextEntities(DataInput input) throws IOException {
if (input.readBoolean()) {
this.entities = new TextEntity[input.readInt()];
for (int i = 0; i < this.entities.length; i++) {
if (TextEntity.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.entities[i] = new TextEntity(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.entities == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.entities.length);
for (int i = 0; i < this.entities.length; i++) {
this.entities[i].serialize(output);
}
}
}
}
public static class TextEntity extends Object {
public int offset;
public int length;
public TextEntityType type;
public static final int CONSTRUCTOR = -1951688280;
public TextEntity() {}
public TextEntity(int offset, int length, TextEntityType type) {
this.offset = offset;
this.length = length;
this.type = type;
}
public TextEntity(DataInput input) throws IOException {
this.offset = input.readInt();
this.length = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case TextEntityTypeMention.CONSTRUCTOR:
this.type = new TextEntityTypeMention(input);
break;
case TextEntityTypeHashtag.CONSTRUCTOR:
this.type = new TextEntityTypeHashtag(input);
break;
case TextEntityTypeCashtag.CONSTRUCTOR:
this.type = new TextEntityTypeCashtag(input);
break;
case TextEntityTypeBotCommand.CONSTRUCTOR:
this.type = new TextEntityTypeBotCommand(input);
break;
case TextEntityTypeUrl.CONSTRUCTOR:
this.type = new TextEntityTypeUrl(input);
break;
case TextEntityTypeEmailAddress.CONSTRUCTOR:
this.type = new TextEntityTypeEmailAddress(input);
break;
case TextEntityTypePhoneNumber.CONSTRUCTOR:
this.type = new TextEntityTypePhoneNumber(input);
break;
case TextEntityTypeBankCardNumber.CONSTRUCTOR:
this.type = new TextEntityTypeBankCardNumber(input);
break;
case TextEntityTypeBold.CONSTRUCTOR:
this.type = new TextEntityTypeBold(input);
break;
case TextEntityTypeItalic.CONSTRUCTOR:
this.type = new TextEntityTypeItalic(input);
break;
case TextEntityTypeUnderline.CONSTRUCTOR:
this.type = new TextEntityTypeUnderline(input);
break;
case TextEntityTypeStrikethrough.CONSTRUCTOR:
this.type = new TextEntityTypeStrikethrough(input);
break;
case TextEntityTypeCode.CONSTRUCTOR:
this.type = new TextEntityTypeCode(input);
break;
case TextEntityTypePre.CONSTRUCTOR:
this.type = new TextEntityTypePre(input);
break;
case TextEntityTypePreCode.CONSTRUCTOR:
this.type = new TextEntityTypePreCode(input);
break;
case TextEntityTypeTextUrl.CONSTRUCTOR:
this.type = new TextEntityTypeTextUrl(input);
break;
case TextEntityTypeMentionName.CONSTRUCTOR:
this.type = new TextEntityTypeMentionName(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.offset);
output.writeInt(this.length);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
}
}
public static class TextEntityTypeMention extends TextEntityType {
public static final int CONSTRUCTOR = 934535013;
public TextEntityTypeMention() {}
public TextEntityTypeMention(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TextEntityTypeHashtag extends TextEntityType {
public static final int CONSTRUCTOR = -1023958307;
public TextEntityTypeHashtag() {}
public TextEntityTypeHashtag(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TextEntityTypeCashtag extends TextEntityType {
public static final int CONSTRUCTOR = 1222915915;
public TextEntityTypeCashtag() {}
public TextEntityTypeCashtag(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TextEntityTypeBotCommand extends TextEntityType {
public static final int CONSTRUCTOR = -1150997581;
public TextEntityTypeBotCommand() {}
public TextEntityTypeBotCommand(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TextEntityTypeUrl extends TextEntityType {
public static final int CONSTRUCTOR = -1312762756;
public TextEntityTypeUrl() {}
public TextEntityTypeUrl(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TextEntityTypeEmailAddress extends TextEntityType {
public static final int CONSTRUCTOR = 1425545249;
public TextEntityTypeEmailAddress() {}
public TextEntityTypeEmailAddress(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TextEntityTypePhoneNumber extends TextEntityType {
public static final int CONSTRUCTOR = -1160140246;
public TextEntityTypePhoneNumber() {}
public TextEntityTypePhoneNumber(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TextEntityTypeBankCardNumber extends TextEntityType {
public static final int CONSTRUCTOR = 105986320;
public TextEntityTypeBankCardNumber() {}
public TextEntityTypeBankCardNumber(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TextEntityTypeBold extends TextEntityType {
public static final int CONSTRUCTOR = -1128210000;
public TextEntityTypeBold() {}
public TextEntityTypeBold(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TextEntityTypeItalic extends TextEntityType {
public static final int CONSTRUCTOR = -118253987;
public TextEntityTypeItalic() {}
public TextEntityTypeItalic(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TextEntityTypeUnderline extends TextEntityType {
public static final int CONSTRUCTOR = 792317842;
public TextEntityTypeUnderline() {}
public TextEntityTypeUnderline(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TextEntityTypeStrikethrough extends TextEntityType {
public static final int CONSTRUCTOR = 961529082;
public TextEntityTypeStrikethrough() {}
public TextEntityTypeStrikethrough(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TextEntityTypeCode extends TextEntityType {
public static final int CONSTRUCTOR = -974534326;
public TextEntityTypeCode() {}
public TextEntityTypeCode(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TextEntityTypePre extends TextEntityType {
public static final int CONSTRUCTOR = 1648958606;
public TextEntityTypePre() {}
public TextEntityTypePre(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TextEntityTypePreCode extends TextEntityType {
public String language;
public static final int CONSTRUCTOR = -945325397;
public TextEntityTypePreCode() {}
public TextEntityTypePreCode(String language) {
this.language = language;
}
public TextEntityTypePreCode(DataInput input) throws IOException {
if (input.readBoolean()) {
var languageTmp = new byte[input.readInt()];
input.readFully(languageTmp);
this.language = new String(languageTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.language == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var languageTmp = this.language.getBytes(StandardCharsets.UTF_8);
output.writeInt(languageTmp.length);
output.write(languageTmp);
}
}
}
public static class TextEntityTypeTextUrl extends TextEntityType {
public String url;
public static final int CONSTRUCTOR = 445719651;
public TextEntityTypeTextUrl() {}
public TextEntityTypeTextUrl(String url) {
this.url = url;
}
public TextEntityTypeTextUrl(DataInput input) throws IOException {
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
}
}
public static class TextEntityTypeMentionName extends TextEntityType {
public int userId;
public static final int CONSTRUCTOR = -791517091;
public TextEntityTypeMentionName() {}
public TextEntityTypeMentionName(int userId) {
this.userId = userId;
}
public TextEntityTypeMentionName(DataInput input) throws IOException {
this.userId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
}
}
public static class TextParseModeMarkdown extends TextParseMode {
public int version;
public static final int CONSTRUCTOR = 360073407;
public TextParseModeMarkdown() {}
public TextParseModeMarkdown(int version) {
this.version = version;
}
public TextParseModeMarkdown(DataInput input) throws IOException {
this.version = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.version);
}
}
public static class TextParseModeHTML extends TextParseMode {
public static final int CONSTRUCTOR = 1660208627;
public TextParseModeHTML() {}
public TextParseModeHTML(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TopChatCategoryUsers extends TopChatCategory {
public static final int CONSTRUCTOR = 1026706816;
public TopChatCategoryUsers() {}
public TopChatCategoryUsers(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TopChatCategoryBots extends TopChatCategory {
public static final int CONSTRUCTOR = -1577129195;
public TopChatCategoryBots() {}
public TopChatCategoryBots(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TopChatCategoryGroups extends TopChatCategory {
public static final int CONSTRUCTOR = 1530056846;
public TopChatCategoryGroups() {}
public TopChatCategoryGroups(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TopChatCategoryChannels extends TopChatCategory {
public static final int CONSTRUCTOR = -500825885;
public TopChatCategoryChannels() {}
public TopChatCategoryChannels(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TopChatCategoryInlineBots extends TopChatCategory {
public static final int CONSTRUCTOR = 377023356;
public TopChatCategoryInlineBots() {}
public TopChatCategoryInlineBots(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TopChatCategoryCalls extends TopChatCategory {
public static final int CONSTRUCTOR = 356208861;
public TopChatCategoryCalls() {}
public TopChatCategoryCalls(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TopChatCategoryForwardChats extends TopChatCategory {
public static final int CONSTRUCTOR = 1695922133;
public TopChatCategoryForwardChats() {}
public TopChatCategoryForwardChats(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class UpdateAuthorizationState extends Update {
public AuthorizationState authorizationState;
public static final int CONSTRUCTOR = 1622347490;
public UpdateAuthorizationState() {}
public UpdateAuthorizationState(AuthorizationState authorizationState) {
this.authorizationState = authorizationState;
}
public UpdateAuthorizationState(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case AuthorizationStateWaitTdlibParameters.CONSTRUCTOR:
this.authorizationState = new AuthorizationStateWaitTdlibParameters(input);
break;
case AuthorizationStateWaitEncryptionKey.CONSTRUCTOR:
this.authorizationState = new AuthorizationStateWaitEncryptionKey(input);
break;
case AuthorizationStateWaitPhoneNumber.CONSTRUCTOR:
this.authorizationState = new AuthorizationStateWaitPhoneNumber(input);
break;
case AuthorizationStateWaitCode.CONSTRUCTOR:
this.authorizationState = new AuthorizationStateWaitCode(input);
break;
case AuthorizationStateWaitOtherDeviceConfirmation.CONSTRUCTOR:
this.authorizationState = new AuthorizationStateWaitOtherDeviceConfirmation(input);
break;
case AuthorizationStateWaitRegistration.CONSTRUCTOR:
this.authorizationState = new AuthorizationStateWaitRegistration(input);
break;
case AuthorizationStateWaitPassword.CONSTRUCTOR:
this.authorizationState = new AuthorizationStateWaitPassword(input);
break;
case AuthorizationStateReady.CONSTRUCTOR:
this.authorizationState = new AuthorizationStateReady(input);
break;
case AuthorizationStateLoggingOut.CONSTRUCTOR:
this.authorizationState = new AuthorizationStateLoggingOut(input);
break;
case AuthorizationStateClosing.CONSTRUCTOR:
this.authorizationState = new AuthorizationStateClosing(input);
break;
case AuthorizationStateClosed.CONSTRUCTOR:
this.authorizationState = new AuthorizationStateClosed(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.authorizationState == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.authorizationState.serialize(output);
}
}
}
public static class UpdateNewMessage extends Update {
public Message message;
public static final int CONSTRUCTOR = -563105266;
public UpdateNewMessage() {}
public UpdateNewMessage(Message message) {
this.message = message;
}
public UpdateNewMessage(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Message.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.message = new Message(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.message == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.message.serialize(output);
}
}
}
public static class UpdateMessageSendAcknowledged extends Update {
public long chatId;
public long messageId;
public static final int CONSTRUCTOR = 1302843961;
public UpdateMessageSendAcknowledged() {}
public UpdateMessageSendAcknowledged(long chatId, long messageId) {
this.chatId = chatId;
this.messageId = messageId;
}
public UpdateMessageSendAcknowledged(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
}
}
public static class UpdateMessageSendSucceeded extends Update {
public Message message;
public long oldMessageId;
public static final int CONSTRUCTOR = 1815715197;
public UpdateMessageSendSucceeded() {}
public UpdateMessageSendSucceeded(Message message, long oldMessageId) {
this.message = message;
this.oldMessageId = oldMessageId;
}
public UpdateMessageSendSucceeded(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Message.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.message = new Message(input);
}
this.oldMessageId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.message == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.message.serialize(output);
}
output.writeLong(this.oldMessageId);
}
}
public static class UpdateMessageSendFailed extends Update {
public Message message;
public long oldMessageId;
public int errorCode;
public String errorMessage;
public static final int CONSTRUCTOR = -1032335779;
public UpdateMessageSendFailed() {}
public UpdateMessageSendFailed(Message message, long oldMessageId, int errorCode, String errorMessage) {
this.message = message;
this.oldMessageId = oldMessageId;
this.errorCode = errorCode;
this.errorMessage = errorMessage;
}
public UpdateMessageSendFailed(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Message.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.message = new Message(input);
}
this.oldMessageId = input.readLong();
this.errorCode = input.readInt();
if (input.readBoolean()) {
var errorMessageTmp = new byte[input.readInt()];
input.readFully(errorMessageTmp);
this.errorMessage = new String(errorMessageTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.message == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.message.serialize(output);
}
output.writeLong(this.oldMessageId);
output.writeInt(this.errorCode);
if (this.errorMessage == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var errorMessageTmp = this.errorMessage.getBytes(StandardCharsets.UTF_8);
output.writeInt(errorMessageTmp.length);
output.write(errorMessageTmp);
}
}
}
public static class UpdateMessageContent extends Update {
public long chatId;
public long messageId;
public MessageContent newContent;
public static final int CONSTRUCTOR = 506903332;
public UpdateMessageContent() {}
public UpdateMessageContent(long chatId, long messageId, MessageContent newContent) {
this.chatId = chatId;
this.messageId = messageId;
this.newContent = newContent;
}
public UpdateMessageContent(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case MessageText.CONSTRUCTOR:
this.newContent = new MessageText(input);
break;
case MessageAnimation.CONSTRUCTOR:
this.newContent = new MessageAnimation(input);
break;
case MessageAudio.CONSTRUCTOR:
this.newContent = new MessageAudio(input);
break;
case MessageDocument.CONSTRUCTOR:
this.newContent = new MessageDocument(input);
break;
case MessagePhoto.CONSTRUCTOR:
this.newContent = new MessagePhoto(input);
break;
case MessageExpiredPhoto.CONSTRUCTOR:
this.newContent = new MessageExpiredPhoto(input);
break;
case MessageSticker.CONSTRUCTOR:
this.newContent = new MessageSticker(input);
break;
case MessageVideo.CONSTRUCTOR:
this.newContent = new MessageVideo(input);
break;
case MessageExpiredVideo.CONSTRUCTOR:
this.newContent = new MessageExpiredVideo(input);
break;
case MessageVideoNote.CONSTRUCTOR:
this.newContent = new MessageVideoNote(input);
break;
case MessageVoiceNote.CONSTRUCTOR:
this.newContent = new MessageVoiceNote(input);
break;
case MessageLocation.CONSTRUCTOR:
this.newContent = new MessageLocation(input);
break;
case MessageVenue.CONSTRUCTOR:
this.newContent = new MessageVenue(input);
break;
case MessageContact.CONSTRUCTOR:
this.newContent = new MessageContact(input);
break;
case MessageDice.CONSTRUCTOR:
this.newContent = new MessageDice(input);
break;
case MessageGame.CONSTRUCTOR:
this.newContent = new MessageGame(input);
break;
case MessagePoll.CONSTRUCTOR:
this.newContent = new MessagePoll(input);
break;
case MessageInvoice.CONSTRUCTOR:
this.newContent = new MessageInvoice(input);
break;
case MessageCall.CONSTRUCTOR:
this.newContent = new MessageCall(input);
break;
case MessageBasicGroupChatCreate.CONSTRUCTOR:
this.newContent = new MessageBasicGroupChatCreate(input);
break;
case MessageSupergroupChatCreate.CONSTRUCTOR:
this.newContent = new MessageSupergroupChatCreate(input);
break;
case MessageChatChangeTitle.CONSTRUCTOR:
this.newContent = new MessageChatChangeTitle(input);
break;
case MessageChatChangePhoto.CONSTRUCTOR:
this.newContent = new MessageChatChangePhoto(input);
break;
case MessageChatDeletePhoto.CONSTRUCTOR:
this.newContent = new MessageChatDeletePhoto(input);
break;
case MessageChatAddMembers.CONSTRUCTOR:
this.newContent = new MessageChatAddMembers(input);
break;
case MessageChatJoinByLink.CONSTRUCTOR:
this.newContent = new MessageChatJoinByLink(input);
break;
case MessageChatDeleteMember.CONSTRUCTOR:
this.newContent = new MessageChatDeleteMember(input);
break;
case MessageChatUpgradeTo.CONSTRUCTOR:
this.newContent = new MessageChatUpgradeTo(input);
break;
case MessageChatUpgradeFrom.CONSTRUCTOR:
this.newContent = new MessageChatUpgradeFrom(input);
break;
case MessagePinMessage.CONSTRUCTOR:
this.newContent = new MessagePinMessage(input);
break;
case MessageScreenshotTaken.CONSTRUCTOR:
this.newContent = new MessageScreenshotTaken(input);
break;
case MessageChatSetTtl.CONSTRUCTOR:
this.newContent = new MessageChatSetTtl(input);
break;
case MessageCustomServiceAction.CONSTRUCTOR:
this.newContent = new MessageCustomServiceAction(input);
break;
case MessageGameScore.CONSTRUCTOR:
this.newContent = new MessageGameScore(input);
break;
case MessagePaymentSuccessful.CONSTRUCTOR:
this.newContent = new MessagePaymentSuccessful(input);
break;
case MessagePaymentSuccessfulBot.CONSTRUCTOR:
this.newContent = new MessagePaymentSuccessfulBot(input);
break;
case MessageContactRegistered.CONSTRUCTOR:
this.newContent = new MessageContactRegistered(input);
break;
case MessageWebsiteConnected.CONSTRUCTOR:
this.newContent = new MessageWebsiteConnected(input);
break;
case MessagePassportDataSent.CONSTRUCTOR:
this.newContent = new MessagePassportDataSent(input);
break;
case MessagePassportDataReceived.CONSTRUCTOR:
this.newContent = new MessagePassportDataReceived(input);
break;
case MessageUnsupported.CONSTRUCTOR:
this.newContent = new MessageUnsupported(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
if (this.newContent == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.newContent.serialize(output);
}
}
}
public static class UpdateMessageEdited extends Update {
public long chatId;
public long messageId;
public int editDate;
public ReplyMarkup replyMarkup;
public static final int CONSTRUCTOR = -559545626;
public UpdateMessageEdited() {}
public UpdateMessageEdited(long chatId, long messageId, int editDate, ReplyMarkup replyMarkup) {
this.chatId = chatId;
this.messageId = messageId;
this.editDate = editDate;
this.replyMarkup = replyMarkup;
}
public UpdateMessageEdited(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
this.editDate = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
output.writeInt(this.editDate);
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
}
}
public static class UpdateMessageViews extends Update {
public long chatId;
public long messageId;
public int views;
public static final int CONSTRUCTOR = -1854131125;
public UpdateMessageViews() {}
public UpdateMessageViews(long chatId, long messageId, int views) {
this.chatId = chatId;
this.messageId = messageId;
this.views = views;
}
public UpdateMessageViews(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
this.views = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
output.writeInt(this.views);
}
}
public static class UpdateMessageContentOpened extends Update {
public long chatId;
public long messageId;
public static final int CONSTRUCTOR = -1520523131;
public UpdateMessageContentOpened() {}
public UpdateMessageContentOpened(long chatId, long messageId) {
this.chatId = chatId;
this.messageId = messageId;
}
public UpdateMessageContentOpened(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
}
}
public static class UpdateMessageMentionRead extends Update {
public long chatId;
public long messageId;
public int unreadMentionCount;
public static final int CONSTRUCTOR = -252228282;
public UpdateMessageMentionRead() {}
public UpdateMessageMentionRead(long chatId, long messageId, int unreadMentionCount) {
this.chatId = chatId;
this.messageId = messageId;
this.unreadMentionCount = unreadMentionCount;
}
public UpdateMessageMentionRead(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
this.unreadMentionCount = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
output.writeInt(this.unreadMentionCount);
}
}
public static class UpdateMessageLiveLocationViewed extends Update {
public long chatId;
public long messageId;
public static final int CONSTRUCTOR = -1308260971;
public UpdateMessageLiveLocationViewed() {}
public UpdateMessageLiveLocationViewed(long chatId, long messageId) {
this.chatId = chatId;
this.messageId = messageId;
}
public UpdateMessageLiveLocationViewed(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
}
}
public static class UpdateNewChat extends Update {
public Chat chat;
public static final int CONSTRUCTOR = 2075757773;
public UpdateNewChat() {}
public UpdateNewChat(Chat chat) {
this.chat = chat;
}
public UpdateNewChat(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Chat.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.chat = new Chat(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.chat == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.chat.serialize(output);
}
}
}
public static class UpdateChatChatList extends Update {
public long chatId;
public ChatList chatList;
public static final int CONSTRUCTOR = -170455894;
public UpdateChatChatList() {}
public UpdateChatChatList(long chatId, ChatList chatList) {
this.chatId = chatId;
this.chatList = chatList;
}
public UpdateChatChatList(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatListMain.CONSTRUCTOR:
this.chatList = new ChatListMain(input);
break;
case ChatListArchive.CONSTRUCTOR:
this.chatList = new ChatListArchive(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.chatList == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.chatList.serialize(output);
}
}
}
public static class UpdateChatTitle extends Update {
public long chatId;
public String title;
public static final int CONSTRUCTOR = -175405660;
public UpdateChatTitle() {}
public UpdateChatTitle(long chatId, String title) {
this.chatId = chatId;
this.title = title;
}
public UpdateChatTitle(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
}
}
public static class UpdateChatPhoto extends Update {
public long chatId;
public ChatPhoto photo;
public static final int CONSTRUCTOR = -209353966;
public UpdateChatPhoto() {}
public UpdateChatPhoto(long chatId, ChatPhoto photo) {
this.chatId = chatId;
this.photo = photo;
}
public UpdateChatPhoto(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
if (ChatPhoto.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.photo = new ChatPhoto(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.photo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.photo.serialize(output);
}
}
}
public static class UpdateChatPermissions extends Update {
public long chatId;
public ChatPermissions permissions;
public static final int CONSTRUCTOR = -1622010003;
public UpdateChatPermissions() {}
public UpdateChatPermissions(long chatId, ChatPermissions permissions) {
this.chatId = chatId;
this.permissions = permissions;
}
public UpdateChatPermissions(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
if (ChatPermissions.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.permissions = new ChatPermissions(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.permissions == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.permissions.serialize(output);
}
}
}
public static class UpdateChatLastMessage extends Update {
public long chatId;
public Message lastMessage;
public long order;
public static final int CONSTRUCTOR = 580348828;
public UpdateChatLastMessage() {}
public UpdateChatLastMessage(long chatId, Message lastMessage, long order) {
this.chatId = chatId;
this.lastMessage = lastMessage;
this.order = order;
}
public UpdateChatLastMessage(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
if (Message.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.lastMessage = new Message(input);
}
this.order = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.lastMessage == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.lastMessage.serialize(output);
}
output.writeLong(this.order);
}
}
public static class UpdateChatOrder extends Update {
public long chatId;
public long order;
public static final int CONSTRUCTOR = -1601888026;
public UpdateChatOrder() {}
public UpdateChatOrder(long chatId, long order) {
this.chatId = chatId;
this.order = order;
}
public UpdateChatOrder(DataInput input) throws IOException {
this.chatId = input.readLong();
this.order = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.order);
}
}
public static class UpdateChatIsPinned extends Update {
public long chatId;
public boolean isPinned;
public long order;
public static final int CONSTRUCTOR = 488876260;
public UpdateChatIsPinned() {}
public UpdateChatIsPinned(long chatId, boolean isPinned, long order) {
this.chatId = chatId;
this.isPinned = isPinned;
this.order = order;
}
public UpdateChatIsPinned(DataInput input) throws IOException {
this.chatId = input.readLong();
this.isPinned = input.readBoolean();
this.order = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeBoolean(this.isPinned);
output.writeLong(this.order);
}
}
public static class UpdateChatIsMarkedAsUnread extends Update {
public long chatId;
public boolean isMarkedAsUnread;
public static final int CONSTRUCTOR = 1468347188;
public UpdateChatIsMarkedAsUnread() {}
public UpdateChatIsMarkedAsUnread(long chatId, boolean isMarkedAsUnread) {
this.chatId = chatId;
this.isMarkedAsUnread = isMarkedAsUnread;
}
public UpdateChatIsMarkedAsUnread(DataInput input) throws IOException {
this.chatId = input.readLong();
this.isMarkedAsUnread = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeBoolean(this.isMarkedAsUnread);
}
}
public static class UpdateChatIsSponsored extends Update {
public long chatId;
public boolean isSponsored;
public long order;
public static final int CONSTRUCTOR = -1196180070;
public UpdateChatIsSponsored() {}
public UpdateChatIsSponsored(long chatId, boolean isSponsored, long order) {
this.chatId = chatId;
this.isSponsored = isSponsored;
this.order = order;
}
public UpdateChatIsSponsored(DataInput input) throws IOException {
this.chatId = input.readLong();
this.isSponsored = input.readBoolean();
this.order = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeBoolean(this.isSponsored);
output.writeLong(this.order);
}
}
public static class UpdateChatHasScheduledMessages extends Update {
public long chatId;
public boolean hasScheduledMessages;
public static final int CONSTRUCTOR = 2064958167;
public UpdateChatHasScheduledMessages() {}
public UpdateChatHasScheduledMessages(long chatId, boolean hasScheduledMessages) {
this.chatId = chatId;
this.hasScheduledMessages = hasScheduledMessages;
}
public UpdateChatHasScheduledMessages(DataInput input) throws IOException {
this.chatId = input.readLong();
this.hasScheduledMessages = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeBoolean(this.hasScheduledMessages);
}
}
public static class UpdateChatDefaultDisableNotification extends Update {
public long chatId;
public boolean defaultDisableNotification;
public static final int CONSTRUCTOR = 464087707;
public UpdateChatDefaultDisableNotification() {}
public UpdateChatDefaultDisableNotification(long chatId, boolean defaultDisableNotification) {
this.chatId = chatId;
this.defaultDisableNotification = defaultDisableNotification;
}
public UpdateChatDefaultDisableNotification(DataInput input) throws IOException {
this.chatId = input.readLong();
this.defaultDisableNotification = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeBoolean(this.defaultDisableNotification);
}
}
public static class UpdateChatReadInbox extends Update {
public long chatId;
public long lastReadInboxMessageId;
public int unreadCount;
public static final int CONSTRUCTOR = -797952281;
public UpdateChatReadInbox() {}
public UpdateChatReadInbox(long chatId, long lastReadInboxMessageId, int unreadCount) {
this.chatId = chatId;
this.lastReadInboxMessageId = lastReadInboxMessageId;
this.unreadCount = unreadCount;
}
public UpdateChatReadInbox(DataInput input) throws IOException {
this.chatId = input.readLong();
this.lastReadInboxMessageId = input.readLong();
this.unreadCount = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.lastReadInboxMessageId);
output.writeInt(this.unreadCount);
}
}
public static class UpdateChatReadOutbox extends Update {
public long chatId;
public long lastReadOutboxMessageId;
public static final int CONSTRUCTOR = 708334213;
public UpdateChatReadOutbox() {}
public UpdateChatReadOutbox(long chatId, long lastReadOutboxMessageId) {
this.chatId = chatId;
this.lastReadOutboxMessageId = lastReadOutboxMessageId;
}
public UpdateChatReadOutbox(DataInput input) throws IOException {
this.chatId = input.readLong();
this.lastReadOutboxMessageId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.lastReadOutboxMessageId);
}
}
public static class UpdateChatUnreadMentionCount extends Update {
public long chatId;
public int unreadMentionCount;
public static final int CONSTRUCTOR = -2131461348;
public UpdateChatUnreadMentionCount() {}
public UpdateChatUnreadMentionCount(long chatId, int unreadMentionCount) {
this.chatId = chatId;
this.unreadMentionCount = unreadMentionCount;
}
public UpdateChatUnreadMentionCount(DataInput input) throws IOException {
this.chatId = input.readLong();
this.unreadMentionCount = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeInt(this.unreadMentionCount);
}
}
public static class UpdateChatNotificationSettings extends Update {
public long chatId;
public ChatNotificationSettings notificationSettings;
public static final int CONSTRUCTOR = -803163050;
public UpdateChatNotificationSettings() {}
public UpdateChatNotificationSettings(long chatId, ChatNotificationSettings notificationSettings) {
this.chatId = chatId;
this.notificationSettings = notificationSettings;
}
public UpdateChatNotificationSettings(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
if (ChatNotificationSettings.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.notificationSettings = new ChatNotificationSettings(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.notificationSettings == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.notificationSettings.serialize(output);
}
}
}
public static class UpdateScopeNotificationSettings extends Update {
public NotificationSettingsScope scope;
public ScopeNotificationSettings notificationSettings;
public static final int CONSTRUCTOR = -1203975309;
public UpdateScopeNotificationSettings() {}
public UpdateScopeNotificationSettings(NotificationSettingsScope scope, ScopeNotificationSettings notificationSettings) {
this.scope = scope;
this.notificationSettings = notificationSettings;
}
public UpdateScopeNotificationSettings(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case NotificationSettingsScopePrivateChats.CONSTRUCTOR:
this.scope = new NotificationSettingsScopePrivateChats(input);
break;
case NotificationSettingsScopeGroupChats.CONSTRUCTOR:
this.scope = new NotificationSettingsScopeGroupChats(input);
break;
case NotificationSettingsScopeChannelChats.CONSTRUCTOR:
this.scope = new NotificationSettingsScopeChannelChats(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
if (ScopeNotificationSettings.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.notificationSettings = new ScopeNotificationSettings(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.scope == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.scope.serialize(output);
}
if (this.notificationSettings == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.notificationSettings.serialize(output);
}
}
}
public static class UpdateChatActionBar extends Update {
public long chatId;
public ChatActionBar actionBar;
public static final int CONSTRUCTOR = -643671870;
public UpdateChatActionBar() {}
public UpdateChatActionBar(long chatId, ChatActionBar actionBar) {
this.chatId = chatId;
this.actionBar = actionBar;
}
public UpdateChatActionBar(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatActionBarReportSpam.CONSTRUCTOR:
this.actionBar = new ChatActionBarReportSpam(input);
break;
case ChatActionBarReportUnrelatedLocation.CONSTRUCTOR:
this.actionBar = new ChatActionBarReportUnrelatedLocation(input);
break;
case ChatActionBarReportAddBlock.CONSTRUCTOR:
this.actionBar = new ChatActionBarReportAddBlock(input);
break;
case ChatActionBarAddContact.CONSTRUCTOR:
this.actionBar = new ChatActionBarAddContact(input);
break;
case ChatActionBarSharePhoneNumber.CONSTRUCTOR:
this.actionBar = new ChatActionBarSharePhoneNumber(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.actionBar == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.actionBar.serialize(output);
}
}
}
public static class UpdateChatPinnedMessage extends Update {
public long chatId;
public long pinnedMessageId;
public static final int CONSTRUCTOR = 802160507;
public UpdateChatPinnedMessage() {}
public UpdateChatPinnedMessage(long chatId, long pinnedMessageId) {
this.chatId = chatId;
this.pinnedMessageId = pinnedMessageId;
}
public UpdateChatPinnedMessage(DataInput input) throws IOException {
this.chatId = input.readLong();
this.pinnedMessageId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.pinnedMessageId);
}
}
public static class UpdateChatReplyMarkup extends Update {
public long chatId;
public long replyMarkupMessageId;
public static final int CONSTRUCTOR = 1309386144;
public UpdateChatReplyMarkup() {}
public UpdateChatReplyMarkup(long chatId, long replyMarkupMessageId) {
this.chatId = chatId;
this.replyMarkupMessageId = replyMarkupMessageId;
}
public UpdateChatReplyMarkup(DataInput input) throws IOException {
this.chatId = input.readLong();
this.replyMarkupMessageId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.replyMarkupMessageId);
}
}
public static class UpdateChatDraftMessage extends Update {
public long chatId;
public DraftMessage draftMessage;
public long order;
public static final int CONSTRUCTOR = -1436617498;
public UpdateChatDraftMessage() {}
public UpdateChatDraftMessage(long chatId, DraftMessage draftMessage, long order) {
this.chatId = chatId;
this.draftMessage = draftMessage;
this.order = order;
}
public UpdateChatDraftMessage(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
if (DraftMessage.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.draftMessage = new DraftMessage(input);
}
this.order = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.draftMessage == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.draftMessage.serialize(output);
}
output.writeLong(this.order);
}
}
public static class UpdateChatOnlineMemberCount extends Update {
public long chatId;
public int onlineMemberCount;
public static final int CONSTRUCTOR = 487369373;
public UpdateChatOnlineMemberCount() {}
public UpdateChatOnlineMemberCount(long chatId, int onlineMemberCount) {
this.chatId = chatId;
this.onlineMemberCount = onlineMemberCount;
}
public UpdateChatOnlineMemberCount(DataInput input) throws IOException {
this.chatId = input.readLong();
this.onlineMemberCount = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeInt(this.onlineMemberCount);
}
}
public static class UpdateNotification extends Update {
public int notificationGroupId;
public Notification notification;
public static final int CONSTRUCTOR = -1897496876;
public UpdateNotification() {}
public UpdateNotification(int notificationGroupId, Notification notification) {
this.notificationGroupId = notificationGroupId;
this.notification = notification;
}
public UpdateNotification(DataInput input) throws IOException {
this.notificationGroupId = input.readInt();
if (input.readBoolean()) {
if (Notification.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.notification = new Notification(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.notificationGroupId);
if (this.notification == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.notification.serialize(output);
}
}
}
public static class UpdateNotificationGroup extends Update {
public int notificationGroupId;
public NotificationGroupType type;
public long chatId;
public long notificationSettingsChatId;
public boolean isSilent;
public int totalCount;
public Notification[] addedNotifications;
public int[] removedNotificationIds;
public static final int CONSTRUCTOR = -2049005665;
public UpdateNotificationGroup() {}
public UpdateNotificationGroup(int notificationGroupId, NotificationGroupType type, long chatId, long notificationSettingsChatId, boolean isSilent, int totalCount, Notification[] addedNotifications, int[] removedNotificationIds) {
this.notificationGroupId = notificationGroupId;
this.type = type;
this.chatId = chatId;
this.notificationSettingsChatId = notificationSettingsChatId;
this.isSilent = isSilent;
this.totalCount = totalCount;
this.addedNotifications = addedNotifications;
this.removedNotificationIds = removedNotificationIds;
}
public UpdateNotificationGroup(DataInput input) throws IOException {
this.notificationGroupId = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case NotificationGroupTypeMessages.CONSTRUCTOR:
this.type = new NotificationGroupTypeMessages(input);
break;
case NotificationGroupTypeMentions.CONSTRUCTOR:
this.type = new NotificationGroupTypeMentions(input);
break;
case NotificationGroupTypeSecretChat.CONSTRUCTOR:
this.type = new NotificationGroupTypeSecretChat(input);
break;
case NotificationGroupTypeCalls.CONSTRUCTOR:
this.type = new NotificationGroupTypeCalls(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.chatId = input.readLong();
this.notificationSettingsChatId = input.readLong();
this.isSilent = input.readBoolean();
this.totalCount = input.readInt();
if (input.readBoolean()) {
this.addedNotifications = new Notification[input.readInt()];
for (int i = 0; i < this.addedNotifications.length; i++) {
if (Notification.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.addedNotifications[i] = new Notification(input);
}
}
if (input.readBoolean()) {
this.removedNotificationIds = new int[input.readInt()];
for (int i = 0; i < this.removedNotificationIds.length; i++) {
this.removedNotificationIds[i] = input.readInt();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.notificationGroupId);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
output.writeLong(this.chatId);
output.writeLong(this.notificationSettingsChatId);
output.writeBoolean(this.isSilent);
output.writeInt(this.totalCount);
if (this.addedNotifications == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.addedNotifications.length);
for (int i = 0; i < this.addedNotifications.length; i++) {
this.addedNotifications[i].serialize(output);
}
}
if (this.removedNotificationIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.removedNotificationIds.length);
for (int i = 0; i < this.removedNotificationIds.length; i++) {
output.writeInt(this.removedNotificationIds[i]);
}
}
}
}
public static class UpdateActiveNotifications extends Update {
public NotificationGroup[] groups;
public static final int CONSTRUCTOR = -1306672221;
public UpdateActiveNotifications() {}
public UpdateActiveNotifications(NotificationGroup[] groups) {
this.groups = groups;
}
public UpdateActiveNotifications(DataInput input) throws IOException {
if (input.readBoolean()) {
this.groups = new NotificationGroup[input.readInt()];
for (int i = 0; i < this.groups.length; i++) {
if (NotificationGroup.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.groups[i] = new NotificationGroup(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.groups == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.groups.length);
for (int i = 0; i < this.groups.length; i++) {
this.groups[i].serialize(output);
}
}
}
}
public static class UpdateHavePendingNotifications extends Update {
public boolean haveDelayedNotifications;
public boolean haveUnreceivedNotifications;
public static final int CONSTRUCTOR = 179233243;
public UpdateHavePendingNotifications() {}
public UpdateHavePendingNotifications(boolean haveDelayedNotifications, boolean haveUnreceivedNotifications) {
this.haveDelayedNotifications = haveDelayedNotifications;
this.haveUnreceivedNotifications = haveUnreceivedNotifications;
}
public UpdateHavePendingNotifications(DataInput input) throws IOException {
this.haveDelayedNotifications = input.readBoolean();
this.haveUnreceivedNotifications = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.haveDelayedNotifications);
output.writeBoolean(this.haveUnreceivedNotifications);
}
}
public static class UpdateDeleteMessages extends Update {
public long chatId;
public long[] messageIds;
public boolean isPermanent;
public boolean fromCache;
public static final int CONSTRUCTOR = 1669252686;
public UpdateDeleteMessages() {}
public UpdateDeleteMessages(long chatId, long[] messageIds, boolean isPermanent, boolean fromCache) {
this.chatId = chatId;
this.messageIds = messageIds;
this.isPermanent = isPermanent;
this.fromCache = fromCache;
}
public UpdateDeleteMessages(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
this.messageIds = new long[input.readInt()];
for (int i = 0; i < this.messageIds.length; i++) {
this.messageIds[i] = input.readLong();
}
}
this.isPermanent = input.readBoolean();
this.fromCache = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.messageIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.messageIds.length);
for (int i = 0; i < this.messageIds.length; i++) {
output.writeLong(this.messageIds[i]);
}
}
output.writeBoolean(this.isPermanent);
output.writeBoolean(this.fromCache);
}
}
public static class UpdateUserChatAction extends Update {
public long chatId;
public int userId;
public ChatAction action;
public static final int CONSTRUCTOR = 1444133514;
public UpdateUserChatAction() {}
public UpdateUserChatAction(long chatId, int userId, ChatAction action) {
this.chatId = chatId;
this.userId = userId;
this.action = action;
}
public UpdateUserChatAction(DataInput input) throws IOException {
this.chatId = input.readLong();
this.userId = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatActionTyping.CONSTRUCTOR:
this.action = new ChatActionTyping(input);
break;
case ChatActionRecordingVideo.CONSTRUCTOR:
this.action = new ChatActionRecordingVideo(input);
break;
case ChatActionUploadingVideo.CONSTRUCTOR:
this.action = new ChatActionUploadingVideo(input);
break;
case ChatActionRecordingVoiceNote.CONSTRUCTOR:
this.action = new ChatActionRecordingVoiceNote(input);
break;
case ChatActionUploadingVoiceNote.CONSTRUCTOR:
this.action = new ChatActionUploadingVoiceNote(input);
break;
case ChatActionUploadingPhoto.CONSTRUCTOR:
this.action = new ChatActionUploadingPhoto(input);
break;
case ChatActionUploadingDocument.CONSTRUCTOR:
this.action = new ChatActionUploadingDocument(input);
break;
case ChatActionChoosingLocation.CONSTRUCTOR:
this.action = new ChatActionChoosingLocation(input);
break;
case ChatActionChoosingContact.CONSTRUCTOR:
this.action = new ChatActionChoosingContact(input);
break;
case ChatActionStartPlayingGame.CONSTRUCTOR:
this.action = new ChatActionStartPlayingGame(input);
break;
case ChatActionRecordingVideoNote.CONSTRUCTOR:
this.action = new ChatActionRecordingVideoNote(input);
break;
case ChatActionUploadingVideoNote.CONSTRUCTOR:
this.action = new ChatActionUploadingVideoNote(input);
break;
case ChatActionCancel.CONSTRUCTOR:
this.action = new ChatActionCancel(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeInt(this.userId);
if (this.action == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.action.serialize(output);
}
}
}
public static class UpdateUserStatus extends Update {
public int userId;
public UserStatus status;
public static final int CONSTRUCTOR = -1443545195;
public UpdateUserStatus() {}
public UpdateUserStatus(int userId, UserStatus status) {
this.userId = userId;
this.status = status;
}
public UpdateUserStatus(DataInput input) throws IOException {
this.userId = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case UserStatusEmpty.CONSTRUCTOR:
this.status = new UserStatusEmpty(input);
break;
case UserStatusOnline.CONSTRUCTOR:
this.status = new UserStatusOnline(input);
break;
case UserStatusOffline.CONSTRUCTOR:
this.status = new UserStatusOffline(input);
break;
case UserStatusRecently.CONSTRUCTOR:
this.status = new UserStatusRecently(input);
break;
case UserStatusLastWeek.CONSTRUCTOR:
this.status = new UserStatusLastWeek(input);
break;
case UserStatusLastMonth.CONSTRUCTOR:
this.status = new UserStatusLastMonth(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
if (this.status == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.status.serialize(output);
}
}
}
public static class UpdateUser extends Update {
public User user;
public static final int CONSTRUCTOR = 1183394041;
public UpdateUser() {}
public UpdateUser(User user) {
this.user = user;
}
public UpdateUser(DataInput input) throws IOException {
if (input.readBoolean()) {
if (User.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.user = new User(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.user == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.user.serialize(output);
}
}
}
public static class UpdateBasicGroup extends Update {
public BasicGroup basicGroup;
public static final int CONSTRUCTOR = -1003239581;
public UpdateBasicGroup() {}
public UpdateBasicGroup(BasicGroup basicGroup) {
this.basicGroup = basicGroup;
}
public UpdateBasicGroup(DataInput input) throws IOException {
if (input.readBoolean()) {
if (BasicGroup.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.basicGroup = new BasicGroup(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.basicGroup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.basicGroup.serialize(output);
}
}
}
public static class UpdateSupergroup extends Update {
public Supergroup supergroup;
public static final int CONSTRUCTOR = -76782300;
public UpdateSupergroup() {}
public UpdateSupergroup(Supergroup supergroup) {
this.supergroup = supergroup;
}
public UpdateSupergroup(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Supergroup.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.supergroup = new Supergroup(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.supergroup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.supergroup.serialize(output);
}
}
}
public static class UpdateSecretChat extends Update {
public SecretChat secretChat;
public static final int CONSTRUCTOR = -1666903253;
public UpdateSecretChat() {}
public UpdateSecretChat(SecretChat secretChat) {
this.secretChat = secretChat;
}
public UpdateSecretChat(DataInput input) throws IOException {
if (input.readBoolean()) {
if (SecretChat.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.secretChat = new SecretChat(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.secretChat == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.secretChat.serialize(output);
}
}
}
public static class UpdateUserFullInfo extends Update {
public int userId;
public UserFullInfo userFullInfo;
public static final int CONSTRUCTOR = 222103874;
public UpdateUserFullInfo() {}
public UpdateUserFullInfo(int userId, UserFullInfo userFullInfo) {
this.userId = userId;
this.userFullInfo = userFullInfo;
}
public UpdateUserFullInfo(DataInput input) throws IOException {
this.userId = input.readInt();
if (input.readBoolean()) {
if (UserFullInfo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.userFullInfo = new UserFullInfo(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
if (this.userFullInfo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.userFullInfo.serialize(output);
}
}
}
public static class UpdateBasicGroupFullInfo extends Update {
public int basicGroupId;
public BasicGroupFullInfo basicGroupFullInfo;
public static final int CONSTRUCTOR = 924030531;
public UpdateBasicGroupFullInfo() {}
public UpdateBasicGroupFullInfo(int basicGroupId, BasicGroupFullInfo basicGroupFullInfo) {
this.basicGroupId = basicGroupId;
this.basicGroupFullInfo = basicGroupFullInfo;
}
public UpdateBasicGroupFullInfo(DataInput input) throws IOException {
this.basicGroupId = input.readInt();
if (input.readBoolean()) {
if (BasicGroupFullInfo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.basicGroupFullInfo = new BasicGroupFullInfo(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.basicGroupId);
if (this.basicGroupFullInfo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.basicGroupFullInfo.serialize(output);
}
}
}
public static class UpdateSupergroupFullInfo extends Update {
public int supergroupId;
public SupergroupFullInfo supergroupFullInfo;
public static final int CONSTRUCTOR = 1288828758;
public UpdateSupergroupFullInfo() {}
public UpdateSupergroupFullInfo(int supergroupId, SupergroupFullInfo supergroupFullInfo) {
this.supergroupId = supergroupId;
this.supergroupFullInfo = supergroupFullInfo;
}
public UpdateSupergroupFullInfo(DataInput input) throws IOException {
this.supergroupId = input.readInt();
if (input.readBoolean()) {
if (SupergroupFullInfo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.supergroupFullInfo = new SupergroupFullInfo(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.supergroupId);
if (this.supergroupFullInfo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.supergroupFullInfo.serialize(output);
}
}
}
public static class UpdateServiceNotification extends Update {
public String type;
public MessageContent content;
public static final int CONSTRUCTOR = 1318622637;
public UpdateServiceNotification() {}
public UpdateServiceNotification(String type, MessageContent content) {
this.type = type;
this.content = content;
}
public UpdateServiceNotification(DataInput input) throws IOException {
if (input.readBoolean()) {
var typeTmp = new byte[input.readInt()];
input.readFully(typeTmp);
this.type = new String(typeTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case MessageText.CONSTRUCTOR:
this.content = new MessageText(input);
break;
case MessageAnimation.CONSTRUCTOR:
this.content = new MessageAnimation(input);
break;
case MessageAudio.CONSTRUCTOR:
this.content = new MessageAudio(input);
break;
case MessageDocument.CONSTRUCTOR:
this.content = new MessageDocument(input);
break;
case MessagePhoto.CONSTRUCTOR:
this.content = new MessagePhoto(input);
break;
case MessageExpiredPhoto.CONSTRUCTOR:
this.content = new MessageExpiredPhoto(input);
break;
case MessageSticker.CONSTRUCTOR:
this.content = new MessageSticker(input);
break;
case MessageVideo.CONSTRUCTOR:
this.content = new MessageVideo(input);
break;
case MessageExpiredVideo.CONSTRUCTOR:
this.content = new MessageExpiredVideo(input);
break;
case MessageVideoNote.CONSTRUCTOR:
this.content = new MessageVideoNote(input);
break;
case MessageVoiceNote.CONSTRUCTOR:
this.content = new MessageVoiceNote(input);
break;
case MessageLocation.CONSTRUCTOR:
this.content = new MessageLocation(input);
break;
case MessageVenue.CONSTRUCTOR:
this.content = new MessageVenue(input);
break;
case MessageContact.CONSTRUCTOR:
this.content = new MessageContact(input);
break;
case MessageDice.CONSTRUCTOR:
this.content = new MessageDice(input);
break;
case MessageGame.CONSTRUCTOR:
this.content = new MessageGame(input);
break;
case MessagePoll.CONSTRUCTOR:
this.content = new MessagePoll(input);
break;
case MessageInvoice.CONSTRUCTOR:
this.content = new MessageInvoice(input);
break;
case MessageCall.CONSTRUCTOR:
this.content = new MessageCall(input);
break;
case MessageBasicGroupChatCreate.CONSTRUCTOR:
this.content = new MessageBasicGroupChatCreate(input);
break;
case MessageSupergroupChatCreate.CONSTRUCTOR:
this.content = new MessageSupergroupChatCreate(input);
break;
case MessageChatChangeTitle.CONSTRUCTOR:
this.content = new MessageChatChangeTitle(input);
break;
case MessageChatChangePhoto.CONSTRUCTOR:
this.content = new MessageChatChangePhoto(input);
break;
case MessageChatDeletePhoto.CONSTRUCTOR:
this.content = new MessageChatDeletePhoto(input);
break;
case MessageChatAddMembers.CONSTRUCTOR:
this.content = new MessageChatAddMembers(input);
break;
case MessageChatJoinByLink.CONSTRUCTOR:
this.content = new MessageChatJoinByLink(input);
break;
case MessageChatDeleteMember.CONSTRUCTOR:
this.content = new MessageChatDeleteMember(input);
break;
case MessageChatUpgradeTo.CONSTRUCTOR:
this.content = new MessageChatUpgradeTo(input);
break;
case MessageChatUpgradeFrom.CONSTRUCTOR:
this.content = new MessageChatUpgradeFrom(input);
break;
case MessagePinMessage.CONSTRUCTOR:
this.content = new MessagePinMessage(input);
break;
case MessageScreenshotTaken.CONSTRUCTOR:
this.content = new MessageScreenshotTaken(input);
break;
case MessageChatSetTtl.CONSTRUCTOR:
this.content = new MessageChatSetTtl(input);
break;
case MessageCustomServiceAction.CONSTRUCTOR:
this.content = new MessageCustomServiceAction(input);
break;
case MessageGameScore.CONSTRUCTOR:
this.content = new MessageGameScore(input);
break;
case MessagePaymentSuccessful.CONSTRUCTOR:
this.content = new MessagePaymentSuccessful(input);
break;
case MessagePaymentSuccessfulBot.CONSTRUCTOR:
this.content = new MessagePaymentSuccessfulBot(input);
break;
case MessageContactRegistered.CONSTRUCTOR:
this.content = new MessageContactRegistered(input);
break;
case MessageWebsiteConnected.CONSTRUCTOR:
this.content = new MessageWebsiteConnected(input);
break;
case MessagePassportDataSent.CONSTRUCTOR:
this.content = new MessagePassportDataSent(input);
break;
case MessagePassportDataReceived.CONSTRUCTOR:
this.content = new MessagePassportDataReceived(input);
break;
case MessageUnsupported.CONSTRUCTOR:
this.content = new MessageUnsupported(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var typeTmp = this.type.getBytes(StandardCharsets.UTF_8);
output.writeInt(typeTmp.length);
output.write(typeTmp);
}
if (this.content == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.content.serialize(output);
}
}
}
public static class UpdateFile extends Update {
public File file;
public static final int CONSTRUCTOR = 114132831;
public UpdateFile() {}
public UpdateFile(File file) {
this.file = file;
}
public UpdateFile(DataInput input) throws IOException {
if (input.readBoolean()) {
if (File.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.file = new File(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.file == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.file.serialize(output);
}
}
}
public static class UpdateFileGenerationStart extends Update {
public long generationId;
public String originalPath;
public String destinationPath;
public String conversion;
public static final int CONSTRUCTOR = 216817388;
public UpdateFileGenerationStart() {}
public UpdateFileGenerationStart(long generationId, String originalPath, String destinationPath, String conversion) {
this.generationId = generationId;
this.originalPath = originalPath;
this.destinationPath = destinationPath;
this.conversion = conversion;
}
public UpdateFileGenerationStart(DataInput input) throws IOException {
this.generationId = input.readLong();
if (input.readBoolean()) {
var originalPathTmp = new byte[input.readInt()];
input.readFully(originalPathTmp);
this.originalPath = new String(originalPathTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var destinationPathTmp = new byte[input.readInt()];
input.readFully(destinationPathTmp);
this.destinationPath = new String(destinationPathTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var conversionTmp = new byte[input.readInt()];
input.readFully(conversionTmp);
this.conversion = new String(conversionTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.generationId);
if (this.originalPath == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var originalPathTmp = this.originalPath.getBytes(StandardCharsets.UTF_8);
output.writeInt(originalPathTmp.length);
output.write(originalPathTmp);
}
if (this.destinationPath == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var destinationPathTmp = this.destinationPath.getBytes(StandardCharsets.UTF_8);
output.writeInt(destinationPathTmp.length);
output.write(destinationPathTmp);
}
if (this.conversion == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var conversionTmp = this.conversion.getBytes(StandardCharsets.UTF_8);
output.writeInt(conversionTmp.length);
output.write(conversionTmp);
}
}
}
public static class UpdateFileGenerationStop extends Update {
public long generationId;
public static final int CONSTRUCTOR = -1894449685;
public UpdateFileGenerationStop() {}
public UpdateFileGenerationStop(long generationId) {
this.generationId = generationId;
}
public UpdateFileGenerationStop(DataInput input) throws IOException {
this.generationId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.generationId);
}
}
public static class UpdateCall extends Update {
public Call call;
public static final int CONSTRUCTOR = 1337184477;
public UpdateCall() {}
public UpdateCall(Call call) {
this.call = call;
}
public UpdateCall(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Call.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.call = new Call(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.call == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.call.serialize(output);
}
}
}
public static class UpdateUserPrivacySettingRules extends Update {
public UserPrivacySetting setting;
public UserPrivacySettingRules rules;
public static final int CONSTRUCTOR = -912960778;
public UpdateUserPrivacySettingRules() {}
public UpdateUserPrivacySettingRules(UserPrivacySetting setting, UserPrivacySettingRules rules) {
this.setting = setting;
this.rules = rules;
}
public UpdateUserPrivacySettingRules(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case UserPrivacySettingShowStatus.CONSTRUCTOR:
this.setting = new UserPrivacySettingShowStatus(input);
break;
case UserPrivacySettingShowProfilePhoto.CONSTRUCTOR:
this.setting = new UserPrivacySettingShowProfilePhoto(input);
break;
case UserPrivacySettingShowLinkInForwardedMessages.CONSTRUCTOR:
this.setting = new UserPrivacySettingShowLinkInForwardedMessages(input);
break;
case UserPrivacySettingShowPhoneNumber.CONSTRUCTOR:
this.setting = new UserPrivacySettingShowPhoneNumber(input);
break;
case UserPrivacySettingAllowChatInvites.CONSTRUCTOR:
this.setting = new UserPrivacySettingAllowChatInvites(input);
break;
case UserPrivacySettingAllowCalls.CONSTRUCTOR:
this.setting = new UserPrivacySettingAllowCalls(input);
break;
case UserPrivacySettingAllowPeerToPeerCalls.CONSTRUCTOR:
this.setting = new UserPrivacySettingAllowPeerToPeerCalls(input);
break;
case UserPrivacySettingAllowFindingByPhoneNumber.CONSTRUCTOR:
this.setting = new UserPrivacySettingAllowFindingByPhoneNumber(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
if (UserPrivacySettingRules.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.rules = new UserPrivacySettingRules(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.setting == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.setting.serialize(output);
}
if (this.rules == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.rules.serialize(output);
}
}
}
public static class UpdateUnreadMessageCount extends Update {
public ChatList chatList;
public int unreadCount;
public int unreadUnmutedCount;
public static final int CONSTRUCTOR = 78987721;
public UpdateUnreadMessageCount() {}
public UpdateUnreadMessageCount(ChatList chatList, int unreadCount, int unreadUnmutedCount) {
this.chatList = chatList;
this.unreadCount = unreadCount;
this.unreadUnmutedCount = unreadUnmutedCount;
}
public UpdateUnreadMessageCount(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatListMain.CONSTRUCTOR:
this.chatList = new ChatListMain(input);
break;
case ChatListArchive.CONSTRUCTOR:
this.chatList = new ChatListArchive(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.unreadCount = input.readInt();
this.unreadUnmutedCount = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.chatList == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.chatList.serialize(output);
}
output.writeInt(this.unreadCount);
output.writeInt(this.unreadUnmutedCount);
}
}
public static class UpdateUnreadChatCount extends Update {
public ChatList chatList;
public int totalCount;
public int unreadCount;
public int unreadUnmutedCount;
public int markedAsUnreadCount;
public int markedAsUnreadUnmutedCount;
public static final int CONSTRUCTOR = 1994494530;
public UpdateUnreadChatCount() {}
public UpdateUnreadChatCount(ChatList chatList, int totalCount, int unreadCount, int unreadUnmutedCount, int markedAsUnreadCount, int markedAsUnreadUnmutedCount) {
this.chatList = chatList;
this.totalCount = totalCount;
this.unreadCount = unreadCount;
this.unreadUnmutedCount = unreadUnmutedCount;
this.markedAsUnreadCount = markedAsUnreadCount;
this.markedAsUnreadUnmutedCount = markedAsUnreadUnmutedCount;
}
public UpdateUnreadChatCount(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatListMain.CONSTRUCTOR:
this.chatList = new ChatListMain(input);
break;
case ChatListArchive.CONSTRUCTOR:
this.chatList = new ChatListArchive(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.totalCount = input.readInt();
this.unreadCount = input.readInt();
this.unreadUnmutedCount = input.readInt();
this.markedAsUnreadCount = input.readInt();
this.markedAsUnreadUnmutedCount = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.chatList == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.chatList.serialize(output);
}
output.writeInt(this.totalCount);
output.writeInt(this.unreadCount);
output.writeInt(this.unreadUnmutedCount);
output.writeInt(this.markedAsUnreadCount);
output.writeInt(this.markedAsUnreadUnmutedCount);
}
}
public static class UpdateOption extends Update {
public String name;
public OptionValue value;
public static final int CONSTRUCTOR = 900822020;
public UpdateOption() {}
public UpdateOption(String name, OptionValue value) {
this.name = name;
this.value = value;
}
public UpdateOption(DataInput input) throws IOException {
if (input.readBoolean()) {
var nameTmp = new byte[input.readInt()];
input.readFully(nameTmp);
this.name = new String(nameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case OptionValueBoolean.CONSTRUCTOR:
this.value = new OptionValueBoolean(input);
break;
case OptionValueEmpty.CONSTRUCTOR:
this.value = new OptionValueEmpty(input);
break;
case OptionValueInteger.CONSTRUCTOR:
this.value = new OptionValueInteger(input);
break;
case OptionValueString.CONSTRUCTOR:
this.value = new OptionValueString(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.name == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nameTmp = this.name.getBytes(StandardCharsets.UTF_8);
output.writeInt(nameTmp.length);
output.write(nameTmp);
}
if (this.value == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.value.serialize(output);
}
}
}
public static class UpdateStickerSet extends Update {
public StickerSet stickerSet;
public static final int CONSTRUCTOR = 1879268812;
public UpdateStickerSet() {}
public UpdateStickerSet(StickerSet stickerSet) {
this.stickerSet = stickerSet;
}
public UpdateStickerSet(DataInput input) throws IOException {
if (input.readBoolean()) {
if (StickerSet.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.stickerSet = new StickerSet(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.stickerSet == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.stickerSet.serialize(output);
}
}
}
public static class UpdateInstalledStickerSets extends Update {
public boolean isMasks;
public long[] stickerSetIds;
public static final int CONSTRUCTOR = 1125575977;
public UpdateInstalledStickerSets() {}
public UpdateInstalledStickerSets(boolean isMasks, long[] stickerSetIds) {
this.isMasks = isMasks;
this.stickerSetIds = stickerSetIds;
}
public UpdateInstalledStickerSets(DataInput input) throws IOException {
this.isMasks = input.readBoolean();
if (input.readBoolean()) {
this.stickerSetIds = new long[input.readInt()];
for (int i = 0; i < this.stickerSetIds.length; i++) {
this.stickerSetIds[i] = input.readLong();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isMasks);
if (this.stickerSetIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.stickerSetIds.length);
for (int i = 0; i < this.stickerSetIds.length; i++) {
output.writeLong(this.stickerSetIds[i]);
}
}
}
}
public static class UpdateTrendingStickerSets extends Update {
public StickerSets stickerSets;
public static final int CONSTRUCTOR = 450714593;
public UpdateTrendingStickerSets() {}
public UpdateTrendingStickerSets(StickerSets stickerSets) {
this.stickerSets = stickerSets;
}
public UpdateTrendingStickerSets(DataInput input) throws IOException {
if (input.readBoolean()) {
if (StickerSets.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.stickerSets = new StickerSets(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.stickerSets == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.stickerSets.serialize(output);
}
}
}
public static class UpdateRecentStickers extends Update {
public boolean isAttached;
public int[] stickerIds;
public static final int CONSTRUCTOR = 1906403540;
public UpdateRecentStickers() {}
public UpdateRecentStickers(boolean isAttached, int[] stickerIds) {
this.isAttached = isAttached;
this.stickerIds = stickerIds;
}
public UpdateRecentStickers(DataInput input) throws IOException {
this.isAttached = input.readBoolean();
if (input.readBoolean()) {
this.stickerIds = new int[input.readInt()];
for (int i = 0; i < this.stickerIds.length; i++) {
this.stickerIds[i] = input.readInt();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isAttached);
if (this.stickerIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.stickerIds.length);
for (int i = 0; i < this.stickerIds.length; i++) {
output.writeInt(this.stickerIds[i]);
}
}
}
}
public static class UpdateFavoriteStickers extends Update {
public int[] stickerIds;
public static final int CONSTRUCTOR = 1662240999;
public UpdateFavoriteStickers() {}
public UpdateFavoriteStickers(int[] stickerIds) {
this.stickerIds = stickerIds;
}
public UpdateFavoriteStickers(DataInput input) throws IOException {
if (input.readBoolean()) {
this.stickerIds = new int[input.readInt()];
for (int i = 0; i < this.stickerIds.length; i++) {
this.stickerIds[i] = input.readInt();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.stickerIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.stickerIds.length);
for (int i = 0; i < this.stickerIds.length; i++) {
output.writeInt(this.stickerIds[i]);
}
}
}
}
public static class UpdateSavedAnimations extends Update {
public int[] animationIds;
public static final int CONSTRUCTOR = 65563814;
public UpdateSavedAnimations() {}
public UpdateSavedAnimations(int[] animationIds) {
this.animationIds = animationIds;
}
public UpdateSavedAnimations(DataInput input) throws IOException {
if (input.readBoolean()) {
this.animationIds = new int[input.readInt()];
for (int i = 0; i < this.animationIds.length; i++) {
this.animationIds[i] = input.readInt();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.animationIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.animationIds.length);
for (int i = 0; i < this.animationIds.length; i++) {
output.writeInt(this.animationIds[i]);
}
}
}
}
public static class UpdateSelectedBackground extends Update {
public boolean forDarkTheme;
public Background background;
public static final int CONSTRUCTOR = -1715658659;
public UpdateSelectedBackground() {}
public UpdateSelectedBackground(boolean forDarkTheme, Background background) {
this.forDarkTheme = forDarkTheme;
this.background = background;
}
public UpdateSelectedBackground(DataInput input) throws IOException {
this.forDarkTheme = input.readBoolean();
if (input.readBoolean()) {
if (Background.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.background = new Background(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.forDarkTheme);
if (this.background == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.background.serialize(output);
}
}
}
public static class UpdateLanguagePackStrings extends Update {
public String localizationTarget;
public String languagePackId;
public LanguagePackString[] strings;
public static final int CONSTRUCTOR = -1056319886;
public UpdateLanguagePackStrings() {}
public UpdateLanguagePackStrings(String localizationTarget, String languagePackId, LanguagePackString[] strings) {
this.localizationTarget = localizationTarget;
this.languagePackId = languagePackId;
this.strings = strings;
}
public UpdateLanguagePackStrings(DataInput input) throws IOException {
if (input.readBoolean()) {
var localizationTargetTmp = new byte[input.readInt()];
input.readFully(localizationTargetTmp);
this.localizationTarget = new String(localizationTargetTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var languagePackIdTmp = new byte[input.readInt()];
input.readFully(languagePackIdTmp);
this.languagePackId = new String(languagePackIdTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
this.strings = new LanguagePackString[input.readInt()];
for (int i = 0; i < this.strings.length; i++) {
if (LanguagePackString.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.strings[i] = new LanguagePackString(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.localizationTarget == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var localizationTargetTmp = this.localizationTarget.getBytes(StandardCharsets.UTF_8);
output.writeInt(localizationTargetTmp.length);
output.write(localizationTargetTmp);
}
if (this.languagePackId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var languagePackIdTmp = this.languagePackId.getBytes(StandardCharsets.UTF_8);
output.writeInt(languagePackIdTmp.length);
output.write(languagePackIdTmp);
}
if (this.strings == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.strings.length);
for (int i = 0; i < this.strings.length; i++) {
this.strings[i].serialize(output);
}
}
}
}
public static class UpdateConnectionState extends Update {
public ConnectionState state;
public static final int CONSTRUCTOR = 1469292078;
public UpdateConnectionState() {}
public UpdateConnectionState(ConnectionState state) {
this.state = state;
}
public UpdateConnectionState(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case ConnectionStateWaitingForNetwork.CONSTRUCTOR:
this.state = new ConnectionStateWaitingForNetwork(input);
break;
case ConnectionStateConnectingToProxy.CONSTRUCTOR:
this.state = new ConnectionStateConnectingToProxy(input);
break;
case ConnectionStateConnecting.CONSTRUCTOR:
this.state = new ConnectionStateConnecting(input);
break;
case ConnectionStateUpdating.CONSTRUCTOR:
this.state = new ConnectionStateUpdating(input);
break;
case ConnectionStateReady.CONSTRUCTOR:
this.state = new ConnectionStateReady(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.state == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.state.serialize(output);
}
}
}
public static class UpdateTermsOfService extends Update {
public String termsOfServiceId;
public TermsOfService termsOfService;
public static final int CONSTRUCTOR = -1304640162;
public UpdateTermsOfService() {}
public UpdateTermsOfService(String termsOfServiceId, TermsOfService termsOfService) {
this.termsOfServiceId = termsOfServiceId;
this.termsOfService = termsOfService;
}
public UpdateTermsOfService(DataInput input) throws IOException {
if (input.readBoolean()) {
var termsOfServiceIdTmp = new byte[input.readInt()];
input.readFully(termsOfServiceIdTmp);
this.termsOfServiceId = new String(termsOfServiceIdTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (TermsOfService.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.termsOfService = new TermsOfService(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.termsOfServiceId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var termsOfServiceIdTmp = this.termsOfServiceId.getBytes(StandardCharsets.UTF_8);
output.writeInt(termsOfServiceIdTmp.length);
output.write(termsOfServiceIdTmp);
}
if (this.termsOfService == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.termsOfService.serialize(output);
}
}
}
public static class UpdateUsersNearby extends Update {
public ChatNearby[] usersNearby;
public static final int CONSTRUCTOR = -1517109163;
public UpdateUsersNearby() {}
public UpdateUsersNearby(ChatNearby[] usersNearby) {
this.usersNearby = usersNearby;
}
public UpdateUsersNearby(DataInput input) throws IOException {
if (input.readBoolean()) {
this.usersNearby = new ChatNearby[input.readInt()];
for (int i = 0; i < this.usersNearby.length; i++) {
if (ChatNearby.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.usersNearby[i] = new ChatNearby(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.usersNearby == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.usersNearby.length);
for (int i = 0; i < this.usersNearby.length; i++) {
this.usersNearby[i].serialize(output);
}
}
}
}
public static class UpdateDiceEmojis extends Update {
public String[] emojis;
public static final int CONSTRUCTOR = -1069066940;
public UpdateDiceEmojis() {}
public UpdateDiceEmojis(String[] emojis) {
this.emojis = emojis;
}
public UpdateDiceEmojis(DataInput input) throws IOException {
if (input.readBoolean()) {
this.emojis = new String[input.readInt()];
for (int i = 0; i < this.emojis.length; i++) {
var emojisTmp = new byte[input.readInt()];
input.readFully(emojisTmp);
this.emojis[i] = new String(emojisTmp, StandardCharsets.UTF_8);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.emojis == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.emojis.length);
for (int i = 0; i < this.emojis.length; i++) {
var emojisTmp = this.emojis[i].getBytes(StandardCharsets.UTF_8);
output.writeInt(emojisTmp.length);
output.write(emojisTmp);
}
}
}
}
public static class UpdateNewInlineQuery extends Update {
public long id;
public int senderUserId;
public Location userLocation;
public String query;
public String offset;
public static final int CONSTRUCTOR = 2064730634;
public UpdateNewInlineQuery() {}
public UpdateNewInlineQuery(long id, int senderUserId, Location userLocation, String query, String offset) {
this.id = id;
this.senderUserId = senderUserId;
this.userLocation = userLocation;
this.query = query;
this.offset = offset;
}
public UpdateNewInlineQuery(DataInput input) throws IOException {
this.id = input.readLong();
this.senderUserId = input.readInt();
if (input.readBoolean()) {
if (Location.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.userLocation = new Location(input);
}
if (input.readBoolean()) {
var queryTmp = new byte[input.readInt()];
input.readFully(queryTmp);
this.query = new String(queryTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var offsetTmp = new byte[input.readInt()];
input.readFully(offsetTmp);
this.offset = new String(offsetTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.id);
output.writeInt(this.senderUserId);
if (this.userLocation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.userLocation.serialize(output);
}
if (this.query == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var queryTmp = this.query.getBytes(StandardCharsets.UTF_8);
output.writeInt(queryTmp.length);
output.write(queryTmp);
}
if (this.offset == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var offsetTmp = this.offset.getBytes(StandardCharsets.UTF_8);
output.writeInt(offsetTmp.length);
output.write(offsetTmp);
}
}
}
public static class UpdateNewChosenInlineResult extends Update {
public int senderUserId;
public Location userLocation;
public String query;
public String resultId;
public String inlineMessageId;
public static final int CONSTRUCTOR = 527526965;
public UpdateNewChosenInlineResult() {}
public UpdateNewChosenInlineResult(int senderUserId, Location userLocation, String query, String resultId, String inlineMessageId) {
this.senderUserId = senderUserId;
this.userLocation = userLocation;
this.query = query;
this.resultId = resultId;
this.inlineMessageId = inlineMessageId;
}
public UpdateNewChosenInlineResult(DataInput input) throws IOException {
this.senderUserId = input.readInt();
if (input.readBoolean()) {
if (Location.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.userLocation = new Location(input);
}
if (input.readBoolean()) {
var queryTmp = new byte[input.readInt()];
input.readFully(queryTmp);
this.query = new String(queryTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var resultIdTmp = new byte[input.readInt()];
input.readFully(resultIdTmp);
this.resultId = new String(resultIdTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var inlineMessageIdTmp = new byte[input.readInt()];
input.readFully(inlineMessageIdTmp);
this.inlineMessageId = new String(inlineMessageIdTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.senderUserId);
if (this.userLocation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.userLocation.serialize(output);
}
if (this.query == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var queryTmp = this.query.getBytes(StandardCharsets.UTF_8);
output.writeInt(queryTmp.length);
output.write(queryTmp);
}
if (this.resultId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var resultIdTmp = this.resultId.getBytes(StandardCharsets.UTF_8);
output.writeInt(resultIdTmp.length);
output.write(resultIdTmp);
}
if (this.inlineMessageId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var inlineMessageIdTmp = this.inlineMessageId.getBytes(StandardCharsets.UTF_8);
output.writeInt(inlineMessageIdTmp.length);
output.write(inlineMessageIdTmp);
}
}
}
public static class UpdateNewCallbackQuery extends Update {
public long id;
public int senderUserId;
public long chatId;
public long messageId;
public long chatInstance;
public CallbackQueryPayload payload;
public static final int CONSTRUCTOR = -2044226370;
public UpdateNewCallbackQuery() {}
public UpdateNewCallbackQuery(long id, int senderUserId, long chatId, long messageId, long chatInstance, CallbackQueryPayload payload) {
this.id = id;
this.senderUserId = senderUserId;
this.chatId = chatId;
this.messageId = messageId;
this.chatInstance = chatInstance;
this.payload = payload;
}
public UpdateNewCallbackQuery(DataInput input) throws IOException {
this.id = input.readLong();
this.senderUserId = input.readInt();
this.chatId = input.readLong();
this.messageId = input.readLong();
this.chatInstance = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case CallbackQueryPayloadData.CONSTRUCTOR:
this.payload = new CallbackQueryPayloadData(input);
break;
case CallbackQueryPayloadGame.CONSTRUCTOR:
this.payload = new CallbackQueryPayloadGame(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.id);
output.writeInt(this.senderUserId);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
output.writeLong(this.chatInstance);
if (this.payload == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.payload.serialize(output);
}
}
}
public static class UpdateNewInlineCallbackQuery extends Update {
public long id;
public int senderUserId;
public String inlineMessageId;
public long chatInstance;
public CallbackQueryPayload payload;
public static final int CONSTRUCTOR = -1879154829;
public UpdateNewInlineCallbackQuery() {}
public UpdateNewInlineCallbackQuery(long id, int senderUserId, String inlineMessageId, long chatInstance, CallbackQueryPayload payload) {
this.id = id;
this.senderUserId = senderUserId;
this.inlineMessageId = inlineMessageId;
this.chatInstance = chatInstance;
this.payload = payload;
}
public UpdateNewInlineCallbackQuery(DataInput input) throws IOException {
this.id = input.readLong();
this.senderUserId = input.readInt();
if (input.readBoolean()) {
var inlineMessageIdTmp = new byte[input.readInt()];
input.readFully(inlineMessageIdTmp);
this.inlineMessageId = new String(inlineMessageIdTmp, StandardCharsets.UTF_8);
}
this.chatInstance = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case CallbackQueryPayloadData.CONSTRUCTOR:
this.payload = new CallbackQueryPayloadData(input);
break;
case CallbackQueryPayloadGame.CONSTRUCTOR:
this.payload = new CallbackQueryPayloadGame(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.id);
output.writeInt(this.senderUserId);
if (this.inlineMessageId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var inlineMessageIdTmp = this.inlineMessageId.getBytes(StandardCharsets.UTF_8);
output.writeInt(inlineMessageIdTmp.length);
output.write(inlineMessageIdTmp);
}
output.writeLong(this.chatInstance);
if (this.payload == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.payload.serialize(output);
}
}
}
public static class UpdateNewShippingQuery extends Update {
public long id;
public int senderUserId;
public String invoicePayload;
public Address shippingAddress;
public static final int CONSTRUCTOR = -817474682;
public UpdateNewShippingQuery() {}
public UpdateNewShippingQuery(long id, int senderUserId, String invoicePayload, Address shippingAddress) {
this.id = id;
this.senderUserId = senderUserId;
this.invoicePayload = invoicePayload;
this.shippingAddress = shippingAddress;
}
public UpdateNewShippingQuery(DataInput input) throws IOException {
this.id = input.readLong();
this.senderUserId = input.readInt();
if (input.readBoolean()) {
var invoicePayloadTmp = new byte[input.readInt()];
input.readFully(invoicePayloadTmp);
this.invoicePayload = new String(invoicePayloadTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Address.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.shippingAddress = new Address(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.id);
output.writeInt(this.senderUserId);
if (this.invoicePayload == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var invoicePayloadTmp = this.invoicePayload.getBytes(StandardCharsets.UTF_8);
output.writeInt(invoicePayloadTmp.length);
output.write(invoicePayloadTmp);
}
if (this.shippingAddress == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.shippingAddress.serialize(output);
}
}
}
public static class UpdateNewPreCheckoutQuery extends Update {
public long id;
public int senderUserId;
public String currency;
public long totalAmount;
public byte[] invoicePayload;
public String shippingOptionId;
public OrderInfo orderInfo;
public static final int CONSTRUCTOR = 87964006;
public UpdateNewPreCheckoutQuery() {}
public UpdateNewPreCheckoutQuery(long id, int senderUserId, String currency, long totalAmount, byte[] invoicePayload, String shippingOptionId, OrderInfo orderInfo) {
this.id = id;
this.senderUserId = senderUserId;
this.currency = currency;
this.totalAmount = totalAmount;
this.invoicePayload = invoicePayload;
this.shippingOptionId = shippingOptionId;
this.orderInfo = orderInfo;
}
public UpdateNewPreCheckoutQuery(DataInput input) throws IOException {
this.id = input.readLong();
this.senderUserId = input.readInt();
if (input.readBoolean()) {
var currencyTmp = new byte[input.readInt()];
input.readFully(currencyTmp);
this.currency = new String(currencyTmp, StandardCharsets.UTF_8);
}
this.totalAmount = input.readLong();
if (input.readBoolean()) {
this.invoicePayload = new byte[input.readInt()];
input.readFully(this.invoicePayload);
}
if (input.readBoolean()) {
var shippingOptionIdTmp = new byte[input.readInt()];
input.readFully(shippingOptionIdTmp);
this.shippingOptionId = new String(shippingOptionIdTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (OrderInfo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.orderInfo = new OrderInfo(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.id);
output.writeInt(this.senderUserId);
if (this.currency == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var currencyTmp = this.currency.getBytes(StandardCharsets.UTF_8);
output.writeInt(currencyTmp.length);
output.write(currencyTmp);
}
output.writeLong(this.totalAmount);
if (this.invoicePayload == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.invoicePayload.length);
output.write(this.invoicePayload);
}
if (this.shippingOptionId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var shippingOptionIdTmp = this.shippingOptionId.getBytes(StandardCharsets.UTF_8);
output.writeInt(shippingOptionIdTmp.length);
output.write(shippingOptionIdTmp);
}
if (this.orderInfo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.orderInfo.serialize(output);
}
}
}
public static class UpdateNewCustomEvent extends Update {
public String event;
public static final int CONSTRUCTOR = 1994222092;
public UpdateNewCustomEvent() {}
public UpdateNewCustomEvent(String event) {
this.event = event;
}
public UpdateNewCustomEvent(DataInput input) throws IOException {
if (input.readBoolean()) {
var eventTmp = new byte[input.readInt()];
input.readFully(eventTmp);
this.event = new String(eventTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.event == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var eventTmp = this.event.getBytes(StandardCharsets.UTF_8);
output.writeInt(eventTmp.length);
output.write(eventTmp);
}
}
}
public static class UpdateNewCustomQuery extends Update {
public long id;
public String data;
public int timeout;
public static final int CONSTRUCTOR = -687670874;
public UpdateNewCustomQuery() {}
public UpdateNewCustomQuery(long id, String data, int timeout) {
this.id = id;
this.data = data;
this.timeout = timeout;
}
public UpdateNewCustomQuery(DataInput input) throws IOException {
this.id = input.readLong();
if (input.readBoolean()) {
var dataTmp = new byte[input.readInt()];
input.readFully(dataTmp);
this.data = new String(dataTmp, StandardCharsets.UTF_8);
}
this.timeout = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.id);
if (this.data == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var dataTmp = this.data.getBytes(StandardCharsets.UTF_8);
output.writeInt(dataTmp.length);
output.write(dataTmp);
}
output.writeInt(this.timeout);
}
}
public static class UpdatePoll extends Update {
public Poll poll;
public static final int CONSTRUCTOR = -1771342902;
public UpdatePoll() {}
public UpdatePoll(Poll poll) {
this.poll = poll;
}
public UpdatePoll(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Poll.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.poll = new Poll(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.poll == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.poll.serialize(output);
}
}
}
public static class UpdatePollAnswer extends Update {
public long pollId;
public int userId;
public int[] optionIds;
public static final int CONSTRUCTOR = 1606139344;
public UpdatePollAnswer() {}
public UpdatePollAnswer(long pollId, int userId, int[] optionIds) {
this.pollId = pollId;
this.userId = userId;
this.optionIds = optionIds;
}
public UpdatePollAnswer(DataInput input) throws IOException {
this.pollId = input.readLong();
this.userId = input.readInt();
if (input.readBoolean()) {
this.optionIds = new int[input.readInt()];
for (int i = 0; i < this.optionIds.length; i++) {
this.optionIds[i] = input.readInt();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.pollId);
output.writeInt(this.userId);
if (this.optionIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.optionIds.length);
for (int i = 0; i < this.optionIds.length; i++) {
output.writeInt(this.optionIds[i]);
}
}
}
}
public static class Updates extends Object {
public Update[] updates;
public static final int CONSTRUCTOR = 475842347;
public Updates() {}
public Updates(Update[] updates) {
this.updates = updates;
}
public Updates(DataInput input) throws IOException {
if (input.readBoolean()) {
this.updates = new Update[input.readInt()];
for (int i = 0; i < this.updates.length; i++) {
switch(input.readInt()) {
case UpdateAuthorizationState.CONSTRUCTOR:
this.updates[i] = new UpdateAuthorizationState(input);
break;
case UpdateNewMessage.CONSTRUCTOR:
this.updates[i] = new UpdateNewMessage(input);
break;
case UpdateMessageSendAcknowledged.CONSTRUCTOR:
this.updates[i] = new UpdateMessageSendAcknowledged(input);
break;
case UpdateMessageSendSucceeded.CONSTRUCTOR:
this.updates[i] = new UpdateMessageSendSucceeded(input);
break;
case UpdateMessageSendFailed.CONSTRUCTOR:
this.updates[i] = new UpdateMessageSendFailed(input);
break;
case UpdateMessageContent.CONSTRUCTOR:
this.updates[i] = new UpdateMessageContent(input);
break;
case UpdateMessageEdited.CONSTRUCTOR:
this.updates[i] = new UpdateMessageEdited(input);
break;
case UpdateMessageViews.CONSTRUCTOR:
this.updates[i] = new UpdateMessageViews(input);
break;
case UpdateMessageContentOpened.CONSTRUCTOR:
this.updates[i] = new UpdateMessageContentOpened(input);
break;
case UpdateMessageMentionRead.CONSTRUCTOR:
this.updates[i] = new UpdateMessageMentionRead(input);
break;
case UpdateMessageLiveLocationViewed.CONSTRUCTOR:
this.updates[i] = new UpdateMessageLiveLocationViewed(input);
break;
case UpdateNewChat.CONSTRUCTOR:
this.updates[i] = new UpdateNewChat(input);
break;
case UpdateChatChatList.CONSTRUCTOR:
this.updates[i] = new UpdateChatChatList(input);
break;
case UpdateChatTitle.CONSTRUCTOR:
this.updates[i] = new UpdateChatTitle(input);
break;
case UpdateChatPhoto.CONSTRUCTOR:
this.updates[i] = new UpdateChatPhoto(input);
break;
case UpdateChatPermissions.CONSTRUCTOR:
this.updates[i] = new UpdateChatPermissions(input);
break;
case UpdateChatLastMessage.CONSTRUCTOR:
this.updates[i] = new UpdateChatLastMessage(input);
break;
case UpdateChatOrder.CONSTRUCTOR:
this.updates[i] = new UpdateChatOrder(input);
break;
case UpdateChatIsPinned.CONSTRUCTOR:
this.updates[i] = new UpdateChatIsPinned(input);
break;
case UpdateChatIsMarkedAsUnread.CONSTRUCTOR:
this.updates[i] = new UpdateChatIsMarkedAsUnread(input);
break;
case UpdateChatIsSponsored.CONSTRUCTOR:
this.updates[i] = new UpdateChatIsSponsored(input);
break;
case UpdateChatHasScheduledMessages.CONSTRUCTOR:
this.updates[i] = new UpdateChatHasScheduledMessages(input);
break;
case UpdateChatDefaultDisableNotification.CONSTRUCTOR:
this.updates[i] = new UpdateChatDefaultDisableNotification(input);
break;
case UpdateChatReadInbox.CONSTRUCTOR:
this.updates[i] = new UpdateChatReadInbox(input);
break;
case UpdateChatReadOutbox.CONSTRUCTOR:
this.updates[i] = new UpdateChatReadOutbox(input);
break;
case UpdateChatUnreadMentionCount.CONSTRUCTOR:
this.updates[i] = new UpdateChatUnreadMentionCount(input);
break;
case UpdateChatNotificationSettings.CONSTRUCTOR:
this.updates[i] = new UpdateChatNotificationSettings(input);
break;
case UpdateScopeNotificationSettings.CONSTRUCTOR:
this.updates[i] = new UpdateScopeNotificationSettings(input);
break;
case UpdateChatActionBar.CONSTRUCTOR:
this.updates[i] = new UpdateChatActionBar(input);
break;
case UpdateChatPinnedMessage.CONSTRUCTOR:
this.updates[i] = new UpdateChatPinnedMessage(input);
break;
case UpdateChatReplyMarkup.CONSTRUCTOR:
this.updates[i] = new UpdateChatReplyMarkup(input);
break;
case UpdateChatDraftMessage.CONSTRUCTOR:
this.updates[i] = new UpdateChatDraftMessage(input);
break;
case UpdateChatOnlineMemberCount.CONSTRUCTOR:
this.updates[i] = new UpdateChatOnlineMemberCount(input);
break;
case UpdateNotification.CONSTRUCTOR:
this.updates[i] = new UpdateNotification(input);
break;
case UpdateNotificationGroup.CONSTRUCTOR:
this.updates[i] = new UpdateNotificationGroup(input);
break;
case UpdateActiveNotifications.CONSTRUCTOR:
this.updates[i] = new UpdateActiveNotifications(input);
break;
case UpdateHavePendingNotifications.CONSTRUCTOR:
this.updates[i] = new UpdateHavePendingNotifications(input);
break;
case UpdateDeleteMessages.CONSTRUCTOR:
this.updates[i] = new UpdateDeleteMessages(input);
break;
case UpdateUserChatAction.CONSTRUCTOR:
this.updates[i] = new UpdateUserChatAction(input);
break;
case UpdateUserStatus.CONSTRUCTOR:
this.updates[i] = new UpdateUserStatus(input);
break;
case UpdateUser.CONSTRUCTOR:
this.updates[i] = new UpdateUser(input);
break;
case UpdateBasicGroup.CONSTRUCTOR:
this.updates[i] = new UpdateBasicGroup(input);
break;
case UpdateSupergroup.CONSTRUCTOR:
this.updates[i] = new UpdateSupergroup(input);
break;
case UpdateSecretChat.CONSTRUCTOR:
this.updates[i] = new UpdateSecretChat(input);
break;
case UpdateUserFullInfo.CONSTRUCTOR:
this.updates[i] = new UpdateUserFullInfo(input);
break;
case UpdateBasicGroupFullInfo.CONSTRUCTOR:
this.updates[i] = new UpdateBasicGroupFullInfo(input);
break;
case UpdateSupergroupFullInfo.CONSTRUCTOR:
this.updates[i] = new UpdateSupergroupFullInfo(input);
break;
case UpdateServiceNotification.CONSTRUCTOR:
this.updates[i] = new UpdateServiceNotification(input);
break;
case UpdateFile.CONSTRUCTOR:
this.updates[i] = new UpdateFile(input);
break;
case UpdateFileGenerationStart.CONSTRUCTOR:
this.updates[i] = new UpdateFileGenerationStart(input);
break;
case UpdateFileGenerationStop.CONSTRUCTOR:
this.updates[i] = new UpdateFileGenerationStop(input);
break;
case UpdateCall.CONSTRUCTOR:
this.updates[i] = new UpdateCall(input);
break;
case UpdateUserPrivacySettingRules.CONSTRUCTOR:
this.updates[i] = new UpdateUserPrivacySettingRules(input);
break;
case UpdateUnreadMessageCount.CONSTRUCTOR:
this.updates[i] = new UpdateUnreadMessageCount(input);
break;
case UpdateUnreadChatCount.CONSTRUCTOR:
this.updates[i] = new UpdateUnreadChatCount(input);
break;
case UpdateOption.CONSTRUCTOR:
this.updates[i] = new UpdateOption(input);
break;
case UpdateStickerSet.CONSTRUCTOR:
this.updates[i] = new UpdateStickerSet(input);
break;
case UpdateInstalledStickerSets.CONSTRUCTOR:
this.updates[i] = new UpdateInstalledStickerSets(input);
break;
case UpdateTrendingStickerSets.CONSTRUCTOR:
this.updates[i] = new UpdateTrendingStickerSets(input);
break;
case UpdateRecentStickers.CONSTRUCTOR:
this.updates[i] = new UpdateRecentStickers(input);
break;
case UpdateFavoriteStickers.CONSTRUCTOR:
this.updates[i] = new UpdateFavoriteStickers(input);
break;
case UpdateSavedAnimations.CONSTRUCTOR:
this.updates[i] = new UpdateSavedAnimations(input);
break;
case UpdateSelectedBackground.CONSTRUCTOR:
this.updates[i] = new UpdateSelectedBackground(input);
break;
case UpdateLanguagePackStrings.CONSTRUCTOR:
this.updates[i] = new UpdateLanguagePackStrings(input);
break;
case UpdateConnectionState.CONSTRUCTOR:
this.updates[i] = new UpdateConnectionState(input);
break;
case UpdateTermsOfService.CONSTRUCTOR:
this.updates[i] = new UpdateTermsOfService(input);
break;
case UpdateUsersNearby.CONSTRUCTOR:
this.updates[i] = new UpdateUsersNearby(input);
break;
case UpdateDiceEmojis.CONSTRUCTOR:
this.updates[i] = new UpdateDiceEmojis(input);
break;
case UpdateNewInlineQuery.CONSTRUCTOR:
this.updates[i] = new UpdateNewInlineQuery(input);
break;
case UpdateNewChosenInlineResult.CONSTRUCTOR:
this.updates[i] = new UpdateNewChosenInlineResult(input);
break;
case UpdateNewCallbackQuery.CONSTRUCTOR:
this.updates[i] = new UpdateNewCallbackQuery(input);
break;
case UpdateNewInlineCallbackQuery.CONSTRUCTOR:
this.updates[i] = new UpdateNewInlineCallbackQuery(input);
break;
case UpdateNewShippingQuery.CONSTRUCTOR:
this.updates[i] = new UpdateNewShippingQuery(input);
break;
case UpdateNewPreCheckoutQuery.CONSTRUCTOR:
this.updates[i] = new UpdateNewPreCheckoutQuery(input);
break;
case UpdateNewCustomEvent.CONSTRUCTOR:
this.updates[i] = new UpdateNewCustomEvent(input);
break;
case UpdateNewCustomQuery.CONSTRUCTOR:
this.updates[i] = new UpdateNewCustomQuery(input);
break;
case UpdatePoll.CONSTRUCTOR:
this.updates[i] = new UpdatePoll(input);
break;
case UpdatePollAnswer.CONSTRUCTOR:
this.updates[i] = new UpdatePollAnswer(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.updates == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.updates.length);
for (int i = 0; i < this.updates.length; i++) {
this.updates[i].serialize(output);
}
}
}
}
public static class User extends Object {
public int id;
public String firstName;
public String lastName;
public String username;
public String phoneNumber;
public UserStatus status;
public ProfilePhoto profilePhoto;
public boolean isContact;
public boolean isMutualContact;
public boolean isVerified;
public boolean isSupport;
public String restrictionReason;
public boolean isScam;
public boolean haveAccess;
public UserType type;
public String languageCode;
public static final int CONSTRUCTOR = -824771497;
public User() {}
public User(int id, String firstName, String lastName, String username, String phoneNumber, UserStatus status, ProfilePhoto profilePhoto, boolean isContact, boolean isMutualContact, boolean isVerified, boolean isSupport, String restrictionReason, boolean isScam, boolean haveAccess, UserType type, String languageCode) {
this.id = id;
this.firstName = firstName;
this.lastName = lastName;
this.username = username;
this.phoneNumber = phoneNumber;
this.status = status;
this.profilePhoto = profilePhoto;
this.isContact = isContact;
this.isMutualContact = isMutualContact;
this.isVerified = isVerified;
this.isSupport = isSupport;
this.restrictionReason = restrictionReason;
this.isScam = isScam;
this.haveAccess = haveAccess;
this.type = type;
this.languageCode = languageCode;
}
public User(DataInput input) throws IOException {
this.id = input.readInt();
if (input.readBoolean()) {
var firstNameTmp = new byte[input.readInt()];
input.readFully(firstNameTmp);
this.firstName = new String(firstNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var lastNameTmp = new byte[input.readInt()];
input.readFully(lastNameTmp);
this.lastName = new String(lastNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var usernameTmp = new byte[input.readInt()];
input.readFully(usernameTmp);
this.username = new String(usernameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var phoneNumberTmp = new byte[input.readInt()];
input.readFully(phoneNumberTmp);
this.phoneNumber = new String(phoneNumberTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case UserStatusEmpty.CONSTRUCTOR:
this.status = new UserStatusEmpty(input);
break;
case UserStatusOnline.CONSTRUCTOR:
this.status = new UserStatusOnline(input);
break;
case UserStatusOffline.CONSTRUCTOR:
this.status = new UserStatusOffline(input);
break;
case UserStatusRecently.CONSTRUCTOR:
this.status = new UserStatusRecently(input);
break;
case UserStatusLastWeek.CONSTRUCTOR:
this.status = new UserStatusLastWeek(input);
break;
case UserStatusLastMonth.CONSTRUCTOR:
this.status = new UserStatusLastMonth(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
if (ProfilePhoto.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.profilePhoto = new ProfilePhoto(input);
}
this.isContact = input.readBoolean();
this.isMutualContact = input.readBoolean();
this.isVerified = input.readBoolean();
this.isSupport = input.readBoolean();
if (input.readBoolean()) {
var restrictionReasonTmp = new byte[input.readInt()];
input.readFully(restrictionReasonTmp);
this.restrictionReason = new String(restrictionReasonTmp, StandardCharsets.UTF_8);
}
this.isScam = input.readBoolean();
this.haveAccess = input.readBoolean();
if (input.readBoolean()) {
switch(input.readInt()) {
case UserTypeRegular.CONSTRUCTOR:
this.type = new UserTypeRegular(input);
break;
case UserTypeDeleted.CONSTRUCTOR:
this.type = new UserTypeDeleted(input);
break;
case UserTypeBot.CONSTRUCTOR:
this.type = new UserTypeBot(input);
break;
case UserTypeUnknown.CONSTRUCTOR:
this.type = new UserTypeUnknown(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
var languageCodeTmp = new byte[input.readInt()];
input.readFully(languageCodeTmp);
this.languageCode = new String(languageCodeTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.id);
if (this.firstName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var firstNameTmp = this.firstName.getBytes(StandardCharsets.UTF_8);
output.writeInt(firstNameTmp.length);
output.write(firstNameTmp);
}
if (this.lastName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var lastNameTmp = this.lastName.getBytes(StandardCharsets.UTF_8);
output.writeInt(lastNameTmp.length);
output.write(lastNameTmp);
}
if (this.username == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var usernameTmp = this.username.getBytes(StandardCharsets.UTF_8);
output.writeInt(usernameTmp.length);
output.write(usernameTmp);
}
if (this.phoneNumber == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var phoneNumberTmp = this.phoneNumber.getBytes(StandardCharsets.UTF_8);
output.writeInt(phoneNumberTmp.length);
output.write(phoneNumberTmp);
}
if (this.status == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.status.serialize(output);
}
if (this.profilePhoto == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.profilePhoto.serialize(output);
}
output.writeBoolean(this.isContact);
output.writeBoolean(this.isMutualContact);
output.writeBoolean(this.isVerified);
output.writeBoolean(this.isSupport);
if (this.restrictionReason == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var restrictionReasonTmp = this.restrictionReason.getBytes(StandardCharsets.UTF_8);
output.writeInt(restrictionReasonTmp.length);
output.write(restrictionReasonTmp);
}
output.writeBoolean(this.isScam);
output.writeBoolean(this.haveAccess);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
if (this.languageCode == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var languageCodeTmp = this.languageCode.getBytes(StandardCharsets.UTF_8);
output.writeInt(languageCodeTmp.length);
output.write(languageCodeTmp);
}
}
}
public static class UserFullInfo extends Object {
public boolean isBlocked;
public boolean canBeCalled;
public boolean hasPrivateCalls;
public boolean needPhoneNumberPrivacyException;
public String bio;
public String shareText;
public int groupInCommonCount;
public BotInfo botInfo;
public static final int CONSTRUCTOR = 333888500;
public UserFullInfo() {}
public UserFullInfo(boolean isBlocked, boolean canBeCalled, boolean hasPrivateCalls, boolean needPhoneNumberPrivacyException, String bio, String shareText, int groupInCommonCount, BotInfo botInfo) {
this.isBlocked = isBlocked;
this.canBeCalled = canBeCalled;
this.hasPrivateCalls = hasPrivateCalls;
this.needPhoneNumberPrivacyException = needPhoneNumberPrivacyException;
this.bio = bio;
this.shareText = shareText;
this.groupInCommonCount = groupInCommonCount;
this.botInfo = botInfo;
}
public UserFullInfo(DataInput input) throws IOException {
this.isBlocked = input.readBoolean();
this.canBeCalled = input.readBoolean();
this.hasPrivateCalls = input.readBoolean();
this.needPhoneNumberPrivacyException = input.readBoolean();
if (input.readBoolean()) {
var bioTmp = new byte[input.readInt()];
input.readFully(bioTmp);
this.bio = new String(bioTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var shareTextTmp = new byte[input.readInt()];
input.readFully(shareTextTmp);
this.shareText = new String(shareTextTmp, StandardCharsets.UTF_8);
}
this.groupInCommonCount = input.readInt();
if (input.readBoolean()) {
if (BotInfo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.botInfo = new BotInfo(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isBlocked);
output.writeBoolean(this.canBeCalled);
output.writeBoolean(this.hasPrivateCalls);
output.writeBoolean(this.needPhoneNumberPrivacyException);
if (this.bio == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var bioTmp = this.bio.getBytes(StandardCharsets.UTF_8);
output.writeInt(bioTmp.length);
output.write(bioTmp);
}
if (this.shareText == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var shareTextTmp = this.shareText.getBytes(StandardCharsets.UTF_8);
output.writeInt(shareTextTmp.length);
output.write(shareTextTmp);
}
output.writeInt(this.groupInCommonCount);
if (this.botInfo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.botInfo.serialize(output);
}
}
}
public static class UserPrivacySettingShowStatus extends UserPrivacySetting {
public static final int CONSTRUCTOR = 1862829310;
public UserPrivacySettingShowStatus() {}
public UserPrivacySettingShowStatus(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class UserPrivacySettingShowProfilePhoto extends UserPrivacySetting {
public static final int CONSTRUCTOR = 1408485877;
public UserPrivacySettingShowProfilePhoto() {}
public UserPrivacySettingShowProfilePhoto(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class UserPrivacySettingShowLinkInForwardedMessages extends UserPrivacySetting {
public static final int CONSTRUCTOR = 592688870;
public UserPrivacySettingShowLinkInForwardedMessages() {}
public UserPrivacySettingShowLinkInForwardedMessages(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class UserPrivacySettingShowPhoneNumber extends UserPrivacySetting {
public static final int CONSTRUCTOR = -791567831;
public UserPrivacySettingShowPhoneNumber() {}
public UserPrivacySettingShowPhoneNumber(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class UserPrivacySettingAllowChatInvites extends UserPrivacySetting {
public static final int CONSTRUCTOR = 1271668007;
public UserPrivacySettingAllowChatInvites() {}
public UserPrivacySettingAllowChatInvites(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class UserPrivacySettingAllowCalls extends UserPrivacySetting {
public static final int CONSTRUCTOR = -906967291;
public UserPrivacySettingAllowCalls() {}
public UserPrivacySettingAllowCalls(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class UserPrivacySettingAllowPeerToPeerCalls extends UserPrivacySetting {
public static final int CONSTRUCTOR = 352500032;
public UserPrivacySettingAllowPeerToPeerCalls() {}
public UserPrivacySettingAllowPeerToPeerCalls(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class UserPrivacySettingAllowFindingByPhoneNumber extends UserPrivacySetting {
public static final int CONSTRUCTOR = -1846645423;
public UserPrivacySettingAllowFindingByPhoneNumber() {}
public UserPrivacySettingAllowFindingByPhoneNumber(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class UserPrivacySettingRuleAllowAll extends UserPrivacySettingRule {
public static final int CONSTRUCTOR = -1967186881;
public UserPrivacySettingRuleAllowAll() {}
public UserPrivacySettingRuleAllowAll(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class UserPrivacySettingRuleAllowContacts extends UserPrivacySettingRule {
public static final int CONSTRUCTOR = -1892733680;
public UserPrivacySettingRuleAllowContacts() {}
public UserPrivacySettingRuleAllowContacts(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class UserPrivacySettingRuleAllowUsers extends UserPrivacySettingRule {
public int[] userIds;
public static final int CONSTRUCTOR = 427601278;
public UserPrivacySettingRuleAllowUsers() {}
public UserPrivacySettingRuleAllowUsers(int[] userIds) {
this.userIds = userIds;
}
public UserPrivacySettingRuleAllowUsers(DataInput input) throws IOException {
if (input.readBoolean()) {
this.userIds = new int[input.readInt()];
for (int i = 0; i < this.userIds.length; i++) {
this.userIds[i] = input.readInt();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.userIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.userIds.length);
for (int i = 0; i < this.userIds.length; i++) {
output.writeInt(this.userIds[i]);
}
}
}
}
public static class UserPrivacySettingRuleAllowChatMembers extends UserPrivacySettingRule {
public long[] chatIds;
public static final int CONSTRUCTOR = -2048749863;
public UserPrivacySettingRuleAllowChatMembers() {}
public UserPrivacySettingRuleAllowChatMembers(long[] chatIds) {
this.chatIds = chatIds;
}
public UserPrivacySettingRuleAllowChatMembers(DataInput input) throws IOException {
if (input.readBoolean()) {
this.chatIds = new long[input.readInt()];
for (int i = 0; i < this.chatIds.length; i++) {
this.chatIds[i] = input.readLong();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.chatIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.chatIds.length);
for (int i = 0; i < this.chatIds.length; i++) {
output.writeLong(this.chatIds[i]);
}
}
}
}
public static class UserPrivacySettingRuleRestrictAll extends UserPrivacySettingRule {
public static final int CONSTRUCTOR = -1406495408;
public UserPrivacySettingRuleRestrictAll() {}
public UserPrivacySettingRuleRestrictAll(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class UserPrivacySettingRuleRestrictContacts extends UserPrivacySettingRule {
public static final int CONSTRUCTOR = 1008389378;
public UserPrivacySettingRuleRestrictContacts() {}
public UserPrivacySettingRuleRestrictContacts(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class UserPrivacySettingRuleRestrictUsers extends UserPrivacySettingRule {
public int[] userIds;
public static final int CONSTRUCTOR = 2119951802;
public UserPrivacySettingRuleRestrictUsers() {}
public UserPrivacySettingRuleRestrictUsers(int[] userIds) {
this.userIds = userIds;
}
public UserPrivacySettingRuleRestrictUsers(DataInput input) throws IOException {
if (input.readBoolean()) {
this.userIds = new int[input.readInt()];
for (int i = 0; i < this.userIds.length; i++) {
this.userIds[i] = input.readInt();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.userIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.userIds.length);
for (int i = 0; i < this.userIds.length; i++) {
output.writeInt(this.userIds[i]);
}
}
}
}
public static class UserPrivacySettingRuleRestrictChatMembers extends UserPrivacySettingRule {
public long[] chatIds;
public static final int CONSTRUCTOR = 392530897;
public UserPrivacySettingRuleRestrictChatMembers() {}
public UserPrivacySettingRuleRestrictChatMembers(long[] chatIds) {
this.chatIds = chatIds;
}
public UserPrivacySettingRuleRestrictChatMembers(DataInput input) throws IOException {
if (input.readBoolean()) {
this.chatIds = new long[input.readInt()];
for (int i = 0; i < this.chatIds.length; i++) {
this.chatIds[i] = input.readLong();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.chatIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.chatIds.length);
for (int i = 0; i < this.chatIds.length; i++) {
output.writeLong(this.chatIds[i]);
}
}
}
}
public static class UserPrivacySettingRules extends Object {
public UserPrivacySettingRule[] rules;
public static final int CONSTRUCTOR = 322477541;
public UserPrivacySettingRules() {}
public UserPrivacySettingRules(UserPrivacySettingRule[] rules) {
this.rules = rules;
}
public UserPrivacySettingRules(DataInput input) throws IOException {
if (input.readBoolean()) {
this.rules = new UserPrivacySettingRule[input.readInt()];
for (int i = 0; i < this.rules.length; i++) {
switch(input.readInt()) {
case UserPrivacySettingRuleAllowAll.CONSTRUCTOR:
this.rules[i] = new UserPrivacySettingRuleAllowAll(input);
break;
case UserPrivacySettingRuleAllowContacts.CONSTRUCTOR:
this.rules[i] = new UserPrivacySettingRuleAllowContacts(input);
break;
case UserPrivacySettingRuleAllowUsers.CONSTRUCTOR:
this.rules[i] = new UserPrivacySettingRuleAllowUsers(input);
break;
case UserPrivacySettingRuleAllowChatMembers.CONSTRUCTOR:
this.rules[i] = new UserPrivacySettingRuleAllowChatMembers(input);
break;
case UserPrivacySettingRuleRestrictAll.CONSTRUCTOR:
this.rules[i] = new UserPrivacySettingRuleRestrictAll(input);
break;
case UserPrivacySettingRuleRestrictContacts.CONSTRUCTOR:
this.rules[i] = new UserPrivacySettingRuleRestrictContacts(input);
break;
case UserPrivacySettingRuleRestrictUsers.CONSTRUCTOR:
this.rules[i] = new UserPrivacySettingRuleRestrictUsers(input);
break;
case UserPrivacySettingRuleRestrictChatMembers.CONSTRUCTOR:
this.rules[i] = new UserPrivacySettingRuleRestrictChatMembers(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.rules == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.rules.length);
for (int i = 0; i < this.rules.length; i++) {
this.rules[i].serialize(output);
}
}
}
}
public static class UserProfilePhoto extends Object {
public long id;
public int addedDate;
public PhotoSize[] sizes;
public static final int CONSTRUCTOR = -1882596466;
public UserProfilePhoto() {}
public UserProfilePhoto(long id, int addedDate, PhotoSize[] sizes) {
this.id = id;
this.addedDate = addedDate;
this.sizes = sizes;
}
public UserProfilePhoto(DataInput input) throws IOException {
this.id = input.readLong();
this.addedDate = input.readInt();
if (input.readBoolean()) {
this.sizes = new PhotoSize[input.readInt()];
for (int i = 0; i < this.sizes.length; i++) {
if (PhotoSize.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.sizes[i] = new PhotoSize(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.id);
output.writeInt(this.addedDate);
if (this.sizes == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.sizes.length);
for (int i = 0; i < this.sizes.length; i++) {
this.sizes[i].serialize(output);
}
}
}
}
public static class UserProfilePhotos extends Object {
public int totalCount;
public UserProfilePhoto[] photos;
public static final int CONSTRUCTOR = 1512709690;
public UserProfilePhotos() {}
public UserProfilePhotos(int totalCount, UserProfilePhoto[] photos) {
this.totalCount = totalCount;
this.photos = photos;
}
public UserProfilePhotos(DataInput input) throws IOException {
this.totalCount = input.readInt();
if (input.readBoolean()) {
this.photos = new UserProfilePhoto[input.readInt()];
for (int i = 0; i < this.photos.length; i++) {
if (UserProfilePhoto.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.photos[i] = new UserProfilePhoto(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.totalCount);
if (this.photos == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.photos.length);
for (int i = 0; i < this.photos.length; i++) {
this.photos[i].serialize(output);
}
}
}
}
public static class UserStatusEmpty extends UserStatus {
public static final int CONSTRUCTOR = 164646985;
public UserStatusEmpty() {}
public UserStatusEmpty(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class UserStatusOnline extends UserStatus {
public int expires;
public static final int CONSTRUCTOR = -1529460876;
public UserStatusOnline() {}
public UserStatusOnline(int expires) {
this.expires = expires;
}
public UserStatusOnline(DataInput input) throws IOException {
this.expires = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.expires);
}
}
public static class UserStatusOffline extends UserStatus {
public int wasOnline;
public static final int CONSTRUCTOR = -759984891;
public UserStatusOffline() {}
public UserStatusOffline(int wasOnline) {
this.wasOnline = wasOnline;
}
public UserStatusOffline(DataInput input) throws IOException {
this.wasOnline = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.wasOnline);
}
}
public static class UserStatusRecently extends UserStatus {
public static final int CONSTRUCTOR = -496024847;
public UserStatusRecently() {}
public UserStatusRecently(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class UserStatusLastWeek extends UserStatus {
public static final int CONSTRUCTOR = 129960444;
public UserStatusLastWeek() {}
public UserStatusLastWeek(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class UserStatusLastMonth extends UserStatus {
public static final int CONSTRUCTOR = 2011940674;
public UserStatusLastMonth() {}
public UserStatusLastMonth(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class UserTypeRegular extends UserType {
public static final int CONSTRUCTOR = -598644325;
public UserTypeRegular() {}
public UserTypeRegular(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class UserTypeDeleted extends UserType {
public static final int CONSTRUCTOR = -1807729372;
public UserTypeDeleted() {}
public UserTypeDeleted(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class UserTypeBot extends UserType {
public boolean canJoinGroups;
public boolean canReadAllGroupMessages;
public boolean isInline;
public String inlineQueryPlaceholder;
public boolean needLocation;
public static final int CONSTRUCTOR = 1262387765;
public UserTypeBot() {}
public UserTypeBot(boolean canJoinGroups, boolean canReadAllGroupMessages, boolean isInline, String inlineQueryPlaceholder, boolean needLocation) {
this.canJoinGroups = canJoinGroups;
this.canReadAllGroupMessages = canReadAllGroupMessages;
this.isInline = isInline;
this.inlineQueryPlaceholder = inlineQueryPlaceholder;
this.needLocation = needLocation;
}
public UserTypeBot(DataInput input) throws IOException {
this.canJoinGroups = input.readBoolean();
this.canReadAllGroupMessages = input.readBoolean();
this.isInline = input.readBoolean();
if (input.readBoolean()) {
var inlineQueryPlaceholderTmp = new byte[input.readInt()];
input.readFully(inlineQueryPlaceholderTmp);
this.inlineQueryPlaceholder = new String(inlineQueryPlaceholderTmp, StandardCharsets.UTF_8);
}
this.needLocation = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.canJoinGroups);
output.writeBoolean(this.canReadAllGroupMessages);
output.writeBoolean(this.isInline);
if (this.inlineQueryPlaceholder == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var inlineQueryPlaceholderTmp = this.inlineQueryPlaceholder.getBytes(StandardCharsets.UTF_8);
output.writeInt(inlineQueryPlaceholderTmp.length);
output.write(inlineQueryPlaceholderTmp);
}
output.writeBoolean(this.needLocation);
}
}
public static class UserTypeUnknown extends UserType {
public static final int CONSTRUCTOR = -724541123;
public UserTypeUnknown() {}
public UserTypeUnknown(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class Users extends Object {
public int totalCount;
public int[] userIds;
public static final int CONSTRUCTOR = 273760088;
public Users() {}
public Users(int totalCount, int[] userIds) {
this.totalCount = totalCount;
this.userIds = userIds;
}
public Users(DataInput input) throws IOException {
this.totalCount = input.readInt();
if (input.readBoolean()) {
this.userIds = new int[input.readInt()];
for (int i = 0; i < this.userIds.length; i++) {
this.userIds[i] = input.readInt();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.totalCount);
if (this.userIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.userIds.length);
for (int i = 0; i < this.userIds.length; i++) {
output.writeInt(this.userIds[i]);
}
}
}
}
public static class ValidatedOrderInfo extends Object {
public String orderInfoId;
public ShippingOption[] shippingOptions;
public static final int CONSTRUCTOR = 1511451484;
public ValidatedOrderInfo() {}
public ValidatedOrderInfo(String orderInfoId, ShippingOption[] shippingOptions) {
this.orderInfoId = orderInfoId;
this.shippingOptions = shippingOptions;
}
public ValidatedOrderInfo(DataInput input) throws IOException {
if (input.readBoolean()) {
var orderInfoIdTmp = new byte[input.readInt()];
input.readFully(orderInfoIdTmp);
this.orderInfoId = new String(orderInfoIdTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
this.shippingOptions = new ShippingOption[input.readInt()];
for (int i = 0; i < this.shippingOptions.length; i++) {
if (ShippingOption.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.shippingOptions[i] = new ShippingOption(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.orderInfoId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var orderInfoIdTmp = this.orderInfoId.getBytes(StandardCharsets.UTF_8);
output.writeInt(orderInfoIdTmp.length);
output.write(orderInfoIdTmp);
}
if (this.shippingOptions == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.shippingOptions.length);
for (int i = 0; i < this.shippingOptions.length; i++) {
this.shippingOptions[i].serialize(output);
}
}
}
}
public static class Venue extends Object {
public Location location;
public String title;
public String address;
public String provider;
public String id;
public String type;
public static final int CONSTRUCTOR = 1070406393;
public Venue() {}
public Venue(Location location, String title, String address, String provider, String id, String type) {
this.location = location;
this.title = title;
this.address = address;
this.provider = provider;
this.id = id;
this.type = type;
}
public Venue(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Location.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.location = new Location(input);
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var addressTmp = new byte[input.readInt()];
input.readFully(addressTmp);
this.address = new String(addressTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var providerTmp = new byte[input.readInt()];
input.readFully(providerTmp);
this.provider = new String(providerTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var idTmp = new byte[input.readInt()];
input.readFully(idTmp);
this.id = new String(idTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var typeTmp = new byte[input.readInt()];
input.readFully(typeTmp);
this.type = new String(typeTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.location == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.location.serialize(output);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.address == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var addressTmp = this.address.getBytes(StandardCharsets.UTF_8);
output.writeInt(addressTmp.length);
output.write(addressTmp);
}
if (this.provider == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var providerTmp = this.provider.getBytes(StandardCharsets.UTF_8);
output.writeInt(providerTmp.length);
output.write(providerTmp);
}
if (this.id == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var idTmp = this.id.getBytes(StandardCharsets.UTF_8);
output.writeInt(idTmp.length);
output.write(idTmp);
}
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var typeTmp = this.type.getBytes(StandardCharsets.UTF_8);
output.writeInt(typeTmp.length);
output.write(typeTmp);
}
}
}
public static class Video extends Object {
public int duration;
public int width;
public int height;
public String fileName;
public String mimeType;
public boolean hasStickers;
public boolean supportsStreaming;
public Minithumbnail minithumbnail;
public PhotoSize thumbnail;
public File video;
public static final int CONSTRUCTOR = -536898740;
public Video() {}
public Video(int duration, int width, int height, String fileName, String mimeType, boolean hasStickers, boolean supportsStreaming, Minithumbnail minithumbnail, PhotoSize thumbnail, File video) {
this.duration = duration;
this.width = width;
this.height = height;
this.fileName = fileName;
this.mimeType = mimeType;
this.hasStickers = hasStickers;
this.supportsStreaming = supportsStreaming;
this.minithumbnail = minithumbnail;
this.thumbnail = thumbnail;
this.video = video;
}
public Video(DataInput input) throws IOException {
this.duration = input.readInt();
this.width = input.readInt();
this.height = input.readInt();
if (input.readBoolean()) {
var fileNameTmp = new byte[input.readInt()];
input.readFully(fileNameTmp);
this.fileName = new String(fileNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var mimeTypeTmp = new byte[input.readInt()];
input.readFully(mimeTypeTmp);
this.mimeType = new String(mimeTypeTmp, StandardCharsets.UTF_8);
}
this.hasStickers = input.readBoolean();
this.supportsStreaming = input.readBoolean();
if (input.readBoolean()) {
if (Minithumbnail.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.minithumbnail = new Minithumbnail(input);
}
if (input.readBoolean()) {
if (PhotoSize.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.thumbnail = new PhotoSize(input);
}
if (input.readBoolean()) {
if (File.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.video = new File(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.duration);
output.writeInt(this.width);
output.writeInt(this.height);
if (this.fileName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var fileNameTmp = this.fileName.getBytes(StandardCharsets.UTF_8);
output.writeInt(fileNameTmp.length);
output.write(fileNameTmp);
}
if (this.mimeType == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var mimeTypeTmp = this.mimeType.getBytes(StandardCharsets.UTF_8);
output.writeInt(mimeTypeTmp.length);
output.write(mimeTypeTmp);
}
output.writeBoolean(this.hasStickers);
output.writeBoolean(this.supportsStreaming);
if (this.minithumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.minithumbnail.serialize(output);
}
if (this.thumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.thumbnail.serialize(output);
}
if (this.video == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.video.serialize(output);
}
}
}
public static class VideoNote extends Object {
public int duration;
public int length;
public Minithumbnail minithumbnail;
public PhotoSize thumbnail;
public File video;
public static final int CONSTRUCTOR = -1080075672;
public VideoNote() {}
public VideoNote(int duration, int length, Minithumbnail minithumbnail, PhotoSize thumbnail, File video) {
this.duration = duration;
this.length = length;
this.minithumbnail = minithumbnail;
this.thumbnail = thumbnail;
this.video = video;
}
public VideoNote(DataInput input) throws IOException {
this.duration = input.readInt();
this.length = input.readInt();
if (input.readBoolean()) {
if (Minithumbnail.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.minithumbnail = new Minithumbnail(input);
}
if (input.readBoolean()) {
if (PhotoSize.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.thumbnail = new PhotoSize(input);
}
if (input.readBoolean()) {
if (File.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.video = new File(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.duration);
output.writeInt(this.length);
if (this.minithumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.minithumbnail.serialize(output);
}
if (this.thumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.thumbnail.serialize(output);
}
if (this.video == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.video.serialize(output);
}
}
}
public static class VoiceNote extends Object {
public int duration;
public byte[] waveform;
public String mimeType;
public File voice;
public static final int CONSTRUCTOR = -2066012058;
public VoiceNote() {}
public VoiceNote(int duration, byte[] waveform, String mimeType, File voice) {
this.duration = duration;
this.waveform = waveform;
this.mimeType = mimeType;
this.voice = voice;
}
public VoiceNote(DataInput input) throws IOException {
this.duration = input.readInt();
if (input.readBoolean()) {
this.waveform = new byte[input.readInt()];
input.readFully(this.waveform);
}
if (input.readBoolean()) {
var mimeTypeTmp = new byte[input.readInt()];
input.readFully(mimeTypeTmp);
this.mimeType = new String(mimeTypeTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (File.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.voice = new File(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.duration);
if (this.waveform == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.waveform.length);
output.write(this.waveform);
}
if (this.mimeType == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var mimeTypeTmp = this.mimeType.getBytes(StandardCharsets.UTF_8);
output.writeInt(mimeTypeTmp.length);
output.write(mimeTypeTmp);
}
if (this.voice == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.voice.serialize(output);
}
}
}
public static class WebPage extends Object {
public String url;
public String displayUrl;
public String type;
public String siteName;
public String title;
public FormattedText description;
public Photo photo;
public String embedUrl;
public String embedType;
public int embedWidth;
public int embedHeight;
public int duration;
public String author;
public Animation animation;
public Audio audio;
public Document document;
public Sticker sticker;
public Video video;
public VideoNote videoNote;
public VoiceNote voiceNote;
public int instantViewVersion;
public static final int CONSTRUCTOR = -577333714;
public WebPage() {}
public WebPage(String url, String displayUrl, String type, String siteName, String title, FormattedText description, Photo photo, String embedUrl, String embedType, int embedWidth, int embedHeight, int duration, String author, Animation animation, Audio audio, Document document, Sticker sticker, Video video, VideoNote videoNote, VoiceNote voiceNote, int instantViewVersion) {
this.url = url;
this.displayUrl = displayUrl;
this.type = type;
this.siteName = siteName;
this.title = title;
this.description = description;
this.photo = photo;
this.embedUrl = embedUrl;
this.embedType = embedType;
this.embedWidth = embedWidth;
this.embedHeight = embedHeight;
this.duration = duration;
this.author = author;
this.animation = animation;
this.audio = audio;
this.document = document;
this.sticker = sticker;
this.video = video;
this.videoNote = videoNote;
this.voiceNote = voiceNote;
this.instantViewVersion = instantViewVersion;
}
public WebPage(DataInput input) throws IOException {
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var displayUrlTmp = new byte[input.readInt()];
input.readFully(displayUrlTmp);
this.displayUrl = new String(displayUrlTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var typeTmp = new byte[input.readInt()];
input.readFully(typeTmp);
this.type = new String(typeTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var siteNameTmp = new byte[input.readInt()];
input.readFully(siteNameTmp);
this.siteName = new String(siteNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.description = new FormattedText(input);
}
if (input.readBoolean()) {
if (Photo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.photo = new Photo(input);
}
if (input.readBoolean()) {
var embedUrlTmp = new byte[input.readInt()];
input.readFully(embedUrlTmp);
this.embedUrl = new String(embedUrlTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var embedTypeTmp = new byte[input.readInt()];
input.readFully(embedTypeTmp);
this.embedType = new String(embedTypeTmp, StandardCharsets.UTF_8);
}
this.embedWidth = input.readInt();
this.embedHeight = input.readInt();
this.duration = input.readInt();
if (input.readBoolean()) {
var authorTmp = new byte[input.readInt()];
input.readFully(authorTmp);
this.author = new String(authorTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (Animation.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.animation = new Animation(input);
}
if (input.readBoolean()) {
if (Audio.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.audio = new Audio(input);
}
if (input.readBoolean()) {
if (Document.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.document = new Document(input);
}
if (input.readBoolean()) {
if (Sticker.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.sticker = new Sticker(input);
}
if (input.readBoolean()) {
if (Video.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.video = new Video(input);
}
if (input.readBoolean()) {
if (VideoNote.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.videoNote = new VideoNote(input);
}
if (input.readBoolean()) {
if (VoiceNote.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.voiceNote = new VoiceNote(input);
}
this.instantViewVersion = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
if (this.displayUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var displayUrlTmp = this.displayUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(displayUrlTmp.length);
output.write(displayUrlTmp);
}
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var typeTmp = this.type.getBytes(StandardCharsets.UTF_8);
output.writeInt(typeTmp.length);
output.write(typeTmp);
}
if (this.siteName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var siteNameTmp = this.siteName.getBytes(StandardCharsets.UTF_8);
output.writeInt(siteNameTmp.length);
output.write(siteNameTmp);
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.description == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.description.serialize(output);
}
if (this.photo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.photo.serialize(output);
}
if (this.embedUrl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var embedUrlTmp = this.embedUrl.getBytes(StandardCharsets.UTF_8);
output.writeInt(embedUrlTmp.length);
output.write(embedUrlTmp);
}
if (this.embedType == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var embedTypeTmp = this.embedType.getBytes(StandardCharsets.UTF_8);
output.writeInt(embedTypeTmp.length);
output.write(embedTypeTmp);
}
output.writeInt(this.embedWidth);
output.writeInt(this.embedHeight);
output.writeInt(this.duration);
if (this.author == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var authorTmp = this.author.getBytes(StandardCharsets.UTF_8);
output.writeInt(authorTmp.length);
output.write(authorTmp);
}
if (this.animation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.animation.serialize(output);
}
if (this.audio == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.audio.serialize(output);
}
if (this.document == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.document.serialize(output);
}
if (this.sticker == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.sticker.serialize(output);
}
if (this.video == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.video.serialize(output);
}
if (this.videoNote == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.videoNote.serialize(output);
}
if (this.voiceNote == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.voiceNote.serialize(output);
}
output.writeInt(this.instantViewVersion);
}
}
public static class WebPageInstantView extends Object {
public PageBlock[] pageBlocks;
public int viewCount;
public int version;
public boolean isRtl;
public boolean isFull;
public static final int CONSTRUCTOR = 1069193541;
public WebPageInstantView() {}
public WebPageInstantView(PageBlock[] pageBlocks, int viewCount, int version, boolean isRtl, boolean isFull) {
this.pageBlocks = pageBlocks;
this.viewCount = viewCount;
this.version = version;
this.isRtl = isRtl;
this.isFull = isFull;
}
public WebPageInstantView(DataInput input) throws IOException {
if (input.readBoolean()) {
this.pageBlocks = new PageBlock[input.readInt()];
for (int i = 0; i < this.pageBlocks.length; i++) {
switch(input.readInt()) {
case PageBlockTitle.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockTitle(input);
break;
case PageBlockSubtitle.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockSubtitle(input);
break;
case PageBlockAuthorDate.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAuthorDate(input);
break;
case PageBlockHeader.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockHeader(input);
break;
case PageBlockSubheader.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockSubheader(input);
break;
case PageBlockKicker.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockKicker(input);
break;
case PageBlockParagraph.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockParagraph(input);
break;
case PageBlockPreformatted.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockPreformatted(input);
break;
case PageBlockFooter.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockFooter(input);
break;
case PageBlockDivider.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockDivider(input);
break;
case PageBlockAnchor.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAnchor(input);
break;
case PageBlockList.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockList(input);
break;
case PageBlockBlockQuote.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockBlockQuote(input);
break;
case PageBlockPullQuote.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockPullQuote(input);
break;
case PageBlockAnimation.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAnimation(input);
break;
case PageBlockAudio.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockAudio(input);
break;
case PageBlockPhoto.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockPhoto(input);
break;
case PageBlockVideo.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockVideo(input);
break;
case PageBlockVoiceNote.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockVoiceNote(input);
break;
case PageBlockCover.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockCover(input);
break;
case PageBlockEmbedded.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockEmbedded(input);
break;
case PageBlockEmbeddedPost.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockEmbeddedPost(input);
break;
case PageBlockCollage.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockCollage(input);
break;
case PageBlockSlideshow.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockSlideshow(input);
break;
case PageBlockChatLink.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockChatLink(input);
break;
case PageBlockTable.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockTable(input);
break;
case PageBlockDetails.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockDetails(input);
break;
case PageBlockRelatedArticles.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockRelatedArticles(input);
break;
case PageBlockMap.CONSTRUCTOR:
this.pageBlocks[i] = new PageBlockMap(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
this.viewCount = input.readInt();
this.version = input.readInt();
this.isRtl = input.readBoolean();
this.isFull = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.pageBlocks == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.pageBlocks.length);
for (int i = 0; i < this.pageBlocks.length; i++) {
this.pageBlocks[i].serialize(output);
}
}
output.writeInt(this.viewCount);
output.writeInt(this.version);
output.writeBoolean(this.isRtl);
output.writeBoolean(this.isFull);
}
}
public static class AcceptCall extends Function {
public int callId;
public CallProtocol protocol;
public static final int CONSTRUCTOR = -646618416;
public AcceptCall() {}
public AcceptCall(int callId, CallProtocol protocol) {
this.callId = callId;
this.protocol = protocol;
}
public AcceptCall(DataInput input) throws IOException {
this.callId = input.readInt();
if (input.readBoolean()) {
if (CallProtocol.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.protocol = new CallProtocol(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.callId);
if (this.protocol == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.protocol.serialize(output);
}
}
}
public static class AcceptTermsOfService extends Function {
public String termsOfServiceId;
public static final int CONSTRUCTOR = 2130576356;
public AcceptTermsOfService() {}
public AcceptTermsOfService(String termsOfServiceId) {
this.termsOfServiceId = termsOfServiceId;
}
public AcceptTermsOfService(DataInput input) throws IOException {
if (input.readBoolean()) {
var termsOfServiceIdTmp = new byte[input.readInt()];
input.readFully(termsOfServiceIdTmp);
this.termsOfServiceId = new String(termsOfServiceIdTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.termsOfServiceId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var termsOfServiceIdTmp = this.termsOfServiceId.getBytes(StandardCharsets.UTF_8);
output.writeInt(termsOfServiceIdTmp.length);
output.write(termsOfServiceIdTmp);
}
}
}
public static class AddChatMember extends Function {
public long chatId;
public int userId;
public int forwardLimit;
public static final int CONSTRUCTOR = 1182817962;
public AddChatMember() {}
public AddChatMember(long chatId, int userId, int forwardLimit) {
this.chatId = chatId;
this.userId = userId;
this.forwardLimit = forwardLimit;
}
public AddChatMember(DataInput input) throws IOException {
this.chatId = input.readLong();
this.userId = input.readInt();
this.forwardLimit = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeInt(this.userId);
output.writeInt(this.forwardLimit);
}
}
public static class AddChatMembers extends Function {
public long chatId;
public int[] userIds;
public static final int CONSTRUCTOR = 1234094617;
public AddChatMembers() {}
public AddChatMembers(long chatId, int[] userIds) {
this.chatId = chatId;
this.userIds = userIds;
}
public AddChatMembers(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
this.userIds = new int[input.readInt()];
for (int i = 0; i < this.userIds.length; i++) {
this.userIds[i] = input.readInt();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.userIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.userIds.length);
for (int i = 0; i < this.userIds.length; i++) {
output.writeInt(this.userIds[i]);
}
}
}
}
public static class AddContact extends Function {
public Contact contact;
public boolean sharePhoneNumber;
public static final int CONSTRUCTOR = 1869640000;
public AddContact() {}
public AddContact(Contact contact, boolean sharePhoneNumber) {
this.contact = contact;
this.sharePhoneNumber = sharePhoneNumber;
}
public AddContact(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Contact.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.contact = new Contact(input);
}
this.sharePhoneNumber = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.contact == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.contact.serialize(output);
}
output.writeBoolean(this.sharePhoneNumber);
}
}
public static class AddCustomServerLanguagePack extends Function {
public String languagePackId;
public static final int CONSTRUCTOR = 4492771;
public AddCustomServerLanguagePack() {}
public AddCustomServerLanguagePack(String languagePackId) {
this.languagePackId = languagePackId;
}
public AddCustomServerLanguagePack(DataInput input) throws IOException {
if (input.readBoolean()) {
var languagePackIdTmp = new byte[input.readInt()];
input.readFully(languagePackIdTmp);
this.languagePackId = new String(languagePackIdTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.languagePackId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var languagePackIdTmp = this.languagePackId.getBytes(StandardCharsets.UTF_8);
output.writeInt(languagePackIdTmp.length);
output.write(languagePackIdTmp);
}
}
}
public static class AddFavoriteSticker extends Function {
public InputFile sticker;
public static final int CONSTRUCTOR = 324504799;
public AddFavoriteSticker() {}
public AddFavoriteSticker(InputFile sticker) {
this.sticker = sticker;
}
public AddFavoriteSticker(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.sticker = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.sticker = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.sticker = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.sticker = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.sticker == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.sticker.serialize(output);
}
}
}
public static class AddLocalMessage extends Function {
public long chatId;
public int senderUserId;
public long replyToMessageId;
public boolean disableNotification;
public InputMessageContent inputMessageContent;
public static final int CONSTRUCTOR = -348943149;
public AddLocalMessage() {}
public AddLocalMessage(long chatId, int senderUserId, long replyToMessageId, boolean disableNotification, InputMessageContent inputMessageContent) {
this.chatId = chatId;
this.senderUserId = senderUserId;
this.replyToMessageId = replyToMessageId;
this.disableNotification = disableNotification;
this.inputMessageContent = inputMessageContent;
}
public AddLocalMessage(DataInput input) throws IOException {
this.chatId = input.readLong();
this.senderUserId = input.readInt();
this.replyToMessageId = input.readLong();
this.disableNotification = input.readBoolean();
if (input.readBoolean()) {
switch(input.readInt()) {
case InputMessageText.CONSTRUCTOR:
this.inputMessageContent = new InputMessageText(input);
break;
case InputMessageAnimation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAnimation(input);
break;
case InputMessageAudio.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAudio(input);
break;
case InputMessageDocument.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDocument(input);
break;
case InputMessagePhoto.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePhoto(input);
break;
case InputMessageSticker.CONSTRUCTOR:
this.inputMessageContent = new InputMessageSticker(input);
break;
case InputMessageVideo.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideo(input);
break;
case InputMessageVideoNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideoNote(input);
break;
case InputMessageVoiceNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVoiceNote(input);
break;
case InputMessageLocation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageLocation(input);
break;
case InputMessageVenue.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVenue(input);
break;
case InputMessageContact.CONSTRUCTOR:
this.inputMessageContent = new InputMessageContact(input);
break;
case InputMessageDice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDice(input);
break;
case InputMessageGame.CONSTRUCTOR:
this.inputMessageContent = new InputMessageGame(input);
break;
case InputMessageInvoice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageInvoice(input);
break;
case InputMessagePoll.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePoll(input);
break;
case InputMessageForwarded.CONSTRUCTOR:
this.inputMessageContent = new InputMessageForwarded(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeInt(this.senderUserId);
output.writeLong(this.replyToMessageId);
output.writeBoolean(this.disableNotification);
if (this.inputMessageContent == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.inputMessageContent.serialize(output);
}
}
}
public static class AddLogMessage extends Function {
public int verbosityLevel;
public String text;
public static final int CONSTRUCTOR = 1597427692;
public AddLogMessage() {}
public AddLogMessage(int verbosityLevel, String text) {
this.verbosityLevel = verbosityLevel;
this.text = text;
}
public AddLogMessage(DataInput input) throws IOException {
this.verbosityLevel = input.readInt();
if (input.readBoolean()) {
var textTmp = new byte[input.readInt()];
input.readFully(textTmp);
this.text = new String(textTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.verbosityLevel);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var textTmp = this.text.getBytes(StandardCharsets.UTF_8);
output.writeInt(textTmp.length);
output.write(textTmp);
}
}
}
public static class AddNetworkStatistics extends Function {
public NetworkStatisticsEntry entry;
public static final int CONSTRUCTOR = 1264825305;
public AddNetworkStatistics() {}
public AddNetworkStatistics(NetworkStatisticsEntry entry) {
this.entry = entry;
}
public AddNetworkStatistics(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case NetworkStatisticsEntryFile.CONSTRUCTOR:
this.entry = new NetworkStatisticsEntryFile(input);
break;
case NetworkStatisticsEntryCall.CONSTRUCTOR:
this.entry = new NetworkStatisticsEntryCall(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.entry == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.entry.serialize(output);
}
}
}
public static class AddProxy extends Function {
public String server;
public int port;
public boolean enable;
public ProxyType type;
public static final int CONSTRUCTOR = 331529432;
public AddProxy() {}
public AddProxy(String server, int port, boolean enable, ProxyType type) {
this.server = server;
this.port = port;
this.enable = enable;
this.type = type;
}
public AddProxy(DataInput input) throws IOException {
if (input.readBoolean()) {
var serverTmp = new byte[input.readInt()];
input.readFully(serverTmp);
this.server = new String(serverTmp, StandardCharsets.UTF_8);
}
this.port = input.readInt();
this.enable = input.readBoolean();
if (input.readBoolean()) {
switch(input.readInt()) {
case ProxyTypeSocks5.CONSTRUCTOR:
this.type = new ProxyTypeSocks5(input);
break;
case ProxyTypeHttp.CONSTRUCTOR:
this.type = new ProxyTypeHttp(input);
break;
case ProxyTypeMtproto.CONSTRUCTOR:
this.type = new ProxyTypeMtproto(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.server == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var serverTmp = this.server.getBytes(StandardCharsets.UTF_8);
output.writeInt(serverTmp.length);
output.write(serverTmp);
}
output.writeInt(this.port);
output.writeBoolean(this.enable);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
}
}
public static class AddRecentSticker extends Function {
public boolean isAttached;
public InputFile sticker;
public static final int CONSTRUCTOR = -1478109026;
public AddRecentSticker() {}
public AddRecentSticker(boolean isAttached, InputFile sticker) {
this.isAttached = isAttached;
this.sticker = sticker;
}
public AddRecentSticker(DataInput input) throws IOException {
this.isAttached = input.readBoolean();
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.sticker = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.sticker = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.sticker = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.sticker = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isAttached);
if (this.sticker == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.sticker.serialize(output);
}
}
}
public static class AddRecentlyFoundChat extends Function {
public long chatId;
public static final int CONSTRUCTOR = -1746396787;
public AddRecentlyFoundChat() {}
public AddRecentlyFoundChat(long chatId) {
this.chatId = chatId;
}
public AddRecentlyFoundChat(DataInput input) throws IOException {
this.chatId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
}
}
public static class AddSavedAnimation extends Function {
public InputFile animation;
public static final int CONSTRUCTOR = -1538525088;
public AddSavedAnimation() {}
public AddSavedAnimation(InputFile animation) {
this.animation = animation;
}
public AddSavedAnimation(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.animation = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.animation = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.animation = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.animation = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.animation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.animation.serialize(output);
}
}
}
public static class AddStickerToSet extends Function {
public int userId;
public String name;
public InputSticker sticker;
public static final int CONSTRUCTOR = -454661588;
public AddStickerToSet() {}
public AddStickerToSet(int userId, String name, InputSticker sticker) {
this.userId = userId;
this.name = name;
this.sticker = sticker;
}
public AddStickerToSet(DataInput input) throws IOException {
this.userId = input.readInt();
if (input.readBoolean()) {
var nameTmp = new byte[input.readInt()];
input.readFully(nameTmp);
this.name = new String(nameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputStickerStatic.CONSTRUCTOR:
this.sticker = new InputStickerStatic(input);
break;
case InputStickerAnimated.CONSTRUCTOR:
this.sticker = new InputStickerAnimated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
if (this.name == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nameTmp = this.name.getBytes(StandardCharsets.UTF_8);
output.writeInt(nameTmp.length);
output.write(nameTmp);
}
if (this.sticker == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.sticker.serialize(output);
}
}
}
public static class AnswerCallbackQuery extends Function {
public long callbackQueryId;
public String text;
public boolean showAlert;
public String url;
public int cacheTime;
public static final int CONSTRUCTOR = -1153028490;
public AnswerCallbackQuery() {}
public AnswerCallbackQuery(long callbackQueryId, String text, boolean showAlert, String url, int cacheTime) {
this.callbackQueryId = callbackQueryId;
this.text = text;
this.showAlert = showAlert;
this.url = url;
this.cacheTime = cacheTime;
}
public AnswerCallbackQuery(DataInput input) throws IOException {
this.callbackQueryId = input.readLong();
if (input.readBoolean()) {
var textTmp = new byte[input.readInt()];
input.readFully(textTmp);
this.text = new String(textTmp, StandardCharsets.UTF_8);
}
this.showAlert = input.readBoolean();
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
this.cacheTime = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.callbackQueryId);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var textTmp = this.text.getBytes(StandardCharsets.UTF_8);
output.writeInt(textTmp.length);
output.write(textTmp);
}
output.writeBoolean(this.showAlert);
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
output.writeInt(this.cacheTime);
}
}
public static class AnswerCustomQuery extends Function {
public long customQueryId;
public String data;
public static final int CONSTRUCTOR = -1293603521;
public AnswerCustomQuery() {}
public AnswerCustomQuery(long customQueryId, String data) {
this.customQueryId = customQueryId;
this.data = data;
}
public AnswerCustomQuery(DataInput input) throws IOException {
this.customQueryId = input.readLong();
if (input.readBoolean()) {
var dataTmp = new byte[input.readInt()];
input.readFully(dataTmp);
this.data = new String(dataTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.customQueryId);
if (this.data == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var dataTmp = this.data.getBytes(StandardCharsets.UTF_8);
output.writeInt(dataTmp.length);
output.write(dataTmp);
}
}
}
public static class AnswerInlineQuery extends Function {
public long inlineQueryId;
public boolean isPersonal;
public InputInlineQueryResult[] results;
public int cacheTime;
public String nextOffset;
public String switchPmText;
public String switchPmParameter;
public static final int CONSTRUCTOR = 485879477;
public AnswerInlineQuery() {}
public AnswerInlineQuery(long inlineQueryId, boolean isPersonal, InputInlineQueryResult[] results, int cacheTime, String nextOffset, String switchPmText, String switchPmParameter) {
this.inlineQueryId = inlineQueryId;
this.isPersonal = isPersonal;
this.results = results;
this.cacheTime = cacheTime;
this.nextOffset = nextOffset;
this.switchPmText = switchPmText;
this.switchPmParameter = switchPmParameter;
}
public AnswerInlineQuery(DataInput input) throws IOException {
this.inlineQueryId = input.readLong();
this.isPersonal = input.readBoolean();
if (input.readBoolean()) {
this.results = new InputInlineQueryResult[input.readInt()];
for (int i = 0; i < this.results.length; i++) {
switch(input.readInt()) {
case InputInlineQueryResultAnimatedGif.CONSTRUCTOR:
this.results[i] = new InputInlineQueryResultAnimatedGif(input);
break;
case InputInlineQueryResultAnimatedMpeg4.CONSTRUCTOR:
this.results[i] = new InputInlineQueryResultAnimatedMpeg4(input);
break;
case InputInlineQueryResultArticle.CONSTRUCTOR:
this.results[i] = new InputInlineQueryResultArticle(input);
break;
case InputInlineQueryResultAudio.CONSTRUCTOR:
this.results[i] = new InputInlineQueryResultAudio(input);
break;
case InputInlineQueryResultContact.CONSTRUCTOR:
this.results[i] = new InputInlineQueryResultContact(input);
break;
case InputInlineQueryResultDocument.CONSTRUCTOR:
this.results[i] = new InputInlineQueryResultDocument(input);
break;
case InputInlineQueryResultGame.CONSTRUCTOR:
this.results[i] = new InputInlineQueryResultGame(input);
break;
case InputInlineQueryResultLocation.CONSTRUCTOR:
this.results[i] = new InputInlineQueryResultLocation(input);
break;
case InputInlineQueryResultPhoto.CONSTRUCTOR:
this.results[i] = new InputInlineQueryResultPhoto(input);
break;
case InputInlineQueryResultSticker.CONSTRUCTOR:
this.results[i] = new InputInlineQueryResultSticker(input);
break;
case InputInlineQueryResultVenue.CONSTRUCTOR:
this.results[i] = new InputInlineQueryResultVenue(input);
break;
case InputInlineQueryResultVideo.CONSTRUCTOR:
this.results[i] = new InputInlineQueryResultVideo(input);
break;
case InputInlineQueryResultVoiceNote.CONSTRUCTOR:
this.results[i] = new InputInlineQueryResultVoiceNote(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
this.cacheTime = input.readInt();
if (input.readBoolean()) {
var nextOffsetTmp = new byte[input.readInt()];
input.readFully(nextOffsetTmp);
this.nextOffset = new String(nextOffsetTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var switchPmTextTmp = new byte[input.readInt()];
input.readFully(switchPmTextTmp);
this.switchPmText = new String(switchPmTextTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var switchPmParameterTmp = new byte[input.readInt()];
input.readFully(switchPmParameterTmp);
this.switchPmParameter = new String(switchPmParameterTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.inlineQueryId);
output.writeBoolean(this.isPersonal);
if (this.results == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.results.length);
for (int i = 0; i < this.results.length; i++) {
this.results[i].serialize(output);
}
}
output.writeInt(this.cacheTime);
if (this.nextOffset == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nextOffsetTmp = this.nextOffset.getBytes(StandardCharsets.UTF_8);
output.writeInt(nextOffsetTmp.length);
output.write(nextOffsetTmp);
}
if (this.switchPmText == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var switchPmTextTmp = this.switchPmText.getBytes(StandardCharsets.UTF_8);
output.writeInt(switchPmTextTmp.length);
output.write(switchPmTextTmp);
}
if (this.switchPmParameter == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var switchPmParameterTmp = this.switchPmParameter.getBytes(StandardCharsets.UTF_8);
output.writeInt(switchPmParameterTmp.length);
output.write(switchPmParameterTmp);
}
}
}
public static class AnswerPreCheckoutQuery extends Function {
public long preCheckoutQueryId;
public String errorMessage;
public static final int CONSTRUCTOR = -1486789653;
public AnswerPreCheckoutQuery() {}
public AnswerPreCheckoutQuery(long preCheckoutQueryId, String errorMessage) {
this.preCheckoutQueryId = preCheckoutQueryId;
this.errorMessage = errorMessage;
}
public AnswerPreCheckoutQuery(DataInput input) throws IOException {
this.preCheckoutQueryId = input.readLong();
if (input.readBoolean()) {
var errorMessageTmp = new byte[input.readInt()];
input.readFully(errorMessageTmp);
this.errorMessage = new String(errorMessageTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.preCheckoutQueryId);
if (this.errorMessage == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var errorMessageTmp = this.errorMessage.getBytes(StandardCharsets.UTF_8);
output.writeInt(errorMessageTmp.length);
output.write(errorMessageTmp);
}
}
}
public static class AnswerShippingQuery extends Function {
public long shippingQueryId;
public ShippingOption[] shippingOptions;
public String errorMessage;
public static final int CONSTRUCTOR = -434601324;
public AnswerShippingQuery() {}
public AnswerShippingQuery(long shippingQueryId, ShippingOption[] shippingOptions, String errorMessage) {
this.shippingQueryId = shippingQueryId;
this.shippingOptions = shippingOptions;
this.errorMessage = errorMessage;
}
public AnswerShippingQuery(DataInput input) throws IOException {
this.shippingQueryId = input.readLong();
if (input.readBoolean()) {
this.shippingOptions = new ShippingOption[input.readInt()];
for (int i = 0; i < this.shippingOptions.length; i++) {
if (ShippingOption.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.shippingOptions[i] = new ShippingOption(input);
}
}
if (input.readBoolean()) {
var errorMessageTmp = new byte[input.readInt()];
input.readFully(errorMessageTmp);
this.errorMessage = new String(errorMessageTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.shippingQueryId);
if (this.shippingOptions == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.shippingOptions.length);
for (int i = 0; i < this.shippingOptions.length; i++) {
this.shippingOptions[i].serialize(output);
}
}
if (this.errorMessage == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var errorMessageTmp = this.errorMessage.getBytes(StandardCharsets.UTF_8);
output.writeInt(errorMessageTmp.length);
output.write(errorMessageTmp);
}
}
}
public static class BlockUser extends Function {
public int userId;
public static final int CONSTRUCTOR = -1239315139;
public BlockUser() {}
public BlockUser(int userId) {
this.userId = userId;
}
public BlockUser(DataInput input) throws IOException {
this.userId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
}
}
public static class CanTransferOwnership extends Function {
public static final int CONSTRUCTOR = 634602508;
public CanTransferOwnership() {}
public CanTransferOwnership(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CancelDownloadFile extends Function {
public int fileId;
public boolean onlyIfPending;
public static final int CONSTRUCTOR = -1954524450;
public CancelDownloadFile() {}
public CancelDownloadFile(int fileId, boolean onlyIfPending) {
this.fileId = fileId;
this.onlyIfPending = onlyIfPending;
}
public CancelDownloadFile(DataInput input) throws IOException {
this.fileId = input.readInt();
this.onlyIfPending = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.fileId);
output.writeBoolean(this.onlyIfPending);
}
}
public static class CancelUploadFile extends Function {
public int fileId;
public static final int CONSTRUCTOR = 1623539600;
public CancelUploadFile() {}
public CancelUploadFile(int fileId) {
this.fileId = fileId;
}
public CancelUploadFile(DataInput input) throws IOException {
this.fileId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.fileId);
}
}
public static class ChangeImportedContacts extends Function {
public Contact[] contacts;
public static final int CONSTRUCTOR = 1968207955;
public ChangeImportedContacts() {}
public ChangeImportedContacts(Contact[] contacts) {
this.contacts = contacts;
}
public ChangeImportedContacts(DataInput input) throws IOException {
if (input.readBoolean()) {
this.contacts = new Contact[input.readInt()];
for (int i = 0; i < this.contacts.length; i++) {
if (Contact.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.contacts[i] = new Contact(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.contacts == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.contacts.length);
for (int i = 0; i < this.contacts.length; i++) {
this.contacts[i].serialize(output);
}
}
}
}
public static class ChangePhoneNumber extends Function {
public String phoneNumber;
public PhoneNumberAuthenticationSettings settings;
public static final int CONSTRUCTOR = -124666973;
public ChangePhoneNumber() {}
public ChangePhoneNumber(String phoneNumber, PhoneNumberAuthenticationSettings settings) {
this.phoneNumber = phoneNumber;
this.settings = settings;
}
public ChangePhoneNumber(DataInput input) throws IOException {
if (input.readBoolean()) {
var phoneNumberTmp = new byte[input.readInt()];
input.readFully(phoneNumberTmp);
this.phoneNumber = new String(phoneNumberTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (PhoneNumberAuthenticationSettings.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.settings = new PhoneNumberAuthenticationSettings(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.phoneNumber == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var phoneNumberTmp = this.phoneNumber.getBytes(StandardCharsets.UTF_8);
output.writeInt(phoneNumberTmp.length);
output.write(phoneNumberTmp);
}
if (this.settings == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.settings.serialize(output);
}
}
}
public static class ChangeStickerSet extends Function {
public long setId;
public boolean isInstalled;
public boolean isArchived;
public static final int CONSTRUCTOR = 449357293;
public ChangeStickerSet() {}
public ChangeStickerSet(long setId, boolean isInstalled, boolean isArchived) {
this.setId = setId;
this.isInstalled = isInstalled;
this.isArchived = isArchived;
}
public ChangeStickerSet(DataInput input) throws IOException {
this.setId = input.readLong();
this.isInstalled = input.readBoolean();
this.isArchived = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.setId);
output.writeBoolean(this.isInstalled);
output.writeBoolean(this.isArchived);
}
}
public static class CheckAuthenticationBotToken extends Function {
public String token;
public static final int CONSTRUCTOR = 639321206;
public CheckAuthenticationBotToken() {}
public CheckAuthenticationBotToken(String token) {
this.token = token;
}
public CheckAuthenticationBotToken(DataInput input) throws IOException {
if (input.readBoolean()) {
var tokenTmp = new byte[input.readInt()];
input.readFully(tokenTmp);
this.token = new String(tokenTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.token == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var tokenTmp = this.token.getBytes(StandardCharsets.UTF_8);
output.writeInt(tokenTmp.length);
output.write(tokenTmp);
}
}
}
public static class CheckAuthenticationCode extends Function {
public String code;
public static final int CONSTRUCTOR = -302103382;
public CheckAuthenticationCode() {}
public CheckAuthenticationCode(String code) {
this.code = code;
}
public CheckAuthenticationCode(DataInput input) throws IOException {
if (input.readBoolean()) {
var codeTmp = new byte[input.readInt()];
input.readFully(codeTmp);
this.code = new String(codeTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.code == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var codeTmp = this.code.getBytes(StandardCharsets.UTF_8);
output.writeInt(codeTmp.length);
output.write(codeTmp);
}
}
}
public static class CheckAuthenticationPassword extends Function {
public String password;
public static final int CONSTRUCTOR = -2025698400;
public CheckAuthenticationPassword() {}
public CheckAuthenticationPassword(String password) {
this.password = password;
}
public CheckAuthenticationPassword(DataInput input) throws IOException {
if (input.readBoolean()) {
var passwordTmp = new byte[input.readInt()];
input.readFully(passwordTmp);
this.password = new String(passwordTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.password == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var passwordTmp = this.password.getBytes(StandardCharsets.UTF_8);
output.writeInt(passwordTmp.length);
output.write(passwordTmp);
}
}
}
public static class CheckChangePhoneNumberCode extends Function {
public String code;
public static final int CONSTRUCTOR = -1720278429;
public CheckChangePhoneNumberCode() {}
public CheckChangePhoneNumberCode(String code) {
this.code = code;
}
public CheckChangePhoneNumberCode(DataInput input) throws IOException {
if (input.readBoolean()) {
var codeTmp = new byte[input.readInt()];
input.readFully(codeTmp);
this.code = new String(codeTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.code == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var codeTmp = this.code.getBytes(StandardCharsets.UTF_8);
output.writeInt(codeTmp.length);
output.write(codeTmp);
}
}
}
public static class CheckChatInviteLink extends Function {
public String inviteLink;
public static final int CONSTRUCTOR = -496940997;
public CheckChatInviteLink() {}
public CheckChatInviteLink(String inviteLink) {
this.inviteLink = inviteLink;
}
public CheckChatInviteLink(DataInput input) throws IOException {
if (input.readBoolean()) {
var inviteLinkTmp = new byte[input.readInt()];
input.readFully(inviteLinkTmp);
this.inviteLink = new String(inviteLinkTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.inviteLink == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var inviteLinkTmp = this.inviteLink.getBytes(StandardCharsets.UTF_8);
output.writeInt(inviteLinkTmp.length);
output.write(inviteLinkTmp);
}
}
}
public static class CheckChatUsername extends Function {
public long chatId;
public String username;
public static final int CONSTRUCTOR = -119119344;
public CheckChatUsername() {}
public CheckChatUsername(long chatId, String username) {
this.chatId = chatId;
this.username = username;
}
public CheckChatUsername(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
var usernameTmp = new byte[input.readInt()];
input.readFully(usernameTmp);
this.username = new String(usernameTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.username == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var usernameTmp = this.username.getBytes(StandardCharsets.UTF_8);
output.writeInt(usernameTmp.length);
output.write(usernameTmp);
}
}
}
public static class CheckCreatedPublicChatsLimit extends Function {
public PublicChatType type;
public static final int CONSTRUCTOR = -445546591;
public CheckCreatedPublicChatsLimit() {}
public CheckCreatedPublicChatsLimit(PublicChatType type) {
this.type = type;
}
public CheckCreatedPublicChatsLimit(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case PublicChatTypeHasUsername.CONSTRUCTOR:
this.type = new PublicChatTypeHasUsername(input);
break;
case PublicChatTypeIsLocationBased.CONSTRUCTOR:
this.type = new PublicChatTypeIsLocationBased(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
}
}
public static class CheckDatabaseEncryptionKey extends Function {
public byte[] encryptionKey;
public static final int CONSTRUCTOR = 1018769307;
public CheckDatabaseEncryptionKey() {}
public CheckDatabaseEncryptionKey(byte[] encryptionKey) {
this.encryptionKey = encryptionKey;
}
public CheckDatabaseEncryptionKey(DataInput input) throws IOException {
if (input.readBoolean()) {
this.encryptionKey = new byte[input.readInt()];
input.readFully(this.encryptionKey);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.encryptionKey == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.encryptionKey.length);
output.write(this.encryptionKey);
}
}
}
public static class CheckEmailAddressVerificationCode extends Function {
public String code;
public static final int CONSTRUCTOR = -426386685;
public CheckEmailAddressVerificationCode() {}
public CheckEmailAddressVerificationCode(String code) {
this.code = code;
}
public CheckEmailAddressVerificationCode(DataInput input) throws IOException {
if (input.readBoolean()) {
var codeTmp = new byte[input.readInt()];
input.readFully(codeTmp);
this.code = new String(codeTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.code == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var codeTmp = this.code.getBytes(StandardCharsets.UTF_8);
output.writeInt(codeTmp.length);
output.write(codeTmp);
}
}
}
public static class CheckPhoneNumberConfirmationCode extends Function {
public String code;
public static final int CONSTRUCTOR = -1348060966;
public CheckPhoneNumberConfirmationCode() {}
public CheckPhoneNumberConfirmationCode(String code) {
this.code = code;
}
public CheckPhoneNumberConfirmationCode(DataInput input) throws IOException {
if (input.readBoolean()) {
var codeTmp = new byte[input.readInt()];
input.readFully(codeTmp);
this.code = new String(codeTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.code == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var codeTmp = this.code.getBytes(StandardCharsets.UTF_8);
output.writeInt(codeTmp.length);
output.write(codeTmp);
}
}
}
public static class CheckPhoneNumberVerificationCode extends Function {
public String code;
public static final int CONSTRUCTOR = 1497462718;
public CheckPhoneNumberVerificationCode() {}
public CheckPhoneNumberVerificationCode(String code) {
this.code = code;
}
public CheckPhoneNumberVerificationCode(DataInput input) throws IOException {
if (input.readBoolean()) {
var codeTmp = new byte[input.readInt()];
input.readFully(codeTmp);
this.code = new String(codeTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.code == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var codeTmp = this.code.getBytes(StandardCharsets.UTF_8);
output.writeInt(codeTmp.length);
output.write(codeTmp);
}
}
}
public static class CheckRecoveryEmailAddressCode extends Function {
public String code;
public static final int CONSTRUCTOR = -1997039589;
public CheckRecoveryEmailAddressCode() {}
public CheckRecoveryEmailAddressCode(String code) {
this.code = code;
}
public CheckRecoveryEmailAddressCode(DataInput input) throws IOException {
if (input.readBoolean()) {
var codeTmp = new byte[input.readInt()];
input.readFully(codeTmp);
this.code = new String(codeTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.code == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var codeTmp = this.code.getBytes(StandardCharsets.UTF_8);
output.writeInt(codeTmp.length);
output.write(codeTmp);
}
}
}
public static class CleanFileName extends Function {
public String fileName;
public static final int CONSTRUCTOR = 967964667;
public CleanFileName() {}
public CleanFileName(String fileName) {
this.fileName = fileName;
}
public CleanFileName(DataInput input) throws IOException {
if (input.readBoolean()) {
var fileNameTmp = new byte[input.readInt()];
input.readFully(fileNameTmp);
this.fileName = new String(fileNameTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.fileName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var fileNameTmp = this.fileName.getBytes(StandardCharsets.UTF_8);
output.writeInt(fileNameTmp.length);
output.write(fileNameTmp);
}
}
}
public static class ClearAllDraftMessages extends Function {
public boolean excludeSecretChats;
public static final int CONSTRUCTOR = -46369573;
public ClearAllDraftMessages() {}
public ClearAllDraftMessages(boolean excludeSecretChats) {
this.excludeSecretChats = excludeSecretChats;
}
public ClearAllDraftMessages(DataInput input) throws IOException {
this.excludeSecretChats = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.excludeSecretChats);
}
}
public static class ClearImportedContacts extends Function {
public static final int CONSTRUCTOR = 869503298;
public ClearImportedContacts() {}
public ClearImportedContacts(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ClearRecentStickers extends Function {
public boolean isAttached;
public static final int CONSTRUCTOR = -321242684;
public ClearRecentStickers() {}
public ClearRecentStickers(boolean isAttached) {
this.isAttached = isAttached;
}
public ClearRecentStickers(DataInput input) throws IOException {
this.isAttached = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isAttached);
}
}
public static class ClearRecentlyFoundChats extends Function {
public static final int CONSTRUCTOR = -285582542;
public ClearRecentlyFoundChats() {}
public ClearRecentlyFoundChats(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class Close extends Function {
public static final int CONSTRUCTOR = -1187782273;
public Close() {}
public Close(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class CloseChat extends Function {
public long chatId;
public static final int CONSTRUCTOR = 39749353;
public CloseChat() {}
public CloseChat(long chatId) {
this.chatId = chatId;
}
public CloseChat(DataInput input) throws IOException {
this.chatId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
}
}
public static class CloseSecretChat extends Function {
public int secretChatId;
public static final int CONSTRUCTOR = -471006133;
public CloseSecretChat() {}
public CloseSecretChat(int secretChatId) {
this.secretChatId = secretChatId;
}
public CloseSecretChat(DataInput input) throws IOException {
this.secretChatId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.secretChatId);
}
}
public static class ConfirmQrCodeAuthentication extends Function {
public String link;
public static final int CONSTRUCTOR = -376199379;
public ConfirmQrCodeAuthentication() {}
public ConfirmQrCodeAuthentication(String link) {
this.link = link;
}
public ConfirmQrCodeAuthentication(DataInput input) throws IOException {
if (input.readBoolean()) {
var linkTmp = new byte[input.readInt()];
input.readFully(linkTmp);
this.link = new String(linkTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.link == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var linkTmp = this.link.getBytes(StandardCharsets.UTF_8);
output.writeInt(linkTmp.length);
output.write(linkTmp);
}
}
}
public static class CreateBasicGroupChat extends Function {
public int basicGroupId;
public boolean force;
public static final int CONSTRUCTOR = 642492777;
public CreateBasicGroupChat() {}
public CreateBasicGroupChat(int basicGroupId, boolean force) {
this.basicGroupId = basicGroupId;
this.force = force;
}
public CreateBasicGroupChat(DataInput input) throws IOException {
this.basicGroupId = input.readInt();
this.force = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.basicGroupId);
output.writeBoolean(this.force);
}
}
public static class CreateCall extends Function {
public int userId;
public CallProtocol protocol;
public static final int CONSTRUCTOR = -1742408159;
public CreateCall() {}
public CreateCall(int userId, CallProtocol protocol) {
this.userId = userId;
this.protocol = protocol;
}
public CreateCall(DataInput input) throws IOException {
this.userId = input.readInt();
if (input.readBoolean()) {
if (CallProtocol.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.protocol = new CallProtocol(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
if (this.protocol == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.protocol.serialize(output);
}
}
}
public static class CreateNewBasicGroupChat extends Function {
public int[] userIds;
public String title;
public static final int CONSTRUCTOR = 1874532069;
public CreateNewBasicGroupChat() {}
public CreateNewBasicGroupChat(int[] userIds, String title) {
this.userIds = userIds;
this.title = title;
}
public CreateNewBasicGroupChat(DataInput input) throws IOException {
if (input.readBoolean()) {
this.userIds = new int[input.readInt()];
for (int i = 0; i < this.userIds.length; i++) {
this.userIds[i] = input.readInt();
}
}
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.userIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.userIds.length);
for (int i = 0; i < this.userIds.length; i++) {
output.writeInt(this.userIds[i]);
}
}
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
}
}
public static class CreateNewSecretChat extends Function {
public int userId;
public static final int CONSTRUCTOR = 1689344881;
public CreateNewSecretChat() {}
public CreateNewSecretChat(int userId) {
this.userId = userId;
}
public CreateNewSecretChat(DataInput input) throws IOException {
this.userId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
}
}
public static class CreateNewStickerSet extends Function {
public int userId;
public String title;
public String name;
public boolean isMasks;
public InputSticker[] stickers;
public static final int CONSTRUCTOR = -1139329506;
public CreateNewStickerSet() {}
public CreateNewStickerSet(int userId, String title, String name, boolean isMasks, InputSticker[] stickers) {
this.userId = userId;
this.title = title;
this.name = name;
this.isMasks = isMasks;
this.stickers = stickers;
}
public CreateNewStickerSet(DataInput input) throws IOException {
this.userId = input.readInt();
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var nameTmp = new byte[input.readInt()];
input.readFully(nameTmp);
this.name = new String(nameTmp, StandardCharsets.UTF_8);
}
this.isMasks = input.readBoolean();
if (input.readBoolean()) {
this.stickers = new InputSticker[input.readInt()];
for (int i = 0; i < this.stickers.length; i++) {
switch(input.readInt()) {
case InputStickerStatic.CONSTRUCTOR:
this.stickers[i] = new InputStickerStatic(input);
break;
case InputStickerAnimated.CONSTRUCTOR:
this.stickers[i] = new InputStickerAnimated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
if (this.name == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nameTmp = this.name.getBytes(StandardCharsets.UTF_8);
output.writeInt(nameTmp.length);
output.write(nameTmp);
}
output.writeBoolean(this.isMasks);
if (this.stickers == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.stickers.length);
for (int i = 0; i < this.stickers.length; i++) {
this.stickers[i].serialize(output);
}
}
}
}
public static class CreateNewSupergroupChat extends Function {
public String title;
public boolean isChannel;
public String description;
public ChatLocation location;
public static final int CONSTRUCTOR = -8999251;
public CreateNewSupergroupChat() {}
public CreateNewSupergroupChat(String title, boolean isChannel, String description, ChatLocation location) {
this.title = title;
this.isChannel = isChannel;
this.description = description;
this.location = location;
}
public CreateNewSupergroupChat(DataInput input) throws IOException {
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
this.isChannel = input.readBoolean();
if (input.readBoolean()) {
var descriptionTmp = new byte[input.readInt()];
input.readFully(descriptionTmp);
this.description = new String(descriptionTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (ChatLocation.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.location = new ChatLocation(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
output.writeBoolean(this.isChannel);
if (this.description == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var descriptionTmp = this.description.getBytes(StandardCharsets.UTF_8);
output.writeInt(descriptionTmp.length);
output.write(descriptionTmp);
}
if (this.location == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.location.serialize(output);
}
}
}
public static class CreatePrivateChat extends Function {
public int userId;
public boolean force;
public static final int CONSTRUCTOR = -1807530364;
public CreatePrivateChat() {}
public CreatePrivateChat(int userId, boolean force) {
this.userId = userId;
this.force = force;
}
public CreatePrivateChat(DataInput input) throws IOException {
this.userId = input.readInt();
this.force = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
output.writeBoolean(this.force);
}
}
public static class CreateSecretChat extends Function {
public int secretChatId;
public static final int CONSTRUCTOR = 1930285615;
public CreateSecretChat() {}
public CreateSecretChat(int secretChatId) {
this.secretChatId = secretChatId;
}
public CreateSecretChat(DataInput input) throws IOException {
this.secretChatId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.secretChatId);
}
}
public static class CreateSupergroupChat extends Function {
public int supergroupId;
public boolean force;
public static final int CONSTRUCTOR = 352742758;
public CreateSupergroupChat() {}
public CreateSupergroupChat(int supergroupId, boolean force) {
this.supergroupId = supergroupId;
this.force = force;
}
public CreateSupergroupChat(DataInput input) throws IOException {
this.supergroupId = input.readInt();
this.force = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.supergroupId);
output.writeBoolean(this.force);
}
}
public static class CreateTemporaryPassword extends Function {
public String password;
public int validFor;
public static final int CONSTRUCTOR = -1626509434;
public CreateTemporaryPassword() {}
public CreateTemporaryPassword(String password, int validFor) {
this.password = password;
this.validFor = validFor;
}
public CreateTemporaryPassword(DataInput input) throws IOException {
if (input.readBoolean()) {
var passwordTmp = new byte[input.readInt()];
input.readFully(passwordTmp);
this.password = new String(passwordTmp, StandardCharsets.UTF_8);
}
this.validFor = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.password == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var passwordTmp = this.password.getBytes(StandardCharsets.UTF_8);
output.writeInt(passwordTmp.length);
output.write(passwordTmp);
}
output.writeInt(this.validFor);
}
}
public static class DeleteAccount extends Function {
public String reason;
public static final int CONSTRUCTOR = -1203056508;
public DeleteAccount() {}
public DeleteAccount(String reason) {
this.reason = reason;
}
public DeleteAccount(DataInput input) throws IOException {
if (input.readBoolean()) {
var reasonTmp = new byte[input.readInt()];
input.readFully(reasonTmp);
this.reason = new String(reasonTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.reason == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var reasonTmp = this.reason.getBytes(StandardCharsets.UTF_8);
output.writeInt(reasonTmp.length);
output.write(reasonTmp);
}
}
}
public static class DeleteChatHistory extends Function {
public long chatId;
public boolean removeFromChatList;
public boolean revoke;
public static final int CONSTRUCTOR = -1472081761;
public DeleteChatHistory() {}
public DeleteChatHistory(long chatId, boolean removeFromChatList, boolean revoke) {
this.chatId = chatId;
this.removeFromChatList = removeFromChatList;
this.revoke = revoke;
}
public DeleteChatHistory(DataInput input) throws IOException {
this.chatId = input.readLong();
this.removeFromChatList = input.readBoolean();
this.revoke = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeBoolean(this.removeFromChatList);
output.writeBoolean(this.revoke);
}
}
public static class DeleteChatMessagesFromUser extends Function {
public long chatId;
public int userId;
public static final int CONSTRUCTOR = -1599689199;
public DeleteChatMessagesFromUser() {}
public DeleteChatMessagesFromUser(long chatId, int userId) {
this.chatId = chatId;
this.userId = userId;
}
public DeleteChatMessagesFromUser(DataInput input) throws IOException {
this.chatId = input.readLong();
this.userId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeInt(this.userId);
}
}
public static class DeleteChatReplyMarkup extends Function {
public long chatId;
public long messageId;
public static final int CONSTRUCTOR = 100637531;
public DeleteChatReplyMarkup() {}
public DeleteChatReplyMarkup(long chatId, long messageId) {
this.chatId = chatId;
this.messageId = messageId;
}
public DeleteChatReplyMarkup(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
}
}
public static class DeleteFile extends Function {
public int fileId;
public static final int CONSTRUCTOR = 1807653676;
public DeleteFile() {}
public DeleteFile(int fileId) {
this.fileId = fileId;
}
public DeleteFile(DataInput input) throws IOException {
this.fileId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.fileId);
}
}
public static class DeleteLanguagePack extends Function {
public String languagePackId;
public static final int CONSTRUCTOR = -2108761026;
public DeleteLanguagePack() {}
public DeleteLanguagePack(String languagePackId) {
this.languagePackId = languagePackId;
}
public DeleteLanguagePack(DataInput input) throws IOException {
if (input.readBoolean()) {
var languagePackIdTmp = new byte[input.readInt()];
input.readFully(languagePackIdTmp);
this.languagePackId = new String(languagePackIdTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.languagePackId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var languagePackIdTmp = this.languagePackId.getBytes(StandardCharsets.UTF_8);
output.writeInt(languagePackIdTmp.length);
output.write(languagePackIdTmp);
}
}
}
public static class DeleteMessages extends Function {
public long chatId;
public long[] messageIds;
public boolean revoke;
public static final int CONSTRUCTOR = 1130090173;
public DeleteMessages() {}
public DeleteMessages(long chatId, long[] messageIds, boolean revoke) {
this.chatId = chatId;
this.messageIds = messageIds;
this.revoke = revoke;
}
public DeleteMessages(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
this.messageIds = new long[input.readInt()];
for (int i = 0; i < this.messageIds.length; i++) {
this.messageIds[i] = input.readLong();
}
}
this.revoke = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.messageIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.messageIds.length);
for (int i = 0; i < this.messageIds.length; i++) {
output.writeLong(this.messageIds[i]);
}
}
output.writeBoolean(this.revoke);
}
}
public static class DeletePassportElement extends Function {
public PassportElementType type;
public static final int CONSTRUCTOR = -1719555468;
public DeletePassportElement() {}
public DeletePassportElement(PassportElementType type) {
this.type = type;
}
public DeletePassportElement(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case PassportElementTypePersonalDetails.CONSTRUCTOR:
this.type = new PassportElementTypePersonalDetails(input);
break;
case PassportElementTypePassport.CONSTRUCTOR:
this.type = new PassportElementTypePassport(input);
break;
case PassportElementTypeDriverLicense.CONSTRUCTOR:
this.type = new PassportElementTypeDriverLicense(input);
break;
case PassportElementTypeIdentityCard.CONSTRUCTOR:
this.type = new PassportElementTypeIdentityCard(input);
break;
case PassportElementTypeInternalPassport.CONSTRUCTOR:
this.type = new PassportElementTypeInternalPassport(input);
break;
case PassportElementTypeAddress.CONSTRUCTOR:
this.type = new PassportElementTypeAddress(input);
break;
case PassportElementTypeUtilityBill.CONSTRUCTOR:
this.type = new PassportElementTypeUtilityBill(input);
break;
case PassportElementTypeBankStatement.CONSTRUCTOR:
this.type = new PassportElementTypeBankStatement(input);
break;
case PassportElementTypeRentalAgreement.CONSTRUCTOR:
this.type = new PassportElementTypeRentalAgreement(input);
break;
case PassportElementTypePassportRegistration.CONSTRUCTOR:
this.type = new PassportElementTypePassportRegistration(input);
break;
case PassportElementTypeTemporaryRegistration.CONSTRUCTOR:
this.type = new PassportElementTypeTemporaryRegistration(input);
break;
case PassportElementTypePhoneNumber.CONSTRUCTOR:
this.type = new PassportElementTypePhoneNumber(input);
break;
case PassportElementTypeEmailAddress.CONSTRUCTOR:
this.type = new PassportElementTypeEmailAddress(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
}
}
public static class DeleteProfilePhoto extends Function {
public long profilePhotoId;
public static final int CONSTRUCTOR = 1319794625;
public DeleteProfilePhoto() {}
public DeleteProfilePhoto(long profilePhotoId) {
this.profilePhotoId = profilePhotoId;
}
public DeleteProfilePhoto(DataInput input) throws IOException {
this.profilePhotoId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.profilePhotoId);
}
}
public static class DeleteSavedCredentials extends Function {
public static final int CONSTRUCTOR = 826300114;
public DeleteSavedCredentials() {}
public DeleteSavedCredentials(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class DeleteSavedOrderInfo extends Function {
public static final int CONSTRUCTOR = 1629058164;
public DeleteSavedOrderInfo() {}
public DeleteSavedOrderInfo(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class DeleteSupergroup extends Function {
public int supergroupId;
public static final int CONSTRUCTOR = -1999855965;
public DeleteSupergroup() {}
public DeleteSupergroup(int supergroupId) {
this.supergroupId = supergroupId;
}
public DeleteSupergroup(DataInput input) throws IOException {
this.supergroupId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.supergroupId);
}
}
public static class Destroy extends Function {
public static final int CONSTRUCTOR = 685331274;
public Destroy() {}
public Destroy(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class DisableProxy extends Function {
public static final int CONSTRUCTOR = -2100095102;
public DisableProxy() {}
public DisableProxy(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class DiscardCall extends Function {
public int callId;
public boolean isDisconnected;
public int duration;
public long connectionId;
public static final int CONSTRUCTOR = -923187372;
public DiscardCall() {}
public DiscardCall(int callId, boolean isDisconnected, int duration, long connectionId) {
this.callId = callId;
this.isDisconnected = isDisconnected;
this.duration = duration;
this.connectionId = connectionId;
}
public DiscardCall(DataInput input) throws IOException {
this.callId = input.readInt();
this.isDisconnected = input.readBoolean();
this.duration = input.readInt();
this.connectionId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.callId);
output.writeBoolean(this.isDisconnected);
output.writeInt(this.duration);
output.writeLong(this.connectionId);
}
}
public static class DisconnectAllWebsites extends Function {
public static final int CONSTRUCTOR = -1082985981;
public DisconnectAllWebsites() {}
public DisconnectAllWebsites(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class DisconnectWebsite extends Function {
public long websiteId;
public static final int CONSTRUCTOR = -778767395;
public DisconnectWebsite() {}
public DisconnectWebsite(long websiteId) {
this.websiteId = websiteId;
}
public DisconnectWebsite(DataInput input) throws IOException {
this.websiteId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.websiteId);
}
}
public static class DownloadFile extends Function {
public int fileId;
public int priority;
public int offset;
public int limit;
public boolean synchronous;
public static final int CONSTRUCTOR = -1102026662;
public DownloadFile() {}
public DownloadFile(int fileId, int priority, int offset, int limit, boolean synchronous) {
this.fileId = fileId;
this.priority = priority;
this.offset = offset;
this.limit = limit;
this.synchronous = synchronous;
}
public DownloadFile(DataInput input) throws IOException {
this.fileId = input.readInt();
this.priority = input.readInt();
this.offset = input.readInt();
this.limit = input.readInt();
this.synchronous = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.fileId);
output.writeInt(this.priority);
output.writeInt(this.offset);
output.writeInt(this.limit);
output.writeBoolean(this.synchronous);
}
}
public static class EditCustomLanguagePackInfo extends Function {
public LanguagePackInfo info;
public static final int CONSTRUCTOR = 1320751257;
public EditCustomLanguagePackInfo() {}
public EditCustomLanguagePackInfo(LanguagePackInfo info) {
this.info = info;
}
public EditCustomLanguagePackInfo(DataInput input) throws IOException {
if (input.readBoolean()) {
if (LanguagePackInfo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.info = new LanguagePackInfo(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.info == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.info.serialize(output);
}
}
}
public static class EditInlineMessageCaption extends Function {
public String inlineMessageId;
public ReplyMarkup replyMarkup;
public FormattedText caption;
public static final int CONSTRUCTOR = -760985929;
public EditInlineMessageCaption() {}
public EditInlineMessageCaption(String inlineMessageId, ReplyMarkup replyMarkup, FormattedText caption) {
this.inlineMessageId = inlineMessageId;
this.replyMarkup = replyMarkup;
this.caption = caption;
}
public EditInlineMessageCaption(DataInput input) throws IOException {
if (input.readBoolean()) {
var inlineMessageIdTmp = new byte[input.readInt()];
input.readFully(inlineMessageIdTmp);
this.inlineMessageId = new String(inlineMessageIdTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new FormattedText(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.inlineMessageId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var inlineMessageIdTmp = this.inlineMessageId.getBytes(StandardCharsets.UTF_8);
output.writeInt(inlineMessageIdTmp.length);
output.write(inlineMessageIdTmp);
}
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
}
}
public static class EditInlineMessageLiveLocation extends Function {
public String inlineMessageId;
public ReplyMarkup replyMarkup;
public Location location;
public static final int CONSTRUCTOR = 655046316;
public EditInlineMessageLiveLocation() {}
public EditInlineMessageLiveLocation(String inlineMessageId, ReplyMarkup replyMarkup, Location location) {
this.inlineMessageId = inlineMessageId;
this.replyMarkup = replyMarkup;
this.location = location;
}
public EditInlineMessageLiveLocation(DataInput input) throws IOException {
if (input.readBoolean()) {
var inlineMessageIdTmp = new byte[input.readInt()];
input.readFully(inlineMessageIdTmp);
this.inlineMessageId = new String(inlineMessageIdTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
if (Location.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.location = new Location(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.inlineMessageId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var inlineMessageIdTmp = this.inlineMessageId.getBytes(StandardCharsets.UTF_8);
output.writeInt(inlineMessageIdTmp.length);
output.write(inlineMessageIdTmp);
}
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
if (this.location == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.location.serialize(output);
}
}
}
public static class EditInlineMessageMedia extends Function {
public String inlineMessageId;
public ReplyMarkup replyMarkup;
public InputMessageContent inputMessageContent;
public static final int CONSTRUCTOR = 23553921;
public EditInlineMessageMedia() {}
public EditInlineMessageMedia(String inlineMessageId, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) {
this.inlineMessageId = inlineMessageId;
this.replyMarkup = replyMarkup;
this.inputMessageContent = inputMessageContent;
}
public EditInlineMessageMedia(DataInput input) throws IOException {
if (input.readBoolean()) {
var inlineMessageIdTmp = new byte[input.readInt()];
input.readFully(inlineMessageIdTmp);
this.inlineMessageId = new String(inlineMessageIdTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputMessageText.CONSTRUCTOR:
this.inputMessageContent = new InputMessageText(input);
break;
case InputMessageAnimation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAnimation(input);
break;
case InputMessageAudio.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAudio(input);
break;
case InputMessageDocument.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDocument(input);
break;
case InputMessagePhoto.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePhoto(input);
break;
case InputMessageSticker.CONSTRUCTOR:
this.inputMessageContent = new InputMessageSticker(input);
break;
case InputMessageVideo.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideo(input);
break;
case InputMessageVideoNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideoNote(input);
break;
case InputMessageVoiceNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVoiceNote(input);
break;
case InputMessageLocation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageLocation(input);
break;
case InputMessageVenue.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVenue(input);
break;
case InputMessageContact.CONSTRUCTOR:
this.inputMessageContent = new InputMessageContact(input);
break;
case InputMessageDice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDice(input);
break;
case InputMessageGame.CONSTRUCTOR:
this.inputMessageContent = new InputMessageGame(input);
break;
case InputMessageInvoice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageInvoice(input);
break;
case InputMessagePoll.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePoll(input);
break;
case InputMessageForwarded.CONSTRUCTOR:
this.inputMessageContent = new InputMessageForwarded(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.inlineMessageId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var inlineMessageIdTmp = this.inlineMessageId.getBytes(StandardCharsets.UTF_8);
output.writeInt(inlineMessageIdTmp.length);
output.write(inlineMessageIdTmp);
}
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
if (this.inputMessageContent == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.inputMessageContent.serialize(output);
}
}
}
public static class EditInlineMessageReplyMarkup extends Function {
public String inlineMessageId;
public ReplyMarkup replyMarkup;
public static final int CONSTRUCTOR = -67565858;
public EditInlineMessageReplyMarkup() {}
public EditInlineMessageReplyMarkup(String inlineMessageId, ReplyMarkup replyMarkup) {
this.inlineMessageId = inlineMessageId;
this.replyMarkup = replyMarkup;
}
public EditInlineMessageReplyMarkup(DataInput input) throws IOException {
if (input.readBoolean()) {
var inlineMessageIdTmp = new byte[input.readInt()];
input.readFully(inlineMessageIdTmp);
this.inlineMessageId = new String(inlineMessageIdTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.inlineMessageId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var inlineMessageIdTmp = this.inlineMessageId.getBytes(StandardCharsets.UTF_8);
output.writeInt(inlineMessageIdTmp.length);
output.write(inlineMessageIdTmp);
}
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
}
}
public static class EditInlineMessageText extends Function {
public String inlineMessageId;
public ReplyMarkup replyMarkup;
public InputMessageContent inputMessageContent;
public static final int CONSTRUCTOR = -855457307;
public EditInlineMessageText() {}
public EditInlineMessageText(String inlineMessageId, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) {
this.inlineMessageId = inlineMessageId;
this.replyMarkup = replyMarkup;
this.inputMessageContent = inputMessageContent;
}
public EditInlineMessageText(DataInput input) throws IOException {
if (input.readBoolean()) {
var inlineMessageIdTmp = new byte[input.readInt()];
input.readFully(inlineMessageIdTmp);
this.inlineMessageId = new String(inlineMessageIdTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputMessageText.CONSTRUCTOR:
this.inputMessageContent = new InputMessageText(input);
break;
case InputMessageAnimation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAnimation(input);
break;
case InputMessageAudio.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAudio(input);
break;
case InputMessageDocument.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDocument(input);
break;
case InputMessagePhoto.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePhoto(input);
break;
case InputMessageSticker.CONSTRUCTOR:
this.inputMessageContent = new InputMessageSticker(input);
break;
case InputMessageVideo.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideo(input);
break;
case InputMessageVideoNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideoNote(input);
break;
case InputMessageVoiceNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVoiceNote(input);
break;
case InputMessageLocation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageLocation(input);
break;
case InputMessageVenue.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVenue(input);
break;
case InputMessageContact.CONSTRUCTOR:
this.inputMessageContent = new InputMessageContact(input);
break;
case InputMessageDice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDice(input);
break;
case InputMessageGame.CONSTRUCTOR:
this.inputMessageContent = new InputMessageGame(input);
break;
case InputMessageInvoice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageInvoice(input);
break;
case InputMessagePoll.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePoll(input);
break;
case InputMessageForwarded.CONSTRUCTOR:
this.inputMessageContent = new InputMessageForwarded(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.inlineMessageId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var inlineMessageIdTmp = this.inlineMessageId.getBytes(StandardCharsets.UTF_8);
output.writeInt(inlineMessageIdTmp.length);
output.write(inlineMessageIdTmp);
}
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
if (this.inputMessageContent == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.inputMessageContent.serialize(output);
}
}
}
public static class EditMessageCaption extends Function {
public long chatId;
public long messageId;
public ReplyMarkup replyMarkup;
public FormattedText caption;
public static final int CONSTRUCTOR = 1154677038;
public EditMessageCaption() {}
public EditMessageCaption(long chatId, long messageId, ReplyMarkup replyMarkup, FormattedText caption) {
this.chatId = chatId;
this.messageId = messageId;
this.replyMarkup = replyMarkup;
this.caption = caption;
}
public EditMessageCaption(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.caption = new FormattedText(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
if (this.caption == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.caption.serialize(output);
}
}
}
public static class EditMessageLiveLocation extends Function {
public long chatId;
public long messageId;
public ReplyMarkup replyMarkup;
public Location location;
public static final int CONSTRUCTOR = -1146772745;
public EditMessageLiveLocation() {}
public EditMessageLiveLocation(long chatId, long messageId, ReplyMarkup replyMarkup, Location location) {
this.chatId = chatId;
this.messageId = messageId;
this.replyMarkup = replyMarkup;
this.location = location;
}
public EditMessageLiveLocation(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
if (Location.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.location = new Location(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
if (this.location == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.location.serialize(output);
}
}
}
public static class EditMessageMedia extends Function {
public long chatId;
public long messageId;
public ReplyMarkup replyMarkup;
public InputMessageContent inputMessageContent;
public static final int CONSTRUCTOR = -1152678125;
public EditMessageMedia() {}
public EditMessageMedia(long chatId, long messageId, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) {
this.chatId = chatId;
this.messageId = messageId;
this.replyMarkup = replyMarkup;
this.inputMessageContent = inputMessageContent;
}
public EditMessageMedia(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputMessageText.CONSTRUCTOR:
this.inputMessageContent = new InputMessageText(input);
break;
case InputMessageAnimation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAnimation(input);
break;
case InputMessageAudio.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAudio(input);
break;
case InputMessageDocument.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDocument(input);
break;
case InputMessagePhoto.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePhoto(input);
break;
case InputMessageSticker.CONSTRUCTOR:
this.inputMessageContent = new InputMessageSticker(input);
break;
case InputMessageVideo.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideo(input);
break;
case InputMessageVideoNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideoNote(input);
break;
case InputMessageVoiceNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVoiceNote(input);
break;
case InputMessageLocation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageLocation(input);
break;
case InputMessageVenue.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVenue(input);
break;
case InputMessageContact.CONSTRUCTOR:
this.inputMessageContent = new InputMessageContact(input);
break;
case InputMessageDice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDice(input);
break;
case InputMessageGame.CONSTRUCTOR:
this.inputMessageContent = new InputMessageGame(input);
break;
case InputMessageInvoice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageInvoice(input);
break;
case InputMessagePoll.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePoll(input);
break;
case InputMessageForwarded.CONSTRUCTOR:
this.inputMessageContent = new InputMessageForwarded(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
if (this.inputMessageContent == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.inputMessageContent.serialize(output);
}
}
}
public static class EditMessageReplyMarkup extends Function {
public long chatId;
public long messageId;
public ReplyMarkup replyMarkup;
public static final int CONSTRUCTOR = 332127881;
public EditMessageReplyMarkup() {}
public EditMessageReplyMarkup(long chatId, long messageId, ReplyMarkup replyMarkup) {
this.chatId = chatId;
this.messageId = messageId;
this.replyMarkup = replyMarkup;
}
public EditMessageReplyMarkup(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
}
}
public static class EditMessageSchedulingState extends Function {
public long chatId;
public long messageId;
public MessageSchedulingState schedulingState;
public static final int CONSTRUCTOR = -1372976192;
public EditMessageSchedulingState() {}
public EditMessageSchedulingState(long chatId, long messageId, MessageSchedulingState schedulingState) {
this.chatId = chatId;
this.messageId = messageId;
this.schedulingState = schedulingState;
}
public EditMessageSchedulingState(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case MessageSchedulingStateSendAtDate.CONSTRUCTOR:
this.schedulingState = new MessageSchedulingStateSendAtDate(input);
break;
case MessageSchedulingStateSendWhenOnline.CONSTRUCTOR:
this.schedulingState = new MessageSchedulingStateSendWhenOnline(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
if (this.schedulingState == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.schedulingState.serialize(output);
}
}
}
public static class EditMessageText extends Function {
public long chatId;
public long messageId;
public ReplyMarkup replyMarkup;
public InputMessageContent inputMessageContent;
public static final int CONSTRUCTOR = 196272567;
public EditMessageText() {}
public EditMessageText(long chatId, long messageId, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) {
this.chatId = chatId;
this.messageId = messageId;
this.replyMarkup = replyMarkup;
this.inputMessageContent = inputMessageContent;
}
public EditMessageText(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputMessageText.CONSTRUCTOR:
this.inputMessageContent = new InputMessageText(input);
break;
case InputMessageAnimation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAnimation(input);
break;
case InputMessageAudio.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAudio(input);
break;
case InputMessageDocument.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDocument(input);
break;
case InputMessagePhoto.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePhoto(input);
break;
case InputMessageSticker.CONSTRUCTOR:
this.inputMessageContent = new InputMessageSticker(input);
break;
case InputMessageVideo.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideo(input);
break;
case InputMessageVideoNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideoNote(input);
break;
case InputMessageVoiceNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVoiceNote(input);
break;
case InputMessageLocation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageLocation(input);
break;
case InputMessageVenue.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVenue(input);
break;
case InputMessageContact.CONSTRUCTOR:
this.inputMessageContent = new InputMessageContact(input);
break;
case InputMessageDice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDice(input);
break;
case InputMessageGame.CONSTRUCTOR:
this.inputMessageContent = new InputMessageGame(input);
break;
case InputMessageInvoice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageInvoice(input);
break;
case InputMessagePoll.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePoll(input);
break;
case InputMessageForwarded.CONSTRUCTOR:
this.inputMessageContent = new InputMessageForwarded(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
if (this.inputMessageContent == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.inputMessageContent.serialize(output);
}
}
}
public static class EditProxy extends Function {
public int proxyId;
public String server;
public int port;
public boolean enable;
public ProxyType type;
public static final int CONSTRUCTOR = -1605883821;
public EditProxy() {}
public EditProxy(int proxyId, String server, int port, boolean enable, ProxyType type) {
this.proxyId = proxyId;
this.server = server;
this.port = port;
this.enable = enable;
this.type = type;
}
public EditProxy(DataInput input) throws IOException {
this.proxyId = input.readInt();
if (input.readBoolean()) {
var serverTmp = new byte[input.readInt()];
input.readFully(serverTmp);
this.server = new String(serverTmp, StandardCharsets.UTF_8);
}
this.port = input.readInt();
this.enable = input.readBoolean();
if (input.readBoolean()) {
switch(input.readInt()) {
case ProxyTypeSocks5.CONSTRUCTOR:
this.type = new ProxyTypeSocks5(input);
break;
case ProxyTypeHttp.CONSTRUCTOR:
this.type = new ProxyTypeHttp(input);
break;
case ProxyTypeMtproto.CONSTRUCTOR:
this.type = new ProxyTypeMtproto(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.proxyId);
if (this.server == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var serverTmp = this.server.getBytes(StandardCharsets.UTF_8);
output.writeInt(serverTmp.length);
output.write(serverTmp);
}
output.writeInt(this.port);
output.writeBoolean(this.enable);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
}
}
public static class EnableProxy extends Function {
public int proxyId;
public static final int CONSTRUCTOR = 1494450838;
public EnableProxy() {}
public EnableProxy(int proxyId) {
this.proxyId = proxyId;
}
public EnableProxy(DataInput input) throws IOException {
this.proxyId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.proxyId);
}
}
public static class FinishFileGeneration extends Function {
public long generationId;
public Error error;
public static final int CONSTRUCTOR = -1055060835;
public FinishFileGeneration() {}
public FinishFileGeneration(long generationId, Error error) {
this.generationId = generationId;
this.error = error;
}
public FinishFileGeneration(DataInput input) throws IOException {
this.generationId = input.readLong();
if (input.readBoolean()) {
if (Error.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.error = new Error(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.generationId);
if (this.error == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.error.serialize(output);
}
}
}
public static class ForwardMessages extends Function {
public long chatId;
public long fromChatId;
public long[] messageIds;
public SendMessageOptions options;
public boolean asAlbum;
public boolean sendCopy;
public boolean removeCaption;
public static final int CONSTRUCTOR = -1633531094;
public ForwardMessages() {}
public ForwardMessages(long chatId, long fromChatId, long[] messageIds, SendMessageOptions options, boolean asAlbum, boolean sendCopy, boolean removeCaption) {
this.chatId = chatId;
this.fromChatId = fromChatId;
this.messageIds = messageIds;
this.options = options;
this.asAlbum = asAlbum;
this.sendCopy = sendCopy;
this.removeCaption = removeCaption;
}
public ForwardMessages(DataInput input) throws IOException {
this.chatId = input.readLong();
this.fromChatId = input.readLong();
if (input.readBoolean()) {
this.messageIds = new long[input.readInt()];
for (int i = 0; i < this.messageIds.length; i++) {
this.messageIds[i] = input.readLong();
}
}
if (input.readBoolean()) {
if (SendMessageOptions.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.options = new SendMessageOptions(input);
}
this.asAlbum = input.readBoolean();
this.sendCopy = input.readBoolean();
this.removeCaption = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.fromChatId);
if (this.messageIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.messageIds.length);
for (int i = 0; i < this.messageIds.length; i++) {
output.writeLong(this.messageIds[i]);
}
}
if (this.options == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.options.serialize(output);
}
output.writeBoolean(this.asAlbum);
output.writeBoolean(this.sendCopy);
output.writeBoolean(this.removeCaption);
}
}
public static class GenerateChatInviteLink extends Function {
public long chatId;
public static final int CONSTRUCTOR = 1945532500;
public GenerateChatInviteLink() {}
public GenerateChatInviteLink(long chatId) {
this.chatId = chatId;
}
public GenerateChatInviteLink(DataInput input) throws IOException {
this.chatId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
}
}
public static class GetAccountTtl extends Function {
public static final int CONSTRUCTOR = -443905161;
public GetAccountTtl() {}
public GetAccountTtl(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetActiveLiveLocationMessages extends Function {
public static final int CONSTRUCTOR = -1425459567;
public GetActiveLiveLocationMessages() {}
public GetActiveLiveLocationMessages(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetActiveSessions extends Function {
public static final int CONSTRUCTOR = 1119710526;
public GetActiveSessions() {}
public GetActiveSessions(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetAllPassportElements extends Function {
public String password;
public static final int CONSTRUCTOR = -2038945045;
public GetAllPassportElements() {}
public GetAllPassportElements(String password) {
this.password = password;
}
public GetAllPassportElements(DataInput input) throws IOException {
if (input.readBoolean()) {
var passwordTmp = new byte[input.readInt()];
input.readFully(passwordTmp);
this.password = new String(passwordTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.password == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var passwordTmp = this.password.getBytes(StandardCharsets.UTF_8);
output.writeInt(passwordTmp.length);
output.write(passwordTmp);
}
}
}
public static class GetApplicationConfig extends Function {
public static final int CONSTRUCTOR = -1823144318;
public GetApplicationConfig() {}
public GetApplicationConfig(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetArchivedStickerSets extends Function {
public boolean isMasks;
public long offsetStickerSetId;
public int limit;
public static final int CONSTRUCTOR = 1996943238;
public GetArchivedStickerSets() {}
public GetArchivedStickerSets(boolean isMasks, long offsetStickerSetId, int limit) {
this.isMasks = isMasks;
this.offsetStickerSetId = offsetStickerSetId;
this.limit = limit;
}
public GetArchivedStickerSets(DataInput input) throws IOException {
this.isMasks = input.readBoolean();
this.offsetStickerSetId = input.readLong();
this.limit = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isMasks);
output.writeLong(this.offsetStickerSetId);
output.writeInt(this.limit);
}
}
public static class GetAttachedStickerSets extends Function {
public int fileId;
public static final int CONSTRUCTOR = 1302172429;
public GetAttachedStickerSets() {}
public GetAttachedStickerSets(int fileId) {
this.fileId = fileId;
}
public GetAttachedStickerSets(DataInput input) throws IOException {
this.fileId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.fileId);
}
}
public static class GetAuthorizationState extends Function {
public static final int CONSTRUCTOR = 1949154877;
public GetAuthorizationState() {}
public GetAuthorizationState(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetAutoDownloadSettingsPresets extends Function {
public static final int CONSTRUCTOR = -1721088201;
public GetAutoDownloadSettingsPresets() {}
public GetAutoDownloadSettingsPresets(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetBackgroundUrl extends Function {
public String name;
public BackgroundType type;
public static final int CONSTRUCTOR = 733769682;
public GetBackgroundUrl() {}
public GetBackgroundUrl(String name, BackgroundType type) {
this.name = name;
this.type = type;
}
public GetBackgroundUrl(DataInput input) throws IOException {
if (input.readBoolean()) {
var nameTmp = new byte[input.readInt()];
input.readFully(nameTmp);
this.name = new String(nameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case BackgroundTypeWallpaper.CONSTRUCTOR:
this.type = new BackgroundTypeWallpaper(input);
break;
case BackgroundTypePattern.CONSTRUCTOR:
this.type = new BackgroundTypePattern(input);
break;
case BackgroundTypeFill.CONSTRUCTOR:
this.type = new BackgroundTypeFill(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.name == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nameTmp = this.name.getBytes(StandardCharsets.UTF_8);
output.writeInt(nameTmp.length);
output.write(nameTmp);
}
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
}
}
public static class GetBackgrounds extends Function {
public boolean forDarkTheme;
public static final int CONSTRUCTOR = 249072633;
public GetBackgrounds() {}
public GetBackgrounds(boolean forDarkTheme) {
this.forDarkTheme = forDarkTheme;
}
public GetBackgrounds(DataInput input) throws IOException {
this.forDarkTheme = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.forDarkTheme);
}
}
public static class GetBankCardInfo extends Function {
public String bankCardNumber;
public static final int CONSTRUCTOR = -1310515792;
public GetBankCardInfo() {}
public GetBankCardInfo(String bankCardNumber) {
this.bankCardNumber = bankCardNumber;
}
public GetBankCardInfo(DataInput input) throws IOException {
if (input.readBoolean()) {
var bankCardNumberTmp = new byte[input.readInt()];
input.readFully(bankCardNumberTmp);
this.bankCardNumber = new String(bankCardNumberTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.bankCardNumber == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var bankCardNumberTmp = this.bankCardNumber.getBytes(StandardCharsets.UTF_8);
output.writeInt(bankCardNumberTmp.length);
output.write(bankCardNumberTmp);
}
}
}
public static class GetBasicGroup extends Function {
public int basicGroupId;
public static final int CONSTRUCTOR = 561775568;
public GetBasicGroup() {}
public GetBasicGroup(int basicGroupId) {
this.basicGroupId = basicGroupId;
}
public GetBasicGroup(DataInput input) throws IOException {
this.basicGroupId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.basicGroupId);
}
}
public static class GetBasicGroupFullInfo extends Function {
public int basicGroupId;
public static final int CONSTRUCTOR = 1770517905;
public GetBasicGroupFullInfo() {}
public GetBasicGroupFullInfo(int basicGroupId) {
this.basicGroupId = basicGroupId;
}
public GetBasicGroupFullInfo(DataInput input) throws IOException {
this.basicGroupId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.basicGroupId);
}
}
public static class GetBlockedUsers extends Function {
public int offset;
public int limit;
public static final int CONSTRUCTOR = -742912777;
public GetBlockedUsers() {}
public GetBlockedUsers(int offset, int limit) {
this.offset = offset;
this.limit = limit;
}
public GetBlockedUsers(DataInput input) throws IOException {
this.offset = input.readInt();
this.limit = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.offset);
output.writeInt(this.limit);
}
}
public static class GetCallbackQueryAnswer extends Function {
public long chatId;
public long messageId;
public CallbackQueryPayload payload;
public static final int CONSTRUCTOR = 116357727;
public GetCallbackQueryAnswer() {}
public GetCallbackQueryAnswer(long chatId, long messageId, CallbackQueryPayload payload) {
this.chatId = chatId;
this.messageId = messageId;
this.payload = payload;
}
public GetCallbackQueryAnswer(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case CallbackQueryPayloadData.CONSTRUCTOR:
this.payload = new CallbackQueryPayloadData(input);
break;
case CallbackQueryPayloadGame.CONSTRUCTOR:
this.payload = new CallbackQueryPayloadGame(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
if (this.payload == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.payload.serialize(output);
}
}
}
public static class GetChat extends Function {
public long chatId;
public static final int CONSTRUCTOR = 1866601536;
public GetChat() {}
public GetChat(long chatId) {
this.chatId = chatId;
}
public GetChat(DataInput input) throws IOException {
this.chatId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
}
}
public static class GetChatAdministrators extends Function {
public long chatId;
public static final int CONSTRUCTOR = 1544468155;
public GetChatAdministrators() {}
public GetChatAdministrators(long chatId) {
this.chatId = chatId;
}
public GetChatAdministrators(DataInput input) throws IOException {
this.chatId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
}
}
public static class GetChatEventLog extends Function {
public long chatId;
public String query;
public long fromEventId;
public int limit;
public ChatEventLogFilters filters;
public int[] userIds;
public static final int CONSTRUCTOR = 206900967;
public GetChatEventLog() {}
public GetChatEventLog(long chatId, String query, long fromEventId, int limit, ChatEventLogFilters filters, int[] userIds) {
this.chatId = chatId;
this.query = query;
this.fromEventId = fromEventId;
this.limit = limit;
this.filters = filters;
this.userIds = userIds;
}
public GetChatEventLog(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
var queryTmp = new byte[input.readInt()];
input.readFully(queryTmp);
this.query = new String(queryTmp, StandardCharsets.UTF_8);
}
this.fromEventId = input.readLong();
this.limit = input.readInt();
if (input.readBoolean()) {
if (ChatEventLogFilters.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.filters = new ChatEventLogFilters(input);
}
if (input.readBoolean()) {
this.userIds = new int[input.readInt()];
for (int i = 0; i < this.userIds.length; i++) {
this.userIds[i] = input.readInt();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.query == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var queryTmp = this.query.getBytes(StandardCharsets.UTF_8);
output.writeInt(queryTmp.length);
output.write(queryTmp);
}
output.writeLong(this.fromEventId);
output.writeInt(this.limit);
if (this.filters == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.filters.serialize(output);
}
if (this.userIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.userIds.length);
for (int i = 0; i < this.userIds.length; i++) {
output.writeInt(this.userIds[i]);
}
}
}
}
public static class GetChatHistory extends Function {
public long chatId;
public long fromMessageId;
public int offset;
public int limit;
public boolean onlyLocal;
public static final int CONSTRUCTOR = -799960451;
public GetChatHistory() {}
public GetChatHistory(long chatId, long fromMessageId, int offset, int limit, boolean onlyLocal) {
this.chatId = chatId;
this.fromMessageId = fromMessageId;
this.offset = offset;
this.limit = limit;
this.onlyLocal = onlyLocal;
}
public GetChatHistory(DataInput input) throws IOException {
this.chatId = input.readLong();
this.fromMessageId = input.readLong();
this.offset = input.readInt();
this.limit = input.readInt();
this.onlyLocal = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.fromMessageId);
output.writeInt(this.offset);
output.writeInt(this.limit);
output.writeBoolean(this.onlyLocal);
}
}
public static class GetChatMember extends Function {
public long chatId;
public int userId;
public static final int CONSTRUCTOR = 677085892;
public GetChatMember() {}
public GetChatMember(long chatId, int userId) {
this.chatId = chatId;
this.userId = userId;
}
public GetChatMember(DataInput input) throws IOException {
this.chatId = input.readLong();
this.userId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeInt(this.userId);
}
}
public static class GetChatMessageByDate extends Function {
public long chatId;
public int date;
public static final int CONSTRUCTOR = 1062564150;
public GetChatMessageByDate() {}
public GetChatMessageByDate(long chatId, int date) {
this.chatId = chatId;
this.date = date;
}
public GetChatMessageByDate(DataInput input) throws IOException {
this.chatId = input.readLong();
this.date = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeInt(this.date);
}
}
public static class GetChatMessageCount extends Function {
public long chatId;
public SearchMessagesFilter filter;
public boolean returnLocal;
public static final int CONSTRUCTOR = 205435308;
public GetChatMessageCount() {}
public GetChatMessageCount(long chatId, SearchMessagesFilter filter, boolean returnLocal) {
this.chatId = chatId;
this.filter = filter;
this.returnLocal = returnLocal;
}
public GetChatMessageCount(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case SearchMessagesFilterEmpty.CONSTRUCTOR:
this.filter = new SearchMessagesFilterEmpty(input);
break;
case SearchMessagesFilterAnimation.CONSTRUCTOR:
this.filter = new SearchMessagesFilterAnimation(input);
break;
case SearchMessagesFilterAudio.CONSTRUCTOR:
this.filter = new SearchMessagesFilterAudio(input);
break;
case SearchMessagesFilterDocument.CONSTRUCTOR:
this.filter = new SearchMessagesFilterDocument(input);
break;
case SearchMessagesFilterPhoto.CONSTRUCTOR:
this.filter = new SearchMessagesFilterPhoto(input);
break;
case SearchMessagesFilterVideo.CONSTRUCTOR:
this.filter = new SearchMessagesFilterVideo(input);
break;
case SearchMessagesFilterVoiceNote.CONSTRUCTOR:
this.filter = new SearchMessagesFilterVoiceNote(input);
break;
case SearchMessagesFilterPhotoAndVideo.CONSTRUCTOR:
this.filter = new SearchMessagesFilterPhotoAndVideo(input);
break;
case SearchMessagesFilterUrl.CONSTRUCTOR:
this.filter = new SearchMessagesFilterUrl(input);
break;
case SearchMessagesFilterChatPhoto.CONSTRUCTOR:
this.filter = new SearchMessagesFilterChatPhoto(input);
break;
case SearchMessagesFilterCall.CONSTRUCTOR:
this.filter = new SearchMessagesFilterCall(input);
break;
case SearchMessagesFilterMissedCall.CONSTRUCTOR:
this.filter = new SearchMessagesFilterMissedCall(input);
break;
case SearchMessagesFilterVideoNote.CONSTRUCTOR:
this.filter = new SearchMessagesFilterVideoNote(input);
break;
case SearchMessagesFilterVoiceAndVideoNote.CONSTRUCTOR:
this.filter = new SearchMessagesFilterVoiceAndVideoNote(input);
break;
case SearchMessagesFilterMention.CONSTRUCTOR:
this.filter = new SearchMessagesFilterMention(input);
break;
case SearchMessagesFilterUnreadMention.CONSTRUCTOR:
this.filter = new SearchMessagesFilterUnreadMention(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.returnLocal = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.filter == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.filter.serialize(output);
}
output.writeBoolean(this.returnLocal);
}
}
public static class GetChatNotificationSettingsExceptions extends Function {
public NotificationSettingsScope scope;
public boolean compareSound;
public static final int CONSTRUCTOR = 201199121;
public GetChatNotificationSettingsExceptions() {}
public GetChatNotificationSettingsExceptions(NotificationSettingsScope scope, boolean compareSound) {
this.scope = scope;
this.compareSound = compareSound;
}
public GetChatNotificationSettingsExceptions(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case NotificationSettingsScopePrivateChats.CONSTRUCTOR:
this.scope = new NotificationSettingsScopePrivateChats(input);
break;
case NotificationSettingsScopeGroupChats.CONSTRUCTOR:
this.scope = new NotificationSettingsScopeGroupChats(input);
break;
case NotificationSettingsScopeChannelChats.CONSTRUCTOR:
this.scope = new NotificationSettingsScopeChannelChats(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.compareSound = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.scope == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.scope.serialize(output);
}
output.writeBoolean(this.compareSound);
}
}
public static class GetChatPinnedMessage extends Function {
public long chatId;
public static final int CONSTRUCTOR = 359865008;
public GetChatPinnedMessage() {}
public GetChatPinnedMessage(long chatId) {
this.chatId = chatId;
}
public GetChatPinnedMessage(DataInput input) throws IOException {
this.chatId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
}
}
public static class GetChatScheduledMessages extends Function {
public long chatId;
public static final int CONSTRUCTOR = -549638149;
public GetChatScheduledMessages() {}
public GetChatScheduledMessages(long chatId) {
this.chatId = chatId;
}
public GetChatScheduledMessages(DataInput input) throws IOException {
this.chatId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
}
}
public static class GetChatStatistics extends Function {
public long chatId;
public boolean isDark;
public static final int CONSTRUCTOR = 327057816;
public GetChatStatistics() {}
public GetChatStatistics(long chatId, boolean isDark) {
this.chatId = chatId;
this.isDark = isDark;
}
public GetChatStatistics(DataInput input) throws IOException {
this.chatId = input.readLong();
this.isDark = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeBoolean(this.isDark);
}
}
public static class GetChatStatisticsGraph extends Function {
public long chatId;
public String token;
public long x;
public static final int CONSTRUCTOR = -1643545293;
public GetChatStatisticsGraph() {}
public GetChatStatisticsGraph(long chatId, String token, long x) {
this.chatId = chatId;
this.token = token;
this.x = x;
}
public GetChatStatisticsGraph(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
var tokenTmp = new byte[input.readInt()];
input.readFully(tokenTmp);
this.token = new String(tokenTmp, StandardCharsets.UTF_8);
}
this.x = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.token == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var tokenTmp = this.token.getBytes(StandardCharsets.UTF_8);
output.writeInt(tokenTmp.length);
output.write(tokenTmp);
}
output.writeLong(this.x);
}
}
public static class GetChatStatisticsUrl extends Function {
public long chatId;
public String parameters;
public boolean isDark;
public static final int CONSTRUCTOR = 1114621183;
public GetChatStatisticsUrl() {}
public GetChatStatisticsUrl(long chatId, String parameters, boolean isDark) {
this.chatId = chatId;
this.parameters = parameters;
this.isDark = isDark;
}
public GetChatStatisticsUrl(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
var parametersTmp = new byte[input.readInt()];
input.readFully(parametersTmp);
this.parameters = new String(parametersTmp, StandardCharsets.UTF_8);
}
this.isDark = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.parameters == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var parametersTmp = this.parameters.getBytes(StandardCharsets.UTF_8);
output.writeInt(parametersTmp.length);
output.write(parametersTmp);
}
output.writeBoolean(this.isDark);
}
}
public static class GetChats extends Function {
public ChatList chatList;
public long offsetOrder;
public long offsetChatId;
public int limit;
public static final int CONSTRUCTOR = 1847129537;
public GetChats() {}
public GetChats(ChatList chatList, long offsetOrder, long offsetChatId, int limit) {
this.chatList = chatList;
this.offsetOrder = offsetOrder;
this.offsetChatId = offsetChatId;
this.limit = limit;
}
public GetChats(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatListMain.CONSTRUCTOR:
this.chatList = new ChatListMain(input);
break;
case ChatListArchive.CONSTRUCTOR:
this.chatList = new ChatListArchive(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.offsetOrder = input.readLong();
this.offsetChatId = input.readLong();
this.limit = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.chatList == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.chatList.serialize(output);
}
output.writeLong(this.offsetOrder);
output.writeLong(this.offsetChatId);
output.writeInt(this.limit);
}
}
public static class GetConnectedWebsites extends Function {
public static final int CONSTRUCTOR = -170536110;
public GetConnectedWebsites() {}
public GetConnectedWebsites(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetContacts extends Function {
public static final int CONSTRUCTOR = -1417722768;
public GetContacts() {}
public GetContacts(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetCountryCode extends Function {
public static final int CONSTRUCTOR = 1540593906;
public GetCountryCode() {}
public GetCountryCode(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetCreatedPublicChats extends Function {
public PublicChatType type;
public static final int CONSTRUCTOR = 710354415;
public GetCreatedPublicChats() {}
public GetCreatedPublicChats(PublicChatType type) {
this.type = type;
}
public GetCreatedPublicChats(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case PublicChatTypeHasUsername.CONSTRUCTOR:
this.type = new PublicChatTypeHasUsername(input);
break;
case PublicChatTypeIsLocationBased.CONSTRUCTOR:
this.type = new PublicChatTypeIsLocationBased(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
}
}
public static class GetCurrentState extends Function {
public static final int CONSTRUCTOR = -1191417719;
public GetCurrentState() {}
public GetCurrentState(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetDatabaseStatistics extends Function {
public static final int CONSTRUCTOR = -1942760263;
public GetDatabaseStatistics() {}
public GetDatabaseStatistics(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetDeepLinkInfo extends Function {
public String link;
public static final int CONSTRUCTOR = 680673150;
public GetDeepLinkInfo() {}
public GetDeepLinkInfo(String link) {
this.link = link;
}
public GetDeepLinkInfo(DataInput input) throws IOException {
if (input.readBoolean()) {
var linkTmp = new byte[input.readInt()];
input.readFully(linkTmp);
this.link = new String(linkTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.link == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var linkTmp = this.link.getBytes(StandardCharsets.UTF_8);
output.writeInt(linkTmp.length);
output.write(linkTmp);
}
}
}
public static class GetEmojiSuggestionsUrl extends Function {
public String languageCode;
public static final int CONSTRUCTOR = -1404101841;
public GetEmojiSuggestionsUrl() {}
public GetEmojiSuggestionsUrl(String languageCode) {
this.languageCode = languageCode;
}
public GetEmojiSuggestionsUrl(DataInput input) throws IOException {
if (input.readBoolean()) {
var languageCodeTmp = new byte[input.readInt()];
input.readFully(languageCodeTmp);
this.languageCode = new String(languageCodeTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.languageCode == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var languageCodeTmp = this.languageCode.getBytes(StandardCharsets.UTF_8);
output.writeInt(languageCodeTmp.length);
output.write(languageCodeTmp);
}
}
}
public static class GetFavoriteStickers extends Function {
public static final int CONSTRUCTOR = -338964672;
public GetFavoriteStickers() {}
public GetFavoriteStickers(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetFile extends Function {
public int fileId;
public static final int CONSTRUCTOR = 1553923406;
public GetFile() {}
public GetFile(int fileId) {
this.fileId = fileId;
}
public GetFile(DataInput input) throws IOException {
this.fileId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.fileId);
}
}
public static class GetFileDownloadedPrefixSize extends Function {
public int fileId;
public int offset;
public static final int CONSTRUCTOR = -1668864864;
public GetFileDownloadedPrefixSize() {}
public GetFileDownloadedPrefixSize(int fileId, int offset) {
this.fileId = fileId;
this.offset = offset;
}
public GetFileDownloadedPrefixSize(DataInput input) throws IOException {
this.fileId = input.readInt();
this.offset = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.fileId);
output.writeInt(this.offset);
}
}
public static class GetFileExtension extends Function {
public String mimeType;
public static final int CONSTRUCTOR = -106055372;
public GetFileExtension() {}
public GetFileExtension(String mimeType) {
this.mimeType = mimeType;
}
public GetFileExtension(DataInput input) throws IOException {
if (input.readBoolean()) {
var mimeTypeTmp = new byte[input.readInt()];
input.readFully(mimeTypeTmp);
this.mimeType = new String(mimeTypeTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.mimeType == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var mimeTypeTmp = this.mimeType.getBytes(StandardCharsets.UTF_8);
output.writeInt(mimeTypeTmp.length);
output.write(mimeTypeTmp);
}
}
}
public static class GetFileMimeType extends Function {
public String fileName;
public static final int CONSTRUCTOR = -2073879671;
public GetFileMimeType() {}
public GetFileMimeType(String fileName) {
this.fileName = fileName;
}
public GetFileMimeType(DataInput input) throws IOException {
if (input.readBoolean()) {
var fileNameTmp = new byte[input.readInt()];
input.readFully(fileNameTmp);
this.fileName = new String(fileNameTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.fileName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var fileNameTmp = this.fileName.getBytes(StandardCharsets.UTF_8);
output.writeInt(fileNameTmp.length);
output.write(fileNameTmp);
}
}
}
public static class GetGameHighScores extends Function {
public long chatId;
public long messageId;
public int userId;
public static final int CONSTRUCTOR = 1920923753;
public GetGameHighScores() {}
public GetGameHighScores(long chatId, long messageId, int userId) {
this.chatId = chatId;
this.messageId = messageId;
this.userId = userId;
}
public GetGameHighScores(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
this.userId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
output.writeInt(this.userId);
}
}
public static class GetGroupsInCommon extends Function {
public int userId;
public long offsetChatId;
public int limit;
public static final int CONSTRUCTOR = -23238689;
public GetGroupsInCommon() {}
public GetGroupsInCommon(int userId, long offsetChatId, int limit) {
this.userId = userId;
this.offsetChatId = offsetChatId;
this.limit = limit;
}
public GetGroupsInCommon(DataInput input) throws IOException {
this.userId = input.readInt();
this.offsetChatId = input.readLong();
this.limit = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
output.writeLong(this.offsetChatId);
output.writeInt(this.limit);
}
}
public static class GetImportedContactCount extends Function {
public static final int CONSTRUCTOR = -656336346;
public GetImportedContactCount() {}
public GetImportedContactCount(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetInactiveSupergroupChats extends Function {
public static final int CONSTRUCTOR = -657720907;
public GetInactiveSupergroupChats() {}
public GetInactiveSupergroupChats(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetInlineGameHighScores extends Function {
public String inlineMessageId;
public int userId;
public static final int CONSTRUCTOR = -1833445800;
public GetInlineGameHighScores() {}
public GetInlineGameHighScores(String inlineMessageId, int userId) {
this.inlineMessageId = inlineMessageId;
this.userId = userId;
}
public GetInlineGameHighScores(DataInput input) throws IOException {
if (input.readBoolean()) {
var inlineMessageIdTmp = new byte[input.readInt()];
input.readFully(inlineMessageIdTmp);
this.inlineMessageId = new String(inlineMessageIdTmp, StandardCharsets.UTF_8);
}
this.userId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.inlineMessageId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var inlineMessageIdTmp = this.inlineMessageId.getBytes(StandardCharsets.UTF_8);
output.writeInt(inlineMessageIdTmp.length);
output.write(inlineMessageIdTmp);
}
output.writeInt(this.userId);
}
}
public static class GetInlineQueryResults extends Function {
public int botUserId;
public long chatId;
public Location userLocation;
public String query;
public String offset;
public static final int CONSTRUCTOR = -1182511172;
public GetInlineQueryResults() {}
public GetInlineQueryResults(int botUserId, long chatId, Location userLocation, String query, String offset) {
this.botUserId = botUserId;
this.chatId = chatId;
this.userLocation = userLocation;
this.query = query;
this.offset = offset;
}
public GetInlineQueryResults(DataInput input) throws IOException {
this.botUserId = input.readInt();
this.chatId = input.readLong();
if (input.readBoolean()) {
if (Location.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.userLocation = new Location(input);
}
if (input.readBoolean()) {
var queryTmp = new byte[input.readInt()];
input.readFully(queryTmp);
this.query = new String(queryTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var offsetTmp = new byte[input.readInt()];
input.readFully(offsetTmp);
this.offset = new String(offsetTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.botUserId);
output.writeLong(this.chatId);
if (this.userLocation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.userLocation.serialize(output);
}
if (this.query == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var queryTmp = this.query.getBytes(StandardCharsets.UTF_8);
output.writeInt(queryTmp.length);
output.write(queryTmp);
}
if (this.offset == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var offsetTmp = this.offset.getBytes(StandardCharsets.UTF_8);
output.writeInt(offsetTmp.length);
output.write(offsetTmp);
}
}
}
public static class GetInstalledStickerSets extends Function {
public boolean isMasks;
public static final int CONSTRUCTOR = 1214523749;
public GetInstalledStickerSets() {}
public GetInstalledStickerSets(boolean isMasks) {
this.isMasks = isMasks;
}
public GetInstalledStickerSets(DataInput input) throws IOException {
this.isMasks = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isMasks);
}
}
public static class GetInviteText extends Function {
public static final int CONSTRUCTOR = 794573512;
public GetInviteText() {}
public GetInviteText(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetJsonString extends Function {
public JsonValue jsonValue;
public static final int CONSTRUCTOR = 663458849;
public GetJsonString() {}
public GetJsonString(JsonValue jsonValue) {
this.jsonValue = jsonValue;
}
public GetJsonString(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case JsonValueNull.CONSTRUCTOR:
this.jsonValue = new JsonValueNull(input);
break;
case JsonValueBoolean.CONSTRUCTOR:
this.jsonValue = new JsonValueBoolean(input);
break;
case JsonValueNumber.CONSTRUCTOR:
this.jsonValue = new JsonValueNumber(input);
break;
case JsonValueString.CONSTRUCTOR:
this.jsonValue = new JsonValueString(input);
break;
case JsonValueArray.CONSTRUCTOR:
this.jsonValue = new JsonValueArray(input);
break;
case JsonValueObject.CONSTRUCTOR:
this.jsonValue = new JsonValueObject(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.jsonValue == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.jsonValue.serialize(output);
}
}
}
public static class GetJsonValue extends Function {
public String json;
public static final int CONSTRUCTOR = -1829086715;
public GetJsonValue() {}
public GetJsonValue(String json) {
this.json = json;
}
public GetJsonValue(DataInput input) throws IOException {
if (input.readBoolean()) {
var jsonTmp = new byte[input.readInt()];
input.readFully(jsonTmp);
this.json = new String(jsonTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.json == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var jsonTmp = this.json.getBytes(StandardCharsets.UTF_8);
output.writeInt(jsonTmp.length);
output.write(jsonTmp);
}
}
}
public static class GetLanguagePackInfo extends Function {
public String languagePackId;
public static final int CONSTRUCTOR = 2077809320;
public GetLanguagePackInfo() {}
public GetLanguagePackInfo(String languagePackId) {
this.languagePackId = languagePackId;
}
public GetLanguagePackInfo(DataInput input) throws IOException {
if (input.readBoolean()) {
var languagePackIdTmp = new byte[input.readInt()];
input.readFully(languagePackIdTmp);
this.languagePackId = new String(languagePackIdTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.languagePackId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var languagePackIdTmp = this.languagePackId.getBytes(StandardCharsets.UTF_8);
output.writeInt(languagePackIdTmp.length);
output.write(languagePackIdTmp);
}
}
}
public static class GetLanguagePackString extends Function {
public String languagePackDatabasePath;
public String localizationTarget;
public String languagePackId;
public String key;
public static final int CONSTRUCTOR = 150789747;
public GetLanguagePackString() {}
public GetLanguagePackString(String languagePackDatabasePath, String localizationTarget, String languagePackId, String key) {
this.languagePackDatabasePath = languagePackDatabasePath;
this.localizationTarget = localizationTarget;
this.languagePackId = languagePackId;
this.key = key;
}
public GetLanguagePackString(DataInput input) throws IOException {
if (input.readBoolean()) {
var languagePackDatabasePathTmp = new byte[input.readInt()];
input.readFully(languagePackDatabasePathTmp);
this.languagePackDatabasePath = new String(languagePackDatabasePathTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var localizationTargetTmp = new byte[input.readInt()];
input.readFully(localizationTargetTmp);
this.localizationTarget = new String(localizationTargetTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var languagePackIdTmp = new byte[input.readInt()];
input.readFully(languagePackIdTmp);
this.languagePackId = new String(languagePackIdTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var keyTmp = new byte[input.readInt()];
input.readFully(keyTmp);
this.key = new String(keyTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.languagePackDatabasePath == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var languagePackDatabasePathTmp = this.languagePackDatabasePath.getBytes(StandardCharsets.UTF_8);
output.writeInt(languagePackDatabasePathTmp.length);
output.write(languagePackDatabasePathTmp);
}
if (this.localizationTarget == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var localizationTargetTmp = this.localizationTarget.getBytes(StandardCharsets.UTF_8);
output.writeInt(localizationTargetTmp.length);
output.write(localizationTargetTmp);
}
if (this.languagePackId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var languagePackIdTmp = this.languagePackId.getBytes(StandardCharsets.UTF_8);
output.writeInt(languagePackIdTmp.length);
output.write(languagePackIdTmp);
}
if (this.key == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var keyTmp = this.key.getBytes(StandardCharsets.UTF_8);
output.writeInt(keyTmp.length);
output.write(keyTmp);
}
}
}
public static class GetLanguagePackStrings extends Function {
public String languagePackId;
public String[] keys;
public static final int CONSTRUCTOR = 1246259088;
public GetLanguagePackStrings() {}
public GetLanguagePackStrings(String languagePackId, String[] keys) {
this.languagePackId = languagePackId;
this.keys = keys;
}
public GetLanguagePackStrings(DataInput input) throws IOException {
if (input.readBoolean()) {
var languagePackIdTmp = new byte[input.readInt()];
input.readFully(languagePackIdTmp);
this.languagePackId = new String(languagePackIdTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
this.keys = new String[input.readInt()];
for (int i = 0; i < this.keys.length; i++) {
var keysTmp = new byte[input.readInt()];
input.readFully(keysTmp);
this.keys[i] = new String(keysTmp, StandardCharsets.UTF_8);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.languagePackId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var languagePackIdTmp = this.languagePackId.getBytes(StandardCharsets.UTF_8);
output.writeInt(languagePackIdTmp.length);
output.write(languagePackIdTmp);
}
if (this.keys == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.keys.length);
for (int i = 0; i < this.keys.length; i++) {
var keysTmp = this.keys[i].getBytes(StandardCharsets.UTF_8);
output.writeInt(keysTmp.length);
output.write(keysTmp);
}
}
}
}
public static class GetLocalizationTargetInfo extends Function {
public boolean onlyLocal;
public static final int CONSTRUCTOR = 1849499526;
public GetLocalizationTargetInfo() {}
public GetLocalizationTargetInfo(boolean onlyLocal) {
this.onlyLocal = onlyLocal;
}
public GetLocalizationTargetInfo(DataInput input) throws IOException {
this.onlyLocal = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.onlyLocal);
}
}
public static class GetLogStream extends Function {
public static final int CONSTRUCTOR = 1167608667;
public GetLogStream() {}
public GetLogStream(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetLogTagVerbosityLevel extends Function {
public String tag;
public static final int CONSTRUCTOR = 951004547;
public GetLogTagVerbosityLevel() {}
public GetLogTagVerbosityLevel(String tag) {
this.tag = tag;
}
public GetLogTagVerbosityLevel(DataInput input) throws IOException {
if (input.readBoolean()) {
var tagTmp = new byte[input.readInt()];
input.readFully(tagTmp);
this.tag = new String(tagTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.tag == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var tagTmp = this.tag.getBytes(StandardCharsets.UTF_8);
output.writeInt(tagTmp.length);
output.write(tagTmp);
}
}
}
public static class GetLogTags extends Function {
public static final int CONSTRUCTOR = -254449190;
public GetLogTags() {}
public GetLogTags(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetLogVerbosityLevel extends Function {
public static final int CONSTRUCTOR = 594057956;
public GetLogVerbosityLevel() {}
public GetLogVerbosityLevel(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetLoginUrl extends Function {
public long chatId;
public long messageId;
public int buttonId;
public boolean allowWriteAccess;
public static final int CONSTRUCTOR = 694973925;
public GetLoginUrl() {}
public GetLoginUrl(long chatId, long messageId, int buttonId, boolean allowWriteAccess) {
this.chatId = chatId;
this.messageId = messageId;
this.buttonId = buttonId;
this.allowWriteAccess = allowWriteAccess;
}
public GetLoginUrl(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
this.buttonId = input.readInt();
this.allowWriteAccess = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
output.writeInt(this.buttonId);
output.writeBoolean(this.allowWriteAccess);
}
}
public static class GetLoginUrlInfo extends Function {
public long chatId;
public long messageId;
public int buttonId;
public static final int CONSTRUCTOR = -980042966;
public GetLoginUrlInfo() {}
public GetLoginUrlInfo(long chatId, long messageId, int buttonId) {
this.chatId = chatId;
this.messageId = messageId;
this.buttonId = buttonId;
}
public GetLoginUrlInfo(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
this.buttonId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
output.writeInt(this.buttonId);
}
}
public static class GetMapThumbnailFile extends Function {
public Location location;
public int zoom;
public int width;
public int height;
public int scale;
public long chatId;
public static final int CONSTRUCTOR = -152660070;
public GetMapThumbnailFile() {}
public GetMapThumbnailFile(Location location, int zoom, int width, int height, int scale, long chatId) {
this.location = location;
this.zoom = zoom;
this.width = width;
this.height = height;
this.scale = scale;
this.chatId = chatId;
}
public GetMapThumbnailFile(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Location.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.location = new Location(input);
}
this.zoom = input.readInt();
this.width = input.readInt();
this.height = input.readInt();
this.scale = input.readInt();
this.chatId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.location == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.location.serialize(output);
}
output.writeInt(this.zoom);
output.writeInt(this.width);
output.writeInt(this.height);
output.writeInt(this.scale);
output.writeLong(this.chatId);
}
}
public static class GetMarkdownText extends Function {
public FormattedText text;
public static final int CONSTRUCTOR = 164524584;
public GetMarkdownText() {}
public GetMarkdownText(FormattedText text) {
this.text = text;
}
public GetMarkdownText(DataInput input) throws IOException {
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.text = new FormattedText(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
}
}
public static class GetMe extends Function {
public static final int CONSTRUCTOR = -191516033;
public GetMe() {}
public GetMe(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetMessage extends Function {
public long chatId;
public long messageId;
public static final int CONSTRUCTOR = -1821196160;
public GetMessage() {}
public GetMessage(long chatId, long messageId) {
this.chatId = chatId;
this.messageId = messageId;
}
public GetMessage(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
}
}
public static class GetMessageLink extends Function {
public long chatId;
public long messageId;
public static final int CONSTRUCTOR = 1362732326;
public GetMessageLink() {}
public GetMessageLink(long chatId, long messageId) {
this.chatId = chatId;
this.messageId = messageId;
}
public GetMessageLink(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
}
}
public static class GetMessageLinkInfo extends Function {
public String url;
public static final int CONSTRUCTOR = -700533672;
public GetMessageLinkInfo() {}
public GetMessageLinkInfo(String url) {
this.url = url;
}
public GetMessageLinkInfo(DataInput input) throws IOException {
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
}
}
public static class GetMessageLocally extends Function {
public long chatId;
public long messageId;
public static final int CONSTRUCTOR = -603575444;
public GetMessageLocally() {}
public GetMessageLocally(long chatId, long messageId) {
this.chatId = chatId;
this.messageId = messageId;
}
public GetMessageLocally(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
}
}
public static class GetMessages extends Function {
public long chatId;
public long[] messageIds;
public static final int CONSTRUCTOR = 425299338;
public GetMessages() {}
public GetMessages(long chatId, long[] messageIds) {
this.chatId = chatId;
this.messageIds = messageIds;
}
public GetMessages(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
this.messageIds = new long[input.readInt()];
for (int i = 0; i < this.messageIds.length; i++) {
this.messageIds[i] = input.readLong();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.messageIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.messageIds.length);
for (int i = 0; i < this.messageIds.length; i++) {
output.writeLong(this.messageIds[i]);
}
}
}
}
public static class GetNetworkStatistics extends Function {
public boolean onlyCurrent;
public static final int CONSTRUCTOR = -986228706;
public GetNetworkStatistics() {}
public GetNetworkStatistics(boolean onlyCurrent) {
this.onlyCurrent = onlyCurrent;
}
public GetNetworkStatistics(DataInput input) throws IOException {
this.onlyCurrent = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.onlyCurrent);
}
}
public static class GetOption extends Function {
public String name;
public static final int CONSTRUCTOR = -1572495746;
public GetOption() {}
public GetOption(String name) {
this.name = name;
}
public GetOption(DataInput input) throws IOException {
if (input.readBoolean()) {
var nameTmp = new byte[input.readInt()];
input.readFully(nameTmp);
this.name = new String(nameTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.name == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nameTmp = this.name.getBytes(StandardCharsets.UTF_8);
output.writeInt(nameTmp.length);
output.write(nameTmp);
}
}
}
public static class GetPassportAuthorizationForm extends Function {
public int botUserId;
public String scope;
public String publicKey;
public String nonce;
public static final int CONSTRUCTOR = -1468394095;
public GetPassportAuthorizationForm() {}
public GetPassportAuthorizationForm(int botUserId, String scope, String publicKey, String nonce) {
this.botUserId = botUserId;
this.scope = scope;
this.publicKey = publicKey;
this.nonce = nonce;
}
public GetPassportAuthorizationForm(DataInput input) throws IOException {
this.botUserId = input.readInt();
if (input.readBoolean()) {
var scopeTmp = new byte[input.readInt()];
input.readFully(scopeTmp);
this.scope = new String(scopeTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var publicKeyTmp = new byte[input.readInt()];
input.readFully(publicKeyTmp);
this.publicKey = new String(publicKeyTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var nonceTmp = new byte[input.readInt()];
input.readFully(nonceTmp);
this.nonce = new String(nonceTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.botUserId);
if (this.scope == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var scopeTmp = this.scope.getBytes(StandardCharsets.UTF_8);
output.writeInt(scopeTmp.length);
output.write(scopeTmp);
}
if (this.publicKey == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var publicKeyTmp = this.publicKey.getBytes(StandardCharsets.UTF_8);
output.writeInt(publicKeyTmp.length);
output.write(publicKeyTmp);
}
if (this.nonce == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nonceTmp = this.nonce.getBytes(StandardCharsets.UTF_8);
output.writeInt(nonceTmp.length);
output.write(nonceTmp);
}
}
}
public static class GetPassportAuthorizationFormAvailableElements extends Function {
public int autorizationFormId;
public String password;
public static final int CONSTRUCTOR = 1738134754;
public GetPassportAuthorizationFormAvailableElements() {}
public GetPassportAuthorizationFormAvailableElements(int autorizationFormId, String password) {
this.autorizationFormId = autorizationFormId;
this.password = password;
}
public GetPassportAuthorizationFormAvailableElements(DataInput input) throws IOException {
this.autorizationFormId = input.readInt();
if (input.readBoolean()) {
var passwordTmp = new byte[input.readInt()];
input.readFully(passwordTmp);
this.password = new String(passwordTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.autorizationFormId);
if (this.password == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var passwordTmp = this.password.getBytes(StandardCharsets.UTF_8);
output.writeInt(passwordTmp.length);
output.write(passwordTmp);
}
}
}
public static class GetPassportElement extends Function {
public PassportElementType type;
public String password;
public static final int CONSTRUCTOR = -1882398342;
public GetPassportElement() {}
public GetPassportElement(PassportElementType type, String password) {
this.type = type;
this.password = password;
}
public GetPassportElement(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case PassportElementTypePersonalDetails.CONSTRUCTOR:
this.type = new PassportElementTypePersonalDetails(input);
break;
case PassportElementTypePassport.CONSTRUCTOR:
this.type = new PassportElementTypePassport(input);
break;
case PassportElementTypeDriverLicense.CONSTRUCTOR:
this.type = new PassportElementTypeDriverLicense(input);
break;
case PassportElementTypeIdentityCard.CONSTRUCTOR:
this.type = new PassportElementTypeIdentityCard(input);
break;
case PassportElementTypeInternalPassport.CONSTRUCTOR:
this.type = new PassportElementTypeInternalPassport(input);
break;
case PassportElementTypeAddress.CONSTRUCTOR:
this.type = new PassportElementTypeAddress(input);
break;
case PassportElementTypeUtilityBill.CONSTRUCTOR:
this.type = new PassportElementTypeUtilityBill(input);
break;
case PassportElementTypeBankStatement.CONSTRUCTOR:
this.type = new PassportElementTypeBankStatement(input);
break;
case PassportElementTypeRentalAgreement.CONSTRUCTOR:
this.type = new PassportElementTypeRentalAgreement(input);
break;
case PassportElementTypePassportRegistration.CONSTRUCTOR:
this.type = new PassportElementTypePassportRegistration(input);
break;
case PassportElementTypeTemporaryRegistration.CONSTRUCTOR:
this.type = new PassportElementTypeTemporaryRegistration(input);
break;
case PassportElementTypePhoneNumber.CONSTRUCTOR:
this.type = new PassportElementTypePhoneNumber(input);
break;
case PassportElementTypeEmailAddress.CONSTRUCTOR:
this.type = new PassportElementTypeEmailAddress(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
var passwordTmp = new byte[input.readInt()];
input.readFully(passwordTmp);
this.password = new String(passwordTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
if (this.password == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var passwordTmp = this.password.getBytes(StandardCharsets.UTF_8);
output.writeInt(passwordTmp.length);
output.write(passwordTmp);
}
}
}
public static class GetPasswordState extends Function {
public static final int CONSTRUCTOR = -174752904;
public GetPasswordState() {}
public GetPasswordState(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetPaymentForm extends Function {
public long chatId;
public long messageId;
public static final int CONSTRUCTOR = -2146950882;
public GetPaymentForm() {}
public GetPaymentForm(long chatId, long messageId) {
this.chatId = chatId;
this.messageId = messageId;
}
public GetPaymentForm(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
}
}
public static class GetPaymentReceipt extends Function {
public long chatId;
public long messageId;
public static final int CONSTRUCTOR = 1013758294;
public GetPaymentReceipt() {}
public GetPaymentReceipt(long chatId, long messageId) {
this.chatId = chatId;
this.messageId = messageId;
}
public GetPaymentReceipt(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
}
}
public static class GetPollVoters extends Function {
public long chatId;
public long messageId;
public int optionId;
public int offset;
public int limit;
public static final int CONSTRUCTOR = 2075288734;
public GetPollVoters() {}
public GetPollVoters(long chatId, long messageId, int optionId, int offset, int limit) {
this.chatId = chatId;
this.messageId = messageId;
this.optionId = optionId;
this.offset = offset;
this.limit = limit;
}
public GetPollVoters(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
this.optionId = input.readInt();
this.offset = input.readInt();
this.limit = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
output.writeInt(this.optionId);
output.writeInt(this.offset);
output.writeInt(this.limit);
}
}
public static class GetPreferredCountryLanguage extends Function {
public String countryCode;
public static final int CONSTRUCTOR = -933049386;
public GetPreferredCountryLanguage() {}
public GetPreferredCountryLanguage(String countryCode) {
this.countryCode = countryCode;
}
public GetPreferredCountryLanguage(DataInput input) throws IOException {
if (input.readBoolean()) {
var countryCodeTmp = new byte[input.readInt()];
input.readFully(countryCodeTmp);
this.countryCode = new String(countryCodeTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.countryCode == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var countryCodeTmp = this.countryCode.getBytes(StandardCharsets.UTF_8);
output.writeInt(countryCodeTmp.length);
output.write(countryCodeTmp);
}
}
}
public static class GetProxies extends Function {
public static final int CONSTRUCTOR = -95026381;
public GetProxies() {}
public GetProxies(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetProxyLink extends Function {
public int proxyId;
public static final int CONSTRUCTOR = -1285597664;
public GetProxyLink() {}
public GetProxyLink(int proxyId) {
this.proxyId = proxyId;
}
public GetProxyLink(DataInput input) throws IOException {
this.proxyId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.proxyId);
}
}
public static class GetPublicMessageLink extends Function {
public long chatId;
public long messageId;
public boolean forAlbum;
public static final int CONSTRUCTOR = -374642839;
public GetPublicMessageLink() {}
public GetPublicMessageLink(long chatId, long messageId, boolean forAlbum) {
this.chatId = chatId;
this.messageId = messageId;
this.forAlbum = forAlbum;
}
public GetPublicMessageLink(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
this.forAlbum = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
output.writeBoolean(this.forAlbum);
}
}
public static class GetPushReceiverId extends Function {
public String payload;
public static final int CONSTRUCTOR = -286505294;
public GetPushReceiverId() {}
public GetPushReceiverId(String payload) {
this.payload = payload;
}
public GetPushReceiverId(DataInput input) throws IOException {
if (input.readBoolean()) {
var payloadTmp = new byte[input.readInt()];
input.readFully(payloadTmp);
this.payload = new String(payloadTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.payload == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var payloadTmp = this.payload.getBytes(StandardCharsets.UTF_8);
output.writeInt(payloadTmp.length);
output.write(payloadTmp);
}
}
}
public static class GetRecentInlineBots extends Function {
public static final int CONSTRUCTOR = 1437823548;
public GetRecentInlineBots() {}
public GetRecentInlineBots(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetRecentStickers extends Function {
public boolean isAttached;
public static final int CONSTRUCTOR = -579622241;
public GetRecentStickers() {}
public GetRecentStickers(boolean isAttached) {
this.isAttached = isAttached;
}
public GetRecentStickers(DataInput input) throws IOException {
this.isAttached = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isAttached);
}
}
public static class GetRecentlyVisitedTMeUrls extends Function {
public String referrer;
public static final int CONSTRUCTOR = 806754961;
public GetRecentlyVisitedTMeUrls() {}
public GetRecentlyVisitedTMeUrls(String referrer) {
this.referrer = referrer;
}
public GetRecentlyVisitedTMeUrls(DataInput input) throws IOException {
if (input.readBoolean()) {
var referrerTmp = new byte[input.readInt()];
input.readFully(referrerTmp);
this.referrer = new String(referrerTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.referrer == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var referrerTmp = this.referrer.getBytes(StandardCharsets.UTF_8);
output.writeInt(referrerTmp.length);
output.write(referrerTmp);
}
}
}
public static class GetRecoveryEmailAddress extends Function {
public String password;
public static final int CONSTRUCTOR = -1594770947;
public GetRecoveryEmailAddress() {}
public GetRecoveryEmailAddress(String password) {
this.password = password;
}
public GetRecoveryEmailAddress(DataInput input) throws IOException {
if (input.readBoolean()) {
var passwordTmp = new byte[input.readInt()];
input.readFully(passwordTmp);
this.password = new String(passwordTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.password == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var passwordTmp = this.password.getBytes(StandardCharsets.UTF_8);
output.writeInt(passwordTmp.length);
output.write(passwordTmp);
}
}
}
public static class GetRemoteFile extends Function {
public String remoteFileId;
public FileType fileType;
public static final int CONSTRUCTOR = 2137204530;
public GetRemoteFile() {}
public GetRemoteFile(String remoteFileId, FileType fileType) {
this.remoteFileId = remoteFileId;
this.fileType = fileType;
}
public GetRemoteFile(DataInput input) throws IOException {
if (input.readBoolean()) {
var remoteFileIdTmp = new byte[input.readInt()];
input.readFully(remoteFileIdTmp);
this.remoteFileId = new String(remoteFileIdTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case FileTypeNone.CONSTRUCTOR:
this.fileType = new FileTypeNone(input);
break;
case FileTypeAnimation.CONSTRUCTOR:
this.fileType = new FileTypeAnimation(input);
break;
case FileTypeAudio.CONSTRUCTOR:
this.fileType = new FileTypeAudio(input);
break;
case FileTypeDocument.CONSTRUCTOR:
this.fileType = new FileTypeDocument(input);
break;
case FileTypePhoto.CONSTRUCTOR:
this.fileType = new FileTypePhoto(input);
break;
case FileTypeProfilePhoto.CONSTRUCTOR:
this.fileType = new FileTypeProfilePhoto(input);
break;
case FileTypeSecret.CONSTRUCTOR:
this.fileType = new FileTypeSecret(input);
break;
case FileTypeSecretThumbnail.CONSTRUCTOR:
this.fileType = new FileTypeSecretThumbnail(input);
break;
case FileTypeSecure.CONSTRUCTOR:
this.fileType = new FileTypeSecure(input);
break;
case FileTypeSticker.CONSTRUCTOR:
this.fileType = new FileTypeSticker(input);
break;
case FileTypeThumbnail.CONSTRUCTOR:
this.fileType = new FileTypeThumbnail(input);
break;
case FileTypeUnknown.CONSTRUCTOR:
this.fileType = new FileTypeUnknown(input);
break;
case FileTypeVideo.CONSTRUCTOR:
this.fileType = new FileTypeVideo(input);
break;
case FileTypeVideoNote.CONSTRUCTOR:
this.fileType = new FileTypeVideoNote(input);
break;
case FileTypeVoiceNote.CONSTRUCTOR:
this.fileType = new FileTypeVoiceNote(input);
break;
case FileTypeWallpaper.CONSTRUCTOR:
this.fileType = new FileTypeWallpaper(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.remoteFileId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var remoteFileIdTmp = this.remoteFileId.getBytes(StandardCharsets.UTF_8);
output.writeInt(remoteFileIdTmp.length);
output.write(remoteFileIdTmp);
}
if (this.fileType == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.fileType.serialize(output);
}
}
}
public static class GetRepliedMessage extends Function {
public long chatId;
public long messageId;
public static final int CONSTRUCTOR = -641918531;
public GetRepliedMessage() {}
public GetRepliedMessage(long chatId, long messageId) {
this.chatId = chatId;
this.messageId = messageId;
}
public GetRepliedMessage(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
}
}
public static class GetSavedAnimations extends Function {
public static final int CONSTRUCTOR = 7051032;
public GetSavedAnimations() {}
public GetSavedAnimations(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetSavedOrderInfo extends Function {
public static final int CONSTRUCTOR = -1152016675;
public GetSavedOrderInfo() {}
public GetSavedOrderInfo(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetScopeNotificationSettings extends Function {
public NotificationSettingsScope scope;
public static final int CONSTRUCTOR = -995613361;
public GetScopeNotificationSettings() {}
public GetScopeNotificationSettings(NotificationSettingsScope scope) {
this.scope = scope;
}
public GetScopeNotificationSettings(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case NotificationSettingsScopePrivateChats.CONSTRUCTOR:
this.scope = new NotificationSettingsScopePrivateChats(input);
break;
case NotificationSettingsScopeGroupChats.CONSTRUCTOR:
this.scope = new NotificationSettingsScopeGroupChats(input);
break;
case NotificationSettingsScopeChannelChats.CONSTRUCTOR:
this.scope = new NotificationSettingsScopeChannelChats(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.scope == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.scope.serialize(output);
}
}
}
public static class GetSecretChat extends Function {
public int secretChatId;
public static final int CONSTRUCTOR = 40599169;
public GetSecretChat() {}
public GetSecretChat(int secretChatId) {
this.secretChatId = secretChatId;
}
public GetSecretChat(DataInput input) throws IOException {
this.secretChatId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.secretChatId);
}
}
public static class GetStickerEmojis extends Function {
public InputFile sticker;
public static final int CONSTRUCTOR = -1895508665;
public GetStickerEmojis() {}
public GetStickerEmojis(InputFile sticker) {
this.sticker = sticker;
}
public GetStickerEmojis(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.sticker = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.sticker = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.sticker = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.sticker = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.sticker == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.sticker.serialize(output);
}
}
}
public static class GetStickerSet extends Function {
public long setId;
public static final int CONSTRUCTOR = 1052318659;
public GetStickerSet() {}
public GetStickerSet(long setId) {
this.setId = setId;
}
public GetStickerSet(DataInput input) throws IOException {
this.setId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.setId);
}
}
public static class GetStickers extends Function {
public String emoji;
public int limit;
public static final int CONSTRUCTOR = -1594919556;
public GetStickers() {}
public GetStickers(String emoji, int limit) {
this.emoji = emoji;
this.limit = limit;
}
public GetStickers(DataInput input) throws IOException {
if (input.readBoolean()) {
var emojiTmp = new byte[input.readInt()];
input.readFully(emojiTmp);
this.emoji = new String(emojiTmp, StandardCharsets.UTF_8);
}
this.limit = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.emoji == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var emojiTmp = this.emoji.getBytes(StandardCharsets.UTF_8);
output.writeInt(emojiTmp.length);
output.write(emojiTmp);
}
output.writeInt(this.limit);
}
}
public static class GetStorageStatistics extends Function {
public int chatLimit;
public static final int CONSTRUCTOR = -853193929;
public GetStorageStatistics() {}
public GetStorageStatistics(int chatLimit) {
this.chatLimit = chatLimit;
}
public GetStorageStatistics(DataInput input) throws IOException {
this.chatLimit = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.chatLimit);
}
}
public static class GetStorageStatisticsFast extends Function {
public static final int CONSTRUCTOR = 61368066;
public GetStorageStatisticsFast() {}
public GetStorageStatisticsFast(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetSuitableDiscussionChats extends Function {
public static final int CONSTRUCTOR = 49044982;
public GetSuitableDiscussionChats() {}
public GetSuitableDiscussionChats(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetSupergroup extends Function {
public int supergroupId;
public static final int CONSTRUCTOR = -2063063706;
public GetSupergroup() {}
public GetSupergroup(int supergroupId) {
this.supergroupId = supergroupId;
}
public GetSupergroup(DataInput input) throws IOException {
this.supergroupId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.supergroupId);
}
}
public static class GetSupergroupFullInfo extends Function {
public int supergroupId;
public static final int CONSTRUCTOR = -1150331262;
public GetSupergroupFullInfo() {}
public GetSupergroupFullInfo(int supergroupId) {
this.supergroupId = supergroupId;
}
public GetSupergroupFullInfo(DataInput input) throws IOException {
this.supergroupId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.supergroupId);
}
}
public static class GetSupergroupMembers extends Function {
public int supergroupId;
public SupergroupMembersFilter filter;
public int offset;
public int limit;
public static final int CONSTRUCTOR = 1427643098;
public GetSupergroupMembers() {}
public GetSupergroupMembers(int supergroupId, SupergroupMembersFilter filter, int offset, int limit) {
this.supergroupId = supergroupId;
this.filter = filter;
this.offset = offset;
this.limit = limit;
}
public GetSupergroupMembers(DataInput input) throws IOException {
this.supergroupId = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case SupergroupMembersFilterRecent.CONSTRUCTOR:
this.filter = new SupergroupMembersFilterRecent(input);
break;
case SupergroupMembersFilterContacts.CONSTRUCTOR:
this.filter = new SupergroupMembersFilterContacts(input);
break;
case SupergroupMembersFilterAdministrators.CONSTRUCTOR:
this.filter = new SupergroupMembersFilterAdministrators(input);
break;
case SupergroupMembersFilterSearch.CONSTRUCTOR:
this.filter = new SupergroupMembersFilterSearch(input);
break;
case SupergroupMembersFilterRestricted.CONSTRUCTOR:
this.filter = new SupergroupMembersFilterRestricted(input);
break;
case SupergroupMembersFilterBanned.CONSTRUCTOR:
this.filter = new SupergroupMembersFilterBanned(input);
break;
case SupergroupMembersFilterBots.CONSTRUCTOR:
this.filter = new SupergroupMembersFilterBots(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.offset = input.readInt();
this.limit = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.supergroupId);
if (this.filter == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.filter.serialize(output);
}
output.writeInt(this.offset);
output.writeInt(this.limit);
}
}
public static class GetSupportUser extends Function {
public static final int CONSTRUCTOR = -1733497700;
public GetSupportUser() {}
public GetSupportUser(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetTemporaryPasswordState extends Function {
public static final int CONSTRUCTOR = -12670830;
public GetTemporaryPasswordState() {}
public GetTemporaryPasswordState(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class GetTextEntities extends Function {
public String text;
public static final int CONSTRUCTOR = -341490693;
public GetTextEntities() {}
public GetTextEntities(String text) {
this.text = text;
}
public GetTextEntities(DataInput input) throws IOException {
if (input.readBoolean()) {
var textTmp = new byte[input.readInt()];
input.readFully(textTmp);
this.text = new String(textTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var textTmp = this.text.getBytes(StandardCharsets.UTF_8);
output.writeInt(textTmp.length);
output.write(textTmp);
}
}
}
public static class GetTopChats extends Function {
public TopChatCategory category;
public int limit;
public static final int CONSTRUCTOR = -388410847;
public GetTopChats() {}
public GetTopChats(TopChatCategory category, int limit) {
this.category = category;
this.limit = limit;
}
public GetTopChats(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case TopChatCategoryUsers.CONSTRUCTOR:
this.category = new TopChatCategoryUsers(input);
break;
case TopChatCategoryBots.CONSTRUCTOR:
this.category = new TopChatCategoryBots(input);
break;
case TopChatCategoryGroups.CONSTRUCTOR:
this.category = new TopChatCategoryGroups(input);
break;
case TopChatCategoryChannels.CONSTRUCTOR:
this.category = new TopChatCategoryChannels(input);
break;
case TopChatCategoryInlineBots.CONSTRUCTOR:
this.category = new TopChatCategoryInlineBots(input);
break;
case TopChatCategoryCalls.CONSTRUCTOR:
this.category = new TopChatCategoryCalls(input);
break;
case TopChatCategoryForwardChats.CONSTRUCTOR:
this.category = new TopChatCategoryForwardChats(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.limit = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.category == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.category.serialize(output);
}
output.writeInt(this.limit);
}
}
public static class GetTrendingStickerSets extends Function {
public int offset;
public int limit;
public static final int CONSTRUCTOR = -1494581948;
public GetTrendingStickerSets() {}
public GetTrendingStickerSets(int offset, int limit) {
this.offset = offset;
this.limit = limit;
}
public GetTrendingStickerSets(DataInput input) throws IOException {
this.offset = input.readInt();
this.limit = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.offset);
output.writeInt(this.limit);
}
}
public static class GetUser extends Function {
public int userId;
public static final int CONSTRUCTOR = -47586017;
public GetUser() {}
public GetUser(int userId) {
this.userId = userId;
}
public GetUser(DataInput input) throws IOException {
this.userId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
}
}
public static class GetUserFullInfo extends Function {
public int userId;
public static final int CONSTRUCTOR = -655443263;
public GetUserFullInfo() {}
public GetUserFullInfo(int userId) {
this.userId = userId;
}
public GetUserFullInfo(DataInput input) throws IOException {
this.userId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
}
}
public static class GetUserPrivacySettingRules extends Function {
public UserPrivacySetting setting;
public static final int CONSTRUCTOR = -2077223311;
public GetUserPrivacySettingRules() {}
public GetUserPrivacySettingRules(UserPrivacySetting setting) {
this.setting = setting;
}
public GetUserPrivacySettingRules(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case UserPrivacySettingShowStatus.CONSTRUCTOR:
this.setting = new UserPrivacySettingShowStatus(input);
break;
case UserPrivacySettingShowProfilePhoto.CONSTRUCTOR:
this.setting = new UserPrivacySettingShowProfilePhoto(input);
break;
case UserPrivacySettingShowLinkInForwardedMessages.CONSTRUCTOR:
this.setting = new UserPrivacySettingShowLinkInForwardedMessages(input);
break;
case UserPrivacySettingShowPhoneNumber.CONSTRUCTOR:
this.setting = new UserPrivacySettingShowPhoneNumber(input);
break;
case UserPrivacySettingAllowChatInvites.CONSTRUCTOR:
this.setting = new UserPrivacySettingAllowChatInvites(input);
break;
case UserPrivacySettingAllowCalls.CONSTRUCTOR:
this.setting = new UserPrivacySettingAllowCalls(input);
break;
case UserPrivacySettingAllowPeerToPeerCalls.CONSTRUCTOR:
this.setting = new UserPrivacySettingAllowPeerToPeerCalls(input);
break;
case UserPrivacySettingAllowFindingByPhoneNumber.CONSTRUCTOR:
this.setting = new UserPrivacySettingAllowFindingByPhoneNumber(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.setting == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.setting.serialize(output);
}
}
}
public static class GetUserProfilePhotos extends Function {
public int userId;
public int offset;
public int limit;
public static final int CONSTRUCTOR = -2062927433;
public GetUserProfilePhotos() {}
public GetUserProfilePhotos(int userId, int offset, int limit) {
this.userId = userId;
this.offset = offset;
this.limit = limit;
}
public GetUserProfilePhotos(DataInput input) throws IOException {
this.userId = input.readInt();
this.offset = input.readInt();
this.limit = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
output.writeInt(this.offset);
output.writeInt(this.limit);
}
}
public static class GetWebPageInstantView extends Function {
public String url;
public boolean forceFull;
public static final int CONSTRUCTOR = -1962649975;
public GetWebPageInstantView() {}
public GetWebPageInstantView(String url, boolean forceFull) {
this.url = url;
this.forceFull = forceFull;
}
public GetWebPageInstantView(DataInput input) throws IOException {
if (input.readBoolean()) {
var urlTmp = new byte[input.readInt()];
input.readFully(urlTmp);
this.url = new String(urlTmp, StandardCharsets.UTF_8);
}
this.forceFull = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.url == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var urlTmp = this.url.getBytes(StandardCharsets.UTF_8);
output.writeInt(urlTmp.length);
output.write(urlTmp);
}
output.writeBoolean(this.forceFull);
}
}
public static class GetWebPagePreview extends Function {
public FormattedText text;
public static final int CONSTRUCTOR = 573441580;
public GetWebPagePreview() {}
public GetWebPagePreview(FormattedText text) {
this.text = text;
}
public GetWebPagePreview(DataInput input) throws IOException {
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.text = new FormattedText(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
}
}
public static class ImportContacts extends Function {
public Contact[] contacts;
public static final int CONSTRUCTOR = -215132767;
public ImportContacts() {}
public ImportContacts(Contact[] contacts) {
this.contacts = contacts;
}
public ImportContacts(DataInput input) throws IOException {
if (input.readBoolean()) {
this.contacts = new Contact[input.readInt()];
for (int i = 0; i < this.contacts.length; i++) {
if (Contact.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.contacts[i] = new Contact(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.contacts == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.contacts.length);
for (int i = 0; i < this.contacts.length; i++) {
this.contacts[i].serialize(output);
}
}
}
}
public static class JoinChat extends Function {
public long chatId;
public static final int CONSTRUCTOR = 326769313;
public JoinChat() {}
public JoinChat(long chatId) {
this.chatId = chatId;
}
public JoinChat(DataInput input) throws IOException {
this.chatId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
}
}
public static class JoinChatByInviteLink extends Function {
public String inviteLink;
public static final int CONSTRUCTOR = -1049973882;
public JoinChatByInviteLink() {}
public JoinChatByInviteLink(String inviteLink) {
this.inviteLink = inviteLink;
}
public JoinChatByInviteLink(DataInput input) throws IOException {
if (input.readBoolean()) {
var inviteLinkTmp = new byte[input.readInt()];
input.readFully(inviteLinkTmp);
this.inviteLink = new String(inviteLinkTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.inviteLink == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var inviteLinkTmp = this.inviteLink.getBytes(StandardCharsets.UTF_8);
output.writeInt(inviteLinkTmp.length);
output.write(inviteLinkTmp);
}
}
}
public static class LeaveChat extends Function {
public long chatId;
public static final int CONSTRUCTOR = -1825080735;
public LeaveChat() {}
public LeaveChat(long chatId) {
this.chatId = chatId;
}
public LeaveChat(DataInput input) throws IOException {
this.chatId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
}
}
public static class LogOut extends Function {
public static final int CONSTRUCTOR = -1581923301;
public LogOut() {}
public LogOut(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class OpenChat extends Function {
public long chatId;
public static final int CONSTRUCTOR = -323371509;
public OpenChat() {}
public OpenChat(long chatId) {
this.chatId = chatId;
}
public OpenChat(DataInput input) throws IOException {
this.chatId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
}
}
public static class OpenMessageContent extends Function {
public long chatId;
public long messageId;
public static final int CONSTRUCTOR = -739088005;
public OpenMessageContent() {}
public OpenMessageContent(long chatId, long messageId) {
this.chatId = chatId;
this.messageId = messageId;
}
public OpenMessageContent(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
}
}
public static class OptimizeStorage extends Function {
public long size;
public int ttl;
public int count;
public int immunityDelay;
public FileType[] fileTypes;
public long[] chatIds;
public long[] excludeChatIds;
public boolean returnDeletedFileStatistics;
public int chatLimit;
public static final int CONSTRUCTOR = 853186759;
public OptimizeStorage() {}
public OptimizeStorage(long size, int ttl, int count, int immunityDelay, FileType[] fileTypes, long[] chatIds, long[] excludeChatIds, boolean returnDeletedFileStatistics, int chatLimit) {
this.size = size;
this.ttl = ttl;
this.count = count;
this.immunityDelay = immunityDelay;
this.fileTypes = fileTypes;
this.chatIds = chatIds;
this.excludeChatIds = excludeChatIds;
this.returnDeletedFileStatistics = returnDeletedFileStatistics;
this.chatLimit = chatLimit;
}
public OptimizeStorage(DataInput input) throws IOException {
this.size = input.readLong();
this.ttl = input.readInt();
this.count = input.readInt();
this.immunityDelay = input.readInt();
if (input.readBoolean()) {
this.fileTypes = new FileType[input.readInt()];
for (int i = 0; i < this.fileTypes.length; i++) {
switch(input.readInt()) {
case FileTypeNone.CONSTRUCTOR:
this.fileTypes[i] = new FileTypeNone(input);
break;
case FileTypeAnimation.CONSTRUCTOR:
this.fileTypes[i] = new FileTypeAnimation(input);
break;
case FileTypeAudio.CONSTRUCTOR:
this.fileTypes[i] = new FileTypeAudio(input);
break;
case FileTypeDocument.CONSTRUCTOR:
this.fileTypes[i] = new FileTypeDocument(input);
break;
case FileTypePhoto.CONSTRUCTOR:
this.fileTypes[i] = new FileTypePhoto(input);
break;
case FileTypeProfilePhoto.CONSTRUCTOR:
this.fileTypes[i] = new FileTypeProfilePhoto(input);
break;
case FileTypeSecret.CONSTRUCTOR:
this.fileTypes[i] = new FileTypeSecret(input);
break;
case FileTypeSecretThumbnail.CONSTRUCTOR:
this.fileTypes[i] = new FileTypeSecretThumbnail(input);
break;
case FileTypeSecure.CONSTRUCTOR:
this.fileTypes[i] = new FileTypeSecure(input);
break;
case FileTypeSticker.CONSTRUCTOR:
this.fileTypes[i] = new FileTypeSticker(input);
break;
case FileTypeThumbnail.CONSTRUCTOR:
this.fileTypes[i] = new FileTypeThumbnail(input);
break;
case FileTypeUnknown.CONSTRUCTOR:
this.fileTypes[i] = new FileTypeUnknown(input);
break;
case FileTypeVideo.CONSTRUCTOR:
this.fileTypes[i] = new FileTypeVideo(input);
break;
case FileTypeVideoNote.CONSTRUCTOR:
this.fileTypes[i] = new FileTypeVideoNote(input);
break;
case FileTypeVoiceNote.CONSTRUCTOR:
this.fileTypes[i] = new FileTypeVoiceNote(input);
break;
case FileTypeWallpaper.CONSTRUCTOR:
this.fileTypes[i] = new FileTypeWallpaper(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
if (input.readBoolean()) {
this.chatIds = new long[input.readInt()];
for (int i = 0; i < this.chatIds.length; i++) {
this.chatIds[i] = input.readLong();
}
}
if (input.readBoolean()) {
this.excludeChatIds = new long[input.readInt()];
for (int i = 0; i < this.excludeChatIds.length; i++) {
this.excludeChatIds[i] = input.readLong();
}
}
this.returnDeletedFileStatistics = input.readBoolean();
this.chatLimit = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.size);
output.writeInt(this.ttl);
output.writeInt(this.count);
output.writeInt(this.immunityDelay);
if (this.fileTypes == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.fileTypes.length);
for (int i = 0; i < this.fileTypes.length; i++) {
this.fileTypes[i].serialize(output);
}
}
if (this.chatIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.chatIds.length);
for (int i = 0; i < this.chatIds.length; i++) {
output.writeLong(this.chatIds[i]);
}
}
if (this.excludeChatIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.excludeChatIds.length);
for (int i = 0; i < this.excludeChatIds.length; i++) {
output.writeLong(this.excludeChatIds[i]);
}
}
output.writeBoolean(this.returnDeletedFileStatistics);
output.writeInt(this.chatLimit);
}
}
public static class ParseMarkdown extends Function {
public FormattedText text;
public static final int CONSTRUCTOR = 756366063;
public ParseMarkdown() {}
public ParseMarkdown(FormattedText text) {
this.text = text;
}
public ParseMarkdown(DataInput input) throws IOException {
if (input.readBoolean()) {
if (FormattedText.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.text = new FormattedText(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.text.serialize(output);
}
}
}
public static class ParseTextEntities extends Function {
public String text;
public TextParseMode parseMode;
public static final int CONSTRUCTOR = -1709194593;
public ParseTextEntities() {}
public ParseTextEntities(String text, TextParseMode parseMode) {
this.text = text;
this.parseMode = parseMode;
}
public ParseTextEntities(DataInput input) throws IOException {
if (input.readBoolean()) {
var textTmp = new byte[input.readInt()];
input.readFully(textTmp);
this.text = new String(textTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case TextParseModeMarkdown.CONSTRUCTOR:
this.parseMode = new TextParseModeMarkdown(input);
break;
case TextParseModeHTML.CONSTRUCTOR:
this.parseMode = new TextParseModeHTML(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var textTmp = this.text.getBytes(StandardCharsets.UTF_8);
output.writeInt(textTmp.length);
output.write(textTmp);
}
if (this.parseMode == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.parseMode.serialize(output);
}
}
}
public static class PinChatMessage extends Function {
public long chatId;
public long messageId;
public boolean disableNotification;
public static final int CONSTRUCTOR = -554712351;
public PinChatMessage() {}
public PinChatMessage(long chatId, long messageId, boolean disableNotification) {
this.chatId = chatId;
this.messageId = messageId;
this.disableNotification = disableNotification;
}
public PinChatMessage(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
this.disableNotification = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
output.writeBoolean(this.disableNotification);
}
}
public static class PingProxy extends Function {
public int proxyId;
public static final int CONSTRUCTOR = -979681103;
public PingProxy() {}
public PingProxy(int proxyId) {
this.proxyId = proxyId;
}
public PingProxy(DataInput input) throws IOException {
this.proxyId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.proxyId);
}
}
public static class ProcessPushNotification extends Function {
public String payload;
public static final int CONSTRUCTOR = 786679952;
public ProcessPushNotification() {}
public ProcessPushNotification(String payload) {
this.payload = payload;
}
public ProcessPushNotification(DataInput input) throws IOException {
if (input.readBoolean()) {
var payloadTmp = new byte[input.readInt()];
input.readFully(payloadTmp);
this.payload = new String(payloadTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.payload == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var payloadTmp = this.payload.getBytes(StandardCharsets.UTF_8);
output.writeInt(payloadTmp.length);
output.write(payloadTmp);
}
}
}
public static class ReadAllChatMentions extends Function {
public long chatId;
public static final int CONSTRUCTOR = 1357558453;
public ReadAllChatMentions() {}
public ReadAllChatMentions(long chatId) {
this.chatId = chatId;
}
public ReadAllChatMentions(DataInput input) throws IOException {
this.chatId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
}
}
public static class ReadFilePart extends Function {
public int fileId;
public int offset;
public int count;
public static final int CONSTRUCTOR = -407749314;
public ReadFilePart() {}
public ReadFilePart(int fileId, int offset, int count) {
this.fileId = fileId;
this.offset = offset;
this.count = count;
}
public ReadFilePart(DataInput input) throws IOException {
this.fileId = input.readInt();
this.offset = input.readInt();
this.count = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.fileId);
output.writeInt(this.offset);
output.writeInt(this.count);
}
}
public static class RecoverAuthenticationPassword extends Function {
public String recoveryCode;
public static final int CONSTRUCTOR = 787436412;
public RecoverAuthenticationPassword() {}
public RecoverAuthenticationPassword(String recoveryCode) {
this.recoveryCode = recoveryCode;
}
public RecoverAuthenticationPassword(DataInput input) throws IOException {
if (input.readBoolean()) {
var recoveryCodeTmp = new byte[input.readInt()];
input.readFully(recoveryCodeTmp);
this.recoveryCode = new String(recoveryCodeTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.recoveryCode == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var recoveryCodeTmp = this.recoveryCode.getBytes(StandardCharsets.UTF_8);
output.writeInt(recoveryCodeTmp.length);
output.write(recoveryCodeTmp);
}
}
}
public static class RecoverPassword extends Function {
public String recoveryCode;
public static final int CONSTRUCTOR = 1660185903;
public RecoverPassword() {}
public RecoverPassword(String recoveryCode) {
this.recoveryCode = recoveryCode;
}
public RecoverPassword(DataInput input) throws IOException {
if (input.readBoolean()) {
var recoveryCodeTmp = new byte[input.readInt()];
input.readFully(recoveryCodeTmp);
this.recoveryCode = new String(recoveryCodeTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.recoveryCode == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var recoveryCodeTmp = this.recoveryCode.getBytes(StandardCharsets.UTF_8);
output.writeInt(recoveryCodeTmp.length);
output.write(recoveryCodeTmp);
}
}
}
public static class RegisterDevice extends Function {
public DeviceToken deviceToken;
public int[] otherUserIds;
public static final int CONSTRUCTOR = 1734127493;
public RegisterDevice() {}
public RegisterDevice(DeviceToken deviceToken, int[] otherUserIds) {
this.deviceToken = deviceToken;
this.otherUserIds = otherUserIds;
}
public RegisterDevice(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case DeviceTokenFirebaseCloudMessaging.CONSTRUCTOR:
this.deviceToken = new DeviceTokenFirebaseCloudMessaging(input);
break;
case DeviceTokenApplePush.CONSTRUCTOR:
this.deviceToken = new DeviceTokenApplePush(input);
break;
case DeviceTokenApplePushVoIP.CONSTRUCTOR:
this.deviceToken = new DeviceTokenApplePushVoIP(input);
break;
case DeviceTokenWindowsPush.CONSTRUCTOR:
this.deviceToken = new DeviceTokenWindowsPush(input);
break;
case DeviceTokenMicrosoftPush.CONSTRUCTOR:
this.deviceToken = new DeviceTokenMicrosoftPush(input);
break;
case DeviceTokenMicrosoftPushVoIP.CONSTRUCTOR:
this.deviceToken = new DeviceTokenMicrosoftPushVoIP(input);
break;
case DeviceTokenWebPush.CONSTRUCTOR:
this.deviceToken = new DeviceTokenWebPush(input);
break;
case DeviceTokenSimplePush.CONSTRUCTOR:
this.deviceToken = new DeviceTokenSimplePush(input);
break;
case DeviceTokenUbuntuPush.CONSTRUCTOR:
this.deviceToken = new DeviceTokenUbuntuPush(input);
break;
case DeviceTokenBlackBerryPush.CONSTRUCTOR:
this.deviceToken = new DeviceTokenBlackBerryPush(input);
break;
case DeviceTokenTizenPush.CONSTRUCTOR:
this.deviceToken = new DeviceTokenTizenPush(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
this.otherUserIds = new int[input.readInt()];
for (int i = 0; i < this.otherUserIds.length; i++) {
this.otherUserIds[i] = input.readInt();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.deviceToken == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.deviceToken.serialize(output);
}
if (this.otherUserIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.otherUserIds.length);
for (int i = 0; i < this.otherUserIds.length; i++) {
output.writeInt(this.otherUserIds[i]);
}
}
}
}
public static class RegisterUser extends Function {
public String firstName;
public String lastName;
public static final int CONSTRUCTOR = -109994467;
public RegisterUser() {}
public RegisterUser(String firstName, String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
public RegisterUser(DataInput input) throws IOException {
if (input.readBoolean()) {
var firstNameTmp = new byte[input.readInt()];
input.readFully(firstNameTmp);
this.firstName = new String(firstNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var lastNameTmp = new byte[input.readInt()];
input.readFully(lastNameTmp);
this.lastName = new String(lastNameTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.firstName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var firstNameTmp = this.firstName.getBytes(StandardCharsets.UTF_8);
output.writeInt(firstNameTmp.length);
output.write(firstNameTmp);
}
if (this.lastName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var lastNameTmp = this.lastName.getBytes(StandardCharsets.UTF_8);
output.writeInt(lastNameTmp.length);
output.write(lastNameTmp);
}
}
}
public static class RemoveBackground extends Function {
public long backgroundId;
public static final int CONSTRUCTOR = -1484545642;
public RemoveBackground() {}
public RemoveBackground(long backgroundId) {
this.backgroundId = backgroundId;
}
public RemoveBackground(DataInput input) throws IOException {
this.backgroundId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.backgroundId);
}
}
public static class RemoveChatActionBar extends Function {
public long chatId;
public static final int CONSTRUCTOR = -1650968070;
public RemoveChatActionBar() {}
public RemoveChatActionBar(long chatId) {
this.chatId = chatId;
}
public RemoveChatActionBar(DataInput input) throws IOException {
this.chatId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
}
}
public static class RemoveContacts extends Function {
public int[] userIds;
public static final int CONSTRUCTOR = -615510759;
public RemoveContacts() {}
public RemoveContacts(int[] userIds) {
this.userIds = userIds;
}
public RemoveContacts(DataInput input) throws IOException {
if (input.readBoolean()) {
this.userIds = new int[input.readInt()];
for (int i = 0; i < this.userIds.length; i++) {
this.userIds[i] = input.readInt();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.userIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.userIds.length);
for (int i = 0; i < this.userIds.length; i++) {
output.writeInt(this.userIds[i]);
}
}
}
}
public static class RemoveFavoriteSticker extends Function {
public InputFile sticker;
public static final int CONSTRUCTOR = 1152945264;
public RemoveFavoriteSticker() {}
public RemoveFavoriteSticker(InputFile sticker) {
this.sticker = sticker;
}
public RemoveFavoriteSticker(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.sticker = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.sticker = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.sticker = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.sticker = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.sticker == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.sticker.serialize(output);
}
}
}
public static class RemoveNotification extends Function {
public int notificationGroupId;
public int notificationId;
public static final int CONSTRUCTOR = 862630734;
public RemoveNotification() {}
public RemoveNotification(int notificationGroupId, int notificationId) {
this.notificationGroupId = notificationGroupId;
this.notificationId = notificationId;
}
public RemoveNotification(DataInput input) throws IOException {
this.notificationGroupId = input.readInt();
this.notificationId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.notificationGroupId);
output.writeInt(this.notificationId);
}
}
public static class RemoveNotificationGroup extends Function {
public int notificationGroupId;
public int maxNotificationId;
public static final int CONSTRUCTOR = 1713005454;
public RemoveNotificationGroup() {}
public RemoveNotificationGroup(int notificationGroupId, int maxNotificationId) {
this.notificationGroupId = notificationGroupId;
this.maxNotificationId = maxNotificationId;
}
public RemoveNotificationGroup(DataInput input) throws IOException {
this.notificationGroupId = input.readInt();
this.maxNotificationId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.notificationGroupId);
output.writeInt(this.maxNotificationId);
}
}
public static class RemoveProxy extends Function {
public int proxyId;
public static final int CONSTRUCTOR = 1369219847;
public RemoveProxy() {}
public RemoveProxy(int proxyId) {
this.proxyId = proxyId;
}
public RemoveProxy(DataInput input) throws IOException {
this.proxyId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.proxyId);
}
}
public static class RemoveRecentHashtag extends Function {
public String hashtag;
public static final int CONSTRUCTOR = -1013735260;
public RemoveRecentHashtag() {}
public RemoveRecentHashtag(String hashtag) {
this.hashtag = hashtag;
}
public RemoveRecentHashtag(DataInput input) throws IOException {
if (input.readBoolean()) {
var hashtagTmp = new byte[input.readInt()];
input.readFully(hashtagTmp);
this.hashtag = new String(hashtagTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.hashtag == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var hashtagTmp = this.hashtag.getBytes(StandardCharsets.UTF_8);
output.writeInt(hashtagTmp.length);
output.write(hashtagTmp);
}
}
}
public static class RemoveRecentSticker extends Function {
public boolean isAttached;
public InputFile sticker;
public static final int CONSTRUCTOR = 1246577677;
public RemoveRecentSticker() {}
public RemoveRecentSticker(boolean isAttached, InputFile sticker) {
this.isAttached = isAttached;
this.sticker = sticker;
}
public RemoveRecentSticker(DataInput input) throws IOException {
this.isAttached = input.readBoolean();
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.sticker = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.sticker = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.sticker = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.sticker = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isAttached);
if (this.sticker == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.sticker.serialize(output);
}
}
}
public static class RemoveRecentlyFoundChat extends Function {
public long chatId;
public static final int CONSTRUCTOR = 717340444;
public RemoveRecentlyFoundChat() {}
public RemoveRecentlyFoundChat(long chatId) {
this.chatId = chatId;
}
public RemoveRecentlyFoundChat(DataInput input) throws IOException {
this.chatId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
}
}
public static class RemoveSavedAnimation extends Function {
public InputFile animation;
public static final int CONSTRUCTOR = -495605479;
public RemoveSavedAnimation() {}
public RemoveSavedAnimation(InputFile animation) {
this.animation = animation;
}
public RemoveSavedAnimation(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.animation = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.animation = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.animation = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.animation = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.animation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.animation.serialize(output);
}
}
}
public static class RemoveStickerFromSet extends Function {
public InputFile sticker;
public static final int CONSTRUCTOR = 1642196644;
public RemoveStickerFromSet() {}
public RemoveStickerFromSet(InputFile sticker) {
this.sticker = sticker;
}
public RemoveStickerFromSet(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.sticker = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.sticker = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.sticker = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.sticker = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.sticker == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.sticker.serialize(output);
}
}
}
public static class RemoveTopChat extends Function {
public TopChatCategory category;
public long chatId;
public static final int CONSTRUCTOR = -1907876267;
public RemoveTopChat() {}
public RemoveTopChat(TopChatCategory category, long chatId) {
this.category = category;
this.chatId = chatId;
}
public RemoveTopChat(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case TopChatCategoryUsers.CONSTRUCTOR:
this.category = new TopChatCategoryUsers(input);
break;
case TopChatCategoryBots.CONSTRUCTOR:
this.category = new TopChatCategoryBots(input);
break;
case TopChatCategoryGroups.CONSTRUCTOR:
this.category = new TopChatCategoryGroups(input);
break;
case TopChatCategoryChannels.CONSTRUCTOR:
this.category = new TopChatCategoryChannels(input);
break;
case TopChatCategoryInlineBots.CONSTRUCTOR:
this.category = new TopChatCategoryInlineBots(input);
break;
case TopChatCategoryCalls.CONSTRUCTOR:
this.category = new TopChatCategoryCalls(input);
break;
case TopChatCategoryForwardChats.CONSTRUCTOR:
this.category = new TopChatCategoryForwardChats(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.chatId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.category == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.category.serialize(output);
}
output.writeLong(this.chatId);
}
}
public static class ReorderInstalledStickerSets extends Function {
public boolean isMasks;
public long[] stickerSetIds;
public static final int CONSTRUCTOR = 1114537563;
public ReorderInstalledStickerSets() {}
public ReorderInstalledStickerSets(boolean isMasks, long[] stickerSetIds) {
this.isMasks = isMasks;
this.stickerSetIds = stickerSetIds;
}
public ReorderInstalledStickerSets(DataInput input) throws IOException {
this.isMasks = input.readBoolean();
if (input.readBoolean()) {
this.stickerSetIds = new long[input.readInt()];
for (int i = 0; i < this.stickerSetIds.length; i++) {
this.stickerSetIds[i] = input.readLong();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isMasks);
if (this.stickerSetIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.stickerSetIds.length);
for (int i = 0; i < this.stickerSetIds.length; i++) {
output.writeLong(this.stickerSetIds[i]);
}
}
}
}
public static class ReportChat extends Function {
public long chatId;
public ChatReportReason reason;
public long[] messageIds;
public static final int CONSTRUCTOR = -312579772;
public ReportChat() {}
public ReportChat(long chatId, ChatReportReason reason, long[] messageIds) {
this.chatId = chatId;
this.reason = reason;
this.messageIds = messageIds;
}
public ReportChat(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatReportReasonSpam.CONSTRUCTOR:
this.reason = new ChatReportReasonSpam(input);
break;
case ChatReportReasonViolence.CONSTRUCTOR:
this.reason = new ChatReportReasonViolence(input);
break;
case ChatReportReasonPornography.CONSTRUCTOR:
this.reason = new ChatReportReasonPornography(input);
break;
case ChatReportReasonChildAbuse.CONSTRUCTOR:
this.reason = new ChatReportReasonChildAbuse(input);
break;
case ChatReportReasonCopyright.CONSTRUCTOR:
this.reason = new ChatReportReasonCopyright(input);
break;
case ChatReportReasonUnrelatedLocation.CONSTRUCTOR:
this.reason = new ChatReportReasonUnrelatedLocation(input);
break;
case ChatReportReasonCustom.CONSTRUCTOR:
this.reason = new ChatReportReasonCustom(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
this.messageIds = new long[input.readInt()];
for (int i = 0; i < this.messageIds.length; i++) {
this.messageIds[i] = input.readLong();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.reason == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.reason.serialize(output);
}
if (this.messageIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.messageIds.length);
for (int i = 0; i < this.messageIds.length; i++) {
output.writeLong(this.messageIds[i]);
}
}
}
}
public static class ReportSupergroupSpam extends Function {
public int supergroupId;
public int userId;
public long[] messageIds;
public static final int CONSTRUCTOR = -2125451498;
public ReportSupergroupSpam() {}
public ReportSupergroupSpam(int supergroupId, int userId, long[] messageIds) {
this.supergroupId = supergroupId;
this.userId = userId;
this.messageIds = messageIds;
}
public ReportSupergroupSpam(DataInput input) throws IOException {
this.supergroupId = input.readInt();
this.userId = input.readInt();
if (input.readBoolean()) {
this.messageIds = new long[input.readInt()];
for (int i = 0; i < this.messageIds.length; i++) {
this.messageIds[i] = input.readLong();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.supergroupId);
output.writeInt(this.userId);
if (this.messageIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.messageIds.length);
for (int i = 0; i < this.messageIds.length; i++) {
output.writeLong(this.messageIds[i]);
}
}
}
}
public static class RequestAuthenticationPasswordRecovery extends Function {
public static final int CONSTRUCTOR = 1393896118;
public RequestAuthenticationPasswordRecovery() {}
public RequestAuthenticationPasswordRecovery(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class RequestPasswordRecovery extends Function {
public static final int CONSTRUCTOR = -13777582;
public RequestPasswordRecovery() {}
public RequestPasswordRecovery(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class RequestQrCodeAuthentication extends Function {
public int[] otherUserIds;
public static final int CONSTRUCTOR = -104224560;
public RequestQrCodeAuthentication() {}
public RequestQrCodeAuthentication(int[] otherUserIds) {
this.otherUserIds = otherUserIds;
}
public RequestQrCodeAuthentication(DataInput input) throws IOException {
if (input.readBoolean()) {
this.otherUserIds = new int[input.readInt()];
for (int i = 0; i < this.otherUserIds.length; i++) {
this.otherUserIds[i] = input.readInt();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.otherUserIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.otherUserIds.length);
for (int i = 0; i < this.otherUserIds.length; i++) {
output.writeInt(this.otherUserIds[i]);
}
}
}
}
public static class ResendAuthenticationCode extends Function {
public static final int CONSTRUCTOR = -814377191;
public ResendAuthenticationCode() {}
public ResendAuthenticationCode(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ResendChangePhoneNumberCode extends Function {
public static final int CONSTRUCTOR = -786772060;
public ResendChangePhoneNumberCode() {}
public ResendChangePhoneNumberCode(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ResendEmailAddressVerificationCode extends Function {
public static final int CONSTRUCTOR = -1872416732;
public ResendEmailAddressVerificationCode() {}
public ResendEmailAddressVerificationCode(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ResendMessages extends Function {
public long chatId;
public long[] messageIds;
public static final int CONSTRUCTOR = -940655817;
public ResendMessages() {}
public ResendMessages(long chatId, long[] messageIds) {
this.chatId = chatId;
this.messageIds = messageIds;
}
public ResendMessages(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
this.messageIds = new long[input.readInt()];
for (int i = 0; i < this.messageIds.length; i++) {
this.messageIds[i] = input.readLong();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.messageIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.messageIds.length);
for (int i = 0; i < this.messageIds.length; i++) {
output.writeLong(this.messageIds[i]);
}
}
}
}
public static class ResendPhoneNumberConfirmationCode extends Function {
public static final int CONSTRUCTOR = 2069068522;
public ResendPhoneNumberConfirmationCode() {}
public ResendPhoneNumberConfirmationCode(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ResendPhoneNumberVerificationCode extends Function {
public static final int CONSTRUCTOR = 1367629820;
public ResendPhoneNumberVerificationCode() {}
public ResendPhoneNumberVerificationCode(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ResendRecoveryEmailAddressCode extends Function {
public static final int CONSTRUCTOR = 433483548;
public ResendRecoveryEmailAddressCode() {}
public ResendRecoveryEmailAddressCode(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ResetAllNotificationSettings extends Function {
public static final int CONSTRUCTOR = -174020359;
public ResetAllNotificationSettings() {}
public ResetAllNotificationSettings(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ResetBackgrounds extends Function {
public static final int CONSTRUCTOR = 204852088;
public ResetBackgrounds() {}
public ResetBackgrounds(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ResetNetworkStatistics extends Function {
public static final int CONSTRUCTOR = 1646452102;
public ResetNetworkStatistics() {}
public ResetNetworkStatistics(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class SaveApplicationLogEvent extends Function {
public String type;
public long chatId;
public JsonValue data;
public static final int CONSTRUCTOR = -811154930;
public SaveApplicationLogEvent() {}
public SaveApplicationLogEvent(String type, long chatId, JsonValue data) {
this.type = type;
this.chatId = chatId;
this.data = data;
}
public SaveApplicationLogEvent(DataInput input) throws IOException {
if (input.readBoolean()) {
var typeTmp = new byte[input.readInt()];
input.readFully(typeTmp);
this.type = new String(typeTmp, StandardCharsets.UTF_8);
}
this.chatId = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case JsonValueNull.CONSTRUCTOR:
this.data = new JsonValueNull(input);
break;
case JsonValueBoolean.CONSTRUCTOR:
this.data = new JsonValueBoolean(input);
break;
case JsonValueNumber.CONSTRUCTOR:
this.data = new JsonValueNumber(input);
break;
case JsonValueString.CONSTRUCTOR:
this.data = new JsonValueString(input);
break;
case JsonValueArray.CONSTRUCTOR:
this.data = new JsonValueArray(input);
break;
case JsonValueObject.CONSTRUCTOR:
this.data = new JsonValueObject(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var typeTmp = this.type.getBytes(StandardCharsets.UTF_8);
output.writeInt(typeTmp.length);
output.write(typeTmp);
}
output.writeLong(this.chatId);
if (this.data == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.data.serialize(output);
}
}
}
public static class SearchBackground extends Function {
public String name;
public static final int CONSTRUCTOR = -2130996959;
public SearchBackground() {}
public SearchBackground(String name) {
this.name = name;
}
public SearchBackground(DataInput input) throws IOException {
if (input.readBoolean()) {
var nameTmp = new byte[input.readInt()];
input.readFully(nameTmp);
this.name = new String(nameTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.name == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nameTmp = this.name.getBytes(StandardCharsets.UTF_8);
output.writeInt(nameTmp.length);
output.write(nameTmp);
}
}
}
public static class SearchCallMessages extends Function {
public long fromMessageId;
public int limit;
public boolean onlyMissed;
public static final int CONSTRUCTOR = -1077230820;
public SearchCallMessages() {}
public SearchCallMessages(long fromMessageId, int limit, boolean onlyMissed) {
this.fromMessageId = fromMessageId;
this.limit = limit;
this.onlyMissed = onlyMissed;
}
public SearchCallMessages(DataInput input) throws IOException {
this.fromMessageId = input.readLong();
this.limit = input.readInt();
this.onlyMissed = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.fromMessageId);
output.writeInt(this.limit);
output.writeBoolean(this.onlyMissed);
}
}
public static class SearchChatMembers extends Function {
public long chatId;
public String query;
public int limit;
public ChatMembersFilter filter;
public static final int CONSTRUCTOR = -445823291;
public SearchChatMembers() {}
public SearchChatMembers(long chatId, String query, int limit, ChatMembersFilter filter) {
this.chatId = chatId;
this.query = query;
this.limit = limit;
this.filter = filter;
}
public SearchChatMembers(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
var queryTmp = new byte[input.readInt()];
input.readFully(queryTmp);
this.query = new String(queryTmp, StandardCharsets.UTF_8);
}
this.limit = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatMembersFilterContacts.CONSTRUCTOR:
this.filter = new ChatMembersFilterContacts(input);
break;
case ChatMembersFilterAdministrators.CONSTRUCTOR:
this.filter = new ChatMembersFilterAdministrators(input);
break;
case ChatMembersFilterMembers.CONSTRUCTOR:
this.filter = new ChatMembersFilterMembers(input);
break;
case ChatMembersFilterRestricted.CONSTRUCTOR:
this.filter = new ChatMembersFilterRestricted(input);
break;
case ChatMembersFilterBanned.CONSTRUCTOR:
this.filter = new ChatMembersFilterBanned(input);
break;
case ChatMembersFilterBots.CONSTRUCTOR:
this.filter = new ChatMembersFilterBots(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.query == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var queryTmp = this.query.getBytes(StandardCharsets.UTF_8);
output.writeInt(queryTmp.length);
output.write(queryTmp);
}
output.writeInt(this.limit);
if (this.filter == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.filter.serialize(output);
}
}
}
public static class SearchChatMessages extends Function {
public long chatId;
public String query;
public int senderUserId;
public long fromMessageId;
public int offset;
public int limit;
public SearchMessagesFilter filter;
public static final int CONSTRUCTOR = -1528846671;
public SearchChatMessages() {}
public SearchChatMessages(long chatId, String query, int senderUserId, long fromMessageId, int offset, int limit, SearchMessagesFilter filter) {
this.chatId = chatId;
this.query = query;
this.senderUserId = senderUserId;
this.fromMessageId = fromMessageId;
this.offset = offset;
this.limit = limit;
this.filter = filter;
}
public SearchChatMessages(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
var queryTmp = new byte[input.readInt()];
input.readFully(queryTmp);
this.query = new String(queryTmp, StandardCharsets.UTF_8);
}
this.senderUserId = input.readInt();
this.fromMessageId = input.readLong();
this.offset = input.readInt();
this.limit = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case SearchMessagesFilterEmpty.CONSTRUCTOR:
this.filter = new SearchMessagesFilterEmpty(input);
break;
case SearchMessagesFilterAnimation.CONSTRUCTOR:
this.filter = new SearchMessagesFilterAnimation(input);
break;
case SearchMessagesFilterAudio.CONSTRUCTOR:
this.filter = new SearchMessagesFilterAudio(input);
break;
case SearchMessagesFilterDocument.CONSTRUCTOR:
this.filter = new SearchMessagesFilterDocument(input);
break;
case SearchMessagesFilterPhoto.CONSTRUCTOR:
this.filter = new SearchMessagesFilterPhoto(input);
break;
case SearchMessagesFilterVideo.CONSTRUCTOR:
this.filter = new SearchMessagesFilterVideo(input);
break;
case SearchMessagesFilterVoiceNote.CONSTRUCTOR:
this.filter = new SearchMessagesFilterVoiceNote(input);
break;
case SearchMessagesFilterPhotoAndVideo.CONSTRUCTOR:
this.filter = new SearchMessagesFilterPhotoAndVideo(input);
break;
case SearchMessagesFilterUrl.CONSTRUCTOR:
this.filter = new SearchMessagesFilterUrl(input);
break;
case SearchMessagesFilterChatPhoto.CONSTRUCTOR:
this.filter = new SearchMessagesFilterChatPhoto(input);
break;
case SearchMessagesFilterCall.CONSTRUCTOR:
this.filter = new SearchMessagesFilterCall(input);
break;
case SearchMessagesFilterMissedCall.CONSTRUCTOR:
this.filter = new SearchMessagesFilterMissedCall(input);
break;
case SearchMessagesFilterVideoNote.CONSTRUCTOR:
this.filter = new SearchMessagesFilterVideoNote(input);
break;
case SearchMessagesFilterVoiceAndVideoNote.CONSTRUCTOR:
this.filter = new SearchMessagesFilterVoiceAndVideoNote(input);
break;
case SearchMessagesFilterMention.CONSTRUCTOR:
this.filter = new SearchMessagesFilterMention(input);
break;
case SearchMessagesFilterUnreadMention.CONSTRUCTOR:
this.filter = new SearchMessagesFilterUnreadMention(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.query == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var queryTmp = this.query.getBytes(StandardCharsets.UTF_8);
output.writeInt(queryTmp.length);
output.write(queryTmp);
}
output.writeInt(this.senderUserId);
output.writeLong(this.fromMessageId);
output.writeInt(this.offset);
output.writeInt(this.limit);
if (this.filter == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.filter.serialize(output);
}
}
}
public static class SearchChatRecentLocationMessages extends Function {
public long chatId;
public int limit;
public static final int CONSTRUCTOR = 950238950;
public SearchChatRecentLocationMessages() {}
public SearchChatRecentLocationMessages(long chatId, int limit) {
this.chatId = chatId;
this.limit = limit;
}
public SearchChatRecentLocationMessages(DataInput input) throws IOException {
this.chatId = input.readLong();
this.limit = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeInt(this.limit);
}
}
public static class SearchChats extends Function {
public String query;
public int limit;
public static final int CONSTRUCTOR = -1879787060;
public SearchChats() {}
public SearchChats(String query, int limit) {
this.query = query;
this.limit = limit;
}
public SearchChats(DataInput input) throws IOException {
if (input.readBoolean()) {
var queryTmp = new byte[input.readInt()];
input.readFully(queryTmp);
this.query = new String(queryTmp, StandardCharsets.UTF_8);
}
this.limit = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.query == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var queryTmp = this.query.getBytes(StandardCharsets.UTF_8);
output.writeInt(queryTmp.length);
output.write(queryTmp);
}
output.writeInt(this.limit);
}
}
public static class SearchChatsNearby extends Function {
public Location location;
public static final int CONSTRUCTOR = -196753377;
public SearchChatsNearby() {}
public SearchChatsNearby(Location location) {
this.location = location;
}
public SearchChatsNearby(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Location.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.location = new Location(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.location == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.location.serialize(output);
}
}
}
public static class SearchChatsOnServer extends Function {
public String query;
public int limit;
public static final int CONSTRUCTOR = -1158402188;
public SearchChatsOnServer() {}
public SearchChatsOnServer(String query, int limit) {
this.query = query;
this.limit = limit;
}
public SearchChatsOnServer(DataInput input) throws IOException {
if (input.readBoolean()) {
var queryTmp = new byte[input.readInt()];
input.readFully(queryTmp);
this.query = new String(queryTmp, StandardCharsets.UTF_8);
}
this.limit = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.query == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var queryTmp = this.query.getBytes(StandardCharsets.UTF_8);
output.writeInt(queryTmp.length);
output.write(queryTmp);
}
output.writeInt(this.limit);
}
}
public static class SearchContacts extends Function {
public String query;
public int limit;
public static final int CONSTRUCTOR = -1794690715;
public SearchContacts() {}
public SearchContacts(String query, int limit) {
this.query = query;
this.limit = limit;
}
public SearchContacts(DataInput input) throws IOException {
if (input.readBoolean()) {
var queryTmp = new byte[input.readInt()];
input.readFully(queryTmp);
this.query = new String(queryTmp, StandardCharsets.UTF_8);
}
this.limit = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.query == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var queryTmp = this.query.getBytes(StandardCharsets.UTF_8);
output.writeInt(queryTmp.length);
output.write(queryTmp);
}
output.writeInt(this.limit);
}
}
public static class SearchEmojis extends Function {
public String text;
public boolean exactMatch;
public String[] inputLanguageCodes;
public static final int CONSTRUCTOR = 398837927;
public SearchEmojis() {}
public SearchEmojis(String text, boolean exactMatch, String[] inputLanguageCodes) {
this.text = text;
this.exactMatch = exactMatch;
this.inputLanguageCodes = inputLanguageCodes;
}
public SearchEmojis(DataInput input) throws IOException {
if (input.readBoolean()) {
var textTmp = new byte[input.readInt()];
input.readFully(textTmp);
this.text = new String(textTmp, StandardCharsets.UTF_8);
}
this.exactMatch = input.readBoolean();
if (input.readBoolean()) {
this.inputLanguageCodes = new String[input.readInt()];
for (int i = 0; i < this.inputLanguageCodes.length; i++) {
var inputLanguageCodesTmp = new byte[input.readInt()];
input.readFully(inputLanguageCodesTmp);
this.inputLanguageCodes[i] = new String(inputLanguageCodesTmp, StandardCharsets.UTF_8);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.text == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var textTmp = this.text.getBytes(StandardCharsets.UTF_8);
output.writeInt(textTmp.length);
output.write(textTmp);
}
output.writeBoolean(this.exactMatch);
if (this.inputLanguageCodes == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.inputLanguageCodes.length);
for (int i = 0; i < this.inputLanguageCodes.length; i++) {
var inputLanguageCodesTmp = this.inputLanguageCodes[i].getBytes(StandardCharsets.UTF_8);
output.writeInt(inputLanguageCodesTmp.length);
output.write(inputLanguageCodesTmp);
}
}
}
}
public static class SearchHashtags extends Function {
public String prefix;
public int limit;
public static final int CONSTRUCTOR = 1043637617;
public SearchHashtags() {}
public SearchHashtags(String prefix, int limit) {
this.prefix = prefix;
this.limit = limit;
}
public SearchHashtags(DataInput input) throws IOException {
if (input.readBoolean()) {
var prefixTmp = new byte[input.readInt()];
input.readFully(prefixTmp);
this.prefix = new String(prefixTmp, StandardCharsets.UTF_8);
}
this.limit = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.prefix == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var prefixTmp = this.prefix.getBytes(StandardCharsets.UTF_8);
output.writeInt(prefixTmp.length);
output.write(prefixTmp);
}
output.writeInt(this.limit);
}
}
public static class SearchInstalledStickerSets extends Function {
public boolean isMasks;
public String query;
public int limit;
public static final int CONSTRUCTOR = 681171344;
public SearchInstalledStickerSets() {}
public SearchInstalledStickerSets(boolean isMasks, String query, int limit) {
this.isMasks = isMasks;
this.query = query;
this.limit = limit;
}
public SearchInstalledStickerSets(DataInput input) throws IOException {
this.isMasks = input.readBoolean();
if (input.readBoolean()) {
var queryTmp = new byte[input.readInt()];
input.readFully(queryTmp);
this.query = new String(queryTmp, StandardCharsets.UTF_8);
}
this.limit = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeBoolean(this.isMasks);
if (this.query == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var queryTmp = this.query.getBytes(StandardCharsets.UTF_8);
output.writeInt(queryTmp.length);
output.write(queryTmp);
}
output.writeInt(this.limit);
}
}
public static class SearchMessages extends Function {
public ChatList chatList;
public String query;
public int offsetDate;
public long offsetChatId;
public long offsetMessageId;
public int limit;
public static final int CONSTRUCTOR = -455843835;
public SearchMessages() {}
public SearchMessages(ChatList chatList, String query, int offsetDate, long offsetChatId, long offsetMessageId, int limit) {
this.chatList = chatList;
this.query = query;
this.offsetDate = offsetDate;
this.offsetChatId = offsetChatId;
this.offsetMessageId = offsetMessageId;
this.limit = limit;
}
public SearchMessages(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatListMain.CONSTRUCTOR:
this.chatList = new ChatListMain(input);
break;
case ChatListArchive.CONSTRUCTOR:
this.chatList = new ChatListArchive(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
var queryTmp = new byte[input.readInt()];
input.readFully(queryTmp);
this.query = new String(queryTmp, StandardCharsets.UTF_8);
}
this.offsetDate = input.readInt();
this.offsetChatId = input.readLong();
this.offsetMessageId = input.readLong();
this.limit = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.chatList == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.chatList.serialize(output);
}
if (this.query == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var queryTmp = this.query.getBytes(StandardCharsets.UTF_8);
output.writeInt(queryTmp.length);
output.write(queryTmp);
}
output.writeInt(this.offsetDate);
output.writeLong(this.offsetChatId);
output.writeLong(this.offsetMessageId);
output.writeInt(this.limit);
}
}
public static class SearchPublicChat extends Function {
public String username;
public static final int CONSTRUCTOR = 857135533;
public SearchPublicChat() {}
public SearchPublicChat(String username) {
this.username = username;
}
public SearchPublicChat(DataInput input) throws IOException {
if (input.readBoolean()) {
var usernameTmp = new byte[input.readInt()];
input.readFully(usernameTmp);
this.username = new String(usernameTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.username == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var usernameTmp = this.username.getBytes(StandardCharsets.UTF_8);
output.writeInt(usernameTmp.length);
output.write(usernameTmp);
}
}
}
public static class SearchPublicChats extends Function {
public String query;
public static final int CONSTRUCTOR = 970385337;
public SearchPublicChats() {}
public SearchPublicChats(String query) {
this.query = query;
}
public SearchPublicChats(DataInput input) throws IOException {
if (input.readBoolean()) {
var queryTmp = new byte[input.readInt()];
input.readFully(queryTmp);
this.query = new String(queryTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.query == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var queryTmp = this.query.getBytes(StandardCharsets.UTF_8);
output.writeInt(queryTmp.length);
output.write(queryTmp);
}
}
}
public static class SearchSecretMessages extends Function {
public long chatId;
public String query;
public long fromSearchId;
public int limit;
public SearchMessagesFilter filter;
public static final int CONSTRUCTOR = -1670627915;
public SearchSecretMessages() {}
public SearchSecretMessages(long chatId, String query, long fromSearchId, int limit, SearchMessagesFilter filter) {
this.chatId = chatId;
this.query = query;
this.fromSearchId = fromSearchId;
this.limit = limit;
this.filter = filter;
}
public SearchSecretMessages(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
var queryTmp = new byte[input.readInt()];
input.readFully(queryTmp);
this.query = new String(queryTmp, StandardCharsets.UTF_8);
}
this.fromSearchId = input.readLong();
this.limit = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case SearchMessagesFilterEmpty.CONSTRUCTOR:
this.filter = new SearchMessagesFilterEmpty(input);
break;
case SearchMessagesFilterAnimation.CONSTRUCTOR:
this.filter = new SearchMessagesFilterAnimation(input);
break;
case SearchMessagesFilterAudio.CONSTRUCTOR:
this.filter = new SearchMessagesFilterAudio(input);
break;
case SearchMessagesFilterDocument.CONSTRUCTOR:
this.filter = new SearchMessagesFilterDocument(input);
break;
case SearchMessagesFilterPhoto.CONSTRUCTOR:
this.filter = new SearchMessagesFilterPhoto(input);
break;
case SearchMessagesFilterVideo.CONSTRUCTOR:
this.filter = new SearchMessagesFilterVideo(input);
break;
case SearchMessagesFilterVoiceNote.CONSTRUCTOR:
this.filter = new SearchMessagesFilterVoiceNote(input);
break;
case SearchMessagesFilterPhotoAndVideo.CONSTRUCTOR:
this.filter = new SearchMessagesFilterPhotoAndVideo(input);
break;
case SearchMessagesFilterUrl.CONSTRUCTOR:
this.filter = new SearchMessagesFilterUrl(input);
break;
case SearchMessagesFilterChatPhoto.CONSTRUCTOR:
this.filter = new SearchMessagesFilterChatPhoto(input);
break;
case SearchMessagesFilterCall.CONSTRUCTOR:
this.filter = new SearchMessagesFilterCall(input);
break;
case SearchMessagesFilterMissedCall.CONSTRUCTOR:
this.filter = new SearchMessagesFilterMissedCall(input);
break;
case SearchMessagesFilterVideoNote.CONSTRUCTOR:
this.filter = new SearchMessagesFilterVideoNote(input);
break;
case SearchMessagesFilterVoiceAndVideoNote.CONSTRUCTOR:
this.filter = new SearchMessagesFilterVoiceAndVideoNote(input);
break;
case SearchMessagesFilterMention.CONSTRUCTOR:
this.filter = new SearchMessagesFilterMention(input);
break;
case SearchMessagesFilterUnreadMention.CONSTRUCTOR:
this.filter = new SearchMessagesFilterUnreadMention(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.query == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var queryTmp = this.query.getBytes(StandardCharsets.UTF_8);
output.writeInt(queryTmp.length);
output.write(queryTmp);
}
output.writeLong(this.fromSearchId);
output.writeInt(this.limit);
if (this.filter == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.filter.serialize(output);
}
}
}
public static class SearchStickerSet extends Function {
public String name;
public static final int CONSTRUCTOR = 1157930222;
public SearchStickerSet() {}
public SearchStickerSet(String name) {
this.name = name;
}
public SearchStickerSet(DataInput input) throws IOException {
if (input.readBoolean()) {
var nameTmp = new byte[input.readInt()];
input.readFully(nameTmp);
this.name = new String(nameTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.name == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nameTmp = this.name.getBytes(StandardCharsets.UTF_8);
output.writeInt(nameTmp.length);
output.write(nameTmp);
}
}
}
public static class SearchStickerSets extends Function {
public String query;
public static final int CONSTRUCTOR = -1082314629;
public SearchStickerSets() {}
public SearchStickerSets(String query) {
this.query = query;
}
public SearchStickerSets(DataInput input) throws IOException {
if (input.readBoolean()) {
var queryTmp = new byte[input.readInt()];
input.readFully(queryTmp);
this.query = new String(queryTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.query == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var queryTmp = this.query.getBytes(StandardCharsets.UTF_8);
output.writeInt(queryTmp.length);
output.write(queryTmp);
}
}
}
public static class SearchStickers extends Function {
public String emoji;
public int limit;
public static final int CONSTRUCTOR = 1555771203;
public SearchStickers() {}
public SearchStickers(String emoji, int limit) {
this.emoji = emoji;
this.limit = limit;
}
public SearchStickers(DataInput input) throws IOException {
if (input.readBoolean()) {
var emojiTmp = new byte[input.readInt()];
input.readFully(emojiTmp);
this.emoji = new String(emojiTmp, StandardCharsets.UTF_8);
}
this.limit = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.emoji == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var emojiTmp = this.emoji.getBytes(StandardCharsets.UTF_8);
output.writeInt(emojiTmp.length);
output.write(emojiTmp);
}
output.writeInt(this.limit);
}
}
public static class SendBotStartMessage extends Function {
public int botUserId;
public long chatId;
public String parameter;
public static final int CONSTRUCTOR = 1112181339;
public SendBotStartMessage() {}
public SendBotStartMessage(int botUserId, long chatId, String parameter) {
this.botUserId = botUserId;
this.chatId = chatId;
this.parameter = parameter;
}
public SendBotStartMessage(DataInput input) throws IOException {
this.botUserId = input.readInt();
this.chatId = input.readLong();
if (input.readBoolean()) {
var parameterTmp = new byte[input.readInt()];
input.readFully(parameterTmp);
this.parameter = new String(parameterTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.botUserId);
output.writeLong(this.chatId);
if (this.parameter == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var parameterTmp = this.parameter.getBytes(StandardCharsets.UTF_8);
output.writeInt(parameterTmp.length);
output.write(parameterTmp);
}
}
}
public static class SendCallDebugInformation extends Function {
public int callId;
public String debugInformation;
public static final int CONSTRUCTOR = 2019243839;
public SendCallDebugInformation() {}
public SendCallDebugInformation(int callId, String debugInformation) {
this.callId = callId;
this.debugInformation = debugInformation;
}
public SendCallDebugInformation(DataInput input) throws IOException {
this.callId = input.readInt();
if (input.readBoolean()) {
var debugInformationTmp = new byte[input.readInt()];
input.readFully(debugInformationTmp);
this.debugInformation = new String(debugInformationTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.callId);
if (this.debugInformation == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var debugInformationTmp = this.debugInformation.getBytes(StandardCharsets.UTF_8);
output.writeInt(debugInformationTmp.length);
output.write(debugInformationTmp);
}
}
}
public static class SendCallRating extends Function {
public int callId;
public int rating;
public String comment;
public CallProblem[] problems;
public static final int CONSTRUCTOR = -1402719502;
public SendCallRating() {}
public SendCallRating(int callId, int rating, String comment, CallProblem[] problems) {
this.callId = callId;
this.rating = rating;
this.comment = comment;
this.problems = problems;
}
public SendCallRating(DataInput input) throws IOException {
this.callId = input.readInt();
this.rating = input.readInt();
if (input.readBoolean()) {
var commentTmp = new byte[input.readInt()];
input.readFully(commentTmp);
this.comment = new String(commentTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
this.problems = new CallProblem[input.readInt()];
for (int i = 0; i < this.problems.length; i++) {
switch(input.readInt()) {
case CallProblemEcho.CONSTRUCTOR:
this.problems[i] = new CallProblemEcho(input);
break;
case CallProblemNoise.CONSTRUCTOR:
this.problems[i] = new CallProblemNoise(input);
break;
case CallProblemInterruptions.CONSTRUCTOR:
this.problems[i] = new CallProblemInterruptions(input);
break;
case CallProblemDistortedSpeech.CONSTRUCTOR:
this.problems[i] = new CallProblemDistortedSpeech(input);
break;
case CallProblemSilentLocal.CONSTRUCTOR:
this.problems[i] = new CallProblemSilentLocal(input);
break;
case CallProblemSilentRemote.CONSTRUCTOR:
this.problems[i] = new CallProblemSilentRemote(input);
break;
case CallProblemDropped.CONSTRUCTOR:
this.problems[i] = new CallProblemDropped(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.callId);
output.writeInt(this.rating);
if (this.comment == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var commentTmp = this.comment.getBytes(StandardCharsets.UTF_8);
output.writeInt(commentTmp.length);
output.write(commentTmp);
}
if (this.problems == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.problems.length);
for (int i = 0; i < this.problems.length; i++) {
this.problems[i].serialize(output);
}
}
}
}
public static class SendChatAction extends Function {
public long chatId;
public ChatAction action;
public static final int CONSTRUCTOR = -841357536;
public SendChatAction() {}
public SendChatAction(long chatId, ChatAction action) {
this.chatId = chatId;
this.action = action;
}
public SendChatAction(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatActionTyping.CONSTRUCTOR:
this.action = new ChatActionTyping(input);
break;
case ChatActionRecordingVideo.CONSTRUCTOR:
this.action = new ChatActionRecordingVideo(input);
break;
case ChatActionUploadingVideo.CONSTRUCTOR:
this.action = new ChatActionUploadingVideo(input);
break;
case ChatActionRecordingVoiceNote.CONSTRUCTOR:
this.action = new ChatActionRecordingVoiceNote(input);
break;
case ChatActionUploadingVoiceNote.CONSTRUCTOR:
this.action = new ChatActionUploadingVoiceNote(input);
break;
case ChatActionUploadingPhoto.CONSTRUCTOR:
this.action = new ChatActionUploadingPhoto(input);
break;
case ChatActionUploadingDocument.CONSTRUCTOR:
this.action = new ChatActionUploadingDocument(input);
break;
case ChatActionChoosingLocation.CONSTRUCTOR:
this.action = new ChatActionChoosingLocation(input);
break;
case ChatActionChoosingContact.CONSTRUCTOR:
this.action = new ChatActionChoosingContact(input);
break;
case ChatActionStartPlayingGame.CONSTRUCTOR:
this.action = new ChatActionStartPlayingGame(input);
break;
case ChatActionRecordingVideoNote.CONSTRUCTOR:
this.action = new ChatActionRecordingVideoNote(input);
break;
case ChatActionUploadingVideoNote.CONSTRUCTOR:
this.action = new ChatActionUploadingVideoNote(input);
break;
case ChatActionCancel.CONSTRUCTOR:
this.action = new ChatActionCancel(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.action == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.action.serialize(output);
}
}
}
public static class SendChatScreenshotTakenNotification extends Function {
public long chatId;
public static final int CONSTRUCTOR = 448399457;
public SendChatScreenshotTakenNotification() {}
public SendChatScreenshotTakenNotification(long chatId) {
this.chatId = chatId;
}
public SendChatScreenshotTakenNotification(DataInput input) throws IOException {
this.chatId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
}
}
public static class SendChatSetTtlMessage extends Function {
public long chatId;
public int ttl;
public static final int CONSTRUCTOR = 1432535564;
public SendChatSetTtlMessage() {}
public SendChatSetTtlMessage(long chatId, int ttl) {
this.chatId = chatId;
this.ttl = ttl;
}
public SendChatSetTtlMessage(DataInput input) throws IOException {
this.chatId = input.readLong();
this.ttl = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeInt(this.ttl);
}
}
public static class SendCustomRequest extends Function {
public String method;
public String parameters;
public static final int CONSTRUCTOR = 285045153;
public SendCustomRequest() {}
public SendCustomRequest(String method, String parameters) {
this.method = method;
this.parameters = parameters;
}
public SendCustomRequest(DataInput input) throws IOException {
if (input.readBoolean()) {
var methodTmp = new byte[input.readInt()];
input.readFully(methodTmp);
this.method = new String(methodTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var parametersTmp = new byte[input.readInt()];
input.readFully(parametersTmp);
this.parameters = new String(parametersTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.method == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var methodTmp = this.method.getBytes(StandardCharsets.UTF_8);
output.writeInt(methodTmp.length);
output.write(methodTmp);
}
if (this.parameters == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var parametersTmp = this.parameters.getBytes(StandardCharsets.UTF_8);
output.writeInt(parametersTmp.length);
output.write(parametersTmp);
}
}
}
public static class SendEmailAddressVerificationCode extends Function {
public String emailAddress;
public static final int CONSTRUCTOR = -221621379;
public SendEmailAddressVerificationCode() {}
public SendEmailAddressVerificationCode(String emailAddress) {
this.emailAddress = emailAddress;
}
public SendEmailAddressVerificationCode(DataInput input) throws IOException {
if (input.readBoolean()) {
var emailAddressTmp = new byte[input.readInt()];
input.readFully(emailAddressTmp);
this.emailAddress = new String(emailAddressTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.emailAddress == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var emailAddressTmp = this.emailAddress.getBytes(StandardCharsets.UTF_8);
output.writeInt(emailAddressTmp.length);
output.write(emailAddressTmp);
}
}
}
public static class SendInlineQueryResultMessage extends Function {
public long chatId;
public long replyToMessageId;
public SendMessageOptions options;
public long queryId;
public String resultId;
public boolean hideViaBot;
public static final int CONSTRUCTOR = 729880339;
public SendInlineQueryResultMessage() {}
public SendInlineQueryResultMessage(long chatId, long replyToMessageId, SendMessageOptions options, long queryId, String resultId, boolean hideViaBot) {
this.chatId = chatId;
this.replyToMessageId = replyToMessageId;
this.options = options;
this.queryId = queryId;
this.resultId = resultId;
this.hideViaBot = hideViaBot;
}
public SendInlineQueryResultMessage(DataInput input) throws IOException {
this.chatId = input.readLong();
this.replyToMessageId = input.readLong();
if (input.readBoolean()) {
if (SendMessageOptions.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.options = new SendMessageOptions(input);
}
this.queryId = input.readLong();
if (input.readBoolean()) {
var resultIdTmp = new byte[input.readInt()];
input.readFully(resultIdTmp);
this.resultId = new String(resultIdTmp, StandardCharsets.UTF_8);
}
this.hideViaBot = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.replyToMessageId);
if (this.options == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.options.serialize(output);
}
output.writeLong(this.queryId);
if (this.resultId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var resultIdTmp = this.resultId.getBytes(StandardCharsets.UTF_8);
output.writeInt(resultIdTmp.length);
output.write(resultIdTmp);
}
output.writeBoolean(this.hideViaBot);
}
}
public static class SendMessage extends Function {
public long chatId;
public long replyToMessageId;
public SendMessageOptions options;
public ReplyMarkup replyMarkup;
public InputMessageContent inputMessageContent;
public static final int CONSTRUCTOR = -1314396596;
public SendMessage() {}
public SendMessage(long chatId, long replyToMessageId, SendMessageOptions options, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) {
this.chatId = chatId;
this.replyToMessageId = replyToMessageId;
this.options = options;
this.replyMarkup = replyMarkup;
this.inputMessageContent = inputMessageContent;
}
public SendMessage(DataInput input) throws IOException {
this.chatId = input.readLong();
this.replyToMessageId = input.readLong();
if (input.readBoolean()) {
if (SendMessageOptions.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.options = new SendMessageOptions(input);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputMessageText.CONSTRUCTOR:
this.inputMessageContent = new InputMessageText(input);
break;
case InputMessageAnimation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAnimation(input);
break;
case InputMessageAudio.CONSTRUCTOR:
this.inputMessageContent = new InputMessageAudio(input);
break;
case InputMessageDocument.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDocument(input);
break;
case InputMessagePhoto.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePhoto(input);
break;
case InputMessageSticker.CONSTRUCTOR:
this.inputMessageContent = new InputMessageSticker(input);
break;
case InputMessageVideo.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideo(input);
break;
case InputMessageVideoNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVideoNote(input);
break;
case InputMessageVoiceNote.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVoiceNote(input);
break;
case InputMessageLocation.CONSTRUCTOR:
this.inputMessageContent = new InputMessageLocation(input);
break;
case InputMessageVenue.CONSTRUCTOR:
this.inputMessageContent = new InputMessageVenue(input);
break;
case InputMessageContact.CONSTRUCTOR:
this.inputMessageContent = new InputMessageContact(input);
break;
case InputMessageDice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageDice(input);
break;
case InputMessageGame.CONSTRUCTOR:
this.inputMessageContent = new InputMessageGame(input);
break;
case InputMessageInvoice.CONSTRUCTOR:
this.inputMessageContent = new InputMessageInvoice(input);
break;
case InputMessagePoll.CONSTRUCTOR:
this.inputMessageContent = new InputMessagePoll(input);
break;
case InputMessageForwarded.CONSTRUCTOR:
this.inputMessageContent = new InputMessageForwarded(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.replyToMessageId);
if (this.options == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.options.serialize(output);
}
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
if (this.inputMessageContent == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.inputMessageContent.serialize(output);
}
}
}
public static class SendMessageAlbum extends Function {
public long chatId;
public long replyToMessageId;
public SendMessageOptions options;
public InputMessageContent[] inputMessageContents;
public static final int CONSTRUCTOR = -818794592;
public SendMessageAlbum() {}
public SendMessageAlbum(long chatId, long replyToMessageId, SendMessageOptions options, InputMessageContent[] inputMessageContents) {
this.chatId = chatId;
this.replyToMessageId = replyToMessageId;
this.options = options;
this.inputMessageContents = inputMessageContents;
}
public SendMessageAlbum(DataInput input) throws IOException {
this.chatId = input.readLong();
this.replyToMessageId = input.readLong();
if (input.readBoolean()) {
if (SendMessageOptions.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.options = new SendMessageOptions(input);
}
if (input.readBoolean()) {
this.inputMessageContents = new InputMessageContent[input.readInt()];
for (int i = 0; i < this.inputMessageContents.length; i++) {
switch(input.readInt()) {
case InputMessageText.CONSTRUCTOR:
this.inputMessageContents[i] = new InputMessageText(input);
break;
case InputMessageAnimation.CONSTRUCTOR:
this.inputMessageContents[i] = new InputMessageAnimation(input);
break;
case InputMessageAudio.CONSTRUCTOR:
this.inputMessageContents[i] = new InputMessageAudio(input);
break;
case InputMessageDocument.CONSTRUCTOR:
this.inputMessageContents[i] = new InputMessageDocument(input);
break;
case InputMessagePhoto.CONSTRUCTOR:
this.inputMessageContents[i] = new InputMessagePhoto(input);
break;
case InputMessageSticker.CONSTRUCTOR:
this.inputMessageContents[i] = new InputMessageSticker(input);
break;
case InputMessageVideo.CONSTRUCTOR:
this.inputMessageContents[i] = new InputMessageVideo(input);
break;
case InputMessageVideoNote.CONSTRUCTOR:
this.inputMessageContents[i] = new InputMessageVideoNote(input);
break;
case InputMessageVoiceNote.CONSTRUCTOR:
this.inputMessageContents[i] = new InputMessageVoiceNote(input);
break;
case InputMessageLocation.CONSTRUCTOR:
this.inputMessageContents[i] = new InputMessageLocation(input);
break;
case InputMessageVenue.CONSTRUCTOR:
this.inputMessageContents[i] = new InputMessageVenue(input);
break;
case InputMessageContact.CONSTRUCTOR:
this.inputMessageContents[i] = new InputMessageContact(input);
break;
case InputMessageDice.CONSTRUCTOR:
this.inputMessageContents[i] = new InputMessageDice(input);
break;
case InputMessageGame.CONSTRUCTOR:
this.inputMessageContents[i] = new InputMessageGame(input);
break;
case InputMessageInvoice.CONSTRUCTOR:
this.inputMessageContents[i] = new InputMessageInvoice(input);
break;
case InputMessagePoll.CONSTRUCTOR:
this.inputMessageContents[i] = new InputMessagePoll(input);
break;
case InputMessageForwarded.CONSTRUCTOR:
this.inputMessageContents[i] = new InputMessageForwarded(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.replyToMessageId);
if (this.options == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.options.serialize(output);
}
if (this.inputMessageContents == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.inputMessageContents.length);
for (int i = 0; i < this.inputMessageContents.length; i++) {
this.inputMessageContents[i].serialize(output);
}
}
}
}
public static class SendPassportAuthorizationForm extends Function {
public int autorizationFormId;
public PassportElementType[] types;
public static final int CONSTRUCTOR = -602402218;
public SendPassportAuthorizationForm() {}
public SendPassportAuthorizationForm(int autorizationFormId, PassportElementType[] types) {
this.autorizationFormId = autorizationFormId;
this.types = types;
}
public SendPassportAuthorizationForm(DataInput input) throws IOException {
this.autorizationFormId = input.readInt();
if (input.readBoolean()) {
this.types = new PassportElementType[input.readInt()];
for (int i = 0; i < this.types.length; i++) {
switch(input.readInt()) {
case PassportElementTypePersonalDetails.CONSTRUCTOR:
this.types[i] = new PassportElementTypePersonalDetails(input);
break;
case PassportElementTypePassport.CONSTRUCTOR:
this.types[i] = new PassportElementTypePassport(input);
break;
case PassportElementTypeDriverLicense.CONSTRUCTOR:
this.types[i] = new PassportElementTypeDriverLicense(input);
break;
case PassportElementTypeIdentityCard.CONSTRUCTOR:
this.types[i] = new PassportElementTypeIdentityCard(input);
break;
case PassportElementTypeInternalPassport.CONSTRUCTOR:
this.types[i] = new PassportElementTypeInternalPassport(input);
break;
case PassportElementTypeAddress.CONSTRUCTOR:
this.types[i] = new PassportElementTypeAddress(input);
break;
case PassportElementTypeUtilityBill.CONSTRUCTOR:
this.types[i] = new PassportElementTypeUtilityBill(input);
break;
case PassportElementTypeBankStatement.CONSTRUCTOR:
this.types[i] = new PassportElementTypeBankStatement(input);
break;
case PassportElementTypeRentalAgreement.CONSTRUCTOR:
this.types[i] = new PassportElementTypeRentalAgreement(input);
break;
case PassportElementTypePassportRegistration.CONSTRUCTOR:
this.types[i] = new PassportElementTypePassportRegistration(input);
break;
case PassportElementTypeTemporaryRegistration.CONSTRUCTOR:
this.types[i] = new PassportElementTypeTemporaryRegistration(input);
break;
case PassportElementTypePhoneNumber.CONSTRUCTOR:
this.types[i] = new PassportElementTypePhoneNumber(input);
break;
case PassportElementTypeEmailAddress.CONSTRUCTOR:
this.types[i] = new PassportElementTypeEmailAddress(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.autorizationFormId);
if (this.types == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.types.length);
for (int i = 0; i < this.types.length; i++) {
this.types[i].serialize(output);
}
}
}
}
public static class SendPaymentForm extends Function {
public long chatId;
public long messageId;
public String orderInfoId;
public String shippingOptionId;
public InputCredentials credentials;
public static final int CONSTRUCTOR = 591581572;
public SendPaymentForm() {}
public SendPaymentForm(long chatId, long messageId, String orderInfoId, String shippingOptionId, InputCredentials credentials) {
this.chatId = chatId;
this.messageId = messageId;
this.orderInfoId = orderInfoId;
this.shippingOptionId = shippingOptionId;
this.credentials = credentials;
}
public SendPaymentForm(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
if (input.readBoolean()) {
var orderInfoIdTmp = new byte[input.readInt()];
input.readFully(orderInfoIdTmp);
this.orderInfoId = new String(orderInfoIdTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var shippingOptionIdTmp = new byte[input.readInt()];
input.readFully(shippingOptionIdTmp);
this.shippingOptionId = new String(shippingOptionIdTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputCredentialsSaved.CONSTRUCTOR:
this.credentials = new InputCredentialsSaved(input);
break;
case InputCredentialsNew.CONSTRUCTOR:
this.credentials = new InputCredentialsNew(input);
break;
case InputCredentialsAndroidPay.CONSTRUCTOR:
this.credentials = new InputCredentialsAndroidPay(input);
break;
case InputCredentialsApplePay.CONSTRUCTOR:
this.credentials = new InputCredentialsApplePay(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
if (this.orderInfoId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var orderInfoIdTmp = this.orderInfoId.getBytes(StandardCharsets.UTF_8);
output.writeInt(orderInfoIdTmp.length);
output.write(orderInfoIdTmp);
}
if (this.shippingOptionId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var shippingOptionIdTmp = this.shippingOptionId.getBytes(StandardCharsets.UTF_8);
output.writeInt(shippingOptionIdTmp.length);
output.write(shippingOptionIdTmp);
}
if (this.credentials == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.credentials.serialize(output);
}
}
}
public static class SendPhoneNumberConfirmationCode extends Function {
public String hash;
public String phoneNumber;
public PhoneNumberAuthenticationSettings settings;
public static final int CONSTRUCTOR = -1901171495;
public SendPhoneNumberConfirmationCode() {}
public SendPhoneNumberConfirmationCode(String hash, String phoneNumber, PhoneNumberAuthenticationSettings settings) {
this.hash = hash;
this.phoneNumber = phoneNumber;
this.settings = settings;
}
public SendPhoneNumberConfirmationCode(DataInput input) throws IOException {
if (input.readBoolean()) {
var hashTmp = new byte[input.readInt()];
input.readFully(hashTmp);
this.hash = new String(hashTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var phoneNumberTmp = new byte[input.readInt()];
input.readFully(phoneNumberTmp);
this.phoneNumber = new String(phoneNumberTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (PhoneNumberAuthenticationSettings.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.settings = new PhoneNumberAuthenticationSettings(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.hash == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var hashTmp = this.hash.getBytes(StandardCharsets.UTF_8);
output.writeInt(hashTmp.length);
output.write(hashTmp);
}
if (this.phoneNumber == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var phoneNumberTmp = this.phoneNumber.getBytes(StandardCharsets.UTF_8);
output.writeInt(phoneNumberTmp.length);
output.write(phoneNumberTmp);
}
if (this.settings == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.settings.serialize(output);
}
}
}
public static class SendPhoneNumberVerificationCode extends Function {
public String phoneNumber;
public PhoneNumberAuthenticationSettings settings;
public static final int CONSTRUCTOR = 2081689035;
public SendPhoneNumberVerificationCode() {}
public SendPhoneNumberVerificationCode(String phoneNumber, PhoneNumberAuthenticationSettings settings) {
this.phoneNumber = phoneNumber;
this.settings = settings;
}
public SendPhoneNumberVerificationCode(DataInput input) throws IOException {
if (input.readBoolean()) {
var phoneNumberTmp = new byte[input.readInt()];
input.readFully(phoneNumberTmp);
this.phoneNumber = new String(phoneNumberTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (PhoneNumberAuthenticationSettings.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.settings = new PhoneNumberAuthenticationSettings(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.phoneNumber == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var phoneNumberTmp = this.phoneNumber.getBytes(StandardCharsets.UTF_8);
output.writeInt(phoneNumberTmp.length);
output.write(phoneNumberTmp);
}
if (this.settings == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.settings.serialize(output);
}
}
}
public static class SetAccountTtl extends Function {
public AccountTtl ttl;
public static final int CONSTRUCTOR = 701389032;
public SetAccountTtl() {}
public SetAccountTtl(AccountTtl ttl) {
this.ttl = ttl;
}
public SetAccountTtl(DataInput input) throws IOException {
if (input.readBoolean()) {
if (AccountTtl.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.ttl = new AccountTtl(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.ttl == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.ttl.serialize(output);
}
}
}
public static class SetAlarm extends Function {
public double seconds;
public static final int CONSTRUCTOR = -873497067;
public SetAlarm() {}
public SetAlarm(double seconds) {
this.seconds = seconds;
}
public SetAlarm(DataInput input) throws IOException {
this.seconds = input.readDouble();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeDouble(this.seconds);
}
}
public static class SetAuthenticationPhoneNumber extends Function {
public String phoneNumber;
public PhoneNumberAuthenticationSettings settings;
public static final int CONSTRUCTOR = 868276259;
public SetAuthenticationPhoneNumber() {}
public SetAuthenticationPhoneNumber(String phoneNumber, PhoneNumberAuthenticationSettings settings) {
this.phoneNumber = phoneNumber;
this.settings = settings;
}
public SetAuthenticationPhoneNumber(DataInput input) throws IOException {
if (input.readBoolean()) {
var phoneNumberTmp = new byte[input.readInt()];
input.readFully(phoneNumberTmp);
this.phoneNumber = new String(phoneNumberTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (PhoneNumberAuthenticationSettings.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.settings = new PhoneNumberAuthenticationSettings(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.phoneNumber == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var phoneNumberTmp = this.phoneNumber.getBytes(StandardCharsets.UTF_8);
output.writeInt(phoneNumberTmp.length);
output.write(phoneNumberTmp);
}
if (this.settings == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.settings.serialize(output);
}
}
}
public static class SetAutoDownloadSettings extends Function {
public AutoDownloadSettings settings;
public NetworkType type;
public static final int CONSTRUCTOR = -353671948;
public SetAutoDownloadSettings() {}
public SetAutoDownloadSettings(AutoDownloadSettings settings, NetworkType type) {
this.settings = settings;
this.type = type;
}
public SetAutoDownloadSettings(DataInput input) throws IOException {
if (input.readBoolean()) {
if (AutoDownloadSettings.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.settings = new AutoDownloadSettings(input);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case NetworkTypeNone.CONSTRUCTOR:
this.type = new NetworkTypeNone(input);
break;
case NetworkTypeMobile.CONSTRUCTOR:
this.type = new NetworkTypeMobile(input);
break;
case NetworkTypeMobileRoaming.CONSTRUCTOR:
this.type = new NetworkTypeMobileRoaming(input);
break;
case NetworkTypeWiFi.CONSTRUCTOR:
this.type = new NetworkTypeWiFi(input);
break;
case NetworkTypeOther.CONSTRUCTOR:
this.type = new NetworkTypeOther(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.settings == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.settings.serialize(output);
}
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
}
}
public static class SetBackground extends Function {
public InputBackground background;
public BackgroundType type;
public boolean forDarkTheme;
public static final int CONSTRUCTOR = -1035439225;
public SetBackground() {}
public SetBackground(InputBackground background, BackgroundType type, boolean forDarkTheme) {
this.background = background;
this.type = type;
this.forDarkTheme = forDarkTheme;
}
public SetBackground(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputBackgroundLocal.CONSTRUCTOR:
this.background = new InputBackgroundLocal(input);
break;
case InputBackgroundRemote.CONSTRUCTOR:
this.background = new InputBackgroundRemote(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case BackgroundTypeWallpaper.CONSTRUCTOR:
this.type = new BackgroundTypeWallpaper(input);
break;
case BackgroundTypePattern.CONSTRUCTOR:
this.type = new BackgroundTypePattern(input);
break;
case BackgroundTypeFill.CONSTRUCTOR:
this.type = new BackgroundTypeFill(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.forDarkTheme = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.background == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.background.serialize(output);
}
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
output.writeBoolean(this.forDarkTheme);
}
}
public static class SetBio extends Function {
public String bio;
public static final int CONSTRUCTOR = -1619582124;
public SetBio() {}
public SetBio(String bio) {
this.bio = bio;
}
public SetBio(DataInput input) throws IOException {
if (input.readBoolean()) {
var bioTmp = new byte[input.readInt()];
input.readFully(bioTmp);
this.bio = new String(bioTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.bio == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var bioTmp = this.bio.getBytes(StandardCharsets.UTF_8);
output.writeInt(bioTmp.length);
output.write(bioTmp);
}
}
}
public static class SetBotUpdatesStatus extends Function {
public int pendingUpdateCount;
public String errorMessage;
public static final int CONSTRUCTOR = -1154926191;
public SetBotUpdatesStatus() {}
public SetBotUpdatesStatus(int pendingUpdateCount, String errorMessage) {
this.pendingUpdateCount = pendingUpdateCount;
this.errorMessage = errorMessage;
}
public SetBotUpdatesStatus(DataInput input) throws IOException {
this.pendingUpdateCount = input.readInt();
if (input.readBoolean()) {
var errorMessageTmp = new byte[input.readInt()];
input.readFully(errorMessageTmp);
this.errorMessage = new String(errorMessageTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.pendingUpdateCount);
if (this.errorMessage == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var errorMessageTmp = this.errorMessage.getBytes(StandardCharsets.UTF_8);
output.writeInt(errorMessageTmp.length);
output.write(errorMessageTmp);
}
}
}
public static class SetChatChatList extends Function {
public long chatId;
public ChatList chatList;
public static final int CONSTRUCTOR = -1396517321;
public SetChatChatList() {}
public SetChatChatList(long chatId, ChatList chatList) {
this.chatId = chatId;
this.chatList = chatList;
}
public SetChatChatList(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatListMain.CONSTRUCTOR:
this.chatList = new ChatListMain(input);
break;
case ChatListArchive.CONSTRUCTOR:
this.chatList = new ChatListArchive(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.chatList == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.chatList.serialize(output);
}
}
}
public static class SetChatClientData extends Function {
public long chatId;
public String clientData;
public static final int CONSTRUCTOR = -827119811;
public SetChatClientData() {}
public SetChatClientData(long chatId, String clientData) {
this.chatId = chatId;
this.clientData = clientData;
}
public SetChatClientData(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
var clientDataTmp = new byte[input.readInt()];
input.readFully(clientDataTmp);
this.clientData = new String(clientDataTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.clientData == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var clientDataTmp = this.clientData.getBytes(StandardCharsets.UTF_8);
output.writeInt(clientDataTmp.length);
output.write(clientDataTmp);
}
}
}
public static class SetChatDescription extends Function {
public long chatId;
public String description;
public static final int CONSTRUCTOR = 1957213277;
public SetChatDescription() {}
public SetChatDescription(long chatId, String description) {
this.chatId = chatId;
this.description = description;
}
public SetChatDescription(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
var descriptionTmp = new byte[input.readInt()];
input.readFully(descriptionTmp);
this.description = new String(descriptionTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.description == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var descriptionTmp = this.description.getBytes(StandardCharsets.UTF_8);
output.writeInt(descriptionTmp.length);
output.write(descriptionTmp);
}
}
}
public static class SetChatDiscussionGroup extends Function {
public long chatId;
public long discussionChatId;
public static final int CONSTRUCTOR = -918801736;
public SetChatDiscussionGroup() {}
public SetChatDiscussionGroup(long chatId, long discussionChatId) {
this.chatId = chatId;
this.discussionChatId = discussionChatId;
}
public SetChatDiscussionGroup(DataInput input) throws IOException {
this.chatId = input.readLong();
this.discussionChatId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.discussionChatId);
}
}
public static class SetChatDraftMessage extends Function {
public long chatId;
public DraftMessage draftMessage;
public static final int CONSTRUCTOR = -588175579;
public SetChatDraftMessage() {}
public SetChatDraftMessage(long chatId, DraftMessage draftMessage) {
this.chatId = chatId;
this.draftMessage = draftMessage;
}
public SetChatDraftMessage(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
if (DraftMessage.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.draftMessage = new DraftMessage(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.draftMessage == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.draftMessage.serialize(output);
}
}
}
public static class SetChatLocation extends Function {
public long chatId;
public ChatLocation location;
public static final int CONSTRUCTOR = -767091286;
public SetChatLocation() {}
public SetChatLocation(long chatId, ChatLocation location) {
this.chatId = chatId;
this.location = location;
}
public SetChatLocation(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
if (ChatLocation.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.location = new ChatLocation(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.location == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.location.serialize(output);
}
}
}
public static class SetChatMemberStatus extends Function {
public long chatId;
public int userId;
public ChatMemberStatus status;
public static final int CONSTRUCTOR = -1754439241;
public SetChatMemberStatus() {}
public SetChatMemberStatus(long chatId, int userId, ChatMemberStatus status) {
this.chatId = chatId;
this.userId = userId;
this.status = status;
}
public SetChatMemberStatus(DataInput input) throws IOException {
this.chatId = input.readLong();
this.userId = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatMemberStatusCreator.CONSTRUCTOR:
this.status = new ChatMemberStatusCreator(input);
break;
case ChatMemberStatusAdministrator.CONSTRUCTOR:
this.status = new ChatMemberStatusAdministrator(input);
break;
case ChatMemberStatusMember.CONSTRUCTOR:
this.status = new ChatMemberStatusMember(input);
break;
case ChatMemberStatusRestricted.CONSTRUCTOR:
this.status = new ChatMemberStatusRestricted(input);
break;
case ChatMemberStatusLeft.CONSTRUCTOR:
this.status = new ChatMemberStatusLeft(input);
break;
case ChatMemberStatusBanned.CONSTRUCTOR:
this.status = new ChatMemberStatusBanned(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeInt(this.userId);
if (this.status == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.status.serialize(output);
}
}
}
public static class SetChatNotificationSettings extends Function {
public long chatId;
public ChatNotificationSettings notificationSettings;
public static final int CONSTRUCTOR = 777199614;
public SetChatNotificationSettings() {}
public SetChatNotificationSettings(long chatId, ChatNotificationSettings notificationSettings) {
this.chatId = chatId;
this.notificationSettings = notificationSettings;
}
public SetChatNotificationSettings(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
if (ChatNotificationSettings.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.notificationSettings = new ChatNotificationSettings(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.notificationSettings == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.notificationSettings.serialize(output);
}
}
}
public static class SetChatPermissions extends Function {
public long chatId;
public ChatPermissions permissions;
public static final int CONSTRUCTOR = 2138507006;
public SetChatPermissions() {}
public SetChatPermissions(long chatId, ChatPermissions permissions) {
this.chatId = chatId;
this.permissions = permissions;
}
public SetChatPermissions(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
if (ChatPermissions.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.permissions = new ChatPermissions(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.permissions == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.permissions.serialize(output);
}
}
}
public static class SetChatPhoto extends Function {
public long chatId;
public InputFile photo;
public static final int CONSTRUCTOR = 132244217;
public SetChatPhoto() {}
public SetChatPhoto(long chatId, InputFile photo) {
this.chatId = chatId;
this.photo = photo;
}
public SetChatPhoto(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.photo = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.photo = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.photo = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.photo = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.photo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.photo.serialize(output);
}
}
}
public static class SetChatSlowModeDelay extends Function {
public long chatId;
public int slowModeDelay;
public static final int CONSTRUCTOR = -540350914;
public SetChatSlowModeDelay() {}
public SetChatSlowModeDelay(long chatId, int slowModeDelay) {
this.chatId = chatId;
this.slowModeDelay = slowModeDelay;
}
public SetChatSlowModeDelay(DataInput input) throws IOException {
this.chatId = input.readLong();
this.slowModeDelay = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeInt(this.slowModeDelay);
}
}
public static class SetChatTitle extends Function {
public long chatId;
public String title;
public static final int CONSTRUCTOR = 164282047;
public SetChatTitle() {}
public SetChatTitle(long chatId, String title) {
this.chatId = chatId;
this.title = title;
}
public SetChatTitle(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
var titleTmp = new byte[input.readInt()];
input.readFully(titleTmp);
this.title = new String(titleTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.title == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var titleTmp = this.title.getBytes(StandardCharsets.UTF_8);
output.writeInt(titleTmp.length);
output.write(titleTmp);
}
}
}
public static class SetCommands extends Function {
public BotCommand[] commands;
public static final int CONSTRUCTOR = 355010146;
public SetCommands() {}
public SetCommands(BotCommand[] commands) {
this.commands = commands;
}
public SetCommands(DataInput input) throws IOException {
if (input.readBoolean()) {
this.commands = new BotCommand[input.readInt()];
for (int i = 0; i < this.commands.length; i++) {
if (BotCommand.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.commands[i] = new BotCommand(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.commands == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.commands.length);
for (int i = 0; i < this.commands.length; i++) {
this.commands[i].serialize(output);
}
}
}
}
public static class SetCustomLanguagePack extends Function {
public LanguagePackInfo info;
public LanguagePackString[] strings;
public static final int CONSTRUCTOR = -296742819;
public SetCustomLanguagePack() {}
public SetCustomLanguagePack(LanguagePackInfo info, LanguagePackString[] strings) {
this.info = info;
this.strings = strings;
}
public SetCustomLanguagePack(DataInput input) throws IOException {
if (input.readBoolean()) {
if (LanguagePackInfo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.info = new LanguagePackInfo(input);
}
if (input.readBoolean()) {
this.strings = new LanguagePackString[input.readInt()];
for (int i = 0; i < this.strings.length; i++) {
if (LanguagePackString.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.strings[i] = new LanguagePackString(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.info == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.info.serialize(output);
}
if (this.strings == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.strings.length);
for (int i = 0; i < this.strings.length; i++) {
this.strings[i].serialize(output);
}
}
}
}
public static class SetCustomLanguagePackString extends Function {
public String languagePackId;
public LanguagePackString newString;
public static final int CONSTRUCTOR = 1316365592;
public SetCustomLanguagePackString() {}
public SetCustomLanguagePackString(String languagePackId, LanguagePackString newString) {
this.languagePackId = languagePackId;
this.newString = newString;
}
public SetCustomLanguagePackString(DataInput input) throws IOException {
if (input.readBoolean()) {
var languagePackIdTmp = new byte[input.readInt()];
input.readFully(languagePackIdTmp);
this.languagePackId = new String(languagePackIdTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
if (LanguagePackString.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.newString = new LanguagePackString(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.languagePackId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var languagePackIdTmp = this.languagePackId.getBytes(StandardCharsets.UTF_8);
output.writeInt(languagePackIdTmp.length);
output.write(languagePackIdTmp);
}
if (this.newString == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.newString.serialize(output);
}
}
}
public static class SetDatabaseEncryptionKey extends Function {
public byte[] newEncryptionKey;
public static final int CONSTRUCTOR = -1204599371;
public SetDatabaseEncryptionKey() {}
public SetDatabaseEncryptionKey(byte[] newEncryptionKey) {
this.newEncryptionKey = newEncryptionKey;
}
public SetDatabaseEncryptionKey(DataInput input) throws IOException {
if (input.readBoolean()) {
this.newEncryptionKey = new byte[input.readInt()];
input.readFully(this.newEncryptionKey);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.newEncryptionKey == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.newEncryptionKey.length);
output.write(this.newEncryptionKey);
}
}
}
public static class SetFileGenerationProgress extends Function {
public long generationId;
public int expectedSize;
public int localPrefixSize;
public static final int CONSTRUCTOR = -540459953;
public SetFileGenerationProgress() {}
public SetFileGenerationProgress(long generationId, int expectedSize, int localPrefixSize) {
this.generationId = generationId;
this.expectedSize = expectedSize;
this.localPrefixSize = localPrefixSize;
}
public SetFileGenerationProgress(DataInput input) throws IOException {
this.generationId = input.readLong();
this.expectedSize = input.readInt();
this.localPrefixSize = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.generationId);
output.writeInt(this.expectedSize);
output.writeInt(this.localPrefixSize);
}
}
public static class SetGameScore extends Function {
public long chatId;
public long messageId;
public boolean editMessage;
public int userId;
public int score;
public boolean force;
public static final int CONSTRUCTOR = -1768307069;
public SetGameScore() {}
public SetGameScore(long chatId, long messageId, boolean editMessage, int userId, int score, boolean force) {
this.chatId = chatId;
this.messageId = messageId;
this.editMessage = editMessage;
this.userId = userId;
this.score = score;
this.force = force;
}
public SetGameScore(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
this.editMessage = input.readBoolean();
this.userId = input.readInt();
this.score = input.readInt();
this.force = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
output.writeBoolean(this.editMessage);
output.writeInt(this.userId);
output.writeInt(this.score);
output.writeBoolean(this.force);
}
}
public static class SetInlineGameScore extends Function {
public String inlineMessageId;
public boolean editMessage;
public int userId;
public int score;
public boolean force;
public static final int CONSTRUCTOR = 758435487;
public SetInlineGameScore() {}
public SetInlineGameScore(String inlineMessageId, boolean editMessage, int userId, int score, boolean force) {
this.inlineMessageId = inlineMessageId;
this.editMessage = editMessage;
this.userId = userId;
this.score = score;
this.force = force;
}
public SetInlineGameScore(DataInput input) throws IOException {
if (input.readBoolean()) {
var inlineMessageIdTmp = new byte[input.readInt()];
input.readFully(inlineMessageIdTmp);
this.inlineMessageId = new String(inlineMessageIdTmp, StandardCharsets.UTF_8);
}
this.editMessage = input.readBoolean();
this.userId = input.readInt();
this.score = input.readInt();
this.force = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.inlineMessageId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var inlineMessageIdTmp = this.inlineMessageId.getBytes(StandardCharsets.UTF_8);
output.writeInt(inlineMessageIdTmp.length);
output.write(inlineMessageIdTmp);
}
output.writeBoolean(this.editMessage);
output.writeInt(this.userId);
output.writeInt(this.score);
output.writeBoolean(this.force);
}
}
public static class SetLocation extends Function {
public Location location;
public static final int CONSTRUCTOR = 93926257;
public SetLocation() {}
public SetLocation(Location location) {
this.location = location;
}
public SetLocation(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Location.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.location = new Location(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.location == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.location.serialize(output);
}
}
}
public static class SetLogStream extends Function {
public LogStream logStream;
public static final int CONSTRUCTOR = -1364199535;
public SetLogStream() {}
public SetLogStream(LogStream logStream) {
this.logStream = logStream;
}
public SetLogStream(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case LogStreamDefault.CONSTRUCTOR:
this.logStream = new LogStreamDefault(input);
break;
case LogStreamFile.CONSTRUCTOR:
this.logStream = new LogStreamFile(input);
break;
case LogStreamEmpty.CONSTRUCTOR:
this.logStream = new LogStreamEmpty(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.logStream == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.logStream.serialize(output);
}
}
}
public static class SetLogTagVerbosityLevel extends Function {
public String tag;
public int newVerbosityLevel;
public static final int CONSTRUCTOR = -2095589738;
public SetLogTagVerbosityLevel() {}
public SetLogTagVerbosityLevel(String tag, int newVerbosityLevel) {
this.tag = tag;
this.newVerbosityLevel = newVerbosityLevel;
}
public SetLogTagVerbosityLevel(DataInput input) throws IOException {
if (input.readBoolean()) {
var tagTmp = new byte[input.readInt()];
input.readFully(tagTmp);
this.tag = new String(tagTmp, StandardCharsets.UTF_8);
}
this.newVerbosityLevel = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.tag == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var tagTmp = this.tag.getBytes(StandardCharsets.UTF_8);
output.writeInt(tagTmp.length);
output.write(tagTmp);
}
output.writeInt(this.newVerbosityLevel);
}
}
public static class SetLogVerbosityLevel extends Function {
public int newVerbosityLevel;
public static final int CONSTRUCTOR = -303429678;
public SetLogVerbosityLevel() {}
public SetLogVerbosityLevel(int newVerbosityLevel) {
this.newVerbosityLevel = newVerbosityLevel;
}
public SetLogVerbosityLevel(DataInput input) throws IOException {
this.newVerbosityLevel = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.newVerbosityLevel);
}
}
public static class SetName extends Function {
public String firstName;
public String lastName;
public static final int CONSTRUCTOR = 1711693584;
public SetName() {}
public SetName(String firstName, String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
public SetName(DataInput input) throws IOException {
if (input.readBoolean()) {
var firstNameTmp = new byte[input.readInt()];
input.readFully(firstNameTmp);
this.firstName = new String(firstNameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var lastNameTmp = new byte[input.readInt()];
input.readFully(lastNameTmp);
this.lastName = new String(lastNameTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.firstName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var firstNameTmp = this.firstName.getBytes(StandardCharsets.UTF_8);
output.writeInt(firstNameTmp.length);
output.write(firstNameTmp);
}
if (this.lastName == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var lastNameTmp = this.lastName.getBytes(StandardCharsets.UTF_8);
output.writeInt(lastNameTmp.length);
output.write(lastNameTmp);
}
}
}
public static class SetNetworkType extends Function {
public NetworkType type;
public static final int CONSTRUCTOR = -701635234;
public SetNetworkType() {}
public SetNetworkType(NetworkType type) {
this.type = type;
}
public SetNetworkType(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case NetworkTypeNone.CONSTRUCTOR:
this.type = new NetworkTypeNone(input);
break;
case NetworkTypeMobile.CONSTRUCTOR:
this.type = new NetworkTypeMobile(input);
break;
case NetworkTypeMobileRoaming.CONSTRUCTOR:
this.type = new NetworkTypeMobileRoaming(input);
break;
case NetworkTypeWiFi.CONSTRUCTOR:
this.type = new NetworkTypeWiFi(input);
break;
case NetworkTypeOther.CONSTRUCTOR:
this.type = new NetworkTypeOther(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
}
}
public static class SetOption extends Function {
public String name;
public OptionValue value;
public static final int CONSTRUCTOR = 2114670322;
public SetOption() {}
public SetOption(String name, OptionValue value) {
this.name = name;
this.value = value;
}
public SetOption(DataInput input) throws IOException {
if (input.readBoolean()) {
var nameTmp = new byte[input.readInt()];
input.readFully(nameTmp);
this.name = new String(nameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case OptionValueBoolean.CONSTRUCTOR:
this.value = new OptionValueBoolean(input);
break;
case OptionValueEmpty.CONSTRUCTOR:
this.value = new OptionValueEmpty(input);
break;
case OptionValueInteger.CONSTRUCTOR:
this.value = new OptionValueInteger(input);
break;
case OptionValueString.CONSTRUCTOR:
this.value = new OptionValueString(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.name == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nameTmp = this.name.getBytes(StandardCharsets.UTF_8);
output.writeInt(nameTmp.length);
output.write(nameTmp);
}
if (this.value == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.value.serialize(output);
}
}
}
public static class SetPassportElement extends Function {
public InputPassportElement element;
public String password;
public static final int CONSTRUCTOR = 2068173212;
public SetPassportElement() {}
public SetPassportElement(InputPassportElement element, String password) {
this.element = element;
this.password = password;
}
public SetPassportElement(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputPassportElementPersonalDetails.CONSTRUCTOR:
this.element = new InputPassportElementPersonalDetails(input);
break;
case InputPassportElementPassport.CONSTRUCTOR:
this.element = new InputPassportElementPassport(input);
break;
case InputPassportElementDriverLicense.CONSTRUCTOR:
this.element = new InputPassportElementDriverLicense(input);
break;
case InputPassportElementIdentityCard.CONSTRUCTOR:
this.element = new InputPassportElementIdentityCard(input);
break;
case InputPassportElementInternalPassport.CONSTRUCTOR:
this.element = new InputPassportElementInternalPassport(input);
break;
case InputPassportElementAddress.CONSTRUCTOR:
this.element = new InputPassportElementAddress(input);
break;
case InputPassportElementUtilityBill.CONSTRUCTOR:
this.element = new InputPassportElementUtilityBill(input);
break;
case InputPassportElementBankStatement.CONSTRUCTOR:
this.element = new InputPassportElementBankStatement(input);
break;
case InputPassportElementRentalAgreement.CONSTRUCTOR:
this.element = new InputPassportElementRentalAgreement(input);
break;
case InputPassportElementPassportRegistration.CONSTRUCTOR:
this.element = new InputPassportElementPassportRegistration(input);
break;
case InputPassportElementTemporaryRegistration.CONSTRUCTOR:
this.element = new InputPassportElementTemporaryRegistration(input);
break;
case InputPassportElementPhoneNumber.CONSTRUCTOR:
this.element = new InputPassportElementPhoneNumber(input);
break;
case InputPassportElementEmailAddress.CONSTRUCTOR:
this.element = new InputPassportElementEmailAddress(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
var passwordTmp = new byte[input.readInt()];
input.readFully(passwordTmp);
this.password = new String(passwordTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.element == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.element.serialize(output);
}
if (this.password == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var passwordTmp = this.password.getBytes(StandardCharsets.UTF_8);
output.writeInt(passwordTmp.length);
output.write(passwordTmp);
}
}
}
public static class SetPassportElementErrors extends Function {
public int userId;
public InputPassportElementError[] errors;
public static final int CONSTRUCTOR = 1455869875;
public SetPassportElementErrors() {}
public SetPassportElementErrors(int userId, InputPassportElementError[] errors) {
this.userId = userId;
this.errors = errors;
}
public SetPassportElementErrors(DataInput input) throws IOException {
this.userId = input.readInt();
if (input.readBoolean()) {
this.errors = new InputPassportElementError[input.readInt()];
for (int i = 0; i < this.errors.length; i++) {
if (InputPassportElementError.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.errors[i] = new InputPassportElementError(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
if (this.errors == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.errors.length);
for (int i = 0; i < this.errors.length; i++) {
this.errors[i].serialize(output);
}
}
}
}
public static class SetPassword extends Function {
public String oldPassword;
public String newPassword;
public String newHint;
public boolean setRecoveryEmailAddress;
public String newRecoveryEmailAddress;
public static final int CONSTRUCTOR = -1193589027;
public SetPassword() {}
public SetPassword(String oldPassword, String newPassword, String newHint, boolean setRecoveryEmailAddress, String newRecoveryEmailAddress) {
this.oldPassword = oldPassword;
this.newPassword = newPassword;
this.newHint = newHint;
this.setRecoveryEmailAddress = setRecoveryEmailAddress;
this.newRecoveryEmailAddress = newRecoveryEmailAddress;
}
public SetPassword(DataInput input) throws IOException {
if (input.readBoolean()) {
var oldPasswordTmp = new byte[input.readInt()];
input.readFully(oldPasswordTmp);
this.oldPassword = new String(oldPasswordTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var newPasswordTmp = new byte[input.readInt()];
input.readFully(newPasswordTmp);
this.newPassword = new String(newPasswordTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var newHintTmp = new byte[input.readInt()];
input.readFully(newHintTmp);
this.newHint = new String(newHintTmp, StandardCharsets.UTF_8);
}
this.setRecoveryEmailAddress = input.readBoolean();
if (input.readBoolean()) {
var newRecoveryEmailAddressTmp = new byte[input.readInt()];
input.readFully(newRecoveryEmailAddressTmp);
this.newRecoveryEmailAddress = new String(newRecoveryEmailAddressTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.oldPassword == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var oldPasswordTmp = this.oldPassword.getBytes(StandardCharsets.UTF_8);
output.writeInt(oldPasswordTmp.length);
output.write(oldPasswordTmp);
}
if (this.newPassword == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var newPasswordTmp = this.newPassword.getBytes(StandardCharsets.UTF_8);
output.writeInt(newPasswordTmp.length);
output.write(newPasswordTmp);
}
if (this.newHint == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var newHintTmp = this.newHint.getBytes(StandardCharsets.UTF_8);
output.writeInt(newHintTmp.length);
output.write(newHintTmp);
}
output.writeBoolean(this.setRecoveryEmailAddress);
if (this.newRecoveryEmailAddress == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var newRecoveryEmailAddressTmp = this.newRecoveryEmailAddress.getBytes(StandardCharsets.UTF_8);
output.writeInt(newRecoveryEmailAddressTmp.length);
output.write(newRecoveryEmailAddressTmp);
}
}
}
public static class SetPinnedChats extends Function {
public ChatList chatList;
public long[] chatIds;
public static final int CONSTRUCTOR = -695640000;
public SetPinnedChats() {}
public SetPinnedChats(ChatList chatList, long[] chatIds) {
this.chatList = chatList;
this.chatIds = chatIds;
}
public SetPinnedChats(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case ChatListMain.CONSTRUCTOR:
this.chatList = new ChatListMain(input);
break;
case ChatListArchive.CONSTRUCTOR:
this.chatList = new ChatListArchive(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
this.chatIds = new long[input.readInt()];
for (int i = 0; i < this.chatIds.length; i++) {
this.chatIds[i] = input.readLong();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.chatList == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.chatList.serialize(output);
}
if (this.chatIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.chatIds.length);
for (int i = 0; i < this.chatIds.length; i++) {
output.writeLong(this.chatIds[i]);
}
}
}
}
public static class SetPollAnswer extends Function {
public long chatId;
public long messageId;
public int[] optionIds;
public static final int CONSTRUCTOR = -1399388792;
public SetPollAnswer() {}
public SetPollAnswer(long chatId, long messageId, int[] optionIds) {
this.chatId = chatId;
this.messageId = messageId;
this.optionIds = optionIds;
}
public SetPollAnswer(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
if (input.readBoolean()) {
this.optionIds = new int[input.readInt()];
for (int i = 0; i < this.optionIds.length; i++) {
this.optionIds[i] = input.readInt();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
if (this.optionIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.optionIds.length);
for (int i = 0; i < this.optionIds.length; i++) {
output.writeInt(this.optionIds[i]);
}
}
}
}
public static class SetProfilePhoto extends Function {
public InputFile photo;
public static final int CONSTRUCTOR = 1594734550;
public SetProfilePhoto() {}
public SetProfilePhoto(InputFile photo) {
this.photo = photo;
}
public SetProfilePhoto(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.photo = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.photo = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.photo = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.photo = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.photo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.photo.serialize(output);
}
}
}
public static class SetRecoveryEmailAddress extends Function {
public String password;
public String newRecoveryEmailAddress;
public static final int CONSTRUCTOR = -1981836385;
public SetRecoveryEmailAddress() {}
public SetRecoveryEmailAddress(String password, String newRecoveryEmailAddress) {
this.password = password;
this.newRecoveryEmailAddress = newRecoveryEmailAddress;
}
public SetRecoveryEmailAddress(DataInput input) throws IOException {
if (input.readBoolean()) {
var passwordTmp = new byte[input.readInt()];
input.readFully(passwordTmp);
this.password = new String(passwordTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
var newRecoveryEmailAddressTmp = new byte[input.readInt()];
input.readFully(newRecoveryEmailAddressTmp);
this.newRecoveryEmailAddress = new String(newRecoveryEmailAddressTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.password == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var passwordTmp = this.password.getBytes(StandardCharsets.UTF_8);
output.writeInt(passwordTmp.length);
output.write(passwordTmp);
}
if (this.newRecoveryEmailAddress == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var newRecoveryEmailAddressTmp = this.newRecoveryEmailAddress.getBytes(StandardCharsets.UTF_8);
output.writeInt(newRecoveryEmailAddressTmp.length);
output.write(newRecoveryEmailAddressTmp);
}
}
}
public static class SetScopeNotificationSettings extends Function {
public NotificationSettingsScope scope;
public ScopeNotificationSettings notificationSettings;
public static final int CONSTRUCTOR = -2049984966;
public SetScopeNotificationSettings() {}
public SetScopeNotificationSettings(NotificationSettingsScope scope, ScopeNotificationSettings notificationSettings) {
this.scope = scope;
this.notificationSettings = notificationSettings;
}
public SetScopeNotificationSettings(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case NotificationSettingsScopePrivateChats.CONSTRUCTOR:
this.scope = new NotificationSettingsScopePrivateChats(input);
break;
case NotificationSettingsScopeGroupChats.CONSTRUCTOR:
this.scope = new NotificationSettingsScopeGroupChats(input);
break;
case NotificationSettingsScopeChannelChats.CONSTRUCTOR:
this.scope = new NotificationSettingsScopeChannelChats(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
if (ScopeNotificationSettings.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.notificationSettings = new ScopeNotificationSettings(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.scope == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.scope.serialize(output);
}
if (this.notificationSettings == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.notificationSettings.serialize(output);
}
}
}
public static class SetStickerPositionInSet extends Function {
public InputFile sticker;
public int position;
public static final int CONSTRUCTOR = 2075281185;
public SetStickerPositionInSet() {}
public SetStickerPositionInSet(InputFile sticker, int position) {
this.sticker = sticker;
this.position = position;
}
public SetStickerPositionInSet(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.sticker = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.sticker = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.sticker = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.sticker = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.position = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.sticker == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.sticker.serialize(output);
}
output.writeInt(this.position);
}
}
public static class SetStickerSetThumbnail extends Function {
public int userId;
public String name;
public InputFile thumbnail;
public static final int CONSTRUCTOR = -1694737404;
public SetStickerSetThumbnail() {}
public SetStickerSetThumbnail(int userId, String name, InputFile thumbnail) {
this.userId = userId;
this.name = name;
this.thumbnail = thumbnail;
}
public SetStickerSetThumbnail(DataInput input) throws IOException {
this.userId = input.readInt();
if (input.readBoolean()) {
var nameTmp = new byte[input.readInt()];
input.readFully(nameTmp);
this.name = new String(nameTmp, StandardCharsets.UTF_8);
}
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.thumbnail = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.thumbnail = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.thumbnail = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.thumbnail = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
if (this.name == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var nameTmp = this.name.getBytes(StandardCharsets.UTF_8);
output.writeInt(nameTmp.length);
output.write(nameTmp);
}
if (this.thumbnail == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.thumbnail.serialize(output);
}
}
}
public static class SetSupergroupStickerSet extends Function {
public int supergroupId;
public long stickerSetId;
public static final int CONSTRUCTOR = -295782298;
public SetSupergroupStickerSet() {}
public SetSupergroupStickerSet(int supergroupId, long stickerSetId) {
this.supergroupId = supergroupId;
this.stickerSetId = stickerSetId;
}
public SetSupergroupStickerSet(DataInput input) throws IOException {
this.supergroupId = input.readInt();
this.stickerSetId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.supergroupId);
output.writeLong(this.stickerSetId);
}
}
public static class SetSupergroupUsername extends Function {
public int supergroupId;
public String username;
public static final int CONSTRUCTOR = -1428333122;
public SetSupergroupUsername() {}
public SetSupergroupUsername(int supergroupId, String username) {
this.supergroupId = supergroupId;
this.username = username;
}
public SetSupergroupUsername(DataInput input) throws IOException {
this.supergroupId = input.readInt();
if (input.readBoolean()) {
var usernameTmp = new byte[input.readInt()];
input.readFully(usernameTmp);
this.username = new String(usernameTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.supergroupId);
if (this.username == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var usernameTmp = this.username.getBytes(StandardCharsets.UTF_8);
output.writeInt(usernameTmp.length);
output.write(usernameTmp);
}
}
}
public static class SetTdlibParameters extends Function {
public TdlibParameters parameters;
public static final int CONSTRUCTOR = -1912557997;
public SetTdlibParameters() {}
public SetTdlibParameters(TdlibParameters parameters) {
this.parameters = parameters;
}
public SetTdlibParameters(DataInput input) throws IOException {
if (input.readBoolean()) {
if (TdlibParameters.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.parameters = new TdlibParameters(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.parameters == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.parameters.serialize(output);
}
}
}
public static class SetUserPrivacySettingRules extends Function {
public UserPrivacySetting setting;
public UserPrivacySettingRules rules;
public static final int CONSTRUCTOR = -473812741;
public SetUserPrivacySettingRules() {}
public SetUserPrivacySettingRules(UserPrivacySetting setting, UserPrivacySettingRules rules) {
this.setting = setting;
this.rules = rules;
}
public SetUserPrivacySettingRules(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case UserPrivacySettingShowStatus.CONSTRUCTOR:
this.setting = new UserPrivacySettingShowStatus(input);
break;
case UserPrivacySettingShowProfilePhoto.CONSTRUCTOR:
this.setting = new UserPrivacySettingShowProfilePhoto(input);
break;
case UserPrivacySettingShowLinkInForwardedMessages.CONSTRUCTOR:
this.setting = new UserPrivacySettingShowLinkInForwardedMessages(input);
break;
case UserPrivacySettingShowPhoneNumber.CONSTRUCTOR:
this.setting = new UserPrivacySettingShowPhoneNumber(input);
break;
case UserPrivacySettingAllowChatInvites.CONSTRUCTOR:
this.setting = new UserPrivacySettingAllowChatInvites(input);
break;
case UserPrivacySettingAllowCalls.CONSTRUCTOR:
this.setting = new UserPrivacySettingAllowCalls(input);
break;
case UserPrivacySettingAllowPeerToPeerCalls.CONSTRUCTOR:
this.setting = new UserPrivacySettingAllowPeerToPeerCalls(input);
break;
case UserPrivacySettingAllowFindingByPhoneNumber.CONSTRUCTOR:
this.setting = new UserPrivacySettingAllowFindingByPhoneNumber(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
if (UserPrivacySettingRules.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.rules = new UserPrivacySettingRules(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.setting == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.setting.serialize(output);
}
if (this.rules == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.rules.serialize(output);
}
}
}
public static class SetUsername extends Function {
public String username;
public static final int CONSTRUCTOR = 439901214;
public SetUsername() {}
public SetUsername(String username) {
this.username = username;
}
public SetUsername(DataInput input) throws IOException {
if (input.readBoolean()) {
var usernameTmp = new byte[input.readInt()];
input.readFully(usernameTmp);
this.username = new String(usernameTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.username == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var usernameTmp = this.username.getBytes(StandardCharsets.UTF_8);
output.writeInt(usernameTmp.length);
output.write(usernameTmp);
}
}
}
public static class SharePhoneNumber extends Function {
public int userId;
public static final int CONSTRUCTOR = -370669878;
public SharePhoneNumber() {}
public SharePhoneNumber(int userId) {
this.userId = userId;
}
public SharePhoneNumber(DataInput input) throws IOException {
this.userId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
}
}
public static class StopPoll extends Function {
public long chatId;
public long messageId;
public ReplyMarkup replyMarkup;
public static final int CONSTRUCTOR = 1659374253;
public StopPoll() {}
public StopPoll(long chatId, long messageId, ReplyMarkup replyMarkup) {
this.chatId = chatId;
this.messageId = messageId;
this.replyMarkup = replyMarkup;
}
public StopPoll(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
if (input.readBoolean()) {
switch(input.readInt()) {
case ReplyMarkupRemoveKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupRemoveKeyboard(input);
break;
case ReplyMarkupForceReply.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupForceReply(input);
break;
case ReplyMarkupShowKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupShowKeyboard(input);
break;
case ReplyMarkupInlineKeyboard.CONSTRUCTOR:
this.replyMarkup = new ReplyMarkupInlineKeyboard(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
if (this.replyMarkup == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.replyMarkup.serialize(output);
}
}
}
public static class SynchronizeLanguagePack extends Function {
public String languagePackId;
public static final int CONSTRUCTOR = -2065307858;
public SynchronizeLanguagePack() {}
public SynchronizeLanguagePack(String languagePackId) {
this.languagePackId = languagePackId;
}
public SynchronizeLanguagePack(DataInput input) throws IOException {
if (input.readBoolean()) {
var languagePackIdTmp = new byte[input.readInt()];
input.readFully(languagePackIdTmp);
this.languagePackId = new String(languagePackIdTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.languagePackId == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var languagePackIdTmp = this.languagePackId.getBytes(StandardCharsets.UTF_8);
output.writeInt(languagePackIdTmp.length);
output.write(languagePackIdTmp);
}
}
}
public static class TerminateAllOtherSessions extends Function {
public static final int CONSTRUCTOR = 1874485523;
public TerminateAllOtherSessions() {}
public TerminateAllOtherSessions(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TerminateSession extends Function {
public long sessionId;
public static final int CONSTRUCTOR = -407385812;
public TerminateSession() {}
public TerminateSession(long sessionId) {
this.sessionId = sessionId;
}
public TerminateSession(DataInput input) throws IOException {
this.sessionId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.sessionId);
}
}
public static class TestCallBytes extends Function {
public byte[] x;
public static final int CONSTRUCTOR = -736011607;
public TestCallBytes() {}
public TestCallBytes(byte[] x) {
this.x = x;
}
public TestCallBytes(DataInput input) throws IOException {
if (input.readBoolean()) {
this.x = new byte[input.readInt()];
input.readFully(this.x);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.x == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.x.length);
output.write(this.x);
}
}
}
public static class TestCallEmpty extends Function {
public static final int CONSTRUCTOR = -627291626;
public TestCallEmpty() {}
public TestCallEmpty(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TestCallString extends Function {
public String x;
public static final int CONSTRUCTOR = -1732818385;
public TestCallString() {}
public TestCallString(String x) {
this.x = x;
}
public TestCallString(DataInput input) throws IOException {
if (input.readBoolean()) {
var xTmp = new byte[input.readInt()];
input.readFully(xTmp);
this.x = new String(xTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.x == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var xTmp = this.x.getBytes(StandardCharsets.UTF_8);
output.writeInt(xTmp.length);
output.write(xTmp);
}
}
}
public static class TestCallVectorInt extends Function {
public int[] x;
public static final int CONSTRUCTOR = -2137277793;
public TestCallVectorInt() {}
public TestCallVectorInt(int[] x) {
this.x = x;
}
public TestCallVectorInt(DataInput input) throws IOException {
if (input.readBoolean()) {
this.x = new int[input.readInt()];
for (int i = 0; i < this.x.length; i++) {
this.x[i] = input.readInt();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.x == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.x.length);
for (int i = 0; i < this.x.length; i++) {
output.writeInt(this.x[i]);
}
}
}
}
public static class TestCallVectorIntObject extends Function {
public TestInt[] x;
public static final int CONSTRUCTOR = 1825428218;
public TestCallVectorIntObject() {}
public TestCallVectorIntObject(TestInt[] x) {
this.x = x;
}
public TestCallVectorIntObject(DataInput input) throws IOException {
if (input.readBoolean()) {
this.x = new TestInt[input.readInt()];
for (int i = 0; i < this.x.length; i++) {
if (TestInt.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.x[i] = new TestInt(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.x == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.x.length);
for (int i = 0; i < this.x.length; i++) {
this.x[i].serialize(output);
}
}
}
}
public static class TestCallVectorString extends Function {
public String[] x;
public static final int CONSTRUCTOR = -408600900;
public TestCallVectorString() {}
public TestCallVectorString(String[] x) {
this.x = x;
}
public TestCallVectorString(DataInput input) throws IOException {
if (input.readBoolean()) {
this.x = new String[input.readInt()];
for (int i = 0; i < this.x.length; i++) {
var xTmp = new byte[input.readInt()];
input.readFully(xTmp);
this.x[i] = new String(xTmp, StandardCharsets.UTF_8);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.x == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.x.length);
for (int i = 0; i < this.x.length; i++) {
var xTmp = this.x[i].getBytes(StandardCharsets.UTF_8);
output.writeInt(xTmp.length);
output.write(xTmp);
}
}
}
}
public static class TestCallVectorStringObject extends Function {
public TestString[] x;
public static final int CONSTRUCTOR = 1527666429;
public TestCallVectorStringObject() {}
public TestCallVectorStringObject(TestString[] x) {
this.x = x;
}
public TestCallVectorStringObject(DataInput input) throws IOException {
if (input.readBoolean()) {
this.x = new TestString[input.readInt()];
for (int i = 0; i < this.x.length; i++) {
if (TestString.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.x[i] = new TestString(input);
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.x == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.x.length);
for (int i = 0; i < this.x.length; i++) {
this.x[i].serialize(output);
}
}
}
}
public static class TestGetDifference extends Function {
public static final int CONSTRUCTOR = 1747084069;
public TestGetDifference() {}
public TestGetDifference(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TestNetwork extends Function {
public static final int CONSTRUCTOR = -1343998901;
public TestNetwork() {}
public TestNetwork(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class TestProxy extends Function {
public String server;
public int port;
public ProxyType type;
public int dcId;
public double timeout;
public static final int CONSTRUCTOR = -1197366626;
public TestProxy() {}
public TestProxy(String server, int port, ProxyType type, int dcId, double timeout) {
this.server = server;
this.port = port;
this.type = type;
this.dcId = dcId;
this.timeout = timeout;
}
public TestProxy(DataInput input) throws IOException {
if (input.readBoolean()) {
var serverTmp = new byte[input.readInt()];
input.readFully(serverTmp);
this.server = new String(serverTmp, StandardCharsets.UTF_8);
}
this.port = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case ProxyTypeSocks5.CONSTRUCTOR:
this.type = new ProxyTypeSocks5(input);
break;
case ProxyTypeHttp.CONSTRUCTOR:
this.type = new ProxyTypeHttp(input);
break;
case ProxyTypeMtproto.CONSTRUCTOR:
this.type = new ProxyTypeMtproto(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.dcId = input.readInt();
this.timeout = input.readDouble();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.server == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var serverTmp = this.server.getBytes(StandardCharsets.UTF_8);
output.writeInt(serverTmp.length);
output.write(serverTmp);
}
output.writeInt(this.port);
if (this.type == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.type.serialize(output);
}
output.writeInt(this.dcId);
output.writeDouble(this.timeout);
}
}
public static class TestReturnError extends Function {
public Error error;
public static final int CONSTRUCTOR = 455179506;
public TestReturnError() {}
public TestReturnError(Error error) {
this.error = error;
}
public TestReturnError(DataInput input) throws IOException {
if (input.readBoolean()) {
if (Error.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.error = new Error(input);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.error == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.error.serialize(output);
}
}
}
public static class TestSquareInt extends Function {
public int x;
public static final int CONSTRUCTOR = -60135024;
public TestSquareInt() {}
public TestSquareInt(int x) {
this.x = x;
}
public TestSquareInt(DataInput input) throws IOException {
this.x = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.x);
}
}
public static class TestUseUpdate extends Function {
public static final int CONSTRUCTOR = 717094686;
public TestUseUpdate() {}
public TestUseUpdate(DataInput input) throws IOException {
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
}
}
public static class ToggleChatDefaultDisableNotification extends Function {
public long chatId;
public boolean defaultDisableNotification;
public static final int CONSTRUCTOR = 314794002;
public ToggleChatDefaultDisableNotification() {}
public ToggleChatDefaultDisableNotification(long chatId, boolean defaultDisableNotification) {
this.chatId = chatId;
this.defaultDisableNotification = defaultDisableNotification;
}
public ToggleChatDefaultDisableNotification(DataInput input) throws IOException {
this.chatId = input.readLong();
this.defaultDisableNotification = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeBoolean(this.defaultDisableNotification);
}
}
public static class ToggleChatIsMarkedAsUnread extends Function {
public long chatId;
public boolean isMarkedAsUnread;
public static final int CONSTRUCTOR = -986129697;
public ToggleChatIsMarkedAsUnread() {}
public ToggleChatIsMarkedAsUnread(long chatId, boolean isMarkedAsUnread) {
this.chatId = chatId;
this.isMarkedAsUnread = isMarkedAsUnread;
}
public ToggleChatIsMarkedAsUnread(DataInput input) throws IOException {
this.chatId = input.readLong();
this.isMarkedAsUnread = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeBoolean(this.isMarkedAsUnread);
}
}
public static class ToggleChatIsPinned extends Function {
public long chatId;
public boolean isPinned;
public static final int CONSTRUCTOR = -1166802621;
public ToggleChatIsPinned() {}
public ToggleChatIsPinned(long chatId, boolean isPinned) {
this.chatId = chatId;
this.isPinned = isPinned;
}
public ToggleChatIsPinned(DataInput input) throws IOException {
this.chatId = input.readLong();
this.isPinned = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeBoolean(this.isPinned);
}
}
public static class ToggleSupergroupIsAllHistoryAvailable extends Function {
public int supergroupId;
public boolean isAllHistoryAvailable;
public static final int CONSTRUCTOR = 1701526555;
public ToggleSupergroupIsAllHistoryAvailable() {}
public ToggleSupergroupIsAllHistoryAvailable(int supergroupId, boolean isAllHistoryAvailable) {
this.supergroupId = supergroupId;
this.isAllHistoryAvailable = isAllHistoryAvailable;
}
public ToggleSupergroupIsAllHistoryAvailable(DataInput input) throws IOException {
this.supergroupId = input.readInt();
this.isAllHistoryAvailable = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.supergroupId);
output.writeBoolean(this.isAllHistoryAvailable);
}
}
public static class ToggleSupergroupSignMessages extends Function {
public int supergroupId;
public boolean signMessages;
public static final int CONSTRUCTOR = -558196581;
public ToggleSupergroupSignMessages() {}
public ToggleSupergroupSignMessages(int supergroupId, boolean signMessages) {
this.supergroupId = supergroupId;
this.signMessages = signMessages;
}
public ToggleSupergroupSignMessages(DataInput input) throws IOException {
this.supergroupId = input.readInt();
this.signMessages = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.supergroupId);
output.writeBoolean(this.signMessages);
}
}
public static class TransferChatOwnership extends Function {
public long chatId;
public int userId;
public String password;
public static final int CONSTRUCTOR = -1925047127;
public TransferChatOwnership() {}
public TransferChatOwnership(long chatId, int userId, String password) {
this.chatId = chatId;
this.userId = userId;
this.password = password;
}
public TransferChatOwnership(DataInput input) throws IOException {
this.chatId = input.readLong();
this.userId = input.readInt();
if (input.readBoolean()) {
var passwordTmp = new byte[input.readInt()];
input.readFully(passwordTmp);
this.password = new String(passwordTmp, StandardCharsets.UTF_8);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeInt(this.userId);
if (this.password == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
var passwordTmp = this.password.getBytes(StandardCharsets.UTF_8);
output.writeInt(passwordTmp.length);
output.write(passwordTmp);
}
}
}
public static class UnblockUser extends Function {
public int userId;
public static final int CONSTRUCTOR = -307286367;
public UnblockUser() {}
public UnblockUser(int userId) {
this.userId = userId;
}
public UnblockUser(DataInput input) throws IOException {
this.userId = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
}
}
public static class UnpinChatMessage extends Function {
public long chatId;
public static final int CONSTRUCTOR = 277557690;
public UnpinChatMessage() {}
public UnpinChatMessage(long chatId) {
this.chatId = chatId;
}
public UnpinChatMessage(DataInput input) throws IOException {
this.chatId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
}
}
public static class UpgradeBasicGroupChatToSupergroupChat extends Function {
public long chatId;
public static final int CONSTRUCTOR = 300488122;
public UpgradeBasicGroupChatToSupergroupChat() {}
public UpgradeBasicGroupChatToSupergroupChat(long chatId) {
this.chatId = chatId;
}
public UpgradeBasicGroupChatToSupergroupChat(DataInput input) throws IOException {
this.chatId = input.readLong();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
}
}
public static class UploadFile extends Function {
public InputFile file;
public FileType fileType;
public int priority;
public static final int CONSTRUCTOR = -745597786;
public UploadFile() {}
public UploadFile(InputFile file, FileType fileType, int priority) {
this.file = file;
this.fileType = fileType;
this.priority = priority;
}
public UploadFile(DataInput input) throws IOException {
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.file = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.file = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.file = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.file = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
if (input.readBoolean()) {
switch(input.readInt()) {
case FileTypeNone.CONSTRUCTOR:
this.fileType = new FileTypeNone(input);
break;
case FileTypeAnimation.CONSTRUCTOR:
this.fileType = new FileTypeAnimation(input);
break;
case FileTypeAudio.CONSTRUCTOR:
this.fileType = new FileTypeAudio(input);
break;
case FileTypeDocument.CONSTRUCTOR:
this.fileType = new FileTypeDocument(input);
break;
case FileTypePhoto.CONSTRUCTOR:
this.fileType = new FileTypePhoto(input);
break;
case FileTypeProfilePhoto.CONSTRUCTOR:
this.fileType = new FileTypeProfilePhoto(input);
break;
case FileTypeSecret.CONSTRUCTOR:
this.fileType = new FileTypeSecret(input);
break;
case FileTypeSecretThumbnail.CONSTRUCTOR:
this.fileType = new FileTypeSecretThumbnail(input);
break;
case FileTypeSecure.CONSTRUCTOR:
this.fileType = new FileTypeSecure(input);
break;
case FileTypeSticker.CONSTRUCTOR:
this.fileType = new FileTypeSticker(input);
break;
case FileTypeThumbnail.CONSTRUCTOR:
this.fileType = new FileTypeThumbnail(input);
break;
case FileTypeUnknown.CONSTRUCTOR:
this.fileType = new FileTypeUnknown(input);
break;
case FileTypeVideo.CONSTRUCTOR:
this.fileType = new FileTypeVideo(input);
break;
case FileTypeVideoNote.CONSTRUCTOR:
this.fileType = new FileTypeVideoNote(input);
break;
case FileTypeVoiceNote.CONSTRUCTOR:
this.fileType = new FileTypeVoiceNote(input);
break;
case FileTypeWallpaper.CONSTRUCTOR:
this.fileType = new FileTypeWallpaper(input);
break;
default:
throw new UnsupportedOperationException();
}
}
this.priority = input.readInt();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.file == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.file.serialize(output);
}
if (this.fileType == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.fileType.serialize(output);
}
output.writeInt(this.priority);
}
}
public static class UploadStickerFile extends Function {
public int userId;
public InputFile pngSticker;
public static final int CONSTRUCTOR = 1134087551;
public UploadStickerFile() {}
public UploadStickerFile(int userId, InputFile pngSticker) {
this.userId = userId;
this.pngSticker = pngSticker;
}
public UploadStickerFile(DataInput input) throws IOException {
this.userId = input.readInt();
if (input.readBoolean()) {
switch(input.readInt()) {
case InputFileId.CONSTRUCTOR:
this.pngSticker = new InputFileId(input);
break;
case InputFileRemote.CONSTRUCTOR:
this.pngSticker = new InputFileRemote(input);
break;
case InputFileLocal.CONSTRUCTOR:
this.pngSticker = new InputFileLocal(input);
break;
case InputFileGenerated.CONSTRUCTOR:
this.pngSticker = new InputFileGenerated(input);
break;
default:
throw new UnsupportedOperationException();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeInt(this.userId);
if (this.pngSticker == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.pngSticker.serialize(output);
}
}
}
public static class ValidateOrderInfo extends Function {
public long chatId;
public long messageId;
public OrderInfo orderInfo;
public boolean allowSave;
public static final int CONSTRUCTOR = 9480644;
public ValidateOrderInfo() {}
public ValidateOrderInfo(long chatId, long messageId, OrderInfo orderInfo, boolean allowSave) {
this.chatId = chatId;
this.messageId = messageId;
this.orderInfo = orderInfo;
this.allowSave = allowSave;
}
public ValidateOrderInfo(DataInput input) throws IOException {
this.chatId = input.readLong();
this.messageId = input.readLong();
if (input.readBoolean()) {
if (OrderInfo.CONSTRUCTOR != input.readInt()) {
throw new UnsupportedOperationException();
}
this.orderInfo = new OrderInfo(input);
}
this.allowSave = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
output.writeLong(this.messageId);
if (this.orderInfo == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
this.orderInfo.serialize(output);
}
output.writeBoolean(this.allowSave);
}
}
public static class ViewMessages extends Function {
public long chatId;
public long[] messageIds;
public boolean forceRead;
public static final int CONSTRUCTOR = -1925784915;
public ViewMessages() {}
public ViewMessages(long chatId, long[] messageIds, boolean forceRead) {
this.chatId = chatId;
this.messageIds = messageIds;
this.forceRead = forceRead;
}
public ViewMessages(DataInput input) throws IOException {
this.chatId = input.readLong();
if (input.readBoolean()) {
this.messageIds = new long[input.readInt()];
for (int i = 0; i < this.messageIds.length; i++) {
this.messageIds[i] = input.readLong();
}
}
this.forceRead = input.readBoolean();
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.chatId);
if (this.messageIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.messageIds.length);
for (int i = 0; i < this.messageIds.length; i++) {
output.writeLong(this.messageIds[i]);
}
}
output.writeBoolean(this.forceRead);
}
}
public static class ViewTrendingStickerSets extends Function {
public long[] stickerSetIds;
public static final int CONSTRUCTOR = -952416520;
public ViewTrendingStickerSets() {}
public ViewTrendingStickerSets(long[] stickerSetIds) {
this.stickerSetIds = stickerSetIds;
}
public ViewTrendingStickerSets(DataInput input) throws IOException {
if (input.readBoolean()) {
this.stickerSetIds = new long[input.readInt()];
for (int i = 0; i < this.stickerSetIds.length; i++) {
this.stickerSetIds[i] = input.readLong();
}
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
if (this.stickerSetIds == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.stickerSetIds.length);
for (int i = 0; i < this.stickerSetIds.length; i++) {
output.writeLong(this.stickerSetIds[i]);
}
}
}
}
public static class WriteGeneratedFilePart extends Function {
public long generationId;
public int offset;
public byte[] data;
public static final int CONSTRUCTOR = -2062358189;
public WriteGeneratedFilePart() {}
public WriteGeneratedFilePart(long generationId, int offset, byte[] data) {
this.generationId = generationId;
this.offset = offset;
this.data = data;
}
public WriteGeneratedFilePart(DataInput input) throws IOException {
this.generationId = input.readLong();
this.offset = input.readInt();
if (input.readBoolean()) {
this.data = new byte[input.readInt()];
input.readFully(this.data);
}
}
public int getConstructor() {
return CONSTRUCTOR;
}
public void serialize(DataOutputStream output) throws IOException {
output.writeInt(CONSTRUCTOR);
output.writeLong(this.generationId);
output.writeInt(this.offset);
if (this.data == null) {
output.writeBoolean(false);
} else {
output.writeBoolean(true);
output.writeInt(this.data.length);
output.write(this.data);
}
}
}
}