diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..b04161ea4f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,15 @@ +# Linguist overrides for vendored code +submodules/AsyncDisplayKit/* linguist-vendored +submodules/ffmpeg/* linguist-vendored +submodules/HockeySDK-iOS/* linguist-vendored +submodules/libphonenumber/* linguist-vendored +submodules/libtgvoip/* linguist-vendored +submodules/lottie-ios/* linguist-vendored +submodules/Opus/* linguist-vendored +submodules/OpusBinding/* linguist-vendored +submodules/rlottie/rlottie/* linguist-vendored +submodules/sqlcipher/* linguist-vendored +submodules/Stripe/* linguist-vendored +submodules/ton/tonlib-src/* linguist-vendored +submodules/webp/include/* linguist-vendored +third-party/* linguist-vendored diff --git a/Telegram/Telegram-iOS/Resources/Cop.tgs b/Telegram/Telegram-iOS/Resources/Cop.tgs index 628778efe1..02d5a9de67 100644 Binary files a/Telegram/Telegram-iOS/Resources/Cop.tgs and b/Telegram/Telegram-iOS/Resources/Cop.tgs differ diff --git a/Telegram/Telegram-iOS/Resources/PoliceCar.tgs b/Telegram/Telegram-iOS/Resources/PoliceCar.tgs index 703800f4fc..7c78896b37 100644 Binary files a/Telegram/Telegram-iOS/Resources/PoliceCar.tgs and b/Telegram/Telegram-iOS/Resources/PoliceCar.tgs differ diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index 286b4c862d..b809e72f6b 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -5838,6 +5838,7 @@ Sorry for the inconvenience."; "InviteLink.PeopleJoined_many" = "%@ people joined"; "InviteLink.PeopleJoined_any" = "%@ people joined"; "InviteLink.CreatePrivateLinkHelp" = "Anyone who has Telegram installed will be able to join your group by following this link."; +"InviteLink.CreatePrivateLinkHelpChannel" = "Anyone who has Telegram installed will be able to join your channel by following this link."; "InviteLink.Manage" = "Manage Invite Links"; "InviteLink.PeopleJoinedShortNoneExpired" = "no one joined"; @@ -5899,6 +5900,7 @@ Sorry for the inconvenience."; "InviteLink.QRCode.Title" = "Invite by QR Code"; "InviteLink.QRCode.Info" = "Everyone on Telegram can scan this code to join your group."; +"InviteLink.QRCode.InfoChannel" = "Everyone on Telegram can scan this code to join your channel."; "InviteLink.QRCode.Share" = "Share QR Code"; "InviteLink.InviteLink" = "Invite Link"; @@ -6021,6 +6023,9 @@ Sorry for the inconvenience."; "Channel.AdminLog.DeletedInviteLink" = "%1$@ deleted invite link %2$@"; "Channel.AdminLog.RevokedInviteLink" = "%1$@ revoked invite link %2$@"; "Channel.AdminLog.EditedInviteLink" = "%1$@ edited invite link %2$@"; +"Channel.AdminLog.CreatedInviteLink" = "%1$@ created invite link %2$@"; + +"Channel.AdminLog.JoinedViaInviteLink" = "%1$@ joined via invite link %2$@"; "GroupInfo.Permissions.BroadcastTitle" = "Broadcast Channel"; "GroupInfo.Permissions.BroadcastConvert" = "Convert Group to Channel"; @@ -6056,7 +6061,6 @@ Sorry for the inconvenience."; "Report.Report" = "Report"; "Report.Succeed" = "Telegram moderators will study your report. Thank you!"; - "Conversation.AutoremoveRemainingTime" = "auto-delete in %@"; "Conversation.AutoremoveRemainingDays_1" = "auto-delete in %@ day"; "Conversation.AutoremoveRemainingDays_any" = "auto-delete in %@ days"; @@ -6066,3 +6070,7 @@ Sorry for the inconvenience."; "Conversation.AutoremoveChanged" = "Auto-Delete timer set to %@"; +"PeerInfo.ReportProfilePhoto" = "Report Profile Photo"; +"PeerInfo.ReportProfileVideo" = "Report Profile Video"; + +"Channel.AdminLog.CanInviteUsersViaLink" = "Invite Users via Link"; diff --git a/Telegram/Watch/App/Base.lproj/Interface.storyboard b/Telegram/Watch/App/Base.lproj/Interface.storyboard index 1aba2ec72a..09d24ccde3 100644 --- a/Telegram/Watch/App/Base.lproj/Interface.storyboard +++ b/Telegram/Watch/App/Base.lproj/Interface.storyboard @@ -1,9 +1,9 @@ - + - - + + @@ -1569,11 +1569,445 @@ contacts found. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/submodules/AnimatedStickerNode/Sources/FitzModifier.swift b/submodules/AnimatedStickerNode/Sources/FitzModifier.swift index b033905a2c..45efaf876f 100644 --- a/submodules/AnimatedStickerNode/Sources/FitzModifier.swift +++ b/submodules/AnimatedStickerNode/Sources/FitzModifier.swift @@ -10,15 +10,15 @@ public func transformedWithFitzModifier(data: Data, fitzModifier: EmojiFitzModif let replacementColors: [UIColor] switch fitzModifier { case .type12: - replacementColors = [0xca907a, 0xedc5a5, 0xf7e3c3, 0xfbefd6].map { UIColor(rgb: $0) } + replacementColors = [0xcb7b55, 0xf6b689, 0xffcda7, 0xffdfc5].map { UIColor(rgb: $0) } case .type3: - replacementColors = [0xaa7c60, 0xc8a987, 0xddc89f, 0xe6d6b2].map { UIColor(rgb: $0) } + replacementColors = [0xa45a38, 0xdf986b, 0xedb183, 0xf4c3a0].map { UIColor(rgb: $0) } case .type4: - replacementColors = [0x8c6148, 0xad8562, 0xc49e76, 0xd4b188].map { UIColor(rgb: $0) } + replacementColors = [0x703a17, 0xab673d, 0xc37f4e, 0xd89667].map { UIColor(rgb: $0) } case .type5: - replacementColors = [0x6e3c2c, 0x925a34, 0xa16e46, 0xac7a52].map { UIColor(rgb: $0) } + replacementColors = [0x4a2409, 0x7d3e0e, 0x965529, 0xa96337].map { UIColor(rgb: $0) } case .type6: - replacementColors = [0x291c12, 0x472a22, 0x573b30, 0x68493c].map { UIColor(rgb: $0) } + replacementColors = [0x200f0a, 0x412924, 0x593d37, 0x63453f].map { UIColor(rgb: $0) } } func colorToString(_ color: UIColor) -> String { diff --git a/submodules/ChatListUI/Sources/ChatListSearchContainerNode.swift b/submodules/ChatListUI/Sources/ChatListSearchContainerNode.swift index 8f16e7ec4c..7374790e2a 100644 --- a/submodules/ChatListUI/Sources/ChatListSearchContainerNode.swift +++ b/submodules/ChatListUI/Sources/ChatListSearchContainerNode.swift @@ -835,7 +835,6 @@ public final class ChatListSearchContainerNode: SearchDisplayControllerContentNo items.append(ActionSheetButtonItem(title: globalTitle, color: .destructive, action: { [weak actionSheet] in actionSheet?.dismissAnimated() if let strongSelf = self { -// strongSelf.headerNode.navigationButtonContainer.performAction?(.selectionDone) let _ = deleteMessagesInteractively(account: strongSelf.context.account, messageIds: Array(messageIds), type: .forEveryone).start() strongSelf.updateState { state in @@ -859,7 +858,6 @@ public final class ChatListSearchContainerNode: SearchDisplayControllerContentNo items.append(ActionSheetButtonItem(title: localOptionText, color: .destructive, action: { [weak actionSheet] in actionSheet?.dismissAnimated() if let strongSelf = self { -// strongSelf.headerNode.navigationButtonContainer.performAction?(.selectionDone) let _ = deleteMessagesInteractively(account: strongSelf.context.account, messageIds: Array(messageIds), type: .forLocalPeer).start() strongSelf.updateState { state in diff --git a/submodules/DatePickerNode/Sources/DatePickerNode.swift b/submodules/DatePickerNode/Sources/DatePickerNode.swift index 852d8b78c2..49cb6b18b3 100644 --- a/submodules/DatePickerNode/Sources/DatePickerNode.swift +++ b/submodules/DatePickerNode/Sources/DatePickerNode.swift @@ -307,23 +307,6 @@ public final class DatePickerNode: ASDisplayNode { public var valueUpdated: ((Date) -> Void)? - public var maximumDate: Date { - get { - return self.state.maxDate - } - set { - guard newValue != self.maximumDate else { - return - } - - let updatedState = State(minDate: self.state.minDate, maxDate: newValue, date: self.state.date, displayingMonthSelection: self.state.displayingMonthSelection, selectedMonth: self.state.selectedMonth) - self.updateState(updatedState, animated: false) - - if let size = self.validLayout { - let _ = self.updateLayout(size: size, transition: .immediate) - } - } - } public var minimumDate: Date { get { return self.state.minDate @@ -336,11 +319,34 @@ public final class DatePickerNode: ASDisplayNode { let updatedState = State(minDate: newValue, maxDate: self.state.maxDate, date: self.state.date, displayingMonthSelection: self.state.displayingMonthSelection, selectedMonth: self.state.selectedMonth) self.updateState(updatedState, animated: false) + self.pickerNode.minimumDate = newValue + if let size = self.validLayout { let _ = self.updateLayout(size: size, transition: .immediate) } } } + + public var maximumDate: Date { + get { + return self.state.maxDate + } + set { + guard newValue != self.maximumDate else { + return + } + + let updatedState = State(minDate: self.state.minDate, maxDate: newValue, date: self.state.date, displayingMonthSelection: self.state.displayingMonthSelection, selectedMonth: self.state.selectedMonth) + self.updateState(updatedState, animated: false) + + self.pickerNode.maximumDate = newValue + + if let size = self.validLayout { + let _ = self.updateLayout(size: size, transition: .immediate) + } + } + } + public var date: Date { get { return self.state.date @@ -385,6 +391,8 @@ public final class DatePickerNode: ASDisplayNode { self.pickerNode = MonthPickerNode(theme: theme, strings: strings, date: self.state.date, yearRange: yearRange(for: self.state), valueChanged: { date in monthChangedImpl?(date) }) + self.pickerNode.minimumDate = self.state.minDate + self.pickerNode.maximumDate = self.state.maxDate self.monthButtonNode = HighlightTrackingButtonNode() self.monthTextNode = ImmediateTextNode() @@ -768,8 +776,8 @@ private final class MonthPickerNode: ASDisplayNode, UIPickerViewDelegate, UIPick } } - var minDate: Date? - var maxDate: Date? + var minimumDate: Date? + var maximumDate: Date? private let valueChanged: (Date) -> Void private let pickerView: UIPickerView @@ -847,7 +855,26 @@ private final class MonthPickerNode: ASDisplayNode, UIPickerViewDelegate, UIPick let numberOfDays = calendar.range(of: .day, in: .month, for: tempDate)!.count components.day = min(day, numberOfDays) - let date = calendar.date(from: components)! + var date = calendar.date(from: components)! + + if let minimumDate = self.minimumDate, let maximumDate = self.maximumDate { + var changed = false + if date < minimumDate { + date = minimumDate + changed = true + } + if date > maximumDate { + date = maximumDate + changed = true + } + if changed { + let month = calendar.component(.month, from: date) + let year = calendar.component(.year, from: date) + self.pickerView.selectRow(month - 1, inComponent: 0, animated: true) + self.pickerView.selectRow(year - yearRange.startIndex, inComponent: 1, animated: true) + } + } + self.date = date self.valueChanged(date) @@ -924,7 +951,7 @@ private final class TimePickerNode: ASDisplayNode { let minutes = Int32(calendar.component(.hour, from: self.date)) let string = stringForShortTimestamp(hours: hours, minutes: minutes, dateTimeFormat: self.dateTimeFormat).replacingOccurrences(of: " AM", with: "").replacingOccurrences(of: " PM", with: "") - self.textNode.attributedText = NSAttributedString(string: string, font: Font.with(size: 21.0, design: .monospace, weight: .regular, traits: []), textColor: self.theme.textColor) + self.textNode.attributedText = NSAttributedString(string: string, font: Font.with(size: 21.0, design: .regular, weight: .regular, traits: [.monospacedNumbers]), textColor: self.theme.textColor) let textSize = self.textNode.updateLayout(size) self.textNode.frame = CGRect(origin: CGPoint(x: floorToScreenPixels((self.backgroundNode.frame.width - textSize.width) / 2.0), y: floorToScreenPixels((self.backgroundNode.frame.height - textSize.height) / 2.0)), size: textSize) diff --git a/submodules/InviteLinksUI/Sources/InviteLinkInviteController.swift b/submodules/InviteLinksUI/Sources/InviteLinkInviteController.swift index 97c5c7062b..f1f09ac24c 100644 --- a/submodules/InviteLinksUI/Sources/InviteLinkInviteController.swift +++ b/submodules/InviteLinksUI/Sources/InviteLinkInviteController.swift @@ -48,14 +48,12 @@ private struct InviteLinkInviteTransaction { private enum InviteLinkInviteEntryId: Hashable { case header case mainLink - case links(Int32) case manage } private enum InviteLinkInviteEntry: Comparable, Identifiable { case header(PresentationTheme, String, String) case mainLink(PresentationTheme, ExportedInvitation) - case links(Int32, PresentationTheme, [ExportedInvitation]) case manage(PresentationTheme, String, Bool) var stableId: InviteLinkInviteEntryId { @@ -64,8 +62,6 @@ private enum InviteLinkInviteEntry: Comparable, Identifiable { return .header case .mainLink: return .mainLink - case let .links(index, _, _): - return .links(index) case .manage: return .manage } @@ -85,12 +81,6 @@ private enum InviteLinkInviteEntry: Comparable, Identifiable { } else { return false } - case let .links(lhsIndex, lhsTheme, lhsInvitations): - if case let .links(rhsIndex, rhsTheme, rhsInvitations) = rhs, lhsIndex == rhsIndex, lhsTheme === rhsTheme, lhsInvitations == rhsInvitations { - return true - } else { - return false - } case let .manage(lhsTheme, lhsText, lhsStandalone): if case let .manage(rhsTheme, rhsText, rhsStandalone) = rhs, lhsTheme === rhsTheme, lhsText == rhsText, lhsStandalone == rhsStandalone { return true @@ -106,28 +96,19 @@ private enum InviteLinkInviteEntry: Comparable, Identifiable { switch rhs { case .header: return false - case .mainLink, .links, .manage: + case .mainLink, .manage: return true } case .mainLink: switch rhs { case .header, .mainLink: return false - case .links, .manage: - return true - } - case let .links(lhsIndex, _, _): - switch rhs { - case .header, .mainLink: - return false - case let .links(rhsIndex, _, _): - return lhsIndex < rhsIndex case .manage: return true } case .manage: switch rhs { - case .header, .mainLink, .links: + case .header, .mainLink: return false case .manage: return true @@ -148,12 +129,6 @@ private enum InviteLinkInviteEntry: Comparable, Identifiable { interaction.mainLinkContextAction(invite, node, nil) }, viewAction: { }) - case let .links(_, _, invites): - return ItemListInviteLinkGridItem(presentationData: ItemListPresentationData(presentationData), invites: invites, count: 0, share: true, sectionId: 1, style: .plain, tapAction: { invite in - interaction.copyLink(invite) - }, contextAction: { invite, _ in - interaction.shareLink(invite) - }) case let .manage(theme, text, standalone): return InviteLinkInviteManageItem(theme: theme, text: text, standalone: standalone, action: { interaction.manageLinks() @@ -372,8 +347,17 @@ public final class InviteLinkInviteController: ViewController { f(.dismissWithoutContent) if let invite = invite { - let controller = InviteLinkQRCodeController(context: context, invite: invite) - self?.controller?.present(controller, in: .window(.root)) + let _ = (context.account.postbox.loadedPeerWithId(peerId) + |> deliverOnMainQueue).start(next: { [weak self] peer in + let isGroup: Bool + if let peer = peer as? TelegramChannel, case .broadcast = peer.info { + isGroup = false + } else { + isGroup = true + } + let controller = InviteLinkQRCodeController(context: context, invite: invite, isGroup: isGroup) + self?.controller?.present(controller, in: .window(.root)) + }) } }))) @@ -392,10 +376,6 @@ public final class InviteLinkInviteController: ViewController { ActionSheetButtonItem(title: presentationData.strings.GroupInfo_InviteLink_RevokeLink, color: .destructive, action: { dismissAction() -// revokePeerExportedInvitation(account: <#T##Account#>, peerId: <#T##PeerId#>, link: <#T##String#>) -// self?.revokeDisposable.set((revokePersistentPeerExportedInvitation(account: context.account, peerId: peerId) |> deliverOnMainQueue).start(completed: { -// -// })) }) ]), ActionSheetItemGroup(items: [ActionSheetButtonItem(title: presentationData.strings.Common_Cancel, action: { dismissAction() })]) @@ -430,7 +410,13 @@ public final class InviteLinkInviteController: ViewController { if let strongSelf = self { var entries: [InviteLinkInviteEntry] = [] - entries.append(.header(presentationData.theme, presentationData.strings.InviteLink_InviteLink, presentationData.strings.InviteLink_CreatePrivateLinkHelp)) + let helpText: String + if let peer = peerViewMainPeer(view) as? TelegramChannel, case .broadcast = peer.info { + helpText = presentationData.strings.InviteLink_CreatePrivateLinkHelpChannel + } else { + helpText = presentationData.strings.InviteLink_CreatePrivateLinkHelp + } + entries.append(.header(presentationData.theme, presentationData.strings.InviteLink_InviteLink, helpText)) let mainInvite: ExportedInvitation? if let cachedData = view.cachedData as? CachedGroupData, let invite = cachedData.exportedInvitation { @@ -444,19 +430,7 @@ public final class InviteLinkInviteController: ViewController { entries.append(.mainLink(presentationData.theme, mainInvite)) } - let additionalInvites = invites.invitations.filter { $0.link != mainInvite?.link } - var index: Int32 = 0 - for i in stride(from: 0, to: additionalInvites.endIndex, by: 2) { - var invitesPair: [ExportedInvitation] = [] - invitesPair.append(additionalInvites[i]) - if i + 1 < additionalInvites.count { - invitesPair.append(additionalInvites[i + 1]) - } - entries.append(.links(index, presentationData.theme, invitesPair)) - index += 1 - } - - entries.append(.manage(presentationData.theme, presentationData.strings.InviteLink_Manage, additionalInvites.isEmpty)) + entries.append(.manage(presentationData.theme, presentationData.strings.InviteLink_Manage, true)) let previousEntries = previousEntries.swap(entries) diff --git a/submodules/InviteLinksUI/Sources/InviteLinkListController.swift b/submodules/InviteLinksUI/Sources/InviteLinkListController.swift index 727f88f053..a01efc43cb 100644 --- a/submodules/InviteLinksUI/Sources/InviteLinkListController.swift +++ b/submodules/InviteLinksUI/Sources/InviteLinkListController.swift @@ -70,7 +70,7 @@ private enum InviteLinksListEntry: ItemListNodeEntry { case revokedLinksHeader(PresentationTheme, String) case revokedLinksDeleteAll(PresentationTheme, String) - case revokedLinks(Int32, PresentationTheme, ExportedInvitation?) + case revokedLink(Int32, PresentationTheme, ExportedInvitation?) case adminsHeader(PresentationTheme, String) case admin(Int32, PresentationTheme, ExportedInvitationCreator) @@ -83,7 +83,7 @@ private enum InviteLinksListEntry: ItemListNodeEntry { return InviteLinksListSection.mainLink.rawValue case .linksHeader, .linksCreate, .link, .linksInfo: return InviteLinksListSection.links.rawValue - case .revokedLinksHeader, .revokedLinksDeleteAll, .revokedLinks: + case .revokedLinksHeader, .revokedLinksDeleteAll, .revokedLink: return InviteLinksListSection.revokedLinks.rawValue case .adminsHeader, .admin: return InviteLinksListSection.admins.rawValue @@ -112,7 +112,7 @@ private enum InviteLinksListEntry: ItemListNodeEntry { return 10001 case .revokedLinksDeleteAll: return 10002 - case let .revokedLinks(index, _, _): + case let .revokedLink(index, _, _): return 10003 + index case .adminsHeader: return 20001 @@ -183,8 +183,8 @@ private enum InviteLinksListEntry: ItemListNodeEntry { } else { return false } - case let .revokedLinks(lhsIndex, lhsTheme, lhsLink): - if case let .revokedLinks(rhsIndex, rhsTheme, rhsLink) = rhs, lhsIndex == rhsIndex, lhsTheme === rhsTheme, lhsLink == rhsLink { + case let .revokedLink(lhsIndex, lhsTheme, lhsLink): + if case let .revokedLink(rhsIndex, rhsTheme, rhsLink) = rhs, lhsIndex == rhsIndex, lhsTheme === rhsTheme, lhsLink == rhsLink { return true } else { return false @@ -253,7 +253,7 @@ private enum InviteLinksListEntry: ItemListNodeEntry { return ItemListPeerActionItem(presentationData: presentationData, icon: PresentationResourcesItemList.deleteIconImage(theme), title: text, sectionId: self.section, color: .destructive, editing: false, action: { arguments.deleteAllRevokedLinks() }) - case let .revokedLinks(_, _, invite): + case let .revokedLink(_, _, invite): return ItemListInviteLinkItem(presentationData: presentationData, invite: invite, share: false, sectionId: self.section, style: .blocks) { invite in arguments.openLink(invite) } contextAction: { invite, node, gesture in @@ -273,7 +273,13 @@ private func inviteLinkListControllerEntries(presentationData: PresentationData, var entries: [InviteLinksListEntry] = [] if admin == nil { - entries.append(.header(presentationData.theme, presentationData.strings.InviteLink_CreatePrivateLinkHelp)) + let helpText: String + if let peer = peerViewMainPeer(view) as? TelegramChannel, case .broadcast = peer.info { + helpText = presentationData.strings.InviteLink_CreatePrivateLinkHelpChannel + } else { + helpText = presentationData.strings.InviteLink_CreatePrivateLinkHelp + } + entries.append(.header(presentationData.theme, helpText)) } let mainInvite: ExportedInvitation? @@ -308,21 +314,32 @@ private func inviteLinkListControllerEntries(presentationData: PresentationData, entries.append(.mainLinkOtherInfo(presentationData.theme, string.0)) } - entries.append(.linksHeader(presentationData.theme, presentationData.strings.InviteLink_AdditionalLinks.uppercased())) - if admin == nil { - entries.append(.linksCreate(presentationData.theme, presentationData.strings.InviteLink_Create)) - } var additionalInvites: [ExportedInvitation]? if let invites = invites { additionalInvites = invites.filter { $0.link != mainInvite?.link } } + + var hasLinks = false + if let additionalInvites = additionalInvites, !additionalInvites.isEmpty { + hasLinks = true + } else if let admin = admin, admin.count > 1 { + hasLinks = true + } + + if hasLinks { + entries.append(.linksHeader(presentationData.theme, presentationData.strings.InviteLink_AdditionalLinks.uppercased())) + } + if admin == nil { + entries.append(.linksCreate(presentationData.theme, presentationData.strings.InviteLink_Create)) + } + if let additionalInvites = additionalInvites { var index: Int32 = 0 for invite in additionalInvites { entries.append(.link(index, presentationData.theme, invite, invite.expireDate != nil ? tick : nil)) index += 1 } - } else if let admin = admin, admin.count > 0 { + } else if let admin = admin, admin.count > 1 { var index: Int32 = 0 for _ in 0 ..< admin.count - 1 { entries.append(.link(index, presentationData.theme, nil, nil)) @@ -340,7 +357,13 @@ private func inviteLinkListControllerEntries(presentationData: PresentationData, } var index: Int32 = 0 for invite in revokedInvites { - entries.append(.revokedLinks(index, presentationData.theme, invite)) + entries.append(.revokedLink(index, presentationData.theme, invite)) + index += 1 + } + } else if let admin = admin, admin.revokedCount > 0 { + var index: Int32 = 0 + for _ in 0 ..< admin.revokedCount { + entries.append(.revokedLink(index, presentationData.theme, nil)) index += 1 } } @@ -387,7 +410,7 @@ public func inviteLinkListController(context: AccountContext, peerId: PeerId, ad var getControllerImpl: (() -> ViewController?)? let adminId = admin?.peer.peer?.id - let invitesContext = PeerExportedInvitationsContext(account: context.account, peerId: peerId, adminId: adminId, revoked: false, forceUpdate: false) + let invitesContext = PeerExportedInvitationsContext(account: context.account, peerId: peerId, adminId: adminId, revoked: false, forceUpdate: true) let revokedInvitesContext = PeerExportedInvitationsContext(account: context.account, peerId: peerId, adminId: adminId, revoked: true, forceUpdate: true) let creators: Signal<[ExportedInvitationCreator], NoError> @@ -435,8 +458,17 @@ public func inviteLinkListController(context: AccountContext, peerId: PeerId, ad }, action: { _, f in f(.dismissWithoutContent) - let controller = InviteLinkQRCodeController(context: context, invite: invite) - presentControllerImpl?(controller, nil) + let _ = (context.account.postbox.loadedPeerWithId(peerId) + |> deliverOnMainQueue).start(next: { peer in + let isGroup: Bool + if let peer = peer as? TelegramChannel, case .broadcast = peer.info { + isGroup = false + } else { + isGroup = true + } + let controller = InviteLinkQRCodeController(context: context, invite: invite, isGroup: isGroup) + presentControllerImpl?(controller, nil) + }) }))) if invite.adminId.toInt64() != 0 { @@ -545,8 +577,17 @@ public func inviteLinkListController(context: AccountContext, peerId: PeerId, ad }, action: { _, f in f(.default) - let controller = InviteLinkQRCodeController(context: context, invite: invite) - presentControllerImpl?(controller, nil) + let _ = (context.account.postbox.loadedPeerWithId(peerId) + |> deliverOnMainQueue).start(next: { peer in + let isGroup: Bool + if let peer = peer as? TelegramChannel, case .broadcast = peer.info { + isGroup = false + } else { + isGroup = true + } + let controller = InviteLinkQRCodeController(context: context, invite: invite, isGroup: isGroup) + presentControllerImpl?(controller, nil) + }) }))) items.append(.action(ContextMenuActionItem(text: presentationData.strings.InviteLink_ContextEdit, icon: { theme in diff --git a/submodules/InviteLinksUI/Sources/InviteLinkQRCodeController.swift b/submodules/InviteLinksUI/Sources/InviteLinkQRCodeController.swift index decfc4bc7e..db3dbd4951 100644 --- a/submodules/InviteLinksUI/Sources/InviteLinkQRCodeController.swift +++ b/submodules/InviteLinksUI/Sources/InviteLinkQRCodeController.swift @@ -37,14 +37,16 @@ public final class InviteLinkQRCodeController: ViewController { private let context: AccountContext private let invite: ExportedInvitation + private let isGroup: Bool private var presentationDataDisposable: Disposable? private let idleTimerExtensionDisposable = MetaDisposable() - public init(context: AccountContext, invite: ExportedInvitation) { + public init(context: AccountContext, invite: ExportedInvitation, isGroup: Bool) { self.context = context self.invite = invite + self.isGroup = isGroup super.init(navigationBarPresentationData: nil) @@ -74,7 +76,7 @@ public final class InviteLinkQRCodeController: ViewController { } override public func loadDisplayNode() { - self.displayNode = Node(context: self.context, invite: self.invite) + self.displayNode = Node(context: self.context, invite: self.invite, isGroup: self.isGroup) self.controllerNode.dismiss = { [weak self] in self?.presentingViewController?.dismiss(animated: false, completion: nil) } @@ -133,7 +135,7 @@ public final class InviteLinkQRCodeController: ViewController { var dismiss: (() -> Void)? var cancel: (() -> Void)? - init(context: AccountContext, invite: ExportedInvitation) { + init(context: AccountContext, invite: ExportedInvitation, isGroup: Bool) { self.context = context self.invite = invite self.presentationData = context.sharedContext.currentPresentationData.with { $0 } @@ -211,7 +213,7 @@ public final class InviteLinkQRCodeController: ViewController { let textFont = Font.regular(13.0) - self.textNode.attributedText = NSAttributedString(string: self.presentationData.strings.InviteLink_QRCode_Info, font: textFont, textColor: secondaryTextColor) + self.textNode.attributedText = NSAttributedString(string: isGroup ? self.presentationData.strings.InviteLink_QRCode_Info : self.presentationData.strings.InviteLink_QRCode_InfoChannel, font: textFont, textColor: secondaryTextColor) self.buttonNode.title = self.presentationData.strings.InviteLink_QRCode_Share self.cancelButton.addTarget(self, action: #selector(self.cancelButtonPressed), forControlEvents: .touchUpInside) diff --git a/submodules/InviteLinksUI/Sources/InviteLinkViewController.swift b/submodules/InviteLinksUI/Sources/InviteLinkViewController.swift index dade29c70e..7a5130a806 100644 --- a/submodules/InviteLinksUI/Sources/InviteLinkViewController.swift +++ b/submodules/InviteLinksUI/Sources/InviteLinkViewController.swift @@ -343,7 +343,6 @@ public final class InviteLinkViewController: ViewController { private var presentationDataDisposable: Disposable? private var disposable: Disposable? - private let actionDisposable = MetaDisposable() private let dimNode: ASDisplayNode private let contentNode: ASDisplayNode @@ -473,9 +472,10 @@ public final class InviteLinkViewController: ViewController { ActionSheetTextItem(title: presentationData.strings.InviteLink_DeleteLinkAlert_Text), ActionSheetButtonItem(title: presentationData.strings.InviteLink_DeleteLinkAlert_Action, color: .destructive, action: { dismissAction() - - self?.actionDisposable.set((deletePeerExportedInvitation(account: context.account, peerId: peerId, link: invite.link) |> deliverOnMainQueue).start(completed: { - })) + self?.controller?.dismiss() + + let _ = (deletePeerExportedInvitation(account: context.account, peerId: peerId, link: invite.link) |> deliverOnMainQueue).start(completed: { + }) self?.controller?.revokedInvitationsContext?.remove(invite) }) @@ -490,7 +490,42 @@ public final class InviteLinkViewController: ViewController { }, action: { [weak self] _, f in f(.dismissWithoutContent) - let controller = InviteLinkQRCodeController(context: context, invite: invite) + let _ = (context.account.postbox.loadedPeerWithId(peerId) + |> deliverOnMainQueue).start(next: { [weak self] peer in + let isGroup: Bool + if let peer = peer as? TelegramChannel, case .broadcast = peer.info { + isGroup = false + } else { + isGroup = true + } + let controller = InviteLinkQRCodeController(context: context, invite: invite, isGroup: isGroup) + self?.controller?.present(controller, in: .window(.root)) + }) + }))) + items.append(.action(ContextMenuActionItem(text: presentationData.strings.InviteLink_ContextRevoke, textColor: .destructive, icon: { theme in + return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Delete"), color: theme.actionSheet.destructiveActionTextColor) + }, action: { [weak self] _, f in + f(.dismissWithoutContent) + + let controller = ActionSheetController(presentationData: presentationData) + let dismissAction: () -> Void = { [weak controller] in + controller?.dismissAnimated() + } + controller.setItemGroups([ + ActionSheetItemGroup(items: [ + ActionSheetTextItem(title: presentationData.strings.GroupInfo_InviteLink_RevokeAlert_Text), + ActionSheetButtonItem(title: presentationData.strings.GroupInfo_InviteLink_RevokeLink, color: .destructive, action: { + dismissAction() + self?.controller?.dismiss() + + let _ = (revokePeerExportedInvitation(account: context.account, peerId: peerId, link: invite.link) |> deliverOnMainQueue).start(completed: { + }) + + self?.controller?.revokedInvitationsContext?.remove(invite) + }) + ]), + ActionSheetItemGroup(items: [ActionSheetButtonItem(title: presentationData.strings.Common_Cancel, action: { dismissAction() })]) + ]) self?.controller?.present(controller, in: .window(.root)) }))) } @@ -739,6 +774,7 @@ public final class InviteLinkViewController: ViewController { subtitleText = self.presentationData.strings.InviteLink_Revoked } else if let usageLimit = self.invite.usageLimit, let count = self.invite.count, count >= usageLimit { subtitleText = self.presentationData.strings.InviteLink_UsageLimitReached + subtitleColor = self.presentationData.theme.list.itemDestructiveColor } else if let expireDate = self.invite.expireDate { let currentTime = Int32(CFAbsoluteTimeGetCurrent() + kCFAbsoluteTimeIntervalSince1970) if currentTime >= expireDate { diff --git a/submodules/InviteLinksUI/Sources/InviteLinksGridNode.swift b/submodules/InviteLinksUI/Sources/InviteLinksGridNode.swift deleted file mode 100644 index d6088d868c..0000000000 --- a/submodules/InviteLinksUI/Sources/InviteLinksGridNode.swift +++ /dev/null @@ -1,670 +0,0 @@ -import Foundation -import UIKit -import Display -import AsyncDisplayKit -import SwiftSignalKit -import SyncCore -import TelegramPresentationData -import ItemListUI -import SolidRoundedButtonNode -import RadialStatusNode - -private let itemSpacing: CGFloat = 10.0 -private let titleFont = Font.semibold(17.0) -private let subtitleFont = Font.regular(12.0) - -private enum ItemBackgroundColor: Equatable { - case blue - case green - case yellow - case red - case gray - - var colors: (top: UIColor, bottom: UIColor, text: UIColor) { - switch self { - case .blue: - return (UIColor(rgb: 0x00b5f7), UIColor(rgb: 0x00b2f6), UIColor(rgb: 0xa7f4ff)) - case .green: - return (UIColor(rgb: 0x4aca62), UIColor(rgb: 0x43c85c), UIColor(rgb: 0xc5ffe6)) - case .yellow: - return (UIColor(rgb: 0xf8a953), UIColor(rgb: 0xf7a64e), UIColor(rgb: 0xfeffd7)) - case .red: - return (UIColor(rgb: 0xf2656a), UIColor(rgb: 0xf25f65), UIColor(rgb: 0xffd3de)) - case .gray: - return (UIColor(rgb: 0xa8b2bb), UIColor(rgb: 0xa2abb4), UIColor(rgb: 0xe3e6e8)) - } - } -} - -private let moreIcon = generateImage(CGSize(width: 26.0, height: 26.0), contextGenerator: { size, context in - context.clear(CGRect(origin: CGPoint(), size: size)) - - context.setFillColor(UIColor.white.cgColor) - context.fillEllipse(in: CGRect(origin: CGPoint(), size: size)) - - context.setBlendMode(.clear) - context.fillEllipse(in: CGRect(origin: CGPoint(x: 4.0, y: 11.0), size: CGSize(width: 4.0, height: 4.0))) - context.fillEllipse(in: CGRect(origin: CGPoint(x: 11.0, y: 11.0), size: CGSize(width: 4.0, height: 4.0))) - context.fillEllipse(in: CGRect(origin: CGPoint(x: 18.0, y: 11.0), size: CGSize(width: 4.0, height: 4.0))) -}) - -private let shareIcon = generateImage(CGSize(width: 26.0, height: 26.0), contextGenerator: { size, context in - context.clear(CGRect(origin: CGPoint(), size: size)) - - context.setFillColor(UIColor.white.cgColor) - context.fillEllipse(in: CGRect(origin: CGPoint(), size: size)) - - if let maskImage = UIImage(bundleImageName: "Chat/Links/Share") { - context.clip(to: CGRect(origin: CGPoint(x: floorToScreenPixels((size.width - maskImage.size.width) / 2.0), y: floorToScreenPixels((size.height - maskImage.size.height) / 2.0)), size: maskImage.size), mask: maskImage.cgImage!) - context.setBlendMode(.clear) - context.fillEllipse(in: CGRect(origin: CGPoint(), size: size)) - } -}) - -private class ItemNode: ASDisplayNode { - private let selectionNode: HighlightTrackingButtonNode - private let wrapperNode: ASDisplayNode - private let backgroundNode: ASDisplayNode - private let backgroundGradientLayer: CAGradientLayer - - private let iconNode: ASImageNode - private var timerNode: TimerNode? - - private let extractedContainerNode: ContextExtractedContentContainingNode - private let containerNode: ContextControllerSourceNode - private let buttonNode: HighlightTrackingButtonNode - private let buttonIconNode: ASImageNode - - private let titleNode: ImmediateTextNode - private let subtitleNode: ImmediateTextNode - - private var updateTimer: SwiftSignalKit.Timer? - - private var params: (size: CGSize, wide: Bool, invite: ExportedInvitation?, color: ItemBackgroundColor, presentationData: ItemListPresentationData)? - - var action: (() -> Void)? - var contextAction: ((ASDisplayNode) -> Void)? - - private let hapticFeedback = HapticFeedback() - - override init() { - self.selectionNode = HighlightTrackingButtonNode() - self.wrapperNode = ASDisplayNode() - - self.backgroundNode = ASDisplayNode() - self.backgroundNode.clipsToBounds = true - self.backgroundNode.cornerRadius = 15.0 - if #available(iOS 13.0, *) { - self.backgroundNode.layer.cornerCurve = .continuous - } - self.backgroundNode.isUserInteractionEnabled = false - - self.backgroundGradientLayer = CAGradientLayer() - self.backgroundGradientLayer.startPoint = CGPoint(x: 0.5, y: 0.0) - self.backgroundGradientLayer.endPoint = CGPoint(x: 0.5, y: 1.0) - self.backgroundNode.layer.addSublayer(self.backgroundGradientLayer) - - self.iconNode = ASImageNode() - self.iconNode.displaysAsynchronously = false - self.iconNode.displayWithoutProcessing = true - self.iconNode.isUserInteractionEnabled = false - - self.buttonNode = HighlightTrackingButtonNode() - self.extractedContainerNode = ContextExtractedContentContainingNode() - self.containerNode = ContextControllerSourceNode() - self.containerNode.isGestureEnabled = false - self.buttonIconNode = ASImageNode() - self.buttonIconNode.displaysAsynchronously = false - self.buttonIconNode.displayWithoutProcessing = true - - self.titleNode = ImmediateTextNode() - self.titleNode.maximumNumberOfLines = 2 - self.titleNode.isUserInteractionEnabled = false - - self.subtitleNode = ImmediateTextNode() - self.subtitleNode.maximumNumberOfLines = 1 - self.subtitleNode.isUserInteractionEnabled = false - - super.init() - - self.addSubnode(self.wrapperNode) - self.wrapperNode.addSubnode(self.backgroundNode) - self.wrapperNode.addSubnode(self.iconNode) - - self.containerNode.addSubnode(self.extractedContainerNode) - self.extractedContainerNode.contentNode.addSubnode(self.buttonIconNode) - self.containerNode.targetNodeForActivationProgress = self.extractedContainerNode.contentNode - self.buttonNode.addSubnode(self.containerNode) - - self.wrapperNode.addSubnode(self.selectionNode) - self.wrapperNode.addSubnode(self.buttonNode) - - self.wrapperNode.addSubnode(self.titleNode) - self.wrapperNode.addSubnode(self.subtitleNode) - - self.selectionNode.addTarget(self, action: #selector(self.tapped), forControlEvents: .touchUpInside) - self.selectionNode.highligthedChanged = { [weak self] highlighted in - if let strongSelf = self { - if highlighted { - let transition: ContainedViewLayoutTransition = .animated(duration: 0.18, curve: .linear) - transition.updateSublayerTransformScale(node: strongSelf, scale: 0.95) - } else { - let transition: ContainedViewLayoutTransition = .animated(duration: 0.25, curve: .linear) - transition.updateSublayerTransformScale(node: strongSelf, scale: 1.0) - } - } - } - - self.buttonNode.addTarget(self, action: #selector(self.buttonPressed), forControlEvents: .touchUpInside) - self.buttonNode.highligthedChanged = { [weak self] highlighted in - if let strongSelf = self { - if highlighted { - strongSelf.buttonIconNode.layer.removeAnimation(forKey: "opacity") - strongSelf.buttonIconNode.alpha = 0.4 - } else { - strongSelf.buttonIconNode.alpha = 1.0 - strongSelf.buttonIconNode.layer.animateAlpha(from: 0.4, to: 1.0, duration: 0.2) - } - } - } - } - - deinit { - self.updateTimer?.invalidate() - } - - @objc private func tapped() { - self.hapticFeedback.impact(.light) - self.action?() - } - - @objc private func buttonPressed() { - self.contextAction?(self.extractedContainerNode) - } - - func update(size: CGSize, wide: Bool, share: Bool, invite: ExportedInvitation?, presentationData: ItemListPresentationData, transition: ContainedViewLayoutTransition) -> CGSize { - let currentTime = Int32(CFAbsoluteTimeGetCurrent() + kCFAbsoluteTimeIntervalSince1970) - - let availability = invite.flatMap { invitationAvailability($0) } ?? 0.0 - let transitionFraction: CGFloat - let color: ItemBackgroundColor - let nextColor: ItemBackgroundColor - if let invite = invite { - if invite.isRevoked { - color = .gray - nextColor = .gray - transitionFraction = 0.0 - } else if invite.expireDate == nil && invite.usageLimit == nil { - color = .blue - nextColor = .blue - transitionFraction = 0.0 - } else if availability >= 0.5 { - color = .green - nextColor = .yellow - transitionFraction = (availability - 0.5) / 0.5 - } else if availability > 0.0 { - color = .yellow - nextColor = .red - transitionFraction = availability / 0.5 - } else { - color = .red - nextColor = .red - transitionFraction = 0.0 - } - } else { - color = .gray - nextColor = .gray - transitionFraction = 0.0 - } - - let previousParams = self.params - self.params = (size, wide, invite, color, presentationData) - - let previousExpireDate = previousParams?.invite?.expireDate - if previousExpireDate != invite?.expireDate { - self.updateTimer?.invalidate() - self.updateTimer = nil - - if let expireDate = invite?.expireDate, availability > 0.0 { - let timeout = min(2.0, max(0.001, Double(expireDate - currentTime))) - let updateTimer = SwiftSignalKit.Timer(timeout: timeout, repeat: true, completion: { [weak self] in - if let strongSelf = self { - if let (size, wide, invite, _, presentationData) = strongSelf.params { - let _ = strongSelf.update(size: size, wide: wide, share: share, invite: invite, presentationData: presentationData, transition: .animated(duration: 0.3, curve: .linear)) - } - } - }, queue: Queue.mainQueue()) - self.updateTimer = updateTimer - updateTimer.start() - } - } else if availability.isZero { - self.updateTimer?.invalidate() - self.updateTimer = nil - } - - let topColor = color.colors.top - let bottomColor = color.colors.bottom - let nextTopColor = nextColor.colors.top - let nextBottomColor = nextColor.colors.bottom - let colors: NSArray - if let invite = invite { - colors = [nextTopColor.mixedWith(topColor, alpha: transitionFraction).cgColor, nextBottomColor.mixedWith(bottomColor, alpha: transitionFraction).cgColor] - } else { - colors = [UIColor(rgb: 0xf2f2f7).cgColor, UIColor(rgb: 0xf2f2f7).cgColor] - } - - if let (_, _, previousInvite, previousColor, _) = previousParams, previousInvite == invite { - if previousColor != color && color == .red { - if let snapshotView = self.wrapperNode.view.snapshotContentTree() { - snapshotView.frame = self.wrapperNode.bounds - self.wrapperNode.view.addSubview(snapshotView) - snapshotView.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.3, removeOnCompletion: false, completion: { [weak snapshotView] _ in - snapshotView?.removeFromSuperview() - }) - } - self.backgroundGradientLayer.colors = colors as? [Any] - } else if (color == .green && nextColor == .yellow) || (color == .yellow && nextColor == .red) { - let previousColors = self.backgroundGradientLayer.colors - if transition.isAnimated { - self.backgroundGradientLayer.animate(from: previousColors as AnyObject, to: self.backgroundGradientLayer.colors as AnyObject, keyPath: "colors", timingFunction: CAMediaTimingFunctionName.linear.rawValue, duration: 2.5) - } - self.backgroundGradientLayer.colors = colors as? [Any] - } - } else { - self.backgroundGradientLayer.colors = colors as? [Any] - } - - let secondaryTextColor = nextColor.colors.text.mixedWith(color.colors.text, alpha: transitionFraction) - - let itemWidth = wide ? size.width : floor((size.width - itemSpacing) / 2.0) - var inviteLink = invite?.link.replacingOccurrences(of: "https://", with: "") ?? "" - if !wide { - inviteLink = inviteLink.replacingOccurrences(of: "joinchat/", with: "joinchat/\n") - inviteLink = inviteLink.replacingOccurrences(of: "join/", with: "join/\n") - } - let title: NSMutableAttributedString = NSMutableAttributedString(string: inviteLink, font: titleFont, textColor: UIColor.white) - if inviteLink.hasPrefix("t.me/joinchat/") { - title.addAttribute(NSAttributedString.Key.foregroundColor, value: secondaryTextColor, range: NSMakeRange(0, "t.me/joinchat/".count)) - } else if inviteLink.hasPrefix("t.me/join/") { - title.addAttribute(NSAttributedString.Key.foregroundColor, value: secondaryTextColor, range: NSMakeRange(0, "t.me/join/".count)) - } - self.titleNode.attributedText = title - - self.buttonIconNode.image = share ? shareIcon : moreIcon - - var subtitleText: String = "" - if let invite = invite { - if let count = invite.count { - subtitleText = presentationData.strings.InviteLink_PeopleJoinedShort(count) - } else { - subtitleText = [.red, .gray].contains(color) ? presentationData.strings.InviteLink_PeopleJoinedShortNoneExpired : presentationData.strings.InviteLink_PeopleJoinedShortNone - } - if invite.isRevoked { - if !subtitleText.isEmpty { - subtitleText += " • " - } - subtitleText += presentationData.strings.InviteLink_Revoked - self.iconNode.image = generateTintedImage(image: UIImage(bundleImageName: "Chat/Links/Expired"), color: .white) - self.timerNode?.removeFromSupernode() - self.timerNode = nil - } else if let expireDate = invite.expireDate, currentTime >= expireDate { - if !subtitleText.isEmpty { - subtitleText += " • " - } - if share { - subtitleText = presentationData.strings.InviteLink_Expired - } else { - subtitleText += presentationData.strings.InviteLink_Expired - } - self.iconNode.image = generateTintedImage(image: UIImage(bundleImageName: "Chat/Links/Expired"), color: .white) - self.timerNode?.removeFromSupernode() - self.timerNode = nil - } else if let usageLimit = invite.usageLimit, let count = invite.count, count >= usageLimit { - if !subtitleText.isEmpty { - subtitleText += " • " - } - if share { - subtitleText = presentationData.strings.InviteLink_UsageLimitReached - } else { - subtitleText += presentationData.strings.InviteLink_UsageLimitReached - } - self.iconNode.image = generateTintedImage(image: UIImage(bundleImageName: "Chat/Links/Expired"), color: .white) - self.timerNode?.removeFromSupernode() - self.timerNode = nil - } else if let expireDate = invite.expireDate { - self.iconNode.image = generateTintedImage(image: UIImage(bundleImageName: "Chat/Links/Flame"), color: .white) - let timerNode: TimerNode - if let current = self.timerNode { - timerNode = current - } else { - timerNode = TimerNode() - timerNode.isUserInteractionEnabled = false - self.timerNode = timerNode - self.addSubnode(timerNode) - } - timerNode.update(color: UIColor.white, creationTimestamp: invite.startDate ?? invite.date, deadlineTimestamp: expireDate) - if share { - subtitleText = presentationData.strings.InviteLink_TapToCopy - } - } else { - self.iconNode.image = generateTintedImage(image: UIImage(bundleImageName: "Chat/Links/Link"), color: .white) - self.timerNode?.removeFromSupernode() - self.timerNode = nil - if share { - subtitleText = presentationData.strings.InviteLink_TapToCopy - } - } - self.iconNode.isHidden = false - self.buttonIconNode.isHidden = false - } else { - self.iconNode.isHidden = true - self.buttonIconNode.isHidden = true - } - - self.iconNode.frame = CGRect(x: 10.0, y: 10.0, width: 30.0, height: 30.0) - self.timerNode?.frame = CGRect(x: 8.0, y: 8.0, width: 34.0, height: 34.0) - - self.subtitleNode.attributedText = NSAttributedString(string: subtitleText, font: subtitleFont, textColor: secondaryTextColor) - - let titleSize = self.titleNode.updateLayout(CGSize(width: itemWidth - 24.0, height: 100.0)) - let subtitleSize = self.subtitleNode.updateLayout(CGSize(width: itemWidth - 24.0, height: 100.0)) - - self.titleNode.frame = CGRect(origin: CGPoint(x: 12.0, y: 52.0), size: titleSize) - self.subtitleNode.frame = CGRect(origin: CGPoint(x: 12.0, y: 52.0 + titleSize.height + 3.0), size: subtitleSize) - - let itemSize = CGSize(width: itemWidth, height: wide ? 102.0 : 122.0) - - let backgroundFrame = CGRect(origin: CGPoint(), size: itemSize) - transition.updateFrame(node: self.wrapperNode, frame: backgroundFrame) - transition.updateFrame(node: self.backgroundNode, frame: backgroundFrame) - transition.updateFrame(node: self.selectionNode, frame: backgroundFrame) - transition.updateFrame(layer: self.backgroundGradientLayer, frame: backgroundFrame) - - let buttonSize = CGSize(width: 26.0, height: 26.0) - let buttonFrame = CGRect(origin: CGPoint(x: itemSize.width - buttonSize.width - 12.0, y: 12.0), size: buttonSize) - transition.updateFrame(node: self.buttonNode, frame: buttonFrame) - - self.extractedContainerNode.frame = CGRect(origin: CGPoint(), size: buttonSize) - self.extractedContainerNode.contentRect = CGRect(origin: CGPoint(), size: buttonSize) - self.buttonIconNode.frame = CGRect(origin: CGPoint(), size: buttonSize) - - return itemSize - } -} - -class InviteLinksGridNode: ASDisplayNode { - private var items: [ExportedInvitation]? - private var itemNodes: [String: ItemNode] = [:] - - var action: ((ExportedInvitation) -> Void)? - var contextAction: ((ASDisplayNode, ExportedInvitation) -> Void)? - - override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { - let result = super.hitTest(point, with: event) - return result - } - - func update(size: CGSize, safeInset: CGFloat, items: [ExportedInvitation]?, count: Int, share: Bool, presentationData: ItemListPresentationData, transition: ContainedViewLayoutTransition) -> CGSize { - self.items = items - - var contentSize: CGSize = size - var contentHeight: CGFloat = 0.0 - - let sideInset: CGFloat = 16.0 + safeInset - - var validIds = Set() - - let count = items?.count ?? count - - for i in 0 ..< count { - let invite: ExportedInvitation? - let id: String - if let items = items, i < items.count { - invite = items[i] - id = invite!.link - } else { - invite = nil - id = "placeholder_\(i)" - } - - validIds.insert(id) - - var itemNode: ItemNode? - var wasAdded = false - - if let current = self.itemNodes[id] { - itemNode = current - } else { - wasAdded = true - let addedItemNode = ItemNode() - itemNode = addedItemNode - self.itemNodes[id] = addedItemNode - self.addSubnode(addedItemNode) - } - if let itemNode = itemNode { - let col = CGFloat(i % 2) - let row = floor(CGFloat(i) / 2.0) - let wide = (i == count - 1 && (count % 2) != 0) - let itemSize = itemNode.update(size: CGSize(width: size.width - sideInset * 2.0, height: size.height), wide: wide, share: share, invite: invite, presentationData: presentationData, transition: transition) - var itemFrame = CGRect(origin: CGPoint(x: sideInset, y: 4.0 + row * (122.0 + itemSpacing)), size: itemSize) - if !wide && col > 0 { - itemFrame.origin.x += itemSpacing + itemSize.width - } - - contentHeight = max(contentHeight, itemFrame.maxY + itemSpacing) - - if wasAdded { - itemNode.frame = itemFrame - } else { - transition.updateFrame(node: itemNode, frame: itemFrame) - } - itemNode.action = { [weak self] in - if let invite = invite { - self?.action?(invite) - } - } - itemNode.contextAction = { [weak self] node in - if let invite = invite { - self?.contextAction?(node, invite) - } - } - } - } - - var removeIds: [String] = [] - for (id, _) in self.itemNodes { - if !validIds.contains(id) { - removeIds.append(id) - } - } - for id in removeIds { - if let itemNode = self.itemNodes.removeValue(forKey: id) { - itemNode.removeFromSupernode() - } - } - - contentSize.height = contentHeight - return contentSize - } -} - -private struct ContentParticle { - var position: CGPoint - var direction: CGPoint - var velocity: CGFloat - var alpha: CGFloat - var lifetime: Double - var beginTime: Double - - init(position: CGPoint, direction: CGPoint, velocity: CGFloat, alpha: CGFloat, lifetime: Double, beginTime: Double) { - self.position = position - self.direction = direction - self.velocity = velocity - self.alpha = alpha - self.lifetime = lifetime - self.beginTime = beginTime - } -} - -private final class TimerNode: ASDisplayNode { - private struct Params: Equatable { - var color: UIColor - var creationTimestamp: Int32 - var deadlineTimestamp: Int32 - } - - private let hierarchyTrackingNode: HierarchyTrackingNode - private var inHierarchyValue: Bool = false - - private var animator: ConstantDisplayLinkAnimator? - private let contentNode: ASDisplayNode - private var particles: [ContentParticle] = [] - - private var currentParams: Params? - - var reachedTimeout: (() -> Void)? - - override init() { - var updateInHierarchy: ((Bool) -> Void)? - self.hierarchyTrackingNode = HierarchyTrackingNode({ value in - updateInHierarchy?(value) - }) - - self.contentNode = ASDisplayNode() - - super.init() - - self.addSubnode(self.contentNode) - - updateInHierarchy = { [weak self] value in - guard let strongSelf = self else { - return - } - strongSelf.inHierarchyValue = value - strongSelf.animator?.isPaused = value - } - } - - deinit { - self.animator?.invalidate() - } - - func update(color: UIColor, creationTimestamp: Int32, deadlineTimestamp: Int32) { - let params = Params( - color: color, - creationTimestamp: creationTimestamp, - deadlineTimestamp: deadlineTimestamp - ) - self.currentParams = params - - self.updateValues() - } - - private func updateValues() { - guard let params = self.currentParams else { - return - } - - let color = params.color - - let currentTimestamp = Int32(CFAbsoluteTimeGetCurrent() + NSTimeIntervalSince1970) - var fraction = CGFloat(params.deadlineTimestamp - currentTimestamp) / CGFloat(params.deadlineTimestamp - params.creationTimestamp) - fraction = max(0.0001, 1.0 - max(0.0, min(1.0, fraction))) - - let image: UIImage? - - let diameter: CGFloat = 26.0 - let inset: CGFloat = 8.0 - let lineWidth: CGFloat = 2.0 - - let timestamp = CACurrentMediaTime() - - let center = CGPoint(x: (diameter + inset) / 2.0, y: (diameter + inset) / 2.0) - let radius: CGFloat = (diameter - lineWidth / 2.0) / 2.0 - - let startAngle: CGFloat = -CGFloat.pi / 2.0 - let endAngle: CGFloat = -CGFloat.pi / 2.0 + 2.0 * CGFloat.pi * fraction - - let sparks = fraction > 0.1 && fraction != 1.0 - if sparks { - let v = CGPoint(x: sin(endAngle), y: -cos(endAngle)) - let c = CGPoint(x: -v.y * radius + center.x, y: v.x * radius + center.y) - - let dt: CGFloat = 1.0 / 60.0 - var removeIndices: [Int] = [] - for i in 0 ..< self.particles.count { - let currentTime = timestamp - self.particles[i].beginTime - if currentTime > self.particles[i].lifetime { - removeIndices.append(i) - } else { - let input: CGFloat = CGFloat(currentTime / self.particles[i].lifetime) - let decelerated: CGFloat = (1.0 - (1.0 - input) * (1.0 - input)) - self.particles[i].alpha = 1.0 - decelerated - - var p = self.particles[i].position - let d = self.particles[i].direction - let v = self.particles[i].velocity - p = CGPoint(x: p.x + d.x * v * dt, y: p.y + d.y * v * dt) - self.particles[i].position = p - } - } - - for i in removeIndices.reversed() { - self.particles.remove(at: i) - } - - let newParticleCount = 1 - for _ in 0 ..< newParticleCount { - let degrees: CGFloat = CGFloat(arc4random_uniform(140)) - 40.0 - let angle: CGFloat = degrees * CGFloat.pi / 180.0 - - let direction = CGPoint(x: v.x * cos(angle) - v.y * sin(angle), y: v.x * sin(angle) + v.y * cos(angle)) - let velocity = (20.0 + (CGFloat(arc4random()) / CGFloat(UINT32_MAX)) * 4.0) * 0.3 - - let lifetime = Double(0.4 + CGFloat(arc4random_uniform(100)) * 0.01) - - let particle = ContentParticle(position: c, direction: direction, velocity: velocity, alpha: 1.0, lifetime: lifetime, beginTime: timestamp) - self.particles.append(particle) - } - } - - image = generateImage(CGSize(width: diameter + inset, height: diameter + inset), rotatedContext: { size, context in - context.clear(CGRect(origin: CGPoint(), size: size)) - context.setStrokeColor(color.cgColor) - context.setFillColor(color.cgColor) - context.setLineWidth(lineWidth) - context.setLineCap(.round) - - let path = CGMutablePath() - path.addArc(center: center, radius: radius, startAngle: startAngle, endAngle: endAngle, clockwise: true) - context.addPath(path) - context.strokePath() - - if sparks { - for particle in self.particles { - let size: CGFloat = 2.0 - context.setAlpha(particle.alpha) - context.fillEllipse(in: CGRect(origin: CGPoint(x: particle.position.x - size / 2.0, y: particle.position.y - size / 2.0), size: CGSize(width: size, height: size))) - } - } - }) - - self.contentNode.contents = image?.cgImage - if let image = image { - self.contentNode.frame = CGRect(origin: CGPoint(), size: image.size) - } - - if fraction <= .ulpOfOne { - self.animator?.invalidate() - self.animator = nil - } else { - if self.animator == nil { - let animator = ConstantDisplayLinkAnimator(update: { [weak self] in - self?.updateValues() - }) - self.animator = animator - animator.isPaused = self.inHierarchyValue - } - } - } -} diff --git a/submodules/InviteLinksUI/Sources/ItemListInviteLinkGridItem.swift b/submodules/InviteLinksUI/Sources/ItemListInviteLinkGridItem.swift deleted file mode 100644 index 59e0a20479..0000000000 --- a/submodules/InviteLinksUI/Sources/ItemListInviteLinkGridItem.swift +++ /dev/null @@ -1,267 +0,0 @@ -import Foundation -import UIKit -import Display -import AsyncDisplayKit -import SwiftSignalKit -import SyncCore -import TelegramPresentationData -import ItemListUI - -public class ItemListInviteLinkGridItem: ListViewItem, ItemListItem { - let presentationData: ItemListPresentationData - let invites: [ExportedInvitation]? - let count: Int - let share: Bool - public let sectionId: ItemListSectionId - let style: ItemListStyle - let tapAction: ((ExportedInvitation) -> Void)? - let contextAction: ((ExportedInvitation, ASDisplayNode) -> Void)? - public let tag: ItemListItemTag? - - public init( - presentationData: ItemListPresentationData, - invites: [ExportedInvitation]?, - count: Int, - share: Bool, - sectionId: ItemListSectionId, - style: ItemListStyle, - tapAction: ((ExportedInvitation) -> Void)?, - contextAction: ((ExportedInvitation, ASDisplayNode) -> Void)?, - tag: ItemListItemTag? = nil - ) { - self.presentationData = presentationData - self.invites = invites - self.count = count - self.share = share - self.sectionId = sectionId - self.style = style - self.tapAction = tapAction - self.contextAction = contextAction - self.tag = tag - } - - public func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal?, (ListViewItemApply) -> Void)) -> Void) { - async { - let node = ItemListInviteLinkGridItemNode() - let (layout, apply) = node.asyncLayout()(self, params, itemListNeighbors(item: self, topItem: previousItem as? ItemListItem, bottomItem: nextItem as? ItemListItem)) - - node.contentSize = layout.contentSize - node.insets = layout.insets - - Queue.mainQueue().async { - completion(node, { - return (nil, { _ in apply() }) - }) - } - } - } - - public func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) { - Queue.mainQueue().async { - if let nodeValue = node() as? ItemListInviteLinkGridItemNode { - let makeLayout = nodeValue.asyncLayout() - - async { - let (layout, apply) = makeLayout(self, params, itemListNeighbors(item: self, topItem: previousItem as? ItemListItem, bottomItem: nextItem as? ItemListItem)) - Queue.mainQueue().async { - completion(layout, { _ in - apply() - }) - } - } - } - } - } - - public var selectable: Bool = false - - public func selected(listView: ListView){ - } -} - -public class ItemListInviteLinkGridItemNode: ListViewItemNode, ItemListItemNode { - private let backgroundNode: ASDisplayNode - private let topStripeNode: ASDisplayNode - private let bottomStripeNode: ASDisplayNode - private let maskNode: ASImageNode - - private let gridNode: InviteLinksGridNode - - private var item: ItemListInviteLinkGridItem? - - override public var canBeSelected: Bool { - return false - } - - public var tag: ItemListItemTag? { - return self.item?.tag - } - - public init() { - self.backgroundNode = ASDisplayNode() - self.backgroundNode.isLayerBacked = true - self.backgroundNode.backgroundColor = .white - - self.maskNode = ASImageNode() - - self.topStripeNode = ASDisplayNode() - self.topStripeNode.isLayerBacked = true - - self.bottomStripeNode = ASDisplayNode() - self.bottomStripeNode.isLayerBacked = true - - self.gridNode = InviteLinksGridNode() - - super.init(layerBacked: false, dynamicBounce: false) - - self.addSubnode(self.gridNode) - } - - public func asyncLayout() -> (_ item: ItemListInviteLinkGridItem, _ params: ListViewItemLayoutParams, _ insets: ItemListNeighbors) -> (ListViewItemNodeLayout, () -> Void) { - let currentItem = self.item - - return { item, params, neighbors in - var updatedTheme: PresentationTheme? - if currentItem?.presentationData.theme !== item.presentationData.theme { - updatedTheme = item.presentationData.theme - } - - let contentSize: CGSize - let insets: UIEdgeInsets - let separatorHeight = UIScreenPixel - let itemBackgroundColor: UIColor - let itemSeparatorColor: UIColor - - let leftInset = 16.0 + params.leftInset - let topInset: CGFloat - if case .plain = item.style, case .otherSection = neighbors.top { - topInset = 16.0 - } else if case .blocks = item.style, case .sameSection(true) = neighbors.top { - topInset = 16.0 - } else { - topInset = 4.0 - } - - var height: CGFloat - let count = item.invites?.count ?? item.count - if count > 0 { - if count % 2 == 0 { - height = topInset + 122.0 + 6.0 - } else { - height = topInset + 102.0 + 6.0 - } - } else { - height = 0.001 - } - - switch item.style { - case .plain: - itemBackgroundColor = item.presentationData.theme.list.blocksBackgroundColor - itemSeparatorColor = item.presentationData.theme.list.blocksBackgroundColor - insets = UIEdgeInsets() - case .blocks: - itemBackgroundColor = item.presentationData.theme.list.itemBlocksBackgroundColor - itemSeparatorColor = item.presentationData.theme.list.itemBlocksSeparatorColor - insets = itemListNeighborsGroupedInsets(neighbors) - } - if case .sameSection(false) = neighbors.bottom { - } else { - height += 10.0 - } - contentSize = CGSize(width: params.width, height: height) - - return (ListViewItemNodeLayout(contentSize: contentSize, insets: insets), { [weak self] in - if let strongSelf = self { - strongSelf.item = item - - if let _ = updatedTheme { - strongSelf.topStripeNode.backgroundColor = itemSeparatorColor - strongSelf.bottomStripeNode.backgroundColor = itemSeparatorColor - strongSelf.backgroundNode.backgroundColor = itemBackgroundColor - } - - let gridSize = strongSelf.gridNode.update(size: contentSize, safeInset: params.leftInset, items: item.invites, count: item.count, share: item.share, presentationData: item.presentationData, transition: .immediate) - strongSelf.gridNode.frame = CGRect(origin: CGPoint(x: 0.0, y: topInset - 4.0), size: gridSize) - strongSelf.gridNode.action = { invite in - item.tapAction?(invite) - } - strongSelf.gridNode.contextAction = { node, invite in - item.contextAction?(invite, node) - } - - switch item.style { - case .plain: - if strongSelf.backgroundNode.supernode == nil { - strongSelf.insertSubnode(strongSelf.backgroundNode, at: 0) - } - if strongSelf.topStripeNode.supernode != nil { - strongSelf.topStripeNode.removeFromSupernode() - } - if strongSelf.bottomStripeNode.supernode != nil { - strongSelf.bottomStripeNode.removeFromSupernode() - } - if strongSelf.maskNode.supernode != nil { - strongSelf.maskNode.removeFromSupernode() - } - strongSelf.backgroundNode.frame = CGRect(origin: CGPoint(), size: CGSize(width: params.width, height: contentSize.height)) - strongSelf.bottomStripeNode.frame = CGRect(origin: CGPoint(x: leftInset, y: contentSize.height - separatorHeight), size: CGSize(width: params.width - leftInset, height: separatorHeight)) - case .blocks: - if strongSelf.backgroundNode.supernode == nil { - strongSelf.insertSubnode(strongSelf.backgroundNode, at: 0) - } - if strongSelf.topStripeNode.supernode == nil { - strongSelf.insertSubnode(strongSelf.topStripeNode, at: 1) - } - if strongSelf.bottomStripeNode.supernode == nil { - strongSelf.insertSubnode(strongSelf.bottomStripeNode, at: 2) - } - if strongSelf.maskNode.supernode == nil { - strongSelf.insertSubnode(strongSelf.maskNode, at: 3) - } - - let hasCorners = itemListHasRoundedBlockLayout(params) - var hasTopCorners = false - var hasBottomCorners = false - switch neighbors.top { - case .sameSection(false): - strongSelf.topStripeNode.isHidden = true - default: - hasTopCorners = true - strongSelf.topStripeNode.isHidden = hasCorners - } - let bottomStripeInset: CGFloat - switch neighbors.bottom { - case .sameSection(false): - bottomStripeInset = leftInset - strongSelf.bottomStripeNode.isHidden = true - default: - bottomStripeInset = 0.0 - hasBottomCorners = true - strongSelf.bottomStripeNode.isHidden = hasCorners - } - - strongSelf.maskNode.image = hasCorners ? PresentationResourcesItemList.cornersImage(item.presentationData.theme, top: hasTopCorners, bottom: hasBottomCorners) : nil - - strongSelf.backgroundNode.frame = CGRect(origin: CGPoint(x: 0.0, y: -min(insets.top, separatorHeight)), size: CGSize(width: params.width, height: contentSize.height + min(insets.top, separatorHeight) + min(insets.bottom, separatorHeight))) - strongSelf.maskNode.frame = strongSelf.backgroundNode.frame.insetBy(dx: params.leftInset, dy: 0.0) - strongSelf.topStripeNode.frame = CGRect(origin: CGPoint(x: 0.0, y: -min(insets.top, separatorHeight)), size: CGSize(width: params.width, height: separatorHeight)) - strongSelf.bottomStripeNode.frame = CGRect(origin: CGPoint(x: bottomStripeInset, y: contentSize.height - separatorHeight), size: CGSize(width: params.width - bottomStripeInset, height: separatorHeight)) - } - } - }) - } - } - - override public func animateInsertion(_ currentTimestamp: Double, duration: Double, short: Bool) { - self.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.4) - } - - override public func animateAdded(_ currentTimestamp: Double, duration: Double) { - self.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2) - } - - override public func animateRemoved(_ currentTimestamp: Double, duration: Double) { - self.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.15, removeOnCompletion: false) - } -} - diff --git a/submodules/InviteLinksUI/Sources/ItemListInviteLinkItem.swift b/submodules/InviteLinksUI/Sources/ItemListInviteLinkItem.swift index ea823736c4..78e4ff3cf5 100644 --- a/submodules/InviteLinksUI/Sources/ItemListInviteLinkItem.swift +++ b/submodules/InviteLinksUI/Sources/ItemListInviteLinkItem.swift @@ -363,6 +363,7 @@ public class ItemListInviteLinkItemNode: ListViewItemNode, ItemListItemNode { if let expireDate = invite.expireDate, currentTime >= expireDate { isExpired = true } + var isFull = false if let usageLimit = invite.usageLimit { if !isExpired { @@ -376,6 +377,7 @@ public class ItemListInviteLinkItemNode: ListViewItemNode, ItemListItemNode { timerValue = .fraction(fraction) } } else if remaining == 0 { + isFull = true if !subtitleText.isEmpty { subtitleText += " • " } @@ -383,7 +385,7 @@ public class ItemListInviteLinkItemNode: ListViewItemNode, ItemListItemNode { } } } - if let expireDate = invite.expireDate { + if let expireDate = invite.expireDate, !isFull { if !isExpired { if !subtitleText.isEmpty { subtitleText += " • " @@ -570,7 +572,7 @@ public class ItemListInviteLinkItemNode: ListViewItemNode, ItemListItemNode { timerNode = TimerNode() timerNode.isUserInteractionEnabled = false strongSelf.timerNode = timerNode - strongSelf.addSubnode(timerNode) + strongSelf.offsetContainerNode.addSubnode(timerNode) } timerNode.update(color: iconColor, value: timerValue) } else if let timerNode = strongSelf.timerNode { @@ -785,7 +787,7 @@ private final class TimerNode: ASDisplayNode { let startAngle: CGFloat = -CGFloat.pi / 2.0 let endAngle: CGFloat = -CGFloat.pi / 2.0 + 2.0 * CGFloat.pi * fraction - let sparks = fraction > 0.1 && fraction != 1.0 + let sparks = fraction > 0.05 && fraction != 1.0 if sparks { let v = CGPoint(x: sin(endAngle), y: -cos(endAngle)) let c = CGPoint(x: -v.y * radius + center.x, y: v.x * radius + center.y) diff --git a/submodules/PeerInfoUI/Sources/ChannelMembersController.swift b/submodules/PeerInfoUI/Sources/ChannelMembersController.swift index 7ec8ec999a..e26e73f01d 100644 --- a/submodules/PeerInfoUI/Sources/ChannelMembersController.swift +++ b/submodules/PeerInfoUI/Sources/ChannelMembersController.swift @@ -287,25 +287,6 @@ private func ChannelMembersControllerEntries(context: AccountContext, presentati var index: Int32 = 0 let sortedParticipants = participants - /* - participants.sorted(by: { lhs, rhs in - let lhsInvitedAt: Int32 - switch lhs.participant { - case .creator: - lhsInvitedAt = Int32.min - case let .member(_, invitedAt, _, _): - lhsInvitedAt = invitedAt - } - let rhsInvitedAt: Int32 - switch rhs.participant { - case .creator: - rhsInvitedAt = Int32.min - case let .member(_, invitedAt, _, _): - rhsInvitedAt = invitedAt - } - return lhsInvitedAt < rhsInvitedAt - }) - */ for participant in sortedParticipants { var editable = true var canEditMembers = false diff --git a/submodules/PeerInfoUI/Sources/ChannelVisibilityController.swift b/submodules/PeerInfoUI/Sources/ChannelVisibilityController.swift index 3de5ef2276..f8a5a59e79 100644 --- a/submodules/PeerInfoUI/Sources/ChannelVisibilityController.swift +++ b/submodules/PeerInfoUI/Sources/ChannelVisibilityController.swift @@ -968,8 +968,17 @@ public func channelVisibilityController(context: AccountContext, peerId: PeerId, return nil } |> deliverOnMainQueue).start(next: { invite in if let invite = invite { - let controller = InviteLinkQRCodeController(context: context, invite: invite) - presentControllerImpl?(controller, nil) + let _ = (context.account.postbox.loadedPeerWithId(peerId) + |> deliverOnMainQueue).start(next: { peer in + let isGroup: Bool + if let peer = peer as? TelegramChannel, case .broadcast = peer.info { + isGroup = false + } else { + isGroup = true + } + let controller = InviteLinkQRCodeController(context: context, invite: invite, isGroup: isGroup) + presentControllerImpl?(controller, nil) + }) } }) }))) diff --git a/submodules/PeerInfoUI/Sources/PeerReportController.swift b/submodules/PeerInfoUI/Sources/PeerReportController.swift index 89e157ae8d..6e562236af 100644 --- a/submodules/PeerInfoUI/Sources/PeerReportController.swift +++ b/submodules/PeerInfoUI/Sources/PeerReportController.swift @@ -78,7 +78,7 @@ public func presentPeerReportOptions(context: AccountContext, parent: ViewContro if let reportReason = reportReason { switch subject { case let .peer(peerId): - let _ = (reportPeer(account: context.account, peerId: peerId, reason: reportReason) + let _ = (reportPeer(account: context.account, peerId: peerId, reason: reportReason, message: "") |> deliverOnMainQueue).start(completed: { if let path = getAppBundle().path(forResource: "PoliceCar", ofType: "tgs") { parent?.present(UndoOverlayController(presentationData: presentationData, content: .emoji(path: path, text: presentationData.strings.Report_Succeed), elevatedLayout: false, action: { _ in return false }), in: .current) @@ -86,7 +86,7 @@ public func presentPeerReportOptions(context: AccountContext, parent: ViewContro completion(reportReason, true) }) case let .messages(messageIds): - let _ = (reportPeerMessages(account: context.account, messageIds: messageIds, reason: reportReason) + let _ = (reportPeerMessages(account: context.account, messageIds: messageIds, reason: reportReason, message: "") |> deliverOnMainQueue).start(completed: { if let path = getAppBundle().path(forResource: "PoliceCar", ofType: "tgs") { parent?.present(UndoOverlayController(presentationData: presentationData, content: .emoji(path: path, text: presentationData.strings.Report_Succeed), elevatedLayout: false, action: { _ in return false }), in: .current) @@ -155,12 +155,16 @@ public func peerReportOptionsController(context: AccountContext, subject: PeerRe break } if let reportReason = reportReason { + var passthrough = passthrough + if case .fake = reportReason { + passthrough = false + } switch subject { case let .peer(peerId): if passthrough { completion(reportReason, true) } else { - let _ = (reportPeer(account: context.account, peerId: peerId, reason: reportReason) + let _ = (reportPeer(account: context.account, peerId: peerId, reason: reportReason, message: "") |> deliverOnMainQueue).start(completed: { if let path = getAppBundle().path(forResource: "PoliceCar", ofType: "tgs") { present(UndoOverlayController(presentationData: presentationData, content: .emoji(path: path, text: presentationData.strings.Report_Succeed), elevatedLayout: false, action: { _ in return false }), nil) @@ -172,7 +176,7 @@ public func peerReportOptionsController(context: AccountContext, subject: PeerRe if passthrough { completion(reportReason, true) } else { - let _ = (reportPeerMessages(account: context.account, messageIds: messageIds, reason: reportReason) + let _ = (reportPeerMessages(account: context.account, messageIds: messageIds, reason: reportReason, message: "") |> deliverOnMainQueue).start(completed: { if let path = getAppBundle().path(forResource: "PoliceCar", ofType: "tgs") { present(UndoOverlayController(presentationData: presentationData, content: .emoji(path: path, text: presentationData.strings.Report_Succeed), elevatedLayout: false, action: { _ in return false }), nil) @@ -326,7 +330,7 @@ private func peerReportController(context: AccountContext, subject: PeerReportSu } if !text.isEmpty { - let reportReason: ReportReason = .custom(text) + let reportReason: ReportReason = .custom let completed: () -> Void = { let presentationData = context.sharedContext.currentPresentationData.with { $0 } presentControllerImpl?(textAlertController(context: context, title: nil, text: presentationData.strings.ReportPeer_AlertSuccess, actions: [TextAlertAction.init(type: TextAlertActionType.defaultAction, title: presentationData.strings.Common_OK, action: {})]), nil) @@ -335,12 +339,12 @@ private func peerReportController(context: AccountContext, subject: PeerReportSu } switch subject { case let .peer(peerId): - reportDisposable.set((reportPeer(account: context.account, peerId: peerId, reason: reportReason) + reportDisposable.set((reportPeer(account: context.account, peerId: peerId, reason: reportReason, message: text) |> deliverOnMainQueue).start(completed: { completed() })) case let .messages(messageIds): - reportDisposable.set((reportPeerMessages(account: context.account, messageIds: messageIds, reason: reportReason) + reportDisposable.set((reportPeerMessages(account: context.account, messageIds: messageIds, reason: reportReason, message: text) |> deliverOnMainQueue).start(completed: { completed() })) diff --git a/submodules/PeerInfoUI/Sources/UserInfoController.swift b/submodules/PeerInfoUI/Sources/UserInfoController.swift index 6fb7f8c313..e6f17b3ee1 100644 --- a/submodules/PeerInfoUI/Sources/UserInfoController.swift +++ b/submodules/PeerInfoUI/Sources/UserInfoController.swift @@ -1017,7 +1017,7 @@ public func userInfoController(context: AccountContext, peerId: PeerId, mode: Pe let _ = removePeerChat(account: context.account, peerId: peerId, reportChatSpam: reportSpam).start() popToRootImpl?() } else if reportSpam { - let _ = reportPeer(account: context.account, peerId: peerId, reason: .spam).start() + let _ = reportPeer(account: context.account, peerId: peerId, reason: .spam, message: "").start() } deleteSendMessageIntents(peerId: peerId) diff --git a/submodules/SectionHeaderItem/Sources/SectionHeaderItem.swift b/submodules/SectionHeaderItem/Sources/SectionHeaderItem.swift index 7eb61102e1..f29e35321c 100644 --- a/submodules/SectionHeaderItem/Sources/SectionHeaderItem.swift +++ b/submodules/SectionHeaderItem/Sources/SectionHeaderItem.swift @@ -117,8 +117,14 @@ private class SectionHeaderItemNode: ListViewItemNode { strongSelf.headerNode = headerNode } headerNode.title = item.title + switch item.additionalText { + case .none, .generic: + headerNode.actionType = .generic + case .destructive: + headerNode.actionType = .destructive + + } headerNode.action = item.additionalText.text - headerNode.frame = CGRect(origin: CGPoint(), size: contentSize) headerNode.updateLayout(size: contentSize, leftInset: params.leftInset, rightInset: params.rightInset) } diff --git a/submodules/ShareController/Sources/ShareInputFieldNode.swift b/submodules/ShareController/Sources/ShareInputFieldNode.swift index b61bdb210f..cc60e09b3b 100644 --- a/submodules/ShareController/Sources/ShareInputFieldNode.swift +++ b/submodules/ShareController/Sources/ShareInputFieldNode.swift @@ -63,6 +63,7 @@ public final class ShareInputFieldNode: ASDisplayNode, ASEditableTextNodeDelegat private let clearButton: HighlightableButtonNode public var updateHeight: (() -> Void)? + public var updateText: ((String) -> Void)? private let backgroundInsets = UIEdgeInsets(top: 16.0, left: 16.0, bottom: 1.0, right: 16.0) private let inputInsets = UIEdgeInsets(top: 10.0, left: 8.0, bottom: 10.0, right: 16.0) @@ -168,6 +169,7 @@ public final class ShareInputFieldNode: ASDisplayNode, ASEditableTextNodeDelegat @objc public func editableTextNodeDidUpdateText(_ editableTextNode: ASEditableTextNode) { self.updateTextNodeText(animated: true) + self.updateText?(editableTextNode.attributedText?.string ?? "") } public func editableTextNodeDidBeginEditing(_ editableTextNode: ASEditableTextNode) { diff --git a/submodules/SyncCore/Sources/TelegramChannel.swift b/submodules/SyncCore/Sources/TelegramChannel.swift index 6c55288ea2..a0e6792b48 100644 --- a/submodules/SyncCore/Sources/TelegramChannel.swift +++ b/submodules/SyncCore/Sources/TelegramChannel.swift @@ -144,6 +144,7 @@ public struct TelegramChannelFlags: OptionSet { public static let hasVoiceChat = TelegramChannelFlags(rawValue: 1 << 4) public static let hasActiveVoiceChat = TelegramChannelFlags(rawValue: 1 << 5) public static let isFake = TelegramChannelFlags(rawValue: 1 << 6) + public static let isGigagroup = TelegramChannelFlags(rawValue: 1 << 7) } public final class TelegramChannel: Peer { diff --git a/submodules/TelegramApi/Sources/Api0.swift b/submodules/TelegramApi/Sources/Api0.swift index b1e183fa3b..a318fc6070 100644 --- a/submodules/TelegramApi/Sources/Api0.swift +++ b/submodules/TelegramApi/Sources/Api0.swift @@ -11,8 +11,8 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-457104426] = { return Api.InputGeoPoint.parse_inputGeoPointEmpty($0) } dict[1210199983] = { return Api.InputGeoPoint.parse_inputGeoPoint($0) } dict[-784000893] = { return Api.payments.ValidatedRequestedInfo.parse_validatedRequestedInfo($0) } - dict[-500874592] = { return Api.ChatFull.parse_chatFull($0) } dict[-66811386] = { return Api.ChatFull.parse_channelFull($0) } + dict[-500874592] = { return Api.ChatFull.parse_chatFull($0) } dict[-1159937629] = { return Api.PollResults.parse_pollResults($0) } dict[-925415106] = { return Api.ChatParticipant.parse_chatParticipant($0) } dict[-636267638] = { return Api.ChatParticipant.parse_chatParticipantCreator($0) } @@ -33,20 +33,20 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[1216809369] = { return Api.PageBlock.parse_pageBlockFooter($0) } dict[-618614392] = { return Api.PageBlock.parse_pageBlockDivider($0) } dict[-837994576] = { return Api.PageBlock.parse_pageBlockAnchor($0) } - dict[-454524911] = { return Api.PageBlock.parse_pageBlockList($0) } dict[641563686] = { return Api.PageBlock.parse_pageBlockBlockquote($0) } dict[1329878739] = { return Api.PageBlock.parse_pageBlockPullquote($0) } + dict[972174080] = { return Api.PageBlock.parse_pageBlockCover($0) } + dict[-283684427] = { return Api.PageBlock.parse_pageBlockChannel($0) } + dict[504660880] = { return Api.PageBlock.parse_pageBlockKicker($0) } + dict[-1085412734] = { return Api.PageBlock.parse_pageBlockTable($0) } dict[391759200] = { return Api.PageBlock.parse_pageBlockPhoto($0) } dict[2089805750] = { return Api.PageBlock.parse_pageBlockVideo($0) } - dict[972174080] = { return Api.PageBlock.parse_pageBlockCover($0) } + dict[-2143067670] = { return Api.PageBlock.parse_pageBlockAudio($0) } dict[-1468953147] = { return Api.PageBlock.parse_pageBlockEmbed($0) } dict[-229005301] = { return Api.PageBlock.parse_pageBlockEmbedPost($0) } dict[1705048653] = { return Api.PageBlock.parse_pageBlockCollage($0) } dict[52401552] = { return Api.PageBlock.parse_pageBlockSlideshow($0) } - dict[-283684427] = { return Api.PageBlock.parse_pageBlockChannel($0) } - dict[-2143067670] = { return Api.PageBlock.parse_pageBlockAudio($0) } - dict[504660880] = { return Api.PageBlock.parse_pageBlockKicker($0) } - dict[-1085412734] = { return Api.PageBlock.parse_pageBlockTable($0) } + dict[-454524911] = { return Api.PageBlock.parse_pageBlockList($0) } dict[-1702174239] = { return Api.PageBlock.parse_pageBlockOrderedList($0) } dict[1987480557] = { return Api.PageBlock.parse_pageBlockDetails($0) } dict[370236054] = { return Api.PageBlock.parse_pageBlockRelatedArticles($0) } @@ -66,10 +66,10 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[590459437] = { return Api.Photo.parse_photoEmpty($0) } dict[-82216347] = { return Api.Photo.parse_photo($0) } dict[-1683826688] = { return Api.Chat.parse_chatEmpty($0) } - dict[1004149726] = { return Api.Chat.parse_chat($0) } dict[120753115] = { return Api.Chat.parse_chatForbidden($0) } - dict[-753232354] = { return Api.Chat.parse_channel($0) } dict[681420594] = { return Api.Chat.parse_channelForbidden($0) } + dict[1004149726] = { return Api.Chat.parse_chat($0) } + dict[-753232354] = { return Api.Chat.parse_channel($0) } dict[1202287072] = { return Api.StatsURL.parse_statsURL($0) } dict[1516793212] = { return Api.ChatInvite.parse_chatInviteAlready($0) } dict[-540871282] = { return Api.ChatInvite.parse_chatInvite($0) } @@ -113,11 +113,10 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[414687501] = { return Api.DcOption.parse_dcOption($0) } dict[997055186] = { return Api.PollAnswerVoters.parse_pollAnswerVoters($0) } dict[-1705233435] = { return Api.account.PasswordSettings.parse_passwordSettings($0) } - dict[-1945767479] = { return Api.help.SupportName.parse_supportName($0) } dict[-288727837] = { return Api.LangPackLanguage.parse_langPackLanguage($0) } dict[-399391402] = { return Api.VideoSize.parse_videoSize($0) } - dict[497489295] = { return Api.help.AppUpdate.parse_appUpdate($0) } dict[-1000708810] = { return Api.help.AppUpdate.parse_noAppUpdate($0) } + dict[497489295] = { return Api.help.AppUpdate.parse_appUpdate($0) } dict[-209337866] = { return Api.LangPackDifference.parse_langPackDifference($0) } dict[-815649386] = { return Api.PeerHistoryTTL.parse_peerHistoryTTLPM($0) } dict[1041354473] = { return Api.PeerHistoryTTL.parse_peerHistoryTTL($0) } @@ -142,12 +141,10 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[1690108678] = { return Api.InputEncryptedFile.parse_inputEncryptedFileUploaded($0) } dict[1511503333] = { return Api.InputEncryptedFile.parse_inputEncryptedFile($0) } dict[767652808] = { return Api.InputEncryptedFile.parse_inputEncryptedFileBigUploaded($0) } - dict[1304052993] = { return Api.account.Takeout.parse_takeout($0) } dict[-1456996667] = { return Api.messages.InactiveChats.parse_inactiveChats($0) } dict[1690708501] = { return Api.GroupCallParticipant.parse_groupCallParticipant($0) } dict[1443858741] = { return Api.messages.SentEncryptedMessage.parse_sentEncryptedMessage($0) } dict[-1802240206] = { return Api.messages.SentEncryptedMessage.parse_sentEncryptedFile($0) } - dict[289586518] = { return Api.SavedContact.parse_savedPhoneContact($0) } dict[1571494644] = { return Api.ExportedMessageLink.parse_exportedMessageLink($0) } dict[-855308010] = { return Api.auth.Authorization.parse_authorization($0) } dict[1148485274] = { return Api.auth.Authorization.parse_authorizationSignUpRequired($0) } @@ -211,14 +208,12 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-337352679] = { return Api.Update.parse_updateServiceNotification($0) } dict[-298113238] = { return Api.Update.parse_updatePrivacy($0) } dict[314130811] = { return Api.Update.parse_updateUserPhone($0) } - dict[-1667805217] = { return Api.Update.parse_updateReadHistoryInbox($0) } dict[791617983] = { return Api.Update.parse_updateReadHistoryOutbox($0) } dict[2139689491] = { return Api.Update.parse_updateWebPage($0) } dict[1757493555] = { return Api.Update.parse_updateReadMessagesContents($0) } dict[-352032773] = { return Api.Update.parse_updateChannelTooLong($0) } dict[-1227598250] = { return Api.Update.parse_updateChannel($0) } dict[1656358105] = { return Api.Update.parse_updateNewChannelMessage($0) } - dict[856380452] = { return Api.Update.parse_updateReadChannelInbox($0) } dict[-1015733815] = { return Api.Update.parse_updateDeleteChannelMessages($0) } dict[-1734268085] = { return Api.Update.parse_updateChannelMessageViews($0) } dict[-1232070311] = { return Api.Update.parse_updateChatParticipantAdmin($0) } @@ -226,7 +221,6 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[196268545] = { return Api.Update.parse_updateStickerSetsOrder($0) } dict[1135492588] = { return Api.Update.parse_updateStickerSets($0) } dict[-1821035490] = { return Api.Update.parse_updateSavedGifs($0) } - dict[1059076315] = { return Api.Update.parse_updateBotInlineQuery($0) } dict[239663460] = { return Api.Update.parse_updateBotInlineSend($0) } dict[457133559] = { return Api.Update.parse_updateEditChannelMessage($0) } dict[-415938591] = { return Api.Update.parse_updateBotCallbackQuery($0) } @@ -239,23 +233,25 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-1574314746] = { return Api.Update.parse_updateConfig($0) } dict[861169551] = { return Api.Update.parse_updatePtsChanged($0) } dict[1081547008] = { return Api.Update.parse_updateChannelWebPage($0) } - dict[1852826908] = { return Api.Update.parse_updateDialogPinned($0) } - dict[-99664734] = { return Api.Update.parse_updatePinnedDialogs($0) } dict[-2095595325] = { return Api.Update.parse_updateBotWebhookJSON($0) } dict[-1684914010] = { return Api.Update.parse_updateBotWebhookJSONQuery($0) } dict[-523384512] = { return Api.Update.parse_updateBotShippingQuery($0) } dict[1563376297] = { return Api.Update.parse_updateBotPrecheckoutQuery($0) } dict[-1425052898] = { return Api.Update.parse_updatePhoneCall($0) } - dict[1180041828] = { return Api.Update.parse_updateLangPackTooLong($0) } dict[1442983757] = { return Api.Update.parse_updateLangPack($0) } dict[-451831443] = { return Api.Update.parse_updateFavedStickers($0) } dict[-1987495099] = { return Api.Update.parse_updateChannelReadMessagesContents($0) } dict[1887741886] = { return Api.Update.parse_updateContactsReset($0) } dict[1893427255] = { return Api.Update.parse_updateChannelAvailableMessages($0) } dict[-513517117] = { return Api.Update.parse_updateDialogUnreadMark($0) } + dict[1180041828] = { return Api.Update.parse_updateLangPackTooLong($0) } dict[-1398708869] = { return Api.Update.parse_updateMessagePoll($0) } dict[1421875280] = { return Api.Update.parse_updateChatDefaultBannedRights($0) } dict[422972864] = { return Api.Update.parse_updateFolderPeers($0) } + dict[1852826908] = { return Api.Update.parse_updateDialogPinned($0) } + dict[-99664734] = { return Api.Update.parse_updatePinnedDialogs($0) } + dict[856380452] = { return Api.Update.parse_updateReadChannelInbox($0) } + dict[-1667805217] = { return Api.Update.parse_updateReadHistoryInbox($0) } dict[1786671974] = { return Api.Update.parse_updatePeerSettings($0) } dict[-1263546448] = { return Api.Update.parse_updatePeerLocated($0) } dict[967122427] = { return Api.Update.parse_updateNewScheduledMessage($0) } @@ -279,15 +275,16 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[321954198] = { return Api.Update.parse_updateChat($0) } dict[-219423922] = { return Api.Update.parse_updateGroupCallParticipants($0) } dict[-1537295973] = { return Api.Update.parse_updateGroupCall($0) } + dict[1059076315] = { return Api.Update.parse_updateBotInlineQuery($0) } dict[19291112] = { return Api.Update.parse_updatePeerHistoryTTL($0) } dict[136574537] = { return Api.messages.VotesList.parse_votesList($0) } dict[1558266229] = { return Api.PopularContact.parse_popularContact($0) } dict[-373643672] = { return Api.FolderPeer.parse_folderPeer($0) } dict[367766557] = { return Api.ChannelParticipant.parse_channelParticipant($0) } dict[-1557620115] = { return Api.ChannelParticipant.parse_channelParticipantSelf($0) } - dict[1149094475] = { return Api.ChannelParticipant.parse_channelParticipantCreator($0) } - dict[-859915345] = { return Api.ChannelParticipant.parse_channelParticipantAdmin($0) } dict[470789295] = { return Api.ChannelParticipant.parse_channelParticipantBanned($0) } + dict[-859915345] = { return Api.ChannelParticipant.parse_channelParticipantAdmin($0) } + dict[1149094475] = { return Api.ChannelParticipant.parse_channelParticipantCreator($0) } dict[-1010402965] = { return Api.ChannelParticipant.parse_channelParticipantLeft($0) } dict[-1567730343] = { return Api.MessageUserVote.parse_messageUserVote($0) } dict[909603888] = { return Api.MessageUserVote.parse_messageUserVoteInputOption($0) } @@ -296,9 +293,9 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-513392236] = { return Api.contacts.Blocked.parse_blockedSlice($0) } dict[-55902537] = { return Api.InputDialogPeer.parse_inputDialogPeer($0) } dict[1684014375] = { return Api.InputDialogPeer.parse_inputDialogPeerFolder($0) } + dict[-994444869] = { return Api.Error.parse_error($0) } dict[-1560655744] = { return Api.KeyboardButton.parse_keyboardButton($0) } dict[629866245] = { return Api.KeyboardButton.parse_keyboardButtonUrl($0) } - dict[901503851] = { return Api.KeyboardButton.parse_keyboardButtonCallback($0) } dict[-1318425559] = { return Api.KeyboardButton.parse_keyboardButtonRequestPhone($0) } dict[-59151553] = { return Api.KeyboardButton.parse_keyboardButtonRequestGeoLocation($0) } dict[90744648] = { return Api.KeyboardButton.parse_keyboardButtonSwitchInline($0) } @@ -307,6 +304,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[280464681] = { return Api.KeyboardButton.parse_keyboardButtonUrlAuth($0) } dict[-802258988] = { return Api.KeyboardButton.parse_inputKeyboardButtonUrlAuth($0) } dict[-1144565411] = { return Api.KeyboardButton.parse_keyboardButtonRequestPoll($0) } + dict[901503851] = { return Api.KeyboardButton.parse_keyboardButtonCallback($0) } dict[-748155807] = { return Api.ContactStatus.parse_contactStatus($0) } dict[1679398724] = { return Api.SecureFile.parse_secureFileEmpty($0) } dict[-534283678] = { return Api.SecureFile.parse_secureFile($0) } @@ -328,32 +326,33 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[1881892265] = { return Api.account.WallPapers.parse_wallPapers($0) } dict[1012306921] = { return Api.InputTheme.parse_inputTheme($0) } dict[-175567375] = { return Api.InputTheme.parse_inputThemeSlug($0) } + dict[1158290442] = { return Api.messages.FoundGifs.parse_foundGifs($0) } dict[-1132476723] = { return Api.FileLocation.parse_fileLocationToBeDeprecated($0) } dict[-2032041631] = { return Api.Poll.parse_poll($0) } - dict[-1195615476] = { return Api.InputNotifyPeer.parse_inputNotifyPeer($0) } dict[423314455] = { return Api.InputNotifyPeer.parse_inputNotifyUsers($0) } dict[1251338318] = { return Api.InputNotifyPeer.parse_inputNotifyChats($0) } dict[-1311015810] = { return Api.InputNotifyPeer.parse_inputNotifyBroadcasts($0) } + dict[-1195615476] = { return Api.InputNotifyPeer.parse_inputNotifyPeer($0) } dict[-317144808] = { return Api.EncryptedMessage.parse_encryptedMessage($0) } dict[594758406] = { return Api.EncryptedMessage.parse_encryptedMessageService($0) } dict[-566281095] = { return Api.ChannelParticipantsFilter.parse_channelParticipantsRecent($0) } dict[-1268741783] = { return Api.ChannelParticipantsFilter.parse_channelParticipantsAdmins($0) } - dict[-1548400251] = { return Api.ChannelParticipantsFilter.parse_channelParticipantsKicked($0) } dict[-1328445861] = { return Api.ChannelParticipantsFilter.parse_channelParticipantsBots($0) } dict[338142689] = { return Api.ChannelParticipantsFilter.parse_channelParticipantsBanned($0) } dict[106343499] = { return Api.ChannelParticipantsFilter.parse_channelParticipantsSearch($0) } + dict[-1548400251] = { return Api.ChannelParticipantsFilter.parse_channelParticipantsKicked($0) } dict[-1150621555] = { return Api.ChannelParticipantsFilter.parse_channelParticipantsContacts($0) } dict[-531931925] = { return Api.ChannelParticipantsFilter.parse_channelParticipantsMentions($0) } dict[-350980120] = { return Api.WebPage.parse_webPageEmpty($0) } dict[-981018084] = { return Api.WebPage.parse_webPagePending($0) } dict[-392411726] = { return Api.WebPage.parse_webPage($0) } dict[1930545681] = { return Api.WebPage.parse_webPageNotModified($0) } - dict[864077702] = { return Api.InputBotInlineMessage.parse_inputBotInlineMessageMediaAuto($0) } dict[1036876423] = { return Api.InputBotInlineMessage.parse_inputBotInlineMessageText($0) } - dict[-1768777083] = { return Api.InputBotInlineMessage.parse_inputBotInlineMessageMediaGeo($0) } + dict[1262639204] = { return Api.InputBotInlineMessage.parse_inputBotInlineMessageGame($0) } + dict[864077702] = { return Api.InputBotInlineMessage.parse_inputBotInlineMessageMediaAuto($0) } dict[1098628881] = { return Api.InputBotInlineMessage.parse_inputBotInlineMessageMediaVenue($0) } dict[-1494368259] = { return Api.InputBotInlineMessage.parse_inputBotInlineMessageMediaContact($0) } - dict[1262639204] = { return Api.InputBotInlineMessage.parse_inputBotInlineMessageGame($0) } + dict[-1768777083] = { return Api.InputBotInlineMessage.parse_inputBotInlineMessageMediaGeo($0) } dict[2002815875] = { return Api.KeyboardButtonRow.parse_keyboardButtonRow($0) } dict[1088567208] = { return Api.StickerSet.parse_stickerSet($0) } dict[-1111085620] = { return Api.messages.ExportedChatInvites.parse_exportedChatInvites($0) } @@ -382,20 +381,21 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[2131196633] = { return Api.contacts.ResolvedPeer.parse_resolvedPeer($0) } dict[-1964327229] = { return Api.SecureData.parse_secureData($0) } dict[-1771768449] = { return Api.InputMedia.parse_inputMediaEmpty($0) } - dict[505969924] = { return Api.InputMedia.parse_inputMediaUploadedPhoto($0) } - dict[-1279654347] = { return Api.InputMedia.parse_inputMediaPhoto($0) } dict[-104578748] = { return Api.InputMedia.parse_inputMediaGeoPoint($0) } - dict[-122978821] = { return Api.InputMedia.parse_inputMediaContact($0) } - dict[1530447553] = { return Api.InputMedia.parse_inputMediaUploadedDocument($0) } - dict[860303448] = { return Api.InputMedia.parse_inputMediaDocument($0) } + dict[1212395773] = { return Api.InputMedia.parse_inputMediaGifExternal($0) } + dict[-750828557] = { return Api.InputMedia.parse_inputMediaGame($0) } dict[-1052959727] = { return Api.InputMedia.parse_inputMediaVenue($0) } + dict[-186607933] = { return Api.InputMedia.parse_inputMediaInvoice($0) } + dict[505969924] = { return Api.InputMedia.parse_inputMediaUploadedPhoto($0) } + dict[1530447553] = { return Api.InputMedia.parse_inputMediaUploadedDocument($0) } + dict[-1279654347] = { return Api.InputMedia.parse_inputMediaPhoto($0) } dict[-440664550] = { return Api.InputMedia.parse_inputMediaPhotoExternal($0) } dict[-78455655] = { return Api.InputMedia.parse_inputMediaDocumentExternal($0) } - dict[-750828557] = { return Api.InputMedia.parse_inputMediaGame($0) } - dict[-186607933] = { return Api.InputMedia.parse_inputMediaInvoice($0) } - dict[-1759532989] = { return Api.InputMedia.parse_inputMediaGeoLive($0) } + dict[-122978821] = { return Api.InputMedia.parse_inputMediaContact($0) } dict[261416433] = { return Api.InputMedia.parse_inputMediaPoll($0) } dict[-428884101] = { return Api.InputMedia.parse_inputMediaDice($0) } + dict[-1759532989] = { return Api.InputMedia.parse_inputMediaGeoLive($0) } + dict[860303448] = { return Api.InputMedia.parse_inputMediaDocument($0) } dict[2134579434] = { return Api.InputPeer.parse_inputPeerEmpty($0) } dict[2107670217] = { return Api.InputPeer.parse_inputPeerSelf($0) } dict[396093539] = { return Api.InputPeer.parse_inputPeerChat($0) } @@ -408,8 +408,8 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-1078332329] = { return Api.help.PassportConfig.parse_passportConfigNotModified($0) } dict[-1600596305] = { return Api.help.PassportConfig.parse_passportConfig($0) } dict[1648543603] = { return Api.FileHash.parse_fileHash($0) } - dict[295067450] = { return Api.BotInlineResult.parse_botInlineResult($0) } dict[400266251] = { return Api.BotInlineResult.parse_botInlineMediaResult($0) } + dict[295067450] = { return Api.BotInlineResult.parse_botInlineResult($0) } dict[911761060] = { return Api.messages.BotCallbackAnswer.parse_botCallbackAnswer($0) } dict[1314881805] = { return Api.payments.PaymentResult.parse_paymentResult($0) } dict[-666824391] = { return Api.payments.PaymentResult.parse_paymentVerificationNeeded($0) } @@ -432,7 +432,6 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-421545947] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionChangeTitle($0) } dict[1427671598] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionChangeAbout($0) } dict[1783299128] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionChangeUsername($0) } - dict[1129042607] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionChangePhoto($0) } dict[460916654] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionToggleInvites($0) } dict[648939889] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionToggleSignatures($0) } dict[-370660328] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionUpdatePinned($0) } @@ -447,6 +446,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[1599903217] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionTogglePreHistoryHidden($0) } dict[771095562] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionDefaultBannedRights($0) } dict[-1895328189] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionStopPoll($0) } + dict[1129042607] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionChangePhoto($0) } dict[-1569748965] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionChangeLinkedChat($0) } dict[241923758] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionChangeLocation($0) } dict[1401984889] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionToggleSlowMode($0) } @@ -455,10 +455,10 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-115071790] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionParticipantMute($0) } dict[-431740480] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionParticipantUnmute($0) } dict[1456906823] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionToggleGroupCallSetting($0) } - dict[1557846647] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionParticipantJoinByInvite($0) } dict[1515256996] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionExportedInviteDelete($0) } dict[1091179342] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionExportedInviteRevoke($0) } dict[-384910503] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionExportedInviteEdit($0) } + dict[1557846647] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionParticipantJoinByInvite($0) } dict[1048537159] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionParticipantVolume($0) } dict[1855199800] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionChangeHistoryTTL($0) } dict[-543777747] = { return Api.auth.ExportedAuthorization.parse_exportedAuthorization($0) } @@ -471,7 +471,6 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-1036572727] = { return Api.account.PasswordInputSettings.parse_passwordInputSettings($0) } dict[878078826] = { return Api.PageTableCell.parse_pageTableCell($0) } dict[-1626209256] = { return Api.ChatBannedRights.parse_chatBannedRights($0) } - dict[1968737087] = { return Api.InputClientProxy.parse_inputClientProxy($0) } dict[649453030] = { return Api.messages.MessageEditData.parse_messageEditData($0) } dict[-886477832] = { return Api.LabeledPrice.parse_labeledPrice($0) } dict[-438840932] = { return Api.messages.ChatFull.parse_chatFull($0) } @@ -485,15 +484,15 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[1490799288] = { return Api.ReportReason.parse_inputReportReasonSpam($0) } dict[505595789] = { return Api.ReportReason.parse_inputReportReasonViolence($0) } dict[777640226] = { return Api.ReportReason.parse_inputReportReasonPornography($0) } - dict[-1376497949] = { return Api.ReportReason.parse_inputReportReasonChildAbuse($0) } - dict[-1041980751] = { return Api.ReportReason.parse_inputReportReasonOther($0) } dict[-1685456582] = { return Api.ReportReason.parse_inputReportReasonCopyright($0) } + dict[-1376497949] = { return Api.ReportReason.parse_inputReportReasonChildAbuse($0) } dict[-606798099] = { return Api.ReportReason.parse_inputReportReasonGeoIrrelevant($0) } dict[-170010905] = { return Api.ReportReason.parse_inputReportReasonFake($0) } + dict[-1041980751] = { return Api.ReportReason.parse_inputReportReasonOther($0) } dict[-247351839] = { return Api.InputEncryptedChat.parse_inputEncryptedChat($0) } dict[-524237339] = { return Api.PageTableRow.parse_pageTableRow($0) } - dict[453805082] = { return Api.DraftMessage.parse_draftMessageEmpty($0) } dict[-40996577] = { return Api.DraftMessage.parse_draftMessage($0) } + dict[453805082] = { return Api.DraftMessage.parse_draftMessageEmpty($0) } dict[-1014526429] = { return Api.help.Country.parse_country($0) } dict[418631927] = { return Api.StatsGroupTopPoster.parse_statsGroupTopPoster($0) } dict[-2128640689] = { return Api.account.SentEmailCode.parse_sentEmailCode($0) } @@ -509,13 +508,13 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-2036501105] = { return Api.SecureValueError.parse_secureValueError($0) } dict[-1592506512] = { return Api.SecureValueError.parse_secureValueErrorTranslationFile($0) } dict[878931416] = { return Api.SecureValueError.parse_secureValueErrorTranslationFiles($0) } - dict[-6249322] = { return Api.InputStickerSetItem.parse_inputStickerSetItem($0) } dict[-1728664459] = { return Api.help.PromoData.parse_promoDataEmpty($0) } dict[-1942390465] = { return Api.help.PromoData.parse_promoData($0) } dict[-1613493288] = { return Api.NotifyPeer.parse_notifyPeer($0) } dict[-1261946036] = { return Api.NotifyPeer.parse_notifyUsers($0) } dict[-1073230141] = { return Api.NotifyPeer.parse_notifyChats($0) } dict[-703403793] = { return Api.NotifyPeer.parse_notifyBroadcasts($0) } + dict[-582464156] = { return Api.wallet.KeySecretSalt.parse_secretSalt($0) } dict[1335282456] = { return Api.InputPrivacyKey.parse_inputPrivacyKeyStatusTimestamp($0) } dict[-1107622874] = { return Api.InputPrivacyKey.parse_inputPrivacyKeyChatInvite($0) } dict[-88417185] = { return Api.InputPrivacyKey.parse_inputPrivacyKeyPhoneCall($0) } @@ -537,13 +536,13 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-316748368] = { return Api.SecureValueHash.parse_secureValueHash($0) } dict[1722485756] = { return Api.phone.GroupCall.parse_groupCall($0) } dict[-398136321] = { return Api.messages.SearchCounter.parse_searchCounter($0) } + dict[-2128698738] = { return Api.auth.CheckedPhone.parse_checkedPhone($0) } dict[-1188055347] = { return Api.PageListItem.parse_pageListItemText($0) } dict[635466748] = { return Api.PageListItem.parse_pageListItemBlocks($0) } dict[-386039788] = { return Api.PeerBlocked.parse_peerBlocked($0) } dict[-1182234929] = { return Api.InputUser.parse_inputUserEmpty($0) } dict[-138301121] = { return Api.InputUser.parse_inputUserSelf($0) } dict[-668391402] = { return Api.InputUser.parse_inputUser($0) } - dict[756118935] = { return Api.InputUser.parse_inputUserFromMessage($0) } dict[-1738178803] = { return Api.Page.parse_page($0) } dict[871426631] = { return Api.SecureCredentialsEncrypted.parse_secureCredentialsEncrypted($0) } dict[-875679776] = { return Api.StatsPercentValue.parse_statsPercentValue($0) } @@ -576,50 +575,51 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-1502174430] = { return Api.InputMessage.parse_inputMessageID($0) } dict[-1160215659] = { return Api.InputMessage.parse_inputMessageReplyTo($0) } dict[-2037963464] = { return Api.InputMessage.parse_inputMessagePinned($0) } - dict[-1392895362] = { return Api.InputMessage.parse_inputMessageCallbackQuery($0) } dict[-58224696] = { return Api.PhoneCallProtocol.parse_phoneCallProtocol($0) } dict[-1237848657] = { return Api.StatsDateRangeDays.parse_statsDateRangeDays($0) } dict[-275956116] = { return Api.messages.AffectedFoundMessages.parse_affectedFoundMessages($0) } + dict[-1567175714] = { return Api.MessageFwdAuthor.parse_messageFwdAuthor($0) } dict[-1539849235] = { return Api.WallPaper.parse_wallPaper($0) } dict[-1963717851] = { return Api.WallPaper.parse_wallPaperNoFile($0) } dict[-1938715001] = { return Api.messages.Messages.parse_messages($0) } - dict[978610270] = { return Api.messages.Messages.parse_messagesSlice($0) } - dict[1682413576] = { return Api.messages.Messages.parse_channelMessages($0) } dict[1951620897] = { return Api.messages.Messages.parse_messagesNotModified($0) } + dict[1682413576] = { return Api.messages.Messages.parse_channelMessages($0) } + dict[978610270] = { return Api.messages.Messages.parse_messagesSlice($0) } dict[-1022713000] = { return Api.Invoice.parse_invoice($0) } dict[1933519201] = { return Api.PeerSettings.parse_peerSettings($0) } dict[1577067778] = { return Api.auth.SentCode.parse_sentCode($0) } dict[480546647] = { return Api.InputChatPhoto.parse_inputChatPhotoEmpty($0) } - dict[-968723890] = { return Api.InputChatPhoto.parse_inputChatUploadedPhoto($0) } dict[-1991004873] = { return Api.InputChatPhoto.parse_inputChatPhoto($0) } + dict[-968723890] = { return Api.InputChatPhoto.parse_inputChatUploadedPhoto($0) } dict[-1228606141] = { return Api.messages.MessageViews.parse_messageViews($0) } dict[375566091] = { return Api.messages.HistoryImport.parse_historyImport($0) } dict[-368917890] = { return Api.PaymentCharge.parse_paymentCharge($0) } dict[-1387279939] = { return Api.MessageInteractionCounters.parse_messageInteractionCounters($0) } dict[-1107852396] = { return Api.stats.BroadcastStats.parse_broadcastStats($0) } dict[-484987010] = { return Api.Updates.parse_updatesTooLong($0) } - dict[-84936653] = { return Api.Updates.parse_updateShortMessage($0) } - dict[290961496] = { return Api.Updates.parse_updateShortChatMessage($0) } dict[2027216577] = { return Api.Updates.parse_updateShort($0) } dict[1918567619] = { return Api.Updates.parse_updatesCombined($0) } dict[1957577280] = { return Api.Updates.parse_updates($0) } + dict[-84936653] = { return Api.Updates.parse_updateShortMessage($0) } + dict[290961496] = { return Api.Updates.parse_updateShortChatMessage($0) } dict[-1877614335] = { return Api.Updates.parse_updateShortSentMessage($0) } dict[-276825834] = { return Api.stats.MegagroupStats.parse_megagroupStats($0) } dict[-884757282] = { return Api.StatsAbsValueAndPrev.parse_statsAbsValueAndPrev($0) } dict[1038967584] = { return Api.MessageMedia.parse_messageMediaEmpty($0) } - dict[1766936791] = { return Api.MessageMedia.parse_messageMediaPhoto($0) } dict[1457575028] = { return Api.MessageMedia.parse_messageMediaGeo($0) } - dict[-873313984] = { return Api.MessageMedia.parse_messageMediaContact($0) } dict[-1618676578] = { return Api.MessageMedia.parse_messageMediaUnsupported($0) } - dict[-1666158377] = { return Api.MessageMedia.parse_messageMediaDocument($0) } dict[-1557277184] = { return Api.MessageMedia.parse_messageMediaWebPage($0) } - dict[784356159] = { return Api.MessageMedia.parse_messageMediaVenue($0) } dict[-38694904] = { return Api.MessageMedia.parse_messageMediaGame($0) } dict[-2074799289] = { return Api.MessageMedia.parse_messageMediaInvoice($0) } - dict[-1186937242] = { return Api.MessageMedia.parse_messageMediaGeoLive($0) } + dict[784356159] = { return Api.MessageMedia.parse_messageMediaVenue($0) } + dict[1766936791] = { return Api.MessageMedia.parse_messageMediaPhoto($0) } + dict[-1666158377] = { return Api.MessageMedia.parse_messageMediaDocument($0) } + dict[-873313984] = { return Api.MessageMedia.parse_messageMediaContact($0) } dict[1272375192] = { return Api.MessageMedia.parse_messageMediaPoll($0) } dict[1065280907] = { return Api.MessageMedia.parse_messageMediaDice($0) } + dict[-1186937242] = { return Api.MessageMedia.parse_messageMediaGeoLive($0) } dict[-842892769] = { return Api.PaymentSavedCredentials.parse_paymentSavedCredentialsCard($0) } + dict[1450380236] = { return Api.Null.parse_null($0) } dict[1923290508] = { return Api.auth.CodeType.parse_codeTypeSms($0) } dict[1948046307] = { return Api.auth.CodeType.parse_codeTypeCall($0) } dict[577556219] = { return Api.auth.CodeType.parse_codeTypeFlashCall($0) } @@ -649,21 +649,21 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-1231326505] = { return Api.messages.ChatAdminsWithInvites.parse_chatAdminsWithInvites($0) } dict[-1729618630] = { return Api.BotInfo.parse_botInfo($0) } dict[-1519637954] = { return Api.updates.State.parse_state($0) } + dict[372165663] = { return Api.FoundGif.parse_foundGif($0) } + dict[-1670052855] = { return Api.FoundGif.parse_foundGifCached($0) } dict[537022650] = { return Api.User.parse_userEmpty($0) } dict[-1820043071] = { return Api.User.parse_user($0) } + dict[678405636] = { return Api.Message.parse_messageService($0) } dict[-1868117372] = { return Api.Message.parse_messageEmpty($0) } dict[-1125940270] = { return Api.Message.parse_message($0) } - dict[678405636] = { return Api.Message.parse_messageService($0) } dict[831924812] = { return Api.StatsGroupTopInviter.parse_statsGroupTopInviter($0) } dict[186120336] = { return Api.messages.RecentStickers.parse_recentStickersNotModified($0) } dict[586395571] = { return Api.messages.RecentStickers.parse_recentStickers($0) } - dict[-539317279] = { return Api.InputFileLocation.parse_inputFileLocation($0) } dict[-182231723] = { return Api.InputFileLocation.parse_inputEncryptedFileLocation($0) } - dict[-1160743548] = { return Api.InputFileLocation.parse_inputDocumentFileLocation($0) } dict[-876089816] = { return Api.InputFileLocation.parse_inputSecureFileLocation($0) } - dict[700340377] = { return Api.InputFileLocation.parse_inputTakeoutFileLocation($0) } + dict[-539317279] = { return Api.InputFileLocation.parse_inputFileLocation($0) } dict[1075322878] = { return Api.InputFileLocation.parse_inputPhotoFileLocation($0) } - dict[-667654413] = { return Api.InputFileLocation.parse_inputPhotoLegacyFileLocation($0) } + dict[-1160743548] = { return Api.InputFileLocation.parse_inputDocumentFileLocation($0) } dict[668375447] = { return Api.InputFileLocation.parse_inputPeerPhotoFileLocation($0) } dict[230353641] = { return Api.InputFileLocation.parse_inputStickerSetThumb($0) } dict[286776671] = { return Api.GeoPoint.parse_geoPointEmpty($0) } @@ -710,8 +710,8 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[1816636575] = { return Api.LangPackString.parse_langPackStringPluralized($0) } dict[695856818] = { return Api.LangPackString.parse_langPackStringDeleted($0) } dict[-1036396922] = { return Api.InputWebFileLocation.parse_inputWebFileLocation($0) } + dict[1430205163] = { return Api.InputWebFileLocation.parse_inputWebFileGeoMessageLocation($0) } dict[-1625153079] = { return Api.InputWebFileLocation.parse_inputWebFileGeoPointLocation($0) } - dict[-1275374751] = { return Api.EmojiLanguage.parse_emojiLanguage($0) } dict[1601666510] = { return Api.MessageFwdHeader.parse_messageFwdHeader($0) } dict[-1012849566] = { return Api.BaseTheme.parse_baseThemeClassic($0) } dict[-69724536] = { return Api.BaseTheme.parse_baseThemeDay($0) } @@ -723,6 +723,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-1777752804] = { return Api.MessagesFilter.parse_inputMessagesFilterPhotos($0) } dict[-1614803355] = { return Api.MessagesFilter.parse_inputMessagesFilterVideo($0) } dict[1458172132] = { return Api.MessagesFilter.parse_inputMessagesFilterPhotoVideo($0) } + dict[-648121413] = { return Api.MessagesFilter.parse_inputMessagesFilterPhotoVideoDocuments($0) } dict[-1629621880] = { return Api.MessagesFilter.parse_inputMessagesFilterDocument($0) } dict[2129714567] = { return Api.MessagesFilter.parse_inputMessagesFilterUrl($0) } dict[-3644025] = { return Api.MessagesFilter.parse_inputMessagesFilterGif($0) } @@ -733,6 +734,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[2054952868] = { return Api.MessagesFilter.parse_inputMessagesFilterRoundVoice($0) } dict[-1253451181] = { return Api.MessagesFilter.parse_inputMessagesFilterRoundVideo($0) } dict[-1040652646] = { return Api.MessagesFilter.parse_inputMessagesFilterMyMentions($0) } + dict[1187706024] = { return Api.MessagesFilter.parse_inputMessagesFilterMyMentionsUnread($0) } dict[-419271411] = { return Api.MessagesFilter.parse_inputMessagesFilterGeo($0) } dict[-530392189] = { return Api.MessagesFilter.parse_inputMessagesFilterContacts($0) } dict[464520273] = { return Api.MessagesFilter.parse_inputMessagesFilterPinned($0) } @@ -744,12 +746,13 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[594408994] = { return Api.EmojiKeyword.parse_emojiKeywordDeleted($0) } dict[-290921362] = { return Api.upload.CdnFile.parse_cdnFileReuploadNeeded($0) } dict[-1449145777] = { return Api.upload.CdnFile.parse_cdnFile($0) } + dict[1984136919] = { return Api.wallet.LiteResponse.parse_liteResponse($0) } dict[415997816] = { return Api.help.InviteText.parse_inviteText($0) } - dict[1984755728] = { return Api.BotInlineMessage.parse_botInlineMessageMediaAuto($0) } dict[-1937807902] = { return Api.BotInlineMessage.parse_botInlineMessageText($0) } - dict[85477117] = { return Api.BotInlineMessage.parse_botInlineMessageMediaGeo($0) } + dict[1984755728] = { return Api.BotInlineMessage.parse_botInlineMessageMediaAuto($0) } dict[-1970903652] = { return Api.BotInlineMessage.parse_botInlineMessageMediaVenue($0) } dict[416402882] = { return Api.BotInlineMessage.parse_botInlineMessageMediaContact($0) } + dict[85477117] = { return Api.BotInlineMessage.parse_botInlineMessageMediaGeo($0) } dict[-1673717362] = { return Api.InputPeerNotifySettings.parse_inputPeerNotifySettings($0) } dict[-1634752813] = { return Api.messages.FavedStickers.parse_favedStickersNotModified($0) } dict[-209768682] = { return Api.messages.FavedStickers.parse_favedStickers($0) } @@ -780,10 +783,10 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-732254058] = { return Api.PasswordKdfAlgo.parse_passwordKdfAlgoUnknown($0) } dict[982592842] = { return Api.PasswordKdfAlgo.parse_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow($0) } dict[-1390001672] = { return Api.account.Password.parse_password($0) } - dict[-2000710887] = { return Api.InputBotInlineResult.parse_inputBotInlineResult($0) } dict[-1462213465] = { return Api.InputBotInlineResult.parse_inputBotInlineResultPhoto($0) } dict[-459324] = { return Api.InputBotInlineResult.parse_inputBotInlineResultDocument($0) } dict[1336154098] = { return Api.InputBotInlineResult.parse_inputBotInlineResultGame($0) } + dict[-2000710887] = { return Api.InputBotInlineResult.parse_inputBotInlineResult($0) } dict[1352683077] = { return Api.account.PrivacyRules.parse_privacyRules($0) } dict[-123988] = { return Api.PrivacyRule.parse_privacyValueAllowContacts($0) } dict[1698855810] = { return Api.PrivacyRule.parse_privacyValueAllowAll($0) } @@ -830,8 +833,8 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[1674235686] = { return Api.account.AutoDownloadSettings.parse_autoDownloadSettings($0) } dict[-445792507] = { return Api.DialogPeer.parse_dialogPeer($0) } dict[1363483106] = { return Api.DialogPeer.parse_dialogPeerFolder($0) } - dict[475467473] = { return Api.WebDocument.parse_webDocument($0) } dict[-104284986] = { return Api.WebDocument.parse_webDocumentNoProxy($0) } + dict[475467473] = { return Api.WebDocument.parse_webDocument($0) } dict[42930452] = { return Api.Theme.parse_theme($0) } dict[-1290580579] = { return Api.contacts.Found.parse_found($0) } dict[-368018716] = { return Api.ChannelAdminLogEventsFilter.parse_channelAdminLogEventsFilter($0) } @@ -844,8 +847,8 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[1775479590] = { return Api.UserProfilePhoto.parse_userProfilePhoto($0) } dict[-74456004] = { return Api.payments.SavedInfo.parse_savedInfo($0) } dict[1041346555] = { return Api.updates.ChannelDifference.parse_channelDifferenceEmpty($0) } - dict[-1531132162] = { return Api.updates.ChannelDifference.parse_channelDifferenceTooLong($0) } dict[543450958] = { return Api.updates.ChannelDifference.parse_channelDifference($0) } + dict[-1531132162] = { return Api.updates.ChannelDifference.parse_channelDifferenceTooLong($0) } dict[-1815339214] = { return Api.help.CountriesList.parse_countriesListNotModified($0) } dict[-2016381538] = { return Api.help.CountriesList.parse_countriesList($0) } dict[-309659827] = { return Api.channels.AdminLogResults.parse_adminLogResults($0) } @@ -883,8 +886,8 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-1730311882] = { return Api.PageListOrderedItem.parse_pageListOrderedItemBlocks($0) } dict[-1417756512] = { return Api.EncryptedChat.parse_encryptedChatEmpty($0) } dict[1006044124] = { return Api.EncryptedChat.parse_encryptedChatWaiting($0) } - dict[1651608194] = { return Api.EncryptedChat.parse_encryptedChatRequested($0) } dict[-94974410] = { return Api.EncryptedChat.parse_encryptedChat($0) } + dict[1651608194] = { return Api.EncryptedChat.parse_encryptedChatRequested($0) } dict[505183301] = { return Api.EncryptedChat.parse_encryptedChatDiscarded($0) } dict[-901375139] = { return Api.PeerLocated.parse_peerLocated($0) } dict[-118740917] = { return Api.PeerLocated.parse_peerSelfLocated($0) } @@ -1013,8 +1016,6 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.account.PasswordSettings: _1.serialize(buffer, boxed) - case let _1 as Api.help.SupportName: - _1.serialize(buffer, boxed) case let _1 as Api.LangPackLanguage: _1.serialize(buffer, boxed) case let _1 as Api.VideoSize: @@ -1041,16 +1042,12 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.InputEncryptedFile: _1.serialize(buffer, boxed) - case let _1 as Api.account.Takeout: - _1.serialize(buffer, boxed) case let _1 as Api.messages.InactiveChats: _1.serialize(buffer, boxed) case let _1 as Api.GroupCallParticipant: _1.serialize(buffer, boxed) case let _1 as Api.messages.SentEncryptedMessage: _1.serialize(buffer, boxed) - case let _1 as Api.SavedContact: - _1.serialize(buffer, boxed) case let _1 as Api.ExportedMessageLink: _1.serialize(buffer, boxed) case let _1 as Api.auth.Authorization: @@ -1089,6 +1086,8 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.InputDialogPeer: _1.serialize(buffer, boxed) + case let _1 as Api.Error: + _1.serialize(buffer, boxed) case let _1 as Api.KeyboardButton: _1.serialize(buffer, boxed) case let _1 as Api.ContactStatus: @@ -1111,6 +1110,8 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.InputTheme: _1.serialize(buffer, boxed) + case let _1 as Api.messages.FoundGifs: + _1.serialize(buffer, boxed) case let _1 as Api.FileLocation: _1.serialize(buffer, boxed) case let _1 as Api.Poll: @@ -1207,8 +1208,6 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.ChatBannedRights: _1.serialize(buffer, boxed) - case let _1 as Api.InputClientProxy: - _1.serialize(buffer, boxed) case let _1 as Api.messages.MessageEditData: _1.serialize(buffer, boxed) case let _1 as Api.LabeledPrice: @@ -1247,12 +1246,12 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.SecureValueError: _1.serialize(buffer, boxed) - case let _1 as Api.InputStickerSetItem: - _1.serialize(buffer, boxed) case let _1 as Api.help.PromoData: _1.serialize(buffer, boxed) case let _1 as Api.NotifyPeer: _1.serialize(buffer, boxed) + case let _1 as Api.wallet.KeySecretSalt: + _1.serialize(buffer, boxed) case let _1 as Api.InputPrivacyKey: _1.serialize(buffer, boxed) case let _1 as Api.help.RecentMeUrls: @@ -1275,6 +1274,8 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.messages.SearchCounter: _1.serialize(buffer, boxed) + case let _1 as Api.auth.CheckedPhone: + _1.serialize(buffer, boxed) case let _1 as Api.PageListItem: _1.serialize(buffer, boxed) case let _1 as Api.PeerBlocked: @@ -1333,6 +1334,8 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.messages.AffectedFoundMessages: _1.serialize(buffer, boxed) + case let _1 as Api.MessageFwdAuthor: + _1.serialize(buffer, boxed) case let _1 as Api.WallPaper: _1.serialize(buffer, boxed) case let _1 as Api.messages.Messages: @@ -1365,6 +1368,8 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.PaymentSavedCredentials: _1.serialize(buffer, boxed) + case let _1 as Api.Null: + _1.serialize(buffer, boxed) case let _1 as Api.auth.CodeType: _1.serialize(buffer, boxed) case let _1 as Api.DocumentAttribute: @@ -1393,6 +1398,8 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.updates.State: _1.serialize(buffer, boxed) + case let _1 as Api.FoundGif: + _1.serialize(buffer, boxed) case let _1 as Api.User: _1.serialize(buffer, boxed) case let _1 as Api.Message: @@ -1457,8 +1464,6 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.InputWebFileLocation: _1.serialize(buffer, boxed) - case let _1 as Api.EmojiLanguage: - _1.serialize(buffer, boxed) case let _1 as Api.MessageFwdHeader: _1.serialize(buffer, boxed) case let _1 as Api.BaseTheme: @@ -1475,6 +1480,8 @@ public struct Api { _1.serialize(buffer, boxed) case let _1 as Api.upload.CdnFile: _1.serialize(buffer, boxed) + case let _1 as Api.wallet.LiteResponse: + _1.serialize(buffer, boxed) case let _1 as Api.help.InviteText: _1.serialize(buffer, boxed) case let _1 as Api.BotInlineMessage: diff --git a/submodules/TelegramApi/Sources/Api1.swift b/submodules/TelegramApi/Sources/Api1.swift index eb60677fa7..bf6374a02d 100644 --- a/submodules/TelegramApi/Sources/Api1.swift +++ b/submodules/TelegramApi/Sources/Api1.swift @@ -477,6 +477,50 @@ public struct messages { } } + } + public enum FoundGifs: TypeConstructorDescription { + case foundGifs(nextOffset: Int32, results: [Api.FoundGif]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .foundGifs(let nextOffset, let results): + if boxed { + buffer.appendInt32(1158290442) + } + serializeInt32(nextOffset, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(results.count)) + for item in results { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .foundGifs(let nextOffset, let results): + return ("foundGifs", [("nextOffset", nextOffset), ("results", results)]) + } + } + + public static func parse_foundGifs(_ reader: BufferReader) -> FoundGifs? { + var _1: Int32? + _1 = reader.readInt32() + var _2: [Api.FoundGif]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.FoundGif.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.messages.FoundGifs.foundGifs(nextOffset: _1!, results: _2!) + } + else { + return nil + } + } + } public enum ExportedChatInvites: TypeConstructorDescription { case exportedChatInvites(count: Int32, invites: [Api.ExportedChatInvite], users: [Api.User]) @@ -1330,9 +1374,9 @@ public struct messages { } public enum Messages: TypeConstructorDescription { case messages(messages: [Api.Message], chats: [Api.Chat], users: [Api.User]) - case messagesSlice(flags: Int32, count: Int32, nextRate: Int32?, offsetIdOffset: Int32?, messages: [Api.Message], chats: [Api.Chat], users: [Api.User]) - case channelMessages(flags: Int32, pts: Int32, count: Int32, offsetIdOffset: Int32?, messages: [Api.Message], chats: [Api.Chat], users: [Api.User]) case messagesNotModified(count: Int32) + case channelMessages(flags: Int32, pts: Int32, count: Int32, offsetIdOffset: Int32?, messages: [Api.Message], chats: [Api.Chat], users: [Api.User]) + case messagesSlice(flags: Int32, count: Int32, nextRate: Int32?, offsetIdOffset: Int32?, messages: [Api.Message], chats: [Api.Chat], users: [Api.User]) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { @@ -1356,6 +1400,36 @@ public struct messages { item.serialize(buffer, true) } break + case .messagesNotModified(let count): + if boxed { + buffer.appendInt32(1951620897) + } + serializeInt32(count, buffer: buffer, boxed: false) + break + case .channelMessages(let flags, let pts, let count, let offsetIdOffset, let messages, let chats, let users): + if boxed { + buffer.appendInt32(1682413576) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(count, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(offsetIdOffset!, buffer: buffer, boxed: false)} + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(messages.count)) + for item in messages { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(chats.count)) + for item in chats { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + break case .messagesSlice(let flags, let count, let nextRate, let offsetIdOffset, let messages, let chats, let users): if boxed { buffer.appendInt32(978610270) @@ -1380,36 +1454,6 @@ public struct messages { item.serialize(buffer, true) } break - case .channelMessages(let flags, let pts, let count, let offsetIdOffset, let messages, let chats, let users): - if boxed { - buffer.appendInt32(1682413576) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(count, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(offsetIdOffset!, buffer: buffer, boxed: false)} - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(messages.count)) - for item in messages { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(chats.count)) - for item in chats { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - break - case .messagesNotModified(let count): - if boxed { - buffer.appendInt32(1951620897) - } - serializeInt32(count, buffer: buffer, boxed: false) - break } } @@ -1417,12 +1461,12 @@ public struct messages { switch self { case .messages(let messages, let chats, let users): return ("messages", [("messages", messages), ("chats", chats), ("users", users)]) - case .messagesSlice(let flags, let count, let nextRate, let offsetIdOffset, let messages, let chats, let users): - return ("messagesSlice", [("flags", flags), ("count", count), ("nextRate", nextRate), ("offsetIdOffset", offsetIdOffset), ("messages", messages), ("chats", chats), ("users", users)]) - case .channelMessages(let flags, let pts, let count, let offsetIdOffset, let messages, let chats, let users): - return ("channelMessages", [("flags", flags), ("pts", pts), ("count", count), ("offsetIdOffset", offsetIdOffset), ("messages", messages), ("chats", chats), ("users", users)]) case .messagesNotModified(let count): return ("messagesNotModified", [("count", count)]) + case .channelMessages(let flags, let pts, let count, let offsetIdOffset, let messages, let chats, let users): + return ("channelMessages", [("flags", flags), ("pts", pts), ("count", count), ("offsetIdOffset", offsetIdOffset), ("messages", messages), ("chats", chats), ("users", users)]) + case .messagesSlice(let flags, let count, let nextRate, let offsetIdOffset, let messages, let chats, let users): + return ("messagesSlice", [("flags", flags), ("count", count), ("nextRate", nextRate), ("offsetIdOffset", offsetIdOffset), ("messages", messages), ("chats", chats), ("users", users)]) } } @@ -1449,36 +1493,12 @@ public struct messages { return nil } } - public static func parse_messagesSlice(_ reader: BufferReader) -> Messages? { + public static func parse_messagesNotModified(_ reader: BufferReader) -> Messages? { var _1: Int32? _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } - var _4: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_4 = reader.readInt32() } - var _5: [Api.Message]? - if let _ = reader.readInt32() { - _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Message.self) - } - var _6: [Api.Chat]? - if let _ = reader.readInt32() { - _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) - } - var _7: [Api.User]? - if let _ = reader.readInt32() { - _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.messages.Messages.messagesSlice(flags: _1!, count: _2!, nextRate: _3, offsetIdOffset: _4, messages: _5!, chats: _6!, users: _7!) + if _c1 { + return Api.messages.Messages.messagesNotModified(count: _1!) } else { return nil @@ -1519,12 +1539,36 @@ public struct messages { return nil } } - public static func parse_messagesNotModified(_ reader: BufferReader) -> Messages? { + public static func parse_messagesSlice(_ reader: BufferReader) -> Messages? { var _1: Int32? _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } + var _4: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_4 = reader.readInt32() } + var _5: [Api.Message]? + if let _ = reader.readInt32() { + _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Message.self) + } + var _6: [Api.Chat]? + if let _ = reader.readInt32() { + _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) + } + var _7: [Api.User]? + if let _ = reader.readInt32() { + _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } let _c1 = _1 != nil - if _c1 { - return Api.messages.Messages.messagesNotModified(count: _1!) + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.messages.Messages.messagesSlice(flags: _1!, count: _2!, nextRate: _3, offsetIdOffset: _4, messages: _5!, chats: _6!, users: _7!) } else { return nil @@ -2230,22865 +2274,3 @@ public struct messages { } } } -public extension Api { - public enum GroupCall: TypeConstructorDescription { - case groupCallDiscarded(id: Int64, accessHash: Int64, duration: Int32) - case groupCall(flags: Int32, id: Int64, accessHash: Int64, participantsCount: Int32, params: Api.DataJSON?, version: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .groupCallDiscarded(let id, let accessHash, let duration): - if boxed { - buffer.appendInt32(2004925620) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeInt32(duration, buffer: buffer, boxed: false) - break - case .groupCall(let flags, let id, let accessHash, let participantsCount, let params, let version): - if boxed { - buffer.appendInt32(1435512961) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeInt32(participantsCount, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {params!.serialize(buffer, true)} - serializeInt32(version, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .groupCallDiscarded(let id, let accessHash, let duration): - return ("groupCallDiscarded", [("id", id), ("accessHash", accessHash), ("duration", duration)]) - case .groupCall(let flags, let id, let accessHash, let participantsCount, let params, let version): - return ("groupCall", [("flags", flags), ("id", id), ("accessHash", accessHash), ("participantsCount", participantsCount), ("params", params), ("version", version)]) - } - } - - public static func parse_groupCallDiscarded(_ reader: BufferReader) -> GroupCall? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int64? - _2 = reader.readInt64() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.GroupCall.groupCallDiscarded(id: _1!, accessHash: _2!, duration: _3!) - } - else { - return nil - } - } - public static func parse_groupCall(_ reader: BufferReader) -> GroupCall? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Int64? - _3 = reader.readInt64() - var _4: Int32? - _4 = reader.readInt32() - var _5: Api.DataJSON? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.DataJSON - } } - var _6: Int32? - _6 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.GroupCall.groupCall(flags: _1!, id: _2!, accessHash: _3!, participantsCount: _4!, params: _5, version: _6!) - } - else { - return nil - } - } - - } - public enum InputGeoPoint: TypeConstructorDescription { - case inputGeoPointEmpty - case inputGeoPoint(flags: Int32, lat: Double, long: Double, accuracyRadius: Int32?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputGeoPointEmpty: - if boxed { - buffer.appendInt32(-457104426) - } - - break - case .inputGeoPoint(let flags, let lat, let long, let accuracyRadius): - if boxed { - buffer.appendInt32(1210199983) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeDouble(lat, buffer: buffer, boxed: false) - serializeDouble(long, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(accuracyRadius!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputGeoPointEmpty: - return ("inputGeoPointEmpty", []) - case .inputGeoPoint(let flags, let lat, let long, let accuracyRadius): - return ("inputGeoPoint", [("flags", flags), ("lat", lat), ("long", long), ("accuracyRadius", accuracyRadius)]) - } - } - - public static func parse_inputGeoPointEmpty(_ reader: BufferReader) -> InputGeoPoint? { - return Api.InputGeoPoint.inputGeoPointEmpty - } - public static func parse_inputGeoPoint(_ reader: BufferReader) -> InputGeoPoint? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Double? - _2 = reader.readDouble() - var _3: Double? - _3 = reader.readDouble() - var _4: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_4 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputGeoPoint.inputGeoPoint(flags: _1!, lat: _2!, long: _3!, accuracyRadius: _4) - } - else { - return nil - } - } - - } - public enum ChatFull: TypeConstructorDescription { - case chatFull(flags: Int32, id: Int32, about: String, participants: Api.ChatParticipants, chatPhoto: Api.Photo?, notifySettings: Api.PeerNotifySettings, exportedInvite: Api.ExportedChatInvite?, botInfo: [Api.BotInfo]?, pinnedMsgId: Int32?, folderId: Int32?, call: Api.InputGroupCall?, ttl: Api.PeerHistoryTTL?) - case channelFull(flags: Int32, id: Int32, about: String, participantsCount: Int32?, adminsCount: Int32?, kickedCount: Int32?, bannedCount: Int32?, onlineCount: Int32?, readInboxMaxId: Int32, readOutboxMaxId: Int32, unreadCount: Int32, chatPhoto: Api.Photo, notifySettings: Api.PeerNotifySettings, exportedInvite: Api.ExportedChatInvite?, botInfo: [Api.BotInfo], migratedFromChatId: Int32?, migratedFromMaxId: Int32?, pinnedMsgId: Int32?, stickerset: Api.StickerSet?, availableMinId: Int32?, folderId: Int32?, linkedChatId: Int32?, location: Api.ChannelLocation?, slowmodeSeconds: Int32?, slowmodeNextSendDate: Int32?, statsDc: Int32?, pts: Int32, call: Api.InputGroupCall?, ttl: Api.PeerHistoryTTL?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .chatFull(let flags, let id, let about, let participants, let chatPhoto, let notifySettings, let exportedInvite, let botInfo, let pinnedMsgId, let folderId, let call, let ttl): - if boxed { - buffer.appendInt32(-500874592) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - serializeString(about, buffer: buffer, boxed: false) - participants.serialize(buffer, true) - if Int(flags) & Int(1 << 2) != 0 {chatPhoto!.serialize(buffer, true)} - notifySettings.serialize(buffer, true) - if Int(flags) & Int(1 << 13) != 0 {exportedInvite!.serialize(buffer, true)} - if Int(flags) & Int(1 << 3) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(botInfo!.count)) - for item in botInfo! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 6) != 0 {serializeInt32(pinnedMsgId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 11) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 12) != 0 {call!.serialize(buffer, true)} - if Int(flags) & Int(1 << 14) != 0 {ttl!.serialize(buffer, true)} - break - case .channelFull(let flags, let id, let about, let participantsCount, let adminsCount, let kickedCount, let bannedCount, let onlineCount, let readInboxMaxId, let readOutboxMaxId, let unreadCount, let chatPhoto, let notifySettings, let exportedInvite, let botInfo, let migratedFromChatId, let migratedFromMaxId, let pinnedMsgId, let stickerset, let availableMinId, let folderId, let linkedChatId, let location, let slowmodeSeconds, let slowmodeNextSendDate, let statsDc, let pts, let call, let ttl): - if boxed { - buffer.appendInt32(-66811386) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - serializeString(about, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(participantsCount!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(adminsCount!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(kickedCount!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(bannedCount!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 13) != 0 {serializeInt32(onlineCount!, buffer: buffer, boxed: false)} - serializeInt32(readInboxMaxId, buffer: buffer, boxed: false) - serializeInt32(readOutboxMaxId, buffer: buffer, boxed: false) - serializeInt32(unreadCount, buffer: buffer, boxed: false) - chatPhoto.serialize(buffer, true) - notifySettings.serialize(buffer, true) - if Int(flags) & Int(1 << 23) != 0 {exportedInvite!.serialize(buffer, true)} - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(botInfo.count)) - for item in botInfo { - item.serialize(buffer, true) - } - if Int(flags) & Int(1 << 4) != 0 {serializeInt32(migratedFromChatId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 4) != 0 {serializeInt32(migratedFromMaxId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 5) != 0 {serializeInt32(pinnedMsgId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 8) != 0 {stickerset!.serialize(buffer, true)} - if Int(flags) & Int(1 << 9) != 0 {serializeInt32(availableMinId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 11) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 14) != 0 {serializeInt32(linkedChatId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 15) != 0 {location!.serialize(buffer, true)} - if Int(flags) & Int(1 << 17) != 0 {serializeInt32(slowmodeSeconds!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 18) != 0 {serializeInt32(slowmodeNextSendDate!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 12) != 0 {serializeInt32(statsDc!, buffer: buffer, boxed: false)} - serializeInt32(pts, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 21) != 0 {call!.serialize(buffer, true)} - if Int(flags) & Int(1 << 24) != 0 {ttl!.serialize(buffer, true)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .chatFull(let flags, let id, let about, let participants, let chatPhoto, let notifySettings, let exportedInvite, let botInfo, let pinnedMsgId, let folderId, let call, let ttl): - return ("chatFull", [("flags", flags), ("id", id), ("about", about), ("participants", participants), ("chatPhoto", chatPhoto), ("notifySettings", notifySettings), ("exportedInvite", exportedInvite), ("botInfo", botInfo), ("pinnedMsgId", pinnedMsgId), ("folderId", folderId), ("call", call), ("ttl", ttl)]) - case .channelFull(let flags, let id, let about, let participantsCount, let adminsCount, let kickedCount, let bannedCount, let onlineCount, let readInboxMaxId, let readOutboxMaxId, let unreadCount, let chatPhoto, let notifySettings, let exportedInvite, let botInfo, let migratedFromChatId, let migratedFromMaxId, let pinnedMsgId, let stickerset, let availableMinId, let folderId, let linkedChatId, let location, let slowmodeSeconds, let slowmodeNextSendDate, let statsDc, let pts, let call, let ttl): - return ("channelFull", [("flags", flags), ("id", id), ("about", about), ("participantsCount", participantsCount), ("adminsCount", adminsCount), ("kickedCount", kickedCount), ("bannedCount", bannedCount), ("onlineCount", onlineCount), ("readInboxMaxId", readInboxMaxId), ("readOutboxMaxId", readOutboxMaxId), ("unreadCount", unreadCount), ("chatPhoto", chatPhoto), ("notifySettings", notifySettings), ("exportedInvite", exportedInvite), ("botInfo", botInfo), ("migratedFromChatId", migratedFromChatId), ("migratedFromMaxId", migratedFromMaxId), ("pinnedMsgId", pinnedMsgId), ("stickerset", stickerset), ("availableMinId", availableMinId), ("folderId", folderId), ("linkedChatId", linkedChatId), ("location", location), ("slowmodeSeconds", slowmodeSeconds), ("slowmodeNextSendDate", slowmodeNextSendDate), ("statsDc", statsDc), ("pts", pts), ("call", call), ("ttl", ttl)]) - } - } - - public static func parse_chatFull(_ reader: BufferReader) -> ChatFull? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: String? - _3 = parseString(reader) - var _4: Api.ChatParticipants? - if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.ChatParticipants - } - var _5: Api.Photo? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.Photo - } } - var _6: Api.PeerNotifySettings? - if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.PeerNotifySettings - } - var _7: Api.ExportedChatInvite? - if Int(_1!) & Int(1 << 13) != 0 {if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite - } } - var _8: [Api.BotInfo]? - if Int(_1!) & Int(1 << 3) != 0 {if let _ = reader.readInt32() { - _8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.BotInfo.self) - } } - var _9: Int32? - if Int(_1!) & Int(1 << 6) != 0 {_9 = reader.readInt32() } - var _10: Int32? - if Int(_1!) & Int(1 << 11) != 0 {_10 = reader.readInt32() } - var _11: Api.InputGroupCall? - if Int(_1!) & Int(1 << 12) != 0 {if let signature = reader.readInt32() { - _11 = Api.parse(reader, signature: signature) as? Api.InputGroupCall - } } - var _12: Api.PeerHistoryTTL? - if Int(_1!) & Int(1 << 14) != 0 {if let signature = reader.readInt32() { - _12 = Api.parse(reader, signature: signature) as? Api.PeerHistoryTTL - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 13) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 3) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 6) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 11) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 12) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 14) == 0) || _12 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 { - return Api.ChatFull.chatFull(flags: _1!, id: _2!, about: _3!, participants: _4!, chatPhoto: _5, notifySettings: _6!, exportedInvite: _7, botInfo: _8, pinnedMsgId: _9, folderId: _10, call: _11, ttl: _12) - } - else { - return nil - } - } - public static func parse_channelFull(_ reader: BufferReader) -> ChatFull? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: String? - _3 = parseString(reader) - var _4: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_4 = reader.readInt32() } - var _5: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_5 = reader.readInt32() } - var _6: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_6 = reader.readInt32() } - var _7: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_7 = reader.readInt32() } - var _8: Int32? - if Int(_1!) & Int(1 << 13) != 0 {_8 = reader.readInt32() } - var _9: Int32? - _9 = reader.readInt32() - var _10: Int32? - _10 = reader.readInt32() - var _11: Int32? - _11 = reader.readInt32() - var _12: Api.Photo? - if let signature = reader.readInt32() { - _12 = Api.parse(reader, signature: signature) as? Api.Photo - } - var _13: Api.PeerNotifySettings? - if let signature = reader.readInt32() { - _13 = Api.parse(reader, signature: signature) as? Api.PeerNotifySettings - } - var _14: Api.ExportedChatInvite? - if Int(_1!) & Int(1 << 23) != 0 {if let signature = reader.readInt32() { - _14 = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite - } } - var _15: [Api.BotInfo]? - if let _ = reader.readInt32() { - _15 = Api.parseVector(reader, elementSignature: 0, elementType: Api.BotInfo.self) - } - var _16: Int32? - if Int(_1!) & Int(1 << 4) != 0 {_16 = reader.readInt32() } - var _17: Int32? - if Int(_1!) & Int(1 << 4) != 0 {_17 = reader.readInt32() } - var _18: Int32? - if Int(_1!) & Int(1 << 5) != 0 {_18 = reader.readInt32() } - var _19: Api.StickerSet? - if Int(_1!) & Int(1 << 8) != 0 {if let signature = reader.readInt32() { - _19 = Api.parse(reader, signature: signature) as? Api.StickerSet - } } - var _20: Int32? - if Int(_1!) & Int(1 << 9) != 0 {_20 = reader.readInt32() } - var _21: Int32? - if Int(_1!) & Int(1 << 11) != 0 {_21 = reader.readInt32() } - var _22: Int32? - if Int(_1!) & Int(1 << 14) != 0 {_22 = reader.readInt32() } - var _23: Api.ChannelLocation? - if Int(_1!) & Int(1 << 15) != 0 {if let signature = reader.readInt32() { - _23 = Api.parse(reader, signature: signature) as? Api.ChannelLocation - } } - var _24: Int32? - if Int(_1!) & Int(1 << 17) != 0 {_24 = reader.readInt32() } - var _25: Int32? - if Int(_1!) & Int(1 << 18) != 0 {_25 = reader.readInt32() } - var _26: Int32? - if Int(_1!) & Int(1 << 12) != 0 {_26 = reader.readInt32() } - var _27: Int32? - _27 = reader.readInt32() - var _28: Api.InputGroupCall? - if Int(_1!) & Int(1 << 21) != 0 {if let signature = reader.readInt32() { - _28 = Api.parse(reader, signature: signature) as? Api.InputGroupCall - } } - var _29: Api.PeerHistoryTTL? - if Int(_1!) & Int(1 << 24) != 0 {if let signature = reader.readInt32() { - _29 = Api.parse(reader, signature: signature) as? Api.PeerHistoryTTL - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 2) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 13) == 0) || _8 != nil - let _c9 = _9 != nil - let _c10 = _10 != nil - let _c11 = _11 != nil - let _c12 = _12 != nil - let _c13 = _13 != nil - let _c14 = (Int(_1!) & Int(1 << 23) == 0) || _14 != nil - let _c15 = _15 != nil - let _c16 = (Int(_1!) & Int(1 << 4) == 0) || _16 != nil - let _c17 = (Int(_1!) & Int(1 << 4) == 0) || _17 != nil - let _c18 = (Int(_1!) & Int(1 << 5) == 0) || _18 != nil - let _c19 = (Int(_1!) & Int(1 << 8) == 0) || _19 != nil - let _c20 = (Int(_1!) & Int(1 << 9) == 0) || _20 != nil - let _c21 = (Int(_1!) & Int(1 << 11) == 0) || _21 != nil - let _c22 = (Int(_1!) & Int(1 << 14) == 0) || _22 != nil - let _c23 = (Int(_1!) & Int(1 << 15) == 0) || _23 != nil - let _c24 = (Int(_1!) & Int(1 << 17) == 0) || _24 != nil - let _c25 = (Int(_1!) & Int(1 << 18) == 0) || _25 != nil - let _c26 = (Int(_1!) & Int(1 << 12) == 0) || _26 != nil - let _c27 = _27 != nil - let _c28 = (Int(_1!) & Int(1 << 21) == 0) || _28 != nil - let _c29 = (Int(_1!) & Int(1 << 24) == 0) || _29 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 && _c20 && _c21 && _c22 && _c23 && _c24 && _c25 && _c26 && _c27 && _c28 && _c29 { - return Api.ChatFull.channelFull(flags: _1!, id: _2!, about: _3!, participantsCount: _4, adminsCount: _5, kickedCount: _6, bannedCount: _7, onlineCount: _8, readInboxMaxId: _9!, readOutboxMaxId: _10!, unreadCount: _11!, chatPhoto: _12!, notifySettings: _13!, exportedInvite: _14, botInfo: _15!, migratedFromChatId: _16, migratedFromMaxId: _17, pinnedMsgId: _18, stickerset: _19, availableMinId: _20, folderId: _21, linkedChatId: _22, location: _23, slowmodeSeconds: _24, slowmodeNextSendDate: _25, statsDc: _26, pts: _27!, call: _28, ttl: _29) - } - else { - return nil - } - } - - } - public enum PollResults: TypeConstructorDescription { - case pollResults(flags: Int32, results: [Api.PollAnswerVoters]?, totalVoters: Int32?, recentVoters: [Int32]?, solution: String?, solutionEntities: [Api.MessageEntity]?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .pollResults(let flags, let results, let totalVoters, let recentVoters, let solution, let solutionEntities): - if boxed { - buffer.appendInt32(-1159937629) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(results!.count)) - for item in results! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(totalVoters!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(recentVoters!.count)) - for item in recentVoters! { - serializeInt32(item, buffer: buffer, boxed: false) - }} - if Int(flags) & Int(1 << 4) != 0 {serializeString(solution!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 4) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(solutionEntities!.count)) - for item in solutionEntities! { - item.serialize(buffer, true) - }} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .pollResults(let flags, let results, let totalVoters, let recentVoters, let solution, let solutionEntities): - return ("pollResults", [("flags", flags), ("results", results), ("totalVoters", totalVoters), ("recentVoters", recentVoters), ("solution", solution), ("solutionEntities", solutionEntities)]) - } - } - - public static func parse_pollResults(_ reader: BufferReader) -> PollResults? { - var _1: Int32? - _1 = reader.readInt32() - var _2: [Api.PollAnswerVoters]? - if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PollAnswerVoters.self) - } } - var _3: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_3 = reader.readInt32() } - var _4: [Int32]? - if Int(_1!) & Int(1 << 3) != 0 {if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) - } } - var _5: String? - if Int(_1!) & Int(1 << 4) != 0 {_5 = parseString(reader) } - var _6: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 4) != 0 {if let _ = reader.readInt32() { - _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) - } } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 4) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 4) == 0) || _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.PollResults.pollResults(flags: _1!, results: _2, totalVoters: _3, recentVoters: _4, solution: _5, solutionEntities: _6) - } - else { - return nil - } - } - - } - public enum ChatParticipant: TypeConstructorDescription { - case chatParticipant(userId: Int32, inviterId: Int32, date: Int32) - case chatParticipantCreator(userId: Int32) - case chatParticipantAdmin(userId: Int32, inviterId: Int32, date: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .chatParticipant(let userId, let inviterId, let date): - if boxed { - buffer.appendInt32(-925415106) - } - serializeInt32(userId, buffer: buffer, boxed: false) - serializeInt32(inviterId, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - break - case .chatParticipantCreator(let userId): - if boxed { - buffer.appendInt32(-636267638) - } - serializeInt32(userId, buffer: buffer, boxed: false) - break - case .chatParticipantAdmin(let userId, let inviterId, let date): - if boxed { - buffer.appendInt32(-489233354) - } - serializeInt32(userId, buffer: buffer, boxed: false) - serializeInt32(inviterId, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .chatParticipant(let userId, let inviterId, let date): - return ("chatParticipant", [("userId", userId), ("inviterId", inviterId), ("date", date)]) - case .chatParticipantCreator(let userId): - return ("chatParticipantCreator", [("userId", userId)]) - case .chatParticipantAdmin(let userId, let inviterId, let date): - return ("chatParticipantAdmin", [("userId", userId), ("inviterId", inviterId), ("date", date)]) - } - } - - public static func parse_chatParticipant(_ reader: BufferReader) -> ChatParticipant? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.ChatParticipant.chatParticipant(userId: _1!, inviterId: _2!, date: _3!) - } - else { - return nil - } - } - public static func parse_chatParticipantCreator(_ reader: BufferReader) -> ChatParticipant? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.ChatParticipant.chatParticipantCreator(userId: _1!) - } - else { - return nil - } - } - public static func parse_chatParticipantAdmin(_ reader: BufferReader) -> ChatParticipant? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.ChatParticipant.chatParticipantAdmin(userId: _1!, inviterId: _2!, date: _3!) - } - else { - return nil - } - } - - } - public enum CdnConfig: TypeConstructorDescription { - case cdnConfig(publicKeys: [Api.CdnPublicKey]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .cdnConfig(let publicKeys): - if boxed { - buffer.appendInt32(1462101002) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(publicKeys.count)) - for item in publicKeys { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .cdnConfig(let publicKeys): - return ("cdnConfig", [("publicKeys", publicKeys)]) - } - } - - public static func parse_cdnConfig(_ reader: BufferReader) -> CdnConfig? { - var _1: [Api.CdnPublicKey]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.CdnPublicKey.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.CdnConfig.cdnConfig(publicKeys: _1!) - } - else { - return nil - } - } - - } - indirect public enum PageBlock: TypeConstructorDescription { - case pageBlockUnsupported - case pageBlockTitle(text: Api.RichText) - case pageBlockSubtitle(text: Api.RichText) - case pageBlockAuthorDate(author: Api.RichText, publishedDate: Int32) - case pageBlockHeader(text: Api.RichText) - case pageBlockSubheader(text: Api.RichText) - case pageBlockParagraph(text: Api.RichText) - case pageBlockPreformatted(text: Api.RichText, language: String) - case pageBlockFooter(text: Api.RichText) - case pageBlockDivider - case pageBlockAnchor(name: String) - case pageBlockList(items: [Api.PageListItem]) - case pageBlockBlockquote(text: Api.RichText, caption: Api.RichText) - case pageBlockPullquote(text: Api.RichText, caption: Api.RichText) - case pageBlockPhoto(flags: Int32, photoId: Int64, caption: Api.PageCaption, url: String?, webpageId: Int64?) - case pageBlockVideo(flags: Int32, videoId: Int64, caption: Api.PageCaption) - case pageBlockCover(cover: Api.PageBlock) - case pageBlockEmbed(flags: Int32, url: String?, html: String?, posterPhotoId: Int64?, w: Int32?, h: Int32?, caption: Api.PageCaption) - case pageBlockEmbedPost(url: String, webpageId: Int64, authorPhotoId: Int64, author: String, date: Int32, blocks: [Api.PageBlock], caption: Api.PageCaption) - case pageBlockCollage(items: [Api.PageBlock], caption: Api.PageCaption) - case pageBlockSlideshow(items: [Api.PageBlock], caption: Api.PageCaption) - case pageBlockChannel(channel: Api.Chat) - case pageBlockAudio(audioId: Int64, caption: Api.PageCaption) - case pageBlockKicker(text: Api.RichText) - case pageBlockTable(flags: Int32, title: Api.RichText, rows: [Api.PageTableRow]) - case pageBlockOrderedList(items: [Api.PageListOrderedItem]) - case pageBlockDetails(flags: Int32, blocks: [Api.PageBlock], title: Api.RichText) - case pageBlockRelatedArticles(title: Api.RichText, articles: [Api.PageRelatedArticle]) - case pageBlockMap(geo: Api.GeoPoint, zoom: Int32, w: Int32, h: Int32, caption: Api.PageCaption) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .pageBlockUnsupported: - if boxed { - buffer.appendInt32(324435594) - } - - break - case .pageBlockTitle(let text): - if boxed { - buffer.appendInt32(1890305021) - } - text.serialize(buffer, true) - break - case .pageBlockSubtitle(let text): - if boxed { - buffer.appendInt32(-1879401953) - } - text.serialize(buffer, true) - break - case .pageBlockAuthorDate(let author, let publishedDate): - if boxed { - buffer.appendInt32(-1162877472) - } - author.serialize(buffer, true) - serializeInt32(publishedDate, buffer: buffer, boxed: false) - break - case .pageBlockHeader(let text): - if boxed { - buffer.appendInt32(-1076861716) - } - text.serialize(buffer, true) - break - case .pageBlockSubheader(let text): - if boxed { - buffer.appendInt32(-248793375) - } - text.serialize(buffer, true) - break - case .pageBlockParagraph(let text): - if boxed { - buffer.appendInt32(1182402406) - } - text.serialize(buffer, true) - break - case .pageBlockPreformatted(let text, let language): - if boxed { - buffer.appendInt32(-1066346178) - } - text.serialize(buffer, true) - serializeString(language, buffer: buffer, boxed: false) - break - case .pageBlockFooter(let text): - if boxed { - buffer.appendInt32(1216809369) - } - text.serialize(buffer, true) - break - case .pageBlockDivider: - if boxed { - buffer.appendInt32(-618614392) - } - - break - case .pageBlockAnchor(let name): - if boxed { - buffer.appendInt32(-837994576) - } - serializeString(name, buffer: buffer, boxed: false) - break - case .pageBlockList(let items): - if boxed { - buffer.appendInt32(-454524911) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(items.count)) - for item in items { - item.serialize(buffer, true) - } - break - case .pageBlockBlockquote(let text, let caption): - if boxed { - buffer.appendInt32(641563686) - } - text.serialize(buffer, true) - caption.serialize(buffer, true) - break - case .pageBlockPullquote(let text, let caption): - if boxed { - buffer.appendInt32(1329878739) - } - text.serialize(buffer, true) - caption.serialize(buffer, true) - break - case .pageBlockPhoto(let flags, let photoId, let caption, let url, let webpageId): - if boxed { - buffer.appendInt32(391759200) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(photoId, buffer: buffer, boxed: false) - caption.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeString(url!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 0) != 0 {serializeInt64(webpageId!, buffer: buffer, boxed: false)} - break - case .pageBlockVideo(let flags, let videoId, let caption): - if boxed { - buffer.appendInt32(2089805750) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(videoId, buffer: buffer, boxed: false) - caption.serialize(buffer, true) - break - case .pageBlockCover(let cover): - if boxed { - buffer.appendInt32(972174080) - } - cover.serialize(buffer, true) - break - case .pageBlockEmbed(let flags, let url, let html, let posterPhotoId, let w, let h, let caption): - if boxed { - buffer.appendInt32(-1468953147) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeString(url!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeString(html!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 4) != 0 {serializeInt64(posterPhotoId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 5) != 0 {serializeInt32(w!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 5) != 0 {serializeInt32(h!, buffer: buffer, boxed: false)} - caption.serialize(buffer, true) - break - case .pageBlockEmbedPost(let url, let webpageId, let authorPhotoId, let author, let date, let blocks, let caption): - if boxed { - buffer.appendInt32(-229005301) - } - serializeString(url, buffer: buffer, boxed: false) - serializeInt64(webpageId, buffer: buffer, boxed: false) - serializeInt64(authorPhotoId, buffer: buffer, boxed: false) - serializeString(author, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(blocks.count)) - for item in blocks { - item.serialize(buffer, true) - } - caption.serialize(buffer, true) - break - case .pageBlockCollage(let items, let caption): - if boxed { - buffer.appendInt32(1705048653) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(items.count)) - for item in items { - item.serialize(buffer, true) - } - caption.serialize(buffer, true) - break - case .pageBlockSlideshow(let items, let caption): - if boxed { - buffer.appendInt32(52401552) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(items.count)) - for item in items { - item.serialize(buffer, true) - } - caption.serialize(buffer, true) - break - case .pageBlockChannel(let channel): - if boxed { - buffer.appendInt32(-283684427) - } - channel.serialize(buffer, true) - break - case .pageBlockAudio(let audioId, let caption): - if boxed { - buffer.appendInt32(-2143067670) - } - serializeInt64(audioId, buffer: buffer, boxed: false) - caption.serialize(buffer, true) - break - case .pageBlockKicker(let text): - if boxed { - buffer.appendInt32(504660880) - } - text.serialize(buffer, true) - break - case .pageBlockTable(let flags, let title, let rows): - if boxed { - buffer.appendInt32(-1085412734) - } - serializeInt32(flags, buffer: buffer, boxed: false) - title.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(rows.count)) - for item in rows { - item.serialize(buffer, true) - } - break - case .pageBlockOrderedList(let items): - if boxed { - buffer.appendInt32(-1702174239) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(items.count)) - for item in items { - item.serialize(buffer, true) - } - break - case .pageBlockDetails(let flags, let blocks, let title): - if boxed { - buffer.appendInt32(1987480557) - } - serializeInt32(flags, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(blocks.count)) - for item in blocks { - item.serialize(buffer, true) - } - title.serialize(buffer, true) - break - case .pageBlockRelatedArticles(let title, let articles): - if boxed { - buffer.appendInt32(370236054) - } - title.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(articles.count)) - for item in articles { - item.serialize(buffer, true) - } - break - case .pageBlockMap(let geo, let zoom, let w, let h, let caption): - if boxed { - buffer.appendInt32(-1538310410) - } - geo.serialize(buffer, true) - serializeInt32(zoom, buffer: buffer, boxed: false) - serializeInt32(w, buffer: buffer, boxed: false) - serializeInt32(h, buffer: buffer, boxed: false) - caption.serialize(buffer, true) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .pageBlockUnsupported: - return ("pageBlockUnsupported", []) - case .pageBlockTitle(let text): - return ("pageBlockTitle", [("text", text)]) - case .pageBlockSubtitle(let text): - return ("pageBlockSubtitle", [("text", text)]) - case .pageBlockAuthorDate(let author, let publishedDate): - return ("pageBlockAuthorDate", [("author", author), ("publishedDate", publishedDate)]) - case .pageBlockHeader(let text): - return ("pageBlockHeader", [("text", text)]) - case .pageBlockSubheader(let text): - return ("pageBlockSubheader", [("text", text)]) - case .pageBlockParagraph(let text): - return ("pageBlockParagraph", [("text", text)]) - case .pageBlockPreformatted(let text, let language): - return ("pageBlockPreformatted", [("text", text), ("language", language)]) - case .pageBlockFooter(let text): - return ("pageBlockFooter", [("text", text)]) - case .pageBlockDivider: - return ("pageBlockDivider", []) - case .pageBlockAnchor(let name): - return ("pageBlockAnchor", [("name", name)]) - case .pageBlockList(let items): - return ("pageBlockList", [("items", items)]) - case .pageBlockBlockquote(let text, let caption): - return ("pageBlockBlockquote", [("text", text), ("caption", caption)]) - case .pageBlockPullquote(let text, let caption): - return ("pageBlockPullquote", [("text", text), ("caption", caption)]) - case .pageBlockPhoto(let flags, let photoId, let caption, let url, let webpageId): - return ("pageBlockPhoto", [("flags", flags), ("photoId", photoId), ("caption", caption), ("url", url), ("webpageId", webpageId)]) - case .pageBlockVideo(let flags, let videoId, let caption): - return ("pageBlockVideo", [("flags", flags), ("videoId", videoId), ("caption", caption)]) - case .pageBlockCover(let cover): - return ("pageBlockCover", [("cover", cover)]) - case .pageBlockEmbed(let flags, let url, let html, let posterPhotoId, let w, let h, let caption): - return ("pageBlockEmbed", [("flags", flags), ("url", url), ("html", html), ("posterPhotoId", posterPhotoId), ("w", w), ("h", h), ("caption", caption)]) - case .pageBlockEmbedPost(let url, let webpageId, let authorPhotoId, let author, let date, let blocks, let caption): - return ("pageBlockEmbedPost", [("url", url), ("webpageId", webpageId), ("authorPhotoId", authorPhotoId), ("author", author), ("date", date), ("blocks", blocks), ("caption", caption)]) - case .pageBlockCollage(let items, let caption): - return ("pageBlockCollage", [("items", items), ("caption", caption)]) - case .pageBlockSlideshow(let items, let caption): - return ("pageBlockSlideshow", [("items", items), ("caption", caption)]) - case .pageBlockChannel(let channel): - return ("pageBlockChannel", [("channel", channel)]) - case .pageBlockAudio(let audioId, let caption): - return ("pageBlockAudio", [("audioId", audioId), ("caption", caption)]) - case .pageBlockKicker(let text): - return ("pageBlockKicker", [("text", text)]) - case .pageBlockTable(let flags, let title, let rows): - return ("pageBlockTable", [("flags", flags), ("title", title), ("rows", rows)]) - case .pageBlockOrderedList(let items): - return ("pageBlockOrderedList", [("items", items)]) - case .pageBlockDetails(let flags, let blocks, let title): - return ("pageBlockDetails", [("flags", flags), ("blocks", blocks), ("title", title)]) - case .pageBlockRelatedArticles(let title, let articles): - return ("pageBlockRelatedArticles", [("title", title), ("articles", articles)]) - case .pageBlockMap(let geo, let zoom, let w, let h, let caption): - return ("pageBlockMap", [("geo", geo), ("zoom", zoom), ("w", w), ("h", h), ("caption", caption)]) - } - } - - public static func parse_pageBlockUnsupported(_ reader: BufferReader) -> PageBlock? { - return Api.PageBlock.pageBlockUnsupported - } - public static func parse_pageBlockTitle(_ reader: BufferReader) -> PageBlock? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - if _c1 { - return Api.PageBlock.pageBlockTitle(text: _1!) - } - else { - return nil - } - } - public static func parse_pageBlockSubtitle(_ reader: BufferReader) -> PageBlock? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - if _c1 { - return Api.PageBlock.pageBlockSubtitle(text: _1!) - } - else { - return nil - } - } - public static func parse_pageBlockAuthorDate(_ reader: BufferReader) -> PageBlock? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.PageBlock.pageBlockAuthorDate(author: _1!, publishedDate: _2!) - } - else { - return nil - } - } - public static func parse_pageBlockHeader(_ reader: BufferReader) -> PageBlock? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - if _c1 { - return Api.PageBlock.pageBlockHeader(text: _1!) - } - else { - return nil - } - } - public static func parse_pageBlockSubheader(_ reader: BufferReader) -> PageBlock? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - if _c1 { - return Api.PageBlock.pageBlockSubheader(text: _1!) - } - else { - return nil - } - } - public static func parse_pageBlockParagraph(_ reader: BufferReader) -> PageBlock? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - if _c1 { - return Api.PageBlock.pageBlockParagraph(text: _1!) - } - else { - return nil - } - } - public static func parse_pageBlockPreformatted(_ reader: BufferReader) -> PageBlock? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.PageBlock.pageBlockPreformatted(text: _1!, language: _2!) - } - else { - return nil - } - } - public static func parse_pageBlockFooter(_ reader: BufferReader) -> PageBlock? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - if _c1 { - return Api.PageBlock.pageBlockFooter(text: _1!) - } - else { - return nil - } - } - public static func parse_pageBlockDivider(_ reader: BufferReader) -> PageBlock? { - return Api.PageBlock.pageBlockDivider - } - public static func parse_pageBlockAnchor(_ reader: BufferReader) -> PageBlock? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.PageBlock.pageBlockAnchor(name: _1!) - } - else { - return nil - } - } - public static func parse_pageBlockList(_ reader: BufferReader) -> PageBlock? { - var _1: [Api.PageListItem]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageListItem.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.PageBlock.pageBlockList(items: _1!) - } - else { - return nil - } - } - public static func parse_pageBlockBlockquote(_ reader: BufferReader) -> PageBlock? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - var _2: Api.RichText? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.PageBlock.pageBlockBlockquote(text: _1!, caption: _2!) - } - else { - return nil - } - } - public static func parse_pageBlockPullquote(_ reader: BufferReader) -> PageBlock? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - var _2: Api.RichText? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.PageBlock.pageBlockPullquote(text: _1!, caption: _2!) - } - else { - return nil - } - } - public static func parse_pageBlockPhoto(_ reader: BufferReader) -> PageBlock? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Api.PageCaption? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.PageCaption - } - var _4: String? - if Int(_1!) & Int(1 << 0) != 0 {_4 = parseString(reader) } - var _5: Int64? - if Int(_1!) & Int(1 << 0) != 0 {_5 = reader.readInt64() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.PageBlock.pageBlockPhoto(flags: _1!, photoId: _2!, caption: _3!, url: _4, webpageId: _5) - } - else { - return nil - } - } - public static func parse_pageBlockVideo(_ reader: BufferReader) -> PageBlock? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Api.PageCaption? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.PageCaption - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.PageBlock.pageBlockVideo(flags: _1!, videoId: _2!, caption: _3!) - } - else { - return nil - } - } - public static func parse_pageBlockCover(_ reader: BufferReader) -> PageBlock? { - var _1: Api.PageBlock? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.PageBlock - } - let _c1 = _1 != nil - if _c1 { - return Api.PageBlock.pageBlockCover(cover: _1!) - } - else { - return nil - } - } - public static func parse_pageBlockEmbed(_ reader: BufferReader) -> PageBlock? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - if Int(_1!) & Int(1 << 1) != 0 {_2 = parseString(reader) } - var _3: String? - if Int(_1!) & Int(1 << 2) != 0 {_3 = parseString(reader) } - var _4: Int64? - if Int(_1!) & Int(1 << 4) != 0 {_4 = reader.readInt64() } - var _5: Int32? - if Int(_1!) & Int(1 << 5) != 0 {_5 = reader.readInt32() } - var _6: Int32? - if Int(_1!) & Int(1 << 5) != 0 {_6 = reader.readInt32() } - var _7: Api.PageCaption? - if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.PageCaption - } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 4) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 5) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 5) == 0) || _6 != nil - let _c7 = _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.PageBlock.pageBlockEmbed(flags: _1!, url: _2, html: _3, posterPhotoId: _4, w: _5, h: _6, caption: _7!) - } - else { - return nil - } - } - public static func parse_pageBlockEmbedPost(_ reader: BufferReader) -> PageBlock? { - var _1: String? - _1 = parseString(reader) - var _2: Int64? - _2 = reader.readInt64() - var _3: Int64? - _3 = reader.readInt64() - var _4: String? - _4 = parseString(reader) - var _5: Int32? - _5 = reader.readInt32() - var _6: [Api.PageBlock]? - if let _ = reader.readInt32() { - _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageBlock.self) - } - var _7: Api.PageCaption? - if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.PageCaption - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.PageBlock.pageBlockEmbedPost(url: _1!, webpageId: _2!, authorPhotoId: _3!, author: _4!, date: _5!, blocks: _6!, caption: _7!) - } - else { - return nil - } - } - public static func parse_pageBlockCollage(_ reader: BufferReader) -> PageBlock? { - var _1: [Api.PageBlock]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageBlock.self) - } - var _2: Api.PageCaption? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.PageCaption - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.PageBlock.pageBlockCollage(items: _1!, caption: _2!) - } - else { - return nil - } - } - public static func parse_pageBlockSlideshow(_ reader: BufferReader) -> PageBlock? { - var _1: [Api.PageBlock]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageBlock.self) - } - var _2: Api.PageCaption? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.PageCaption - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.PageBlock.pageBlockSlideshow(items: _1!, caption: _2!) - } - else { - return nil - } - } - public static func parse_pageBlockChannel(_ reader: BufferReader) -> PageBlock? { - var _1: Api.Chat? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Chat - } - let _c1 = _1 != nil - if _c1 { - return Api.PageBlock.pageBlockChannel(channel: _1!) - } - else { - return nil - } - } - public static func parse_pageBlockAudio(_ reader: BufferReader) -> PageBlock? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Api.PageCaption? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.PageCaption - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.PageBlock.pageBlockAudio(audioId: _1!, caption: _2!) - } - else { - return nil - } - } - public static func parse_pageBlockKicker(_ reader: BufferReader) -> PageBlock? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - if _c1 { - return Api.PageBlock.pageBlockKicker(text: _1!) - } - else { - return nil - } - } - public static func parse_pageBlockTable(_ reader: BufferReader) -> PageBlock? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.RichText? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.RichText - } - var _3: [Api.PageTableRow]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageTableRow.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.PageBlock.pageBlockTable(flags: _1!, title: _2!, rows: _3!) - } - else { - return nil - } - } - public static func parse_pageBlockOrderedList(_ reader: BufferReader) -> PageBlock? { - var _1: [Api.PageListOrderedItem]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageListOrderedItem.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.PageBlock.pageBlockOrderedList(items: _1!) - } - else { - return nil - } - } - public static func parse_pageBlockDetails(_ reader: BufferReader) -> PageBlock? { - var _1: Int32? - _1 = reader.readInt32() - var _2: [Api.PageBlock]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageBlock.self) - } - var _3: Api.RichText? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.PageBlock.pageBlockDetails(flags: _1!, blocks: _2!, title: _3!) - } - else { - return nil - } - } - public static func parse_pageBlockRelatedArticles(_ reader: BufferReader) -> PageBlock? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - var _2: [Api.PageRelatedArticle]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageRelatedArticle.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.PageBlock.pageBlockRelatedArticles(title: _1!, articles: _2!) - } - else { - return nil - } - } - public static func parse_pageBlockMap(_ reader: BufferReader) -> PageBlock? { - var _1: Api.GeoPoint? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.GeoPoint - } - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Api.PageCaption? - if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.PageCaption - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.PageBlock.pageBlockMap(geo: _1!, zoom: _2!, w: _3!, h: _4!, caption: _5!) - } - else { - return nil - } - } - - } - public enum SecureRequiredType: TypeConstructorDescription { - case secureRequiredType(flags: Int32, type: Api.SecureValueType) - case secureRequiredTypeOneOf(types: [Api.SecureRequiredType]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .secureRequiredType(let flags, let type): - if boxed { - buffer.appendInt32(-2103600678) - } - serializeInt32(flags, buffer: buffer, boxed: false) - type.serialize(buffer, true) - break - case .secureRequiredTypeOneOf(let types): - if boxed { - buffer.appendInt32(41187252) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(types.count)) - for item in types { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .secureRequiredType(let flags, let type): - return ("secureRequiredType", [("flags", flags), ("type", type)]) - case .secureRequiredTypeOneOf(let types): - return ("secureRequiredTypeOneOf", [("types", types)]) - } - } - - public static func parse_secureRequiredType(_ reader: BufferReader) -> SecureRequiredType? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.SecureValueType? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.SecureValueType - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.SecureRequiredType.secureRequiredType(flags: _1!, type: _2!) - } - else { - return nil - } - } - public static func parse_secureRequiredTypeOneOf(_ reader: BufferReader) -> SecureRequiredType? { - var _1: [Api.SecureRequiredType]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureRequiredType.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.SecureRequiredType.secureRequiredTypeOneOf(types: _1!) - } - else { - return nil - } - } - - } - public enum JSONValue: TypeConstructorDescription { - case jsonNull - case jsonBool(value: Api.Bool) - case jsonNumber(value: Double) - case jsonString(value: String) - case jsonArray(value: [Api.JSONValue]) - case jsonObject(value: [Api.JSONObjectValue]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .jsonNull: - if boxed { - buffer.appendInt32(1064139624) - } - - break - case .jsonBool(let value): - if boxed { - buffer.appendInt32(-952869270) - } - value.serialize(buffer, true) - break - case .jsonNumber(let value): - if boxed { - buffer.appendInt32(736157604) - } - serializeDouble(value, buffer: buffer, boxed: false) - break - case .jsonString(let value): - if boxed { - buffer.appendInt32(-1222740358) - } - serializeString(value, buffer: buffer, boxed: false) - break - case .jsonArray(let value): - if boxed { - buffer.appendInt32(-146520221) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(value.count)) - for item in value { - item.serialize(buffer, true) - } - break - case .jsonObject(let value): - if boxed { - buffer.appendInt32(-1715350371) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(value.count)) - for item in value { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .jsonNull: - return ("jsonNull", []) - case .jsonBool(let value): - return ("jsonBool", [("value", value)]) - case .jsonNumber(let value): - return ("jsonNumber", [("value", value)]) - case .jsonString(let value): - return ("jsonString", [("value", value)]) - case .jsonArray(let value): - return ("jsonArray", [("value", value)]) - case .jsonObject(let value): - return ("jsonObject", [("value", value)]) - } - } - - public static func parse_jsonNull(_ reader: BufferReader) -> JSONValue? { - return Api.JSONValue.jsonNull - } - public static func parse_jsonBool(_ reader: BufferReader) -> JSONValue? { - var _1: Api.Bool? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Bool - } - let _c1 = _1 != nil - if _c1 { - return Api.JSONValue.jsonBool(value: _1!) - } - else { - return nil - } - } - public static func parse_jsonNumber(_ reader: BufferReader) -> JSONValue? { - var _1: Double? - _1 = reader.readDouble() - let _c1 = _1 != nil - if _c1 { - return Api.JSONValue.jsonNumber(value: _1!) - } - else { - return nil - } - } - public static func parse_jsonString(_ reader: BufferReader) -> JSONValue? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.JSONValue.jsonString(value: _1!) - } - else { - return nil - } - } - public static func parse_jsonArray(_ reader: BufferReader) -> JSONValue? { - var _1: [Api.JSONValue]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.JSONValue.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.JSONValue.jsonArray(value: _1!) - } - else { - return nil - } - } - public static func parse_jsonObject(_ reader: BufferReader) -> JSONValue? { - var _1: [Api.JSONObjectValue]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.JSONObjectValue.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.JSONValue.jsonObject(value: _1!) - } - else { - return nil - } - } - - } - public enum Photo: TypeConstructorDescription { - case photoEmpty(id: Int64) - case photo(flags: Int32, id: Int64, accessHash: Int64, fileReference: Buffer, date: Int32, sizes: [Api.PhotoSize], videoSizes: [Api.VideoSize]?, dcId: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .photoEmpty(let id): - if boxed { - buffer.appendInt32(590459437) - } - serializeInt64(id, buffer: buffer, boxed: false) - break - case .photo(let flags, let id, let accessHash, let fileReference, let date, let sizes, let videoSizes, let dcId): - if boxed { - buffer.appendInt32(-82216347) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeBytes(fileReference, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(sizes.count)) - for item in sizes { - item.serialize(buffer, true) - } - if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(videoSizes!.count)) - for item in videoSizes! { - item.serialize(buffer, true) - }} - serializeInt32(dcId, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .photoEmpty(let id): - return ("photoEmpty", [("id", id)]) - case .photo(let flags, let id, let accessHash, let fileReference, let date, let sizes, let videoSizes, let dcId): - return ("photo", [("flags", flags), ("id", id), ("accessHash", accessHash), ("fileReference", fileReference), ("date", date), ("sizes", sizes), ("videoSizes", videoSizes), ("dcId", dcId)]) - } - } - - public static func parse_photoEmpty(_ reader: BufferReader) -> Photo? { - var _1: Int64? - _1 = reader.readInt64() - let _c1 = _1 != nil - if _c1 { - return Api.Photo.photoEmpty(id: _1!) - } - else { - return nil - } - } - public static func parse_photo(_ reader: BufferReader) -> Photo? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Int64? - _3 = reader.readInt64() - var _4: Buffer? - _4 = parseBytes(reader) - var _5: Int32? - _5 = reader.readInt32() - var _6: [Api.PhotoSize]? - if let _ = reader.readInt32() { - _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PhotoSize.self) - } - var _7: [Api.VideoSize]? - if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { - _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.VideoSize.self) - } } - var _8: Int32? - _8 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil - let _c8 = _8 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { - return Api.Photo.photo(flags: _1!, id: _2!, accessHash: _3!, fileReference: _4!, date: _5!, sizes: _6!, videoSizes: _7, dcId: _8!) - } - else { - return nil - } - } - - } - public enum Chat: TypeConstructorDescription { - case chatEmpty(id: Int32) - case chat(flags: Int32, id: Int32, title: String, photo: Api.ChatPhoto, participantsCount: Int32, date: Int32, version: Int32, migratedTo: Api.InputChannel?, adminRights: Api.ChatAdminRights?, defaultBannedRights: Api.ChatBannedRights?) - case chatForbidden(id: Int32, title: String) - case channel(flags: Int32, id: Int32, accessHash: Int64?, title: String, username: String?, photo: Api.ChatPhoto, date: Int32, version: Int32, restrictionReason: [Api.RestrictionReason]?, adminRights: Api.ChatAdminRights?, bannedRights: Api.ChatBannedRights?, defaultBannedRights: Api.ChatBannedRights?, participantsCount: Int32?) - case channelForbidden(flags: Int32, id: Int32, accessHash: Int64, title: String, untilDate: Int32?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .chatEmpty(let id): - if boxed { - buffer.appendInt32(-1683826688) - } - serializeInt32(id, buffer: buffer, boxed: false) - break - case .chat(let flags, let id, let title, let photo, let participantsCount, let date, let version, let migratedTo, let adminRights, let defaultBannedRights): - if boxed { - buffer.appendInt32(1004149726) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - serializeString(title, buffer: buffer, boxed: false) - photo.serialize(buffer, true) - serializeInt32(participantsCount, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - serializeInt32(version, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 6) != 0 {migratedTo!.serialize(buffer, true)} - if Int(flags) & Int(1 << 14) != 0 {adminRights!.serialize(buffer, true)} - if Int(flags) & Int(1 << 18) != 0 {defaultBannedRights!.serialize(buffer, true)} - break - case .chatForbidden(let id, let title): - if boxed { - buffer.appendInt32(120753115) - } - serializeInt32(id, buffer: buffer, boxed: false) - serializeString(title, buffer: buffer, boxed: false) - break - case .channel(let flags, let id, let accessHash, let title, let username, let photo, let date, let version, let restrictionReason, let adminRights, let bannedRights, let defaultBannedRights, let participantsCount): - if boxed { - buffer.appendInt32(-753232354) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 13) != 0 {serializeInt64(accessHash!, buffer: buffer, boxed: false)} - serializeString(title, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 6) != 0 {serializeString(username!, buffer: buffer, boxed: false)} - photo.serialize(buffer, true) - serializeInt32(date, buffer: buffer, boxed: false) - serializeInt32(version, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 9) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(restrictionReason!.count)) - for item in restrictionReason! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 14) != 0 {adminRights!.serialize(buffer, true)} - if Int(flags) & Int(1 << 15) != 0 {bannedRights!.serialize(buffer, true)} - if Int(flags) & Int(1 << 18) != 0 {defaultBannedRights!.serialize(buffer, true)} - if Int(flags) & Int(1 << 17) != 0 {serializeInt32(participantsCount!, buffer: buffer, boxed: false)} - break - case .channelForbidden(let flags, let id, let accessHash, let title, let untilDate): - if boxed { - buffer.appendInt32(681420594) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeString(title, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 16) != 0 {serializeInt32(untilDate!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .chatEmpty(let id): - return ("chatEmpty", [("id", id)]) - case .chat(let flags, let id, let title, let photo, let participantsCount, let date, let version, let migratedTo, let adminRights, let defaultBannedRights): - return ("chat", [("flags", flags), ("id", id), ("title", title), ("photo", photo), ("participantsCount", participantsCount), ("date", date), ("version", version), ("migratedTo", migratedTo), ("adminRights", adminRights), ("defaultBannedRights", defaultBannedRights)]) - case .chatForbidden(let id, let title): - return ("chatForbidden", [("id", id), ("title", title)]) - case .channel(let flags, let id, let accessHash, let title, let username, let photo, let date, let version, let restrictionReason, let adminRights, let bannedRights, let defaultBannedRights, let participantsCount): - return ("channel", [("flags", flags), ("id", id), ("accessHash", accessHash), ("title", title), ("username", username), ("photo", photo), ("date", date), ("version", version), ("restrictionReason", restrictionReason), ("adminRights", adminRights), ("bannedRights", bannedRights), ("defaultBannedRights", defaultBannedRights), ("participantsCount", participantsCount)]) - case .channelForbidden(let flags, let id, let accessHash, let title, let untilDate): - return ("channelForbidden", [("flags", flags), ("id", id), ("accessHash", accessHash), ("title", title), ("untilDate", untilDate)]) - } - } - - public static func parse_chatEmpty(_ reader: BufferReader) -> Chat? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.Chat.chatEmpty(id: _1!) - } - else { - return nil - } - } - public static func parse_chat(_ reader: BufferReader) -> Chat? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: String? - _3 = parseString(reader) - var _4: Api.ChatPhoto? - if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.ChatPhoto - } - var _5: Int32? - _5 = reader.readInt32() - var _6: Int32? - _6 = reader.readInt32() - var _7: Int32? - _7 = reader.readInt32() - var _8: Api.InputChannel? - if Int(_1!) & Int(1 << 6) != 0 {if let signature = reader.readInt32() { - _8 = Api.parse(reader, signature: signature) as? Api.InputChannel - } } - var _9: Api.ChatAdminRights? - if Int(_1!) & Int(1 << 14) != 0 {if let signature = reader.readInt32() { - _9 = Api.parse(reader, signature: signature) as? Api.ChatAdminRights - } } - var _10: Api.ChatBannedRights? - if Int(_1!) & Int(1 << 18) != 0 {if let signature = reader.readInt32() { - _10 = Api.parse(reader, signature: signature) as? Api.ChatBannedRights - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 6) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 14) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 18) == 0) || _10 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 { - return Api.Chat.chat(flags: _1!, id: _2!, title: _3!, photo: _4!, participantsCount: _5!, date: _6!, version: _7!, migratedTo: _8, adminRights: _9, defaultBannedRights: _10) - } - else { - return nil - } - } - public static func parse_chatForbidden(_ reader: BufferReader) -> Chat? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Chat.chatForbidden(id: _1!, title: _2!) - } - else { - return nil - } - } - public static func parse_channel(_ reader: BufferReader) -> Chat? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int64? - if Int(_1!) & Int(1 << 13) != 0 {_3 = reader.readInt64() } - var _4: String? - _4 = parseString(reader) - var _5: String? - if Int(_1!) & Int(1 << 6) != 0 {_5 = parseString(reader) } - var _6: Api.ChatPhoto? - if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.ChatPhoto - } - var _7: Int32? - _7 = reader.readInt32() - var _8: Int32? - _8 = reader.readInt32() - var _9: [Api.RestrictionReason]? - if Int(_1!) & Int(1 << 9) != 0 {if let _ = reader.readInt32() { - _9 = Api.parseVector(reader, elementSignature: 0, elementType: Api.RestrictionReason.self) - } } - var _10: Api.ChatAdminRights? - if Int(_1!) & Int(1 << 14) != 0 {if let signature = reader.readInt32() { - _10 = Api.parse(reader, signature: signature) as? Api.ChatAdminRights - } } - var _11: Api.ChatBannedRights? - if Int(_1!) & Int(1 << 15) != 0 {if let signature = reader.readInt32() { - _11 = Api.parse(reader, signature: signature) as? Api.ChatBannedRights - } } - var _12: Api.ChatBannedRights? - if Int(_1!) & Int(1 << 18) != 0 {if let signature = reader.readInt32() { - _12 = Api.parse(reader, signature: signature) as? Api.ChatBannedRights - } } - var _13: Int32? - if Int(_1!) & Int(1 << 17) != 0 {_13 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 13) == 0) || _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 6) == 0) || _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = _8 != nil - let _c9 = (Int(_1!) & Int(1 << 9) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 14) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 15) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 18) == 0) || _12 != nil - let _c13 = (Int(_1!) & Int(1 << 17) == 0) || _13 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 { - return Api.Chat.channel(flags: _1!, id: _2!, accessHash: _3, title: _4!, username: _5, photo: _6!, date: _7!, version: _8!, restrictionReason: _9, adminRights: _10, bannedRights: _11, defaultBannedRights: _12, participantsCount: _13) - } - else { - return nil - } - } - public static func parse_channelForbidden(_ reader: BufferReader) -> Chat? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int64? - _3 = reader.readInt64() - var _4: String? - _4 = parseString(reader) - var _5: Int32? - if Int(_1!) & Int(1 << 16) != 0 {_5 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 16) == 0) || _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.Chat.channelForbidden(flags: _1!, id: _2!, accessHash: _3!, title: _4!, untilDate: _5) - } - else { - return nil - } - } - - } - public enum StatsURL: TypeConstructorDescription { - case statsURL(url: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .statsURL(let url): - if boxed { - buffer.appendInt32(1202287072) - } - serializeString(url, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .statsURL(let url): - return ("statsURL", [("url", url)]) - } - } - - public static func parse_statsURL(_ reader: BufferReader) -> StatsURL? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.StatsURL.statsURL(url: _1!) - } - else { - return nil - } - } - - } - public enum ChatInvite: TypeConstructorDescription { - case chatInviteAlready(chat: Api.Chat) - case chatInvite(flags: Int32, title: String, photo: Api.Photo, participantsCount: Int32, participants: [Api.User]?) - case chatInvitePeek(chat: Api.Chat, expires: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .chatInviteAlready(let chat): - if boxed { - buffer.appendInt32(1516793212) - } - chat.serialize(buffer, true) - break - case .chatInvite(let flags, let title, let photo, let participantsCount, let participants): - if boxed { - buffer.appendInt32(-540871282) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(title, buffer: buffer, boxed: false) - photo.serialize(buffer, true) - serializeInt32(participantsCount, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 4) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(participants!.count)) - for item in participants! { - item.serialize(buffer, true) - }} - break - case .chatInvitePeek(let chat, let expires): - if boxed { - buffer.appendInt32(1634294960) - } - chat.serialize(buffer, true) - serializeInt32(expires, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .chatInviteAlready(let chat): - return ("chatInviteAlready", [("chat", chat)]) - case .chatInvite(let flags, let title, let photo, let participantsCount, let participants): - return ("chatInvite", [("flags", flags), ("title", title), ("photo", photo), ("participantsCount", participantsCount), ("participants", participants)]) - case .chatInvitePeek(let chat, let expires): - return ("chatInvitePeek", [("chat", chat), ("expires", expires)]) - } - } - - public static func parse_chatInviteAlready(_ reader: BufferReader) -> ChatInvite? { - var _1: Api.Chat? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Chat - } - let _c1 = _1 != nil - if _c1 { - return Api.ChatInvite.chatInviteAlready(chat: _1!) - } - else { - return nil - } - } - public static func parse_chatInvite(_ reader: BufferReader) -> ChatInvite? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: Api.Photo? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.Photo - } - var _4: Int32? - _4 = reader.readInt32() - var _5: [Api.User]? - if Int(_1!) & Int(1 << 4) != 0 {if let _ = reader.readInt32() { - _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 4) == 0) || _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.ChatInvite.chatInvite(flags: _1!, title: _2!, photo: _3!, participantsCount: _4!, participants: _5) - } - else { - return nil - } - } - public static func parse_chatInvitePeek(_ reader: BufferReader) -> ChatInvite? { - var _1: Api.Chat? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Chat - } - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ChatInvite.chatInvitePeek(chat: _1!, expires: _2!) - } - else { - return nil - } - } - - } - public enum InlineQueryPeerType: TypeConstructorDescription { - case inlineQueryPeerTypeSameBotPM - case inlineQueryPeerTypePM - case inlineQueryPeerTypeChat - case inlineQueryPeerTypeMegagroup - case inlineQueryPeerTypeBroadcast - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inlineQueryPeerTypeSameBotPM: - if boxed { - buffer.appendInt32(813821341) - } - - break - case .inlineQueryPeerTypePM: - if boxed { - buffer.appendInt32(-2093215828) - } - - break - case .inlineQueryPeerTypeChat: - if boxed { - buffer.appendInt32(-681130742) - } - - break - case .inlineQueryPeerTypeMegagroup: - if boxed { - buffer.appendInt32(1589952067) - } - - break - case .inlineQueryPeerTypeBroadcast: - if boxed { - buffer.appendInt32(1664413338) - } - - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inlineQueryPeerTypeSameBotPM: - return ("inlineQueryPeerTypeSameBotPM", []) - case .inlineQueryPeerTypePM: - return ("inlineQueryPeerTypePM", []) - case .inlineQueryPeerTypeChat: - return ("inlineQueryPeerTypeChat", []) - case .inlineQueryPeerTypeMegagroup: - return ("inlineQueryPeerTypeMegagroup", []) - case .inlineQueryPeerTypeBroadcast: - return ("inlineQueryPeerTypeBroadcast", []) - } - } - - public static func parse_inlineQueryPeerTypeSameBotPM(_ reader: BufferReader) -> InlineQueryPeerType? { - return Api.InlineQueryPeerType.inlineQueryPeerTypeSameBotPM - } - public static func parse_inlineQueryPeerTypePM(_ reader: BufferReader) -> InlineQueryPeerType? { - return Api.InlineQueryPeerType.inlineQueryPeerTypePM - } - public static func parse_inlineQueryPeerTypeChat(_ reader: BufferReader) -> InlineQueryPeerType? { - return Api.InlineQueryPeerType.inlineQueryPeerTypeChat - } - public static func parse_inlineQueryPeerTypeMegagroup(_ reader: BufferReader) -> InlineQueryPeerType? { - return Api.InlineQueryPeerType.inlineQueryPeerTypeMegagroup - } - public static func parse_inlineQueryPeerTypeBroadcast(_ reader: BufferReader) -> InlineQueryPeerType? { - return Api.InlineQueryPeerType.inlineQueryPeerTypeBroadcast - } - - } - public enum AutoDownloadSettings: TypeConstructorDescription { - case autoDownloadSettings(flags: Int32, photoSizeMax: Int32, videoSizeMax: Int32, fileSizeMax: Int32, videoUploadMaxbitrate: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .autoDownloadSettings(let flags, let photoSizeMax, let videoSizeMax, let fileSizeMax, let videoUploadMaxbitrate): - if boxed { - buffer.appendInt32(-532532493) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(photoSizeMax, buffer: buffer, boxed: false) - serializeInt32(videoSizeMax, buffer: buffer, boxed: false) - serializeInt32(fileSizeMax, buffer: buffer, boxed: false) - serializeInt32(videoUploadMaxbitrate, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .autoDownloadSettings(let flags, let photoSizeMax, let videoSizeMax, let fileSizeMax, let videoUploadMaxbitrate): - return ("autoDownloadSettings", [("flags", flags), ("photoSizeMax", photoSizeMax), ("videoSizeMax", videoSizeMax), ("fileSizeMax", fileSizeMax), ("videoUploadMaxbitrate", videoUploadMaxbitrate)]) - } - } - - public static func parse_autoDownloadSettings(_ reader: BufferReader) -> AutoDownloadSettings? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.AutoDownloadSettings.autoDownloadSettings(flags: _1!, photoSizeMax: _2!, videoSizeMax: _3!, fileSizeMax: _4!, videoUploadMaxbitrate: _5!) - } - else { - return nil - } - } - - } - public enum StickerSetCovered: TypeConstructorDescription { - case stickerSetCovered(set: Api.StickerSet, cover: Api.Document) - case stickerSetMultiCovered(set: Api.StickerSet, covers: [Api.Document]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .stickerSetCovered(let set, let cover): - if boxed { - buffer.appendInt32(1678812626) - } - set.serialize(buffer, true) - cover.serialize(buffer, true) - break - case .stickerSetMultiCovered(let set, let covers): - if boxed { - buffer.appendInt32(872932635) - } - set.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(covers.count)) - for item in covers { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .stickerSetCovered(let set, let cover): - return ("stickerSetCovered", [("set", set), ("cover", cover)]) - case .stickerSetMultiCovered(let set, let covers): - return ("stickerSetMultiCovered", [("set", set), ("covers", covers)]) - } - } - - public static func parse_stickerSetCovered(_ reader: BufferReader) -> StickerSetCovered? { - var _1: Api.StickerSet? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.StickerSet - } - var _2: Api.Document? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Document - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.StickerSetCovered.stickerSetCovered(set: _1!, cover: _2!) - } - else { - return nil - } - } - public static func parse_stickerSetMultiCovered(_ reader: BufferReader) -> StickerSetCovered? { - var _1: Api.StickerSet? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.StickerSet - } - var _2: [Api.Document]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Document.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.StickerSetCovered.stickerSetMultiCovered(set: _1!, covers: _2!) - } - else { - return nil - } - } - - } - public enum RecentMeUrl: TypeConstructorDescription { - case recentMeUrlUnknown(url: String) - case recentMeUrlUser(url: String, userId: Int32) - case recentMeUrlChat(url: String, chatId: Int32) - case recentMeUrlChatInvite(url: String, chatInvite: Api.ChatInvite) - case recentMeUrlStickerSet(url: String, set: Api.StickerSetCovered) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .recentMeUrlUnknown(let url): - if boxed { - buffer.appendInt32(1189204285) - } - serializeString(url, buffer: buffer, boxed: false) - break - case .recentMeUrlUser(let url, let userId): - if boxed { - buffer.appendInt32(-1917045962) - } - serializeString(url, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - break - case .recentMeUrlChat(let url, let chatId): - if boxed { - buffer.appendInt32(-1608834311) - } - serializeString(url, buffer: buffer, boxed: false) - serializeInt32(chatId, buffer: buffer, boxed: false) - break - case .recentMeUrlChatInvite(let url, let chatInvite): - if boxed { - buffer.appendInt32(-347535331) - } - serializeString(url, buffer: buffer, boxed: false) - chatInvite.serialize(buffer, true) - break - case .recentMeUrlStickerSet(let url, let set): - if boxed { - buffer.appendInt32(-1140172836) - } - serializeString(url, buffer: buffer, boxed: false) - set.serialize(buffer, true) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .recentMeUrlUnknown(let url): - return ("recentMeUrlUnknown", [("url", url)]) - case .recentMeUrlUser(let url, let userId): - return ("recentMeUrlUser", [("url", url), ("userId", userId)]) - case .recentMeUrlChat(let url, let chatId): - return ("recentMeUrlChat", [("url", url), ("chatId", chatId)]) - case .recentMeUrlChatInvite(let url, let chatInvite): - return ("recentMeUrlChatInvite", [("url", url), ("chatInvite", chatInvite)]) - case .recentMeUrlStickerSet(let url, let set): - return ("recentMeUrlStickerSet", [("url", url), ("set", set)]) - } - } - - public static func parse_recentMeUrlUnknown(_ reader: BufferReader) -> RecentMeUrl? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.RecentMeUrl.recentMeUrlUnknown(url: _1!) - } - else { - return nil - } - } - public static func parse_recentMeUrlUser(_ reader: BufferReader) -> RecentMeUrl? { - var _1: String? - _1 = parseString(reader) - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.RecentMeUrl.recentMeUrlUser(url: _1!, userId: _2!) - } - else { - return nil - } - } - public static func parse_recentMeUrlChat(_ reader: BufferReader) -> RecentMeUrl? { - var _1: String? - _1 = parseString(reader) - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.RecentMeUrl.recentMeUrlChat(url: _1!, chatId: _2!) - } - else { - return nil - } - } - public static func parse_recentMeUrlChatInvite(_ reader: BufferReader) -> RecentMeUrl? { - var _1: String? - _1 = parseString(reader) - var _2: Api.ChatInvite? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.ChatInvite - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.RecentMeUrl.recentMeUrlChatInvite(url: _1!, chatInvite: _2!) - } - else { - return nil - } - } - public static func parse_recentMeUrlStickerSet(_ reader: BufferReader) -> RecentMeUrl? { - var _1: String? - _1 = parseString(reader) - var _2: Api.StickerSetCovered? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.StickerSetCovered - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.RecentMeUrl.recentMeUrlStickerSet(url: _1!, set: _2!) - } - else { - return nil - } - } - - } - public enum RestrictionReason: TypeConstructorDescription { - case restrictionReason(platform: String, reason: String, text: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .restrictionReason(let platform, let reason, let text): - if boxed { - buffer.appendInt32(-797791052) - } - serializeString(platform, buffer: buffer, boxed: false) - serializeString(reason, buffer: buffer, boxed: false) - serializeString(text, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .restrictionReason(let platform, let reason, let text): - return ("restrictionReason", [("platform", platform), ("reason", reason), ("text", text)]) - } - } - - public static func parse_restrictionReason(_ reader: BufferReader) -> RestrictionReason? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.RestrictionReason.restrictionReason(platform: _1!, reason: _2!, text: _3!) - } - else { - return nil - } - } - - } - indirect public enum RichText: TypeConstructorDescription { - case textEmpty - case textPlain(text: String) - case textBold(text: Api.RichText) - case textItalic(text: Api.RichText) - case textUnderline(text: Api.RichText) - case textStrike(text: Api.RichText) - case textFixed(text: Api.RichText) - case textUrl(text: Api.RichText, url: String, webpageId: Int64) - case textEmail(text: Api.RichText, email: String) - case textConcat(texts: [Api.RichText]) - case textSubscript(text: Api.RichText) - case textSuperscript(text: Api.RichText) - case textMarked(text: Api.RichText) - case textPhone(text: Api.RichText, phone: String) - case textImage(documentId: Int64, w: Int32, h: Int32) - case textAnchor(text: Api.RichText, name: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .textEmpty: - if boxed { - buffer.appendInt32(-599948721) - } - - break - case .textPlain(let text): - if boxed { - buffer.appendInt32(1950782688) - } - serializeString(text, buffer: buffer, boxed: false) - break - case .textBold(let text): - if boxed { - buffer.appendInt32(1730456516) - } - text.serialize(buffer, true) - break - case .textItalic(let text): - if boxed { - buffer.appendInt32(-653089380) - } - text.serialize(buffer, true) - break - case .textUnderline(let text): - if boxed { - buffer.appendInt32(-1054465340) - } - text.serialize(buffer, true) - break - case .textStrike(let text): - if boxed { - buffer.appendInt32(-1678197867) - } - text.serialize(buffer, true) - break - case .textFixed(let text): - if boxed { - buffer.appendInt32(1816074681) - } - text.serialize(buffer, true) - break - case .textUrl(let text, let url, let webpageId): - if boxed { - buffer.appendInt32(1009288385) - } - text.serialize(buffer, true) - serializeString(url, buffer: buffer, boxed: false) - serializeInt64(webpageId, buffer: buffer, boxed: false) - break - case .textEmail(let text, let email): - if boxed { - buffer.appendInt32(-564523562) - } - text.serialize(buffer, true) - serializeString(email, buffer: buffer, boxed: false) - break - case .textConcat(let texts): - if boxed { - buffer.appendInt32(2120376535) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(texts.count)) - for item in texts { - item.serialize(buffer, true) - } - break - case .textSubscript(let text): - if boxed { - buffer.appendInt32(-311786236) - } - text.serialize(buffer, true) - break - case .textSuperscript(let text): - if boxed { - buffer.appendInt32(-939827711) - } - text.serialize(buffer, true) - break - case .textMarked(let text): - if boxed { - buffer.appendInt32(55281185) - } - text.serialize(buffer, true) - break - case .textPhone(let text, let phone): - if boxed { - buffer.appendInt32(483104362) - } - text.serialize(buffer, true) - serializeString(phone, buffer: buffer, boxed: false) - break - case .textImage(let documentId, let w, let h): - if boxed { - buffer.appendInt32(136105807) - } - serializeInt64(documentId, buffer: buffer, boxed: false) - serializeInt32(w, buffer: buffer, boxed: false) - serializeInt32(h, buffer: buffer, boxed: false) - break - case .textAnchor(let text, let name): - if boxed { - buffer.appendInt32(894777186) - } - text.serialize(buffer, true) - serializeString(name, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .textEmpty: - return ("textEmpty", []) - case .textPlain(let text): - return ("textPlain", [("text", text)]) - case .textBold(let text): - return ("textBold", [("text", text)]) - case .textItalic(let text): - return ("textItalic", [("text", text)]) - case .textUnderline(let text): - return ("textUnderline", [("text", text)]) - case .textStrike(let text): - return ("textStrike", [("text", text)]) - case .textFixed(let text): - return ("textFixed", [("text", text)]) - case .textUrl(let text, let url, let webpageId): - return ("textUrl", [("text", text), ("url", url), ("webpageId", webpageId)]) - case .textEmail(let text, let email): - return ("textEmail", [("text", text), ("email", email)]) - case .textConcat(let texts): - return ("textConcat", [("texts", texts)]) - case .textSubscript(let text): - return ("textSubscript", [("text", text)]) - case .textSuperscript(let text): - return ("textSuperscript", [("text", text)]) - case .textMarked(let text): - return ("textMarked", [("text", text)]) - case .textPhone(let text, let phone): - return ("textPhone", [("text", text), ("phone", phone)]) - case .textImage(let documentId, let w, let h): - return ("textImage", [("documentId", documentId), ("w", w), ("h", h)]) - case .textAnchor(let text, let name): - return ("textAnchor", [("text", text), ("name", name)]) - } - } - - public static func parse_textEmpty(_ reader: BufferReader) -> RichText? { - return Api.RichText.textEmpty - } - public static func parse_textPlain(_ reader: BufferReader) -> RichText? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.RichText.textPlain(text: _1!) - } - else { - return nil - } - } - public static func parse_textBold(_ reader: BufferReader) -> RichText? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - if _c1 { - return Api.RichText.textBold(text: _1!) - } - else { - return nil - } - } - public static func parse_textItalic(_ reader: BufferReader) -> RichText? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - if _c1 { - return Api.RichText.textItalic(text: _1!) - } - else { - return nil - } - } - public static func parse_textUnderline(_ reader: BufferReader) -> RichText? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - if _c1 { - return Api.RichText.textUnderline(text: _1!) - } - else { - return nil - } - } - public static func parse_textStrike(_ reader: BufferReader) -> RichText? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - if _c1 { - return Api.RichText.textStrike(text: _1!) - } - else { - return nil - } - } - public static func parse_textFixed(_ reader: BufferReader) -> RichText? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - if _c1 { - return Api.RichText.textFixed(text: _1!) - } - else { - return nil - } - } - public static func parse_textUrl(_ reader: BufferReader) -> RichText? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - var _2: String? - _2 = parseString(reader) - var _3: Int64? - _3 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.RichText.textUrl(text: _1!, url: _2!, webpageId: _3!) - } - else { - return nil - } - } - public static func parse_textEmail(_ reader: BufferReader) -> RichText? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.RichText.textEmail(text: _1!, email: _2!) - } - else { - return nil - } - } - public static func parse_textConcat(_ reader: BufferReader) -> RichText? { - var _1: [Api.RichText]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.RichText.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.RichText.textConcat(texts: _1!) - } - else { - return nil - } - } - public static func parse_textSubscript(_ reader: BufferReader) -> RichText? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - if _c1 { - return Api.RichText.textSubscript(text: _1!) - } - else { - return nil - } - } - public static func parse_textSuperscript(_ reader: BufferReader) -> RichText? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - if _c1 { - return Api.RichText.textSuperscript(text: _1!) - } - else { - return nil - } - } - public static func parse_textMarked(_ reader: BufferReader) -> RichText? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - if _c1 { - return Api.RichText.textMarked(text: _1!) - } - else { - return nil - } - } - public static func parse_textPhone(_ reader: BufferReader) -> RichText? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.RichText.textPhone(text: _1!, phone: _2!) - } - else { - return nil - } - } - public static func parse_textImage(_ reader: BufferReader) -> RichText? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.RichText.textImage(documentId: _1!, w: _2!, h: _3!) - } - else { - return nil - } - } - public static func parse_textAnchor(_ reader: BufferReader) -> RichText? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.RichText.textAnchor(text: _1!, name: _2!) - } - else { - return nil - } - } - - } - public enum UserFull: TypeConstructorDescription { - case userFull(flags: Int32, user: Api.User, about: String?, settings: Api.PeerSettings, profilePhoto: Api.Photo?, notifySettings: Api.PeerNotifySettings, botInfo: Api.BotInfo?, pinnedMsgId: Int32?, commonChatsCount: Int32, folderId: Int32?, ttl: Api.PeerHistoryTTL?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .userFull(let flags, let user, let about, let settings, let profilePhoto, let notifySettings, let botInfo, let pinnedMsgId, let commonChatsCount, let folderId, let ttl): - if boxed { - buffer.appendInt32(-1522240089) - } - serializeInt32(flags, buffer: buffer, boxed: false) - user.serialize(buffer, true) - if Int(flags) & Int(1 << 1) != 0 {serializeString(about!, buffer: buffer, boxed: false)} - settings.serialize(buffer, true) - if Int(flags) & Int(1 << 2) != 0 {profilePhoto!.serialize(buffer, true)} - notifySettings.serialize(buffer, true) - if Int(flags) & Int(1 << 3) != 0 {botInfo!.serialize(buffer, true)} - if Int(flags) & Int(1 << 6) != 0 {serializeInt32(pinnedMsgId!, buffer: buffer, boxed: false)} - serializeInt32(commonChatsCount, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 11) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 14) != 0 {ttl!.serialize(buffer, true)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .userFull(let flags, let user, let about, let settings, let profilePhoto, let notifySettings, let botInfo, let pinnedMsgId, let commonChatsCount, let folderId, let ttl): - return ("userFull", [("flags", flags), ("user", user), ("about", about), ("settings", settings), ("profilePhoto", profilePhoto), ("notifySettings", notifySettings), ("botInfo", botInfo), ("pinnedMsgId", pinnedMsgId), ("commonChatsCount", commonChatsCount), ("folderId", folderId), ("ttl", ttl)]) - } - } - - public static func parse_userFull(_ reader: BufferReader) -> UserFull? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.User? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.User - } - var _3: String? - if Int(_1!) & Int(1 << 1) != 0 {_3 = parseString(reader) } - var _4: Api.PeerSettings? - if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.PeerSettings - } - var _5: Api.Photo? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.Photo - } } - var _6: Api.PeerNotifySettings? - if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.PeerNotifySettings - } - var _7: Api.BotInfo? - if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.BotInfo - } } - var _8: Int32? - if Int(_1!) & Int(1 << 6) != 0 {_8 = reader.readInt32() } - var _9: Int32? - _9 = reader.readInt32() - var _10: Int32? - if Int(_1!) & Int(1 << 11) != 0 {_10 = reader.readInt32() } - var _11: Api.PeerHistoryTTL? - if Int(_1!) & Int(1 << 14) != 0 {if let signature = reader.readInt32() { - _11 = Api.parse(reader, signature: signature) as? Api.PeerHistoryTTL - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 6) == 0) || _8 != nil - let _c9 = _9 != nil - let _c10 = (Int(_1!) & Int(1 << 11) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 14) == 0) || _11 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { - return Api.UserFull.userFull(flags: _1!, user: _2!, about: _3, settings: _4!, profilePhoto: _5, notifySettings: _6!, botInfo: _7, pinnedMsgId: _8, commonChatsCount: _9!, folderId: _10, ttl: _11) - } - else { - return nil - } - } - - } - public enum InputChannel: TypeConstructorDescription { - case inputChannelEmpty - case inputChannel(channelId: Int32, accessHash: Int64) - case inputChannelFromMessage(peer: Api.InputPeer, msgId: Int32, channelId: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputChannelEmpty: - if boxed { - buffer.appendInt32(-292807034) - } - - break - case .inputChannel(let channelId, let accessHash): - if boxed { - buffer.appendInt32(-1343524562) - } - serializeInt32(channelId, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - break - case .inputChannelFromMessage(let peer, let msgId, let channelId): - if boxed { - buffer.appendInt32(707290417) - } - peer.serialize(buffer, true) - serializeInt32(msgId, buffer: buffer, boxed: false) - serializeInt32(channelId, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputChannelEmpty: - return ("inputChannelEmpty", []) - case .inputChannel(let channelId, let accessHash): - return ("inputChannel", [("channelId", channelId), ("accessHash", accessHash)]) - case .inputChannelFromMessage(let peer, let msgId, let channelId): - return ("inputChannelFromMessage", [("peer", peer), ("msgId", msgId), ("channelId", channelId)]) - } - } - - public static func parse_inputChannelEmpty(_ reader: BufferReader) -> InputChannel? { - return Api.InputChannel.inputChannelEmpty - } - public static func parse_inputChannel(_ reader: BufferReader) -> InputChannel? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputChannel.inputChannel(channelId: _1!, accessHash: _2!) - } - else { - return nil - } - } - public static func parse_inputChannelFromMessage(_ reader: BufferReader) -> InputChannel? { - var _1: Api.InputPeer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputPeer - } - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.InputChannel.inputChannelFromMessage(peer: _1!, msgId: _2!, channelId: _3!) - } - else { - return nil - } - } - - } - public enum DcOption: TypeConstructorDescription { - case dcOption(flags: Int32, id: Int32, ipAddress: String, port: Int32, secret: Buffer?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .dcOption(let flags, let id, let ipAddress, let port, let secret): - if boxed { - buffer.appendInt32(414687501) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - serializeString(ipAddress, buffer: buffer, boxed: false) - serializeInt32(port, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 10) != 0 {serializeBytes(secret!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .dcOption(let flags, let id, let ipAddress, let port, let secret): - return ("dcOption", [("flags", flags), ("id", id), ("ipAddress", ipAddress), ("port", port), ("secret", secret)]) - } - } - - public static func parse_dcOption(_ reader: BufferReader) -> DcOption? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: String? - _3 = parseString(reader) - var _4: Int32? - _4 = reader.readInt32() - var _5: Buffer? - if Int(_1!) & Int(1 << 10) != 0 {_5 = parseBytes(reader) } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 10) == 0) || _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.DcOption.dcOption(flags: _1!, id: _2!, ipAddress: _3!, port: _4!, secret: _5) - } - else { - return nil - } - } - - } - public enum PollAnswerVoters: TypeConstructorDescription { - case pollAnswerVoters(flags: Int32, option: Buffer, voters: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .pollAnswerVoters(let flags, let option, let voters): - if boxed { - buffer.appendInt32(997055186) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeBytes(option, buffer: buffer, boxed: false) - serializeInt32(voters, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .pollAnswerVoters(let flags, let option, let voters): - return ("pollAnswerVoters", [("flags", flags), ("option", option), ("voters", voters)]) - } - } - - public static func parse_pollAnswerVoters(_ reader: BufferReader) -> PollAnswerVoters? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Buffer? - _2 = parseBytes(reader) - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.PollAnswerVoters.pollAnswerVoters(flags: _1!, option: _2!, voters: _3!) - } - else { - return nil - } - } - - } - public enum LangPackLanguage: TypeConstructorDescription { - case langPackLanguage(flags: Int32, name: String, nativeName: String, langCode: String, baseLangCode: String?, pluralCode: String, stringsCount: Int32, translatedCount: Int32, translationsUrl: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .langPackLanguage(let flags, let name, let nativeName, let langCode, let baseLangCode, let pluralCode, let stringsCount, let translatedCount, let translationsUrl): - if boxed { - buffer.appendInt32(-288727837) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(name, buffer: buffer, boxed: false) - serializeString(nativeName, buffer: buffer, boxed: false) - serializeString(langCode, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeString(baseLangCode!, buffer: buffer, boxed: false)} - serializeString(pluralCode, buffer: buffer, boxed: false) - serializeInt32(stringsCount, buffer: buffer, boxed: false) - serializeInt32(translatedCount, buffer: buffer, boxed: false) - serializeString(translationsUrl, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .langPackLanguage(let flags, let name, let nativeName, let langCode, let baseLangCode, let pluralCode, let stringsCount, let translatedCount, let translationsUrl): - return ("langPackLanguage", [("flags", flags), ("name", name), ("nativeName", nativeName), ("langCode", langCode), ("baseLangCode", baseLangCode), ("pluralCode", pluralCode), ("stringsCount", stringsCount), ("translatedCount", translatedCount), ("translationsUrl", translationsUrl)]) - } - } - - public static func parse_langPackLanguage(_ reader: BufferReader) -> LangPackLanguage? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - var _5: String? - if Int(_1!) & Int(1 << 1) != 0 {_5 = parseString(reader) } - var _6: String? - _6 = parseString(reader) - var _7: Int32? - _7 = reader.readInt32() - var _8: Int32? - _8 = reader.readInt32() - var _9: String? - _9 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = _8 != nil - let _c9 = _9 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { - return Api.LangPackLanguage.langPackLanguage(flags: _1!, name: _2!, nativeName: _3!, langCode: _4!, baseLangCode: _5, pluralCode: _6!, stringsCount: _7!, translatedCount: _8!, translationsUrl: _9!) - } - else { - return nil - } - } - - } - public enum VideoSize: TypeConstructorDescription { - case videoSize(flags: Int32, type: String, location: Api.FileLocation, w: Int32, h: Int32, size: Int32, videoStartTs: Double?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .videoSize(let flags, let type, let location, let w, let h, let size, let videoStartTs): - if boxed { - buffer.appendInt32(-399391402) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(type, buffer: buffer, boxed: false) - location.serialize(buffer, true) - serializeInt32(w, buffer: buffer, boxed: false) - serializeInt32(h, buffer: buffer, boxed: false) - serializeInt32(size, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeDouble(videoStartTs!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .videoSize(let flags, let type, let location, let w, let h, let size, let videoStartTs): - return ("videoSize", [("flags", flags), ("type", type), ("location", location), ("w", w), ("h", h), ("size", size), ("videoStartTs", videoStartTs)]) - } - } - - public static func parse_videoSize(_ reader: BufferReader) -> VideoSize? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: Api.FileLocation? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.FileLocation - } - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - var _6: Int32? - _6 = reader.readInt32() - var _7: Double? - if Int(_1!) & Int(1 << 0) != 0 {_7 = reader.readDouble() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 0) == 0) || _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.VideoSize.videoSize(flags: _1!, type: _2!, location: _3!, w: _4!, h: _5!, size: _6!, videoStartTs: _7) - } - else { - return nil - } - } - - } - public enum LangPackDifference: TypeConstructorDescription { - case langPackDifference(langCode: String, fromVersion: Int32, version: Int32, strings: [Api.LangPackString]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .langPackDifference(let langCode, let fromVersion, let version, let strings): - if boxed { - buffer.appendInt32(-209337866) - } - serializeString(langCode, buffer: buffer, boxed: false) - serializeInt32(fromVersion, buffer: buffer, boxed: false) - serializeInt32(version, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(strings.count)) - for item in strings { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .langPackDifference(let langCode, let fromVersion, let version, let strings): - return ("langPackDifference", [("langCode", langCode), ("fromVersion", fromVersion), ("version", version), ("strings", strings)]) - } - } - - public static func parse_langPackDifference(_ reader: BufferReader) -> LangPackDifference? { - var _1: String? - _1 = parseString(reader) - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: [Api.LangPackString]? - if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.LangPackString.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.LangPackDifference.langPackDifference(langCode: _1!, fromVersion: _2!, version: _3!, strings: _4!) - } - else { - return nil - } - } - - } - public enum PeerHistoryTTL: TypeConstructorDescription { - case peerHistoryTTLPM(flags: Int32, myTtlPeriod: Int32?, peerTtlPeriod: Int32?) - case peerHistoryTTL(ttlPeriod: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .peerHistoryTTLPM(let flags, let myTtlPeriod, let peerTtlPeriod): - if boxed { - buffer.appendInt32(-815649386) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(myTtlPeriod!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(peerTtlPeriod!, buffer: buffer, boxed: false)} - break - case .peerHistoryTTL(let ttlPeriod): - if boxed { - buffer.appendInt32(1041354473) - } - serializeInt32(ttlPeriod, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .peerHistoryTTLPM(let flags, let myTtlPeriod, let peerTtlPeriod): - return ("peerHistoryTTLPM", [("flags", flags), ("myTtlPeriod", myTtlPeriod), ("peerTtlPeriod", peerTtlPeriod)]) - case .peerHistoryTTL(let ttlPeriod): - return ("peerHistoryTTL", [("ttlPeriod", ttlPeriod)]) - } - } - - public static func parse_peerHistoryTTLPM(_ reader: BufferReader) -> PeerHistoryTTL? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_2 = reader.readInt32() } - var _3: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_3 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.PeerHistoryTTL.peerHistoryTTLPM(flags: _1!, myTtlPeriod: _2, peerTtlPeriod: _3) - } - else { - return nil - } - } - public static func parse_peerHistoryTTL(_ reader: BufferReader) -> PeerHistoryTTL? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.PeerHistoryTTL.peerHistoryTTL(ttlPeriod: _1!) - } - else { - return nil - } - } - - } - public enum WallPaperSettings: TypeConstructorDescription { - case wallPaperSettings(flags: Int32, backgroundColor: Int32?, secondBackgroundColor: Int32?, intensity: Int32?, rotation: Int32?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .wallPaperSettings(let flags, let backgroundColor, let secondBackgroundColor, let intensity, let rotation): - if boxed { - buffer.appendInt32(84438264) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(backgroundColor!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 4) != 0 {serializeInt32(secondBackgroundColor!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeInt32(intensity!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 4) != 0 {serializeInt32(rotation!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .wallPaperSettings(let flags, let backgroundColor, let secondBackgroundColor, let intensity, let rotation): - return ("wallPaperSettings", [("flags", flags), ("backgroundColor", backgroundColor), ("secondBackgroundColor", secondBackgroundColor), ("intensity", intensity), ("rotation", rotation)]) - } - } - - public static func parse_wallPaperSettings(_ reader: BufferReader) -> WallPaperSettings? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } - var _3: Int32? - if Int(_1!) & Int(1 << 4) != 0 {_3 = reader.readInt32() } - var _4: Int32? - if Int(_1!) & Int(1 << 3) != 0 {_4 = reader.readInt32() } - var _5: Int32? - if Int(_1!) & Int(1 << 4) != 0 {_5 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 4) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 4) == 0) || _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.WallPaperSettings.wallPaperSettings(flags: _1!, backgroundColor: _2, secondBackgroundColor: _3, intensity: _4, rotation: _5) - } - else { - return nil - } - } - - } - public enum EmojiURL: TypeConstructorDescription { - case emojiURL(url: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .emojiURL(let url): - if boxed { - buffer.appendInt32(-1519029347) - } - serializeString(url, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .emojiURL(let url): - return ("emojiURL", [("url", url)]) - } - } - - public static func parse_emojiURL(_ reader: BufferReader) -> EmojiURL? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.EmojiURL.emojiURL(url: _1!) - } - else { - return nil - } - } - - } - public enum StatsGroupTopAdmin: TypeConstructorDescription { - case statsGroupTopAdmin(userId: Int32, deleted: Int32, kicked: Int32, banned: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .statsGroupTopAdmin(let userId, let deleted, let kicked, let banned): - if boxed { - buffer.appendInt32(1611985938) - } - serializeInt32(userId, buffer: buffer, boxed: false) - serializeInt32(deleted, buffer: buffer, boxed: false) - serializeInt32(kicked, buffer: buffer, boxed: false) - serializeInt32(banned, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .statsGroupTopAdmin(let userId, let deleted, let kicked, let banned): - return ("statsGroupTopAdmin", [("userId", userId), ("deleted", deleted), ("kicked", kicked), ("banned", banned)]) - } - } - - public static func parse_statsGroupTopAdmin(_ reader: BufferReader) -> StatsGroupTopAdmin? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.StatsGroupTopAdmin.statsGroupTopAdmin(userId: _1!, deleted: _2!, kicked: _3!, banned: _4!) - } - else { - return nil - } - } - - } - public enum InputCheckPasswordSRP: TypeConstructorDescription { - case inputCheckPasswordEmpty - case inputCheckPasswordSRP(srpId: Int64, A: Buffer, M1: Buffer) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputCheckPasswordEmpty: - if boxed { - buffer.appendInt32(-1736378792) - } - - break - case .inputCheckPasswordSRP(let srpId, let A, let M1): - if boxed { - buffer.appendInt32(-763367294) - } - serializeInt64(srpId, buffer: buffer, boxed: false) - serializeBytes(A, buffer: buffer, boxed: false) - serializeBytes(M1, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputCheckPasswordEmpty: - return ("inputCheckPasswordEmpty", []) - case .inputCheckPasswordSRP(let srpId, let A, let M1): - return ("inputCheckPasswordSRP", [("srpId", srpId), ("A", A), ("M1", M1)]) - } - } - - public static func parse_inputCheckPasswordEmpty(_ reader: BufferReader) -> InputCheckPasswordSRP? { - return Api.InputCheckPasswordSRP.inputCheckPasswordEmpty - } - public static func parse_inputCheckPasswordSRP(_ reader: BufferReader) -> InputCheckPasswordSRP? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Buffer? - _2 = parseBytes(reader) - var _3: Buffer? - _3 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.InputCheckPasswordSRP.inputCheckPasswordSRP(srpId: _1!, A: _2!, M1: _3!) - } - else { - return nil - } - } - - } - public enum InputEncryptedFile: TypeConstructorDescription { - case inputEncryptedFileEmpty - case inputEncryptedFileUploaded(id: Int64, parts: Int32, md5Checksum: String, keyFingerprint: Int32) - case inputEncryptedFile(id: Int64, accessHash: Int64) - case inputEncryptedFileBigUploaded(id: Int64, parts: Int32, keyFingerprint: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputEncryptedFileEmpty: - if boxed { - buffer.appendInt32(406307684) - } - - break - case .inputEncryptedFileUploaded(let id, let parts, let md5Checksum, let keyFingerprint): - if boxed { - buffer.appendInt32(1690108678) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt32(parts, buffer: buffer, boxed: false) - serializeString(md5Checksum, buffer: buffer, boxed: false) - serializeInt32(keyFingerprint, buffer: buffer, boxed: false) - break - case .inputEncryptedFile(let id, let accessHash): - if boxed { - buffer.appendInt32(1511503333) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - break - case .inputEncryptedFileBigUploaded(let id, let parts, let keyFingerprint): - if boxed { - buffer.appendInt32(767652808) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt32(parts, buffer: buffer, boxed: false) - serializeInt32(keyFingerprint, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputEncryptedFileEmpty: - return ("inputEncryptedFileEmpty", []) - case .inputEncryptedFileUploaded(let id, let parts, let md5Checksum, let keyFingerprint): - return ("inputEncryptedFileUploaded", [("id", id), ("parts", parts), ("md5Checksum", md5Checksum), ("keyFingerprint", keyFingerprint)]) - case .inputEncryptedFile(let id, let accessHash): - return ("inputEncryptedFile", [("id", id), ("accessHash", accessHash)]) - case .inputEncryptedFileBigUploaded(let id, let parts, let keyFingerprint): - return ("inputEncryptedFileBigUploaded", [("id", id), ("parts", parts), ("keyFingerprint", keyFingerprint)]) - } - } - - public static func parse_inputEncryptedFileEmpty(_ reader: BufferReader) -> InputEncryptedFile? { - return Api.InputEncryptedFile.inputEncryptedFileEmpty - } - public static func parse_inputEncryptedFileUploaded(_ reader: BufferReader) -> InputEncryptedFile? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int32? - _2 = reader.readInt32() - var _3: String? - _3 = parseString(reader) - var _4: Int32? - _4 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputEncryptedFile.inputEncryptedFileUploaded(id: _1!, parts: _2!, md5Checksum: _3!, keyFingerprint: _4!) - } - else { - return nil - } - } - public static func parse_inputEncryptedFile(_ reader: BufferReader) -> InputEncryptedFile? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputEncryptedFile.inputEncryptedFile(id: _1!, accessHash: _2!) - } - else { - return nil - } - } - public static func parse_inputEncryptedFileBigUploaded(_ reader: BufferReader) -> InputEncryptedFile? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.InputEncryptedFile.inputEncryptedFileBigUploaded(id: _1!, parts: _2!, keyFingerprint: _3!) - } - else { - return nil - } - } - - } - public enum GroupCallParticipant: TypeConstructorDescription { - case groupCallParticipant(flags: Int32, userId: Int32, date: Int32, activeDate: Int32?, source: Int32, volume: Int32?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .groupCallParticipant(let flags, let userId, let date, let activeDate, let source, let volume): - if boxed { - buffer.appendInt32(1690708501) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 3) != 0 {serializeInt32(activeDate!, buffer: buffer, boxed: false)} - serializeInt32(source, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 7) != 0 {serializeInt32(volume!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .groupCallParticipant(let flags, let userId, let date, let activeDate, let source, let volume): - return ("groupCallParticipant", [("flags", flags), ("userId", userId), ("date", date), ("activeDate", activeDate), ("source", source), ("volume", volume)]) - } - } - - public static func parse_groupCallParticipant(_ reader: BufferReader) -> GroupCallParticipant? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - if Int(_1!) & Int(1 << 3) != 0 {_4 = reader.readInt32() } - var _5: Int32? - _5 = reader.readInt32() - var _6: Int32? - if Int(_1!) & Int(1 << 7) != 0 {_6 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil - let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 7) == 0) || _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.GroupCallParticipant.groupCallParticipant(flags: _1!, userId: _2!, date: _3!, activeDate: _4, source: _5!, volume: _6) - } - else { - return nil - } - } - - } - public enum SavedContact: TypeConstructorDescription { - case savedPhoneContact(phone: String, firstName: String, lastName: String, date: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .savedPhoneContact(let phone, let firstName, let lastName, let date): - if boxed { - buffer.appendInt32(289586518) - } - serializeString(phone, buffer: buffer, boxed: false) - serializeString(firstName, buffer: buffer, boxed: false) - serializeString(lastName, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .savedPhoneContact(let phone, let firstName, let lastName, let date): - return ("savedPhoneContact", [("phone", phone), ("firstName", firstName), ("lastName", lastName), ("date", date)]) - } - } - - public static func parse_savedPhoneContact(_ reader: BufferReader) -> SavedContact? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: Int32? - _4 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.SavedContact.savedPhoneContact(phone: _1!, firstName: _2!, lastName: _3!, date: _4!) - } - else { - return nil - } - } - - } - public enum ExportedMessageLink: TypeConstructorDescription { - case exportedMessageLink(link: String, html: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .exportedMessageLink(let link, let html): - if boxed { - buffer.appendInt32(1571494644) - } - serializeString(link, buffer: buffer, boxed: false) - serializeString(html, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .exportedMessageLink(let link, let html): - return ("exportedMessageLink", [("link", link), ("html", html)]) - } - } - - public static func parse_exportedMessageLink(_ reader: BufferReader) -> ExportedMessageLink? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ExportedMessageLink.exportedMessageLink(link: _1!, html: _2!) - } - else { - return nil - } - } - - } - public enum InputFile: TypeConstructorDescription { - case inputFile(id: Int64, parts: Int32, name: String, md5Checksum: String) - case inputFileBig(id: Int64, parts: Int32, name: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputFile(let id, let parts, let name, let md5Checksum): - if boxed { - buffer.appendInt32(-181407105) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt32(parts, buffer: buffer, boxed: false) - serializeString(name, buffer: buffer, boxed: false) - serializeString(md5Checksum, buffer: buffer, boxed: false) - break - case .inputFileBig(let id, let parts, let name): - if boxed { - buffer.appendInt32(-95482955) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt32(parts, buffer: buffer, boxed: false) - serializeString(name, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputFile(let id, let parts, let name, let md5Checksum): - return ("inputFile", [("id", id), ("parts", parts), ("name", name), ("md5Checksum", md5Checksum)]) - case .inputFileBig(let id, let parts, let name): - return ("inputFileBig", [("id", id), ("parts", parts), ("name", name)]) - } - } - - public static func parse_inputFile(_ reader: BufferReader) -> InputFile? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int32? - _2 = reader.readInt32() - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputFile.inputFile(id: _1!, parts: _2!, name: _3!, md5Checksum: _4!) - } - else { - return nil - } - } - public static func parse_inputFileBig(_ reader: BufferReader) -> InputFile? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int32? - _2 = reader.readInt32() - var _3: String? - _3 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.InputFile.inputFileBig(id: _1!, parts: _2!, name: _3!) - } - else { - return nil - } - } - - } - public enum Peer: TypeConstructorDescription { - case peerUser(userId: Int32) - case peerChat(chatId: Int32) - case peerChannel(channelId: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .peerUser(let userId): - if boxed { - buffer.appendInt32(-1649296275) - } - serializeInt32(userId, buffer: buffer, boxed: false) - break - case .peerChat(let chatId): - if boxed { - buffer.appendInt32(-1160714821) - } - serializeInt32(chatId, buffer: buffer, boxed: false) - break - case .peerChannel(let channelId): - if boxed { - buffer.appendInt32(-1109531342) - } - serializeInt32(channelId, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .peerUser(let userId): - return ("peerUser", [("userId", userId)]) - case .peerChat(let chatId): - return ("peerChat", [("chatId", chatId)]) - case .peerChannel(let channelId): - return ("peerChannel", [("channelId", channelId)]) - } - } - - public static func parse_peerUser(_ reader: BufferReader) -> Peer? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.Peer.peerUser(userId: _1!) - } - else { - return nil - } - } - public static func parse_peerChat(_ reader: BufferReader) -> Peer? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.Peer.peerChat(chatId: _1!) - } - else { - return nil - } - } - public static func parse_peerChannel(_ reader: BufferReader) -> Peer? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.Peer.peerChannel(channelId: _1!) - } - else { - return nil - } - } - - } - public enum PaymentRequestedInfo: TypeConstructorDescription { - case paymentRequestedInfo(flags: Int32, name: String?, phone: String?, email: String?, shippingAddress: Api.PostAddress?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .paymentRequestedInfo(let flags, let name, let phone, let email, let shippingAddress): - if boxed { - buffer.appendInt32(-1868808300) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeString(name!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeString(phone!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeString(email!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {shippingAddress!.serialize(buffer, true)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .paymentRequestedInfo(let flags, let name, let phone, let email, let shippingAddress): - return ("paymentRequestedInfo", [("flags", flags), ("name", name), ("phone", phone), ("email", email), ("shippingAddress", shippingAddress)]) - } - } - - public static func parse_paymentRequestedInfo(_ reader: BufferReader) -> PaymentRequestedInfo? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - if Int(_1!) & Int(1 << 0) != 0 {_2 = parseString(reader) } - var _3: String? - if Int(_1!) & Int(1 << 1) != 0 {_3 = parseString(reader) } - var _4: String? - if Int(_1!) & Int(1 << 2) != 0 {_4 = parseString(reader) } - var _5: Api.PostAddress? - if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.PostAddress - } } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.PaymentRequestedInfo.paymentRequestedInfo(flags: _1!, name: _2, phone: _3, email: _4, shippingAddress: _5) - } - else { - return nil - } - } - - } - public enum UserStatus: TypeConstructorDescription { - case userStatusEmpty - case userStatusOnline(expires: Int32) - case userStatusOffline(wasOnline: Int32) - case userStatusRecently - case userStatusLastWeek - case userStatusLastMonth - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .userStatusEmpty: - if boxed { - buffer.appendInt32(164646985) - } - - break - case .userStatusOnline(let expires): - if boxed { - buffer.appendInt32(-306628279) - } - serializeInt32(expires, buffer: buffer, boxed: false) - break - case .userStatusOffline(let wasOnline): - if boxed { - buffer.appendInt32(9203775) - } - serializeInt32(wasOnline, buffer: buffer, boxed: false) - break - case .userStatusRecently: - if boxed { - buffer.appendInt32(-496024847) - } - - break - case .userStatusLastWeek: - if boxed { - buffer.appendInt32(129960444) - } - - break - case .userStatusLastMonth: - if boxed { - buffer.appendInt32(2011940674) - } - - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .userStatusEmpty: - return ("userStatusEmpty", []) - case .userStatusOnline(let expires): - return ("userStatusOnline", [("expires", expires)]) - case .userStatusOffline(let wasOnline): - return ("userStatusOffline", [("wasOnline", wasOnline)]) - case .userStatusRecently: - return ("userStatusRecently", []) - case .userStatusLastWeek: - return ("userStatusLastWeek", []) - case .userStatusLastMonth: - return ("userStatusLastMonth", []) - } - } - - public static func parse_userStatusEmpty(_ reader: BufferReader) -> UserStatus? { - return Api.UserStatus.userStatusEmpty - } - public static func parse_userStatusOnline(_ reader: BufferReader) -> UserStatus? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.UserStatus.userStatusOnline(expires: _1!) - } - else { - return nil - } - } - public static func parse_userStatusOffline(_ reader: BufferReader) -> UserStatus? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.UserStatus.userStatusOffline(wasOnline: _1!) - } - else { - return nil - } - } - public static func parse_userStatusRecently(_ reader: BufferReader) -> UserStatus? { - return Api.UserStatus.userStatusRecently - } - public static func parse_userStatusLastWeek(_ reader: BufferReader) -> UserStatus? { - return Api.UserStatus.userStatusLastWeek - } - public static func parse_userStatusLastMonth(_ reader: BufferReader) -> UserStatus? { - return Api.UserStatus.userStatusLastMonth - } - - } - public enum Folder: TypeConstructorDescription { - case folder(flags: Int32, id: Int32, title: String, photo: Api.ChatPhoto?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .folder(let flags, let id, let title, let photo): - if boxed { - buffer.appendInt32(-11252123) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - serializeString(title, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 3) != 0 {photo!.serialize(buffer, true)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .folder(let flags, let id, let title, let photo): - return ("folder", [("flags", flags), ("id", id), ("title", title), ("photo", photo)]) - } - } - - public static func parse_folder(_ reader: BufferReader) -> Folder? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: String? - _3 = parseString(reader) - var _4: Api.ChatPhoto? - if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.ChatPhoto - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.Folder.folder(flags: _1!, id: _2!, title: _3!, photo: _4) - } - else { - return nil - } - } - - } - public enum Dialog: TypeConstructorDescription { - case dialog(flags: Int32, peer: Api.Peer, topMessage: Int32, readInboxMaxId: Int32, readOutboxMaxId: Int32, unreadCount: Int32, unreadMentionsCount: Int32, notifySettings: Api.PeerNotifySettings, pts: Int32?, draft: Api.DraftMessage?, folderId: Int32?) - case dialogFolder(flags: Int32, folder: Api.Folder, peer: Api.Peer, topMessage: Int32, unreadMutedPeersCount: Int32, unreadUnmutedPeersCount: Int32, unreadMutedMessagesCount: Int32, unreadUnmutedMessagesCount: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .dialog(let flags, let peer, let topMessage, let readInboxMaxId, let readOutboxMaxId, let unreadCount, let unreadMentionsCount, let notifySettings, let pts, let draft, let folderId): - if boxed { - buffer.appendInt32(739712882) - } - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - serializeInt32(topMessage, buffer: buffer, boxed: false) - serializeInt32(readInboxMaxId, buffer: buffer, boxed: false) - serializeInt32(readOutboxMaxId, buffer: buffer, boxed: false) - serializeInt32(unreadCount, buffer: buffer, boxed: false) - serializeInt32(unreadMentionsCount, buffer: buffer, boxed: false) - notifySettings.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(pts!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {draft!.serialize(buffer, true)} - if Int(flags) & Int(1 << 4) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} - break - case .dialogFolder(let flags, let folder, let peer, let topMessage, let unreadMutedPeersCount, let unreadUnmutedPeersCount, let unreadMutedMessagesCount, let unreadUnmutedMessagesCount): - if boxed { - buffer.appendInt32(1908216652) - } - serializeInt32(flags, buffer: buffer, boxed: false) - folder.serialize(buffer, true) - peer.serialize(buffer, true) - serializeInt32(topMessage, buffer: buffer, boxed: false) - serializeInt32(unreadMutedPeersCount, buffer: buffer, boxed: false) - serializeInt32(unreadUnmutedPeersCount, buffer: buffer, boxed: false) - serializeInt32(unreadMutedMessagesCount, buffer: buffer, boxed: false) - serializeInt32(unreadUnmutedMessagesCount, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .dialog(let flags, let peer, let topMessage, let readInboxMaxId, let readOutboxMaxId, let unreadCount, let unreadMentionsCount, let notifySettings, let pts, let draft, let folderId): - return ("dialog", [("flags", flags), ("peer", peer), ("topMessage", topMessage), ("readInboxMaxId", readInboxMaxId), ("readOutboxMaxId", readOutboxMaxId), ("unreadCount", unreadCount), ("unreadMentionsCount", unreadMentionsCount), ("notifySettings", notifySettings), ("pts", pts), ("draft", draft), ("folderId", folderId)]) - case .dialogFolder(let flags, let folder, let peer, let topMessage, let unreadMutedPeersCount, let unreadUnmutedPeersCount, let unreadMutedMessagesCount, let unreadUnmutedMessagesCount): - return ("dialogFolder", [("flags", flags), ("folder", folder), ("peer", peer), ("topMessage", topMessage), ("unreadMutedPeersCount", unreadMutedPeersCount), ("unreadUnmutedPeersCount", unreadUnmutedPeersCount), ("unreadMutedMessagesCount", unreadMutedMessagesCount), ("unreadUnmutedMessagesCount", unreadUnmutedMessagesCount)]) - } - } - - public static func parse_dialog(_ reader: BufferReader) -> Dialog? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.Peer? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - var _6: Int32? - _6 = reader.readInt32() - var _7: Int32? - _7 = reader.readInt32() - var _8: Api.PeerNotifySettings? - if let signature = reader.readInt32() { - _8 = Api.parse(reader, signature: signature) as? Api.PeerNotifySettings - } - var _9: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_9 = reader.readInt32() } - var _10: Api.DraftMessage? - if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { - _10 = Api.parse(reader, signature: signature) as? Api.DraftMessage - } } - var _11: Int32? - if Int(_1!) & Int(1 << 4) != 0 {_11 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = _8 != nil - let _c9 = (Int(_1!) & Int(1 << 0) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 1) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 4) == 0) || _11 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { - return Api.Dialog.dialog(flags: _1!, peer: _2!, topMessage: _3!, readInboxMaxId: _4!, readOutboxMaxId: _5!, unreadCount: _6!, unreadMentionsCount: _7!, notifySettings: _8!, pts: _9, draft: _10, folderId: _11) - } - else { - return nil - } - } - public static func parse_dialogFolder(_ reader: BufferReader) -> Dialog? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.Folder? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Folder - } - var _3: Api.Peer? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - var _6: Int32? - _6 = reader.readInt32() - var _7: Int32? - _7 = reader.readInt32() - var _8: Int32? - _8 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = _8 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { - return Api.Dialog.dialogFolder(flags: _1!, folder: _2!, peer: _3!, topMessage: _4!, unreadMutedPeersCount: _5!, unreadUnmutedPeersCount: _6!, unreadMutedMessagesCount: _7!, unreadUnmutedMessagesCount: _8!) - } - else { - return nil - } - } - - } - public enum SendMessageAction: TypeConstructorDescription { - case sendMessageTypingAction - case sendMessageCancelAction - case sendMessageRecordVideoAction - case sendMessageUploadVideoAction(progress: Int32) - case sendMessageRecordAudioAction - case sendMessageUploadAudioAction(progress: Int32) - case sendMessageUploadPhotoAction(progress: Int32) - case sendMessageUploadDocumentAction(progress: Int32) - case sendMessageGeoLocationAction - case sendMessageChooseContactAction - case sendMessageGamePlayAction - case sendMessageRecordRoundAction - case sendMessageUploadRoundAction(progress: Int32) - case speakingInGroupCallAction - case sendMessageHistoryImportAction(progress: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .sendMessageTypingAction: - if boxed { - buffer.appendInt32(381645902) - } - - break - case .sendMessageCancelAction: - if boxed { - buffer.appendInt32(-44119819) - } - - break - case .sendMessageRecordVideoAction: - if boxed { - buffer.appendInt32(-1584933265) - } - - break - case .sendMessageUploadVideoAction(let progress): - if boxed { - buffer.appendInt32(-378127636) - } - serializeInt32(progress, buffer: buffer, boxed: false) - break - case .sendMessageRecordAudioAction: - if boxed { - buffer.appendInt32(-718310409) - } - - break - case .sendMessageUploadAudioAction(let progress): - if boxed { - buffer.appendInt32(-212740181) - } - serializeInt32(progress, buffer: buffer, boxed: false) - break - case .sendMessageUploadPhotoAction(let progress): - if boxed { - buffer.appendInt32(-774682074) - } - serializeInt32(progress, buffer: buffer, boxed: false) - break - case .sendMessageUploadDocumentAction(let progress): - if boxed { - buffer.appendInt32(-1441998364) - } - serializeInt32(progress, buffer: buffer, boxed: false) - break - case .sendMessageGeoLocationAction: - if boxed { - buffer.appendInt32(393186209) - } - - break - case .sendMessageChooseContactAction: - if boxed { - buffer.appendInt32(1653390447) - } - - break - case .sendMessageGamePlayAction: - if boxed { - buffer.appendInt32(-580219064) - } - - break - case .sendMessageRecordRoundAction: - if boxed { - buffer.appendInt32(-1997373508) - } - - break - case .sendMessageUploadRoundAction(let progress): - if boxed { - buffer.appendInt32(608050278) - } - serializeInt32(progress, buffer: buffer, boxed: false) - break - case .speakingInGroupCallAction: - if boxed { - buffer.appendInt32(-651419003) - } - - break - case .sendMessageHistoryImportAction(let progress): - if boxed { - buffer.appendInt32(-606432698) - } - serializeInt32(progress, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .sendMessageTypingAction: - return ("sendMessageTypingAction", []) - case .sendMessageCancelAction: - return ("sendMessageCancelAction", []) - case .sendMessageRecordVideoAction: - return ("sendMessageRecordVideoAction", []) - case .sendMessageUploadVideoAction(let progress): - return ("sendMessageUploadVideoAction", [("progress", progress)]) - case .sendMessageRecordAudioAction: - return ("sendMessageRecordAudioAction", []) - case .sendMessageUploadAudioAction(let progress): - return ("sendMessageUploadAudioAction", [("progress", progress)]) - case .sendMessageUploadPhotoAction(let progress): - return ("sendMessageUploadPhotoAction", [("progress", progress)]) - case .sendMessageUploadDocumentAction(let progress): - return ("sendMessageUploadDocumentAction", [("progress", progress)]) - case .sendMessageGeoLocationAction: - return ("sendMessageGeoLocationAction", []) - case .sendMessageChooseContactAction: - return ("sendMessageChooseContactAction", []) - case .sendMessageGamePlayAction: - return ("sendMessageGamePlayAction", []) - case .sendMessageRecordRoundAction: - return ("sendMessageRecordRoundAction", []) - case .sendMessageUploadRoundAction(let progress): - return ("sendMessageUploadRoundAction", [("progress", progress)]) - case .speakingInGroupCallAction: - return ("speakingInGroupCallAction", []) - case .sendMessageHistoryImportAction(let progress): - return ("sendMessageHistoryImportAction", [("progress", progress)]) - } - } - - public static func parse_sendMessageTypingAction(_ reader: BufferReader) -> SendMessageAction? { - return Api.SendMessageAction.sendMessageTypingAction - } - public static func parse_sendMessageCancelAction(_ reader: BufferReader) -> SendMessageAction? { - return Api.SendMessageAction.sendMessageCancelAction - } - public static func parse_sendMessageRecordVideoAction(_ reader: BufferReader) -> SendMessageAction? { - return Api.SendMessageAction.sendMessageRecordVideoAction - } - public static func parse_sendMessageUploadVideoAction(_ reader: BufferReader) -> SendMessageAction? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.SendMessageAction.sendMessageUploadVideoAction(progress: _1!) - } - else { - return nil - } - } - public static func parse_sendMessageRecordAudioAction(_ reader: BufferReader) -> SendMessageAction? { - return Api.SendMessageAction.sendMessageRecordAudioAction - } - public static func parse_sendMessageUploadAudioAction(_ reader: BufferReader) -> SendMessageAction? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.SendMessageAction.sendMessageUploadAudioAction(progress: _1!) - } - else { - return nil - } - } - public static func parse_sendMessageUploadPhotoAction(_ reader: BufferReader) -> SendMessageAction? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.SendMessageAction.sendMessageUploadPhotoAction(progress: _1!) - } - else { - return nil - } - } - public static func parse_sendMessageUploadDocumentAction(_ reader: BufferReader) -> SendMessageAction? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.SendMessageAction.sendMessageUploadDocumentAction(progress: _1!) - } - else { - return nil - } - } - public static func parse_sendMessageGeoLocationAction(_ reader: BufferReader) -> SendMessageAction? { - return Api.SendMessageAction.sendMessageGeoLocationAction - } - public static func parse_sendMessageChooseContactAction(_ reader: BufferReader) -> SendMessageAction? { - return Api.SendMessageAction.sendMessageChooseContactAction - } - public static func parse_sendMessageGamePlayAction(_ reader: BufferReader) -> SendMessageAction? { - return Api.SendMessageAction.sendMessageGamePlayAction - } - public static func parse_sendMessageRecordRoundAction(_ reader: BufferReader) -> SendMessageAction? { - return Api.SendMessageAction.sendMessageRecordRoundAction - } - public static func parse_sendMessageUploadRoundAction(_ reader: BufferReader) -> SendMessageAction? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.SendMessageAction.sendMessageUploadRoundAction(progress: _1!) - } - else { - return nil - } - } - public static func parse_speakingInGroupCallAction(_ reader: BufferReader) -> SendMessageAction? { - return Api.SendMessageAction.speakingInGroupCallAction - } - public static func parse_sendMessageHistoryImportAction(_ reader: BufferReader) -> SendMessageAction? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.SendMessageAction.sendMessageHistoryImportAction(progress: _1!) - } - else { - return nil - } - } - - } - public enum PrivacyKey: TypeConstructorDescription { - case privacyKeyStatusTimestamp - case privacyKeyChatInvite - case privacyKeyPhoneCall - case privacyKeyPhoneP2P - case privacyKeyForwards - case privacyKeyProfilePhoto - case privacyKeyPhoneNumber - case privacyKeyAddedByPhone - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .privacyKeyStatusTimestamp: - if boxed { - buffer.appendInt32(-1137792208) - } - - break - case .privacyKeyChatInvite: - if boxed { - buffer.appendInt32(1343122938) - } - - break - case .privacyKeyPhoneCall: - if boxed { - buffer.appendInt32(1030105979) - } - - break - case .privacyKeyPhoneP2P: - if boxed { - buffer.appendInt32(961092808) - } - - break - case .privacyKeyForwards: - if boxed { - buffer.appendInt32(1777096355) - } - - break - case .privacyKeyProfilePhoto: - if boxed { - buffer.appendInt32(-1777000467) - } - - break - case .privacyKeyPhoneNumber: - if boxed { - buffer.appendInt32(-778378131) - } - - break - case .privacyKeyAddedByPhone: - if boxed { - buffer.appendInt32(1124062251) - } - - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .privacyKeyStatusTimestamp: - return ("privacyKeyStatusTimestamp", []) - case .privacyKeyChatInvite: - return ("privacyKeyChatInvite", []) - case .privacyKeyPhoneCall: - return ("privacyKeyPhoneCall", []) - case .privacyKeyPhoneP2P: - return ("privacyKeyPhoneP2P", []) - case .privacyKeyForwards: - return ("privacyKeyForwards", []) - case .privacyKeyProfilePhoto: - return ("privacyKeyProfilePhoto", []) - case .privacyKeyPhoneNumber: - return ("privacyKeyPhoneNumber", []) - case .privacyKeyAddedByPhone: - return ("privacyKeyAddedByPhone", []) - } - } - - public static func parse_privacyKeyStatusTimestamp(_ reader: BufferReader) -> PrivacyKey? { - return Api.PrivacyKey.privacyKeyStatusTimestamp - } - public static func parse_privacyKeyChatInvite(_ reader: BufferReader) -> PrivacyKey? { - return Api.PrivacyKey.privacyKeyChatInvite - } - public static func parse_privacyKeyPhoneCall(_ reader: BufferReader) -> PrivacyKey? { - return Api.PrivacyKey.privacyKeyPhoneCall - } - public static func parse_privacyKeyPhoneP2P(_ reader: BufferReader) -> PrivacyKey? { - return Api.PrivacyKey.privacyKeyPhoneP2P - } - public static func parse_privacyKeyForwards(_ reader: BufferReader) -> PrivacyKey? { - return Api.PrivacyKey.privacyKeyForwards - } - public static func parse_privacyKeyProfilePhoto(_ reader: BufferReader) -> PrivacyKey? { - return Api.PrivacyKey.privacyKeyProfilePhoto - } - public static func parse_privacyKeyPhoneNumber(_ reader: BufferReader) -> PrivacyKey? { - return Api.PrivacyKey.privacyKeyPhoneNumber - } - public static func parse_privacyKeyAddedByPhone(_ reader: BufferReader) -> PrivacyKey? { - return Api.PrivacyKey.privacyKeyAddedByPhone - } - - } - public enum Update: TypeConstructorDescription { - case updateNewMessage(message: Api.Message, pts: Int32, ptsCount: Int32) - case updateMessageID(id: Int32, randomId: Int64) - case updateDeleteMessages(messages: [Int32], pts: Int32, ptsCount: Int32) - case updateUserTyping(userId: Int32, action: Api.SendMessageAction) - case updateChatUserTyping(chatId: Int32, userId: Int32, action: Api.SendMessageAction) - case updateChatParticipants(participants: Api.ChatParticipants) - case updateUserStatus(userId: Int32, status: Api.UserStatus) - case updateUserName(userId: Int32, firstName: String, lastName: String, username: String) - case updateUserPhoto(userId: Int32, date: Int32, photo: Api.UserProfilePhoto, previous: Api.Bool) - case updateNewEncryptedMessage(message: Api.EncryptedMessage, qts: Int32) - case updateEncryptedChatTyping(chatId: Int32) - case updateEncryption(chat: Api.EncryptedChat, date: Int32) - case updateEncryptedMessagesRead(chatId: Int32, maxDate: Int32, date: Int32) - case updateChatParticipantAdd(chatId: Int32, userId: Int32, inviterId: Int32, date: Int32, version: Int32) - case updateChatParticipantDelete(chatId: Int32, userId: Int32, version: Int32) - case updateDcOptions(dcOptions: [Api.DcOption]) - case updateNotifySettings(peer: Api.NotifyPeer, notifySettings: Api.PeerNotifySettings) - case updateServiceNotification(flags: Int32, inboxDate: Int32?, type: String, message: String, media: Api.MessageMedia, entities: [Api.MessageEntity]) - case updatePrivacy(key: Api.PrivacyKey, rules: [Api.PrivacyRule]) - case updateUserPhone(userId: Int32, phone: String) - case updateReadHistoryInbox(flags: Int32, folderId: Int32?, peer: Api.Peer, maxId: Int32, stillUnreadCount: Int32, pts: Int32, ptsCount: Int32) - case updateReadHistoryOutbox(peer: Api.Peer, maxId: Int32, pts: Int32, ptsCount: Int32) - case updateWebPage(webpage: Api.WebPage, pts: Int32, ptsCount: Int32) - case updateReadMessagesContents(messages: [Int32], pts: Int32, ptsCount: Int32) - case updateChannelTooLong(flags: Int32, channelId: Int32, pts: Int32?) - case updateChannel(channelId: Int32) - case updateNewChannelMessage(message: Api.Message, pts: Int32, ptsCount: Int32) - case updateReadChannelInbox(flags: Int32, folderId: Int32?, channelId: Int32, maxId: Int32, stillUnreadCount: Int32, pts: Int32) - case updateDeleteChannelMessages(channelId: Int32, messages: [Int32], pts: Int32, ptsCount: Int32) - case updateChannelMessageViews(channelId: Int32, id: Int32, views: Int32) - case updateChatParticipantAdmin(chatId: Int32, userId: Int32, isAdmin: Api.Bool, version: Int32) - case updateNewStickerSet(stickerset: Api.messages.StickerSet) - case updateStickerSetsOrder(flags: Int32, order: [Int64]) - case updateStickerSets - case updateSavedGifs - case updateBotInlineQuery(flags: Int32, queryId: Int64, userId: Int32, query: String, geo: Api.GeoPoint?, peerType: Api.InlineQueryPeerType?, offset: String) - case updateBotInlineSend(flags: Int32, userId: Int32, query: String, geo: Api.GeoPoint?, id: String, msgId: Api.InputBotInlineMessageID?) - case updateEditChannelMessage(message: Api.Message, pts: Int32, ptsCount: Int32) - case updateBotCallbackQuery(flags: Int32, queryId: Int64, userId: Int32, peer: Api.Peer, msgId: Int32, chatInstance: Int64, data: Buffer?, gameShortName: String?) - case updateEditMessage(message: Api.Message, pts: Int32, ptsCount: Int32) - case updateInlineBotCallbackQuery(flags: Int32, queryId: Int64, userId: Int32, msgId: Api.InputBotInlineMessageID, chatInstance: Int64, data: Buffer?, gameShortName: String?) - case updateReadChannelOutbox(channelId: Int32, maxId: Int32) - case updateDraftMessage(peer: Api.Peer, draft: Api.DraftMessage) - case updateReadFeaturedStickers - case updateRecentStickers - case updateConfig - case updatePtsChanged - case updateChannelWebPage(channelId: Int32, webpage: Api.WebPage, pts: Int32, ptsCount: Int32) - case updateDialogPinned(flags: Int32, folderId: Int32?, peer: Api.DialogPeer) - case updatePinnedDialogs(flags: Int32, folderId: Int32?, order: [Api.DialogPeer]?) - case updateBotWebhookJSON(data: Api.DataJSON) - case updateBotWebhookJSONQuery(queryId: Int64, data: Api.DataJSON, timeout: Int32) - case updateBotShippingQuery(queryId: Int64, userId: Int32, payload: Buffer, shippingAddress: Api.PostAddress) - case updateBotPrecheckoutQuery(flags: Int32, queryId: Int64, userId: Int32, payload: Buffer, info: Api.PaymentRequestedInfo?, shippingOptionId: String?, currency: String, totalAmount: Int64) - case updatePhoneCall(phoneCall: Api.PhoneCall) - case updateLangPackTooLong(langCode: String) - case updateLangPack(difference: Api.LangPackDifference) - case updateFavedStickers - case updateChannelReadMessagesContents(channelId: Int32, messages: [Int32]) - case updateContactsReset - case updateChannelAvailableMessages(channelId: Int32, availableMinId: Int32) - case updateDialogUnreadMark(flags: Int32, peer: Api.DialogPeer) - case updateMessagePoll(flags: Int32, pollId: Int64, poll: Api.Poll?, results: Api.PollResults) - case updateChatDefaultBannedRights(peer: Api.Peer, defaultBannedRights: Api.ChatBannedRights, version: Int32) - case updateFolderPeers(folderPeers: [Api.FolderPeer], pts: Int32, ptsCount: Int32) - case updatePeerSettings(peer: Api.Peer, settings: Api.PeerSettings) - case updatePeerLocated(peers: [Api.PeerLocated]) - case updateNewScheduledMessage(message: Api.Message) - case updateDeleteScheduledMessages(peer: Api.Peer, messages: [Int32]) - case updateTheme(theme: Api.Theme) - case updateGeoLiveViewed(peer: Api.Peer, msgId: Int32) - case updateLoginToken - case updateMessagePollVote(pollId: Int64, userId: Int32, options: [Buffer]) - case updateDialogFilter(flags: Int32, id: Int32, filter: Api.DialogFilter?) - case updateDialogFilterOrder(order: [Int32]) - case updateDialogFilters - case updatePhoneCallSignalingData(phoneCallId: Int64, data: Buffer) - case updateChannelParticipant(flags: Int32, channelId: Int32, date: Int32, userId: Int32, prevParticipant: Api.ChannelParticipant?, newParticipant: Api.ChannelParticipant?, qts: Int32) - case updateChannelMessageForwards(channelId: Int32, id: Int32, forwards: Int32) - case updateReadChannelDiscussionInbox(flags: Int32, channelId: Int32, topMsgId: Int32, readMaxId: Int32, broadcastId: Int32?, broadcastPost: Int32?) - case updateReadChannelDiscussionOutbox(channelId: Int32, topMsgId: Int32, readMaxId: Int32) - case updatePeerBlocked(peerId: Api.Peer, blocked: Api.Bool) - case updateChannelUserTyping(flags: Int32, channelId: Int32, topMsgId: Int32?, userId: Int32, action: Api.SendMessageAction) - case updatePinnedMessages(flags: Int32, peer: Api.Peer, messages: [Int32], pts: Int32, ptsCount: Int32) - case updatePinnedChannelMessages(flags: Int32, channelId: Int32, messages: [Int32], pts: Int32, ptsCount: Int32) - case updateChat(chatId: Int32) - case updateGroupCallParticipants(call: Api.InputGroupCall, participants: [Api.GroupCallParticipant], version: Int32) - case updateGroupCall(chatId: Int32, call: Api.GroupCall) - case updatePeerHistoryTTL(flags: Int32, peer: Api.Peer, ttl: Api.PeerHistoryTTL?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .updateNewMessage(let message, let pts, let ptsCount): - if boxed { - buffer.appendInt32(522914557) - } - message.serialize(buffer, true) - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(ptsCount, buffer: buffer, boxed: false) - break - case .updateMessageID(let id, let randomId): - if boxed { - buffer.appendInt32(1318109142) - } - serializeInt32(id, buffer: buffer, boxed: false) - serializeInt64(randomId, buffer: buffer, boxed: false) - break - case .updateDeleteMessages(let messages, let pts, let ptsCount): - if boxed { - buffer.appendInt32(-1576161051) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(messages.count)) - for item in messages { - serializeInt32(item, buffer: buffer, boxed: false) - } - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(ptsCount, buffer: buffer, boxed: false) - break - case .updateUserTyping(let userId, let action): - if boxed { - buffer.appendInt32(1548249383) - } - serializeInt32(userId, buffer: buffer, boxed: false) - action.serialize(buffer, true) - break - case .updateChatUserTyping(let chatId, let userId, let action): - if boxed { - buffer.appendInt32(-1704596961) - } - serializeInt32(chatId, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - action.serialize(buffer, true) - break - case .updateChatParticipants(let participants): - if boxed { - buffer.appendInt32(125178264) - } - participants.serialize(buffer, true) - break - case .updateUserStatus(let userId, let status): - if boxed { - buffer.appendInt32(469489699) - } - serializeInt32(userId, buffer: buffer, boxed: false) - status.serialize(buffer, true) - break - case .updateUserName(let userId, let firstName, let lastName, let username): - if boxed { - buffer.appendInt32(-1489818765) - } - serializeInt32(userId, buffer: buffer, boxed: false) - serializeString(firstName, buffer: buffer, boxed: false) - serializeString(lastName, buffer: buffer, boxed: false) - serializeString(username, buffer: buffer, boxed: false) - break - case .updateUserPhoto(let userId, let date, let photo, let previous): - if boxed { - buffer.appendInt32(-1791935732) - } - serializeInt32(userId, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - photo.serialize(buffer, true) - previous.serialize(buffer, true) - break - case .updateNewEncryptedMessage(let message, let qts): - if boxed { - buffer.appendInt32(314359194) - } - message.serialize(buffer, true) - serializeInt32(qts, buffer: buffer, boxed: false) - break - case .updateEncryptedChatTyping(let chatId): - if boxed { - buffer.appendInt32(386986326) - } - serializeInt32(chatId, buffer: buffer, boxed: false) - break - case .updateEncryption(let chat, let date): - if boxed { - buffer.appendInt32(-1264392051) - } - chat.serialize(buffer, true) - serializeInt32(date, buffer: buffer, boxed: false) - break - case .updateEncryptedMessagesRead(let chatId, let maxDate, let date): - if boxed { - buffer.appendInt32(956179895) - } - serializeInt32(chatId, buffer: buffer, boxed: false) - serializeInt32(maxDate, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - break - case .updateChatParticipantAdd(let chatId, let userId, let inviterId, let date, let version): - if boxed { - buffer.appendInt32(-364179876) - } - serializeInt32(chatId, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - serializeInt32(inviterId, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - serializeInt32(version, buffer: buffer, boxed: false) - break - case .updateChatParticipantDelete(let chatId, let userId, let version): - if boxed { - buffer.appendInt32(1851755554) - } - serializeInt32(chatId, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - serializeInt32(version, buffer: buffer, boxed: false) - break - case .updateDcOptions(let dcOptions): - if boxed { - buffer.appendInt32(-1906403213) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(dcOptions.count)) - for item in dcOptions { - item.serialize(buffer, true) - } - break - case .updateNotifySettings(let peer, let notifySettings): - if boxed { - buffer.appendInt32(-1094555409) - } - peer.serialize(buffer, true) - notifySettings.serialize(buffer, true) - break - case .updateServiceNotification(let flags, let inboxDate, let type, let message, let media, let entities): - if boxed { - buffer.appendInt32(-337352679) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(inboxDate!, buffer: buffer, boxed: false)} - serializeString(type, buffer: buffer, boxed: false) - serializeString(message, buffer: buffer, boxed: false) - media.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities.count)) - for item in entities { - item.serialize(buffer, true) - } - break - case .updatePrivacy(let key, let rules): - if boxed { - buffer.appendInt32(-298113238) - } - key.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(rules.count)) - for item in rules { - item.serialize(buffer, true) - } - break - case .updateUserPhone(let userId, let phone): - if boxed { - buffer.appendInt32(314130811) - } - serializeInt32(userId, buffer: buffer, boxed: false) - serializeString(phone, buffer: buffer, boxed: false) - break - case .updateReadHistoryInbox(let flags, let folderId, let peer, let maxId, let stillUnreadCount, let pts, let ptsCount): - if boxed { - buffer.appendInt32(-1667805217) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} - peer.serialize(buffer, true) - serializeInt32(maxId, buffer: buffer, boxed: false) - serializeInt32(stillUnreadCount, buffer: buffer, boxed: false) - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(ptsCount, buffer: buffer, boxed: false) - break - case .updateReadHistoryOutbox(let peer, let maxId, let pts, let ptsCount): - if boxed { - buffer.appendInt32(791617983) - } - peer.serialize(buffer, true) - serializeInt32(maxId, buffer: buffer, boxed: false) - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(ptsCount, buffer: buffer, boxed: false) - break - case .updateWebPage(let webpage, let pts, let ptsCount): - if boxed { - buffer.appendInt32(2139689491) - } - webpage.serialize(buffer, true) - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(ptsCount, buffer: buffer, boxed: false) - break - case .updateReadMessagesContents(let messages, let pts, let ptsCount): - if boxed { - buffer.appendInt32(1757493555) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(messages.count)) - for item in messages { - serializeInt32(item, buffer: buffer, boxed: false) - } - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(ptsCount, buffer: buffer, boxed: false) - break - case .updateChannelTooLong(let flags, let channelId, let pts): - if boxed { - buffer.appendInt32(-352032773) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(channelId, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(pts!, buffer: buffer, boxed: false)} - break - case .updateChannel(let channelId): - if boxed { - buffer.appendInt32(-1227598250) - } - serializeInt32(channelId, buffer: buffer, boxed: false) - break - case .updateNewChannelMessage(let message, let pts, let ptsCount): - if boxed { - buffer.appendInt32(1656358105) - } - message.serialize(buffer, true) - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(ptsCount, buffer: buffer, boxed: false) - break - case .updateReadChannelInbox(let flags, let folderId, let channelId, let maxId, let stillUnreadCount, let pts): - if boxed { - buffer.appendInt32(856380452) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} - serializeInt32(channelId, buffer: buffer, boxed: false) - serializeInt32(maxId, buffer: buffer, boxed: false) - serializeInt32(stillUnreadCount, buffer: buffer, boxed: false) - serializeInt32(pts, buffer: buffer, boxed: false) - break - case .updateDeleteChannelMessages(let channelId, let messages, let pts, let ptsCount): - if boxed { - buffer.appendInt32(-1015733815) - } - serializeInt32(channelId, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(messages.count)) - for item in messages { - serializeInt32(item, buffer: buffer, boxed: false) - } - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(ptsCount, buffer: buffer, boxed: false) - break - case .updateChannelMessageViews(let channelId, let id, let views): - if boxed { - buffer.appendInt32(-1734268085) - } - serializeInt32(channelId, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - serializeInt32(views, buffer: buffer, boxed: false) - break - case .updateChatParticipantAdmin(let chatId, let userId, let isAdmin, let version): - if boxed { - buffer.appendInt32(-1232070311) - } - serializeInt32(chatId, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - isAdmin.serialize(buffer, true) - serializeInt32(version, buffer: buffer, boxed: false) - break - case .updateNewStickerSet(let stickerset): - if boxed { - buffer.appendInt32(1753886890) - } - stickerset.serialize(buffer, true) - break - case .updateStickerSetsOrder(let flags, let order): - if boxed { - buffer.appendInt32(196268545) - } - serializeInt32(flags, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(order.count)) - for item in order { - serializeInt64(item, buffer: buffer, boxed: false) - } - break - case .updateStickerSets: - if boxed { - buffer.appendInt32(1135492588) - } - - break - case .updateSavedGifs: - if boxed { - buffer.appendInt32(-1821035490) - } - - break - case .updateBotInlineQuery(let flags, let queryId, let userId, let query, let geo, let peerType, let offset): - if boxed { - buffer.appendInt32(1059076315) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(queryId, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - serializeString(query, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {geo!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {peerType!.serialize(buffer, true)} - serializeString(offset, buffer: buffer, boxed: false) - break - case .updateBotInlineSend(let flags, let userId, let query, let geo, let id, let msgId): - if boxed { - buffer.appendInt32(239663460) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - serializeString(query, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {geo!.serialize(buffer, true)} - serializeString(id, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {msgId!.serialize(buffer, true)} - break - case .updateEditChannelMessage(let message, let pts, let ptsCount): - if boxed { - buffer.appendInt32(457133559) - } - message.serialize(buffer, true) - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(ptsCount, buffer: buffer, boxed: false) - break - case .updateBotCallbackQuery(let flags, let queryId, let userId, let peer, let msgId, let chatInstance, let data, let gameShortName): - if boxed { - buffer.appendInt32(-415938591) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(queryId, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - serializeInt32(msgId, buffer: buffer, boxed: false) - serializeInt64(chatInstance, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeBytes(data!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeString(gameShortName!, buffer: buffer, boxed: false)} - break - case .updateEditMessage(let message, let pts, let ptsCount): - if boxed { - buffer.appendInt32(-469536605) - } - message.serialize(buffer, true) - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(ptsCount, buffer: buffer, boxed: false) - break - case .updateInlineBotCallbackQuery(let flags, let queryId, let userId, let msgId, let chatInstance, let data, let gameShortName): - if boxed { - buffer.appendInt32(-103646630) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(queryId, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - msgId.serialize(buffer, true) - serializeInt64(chatInstance, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeBytes(data!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeString(gameShortName!, buffer: buffer, boxed: false)} - break - case .updateReadChannelOutbox(let channelId, let maxId): - if boxed { - buffer.appendInt32(634833351) - } - serializeInt32(channelId, buffer: buffer, boxed: false) - serializeInt32(maxId, buffer: buffer, boxed: false) - break - case .updateDraftMessage(let peer, let draft): - if boxed { - buffer.appendInt32(-299124375) - } - peer.serialize(buffer, true) - draft.serialize(buffer, true) - break - case .updateReadFeaturedStickers: - if boxed { - buffer.appendInt32(1461528386) - } - - break - case .updateRecentStickers: - if boxed { - buffer.appendInt32(-1706939360) - } - - break - case .updateConfig: - if boxed { - buffer.appendInt32(-1574314746) - } - - break - case .updatePtsChanged: - if boxed { - buffer.appendInt32(861169551) - } - - break - case .updateChannelWebPage(let channelId, let webpage, let pts, let ptsCount): - if boxed { - buffer.appendInt32(1081547008) - } - serializeInt32(channelId, buffer: buffer, boxed: false) - webpage.serialize(buffer, true) - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(ptsCount, buffer: buffer, boxed: false) - break - case .updateDialogPinned(let flags, let folderId, let peer): - if boxed { - buffer.appendInt32(1852826908) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} - peer.serialize(buffer, true) - break - case .updatePinnedDialogs(let flags, let folderId, let order): - if boxed { - buffer.appendInt32(-99664734) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 0) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(order!.count)) - for item in order! { - item.serialize(buffer, true) - }} - break - case .updateBotWebhookJSON(let data): - if boxed { - buffer.appendInt32(-2095595325) - } - data.serialize(buffer, true) - break - case .updateBotWebhookJSONQuery(let queryId, let data, let timeout): - if boxed { - buffer.appendInt32(-1684914010) - } - serializeInt64(queryId, buffer: buffer, boxed: false) - data.serialize(buffer, true) - serializeInt32(timeout, buffer: buffer, boxed: false) - break - case .updateBotShippingQuery(let queryId, let userId, let payload, let shippingAddress): - if boxed { - buffer.appendInt32(-523384512) - } - serializeInt64(queryId, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - serializeBytes(payload, buffer: buffer, boxed: false) - shippingAddress.serialize(buffer, true) - break - case .updateBotPrecheckoutQuery(let flags, let queryId, let userId, let payload, let info, let shippingOptionId, let currency, let totalAmount): - if boxed { - buffer.appendInt32(1563376297) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(queryId, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - serializeBytes(payload, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {info!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {serializeString(shippingOptionId!, buffer: buffer, boxed: false)} - serializeString(currency, buffer: buffer, boxed: false) - serializeInt64(totalAmount, buffer: buffer, boxed: false) - break - case .updatePhoneCall(let phoneCall): - if boxed { - buffer.appendInt32(-1425052898) - } - phoneCall.serialize(buffer, true) - break - case .updateLangPackTooLong(let langCode): - if boxed { - buffer.appendInt32(1180041828) - } - serializeString(langCode, buffer: buffer, boxed: false) - break - case .updateLangPack(let difference): - if boxed { - buffer.appendInt32(1442983757) - } - difference.serialize(buffer, true) - break - case .updateFavedStickers: - if boxed { - buffer.appendInt32(-451831443) - } - - break - case .updateChannelReadMessagesContents(let channelId, let messages): - if boxed { - buffer.appendInt32(-1987495099) - } - serializeInt32(channelId, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(messages.count)) - for item in messages { - serializeInt32(item, buffer: buffer, boxed: false) - } - break - case .updateContactsReset: - if boxed { - buffer.appendInt32(1887741886) - } - - break - case .updateChannelAvailableMessages(let channelId, let availableMinId): - if boxed { - buffer.appendInt32(1893427255) - } - serializeInt32(channelId, buffer: buffer, boxed: false) - serializeInt32(availableMinId, buffer: buffer, boxed: false) - break - case .updateDialogUnreadMark(let flags, let peer): - if boxed { - buffer.appendInt32(-513517117) - } - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - break - case .updateMessagePoll(let flags, let pollId, let poll, let results): - if boxed { - buffer.appendInt32(-1398708869) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(pollId, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {poll!.serialize(buffer, true)} - results.serialize(buffer, true) - break - case .updateChatDefaultBannedRights(let peer, let defaultBannedRights, let version): - if boxed { - buffer.appendInt32(1421875280) - } - peer.serialize(buffer, true) - defaultBannedRights.serialize(buffer, true) - serializeInt32(version, buffer: buffer, boxed: false) - break - case .updateFolderPeers(let folderPeers, let pts, let ptsCount): - if boxed { - buffer.appendInt32(422972864) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(folderPeers.count)) - for item in folderPeers { - item.serialize(buffer, true) - } - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(ptsCount, buffer: buffer, boxed: false) - break - case .updatePeerSettings(let peer, let settings): - if boxed { - buffer.appendInt32(1786671974) - } - peer.serialize(buffer, true) - settings.serialize(buffer, true) - break - case .updatePeerLocated(let peers): - if boxed { - buffer.appendInt32(-1263546448) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(peers.count)) - for item in peers { - item.serialize(buffer, true) - } - break - case .updateNewScheduledMessage(let message): - if boxed { - buffer.appendInt32(967122427) - } - message.serialize(buffer, true) - break - case .updateDeleteScheduledMessages(let peer, let messages): - if boxed { - buffer.appendInt32(-1870238482) - } - peer.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(messages.count)) - for item in messages { - serializeInt32(item, buffer: buffer, boxed: false) - } - break - case .updateTheme(let theme): - if boxed { - buffer.appendInt32(-2112423005) - } - theme.serialize(buffer, true) - break - case .updateGeoLiveViewed(let peer, let msgId): - if boxed { - buffer.appendInt32(-2027964103) - } - peer.serialize(buffer, true) - serializeInt32(msgId, buffer: buffer, boxed: false) - break - case .updateLoginToken: - if boxed { - buffer.appendInt32(1448076945) - } - - break - case .updateMessagePollVote(let pollId, let userId, let options): - if boxed { - buffer.appendInt32(1123585836) - } - serializeInt64(pollId, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(options.count)) - for item in options { - serializeBytes(item, buffer: buffer, boxed: false) - } - break - case .updateDialogFilter(let flags, let id, let filter): - if boxed { - buffer.appendInt32(654302845) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {filter!.serialize(buffer, true)} - break - case .updateDialogFilterOrder(let order): - if boxed { - buffer.appendInt32(-1512627963) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(order.count)) - for item in order { - serializeInt32(item, buffer: buffer, boxed: false) - } - break - case .updateDialogFilters: - if boxed { - buffer.appendInt32(889491791) - } - - break - case .updatePhoneCallSignalingData(let phoneCallId, let data): - if boxed { - buffer.appendInt32(643940105) - } - serializeInt64(phoneCallId, buffer: buffer, boxed: false) - serializeBytes(data, buffer: buffer, boxed: false) - break - case .updateChannelParticipant(let flags, let channelId, let date, let userId, let prevParticipant, let newParticipant, let qts): - if boxed { - buffer.appendInt32(1708307556) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(channelId, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {prevParticipant!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {newParticipant!.serialize(buffer, true)} - serializeInt32(qts, buffer: buffer, boxed: false) - break - case .updateChannelMessageForwards(let channelId, let id, let forwards): - if boxed { - buffer.appendInt32(1854571743) - } - serializeInt32(channelId, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - serializeInt32(forwards, buffer: buffer, boxed: false) - break - case .updateReadChannelDiscussionInbox(let flags, let channelId, let topMsgId, let readMaxId, let broadcastId, let broadcastPost): - if boxed { - buffer.appendInt32(482860628) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(channelId, buffer: buffer, boxed: false) - serializeInt32(topMsgId, buffer: buffer, boxed: false) - serializeInt32(readMaxId, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(broadcastId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(broadcastPost!, buffer: buffer, boxed: false)} - break - case .updateReadChannelDiscussionOutbox(let channelId, let topMsgId, let readMaxId): - if boxed { - buffer.appendInt32(1178116716) - } - serializeInt32(channelId, buffer: buffer, boxed: false) - serializeInt32(topMsgId, buffer: buffer, boxed: false) - serializeInt32(readMaxId, buffer: buffer, boxed: false) - break - case .updatePeerBlocked(let peerId, let blocked): - if boxed { - buffer.appendInt32(610945826) - } - peerId.serialize(buffer, true) - blocked.serialize(buffer, true) - break - case .updateChannelUserTyping(let flags, let channelId, let topMsgId, let userId, let action): - if boxed { - buffer.appendInt32(-13975905) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(channelId, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(topMsgId!, buffer: buffer, boxed: false)} - serializeInt32(userId, buffer: buffer, boxed: false) - action.serialize(buffer, true) - break - case .updatePinnedMessages(let flags, let peer, let messages, let pts, let ptsCount): - if boxed { - buffer.appendInt32(-309990731) - } - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(messages.count)) - for item in messages { - serializeInt32(item, buffer: buffer, boxed: false) - } - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(ptsCount, buffer: buffer, boxed: false) - break - case .updatePinnedChannelMessages(let flags, let channelId, let messages, let pts, let ptsCount): - if boxed { - buffer.appendInt32(-2054649973) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(channelId, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(messages.count)) - for item in messages { - serializeInt32(item, buffer: buffer, boxed: false) - } - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(ptsCount, buffer: buffer, boxed: false) - break - case .updateChat(let chatId): - if boxed { - buffer.appendInt32(321954198) - } - serializeInt32(chatId, buffer: buffer, boxed: false) - break - case .updateGroupCallParticipants(let call, let participants, let version): - if boxed { - buffer.appendInt32(-219423922) - } - call.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(participants.count)) - for item in participants { - item.serialize(buffer, true) - } - serializeInt32(version, buffer: buffer, boxed: false) - break - case .updateGroupCall(let chatId, let call): - if boxed { - buffer.appendInt32(-1537295973) - } - serializeInt32(chatId, buffer: buffer, boxed: false) - call.serialize(buffer, true) - break - case .updatePeerHistoryTTL(let flags, let peer, let ttl): - if boxed { - buffer.appendInt32(19291112) - } - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {ttl!.serialize(buffer, true)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .updateNewMessage(let message, let pts, let ptsCount): - return ("updateNewMessage", [("message", message), ("pts", pts), ("ptsCount", ptsCount)]) - case .updateMessageID(let id, let randomId): - return ("updateMessageID", [("id", id), ("randomId", randomId)]) - case .updateDeleteMessages(let messages, let pts, let ptsCount): - return ("updateDeleteMessages", [("messages", messages), ("pts", pts), ("ptsCount", ptsCount)]) - case .updateUserTyping(let userId, let action): - return ("updateUserTyping", [("userId", userId), ("action", action)]) - case .updateChatUserTyping(let chatId, let userId, let action): - return ("updateChatUserTyping", [("chatId", chatId), ("userId", userId), ("action", action)]) - case .updateChatParticipants(let participants): - return ("updateChatParticipants", [("participants", participants)]) - case .updateUserStatus(let userId, let status): - return ("updateUserStatus", [("userId", userId), ("status", status)]) - case .updateUserName(let userId, let firstName, let lastName, let username): - return ("updateUserName", [("userId", userId), ("firstName", firstName), ("lastName", lastName), ("username", username)]) - case .updateUserPhoto(let userId, let date, let photo, let previous): - return ("updateUserPhoto", [("userId", userId), ("date", date), ("photo", photo), ("previous", previous)]) - case .updateNewEncryptedMessage(let message, let qts): - return ("updateNewEncryptedMessage", [("message", message), ("qts", qts)]) - case .updateEncryptedChatTyping(let chatId): - return ("updateEncryptedChatTyping", [("chatId", chatId)]) - case .updateEncryption(let chat, let date): - return ("updateEncryption", [("chat", chat), ("date", date)]) - case .updateEncryptedMessagesRead(let chatId, let maxDate, let date): - return ("updateEncryptedMessagesRead", [("chatId", chatId), ("maxDate", maxDate), ("date", date)]) - case .updateChatParticipantAdd(let chatId, let userId, let inviterId, let date, let version): - return ("updateChatParticipantAdd", [("chatId", chatId), ("userId", userId), ("inviterId", inviterId), ("date", date), ("version", version)]) - case .updateChatParticipantDelete(let chatId, let userId, let version): - return ("updateChatParticipantDelete", [("chatId", chatId), ("userId", userId), ("version", version)]) - case .updateDcOptions(let dcOptions): - return ("updateDcOptions", [("dcOptions", dcOptions)]) - case .updateNotifySettings(let peer, let notifySettings): - return ("updateNotifySettings", [("peer", peer), ("notifySettings", notifySettings)]) - case .updateServiceNotification(let flags, let inboxDate, let type, let message, let media, let entities): - return ("updateServiceNotification", [("flags", flags), ("inboxDate", inboxDate), ("type", type), ("message", message), ("media", media), ("entities", entities)]) - case .updatePrivacy(let key, let rules): - return ("updatePrivacy", [("key", key), ("rules", rules)]) - case .updateUserPhone(let userId, let phone): - return ("updateUserPhone", [("userId", userId), ("phone", phone)]) - case .updateReadHistoryInbox(let flags, let folderId, let peer, let maxId, let stillUnreadCount, let pts, let ptsCount): - return ("updateReadHistoryInbox", [("flags", flags), ("folderId", folderId), ("peer", peer), ("maxId", maxId), ("stillUnreadCount", stillUnreadCount), ("pts", pts), ("ptsCount", ptsCount)]) - case .updateReadHistoryOutbox(let peer, let maxId, let pts, let ptsCount): - return ("updateReadHistoryOutbox", [("peer", peer), ("maxId", maxId), ("pts", pts), ("ptsCount", ptsCount)]) - case .updateWebPage(let webpage, let pts, let ptsCount): - return ("updateWebPage", [("webpage", webpage), ("pts", pts), ("ptsCount", ptsCount)]) - case .updateReadMessagesContents(let messages, let pts, let ptsCount): - return ("updateReadMessagesContents", [("messages", messages), ("pts", pts), ("ptsCount", ptsCount)]) - case .updateChannelTooLong(let flags, let channelId, let pts): - return ("updateChannelTooLong", [("flags", flags), ("channelId", channelId), ("pts", pts)]) - case .updateChannel(let channelId): - return ("updateChannel", [("channelId", channelId)]) - case .updateNewChannelMessage(let message, let pts, let ptsCount): - return ("updateNewChannelMessage", [("message", message), ("pts", pts), ("ptsCount", ptsCount)]) - case .updateReadChannelInbox(let flags, let folderId, let channelId, let maxId, let stillUnreadCount, let pts): - return ("updateReadChannelInbox", [("flags", flags), ("folderId", folderId), ("channelId", channelId), ("maxId", maxId), ("stillUnreadCount", stillUnreadCount), ("pts", pts)]) - case .updateDeleteChannelMessages(let channelId, let messages, let pts, let ptsCount): - return ("updateDeleteChannelMessages", [("channelId", channelId), ("messages", messages), ("pts", pts), ("ptsCount", ptsCount)]) - case .updateChannelMessageViews(let channelId, let id, let views): - return ("updateChannelMessageViews", [("channelId", channelId), ("id", id), ("views", views)]) - case .updateChatParticipantAdmin(let chatId, let userId, let isAdmin, let version): - return ("updateChatParticipantAdmin", [("chatId", chatId), ("userId", userId), ("isAdmin", isAdmin), ("version", version)]) - case .updateNewStickerSet(let stickerset): - return ("updateNewStickerSet", [("stickerset", stickerset)]) - case .updateStickerSetsOrder(let flags, let order): - return ("updateStickerSetsOrder", [("flags", flags), ("order", order)]) - case .updateStickerSets: - return ("updateStickerSets", []) - case .updateSavedGifs: - return ("updateSavedGifs", []) - case .updateBotInlineQuery(let flags, let queryId, let userId, let query, let geo, let peerType, let offset): - return ("updateBotInlineQuery", [("flags", flags), ("queryId", queryId), ("userId", userId), ("query", query), ("geo", geo), ("peerType", peerType), ("offset", offset)]) - case .updateBotInlineSend(let flags, let userId, let query, let geo, let id, let msgId): - return ("updateBotInlineSend", [("flags", flags), ("userId", userId), ("query", query), ("geo", geo), ("id", id), ("msgId", msgId)]) - case .updateEditChannelMessage(let message, let pts, let ptsCount): - return ("updateEditChannelMessage", [("message", message), ("pts", pts), ("ptsCount", ptsCount)]) - case .updateBotCallbackQuery(let flags, let queryId, let userId, let peer, let msgId, let chatInstance, let data, let gameShortName): - return ("updateBotCallbackQuery", [("flags", flags), ("queryId", queryId), ("userId", userId), ("peer", peer), ("msgId", msgId), ("chatInstance", chatInstance), ("data", data), ("gameShortName", gameShortName)]) - case .updateEditMessage(let message, let pts, let ptsCount): - return ("updateEditMessage", [("message", message), ("pts", pts), ("ptsCount", ptsCount)]) - case .updateInlineBotCallbackQuery(let flags, let queryId, let userId, let msgId, let chatInstance, let data, let gameShortName): - return ("updateInlineBotCallbackQuery", [("flags", flags), ("queryId", queryId), ("userId", userId), ("msgId", msgId), ("chatInstance", chatInstance), ("data", data), ("gameShortName", gameShortName)]) - case .updateReadChannelOutbox(let channelId, let maxId): - return ("updateReadChannelOutbox", [("channelId", channelId), ("maxId", maxId)]) - case .updateDraftMessage(let peer, let draft): - return ("updateDraftMessage", [("peer", peer), ("draft", draft)]) - case .updateReadFeaturedStickers: - return ("updateReadFeaturedStickers", []) - case .updateRecentStickers: - return ("updateRecentStickers", []) - case .updateConfig: - return ("updateConfig", []) - case .updatePtsChanged: - return ("updatePtsChanged", []) - case .updateChannelWebPage(let channelId, let webpage, let pts, let ptsCount): - return ("updateChannelWebPage", [("channelId", channelId), ("webpage", webpage), ("pts", pts), ("ptsCount", ptsCount)]) - case .updateDialogPinned(let flags, let folderId, let peer): - return ("updateDialogPinned", [("flags", flags), ("folderId", folderId), ("peer", peer)]) - case .updatePinnedDialogs(let flags, let folderId, let order): - return ("updatePinnedDialogs", [("flags", flags), ("folderId", folderId), ("order", order)]) - case .updateBotWebhookJSON(let data): - return ("updateBotWebhookJSON", [("data", data)]) - case .updateBotWebhookJSONQuery(let queryId, let data, let timeout): - return ("updateBotWebhookJSONQuery", [("queryId", queryId), ("data", data), ("timeout", timeout)]) - case .updateBotShippingQuery(let queryId, let userId, let payload, let shippingAddress): - return ("updateBotShippingQuery", [("queryId", queryId), ("userId", userId), ("payload", payload), ("shippingAddress", shippingAddress)]) - case .updateBotPrecheckoutQuery(let flags, let queryId, let userId, let payload, let info, let shippingOptionId, let currency, let totalAmount): - return ("updateBotPrecheckoutQuery", [("flags", flags), ("queryId", queryId), ("userId", userId), ("payload", payload), ("info", info), ("shippingOptionId", shippingOptionId), ("currency", currency), ("totalAmount", totalAmount)]) - case .updatePhoneCall(let phoneCall): - return ("updatePhoneCall", [("phoneCall", phoneCall)]) - case .updateLangPackTooLong(let langCode): - return ("updateLangPackTooLong", [("langCode", langCode)]) - case .updateLangPack(let difference): - return ("updateLangPack", [("difference", difference)]) - case .updateFavedStickers: - return ("updateFavedStickers", []) - case .updateChannelReadMessagesContents(let channelId, let messages): - return ("updateChannelReadMessagesContents", [("channelId", channelId), ("messages", messages)]) - case .updateContactsReset: - return ("updateContactsReset", []) - case .updateChannelAvailableMessages(let channelId, let availableMinId): - return ("updateChannelAvailableMessages", [("channelId", channelId), ("availableMinId", availableMinId)]) - case .updateDialogUnreadMark(let flags, let peer): - return ("updateDialogUnreadMark", [("flags", flags), ("peer", peer)]) - case .updateMessagePoll(let flags, let pollId, let poll, let results): - return ("updateMessagePoll", [("flags", flags), ("pollId", pollId), ("poll", poll), ("results", results)]) - case .updateChatDefaultBannedRights(let peer, let defaultBannedRights, let version): - return ("updateChatDefaultBannedRights", [("peer", peer), ("defaultBannedRights", defaultBannedRights), ("version", version)]) - case .updateFolderPeers(let folderPeers, let pts, let ptsCount): - return ("updateFolderPeers", [("folderPeers", folderPeers), ("pts", pts), ("ptsCount", ptsCount)]) - case .updatePeerSettings(let peer, let settings): - return ("updatePeerSettings", [("peer", peer), ("settings", settings)]) - case .updatePeerLocated(let peers): - return ("updatePeerLocated", [("peers", peers)]) - case .updateNewScheduledMessage(let message): - return ("updateNewScheduledMessage", [("message", message)]) - case .updateDeleteScheduledMessages(let peer, let messages): - return ("updateDeleteScheduledMessages", [("peer", peer), ("messages", messages)]) - case .updateTheme(let theme): - return ("updateTheme", [("theme", theme)]) - case .updateGeoLiveViewed(let peer, let msgId): - return ("updateGeoLiveViewed", [("peer", peer), ("msgId", msgId)]) - case .updateLoginToken: - return ("updateLoginToken", []) - case .updateMessagePollVote(let pollId, let userId, let options): - return ("updateMessagePollVote", [("pollId", pollId), ("userId", userId), ("options", options)]) - case .updateDialogFilter(let flags, let id, let filter): - return ("updateDialogFilter", [("flags", flags), ("id", id), ("filter", filter)]) - case .updateDialogFilterOrder(let order): - return ("updateDialogFilterOrder", [("order", order)]) - case .updateDialogFilters: - return ("updateDialogFilters", []) - case .updatePhoneCallSignalingData(let phoneCallId, let data): - return ("updatePhoneCallSignalingData", [("phoneCallId", phoneCallId), ("data", data)]) - case .updateChannelParticipant(let flags, let channelId, let date, let userId, let prevParticipant, let newParticipant, let qts): - return ("updateChannelParticipant", [("flags", flags), ("channelId", channelId), ("date", date), ("userId", userId), ("prevParticipant", prevParticipant), ("newParticipant", newParticipant), ("qts", qts)]) - case .updateChannelMessageForwards(let channelId, let id, let forwards): - return ("updateChannelMessageForwards", [("channelId", channelId), ("id", id), ("forwards", forwards)]) - case .updateReadChannelDiscussionInbox(let flags, let channelId, let topMsgId, let readMaxId, let broadcastId, let broadcastPost): - return ("updateReadChannelDiscussionInbox", [("flags", flags), ("channelId", channelId), ("topMsgId", topMsgId), ("readMaxId", readMaxId), ("broadcastId", broadcastId), ("broadcastPost", broadcastPost)]) - case .updateReadChannelDiscussionOutbox(let channelId, let topMsgId, let readMaxId): - return ("updateReadChannelDiscussionOutbox", [("channelId", channelId), ("topMsgId", topMsgId), ("readMaxId", readMaxId)]) - case .updatePeerBlocked(let peerId, let blocked): - return ("updatePeerBlocked", [("peerId", peerId), ("blocked", blocked)]) - case .updateChannelUserTyping(let flags, let channelId, let topMsgId, let userId, let action): - return ("updateChannelUserTyping", [("flags", flags), ("channelId", channelId), ("topMsgId", topMsgId), ("userId", userId), ("action", action)]) - case .updatePinnedMessages(let flags, let peer, let messages, let pts, let ptsCount): - return ("updatePinnedMessages", [("flags", flags), ("peer", peer), ("messages", messages), ("pts", pts), ("ptsCount", ptsCount)]) - case .updatePinnedChannelMessages(let flags, let channelId, let messages, let pts, let ptsCount): - return ("updatePinnedChannelMessages", [("flags", flags), ("channelId", channelId), ("messages", messages), ("pts", pts), ("ptsCount", ptsCount)]) - case .updateChat(let chatId): - return ("updateChat", [("chatId", chatId)]) - case .updateGroupCallParticipants(let call, let participants, let version): - return ("updateGroupCallParticipants", [("call", call), ("participants", participants), ("version", version)]) - case .updateGroupCall(let chatId, let call): - return ("updateGroupCall", [("chatId", chatId), ("call", call)]) - case .updatePeerHistoryTTL(let flags, let peer, let ttl): - return ("updatePeerHistoryTTL", [("flags", flags), ("peer", peer), ("ttl", ttl)]) - } - } - - public static func parse_updateNewMessage(_ reader: BufferReader) -> Update? { - var _1: Api.Message? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Message - } - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateNewMessage(message: _1!, pts: _2!, ptsCount: _3!) - } - else { - return nil - } - } - public static func parse_updateMessageID(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Update.updateMessageID(id: _1!, randomId: _2!) - } - else { - return nil - } - } - public static func parse_updateDeleteMessages(_ reader: BufferReader) -> Update? { - var _1: [Int32]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) - } - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateDeleteMessages(messages: _1!, pts: _2!, ptsCount: _3!) - } - else { - return nil - } - } - public static func parse_updateUserTyping(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.SendMessageAction? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.SendMessageAction - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Update.updateUserTyping(userId: _1!, action: _2!) - } - else { - return nil - } - } - public static func parse_updateChatUserTyping(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Api.SendMessageAction? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.SendMessageAction - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateChatUserTyping(chatId: _1!, userId: _2!, action: _3!) - } - else { - return nil - } - } - public static func parse_updateChatParticipants(_ reader: BufferReader) -> Update? { - var _1: Api.ChatParticipants? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.ChatParticipants - } - let _c1 = _1 != nil - if _c1 { - return Api.Update.updateChatParticipants(participants: _1!) - } - else { - return nil - } - } - public static func parse_updateUserStatus(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.UserStatus? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.UserStatus - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Update.updateUserStatus(userId: _1!, status: _2!) - } - else { - return nil - } - } - public static func parse_updateUserName(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.Update.updateUserName(userId: _1!, firstName: _2!, lastName: _3!, username: _4!) - } - else { - return nil - } - } - public static func parse_updateUserPhoto(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Api.UserProfilePhoto? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.UserProfilePhoto - } - var _4: Api.Bool? - if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.Bool - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.Update.updateUserPhoto(userId: _1!, date: _2!, photo: _3!, previous: _4!) - } - else { - return nil - } - } - public static func parse_updateNewEncryptedMessage(_ reader: BufferReader) -> Update? { - var _1: Api.EncryptedMessage? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.EncryptedMessage - } - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Update.updateNewEncryptedMessage(message: _1!, qts: _2!) - } - else { - return nil - } - } - public static func parse_updateEncryptedChatTyping(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.Update.updateEncryptedChatTyping(chatId: _1!) - } - else { - return nil - } - } - public static func parse_updateEncryption(_ reader: BufferReader) -> Update? { - var _1: Api.EncryptedChat? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.EncryptedChat - } - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Update.updateEncryption(chat: _1!, date: _2!) - } - else { - return nil - } - } - public static func parse_updateEncryptedMessagesRead(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateEncryptedMessagesRead(chatId: _1!, maxDate: _2!, date: _3!) - } - else { - return nil - } - } - public static func parse_updateChatParticipantAdd(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.Update.updateChatParticipantAdd(chatId: _1!, userId: _2!, inviterId: _3!, date: _4!, version: _5!) - } - else { - return nil - } - } - public static func parse_updateChatParticipantDelete(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateChatParticipantDelete(chatId: _1!, userId: _2!, version: _3!) - } - else { - return nil - } - } - public static func parse_updateDcOptions(_ reader: BufferReader) -> Update? { - var _1: [Api.DcOption]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DcOption.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.Update.updateDcOptions(dcOptions: _1!) - } - else { - return nil - } - } - public static func parse_updateNotifySettings(_ reader: BufferReader) -> Update? { - var _1: Api.NotifyPeer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.NotifyPeer - } - var _2: Api.PeerNotifySettings? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.PeerNotifySettings - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Update.updateNotifySettings(peer: _1!, notifySettings: _2!) - } - else { - return nil - } - } - public static func parse_updateServiceNotification(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_2 = reader.readInt32() } - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - var _5: Api.MessageMedia? - if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.MessageMedia - } - var _6: [Api.MessageEntity]? - if let _ = reader.readInt32() { - _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) - } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.Update.updateServiceNotification(flags: _1!, inboxDate: _2, type: _3!, message: _4!, media: _5!, entities: _6!) - } - else { - return nil - } - } - public static func parse_updatePrivacy(_ reader: BufferReader) -> Update? { - var _1: Api.PrivacyKey? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.PrivacyKey - } - var _2: [Api.PrivacyRule]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PrivacyRule.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Update.updatePrivacy(key: _1!, rules: _2!) - } - else { - return nil - } - } - public static func parse_updateUserPhone(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Update.updateUserPhone(userId: _1!, phone: _2!) - } - else { - return nil - } - } - public static func parse_updateReadHistoryInbox(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } - var _3: Api.Peer? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - var _6: Int32? - _6 = reader.readInt32() - var _7: Int32? - _7 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.Update.updateReadHistoryInbox(flags: _1!, folderId: _2, peer: _3!, maxId: _4!, stillUnreadCount: _5!, pts: _6!, ptsCount: _7!) - } - else { - return nil - } - } - public static func parse_updateReadHistoryOutbox(_ reader: BufferReader) -> Update? { - var _1: Api.Peer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.Update.updateReadHistoryOutbox(peer: _1!, maxId: _2!, pts: _3!, ptsCount: _4!) - } - else { - return nil - } - } - public static func parse_updateWebPage(_ reader: BufferReader) -> Update? { - var _1: Api.WebPage? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.WebPage - } - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateWebPage(webpage: _1!, pts: _2!, ptsCount: _3!) - } - else { - return nil - } - } - public static func parse_updateReadMessagesContents(_ reader: BufferReader) -> Update? { - var _1: [Int32]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) - } - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateReadMessagesContents(messages: _1!, pts: _2!, ptsCount: _3!) - } - else { - return nil - } - } - public static func parse_updateChannelTooLong(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateChannelTooLong(flags: _1!, channelId: _2!, pts: _3) - } - else { - return nil - } - } - public static func parse_updateChannel(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.Update.updateChannel(channelId: _1!) - } - else { - return nil - } - } - public static func parse_updateNewChannelMessage(_ reader: BufferReader) -> Update? { - var _1: Api.Message? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Message - } - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateNewChannelMessage(message: _1!, pts: _2!, ptsCount: _3!) - } - else { - return nil - } - } - public static func parse_updateReadChannelInbox(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - var _6: Int32? - _6 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.Update.updateReadChannelInbox(flags: _1!, folderId: _2, channelId: _3!, maxId: _4!, stillUnreadCount: _5!, pts: _6!) - } - else { - return nil - } - } - public static func parse_updateDeleteChannelMessages(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: [Int32]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) - } - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.Update.updateDeleteChannelMessages(channelId: _1!, messages: _2!, pts: _3!, ptsCount: _4!) - } - else { - return nil - } - } - public static func parse_updateChannelMessageViews(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateChannelMessageViews(channelId: _1!, id: _2!, views: _3!) - } - else { - return nil - } - } - public static func parse_updateChatParticipantAdmin(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Api.Bool? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.Bool - } - var _4: Int32? - _4 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.Update.updateChatParticipantAdmin(chatId: _1!, userId: _2!, isAdmin: _3!, version: _4!) - } - else { - return nil - } - } - public static func parse_updateNewStickerSet(_ reader: BufferReader) -> Update? { - var _1: Api.messages.StickerSet? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.messages.StickerSet - } - let _c1 = _1 != nil - if _c1 { - return Api.Update.updateNewStickerSet(stickerset: _1!) - } - else { - return nil - } - } - public static func parse_updateStickerSetsOrder(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: [Int64]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Update.updateStickerSetsOrder(flags: _1!, order: _2!) - } - else { - return nil - } - } - public static func parse_updateStickerSets(_ reader: BufferReader) -> Update? { - return Api.Update.updateStickerSets - } - public static func parse_updateSavedGifs(_ reader: BufferReader) -> Update? { - return Api.Update.updateSavedGifs - } - public static func parse_updateBotInlineQuery(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Int32? - _3 = reader.readInt32() - var _4: String? - _4 = parseString(reader) - var _5: Api.GeoPoint? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.GeoPoint - } } - var _6: Api.InlineQueryPeerType? - if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.InlineQueryPeerType - } } - var _7: String? - _7 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil - let _c7 = _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.Update.updateBotInlineQuery(flags: _1!, queryId: _2!, userId: _3!, query: _4!, geo: _5, peerType: _6, offset: _7!) - } - else { - return nil - } - } - public static func parse_updateBotInlineSend(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: String? - _3 = parseString(reader) - var _4: Api.GeoPoint? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.GeoPoint - } } - var _5: String? - _5 = parseString(reader) - var _6: Api.InputBotInlineMessageID? - if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.InputBotInlineMessageID - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.Update.updateBotInlineSend(flags: _1!, userId: _2!, query: _3!, geo: _4, id: _5!, msgId: _6) - } - else { - return nil - } - } - public static func parse_updateEditChannelMessage(_ reader: BufferReader) -> Update? { - var _1: Api.Message? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Message - } - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateEditChannelMessage(message: _1!, pts: _2!, ptsCount: _3!) - } - else { - return nil - } - } - public static func parse_updateBotCallbackQuery(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Int32? - _3 = reader.readInt32() - var _4: Api.Peer? - if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _5: Int32? - _5 = reader.readInt32() - var _6: Int64? - _6 = reader.readInt64() - var _7: Buffer? - if Int(_1!) & Int(1 << 0) != 0 {_7 = parseBytes(reader) } - var _8: String? - if Int(_1!) & Int(1 << 1) != 0 {_8 = parseString(reader) } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 0) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 1) == 0) || _8 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { - return Api.Update.updateBotCallbackQuery(flags: _1!, queryId: _2!, userId: _3!, peer: _4!, msgId: _5!, chatInstance: _6!, data: _7, gameShortName: _8) - } - else { - return nil - } - } - public static func parse_updateEditMessage(_ reader: BufferReader) -> Update? { - var _1: Api.Message? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Message - } - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateEditMessage(message: _1!, pts: _2!, ptsCount: _3!) - } - else { - return nil - } - } - public static func parse_updateInlineBotCallbackQuery(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Int32? - _3 = reader.readInt32() - var _4: Api.InputBotInlineMessageID? - if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.InputBotInlineMessageID - } - var _5: Int64? - _5 = reader.readInt64() - var _6: Buffer? - if Int(_1!) & Int(1 << 0) != 0 {_6 = parseBytes(reader) } - var _7: String? - if Int(_1!) & Int(1 << 1) != 0 {_7 = parseString(reader) } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.Update.updateInlineBotCallbackQuery(flags: _1!, queryId: _2!, userId: _3!, msgId: _4!, chatInstance: _5!, data: _6, gameShortName: _7) - } - else { - return nil - } - } - public static func parse_updateReadChannelOutbox(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Update.updateReadChannelOutbox(channelId: _1!, maxId: _2!) - } - else { - return nil - } - } - public static func parse_updateDraftMessage(_ reader: BufferReader) -> Update? { - var _1: Api.Peer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _2: Api.DraftMessage? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.DraftMessage - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Update.updateDraftMessage(peer: _1!, draft: _2!) - } - else { - return nil - } - } - public static func parse_updateReadFeaturedStickers(_ reader: BufferReader) -> Update? { - return Api.Update.updateReadFeaturedStickers - } - public static func parse_updateRecentStickers(_ reader: BufferReader) -> Update? { - return Api.Update.updateRecentStickers - } - public static func parse_updateConfig(_ reader: BufferReader) -> Update? { - return Api.Update.updateConfig - } - public static func parse_updatePtsChanged(_ reader: BufferReader) -> Update? { - return Api.Update.updatePtsChanged - } - public static func parse_updateChannelWebPage(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.WebPage? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.WebPage - } - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.Update.updateChannelWebPage(channelId: _1!, webpage: _2!, pts: _3!, ptsCount: _4!) - } - else { - return nil - } - } - public static func parse_updateDialogPinned(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_2 = reader.readInt32() } - var _3: Api.DialogPeer? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.DialogPeer - } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateDialogPinned(flags: _1!, folderId: _2, peer: _3!) - } - else { - return nil - } - } - public static func parse_updatePinnedDialogs(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_2 = reader.readInt32() } - var _3: [Api.DialogPeer]? - if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DialogPeer.self) - } } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updatePinnedDialogs(flags: _1!, folderId: _2, order: _3) - } - else { - return nil - } - } - public static func parse_updateBotWebhookJSON(_ reader: BufferReader) -> Update? { - var _1: Api.DataJSON? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.DataJSON - } - let _c1 = _1 != nil - if _c1 { - return Api.Update.updateBotWebhookJSON(data: _1!) - } - else { - return nil - } - } - public static func parse_updateBotWebhookJSONQuery(_ reader: BufferReader) -> Update? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Api.DataJSON? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.DataJSON - } - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateBotWebhookJSONQuery(queryId: _1!, data: _2!, timeout: _3!) - } - else { - return nil - } - } - public static func parse_updateBotShippingQuery(_ reader: BufferReader) -> Update? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int32? - _2 = reader.readInt32() - var _3: Buffer? - _3 = parseBytes(reader) - var _4: Api.PostAddress? - if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.PostAddress - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.Update.updateBotShippingQuery(queryId: _1!, userId: _2!, payload: _3!, shippingAddress: _4!) - } - else { - return nil - } - } - public static func parse_updateBotPrecheckoutQuery(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Int32? - _3 = reader.readInt32() - var _4: Buffer? - _4 = parseBytes(reader) - var _5: Api.PaymentRequestedInfo? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.PaymentRequestedInfo - } } - var _6: String? - if Int(_1!) & Int(1 << 1) != 0 {_6 = parseString(reader) } - var _7: String? - _7 = parseString(reader) - var _8: Int64? - _8 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil - let _c7 = _7 != nil - let _c8 = _8 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { - return Api.Update.updateBotPrecheckoutQuery(flags: _1!, queryId: _2!, userId: _3!, payload: _4!, info: _5, shippingOptionId: _6, currency: _7!, totalAmount: _8!) - } - else { - return nil - } - } - public static func parse_updatePhoneCall(_ reader: BufferReader) -> Update? { - var _1: Api.PhoneCall? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.PhoneCall - } - let _c1 = _1 != nil - if _c1 { - return Api.Update.updatePhoneCall(phoneCall: _1!) - } - else { - return nil - } - } - public static func parse_updateLangPackTooLong(_ reader: BufferReader) -> Update? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.Update.updateLangPackTooLong(langCode: _1!) - } - else { - return nil - } - } - public static func parse_updateLangPack(_ reader: BufferReader) -> Update? { - var _1: Api.LangPackDifference? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.LangPackDifference - } - let _c1 = _1 != nil - if _c1 { - return Api.Update.updateLangPack(difference: _1!) - } - else { - return nil - } - } - public static func parse_updateFavedStickers(_ reader: BufferReader) -> Update? { - return Api.Update.updateFavedStickers - } - public static func parse_updateChannelReadMessagesContents(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: [Int32]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Update.updateChannelReadMessagesContents(channelId: _1!, messages: _2!) - } - else { - return nil - } - } - public static func parse_updateContactsReset(_ reader: BufferReader) -> Update? { - return Api.Update.updateContactsReset - } - public static func parse_updateChannelAvailableMessages(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Update.updateChannelAvailableMessages(channelId: _1!, availableMinId: _2!) - } - else { - return nil - } - } - public static func parse_updateDialogUnreadMark(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.DialogPeer? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.DialogPeer - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Update.updateDialogUnreadMark(flags: _1!, peer: _2!) - } - else { - return nil - } - } - public static func parse_updateMessagePoll(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Api.Poll? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.Poll - } } - var _4: Api.PollResults? - if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.PollResults - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.Update.updateMessagePoll(flags: _1!, pollId: _2!, poll: _3, results: _4!) - } - else { - return nil - } - } - public static func parse_updateChatDefaultBannedRights(_ reader: BufferReader) -> Update? { - var _1: Api.Peer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _2: Api.ChatBannedRights? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.ChatBannedRights - } - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateChatDefaultBannedRights(peer: _1!, defaultBannedRights: _2!, version: _3!) - } - else { - return nil - } - } - public static func parse_updateFolderPeers(_ reader: BufferReader) -> Update? { - var _1: [Api.FolderPeer]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.FolderPeer.self) - } - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateFolderPeers(folderPeers: _1!, pts: _2!, ptsCount: _3!) - } - else { - return nil - } - } - public static func parse_updatePeerSettings(_ reader: BufferReader) -> Update? { - var _1: Api.Peer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _2: Api.PeerSettings? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.PeerSettings - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Update.updatePeerSettings(peer: _1!, settings: _2!) - } - else { - return nil - } - } - public static func parse_updatePeerLocated(_ reader: BufferReader) -> Update? { - var _1: [Api.PeerLocated]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PeerLocated.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.Update.updatePeerLocated(peers: _1!) - } - else { - return nil - } - } - public static func parse_updateNewScheduledMessage(_ reader: BufferReader) -> Update? { - var _1: Api.Message? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Message - } - let _c1 = _1 != nil - if _c1 { - return Api.Update.updateNewScheduledMessage(message: _1!) - } - else { - return nil - } - } - public static func parse_updateDeleteScheduledMessages(_ reader: BufferReader) -> Update? { - var _1: Api.Peer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _2: [Int32]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Update.updateDeleteScheduledMessages(peer: _1!, messages: _2!) - } - else { - return nil - } - } - public static func parse_updateTheme(_ reader: BufferReader) -> Update? { - var _1: Api.Theme? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Theme - } - let _c1 = _1 != nil - if _c1 { - return Api.Update.updateTheme(theme: _1!) - } - else { - return nil - } - } - public static func parse_updateGeoLiveViewed(_ reader: BufferReader) -> Update? { - var _1: Api.Peer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Update.updateGeoLiveViewed(peer: _1!, msgId: _2!) - } - else { - return nil - } - } - public static func parse_updateLoginToken(_ reader: BufferReader) -> Update? { - return Api.Update.updateLoginToken - } - public static func parse_updateMessagePollVote(_ reader: BufferReader) -> Update? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int32? - _2 = reader.readInt32() - var _3: [Buffer]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: -1255641564, elementType: Buffer.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateMessagePollVote(pollId: _1!, userId: _2!, options: _3!) - } - else { - return nil - } - } - public static func parse_updateDialogFilter(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Api.DialogFilter? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.DialogFilter - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateDialogFilter(flags: _1!, id: _2!, filter: _3) - } - else { - return nil - } - } - public static func parse_updateDialogFilterOrder(_ reader: BufferReader) -> Update? { - var _1: [Int32]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.Update.updateDialogFilterOrder(order: _1!) - } - else { - return nil - } - } - public static func parse_updateDialogFilters(_ reader: BufferReader) -> Update? { - return Api.Update.updateDialogFilters - } - public static func parse_updatePhoneCallSignalingData(_ reader: BufferReader) -> Update? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Buffer? - _2 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Update.updatePhoneCallSignalingData(phoneCallId: _1!, data: _2!) - } - else { - return nil - } - } - public static func parse_updateChannelParticipant(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Api.ChannelParticipant? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.ChannelParticipant - } } - var _6: Api.ChannelParticipant? - if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.ChannelParticipant - } } - var _7: Int32? - _7 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil - let _c7 = _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.Update.updateChannelParticipant(flags: _1!, channelId: _2!, date: _3!, userId: _4!, prevParticipant: _5, newParticipant: _6, qts: _7!) - } - else { - return nil - } - } - public static func parse_updateChannelMessageForwards(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateChannelMessageForwards(channelId: _1!, id: _2!, forwards: _3!) - } - else { - return nil - } - } - public static func parse_updateReadChannelDiscussionInbox(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_5 = reader.readInt32() } - var _6: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_6 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.Update.updateReadChannelDiscussionInbox(flags: _1!, channelId: _2!, topMsgId: _3!, readMaxId: _4!, broadcastId: _5, broadcastPost: _6) - } - else { - return nil - } - } - public static func parse_updateReadChannelDiscussionOutbox(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateReadChannelDiscussionOutbox(channelId: _1!, topMsgId: _2!, readMaxId: _3!) - } - else { - return nil - } - } - public static func parse_updatePeerBlocked(_ reader: BufferReader) -> Update? { - var _1: Api.Peer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _2: Api.Bool? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Bool - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Update.updatePeerBlocked(peerId: _1!, blocked: _2!) - } - else { - return nil - } - } - public static func parse_updateChannelUserTyping(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } - var _4: Int32? - _4 = reader.readInt32() - var _5: Api.SendMessageAction? - if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.SendMessageAction - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.Update.updateChannelUserTyping(flags: _1!, channelId: _2!, topMsgId: _3, userId: _4!, action: _5!) - } - else { - return nil - } - } - public static func parse_updatePinnedMessages(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.Peer? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _3: [Int32]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) - } - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.Update.updatePinnedMessages(flags: _1!, peer: _2!, messages: _3!, pts: _4!, ptsCount: _5!) - } - else { - return nil - } - } - public static func parse_updatePinnedChannelMessages(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: [Int32]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) - } - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.Update.updatePinnedChannelMessages(flags: _1!, channelId: _2!, messages: _3!, pts: _4!, ptsCount: _5!) - } - else { - return nil - } - } - public static func parse_updateChat(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.Update.updateChat(chatId: _1!) - } - else { - return nil - } - } - public static func parse_updateGroupCallParticipants(_ reader: BufferReader) -> Update? { - var _1: Api.InputGroupCall? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputGroupCall - } - var _2: [Api.GroupCallParticipant]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.GroupCallParticipant.self) - } - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updateGroupCallParticipants(call: _1!, participants: _2!, version: _3!) - } - else { - return nil - } - } - public static func parse_updateGroupCall(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.GroupCall? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.GroupCall - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Update.updateGroupCall(chatId: _1!, call: _2!) - } - else { - return nil - } - } - public static func parse_updatePeerHistoryTTL(_ reader: BufferReader) -> Update? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.Peer? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _3: Api.PeerHistoryTTL? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.PeerHistoryTTL - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.Update.updatePeerHistoryTTL(flags: _1!, peer: _2!, ttl: _3) - } - else { - return nil - } - } - - } - public enum PopularContact: TypeConstructorDescription { - case popularContact(clientId: Int64, importers: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .popularContact(let clientId, let importers): - if boxed { - buffer.appendInt32(1558266229) - } - serializeInt64(clientId, buffer: buffer, boxed: false) - serializeInt32(importers, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .popularContact(let clientId, let importers): - return ("popularContact", [("clientId", clientId), ("importers", importers)]) - } - } - - public static func parse_popularContact(_ reader: BufferReader) -> PopularContact? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.PopularContact.popularContact(clientId: _1!, importers: _2!) - } - else { - return nil - } - } - - } - public enum FolderPeer: TypeConstructorDescription { - case folderPeer(peer: Api.Peer, folderId: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .folderPeer(let peer, let folderId): - if boxed { - buffer.appendInt32(-373643672) - } - peer.serialize(buffer, true) - serializeInt32(folderId, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .folderPeer(let peer, let folderId): - return ("folderPeer", [("peer", peer), ("folderId", folderId)]) - } - } - - public static func parse_folderPeer(_ reader: BufferReader) -> FolderPeer? { - var _1: Api.Peer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.FolderPeer.folderPeer(peer: _1!, folderId: _2!) - } - else { - return nil - } - } - - } - public enum ChannelParticipant: TypeConstructorDescription { - case channelParticipant(userId: Int32, date: Int32) - case channelParticipantSelf(userId: Int32, inviterId: Int32, date: Int32) - case channelParticipantCreator(flags: Int32, userId: Int32, adminRights: Api.ChatAdminRights, rank: String?) - case channelParticipantAdmin(flags: Int32, userId: Int32, inviterId: Int32?, promotedBy: Int32, date: Int32, adminRights: Api.ChatAdminRights, rank: String?) - case channelParticipantBanned(flags: Int32, userId: Int32, kickedBy: Int32, date: Int32, bannedRights: Api.ChatBannedRights) - case channelParticipantLeft(userId: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .channelParticipant(let userId, let date): - if boxed { - buffer.appendInt32(367766557) - } - serializeInt32(userId, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - break - case .channelParticipantSelf(let userId, let inviterId, let date): - if boxed { - buffer.appendInt32(-1557620115) - } - serializeInt32(userId, buffer: buffer, boxed: false) - serializeInt32(inviterId, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - break - case .channelParticipantCreator(let flags, let userId, let adminRights, let rank): - if boxed { - buffer.appendInt32(1149094475) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - adminRights.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeString(rank!, buffer: buffer, boxed: false)} - break - case .channelParticipantAdmin(let flags, let userId, let inviterId, let promotedBy, let date, let adminRights, let rank): - if boxed { - buffer.appendInt32(-859915345) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(inviterId!, buffer: buffer, boxed: false)} - serializeInt32(promotedBy, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - adminRights.serialize(buffer, true) - if Int(flags) & Int(1 << 2) != 0 {serializeString(rank!, buffer: buffer, boxed: false)} - break - case .channelParticipantBanned(let flags, let userId, let kickedBy, let date, let bannedRights): - if boxed { - buffer.appendInt32(470789295) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - serializeInt32(kickedBy, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - bannedRights.serialize(buffer, true) - break - case .channelParticipantLeft(let userId): - if boxed { - buffer.appendInt32(-1010402965) - } - serializeInt32(userId, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .channelParticipant(let userId, let date): - return ("channelParticipant", [("userId", userId), ("date", date)]) - case .channelParticipantSelf(let userId, let inviterId, let date): - return ("channelParticipantSelf", [("userId", userId), ("inviterId", inviterId), ("date", date)]) - case .channelParticipantCreator(let flags, let userId, let adminRights, let rank): - return ("channelParticipantCreator", [("flags", flags), ("userId", userId), ("adminRights", adminRights), ("rank", rank)]) - case .channelParticipantAdmin(let flags, let userId, let inviterId, let promotedBy, let date, let adminRights, let rank): - return ("channelParticipantAdmin", [("flags", flags), ("userId", userId), ("inviterId", inviterId), ("promotedBy", promotedBy), ("date", date), ("adminRights", adminRights), ("rank", rank)]) - case .channelParticipantBanned(let flags, let userId, let kickedBy, let date, let bannedRights): - return ("channelParticipantBanned", [("flags", flags), ("userId", userId), ("kickedBy", kickedBy), ("date", date), ("bannedRights", bannedRights)]) - case .channelParticipantLeft(let userId): - return ("channelParticipantLeft", [("userId", userId)]) - } - } - - public static func parse_channelParticipant(_ reader: BufferReader) -> ChannelParticipant? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ChannelParticipant.channelParticipant(userId: _1!, date: _2!) - } - else { - return nil - } - } - public static func parse_channelParticipantSelf(_ reader: BufferReader) -> ChannelParticipant? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.ChannelParticipant.channelParticipantSelf(userId: _1!, inviterId: _2!, date: _3!) - } - else { - return nil - } - } - public static func parse_channelParticipantCreator(_ reader: BufferReader) -> ChannelParticipant? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Api.ChatAdminRights? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.ChatAdminRights - } - var _4: String? - if Int(_1!) & Int(1 << 0) != 0 {_4 = parseString(reader) } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.ChannelParticipant.channelParticipantCreator(flags: _1!, userId: _2!, adminRights: _3!, rank: _4) - } - else { - return nil - } - } - public static func parse_channelParticipantAdmin(_ reader: BufferReader) -> ChannelParticipant? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_3 = reader.readInt32() } - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - var _6: Api.ChatAdminRights? - if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.ChatAdminRights - } - var _7: String? - if Int(_1!) & Int(1 << 2) != 0 {_7 = parseString(reader) } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 2) == 0) || _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.ChannelParticipant.channelParticipantAdmin(flags: _1!, userId: _2!, inviterId: _3, promotedBy: _4!, date: _5!, adminRights: _6!, rank: _7) - } - else { - return nil - } - } - public static func parse_channelParticipantBanned(_ reader: BufferReader) -> ChannelParticipant? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Api.ChatBannedRights? - if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.ChatBannedRights - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.ChannelParticipant.channelParticipantBanned(flags: _1!, userId: _2!, kickedBy: _3!, date: _4!, bannedRights: _5!) - } - else { - return nil - } - } - public static func parse_channelParticipantLeft(_ reader: BufferReader) -> ChannelParticipant? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.ChannelParticipant.channelParticipantLeft(userId: _1!) - } - else { - return nil - } - } - - } - public enum MessageUserVote: TypeConstructorDescription { - case messageUserVote(userId: Int32, option: Buffer, date: Int32) - case messageUserVoteInputOption(userId: Int32, date: Int32) - case messageUserVoteMultiple(userId: Int32, options: [Buffer], date: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .messageUserVote(let userId, let option, let date): - if boxed { - buffer.appendInt32(-1567730343) - } - serializeInt32(userId, buffer: buffer, boxed: false) - serializeBytes(option, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - break - case .messageUserVoteInputOption(let userId, let date): - if boxed { - buffer.appendInt32(909603888) - } - serializeInt32(userId, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - break - case .messageUserVoteMultiple(let userId, let options, let date): - if boxed { - buffer.appendInt32(244310238) - } - serializeInt32(userId, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(options.count)) - for item in options { - serializeBytes(item, buffer: buffer, boxed: false) - } - serializeInt32(date, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .messageUserVote(let userId, let option, let date): - return ("messageUserVote", [("userId", userId), ("option", option), ("date", date)]) - case .messageUserVoteInputOption(let userId, let date): - return ("messageUserVoteInputOption", [("userId", userId), ("date", date)]) - case .messageUserVoteMultiple(let userId, let options, let date): - return ("messageUserVoteMultiple", [("userId", userId), ("options", options), ("date", date)]) - } - } - - public static func parse_messageUserVote(_ reader: BufferReader) -> MessageUserVote? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Buffer? - _2 = parseBytes(reader) - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.MessageUserVote.messageUserVote(userId: _1!, option: _2!, date: _3!) - } - else { - return nil - } - } - public static func parse_messageUserVoteInputOption(_ reader: BufferReader) -> MessageUserVote? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageUserVote.messageUserVoteInputOption(userId: _1!, date: _2!) - } - else { - return nil - } - } - public static func parse_messageUserVoteMultiple(_ reader: BufferReader) -> MessageUserVote? { - var _1: Int32? - _1 = reader.readInt32() - var _2: [Buffer]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: -1255641564, elementType: Buffer.self) - } - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.MessageUserVote.messageUserVoteMultiple(userId: _1!, options: _2!, date: _3!) - } - else { - return nil - } - } - - } - public enum InputDialogPeer: TypeConstructorDescription { - case inputDialogPeer(peer: Api.InputPeer) - case inputDialogPeerFolder(folderId: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputDialogPeer(let peer): - if boxed { - buffer.appendInt32(-55902537) - } - peer.serialize(buffer, true) - break - case .inputDialogPeerFolder(let folderId): - if boxed { - buffer.appendInt32(1684014375) - } - serializeInt32(folderId, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputDialogPeer(let peer): - return ("inputDialogPeer", [("peer", peer)]) - case .inputDialogPeerFolder(let folderId): - return ("inputDialogPeerFolder", [("folderId", folderId)]) - } - } - - public static func parse_inputDialogPeer(_ reader: BufferReader) -> InputDialogPeer? { - var _1: Api.InputPeer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputPeer - } - let _c1 = _1 != nil - if _c1 { - return Api.InputDialogPeer.inputDialogPeer(peer: _1!) - } - else { - return nil - } - } - public static func parse_inputDialogPeerFolder(_ reader: BufferReader) -> InputDialogPeer? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.InputDialogPeer.inputDialogPeerFolder(folderId: _1!) - } - else { - return nil - } - } - - } - public enum KeyboardButton: TypeConstructorDescription { - case keyboardButton(text: String) - case keyboardButtonUrl(text: String, url: String) - case keyboardButtonCallback(flags: Int32, text: String, data: Buffer) - case keyboardButtonRequestPhone(text: String) - case keyboardButtonRequestGeoLocation(text: String) - case keyboardButtonSwitchInline(flags: Int32, text: String, query: String) - case keyboardButtonGame(text: String) - case keyboardButtonBuy(text: String) - case keyboardButtonUrlAuth(flags: Int32, text: String, fwdText: String?, url: String, buttonId: Int32) - case inputKeyboardButtonUrlAuth(flags: Int32, text: String, fwdText: String?, url: String, bot: Api.InputUser) - case keyboardButtonRequestPoll(flags: Int32, quiz: Api.Bool?, text: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .keyboardButton(let text): - if boxed { - buffer.appendInt32(-1560655744) - } - serializeString(text, buffer: buffer, boxed: false) - break - case .keyboardButtonUrl(let text, let url): - if boxed { - buffer.appendInt32(629866245) - } - serializeString(text, buffer: buffer, boxed: false) - serializeString(url, buffer: buffer, boxed: false) - break - case .keyboardButtonCallback(let flags, let text, let data): - if boxed { - buffer.appendInt32(901503851) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(text, buffer: buffer, boxed: false) - serializeBytes(data, buffer: buffer, boxed: false) - break - case .keyboardButtonRequestPhone(let text): - if boxed { - buffer.appendInt32(-1318425559) - } - serializeString(text, buffer: buffer, boxed: false) - break - case .keyboardButtonRequestGeoLocation(let text): - if boxed { - buffer.appendInt32(-59151553) - } - serializeString(text, buffer: buffer, boxed: false) - break - case .keyboardButtonSwitchInline(let flags, let text, let query): - if boxed { - buffer.appendInt32(90744648) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(text, buffer: buffer, boxed: false) - serializeString(query, buffer: buffer, boxed: false) - break - case .keyboardButtonGame(let text): - if boxed { - buffer.appendInt32(1358175439) - } - serializeString(text, buffer: buffer, boxed: false) - break - case .keyboardButtonBuy(let text): - if boxed { - buffer.appendInt32(-1344716869) - } - serializeString(text, buffer: buffer, boxed: false) - break - case .keyboardButtonUrlAuth(let flags, let text, let fwdText, let url, let buttonId): - if boxed { - buffer.appendInt32(280464681) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(text, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeString(fwdText!, buffer: buffer, boxed: false)} - serializeString(url, buffer: buffer, boxed: false) - serializeInt32(buttonId, buffer: buffer, boxed: false) - break - case .inputKeyboardButtonUrlAuth(let flags, let text, let fwdText, let url, let bot): - if boxed { - buffer.appendInt32(-802258988) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(text, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeString(fwdText!, buffer: buffer, boxed: false)} - serializeString(url, buffer: buffer, boxed: false) - bot.serialize(buffer, true) - break - case .keyboardButtonRequestPoll(let flags, let quiz, let text): - if boxed { - buffer.appendInt32(-1144565411) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {quiz!.serialize(buffer, true)} - serializeString(text, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .keyboardButton(let text): - return ("keyboardButton", [("text", text)]) - case .keyboardButtonUrl(let text, let url): - return ("keyboardButtonUrl", [("text", text), ("url", url)]) - case .keyboardButtonCallback(let flags, let text, let data): - return ("keyboardButtonCallback", [("flags", flags), ("text", text), ("data", data)]) - case .keyboardButtonRequestPhone(let text): - return ("keyboardButtonRequestPhone", [("text", text)]) - case .keyboardButtonRequestGeoLocation(let text): - return ("keyboardButtonRequestGeoLocation", [("text", text)]) - case .keyboardButtonSwitchInline(let flags, let text, let query): - return ("keyboardButtonSwitchInline", [("flags", flags), ("text", text), ("query", query)]) - case .keyboardButtonGame(let text): - return ("keyboardButtonGame", [("text", text)]) - case .keyboardButtonBuy(let text): - return ("keyboardButtonBuy", [("text", text)]) - case .keyboardButtonUrlAuth(let flags, let text, let fwdText, let url, let buttonId): - return ("keyboardButtonUrlAuth", [("flags", flags), ("text", text), ("fwdText", fwdText), ("url", url), ("buttonId", buttonId)]) - case .inputKeyboardButtonUrlAuth(let flags, let text, let fwdText, let url, let bot): - return ("inputKeyboardButtonUrlAuth", [("flags", flags), ("text", text), ("fwdText", fwdText), ("url", url), ("bot", bot)]) - case .keyboardButtonRequestPoll(let flags, let quiz, let text): - return ("keyboardButtonRequestPoll", [("flags", flags), ("quiz", quiz), ("text", text)]) - } - } - - public static func parse_keyboardButton(_ reader: BufferReader) -> KeyboardButton? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.KeyboardButton.keyboardButton(text: _1!) - } - else { - return nil - } - } - public static func parse_keyboardButtonUrl(_ reader: BufferReader) -> KeyboardButton? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.KeyboardButton.keyboardButtonUrl(text: _1!, url: _2!) - } - else { - return nil - } - } - public static func parse_keyboardButtonCallback(_ reader: BufferReader) -> KeyboardButton? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: Buffer? - _3 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.KeyboardButton.keyboardButtonCallback(flags: _1!, text: _2!, data: _3!) - } - else { - return nil - } - } - public static func parse_keyboardButtonRequestPhone(_ reader: BufferReader) -> KeyboardButton? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.KeyboardButton.keyboardButtonRequestPhone(text: _1!) - } - else { - return nil - } - } - public static func parse_keyboardButtonRequestGeoLocation(_ reader: BufferReader) -> KeyboardButton? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.KeyboardButton.keyboardButtonRequestGeoLocation(text: _1!) - } - else { - return nil - } - } - public static func parse_keyboardButtonSwitchInline(_ reader: BufferReader) -> KeyboardButton? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.KeyboardButton.keyboardButtonSwitchInline(flags: _1!, text: _2!, query: _3!) - } - else { - return nil - } - } - public static func parse_keyboardButtonGame(_ reader: BufferReader) -> KeyboardButton? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.KeyboardButton.keyboardButtonGame(text: _1!) - } - else { - return nil - } - } - public static func parse_keyboardButtonBuy(_ reader: BufferReader) -> KeyboardButton? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.KeyboardButton.keyboardButtonBuy(text: _1!) - } - else { - return nil - } - } - public static func parse_keyboardButtonUrlAuth(_ reader: BufferReader) -> KeyboardButton? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: String? - if Int(_1!) & Int(1 << 0) != 0 {_3 = parseString(reader) } - var _4: String? - _4 = parseString(reader) - var _5: Int32? - _5 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.KeyboardButton.keyboardButtonUrlAuth(flags: _1!, text: _2!, fwdText: _3, url: _4!, buttonId: _5!) - } - else { - return nil - } - } - public static func parse_inputKeyboardButtonUrlAuth(_ reader: BufferReader) -> KeyboardButton? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: String? - if Int(_1!) & Int(1 << 1) != 0 {_3 = parseString(reader) } - var _4: String? - _4 = parseString(reader) - var _5: Api.InputUser? - if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.InputUser - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.KeyboardButton.inputKeyboardButtonUrlAuth(flags: _1!, text: _2!, fwdText: _3, url: _4!, bot: _5!) - } - else { - return nil - } - } - public static func parse_keyboardButtonRequestPoll(_ reader: BufferReader) -> KeyboardButton? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.Bool? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Bool - } } - var _3: String? - _3 = parseString(reader) - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.KeyboardButton.keyboardButtonRequestPoll(flags: _1!, quiz: _2, text: _3!) - } - else { - return nil - } - } - - } - public enum ContactStatus: TypeConstructorDescription { - case contactStatus(userId: Int32, status: Api.UserStatus) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .contactStatus(let userId, let status): - if boxed { - buffer.appendInt32(-748155807) - } - serializeInt32(userId, buffer: buffer, boxed: false) - status.serialize(buffer, true) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .contactStatus(let userId, let status): - return ("contactStatus", [("userId", userId), ("status", status)]) - } - } - - public static func parse_contactStatus(_ reader: BufferReader) -> ContactStatus? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.UserStatus? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.UserStatus - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ContactStatus.contactStatus(userId: _1!, status: _2!) - } - else { - return nil - } - } - - } - public enum SecureFile: TypeConstructorDescription { - case secureFileEmpty - case secureFile(id: Int64, accessHash: Int64, size: Int32, dcId: Int32, date: Int32, fileHash: Buffer, secret: Buffer) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .secureFileEmpty: - if boxed { - buffer.appendInt32(1679398724) - } - - break - case .secureFile(let id, let accessHash, let size, let dcId, let date, let fileHash, let secret): - if boxed { - buffer.appendInt32(-534283678) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeInt32(size, buffer: buffer, boxed: false) - serializeInt32(dcId, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - serializeBytes(fileHash, buffer: buffer, boxed: false) - serializeBytes(secret, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .secureFileEmpty: - return ("secureFileEmpty", []) - case .secureFile(let id, let accessHash, let size, let dcId, let date, let fileHash, let secret): - return ("secureFile", [("id", id), ("accessHash", accessHash), ("size", size), ("dcId", dcId), ("date", date), ("fileHash", fileHash), ("secret", secret)]) - } - } - - public static func parse_secureFileEmpty(_ reader: BufferReader) -> SecureFile? { - return Api.SecureFile.secureFileEmpty - } - public static func parse_secureFile(_ reader: BufferReader) -> SecureFile? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int64? - _2 = reader.readInt64() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - var _6: Buffer? - _6 = parseBytes(reader) - var _7: Buffer? - _7 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.SecureFile.secureFile(id: _1!, accessHash: _2!, size: _3!, dcId: _4!, date: _5!, fileHash: _6!, secret: _7!) - } - else { - return nil - } - } - - } - public enum PhotoSize: TypeConstructorDescription { - case photoSizeEmpty(type: String) - case photoSize(type: String, location: Api.FileLocation, w: Int32, h: Int32, size: Int32) - case photoCachedSize(type: String, location: Api.FileLocation, w: Int32, h: Int32, bytes: Buffer) - case photoStrippedSize(type: String, bytes: Buffer) - case photoSizeProgressive(type: String, location: Api.FileLocation, w: Int32, h: Int32, sizes: [Int32]) - case photoPathSize(type: String, bytes: Buffer) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .photoSizeEmpty(let type): - if boxed { - buffer.appendInt32(236446268) - } - serializeString(type, buffer: buffer, boxed: false) - break - case .photoSize(let type, let location, let w, let h, let size): - if boxed { - buffer.appendInt32(2009052699) - } - serializeString(type, buffer: buffer, boxed: false) - location.serialize(buffer, true) - serializeInt32(w, buffer: buffer, boxed: false) - serializeInt32(h, buffer: buffer, boxed: false) - serializeInt32(size, buffer: buffer, boxed: false) - break - case .photoCachedSize(let type, let location, let w, let h, let bytes): - if boxed { - buffer.appendInt32(-374917894) - } - serializeString(type, buffer: buffer, boxed: false) - location.serialize(buffer, true) - serializeInt32(w, buffer: buffer, boxed: false) - serializeInt32(h, buffer: buffer, boxed: false) - serializeBytes(bytes, buffer: buffer, boxed: false) - break - case .photoStrippedSize(let type, let bytes): - if boxed { - buffer.appendInt32(-525288402) - } - serializeString(type, buffer: buffer, boxed: false) - serializeBytes(bytes, buffer: buffer, boxed: false) - break - case .photoSizeProgressive(let type, let location, let w, let h, let sizes): - if boxed { - buffer.appendInt32(1520986705) - } - serializeString(type, buffer: buffer, boxed: false) - location.serialize(buffer, true) - serializeInt32(w, buffer: buffer, boxed: false) - serializeInt32(h, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(sizes.count)) - for item in sizes { - serializeInt32(item, buffer: buffer, boxed: false) - } - break - case .photoPathSize(let type, let bytes): - if boxed { - buffer.appendInt32(-668906175) - } - serializeString(type, buffer: buffer, boxed: false) - serializeBytes(bytes, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .photoSizeEmpty(let type): - return ("photoSizeEmpty", [("type", type)]) - case .photoSize(let type, let location, let w, let h, let size): - return ("photoSize", [("type", type), ("location", location), ("w", w), ("h", h), ("size", size)]) - case .photoCachedSize(let type, let location, let w, let h, let bytes): - return ("photoCachedSize", [("type", type), ("location", location), ("w", w), ("h", h), ("bytes", bytes)]) - case .photoStrippedSize(let type, let bytes): - return ("photoStrippedSize", [("type", type), ("bytes", bytes)]) - case .photoSizeProgressive(let type, let location, let w, let h, let sizes): - return ("photoSizeProgressive", [("type", type), ("location", location), ("w", w), ("h", h), ("sizes", sizes)]) - case .photoPathSize(let type, let bytes): - return ("photoPathSize", [("type", type), ("bytes", bytes)]) - } - } - - public static func parse_photoSizeEmpty(_ reader: BufferReader) -> PhotoSize? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.PhotoSize.photoSizeEmpty(type: _1!) - } - else { - return nil - } - } - public static func parse_photoSize(_ reader: BufferReader) -> PhotoSize? { - var _1: String? - _1 = parseString(reader) - var _2: Api.FileLocation? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.FileLocation - } - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.PhotoSize.photoSize(type: _1!, location: _2!, w: _3!, h: _4!, size: _5!) - } - else { - return nil - } - } - public static func parse_photoCachedSize(_ reader: BufferReader) -> PhotoSize? { - var _1: String? - _1 = parseString(reader) - var _2: Api.FileLocation? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.FileLocation - } - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Buffer? - _5 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.PhotoSize.photoCachedSize(type: _1!, location: _2!, w: _3!, h: _4!, bytes: _5!) - } - else { - return nil - } - } - public static func parse_photoStrippedSize(_ reader: BufferReader) -> PhotoSize? { - var _1: String? - _1 = parseString(reader) - var _2: Buffer? - _2 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.PhotoSize.photoStrippedSize(type: _1!, bytes: _2!) - } - else { - return nil - } - } - public static func parse_photoSizeProgressive(_ reader: BufferReader) -> PhotoSize? { - var _1: String? - _1 = parseString(reader) - var _2: Api.FileLocation? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.FileLocation - } - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: [Int32]? - if let _ = reader.readInt32() { - _5 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.PhotoSize.photoSizeProgressive(type: _1!, location: _2!, w: _3!, h: _4!, sizes: _5!) - } - else { - return nil - } - } - public static func parse_photoPathSize(_ reader: BufferReader) -> PhotoSize? { - var _1: String? - _1 = parseString(reader) - var _2: Buffer? - _2 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.PhotoSize.photoPathSize(type: _1!, bytes: _2!) - } - else { - return nil - } - } - - } - public enum GlobalPrivacySettings: TypeConstructorDescription { - case globalPrivacySettings(flags: Int32, archiveAndMuteNewNoncontactPeers: Api.Bool?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .globalPrivacySettings(let flags, let archiveAndMuteNewNoncontactPeers): - if boxed { - buffer.appendInt32(-1096616924) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {archiveAndMuteNewNoncontactPeers!.serialize(buffer, true)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .globalPrivacySettings(let flags, let archiveAndMuteNewNoncontactPeers): - return ("globalPrivacySettings", [("flags", flags), ("archiveAndMuteNewNoncontactPeers", archiveAndMuteNewNoncontactPeers)]) - } - } - - public static func parse_globalPrivacySettings(_ reader: BufferReader) -> GlobalPrivacySettings? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.Bool? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Bool - } } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - if _c1 && _c2 { - return Api.GlobalPrivacySettings.globalPrivacySettings(flags: _1!, archiveAndMuteNewNoncontactPeers: _2) - } - else { - return nil - } - } - - } - public enum InlineBotSwitchPM: TypeConstructorDescription { - case inlineBotSwitchPM(text: String, startParam: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inlineBotSwitchPM(let text, let startParam): - if boxed { - buffer.appendInt32(1008755359) - } - serializeString(text, buffer: buffer, boxed: false) - serializeString(startParam, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inlineBotSwitchPM(let text, let startParam): - return ("inlineBotSwitchPM", [("text", text), ("startParam", startParam)]) - } - } - - public static func parse_inlineBotSwitchPM(_ reader: BufferReader) -> InlineBotSwitchPM? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InlineBotSwitchPM.inlineBotSwitchPM(text: _1!, startParam: _2!) - } - else { - return nil - } - } - - } - public enum InputTheme: TypeConstructorDescription { - case inputTheme(id: Int64, accessHash: Int64) - case inputThemeSlug(slug: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputTheme(let id, let accessHash): - if boxed { - buffer.appendInt32(1012306921) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - break - case .inputThemeSlug(let slug): - if boxed { - buffer.appendInt32(-175567375) - } - serializeString(slug, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputTheme(let id, let accessHash): - return ("inputTheme", [("id", id), ("accessHash", accessHash)]) - case .inputThemeSlug(let slug): - return ("inputThemeSlug", [("slug", slug)]) - } - } - - public static func parse_inputTheme(_ reader: BufferReader) -> InputTheme? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputTheme.inputTheme(id: _1!, accessHash: _2!) - } - else { - return nil - } - } - public static func parse_inputThemeSlug(_ reader: BufferReader) -> InputTheme? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.InputTheme.inputThemeSlug(slug: _1!) - } - else { - return nil - } - } - - } - public enum FileLocation: TypeConstructorDescription { - case fileLocationToBeDeprecated(volumeId: Int64, localId: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .fileLocationToBeDeprecated(let volumeId, let localId): - if boxed { - buffer.appendInt32(-1132476723) - } - serializeInt64(volumeId, buffer: buffer, boxed: false) - serializeInt32(localId, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .fileLocationToBeDeprecated(let volumeId, let localId): - return ("fileLocationToBeDeprecated", [("volumeId", volumeId), ("localId", localId)]) - } - } - - public static func parse_fileLocationToBeDeprecated(_ reader: BufferReader) -> FileLocation? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.FileLocation.fileLocationToBeDeprecated(volumeId: _1!, localId: _2!) - } - else { - return nil - } - } - - } - public enum Poll: TypeConstructorDescription { - case poll(id: Int64, flags: Int32, question: String, answers: [Api.PollAnswer], closePeriod: Int32?, closeDate: Int32?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .poll(let id, let flags, let question, let answers, let closePeriod, let closeDate): - if boxed { - buffer.appendInt32(-2032041631) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(question, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(answers.count)) - for item in answers { - item.serialize(buffer, true) - } - if Int(flags) & Int(1 << 4) != 0 {serializeInt32(closePeriod!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 5) != 0 {serializeInt32(closeDate!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .poll(let id, let flags, let question, let answers, let closePeriod, let closeDate): - return ("poll", [("id", id), ("flags", flags), ("question", question), ("answers", answers), ("closePeriod", closePeriod), ("closeDate", closeDate)]) - } - } - - public static func parse_poll(_ reader: BufferReader) -> Poll? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int32? - _2 = reader.readInt32() - var _3: String? - _3 = parseString(reader) - var _4: [Api.PollAnswer]? - if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PollAnswer.self) - } - var _5: Int32? - if Int(_2!) & Int(1 << 4) != 0 {_5 = reader.readInt32() } - var _6: Int32? - if Int(_2!) & Int(1 << 5) != 0 {_6 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_2!) & Int(1 << 4) == 0) || _5 != nil - let _c6 = (Int(_2!) & Int(1 << 5) == 0) || _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.Poll.poll(id: _1!, flags: _2!, question: _3!, answers: _4!, closePeriod: _5, closeDate: _6) - } - else { - return nil - } - } - - } - public enum InputNotifyPeer: TypeConstructorDescription { - case inputNotifyPeer(peer: Api.InputPeer) - case inputNotifyUsers - case inputNotifyChats - case inputNotifyBroadcasts - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputNotifyPeer(let peer): - if boxed { - buffer.appendInt32(-1195615476) - } - peer.serialize(buffer, true) - break - case .inputNotifyUsers: - if boxed { - buffer.appendInt32(423314455) - } - - break - case .inputNotifyChats: - if boxed { - buffer.appendInt32(1251338318) - } - - break - case .inputNotifyBroadcasts: - if boxed { - buffer.appendInt32(-1311015810) - } - - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputNotifyPeer(let peer): - return ("inputNotifyPeer", [("peer", peer)]) - case .inputNotifyUsers: - return ("inputNotifyUsers", []) - case .inputNotifyChats: - return ("inputNotifyChats", []) - case .inputNotifyBroadcasts: - return ("inputNotifyBroadcasts", []) - } - } - - public static func parse_inputNotifyPeer(_ reader: BufferReader) -> InputNotifyPeer? { - var _1: Api.InputPeer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputPeer - } - let _c1 = _1 != nil - if _c1 { - return Api.InputNotifyPeer.inputNotifyPeer(peer: _1!) - } - else { - return nil - } - } - public static func parse_inputNotifyUsers(_ reader: BufferReader) -> InputNotifyPeer? { - return Api.InputNotifyPeer.inputNotifyUsers - } - public static func parse_inputNotifyChats(_ reader: BufferReader) -> InputNotifyPeer? { - return Api.InputNotifyPeer.inputNotifyChats - } - public static func parse_inputNotifyBroadcasts(_ reader: BufferReader) -> InputNotifyPeer? { - return Api.InputNotifyPeer.inputNotifyBroadcasts - } - - } - public enum EncryptedMessage: TypeConstructorDescription { - case encryptedMessage(randomId: Int64, chatId: Int32, date: Int32, bytes: Buffer, file: Api.EncryptedFile) - case encryptedMessageService(randomId: Int64, chatId: Int32, date: Int32, bytes: Buffer) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .encryptedMessage(let randomId, let chatId, let date, let bytes, let file): - if boxed { - buffer.appendInt32(-317144808) - } - serializeInt64(randomId, buffer: buffer, boxed: false) - serializeInt32(chatId, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - serializeBytes(bytes, buffer: buffer, boxed: false) - file.serialize(buffer, true) - break - case .encryptedMessageService(let randomId, let chatId, let date, let bytes): - if boxed { - buffer.appendInt32(594758406) - } - serializeInt64(randomId, buffer: buffer, boxed: false) - serializeInt32(chatId, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - serializeBytes(bytes, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .encryptedMessage(let randomId, let chatId, let date, let bytes, let file): - return ("encryptedMessage", [("randomId", randomId), ("chatId", chatId), ("date", date), ("bytes", bytes), ("file", file)]) - case .encryptedMessageService(let randomId, let chatId, let date, let bytes): - return ("encryptedMessageService", [("randomId", randomId), ("chatId", chatId), ("date", date), ("bytes", bytes)]) - } - } - - public static func parse_encryptedMessage(_ reader: BufferReader) -> EncryptedMessage? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: Buffer? - _4 = parseBytes(reader) - var _5: Api.EncryptedFile? - if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.EncryptedFile - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.EncryptedMessage.encryptedMessage(randomId: _1!, chatId: _2!, date: _3!, bytes: _4!, file: _5!) - } - else { - return nil - } - } - public static func parse_encryptedMessageService(_ reader: BufferReader) -> EncryptedMessage? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: Buffer? - _4 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.EncryptedMessage.encryptedMessageService(randomId: _1!, chatId: _2!, date: _3!, bytes: _4!) - } - else { - return nil - } - } - - } - public enum ChannelParticipantsFilter: TypeConstructorDescription { - case channelParticipantsRecent - case channelParticipantsAdmins - case channelParticipantsKicked(q: String) - case channelParticipantsBots - case channelParticipantsBanned(q: String) - case channelParticipantsSearch(q: String) - case channelParticipantsContacts(q: String) - case channelParticipantsMentions(flags: Int32, q: String?, topMsgId: Int32?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .channelParticipantsRecent: - if boxed { - buffer.appendInt32(-566281095) - } - - break - case .channelParticipantsAdmins: - if boxed { - buffer.appendInt32(-1268741783) - } - - break - case .channelParticipantsKicked(let q): - if boxed { - buffer.appendInt32(-1548400251) - } - serializeString(q, buffer: buffer, boxed: false) - break - case .channelParticipantsBots: - if boxed { - buffer.appendInt32(-1328445861) - } - - break - case .channelParticipantsBanned(let q): - if boxed { - buffer.appendInt32(338142689) - } - serializeString(q, buffer: buffer, boxed: false) - break - case .channelParticipantsSearch(let q): - if boxed { - buffer.appendInt32(106343499) - } - serializeString(q, buffer: buffer, boxed: false) - break - case .channelParticipantsContacts(let q): - if boxed { - buffer.appendInt32(-1150621555) - } - serializeString(q, buffer: buffer, boxed: false) - break - case .channelParticipantsMentions(let flags, let q, let topMsgId): - if boxed { - buffer.appendInt32(-531931925) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeString(q!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(topMsgId!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .channelParticipantsRecent: - return ("channelParticipantsRecent", []) - case .channelParticipantsAdmins: - return ("channelParticipantsAdmins", []) - case .channelParticipantsKicked(let q): - return ("channelParticipantsKicked", [("q", q)]) - case .channelParticipantsBots: - return ("channelParticipantsBots", []) - case .channelParticipantsBanned(let q): - return ("channelParticipantsBanned", [("q", q)]) - case .channelParticipantsSearch(let q): - return ("channelParticipantsSearch", [("q", q)]) - case .channelParticipantsContacts(let q): - return ("channelParticipantsContacts", [("q", q)]) - case .channelParticipantsMentions(let flags, let q, let topMsgId): - return ("channelParticipantsMentions", [("flags", flags), ("q", q), ("topMsgId", topMsgId)]) - } - } - - public static func parse_channelParticipantsRecent(_ reader: BufferReader) -> ChannelParticipantsFilter? { - return Api.ChannelParticipantsFilter.channelParticipantsRecent - } - public static func parse_channelParticipantsAdmins(_ reader: BufferReader) -> ChannelParticipantsFilter? { - return Api.ChannelParticipantsFilter.channelParticipantsAdmins - } - public static func parse_channelParticipantsKicked(_ reader: BufferReader) -> ChannelParticipantsFilter? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.ChannelParticipantsFilter.channelParticipantsKicked(q: _1!) - } - else { - return nil - } - } - public static func parse_channelParticipantsBots(_ reader: BufferReader) -> ChannelParticipantsFilter? { - return Api.ChannelParticipantsFilter.channelParticipantsBots - } - public static func parse_channelParticipantsBanned(_ reader: BufferReader) -> ChannelParticipantsFilter? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.ChannelParticipantsFilter.channelParticipantsBanned(q: _1!) - } - else { - return nil - } - } - public static func parse_channelParticipantsSearch(_ reader: BufferReader) -> ChannelParticipantsFilter? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.ChannelParticipantsFilter.channelParticipantsSearch(q: _1!) - } - else { - return nil - } - } - public static func parse_channelParticipantsContacts(_ reader: BufferReader) -> ChannelParticipantsFilter? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.ChannelParticipantsFilter.channelParticipantsContacts(q: _1!) - } - else { - return nil - } - } - public static func parse_channelParticipantsMentions(_ reader: BufferReader) -> ChannelParticipantsFilter? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - if Int(_1!) & Int(1 << 0) != 0 {_2 = parseString(reader) } - var _3: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_3 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.ChannelParticipantsFilter.channelParticipantsMentions(flags: _1!, q: _2, topMsgId: _3) - } - else { - return nil - } - } - - } - public enum WebPage: TypeConstructorDescription { - case webPageEmpty(id: Int64) - case webPagePending(id: Int64, date: Int32) - case webPage(flags: Int32, id: Int64, url: String, displayUrl: String, hash: Int32, type: String?, siteName: String?, title: String?, description: String?, photo: Api.Photo?, embedUrl: String?, embedType: String?, embedWidth: Int32?, embedHeight: Int32?, duration: Int32?, author: String?, document: Api.Document?, cachedPage: Api.Page?, attributes: [Api.WebPageAttribute]?) - case webPageNotModified(flags: Int32, cachedPageViews: Int32?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .webPageEmpty(let id): - if boxed { - buffer.appendInt32(-350980120) - } - serializeInt64(id, buffer: buffer, boxed: false) - break - case .webPagePending(let id, let date): - if boxed { - buffer.appendInt32(-981018084) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - break - case .webPage(let flags, let id, let url, let displayUrl, let hash, let type, let siteName, let title, let description, let photo, let embedUrl, let embedType, let embedWidth, let embedHeight, let duration, let author, let document, let cachedPage, let attributes): - if boxed { - buffer.appendInt32(-392411726) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(id, buffer: buffer, boxed: false) - serializeString(url, buffer: buffer, boxed: false) - serializeString(displayUrl, buffer: buffer, boxed: false) - serializeInt32(hash, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeString(type!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeString(siteName!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeString(title!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeString(description!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 4) != 0 {photo!.serialize(buffer, true)} - if Int(flags) & Int(1 << 5) != 0 {serializeString(embedUrl!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 5) != 0 {serializeString(embedType!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 6) != 0 {serializeInt32(embedWidth!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 6) != 0 {serializeInt32(embedHeight!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 7) != 0 {serializeInt32(duration!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 8) != 0 {serializeString(author!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 9) != 0 {document!.serialize(buffer, true)} - if Int(flags) & Int(1 << 10) != 0 {cachedPage!.serialize(buffer, true)} - if Int(flags) & Int(1 << 12) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(attributes!.count)) - for item in attributes! { - item.serialize(buffer, true) - }} - break - case .webPageNotModified(let flags, let cachedPageViews): - if boxed { - buffer.appendInt32(1930545681) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(cachedPageViews!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .webPageEmpty(let id): - return ("webPageEmpty", [("id", id)]) - case .webPagePending(let id, let date): - return ("webPagePending", [("id", id), ("date", date)]) - case .webPage(let flags, let id, let url, let displayUrl, let hash, let type, let siteName, let title, let description, let photo, let embedUrl, let embedType, let embedWidth, let embedHeight, let duration, let author, let document, let cachedPage, let attributes): - return ("webPage", [("flags", flags), ("id", id), ("url", url), ("displayUrl", displayUrl), ("hash", hash), ("type", type), ("siteName", siteName), ("title", title), ("description", description), ("photo", photo), ("embedUrl", embedUrl), ("embedType", embedType), ("embedWidth", embedWidth), ("embedHeight", embedHeight), ("duration", duration), ("author", author), ("document", document), ("cachedPage", cachedPage), ("attributes", attributes)]) - case .webPageNotModified(let flags, let cachedPageViews): - return ("webPageNotModified", [("flags", flags), ("cachedPageViews", cachedPageViews)]) - } - } - - public static func parse_webPageEmpty(_ reader: BufferReader) -> WebPage? { - var _1: Int64? - _1 = reader.readInt64() - let _c1 = _1 != nil - if _c1 { - return Api.WebPage.webPageEmpty(id: _1!) - } - else { - return nil - } - } - public static func parse_webPagePending(_ reader: BufferReader) -> WebPage? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.WebPage.webPagePending(id: _1!, date: _2!) - } - else { - return nil - } - } - public static func parse_webPage(_ reader: BufferReader) -> WebPage? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - var _5: Int32? - _5 = reader.readInt32() - var _6: String? - if Int(_1!) & Int(1 << 0) != 0 {_6 = parseString(reader) } - var _7: String? - if Int(_1!) & Int(1 << 1) != 0 {_7 = parseString(reader) } - var _8: String? - if Int(_1!) & Int(1 << 2) != 0 {_8 = parseString(reader) } - var _9: String? - if Int(_1!) & Int(1 << 3) != 0 {_9 = parseString(reader) } - var _10: Api.Photo? - if Int(_1!) & Int(1 << 4) != 0 {if let signature = reader.readInt32() { - _10 = Api.parse(reader, signature: signature) as? Api.Photo - } } - var _11: String? - if Int(_1!) & Int(1 << 5) != 0 {_11 = parseString(reader) } - var _12: String? - if Int(_1!) & Int(1 << 5) != 0 {_12 = parseString(reader) } - var _13: Int32? - if Int(_1!) & Int(1 << 6) != 0 {_13 = reader.readInt32() } - var _14: Int32? - if Int(_1!) & Int(1 << 6) != 0 {_14 = reader.readInt32() } - var _15: Int32? - if Int(_1!) & Int(1 << 7) != 0 {_15 = reader.readInt32() } - var _16: String? - if Int(_1!) & Int(1 << 8) != 0 {_16 = parseString(reader) } - var _17: Api.Document? - if Int(_1!) & Int(1 << 9) != 0 {if let signature = reader.readInt32() { - _17 = Api.parse(reader, signature: signature) as? Api.Document - } } - var _18: Api.Page? - if Int(_1!) & Int(1 << 10) != 0 {if let signature = reader.readInt32() { - _18 = Api.parse(reader, signature: signature) as? Api.Page - } } - var _19: [Api.WebPageAttribute]? - if Int(_1!) & Int(1 << 12) != 0 {if let _ = reader.readInt32() { - _19 = Api.parseVector(reader, elementSignature: 0, elementType: Api.WebPageAttribute.self) - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 3) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 4) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 5) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 5) == 0) || _12 != nil - let _c13 = (Int(_1!) & Int(1 << 6) == 0) || _13 != nil - let _c14 = (Int(_1!) & Int(1 << 6) == 0) || _14 != nil - let _c15 = (Int(_1!) & Int(1 << 7) == 0) || _15 != nil - let _c16 = (Int(_1!) & Int(1 << 8) == 0) || _16 != nil - let _c17 = (Int(_1!) & Int(1 << 9) == 0) || _17 != nil - let _c18 = (Int(_1!) & Int(1 << 10) == 0) || _18 != nil - let _c19 = (Int(_1!) & Int(1 << 12) == 0) || _19 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 { - return Api.WebPage.webPage(flags: _1!, id: _2!, url: _3!, displayUrl: _4!, hash: _5!, type: _6, siteName: _7, title: _8, description: _9, photo: _10, embedUrl: _11, embedType: _12, embedWidth: _13, embedHeight: _14, duration: _15, author: _16, document: _17, cachedPage: _18, attributes: _19) - } - else { - return nil - } - } - public static func parse_webPageNotModified(_ reader: BufferReader) -> WebPage? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - if _c1 && _c2 { - return Api.WebPage.webPageNotModified(flags: _1!, cachedPageViews: _2) - } - else { - return nil - } - } - - } - public enum InputBotInlineMessage: TypeConstructorDescription { - case inputBotInlineMessageMediaAuto(flags: Int32, message: String, entities: [Api.MessageEntity]?, replyMarkup: Api.ReplyMarkup?) - case inputBotInlineMessageText(flags: Int32, message: String, entities: [Api.MessageEntity]?, replyMarkup: Api.ReplyMarkup?) - case inputBotInlineMessageMediaGeo(flags: Int32, geoPoint: Api.InputGeoPoint, heading: Int32?, period: Int32?, proximityNotificationRadius: Int32?, replyMarkup: Api.ReplyMarkup?) - case inputBotInlineMessageMediaVenue(flags: Int32, geoPoint: Api.InputGeoPoint, title: String, address: String, provider: String, venueId: String, venueType: String, replyMarkup: Api.ReplyMarkup?) - case inputBotInlineMessageMediaContact(flags: Int32, phoneNumber: String, firstName: String, lastName: String, vcard: String, replyMarkup: Api.ReplyMarkup?) - case inputBotInlineMessageGame(flags: Int32, replyMarkup: Api.ReplyMarkup?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputBotInlineMessageMediaAuto(let flags, let message, let entities, let replyMarkup): - if boxed { - buffer.appendInt32(864077702) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(message, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities!.count)) - for item in entities! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} - break - case .inputBotInlineMessageText(let flags, let message, let entities, let replyMarkup): - if boxed { - buffer.appendInt32(1036876423) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(message, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities!.count)) - for item in entities! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} - break - case .inputBotInlineMessageMediaGeo(let flags, let geoPoint, let heading, let period, let proximityNotificationRadius, let replyMarkup): - if boxed { - buffer.appendInt32(-1768777083) - } - serializeInt32(flags, buffer: buffer, boxed: false) - geoPoint.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(heading!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(period!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeInt32(proximityNotificationRadius!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} - break - case .inputBotInlineMessageMediaVenue(let flags, let geoPoint, let title, let address, let provider, let venueId, let venueType, let replyMarkup): - if boxed { - buffer.appendInt32(1098628881) - } - serializeInt32(flags, buffer: buffer, boxed: false) - geoPoint.serialize(buffer, true) - serializeString(title, buffer: buffer, boxed: false) - serializeString(address, buffer: buffer, boxed: false) - serializeString(provider, buffer: buffer, boxed: false) - serializeString(venueId, buffer: buffer, boxed: false) - serializeString(venueType, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} - break - case .inputBotInlineMessageMediaContact(let flags, let phoneNumber, let firstName, let lastName, let vcard, let replyMarkup): - if boxed { - buffer.appendInt32(-1494368259) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(phoneNumber, buffer: buffer, boxed: false) - serializeString(firstName, buffer: buffer, boxed: false) - serializeString(lastName, buffer: buffer, boxed: false) - serializeString(vcard, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} - break - case .inputBotInlineMessageGame(let flags, let replyMarkup): - if boxed { - buffer.appendInt32(1262639204) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputBotInlineMessageMediaAuto(let flags, let message, let entities, let replyMarkup): - return ("inputBotInlineMessageMediaAuto", [("flags", flags), ("message", message), ("entities", entities), ("replyMarkup", replyMarkup)]) - case .inputBotInlineMessageText(let flags, let message, let entities, let replyMarkup): - return ("inputBotInlineMessageText", [("flags", flags), ("message", message), ("entities", entities), ("replyMarkup", replyMarkup)]) - case .inputBotInlineMessageMediaGeo(let flags, let geoPoint, let heading, let period, let proximityNotificationRadius, let replyMarkup): - return ("inputBotInlineMessageMediaGeo", [("flags", flags), ("geoPoint", geoPoint), ("heading", heading), ("period", period), ("proximityNotificationRadius", proximityNotificationRadius), ("replyMarkup", replyMarkup)]) - case .inputBotInlineMessageMediaVenue(let flags, let geoPoint, let title, let address, let provider, let venueId, let venueType, let replyMarkup): - return ("inputBotInlineMessageMediaVenue", [("flags", flags), ("geoPoint", geoPoint), ("title", title), ("address", address), ("provider", provider), ("venueId", venueId), ("venueType", venueType), ("replyMarkup", replyMarkup)]) - case .inputBotInlineMessageMediaContact(let flags, let phoneNumber, let firstName, let lastName, let vcard, let replyMarkup): - return ("inputBotInlineMessageMediaContact", [("flags", flags), ("phoneNumber", phoneNumber), ("firstName", firstName), ("lastName", lastName), ("vcard", vcard), ("replyMarkup", replyMarkup)]) - case .inputBotInlineMessageGame(let flags, let replyMarkup): - return ("inputBotInlineMessageGame", [("flags", flags), ("replyMarkup", replyMarkup)]) - } - } - - public static func parse_inputBotInlineMessageMediaAuto(_ reader: BufferReader) -> InputBotInlineMessage? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) - } } - var _4: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputBotInlineMessage.inputBotInlineMessageMediaAuto(flags: _1!, message: _2!, entities: _3, replyMarkup: _4) - } - else { - return nil - } - } - public static func parse_inputBotInlineMessageText(_ reader: BufferReader) -> InputBotInlineMessage? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) - } } - var _4: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputBotInlineMessage.inputBotInlineMessageText(flags: _1!, message: _2!, entities: _3, replyMarkup: _4) - } - else { - return nil - } - } - public static func parse_inputBotInlineMessageMediaGeo(_ reader: BufferReader) -> InputBotInlineMessage? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.InputGeoPoint? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.InputGeoPoint - } - var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } - var _4: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt32() } - var _5: Int32? - if Int(_1!) & Int(1 << 3) != 0 {_5 = reader.readInt32() } - var _6: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.InputBotInlineMessage.inputBotInlineMessageMediaGeo(flags: _1!, geoPoint: _2!, heading: _3, period: _4, proximityNotificationRadius: _5, replyMarkup: _6) - } - else { - return nil - } - } - public static func parse_inputBotInlineMessageMediaVenue(_ reader: BufferReader) -> InputBotInlineMessage? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.InputGeoPoint? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.InputGeoPoint - } - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - var _5: String? - _5 = parseString(reader) - var _6: String? - _6 = parseString(reader) - var _7: String? - _7 = parseString(reader) - var _8: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _8 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { - return Api.InputBotInlineMessage.inputBotInlineMessageMediaVenue(flags: _1!, geoPoint: _2!, title: _3!, address: _4!, provider: _5!, venueId: _6!, venueType: _7!, replyMarkup: _8) - } - else { - return nil - } - } - public static func parse_inputBotInlineMessageMediaContact(_ reader: BufferReader) -> InputBotInlineMessage? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - var _5: String? - _5 = parseString(reader) - var _6: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.InputBotInlineMessage.inputBotInlineMessageMediaContact(flags: _1!, phoneNumber: _2!, firstName: _3!, lastName: _4!, vcard: _5!, replyMarkup: _6) - } - else { - return nil - } - } - public static func parse_inputBotInlineMessageGame(_ reader: BufferReader) -> InputBotInlineMessage? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup - } } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 2) == 0) || _2 != nil - if _c1 && _c2 { - return Api.InputBotInlineMessage.inputBotInlineMessageGame(flags: _1!, replyMarkup: _2) - } - else { - return nil - } - } - - } - public enum KeyboardButtonRow: TypeConstructorDescription { - case keyboardButtonRow(buttons: [Api.KeyboardButton]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .keyboardButtonRow(let buttons): - if boxed { - buffer.appendInt32(2002815875) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(buttons.count)) - for item in buttons { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .keyboardButtonRow(let buttons): - return ("keyboardButtonRow", [("buttons", buttons)]) - } - } - - public static func parse_keyboardButtonRow(_ reader: BufferReader) -> KeyboardButtonRow? { - var _1: [Api.KeyboardButton]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.KeyboardButton.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.KeyboardButtonRow.keyboardButtonRow(buttons: _1!) - } - else { - return nil - } - } - - } - public enum StickerSet: TypeConstructorDescription { - case stickerSet(flags: Int32, installedDate: Int32?, id: Int64, accessHash: Int64, title: String, shortName: String, thumbs: [Api.PhotoSize]?, thumbDcId: Int32?, count: Int32, hash: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .stickerSet(let flags, let installedDate, let id, let accessHash, let title, let shortName, let thumbs, let thumbDcId, let count, let hash): - if boxed { - buffer.appendInt32(1088567208) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(installedDate!, buffer: buffer, boxed: false)} - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeString(title, buffer: buffer, boxed: false) - serializeString(shortName, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 4) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(thumbs!.count)) - for item in thumbs! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 4) != 0 {serializeInt32(thumbDcId!, buffer: buffer, boxed: false)} - serializeInt32(count, buffer: buffer, boxed: false) - serializeInt32(hash, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .stickerSet(let flags, let installedDate, let id, let accessHash, let title, let shortName, let thumbs, let thumbDcId, let count, let hash): - return ("stickerSet", [("flags", flags), ("installedDate", installedDate), ("id", id), ("accessHash", accessHash), ("title", title), ("shortName", shortName), ("thumbs", thumbs), ("thumbDcId", thumbDcId), ("count", count), ("hash", hash)]) - } - } - - public static func parse_stickerSet(_ reader: BufferReader) -> StickerSet? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } - var _3: Int64? - _3 = reader.readInt64() - var _4: Int64? - _4 = reader.readInt64() - var _5: String? - _5 = parseString(reader) - var _6: String? - _6 = parseString(reader) - var _7: [Api.PhotoSize]? - if Int(_1!) & Int(1 << 4) != 0 {if let _ = reader.readInt32() { - _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PhotoSize.self) - } } - var _8: Int32? - if Int(_1!) & Int(1 << 4) != 0 {_8 = reader.readInt32() } - var _9: Int32? - _9 = reader.readInt32() - var _10: Int32? - _10 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 4) == 0) || _8 != nil - let _c9 = _9 != nil - let _c10 = _10 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 { - return Api.StickerSet.stickerSet(flags: _1!, installedDate: _2, id: _3!, accessHash: _4!, title: _5!, shortName: _6!, thumbs: _7, thumbDcId: _8, count: _9!, hash: _10!) - } - else { - return nil - } - } - - } - public enum SecureSecretSettings: TypeConstructorDescription { - case secureSecretSettings(secureAlgo: Api.SecurePasswordKdfAlgo, secureSecret: Buffer, secureSecretId: Int64) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .secureSecretSettings(let secureAlgo, let secureSecret, let secureSecretId): - if boxed { - buffer.appendInt32(354925740) - } - secureAlgo.serialize(buffer, true) - serializeBytes(secureSecret, buffer: buffer, boxed: false) - serializeInt64(secureSecretId, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .secureSecretSettings(let secureAlgo, let secureSecret, let secureSecretId): - return ("secureSecretSettings", [("secureAlgo", secureAlgo), ("secureSecret", secureSecret), ("secureSecretId", secureSecretId)]) - } - } - - public static func parse_secureSecretSettings(_ reader: BufferReader) -> SecureSecretSettings? { - var _1: Api.SecurePasswordKdfAlgo? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.SecurePasswordKdfAlgo - } - var _2: Buffer? - _2 = parseBytes(reader) - var _3: Int64? - _3 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.SecureSecretSettings.secureSecretSettings(secureAlgo: _1!, secureSecret: _2!, secureSecretId: _3!) - } - else { - return nil - } - } - - } - public enum InputContact: TypeConstructorDescription { - case inputPhoneContact(clientId: Int64, phone: String, firstName: String, lastName: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputPhoneContact(let clientId, let phone, let firstName, let lastName): - if boxed { - buffer.appendInt32(-208488460) - } - serializeInt64(clientId, buffer: buffer, boxed: false) - serializeString(phone, buffer: buffer, boxed: false) - serializeString(firstName, buffer: buffer, boxed: false) - serializeString(lastName, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputPhoneContact(let clientId, let phone, let firstName, let lastName): - return ("inputPhoneContact", [("clientId", clientId), ("phone", phone), ("firstName", firstName), ("lastName", lastName)]) - } - } - - public static func parse_inputPhoneContact(_ reader: BufferReader) -> InputContact? { - var _1: Int64? - _1 = reader.readInt64() - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputContact.inputPhoneContact(clientId: _1!, phone: _2!, firstName: _3!, lastName: _4!) - } - else { - return nil - } - } - - } - public enum TopPeerCategory: TypeConstructorDescription { - case topPeerCategoryBotsPM - case topPeerCategoryBotsInline - case topPeerCategoryCorrespondents - case topPeerCategoryGroups - case topPeerCategoryChannels - case topPeerCategoryPhoneCalls - case topPeerCategoryForwardUsers - case topPeerCategoryForwardChats - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .topPeerCategoryBotsPM: - if boxed { - buffer.appendInt32(-1419371685) - } - - break - case .topPeerCategoryBotsInline: - if boxed { - buffer.appendInt32(344356834) - } - - break - case .topPeerCategoryCorrespondents: - if boxed { - buffer.appendInt32(104314861) - } - - break - case .topPeerCategoryGroups: - if boxed { - buffer.appendInt32(-1122524854) - } - - break - case .topPeerCategoryChannels: - if boxed { - buffer.appendInt32(371037736) - } - - break - case .topPeerCategoryPhoneCalls: - if boxed { - buffer.appendInt32(511092620) - } - - break - case .topPeerCategoryForwardUsers: - if boxed { - buffer.appendInt32(-1472172887) - } - - break - case .topPeerCategoryForwardChats: - if boxed { - buffer.appendInt32(-68239120) - } - - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .topPeerCategoryBotsPM: - return ("topPeerCategoryBotsPM", []) - case .topPeerCategoryBotsInline: - return ("topPeerCategoryBotsInline", []) - case .topPeerCategoryCorrespondents: - return ("topPeerCategoryCorrespondents", []) - case .topPeerCategoryGroups: - return ("topPeerCategoryGroups", []) - case .topPeerCategoryChannels: - return ("topPeerCategoryChannels", []) - case .topPeerCategoryPhoneCalls: - return ("topPeerCategoryPhoneCalls", []) - case .topPeerCategoryForwardUsers: - return ("topPeerCategoryForwardUsers", []) - case .topPeerCategoryForwardChats: - return ("topPeerCategoryForwardChats", []) - } - } - - public static func parse_topPeerCategoryBotsPM(_ reader: BufferReader) -> TopPeerCategory? { - return Api.TopPeerCategory.topPeerCategoryBotsPM - } - public static func parse_topPeerCategoryBotsInline(_ reader: BufferReader) -> TopPeerCategory? { - return Api.TopPeerCategory.topPeerCategoryBotsInline - } - public static func parse_topPeerCategoryCorrespondents(_ reader: BufferReader) -> TopPeerCategory? { - return Api.TopPeerCategory.topPeerCategoryCorrespondents - } - public static func parse_topPeerCategoryGroups(_ reader: BufferReader) -> TopPeerCategory? { - return Api.TopPeerCategory.topPeerCategoryGroups - } - public static func parse_topPeerCategoryChannels(_ reader: BufferReader) -> TopPeerCategory? { - return Api.TopPeerCategory.topPeerCategoryChannels - } - public static func parse_topPeerCategoryPhoneCalls(_ reader: BufferReader) -> TopPeerCategory? { - return Api.TopPeerCategory.topPeerCategoryPhoneCalls - } - public static func parse_topPeerCategoryForwardUsers(_ reader: BufferReader) -> TopPeerCategory? { - return Api.TopPeerCategory.topPeerCategoryForwardUsers - } - public static func parse_topPeerCategoryForwardChats(_ reader: BufferReader) -> TopPeerCategory? { - return Api.TopPeerCategory.topPeerCategoryForwardChats - } - - } - public enum ChannelMessagesFilter: TypeConstructorDescription { - case channelMessagesFilterEmpty - case channelMessagesFilter(flags: Int32, ranges: [Api.MessageRange]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .channelMessagesFilterEmpty: - if boxed { - buffer.appendInt32(-1798033689) - } - - break - case .channelMessagesFilter(let flags, let ranges): - if boxed { - buffer.appendInt32(-847783593) - } - serializeInt32(flags, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(ranges.count)) - for item in ranges { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .channelMessagesFilterEmpty: - return ("channelMessagesFilterEmpty", []) - case .channelMessagesFilter(let flags, let ranges): - return ("channelMessagesFilter", [("flags", flags), ("ranges", ranges)]) - } - } - - public static func parse_channelMessagesFilterEmpty(_ reader: BufferReader) -> ChannelMessagesFilter? { - return Api.ChannelMessagesFilter.channelMessagesFilterEmpty - } - public static func parse_channelMessagesFilter(_ reader: BufferReader) -> ChannelMessagesFilter? { - var _1: Int32? - _1 = reader.readInt32() - var _2: [Api.MessageRange]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageRange.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ChannelMessagesFilter.channelMessagesFilter(flags: _1!, ranges: _2!) - } - else { - return nil - } - } - - } - public enum ChatAdminWithInvites: TypeConstructorDescription { - case chatAdminWithInvites(adminId: Int32, invitesCount: Int32, revokedInvitesCount: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .chatAdminWithInvites(let adminId, let invitesCount, let revokedInvitesCount): - if boxed { - buffer.appendInt32(-539872497) - } - serializeInt32(adminId, buffer: buffer, boxed: false) - serializeInt32(invitesCount, buffer: buffer, boxed: false) - serializeInt32(revokedInvitesCount, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .chatAdminWithInvites(let adminId, let invitesCount, let revokedInvitesCount): - return ("chatAdminWithInvites", [("adminId", adminId), ("invitesCount", invitesCount), ("revokedInvitesCount", revokedInvitesCount)]) - } - } - - public static func parse_chatAdminWithInvites(_ reader: BufferReader) -> ChatAdminWithInvites? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.ChatAdminWithInvites.chatAdminWithInvites(adminId: _1!, invitesCount: _2!, revokedInvitesCount: _3!) - } - else { - return nil - } - } - - } - public enum DialogFilterSuggested: TypeConstructorDescription { - case dialogFilterSuggested(filter: Api.DialogFilter, description: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .dialogFilterSuggested(let filter, let description): - if boxed { - buffer.appendInt32(2004110666) - } - filter.serialize(buffer, true) - serializeString(description, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .dialogFilterSuggested(let filter, let description): - return ("dialogFilterSuggested", [("filter", filter), ("description", description)]) - } - } - - public static func parse_dialogFilterSuggested(_ reader: BufferReader) -> DialogFilterSuggested? { - var _1: Api.DialogFilter? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.DialogFilter - } - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.DialogFilterSuggested.dialogFilterSuggested(filter: _1!, description: _2!) - } - else { - return nil - } - } - - } - public enum InputDocument: TypeConstructorDescription { - case inputDocumentEmpty - case inputDocument(id: Int64, accessHash: Int64, fileReference: Buffer) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputDocumentEmpty: - if boxed { - buffer.appendInt32(1928391342) - } - - break - case .inputDocument(let id, let accessHash, let fileReference): - if boxed { - buffer.appendInt32(448771445) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeBytes(fileReference, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputDocumentEmpty: - return ("inputDocumentEmpty", []) - case .inputDocument(let id, let accessHash, let fileReference): - return ("inputDocument", [("id", id), ("accessHash", accessHash), ("fileReference", fileReference)]) - } - } - - public static func parse_inputDocumentEmpty(_ reader: BufferReader) -> InputDocument? { - return Api.InputDocument.inputDocumentEmpty - } - public static func parse_inputDocument(_ reader: BufferReader) -> InputDocument? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int64? - _2 = reader.readInt64() - var _3: Buffer? - _3 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.InputDocument.inputDocument(id: _1!, accessHash: _2!, fileReference: _3!) - } - else { - return nil - } - } - - } - public enum PollAnswer: TypeConstructorDescription { - case pollAnswer(text: String, option: Buffer) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .pollAnswer(let text, let option): - if boxed { - buffer.appendInt32(1823064809) - } - serializeString(text, buffer: buffer, boxed: false) - serializeBytes(option, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .pollAnswer(let text, let option): - return ("pollAnswer", [("text", text), ("option", option)]) - } - } - - public static func parse_pollAnswer(_ reader: BufferReader) -> PollAnswer? { - var _1: String? - _1 = parseString(reader) - var _2: Buffer? - _2 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.PollAnswer.pollAnswer(text: _1!, option: _2!) - } - else { - return nil - } - } - - } - public enum SecureData: TypeConstructorDescription { - case secureData(data: Buffer, dataHash: Buffer, secret: Buffer) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .secureData(let data, let dataHash, let secret): - if boxed { - buffer.appendInt32(-1964327229) - } - serializeBytes(data, buffer: buffer, boxed: false) - serializeBytes(dataHash, buffer: buffer, boxed: false) - serializeBytes(secret, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .secureData(let data, let dataHash, let secret): - return ("secureData", [("data", data), ("dataHash", dataHash), ("secret", secret)]) - } - } - - public static func parse_secureData(_ reader: BufferReader) -> SecureData? { - var _1: Buffer? - _1 = parseBytes(reader) - var _2: Buffer? - _2 = parseBytes(reader) - var _3: Buffer? - _3 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.SecureData.secureData(data: _1!, dataHash: _2!, secret: _3!) - } - else { - return nil - } - } - - } - public enum InputMedia: TypeConstructorDescription { - case inputMediaEmpty - case inputMediaUploadedPhoto(flags: Int32, file: Api.InputFile, stickers: [Api.InputDocument]?, ttlSeconds: Int32?) - case inputMediaPhoto(flags: Int32, id: Api.InputPhoto, ttlSeconds: Int32?) - case inputMediaGeoPoint(geoPoint: Api.InputGeoPoint) - case inputMediaContact(phoneNumber: String, firstName: String, lastName: String, vcard: String) - case inputMediaUploadedDocument(flags: Int32, file: Api.InputFile, thumb: Api.InputFile?, mimeType: String, attributes: [Api.DocumentAttribute], stickers: [Api.InputDocument]?, ttlSeconds: Int32?) - case inputMediaDocument(flags: Int32, id: Api.InputDocument, ttlSeconds: Int32?, query: String?) - case inputMediaVenue(geoPoint: Api.InputGeoPoint, title: String, address: String, provider: String, venueId: String, venueType: String) - case inputMediaPhotoExternal(flags: Int32, url: String, ttlSeconds: Int32?) - case inputMediaDocumentExternal(flags: Int32, url: String, ttlSeconds: Int32?) - case inputMediaGame(id: Api.InputGame) - case inputMediaInvoice(flags: Int32, title: String, description: String, photo: Api.InputWebDocument?, invoice: Api.Invoice, payload: Buffer, provider: String, providerData: Api.DataJSON, startParam: String) - case inputMediaGeoLive(flags: Int32, geoPoint: Api.InputGeoPoint, heading: Int32?, period: Int32?, proximityNotificationRadius: Int32?) - case inputMediaPoll(flags: Int32, poll: Api.Poll, correctAnswers: [Buffer]?, solution: String?, solutionEntities: [Api.MessageEntity]?) - case inputMediaDice(emoticon: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputMediaEmpty: - if boxed { - buffer.appendInt32(-1771768449) - } - - break - case .inputMediaUploadedPhoto(let flags, let file, let stickers, let ttlSeconds): - if boxed { - buffer.appendInt32(505969924) - } - serializeInt32(flags, buffer: buffer, boxed: false) - file.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(stickers!.count)) - for item in stickers! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} - break - case .inputMediaPhoto(let flags, let id, let ttlSeconds): - if boxed { - buffer.appendInt32(-1279654347) - } - serializeInt32(flags, buffer: buffer, boxed: false) - id.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} - break - case .inputMediaGeoPoint(let geoPoint): - if boxed { - buffer.appendInt32(-104578748) - } - geoPoint.serialize(buffer, true) - break - case .inputMediaContact(let phoneNumber, let firstName, let lastName, let vcard): - if boxed { - buffer.appendInt32(-122978821) - } - serializeString(phoneNumber, buffer: buffer, boxed: false) - serializeString(firstName, buffer: buffer, boxed: false) - serializeString(lastName, buffer: buffer, boxed: false) - serializeString(vcard, buffer: buffer, boxed: false) - break - case .inputMediaUploadedDocument(let flags, let file, let thumb, let mimeType, let attributes, let stickers, let ttlSeconds): - if boxed { - buffer.appendInt32(1530447553) - } - serializeInt32(flags, buffer: buffer, boxed: false) - file.serialize(buffer, true) - if Int(flags) & Int(1 << 2) != 0 {thumb!.serialize(buffer, true)} - serializeString(mimeType, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(attributes.count)) - for item in attributes { - item.serialize(buffer, true) - } - if Int(flags) & Int(1 << 0) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(stickers!.count)) - for item in stickers! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} - break - case .inputMediaDocument(let flags, let id, let ttlSeconds, let query): - if boxed { - buffer.appendInt32(860303448) - } - serializeInt32(flags, buffer: buffer, boxed: false) - id.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeString(query!, buffer: buffer, boxed: false)} - break - case .inputMediaVenue(let geoPoint, let title, let address, let provider, let venueId, let venueType): - if boxed { - buffer.appendInt32(-1052959727) - } - geoPoint.serialize(buffer, true) - serializeString(title, buffer: buffer, boxed: false) - serializeString(address, buffer: buffer, boxed: false) - serializeString(provider, buffer: buffer, boxed: false) - serializeString(venueId, buffer: buffer, boxed: false) - serializeString(venueType, buffer: buffer, boxed: false) - break - case .inputMediaPhotoExternal(let flags, let url, let ttlSeconds): - if boxed { - buffer.appendInt32(-440664550) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(url, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} - break - case .inputMediaDocumentExternal(let flags, let url, let ttlSeconds): - if boxed { - buffer.appendInt32(-78455655) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(url, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} - break - case .inputMediaGame(let id): - if boxed { - buffer.appendInt32(-750828557) - } - id.serialize(buffer, true) - break - case .inputMediaInvoice(let flags, let title, let description, let photo, let invoice, let payload, let provider, let providerData, let startParam): - if boxed { - buffer.appendInt32(-186607933) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(title, buffer: buffer, boxed: false) - serializeString(description, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {photo!.serialize(buffer, true)} - invoice.serialize(buffer, true) - serializeBytes(payload, buffer: buffer, boxed: false) - serializeString(provider, buffer: buffer, boxed: false) - providerData.serialize(buffer, true) - serializeString(startParam, buffer: buffer, boxed: false) - break - case .inputMediaGeoLive(let flags, let geoPoint, let heading, let period, let proximityNotificationRadius): - if boxed { - buffer.appendInt32(-1759532989) - } - serializeInt32(flags, buffer: buffer, boxed: false) - geoPoint.serialize(buffer, true) - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(heading!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(period!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeInt32(proximityNotificationRadius!, buffer: buffer, boxed: false)} - break - case .inputMediaPoll(let flags, let poll, let correctAnswers, let solution, let solutionEntities): - if boxed { - buffer.appendInt32(261416433) - } - serializeInt32(flags, buffer: buffer, boxed: false) - poll.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(correctAnswers!.count)) - for item in correctAnswers! { - serializeBytes(item, buffer: buffer, boxed: false) - }} - if Int(flags) & Int(1 << 1) != 0 {serializeString(solution!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(solutionEntities!.count)) - for item in solutionEntities! { - item.serialize(buffer, true) - }} - break - case .inputMediaDice(let emoticon): - if boxed { - buffer.appendInt32(-428884101) - } - serializeString(emoticon, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputMediaEmpty: - return ("inputMediaEmpty", []) - case .inputMediaUploadedPhoto(let flags, let file, let stickers, let ttlSeconds): - return ("inputMediaUploadedPhoto", [("flags", flags), ("file", file), ("stickers", stickers), ("ttlSeconds", ttlSeconds)]) - case .inputMediaPhoto(let flags, let id, let ttlSeconds): - return ("inputMediaPhoto", [("flags", flags), ("id", id), ("ttlSeconds", ttlSeconds)]) - case .inputMediaGeoPoint(let geoPoint): - return ("inputMediaGeoPoint", [("geoPoint", geoPoint)]) - case .inputMediaContact(let phoneNumber, let firstName, let lastName, let vcard): - return ("inputMediaContact", [("phoneNumber", phoneNumber), ("firstName", firstName), ("lastName", lastName), ("vcard", vcard)]) - case .inputMediaUploadedDocument(let flags, let file, let thumb, let mimeType, let attributes, let stickers, let ttlSeconds): - return ("inputMediaUploadedDocument", [("flags", flags), ("file", file), ("thumb", thumb), ("mimeType", mimeType), ("attributes", attributes), ("stickers", stickers), ("ttlSeconds", ttlSeconds)]) - case .inputMediaDocument(let flags, let id, let ttlSeconds, let query): - return ("inputMediaDocument", [("flags", flags), ("id", id), ("ttlSeconds", ttlSeconds), ("query", query)]) - case .inputMediaVenue(let geoPoint, let title, let address, let provider, let venueId, let venueType): - return ("inputMediaVenue", [("geoPoint", geoPoint), ("title", title), ("address", address), ("provider", provider), ("venueId", venueId), ("venueType", venueType)]) - case .inputMediaPhotoExternal(let flags, let url, let ttlSeconds): - return ("inputMediaPhotoExternal", [("flags", flags), ("url", url), ("ttlSeconds", ttlSeconds)]) - case .inputMediaDocumentExternal(let flags, let url, let ttlSeconds): - return ("inputMediaDocumentExternal", [("flags", flags), ("url", url), ("ttlSeconds", ttlSeconds)]) - case .inputMediaGame(let id): - return ("inputMediaGame", [("id", id)]) - case .inputMediaInvoice(let flags, let title, let description, let photo, let invoice, let payload, let provider, let providerData, let startParam): - return ("inputMediaInvoice", [("flags", flags), ("title", title), ("description", description), ("photo", photo), ("invoice", invoice), ("payload", payload), ("provider", provider), ("providerData", providerData), ("startParam", startParam)]) - case .inputMediaGeoLive(let flags, let geoPoint, let heading, let period, let proximityNotificationRadius): - return ("inputMediaGeoLive", [("flags", flags), ("geoPoint", geoPoint), ("heading", heading), ("period", period), ("proximityNotificationRadius", proximityNotificationRadius)]) - case .inputMediaPoll(let flags, let poll, let correctAnswers, let solution, let solutionEntities): - return ("inputMediaPoll", [("flags", flags), ("poll", poll), ("correctAnswers", correctAnswers), ("solution", solution), ("solutionEntities", solutionEntities)]) - case .inputMediaDice(let emoticon): - return ("inputMediaDice", [("emoticon", emoticon)]) - } - } - - public static func parse_inputMediaEmpty(_ reader: BufferReader) -> InputMedia? { - return Api.InputMedia.inputMediaEmpty - } - public static func parse_inputMediaUploadedPhoto(_ reader: BufferReader) -> InputMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.InputFile? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.InputFile - } - var _3: [Api.InputDocument]? - if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputDocument.self) - } } - var _4: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputMedia.inputMediaUploadedPhoto(flags: _1!, file: _2!, stickers: _3, ttlSeconds: _4) - } - else { - return nil - } - } - public static func parse_inputMediaPhoto(_ reader: BufferReader) -> InputMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.InputPhoto? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.InputPhoto - } - var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.InputMedia.inputMediaPhoto(flags: _1!, id: _2!, ttlSeconds: _3) - } - else { - return nil - } - } - public static func parse_inputMediaGeoPoint(_ reader: BufferReader) -> InputMedia? { - var _1: Api.InputGeoPoint? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputGeoPoint - } - let _c1 = _1 != nil - if _c1 { - return Api.InputMedia.inputMediaGeoPoint(geoPoint: _1!) - } - else { - return nil - } - } - public static func parse_inputMediaContact(_ reader: BufferReader) -> InputMedia? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputMedia.inputMediaContact(phoneNumber: _1!, firstName: _2!, lastName: _3!, vcard: _4!) - } - else { - return nil - } - } - public static func parse_inputMediaUploadedDocument(_ reader: BufferReader) -> InputMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.InputFile? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.InputFile - } - var _3: Api.InputFile? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.InputFile - } } - var _4: String? - _4 = parseString(reader) - var _5: [Api.DocumentAttribute]? - if let _ = reader.readInt32() { - _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DocumentAttribute.self) - } - var _6: [Api.InputDocument]? - if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { - _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputDocument.self) - } } - var _7: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_7 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.InputMedia.inputMediaUploadedDocument(flags: _1!, file: _2!, thumb: _3, mimeType: _4!, attributes: _5!, stickers: _6, ttlSeconds: _7) - } - else { - return nil - } - } - public static func parse_inputMediaDocument(_ reader: BufferReader) -> InputMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.InputDocument? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.InputDocument - } - var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } - var _4: String? - if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputMedia.inputMediaDocument(flags: _1!, id: _2!, ttlSeconds: _3, query: _4) - } - else { - return nil - } - } - public static func parse_inputMediaVenue(_ reader: BufferReader) -> InputMedia? { - var _1: Api.InputGeoPoint? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputGeoPoint - } - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - var _5: String? - _5 = parseString(reader) - var _6: String? - _6 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.InputMedia.inputMediaVenue(geoPoint: _1!, title: _2!, address: _3!, provider: _4!, venueId: _5!, venueType: _6!) - } - else { - return nil - } - } - public static func parse_inputMediaPhotoExternal(_ reader: BufferReader) -> InputMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.InputMedia.inputMediaPhotoExternal(flags: _1!, url: _2!, ttlSeconds: _3) - } - else { - return nil - } - } - public static func parse_inputMediaDocumentExternal(_ reader: BufferReader) -> InputMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.InputMedia.inputMediaDocumentExternal(flags: _1!, url: _2!, ttlSeconds: _3) - } - else { - return nil - } - } - public static func parse_inputMediaGame(_ reader: BufferReader) -> InputMedia? { - var _1: Api.InputGame? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputGame - } - let _c1 = _1 != nil - if _c1 { - return Api.InputMedia.inputMediaGame(id: _1!) - } - else { - return nil - } - } - public static func parse_inputMediaInvoice(_ reader: BufferReader) -> InputMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: Api.InputWebDocument? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.InputWebDocument - } } - var _5: Api.Invoice? - if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.Invoice - } - var _6: Buffer? - _6 = parseBytes(reader) - var _7: String? - _7 = parseString(reader) - var _8: Api.DataJSON? - if let signature = reader.readInt32() { - _8 = Api.parse(reader, signature: signature) as? Api.DataJSON - } - var _9: String? - _9 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = _8 != nil - let _c9 = _9 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { - return Api.InputMedia.inputMediaInvoice(flags: _1!, title: _2!, description: _3!, photo: _4, invoice: _5!, payload: _6!, provider: _7!, providerData: _8!, startParam: _9!) - } - else { - return nil - } - } - public static func parse_inputMediaGeoLive(_ reader: BufferReader) -> InputMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.InputGeoPoint? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.InputGeoPoint - } - var _3: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_3 = reader.readInt32() } - var _4: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt32() } - var _5: Int32? - if Int(_1!) & Int(1 << 3) != 0 {_5 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.InputMedia.inputMediaGeoLive(flags: _1!, geoPoint: _2!, heading: _3, period: _4, proximityNotificationRadius: _5) - } - else { - return nil - } - } - public static func parse_inputMediaPoll(_ reader: BufferReader) -> InputMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.Poll? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Poll - } - var _3: [Buffer]? - if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: -1255641564, elementType: Buffer.self) - } } - var _4: String? - if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } - var _5: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { - _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.InputMedia.inputMediaPoll(flags: _1!, poll: _2!, correctAnswers: _3, solution: _4, solutionEntities: _5) - } - else { - return nil - } - } - public static func parse_inputMediaDice(_ reader: BufferReader) -> InputMedia? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.InputMedia.inputMediaDice(emoticon: _1!) - } - else { - return nil - } - } - - } - indirect public enum InputPeer: TypeConstructorDescription { - case inputPeerEmpty - case inputPeerSelf - case inputPeerChat(chatId: Int32) - case inputPeerUser(userId: Int32, accessHash: Int64) - case inputPeerChannel(channelId: Int32, accessHash: Int64) - case inputPeerUserFromMessage(peer: Api.InputPeer, msgId: Int32, userId: Int32) - case inputPeerChannelFromMessage(peer: Api.InputPeer, msgId: Int32, channelId: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputPeerEmpty: - if boxed { - buffer.appendInt32(2134579434) - } - - break - case .inputPeerSelf: - if boxed { - buffer.appendInt32(2107670217) - } - - break - case .inputPeerChat(let chatId): - if boxed { - buffer.appendInt32(396093539) - } - serializeInt32(chatId, buffer: buffer, boxed: false) - break - case .inputPeerUser(let userId, let accessHash): - if boxed { - buffer.appendInt32(2072935910) - } - serializeInt32(userId, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - break - case .inputPeerChannel(let channelId, let accessHash): - if boxed { - buffer.appendInt32(548253432) - } - serializeInt32(channelId, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - break - case .inputPeerUserFromMessage(let peer, let msgId, let userId): - if boxed { - buffer.appendInt32(398123750) - } - peer.serialize(buffer, true) - serializeInt32(msgId, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - break - case .inputPeerChannelFromMessage(let peer, let msgId, let channelId): - if boxed { - buffer.appendInt32(-1667893317) - } - peer.serialize(buffer, true) - serializeInt32(msgId, buffer: buffer, boxed: false) - serializeInt32(channelId, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputPeerEmpty: - return ("inputPeerEmpty", []) - case .inputPeerSelf: - return ("inputPeerSelf", []) - case .inputPeerChat(let chatId): - return ("inputPeerChat", [("chatId", chatId)]) - case .inputPeerUser(let userId, let accessHash): - return ("inputPeerUser", [("userId", userId), ("accessHash", accessHash)]) - case .inputPeerChannel(let channelId, let accessHash): - return ("inputPeerChannel", [("channelId", channelId), ("accessHash", accessHash)]) - case .inputPeerUserFromMessage(let peer, let msgId, let userId): - return ("inputPeerUserFromMessage", [("peer", peer), ("msgId", msgId), ("userId", userId)]) - case .inputPeerChannelFromMessage(let peer, let msgId, let channelId): - return ("inputPeerChannelFromMessage", [("peer", peer), ("msgId", msgId), ("channelId", channelId)]) - } - } - - public static func parse_inputPeerEmpty(_ reader: BufferReader) -> InputPeer? { - return Api.InputPeer.inputPeerEmpty - } - public static func parse_inputPeerSelf(_ reader: BufferReader) -> InputPeer? { - return Api.InputPeer.inputPeerSelf - } - public static func parse_inputPeerChat(_ reader: BufferReader) -> InputPeer? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.InputPeer.inputPeerChat(chatId: _1!) - } - else { - return nil - } - } - public static func parse_inputPeerUser(_ reader: BufferReader) -> InputPeer? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputPeer.inputPeerUser(userId: _1!, accessHash: _2!) - } - else { - return nil - } - } - public static func parse_inputPeerChannel(_ reader: BufferReader) -> InputPeer? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputPeer.inputPeerChannel(channelId: _1!, accessHash: _2!) - } - else { - return nil - } - } - public static func parse_inputPeerUserFromMessage(_ reader: BufferReader) -> InputPeer? { - var _1: Api.InputPeer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputPeer - } - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.InputPeer.inputPeerUserFromMessage(peer: _1!, msgId: _2!, userId: _3!) - } - else { - return nil - } - } - public static func parse_inputPeerChannelFromMessage(_ reader: BufferReader) -> InputPeer? { - var _1: Api.InputPeer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputPeer - } - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.InputPeer.inputPeerChannelFromMessage(peer: _1!, msgId: _2!, channelId: _3!) - } - else { - return nil - } - } - - } - public enum Contact: TypeConstructorDescription { - case contact(userId: Int32, mutual: Api.Bool) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .contact(let userId, let mutual): - if boxed { - buffer.appendInt32(-116274796) - } - serializeInt32(userId, buffer: buffer, boxed: false) - mutual.serialize(buffer, true) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .contact(let userId, let mutual): - return ("contact", [("userId", userId), ("mutual", mutual)]) - } - } - - public static func parse_contact(_ reader: BufferReader) -> Contact? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.Bool? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Bool - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Contact.contact(userId: _1!, mutual: _2!) - } - else { - return nil - } - } - - } - public enum FileHash: TypeConstructorDescription { - case fileHash(offset: Int32, limit: Int32, hash: Buffer) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .fileHash(let offset, let limit, let hash): - if boxed { - buffer.appendInt32(1648543603) - } - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(limit, buffer: buffer, boxed: false) - serializeBytes(hash, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .fileHash(let offset, let limit, let hash): - return ("fileHash", [("offset", offset), ("limit", limit), ("hash", hash)]) - } - } - - public static func parse_fileHash(_ reader: BufferReader) -> FileHash? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Buffer? - _3 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.FileHash.fileHash(offset: _1!, limit: _2!, hash: _3!) - } - else { - return nil - } - } - - } - public enum BotInlineResult: TypeConstructorDescription { - case botInlineResult(flags: Int32, id: String, type: String, title: String?, description: String?, url: String?, thumb: Api.WebDocument?, content: Api.WebDocument?, sendMessage: Api.BotInlineMessage) - case botInlineMediaResult(flags: Int32, id: String, type: String, photo: Api.Photo?, document: Api.Document?, title: String?, description: String?, sendMessage: Api.BotInlineMessage) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .botInlineResult(let flags, let id, let type, let title, let description, let url, let thumb, let content, let sendMessage): - if boxed { - buffer.appendInt32(295067450) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(id, buffer: buffer, boxed: false) - serializeString(type, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeString(title!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeString(description!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeString(url!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 4) != 0 {thumb!.serialize(buffer, true)} - if Int(flags) & Int(1 << 5) != 0 {content!.serialize(buffer, true)} - sendMessage.serialize(buffer, true) - break - case .botInlineMediaResult(let flags, let id, let type, let photo, let document, let title, let description, let sendMessage): - if boxed { - buffer.appendInt32(400266251) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(id, buffer: buffer, boxed: false) - serializeString(type, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {photo!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {document!.serialize(buffer, true)} - if Int(flags) & Int(1 << 2) != 0 {serializeString(title!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeString(description!, buffer: buffer, boxed: false)} - sendMessage.serialize(buffer, true) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .botInlineResult(let flags, let id, let type, let title, let description, let url, let thumb, let content, let sendMessage): - return ("botInlineResult", [("flags", flags), ("id", id), ("type", type), ("title", title), ("description", description), ("url", url), ("thumb", thumb), ("content", content), ("sendMessage", sendMessage)]) - case .botInlineMediaResult(let flags, let id, let type, let photo, let document, let title, let description, let sendMessage): - return ("botInlineMediaResult", [("flags", flags), ("id", id), ("type", type), ("photo", photo), ("document", document), ("title", title), ("description", description), ("sendMessage", sendMessage)]) - } - } - - public static func parse_botInlineResult(_ reader: BufferReader) -> BotInlineResult? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: String? - if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } - var _5: String? - if Int(_1!) & Int(1 << 2) != 0 {_5 = parseString(reader) } - var _6: String? - if Int(_1!) & Int(1 << 3) != 0 {_6 = parseString(reader) } - var _7: Api.WebDocument? - if Int(_1!) & Int(1 << 4) != 0 {if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.WebDocument - } } - var _8: Api.WebDocument? - if Int(_1!) & Int(1 << 5) != 0 {if let signature = reader.readInt32() { - _8 = Api.parse(reader, signature: signature) as? Api.WebDocument - } } - var _9: Api.BotInlineMessage? - if let signature = reader.readInt32() { - _9 = Api.parse(reader, signature: signature) as? Api.BotInlineMessage - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 5) == 0) || _8 != nil - let _c9 = _9 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { - return Api.BotInlineResult.botInlineResult(flags: _1!, id: _2!, type: _3!, title: _4, description: _5, url: _6, thumb: _7, content: _8, sendMessage: _9!) - } - else { - return nil - } - } - public static func parse_botInlineMediaResult(_ reader: BufferReader) -> BotInlineResult? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: Api.Photo? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.Photo - } } - var _5: Api.Document? - if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.Document - } } - var _6: String? - if Int(_1!) & Int(1 << 2) != 0 {_6 = parseString(reader) } - var _7: String? - if Int(_1!) & Int(1 << 3) != 0 {_7 = parseString(reader) } - var _8: Api.BotInlineMessage? - if let signature = reader.readInt32() { - _8 = Api.parse(reader, signature: signature) as? Api.BotInlineMessage - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil - let _c8 = _8 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { - return Api.BotInlineResult.botInlineMediaResult(flags: _1!, id: _2!, type: _3!, photo: _4, document: _5, title: _6, description: _7, sendMessage: _8!) - } - else { - return nil - } - } - - } - public enum InputGroupCall: TypeConstructorDescription { - case inputGroupCall(id: Int64, accessHash: Int64) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputGroupCall(let id, let accessHash): - if boxed { - buffer.appendInt32(-659913713) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputGroupCall(let id, let accessHash): - return ("inputGroupCall", [("id", id), ("accessHash", accessHash)]) - } - } - - public static func parse_inputGroupCall(_ reader: BufferReader) -> InputGroupCall? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputGroupCall.inputGroupCall(id: _1!, accessHash: _2!) - } - else { - return nil - } - } - - } - public enum InputSingleMedia: TypeConstructorDescription { - case inputSingleMedia(flags: Int32, media: Api.InputMedia, randomId: Int64, message: String, entities: [Api.MessageEntity]?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputSingleMedia(let flags, let media, let randomId, let message, let entities): - if boxed { - buffer.appendInt32(482797855) - } - serializeInt32(flags, buffer: buffer, boxed: false) - media.serialize(buffer, true) - serializeInt64(randomId, buffer: buffer, boxed: false) - serializeString(message, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities!.count)) - for item in entities! { - item.serialize(buffer, true) - }} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputSingleMedia(let flags, let media, let randomId, let message, let entities): - return ("inputSingleMedia", [("flags", flags), ("media", media), ("randomId", randomId), ("message", message), ("entities", entities)]) - } - } - - public static func parse_inputSingleMedia(_ reader: BufferReader) -> InputSingleMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.InputMedia? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.InputMedia - } - var _3: Int64? - _3 = reader.readInt64() - var _4: String? - _4 = parseString(reader) - var _5: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { - _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.InputSingleMedia.inputSingleMedia(flags: _1!, media: _2!, randomId: _3!, message: _4!, entities: _5) - } - else { - return nil - } - } - - } - public enum MessageViews: TypeConstructorDescription { - case messageViews(flags: Int32, views: Int32?, forwards: Int32?, replies: Api.MessageReplies?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .messageViews(let flags, let views, let forwards, let replies): - if boxed { - buffer.appendInt32(1163625789) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(views!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(forwards!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {replies!.serialize(buffer, true)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .messageViews(let flags, let views, let forwards, let replies): - return ("messageViews", [("flags", flags), ("views", views), ("forwards", forwards), ("replies", replies)]) - } - } - - public static func parse_messageViews(_ reader: BufferReader) -> MessageViews? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } - var _3: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_3 = reader.readInt32() } - var _4: Api.MessageReplies? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.MessageReplies - } } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.MessageViews.messageViews(flags: _1!, views: _2, forwards: _3, replies: _4) - } - else { - return nil - } - } - - } - public enum InputPrivacyRule: TypeConstructorDescription { - case inputPrivacyValueAllowContacts - case inputPrivacyValueAllowAll - case inputPrivacyValueAllowUsers(users: [Api.InputUser]) - case inputPrivacyValueDisallowContacts - case inputPrivacyValueDisallowAll - case inputPrivacyValueDisallowUsers(users: [Api.InputUser]) - case inputPrivacyValueAllowChatParticipants(chats: [Int32]) - case inputPrivacyValueDisallowChatParticipants(chats: [Int32]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputPrivacyValueAllowContacts: - if boxed { - buffer.appendInt32(218751099) - } - - break - case .inputPrivacyValueAllowAll: - if boxed { - buffer.appendInt32(407582158) - } - - break - case .inputPrivacyValueAllowUsers(let users): - if boxed { - buffer.appendInt32(320652927) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - break - case .inputPrivacyValueDisallowContacts: - if boxed { - buffer.appendInt32(195371015) - } - - break - case .inputPrivacyValueDisallowAll: - if boxed { - buffer.appendInt32(-697604407) - } - - break - case .inputPrivacyValueDisallowUsers(let users): - if boxed { - buffer.appendInt32(-1877932953) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - break - case .inputPrivacyValueAllowChatParticipants(let chats): - if boxed { - buffer.appendInt32(1283572154) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(chats.count)) - for item in chats { - serializeInt32(item, buffer: buffer, boxed: false) - } - break - case .inputPrivacyValueDisallowChatParticipants(let chats): - if boxed { - buffer.appendInt32(-668769361) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(chats.count)) - for item in chats { - serializeInt32(item, buffer: buffer, boxed: false) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputPrivacyValueAllowContacts: - return ("inputPrivacyValueAllowContacts", []) - case .inputPrivacyValueAllowAll: - return ("inputPrivacyValueAllowAll", []) - case .inputPrivacyValueAllowUsers(let users): - return ("inputPrivacyValueAllowUsers", [("users", users)]) - case .inputPrivacyValueDisallowContacts: - return ("inputPrivacyValueDisallowContacts", []) - case .inputPrivacyValueDisallowAll: - return ("inputPrivacyValueDisallowAll", []) - case .inputPrivacyValueDisallowUsers(let users): - return ("inputPrivacyValueDisallowUsers", [("users", users)]) - case .inputPrivacyValueAllowChatParticipants(let chats): - return ("inputPrivacyValueAllowChatParticipants", [("chats", chats)]) - case .inputPrivacyValueDisallowChatParticipants(let chats): - return ("inputPrivacyValueDisallowChatParticipants", [("chats", chats)]) - } - } - - public static func parse_inputPrivacyValueAllowContacts(_ reader: BufferReader) -> InputPrivacyRule? { - return Api.InputPrivacyRule.inputPrivacyValueAllowContacts - } - public static func parse_inputPrivacyValueAllowAll(_ reader: BufferReader) -> InputPrivacyRule? { - return Api.InputPrivacyRule.inputPrivacyValueAllowAll - } - public static func parse_inputPrivacyValueAllowUsers(_ reader: BufferReader) -> InputPrivacyRule? { - var _1: [Api.InputUser]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputUser.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.InputPrivacyRule.inputPrivacyValueAllowUsers(users: _1!) - } - else { - return nil - } - } - public static func parse_inputPrivacyValueDisallowContacts(_ reader: BufferReader) -> InputPrivacyRule? { - return Api.InputPrivacyRule.inputPrivacyValueDisallowContacts - } - public static func parse_inputPrivacyValueDisallowAll(_ reader: BufferReader) -> InputPrivacyRule? { - return Api.InputPrivacyRule.inputPrivacyValueDisallowAll - } - public static func parse_inputPrivacyValueDisallowUsers(_ reader: BufferReader) -> InputPrivacyRule? { - var _1: [Api.InputUser]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputUser.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.InputPrivacyRule.inputPrivacyValueDisallowUsers(users: _1!) - } - else { - return nil - } - } - public static func parse_inputPrivacyValueAllowChatParticipants(_ reader: BufferReader) -> InputPrivacyRule? { - var _1: [Int32]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.InputPrivacyRule.inputPrivacyValueAllowChatParticipants(chats: _1!) - } - else { - return nil - } - } - public static func parse_inputPrivacyValueDisallowChatParticipants(_ reader: BufferReader) -> InputPrivacyRule? { - var _1: [Int32]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.InputPrivacyRule.inputPrivacyValueDisallowChatParticipants(chats: _1!) - } - else { - return nil - } - } - - } - public enum ChannelAdminLogEventAction: TypeConstructorDescription { - case channelAdminLogEventActionChangeTitle(prevValue: String, newValue: String) - case channelAdminLogEventActionChangeAbout(prevValue: String, newValue: String) - case channelAdminLogEventActionChangeUsername(prevValue: String, newValue: String) - case channelAdminLogEventActionChangePhoto(prevPhoto: Api.Photo, newPhoto: Api.Photo) - case channelAdminLogEventActionToggleInvites(newValue: Api.Bool) - case channelAdminLogEventActionToggleSignatures(newValue: Api.Bool) - case channelAdminLogEventActionUpdatePinned(message: Api.Message) - case channelAdminLogEventActionEditMessage(prevMessage: Api.Message, newMessage: Api.Message) - case channelAdminLogEventActionDeleteMessage(message: Api.Message) - case channelAdminLogEventActionParticipantJoin - case channelAdminLogEventActionParticipantLeave - case channelAdminLogEventActionParticipantInvite(participant: Api.ChannelParticipant) - case channelAdminLogEventActionParticipantToggleBan(prevParticipant: Api.ChannelParticipant, newParticipant: Api.ChannelParticipant) - case channelAdminLogEventActionParticipantToggleAdmin(prevParticipant: Api.ChannelParticipant, newParticipant: Api.ChannelParticipant) - case channelAdminLogEventActionChangeStickerSet(prevStickerset: Api.InputStickerSet, newStickerset: Api.InputStickerSet) - case channelAdminLogEventActionTogglePreHistoryHidden(newValue: Api.Bool) - case channelAdminLogEventActionDefaultBannedRights(prevBannedRights: Api.ChatBannedRights, newBannedRights: Api.ChatBannedRights) - case channelAdminLogEventActionStopPoll(message: Api.Message) - case channelAdminLogEventActionChangeLinkedChat(prevValue: Int32, newValue: Int32) - case channelAdminLogEventActionChangeLocation(prevValue: Api.ChannelLocation, newValue: Api.ChannelLocation) - case channelAdminLogEventActionToggleSlowMode(prevValue: Int32, newValue: Int32) - case channelAdminLogEventActionStartGroupCall(call: Api.InputGroupCall) - case channelAdminLogEventActionDiscardGroupCall(call: Api.InputGroupCall) - case channelAdminLogEventActionParticipantMute(participant: Api.GroupCallParticipant) - case channelAdminLogEventActionParticipantUnmute(participant: Api.GroupCallParticipant) - case channelAdminLogEventActionToggleGroupCallSetting(joinMuted: Api.Bool) - case channelAdminLogEventActionParticipantJoinByInvite(invite: Api.ExportedChatInvite) - case channelAdminLogEventActionExportedInviteDelete(invite: Api.ExportedChatInvite) - case channelAdminLogEventActionExportedInviteRevoke(invite: Api.ExportedChatInvite) - case channelAdminLogEventActionExportedInviteEdit(prevInvite: Api.ExportedChatInvite, newInvite: Api.ExportedChatInvite) - case channelAdminLogEventActionParticipantVolume(participant: Api.GroupCallParticipant) - case channelAdminLogEventActionChangeHistoryTTL(prevValue: Int32, newValue: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .channelAdminLogEventActionChangeTitle(let prevValue, let newValue): - if boxed { - buffer.appendInt32(-421545947) - } - serializeString(prevValue, buffer: buffer, boxed: false) - serializeString(newValue, buffer: buffer, boxed: false) - break - case .channelAdminLogEventActionChangeAbout(let prevValue, let newValue): - if boxed { - buffer.appendInt32(1427671598) - } - serializeString(prevValue, buffer: buffer, boxed: false) - serializeString(newValue, buffer: buffer, boxed: false) - break - case .channelAdminLogEventActionChangeUsername(let prevValue, let newValue): - if boxed { - buffer.appendInt32(1783299128) - } - serializeString(prevValue, buffer: buffer, boxed: false) - serializeString(newValue, buffer: buffer, boxed: false) - break - case .channelAdminLogEventActionChangePhoto(let prevPhoto, let newPhoto): - if boxed { - buffer.appendInt32(1129042607) - } - prevPhoto.serialize(buffer, true) - newPhoto.serialize(buffer, true) - break - case .channelAdminLogEventActionToggleInvites(let newValue): - if boxed { - buffer.appendInt32(460916654) - } - newValue.serialize(buffer, true) - break - case .channelAdminLogEventActionToggleSignatures(let newValue): - if boxed { - buffer.appendInt32(648939889) - } - newValue.serialize(buffer, true) - break - case .channelAdminLogEventActionUpdatePinned(let message): - if boxed { - buffer.appendInt32(-370660328) - } - message.serialize(buffer, true) - break - case .channelAdminLogEventActionEditMessage(let prevMessage, let newMessage): - if boxed { - buffer.appendInt32(1889215493) - } - prevMessage.serialize(buffer, true) - newMessage.serialize(buffer, true) - break - case .channelAdminLogEventActionDeleteMessage(let message): - if boxed { - buffer.appendInt32(1121994683) - } - message.serialize(buffer, true) - break - case .channelAdminLogEventActionParticipantJoin: - if boxed { - buffer.appendInt32(405815507) - } - - break - case .channelAdminLogEventActionParticipantLeave: - if boxed { - buffer.appendInt32(-124291086) - } - - break - case .channelAdminLogEventActionParticipantInvite(let participant): - if boxed { - buffer.appendInt32(-484690728) - } - participant.serialize(buffer, true) - break - case .channelAdminLogEventActionParticipantToggleBan(let prevParticipant, let newParticipant): - if boxed { - buffer.appendInt32(-422036098) - } - prevParticipant.serialize(buffer, true) - newParticipant.serialize(buffer, true) - break - case .channelAdminLogEventActionParticipantToggleAdmin(let prevParticipant, let newParticipant): - if boxed { - buffer.appendInt32(-714643696) - } - prevParticipant.serialize(buffer, true) - newParticipant.serialize(buffer, true) - break - case .channelAdminLogEventActionChangeStickerSet(let prevStickerset, let newStickerset): - if boxed { - buffer.appendInt32(-1312568665) - } - prevStickerset.serialize(buffer, true) - newStickerset.serialize(buffer, true) - break - case .channelAdminLogEventActionTogglePreHistoryHidden(let newValue): - if boxed { - buffer.appendInt32(1599903217) - } - newValue.serialize(buffer, true) - break - case .channelAdminLogEventActionDefaultBannedRights(let prevBannedRights, let newBannedRights): - if boxed { - buffer.appendInt32(771095562) - } - prevBannedRights.serialize(buffer, true) - newBannedRights.serialize(buffer, true) - break - case .channelAdminLogEventActionStopPoll(let message): - if boxed { - buffer.appendInt32(-1895328189) - } - message.serialize(buffer, true) - break - case .channelAdminLogEventActionChangeLinkedChat(let prevValue, let newValue): - if boxed { - buffer.appendInt32(-1569748965) - } - serializeInt32(prevValue, buffer: buffer, boxed: false) - serializeInt32(newValue, buffer: buffer, boxed: false) - break - case .channelAdminLogEventActionChangeLocation(let prevValue, let newValue): - if boxed { - buffer.appendInt32(241923758) - } - prevValue.serialize(buffer, true) - newValue.serialize(buffer, true) - break - case .channelAdminLogEventActionToggleSlowMode(let prevValue, let newValue): - if boxed { - buffer.appendInt32(1401984889) - } - serializeInt32(prevValue, buffer: buffer, boxed: false) - serializeInt32(newValue, buffer: buffer, boxed: false) - break - case .channelAdminLogEventActionStartGroupCall(let call): - if boxed { - buffer.appendInt32(589338437) - } - call.serialize(buffer, true) - break - case .channelAdminLogEventActionDiscardGroupCall(let call): - if boxed { - buffer.appendInt32(-610299584) - } - call.serialize(buffer, true) - break - case .channelAdminLogEventActionParticipantMute(let participant): - if boxed { - buffer.appendInt32(-115071790) - } - participant.serialize(buffer, true) - break - case .channelAdminLogEventActionParticipantUnmute(let participant): - if boxed { - buffer.appendInt32(-431740480) - } - participant.serialize(buffer, true) - break - case .channelAdminLogEventActionToggleGroupCallSetting(let joinMuted): - if boxed { - buffer.appendInt32(1456906823) - } - joinMuted.serialize(buffer, true) - break - case .channelAdminLogEventActionParticipantJoinByInvite(let invite): - if boxed { - buffer.appendInt32(1557846647) - } - invite.serialize(buffer, true) - break - case .channelAdminLogEventActionExportedInviteDelete(let invite): - if boxed { - buffer.appendInt32(1515256996) - } - invite.serialize(buffer, true) - break - case .channelAdminLogEventActionExportedInviteRevoke(let invite): - if boxed { - buffer.appendInt32(1091179342) - } - invite.serialize(buffer, true) - break - case .channelAdminLogEventActionExportedInviteEdit(let prevInvite, let newInvite): - if boxed { - buffer.appendInt32(-384910503) - } - prevInvite.serialize(buffer, true) - newInvite.serialize(buffer, true) - break - case .channelAdminLogEventActionParticipantVolume(let participant): - if boxed { - buffer.appendInt32(1048537159) - } - participant.serialize(buffer, true) - break - case .channelAdminLogEventActionChangeHistoryTTL(let prevValue, let newValue): - if boxed { - buffer.appendInt32(1855199800) - } - serializeInt32(prevValue, buffer: buffer, boxed: false) - serializeInt32(newValue, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .channelAdminLogEventActionChangeTitle(let prevValue, let newValue): - return ("channelAdminLogEventActionChangeTitle", [("prevValue", prevValue), ("newValue", newValue)]) - case .channelAdminLogEventActionChangeAbout(let prevValue, let newValue): - return ("channelAdminLogEventActionChangeAbout", [("prevValue", prevValue), ("newValue", newValue)]) - case .channelAdminLogEventActionChangeUsername(let prevValue, let newValue): - return ("channelAdminLogEventActionChangeUsername", [("prevValue", prevValue), ("newValue", newValue)]) - case .channelAdminLogEventActionChangePhoto(let prevPhoto, let newPhoto): - return ("channelAdminLogEventActionChangePhoto", [("prevPhoto", prevPhoto), ("newPhoto", newPhoto)]) - case .channelAdminLogEventActionToggleInvites(let newValue): - return ("channelAdminLogEventActionToggleInvites", [("newValue", newValue)]) - case .channelAdminLogEventActionToggleSignatures(let newValue): - return ("channelAdminLogEventActionToggleSignatures", [("newValue", newValue)]) - case .channelAdminLogEventActionUpdatePinned(let message): - return ("channelAdminLogEventActionUpdatePinned", [("message", message)]) - case .channelAdminLogEventActionEditMessage(let prevMessage, let newMessage): - return ("channelAdminLogEventActionEditMessage", [("prevMessage", prevMessage), ("newMessage", newMessage)]) - case .channelAdminLogEventActionDeleteMessage(let message): - return ("channelAdminLogEventActionDeleteMessage", [("message", message)]) - case .channelAdminLogEventActionParticipantJoin: - return ("channelAdminLogEventActionParticipantJoin", []) - case .channelAdminLogEventActionParticipantLeave: - return ("channelAdminLogEventActionParticipantLeave", []) - case .channelAdminLogEventActionParticipantInvite(let participant): - return ("channelAdminLogEventActionParticipantInvite", [("participant", participant)]) - case .channelAdminLogEventActionParticipantToggleBan(let prevParticipant, let newParticipant): - return ("channelAdminLogEventActionParticipantToggleBan", [("prevParticipant", prevParticipant), ("newParticipant", newParticipant)]) - case .channelAdminLogEventActionParticipantToggleAdmin(let prevParticipant, let newParticipant): - return ("channelAdminLogEventActionParticipantToggleAdmin", [("prevParticipant", prevParticipant), ("newParticipant", newParticipant)]) - case .channelAdminLogEventActionChangeStickerSet(let prevStickerset, let newStickerset): - return ("channelAdminLogEventActionChangeStickerSet", [("prevStickerset", prevStickerset), ("newStickerset", newStickerset)]) - case .channelAdminLogEventActionTogglePreHistoryHidden(let newValue): - return ("channelAdminLogEventActionTogglePreHistoryHidden", [("newValue", newValue)]) - case .channelAdminLogEventActionDefaultBannedRights(let prevBannedRights, let newBannedRights): - return ("channelAdminLogEventActionDefaultBannedRights", [("prevBannedRights", prevBannedRights), ("newBannedRights", newBannedRights)]) - case .channelAdminLogEventActionStopPoll(let message): - return ("channelAdminLogEventActionStopPoll", [("message", message)]) - case .channelAdminLogEventActionChangeLinkedChat(let prevValue, let newValue): - return ("channelAdminLogEventActionChangeLinkedChat", [("prevValue", prevValue), ("newValue", newValue)]) - case .channelAdminLogEventActionChangeLocation(let prevValue, let newValue): - return ("channelAdminLogEventActionChangeLocation", [("prevValue", prevValue), ("newValue", newValue)]) - case .channelAdminLogEventActionToggleSlowMode(let prevValue, let newValue): - return ("channelAdminLogEventActionToggleSlowMode", [("prevValue", prevValue), ("newValue", newValue)]) - case .channelAdminLogEventActionStartGroupCall(let call): - return ("channelAdminLogEventActionStartGroupCall", [("call", call)]) - case .channelAdminLogEventActionDiscardGroupCall(let call): - return ("channelAdminLogEventActionDiscardGroupCall", [("call", call)]) - case .channelAdminLogEventActionParticipantMute(let participant): - return ("channelAdminLogEventActionParticipantMute", [("participant", participant)]) - case .channelAdminLogEventActionParticipantUnmute(let participant): - return ("channelAdminLogEventActionParticipantUnmute", [("participant", participant)]) - case .channelAdminLogEventActionToggleGroupCallSetting(let joinMuted): - return ("channelAdminLogEventActionToggleGroupCallSetting", [("joinMuted", joinMuted)]) - case .channelAdminLogEventActionParticipantJoinByInvite(let invite): - return ("channelAdminLogEventActionParticipantJoinByInvite", [("invite", invite)]) - case .channelAdminLogEventActionExportedInviteDelete(let invite): - return ("channelAdminLogEventActionExportedInviteDelete", [("invite", invite)]) - case .channelAdminLogEventActionExportedInviteRevoke(let invite): - return ("channelAdminLogEventActionExportedInviteRevoke", [("invite", invite)]) - case .channelAdminLogEventActionExportedInviteEdit(let prevInvite, let newInvite): - return ("channelAdminLogEventActionExportedInviteEdit", [("prevInvite", prevInvite), ("newInvite", newInvite)]) - case .channelAdminLogEventActionParticipantVolume(let participant): - return ("channelAdminLogEventActionParticipantVolume", [("participant", participant)]) - case .channelAdminLogEventActionChangeHistoryTTL(let prevValue, let newValue): - return ("channelAdminLogEventActionChangeHistoryTTL", [("prevValue", prevValue), ("newValue", newValue)]) - } - } - - public static func parse_channelAdminLogEventActionChangeTitle(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionChangeTitle(prevValue: _1!, newValue: _2!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionChangeAbout(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionChangeAbout(prevValue: _1!, newValue: _2!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionChangeUsername(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionChangeUsername(prevValue: _1!, newValue: _2!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionChangePhoto(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.Photo? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Photo - } - var _2: Api.Photo? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Photo - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionChangePhoto(prevPhoto: _1!, newPhoto: _2!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionToggleInvites(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.Bool? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Bool - } - let _c1 = _1 != nil - if _c1 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionToggleInvites(newValue: _1!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionToggleSignatures(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.Bool? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Bool - } - let _c1 = _1 != nil - if _c1 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionToggleSignatures(newValue: _1!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionUpdatePinned(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.Message? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Message - } - let _c1 = _1 != nil - if _c1 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionUpdatePinned(message: _1!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionEditMessage(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.Message? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Message - } - var _2: Api.Message? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Message - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionEditMessage(prevMessage: _1!, newMessage: _2!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionDeleteMessage(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.Message? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Message - } - let _c1 = _1 != nil - if _c1 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionDeleteMessage(message: _1!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionParticipantJoin(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionParticipantJoin - } - public static func parse_channelAdminLogEventActionParticipantLeave(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionParticipantLeave - } - public static func parse_channelAdminLogEventActionParticipantInvite(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.ChannelParticipant? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.ChannelParticipant - } - let _c1 = _1 != nil - if _c1 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionParticipantInvite(participant: _1!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionParticipantToggleBan(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.ChannelParticipant? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.ChannelParticipant - } - var _2: Api.ChannelParticipant? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.ChannelParticipant - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionParticipantToggleBan(prevParticipant: _1!, newParticipant: _2!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionParticipantToggleAdmin(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.ChannelParticipant? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.ChannelParticipant - } - var _2: Api.ChannelParticipant? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.ChannelParticipant - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionParticipantToggleAdmin(prevParticipant: _1!, newParticipant: _2!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionChangeStickerSet(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.InputStickerSet? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputStickerSet - } - var _2: Api.InputStickerSet? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.InputStickerSet - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionChangeStickerSet(prevStickerset: _1!, newStickerset: _2!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionTogglePreHistoryHidden(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.Bool? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Bool - } - let _c1 = _1 != nil - if _c1 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionTogglePreHistoryHidden(newValue: _1!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionDefaultBannedRights(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.ChatBannedRights? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.ChatBannedRights - } - var _2: Api.ChatBannedRights? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.ChatBannedRights - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionDefaultBannedRights(prevBannedRights: _1!, newBannedRights: _2!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionStopPoll(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.Message? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Message - } - let _c1 = _1 != nil - if _c1 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionStopPoll(message: _1!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionChangeLinkedChat(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionChangeLinkedChat(prevValue: _1!, newValue: _2!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionChangeLocation(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.ChannelLocation? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.ChannelLocation - } - var _2: Api.ChannelLocation? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.ChannelLocation - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionChangeLocation(prevValue: _1!, newValue: _2!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionToggleSlowMode(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionToggleSlowMode(prevValue: _1!, newValue: _2!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionStartGroupCall(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.InputGroupCall? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputGroupCall - } - let _c1 = _1 != nil - if _c1 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionStartGroupCall(call: _1!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionDiscardGroupCall(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.InputGroupCall? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputGroupCall - } - let _c1 = _1 != nil - if _c1 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionDiscardGroupCall(call: _1!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionParticipantMute(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.GroupCallParticipant? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.GroupCallParticipant - } - let _c1 = _1 != nil - if _c1 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionParticipantMute(participant: _1!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionParticipantUnmute(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.GroupCallParticipant? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.GroupCallParticipant - } - let _c1 = _1 != nil - if _c1 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionParticipantUnmute(participant: _1!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionToggleGroupCallSetting(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.Bool? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Bool - } - let _c1 = _1 != nil - if _c1 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionToggleGroupCallSetting(joinMuted: _1!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionParticipantJoinByInvite(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.ExportedChatInvite? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite - } - let _c1 = _1 != nil - if _c1 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionParticipantJoinByInvite(invite: _1!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionExportedInviteDelete(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.ExportedChatInvite? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite - } - let _c1 = _1 != nil - if _c1 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionExportedInviteDelete(invite: _1!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionExportedInviteRevoke(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.ExportedChatInvite? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite - } - let _c1 = _1 != nil - if _c1 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionExportedInviteRevoke(invite: _1!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionExportedInviteEdit(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.ExportedChatInvite? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite - } - var _2: Api.ExportedChatInvite? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionExportedInviteEdit(prevInvite: _1!, newInvite: _2!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionParticipantVolume(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Api.GroupCallParticipant? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.GroupCallParticipant - } - let _c1 = _1 != nil - if _c1 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionParticipantVolume(participant: _1!) - } - else { - return nil - } - } - public static func parse_channelAdminLogEventActionChangeHistoryTTL(_ reader: BufferReader) -> ChannelAdminLogEventAction? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ChannelAdminLogEventAction.channelAdminLogEventActionChangeHistoryTTL(prevValue: _1!, newValue: _2!) - } - else { - return nil - } - } - - } - public enum SecurePlainData: TypeConstructorDescription { - case securePlainPhone(phone: String) - case securePlainEmail(email: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .securePlainPhone(let phone): - if boxed { - buffer.appendInt32(2103482845) - } - serializeString(phone, buffer: buffer, boxed: false) - break - case .securePlainEmail(let email): - if boxed { - buffer.appendInt32(569137759) - } - serializeString(email, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .securePlainPhone(let phone): - return ("securePlainPhone", [("phone", phone)]) - case .securePlainEmail(let email): - return ("securePlainEmail", [("email", email)]) - } - } - - public static func parse_securePlainPhone(_ reader: BufferReader) -> SecurePlainData? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.SecurePlainData.securePlainPhone(phone: _1!) - } - else { - return nil - } - } - public static func parse_securePlainEmail(_ reader: BufferReader) -> SecurePlainData? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.SecurePlainData.securePlainEmail(email: _1!) - } - else { - return nil - } - } - - } - public enum StatsGraph: TypeConstructorDescription { - case statsGraphAsync(token: String) - case statsGraphError(error: String) - case statsGraph(flags: Int32, json: Api.DataJSON, zoomToken: String?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .statsGraphAsync(let token): - if boxed { - buffer.appendInt32(1244130093) - } - serializeString(token, buffer: buffer, boxed: false) - break - case .statsGraphError(let error): - if boxed { - buffer.appendInt32(-1092839390) - } - serializeString(error, buffer: buffer, boxed: false) - break - case .statsGraph(let flags, let json, let zoomToken): - if boxed { - buffer.appendInt32(-1901828938) - } - serializeInt32(flags, buffer: buffer, boxed: false) - json.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeString(zoomToken!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .statsGraphAsync(let token): - return ("statsGraphAsync", [("token", token)]) - case .statsGraphError(let error): - return ("statsGraphError", [("error", error)]) - case .statsGraph(let flags, let json, let zoomToken): - return ("statsGraph", [("flags", flags), ("json", json), ("zoomToken", zoomToken)]) - } - } - - public static func parse_statsGraphAsync(_ reader: BufferReader) -> StatsGraph? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.StatsGraph.statsGraphAsync(token: _1!) - } - else { - return nil - } - } - public static func parse_statsGraphError(_ reader: BufferReader) -> StatsGraph? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.StatsGraph.statsGraphError(error: _1!) - } - else { - return nil - } - } - public static func parse_statsGraph(_ reader: BufferReader) -> StatsGraph? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.DataJSON? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.DataJSON - } - var _3: String? - if Int(_1!) & Int(1 << 0) != 0 {_3 = parseString(reader) } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.StatsGraph.statsGraph(flags: _1!, json: _2!, zoomToken: _3) - } - else { - return nil - } - } - - } - public enum PageTableCell: TypeConstructorDescription { - case pageTableCell(flags: Int32, text: Api.RichText?, colspan: Int32?, rowspan: Int32?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .pageTableCell(let flags, let text, let colspan, let rowspan): - if boxed { - buffer.appendInt32(878078826) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 7) != 0 {text!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(colspan!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(rowspan!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .pageTableCell(let flags, let text, let colspan, let rowspan): - return ("pageTableCell", [("flags", flags), ("text", text), ("colspan", colspan), ("rowspan", rowspan)]) - } - } - - public static func parse_pageTableCell(_ reader: BufferReader) -> PageTableCell? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.RichText? - if Int(_1!) & Int(1 << 7) != 0 {if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.RichText - } } - var _3: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_3 = reader.readInt32() } - var _4: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_4 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 7) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.PageTableCell.pageTableCell(flags: _1!, text: _2, colspan: _3, rowspan: _4) - } - else { - return nil - } - } - - } - public enum ChatBannedRights: TypeConstructorDescription { - case chatBannedRights(flags: Int32, untilDate: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .chatBannedRights(let flags, let untilDate): - if boxed { - buffer.appendInt32(-1626209256) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(untilDate, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .chatBannedRights(let flags, let untilDate): - return ("chatBannedRights", [("flags", flags), ("untilDate", untilDate)]) - } - } - - public static func parse_chatBannedRights(_ reader: BufferReader) -> ChatBannedRights? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ChatBannedRights.chatBannedRights(flags: _1!, untilDate: _2!) - } - else { - return nil - } - } - - } - public enum InputClientProxy: TypeConstructorDescription { - case inputClientProxy(address: String, port: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputClientProxy(let address, let port): - if boxed { - buffer.appendInt32(1968737087) - } - serializeString(address, buffer: buffer, boxed: false) - serializeInt32(port, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputClientProxy(let address, let port): - return ("inputClientProxy", [("address", address), ("port", port)]) - } - } - - public static func parse_inputClientProxy(_ reader: BufferReader) -> InputClientProxy? { - var _1: String? - _1 = parseString(reader) - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputClientProxy.inputClientProxy(address: _1!, port: _2!) - } - else { - return nil - } - } - - } - public enum LabeledPrice: TypeConstructorDescription { - case labeledPrice(label: String, amount: Int64) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .labeledPrice(let label, let amount): - if boxed { - buffer.appendInt32(-886477832) - } - serializeString(label, buffer: buffer, boxed: false) - serializeInt64(amount, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .labeledPrice(let label, let amount): - return ("labeledPrice", [("label", label), ("amount", amount)]) - } - } - - public static func parse_labeledPrice(_ reader: BufferReader) -> LabeledPrice? { - var _1: String? - _1 = parseString(reader) - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.LabeledPrice.labeledPrice(label: _1!, amount: _2!) - } - else { - return nil - } - } - - } - public enum InputSecureValue: TypeConstructorDescription { - case inputSecureValue(flags: Int32, type: Api.SecureValueType, data: Api.SecureData?, frontSide: Api.InputSecureFile?, reverseSide: Api.InputSecureFile?, selfie: Api.InputSecureFile?, translation: [Api.InputSecureFile]?, files: [Api.InputSecureFile]?, plainData: Api.SecurePlainData?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputSecureValue(let flags, let type, let data, let frontSide, let reverseSide, let selfie, let translation, let files, let plainData): - if boxed { - buffer.appendInt32(-618540889) - } - serializeInt32(flags, buffer: buffer, boxed: false) - type.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {data!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {frontSide!.serialize(buffer, true)} - if Int(flags) & Int(1 << 2) != 0 {reverseSide!.serialize(buffer, true)} - if Int(flags) & Int(1 << 3) != 0 {selfie!.serialize(buffer, true)} - if Int(flags) & Int(1 << 6) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(translation!.count)) - for item in translation! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 4) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(files!.count)) - for item in files! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 5) != 0 {plainData!.serialize(buffer, true)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputSecureValue(let flags, let type, let data, let frontSide, let reverseSide, let selfie, let translation, let files, let plainData): - return ("inputSecureValue", [("flags", flags), ("type", type), ("data", data), ("frontSide", frontSide), ("reverseSide", reverseSide), ("selfie", selfie), ("translation", translation), ("files", files), ("plainData", plainData)]) - } - } - - public static func parse_inputSecureValue(_ reader: BufferReader) -> InputSecureValue? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.SecureValueType? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.SecureValueType - } - var _3: Api.SecureData? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.SecureData - } } - var _4: Api.InputSecureFile? - if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.InputSecureFile - } } - var _5: Api.InputSecureFile? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.InputSecureFile - } } - var _6: Api.InputSecureFile? - if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.InputSecureFile - } } - var _7: [Api.InputSecureFile]? - if Int(_1!) & Int(1 << 6) != 0 {if let _ = reader.readInt32() { - _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputSecureFile.self) - } } - var _8: [Api.InputSecureFile]? - if Int(_1!) & Int(1 << 4) != 0 {if let _ = reader.readInt32() { - _8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputSecureFile.self) - } } - var _9: Api.SecurePlainData? - if Int(_1!) & Int(1 << 5) != 0 {if let signature = reader.readInt32() { - _9 = Api.parse(reader, signature: signature) as? Api.SecurePlainData - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 6) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 4) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 5) == 0) || _9 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { - return Api.InputSecureValue.inputSecureValue(flags: _1!, type: _2!, data: _3, frontSide: _4, reverseSide: _5, selfie: _6, translation: _7, files: _8, plainData: _9) - } - else { - return nil - } - } - - } - public enum ReportReason: TypeConstructorDescription { - case inputReportReasonSpam - case inputReportReasonViolence - case inputReportReasonPornography - case inputReportReasonChildAbuse - case inputReportReasonOther - case inputReportReasonCopyright - case inputReportReasonGeoIrrelevant - case inputReportReasonFake - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputReportReasonSpam: - if boxed { - buffer.appendInt32(1490799288) - } - - break - case .inputReportReasonViolence: - if boxed { - buffer.appendInt32(505595789) - } - - break - case .inputReportReasonPornography: - if boxed { - buffer.appendInt32(777640226) - } - - break - case .inputReportReasonChildAbuse: - if boxed { - buffer.appendInt32(-1376497949) - } - - break - case .inputReportReasonOther: - if boxed { - buffer.appendInt32(-1041980751) - } - - break - case .inputReportReasonCopyright: - if boxed { - buffer.appendInt32(-1685456582) - } - - break - case .inputReportReasonGeoIrrelevant: - if boxed { - buffer.appendInt32(-606798099) - } - - break - case .inputReportReasonFake: - if boxed { - buffer.appendInt32(-170010905) - } - - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputReportReasonSpam: - return ("inputReportReasonSpam", []) - case .inputReportReasonViolence: - return ("inputReportReasonViolence", []) - case .inputReportReasonPornography: - return ("inputReportReasonPornography", []) - case .inputReportReasonChildAbuse: - return ("inputReportReasonChildAbuse", []) - case .inputReportReasonOther: - return ("inputReportReasonOther", []) - case .inputReportReasonCopyright: - return ("inputReportReasonCopyright", []) - case .inputReportReasonGeoIrrelevant: - return ("inputReportReasonGeoIrrelevant", []) - case .inputReportReasonFake: - return ("inputReportReasonFake", []) - } - } - - public static func parse_inputReportReasonSpam(_ reader: BufferReader) -> ReportReason? { - return Api.ReportReason.inputReportReasonSpam - } - public static func parse_inputReportReasonViolence(_ reader: BufferReader) -> ReportReason? { - return Api.ReportReason.inputReportReasonViolence - } - public static func parse_inputReportReasonPornography(_ reader: BufferReader) -> ReportReason? { - return Api.ReportReason.inputReportReasonPornography - } - public static func parse_inputReportReasonChildAbuse(_ reader: BufferReader) -> ReportReason? { - return Api.ReportReason.inputReportReasonChildAbuse - } - public static func parse_inputReportReasonOther(_ reader: BufferReader) -> ReportReason? { - return Api.ReportReason.inputReportReasonOther - } - public static func parse_inputReportReasonCopyright(_ reader: BufferReader) -> ReportReason? { - return Api.ReportReason.inputReportReasonCopyright - } - public static func parse_inputReportReasonGeoIrrelevant(_ reader: BufferReader) -> ReportReason? { - return Api.ReportReason.inputReportReasonGeoIrrelevant - } - public static func parse_inputReportReasonFake(_ reader: BufferReader) -> ReportReason? { - return Api.ReportReason.inputReportReasonFake - } - - } - public enum InputEncryptedChat: TypeConstructorDescription { - case inputEncryptedChat(chatId: Int32, accessHash: Int64) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputEncryptedChat(let chatId, let accessHash): - if boxed { - buffer.appendInt32(-247351839) - } - serializeInt32(chatId, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputEncryptedChat(let chatId, let accessHash): - return ("inputEncryptedChat", [("chatId", chatId), ("accessHash", accessHash)]) - } - } - - public static func parse_inputEncryptedChat(_ reader: BufferReader) -> InputEncryptedChat? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputEncryptedChat.inputEncryptedChat(chatId: _1!, accessHash: _2!) - } - else { - return nil - } - } - - } - public enum PageTableRow: TypeConstructorDescription { - case pageTableRow(cells: [Api.PageTableCell]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .pageTableRow(let cells): - if boxed { - buffer.appendInt32(-524237339) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(cells.count)) - for item in cells { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .pageTableRow(let cells): - return ("pageTableRow", [("cells", cells)]) - } - } - - public static func parse_pageTableRow(_ reader: BufferReader) -> PageTableRow? { - var _1: [Api.PageTableCell]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageTableCell.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.PageTableRow.pageTableRow(cells: _1!) - } - else { - return nil - } - } - - } - public enum DraftMessage: TypeConstructorDescription { - case draftMessageEmpty(flags: Int32, date: Int32?) - case draftMessage(flags: Int32, replyToMsgId: Int32?, message: String, entities: [Api.MessageEntity]?, date: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .draftMessageEmpty(let flags, let date): - if boxed { - buffer.appendInt32(453805082) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(date!, buffer: buffer, boxed: false)} - break - case .draftMessage(let flags, let replyToMsgId, let message, let entities, let date): - if boxed { - buffer.appendInt32(-40996577) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(replyToMsgId!, buffer: buffer, boxed: false)} - serializeString(message, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 3) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities!.count)) - for item in entities! { - item.serialize(buffer, true) - }} - serializeInt32(date, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .draftMessageEmpty(let flags, let date): - return ("draftMessageEmpty", [("flags", flags), ("date", date)]) - case .draftMessage(let flags, let replyToMsgId, let message, let entities, let date): - return ("draftMessage", [("flags", flags), ("replyToMsgId", replyToMsgId), ("message", message), ("entities", entities), ("date", date)]) - } - } - - public static func parse_draftMessageEmpty(_ reader: BufferReader) -> DraftMessage? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - if _c1 && _c2 { - return Api.DraftMessage.draftMessageEmpty(flags: _1!, date: _2) - } - else { - return nil - } - } - public static func parse_draftMessage(_ reader: BufferReader) -> DraftMessage? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } - var _3: String? - _3 = parseString(reader) - var _4: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 3) != 0 {if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) - } } - var _5: Int32? - _5 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.DraftMessage.draftMessage(flags: _1!, replyToMsgId: _2, message: _3!, entities: _4, date: _5!) - } - else { - return nil - } - } - - } - public enum StatsGroupTopPoster: TypeConstructorDescription { - case statsGroupTopPoster(userId: Int32, messages: Int32, avgChars: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .statsGroupTopPoster(let userId, let messages, let avgChars): - if boxed { - buffer.appendInt32(418631927) - } - serializeInt32(userId, buffer: buffer, boxed: false) - serializeInt32(messages, buffer: buffer, boxed: false) - serializeInt32(avgChars, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .statsGroupTopPoster(let userId, let messages, let avgChars): - return ("statsGroupTopPoster", [("userId", userId), ("messages", messages), ("avgChars", avgChars)]) - } - } - - public static func parse_statsGroupTopPoster(_ reader: BufferReader) -> StatsGroupTopPoster? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.StatsGroupTopPoster.statsGroupTopPoster(userId: _1!, messages: _2!, avgChars: _3!) - } - else { - return nil - } - } - - } - public enum EncryptedFile: TypeConstructorDescription { - case encryptedFileEmpty - case encryptedFile(id: Int64, accessHash: Int64, size: Int32, dcId: Int32, keyFingerprint: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .encryptedFileEmpty: - if boxed { - buffer.appendInt32(-1038136962) - } - - break - case .encryptedFile(let id, let accessHash, let size, let dcId, let keyFingerprint): - if boxed { - buffer.appendInt32(1248893260) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeInt32(size, buffer: buffer, boxed: false) - serializeInt32(dcId, buffer: buffer, boxed: false) - serializeInt32(keyFingerprint, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .encryptedFileEmpty: - return ("encryptedFileEmpty", []) - case .encryptedFile(let id, let accessHash, let size, let dcId, let keyFingerprint): - return ("encryptedFile", [("id", id), ("accessHash", accessHash), ("size", size), ("dcId", dcId), ("keyFingerprint", keyFingerprint)]) - } - } - - public static func parse_encryptedFileEmpty(_ reader: BufferReader) -> EncryptedFile? { - return Api.EncryptedFile.encryptedFileEmpty - } - public static func parse_encryptedFile(_ reader: BufferReader) -> EncryptedFile? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int64? - _2 = reader.readInt64() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.EncryptedFile.encryptedFile(id: _1!, accessHash: _2!, size: _3!, dcId: _4!, keyFingerprint: _5!) - } - else { - return nil - } - } - - } - public enum CodeSettings: TypeConstructorDescription { - case codeSettings(flags: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .codeSettings(let flags): - if boxed { - buffer.appendInt32(-557924733) - } - serializeInt32(flags, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .codeSettings(let flags): - return ("codeSettings", [("flags", flags)]) - } - } - - public static func parse_codeSettings(_ reader: BufferReader) -> CodeSettings? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.CodeSettings.codeSettings(flags: _1!) - } - else { - return nil - } - } - - } - public enum SecureValueError: TypeConstructorDescription { - case secureValueErrorData(type: Api.SecureValueType, dataHash: Buffer, field: String, text: String) - case secureValueErrorFrontSide(type: Api.SecureValueType, fileHash: Buffer, text: String) - case secureValueErrorReverseSide(type: Api.SecureValueType, fileHash: Buffer, text: String) - case secureValueErrorSelfie(type: Api.SecureValueType, fileHash: Buffer, text: String) - case secureValueErrorFile(type: Api.SecureValueType, fileHash: Buffer, text: String) - case secureValueErrorFiles(type: Api.SecureValueType, fileHash: [Buffer], text: String) - case secureValueError(type: Api.SecureValueType, hash: Buffer, text: String) - case secureValueErrorTranslationFile(type: Api.SecureValueType, fileHash: Buffer, text: String) - case secureValueErrorTranslationFiles(type: Api.SecureValueType, fileHash: [Buffer], text: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .secureValueErrorData(let type, let dataHash, let field, let text): - if boxed { - buffer.appendInt32(-391902247) - } - type.serialize(buffer, true) - serializeBytes(dataHash, buffer: buffer, boxed: false) - serializeString(field, buffer: buffer, boxed: false) - serializeString(text, buffer: buffer, boxed: false) - break - case .secureValueErrorFrontSide(let type, let fileHash, let text): - if boxed { - buffer.appendInt32(12467706) - } - type.serialize(buffer, true) - serializeBytes(fileHash, buffer: buffer, boxed: false) - serializeString(text, buffer: buffer, boxed: false) - break - case .secureValueErrorReverseSide(let type, let fileHash, let text): - if boxed { - buffer.appendInt32(-2037765467) - } - type.serialize(buffer, true) - serializeBytes(fileHash, buffer: buffer, boxed: false) - serializeString(text, buffer: buffer, boxed: false) - break - case .secureValueErrorSelfie(let type, let fileHash, let text): - if boxed { - buffer.appendInt32(-449327402) - } - type.serialize(buffer, true) - serializeBytes(fileHash, buffer: buffer, boxed: false) - serializeString(text, buffer: buffer, boxed: false) - break - case .secureValueErrorFile(let type, let fileHash, let text): - if boxed { - buffer.appendInt32(2054162547) - } - type.serialize(buffer, true) - serializeBytes(fileHash, buffer: buffer, boxed: false) - serializeString(text, buffer: buffer, boxed: false) - break - case .secureValueErrorFiles(let type, let fileHash, let text): - if boxed { - buffer.appendInt32(1717706985) - } - type.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(fileHash.count)) - for item in fileHash { - serializeBytes(item, buffer: buffer, boxed: false) - } - serializeString(text, buffer: buffer, boxed: false) - break - case .secureValueError(let type, let hash, let text): - if boxed { - buffer.appendInt32(-2036501105) - } - type.serialize(buffer, true) - serializeBytes(hash, buffer: buffer, boxed: false) - serializeString(text, buffer: buffer, boxed: false) - break - case .secureValueErrorTranslationFile(let type, let fileHash, let text): - if boxed { - buffer.appendInt32(-1592506512) - } - type.serialize(buffer, true) - serializeBytes(fileHash, buffer: buffer, boxed: false) - serializeString(text, buffer: buffer, boxed: false) - break - case .secureValueErrorTranslationFiles(let type, let fileHash, let text): - if boxed { - buffer.appendInt32(878931416) - } - type.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(fileHash.count)) - for item in fileHash { - serializeBytes(item, buffer: buffer, boxed: false) - } - serializeString(text, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .secureValueErrorData(let type, let dataHash, let field, let text): - return ("secureValueErrorData", [("type", type), ("dataHash", dataHash), ("field", field), ("text", text)]) - case .secureValueErrorFrontSide(let type, let fileHash, let text): - return ("secureValueErrorFrontSide", [("type", type), ("fileHash", fileHash), ("text", text)]) - case .secureValueErrorReverseSide(let type, let fileHash, let text): - return ("secureValueErrorReverseSide", [("type", type), ("fileHash", fileHash), ("text", text)]) - case .secureValueErrorSelfie(let type, let fileHash, let text): - return ("secureValueErrorSelfie", [("type", type), ("fileHash", fileHash), ("text", text)]) - case .secureValueErrorFile(let type, let fileHash, let text): - return ("secureValueErrorFile", [("type", type), ("fileHash", fileHash), ("text", text)]) - case .secureValueErrorFiles(let type, let fileHash, let text): - return ("secureValueErrorFiles", [("type", type), ("fileHash", fileHash), ("text", text)]) - case .secureValueError(let type, let hash, let text): - return ("secureValueError", [("type", type), ("hash", hash), ("text", text)]) - case .secureValueErrorTranslationFile(let type, let fileHash, let text): - return ("secureValueErrorTranslationFile", [("type", type), ("fileHash", fileHash), ("text", text)]) - case .secureValueErrorTranslationFiles(let type, let fileHash, let text): - return ("secureValueErrorTranslationFiles", [("type", type), ("fileHash", fileHash), ("text", text)]) - } - } - - public static func parse_secureValueErrorData(_ reader: BufferReader) -> SecureValueError? { - var _1: Api.SecureValueType? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.SecureValueType - } - var _2: Buffer? - _2 = parseBytes(reader) - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.SecureValueError.secureValueErrorData(type: _1!, dataHash: _2!, field: _3!, text: _4!) - } - else { - return nil - } - } - public static func parse_secureValueErrorFrontSide(_ reader: BufferReader) -> SecureValueError? { - var _1: Api.SecureValueType? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.SecureValueType - } - var _2: Buffer? - _2 = parseBytes(reader) - var _3: String? - _3 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.SecureValueError.secureValueErrorFrontSide(type: _1!, fileHash: _2!, text: _3!) - } - else { - return nil - } - } - public static func parse_secureValueErrorReverseSide(_ reader: BufferReader) -> SecureValueError? { - var _1: Api.SecureValueType? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.SecureValueType - } - var _2: Buffer? - _2 = parseBytes(reader) - var _3: String? - _3 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.SecureValueError.secureValueErrorReverseSide(type: _1!, fileHash: _2!, text: _3!) - } - else { - return nil - } - } - public static func parse_secureValueErrorSelfie(_ reader: BufferReader) -> SecureValueError? { - var _1: Api.SecureValueType? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.SecureValueType - } - var _2: Buffer? - _2 = parseBytes(reader) - var _3: String? - _3 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.SecureValueError.secureValueErrorSelfie(type: _1!, fileHash: _2!, text: _3!) - } - else { - return nil - } - } - public static func parse_secureValueErrorFile(_ reader: BufferReader) -> SecureValueError? { - var _1: Api.SecureValueType? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.SecureValueType - } - var _2: Buffer? - _2 = parseBytes(reader) - var _3: String? - _3 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.SecureValueError.secureValueErrorFile(type: _1!, fileHash: _2!, text: _3!) - } - else { - return nil - } - } - public static func parse_secureValueErrorFiles(_ reader: BufferReader) -> SecureValueError? { - var _1: Api.SecureValueType? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.SecureValueType - } - var _2: [Buffer]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: -1255641564, elementType: Buffer.self) - } - var _3: String? - _3 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.SecureValueError.secureValueErrorFiles(type: _1!, fileHash: _2!, text: _3!) - } - else { - return nil - } - } - public static func parse_secureValueError(_ reader: BufferReader) -> SecureValueError? { - var _1: Api.SecureValueType? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.SecureValueType - } - var _2: Buffer? - _2 = parseBytes(reader) - var _3: String? - _3 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.SecureValueError.secureValueError(type: _1!, hash: _2!, text: _3!) - } - else { - return nil - } - } - public static func parse_secureValueErrorTranslationFile(_ reader: BufferReader) -> SecureValueError? { - var _1: Api.SecureValueType? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.SecureValueType - } - var _2: Buffer? - _2 = parseBytes(reader) - var _3: String? - _3 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.SecureValueError.secureValueErrorTranslationFile(type: _1!, fileHash: _2!, text: _3!) - } - else { - return nil - } - } - public static func parse_secureValueErrorTranslationFiles(_ reader: BufferReader) -> SecureValueError? { - var _1: Api.SecureValueType? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.SecureValueType - } - var _2: [Buffer]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: -1255641564, elementType: Buffer.self) - } - var _3: String? - _3 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.SecureValueError.secureValueErrorTranslationFiles(type: _1!, fileHash: _2!, text: _3!) - } - else { - return nil - } - } - - } - public enum InputStickerSetItem: TypeConstructorDescription { - case inputStickerSetItem(flags: Int32, document: Api.InputDocument, emoji: String, maskCoords: Api.MaskCoords?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputStickerSetItem(let flags, let document, let emoji, let maskCoords): - if boxed { - buffer.appendInt32(-6249322) - } - serializeInt32(flags, buffer: buffer, boxed: false) - document.serialize(buffer, true) - serializeString(emoji, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {maskCoords!.serialize(buffer, true)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputStickerSetItem(let flags, let document, let emoji, let maskCoords): - return ("inputStickerSetItem", [("flags", flags), ("document", document), ("emoji", emoji), ("maskCoords", maskCoords)]) - } - } - - public static func parse_inputStickerSetItem(_ reader: BufferReader) -> InputStickerSetItem? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.InputDocument? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.InputDocument - } - var _3: String? - _3 = parseString(reader) - var _4: Api.MaskCoords? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.MaskCoords - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputStickerSetItem.inputStickerSetItem(flags: _1!, document: _2!, emoji: _3!, maskCoords: _4) - } - else { - return nil - } - } - - } - public enum NotifyPeer: TypeConstructorDescription { - case notifyPeer(peer: Api.Peer) - case notifyUsers - case notifyChats - case notifyBroadcasts - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .notifyPeer(let peer): - if boxed { - buffer.appendInt32(-1613493288) - } - peer.serialize(buffer, true) - break - case .notifyUsers: - if boxed { - buffer.appendInt32(-1261946036) - } - - break - case .notifyChats: - if boxed { - buffer.appendInt32(-1073230141) - } - - break - case .notifyBroadcasts: - if boxed { - buffer.appendInt32(-703403793) - } - - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .notifyPeer(let peer): - return ("notifyPeer", [("peer", peer)]) - case .notifyUsers: - return ("notifyUsers", []) - case .notifyChats: - return ("notifyChats", []) - case .notifyBroadcasts: - return ("notifyBroadcasts", []) - } - } - - public static func parse_notifyPeer(_ reader: BufferReader) -> NotifyPeer? { - var _1: Api.Peer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Peer - } - let _c1 = _1 != nil - if _c1 { - return Api.NotifyPeer.notifyPeer(peer: _1!) - } - else { - return nil - } - } - public static func parse_notifyUsers(_ reader: BufferReader) -> NotifyPeer? { - return Api.NotifyPeer.notifyUsers - } - public static func parse_notifyChats(_ reader: BufferReader) -> NotifyPeer? { - return Api.NotifyPeer.notifyChats - } - public static func parse_notifyBroadcasts(_ reader: BufferReader) -> NotifyPeer? { - return Api.NotifyPeer.notifyBroadcasts - } - - } - public enum InputPrivacyKey: TypeConstructorDescription { - case inputPrivacyKeyStatusTimestamp - case inputPrivacyKeyChatInvite - case inputPrivacyKeyPhoneCall - case inputPrivacyKeyPhoneP2P - case inputPrivacyKeyForwards - case inputPrivacyKeyProfilePhoto - case inputPrivacyKeyPhoneNumber - case inputPrivacyKeyAddedByPhone - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputPrivacyKeyStatusTimestamp: - if boxed { - buffer.appendInt32(1335282456) - } - - break - case .inputPrivacyKeyChatInvite: - if boxed { - buffer.appendInt32(-1107622874) - } - - break - case .inputPrivacyKeyPhoneCall: - if boxed { - buffer.appendInt32(-88417185) - } - - break - case .inputPrivacyKeyPhoneP2P: - if boxed { - buffer.appendInt32(-610373422) - } - - break - case .inputPrivacyKeyForwards: - if boxed { - buffer.appendInt32(-1529000952) - } - - break - case .inputPrivacyKeyProfilePhoto: - if boxed { - buffer.appendInt32(1461304012) - } - - break - case .inputPrivacyKeyPhoneNumber: - if boxed { - buffer.appendInt32(55761658) - } - - break - case .inputPrivacyKeyAddedByPhone: - if boxed { - buffer.appendInt32(-786326563) - } - - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputPrivacyKeyStatusTimestamp: - return ("inputPrivacyKeyStatusTimestamp", []) - case .inputPrivacyKeyChatInvite: - return ("inputPrivacyKeyChatInvite", []) - case .inputPrivacyKeyPhoneCall: - return ("inputPrivacyKeyPhoneCall", []) - case .inputPrivacyKeyPhoneP2P: - return ("inputPrivacyKeyPhoneP2P", []) - case .inputPrivacyKeyForwards: - return ("inputPrivacyKeyForwards", []) - case .inputPrivacyKeyProfilePhoto: - return ("inputPrivacyKeyProfilePhoto", []) - case .inputPrivacyKeyPhoneNumber: - return ("inputPrivacyKeyPhoneNumber", []) - case .inputPrivacyKeyAddedByPhone: - return ("inputPrivacyKeyAddedByPhone", []) - } - } - - public static func parse_inputPrivacyKeyStatusTimestamp(_ reader: BufferReader) -> InputPrivacyKey? { - return Api.InputPrivacyKey.inputPrivacyKeyStatusTimestamp - } - public static func parse_inputPrivacyKeyChatInvite(_ reader: BufferReader) -> InputPrivacyKey? { - return Api.InputPrivacyKey.inputPrivacyKeyChatInvite - } - public static func parse_inputPrivacyKeyPhoneCall(_ reader: BufferReader) -> InputPrivacyKey? { - return Api.InputPrivacyKey.inputPrivacyKeyPhoneCall - } - public static func parse_inputPrivacyKeyPhoneP2P(_ reader: BufferReader) -> InputPrivacyKey? { - return Api.InputPrivacyKey.inputPrivacyKeyPhoneP2P - } - public static func parse_inputPrivacyKeyForwards(_ reader: BufferReader) -> InputPrivacyKey? { - return Api.InputPrivacyKey.inputPrivacyKeyForwards - } - public static func parse_inputPrivacyKeyProfilePhoto(_ reader: BufferReader) -> InputPrivacyKey? { - return Api.InputPrivacyKey.inputPrivacyKeyProfilePhoto - } - public static func parse_inputPrivacyKeyPhoneNumber(_ reader: BufferReader) -> InputPrivacyKey? { - return Api.InputPrivacyKey.inputPrivacyKeyPhoneNumber - } - public static func parse_inputPrivacyKeyAddedByPhone(_ reader: BufferReader) -> InputPrivacyKey? { - return Api.InputPrivacyKey.inputPrivacyKeyAddedByPhone - } - - } - public enum ReplyMarkup: TypeConstructorDescription { - case replyKeyboardHide(flags: Int32) - case replyKeyboardForceReply(flags: Int32) - case replyKeyboardMarkup(flags: Int32, rows: [Api.KeyboardButtonRow]) - case replyInlineMarkup(rows: [Api.KeyboardButtonRow]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .replyKeyboardHide(let flags): - if boxed { - buffer.appendInt32(-1606526075) - } - serializeInt32(flags, buffer: buffer, boxed: false) - break - case .replyKeyboardForceReply(let flags): - if boxed { - buffer.appendInt32(-200242528) - } - serializeInt32(flags, buffer: buffer, boxed: false) - break - case .replyKeyboardMarkup(let flags, let rows): - if boxed { - buffer.appendInt32(889353612) - } - serializeInt32(flags, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(rows.count)) - for item in rows { - item.serialize(buffer, true) - } - break - case .replyInlineMarkup(let rows): - if boxed { - buffer.appendInt32(1218642516) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(rows.count)) - for item in rows { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .replyKeyboardHide(let flags): - return ("replyKeyboardHide", [("flags", flags)]) - case .replyKeyboardForceReply(let flags): - return ("replyKeyboardForceReply", [("flags", flags)]) - case .replyKeyboardMarkup(let flags, let rows): - return ("replyKeyboardMarkup", [("flags", flags), ("rows", rows)]) - case .replyInlineMarkup(let rows): - return ("replyInlineMarkup", [("rows", rows)]) - } - } - - public static func parse_replyKeyboardHide(_ reader: BufferReader) -> ReplyMarkup? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.ReplyMarkup.replyKeyboardHide(flags: _1!) - } - else { - return nil - } - } - public static func parse_replyKeyboardForceReply(_ reader: BufferReader) -> ReplyMarkup? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.ReplyMarkup.replyKeyboardForceReply(flags: _1!) - } - else { - return nil - } - } - public static func parse_replyKeyboardMarkup(_ reader: BufferReader) -> ReplyMarkup? { - var _1: Int32? - _1 = reader.readInt32() - var _2: [Api.KeyboardButtonRow]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.KeyboardButtonRow.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ReplyMarkup.replyKeyboardMarkup(flags: _1!, rows: _2!) - } - else { - return nil - } - } - public static func parse_replyInlineMarkup(_ reader: BufferReader) -> ReplyMarkup? { - var _1: [Api.KeyboardButtonRow]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.KeyboardButtonRow.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.ReplyMarkup.replyInlineMarkup(rows: _1!) - } - else { - return nil - } - } - - } - public enum EmojiKeywordsDifference: TypeConstructorDescription { - case emojiKeywordsDifference(langCode: String, fromVersion: Int32, version: Int32, keywords: [Api.EmojiKeyword]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .emojiKeywordsDifference(let langCode, let fromVersion, let version, let keywords): - if boxed { - buffer.appendInt32(1556570557) - } - serializeString(langCode, buffer: buffer, boxed: false) - serializeInt32(fromVersion, buffer: buffer, boxed: false) - serializeInt32(version, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(keywords.count)) - for item in keywords { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .emojiKeywordsDifference(let langCode, let fromVersion, let version, let keywords): - return ("emojiKeywordsDifference", [("langCode", langCode), ("fromVersion", fromVersion), ("version", version), ("keywords", keywords)]) - } - } - - public static func parse_emojiKeywordsDifference(_ reader: BufferReader) -> EmojiKeywordsDifference? { - var _1: String? - _1 = parseString(reader) - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: [Api.EmojiKeyword]? - if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.EmojiKeyword.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.EmojiKeywordsDifference.emojiKeywordsDifference(langCode: _1!, fromVersion: _2!, version: _3!, keywords: _4!) - } - else { - return nil - } - } - - } - public enum HighScore: TypeConstructorDescription { - case highScore(pos: Int32, userId: Int32, score: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .highScore(let pos, let userId, let score): - if boxed { - buffer.appendInt32(1493171408) - } - serializeInt32(pos, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - serializeInt32(score, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .highScore(let pos, let userId, let score): - return ("highScore", [("pos", pos), ("userId", userId), ("score", score)]) - } - } - - public static func parse_highScore(_ reader: BufferReader) -> HighScore? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.HighScore.highScore(pos: _1!, userId: _2!, score: _3!) - } - else { - return nil - } - } - - } - public enum TopPeer: TypeConstructorDescription { - case topPeer(peer: Api.Peer, rating: Double) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .topPeer(let peer, let rating): - if boxed { - buffer.appendInt32(-305282981) - } - peer.serialize(buffer, true) - serializeDouble(rating, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .topPeer(let peer, let rating): - return ("topPeer", [("peer", peer), ("rating", rating)]) - } - } - - public static func parse_topPeer(_ reader: BufferReader) -> TopPeer? { - var _1: Api.Peer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _2: Double? - _2 = reader.readDouble() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.TopPeer.topPeer(peer: _1!, rating: _2!) - } - else { - return nil - } - } - - } - public enum MessageReplyHeader: TypeConstructorDescription { - case messageReplyHeader(flags: Int32, replyToMsgId: Int32, replyToPeerId: Api.Peer?, replyToTopId: Int32?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .messageReplyHeader(let flags, let replyToMsgId, let replyToPeerId, let replyToTopId): - if boxed { - buffer.appendInt32(-1495959709) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(replyToMsgId, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {replyToPeerId!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(replyToTopId!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .messageReplyHeader(let flags, let replyToMsgId, let replyToPeerId, let replyToTopId): - return ("messageReplyHeader", [("flags", flags), ("replyToMsgId", replyToMsgId), ("replyToPeerId", replyToPeerId), ("replyToTopId", replyToTopId)]) - } - } - - public static func parse_messageReplyHeader(_ reader: BufferReader) -> MessageReplyHeader? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Api.Peer? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.Peer - } } - var _4: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.MessageReplyHeader.messageReplyHeader(flags: _1!, replyToMsgId: _2!, replyToPeerId: _3, replyToTopId: _4) - } - else { - return nil - } - } - - } - public enum SecureValue: TypeConstructorDescription { - case secureValue(flags: Int32, type: Api.SecureValueType, data: Api.SecureData?, frontSide: Api.SecureFile?, reverseSide: Api.SecureFile?, selfie: Api.SecureFile?, translation: [Api.SecureFile]?, files: [Api.SecureFile]?, plainData: Api.SecurePlainData?, hash: Buffer) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .secureValue(let flags, let type, let data, let frontSide, let reverseSide, let selfie, let translation, let files, let plainData, let hash): - if boxed { - buffer.appendInt32(411017418) - } - serializeInt32(flags, buffer: buffer, boxed: false) - type.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {data!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {frontSide!.serialize(buffer, true)} - if Int(flags) & Int(1 << 2) != 0 {reverseSide!.serialize(buffer, true)} - if Int(flags) & Int(1 << 3) != 0 {selfie!.serialize(buffer, true)} - if Int(flags) & Int(1 << 6) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(translation!.count)) - for item in translation! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 4) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(files!.count)) - for item in files! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 5) != 0 {plainData!.serialize(buffer, true)} - serializeBytes(hash, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .secureValue(let flags, let type, let data, let frontSide, let reverseSide, let selfie, let translation, let files, let plainData, let hash): - return ("secureValue", [("flags", flags), ("type", type), ("data", data), ("frontSide", frontSide), ("reverseSide", reverseSide), ("selfie", selfie), ("translation", translation), ("files", files), ("plainData", plainData), ("hash", hash)]) - } - } - - public static func parse_secureValue(_ reader: BufferReader) -> SecureValue? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.SecureValueType? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.SecureValueType - } - var _3: Api.SecureData? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.SecureData - } } - var _4: Api.SecureFile? - if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.SecureFile - } } - var _5: Api.SecureFile? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.SecureFile - } } - var _6: Api.SecureFile? - if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.SecureFile - } } - var _7: [Api.SecureFile]? - if Int(_1!) & Int(1 << 6) != 0 {if let _ = reader.readInt32() { - _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureFile.self) - } } - var _8: [Api.SecureFile]? - if Int(_1!) & Int(1 << 4) != 0 {if let _ = reader.readInt32() { - _8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureFile.self) - } } - var _9: Api.SecurePlainData? - if Int(_1!) & Int(1 << 5) != 0 {if let signature = reader.readInt32() { - _9 = Api.parse(reader, signature: signature) as? Api.SecurePlainData - } } - var _10: Buffer? - _10 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 6) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 4) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 5) == 0) || _9 != nil - let _c10 = _10 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 { - return Api.SecureValue.secureValue(flags: _1!, type: _2!, data: _3, frontSide: _4, reverseSide: _5, selfie: _6, translation: _7, files: _8, plainData: _9, hash: _10!) - } - else { - return nil - } - } - - } - public enum SecureValueHash: TypeConstructorDescription { - case secureValueHash(type: Api.SecureValueType, hash: Buffer) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .secureValueHash(let type, let hash): - if boxed { - buffer.appendInt32(-316748368) - } - type.serialize(buffer, true) - serializeBytes(hash, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .secureValueHash(let type, let hash): - return ("secureValueHash", [("type", type), ("hash", hash)]) - } - } - - public static func parse_secureValueHash(_ reader: BufferReader) -> SecureValueHash? { - var _1: Api.SecureValueType? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.SecureValueType - } - var _2: Buffer? - _2 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.SecureValueHash.secureValueHash(type: _1!, hash: _2!) - } - else { - return nil - } - } - - } - public enum PageListItem: TypeConstructorDescription { - case pageListItemText(text: Api.RichText) - case pageListItemBlocks(blocks: [Api.PageBlock]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .pageListItemText(let text): - if boxed { - buffer.appendInt32(-1188055347) - } - text.serialize(buffer, true) - break - case .pageListItemBlocks(let blocks): - if boxed { - buffer.appendInt32(635466748) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(blocks.count)) - for item in blocks { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .pageListItemText(let text): - return ("pageListItemText", [("text", text)]) - case .pageListItemBlocks(let blocks): - return ("pageListItemBlocks", [("blocks", blocks)]) - } - } - - public static func parse_pageListItemText(_ reader: BufferReader) -> PageListItem? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - if _c1 { - return Api.PageListItem.pageListItemText(text: _1!) - } - else { - return nil - } - } - public static func parse_pageListItemBlocks(_ reader: BufferReader) -> PageListItem? { - var _1: [Api.PageBlock]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageBlock.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.PageListItem.pageListItemBlocks(blocks: _1!) - } - else { - return nil - } - } - - } - public enum PeerBlocked: TypeConstructorDescription { - case peerBlocked(peerId: Api.Peer, date: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .peerBlocked(let peerId, let date): - if boxed { - buffer.appendInt32(-386039788) - } - peerId.serialize(buffer, true) - serializeInt32(date, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .peerBlocked(let peerId, let date): - return ("peerBlocked", [("peerId", peerId), ("date", date)]) - } - } - - public static func parse_peerBlocked(_ reader: BufferReader) -> PeerBlocked? { - var _1: Api.Peer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.PeerBlocked.peerBlocked(peerId: _1!, date: _2!) - } - else { - return nil - } - } - - } - public enum InputUser: TypeConstructorDescription { - case inputUserEmpty - case inputUserSelf - case inputUser(userId: Int32, accessHash: Int64) - case inputUserFromMessage(peer: Api.InputPeer, msgId: Int32, userId: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputUserEmpty: - if boxed { - buffer.appendInt32(-1182234929) - } - - break - case .inputUserSelf: - if boxed { - buffer.appendInt32(-138301121) - } - - break - case .inputUser(let userId, let accessHash): - if boxed { - buffer.appendInt32(-668391402) - } - serializeInt32(userId, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - break - case .inputUserFromMessage(let peer, let msgId, let userId): - if boxed { - buffer.appendInt32(756118935) - } - peer.serialize(buffer, true) - serializeInt32(msgId, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputUserEmpty: - return ("inputUserEmpty", []) - case .inputUserSelf: - return ("inputUserSelf", []) - case .inputUser(let userId, let accessHash): - return ("inputUser", [("userId", userId), ("accessHash", accessHash)]) - case .inputUserFromMessage(let peer, let msgId, let userId): - return ("inputUserFromMessage", [("peer", peer), ("msgId", msgId), ("userId", userId)]) - } - } - - public static func parse_inputUserEmpty(_ reader: BufferReader) -> InputUser? { - return Api.InputUser.inputUserEmpty - } - public static func parse_inputUserSelf(_ reader: BufferReader) -> InputUser? { - return Api.InputUser.inputUserSelf - } - public static func parse_inputUser(_ reader: BufferReader) -> InputUser? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputUser.inputUser(userId: _1!, accessHash: _2!) - } - else { - return nil - } - } - public static func parse_inputUserFromMessage(_ reader: BufferReader) -> InputUser? { - var _1: Api.InputPeer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputPeer - } - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.InputUser.inputUserFromMessage(peer: _1!, msgId: _2!, userId: _3!) - } - else { - return nil - } - } - - } - public enum Page: TypeConstructorDescription { - case page(flags: Int32, url: String, blocks: [Api.PageBlock], photos: [Api.Photo], documents: [Api.Document], views: Int32?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .page(let flags, let url, let blocks, let photos, let documents, let views): - if boxed { - buffer.appendInt32(-1738178803) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(url, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(blocks.count)) - for item in blocks { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(photos.count)) - for item in photos { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(documents.count)) - for item in documents { - item.serialize(buffer, true) - } - if Int(flags) & Int(1 << 3) != 0 {serializeInt32(views!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .page(let flags, let url, let blocks, let photos, let documents, let views): - return ("page", [("flags", flags), ("url", url), ("blocks", blocks), ("photos", photos), ("documents", documents), ("views", views)]) - } - } - - public static func parse_page(_ reader: BufferReader) -> Page? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: [Api.PageBlock]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageBlock.self) - } - var _4: [Api.Photo]? - if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Photo.self) - } - var _5: [Api.Document]? - if let _ = reader.readInt32() { - _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Document.self) - } - var _6: Int32? - if Int(_1!) & Int(1 << 3) != 0 {_6 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.Page.page(flags: _1!, url: _2!, blocks: _3!, photos: _4!, documents: _5!, views: _6) - } - else { - return nil - } - } - - } - public enum SecureCredentialsEncrypted: TypeConstructorDescription { - case secureCredentialsEncrypted(data: Buffer, hash: Buffer, secret: Buffer) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .secureCredentialsEncrypted(let data, let hash, let secret): - if boxed { - buffer.appendInt32(871426631) - } - serializeBytes(data, buffer: buffer, boxed: false) - serializeBytes(hash, buffer: buffer, boxed: false) - serializeBytes(secret, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .secureCredentialsEncrypted(let data, let hash, let secret): - return ("secureCredentialsEncrypted", [("data", data), ("hash", hash), ("secret", secret)]) - } - } - - public static func parse_secureCredentialsEncrypted(_ reader: BufferReader) -> SecureCredentialsEncrypted? { - var _1: Buffer? - _1 = parseBytes(reader) - var _2: Buffer? - _2 = parseBytes(reader) - var _3: Buffer? - _3 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.SecureCredentialsEncrypted.secureCredentialsEncrypted(data: _1!, hash: _2!, secret: _3!) - } - else { - return nil - } - } - - } - public enum StatsPercentValue: TypeConstructorDescription { - case statsPercentValue(part: Double, total: Double) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .statsPercentValue(let part, let total): - if boxed { - buffer.appendInt32(-875679776) - } - serializeDouble(part, buffer: buffer, boxed: false) - serializeDouble(total, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .statsPercentValue(let part, let total): - return ("statsPercentValue", [("part", part), ("total", total)]) - } - } - - public static func parse_statsPercentValue(_ reader: BufferReader) -> StatsPercentValue? { - var _1: Double? - _1 = reader.readDouble() - var _2: Double? - _2 = reader.readDouble() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.StatsPercentValue.statsPercentValue(part: _1!, total: _2!) - } - else { - return nil - } - } - - } - public enum ChannelLocation: TypeConstructorDescription { - case channelLocationEmpty - case channelLocation(geoPoint: Api.GeoPoint, address: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .channelLocationEmpty: - if boxed { - buffer.appendInt32(-1078612597) - } - - break - case .channelLocation(let geoPoint, let address): - if boxed { - buffer.appendInt32(547062491) - } - geoPoint.serialize(buffer, true) - serializeString(address, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .channelLocationEmpty: - return ("channelLocationEmpty", []) - case .channelLocation(let geoPoint, let address): - return ("channelLocation", [("geoPoint", geoPoint), ("address", address)]) - } - } - - public static func parse_channelLocationEmpty(_ reader: BufferReader) -> ChannelLocation? { - return Api.ChannelLocation.channelLocationEmpty - } - public static func parse_channelLocation(_ reader: BufferReader) -> ChannelLocation? { - var _1: Api.GeoPoint? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.GeoPoint - } - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ChannelLocation.channelLocation(geoPoint: _1!, address: _2!) - } - else { - return nil - } - } - - } - public enum MessageRange: TypeConstructorDescription { - case messageRange(minId: Int32, maxId: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .messageRange(let minId, let maxId): - if boxed { - buffer.appendInt32(182649427) - } - serializeInt32(minId, buffer: buffer, boxed: false) - serializeInt32(maxId, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .messageRange(let minId, let maxId): - return ("messageRange", [("minId", minId), ("maxId", maxId)]) - } - } - - public static func parse_messageRange(_ reader: BufferReader) -> MessageRange? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageRange.messageRange(minId: _1!, maxId: _2!) - } - else { - return nil - } - } - - } - public enum Config: TypeConstructorDescription { - case config(flags: Int32, date: Int32, expires: Int32, testMode: Api.Bool, thisDc: Int32, dcOptions: [Api.DcOption], dcTxtDomainName: String, chatSizeMax: Int32, megagroupSizeMax: Int32, forwardedCountMax: Int32, onlineUpdatePeriodMs: Int32, offlineBlurTimeoutMs: Int32, offlineIdleTimeoutMs: Int32, onlineCloudTimeoutMs: Int32, notifyCloudDelayMs: Int32, notifyDefaultDelayMs: Int32, pushChatPeriodMs: Int32, pushChatLimit: Int32, savedGifsLimit: Int32, editTimeLimit: Int32, revokeTimeLimit: Int32, revokePmTimeLimit: Int32, ratingEDecay: Int32, stickersRecentLimit: Int32, stickersFavedLimit: Int32, channelsReadMediaPeriod: Int32, tmpSessions: Int32?, pinnedDialogsCountMax: Int32, pinnedInfolderCountMax: Int32, callReceiveTimeoutMs: Int32, callRingTimeoutMs: Int32, callConnectTimeoutMs: Int32, callPacketTimeoutMs: Int32, meUrlPrefix: String, autoupdateUrlPrefix: String?, gifSearchUsername: String?, venueSearchUsername: String?, imgSearchUsername: String?, staticMapsProvider: String?, captionLengthMax: Int32, messageLengthMax: Int32, webfileDcId: Int32, suggestedLangCode: String?, langPackVersion: Int32?, baseLangPackVersion: Int32?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .config(let flags, let date, let expires, let testMode, let thisDc, let dcOptions, let dcTxtDomainName, let chatSizeMax, let megagroupSizeMax, let forwardedCountMax, let onlineUpdatePeriodMs, let offlineBlurTimeoutMs, let offlineIdleTimeoutMs, let onlineCloudTimeoutMs, let notifyCloudDelayMs, let notifyDefaultDelayMs, let pushChatPeriodMs, let pushChatLimit, let savedGifsLimit, let editTimeLimit, let revokeTimeLimit, let revokePmTimeLimit, let ratingEDecay, let stickersRecentLimit, let stickersFavedLimit, let channelsReadMediaPeriod, let tmpSessions, let pinnedDialogsCountMax, let pinnedInfolderCountMax, let callReceiveTimeoutMs, let callRingTimeoutMs, let callConnectTimeoutMs, let callPacketTimeoutMs, let meUrlPrefix, let autoupdateUrlPrefix, let gifSearchUsername, let venueSearchUsername, let imgSearchUsername, let staticMapsProvider, let captionLengthMax, let messageLengthMax, let webfileDcId, let suggestedLangCode, let langPackVersion, let baseLangPackVersion): - if boxed { - buffer.appendInt32(856375399) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - serializeInt32(expires, buffer: buffer, boxed: false) - testMode.serialize(buffer, true) - serializeInt32(thisDc, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(dcOptions.count)) - for item in dcOptions { - item.serialize(buffer, true) - } - serializeString(dcTxtDomainName, buffer: buffer, boxed: false) - serializeInt32(chatSizeMax, buffer: buffer, boxed: false) - serializeInt32(megagroupSizeMax, buffer: buffer, boxed: false) - serializeInt32(forwardedCountMax, buffer: buffer, boxed: false) - serializeInt32(onlineUpdatePeriodMs, buffer: buffer, boxed: false) - serializeInt32(offlineBlurTimeoutMs, buffer: buffer, boxed: false) - serializeInt32(offlineIdleTimeoutMs, buffer: buffer, boxed: false) - serializeInt32(onlineCloudTimeoutMs, buffer: buffer, boxed: false) - serializeInt32(notifyCloudDelayMs, buffer: buffer, boxed: false) - serializeInt32(notifyDefaultDelayMs, buffer: buffer, boxed: false) - serializeInt32(pushChatPeriodMs, buffer: buffer, boxed: false) - serializeInt32(pushChatLimit, buffer: buffer, boxed: false) - serializeInt32(savedGifsLimit, buffer: buffer, boxed: false) - serializeInt32(editTimeLimit, buffer: buffer, boxed: false) - serializeInt32(revokeTimeLimit, buffer: buffer, boxed: false) - serializeInt32(revokePmTimeLimit, buffer: buffer, boxed: false) - serializeInt32(ratingEDecay, buffer: buffer, boxed: false) - serializeInt32(stickersRecentLimit, buffer: buffer, boxed: false) - serializeInt32(stickersFavedLimit, buffer: buffer, boxed: false) - serializeInt32(channelsReadMediaPeriod, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(tmpSessions!, buffer: buffer, boxed: false)} - serializeInt32(pinnedDialogsCountMax, buffer: buffer, boxed: false) - serializeInt32(pinnedInfolderCountMax, buffer: buffer, boxed: false) - serializeInt32(callReceiveTimeoutMs, buffer: buffer, boxed: false) - serializeInt32(callRingTimeoutMs, buffer: buffer, boxed: false) - serializeInt32(callConnectTimeoutMs, buffer: buffer, boxed: false) - serializeInt32(callPacketTimeoutMs, buffer: buffer, boxed: false) - serializeString(meUrlPrefix, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 7) != 0 {serializeString(autoupdateUrlPrefix!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 9) != 0 {serializeString(gifSearchUsername!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 10) != 0 {serializeString(venueSearchUsername!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 11) != 0 {serializeString(imgSearchUsername!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 12) != 0 {serializeString(staticMapsProvider!, buffer: buffer, boxed: false)} - serializeInt32(captionLengthMax, buffer: buffer, boxed: false) - serializeInt32(messageLengthMax, buffer: buffer, boxed: false) - serializeInt32(webfileDcId, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {serializeString(suggestedLangCode!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(langPackVersion!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(baseLangPackVersion!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .config(let flags, let date, let expires, let testMode, let thisDc, let dcOptions, let dcTxtDomainName, let chatSizeMax, let megagroupSizeMax, let forwardedCountMax, let onlineUpdatePeriodMs, let offlineBlurTimeoutMs, let offlineIdleTimeoutMs, let onlineCloudTimeoutMs, let notifyCloudDelayMs, let notifyDefaultDelayMs, let pushChatPeriodMs, let pushChatLimit, let savedGifsLimit, let editTimeLimit, let revokeTimeLimit, let revokePmTimeLimit, let ratingEDecay, let stickersRecentLimit, let stickersFavedLimit, let channelsReadMediaPeriod, let tmpSessions, let pinnedDialogsCountMax, let pinnedInfolderCountMax, let callReceiveTimeoutMs, let callRingTimeoutMs, let callConnectTimeoutMs, let callPacketTimeoutMs, let meUrlPrefix, let autoupdateUrlPrefix, let gifSearchUsername, let venueSearchUsername, let imgSearchUsername, let staticMapsProvider, let captionLengthMax, let messageLengthMax, let webfileDcId, let suggestedLangCode, let langPackVersion, let baseLangPackVersion): - return ("config", [("flags", flags), ("date", date), ("expires", expires), ("testMode", testMode), ("thisDc", thisDc), ("dcOptions", dcOptions), ("dcTxtDomainName", dcTxtDomainName), ("chatSizeMax", chatSizeMax), ("megagroupSizeMax", megagroupSizeMax), ("forwardedCountMax", forwardedCountMax), ("onlineUpdatePeriodMs", onlineUpdatePeriodMs), ("offlineBlurTimeoutMs", offlineBlurTimeoutMs), ("offlineIdleTimeoutMs", offlineIdleTimeoutMs), ("onlineCloudTimeoutMs", onlineCloudTimeoutMs), ("notifyCloudDelayMs", notifyCloudDelayMs), ("notifyDefaultDelayMs", notifyDefaultDelayMs), ("pushChatPeriodMs", pushChatPeriodMs), ("pushChatLimit", pushChatLimit), ("savedGifsLimit", savedGifsLimit), ("editTimeLimit", editTimeLimit), ("revokeTimeLimit", revokeTimeLimit), ("revokePmTimeLimit", revokePmTimeLimit), ("ratingEDecay", ratingEDecay), ("stickersRecentLimit", stickersRecentLimit), ("stickersFavedLimit", stickersFavedLimit), ("channelsReadMediaPeriod", channelsReadMediaPeriod), ("tmpSessions", tmpSessions), ("pinnedDialogsCountMax", pinnedDialogsCountMax), ("pinnedInfolderCountMax", pinnedInfolderCountMax), ("callReceiveTimeoutMs", callReceiveTimeoutMs), ("callRingTimeoutMs", callRingTimeoutMs), ("callConnectTimeoutMs", callConnectTimeoutMs), ("callPacketTimeoutMs", callPacketTimeoutMs), ("meUrlPrefix", meUrlPrefix), ("autoupdateUrlPrefix", autoupdateUrlPrefix), ("gifSearchUsername", gifSearchUsername), ("venueSearchUsername", venueSearchUsername), ("imgSearchUsername", imgSearchUsername), ("staticMapsProvider", staticMapsProvider), ("captionLengthMax", captionLengthMax), ("messageLengthMax", messageLengthMax), ("webfileDcId", webfileDcId), ("suggestedLangCode", suggestedLangCode), ("langPackVersion", langPackVersion), ("baseLangPackVersion", baseLangPackVersion)]) - } - } - - public static func parse_config(_ reader: BufferReader) -> Config? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: Api.Bool? - if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.Bool - } - var _5: Int32? - _5 = reader.readInt32() - var _6: [Api.DcOption]? - if let _ = reader.readInt32() { - _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DcOption.self) - } - var _7: String? - _7 = parseString(reader) - var _8: Int32? - _8 = reader.readInt32() - var _9: Int32? - _9 = reader.readInt32() - var _10: Int32? - _10 = reader.readInt32() - var _11: Int32? - _11 = reader.readInt32() - var _12: Int32? - _12 = reader.readInt32() - var _13: Int32? - _13 = reader.readInt32() - var _14: Int32? - _14 = reader.readInt32() - var _15: Int32? - _15 = reader.readInt32() - var _16: Int32? - _16 = reader.readInt32() - var _17: Int32? - _17 = reader.readInt32() - var _18: Int32? - _18 = reader.readInt32() - var _19: Int32? - _19 = reader.readInt32() - var _20: Int32? - _20 = reader.readInt32() - var _21: Int32? - _21 = reader.readInt32() - var _22: Int32? - _22 = reader.readInt32() - var _23: Int32? - _23 = reader.readInt32() - var _24: Int32? - _24 = reader.readInt32() - var _25: Int32? - _25 = reader.readInt32() - var _26: Int32? - _26 = reader.readInt32() - var _27: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_27 = reader.readInt32() } - var _28: Int32? - _28 = reader.readInt32() - var _29: Int32? - _29 = reader.readInt32() - var _30: Int32? - _30 = reader.readInt32() - var _31: Int32? - _31 = reader.readInt32() - var _32: Int32? - _32 = reader.readInt32() - var _33: Int32? - _33 = reader.readInt32() - var _34: String? - _34 = parseString(reader) - var _35: String? - if Int(_1!) & Int(1 << 7) != 0 {_35 = parseString(reader) } - var _36: String? - if Int(_1!) & Int(1 << 9) != 0 {_36 = parseString(reader) } - var _37: String? - if Int(_1!) & Int(1 << 10) != 0 {_37 = parseString(reader) } - var _38: String? - if Int(_1!) & Int(1 << 11) != 0 {_38 = parseString(reader) } - var _39: String? - if Int(_1!) & Int(1 << 12) != 0 {_39 = parseString(reader) } - var _40: Int32? - _40 = reader.readInt32() - var _41: Int32? - _41 = reader.readInt32() - var _42: Int32? - _42 = reader.readInt32() - var _43: String? - if Int(_1!) & Int(1 << 2) != 0 {_43 = parseString(reader) } - var _44: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_44 = reader.readInt32() } - var _45: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_45 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = _8 != nil - let _c9 = _9 != nil - let _c10 = _10 != nil - let _c11 = _11 != nil - let _c12 = _12 != nil - let _c13 = _13 != nil - let _c14 = _14 != nil - let _c15 = _15 != nil - let _c16 = _16 != nil - let _c17 = _17 != nil - let _c18 = _18 != nil - let _c19 = _19 != nil - let _c20 = _20 != nil - let _c21 = _21 != nil - let _c22 = _22 != nil - let _c23 = _23 != nil - let _c24 = _24 != nil - let _c25 = _25 != nil - let _c26 = _26 != nil - let _c27 = (Int(_1!) & Int(1 << 0) == 0) || _27 != nil - let _c28 = _28 != nil - let _c29 = _29 != nil - let _c30 = _30 != nil - let _c31 = _31 != nil - let _c32 = _32 != nil - let _c33 = _33 != nil - let _c34 = _34 != nil - let _c35 = (Int(_1!) & Int(1 << 7) == 0) || _35 != nil - let _c36 = (Int(_1!) & Int(1 << 9) == 0) || _36 != nil - let _c37 = (Int(_1!) & Int(1 << 10) == 0) || _37 != nil - let _c38 = (Int(_1!) & Int(1 << 11) == 0) || _38 != nil - let _c39 = (Int(_1!) & Int(1 << 12) == 0) || _39 != nil - let _c40 = _40 != nil - let _c41 = _41 != nil - let _c42 = _42 != nil - let _c43 = (Int(_1!) & Int(1 << 2) == 0) || _43 != nil - let _c44 = (Int(_1!) & Int(1 << 2) == 0) || _44 != nil - let _c45 = (Int(_1!) & Int(1 << 2) == 0) || _45 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 && _c20 && _c21 && _c22 && _c23 && _c24 && _c25 && _c26 && _c27 && _c28 && _c29 && _c30 && _c31 && _c32 && _c33 && _c34 && _c35 && _c36 && _c37 && _c38 && _c39 && _c40 && _c41 && _c42 && _c43 && _c44 && _c45 { - return Api.Config.config(flags: _1!, date: _2!, expires: _3!, testMode: _4!, thisDc: _5!, dcOptions: _6!, dcTxtDomainName: _7!, chatSizeMax: _8!, megagroupSizeMax: _9!, forwardedCountMax: _10!, onlineUpdatePeriodMs: _11!, offlineBlurTimeoutMs: _12!, offlineIdleTimeoutMs: _13!, onlineCloudTimeoutMs: _14!, notifyCloudDelayMs: _15!, notifyDefaultDelayMs: _16!, pushChatPeriodMs: _17!, pushChatLimit: _18!, savedGifsLimit: _19!, editTimeLimit: _20!, revokeTimeLimit: _21!, revokePmTimeLimit: _22!, ratingEDecay: _23!, stickersRecentLimit: _24!, stickersFavedLimit: _25!, channelsReadMediaPeriod: _26!, tmpSessions: _27, pinnedDialogsCountMax: _28!, pinnedInfolderCountMax: _29!, callReceiveTimeoutMs: _30!, callRingTimeoutMs: _31!, callConnectTimeoutMs: _32!, callPacketTimeoutMs: _33!, meUrlPrefix: _34!, autoupdateUrlPrefix: _35, gifSearchUsername: _36, venueSearchUsername: _37, imgSearchUsername: _38, staticMapsProvider: _39, captionLengthMax: _40!, messageLengthMax: _41!, webfileDcId: _42!, suggestedLangCode: _43, langPackVersion: _44, baseLangPackVersion: _45) - } - else { - return nil - } - } - - } - public enum TopPeerCategoryPeers: TypeConstructorDescription { - case topPeerCategoryPeers(category: Api.TopPeerCategory, count: Int32, peers: [Api.TopPeer]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .topPeerCategoryPeers(let category, let count, let peers): - if boxed { - buffer.appendInt32(-75283823) - } - category.serialize(buffer, true) - serializeInt32(count, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(peers.count)) - for item in peers { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .topPeerCategoryPeers(let category, let count, let peers): - return ("topPeerCategoryPeers", [("category", category), ("count", count), ("peers", peers)]) - } - } - - public static func parse_topPeerCategoryPeers(_ reader: BufferReader) -> TopPeerCategoryPeers? { - var _1: Api.TopPeerCategory? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.TopPeerCategory - } - var _2: Int32? - _2 = reader.readInt32() - var _3: [Api.TopPeer]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.TopPeer.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.TopPeerCategoryPeers.topPeerCategoryPeers(category: _1!, count: _2!, peers: _3!) - } - else { - return nil - } - } - - } - public enum Game: TypeConstructorDescription { - case game(flags: Int32, id: Int64, accessHash: Int64, shortName: String, title: String, description: String, photo: Api.Photo, document: Api.Document?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .game(let flags, let id, let accessHash, let shortName, let title, let description, let photo, let document): - if boxed { - buffer.appendInt32(-1107729093) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeString(shortName, buffer: buffer, boxed: false) - serializeString(title, buffer: buffer, boxed: false) - serializeString(description, buffer: buffer, boxed: false) - photo.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {document!.serialize(buffer, true)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .game(let flags, let id, let accessHash, let shortName, let title, let description, let photo, let document): - return ("game", [("flags", flags), ("id", id), ("accessHash", accessHash), ("shortName", shortName), ("title", title), ("description", description), ("photo", photo), ("document", document)]) - } - } - - public static func parse_game(_ reader: BufferReader) -> Game? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Int64? - _3 = reader.readInt64() - var _4: String? - _4 = parseString(reader) - var _5: String? - _5 = parseString(reader) - var _6: String? - _6 = parseString(reader) - var _7: Api.Photo? - if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.Photo - } - var _8: Api.Document? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _8 = Api.parse(reader, signature: signature) as? Api.Document - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 0) == 0) || _8 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { - return Api.Game.game(flags: _1!, id: _2!, accessHash: _3!, shortName: _4!, title: _5!, description: _6!, photo: _7!, document: _8) - } - else { - return nil - } - } - - } - public enum ChatAdminRights: TypeConstructorDescription { - case chatAdminRights(flags: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .chatAdminRights(let flags): - if boxed { - buffer.appendInt32(1605510357) - } - serializeInt32(flags, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .chatAdminRights(let flags): - return ("chatAdminRights", [("flags", flags)]) - } - } - - public static func parse_chatAdminRights(_ reader: BufferReader) -> ChatAdminRights? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.ChatAdminRights.chatAdminRights(flags: _1!) - } - else { - return nil - } - } - - } - public enum SecurePasswordKdfAlgo: TypeConstructorDescription { - case securePasswordKdfAlgoUnknown - case securePasswordKdfAlgoPBKDF2HMACSHA512iter100000(salt: Buffer) - case securePasswordKdfAlgoSHA512(salt: Buffer) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .securePasswordKdfAlgoUnknown: - if boxed { - buffer.appendInt32(4883767) - } - - break - case .securePasswordKdfAlgoPBKDF2HMACSHA512iter100000(let salt): - if boxed { - buffer.appendInt32(-1141711456) - } - serializeBytes(salt, buffer: buffer, boxed: false) - break - case .securePasswordKdfAlgoSHA512(let salt): - if boxed { - buffer.appendInt32(-2042159726) - } - serializeBytes(salt, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .securePasswordKdfAlgoUnknown: - return ("securePasswordKdfAlgoUnknown", []) - case .securePasswordKdfAlgoPBKDF2HMACSHA512iter100000(let salt): - return ("securePasswordKdfAlgoPBKDF2HMACSHA512iter100000", [("salt", salt)]) - case .securePasswordKdfAlgoSHA512(let salt): - return ("securePasswordKdfAlgoSHA512", [("salt", salt)]) - } - } - - public static func parse_securePasswordKdfAlgoUnknown(_ reader: BufferReader) -> SecurePasswordKdfAlgo? { - return Api.SecurePasswordKdfAlgo.securePasswordKdfAlgoUnknown - } - public static func parse_securePasswordKdfAlgoPBKDF2HMACSHA512iter100000(_ reader: BufferReader) -> SecurePasswordKdfAlgo? { - var _1: Buffer? - _1 = parseBytes(reader) - let _c1 = _1 != nil - if _c1 { - return Api.SecurePasswordKdfAlgo.securePasswordKdfAlgoPBKDF2HMACSHA512iter100000(salt: _1!) - } - else { - return nil - } - } - public static func parse_securePasswordKdfAlgoSHA512(_ reader: BufferReader) -> SecurePasswordKdfAlgo? { - var _1: Buffer? - _1 = parseBytes(reader) - let _c1 = _1 != nil - if _c1 { - return Api.SecurePasswordKdfAlgo.securePasswordKdfAlgoSHA512(salt: _1!) - } - else { - return nil - } - } - - } - public enum BotCommand: TypeConstructorDescription { - case botCommand(command: String, description: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .botCommand(let command, let description): - if boxed { - buffer.appendInt32(-1032140601) - } - serializeString(command, buffer: buffer, boxed: false) - serializeString(description, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .botCommand(let command, let description): - return ("botCommand", [("command", command), ("description", description)]) - } - } - - public static func parse_botCommand(_ reader: BufferReader) -> BotCommand? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.BotCommand.botCommand(command: _1!, description: _2!) - } - else { - return nil - } - } - - } - public enum ChatInviteImporter: TypeConstructorDescription { - case chatInviteImporter(userId: Int32, date: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .chatInviteImporter(let userId, let date): - if boxed { - buffer.appendInt32(507405952) - } - serializeInt32(userId, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .chatInviteImporter(let userId, let date): - return ("chatInviteImporter", [("userId", userId), ("date", date)]) - } - } - - public static func parse_chatInviteImporter(_ reader: BufferReader) -> ChatInviteImporter? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ChatInviteImporter.chatInviteImporter(userId: _1!, date: _2!) - } - else { - return nil - } - } - - } - public enum CdnPublicKey: TypeConstructorDescription { - case cdnPublicKey(dcId: Int32, publicKey: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .cdnPublicKey(let dcId, let publicKey): - if boxed { - buffer.appendInt32(-914167110) - } - serializeInt32(dcId, buffer: buffer, boxed: false) - serializeString(publicKey, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .cdnPublicKey(let dcId, let publicKey): - return ("cdnPublicKey", [("dcId", dcId), ("publicKey", publicKey)]) - } - } - - public static func parse_cdnPublicKey(_ reader: BufferReader) -> CdnPublicKey? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.CdnPublicKey.cdnPublicKey(dcId: _1!, publicKey: _2!) - } - else { - return nil - } - } - - } - public enum MessageReplies: TypeConstructorDescription { - case messageReplies(flags: Int32, replies: Int32, repliesPts: Int32, recentRepliers: [Api.Peer]?, channelId: Int32?, maxId: Int32?, readMaxId: Int32?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .messageReplies(let flags, let replies, let repliesPts, let recentRepliers, let channelId, let maxId, let readMaxId): - if boxed { - buffer.appendInt32(1093204652) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(replies, buffer: buffer, boxed: false) - serializeInt32(repliesPts, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(recentRepliers!.count)) - for item in recentRepliers! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(channelId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(maxId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeInt32(readMaxId!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .messageReplies(let flags, let replies, let repliesPts, let recentRepliers, let channelId, let maxId, let readMaxId): - return ("messageReplies", [("flags", flags), ("replies", replies), ("repliesPts", repliesPts), ("recentRepliers", recentRepliers), ("channelId", channelId), ("maxId", maxId), ("readMaxId", readMaxId)]) - } - } - - public static func parse_messageReplies(_ reader: BufferReader) -> MessageReplies? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: [Api.Peer]? - if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Peer.self) - } } - var _5: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_5 = reader.readInt32() } - var _6: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_6 = reader.readInt32() } - var _7: Int32? - if Int(_1!) & Int(1 << 3) != 0 {_7 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.MessageReplies.messageReplies(flags: _1!, replies: _2!, repliesPts: _3!, recentRepliers: _4, channelId: _5, maxId: _6, readMaxId: _7) - } - else { - return nil - } - } - - } - public enum InputGame: TypeConstructorDescription { - case inputGameID(id: Int64, accessHash: Int64) - case inputGameShortName(botId: Api.InputUser, shortName: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputGameID(let id, let accessHash): - if boxed { - buffer.appendInt32(53231223) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - break - case .inputGameShortName(let botId, let shortName): - if boxed { - buffer.appendInt32(-1020139510) - } - botId.serialize(buffer, true) - serializeString(shortName, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputGameID(let id, let accessHash): - return ("inputGameID", [("id", id), ("accessHash", accessHash)]) - case .inputGameShortName(let botId, let shortName): - return ("inputGameShortName", [("botId", botId), ("shortName", shortName)]) - } - } - - public static func parse_inputGameID(_ reader: BufferReader) -> InputGame? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputGame.inputGameID(id: _1!, accessHash: _2!) - } - else { - return nil - } - } - public static func parse_inputGameShortName(_ reader: BufferReader) -> InputGame? { - var _1: Api.InputUser? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputUser - } - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputGame.inputGameShortName(botId: _1!, shortName: _2!) - } - else { - return nil - } - } - - } - public enum InputMessage: TypeConstructorDescription { - case inputMessageID(id: Int32) - case inputMessageReplyTo(id: Int32) - case inputMessagePinned - case inputMessageCallbackQuery(id: Int32, queryId: Int64) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputMessageID(let id): - if boxed { - buffer.appendInt32(-1502174430) - } - serializeInt32(id, buffer: buffer, boxed: false) - break - case .inputMessageReplyTo(let id): - if boxed { - buffer.appendInt32(-1160215659) - } - serializeInt32(id, buffer: buffer, boxed: false) - break - case .inputMessagePinned: - if boxed { - buffer.appendInt32(-2037963464) - } - - break - case .inputMessageCallbackQuery(let id, let queryId): - if boxed { - buffer.appendInt32(-1392895362) - } - serializeInt32(id, buffer: buffer, boxed: false) - serializeInt64(queryId, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputMessageID(let id): - return ("inputMessageID", [("id", id)]) - case .inputMessageReplyTo(let id): - return ("inputMessageReplyTo", [("id", id)]) - case .inputMessagePinned: - return ("inputMessagePinned", []) - case .inputMessageCallbackQuery(let id, let queryId): - return ("inputMessageCallbackQuery", [("id", id), ("queryId", queryId)]) - } - } - - public static func parse_inputMessageID(_ reader: BufferReader) -> InputMessage? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.InputMessage.inputMessageID(id: _1!) - } - else { - return nil - } - } - public static func parse_inputMessageReplyTo(_ reader: BufferReader) -> InputMessage? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.InputMessage.inputMessageReplyTo(id: _1!) - } - else { - return nil - } - } - public static func parse_inputMessagePinned(_ reader: BufferReader) -> InputMessage? { - return Api.InputMessage.inputMessagePinned - } - public static func parse_inputMessageCallbackQuery(_ reader: BufferReader) -> InputMessage? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputMessage.inputMessageCallbackQuery(id: _1!, queryId: _2!) - } - else { - return nil - } - } - - } - public enum PhoneCallProtocol: TypeConstructorDescription { - case phoneCallProtocol(flags: Int32, minLayer: Int32, maxLayer: Int32, libraryVersions: [String]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .phoneCallProtocol(let flags, let minLayer, let maxLayer, let libraryVersions): - if boxed { - buffer.appendInt32(-58224696) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(minLayer, buffer: buffer, boxed: false) - serializeInt32(maxLayer, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(libraryVersions.count)) - for item in libraryVersions { - serializeString(item, buffer: buffer, boxed: false) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .phoneCallProtocol(let flags, let minLayer, let maxLayer, let libraryVersions): - return ("phoneCallProtocol", [("flags", flags), ("minLayer", minLayer), ("maxLayer", maxLayer), ("libraryVersions", libraryVersions)]) - } - } - - public static func parse_phoneCallProtocol(_ reader: BufferReader) -> PhoneCallProtocol? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: [String]? - if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.PhoneCallProtocol.phoneCallProtocol(flags: _1!, minLayer: _2!, maxLayer: _3!, libraryVersions: _4!) - } - else { - return nil - } - } - - } - public enum StatsDateRangeDays: TypeConstructorDescription { - case statsDateRangeDays(minDate: Int32, maxDate: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .statsDateRangeDays(let minDate, let maxDate): - if boxed { - buffer.appendInt32(-1237848657) - } - serializeInt32(minDate, buffer: buffer, boxed: false) - serializeInt32(maxDate, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .statsDateRangeDays(let minDate, let maxDate): - return ("statsDateRangeDays", [("minDate", minDate), ("maxDate", maxDate)]) - } - } - - public static func parse_statsDateRangeDays(_ reader: BufferReader) -> StatsDateRangeDays? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.StatsDateRangeDays.statsDateRangeDays(minDate: _1!, maxDate: _2!) - } - else { - return nil - } - } - - } - public enum WallPaper: TypeConstructorDescription { - case wallPaper(id: Int64, flags: Int32, accessHash: Int64, slug: String, document: Api.Document, settings: Api.WallPaperSettings?) - case wallPaperNoFile(flags: Int32, settings: Api.WallPaperSettings?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .wallPaper(let id, let flags, let accessHash, let slug, let document, let settings): - if boxed { - buffer.appendInt32(-1539849235) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeString(slug, buffer: buffer, boxed: false) - document.serialize(buffer, true) - if Int(flags) & Int(1 << 2) != 0 {settings!.serialize(buffer, true)} - break - case .wallPaperNoFile(let flags, let settings): - if boxed { - buffer.appendInt32(-1963717851) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {settings!.serialize(buffer, true)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .wallPaper(let id, let flags, let accessHash, let slug, let document, let settings): - return ("wallPaper", [("id", id), ("flags", flags), ("accessHash", accessHash), ("slug", slug), ("document", document), ("settings", settings)]) - case .wallPaperNoFile(let flags, let settings): - return ("wallPaperNoFile", [("flags", flags), ("settings", settings)]) - } - } - - public static func parse_wallPaper(_ reader: BufferReader) -> WallPaper? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int64? - _3 = reader.readInt64() - var _4: String? - _4 = parseString(reader) - var _5: Api.Document? - if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.Document - } - var _6: Api.WallPaperSettings? - if Int(_2!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.WallPaperSettings - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = (Int(_2!) & Int(1 << 2) == 0) || _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.WallPaper.wallPaper(id: _1!, flags: _2!, accessHash: _3!, slug: _4!, document: _5!, settings: _6) - } - else { - return nil - } - } - public static func parse_wallPaperNoFile(_ reader: BufferReader) -> WallPaper? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.WallPaperSettings? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.WallPaperSettings - } } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 2) == 0) || _2 != nil - if _c1 && _c2 { - return Api.WallPaper.wallPaperNoFile(flags: _1!, settings: _2) - } - else { - return nil - } - } - - } - public enum Invoice: TypeConstructorDescription { - case invoice(flags: Int32, currency: String, prices: [Api.LabeledPrice]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .invoice(let flags, let currency, let prices): - if boxed { - buffer.appendInt32(-1022713000) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(currency, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(prices.count)) - for item in prices { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .invoice(let flags, let currency, let prices): - return ("invoice", [("flags", flags), ("currency", currency), ("prices", prices)]) - } - } - - public static func parse_invoice(_ reader: BufferReader) -> Invoice? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: [Api.LabeledPrice]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.LabeledPrice.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.Invoice.invoice(flags: _1!, currency: _2!, prices: _3!) - } - else { - return nil - } - } - - } - public enum PeerSettings: TypeConstructorDescription { - case peerSettings(flags: Int32, geoDistance: Int32?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .peerSettings(let flags, let geoDistance): - if boxed { - buffer.appendInt32(1933519201) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 6) != 0 {serializeInt32(geoDistance!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .peerSettings(let flags, let geoDistance): - return ("peerSettings", [("flags", flags), ("geoDistance", geoDistance)]) - } - } - - public static func parse_peerSettings(_ reader: BufferReader) -> PeerSettings? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - if Int(_1!) & Int(1 << 6) != 0 {_2 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 6) == 0) || _2 != nil - if _c1 && _c2 { - return Api.PeerSettings.peerSettings(flags: _1!, geoDistance: _2) - } - else { - return nil - } - } - - } - public enum InputChatPhoto: TypeConstructorDescription { - case inputChatPhotoEmpty - case inputChatUploadedPhoto(flags: Int32, file: Api.InputFile?, video: Api.InputFile?, videoStartTs: Double?) - case inputChatPhoto(id: Api.InputPhoto) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputChatPhotoEmpty: - if boxed { - buffer.appendInt32(480546647) - } - - break - case .inputChatUploadedPhoto(let flags, let file, let video, let videoStartTs): - if boxed { - buffer.appendInt32(-968723890) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {file!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {video!.serialize(buffer, true)} - if Int(flags) & Int(1 << 2) != 0 {serializeDouble(videoStartTs!, buffer: buffer, boxed: false)} - break - case .inputChatPhoto(let id): - if boxed { - buffer.appendInt32(-1991004873) - } - id.serialize(buffer, true) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputChatPhotoEmpty: - return ("inputChatPhotoEmpty", []) - case .inputChatUploadedPhoto(let flags, let file, let video, let videoStartTs): - return ("inputChatUploadedPhoto", [("flags", flags), ("file", file), ("video", video), ("videoStartTs", videoStartTs)]) - case .inputChatPhoto(let id): - return ("inputChatPhoto", [("id", id)]) - } - } - - public static func parse_inputChatPhotoEmpty(_ reader: BufferReader) -> InputChatPhoto? { - return Api.InputChatPhoto.inputChatPhotoEmpty - } - public static func parse_inputChatUploadedPhoto(_ reader: BufferReader) -> InputChatPhoto? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.InputFile? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.InputFile - } } - var _3: Api.InputFile? - if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.InputFile - } } - var _4: Double? - if Int(_1!) & Int(1 << 2) != 0 {_4 = reader.readDouble() } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputChatPhoto.inputChatUploadedPhoto(flags: _1!, file: _2, video: _3, videoStartTs: _4) - } - else { - return nil - } - } - public static func parse_inputChatPhoto(_ reader: BufferReader) -> InputChatPhoto? { - var _1: Api.InputPhoto? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputPhoto - } - let _c1 = _1 != nil - if _c1 { - return Api.InputChatPhoto.inputChatPhoto(id: _1!) - } - else { - return nil - } - } - - } - public enum PaymentCharge: TypeConstructorDescription { - case paymentCharge(id: String, providerChargeId: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .paymentCharge(let id, let providerChargeId): - if boxed { - buffer.appendInt32(-368917890) - } - serializeString(id, buffer: buffer, boxed: false) - serializeString(providerChargeId, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .paymentCharge(let id, let providerChargeId): - return ("paymentCharge", [("id", id), ("providerChargeId", providerChargeId)]) - } - } - - public static func parse_paymentCharge(_ reader: BufferReader) -> PaymentCharge? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.PaymentCharge.paymentCharge(id: _1!, providerChargeId: _2!) - } - else { - return nil - } - } - - } - public enum MessageInteractionCounters: TypeConstructorDescription { - case messageInteractionCounters(msgId: Int32, views: Int32, forwards: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .messageInteractionCounters(let msgId, let views, let forwards): - if boxed { - buffer.appendInt32(-1387279939) - } - serializeInt32(msgId, buffer: buffer, boxed: false) - serializeInt32(views, buffer: buffer, boxed: false) - serializeInt32(forwards, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .messageInteractionCounters(let msgId, let views, let forwards): - return ("messageInteractionCounters", [("msgId", msgId), ("views", views), ("forwards", forwards)]) - } - } - - public static func parse_messageInteractionCounters(_ reader: BufferReader) -> MessageInteractionCounters? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.MessageInteractionCounters.messageInteractionCounters(msgId: _1!, views: _2!, forwards: _3!) - } - else { - return nil - } - } - - } - public enum Updates: TypeConstructorDescription { - case updatesTooLong - case updateShortMessage(flags: Int32, id: Int32, userId: Int32, message: String, pts: Int32, ptsCount: Int32, date: Int32, fwdFrom: Api.MessageFwdHeader?, viaBotId: Int32?, replyTo: Api.MessageReplyHeader?, entities: [Api.MessageEntity]?, ttlPeriod: Int32?) - case updateShortChatMessage(flags: Int32, id: Int32, fromId: Int32, chatId: Int32, message: String, pts: Int32, ptsCount: Int32, date: Int32, fwdFrom: Api.MessageFwdHeader?, viaBotId: Int32?, replyTo: Api.MessageReplyHeader?, entities: [Api.MessageEntity]?, ttlPeriod: Int32?) - case updateShort(update: Api.Update, date: Int32) - case updatesCombined(updates: [Api.Update], users: [Api.User], chats: [Api.Chat], date: Int32, seqStart: Int32, seq: Int32) - case updates(updates: [Api.Update], users: [Api.User], chats: [Api.Chat], date: Int32, seq: Int32) - case updateShortSentMessage(flags: Int32, id: Int32, pts: Int32, ptsCount: Int32, date: Int32, media: Api.MessageMedia?, entities: [Api.MessageEntity]?, ttlPeriod: Int32?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .updatesTooLong: - if boxed { - buffer.appendInt32(-484987010) - } - - break - case .updateShortMessage(let flags, let id, let userId, let message, let pts, let ptsCount, let date, let fwdFrom, let viaBotId, let replyTo, let entities, let ttlPeriod): - if boxed { - buffer.appendInt32(-84936653) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - serializeString(message, buffer: buffer, boxed: false) - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(ptsCount, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {fwdFrom!.serialize(buffer, true)} - if Int(flags) & Int(1 << 11) != 0 {serializeInt32(viaBotId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {replyTo!.serialize(buffer, true)} - if Int(flags) & Int(1 << 7) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities!.count)) - for item in entities! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 25) != 0 {serializeInt32(ttlPeriod!, buffer: buffer, boxed: false)} - break - case .updateShortChatMessage(let flags, let id, let fromId, let chatId, let message, let pts, let ptsCount, let date, let fwdFrom, let viaBotId, let replyTo, let entities, let ttlPeriod): - if boxed { - buffer.appendInt32(290961496) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - serializeInt32(fromId, buffer: buffer, boxed: false) - serializeInt32(chatId, buffer: buffer, boxed: false) - serializeString(message, buffer: buffer, boxed: false) - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(ptsCount, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {fwdFrom!.serialize(buffer, true)} - if Int(flags) & Int(1 << 11) != 0 {serializeInt32(viaBotId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {replyTo!.serialize(buffer, true)} - if Int(flags) & Int(1 << 7) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities!.count)) - for item in entities! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 25) != 0 {serializeInt32(ttlPeriod!, buffer: buffer, boxed: false)} - break - case .updateShort(let update, let date): - if boxed { - buffer.appendInt32(2027216577) - } - update.serialize(buffer, true) - serializeInt32(date, buffer: buffer, boxed: false) - break - case .updatesCombined(let updates, let users, let chats, let date, let seqStart, let seq): - if boxed { - buffer.appendInt32(1918567619) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(updates.count)) - for item in updates { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(chats.count)) - for item in chats { - item.serialize(buffer, true) - } - serializeInt32(date, buffer: buffer, boxed: false) - serializeInt32(seqStart, buffer: buffer, boxed: false) - serializeInt32(seq, buffer: buffer, boxed: false) - break - case .updates(let updates, let users, let chats, let date, let seq): - if boxed { - buffer.appendInt32(1957577280) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(updates.count)) - for item in updates { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(chats.count)) - for item in chats { - item.serialize(buffer, true) - } - serializeInt32(date, buffer: buffer, boxed: false) - serializeInt32(seq, buffer: buffer, boxed: false) - break - case .updateShortSentMessage(let flags, let id, let pts, let ptsCount, let date, let media, let entities, let ttlPeriod): - if boxed { - buffer.appendInt32(-1877614335) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(ptsCount, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 9) != 0 {media!.serialize(buffer, true)} - if Int(flags) & Int(1 << 7) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities!.count)) - for item in entities! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 25) != 0 {serializeInt32(ttlPeriod!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .updatesTooLong: - return ("updatesTooLong", []) - case .updateShortMessage(let flags, let id, let userId, let message, let pts, let ptsCount, let date, let fwdFrom, let viaBotId, let replyTo, let entities, let ttlPeriod): - return ("updateShortMessage", [("flags", flags), ("id", id), ("userId", userId), ("message", message), ("pts", pts), ("ptsCount", ptsCount), ("date", date), ("fwdFrom", fwdFrom), ("viaBotId", viaBotId), ("replyTo", replyTo), ("entities", entities), ("ttlPeriod", ttlPeriod)]) - case .updateShortChatMessage(let flags, let id, let fromId, let chatId, let message, let pts, let ptsCount, let date, let fwdFrom, let viaBotId, let replyTo, let entities, let ttlPeriod): - return ("updateShortChatMessage", [("flags", flags), ("id", id), ("fromId", fromId), ("chatId", chatId), ("message", message), ("pts", pts), ("ptsCount", ptsCount), ("date", date), ("fwdFrom", fwdFrom), ("viaBotId", viaBotId), ("replyTo", replyTo), ("entities", entities), ("ttlPeriod", ttlPeriod)]) - case .updateShort(let update, let date): - return ("updateShort", [("update", update), ("date", date)]) - case .updatesCombined(let updates, let users, let chats, let date, let seqStart, let seq): - return ("updatesCombined", [("updates", updates), ("users", users), ("chats", chats), ("date", date), ("seqStart", seqStart), ("seq", seq)]) - case .updates(let updates, let users, let chats, let date, let seq): - return ("updates", [("updates", updates), ("users", users), ("chats", chats), ("date", date), ("seq", seq)]) - case .updateShortSentMessage(let flags, let id, let pts, let ptsCount, let date, let media, let entities, let ttlPeriod): - return ("updateShortSentMessage", [("flags", flags), ("id", id), ("pts", pts), ("ptsCount", ptsCount), ("date", date), ("media", media), ("entities", entities), ("ttlPeriod", ttlPeriod)]) - } - } - - public static func parse_updatesTooLong(_ reader: BufferReader) -> Updates? { - return Api.Updates.updatesTooLong - } - public static func parse_updateShortMessage(_ reader: BufferReader) -> Updates? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: String? - _4 = parseString(reader) - var _5: Int32? - _5 = reader.readInt32() - var _6: Int32? - _6 = reader.readInt32() - var _7: Int32? - _7 = reader.readInt32() - var _8: Api.MessageFwdHeader? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _8 = Api.parse(reader, signature: signature) as? Api.MessageFwdHeader - } } - var _9: Int32? - if Int(_1!) & Int(1 << 11) != 0 {_9 = reader.readInt32() } - var _10: Api.MessageReplyHeader? - if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { - _10 = Api.parse(reader, signature: signature) as? Api.MessageReplyHeader - } } - var _11: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 7) != 0 {if let _ = reader.readInt32() { - _11 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) - } } - var _12: Int32? - if Int(_1!) & Int(1 << 25) != 0 {_12 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 11) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 3) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 7) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 25) == 0) || _12 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 { - return Api.Updates.updateShortMessage(flags: _1!, id: _2!, userId: _3!, message: _4!, pts: _5!, ptsCount: _6!, date: _7!, fwdFrom: _8, viaBotId: _9, replyTo: _10, entities: _11, ttlPeriod: _12) - } - else { - return nil - } - } - public static func parse_updateShortChatMessage(_ reader: BufferReader) -> Updates? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: String? - _5 = parseString(reader) - var _6: Int32? - _6 = reader.readInt32() - var _7: Int32? - _7 = reader.readInt32() - var _8: Int32? - _8 = reader.readInt32() - var _9: Api.MessageFwdHeader? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _9 = Api.parse(reader, signature: signature) as? Api.MessageFwdHeader - } } - var _10: Int32? - if Int(_1!) & Int(1 << 11) != 0 {_10 = reader.readInt32() } - var _11: Api.MessageReplyHeader? - if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { - _11 = Api.parse(reader, signature: signature) as? Api.MessageReplyHeader - } } - var _12: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 7) != 0 {if let _ = reader.readInt32() { - _12 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) - } } - var _13: Int32? - if Int(_1!) & Int(1 << 25) != 0 {_13 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = _8 != nil - let _c9 = (Int(_1!) & Int(1 << 2) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 11) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 3) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 7) == 0) || _12 != nil - let _c13 = (Int(_1!) & Int(1 << 25) == 0) || _13 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 { - return Api.Updates.updateShortChatMessage(flags: _1!, id: _2!, fromId: _3!, chatId: _4!, message: _5!, pts: _6!, ptsCount: _7!, date: _8!, fwdFrom: _9, viaBotId: _10, replyTo: _11, entities: _12, ttlPeriod: _13) - } - else { - return nil - } - } - public static func parse_updateShort(_ reader: BufferReader) -> Updates? { - var _1: Api.Update? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Update - } - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.Updates.updateShort(update: _1!, date: _2!) - } - else { - return nil - } - } - public static func parse_updatesCombined(_ reader: BufferReader) -> Updates? { - var _1: [Api.Update]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Update.self) - } - var _2: [Api.User]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } - var _3: [Api.Chat]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) - } - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - var _6: Int32? - _6 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.Updates.updatesCombined(updates: _1!, users: _2!, chats: _3!, date: _4!, seqStart: _5!, seq: _6!) - } - else { - return nil - } - } - public static func parse_updates(_ reader: BufferReader) -> Updates? { - var _1: [Api.Update]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Update.self) - } - var _2: [Api.User]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } - var _3: [Api.Chat]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) - } - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.Updates.updates(updates: _1!, users: _2!, chats: _3!, date: _4!, seq: _5!) - } - else { - return nil - } - } - public static func parse_updateShortSentMessage(_ reader: BufferReader) -> Updates? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - var _6: Api.MessageMedia? - if Int(_1!) & Int(1 << 9) != 0 {if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.MessageMedia - } } - var _7: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 7) != 0 {if let _ = reader.readInt32() { - _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) - } } - var _8: Int32? - if Int(_1!) & Int(1 << 25) != 0 {_8 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 9) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 7) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 25) == 0) || _8 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { - return Api.Updates.updateShortSentMessage(flags: _1!, id: _2!, pts: _3!, ptsCount: _4!, date: _5!, media: _6, entities: _7, ttlPeriod: _8) - } - else { - return nil - } - } - - } - public enum StatsAbsValueAndPrev: TypeConstructorDescription { - case statsAbsValueAndPrev(current: Double, previous: Double) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .statsAbsValueAndPrev(let current, let previous): - if boxed { - buffer.appendInt32(-884757282) - } - serializeDouble(current, buffer: buffer, boxed: false) - serializeDouble(previous, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .statsAbsValueAndPrev(let current, let previous): - return ("statsAbsValueAndPrev", [("current", current), ("previous", previous)]) - } - } - - public static func parse_statsAbsValueAndPrev(_ reader: BufferReader) -> StatsAbsValueAndPrev? { - var _1: Double? - _1 = reader.readDouble() - var _2: Double? - _2 = reader.readDouble() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.StatsAbsValueAndPrev.statsAbsValueAndPrev(current: _1!, previous: _2!) - } - else { - return nil - } - } - - } - public enum MessageMedia: TypeConstructorDescription { - case messageMediaEmpty - case messageMediaPhoto(flags: Int32, photo: Api.Photo?, ttlSeconds: Int32?) - case messageMediaGeo(geo: Api.GeoPoint) - case messageMediaContact(phoneNumber: String, firstName: String, lastName: String, vcard: String, userId: Int32) - case messageMediaUnsupported - case messageMediaDocument(flags: Int32, document: Api.Document?, ttlSeconds: Int32?) - case messageMediaWebPage(webpage: Api.WebPage) - case messageMediaVenue(geo: Api.GeoPoint, title: String, address: String, provider: String, venueId: String, venueType: String) - case messageMediaGame(game: Api.Game) - case messageMediaInvoice(flags: Int32, title: String, description: String, photo: Api.WebDocument?, receiptMsgId: Int32?, currency: String, totalAmount: Int64, startParam: String) - case messageMediaGeoLive(flags: Int32, geo: Api.GeoPoint, heading: Int32?, period: Int32, proximityNotificationRadius: Int32?) - case messageMediaPoll(poll: Api.Poll, results: Api.PollResults) - case messageMediaDice(value: Int32, emoticon: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .messageMediaEmpty: - if boxed { - buffer.appendInt32(1038967584) - } - - break - case .messageMediaPhoto(let flags, let photo, let ttlSeconds): - if boxed { - buffer.appendInt32(1766936791) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {photo!.serialize(buffer, true)} - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} - break - case .messageMediaGeo(let geo): - if boxed { - buffer.appendInt32(1457575028) - } - geo.serialize(buffer, true) - break - case .messageMediaContact(let phoneNumber, let firstName, let lastName, let vcard, let userId): - if boxed { - buffer.appendInt32(-873313984) - } - serializeString(phoneNumber, buffer: buffer, boxed: false) - serializeString(firstName, buffer: buffer, boxed: false) - serializeString(lastName, buffer: buffer, boxed: false) - serializeString(vcard, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - break - case .messageMediaUnsupported: - if boxed { - buffer.appendInt32(-1618676578) - } - - break - case .messageMediaDocument(let flags, let document, let ttlSeconds): - if boxed { - buffer.appendInt32(-1666158377) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {document!.serialize(buffer, true)} - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} - break - case .messageMediaWebPage(let webpage): - if boxed { - buffer.appendInt32(-1557277184) - } - webpage.serialize(buffer, true) - break - case .messageMediaVenue(let geo, let title, let address, let provider, let venueId, let venueType): - if boxed { - buffer.appendInt32(784356159) - } - geo.serialize(buffer, true) - serializeString(title, buffer: buffer, boxed: false) - serializeString(address, buffer: buffer, boxed: false) - serializeString(provider, buffer: buffer, boxed: false) - serializeString(venueId, buffer: buffer, boxed: false) - serializeString(venueType, buffer: buffer, boxed: false) - break - case .messageMediaGame(let game): - if boxed { - buffer.appendInt32(-38694904) - } - game.serialize(buffer, true) - break - case .messageMediaInvoice(let flags, let title, let description, let photo, let receiptMsgId, let currency, let totalAmount, let startParam): - if boxed { - buffer.appendInt32(-2074799289) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(title, buffer: buffer, boxed: false) - serializeString(description, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {photo!.serialize(buffer, true)} - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(receiptMsgId!, buffer: buffer, boxed: false)} - serializeString(currency, buffer: buffer, boxed: false) - serializeInt64(totalAmount, buffer: buffer, boxed: false) - serializeString(startParam, buffer: buffer, boxed: false) - break - case .messageMediaGeoLive(let flags, let geo, let heading, let period, let proximityNotificationRadius): - if boxed { - buffer.appendInt32(-1186937242) - } - serializeInt32(flags, buffer: buffer, boxed: false) - geo.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(heading!, buffer: buffer, boxed: false)} - serializeInt32(period, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(proximityNotificationRadius!, buffer: buffer, boxed: false)} - break - case .messageMediaPoll(let poll, let results): - if boxed { - buffer.appendInt32(1272375192) - } - poll.serialize(buffer, true) - results.serialize(buffer, true) - break - case .messageMediaDice(let value, let emoticon): - if boxed { - buffer.appendInt32(1065280907) - } - serializeInt32(value, buffer: buffer, boxed: false) - serializeString(emoticon, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .messageMediaEmpty: - return ("messageMediaEmpty", []) - case .messageMediaPhoto(let flags, let photo, let ttlSeconds): - return ("messageMediaPhoto", [("flags", flags), ("photo", photo), ("ttlSeconds", ttlSeconds)]) - case .messageMediaGeo(let geo): - return ("messageMediaGeo", [("geo", geo)]) - case .messageMediaContact(let phoneNumber, let firstName, let lastName, let vcard, let userId): - return ("messageMediaContact", [("phoneNumber", phoneNumber), ("firstName", firstName), ("lastName", lastName), ("vcard", vcard), ("userId", userId)]) - case .messageMediaUnsupported: - return ("messageMediaUnsupported", []) - case .messageMediaDocument(let flags, let document, let ttlSeconds): - return ("messageMediaDocument", [("flags", flags), ("document", document), ("ttlSeconds", ttlSeconds)]) - case .messageMediaWebPage(let webpage): - return ("messageMediaWebPage", [("webpage", webpage)]) - case .messageMediaVenue(let geo, let title, let address, let provider, let venueId, let venueType): - return ("messageMediaVenue", [("geo", geo), ("title", title), ("address", address), ("provider", provider), ("venueId", venueId), ("venueType", venueType)]) - case .messageMediaGame(let game): - return ("messageMediaGame", [("game", game)]) - case .messageMediaInvoice(let flags, let title, let description, let photo, let receiptMsgId, let currency, let totalAmount, let startParam): - return ("messageMediaInvoice", [("flags", flags), ("title", title), ("description", description), ("photo", photo), ("receiptMsgId", receiptMsgId), ("currency", currency), ("totalAmount", totalAmount), ("startParam", startParam)]) - case .messageMediaGeoLive(let flags, let geo, let heading, let period, let proximityNotificationRadius): - return ("messageMediaGeoLive", [("flags", flags), ("geo", geo), ("heading", heading), ("period", period), ("proximityNotificationRadius", proximityNotificationRadius)]) - case .messageMediaPoll(let poll, let results): - return ("messageMediaPoll", [("poll", poll), ("results", results)]) - case .messageMediaDice(let value, let emoticon): - return ("messageMediaDice", [("value", value), ("emoticon", emoticon)]) - } - } - - public static func parse_messageMediaEmpty(_ reader: BufferReader) -> MessageMedia? { - return Api.MessageMedia.messageMediaEmpty - } - public static func parse_messageMediaPhoto(_ reader: BufferReader) -> MessageMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.Photo? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Photo - } } - var _3: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_3 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.MessageMedia.messageMediaPhoto(flags: _1!, photo: _2, ttlSeconds: _3) - } - else { - return nil - } - } - public static func parse_messageMediaGeo(_ reader: BufferReader) -> MessageMedia? { - var _1: Api.GeoPoint? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.GeoPoint - } - let _c1 = _1 != nil - if _c1 { - return Api.MessageMedia.messageMediaGeo(geo: _1!) - } - else { - return nil - } - } - public static func parse_messageMediaContact(_ reader: BufferReader) -> MessageMedia? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - var _5: Int32? - _5 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.MessageMedia.messageMediaContact(phoneNumber: _1!, firstName: _2!, lastName: _3!, vcard: _4!, userId: _5!) - } - else { - return nil - } - } - public static func parse_messageMediaUnsupported(_ reader: BufferReader) -> MessageMedia? { - return Api.MessageMedia.messageMediaUnsupported - } - public static func parse_messageMediaDocument(_ reader: BufferReader) -> MessageMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.Document? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Document - } } - var _3: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_3 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.MessageMedia.messageMediaDocument(flags: _1!, document: _2, ttlSeconds: _3) - } - else { - return nil - } - } - public static func parse_messageMediaWebPage(_ reader: BufferReader) -> MessageMedia? { - var _1: Api.WebPage? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.WebPage - } - let _c1 = _1 != nil - if _c1 { - return Api.MessageMedia.messageMediaWebPage(webpage: _1!) - } - else { - return nil - } - } - public static func parse_messageMediaVenue(_ reader: BufferReader) -> MessageMedia? { - var _1: Api.GeoPoint? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.GeoPoint - } - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - var _5: String? - _5 = parseString(reader) - var _6: String? - _6 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.MessageMedia.messageMediaVenue(geo: _1!, title: _2!, address: _3!, provider: _4!, venueId: _5!, venueType: _6!) - } - else { - return nil - } - } - public static func parse_messageMediaGame(_ reader: BufferReader) -> MessageMedia? { - var _1: Api.Game? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Game - } - let _c1 = _1 != nil - if _c1 { - return Api.MessageMedia.messageMediaGame(game: _1!) - } - else { - return nil - } - } - public static func parse_messageMediaInvoice(_ reader: BufferReader) -> MessageMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: Api.WebDocument? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.WebDocument - } } - var _5: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_5 = reader.readInt32() } - var _6: String? - _6 = parseString(reader) - var _7: Int64? - _7 = reader.readInt64() - var _8: String? - _8 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = _8 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { - return Api.MessageMedia.messageMediaInvoice(flags: _1!, title: _2!, description: _3!, photo: _4, receiptMsgId: _5, currency: _6!, totalAmount: _7!, startParam: _8!) - } - else { - return nil - } - } - public static func parse_messageMediaGeoLive(_ reader: BufferReader) -> MessageMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.GeoPoint? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.GeoPoint - } - var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_5 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.MessageMedia.messageMediaGeoLive(flags: _1!, geo: _2!, heading: _3, period: _4!, proximityNotificationRadius: _5) - } - else { - return nil - } - } - public static func parse_messageMediaPoll(_ reader: BufferReader) -> MessageMedia? { - var _1: Api.Poll? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Poll - } - var _2: Api.PollResults? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.PollResults - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageMedia.messageMediaPoll(poll: _1!, results: _2!) - } - else { - return nil - } - } - public static func parse_messageMediaDice(_ reader: BufferReader) -> MessageMedia? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageMedia.messageMediaDice(value: _1!, emoticon: _2!) - } - else { - return nil - } - } - - } - public enum PaymentSavedCredentials: TypeConstructorDescription { - case paymentSavedCredentialsCard(id: String, title: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .paymentSavedCredentialsCard(let id, let title): - if boxed { - buffer.appendInt32(-842892769) - } - serializeString(id, buffer: buffer, boxed: false) - serializeString(title, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .paymentSavedCredentialsCard(let id, let title): - return ("paymentSavedCredentialsCard", [("id", id), ("title", title)]) - } - } - - public static func parse_paymentSavedCredentialsCard(_ reader: BufferReader) -> PaymentSavedCredentials? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.PaymentSavedCredentials.paymentSavedCredentialsCard(id: _1!, title: _2!) - } - else { - return nil - } - } - - } - public enum DocumentAttribute: TypeConstructorDescription { - case documentAttributeImageSize(w: Int32, h: Int32) - case documentAttributeAnimated - case documentAttributeSticker(flags: Int32, alt: String, stickerset: Api.InputStickerSet, maskCoords: Api.MaskCoords?) - case documentAttributeVideo(flags: Int32, duration: Int32, w: Int32, h: Int32) - case documentAttributeAudio(flags: Int32, duration: Int32, title: String?, performer: String?, waveform: Buffer?) - case documentAttributeFilename(fileName: String) - case documentAttributeHasStickers - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .documentAttributeImageSize(let w, let h): - if boxed { - buffer.appendInt32(1815593308) - } - serializeInt32(w, buffer: buffer, boxed: false) - serializeInt32(h, buffer: buffer, boxed: false) - break - case .documentAttributeAnimated: - if boxed { - buffer.appendInt32(297109817) - } - - break - case .documentAttributeSticker(let flags, let alt, let stickerset, let maskCoords): - if boxed { - buffer.appendInt32(1662637586) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(alt, buffer: buffer, boxed: false) - stickerset.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {maskCoords!.serialize(buffer, true)} - break - case .documentAttributeVideo(let flags, let duration, let w, let h): - if boxed { - buffer.appendInt32(250621158) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(duration, buffer: buffer, boxed: false) - serializeInt32(w, buffer: buffer, boxed: false) - serializeInt32(h, buffer: buffer, boxed: false) - break - case .documentAttributeAudio(let flags, let duration, let title, let performer, let waveform): - if boxed { - buffer.appendInt32(-1739392570) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(duration, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeString(title!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeString(performer!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeBytes(waveform!, buffer: buffer, boxed: false)} - break - case .documentAttributeFilename(let fileName): - if boxed { - buffer.appendInt32(358154344) - } - serializeString(fileName, buffer: buffer, boxed: false) - break - case .documentAttributeHasStickers: - if boxed { - buffer.appendInt32(-1744710921) - } - - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .documentAttributeImageSize(let w, let h): - return ("documentAttributeImageSize", [("w", w), ("h", h)]) - case .documentAttributeAnimated: - return ("documentAttributeAnimated", []) - case .documentAttributeSticker(let flags, let alt, let stickerset, let maskCoords): - return ("documentAttributeSticker", [("flags", flags), ("alt", alt), ("stickerset", stickerset), ("maskCoords", maskCoords)]) - case .documentAttributeVideo(let flags, let duration, let w, let h): - return ("documentAttributeVideo", [("flags", flags), ("duration", duration), ("w", w), ("h", h)]) - case .documentAttributeAudio(let flags, let duration, let title, let performer, let waveform): - return ("documentAttributeAudio", [("flags", flags), ("duration", duration), ("title", title), ("performer", performer), ("waveform", waveform)]) - case .documentAttributeFilename(let fileName): - return ("documentAttributeFilename", [("fileName", fileName)]) - case .documentAttributeHasStickers: - return ("documentAttributeHasStickers", []) - } - } - - public static func parse_documentAttributeImageSize(_ reader: BufferReader) -> DocumentAttribute? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.DocumentAttribute.documentAttributeImageSize(w: _1!, h: _2!) - } - else { - return nil - } - } - public static func parse_documentAttributeAnimated(_ reader: BufferReader) -> DocumentAttribute? { - return Api.DocumentAttribute.documentAttributeAnimated - } - public static func parse_documentAttributeSticker(_ reader: BufferReader) -> DocumentAttribute? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: Api.InputStickerSet? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.InputStickerSet - } - var _4: Api.MaskCoords? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.MaskCoords - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.DocumentAttribute.documentAttributeSticker(flags: _1!, alt: _2!, stickerset: _3!, maskCoords: _4) - } - else { - return nil - } - } - public static func parse_documentAttributeVideo(_ reader: BufferReader) -> DocumentAttribute? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.DocumentAttribute.documentAttributeVideo(flags: _1!, duration: _2!, w: _3!, h: _4!) - } - else { - return nil - } - } - public static func parse_documentAttributeAudio(_ reader: BufferReader) -> DocumentAttribute? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: String? - if Int(_1!) & Int(1 << 0) != 0 {_3 = parseString(reader) } - var _4: String? - if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } - var _5: Buffer? - if Int(_1!) & Int(1 << 2) != 0 {_5 = parseBytes(reader) } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.DocumentAttribute.documentAttributeAudio(flags: _1!, duration: _2!, title: _3, performer: _4, waveform: _5) - } - else { - return nil - } - } - public static func parse_documentAttributeFilename(_ reader: BufferReader) -> DocumentAttribute? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.DocumentAttribute.documentAttributeFilename(fileName: _1!) - } - else { - return nil - } - } - public static func parse_documentAttributeHasStickers(_ reader: BufferReader) -> DocumentAttribute? { - return Api.DocumentAttribute.documentAttributeHasStickers - } - - } - public enum BankCardOpenUrl: TypeConstructorDescription { - case bankCardOpenUrl(url: String, name: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .bankCardOpenUrl(let url, let name): - if boxed { - buffer.appendInt32(-177732982) - } - serializeString(url, buffer: buffer, boxed: false) - serializeString(name, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .bankCardOpenUrl(let url, let name): - return ("bankCardOpenUrl", [("url", url), ("name", name)]) - } - } - - public static func parse_bankCardOpenUrl(_ reader: BufferReader) -> BankCardOpenUrl? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.BankCardOpenUrl.bankCardOpenUrl(url: _1!, name: _2!) - } - else { - return nil - } - } - - } - public enum ChatPhoto: TypeConstructorDescription { - case chatPhotoEmpty - case chatPhoto(flags: Int32, photoSmall: Api.FileLocation, photoBig: Api.FileLocation, dcId: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .chatPhotoEmpty: - if boxed { - buffer.appendInt32(935395612) - } - - break - case .chatPhoto(let flags, let photoSmall, let photoBig, let dcId): - if boxed { - buffer.appendInt32(-770990276) - } - serializeInt32(flags, buffer: buffer, boxed: false) - photoSmall.serialize(buffer, true) - photoBig.serialize(buffer, true) - serializeInt32(dcId, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .chatPhotoEmpty: - return ("chatPhotoEmpty", []) - case .chatPhoto(let flags, let photoSmall, let photoBig, let dcId): - return ("chatPhoto", [("flags", flags), ("photoSmall", photoSmall), ("photoBig", photoBig), ("dcId", dcId)]) - } - } - - public static func parse_chatPhotoEmpty(_ reader: BufferReader) -> ChatPhoto? { - return Api.ChatPhoto.chatPhotoEmpty - } - public static func parse_chatPhoto(_ reader: BufferReader) -> ChatPhoto? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.FileLocation? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.FileLocation - } - var _3: Api.FileLocation? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.FileLocation - } - var _4: Int32? - _4 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.ChatPhoto.chatPhoto(flags: _1!, photoSmall: _2!, photoBig: _3!, dcId: _4!) - } - else { - return nil - } - } - - } - public enum PageCaption: TypeConstructorDescription { - case pageCaption(text: Api.RichText, credit: Api.RichText) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .pageCaption(let text, let credit): - if boxed { - buffer.appendInt32(1869903447) - } - text.serialize(buffer, true) - credit.serialize(buffer, true) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .pageCaption(let text, let credit): - return ("pageCaption", [("text", text), ("credit", credit)]) - } - } - - public static func parse_pageCaption(_ reader: BufferReader) -> PageCaption? { - var _1: Api.RichText? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.RichText - } - var _2: Api.RichText? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.PageCaption.pageCaption(text: _1!, credit: _2!) - } - else { - return nil - } - } - - } - public enum UrlAuthResult: TypeConstructorDescription { - case urlAuthResultRequest(flags: Int32, bot: Api.User, domain: String) - case urlAuthResultAccepted(url: String) - case urlAuthResultDefault - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .urlAuthResultRequest(let flags, let bot, let domain): - if boxed { - buffer.appendInt32(-1831650802) - } - serializeInt32(flags, buffer: buffer, boxed: false) - bot.serialize(buffer, true) - serializeString(domain, buffer: buffer, boxed: false) - break - case .urlAuthResultAccepted(let url): - if boxed { - buffer.appendInt32(-1886646706) - } - serializeString(url, buffer: buffer, boxed: false) - break - case .urlAuthResultDefault: - if boxed { - buffer.appendInt32(-1445536993) - } - - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .urlAuthResultRequest(let flags, let bot, let domain): - return ("urlAuthResultRequest", [("flags", flags), ("bot", bot), ("domain", domain)]) - case .urlAuthResultAccepted(let url): - return ("urlAuthResultAccepted", [("url", url)]) - case .urlAuthResultDefault: - return ("urlAuthResultDefault", []) - } - } - - public static func parse_urlAuthResultRequest(_ reader: BufferReader) -> UrlAuthResult? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.User? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.User - } - var _3: String? - _3 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.UrlAuthResult.urlAuthResultRequest(flags: _1!, bot: _2!, domain: _3!) - } - else { - return nil - } - } - public static func parse_urlAuthResultAccepted(_ reader: BufferReader) -> UrlAuthResult? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.UrlAuthResult.urlAuthResultAccepted(url: _1!) - } - else { - return nil - } - } - public static func parse_urlAuthResultDefault(_ reader: BufferReader) -> UrlAuthResult? { - return Api.UrlAuthResult.urlAuthResultDefault - } - - } - public enum InputStickerSet: TypeConstructorDescription { - case inputStickerSetEmpty - case inputStickerSetID(id: Int64, accessHash: Int64) - case inputStickerSetShortName(shortName: String) - case inputStickerSetAnimatedEmoji - case inputStickerSetDice(emoticon: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputStickerSetEmpty: - if boxed { - buffer.appendInt32(-4838507) - } - - break - case .inputStickerSetID(let id, let accessHash): - if boxed { - buffer.appendInt32(-1645763991) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - break - case .inputStickerSetShortName(let shortName): - if boxed { - buffer.appendInt32(-2044933984) - } - serializeString(shortName, buffer: buffer, boxed: false) - break - case .inputStickerSetAnimatedEmoji: - if boxed { - buffer.appendInt32(42402760) - } - - break - case .inputStickerSetDice(let emoticon): - if boxed { - buffer.appendInt32(-427863538) - } - serializeString(emoticon, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputStickerSetEmpty: - return ("inputStickerSetEmpty", []) - case .inputStickerSetID(let id, let accessHash): - return ("inputStickerSetID", [("id", id), ("accessHash", accessHash)]) - case .inputStickerSetShortName(let shortName): - return ("inputStickerSetShortName", [("shortName", shortName)]) - case .inputStickerSetAnimatedEmoji: - return ("inputStickerSetAnimatedEmoji", []) - case .inputStickerSetDice(let emoticon): - return ("inputStickerSetDice", [("emoticon", emoticon)]) - } - } - - public static func parse_inputStickerSetEmpty(_ reader: BufferReader) -> InputStickerSet? { - return Api.InputStickerSet.inputStickerSetEmpty - } - public static func parse_inputStickerSetID(_ reader: BufferReader) -> InputStickerSet? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputStickerSet.inputStickerSetID(id: _1!, accessHash: _2!) - } - else { - return nil - } - } - public static func parse_inputStickerSetShortName(_ reader: BufferReader) -> InputStickerSet? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.InputStickerSet.inputStickerSetShortName(shortName: _1!) - } - else { - return nil - } - } - public static func parse_inputStickerSetAnimatedEmoji(_ reader: BufferReader) -> InputStickerSet? { - return Api.InputStickerSet.inputStickerSetAnimatedEmoji - } - public static func parse_inputStickerSetDice(_ reader: BufferReader) -> InputStickerSet? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.InputStickerSet.inputStickerSetDice(emoticon: _1!) - } - else { - return nil - } - } - - } - public enum BotInfo: TypeConstructorDescription { - case botInfo(userId: Int32, description: String, commands: [Api.BotCommand]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .botInfo(let userId, let description, let commands): - if boxed { - buffer.appendInt32(-1729618630) - } - serializeInt32(userId, buffer: buffer, boxed: false) - serializeString(description, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(commands.count)) - for item in commands { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .botInfo(let userId, let description, let commands): - return ("botInfo", [("userId", userId), ("description", description), ("commands", commands)]) - } - } - - public static func parse_botInfo(_ reader: BufferReader) -> BotInfo? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: [Api.BotCommand]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.BotCommand.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.BotInfo.botInfo(userId: _1!, description: _2!, commands: _3!) - } - else { - return nil - } - } - - } - public enum User: TypeConstructorDescription { - case userEmpty(id: Int32) - case user(flags: Int32, id: Int32, accessHash: Int64?, firstName: String?, lastName: String?, username: String?, phone: String?, photo: Api.UserProfilePhoto?, status: Api.UserStatus?, botInfoVersion: Int32?, restrictionReason: [Api.RestrictionReason]?, botInlinePlaceholder: String?, langCode: String?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .userEmpty(let id): - if boxed { - buffer.appendInt32(537022650) - } - serializeInt32(id, buffer: buffer, boxed: false) - break - case .user(let flags, let id, let accessHash, let firstName, let lastName, let username, let phone, let photo, let status, let botInfoVersion, let restrictionReason, let botInlinePlaceholder, let langCode): - if boxed { - buffer.appendInt32(-1820043071) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt64(accessHash!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeString(firstName!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeString(lastName!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeString(username!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 4) != 0 {serializeString(phone!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 5) != 0 {photo!.serialize(buffer, true)} - if Int(flags) & Int(1 << 6) != 0 {status!.serialize(buffer, true)} - if Int(flags) & Int(1 << 14) != 0 {serializeInt32(botInfoVersion!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 18) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(restrictionReason!.count)) - for item in restrictionReason! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 19) != 0 {serializeString(botInlinePlaceholder!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 22) != 0 {serializeString(langCode!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .userEmpty(let id): - return ("userEmpty", [("id", id)]) - case .user(let flags, let id, let accessHash, let firstName, let lastName, let username, let phone, let photo, let status, let botInfoVersion, let restrictionReason, let botInlinePlaceholder, let langCode): - return ("user", [("flags", flags), ("id", id), ("accessHash", accessHash), ("firstName", firstName), ("lastName", lastName), ("username", username), ("phone", phone), ("photo", photo), ("status", status), ("botInfoVersion", botInfoVersion), ("restrictionReason", restrictionReason), ("botInlinePlaceholder", botInlinePlaceholder), ("langCode", langCode)]) - } - } - - public static func parse_userEmpty(_ reader: BufferReader) -> User? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.User.userEmpty(id: _1!) - } - else { - return nil - } - } - public static func parse_user(_ reader: BufferReader) -> User? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int64? - if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt64() } - var _4: String? - if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } - var _5: String? - if Int(_1!) & Int(1 << 2) != 0 {_5 = parseString(reader) } - var _6: String? - if Int(_1!) & Int(1 << 3) != 0 {_6 = parseString(reader) } - var _7: String? - if Int(_1!) & Int(1 << 4) != 0 {_7 = parseString(reader) } - var _8: Api.UserProfilePhoto? - if Int(_1!) & Int(1 << 5) != 0 {if let signature = reader.readInt32() { - _8 = Api.parse(reader, signature: signature) as? Api.UserProfilePhoto - } } - var _9: Api.UserStatus? - if Int(_1!) & Int(1 << 6) != 0 {if let signature = reader.readInt32() { - _9 = Api.parse(reader, signature: signature) as? Api.UserStatus - } } - var _10: Int32? - if Int(_1!) & Int(1 << 14) != 0 {_10 = reader.readInt32() } - var _11: [Api.RestrictionReason]? - if Int(_1!) & Int(1 << 18) != 0 {if let _ = reader.readInt32() { - _11 = Api.parseVector(reader, elementSignature: 0, elementType: Api.RestrictionReason.self) - } } - var _12: String? - if Int(_1!) & Int(1 << 19) != 0 {_12 = parseString(reader) } - var _13: String? - if Int(_1!) & Int(1 << 22) != 0 {_13 = parseString(reader) } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 5) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 6) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 14) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 18) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 19) == 0) || _12 != nil - let _c13 = (Int(_1!) & Int(1 << 22) == 0) || _13 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 { - return Api.User.user(flags: _1!, id: _2!, accessHash: _3, firstName: _4, lastName: _5, username: _6, phone: _7, photo: _8, status: _9, botInfoVersion: _10, restrictionReason: _11, botInlinePlaceholder: _12, langCode: _13) - } - else { - return nil - } - } - - } - public enum Message: TypeConstructorDescription { - case messageEmpty(flags: Int32, id: Int32, peerId: Api.Peer?) - case message(flags: Int32, id: Int32, fromId: Api.Peer?, peerId: Api.Peer, fwdFrom: Api.MessageFwdHeader?, viaBotId: Int32?, replyTo: Api.MessageReplyHeader?, date: Int32, message: String, media: Api.MessageMedia?, replyMarkup: Api.ReplyMarkup?, entities: [Api.MessageEntity]?, views: Int32?, forwards: Int32?, replies: Api.MessageReplies?, editDate: Int32?, postAuthor: String?, groupedId: Int64?, restrictionReason: [Api.RestrictionReason]?, ttlPeriod: Int32?) - case messageService(flags: Int32, id: Int32, fromId: Api.Peer?, peerId: Api.Peer, replyTo: Api.MessageReplyHeader?, date: Int32, action: Api.MessageAction) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .messageEmpty(let flags, let id, let peerId): - if boxed { - buffer.appendInt32(-1868117372) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {peerId!.serialize(buffer, true)} - break - case .message(let flags, let id, let fromId, let peerId, let fwdFrom, let viaBotId, let replyTo, let date, let message, let media, let replyMarkup, let entities, let views, let forwards, let replies, let editDate, let postAuthor, let groupedId, let restrictionReason, let ttlPeriod): - if boxed { - buffer.appendInt32(-1125940270) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 8) != 0 {fromId!.serialize(buffer, true)} - peerId.serialize(buffer, true) - if Int(flags) & Int(1 << 2) != 0 {fwdFrom!.serialize(buffer, true)} - if Int(flags) & Int(1 << 11) != 0 {serializeInt32(viaBotId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {replyTo!.serialize(buffer, true)} - serializeInt32(date, buffer: buffer, boxed: false) - serializeString(message, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 9) != 0 {media!.serialize(buffer, true)} - if Int(flags) & Int(1 << 6) != 0 {replyMarkup!.serialize(buffer, true)} - if Int(flags) & Int(1 << 7) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities!.count)) - for item in entities! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 10) != 0 {serializeInt32(views!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 10) != 0 {serializeInt32(forwards!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 23) != 0 {replies!.serialize(buffer, true)} - if Int(flags) & Int(1 << 15) != 0 {serializeInt32(editDate!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 16) != 0 {serializeString(postAuthor!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 17) != 0 {serializeInt64(groupedId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 22) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(restrictionReason!.count)) - for item in restrictionReason! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 25) != 0 {serializeInt32(ttlPeriod!, buffer: buffer, boxed: false)} - break - case .messageService(let flags, let id, let fromId, let peerId, let replyTo, let date, let action): - if boxed { - buffer.appendInt32(678405636) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 8) != 0 {fromId!.serialize(buffer, true)} - peerId.serialize(buffer, true) - if Int(flags) & Int(1 << 3) != 0 {replyTo!.serialize(buffer, true)} - serializeInt32(date, buffer: buffer, boxed: false) - action.serialize(buffer, true) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .messageEmpty(let flags, let id, let peerId): - return ("messageEmpty", [("flags", flags), ("id", id), ("peerId", peerId)]) - case .message(let flags, let id, let fromId, let peerId, let fwdFrom, let viaBotId, let replyTo, let date, let message, let media, let replyMarkup, let entities, let views, let forwards, let replies, let editDate, let postAuthor, let groupedId, let restrictionReason, let ttlPeriod): - return ("message", [("flags", flags), ("id", id), ("fromId", fromId), ("peerId", peerId), ("fwdFrom", fwdFrom), ("viaBotId", viaBotId), ("replyTo", replyTo), ("date", date), ("message", message), ("media", media), ("replyMarkup", replyMarkup), ("entities", entities), ("views", views), ("forwards", forwards), ("replies", replies), ("editDate", editDate), ("postAuthor", postAuthor), ("groupedId", groupedId), ("restrictionReason", restrictionReason), ("ttlPeriod", ttlPeriod)]) - case .messageService(let flags, let id, let fromId, let peerId, let replyTo, let date, let action): - return ("messageService", [("flags", flags), ("id", id), ("fromId", fromId), ("peerId", peerId), ("replyTo", replyTo), ("date", date), ("action", action)]) - } - } - - public static func parse_messageEmpty(_ reader: BufferReader) -> Message? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Api.Peer? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.Peer - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.Message.messageEmpty(flags: _1!, id: _2!, peerId: _3) - } - else { - return nil - } - } - public static func parse_message(_ reader: BufferReader) -> Message? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Api.Peer? - if Int(_1!) & Int(1 << 8) != 0 {if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.Peer - } } - var _4: Api.Peer? - if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _5: Api.MessageFwdHeader? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.MessageFwdHeader - } } - var _6: Int32? - if Int(_1!) & Int(1 << 11) != 0 {_6 = reader.readInt32() } - var _7: Api.MessageReplyHeader? - if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.MessageReplyHeader - } } - var _8: Int32? - _8 = reader.readInt32() - var _9: String? - _9 = parseString(reader) - var _10: Api.MessageMedia? - if Int(_1!) & Int(1 << 9) != 0 {if let signature = reader.readInt32() { - _10 = Api.parse(reader, signature: signature) as? Api.MessageMedia - } } - var _11: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 6) != 0 {if let signature = reader.readInt32() { - _11 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup - } } - var _12: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 7) != 0 {if let _ = reader.readInt32() { - _12 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) - } } - var _13: Int32? - if Int(_1!) & Int(1 << 10) != 0 {_13 = reader.readInt32() } - var _14: Int32? - if Int(_1!) & Int(1 << 10) != 0 {_14 = reader.readInt32() } - var _15: Api.MessageReplies? - if Int(_1!) & Int(1 << 23) != 0 {if let signature = reader.readInt32() { - _15 = Api.parse(reader, signature: signature) as? Api.MessageReplies - } } - var _16: Int32? - if Int(_1!) & Int(1 << 15) != 0 {_16 = reader.readInt32() } - var _17: String? - if Int(_1!) & Int(1 << 16) != 0 {_17 = parseString(reader) } - var _18: Int64? - if Int(_1!) & Int(1 << 17) != 0 {_18 = reader.readInt64() } - var _19: [Api.RestrictionReason]? - if Int(_1!) & Int(1 << 22) != 0 {if let _ = reader.readInt32() { - _19 = Api.parseVector(reader, elementSignature: 0, elementType: Api.RestrictionReason.self) - } } - var _20: Int32? - if Int(_1!) & Int(1 << 25) != 0 {_20 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 8) == 0) || _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 11) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil - let _c8 = _8 != nil - let _c9 = _9 != nil - let _c10 = (Int(_1!) & Int(1 << 9) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 6) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 7) == 0) || _12 != nil - let _c13 = (Int(_1!) & Int(1 << 10) == 0) || _13 != nil - let _c14 = (Int(_1!) & Int(1 << 10) == 0) || _14 != nil - let _c15 = (Int(_1!) & Int(1 << 23) == 0) || _15 != nil - let _c16 = (Int(_1!) & Int(1 << 15) == 0) || _16 != nil - let _c17 = (Int(_1!) & Int(1 << 16) == 0) || _17 != nil - let _c18 = (Int(_1!) & Int(1 << 17) == 0) || _18 != nil - let _c19 = (Int(_1!) & Int(1 << 22) == 0) || _19 != nil - let _c20 = (Int(_1!) & Int(1 << 25) == 0) || _20 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 && _c20 { - return Api.Message.message(flags: _1!, id: _2!, fromId: _3, peerId: _4!, fwdFrom: _5, viaBotId: _6, replyTo: _7, date: _8!, message: _9!, media: _10, replyMarkup: _11, entities: _12, views: _13, forwards: _14, replies: _15, editDate: _16, postAuthor: _17, groupedId: _18, restrictionReason: _19, ttlPeriod: _20) - } - else { - return nil - } - } - public static func parse_messageService(_ reader: BufferReader) -> Message? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Api.Peer? - if Int(_1!) & Int(1 << 8) != 0 {if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.Peer - } } - var _4: Api.Peer? - if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _5: Api.MessageReplyHeader? - if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.MessageReplyHeader - } } - var _6: Int32? - _6 = reader.readInt32() - var _7: Api.MessageAction? - if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.MessageAction - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 8) == 0) || _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.Message.messageService(flags: _1!, id: _2!, fromId: _3, peerId: _4!, replyTo: _5, date: _6!, action: _7!) - } - else { - return nil - } - } - - } - public enum StatsGroupTopInviter: TypeConstructorDescription { - case statsGroupTopInviter(userId: Int32, invitations: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .statsGroupTopInviter(let userId, let invitations): - if boxed { - buffer.appendInt32(831924812) - } - serializeInt32(userId, buffer: buffer, boxed: false) - serializeInt32(invitations, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .statsGroupTopInviter(let userId, let invitations): - return ("statsGroupTopInviter", [("userId", userId), ("invitations", invitations)]) - } - } - - public static func parse_statsGroupTopInviter(_ reader: BufferReader) -> StatsGroupTopInviter? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.StatsGroupTopInviter.statsGroupTopInviter(userId: _1!, invitations: _2!) - } - else { - return nil - } - } - - } - public enum InputFileLocation: TypeConstructorDescription { - case inputFileLocation(volumeId: Int64, localId: Int32, secret: Int64, fileReference: Buffer) - case inputEncryptedFileLocation(id: Int64, accessHash: Int64) - case inputDocumentFileLocation(id: Int64, accessHash: Int64, fileReference: Buffer, thumbSize: String) - case inputSecureFileLocation(id: Int64, accessHash: Int64) - case inputTakeoutFileLocation - case inputPhotoFileLocation(id: Int64, accessHash: Int64, fileReference: Buffer, thumbSize: String) - case inputPhotoLegacyFileLocation(id: Int64, accessHash: Int64, fileReference: Buffer, volumeId: Int64, localId: Int32, secret: Int64) - case inputPeerPhotoFileLocation(flags: Int32, peer: Api.InputPeer, volumeId: Int64, localId: Int32) - case inputStickerSetThumb(stickerset: Api.InputStickerSet, volumeId: Int64, localId: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputFileLocation(let volumeId, let localId, let secret, let fileReference): - if boxed { - buffer.appendInt32(-539317279) - } - serializeInt64(volumeId, buffer: buffer, boxed: false) - serializeInt32(localId, buffer: buffer, boxed: false) - serializeInt64(secret, buffer: buffer, boxed: false) - serializeBytes(fileReference, buffer: buffer, boxed: false) - break - case .inputEncryptedFileLocation(let id, let accessHash): - if boxed { - buffer.appendInt32(-182231723) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - break - case .inputDocumentFileLocation(let id, let accessHash, let fileReference, let thumbSize): - if boxed { - buffer.appendInt32(-1160743548) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeBytes(fileReference, buffer: buffer, boxed: false) - serializeString(thumbSize, buffer: buffer, boxed: false) - break - case .inputSecureFileLocation(let id, let accessHash): - if boxed { - buffer.appendInt32(-876089816) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - break - case .inputTakeoutFileLocation: - if boxed { - buffer.appendInt32(700340377) - } - - break - case .inputPhotoFileLocation(let id, let accessHash, let fileReference, let thumbSize): - if boxed { - buffer.appendInt32(1075322878) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeBytes(fileReference, buffer: buffer, boxed: false) - serializeString(thumbSize, buffer: buffer, boxed: false) - break - case .inputPhotoLegacyFileLocation(let id, let accessHash, let fileReference, let volumeId, let localId, let secret): - if boxed { - buffer.appendInt32(-667654413) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeBytes(fileReference, buffer: buffer, boxed: false) - serializeInt64(volumeId, buffer: buffer, boxed: false) - serializeInt32(localId, buffer: buffer, boxed: false) - serializeInt64(secret, buffer: buffer, boxed: false) - break - case .inputPeerPhotoFileLocation(let flags, let peer, let volumeId, let localId): - if boxed { - buffer.appendInt32(668375447) - } - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - serializeInt64(volumeId, buffer: buffer, boxed: false) - serializeInt32(localId, buffer: buffer, boxed: false) - break - case .inputStickerSetThumb(let stickerset, let volumeId, let localId): - if boxed { - buffer.appendInt32(230353641) - } - stickerset.serialize(buffer, true) - serializeInt64(volumeId, buffer: buffer, boxed: false) - serializeInt32(localId, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputFileLocation(let volumeId, let localId, let secret, let fileReference): - return ("inputFileLocation", [("volumeId", volumeId), ("localId", localId), ("secret", secret), ("fileReference", fileReference)]) - case .inputEncryptedFileLocation(let id, let accessHash): - return ("inputEncryptedFileLocation", [("id", id), ("accessHash", accessHash)]) - case .inputDocumentFileLocation(let id, let accessHash, let fileReference, let thumbSize): - return ("inputDocumentFileLocation", [("id", id), ("accessHash", accessHash), ("fileReference", fileReference), ("thumbSize", thumbSize)]) - case .inputSecureFileLocation(let id, let accessHash): - return ("inputSecureFileLocation", [("id", id), ("accessHash", accessHash)]) - case .inputTakeoutFileLocation: - return ("inputTakeoutFileLocation", []) - case .inputPhotoFileLocation(let id, let accessHash, let fileReference, let thumbSize): - return ("inputPhotoFileLocation", [("id", id), ("accessHash", accessHash), ("fileReference", fileReference), ("thumbSize", thumbSize)]) - case .inputPhotoLegacyFileLocation(let id, let accessHash, let fileReference, let volumeId, let localId, let secret): - return ("inputPhotoLegacyFileLocation", [("id", id), ("accessHash", accessHash), ("fileReference", fileReference), ("volumeId", volumeId), ("localId", localId), ("secret", secret)]) - case .inputPeerPhotoFileLocation(let flags, let peer, let volumeId, let localId): - return ("inputPeerPhotoFileLocation", [("flags", flags), ("peer", peer), ("volumeId", volumeId), ("localId", localId)]) - case .inputStickerSetThumb(let stickerset, let volumeId, let localId): - return ("inputStickerSetThumb", [("stickerset", stickerset), ("volumeId", volumeId), ("localId", localId)]) - } - } - - public static func parse_inputFileLocation(_ reader: BufferReader) -> InputFileLocation? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int64? - _3 = reader.readInt64() - var _4: Buffer? - _4 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputFileLocation.inputFileLocation(volumeId: _1!, localId: _2!, secret: _3!, fileReference: _4!) - } - else { - return nil - } - } - public static func parse_inputEncryptedFileLocation(_ reader: BufferReader) -> InputFileLocation? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputFileLocation.inputEncryptedFileLocation(id: _1!, accessHash: _2!) - } - else { - return nil - } - } - public static func parse_inputDocumentFileLocation(_ reader: BufferReader) -> InputFileLocation? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int64? - _2 = reader.readInt64() - var _3: Buffer? - _3 = parseBytes(reader) - var _4: String? - _4 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputFileLocation.inputDocumentFileLocation(id: _1!, accessHash: _2!, fileReference: _3!, thumbSize: _4!) - } - else { - return nil - } - } - public static func parse_inputSecureFileLocation(_ reader: BufferReader) -> InputFileLocation? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputFileLocation.inputSecureFileLocation(id: _1!, accessHash: _2!) - } - else { - return nil - } - } - public static func parse_inputTakeoutFileLocation(_ reader: BufferReader) -> InputFileLocation? { - return Api.InputFileLocation.inputTakeoutFileLocation - } - public static func parse_inputPhotoFileLocation(_ reader: BufferReader) -> InputFileLocation? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int64? - _2 = reader.readInt64() - var _3: Buffer? - _3 = parseBytes(reader) - var _4: String? - _4 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputFileLocation.inputPhotoFileLocation(id: _1!, accessHash: _2!, fileReference: _3!, thumbSize: _4!) - } - else { - return nil - } - } - public static func parse_inputPhotoLegacyFileLocation(_ reader: BufferReader) -> InputFileLocation? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int64? - _2 = reader.readInt64() - var _3: Buffer? - _3 = parseBytes(reader) - var _4: Int64? - _4 = reader.readInt64() - var _5: Int32? - _5 = reader.readInt32() - var _6: Int64? - _6 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.InputFileLocation.inputPhotoLegacyFileLocation(id: _1!, accessHash: _2!, fileReference: _3!, volumeId: _4!, localId: _5!, secret: _6!) - } - else { - return nil - } - } - public static func parse_inputPeerPhotoFileLocation(_ reader: BufferReader) -> InputFileLocation? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.InputPeer? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.InputPeer - } - var _3: Int64? - _3 = reader.readInt64() - var _4: Int32? - _4 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputFileLocation.inputPeerPhotoFileLocation(flags: _1!, peer: _2!, volumeId: _3!, localId: _4!) - } - else { - return nil - } - } - public static func parse_inputStickerSetThumb(_ reader: BufferReader) -> InputFileLocation? { - var _1: Api.InputStickerSet? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputStickerSet - } - var _2: Int64? - _2 = reader.readInt64() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.InputFileLocation.inputStickerSetThumb(stickerset: _1!, volumeId: _2!, localId: _3!) - } - else { - return nil - } - } - - } - public enum GeoPoint: TypeConstructorDescription { - case geoPointEmpty - case geoPoint(flags: Int32, long: Double, lat: Double, accessHash: Int64, accuracyRadius: Int32?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .geoPointEmpty: - if boxed { - buffer.appendInt32(286776671) - } - - break - case .geoPoint(let flags, let long, let lat, let accessHash, let accuracyRadius): - if boxed { - buffer.appendInt32(-1297942941) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeDouble(long, buffer: buffer, boxed: false) - serializeDouble(lat, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(accuracyRadius!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .geoPointEmpty: - return ("geoPointEmpty", []) - case .geoPoint(let flags, let long, let lat, let accessHash, let accuracyRadius): - return ("geoPoint", [("flags", flags), ("long", long), ("lat", lat), ("accessHash", accessHash), ("accuracyRadius", accuracyRadius)]) - } - } - - public static func parse_geoPointEmpty(_ reader: BufferReader) -> GeoPoint? { - return Api.GeoPoint.geoPointEmpty - } - public static func parse_geoPoint(_ reader: BufferReader) -> GeoPoint? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Double? - _2 = reader.readDouble() - var _3: Double? - _3 = reader.readDouble() - var _4: Int64? - _4 = reader.readInt64() - var _5: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_5 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.GeoPoint.geoPoint(flags: _1!, long: _2!, lat: _3!, accessHash: _4!, accuracyRadius: _5) - } - else { - return nil - } - } - - } - public enum InputPhoneCall: TypeConstructorDescription { - case inputPhoneCall(id: Int64, accessHash: Int64) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputPhoneCall(let id, let accessHash): - if boxed { - buffer.appendInt32(506920429) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputPhoneCall(let id, let accessHash): - return ("inputPhoneCall", [("id", id), ("accessHash", accessHash)]) - } - } - - public static func parse_inputPhoneCall(_ reader: BufferReader) -> InputPhoneCall? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputPhoneCall.inputPhoneCall(id: _1!, accessHash: _2!) - } - else { - return nil - } - } - - } - public enum ReceivedNotifyMessage: TypeConstructorDescription { - case receivedNotifyMessage(id: Int32, flags: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .receivedNotifyMessage(let id, let flags): - if boxed { - buffer.appendInt32(-1551583367) - } - serializeInt32(id, buffer: buffer, boxed: false) - serializeInt32(flags, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .receivedNotifyMessage(let id, let flags): - return ("receivedNotifyMessage", [("id", id), ("flags", flags)]) - } - } - - public static func parse_receivedNotifyMessage(_ reader: BufferReader) -> ReceivedNotifyMessage? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ReceivedNotifyMessage.receivedNotifyMessage(id: _1!, flags: _2!) - } - else { - return nil - } - } - - } - public enum ChatParticipants: TypeConstructorDescription { - case chatParticipantsForbidden(flags: Int32, chatId: Int32, selfParticipant: Api.ChatParticipant?) - case chatParticipants(chatId: Int32, participants: [Api.ChatParticipant], version: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .chatParticipantsForbidden(let flags, let chatId, let selfParticipant): - if boxed { - buffer.appendInt32(-57668565) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(chatId, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {selfParticipant!.serialize(buffer, true)} - break - case .chatParticipants(let chatId, let participants, let version): - if boxed { - buffer.appendInt32(1061556205) - } - serializeInt32(chatId, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(participants.count)) - for item in participants { - item.serialize(buffer, true) - } - serializeInt32(version, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .chatParticipantsForbidden(let flags, let chatId, let selfParticipant): - return ("chatParticipantsForbidden", [("flags", flags), ("chatId", chatId), ("selfParticipant", selfParticipant)]) - case .chatParticipants(let chatId, let participants, let version): - return ("chatParticipants", [("chatId", chatId), ("participants", participants), ("version", version)]) - } - } - - public static func parse_chatParticipantsForbidden(_ reader: BufferReader) -> ChatParticipants? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Api.ChatParticipant? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.ChatParticipant - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.ChatParticipants.chatParticipantsForbidden(flags: _1!, chatId: _2!, selfParticipant: _3) - } - else { - return nil - } - } - public static func parse_chatParticipants(_ reader: BufferReader) -> ChatParticipants? { - var _1: Int32? - _1 = reader.readInt32() - var _2: [Api.ChatParticipant]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ChatParticipant.self) - } - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.ChatParticipants.chatParticipants(chatId: _1!, participants: _2!, version: _3!) - } - else { - return nil - } - } - - } - public enum DialogFilter: TypeConstructorDescription { - case dialogFilter(flags: Int32, id: Int32, title: String, emoticon: String?, pinnedPeers: [Api.InputPeer], includePeers: [Api.InputPeer], excludePeers: [Api.InputPeer]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .dialogFilter(let flags, let id, let title, let emoticon, let pinnedPeers, let includePeers, let excludePeers): - if boxed { - buffer.appendInt32(1949890536) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - serializeString(title, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 25) != 0 {serializeString(emoticon!, buffer: buffer, boxed: false)} - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(pinnedPeers.count)) - for item in pinnedPeers { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(includePeers.count)) - for item in includePeers { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(excludePeers.count)) - for item in excludePeers { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .dialogFilter(let flags, let id, let title, let emoticon, let pinnedPeers, let includePeers, let excludePeers): - return ("dialogFilter", [("flags", flags), ("id", id), ("title", title), ("emoticon", emoticon), ("pinnedPeers", pinnedPeers), ("includePeers", includePeers), ("excludePeers", excludePeers)]) - } - } - - public static func parse_dialogFilter(_ reader: BufferReader) -> DialogFilter? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: String? - _3 = parseString(reader) - var _4: String? - if Int(_1!) & Int(1 << 25) != 0 {_4 = parseString(reader) } - var _5: [Api.InputPeer]? - if let _ = reader.readInt32() { - _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputPeer.self) - } - var _6: [Api.InputPeer]? - if let _ = reader.readInt32() { - _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputPeer.self) - } - var _7: [Api.InputPeer]? - if let _ = reader.readInt32() { - _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputPeer.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 25) == 0) || _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.DialogFilter.dialogFilter(flags: _1!, id: _2!, title: _3!, emoticon: _4, pinnedPeers: _5!, includePeers: _6!, excludePeers: _7!) - } - else { - return nil - } - } - - } - public enum InputPaymentCredentials: TypeConstructorDescription { - case inputPaymentCredentialsSaved(id: String, tmpPassword: Buffer) - case inputPaymentCredentials(flags: Int32, data: Api.DataJSON) - case inputPaymentCredentialsApplePay(paymentData: Api.DataJSON) - case inputPaymentCredentialsGooglePay(paymentToken: Api.DataJSON) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputPaymentCredentialsSaved(let id, let tmpPassword): - if boxed { - buffer.appendInt32(-1056001329) - } - serializeString(id, buffer: buffer, boxed: false) - serializeBytes(tmpPassword, buffer: buffer, boxed: false) - break - case .inputPaymentCredentials(let flags, let data): - if boxed { - buffer.appendInt32(873977640) - } - serializeInt32(flags, buffer: buffer, boxed: false) - data.serialize(buffer, true) - break - case .inputPaymentCredentialsApplePay(let paymentData): - if boxed { - buffer.appendInt32(178373535) - } - paymentData.serialize(buffer, true) - break - case .inputPaymentCredentialsGooglePay(let paymentToken): - if boxed { - buffer.appendInt32(-1966921727) - } - paymentToken.serialize(buffer, true) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputPaymentCredentialsSaved(let id, let tmpPassword): - return ("inputPaymentCredentialsSaved", [("id", id), ("tmpPassword", tmpPassword)]) - case .inputPaymentCredentials(let flags, let data): - return ("inputPaymentCredentials", [("flags", flags), ("data", data)]) - case .inputPaymentCredentialsApplePay(let paymentData): - return ("inputPaymentCredentialsApplePay", [("paymentData", paymentData)]) - case .inputPaymentCredentialsGooglePay(let paymentToken): - return ("inputPaymentCredentialsGooglePay", [("paymentToken", paymentToken)]) - } - } - - public static func parse_inputPaymentCredentialsSaved(_ reader: BufferReader) -> InputPaymentCredentials? { - var _1: String? - _1 = parseString(reader) - var _2: Buffer? - _2 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputPaymentCredentials.inputPaymentCredentialsSaved(id: _1!, tmpPassword: _2!) - } - else { - return nil - } - } - public static func parse_inputPaymentCredentials(_ reader: BufferReader) -> InputPaymentCredentials? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.DataJSON? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.DataJSON - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputPaymentCredentials.inputPaymentCredentials(flags: _1!, data: _2!) - } - else { - return nil - } - } - public static func parse_inputPaymentCredentialsApplePay(_ reader: BufferReader) -> InputPaymentCredentials? { - var _1: Api.DataJSON? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.DataJSON - } - let _c1 = _1 != nil - if _c1 { - return Api.InputPaymentCredentials.inputPaymentCredentialsApplePay(paymentData: _1!) - } - else { - return nil - } - } - public static func parse_inputPaymentCredentialsGooglePay(_ reader: BufferReader) -> InputPaymentCredentials? { - var _1: Api.DataJSON? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.DataJSON - } - let _c1 = _1 != nil - if _c1 { - return Api.InputPaymentCredentials.inputPaymentCredentialsGooglePay(paymentToken: _1!) - } - else { - return nil - } - } - - } - public enum ShippingOption: TypeConstructorDescription { - case shippingOption(id: String, title: String, prices: [Api.LabeledPrice]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .shippingOption(let id, let title, let prices): - if boxed { - buffer.appendInt32(-1239335713) - } - serializeString(id, buffer: buffer, boxed: false) - serializeString(title, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(prices.count)) - for item in prices { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .shippingOption(let id, let title, let prices): - return ("shippingOption", [("id", id), ("title", title), ("prices", prices)]) - } - } - - public static func parse_shippingOption(_ reader: BufferReader) -> ShippingOption? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - var _3: [Api.LabeledPrice]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.LabeledPrice.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.ShippingOption.shippingOption(id: _1!, title: _2!, prices: _3!) - } - else { - return nil - } - } - - } - public enum InputSecureFile: TypeConstructorDescription { - case inputSecureFileUploaded(id: Int64, parts: Int32, md5Checksum: String, fileHash: Buffer, secret: Buffer) - case inputSecureFile(id: Int64, accessHash: Int64) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputSecureFileUploaded(let id, let parts, let md5Checksum, let fileHash, let secret): - if boxed { - buffer.appendInt32(859091184) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt32(parts, buffer: buffer, boxed: false) - serializeString(md5Checksum, buffer: buffer, boxed: false) - serializeBytes(fileHash, buffer: buffer, boxed: false) - serializeBytes(secret, buffer: buffer, boxed: false) - break - case .inputSecureFile(let id, let accessHash): - if boxed { - buffer.appendInt32(1399317950) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputSecureFileUploaded(let id, let parts, let md5Checksum, let fileHash, let secret): - return ("inputSecureFileUploaded", [("id", id), ("parts", parts), ("md5Checksum", md5Checksum), ("fileHash", fileHash), ("secret", secret)]) - case .inputSecureFile(let id, let accessHash): - return ("inputSecureFile", [("id", id), ("accessHash", accessHash)]) - } - } - - public static func parse_inputSecureFileUploaded(_ reader: BufferReader) -> InputSecureFile? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int32? - _2 = reader.readInt32() - var _3: String? - _3 = parseString(reader) - var _4: Buffer? - _4 = parseBytes(reader) - var _5: Buffer? - _5 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.InputSecureFile.inputSecureFileUploaded(id: _1!, parts: _2!, md5Checksum: _3!, fileHash: _4!, secret: _5!) - } - else { - return nil - } - } - public static func parse_inputSecureFile(_ reader: BufferReader) -> InputSecureFile? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputSecureFile.inputSecureFile(id: _1!, accessHash: _2!) - } - else { - return nil - } - } - - } - public enum PostAddress: TypeConstructorDescription { - case postAddress(streetLine1: String, streetLine2: String, city: String, state: String, countryIso2: String, postCode: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .postAddress(let streetLine1, let streetLine2, let city, let state, let countryIso2, let postCode): - if boxed { - buffer.appendInt32(512535275) - } - serializeString(streetLine1, buffer: buffer, boxed: false) - serializeString(streetLine2, buffer: buffer, boxed: false) - serializeString(city, buffer: buffer, boxed: false) - serializeString(state, buffer: buffer, boxed: false) - serializeString(countryIso2, buffer: buffer, boxed: false) - serializeString(postCode, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .postAddress(let streetLine1, let streetLine2, let city, let state, let countryIso2, let postCode): - return ("postAddress", [("streetLine1", streetLine1), ("streetLine2", streetLine2), ("city", city), ("state", state), ("countryIso2", countryIso2), ("postCode", postCode)]) - } - } - - public static func parse_postAddress(_ reader: BufferReader) -> PostAddress? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - var _5: String? - _5 = parseString(reader) - var _6: String? - _6 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.PostAddress.postAddress(streetLine1: _1!, streetLine2: _2!, city: _3!, state: _4!, countryIso2: _5!, postCode: _6!) - } - else { - return nil - } - } - - } - public enum InputFolderPeer: TypeConstructorDescription { - case inputFolderPeer(peer: Api.InputPeer, folderId: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputFolderPeer(let peer, let folderId): - if boxed { - buffer.appendInt32(-70073706) - } - peer.serialize(buffer, true) - serializeInt32(folderId, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputFolderPeer(let peer, let folderId): - return ("inputFolderPeer", [("peer", peer), ("folderId", folderId)]) - } - } - - public static func parse_inputFolderPeer(_ reader: BufferReader) -> InputFolderPeer? { - var _1: Api.InputPeer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputPeer - } - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputFolderPeer.inputFolderPeer(peer: _1!, folderId: _2!) - } - else { - return nil - } - } - - } - public enum DataJSON: TypeConstructorDescription { - case dataJSON(data: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .dataJSON(let data): - if boxed { - buffer.appendInt32(2104790276) - } - serializeString(data, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .dataJSON(let data): - return ("dataJSON", [("data", data)]) - } - } - - public static func parse_dataJSON(_ reader: BufferReader) -> DataJSON? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.DataJSON.dataJSON(data: _1!) - } - else { - return nil - } - } - - } - public enum InputWallPaper: TypeConstructorDescription { - case inputWallPaper(id: Int64, accessHash: Int64) - case inputWallPaperSlug(slug: String) - case inputWallPaperNoFile - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputWallPaper(let id, let accessHash): - if boxed { - buffer.appendInt32(-433014407) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - break - case .inputWallPaperSlug(let slug): - if boxed { - buffer.appendInt32(1913199744) - } - serializeString(slug, buffer: buffer, boxed: false) - break - case .inputWallPaperNoFile: - if boxed { - buffer.appendInt32(-2077770836) - } - - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputWallPaper(let id, let accessHash): - return ("inputWallPaper", [("id", id), ("accessHash", accessHash)]) - case .inputWallPaperSlug(let slug): - return ("inputWallPaperSlug", [("slug", slug)]) - case .inputWallPaperNoFile: - return ("inputWallPaperNoFile", []) - } - } - - public static func parse_inputWallPaper(_ reader: BufferReader) -> InputWallPaper? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputWallPaper.inputWallPaper(id: _1!, accessHash: _2!) - } - else { - return nil - } - } - public static func parse_inputWallPaperSlug(_ reader: BufferReader) -> InputWallPaper? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.InputWallPaper.inputWallPaperSlug(slug: _1!) - } - else { - return nil - } - } - public static func parse_inputWallPaperNoFile(_ reader: BufferReader) -> InputWallPaper? { - return Api.InputWallPaper.inputWallPaperNoFile - } - - } - public enum InputThemeSettings: TypeConstructorDescription { - case inputThemeSettings(flags: Int32, baseTheme: Api.BaseTheme, accentColor: Int32, messageTopColor: Int32?, messageBottomColor: Int32?, wallpaper: Api.InputWallPaper?, wallpaperSettings: Api.WallPaperSettings?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputThemeSettings(let flags, let baseTheme, let accentColor, let messageTopColor, let messageBottomColor, let wallpaper, let wallpaperSettings): - if boxed { - buffer.appendInt32(-1118798639) - } - serializeInt32(flags, buffer: buffer, boxed: false) - baseTheme.serialize(buffer, true) - serializeInt32(accentColor, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(messageTopColor!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(messageBottomColor!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {wallpaper!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {wallpaperSettings!.serialize(buffer, true)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputThemeSettings(let flags, let baseTheme, let accentColor, let messageTopColor, let messageBottomColor, let wallpaper, let wallpaperSettings): - return ("inputThemeSettings", [("flags", flags), ("baseTheme", baseTheme), ("accentColor", accentColor), ("messageTopColor", messageTopColor), ("messageBottomColor", messageBottomColor), ("wallpaper", wallpaper), ("wallpaperSettings", wallpaperSettings)]) - } - } - - public static func parse_inputThemeSettings(_ reader: BufferReader) -> InputThemeSettings? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.BaseTheme? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.BaseTheme - } - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_4 = reader.readInt32() } - var _5: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_5 = reader.readInt32() } - var _6: Api.InputWallPaper? - if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.InputWallPaper - } } - var _7: Api.WallPaperSettings? - if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.WallPaperSettings - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.InputThemeSettings.inputThemeSettings(flags: _1!, baseTheme: _2!, accentColor: _3!, messageTopColor: _4, messageBottomColor: _5, wallpaper: _6, wallpaperSettings: _7) - } - else { - return nil - } - } - - } - public enum InputStickeredMedia: TypeConstructorDescription { - case inputStickeredMediaPhoto(id: Api.InputPhoto) - case inputStickeredMediaDocument(id: Api.InputDocument) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputStickeredMediaPhoto(let id): - if boxed { - buffer.appendInt32(1251549527) - } - id.serialize(buffer, true) - break - case .inputStickeredMediaDocument(let id): - if boxed { - buffer.appendInt32(70813275) - } - id.serialize(buffer, true) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputStickeredMediaPhoto(let id): - return ("inputStickeredMediaPhoto", [("id", id)]) - case .inputStickeredMediaDocument(let id): - return ("inputStickeredMediaDocument", [("id", id)]) - } - } - - public static func parse_inputStickeredMediaPhoto(_ reader: BufferReader) -> InputStickeredMedia? { - var _1: Api.InputPhoto? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputPhoto - } - let _c1 = _1 != nil - if _c1 { - return Api.InputStickeredMedia.inputStickeredMediaPhoto(id: _1!) - } - else { - return nil - } - } - public static func parse_inputStickeredMediaDocument(_ reader: BufferReader) -> InputStickeredMedia? { - var _1: Api.InputDocument? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputDocument - } - let _c1 = _1 != nil - if _c1 { - return Api.InputStickeredMedia.inputStickeredMediaDocument(id: _1!) - } - else { - return nil - } - } - - } - public enum WebPageAttribute: TypeConstructorDescription { - case webPageAttributeTheme(flags: Int32, documents: [Api.Document]?, settings: Api.ThemeSettings?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .webPageAttributeTheme(let flags, let documents, let settings): - if boxed { - buffer.appendInt32(1421174295) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(documents!.count)) - for item in documents! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 1) != 0 {settings!.serialize(buffer, true)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .webPageAttributeTheme(let flags, let documents, let settings): - return ("webPageAttributeTheme", [("flags", flags), ("documents", documents), ("settings", settings)]) - } - } - - public static func parse_webPageAttributeTheme(_ reader: BufferReader) -> WebPageAttribute? { - var _1: Int32? - _1 = reader.readInt32() - var _2: [Api.Document]? - if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Document.self) - } } - var _3: Api.ThemeSettings? - if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.ThemeSettings - } } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.WebPageAttribute.webPageAttributeTheme(flags: _1!, documents: _2, settings: _3) - } - else { - return nil - } - } - - } - public enum PhoneCallDiscardReason: TypeConstructorDescription { - case phoneCallDiscardReasonMissed - case phoneCallDiscardReasonDisconnect - case phoneCallDiscardReasonHangup - case phoneCallDiscardReasonBusy - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .phoneCallDiscardReasonMissed: - if boxed { - buffer.appendInt32(-2048646399) - } - - break - case .phoneCallDiscardReasonDisconnect: - if boxed { - buffer.appendInt32(-527056480) - } - - break - case .phoneCallDiscardReasonHangup: - if boxed { - buffer.appendInt32(1471006352) - } - - break - case .phoneCallDiscardReasonBusy: - if boxed { - buffer.appendInt32(-84416311) - } - - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .phoneCallDiscardReasonMissed: - return ("phoneCallDiscardReasonMissed", []) - case .phoneCallDiscardReasonDisconnect: - return ("phoneCallDiscardReasonDisconnect", []) - case .phoneCallDiscardReasonHangup: - return ("phoneCallDiscardReasonHangup", []) - case .phoneCallDiscardReasonBusy: - return ("phoneCallDiscardReasonBusy", []) - } - } - - public static func parse_phoneCallDiscardReasonMissed(_ reader: BufferReader) -> PhoneCallDiscardReason? { - return Api.PhoneCallDiscardReason.phoneCallDiscardReasonMissed - } - public static func parse_phoneCallDiscardReasonDisconnect(_ reader: BufferReader) -> PhoneCallDiscardReason? { - return Api.PhoneCallDiscardReason.phoneCallDiscardReasonDisconnect - } - public static func parse_phoneCallDiscardReasonHangup(_ reader: BufferReader) -> PhoneCallDiscardReason? { - return Api.PhoneCallDiscardReason.phoneCallDiscardReasonHangup - } - public static func parse_phoneCallDiscardReasonBusy(_ reader: BufferReader) -> PhoneCallDiscardReason? { - return Api.PhoneCallDiscardReason.phoneCallDiscardReasonBusy - } - - } - public enum NearestDc: TypeConstructorDescription { - case nearestDc(country: String, thisDc: Int32, nearestDc: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .nearestDc(let country, let thisDc, let nearestDc): - if boxed { - buffer.appendInt32(-1910892683) - } - serializeString(country, buffer: buffer, boxed: false) - serializeInt32(thisDc, buffer: buffer, boxed: false) - serializeInt32(nearestDc, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .nearestDc(let country, let thisDc, let nearestDc): - return ("nearestDc", [("country", country), ("thisDc", thisDc), ("nearestDc", nearestDc)]) - } - } - - public static func parse_nearestDc(_ reader: BufferReader) -> NearestDc? { - var _1: String? - _1 = parseString(reader) - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.NearestDc.nearestDc(country: _1!, thisDc: _2!, nearestDc: _3!) - } - else { - return nil - } - } - - } - public enum JSONObjectValue: TypeConstructorDescription { - case jsonObjectValue(key: String, value: Api.JSONValue) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .jsonObjectValue(let key, let value): - if boxed { - buffer.appendInt32(-1059185703) - } - serializeString(key, buffer: buffer, boxed: false) - value.serialize(buffer, true) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .jsonObjectValue(let key, let value): - return ("jsonObjectValue", [("key", key), ("value", value)]) - } - } - - public static func parse_jsonObjectValue(_ reader: BufferReader) -> JSONObjectValue? { - var _1: String? - _1 = parseString(reader) - var _2: Api.JSONValue? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.JSONValue - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.JSONObjectValue.jsonObjectValue(key: _1!, value: _2!) - } - else { - return nil - } - } - - } - public enum InputWebDocument: TypeConstructorDescription { - case inputWebDocument(url: String, size: Int32, mimeType: String, attributes: [Api.DocumentAttribute]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputWebDocument(let url, let size, let mimeType, let attributes): - if boxed { - buffer.appendInt32(-1678949555) - } - serializeString(url, buffer: buffer, boxed: false) - serializeInt32(size, buffer: buffer, boxed: false) - serializeString(mimeType, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(attributes.count)) - for item in attributes { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputWebDocument(let url, let size, let mimeType, let attributes): - return ("inputWebDocument", [("url", url), ("size", size), ("mimeType", mimeType), ("attributes", attributes)]) - } - } - - public static func parse_inputWebDocument(_ reader: BufferReader) -> InputWebDocument? { - var _1: String? - _1 = parseString(reader) - var _2: Int32? - _2 = reader.readInt32() - var _3: String? - _3 = parseString(reader) - var _4: [Api.DocumentAttribute]? - if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DocumentAttribute.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputWebDocument.inputWebDocument(url: _1!, size: _2!, mimeType: _3!, attributes: _4!) - } - else { - return nil - } - } - - } - public enum ChannelAdminLogEvent: TypeConstructorDescription { - case channelAdminLogEvent(id: Int64, date: Int32, userId: Int32, action: Api.ChannelAdminLogEventAction) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .channelAdminLogEvent(let id, let date, let userId, let action): - if boxed { - buffer.appendInt32(995769920) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - action.serialize(buffer, true) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .channelAdminLogEvent(let id, let date, let userId, let action): - return ("channelAdminLogEvent", [("id", id), ("date", date), ("userId", userId), ("action", action)]) - } - } - - public static func parse_channelAdminLogEvent(_ reader: BufferReader) -> ChannelAdminLogEvent? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: Api.ChannelAdminLogEventAction? - if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.ChannelAdminLogEventAction - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.ChannelAdminLogEvent.channelAdminLogEvent(id: _1!, date: _2!, userId: _3!, action: _4!) - } - else { - return nil - } - } - - } - public enum Bool: TypeConstructorDescription { - case boolFalse - case boolTrue - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .boolFalse: - if boxed { - buffer.appendInt32(-1132882121) - } - - break - case .boolTrue: - if boxed { - buffer.appendInt32(-1720552011) - } - - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .boolFalse: - return ("boolFalse", []) - case .boolTrue: - return ("boolTrue", []) - } - } - - public static func parse_boolFalse(_ reader: BufferReader) -> Bool? { - return Api.Bool.boolFalse - } - public static func parse_boolTrue(_ reader: BufferReader) -> Bool? { - return Api.Bool.boolTrue - } - - } - public enum LangPackString: TypeConstructorDescription { - case langPackString(key: String, value: String) - case langPackStringPluralized(flags: Int32, key: String, zeroValue: String?, oneValue: String?, twoValue: String?, fewValue: String?, manyValue: String?, otherValue: String) - case langPackStringDeleted(key: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .langPackString(let key, let value): - if boxed { - buffer.appendInt32(-892239370) - } - serializeString(key, buffer: buffer, boxed: false) - serializeString(value, buffer: buffer, boxed: false) - break - case .langPackStringPluralized(let flags, let key, let zeroValue, let oneValue, let twoValue, let fewValue, let manyValue, let otherValue): - if boxed { - buffer.appendInt32(1816636575) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(key, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeString(zeroValue!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeString(oneValue!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeString(twoValue!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeString(fewValue!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 4) != 0 {serializeString(manyValue!, buffer: buffer, boxed: false)} - serializeString(otherValue, buffer: buffer, boxed: false) - break - case .langPackStringDeleted(let key): - if boxed { - buffer.appendInt32(695856818) - } - serializeString(key, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .langPackString(let key, let value): - return ("langPackString", [("key", key), ("value", value)]) - case .langPackStringPluralized(let flags, let key, let zeroValue, let oneValue, let twoValue, let fewValue, let manyValue, let otherValue): - return ("langPackStringPluralized", [("flags", flags), ("key", key), ("zeroValue", zeroValue), ("oneValue", oneValue), ("twoValue", twoValue), ("fewValue", fewValue), ("manyValue", manyValue), ("otherValue", otherValue)]) - case .langPackStringDeleted(let key): - return ("langPackStringDeleted", [("key", key)]) - } - } - - public static func parse_langPackString(_ reader: BufferReader) -> LangPackString? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.LangPackString.langPackString(key: _1!, value: _2!) - } - else { - return nil - } - } - public static func parse_langPackStringPluralized(_ reader: BufferReader) -> LangPackString? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: String? - if Int(_1!) & Int(1 << 0) != 0 {_3 = parseString(reader) } - var _4: String? - if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } - var _5: String? - if Int(_1!) & Int(1 << 2) != 0 {_5 = parseString(reader) } - var _6: String? - if Int(_1!) & Int(1 << 3) != 0 {_6 = parseString(reader) } - var _7: String? - if Int(_1!) & Int(1 << 4) != 0 {_7 = parseString(reader) } - var _8: String? - _8 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil - let _c8 = _8 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { - return Api.LangPackString.langPackStringPluralized(flags: _1!, key: _2!, zeroValue: _3, oneValue: _4, twoValue: _5, fewValue: _6, manyValue: _7, otherValue: _8!) - } - else { - return nil - } - } - public static func parse_langPackStringDeleted(_ reader: BufferReader) -> LangPackString? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.LangPackString.langPackStringDeleted(key: _1!) - } - else { - return nil - } - } - - } - public enum InputWebFileLocation: TypeConstructorDescription { - case inputWebFileLocation(url: String, accessHash: Int64) - case inputWebFileGeoPointLocation(geoPoint: Api.InputGeoPoint, accessHash: Int64, w: Int32, h: Int32, zoom: Int32, scale: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputWebFileLocation(let url, let accessHash): - if boxed { - buffer.appendInt32(-1036396922) - } - serializeString(url, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - break - case .inputWebFileGeoPointLocation(let geoPoint, let accessHash, let w, let h, let zoom, let scale): - if boxed { - buffer.appendInt32(-1625153079) - } - geoPoint.serialize(buffer, true) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeInt32(w, buffer: buffer, boxed: false) - serializeInt32(h, buffer: buffer, boxed: false) - serializeInt32(zoom, buffer: buffer, boxed: false) - serializeInt32(scale, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputWebFileLocation(let url, let accessHash): - return ("inputWebFileLocation", [("url", url), ("accessHash", accessHash)]) - case .inputWebFileGeoPointLocation(let geoPoint, let accessHash, let w, let h, let zoom, let scale): - return ("inputWebFileGeoPointLocation", [("geoPoint", geoPoint), ("accessHash", accessHash), ("w", w), ("h", h), ("zoom", zoom), ("scale", scale)]) - } - } - - public static func parse_inputWebFileLocation(_ reader: BufferReader) -> InputWebFileLocation? { - var _1: String? - _1 = parseString(reader) - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.InputWebFileLocation.inputWebFileLocation(url: _1!, accessHash: _2!) - } - else { - return nil - } - } - public static func parse_inputWebFileGeoPointLocation(_ reader: BufferReader) -> InputWebFileLocation? { - var _1: Api.InputGeoPoint? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputGeoPoint - } - var _2: Int64? - _2 = reader.readInt64() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - var _6: Int32? - _6 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.InputWebFileLocation.inputWebFileGeoPointLocation(geoPoint: _1!, accessHash: _2!, w: _3!, h: _4!, zoom: _5!, scale: _6!) - } - else { - return nil - } - } - - } - public enum EmojiLanguage: TypeConstructorDescription { - case emojiLanguage(langCode: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .emojiLanguage(let langCode): - if boxed { - buffer.appendInt32(-1275374751) - } - serializeString(langCode, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .emojiLanguage(let langCode): - return ("emojiLanguage", [("langCode", langCode)]) - } - } - - public static func parse_emojiLanguage(_ reader: BufferReader) -> EmojiLanguage? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.EmojiLanguage.emojiLanguage(langCode: _1!) - } - else { - return nil - } - } - - } - public enum MessageFwdHeader: TypeConstructorDescription { - case messageFwdHeader(flags: Int32, fromId: Api.Peer?, fromName: String?, date: Int32, channelPost: Int32?, postAuthor: String?, savedFromPeer: Api.Peer?, savedFromMsgId: Int32?, psaType: String?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .messageFwdHeader(let flags, let fromId, let fromName, let date, let channelPost, let postAuthor, let savedFromPeer, let savedFromMsgId, let psaType): - if boxed { - buffer.appendInt32(1601666510) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {fromId!.serialize(buffer, true)} - if Int(flags) & Int(1 << 5) != 0 {serializeString(fromName!, buffer: buffer, boxed: false)} - serializeInt32(date, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(channelPost!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeString(postAuthor!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 4) != 0 {savedFromPeer!.serialize(buffer, true)} - if Int(flags) & Int(1 << 4) != 0 {serializeInt32(savedFromMsgId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 6) != 0 {serializeString(psaType!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .messageFwdHeader(let flags, let fromId, let fromName, let date, let channelPost, let postAuthor, let savedFromPeer, let savedFromMsgId, let psaType): - return ("messageFwdHeader", [("flags", flags), ("fromId", fromId), ("fromName", fromName), ("date", date), ("channelPost", channelPost), ("postAuthor", postAuthor), ("savedFromPeer", savedFromPeer), ("savedFromMsgId", savedFromMsgId), ("psaType", psaType)]) - } - } - - public static func parse_messageFwdHeader(_ reader: BufferReader) -> MessageFwdHeader? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.Peer? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Peer - } } - var _3: String? - if Int(_1!) & Int(1 << 5) != 0 {_3 = parseString(reader) } - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_5 = reader.readInt32() } - var _6: String? - if Int(_1!) & Int(1 << 3) != 0 {_6 = parseString(reader) } - var _7: Api.Peer? - if Int(_1!) & Int(1 << 4) != 0 {if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.Peer - } } - var _8: Int32? - if Int(_1!) & Int(1 << 4) != 0 {_8 = reader.readInt32() } - var _9: String? - if Int(_1!) & Int(1 << 6) != 0 {_9 = parseString(reader) } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 5) == 0) || _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 4) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 6) == 0) || _9 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { - return Api.MessageFwdHeader.messageFwdHeader(flags: _1!, fromId: _2, fromName: _3, date: _4!, channelPost: _5, postAuthor: _6, savedFromPeer: _7, savedFromMsgId: _8, psaType: _9) - } - else { - return nil - } - } - - } - public enum BaseTheme: TypeConstructorDescription { - case baseThemeClassic - case baseThemeDay - case baseThemeNight - case baseThemeTinted - case baseThemeArctic - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .baseThemeClassic: - if boxed { - buffer.appendInt32(-1012849566) - } - - break - case .baseThemeDay: - if boxed { - buffer.appendInt32(-69724536) - } - - break - case .baseThemeNight: - if boxed { - buffer.appendInt32(-1212997976) - } - - break - case .baseThemeTinted: - if boxed { - buffer.appendInt32(1834973166) - } - - break - case .baseThemeArctic: - if boxed { - buffer.appendInt32(1527845466) - } - - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .baseThemeClassic: - return ("baseThemeClassic", []) - case .baseThemeDay: - return ("baseThemeDay", []) - case .baseThemeNight: - return ("baseThemeNight", []) - case .baseThemeTinted: - return ("baseThemeTinted", []) - case .baseThemeArctic: - return ("baseThemeArctic", []) - } - } - - public static func parse_baseThemeClassic(_ reader: BufferReader) -> BaseTheme? { - return Api.BaseTheme.baseThemeClassic - } - public static func parse_baseThemeDay(_ reader: BufferReader) -> BaseTheme? { - return Api.BaseTheme.baseThemeDay - } - public static func parse_baseThemeNight(_ reader: BufferReader) -> BaseTheme? { - return Api.BaseTheme.baseThemeNight - } - public static func parse_baseThemeTinted(_ reader: BufferReader) -> BaseTheme? { - return Api.BaseTheme.baseThemeTinted - } - public static func parse_baseThemeArctic(_ reader: BufferReader) -> BaseTheme? { - return Api.BaseTheme.baseThemeArctic - } - - } - public enum MessagesFilter: TypeConstructorDescription { - case inputMessagesFilterEmpty - case inputMessagesFilterPhotos - case inputMessagesFilterVideo - case inputMessagesFilterPhotoVideo - case inputMessagesFilterDocument - case inputMessagesFilterUrl - case inputMessagesFilterGif - case inputMessagesFilterVoice - case inputMessagesFilterMusic - case inputMessagesFilterChatPhotos - case inputMessagesFilterPhoneCalls(flags: Int32) - case inputMessagesFilterRoundVoice - case inputMessagesFilterRoundVideo - case inputMessagesFilterMyMentions - case inputMessagesFilterGeo - case inputMessagesFilterContacts - case inputMessagesFilterPinned - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputMessagesFilterEmpty: - if boxed { - buffer.appendInt32(1474492012) - } - - break - case .inputMessagesFilterPhotos: - if boxed { - buffer.appendInt32(-1777752804) - } - - break - case .inputMessagesFilterVideo: - if boxed { - buffer.appendInt32(-1614803355) - } - - break - case .inputMessagesFilterPhotoVideo: - if boxed { - buffer.appendInt32(1458172132) - } - - break - case .inputMessagesFilterDocument: - if boxed { - buffer.appendInt32(-1629621880) - } - - break - case .inputMessagesFilterUrl: - if boxed { - buffer.appendInt32(2129714567) - } - - break - case .inputMessagesFilterGif: - if boxed { - buffer.appendInt32(-3644025) - } - - break - case .inputMessagesFilterVoice: - if boxed { - buffer.appendInt32(1358283666) - } - - break - case .inputMessagesFilterMusic: - if boxed { - buffer.appendInt32(928101534) - } - - break - case .inputMessagesFilterChatPhotos: - if boxed { - buffer.appendInt32(975236280) - } - - break - case .inputMessagesFilterPhoneCalls(let flags): - if boxed { - buffer.appendInt32(-2134272152) - } - serializeInt32(flags, buffer: buffer, boxed: false) - break - case .inputMessagesFilterRoundVoice: - if boxed { - buffer.appendInt32(2054952868) - } - - break - case .inputMessagesFilterRoundVideo: - if boxed { - buffer.appendInt32(-1253451181) - } - - break - case .inputMessagesFilterMyMentions: - if boxed { - buffer.appendInt32(-1040652646) - } - - break - case .inputMessagesFilterGeo: - if boxed { - buffer.appendInt32(-419271411) - } - - break - case .inputMessagesFilterContacts: - if boxed { - buffer.appendInt32(-530392189) - } - - break - case .inputMessagesFilterPinned: - if boxed { - buffer.appendInt32(464520273) - } - - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputMessagesFilterEmpty: - return ("inputMessagesFilterEmpty", []) - case .inputMessagesFilterPhotos: - return ("inputMessagesFilterPhotos", []) - case .inputMessagesFilterVideo: - return ("inputMessagesFilterVideo", []) - case .inputMessagesFilterPhotoVideo: - return ("inputMessagesFilterPhotoVideo", []) - case .inputMessagesFilterDocument: - return ("inputMessagesFilterDocument", []) - case .inputMessagesFilterUrl: - return ("inputMessagesFilterUrl", []) - case .inputMessagesFilterGif: - return ("inputMessagesFilterGif", []) - case .inputMessagesFilterVoice: - return ("inputMessagesFilterVoice", []) - case .inputMessagesFilterMusic: - return ("inputMessagesFilterMusic", []) - case .inputMessagesFilterChatPhotos: - return ("inputMessagesFilterChatPhotos", []) - case .inputMessagesFilterPhoneCalls(let flags): - return ("inputMessagesFilterPhoneCalls", [("flags", flags)]) - case .inputMessagesFilterRoundVoice: - return ("inputMessagesFilterRoundVoice", []) - case .inputMessagesFilterRoundVideo: - return ("inputMessagesFilterRoundVideo", []) - case .inputMessagesFilterMyMentions: - return ("inputMessagesFilterMyMentions", []) - case .inputMessagesFilterGeo: - return ("inputMessagesFilterGeo", []) - case .inputMessagesFilterContacts: - return ("inputMessagesFilterContacts", []) - case .inputMessagesFilterPinned: - return ("inputMessagesFilterPinned", []) - } - } - - public static func parse_inputMessagesFilterEmpty(_ reader: BufferReader) -> MessagesFilter? { - return Api.MessagesFilter.inputMessagesFilterEmpty - } - public static func parse_inputMessagesFilterPhotos(_ reader: BufferReader) -> MessagesFilter? { - return Api.MessagesFilter.inputMessagesFilterPhotos - } - public static func parse_inputMessagesFilterVideo(_ reader: BufferReader) -> MessagesFilter? { - return Api.MessagesFilter.inputMessagesFilterVideo - } - public static func parse_inputMessagesFilterPhotoVideo(_ reader: BufferReader) -> MessagesFilter? { - return Api.MessagesFilter.inputMessagesFilterPhotoVideo - } - public static func parse_inputMessagesFilterDocument(_ reader: BufferReader) -> MessagesFilter? { - return Api.MessagesFilter.inputMessagesFilterDocument - } - public static func parse_inputMessagesFilterUrl(_ reader: BufferReader) -> MessagesFilter? { - return Api.MessagesFilter.inputMessagesFilterUrl - } - public static func parse_inputMessagesFilterGif(_ reader: BufferReader) -> MessagesFilter? { - return Api.MessagesFilter.inputMessagesFilterGif - } - public static func parse_inputMessagesFilterVoice(_ reader: BufferReader) -> MessagesFilter? { - return Api.MessagesFilter.inputMessagesFilterVoice - } - public static func parse_inputMessagesFilterMusic(_ reader: BufferReader) -> MessagesFilter? { - return Api.MessagesFilter.inputMessagesFilterMusic - } - public static func parse_inputMessagesFilterChatPhotos(_ reader: BufferReader) -> MessagesFilter? { - return Api.MessagesFilter.inputMessagesFilterChatPhotos - } - public static func parse_inputMessagesFilterPhoneCalls(_ reader: BufferReader) -> MessagesFilter? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.MessagesFilter.inputMessagesFilterPhoneCalls(flags: _1!) - } - else { - return nil - } - } - public static func parse_inputMessagesFilterRoundVoice(_ reader: BufferReader) -> MessagesFilter? { - return Api.MessagesFilter.inputMessagesFilterRoundVoice - } - public static func parse_inputMessagesFilterRoundVideo(_ reader: BufferReader) -> MessagesFilter? { - return Api.MessagesFilter.inputMessagesFilterRoundVideo - } - public static func parse_inputMessagesFilterMyMentions(_ reader: BufferReader) -> MessagesFilter? { - return Api.MessagesFilter.inputMessagesFilterMyMentions - } - public static func parse_inputMessagesFilterGeo(_ reader: BufferReader) -> MessagesFilter? { - return Api.MessagesFilter.inputMessagesFilterGeo - } - public static func parse_inputMessagesFilterContacts(_ reader: BufferReader) -> MessagesFilter? { - return Api.MessagesFilter.inputMessagesFilterContacts - } - public static func parse_inputMessagesFilterPinned(_ reader: BufferReader) -> MessagesFilter? { - return Api.MessagesFilter.inputMessagesFilterPinned - } - - } - public enum EmojiKeyword: TypeConstructorDescription { - case emojiKeyword(keyword: String, emoticons: [String]) - case emojiKeywordDeleted(keyword: String, emoticons: [String]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .emojiKeyword(let keyword, let emoticons): - if boxed { - buffer.appendInt32(-709641735) - } - serializeString(keyword, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(emoticons.count)) - for item in emoticons { - serializeString(item, buffer: buffer, boxed: false) - } - break - case .emojiKeywordDeleted(let keyword, let emoticons): - if boxed { - buffer.appendInt32(594408994) - } - serializeString(keyword, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(emoticons.count)) - for item in emoticons { - serializeString(item, buffer: buffer, boxed: false) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .emojiKeyword(let keyword, let emoticons): - return ("emojiKeyword", [("keyword", keyword), ("emoticons", emoticons)]) - case .emojiKeywordDeleted(let keyword, let emoticons): - return ("emojiKeywordDeleted", [("keyword", keyword), ("emoticons", emoticons)]) - } - } - - public static func parse_emojiKeyword(_ reader: BufferReader) -> EmojiKeyword? { - var _1: String? - _1 = parseString(reader) - var _2: [String]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.EmojiKeyword.emojiKeyword(keyword: _1!, emoticons: _2!) - } - else { - return nil - } - } - public static func parse_emojiKeywordDeleted(_ reader: BufferReader) -> EmojiKeyword? { - var _1: String? - _1 = parseString(reader) - var _2: [String]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.EmojiKeyword.emojiKeywordDeleted(keyword: _1!, emoticons: _2!) - } - else { - return nil - } - } - - } - public enum BotInlineMessage: TypeConstructorDescription { - case botInlineMessageMediaAuto(flags: Int32, message: String, entities: [Api.MessageEntity]?, replyMarkup: Api.ReplyMarkup?) - case botInlineMessageText(flags: Int32, message: String, entities: [Api.MessageEntity]?, replyMarkup: Api.ReplyMarkup?) - case botInlineMessageMediaGeo(flags: Int32, geo: Api.GeoPoint, heading: Int32?, period: Int32?, proximityNotificationRadius: Int32?, replyMarkup: Api.ReplyMarkup?) - case botInlineMessageMediaVenue(flags: Int32, geo: Api.GeoPoint, title: String, address: String, provider: String, venueId: String, venueType: String, replyMarkup: Api.ReplyMarkup?) - case botInlineMessageMediaContact(flags: Int32, phoneNumber: String, firstName: String, lastName: String, vcard: String, replyMarkup: Api.ReplyMarkup?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .botInlineMessageMediaAuto(let flags, let message, let entities, let replyMarkup): - if boxed { - buffer.appendInt32(1984755728) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(message, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities!.count)) - for item in entities! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} - break - case .botInlineMessageText(let flags, let message, let entities, let replyMarkup): - if boxed { - buffer.appendInt32(-1937807902) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(message, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities!.count)) - for item in entities! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} - break - case .botInlineMessageMediaGeo(let flags, let geo, let heading, let period, let proximityNotificationRadius, let replyMarkup): - if boxed { - buffer.appendInt32(85477117) - } - serializeInt32(flags, buffer: buffer, boxed: false) - geo.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(heading!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(period!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeInt32(proximityNotificationRadius!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} - break - case .botInlineMessageMediaVenue(let flags, let geo, let title, let address, let provider, let venueId, let venueType, let replyMarkup): - if boxed { - buffer.appendInt32(-1970903652) - } - serializeInt32(flags, buffer: buffer, boxed: false) - geo.serialize(buffer, true) - serializeString(title, buffer: buffer, boxed: false) - serializeString(address, buffer: buffer, boxed: false) - serializeString(provider, buffer: buffer, boxed: false) - serializeString(venueId, buffer: buffer, boxed: false) - serializeString(venueType, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} - break - case .botInlineMessageMediaContact(let flags, let phoneNumber, let firstName, let lastName, let vcard, let replyMarkup): - if boxed { - buffer.appendInt32(416402882) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(phoneNumber, buffer: buffer, boxed: false) - serializeString(firstName, buffer: buffer, boxed: false) - serializeString(lastName, buffer: buffer, boxed: false) - serializeString(vcard, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .botInlineMessageMediaAuto(let flags, let message, let entities, let replyMarkup): - return ("botInlineMessageMediaAuto", [("flags", flags), ("message", message), ("entities", entities), ("replyMarkup", replyMarkup)]) - case .botInlineMessageText(let flags, let message, let entities, let replyMarkup): - return ("botInlineMessageText", [("flags", flags), ("message", message), ("entities", entities), ("replyMarkup", replyMarkup)]) - case .botInlineMessageMediaGeo(let flags, let geo, let heading, let period, let proximityNotificationRadius, let replyMarkup): - return ("botInlineMessageMediaGeo", [("flags", flags), ("geo", geo), ("heading", heading), ("period", period), ("proximityNotificationRadius", proximityNotificationRadius), ("replyMarkup", replyMarkup)]) - case .botInlineMessageMediaVenue(let flags, let geo, let title, let address, let provider, let venueId, let venueType, let replyMarkup): - return ("botInlineMessageMediaVenue", [("flags", flags), ("geo", geo), ("title", title), ("address", address), ("provider", provider), ("venueId", venueId), ("venueType", venueType), ("replyMarkup", replyMarkup)]) - case .botInlineMessageMediaContact(let flags, let phoneNumber, let firstName, let lastName, let vcard, let replyMarkup): - return ("botInlineMessageMediaContact", [("flags", flags), ("phoneNumber", phoneNumber), ("firstName", firstName), ("lastName", lastName), ("vcard", vcard), ("replyMarkup", replyMarkup)]) - } - } - - public static func parse_botInlineMessageMediaAuto(_ reader: BufferReader) -> BotInlineMessage? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) - } } - var _4: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.BotInlineMessage.botInlineMessageMediaAuto(flags: _1!, message: _2!, entities: _3, replyMarkup: _4) - } - else { - return nil - } - } - public static func parse_botInlineMessageText(_ reader: BufferReader) -> BotInlineMessage? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) - } } - var _4: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.BotInlineMessage.botInlineMessageText(flags: _1!, message: _2!, entities: _3, replyMarkup: _4) - } - else { - return nil - } - } - public static func parse_botInlineMessageMediaGeo(_ reader: BufferReader) -> BotInlineMessage? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.GeoPoint? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.GeoPoint - } - var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } - var _4: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt32() } - var _5: Int32? - if Int(_1!) & Int(1 << 3) != 0 {_5 = reader.readInt32() } - var _6: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.BotInlineMessage.botInlineMessageMediaGeo(flags: _1!, geo: _2!, heading: _3, period: _4, proximityNotificationRadius: _5, replyMarkup: _6) - } - else { - return nil - } - } - public static func parse_botInlineMessageMediaVenue(_ reader: BufferReader) -> BotInlineMessage? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.GeoPoint? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.GeoPoint - } - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - var _5: String? - _5 = parseString(reader) - var _6: String? - _6 = parseString(reader) - var _7: String? - _7 = parseString(reader) - var _8: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _8 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { - return Api.BotInlineMessage.botInlineMessageMediaVenue(flags: _1!, geo: _2!, title: _3!, address: _4!, provider: _5!, venueId: _6!, venueType: _7!, replyMarkup: _8) - } - else { - return nil - } - } - public static func parse_botInlineMessageMediaContact(_ reader: BufferReader) -> BotInlineMessage? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - var _5: String? - _5 = parseString(reader) - var _6: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.BotInlineMessage.botInlineMessageMediaContact(flags: _1!, phoneNumber: _2!, firstName: _3!, lastName: _4!, vcard: _5!, replyMarkup: _6) - } - else { - return nil - } - } - - } - public enum InputPeerNotifySettings: TypeConstructorDescription { - case inputPeerNotifySettings(flags: Int32, showPreviews: Api.Bool?, silent: Api.Bool?, muteUntil: Int32?, sound: String?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputPeerNotifySettings(let flags, let showPreviews, let silent, let muteUntil, let sound): - if boxed { - buffer.appendInt32(-1673717362) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {showPreviews!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {silent!.serialize(buffer, true)} - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(muteUntil!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeString(sound!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputPeerNotifySettings(let flags, let showPreviews, let silent, let muteUntil, let sound): - return ("inputPeerNotifySettings", [("flags", flags), ("showPreviews", showPreviews), ("silent", silent), ("muteUntil", muteUntil), ("sound", sound)]) - } - } - - public static func parse_inputPeerNotifySettings(_ reader: BufferReader) -> InputPeerNotifySettings? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.Bool? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Bool - } } - var _3: Api.Bool? - if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.Bool - } } - var _4: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_4 = reader.readInt32() } - var _5: String? - if Int(_1!) & Int(1 << 3) != 0 {_5 = parseString(reader) } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.InputPeerNotifySettings.inputPeerNotifySettings(flags: _1!, showPreviews: _2, silent: _3, muteUntil: _4, sound: _5) - } - else { - return nil - } - } - - } - public enum ExportedChatInvite: TypeConstructorDescription { - case chatInviteExported(flags: Int32, link: String, adminId: Int32, date: Int32, startDate: Int32?, expireDate: Int32?, usageLimit: Int32?, usage: Int32?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .chatInviteExported(let flags, let link, let adminId, let date, let startDate, let expireDate, let usageLimit, let usage): - if boxed { - buffer.appendInt32(1847917725) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(link, buffer: buffer, boxed: false) - serializeInt32(adminId, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 4) != 0 {serializeInt32(startDate!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(expireDate!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(usageLimit!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeInt32(usage!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .chatInviteExported(let flags, let link, let adminId, let date, let startDate, let expireDate, let usageLimit, let usage): - return ("chatInviteExported", [("flags", flags), ("link", link), ("adminId", adminId), ("date", date), ("startDate", startDate), ("expireDate", expireDate), ("usageLimit", usageLimit), ("usage", usage)]) - } - } - - public static func parse_chatInviteExported(_ reader: BufferReader) -> ExportedChatInvite? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - if Int(_1!) & Int(1 << 4) != 0 {_5 = reader.readInt32() } - var _6: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_6 = reader.readInt32() } - var _7: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_7 = reader.readInt32() } - var _8: Int32? - if Int(_1!) & Int(1 << 3) != 0 {_8 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 4) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 2) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 3) == 0) || _8 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { - return Api.ExportedChatInvite.chatInviteExported(flags: _1!, link: _2!, adminId: _3!, date: _4!, startDate: _5, expireDate: _6, usageLimit: _7, usage: _8) - } - else { - return nil - } - } - - } - public enum Authorization: TypeConstructorDescription { - case authorization(flags: Int32, hash: Int64, deviceModel: String, platform: String, systemVersion: String, apiId: Int32, appName: String, appVersion: String, dateCreated: Int32, dateActive: Int32, ip: String, country: String, region: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .authorization(let flags, let hash, let deviceModel, let platform, let systemVersion, let apiId, let appName, let appVersion, let dateCreated, let dateActive, let ip, let country, let region): - if boxed { - buffer.appendInt32(-1392388579) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(hash, buffer: buffer, boxed: false) - serializeString(deviceModel, buffer: buffer, boxed: false) - serializeString(platform, buffer: buffer, boxed: false) - serializeString(systemVersion, buffer: buffer, boxed: false) - serializeInt32(apiId, buffer: buffer, boxed: false) - serializeString(appName, buffer: buffer, boxed: false) - serializeString(appVersion, buffer: buffer, boxed: false) - serializeInt32(dateCreated, buffer: buffer, boxed: false) - serializeInt32(dateActive, buffer: buffer, boxed: false) - serializeString(ip, buffer: buffer, boxed: false) - serializeString(country, buffer: buffer, boxed: false) - serializeString(region, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .authorization(let flags, let hash, let deviceModel, let platform, let systemVersion, let apiId, let appName, let appVersion, let dateCreated, let dateActive, let ip, let country, let region): - return ("authorization", [("flags", flags), ("hash", hash), ("deviceModel", deviceModel), ("platform", platform), ("systemVersion", systemVersion), ("apiId", apiId), ("appName", appName), ("appVersion", appVersion), ("dateCreated", dateCreated), ("dateActive", dateActive), ("ip", ip), ("country", country), ("region", region)]) - } - } - - public static func parse_authorization(_ reader: BufferReader) -> Authorization? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - var _5: String? - _5 = parseString(reader) - var _6: Int32? - _6 = reader.readInt32() - var _7: String? - _7 = parseString(reader) - var _8: String? - _8 = parseString(reader) - var _9: Int32? - _9 = reader.readInt32() - var _10: Int32? - _10 = reader.readInt32() - var _11: String? - _11 = parseString(reader) - var _12: String? - _12 = parseString(reader) - var _13: String? - _13 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = _8 != nil - let _c9 = _9 != nil - let _c10 = _10 != nil - let _c11 = _11 != nil - let _c12 = _12 != nil - let _c13 = _13 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 { - return Api.Authorization.authorization(flags: _1!, hash: _2!, deviceModel: _3!, platform: _4!, systemVersion: _5!, apiId: _6!, appName: _7!, appVersion: _8!, dateCreated: _9!, dateActive: _10!, ip: _11!, country: _12!, region: _13!) - } - else { - return nil - } - } - - } - public enum MaskCoords: TypeConstructorDescription { - case maskCoords(n: Int32, x: Double, y: Double, zoom: Double) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .maskCoords(let n, let x, let y, let zoom): - if boxed { - buffer.appendInt32(-1361650766) - } - serializeInt32(n, buffer: buffer, boxed: false) - serializeDouble(x, buffer: buffer, boxed: false) - serializeDouble(y, buffer: buffer, boxed: false) - serializeDouble(zoom, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .maskCoords(let n, let x, let y, let zoom): - return ("maskCoords", [("n", n), ("x", x), ("y", y), ("zoom", zoom)]) - } - } - - public static func parse_maskCoords(_ reader: BufferReader) -> MaskCoords? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Double? - _2 = reader.readDouble() - var _3: Double? - _3 = reader.readDouble() - var _4: Double? - _4 = reader.readDouble() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.MaskCoords.maskCoords(n: _1!, x: _2!, y: _3!, zoom: _4!) - } - else { - return nil - } - } - - } - public enum PhoneConnection: TypeConstructorDescription { - case phoneConnection(id: Int64, ip: String, ipv6: String, port: Int32, peerTag: Buffer) - case phoneConnectionWebrtc(flags: Int32, id: Int64, ip: String, ipv6: String, port: Int32, username: String, password: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .phoneConnection(let id, let ip, let ipv6, let port, let peerTag): - if boxed { - buffer.appendInt32(-1655957568) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeString(ip, buffer: buffer, boxed: false) - serializeString(ipv6, buffer: buffer, boxed: false) - serializeInt32(port, buffer: buffer, boxed: false) - serializeBytes(peerTag, buffer: buffer, boxed: false) - break - case .phoneConnectionWebrtc(let flags, let id, let ip, let ipv6, let port, let username, let password): - if boxed { - buffer.appendInt32(1667228533) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(id, buffer: buffer, boxed: false) - serializeString(ip, buffer: buffer, boxed: false) - serializeString(ipv6, buffer: buffer, boxed: false) - serializeInt32(port, buffer: buffer, boxed: false) - serializeString(username, buffer: buffer, boxed: false) - serializeString(password, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .phoneConnection(let id, let ip, let ipv6, let port, let peerTag): - return ("phoneConnection", [("id", id), ("ip", ip), ("ipv6", ipv6), ("port", port), ("peerTag", peerTag)]) - case .phoneConnectionWebrtc(let flags, let id, let ip, let ipv6, let port, let username, let password): - return ("phoneConnectionWebrtc", [("flags", flags), ("id", id), ("ip", ip), ("ipv6", ipv6), ("port", port), ("username", username), ("password", password)]) - } - } - - public static func parse_phoneConnection(_ reader: BufferReader) -> PhoneConnection? { - var _1: Int64? - _1 = reader.readInt64() - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: Int32? - _4 = reader.readInt32() - var _5: Buffer? - _5 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.PhoneConnection.phoneConnection(id: _1!, ip: _2!, ipv6: _3!, port: _4!, peerTag: _5!) - } - else { - return nil - } - } - public static func parse_phoneConnectionWebrtc(_ reader: BufferReader) -> PhoneConnection? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - var _5: Int32? - _5 = reader.readInt32() - var _6: String? - _6 = parseString(reader) - var _7: String? - _7 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.PhoneConnection.phoneConnectionWebrtc(flags: _1!, id: _2!, ip: _3!, ipv6: _4!, port: _5!, username: _6!, password: _7!) - } - else { - return nil - } - } - - } - public enum AccountDaysTTL: TypeConstructorDescription { - case accountDaysTTL(days: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .accountDaysTTL(let days): - if boxed { - buffer.appendInt32(-1194283041) - } - serializeInt32(days, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .accountDaysTTL(let days): - return ("accountDaysTTL", [("days", days)]) - } - } - - public static func parse_accountDaysTTL(_ reader: BufferReader) -> AccountDaysTTL? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.AccountDaysTTL.accountDaysTTL(days: _1!) - } - else { - return nil - } - } - - } - public enum SecureValueType: TypeConstructorDescription { - case secureValueTypePersonalDetails - case secureValueTypePassport - case secureValueTypeDriverLicense - case secureValueTypeIdentityCard - case secureValueTypeInternalPassport - case secureValueTypeAddress - case secureValueTypeUtilityBill - case secureValueTypeBankStatement - case secureValueTypeRentalAgreement - case secureValueTypePassportRegistration - case secureValueTypeTemporaryRegistration - case secureValueTypePhone - case secureValueTypeEmail - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .secureValueTypePersonalDetails: - if boxed { - buffer.appendInt32(-1658158621) - } - - break - case .secureValueTypePassport: - if boxed { - buffer.appendInt32(1034709504) - } - - break - case .secureValueTypeDriverLicense: - if boxed { - buffer.appendInt32(115615172) - } - - break - case .secureValueTypeIdentityCard: - if boxed { - buffer.appendInt32(-1596951477) - } - - break - case .secureValueTypeInternalPassport: - if boxed { - buffer.appendInt32(-1717268701) - } - - break - case .secureValueTypeAddress: - if boxed { - buffer.appendInt32(-874308058) - } - - break - case .secureValueTypeUtilityBill: - if boxed { - buffer.appendInt32(-63531698) - } - - break - case .secureValueTypeBankStatement: - if boxed { - buffer.appendInt32(-1995211763) - } - - break - case .secureValueTypeRentalAgreement: - if boxed { - buffer.appendInt32(-1954007928) - } - - break - case .secureValueTypePassportRegistration: - if boxed { - buffer.appendInt32(-1713143702) - } - - break - case .secureValueTypeTemporaryRegistration: - if boxed { - buffer.appendInt32(-368907213) - } - - break - case .secureValueTypePhone: - if boxed { - buffer.appendInt32(-1289704741) - } - - break - case .secureValueTypeEmail: - if boxed { - buffer.appendInt32(-1908627474) - } - - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .secureValueTypePersonalDetails: - return ("secureValueTypePersonalDetails", []) - case .secureValueTypePassport: - return ("secureValueTypePassport", []) - case .secureValueTypeDriverLicense: - return ("secureValueTypeDriverLicense", []) - case .secureValueTypeIdentityCard: - return ("secureValueTypeIdentityCard", []) - case .secureValueTypeInternalPassport: - return ("secureValueTypeInternalPassport", []) - case .secureValueTypeAddress: - return ("secureValueTypeAddress", []) - case .secureValueTypeUtilityBill: - return ("secureValueTypeUtilityBill", []) - case .secureValueTypeBankStatement: - return ("secureValueTypeBankStatement", []) - case .secureValueTypeRentalAgreement: - return ("secureValueTypeRentalAgreement", []) - case .secureValueTypePassportRegistration: - return ("secureValueTypePassportRegistration", []) - case .secureValueTypeTemporaryRegistration: - return ("secureValueTypeTemporaryRegistration", []) - case .secureValueTypePhone: - return ("secureValueTypePhone", []) - case .secureValueTypeEmail: - return ("secureValueTypeEmail", []) - } - } - - public static func parse_secureValueTypePersonalDetails(_ reader: BufferReader) -> SecureValueType? { - return Api.SecureValueType.secureValueTypePersonalDetails - } - public static func parse_secureValueTypePassport(_ reader: BufferReader) -> SecureValueType? { - return Api.SecureValueType.secureValueTypePassport - } - public static func parse_secureValueTypeDriverLicense(_ reader: BufferReader) -> SecureValueType? { - return Api.SecureValueType.secureValueTypeDriverLicense - } - public static func parse_secureValueTypeIdentityCard(_ reader: BufferReader) -> SecureValueType? { - return Api.SecureValueType.secureValueTypeIdentityCard - } - public static func parse_secureValueTypeInternalPassport(_ reader: BufferReader) -> SecureValueType? { - return Api.SecureValueType.secureValueTypeInternalPassport - } - public static func parse_secureValueTypeAddress(_ reader: BufferReader) -> SecureValueType? { - return Api.SecureValueType.secureValueTypeAddress - } - public static func parse_secureValueTypeUtilityBill(_ reader: BufferReader) -> SecureValueType? { - return Api.SecureValueType.secureValueTypeUtilityBill - } - public static func parse_secureValueTypeBankStatement(_ reader: BufferReader) -> SecureValueType? { - return Api.SecureValueType.secureValueTypeBankStatement - } - public static func parse_secureValueTypeRentalAgreement(_ reader: BufferReader) -> SecureValueType? { - return Api.SecureValueType.secureValueTypeRentalAgreement - } - public static func parse_secureValueTypePassportRegistration(_ reader: BufferReader) -> SecureValueType? { - return Api.SecureValueType.secureValueTypePassportRegistration - } - public static func parse_secureValueTypeTemporaryRegistration(_ reader: BufferReader) -> SecureValueType? { - return Api.SecureValueType.secureValueTypeTemporaryRegistration - } - public static func parse_secureValueTypePhone(_ reader: BufferReader) -> SecureValueType? { - return Api.SecureValueType.secureValueTypePhone - } - public static func parse_secureValueTypeEmail(_ reader: BufferReader) -> SecureValueType? { - return Api.SecureValueType.secureValueTypeEmail - } - - } - public enum PasswordKdfAlgo: TypeConstructorDescription { - case passwordKdfAlgoUnknown - case passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow(salt1: Buffer, salt2: Buffer, g: Int32, p: Buffer) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .passwordKdfAlgoUnknown: - if boxed { - buffer.appendInt32(-732254058) - } - - break - case .passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow(let salt1, let salt2, let g, let p): - if boxed { - buffer.appendInt32(982592842) - } - serializeBytes(salt1, buffer: buffer, boxed: false) - serializeBytes(salt2, buffer: buffer, boxed: false) - serializeInt32(g, buffer: buffer, boxed: false) - serializeBytes(p, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .passwordKdfAlgoUnknown: - return ("passwordKdfAlgoUnknown", []) - case .passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow(let salt1, let salt2, let g, let p): - return ("passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow", [("salt1", salt1), ("salt2", salt2), ("g", g), ("p", p)]) - } - } - - public static func parse_passwordKdfAlgoUnknown(_ reader: BufferReader) -> PasswordKdfAlgo? { - return Api.PasswordKdfAlgo.passwordKdfAlgoUnknown - } - public static func parse_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow(_ reader: BufferReader) -> PasswordKdfAlgo? { - var _1: Buffer? - _1 = parseBytes(reader) - var _2: Buffer? - _2 = parseBytes(reader) - var _3: Int32? - _3 = reader.readInt32() - var _4: Buffer? - _4 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.PasswordKdfAlgo.passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow(salt1: _1!, salt2: _2!, g: _3!, p: _4!) - } - else { - return nil - } - } - - } - public enum InputBotInlineResult: TypeConstructorDescription { - case inputBotInlineResult(flags: Int32, id: String, type: String, title: String?, description: String?, url: String?, thumb: Api.InputWebDocument?, content: Api.InputWebDocument?, sendMessage: Api.InputBotInlineMessage) - case inputBotInlineResultPhoto(id: String, type: String, photo: Api.InputPhoto, sendMessage: Api.InputBotInlineMessage) - case inputBotInlineResultDocument(flags: Int32, id: String, type: String, title: String?, description: String?, document: Api.InputDocument, sendMessage: Api.InputBotInlineMessage) - case inputBotInlineResultGame(id: String, shortName: String, sendMessage: Api.InputBotInlineMessage) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputBotInlineResult(let flags, let id, let type, let title, let description, let url, let thumb, let content, let sendMessage): - if boxed { - buffer.appendInt32(-2000710887) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(id, buffer: buffer, boxed: false) - serializeString(type, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeString(title!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeString(description!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeString(url!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 4) != 0 {thumb!.serialize(buffer, true)} - if Int(flags) & Int(1 << 5) != 0 {content!.serialize(buffer, true)} - sendMessage.serialize(buffer, true) - break - case .inputBotInlineResultPhoto(let id, let type, let photo, let sendMessage): - if boxed { - buffer.appendInt32(-1462213465) - } - serializeString(id, buffer: buffer, boxed: false) - serializeString(type, buffer: buffer, boxed: false) - photo.serialize(buffer, true) - sendMessage.serialize(buffer, true) - break - case .inputBotInlineResultDocument(let flags, let id, let type, let title, let description, let document, let sendMessage): - if boxed { - buffer.appendInt32(-459324) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(id, buffer: buffer, boxed: false) - serializeString(type, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeString(title!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeString(description!, buffer: buffer, boxed: false)} - document.serialize(buffer, true) - sendMessage.serialize(buffer, true) - break - case .inputBotInlineResultGame(let id, let shortName, let sendMessage): - if boxed { - buffer.appendInt32(1336154098) - } - serializeString(id, buffer: buffer, boxed: false) - serializeString(shortName, buffer: buffer, boxed: false) - sendMessage.serialize(buffer, true) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputBotInlineResult(let flags, let id, let type, let title, let description, let url, let thumb, let content, let sendMessage): - return ("inputBotInlineResult", [("flags", flags), ("id", id), ("type", type), ("title", title), ("description", description), ("url", url), ("thumb", thumb), ("content", content), ("sendMessage", sendMessage)]) - case .inputBotInlineResultPhoto(let id, let type, let photo, let sendMessage): - return ("inputBotInlineResultPhoto", [("id", id), ("type", type), ("photo", photo), ("sendMessage", sendMessage)]) - case .inputBotInlineResultDocument(let flags, let id, let type, let title, let description, let document, let sendMessage): - return ("inputBotInlineResultDocument", [("flags", flags), ("id", id), ("type", type), ("title", title), ("description", description), ("document", document), ("sendMessage", sendMessage)]) - case .inputBotInlineResultGame(let id, let shortName, let sendMessage): - return ("inputBotInlineResultGame", [("id", id), ("shortName", shortName), ("sendMessage", sendMessage)]) - } - } - - public static func parse_inputBotInlineResult(_ reader: BufferReader) -> InputBotInlineResult? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: String? - if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } - var _5: String? - if Int(_1!) & Int(1 << 2) != 0 {_5 = parseString(reader) } - var _6: String? - if Int(_1!) & Int(1 << 3) != 0 {_6 = parseString(reader) } - var _7: Api.InputWebDocument? - if Int(_1!) & Int(1 << 4) != 0 {if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.InputWebDocument - } } - var _8: Api.InputWebDocument? - if Int(_1!) & Int(1 << 5) != 0 {if let signature = reader.readInt32() { - _8 = Api.parse(reader, signature: signature) as? Api.InputWebDocument - } } - var _9: Api.InputBotInlineMessage? - if let signature = reader.readInt32() { - _9 = Api.parse(reader, signature: signature) as? Api.InputBotInlineMessage - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 5) == 0) || _8 != nil - let _c9 = _9 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { - return Api.InputBotInlineResult.inputBotInlineResult(flags: _1!, id: _2!, type: _3!, title: _4, description: _5, url: _6, thumb: _7, content: _8, sendMessage: _9!) - } - else { - return nil - } - } - public static func parse_inputBotInlineResultPhoto(_ reader: BufferReader) -> InputBotInlineResult? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - var _3: Api.InputPhoto? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.InputPhoto - } - var _4: Api.InputBotInlineMessage? - if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.InputBotInlineMessage - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputBotInlineResult.inputBotInlineResultPhoto(id: _1!, type: _2!, photo: _3!, sendMessage: _4!) - } - else { - return nil - } - } - public static func parse_inputBotInlineResultDocument(_ reader: BufferReader) -> InputBotInlineResult? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: String? - _3 = parseString(reader) - var _4: String? - if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } - var _5: String? - if Int(_1!) & Int(1 << 2) != 0 {_5 = parseString(reader) } - var _6: Api.InputDocument? - if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.InputDocument - } - var _7: Api.InputBotInlineMessage? - if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.InputBotInlineMessage - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.InputBotInlineResult.inputBotInlineResultDocument(flags: _1!, id: _2!, type: _3!, title: _4, description: _5, document: _6!, sendMessage: _7!) - } - else { - return nil - } - } - public static func parse_inputBotInlineResultGame(_ reader: BufferReader) -> InputBotInlineResult? { - var _1: String? - _1 = parseString(reader) - var _2: String? - _2 = parseString(reader) - var _3: Api.InputBotInlineMessage? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.InputBotInlineMessage - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.InputBotInlineResult.inputBotInlineResultGame(id: _1!, shortName: _2!, sendMessage: _3!) - } - else { - return nil - } - } - - } - public enum PrivacyRule: TypeConstructorDescription { - case privacyValueAllowContacts - case privacyValueAllowAll - case privacyValueAllowUsers(users: [Int32]) - case privacyValueDisallowContacts - case privacyValueDisallowAll - case privacyValueDisallowUsers(users: [Int32]) - case privacyValueAllowChatParticipants(chats: [Int32]) - case privacyValueDisallowChatParticipants(chats: [Int32]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .privacyValueAllowContacts: - if boxed { - buffer.appendInt32(-123988) - } - - break - case .privacyValueAllowAll: - if boxed { - buffer.appendInt32(1698855810) - } - - break - case .privacyValueAllowUsers(let users): - if boxed { - buffer.appendInt32(1297858060) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - serializeInt32(item, buffer: buffer, boxed: false) - } - break - case .privacyValueDisallowContacts: - if boxed { - buffer.appendInt32(-125240806) - } - - break - case .privacyValueDisallowAll: - if boxed { - buffer.appendInt32(-1955338397) - } - - break - case .privacyValueDisallowUsers(let users): - if boxed { - buffer.appendInt32(209668535) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - serializeInt32(item, buffer: buffer, boxed: false) - } - break - case .privacyValueAllowChatParticipants(let chats): - if boxed { - buffer.appendInt32(415136107) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(chats.count)) - for item in chats { - serializeInt32(item, buffer: buffer, boxed: false) - } - break - case .privacyValueDisallowChatParticipants(let chats): - if boxed { - buffer.appendInt32(-1397881200) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(chats.count)) - for item in chats { - serializeInt32(item, buffer: buffer, boxed: false) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .privacyValueAllowContacts: - return ("privacyValueAllowContacts", []) - case .privacyValueAllowAll: - return ("privacyValueAllowAll", []) - case .privacyValueAllowUsers(let users): - return ("privacyValueAllowUsers", [("users", users)]) - case .privacyValueDisallowContacts: - return ("privacyValueDisallowContacts", []) - case .privacyValueDisallowAll: - return ("privacyValueDisallowAll", []) - case .privacyValueDisallowUsers(let users): - return ("privacyValueDisallowUsers", [("users", users)]) - case .privacyValueAllowChatParticipants(let chats): - return ("privacyValueAllowChatParticipants", [("chats", chats)]) - case .privacyValueDisallowChatParticipants(let chats): - return ("privacyValueDisallowChatParticipants", [("chats", chats)]) - } - } - - public static func parse_privacyValueAllowContacts(_ reader: BufferReader) -> PrivacyRule? { - return Api.PrivacyRule.privacyValueAllowContacts - } - public static func parse_privacyValueAllowAll(_ reader: BufferReader) -> PrivacyRule? { - return Api.PrivacyRule.privacyValueAllowAll - } - public static func parse_privacyValueAllowUsers(_ reader: BufferReader) -> PrivacyRule? { - var _1: [Int32]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.PrivacyRule.privacyValueAllowUsers(users: _1!) - } - else { - return nil - } - } - public static func parse_privacyValueDisallowContacts(_ reader: BufferReader) -> PrivacyRule? { - return Api.PrivacyRule.privacyValueDisallowContacts - } - public static func parse_privacyValueDisallowAll(_ reader: BufferReader) -> PrivacyRule? { - return Api.PrivacyRule.privacyValueDisallowAll - } - public static func parse_privacyValueDisallowUsers(_ reader: BufferReader) -> PrivacyRule? { - var _1: [Int32]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.PrivacyRule.privacyValueDisallowUsers(users: _1!) - } - else { - return nil - } - } - public static func parse_privacyValueAllowChatParticipants(_ reader: BufferReader) -> PrivacyRule? { - var _1: [Int32]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.PrivacyRule.privacyValueAllowChatParticipants(chats: _1!) - } - else { - return nil - } - } - public static func parse_privacyValueDisallowChatParticipants(_ reader: BufferReader) -> PrivacyRule? { - var _1: [Int32]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.PrivacyRule.privacyValueDisallowChatParticipants(chats: _1!) - } - else { - return nil - } - } - - } - public enum MessageAction: TypeConstructorDescription { - case messageActionEmpty - case messageActionChatCreate(title: String, users: [Int32]) - case messageActionChatEditTitle(title: String) - case messageActionChatEditPhoto(photo: Api.Photo) - case messageActionChatDeletePhoto - case messageActionChatAddUser(users: [Int32]) - case messageActionChatDeleteUser(userId: Int32) - case messageActionChatJoinedByLink(inviterId: Int32) - case messageActionChannelCreate(title: String) - case messageActionChatMigrateTo(channelId: Int32) - case messageActionChannelMigrateFrom(title: String, chatId: Int32) - case messageActionPinMessage - case messageActionHistoryClear - case messageActionGameScore(gameId: Int64, score: Int32) - case messageActionPaymentSentMe(flags: Int32, currency: String, totalAmount: Int64, payload: Buffer, info: Api.PaymentRequestedInfo?, shippingOptionId: String?, charge: Api.PaymentCharge) - case messageActionPaymentSent(currency: String, totalAmount: Int64) - case messageActionPhoneCall(flags: Int32, callId: Int64, reason: Api.PhoneCallDiscardReason?, duration: Int32?) - case messageActionScreenshotTaken - case messageActionCustomAction(message: String) - case messageActionBotAllowed(domain: String) - case messageActionSecureValuesSentMe(values: [Api.SecureValue], credentials: Api.SecureCredentialsEncrypted) - case messageActionSecureValuesSent(types: [Api.SecureValueType]) - case messageActionContactSignUp - case messageActionGeoProximityReached(fromId: Api.Peer, toId: Api.Peer, distance: Int32) - case messageActionGroupCall(flags: Int32, call: Api.InputGroupCall, duration: Int32?) - case messageActionInviteToGroupCall(call: Api.InputGroupCall, users: [Int32]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .messageActionEmpty: - if boxed { - buffer.appendInt32(-1230047312) - } - - break - case .messageActionChatCreate(let title, let users): - if boxed { - buffer.appendInt32(-1503425638) - } - serializeString(title, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - serializeInt32(item, buffer: buffer, boxed: false) - } - break - case .messageActionChatEditTitle(let title): - if boxed { - buffer.appendInt32(-1247687078) - } - serializeString(title, buffer: buffer, boxed: false) - break - case .messageActionChatEditPhoto(let photo): - if boxed { - buffer.appendInt32(2144015272) - } - photo.serialize(buffer, true) - break - case .messageActionChatDeletePhoto: - if boxed { - buffer.appendInt32(-1780220945) - } - - break - case .messageActionChatAddUser(let users): - if boxed { - buffer.appendInt32(1217033015) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - serializeInt32(item, buffer: buffer, boxed: false) - } - break - case .messageActionChatDeleteUser(let userId): - if boxed { - buffer.appendInt32(-1297179892) - } - serializeInt32(userId, buffer: buffer, boxed: false) - break - case .messageActionChatJoinedByLink(let inviterId): - if boxed { - buffer.appendInt32(-123931160) - } - serializeInt32(inviterId, buffer: buffer, boxed: false) - break - case .messageActionChannelCreate(let title): - if boxed { - buffer.appendInt32(-1781355374) - } - serializeString(title, buffer: buffer, boxed: false) - break - case .messageActionChatMigrateTo(let channelId): - if boxed { - buffer.appendInt32(1371385889) - } - serializeInt32(channelId, buffer: buffer, boxed: false) - break - case .messageActionChannelMigrateFrom(let title, let chatId): - if boxed { - buffer.appendInt32(-1336546578) - } - serializeString(title, buffer: buffer, boxed: false) - serializeInt32(chatId, buffer: buffer, boxed: false) - break - case .messageActionPinMessage: - if boxed { - buffer.appendInt32(-1799538451) - } - - break - case .messageActionHistoryClear: - if boxed { - buffer.appendInt32(-1615153660) - } - - break - case .messageActionGameScore(let gameId, let score): - if boxed { - buffer.appendInt32(-1834538890) - } - serializeInt64(gameId, buffer: buffer, boxed: false) - serializeInt32(score, buffer: buffer, boxed: false) - break - case .messageActionPaymentSentMe(let flags, let currency, let totalAmount, let payload, let info, let shippingOptionId, let charge): - if boxed { - buffer.appendInt32(-1892568281) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(currency, buffer: buffer, boxed: false) - serializeInt64(totalAmount, buffer: buffer, boxed: false) - serializeBytes(payload, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {info!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {serializeString(shippingOptionId!, buffer: buffer, boxed: false)} - charge.serialize(buffer, true) - break - case .messageActionPaymentSent(let currency, let totalAmount): - if boxed { - buffer.appendInt32(1080663248) - } - serializeString(currency, buffer: buffer, boxed: false) - serializeInt64(totalAmount, buffer: buffer, boxed: false) - break - case .messageActionPhoneCall(let flags, let callId, let reason, let duration): - if boxed { - buffer.appendInt32(-2132731265) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(callId, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {reason!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(duration!, buffer: buffer, boxed: false)} - break - case .messageActionScreenshotTaken: - if boxed { - buffer.appendInt32(1200788123) - } - - break - case .messageActionCustomAction(let message): - if boxed { - buffer.appendInt32(-85549226) - } - serializeString(message, buffer: buffer, boxed: false) - break - case .messageActionBotAllowed(let domain): - if boxed { - buffer.appendInt32(-1410748418) - } - serializeString(domain, buffer: buffer, boxed: false) - break - case .messageActionSecureValuesSentMe(let values, let credentials): - if boxed { - buffer.appendInt32(455635795) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(values.count)) - for item in values { - item.serialize(buffer, true) - } - credentials.serialize(buffer, true) - break - case .messageActionSecureValuesSent(let types): - if boxed { - buffer.appendInt32(-648257196) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(types.count)) - for item in types { - item.serialize(buffer, true) - } - break - case .messageActionContactSignUp: - if boxed { - buffer.appendInt32(-202219658) - } - - break - case .messageActionGeoProximityReached(let fromId, let toId, let distance): - if boxed { - buffer.appendInt32(-1730095465) - } - fromId.serialize(buffer, true) - toId.serialize(buffer, true) - serializeInt32(distance, buffer: buffer, boxed: false) - break - case .messageActionGroupCall(let flags, let call, let duration): - if boxed { - buffer.appendInt32(2047704898) - } - serializeInt32(flags, buffer: buffer, boxed: false) - call.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(duration!, buffer: buffer, boxed: false)} - break - case .messageActionInviteToGroupCall(let call, let users): - if boxed { - buffer.appendInt32(1991897370) - } - call.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - serializeInt32(item, buffer: buffer, boxed: false) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .messageActionEmpty: - return ("messageActionEmpty", []) - case .messageActionChatCreate(let title, let users): - return ("messageActionChatCreate", [("title", title), ("users", users)]) - case .messageActionChatEditTitle(let title): - return ("messageActionChatEditTitle", [("title", title)]) - case .messageActionChatEditPhoto(let photo): - return ("messageActionChatEditPhoto", [("photo", photo)]) - case .messageActionChatDeletePhoto: - return ("messageActionChatDeletePhoto", []) - case .messageActionChatAddUser(let users): - return ("messageActionChatAddUser", [("users", users)]) - case .messageActionChatDeleteUser(let userId): - return ("messageActionChatDeleteUser", [("userId", userId)]) - case .messageActionChatJoinedByLink(let inviterId): - return ("messageActionChatJoinedByLink", [("inviterId", inviterId)]) - case .messageActionChannelCreate(let title): - return ("messageActionChannelCreate", [("title", title)]) - case .messageActionChatMigrateTo(let channelId): - return ("messageActionChatMigrateTo", [("channelId", channelId)]) - case .messageActionChannelMigrateFrom(let title, let chatId): - return ("messageActionChannelMigrateFrom", [("title", title), ("chatId", chatId)]) - case .messageActionPinMessage: - return ("messageActionPinMessage", []) - case .messageActionHistoryClear: - return ("messageActionHistoryClear", []) - case .messageActionGameScore(let gameId, let score): - return ("messageActionGameScore", [("gameId", gameId), ("score", score)]) - case .messageActionPaymentSentMe(let flags, let currency, let totalAmount, let payload, let info, let shippingOptionId, let charge): - return ("messageActionPaymentSentMe", [("flags", flags), ("currency", currency), ("totalAmount", totalAmount), ("payload", payload), ("info", info), ("shippingOptionId", shippingOptionId), ("charge", charge)]) - case .messageActionPaymentSent(let currency, let totalAmount): - return ("messageActionPaymentSent", [("currency", currency), ("totalAmount", totalAmount)]) - case .messageActionPhoneCall(let flags, let callId, let reason, let duration): - return ("messageActionPhoneCall", [("flags", flags), ("callId", callId), ("reason", reason), ("duration", duration)]) - case .messageActionScreenshotTaken: - return ("messageActionScreenshotTaken", []) - case .messageActionCustomAction(let message): - return ("messageActionCustomAction", [("message", message)]) - case .messageActionBotAllowed(let domain): - return ("messageActionBotAllowed", [("domain", domain)]) - case .messageActionSecureValuesSentMe(let values, let credentials): - return ("messageActionSecureValuesSentMe", [("values", values), ("credentials", credentials)]) - case .messageActionSecureValuesSent(let types): - return ("messageActionSecureValuesSent", [("types", types)]) - case .messageActionContactSignUp: - return ("messageActionContactSignUp", []) - case .messageActionGeoProximityReached(let fromId, let toId, let distance): - return ("messageActionGeoProximityReached", [("fromId", fromId), ("toId", toId), ("distance", distance)]) - case .messageActionGroupCall(let flags, let call, let duration): - return ("messageActionGroupCall", [("flags", flags), ("call", call), ("duration", duration)]) - case .messageActionInviteToGroupCall(let call, let users): - return ("messageActionInviteToGroupCall", [("call", call), ("users", users)]) - } - } - - public static func parse_messageActionEmpty(_ reader: BufferReader) -> MessageAction? { - return Api.MessageAction.messageActionEmpty - } - public static func parse_messageActionChatCreate(_ reader: BufferReader) -> MessageAction? { - var _1: String? - _1 = parseString(reader) - var _2: [Int32]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageAction.messageActionChatCreate(title: _1!, users: _2!) - } - else { - return nil - } - } - public static func parse_messageActionChatEditTitle(_ reader: BufferReader) -> MessageAction? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.MessageAction.messageActionChatEditTitle(title: _1!) - } - else { - return nil - } - } - public static func parse_messageActionChatEditPhoto(_ reader: BufferReader) -> MessageAction? { - var _1: Api.Photo? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Photo - } - let _c1 = _1 != nil - if _c1 { - return Api.MessageAction.messageActionChatEditPhoto(photo: _1!) - } - else { - return nil - } - } - public static func parse_messageActionChatDeletePhoto(_ reader: BufferReader) -> MessageAction? { - return Api.MessageAction.messageActionChatDeletePhoto - } - public static func parse_messageActionChatAddUser(_ reader: BufferReader) -> MessageAction? { - var _1: [Int32]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.MessageAction.messageActionChatAddUser(users: _1!) - } - else { - return nil - } - } - public static func parse_messageActionChatDeleteUser(_ reader: BufferReader) -> MessageAction? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.MessageAction.messageActionChatDeleteUser(userId: _1!) - } - else { - return nil - } - } - public static func parse_messageActionChatJoinedByLink(_ reader: BufferReader) -> MessageAction? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.MessageAction.messageActionChatJoinedByLink(inviterId: _1!) - } - else { - return nil - } - } - public static func parse_messageActionChannelCreate(_ reader: BufferReader) -> MessageAction? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.MessageAction.messageActionChannelCreate(title: _1!) - } - else { - return nil - } - } - public static func parse_messageActionChatMigrateTo(_ reader: BufferReader) -> MessageAction? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.MessageAction.messageActionChatMigrateTo(channelId: _1!) - } - else { - return nil - } - } - public static func parse_messageActionChannelMigrateFrom(_ reader: BufferReader) -> MessageAction? { - var _1: String? - _1 = parseString(reader) - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageAction.messageActionChannelMigrateFrom(title: _1!, chatId: _2!) - } - else { - return nil - } - } - public static func parse_messageActionPinMessage(_ reader: BufferReader) -> MessageAction? { - return Api.MessageAction.messageActionPinMessage - } - public static func parse_messageActionHistoryClear(_ reader: BufferReader) -> MessageAction? { - return Api.MessageAction.messageActionHistoryClear - } - public static func parse_messageActionGameScore(_ reader: BufferReader) -> MessageAction? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageAction.messageActionGameScore(gameId: _1!, score: _2!) - } - else { - return nil - } - } - public static func parse_messageActionPaymentSentMe(_ reader: BufferReader) -> MessageAction? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: Int64? - _3 = reader.readInt64() - var _4: Buffer? - _4 = parseBytes(reader) - var _5: Api.PaymentRequestedInfo? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.PaymentRequestedInfo - } } - var _6: String? - if Int(_1!) & Int(1 << 1) != 0 {_6 = parseString(reader) } - var _7: Api.PaymentCharge? - if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.PaymentCharge - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil - let _c7 = _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.MessageAction.messageActionPaymentSentMe(flags: _1!, currency: _2!, totalAmount: _3!, payload: _4!, info: _5, shippingOptionId: _6, charge: _7!) - } - else { - return nil - } - } - public static func parse_messageActionPaymentSent(_ reader: BufferReader) -> MessageAction? { - var _1: String? - _1 = parseString(reader) - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageAction.messageActionPaymentSent(currency: _1!, totalAmount: _2!) - } - else { - return nil - } - } - public static func parse_messageActionPhoneCall(_ reader: BufferReader) -> MessageAction? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Api.PhoneCallDiscardReason? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.PhoneCallDiscardReason - } } - var _4: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.MessageAction.messageActionPhoneCall(flags: _1!, callId: _2!, reason: _3, duration: _4) - } - else { - return nil - } - } - public static func parse_messageActionScreenshotTaken(_ reader: BufferReader) -> MessageAction? { - return Api.MessageAction.messageActionScreenshotTaken - } - public static func parse_messageActionCustomAction(_ reader: BufferReader) -> MessageAction? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.MessageAction.messageActionCustomAction(message: _1!) - } - else { - return nil - } - } - public static func parse_messageActionBotAllowed(_ reader: BufferReader) -> MessageAction? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.MessageAction.messageActionBotAllowed(domain: _1!) - } - else { - return nil - } - } - public static func parse_messageActionSecureValuesSentMe(_ reader: BufferReader) -> MessageAction? { - var _1: [Api.SecureValue]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureValue.self) - } - var _2: Api.SecureCredentialsEncrypted? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.SecureCredentialsEncrypted - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageAction.messageActionSecureValuesSentMe(values: _1!, credentials: _2!) - } - else { - return nil - } - } - public static func parse_messageActionSecureValuesSent(_ reader: BufferReader) -> MessageAction? { - var _1: [Api.SecureValueType]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureValueType.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.MessageAction.messageActionSecureValuesSent(types: _1!) - } - else { - return nil - } - } - public static func parse_messageActionContactSignUp(_ reader: BufferReader) -> MessageAction? { - return Api.MessageAction.messageActionContactSignUp - } - public static func parse_messageActionGeoProximityReached(_ reader: BufferReader) -> MessageAction? { - var _1: Api.Peer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _2: Api.Peer? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.MessageAction.messageActionGeoProximityReached(fromId: _1!, toId: _2!, distance: _3!) - } - else { - return nil - } - } - public static func parse_messageActionGroupCall(_ reader: BufferReader) -> MessageAction? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.InputGroupCall? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.InputGroupCall - } - var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.MessageAction.messageActionGroupCall(flags: _1!, call: _2!, duration: _3) - } - else { - return nil - } - } - public static func parse_messageActionInviteToGroupCall(_ reader: BufferReader) -> MessageAction? { - var _1: Api.InputGroupCall? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.InputGroupCall - } - var _2: [Int32]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageAction.messageActionInviteToGroupCall(call: _1!, users: _2!) - } - else { - return nil - } - } - - } - public enum PhoneCall: TypeConstructorDescription { - case phoneCallEmpty(id: Int64) - case phoneCallWaiting(flags: Int32, id: Int64, accessHash: Int64, date: Int32, adminId: Int32, participantId: Int32, protocol: Api.PhoneCallProtocol, receiveDate: Int32?) - case phoneCallRequested(flags: Int32, id: Int64, accessHash: Int64, date: Int32, adminId: Int32, participantId: Int32, gAHash: Buffer, protocol: Api.PhoneCallProtocol) - case phoneCallAccepted(flags: Int32, id: Int64, accessHash: Int64, date: Int32, adminId: Int32, participantId: Int32, gB: Buffer, protocol: Api.PhoneCallProtocol) - case phoneCall(flags: Int32, id: Int64, accessHash: Int64, date: Int32, adminId: Int32, participantId: Int32, gAOrB: Buffer, keyFingerprint: Int64, protocol: Api.PhoneCallProtocol, connections: [Api.PhoneConnection], startDate: Int32) - case phoneCallDiscarded(flags: Int32, id: Int64, reason: Api.PhoneCallDiscardReason?, duration: Int32?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .phoneCallEmpty(let id): - if boxed { - buffer.appendInt32(1399245077) - } - serializeInt64(id, buffer: buffer, boxed: false) - break - case .phoneCallWaiting(let flags, let id, let accessHash, let date, let adminId, let participantId, let `protocol`, let receiveDate): - if boxed { - buffer.appendInt32(462375633) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - serializeInt32(adminId, buffer: buffer, boxed: false) - serializeInt32(participantId, buffer: buffer, boxed: false) - `protocol`.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(receiveDate!, buffer: buffer, boxed: false)} - break - case .phoneCallRequested(let flags, let id, let accessHash, let date, let adminId, let participantId, let gAHash, let `protocol`): - if boxed { - buffer.appendInt32(-2014659757) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - serializeInt32(adminId, buffer: buffer, boxed: false) - serializeInt32(participantId, buffer: buffer, boxed: false) - serializeBytes(gAHash, buffer: buffer, boxed: false) - `protocol`.serialize(buffer, true) - break - case .phoneCallAccepted(let flags, let id, let accessHash, let date, let adminId, let participantId, let gB, let `protocol`): - if boxed { - buffer.appendInt32(-1719909046) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - serializeInt32(adminId, buffer: buffer, boxed: false) - serializeInt32(participantId, buffer: buffer, boxed: false) - serializeBytes(gB, buffer: buffer, boxed: false) - `protocol`.serialize(buffer, true) - break - case .phoneCall(let flags, let id, let accessHash, let date, let adminId, let participantId, let gAOrB, let keyFingerprint, let `protocol`, let connections, let startDate): - if boxed { - buffer.appendInt32(-2025673089) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - serializeInt32(adminId, buffer: buffer, boxed: false) - serializeInt32(participantId, buffer: buffer, boxed: false) - serializeBytes(gAOrB, buffer: buffer, boxed: false) - serializeInt64(keyFingerprint, buffer: buffer, boxed: false) - `protocol`.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(connections.count)) - for item in connections { - item.serialize(buffer, true) - } - serializeInt32(startDate, buffer: buffer, boxed: false) - break - case .phoneCallDiscarded(let flags, let id, let reason, let duration): - if boxed { - buffer.appendInt32(1355435489) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(id, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {reason!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(duration!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .phoneCallEmpty(let id): - return ("phoneCallEmpty", [("id", id)]) - case .phoneCallWaiting(let flags, let id, let accessHash, let date, let adminId, let participantId, let `protocol`, let receiveDate): - return ("phoneCallWaiting", [("flags", flags), ("id", id), ("accessHash", accessHash), ("date", date), ("adminId", adminId), ("participantId", participantId), ("`protocol`", `protocol`), ("receiveDate", receiveDate)]) - case .phoneCallRequested(let flags, let id, let accessHash, let date, let adminId, let participantId, let gAHash, let `protocol`): - return ("phoneCallRequested", [("flags", flags), ("id", id), ("accessHash", accessHash), ("date", date), ("adminId", adminId), ("participantId", participantId), ("gAHash", gAHash), ("`protocol`", `protocol`)]) - case .phoneCallAccepted(let flags, let id, let accessHash, let date, let adminId, let participantId, let gB, let `protocol`): - return ("phoneCallAccepted", [("flags", flags), ("id", id), ("accessHash", accessHash), ("date", date), ("adminId", adminId), ("participantId", participantId), ("gB", gB), ("`protocol`", `protocol`)]) - case .phoneCall(let flags, let id, let accessHash, let date, let adminId, let participantId, let gAOrB, let keyFingerprint, let `protocol`, let connections, let startDate): - return ("phoneCall", [("flags", flags), ("id", id), ("accessHash", accessHash), ("date", date), ("adminId", adminId), ("participantId", participantId), ("gAOrB", gAOrB), ("keyFingerprint", keyFingerprint), ("`protocol`", `protocol`), ("connections", connections), ("startDate", startDate)]) - case .phoneCallDiscarded(let flags, let id, let reason, let duration): - return ("phoneCallDiscarded", [("flags", flags), ("id", id), ("reason", reason), ("duration", duration)]) - } - } - - public static func parse_phoneCallEmpty(_ reader: BufferReader) -> PhoneCall? { - var _1: Int64? - _1 = reader.readInt64() - let _c1 = _1 != nil - if _c1 { - return Api.PhoneCall.phoneCallEmpty(id: _1!) - } - else { - return nil - } - } - public static func parse_phoneCallWaiting(_ reader: BufferReader) -> PhoneCall? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Int64? - _3 = reader.readInt64() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - var _6: Int32? - _6 = reader.readInt32() - var _7: Api.PhoneCallProtocol? - if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.PhoneCallProtocol - } - var _8: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_8 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 0) == 0) || _8 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { - return Api.PhoneCall.phoneCallWaiting(flags: _1!, id: _2!, accessHash: _3!, date: _4!, adminId: _5!, participantId: _6!, protocol: _7!, receiveDate: _8) - } - else { - return nil - } - } - public static func parse_phoneCallRequested(_ reader: BufferReader) -> PhoneCall? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Int64? - _3 = reader.readInt64() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - var _6: Int32? - _6 = reader.readInt32() - var _7: Buffer? - _7 = parseBytes(reader) - var _8: Api.PhoneCallProtocol? - if let signature = reader.readInt32() { - _8 = Api.parse(reader, signature: signature) as? Api.PhoneCallProtocol - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = _8 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { - return Api.PhoneCall.phoneCallRequested(flags: _1!, id: _2!, accessHash: _3!, date: _4!, adminId: _5!, participantId: _6!, gAHash: _7!, protocol: _8!) - } - else { - return nil - } - } - public static func parse_phoneCallAccepted(_ reader: BufferReader) -> PhoneCall? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Int64? - _3 = reader.readInt64() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - var _6: Int32? - _6 = reader.readInt32() - var _7: Buffer? - _7 = parseBytes(reader) - var _8: Api.PhoneCallProtocol? - if let signature = reader.readInt32() { - _8 = Api.parse(reader, signature: signature) as? Api.PhoneCallProtocol - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = _8 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { - return Api.PhoneCall.phoneCallAccepted(flags: _1!, id: _2!, accessHash: _3!, date: _4!, adminId: _5!, participantId: _6!, gB: _7!, protocol: _8!) - } - else { - return nil - } - } - public static func parse_phoneCall(_ reader: BufferReader) -> PhoneCall? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Int64? - _3 = reader.readInt64() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - var _6: Int32? - _6 = reader.readInt32() - var _7: Buffer? - _7 = parseBytes(reader) - var _8: Int64? - _8 = reader.readInt64() - var _9: Api.PhoneCallProtocol? - if let signature = reader.readInt32() { - _9 = Api.parse(reader, signature: signature) as? Api.PhoneCallProtocol - } - var _10: [Api.PhoneConnection]? - if let _ = reader.readInt32() { - _10 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PhoneConnection.self) - } - var _11: Int32? - _11 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = _8 != nil - let _c9 = _9 != nil - let _c10 = _10 != nil - let _c11 = _11 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { - return Api.PhoneCall.phoneCall(flags: _1!, id: _2!, accessHash: _3!, date: _4!, adminId: _5!, participantId: _6!, gAOrB: _7!, keyFingerprint: _8!, protocol: _9!, connections: _10!, startDate: _11!) - } - else { - return nil - } - } - public static func parse_phoneCallDiscarded(_ reader: BufferReader) -> PhoneCall? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Api.PhoneCallDiscardReason? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.PhoneCallDiscardReason - } } - var _4: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.PhoneCall.phoneCallDiscarded(flags: _1!, id: _2!, reason: _3, duration: _4) - } - else { - return nil - } - } - - } - public enum DialogPeer: TypeConstructorDescription { - case dialogPeer(peer: Api.Peer) - case dialogPeerFolder(folderId: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .dialogPeer(let peer): - if boxed { - buffer.appendInt32(-445792507) - } - peer.serialize(buffer, true) - break - case .dialogPeerFolder(let folderId): - if boxed { - buffer.appendInt32(1363483106) - } - serializeInt32(folderId, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .dialogPeer(let peer): - return ("dialogPeer", [("peer", peer)]) - case .dialogPeerFolder(let folderId): - return ("dialogPeerFolder", [("folderId", folderId)]) - } - } - - public static func parse_dialogPeer(_ reader: BufferReader) -> DialogPeer? { - var _1: Api.Peer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Peer - } - let _c1 = _1 != nil - if _c1 { - return Api.DialogPeer.dialogPeer(peer: _1!) - } - else { - return nil - } - } - public static func parse_dialogPeerFolder(_ reader: BufferReader) -> DialogPeer? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.DialogPeer.dialogPeerFolder(folderId: _1!) - } - else { - return nil - } - } - - } - public enum WebDocument: TypeConstructorDescription { - case webDocument(url: String, accessHash: Int64, size: Int32, mimeType: String, attributes: [Api.DocumentAttribute]) - case webDocumentNoProxy(url: String, size: Int32, mimeType: String, attributes: [Api.DocumentAttribute]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .webDocument(let url, let accessHash, let size, let mimeType, let attributes): - if boxed { - buffer.appendInt32(475467473) - } - serializeString(url, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeInt32(size, buffer: buffer, boxed: false) - serializeString(mimeType, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(attributes.count)) - for item in attributes { - item.serialize(buffer, true) - } - break - case .webDocumentNoProxy(let url, let size, let mimeType, let attributes): - if boxed { - buffer.appendInt32(-104284986) - } - serializeString(url, buffer: buffer, boxed: false) - serializeInt32(size, buffer: buffer, boxed: false) - serializeString(mimeType, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(attributes.count)) - for item in attributes { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .webDocument(let url, let accessHash, let size, let mimeType, let attributes): - return ("webDocument", [("url", url), ("accessHash", accessHash), ("size", size), ("mimeType", mimeType), ("attributes", attributes)]) - case .webDocumentNoProxy(let url, let size, let mimeType, let attributes): - return ("webDocumentNoProxy", [("url", url), ("size", size), ("mimeType", mimeType), ("attributes", attributes)]) - } - } - - public static func parse_webDocument(_ reader: BufferReader) -> WebDocument? { - var _1: String? - _1 = parseString(reader) - var _2: Int64? - _2 = reader.readInt64() - var _3: Int32? - _3 = reader.readInt32() - var _4: String? - _4 = parseString(reader) - var _5: [Api.DocumentAttribute]? - if let _ = reader.readInt32() { - _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DocumentAttribute.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.WebDocument.webDocument(url: _1!, accessHash: _2!, size: _3!, mimeType: _4!, attributes: _5!) - } - else { - return nil - } - } - public static func parse_webDocumentNoProxy(_ reader: BufferReader) -> WebDocument? { - var _1: String? - _1 = parseString(reader) - var _2: Int32? - _2 = reader.readInt32() - var _3: String? - _3 = parseString(reader) - var _4: [Api.DocumentAttribute]? - if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DocumentAttribute.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.WebDocument.webDocumentNoProxy(url: _1!, size: _2!, mimeType: _3!, attributes: _4!) - } - else { - return nil - } - } - - } - public enum Theme: TypeConstructorDescription { - case theme(flags: Int32, id: Int64, accessHash: Int64, slug: String, title: String, document: Api.Document?, settings: Api.ThemeSettings?, installsCount: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .theme(let flags, let id, let accessHash, let slug, let title, let document, let settings, let installsCount): - if boxed { - buffer.appendInt32(42930452) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeString(slug, buffer: buffer, boxed: false) - serializeString(title, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {document!.serialize(buffer, true)} - if Int(flags) & Int(1 << 3) != 0 {settings!.serialize(buffer, true)} - serializeInt32(installsCount, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .theme(let flags, let id, let accessHash, let slug, let title, let document, let settings, let installsCount): - return ("theme", [("flags", flags), ("id", id), ("accessHash", accessHash), ("slug", slug), ("title", title), ("document", document), ("settings", settings), ("installsCount", installsCount)]) - } - } - - public static func parse_theme(_ reader: BufferReader) -> Theme? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Int64? - _3 = reader.readInt64() - var _4: String? - _4 = parseString(reader) - var _5: String? - _5 = parseString(reader) - var _6: Api.Document? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.Document - } } - var _7: Api.ThemeSettings? - if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.ThemeSettings - } } - var _8: Int32? - _8 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil - let _c8 = _8 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { - return Api.Theme.theme(flags: _1!, id: _2!, accessHash: _3!, slug: _4!, title: _5!, document: _6, settings: _7, installsCount: _8!) - } - else { - return nil - } - } - - } - public enum ChannelAdminLogEventsFilter: TypeConstructorDescription { - case channelAdminLogEventsFilter(flags: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .channelAdminLogEventsFilter(let flags): - if boxed { - buffer.appendInt32(-368018716) - } - serializeInt32(flags, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .channelAdminLogEventsFilter(let flags): - return ("channelAdminLogEventsFilter", [("flags", flags)]) - } - } - - public static func parse_channelAdminLogEventsFilter(_ reader: BufferReader) -> ChannelAdminLogEventsFilter? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.ChannelAdminLogEventsFilter.channelAdminLogEventsFilter(flags: _1!) - } - else { - return nil - } - } - - } - public enum ThemeSettings: TypeConstructorDescription { - case themeSettings(flags: Int32, baseTheme: Api.BaseTheme, accentColor: Int32, messageTopColor: Int32?, messageBottomColor: Int32?, wallpaper: Api.WallPaper?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .themeSettings(let flags, let baseTheme, let accentColor, let messageTopColor, let messageBottomColor, let wallpaper): - if boxed { - buffer.appendInt32(-1676371894) - } - serializeInt32(flags, buffer: buffer, boxed: false) - baseTheme.serialize(buffer, true) - serializeInt32(accentColor, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(messageTopColor!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(messageBottomColor!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {wallpaper!.serialize(buffer, true)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .themeSettings(let flags, let baseTheme, let accentColor, let messageTopColor, let messageBottomColor, let wallpaper): - return ("themeSettings", [("flags", flags), ("baseTheme", baseTheme), ("accentColor", accentColor), ("messageTopColor", messageTopColor), ("messageBottomColor", messageBottomColor), ("wallpaper", wallpaper)]) - } - } - - public static func parse_themeSettings(_ reader: BufferReader) -> ThemeSettings? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.BaseTheme? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.BaseTheme - } - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_4 = reader.readInt32() } - var _5: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_5 = reader.readInt32() } - var _6: Api.WallPaper? - if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.WallPaper - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.ThemeSettings.themeSettings(flags: _1!, baseTheme: _2!, accentColor: _3!, messageTopColor: _4, messageBottomColor: _5, wallpaper: _6) - } - else { - return nil - } - } - - } - public enum PeerNotifySettings: TypeConstructorDescription { - case peerNotifySettings(flags: Int32, showPreviews: Api.Bool?, silent: Api.Bool?, muteUntil: Int32?, sound: String?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .peerNotifySettings(let flags, let showPreviews, let silent, let muteUntil, let sound): - if boxed { - buffer.appendInt32(-1353671392) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {showPreviews!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {silent!.serialize(buffer, true)} - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(muteUntil!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeString(sound!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .peerNotifySettings(let flags, let showPreviews, let silent, let muteUntil, let sound): - return ("peerNotifySettings", [("flags", flags), ("showPreviews", showPreviews), ("silent", silent), ("muteUntil", muteUntil), ("sound", sound)]) - } - } - - public static func parse_peerNotifySettings(_ reader: BufferReader) -> PeerNotifySettings? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.Bool? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.Bool - } } - var _3: Api.Bool? - if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.Bool - } } - var _4: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_4 = reader.readInt32() } - var _5: String? - if Int(_1!) & Int(1 << 3) != 0 {_5 = parseString(reader) } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.PeerNotifySettings.peerNotifySettings(flags: _1!, showPreviews: _2, silent: _3, muteUntil: _4, sound: _5) - } - else { - return nil - } - } - - } - public enum InputBotInlineMessageID: TypeConstructorDescription { - case inputBotInlineMessageID(dcId: Int32, id: Int64, accessHash: Int64) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputBotInlineMessageID(let dcId, let id, let accessHash): - if boxed { - buffer.appendInt32(-1995686519) - } - serializeInt32(dcId, buffer: buffer, boxed: false) - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputBotInlineMessageID(let dcId, let id, let accessHash): - return ("inputBotInlineMessageID", [("dcId", dcId), ("id", id), ("accessHash", accessHash)]) - } - } - - public static func parse_inputBotInlineMessageID(_ reader: BufferReader) -> InputBotInlineMessageID? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Int64? - _3 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.InputBotInlineMessageID.inputBotInlineMessageID(dcId: _1!, id: _2!, accessHash: _3!) - } - else { - return nil - } - } - - } - public enum PageRelatedArticle: TypeConstructorDescription { - case pageRelatedArticle(flags: Int32, url: String, webpageId: Int64, title: String?, description: String?, photoId: Int64?, author: String?, publishedDate: Int32?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .pageRelatedArticle(let flags, let url, let webpageId, let title, let description, let photoId, let author, let publishedDate): - if boxed { - buffer.appendInt32(-1282352120) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(url, buffer: buffer, boxed: false) - serializeInt64(webpageId, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeString(title!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeString(description!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeInt64(photoId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeString(author!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 4) != 0 {serializeInt32(publishedDate!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .pageRelatedArticle(let flags, let url, let webpageId, let title, let description, let photoId, let author, let publishedDate): - return ("pageRelatedArticle", [("flags", flags), ("url", url), ("webpageId", webpageId), ("title", title), ("description", description), ("photoId", photoId), ("author", author), ("publishedDate", publishedDate)]) - } - } - - public static func parse_pageRelatedArticle(_ reader: BufferReader) -> PageRelatedArticle? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: Int64? - _3 = reader.readInt64() - var _4: String? - if Int(_1!) & Int(1 << 0) != 0 {_4 = parseString(reader) } - var _5: String? - if Int(_1!) & Int(1 << 1) != 0 {_5 = parseString(reader) } - var _6: Int64? - if Int(_1!) & Int(1 << 2) != 0 {_6 = reader.readInt64() } - var _7: String? - if Int(_1!) & Int(1 << 3) != 0 {_7 = parseString(reader) } - var _8: Int32? - if Int(_1!) & Int(1 << 4) != 0 {_8 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 4) == 0) || _8 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { - return Api.PageRelatedArticle.pageRelatedArticle(flags: _1!, url: _2!, webpageId: _3!, title: _4, description: _5, photoId: _6, author: _7, publishedDate: _8) - } - else { - return nil - } - } - - } - public enum StickerPack: TypeConstructorDescription { - case stickerPack(emoticon: String, documents: [Int64]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .stickerPack(let emoticon, let documents): - if boxed { - buffer.appendInt32(313694676) - } - serializeString(emoticon, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(documents.count)) - for item in documents { - serializeInt64(item, buffer: buffer, boxed: false) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .stickerPack(let emoticon, let documents): - return ("stickerPack", [("emoticon", emoticon), ("documents", documents)]) - } - } - - public static func parse_stickerPack(_ reader: BufferReader) -> StickerPack? { - var _1: String? - _1 = parseString(reader) - var _2: [Int64]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.StickerPack.stickerPack(emoticon: _1!, documents: _2!) - } - else { - return nil - } - } - - } - public enum UserProfilePhoto: TypeConstructorDescription { - case userProfilePhotoEmpty - case userProfilePhoto(flags: Int32, photoId: Int64, photoSmall: Api.FileLocation, photoBig: Api.FileLocation, dcId: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .userProfilePhotoEmpty: - if boxed { - buffer.appendInt32(1326562017) - } - - break - case .userProfilePhoto(let flags, let photoId, let photoSmall, let photoBig, let dcId): - if boxed { - buffer.appendInt32(1775479590) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(photoId, buffer: buffer, boxed: false) - photoSmall.serialize(buffer, true) - photoBig.serialize(buffer, true) - serializeInt32(dcId, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .userProfilePhotoEmpty: - return ("userProfilePhotoEmpty", []) - case .userProfilePhoto(let flags, let photoId, let photoSmall, let photoBig, let dcId): - return ("userProfilePhoto", [("flags", flags), ("photoId", photoId), ("photoSmall", photoSmall), ("photoBig", photoBig), ("dcId", dcId)]) - } - } - - public static func parse_userProfilePhotoEmpty(_ reader: BufferReader) -> UserProfilePhoto? { - return Api.UserProfilePhoto.userProfilePhotoEmpty - } - public static func parse_userProfilePhoto(_ reader: BufferReader) -> UserProfilePhoto? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Api.FileLocation? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.FileLocation - } - var _4: Api.FileLocation? - if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.FileLocation - } - var _5: Int32? - _5 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.UserProfilePhoto.userProfilePhoto(flags: _1!, photoId: _2!, photoSmall: _3!, photoBig: _4!, dcId: _5!) - } - else { - return nil - } - } - - } - public enum ChatOnlines: TypeConstructorDescription { - case chatOnlines(onlines: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .chatOnlines(let onlines): - if boxed { - buffer.appendInt32(-264117680) - } - serializeInt32(onlines, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .chatOnlines(let onlines): - return ("chatOnlines", [("onlines", onlines)]) - } - } - - public static func parse_chatOnlines(_ reader: BufferReader) -> ChatOnlines? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.ChatOnlines.chatOnlines(onlines: _1!) - } - else { - return nil - } - } - - } - public enum InputAppEvent: TypeConstructorDescription { - case inputAppEvent(time: Double, type: String, peer: Int64, data: Api.JSONValue) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputAppEvent(let time, let type, let peer, let data): - if boxed { - buffer.appendInt32(488313413) - } - serializeDouble(time, buffer: buffer, boxed: false) - serializeString(type, buffer: buffer, boxed: false) - serializeInt64(peer, buffer: buffer, boxed: false) - data.serialize(buffer, true) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputAppEvent(let time, let type, let peer, let data): - return ("inputAppEvent", [("time", time), ("type", type), ("peer", peer), ("data", data)]) - } - } - - public static func parse_inputAppEvent(_ reader: BufferReader) -> InputAppEvent? { - var _1: Double? - _1 = reader.readDouble() - var _2: String? - _2 = parseString(reader) - var _3: Int64? - _3 = reader.readInt64() - var _4: Api.JSONValue? - if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.JSONValue - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.InputAppEvent.inputAppEvent(time: _1!, type: _2!, peer: _3!, data: _4!) - } - else { - return nil - } - } - - } - public enum MessageEntity: TypeConstructorDescription { - case messageEntityUnknown(offset: Int32, length: Int32) - case messageEntityMention(offset: Int32, length: Int32) - case messageEntityHashtag(offset: Int32, length: Int32) - case messageEntityBotCommand(offset: Int32, length: Int32) - case messageEntityUrl(offset: Int32, length: Int32) - case messageEntityEmail(offset: Int32, length: Int32) - case messageEntityBold(offset: Int32, length: Int32) - case messageEntityItalic(offset: Int32, length: Int32) - case messageEntityCode(offset: Int32, length: Int32) - case messageEntityPre(offset: Int32, length: Int32, language: String) - case messageEntityTextUrl(offset: Int32, length: Int32, url: String) - case messageEntityMentionName(offset: Int32, length: Int32, userId: Int32) - case inputMessageEntityMentionName(offset: Int32, length: Int32, userId: Api.InputUser) - case messageEntityPhone(offset: Int32, length: Int32) - case messageEntityCashtag(offset: Int32, length: Int32) - case messageEntityUnderline(offset: Int32, length: Int32) - case messageEntityStrike(offset: Int32, length: Int32) - case messageEntityBlockquote(offset: Int32, length: Int32) - case messageEntityBankCard(offset: Int32, length: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .messageEntityUnknown(let offset, let length): - if boxed { - buffer.appendInt32(-1148011883) - } - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(length, buffer: buffer, boxed: false) - break - case .messageEntityMention(let offset, let length): - if boxed { - buffer.appendInt32(-100378723) - } - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(length, buffer: buffer, boxed: false) - break - case .messageEntityHashtag(let offset, let length): - if boxed { - buffer.appendInt32(1868782349) - } - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(length, buffer: buffer, boxed: false) - break - case .messageEntityBotCommand(let offset, let length): - if boxed { - buffer.appendInt32(1827637959) - } - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(length, buffer: buffer, boxed: false) - break - case .messageEntityUrl(let offset, let length): - if boxed { - buffer.appendInt32(1859134776) - } - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(length, buffer: buffer, boxed: false) - break - case .messageEntityEmail(let offset, let length): - if boxed { - buffer.appendInt32(1692693954) - } - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(length, buffer: buffer, boxed: false) - break - case .messageEntityBold(let offset, let length): - if boxed { - buffer.appendInt32(-1117713463) - } - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(length, buffer: buffer, boxed: false) - break - case .messageEntityItalic(let offset, let length): - if boxed { - buffer.appendInt32(-2106619040) - } - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(length, buffer: buffer, boxed: false) - break - case .messageEntityCode(let offset, let length): - if boxed { - buffer.appendInt32(681706865) - } - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(length, buffer: buffer, boxed: false) - break - case .messageEntityPre(let offset, let length, let language): - if boxed { - buffer.appendInt32(1938967520) - } - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(length, buffer: buffer, boxed: false) - serializeString(language, buffer: buffer, boxed: false) - break - case .messageEntityTextUrl(let offset, let length, let url): - if boxed { - buffer.appendInt32(1990644519) - } - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(length, buffer: buffer, boxed: false) - serializeString(url, buffer: buffer, boxed: false) - break - case .messageEntityMentionName(let offset, let length, let userId): - if boxed { - buffer.appendInt32(892193368) - } - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(length, buffer: buffer, boxed: false) - serializeInt32(userId, buffer: buffer, boxed: false) - break - case .inputMessageEntityMentionName(let offset, let length, let userId): - if boxed { - buffer.appendInt32(546203849) - } - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(length, buffer: buffer, boxed: false) - userId.serialize(buffer, true) - break - case .messageEntityPhone(let offset, let length): - if boxed { - buffer.appendInt32(-1687559349) - } - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(length, buffer: buffer, boxed: false) - break - case .messageEntityCashtag(let offset, let length): - if boxed { - buffer.appendInt32(1280209983) - } - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(length, buffer: buffer, boxed: false) - break - case .messageEntityUnderline(let offset, let length): - if boxed { - buffer.appendInt32(-1672577397) - } - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(length, buffer: buffer, boxed: false) - break - case .messageEntityStrike(let offset, let length): - if boxed { - buffer.appendInt32(-1090087980) - } - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(length, buffer: buffer, boxed: false) - break - case .messageEntityBlockquote(let offset, let length): - if boxed { - buffer.appendInt32(34469328) - } - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(length, buffer: buffer, boxed: false) - break - case .messageEntityBankCard(let offset, let length): - if boxed { - buffer.appendInt32(1981704948) - } - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(length, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .messageEntityUnknown(let offset, let length): - return ("messageEntityUnknown", [("offset", offset), ("length", length)]) - case .messageEntityMention(let offset, let length): - return ("messageEntityMention", [("offset", offset), ("length", length)]) - case .messageEntityHashtag(let offset, let length): - return ("messageEntityHashtag", [("offset", offset), ("length", length)]) - case .messageEntityBotCommand(let offset, let length): - return ("messageEntityBotCommand", [("offset", offset), ("length", length)]) - case .messageEntityUrl(let offset, let length): - return ("messageEntityUrl", [("offset", offset), ("length", length)]) - case .messageEntityEmail(let offset, let length): - return ("messageEntityEmail", [("offset", offset), ("length", length)]) - case .messageEntityBold(let offset, let length): - return ("messageEntityBold", [("offset", offset), ("length", length)]) - case .messageEntityItalic(let offset, let length): - return ("messageEntityItalic", [("offset", offset), ("length", length)]) - case .messageEntityCode(let offset, let length): - return ("messageEntityCode", [("offset", offset), ("length", length)]) - case .messageEntityPre(let offset, let length, let language): - return ("messageEntityPre", [("offset", offset), ("length", length), ("language", language)]) - case .messageEntityTextUrl(let offset, let length, let url): - return ("messageEntityTextUrl", [("offset", offset), ("length", length), ("url", url)]) - case .messageEntityMentionName(let offset, let length, let userId): - return ("messageEntityMentionName", [("offset", offset), ("length", length), ("userId", userId)]) - case .inputMessageEntityMentionName(let offset, let length, let userId): - return ("inputMessageEntityMentionName", [("offset", offset), ("length", length), ("userId", userId)]) - case .messageEntityPhone(let offset, let length): - return ("messageEntityPhone", [("offset", offset), ("length", length)]) - case .messageEntityCashtag(let offset, let length): - return ("messageEntityCashtag", [("offset", offset), ("length", length)]) - case .messageEntityUnderline(let offset, let length): - return ("messageEntityUnderline", [("offset", offset), ("length", length)]) - case .messageEntityStrike(let offset, let length): - return ("messageEntityStrike", [("offset", offset), ("length", length)]) - case .messageEntityBlockquote(let offset, let length): - return ("messageEntityBlockquote", [("offset", offset), ("length", length)]) - case .messageEntityBankCard(let offset, let length): - return ("messageEntityBankCard", [("offset", offset), ("length", length)]) - } - } - - public static func parse_messageEntityUnknown(_ reader: BufferReader) -> MessageEntity? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageEntity.messageEntityUnknown(offset: _1!, length: _2!) - } - else { - return nil - } - } - public static func parse_messageEntityMention(_ reader: BufferReader) -> MessageEntity? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageEntity.messageEntityMention(offset: _1!, length: _2!) - } - else { - return nil - } - } - public static func parse_messageEntityHashtag(_ reader: BufferReader) -> MessageEntity? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageEntity.messageEntityHashtag(offset: _1!, length: _2!) - } - else { - return nil - } - } - public static func parse_messageEntityBotCommand(_ reader: BufferReader) -> MessageEntity? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageEntity.messageEntityBotCommand(offset: _1!, length: _2!) - } - else { - return nil - } - } - public static func parse_messageEntityUrl(_ reader: BufferReader) -> MessageEntity? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageEntity.messageEntityUrl(offset: _1!, length: _2!) - } - else { - return nil - } - } - public static func parse_messageEntityEmail(_ reader: BufferReader) -> MessageEntity? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageEntity.messageEntityEmail(offset: _1!, length: _2!) - } - else { - return nil - } - } - public static func parse_messageEntityBold(_ reader: BufferReader) -> MessageEntity? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageEntity.messageEntityBold(offset: _1!, length: _2!) - } - else { - return nil - } - } - public static func parse_messageEntityItalic(_ reader: BufferReader) -> MessageEntity? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageEntity.messageEntityItalic(offset: _1!, length: _2!) - } - else { - return nil - } - } - public static func parse_messageEntityCode(_ reader: BufferReader) -> MessageEntity? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageEntity.messageEntityCode(offset: _1!, length: _2!) - } - else { - return nil - } - } - public static func parse_messageEntityPre(_ reader: BufferReader) -> MessageEntity? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: String? - _3 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.MessageEntity.messageEntityPre(offset: _1!, length: _2!, language: _3!) - } - else { - return nil - } - } - public static func parse_messageEntityTextUrl(_ reader: BufferReader) -> MessageEntity? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: String? - _3 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.MessageEntity.messageEntityTextUrl(offset: _1!, length: _2!, url: _3!) - } - else { - return nil - } - } - public static func parse_messageEntityMentionName(_ reader: BufferReader) -> MessageEntity? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.MessageEntity.messageEntityMentionName(offset: _1!, length: _2!, userId: _3!) - } - else { - return nil - } - } - public static func parse_inputMessageEntityMentionName(_ reader: BufferReader) -> MessageEntity? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Api.InputUser? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.InputUser - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.MessageEntity.inputMessageEntityMentionName(offset: _1!, length: _2!, userId: _3!) - } - else { - return nil - } - } - public static func parse_messageEntityPhone(_ reader: BufferReader) -> MessageEntity? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageEntity.messageEntityPhone(offset: _1!, length: _2!) - } - else { - return nil - } - } - public static func parse_messageEntityCashtag(_ reader: BufferReader) -> MessageEntity? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageEntity.messageEntityCashtag(offset: _1!, length: _2!) - } - else { - return nil - } - } - public static func parse_messageEntityUnderline(_ reader: BufferReader) -> MessageEntity? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageEntity.messageEntityUnderline(offset: _1!, length: _2!) - } - else { - return nil - } - } - public static func parse_messageEntityStrike(_ reader: BufferReader) -> MessageEntity? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageEntity.messageEntityStrike(offset: _1!, length: _2!) - } - else { - return nil - } - } - public static func parse_messageEntityBlockquote(_ reader: BufferReader) -> MessageEntity? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageEntity.messageEntityBlockquote(offset: _1!, length: _2!) - } - else { - return nil - } - } - public static func parse_messageEntityBankCard(_ reader: BufferReader) -> MessageEntity? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.MessageEntity.messageEntityBankCard(offset: _1!, length: _2!) - } - else { - return nil - } - } - - } - public enum InputPhoto: TypeConstructorDescription { - case inputPhotoEmpty - case inputPhoto(id: Int64, accessHash: Int64, fileReference: Buffer) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inputPhotoEmpty: - if boxed { - buffer.appendInt32(483901197) - } - - break - case .inputPhoto(let id, let accessHash, let fileReference): - if boxed { - buffer.appendInt32(1001634122) - } - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeBytes(fileReference, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inputPhotoEmpty: - return ("inputPhotoEmpty", []) - case .inputPhoto(let id, let accessHash, let fileReference): - return ("inputPhoto", [("id", id), ("accessHash", accessHash), ("fileReference", fileReference)]) - } - } - - public static func parse_inputPhotoEmpty(_ reader: BufferReader) -> InputPhoto? { - return Api.InputPhoto.inputPhotoEmpty - } - public static func parse_inputPhoto(_ reader: BufferReader) -> InputPhoto? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int64? - _2 = reader.readInt64() - var _3: Buffer? - _3 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.InputPhoto.inputPhoto(id: _1!, accessHash: _2!, fileReference: _3!) - } - else { - return nil - } - } - - } - public enum PageListOrderedItem: TypeConstructorDescription { - case pageListOrderedItemText(num: String, text: Api.RichText) - case pageListOrderedItemBlocks(num: String, blocks: [Api.PageBlock]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .pageListOrderedItemText(let num, let text): - if boxed { - buffer.appendInt32(1577484359) - } - serializeString(num, buffer: buffer, boxed: false) - text.serialize(buffer, true) - break - case .pageListOrderedItemBlocks(let num, let blocks): - if boxed { - buffer.appendInt32(-1730311882) - } - serializeString(num, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(blocks.count)) - for item in blocks { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .pageListOrderedItemText(let num, let text): - return ("pageListOrderedItemText", [("num", num), ("text", text)]) - case .pageListOrderedItemBlocks(let num, let blocks): - return ("pageListOrderedItemBlocks", [("num", num), ("blocks", blocks)]) - } - } - - public static func parse_pageListOrderedItemText(_ reader: BufferReader) -> PageListOrderedItem? { - var _1: String? - _1 = parseString(reader) - var _2: Api.RichText? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.RichText - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.PageListOrderedItem.pageListOrderedItemText(num: _1!, text: _2!) - } - else { - return nil - } - } - public static func parse_pageListOrderedItemBlocks(_ reader: BufferReader) -> PageListOrderedItem? { - var _1: String? - _1 = parseString(reader) - var _2: [Api.PageBlock]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageBlock.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.PageListOrderedItem.pageListOrderedItemBlocks(num: _1!, blocks: _2!) - } - else { - return nil - } - } - - } - public enum EncryptedChat: TypeConstructorDescription { - case encryptedChatEmpty(id: Int32) - case encryptedChatWaiting(id: Int32, accessHash: Int64, date: Int32, adminId: Int32, participantId: Int32) - case encryptedChatRequested(flags: Int32, folderId: Int32?, id: Int32, accessHash: Int64, date: Int32, adminId: Int32, participantId: Int32, gA: Buffer) - case encryptedChat(id: Int32, accessHash: Int64, date: Int32, adminId: Int32, participantId: Int32, gAOrB: Buffer, keyFingerprint: Int64) - case encryptedChatDiscarded(flags: Int32, id: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .encryptedChatEmpty(let id): - if boxed { - buffer.appendInt32(-1417756512) - } - serializeInt32(id, buffer: buffer, boxed: false) - break - case .encryptedChatWaiting(let id, let accessHash, let date, let adminId, let participantId): - if boxed { - buffer.appendInt32(1006044124) - } - serializeInt32(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - serializeInt32(adminId, buffer: buffer, boxed: false) - serializeInt32(participantId, buffer: buffer, boxed: false) - break - case .encryptedChatRequested(let flags, let folderId, let id, let accessHash, let date, let adminId, let participantId, let gA): - if boxed { - buffer.appendInt32(1651608194) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} - serializeInt32(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - serializeInt32(adminId, buffer: buffer, boxed: false) - serializeInt32(participantId, buffer: buffer, boxed: false) - serializeBytes(gA, buffer: buffer, boxed: false) - break - case .encryptedChat(let id, let accessHash, let date, let adminId, let participantId, let gAOrB, let keyFingerprint): - if boxed { - buffer.appendInt32(-94974410) - } - serializeInt32(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - serializeInt32(adminId, buffer: buffer, boxed: false) - serializeInt32(participantId, buffer: buffer, boxed: false) - serializeBytes(gAOrB, buffer: buffer, boxed: false) - serializeInt64(keyFingerprint, buffer: buffer, boxed: false) - break - case .encryptedChatDiscarded(let flags, let id): - if boxed { - buffer.appendInt32(505183301) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .encryptedChatEmpty(let id): - return ("encryptedChatEmpty", [("id", id)]) - case .encryptedChatWaiting(let id, let accessHash, let date, let adminId, let participantId): - return ("encryptedChatWaiting", [("id", id), ("accessHash", accessHash), ("date", date), ("adminId", adminId), ("participantId", participantId)]) - case .encryptedChatRequested(let flags, let folderId, let id, let accessHash, let date, let adminId, let participantId, let gA): - return ("encryptedChatRequested", [("flags", flags), ("folderId", folderId), ("id", id), ("accessHash", accessHash), ("date", date), ("adminId", adminId), ("participantId", participantId), ("gA", gA)]) - case .encryptedChat(let id, let accessHash, let date, let adminId, let participantId, let gAOrB, let keyFingerprint): - return ("encryptedChat", [("id", id), ("accessHash", accessHash), ("date", date), ("adminId", adminId), ("participantId", participantId), ("gAOrB", gAOrB), ("keyFingerprint", keyFingerprint)]) - case .encryptedChatDiscarded(let flags, let id): - return ("encryptedChatDiscarded", [("flags", flags), ("id", id)]) - } - } - - public static func parse_encryptedChatEmpty(_ reader: BufferReader) -> EncryptedChat? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.EncryptedChat.encryptedChatEmpty(id: _1!) - } - else { - return nil - } - } - public static func parse_encryptedChatWaiting(_ reader: BufferReader) -> EncryptedChat? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.EncryptedChat.encryptedChatWaiting(id: _1!, accessHash: _2!, date: _3!, adminId: _4!, participantId: _5!) - } - else { - return nil - } - } - public static func parse_encryptedChatRequested(_ reader: BufferReader) -> EncryptedChat? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } - var _3: Int32? - _3 = reader.readInt32() - var _4: Int64? - _4 = reader.readInt64() - var _5: Int32? - _5 = reader.readInt32() - var _6: Int32? - _6 = reader.readInt32() - var _7: Int32? - _7 = reader.readInt32() - var _8: Buffer? - _8 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = _8 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { - return Api.EncryptedChat.encryptedChatRequested(flags: _1!, folderId: _2, id: _3!, accessHash: _4!, date: _5!, adminId: _6!, participantId: _7!, gA: _8!) - } - else { - return nil - } - } - public static func parse_encryptedChat(_ reader: BufferReader) -> EncryptedChat? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - var _6: Buffer? - _6 = parseBytes(reader) - var _7: Int64? - _7 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.EncryptedChat.encryptedChat(id: _1!, accessHash: _2!, date: _3!, adminId: _4!, participantId: _5!, gAOrB: _6!, keyFingerprint: _7!) - } - else { - return nil - } - } - public static func parse_encryptedChatDiscarded(_ reader: BufferReader) -> EncryptedChat? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.EncryptedChat.encryptedChatDiscarded(flags: _1!, id: _2!) - } - else { - return nil - } - } - - } - public enum PeerLocated: TypeConstructorDescription { - case peerLocated(peer: Api.Peer, expires: Int32, distance: Int32) - case peerSelfLocated(expires: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .peerLocated(let peer, let expires, let distance): - if boxed { - buffer.appendInt32(-901375139) - } - peer.serialize(buffer, true) - serializeInt32(expires, buffer: buffer, boxed: false) - serializeInt32(distance, buffer: buffer, boxed: false) - break - case .peerSelfLocated(let expires): - if boxed { - buffer.appendInt32(-118740917) - } - serializeInt32(expires, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .peerLocated(let peer, let expires, let distance): - return ("peerLocated", [("peer", peer), ("expires", expires), ("distance", distance)]) - case .peerSelfLocated(let expires): - return ("peerSelfLocated", [("expires", expires)]) - } - } - - public static func parse_peerLocated(_ reader: BufferReader) -> PeerLocated? { - var _1: Api.Peer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.PeerLocated.peerLocated(peer: _1!, expires: _2!, distance: _3!) - } - else { - return nil - } - } - public static func parse_peerSelfLocated(_ reader: BufferReader) -> PeerLocated? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.PeerLocated.peerSelfLocated(expires: _1!) - } - else { - return nil - } - } - - } - public enum Document: TypeConstructorDescription { - case documentEmpty(id: Int64) - case document(flags: Int32, id: Int64, accessHash: Int64, fileReference: Buffer, date: Int32, mimeType: String, size: Int32, thumbs: [Api.PhotoSize]?, videoThumbs: [Api.VideoSize]?, dcId: Int32, attributes: [Api.DocumentAttribute]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .documentEmpty(let id): - if boxed { - buffer.appendInt32(922273905) - } - serializeInt64(id, buffer: buffer, boxed: false) - break - case .document(let flags, let id, let accessHash, let fileReference, let date, let mimeType, let size, let thumbs, let videoThumbs, let dcId, let attributes): - if boxed { - buffer.appendInt32(512177195) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(id, buffer: buffer, boxed: false) - serializeInt64(accessHash, buffer: buffer, boxed: false) - serializeBytes(fileReference, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - serializeString(mimeType, buffer: buffer, boxed: false) - serializeInt32(size, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(thumbs!.count)) - for item in thumbs! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(videoThumbs!.count)) - for item in videoThumbs! { - item.serialize(buffer, true) - }} - serializeInt32(dcId, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(attributes.count)) - for item in attributes { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .documentEmpty(let id): - return ("documentEmpty", [("id", id)]) - case .document(let flags, let id, let accessHash, let fileReference, let date, let mimeType, let size, let thumbs, let videoThumbs, let dcId, let attributes): - return ("document", [("flags", flags), ("id", id), ("accessHash", accessHash), ("fileReference", fileReference), ("date", date), ("mimeType", mimeType), ("size", size), ("thumbs", thumbs), ("videoThumbs", videoThumbs), ("dcId", dcId), ("attributes", attributes)]) - } - } - - public static func parse_documentEmpty(_ reader: BufferReader) -> Document? { - var _1: Int64? - _1 = reader.readInt64() - let _c1 = _1 != nil - if _c1 { - return Api.Document.documentEmpty(id: _1!) - } - else { - return nil - } - } - public static func parse_document(_ reader: BufferReader) -> Document? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - var _3: Int64? - _3 = reader.readInt64() - var _4: Buffer? - _4 = parseBytes(reader) - var _5: Int32? - _5 = reader.readInt32() - var _6: String? - _6 = parseString(reader) - var _7: Int32? - _7 = reader.readInt32() - var _8: [Api.PhotoSize]? - if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { - _8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PhotoSize.self) - } } - var _9: [Api.VideoSize]? - if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { - _9 = Api.parseVector(reader, elementSignature: 0, elementType: Api.VideoSize.self) - } } - var _10: Int32? - _10 = reader.readInt32() - var _11: [Api.DocumentAttribute]? - if let _ = reader.readInt32() { - _11 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DocumentAttribute.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 0) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 1) == 0) || _9 != nil - let _c10 = _10 != nil - let _c11 = _11 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { - return Api.Document.document(flags: _1!, id: _2!, accessHash: _3!, fileReference: _4!, date: _5!, mimeType: _6!, size: _7!, thumbs: _8, videoThumbs: _9, dcId: _10!, attributes: _11!) - } - else { - return nil - } - } - - } - public enum WebAuthorization: TypeConstructorDescription { - case webAuthorization(hash: Int64, botId: Int32, domain: String, browser: String, platform: String, dateCreated: Int32, dateActive: Int32, ip: String, region: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .webAuthorization(let hash, let botId, let domain, let browser, let platform, let dateCreated, let dateActive, let ip, let region): - if boxed { - buffer.appendInt32(-892779534) - } - serializeInt64(hash, buffer: buffer, boxed: false) - serializeInt32(botId, buffer: buffer, boxed: false) - serializeString(domain, buffer: buffer, boxed: false) - serializeString(browser, buffer: buffer, boxed: false) - serializeString(platform, buffer: buffer, boxed: false) - serializeInt32(dateCreated, buffer: buffer, boxed: false) - serializeInt32(dateActive, buffer: buffer, boxed: false) - serializeString(ip, buffer: buffer, boxed: false) - serializeString(region, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .webAuthorization(let hash, let botId, let domain, let browser, let platform, let dateCreated, let dateActive, let ip, let region): - return ("webAuthorization", [("hash", hash), ("botId", botId), ("domain", domain), ("browser", browser), ("platform", platform), ("dateCreated", dateCreated), ("dateActive", dateActive), ("ip", ip), ("region", region)]) - } - } - - public static func parse_webAuthorization(_ reader: BufferReader) -> WebAuthorization? { - var _1: Int64? - _1 = reader.readInt64() - var _2: Int32? - _2 = reader.readInt32() - var _3: String? - _3 = parseString(reader) - var _4: String? - _4 = parseString(reader) - var _5: String? - _5 = parseString(reader) - var _6: Int32? - _6 = reader.readInt32() - var _7: Int32? - _7 = reader.readInt32() - var _8: String? - _8 = parseString(reader) - var _9: String? - _9 = parseString(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - let _c8 = _8 != nil - let _c9 = _9 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { - return Api.WebAuthorization.webAuthorization(hash: _1!, botId: _2!, domain: _3!, browser: _4!, platform: _5!, dateCreated: _6!, dateActive: _7!, ip: _8!, region: _9!) - } - else { - return nil - } - } - - } - public enum ImportedContact: TypeConstructorDescription { - case importedContact(userId: Int32, clientId: Int64) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .importedContact(let userId, let clientId): - if boxed { - buffer.appendInt32(-805141448) - } - serializeInt32(userId, buffer: buffer, boxed: false) - serializeInt64(clientId, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .importedContact(let userId, let clientId): - return ("importedContact", [("userId", userId), ("clientId", clientId)]) - } - } - - public static func parse_importedContact(_ reader: BufferReader) -> ImportedContact? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int64? - _2 = reader.readInt64() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.ImportedContact.importedContact(userId: _1!, clientId: _2!) - } - else { - return nil - } - } - - } -} diff --git a/submodules/TelegramApi/Sources/Api2.swift b/submodules/TelegramApi/Sources/Api2.swift index 7f9aceb2f5..c96f1350be 100644 --- a/submodules/TelegramApi/Sources/Api2.swift +++ b/submodules/TelegramApi/Sources/Api2.swift @@ -1,195 +1,419 @@ public extension Api { -public struct channels { - public enum ChannelParticipants: TypeConstructorDescription { - case channelParticipants(count: Int32, participants: [Api.ChannelParticipant], users: [Api.User]) - case channelParticipantsNotModified + public enum GroupCall: TypeConstructorDescription { + case groupCallDiscarded(id: Int64, accessHash: Int64, duration: Int32) + case groupCall(flags: Int32, id: Int64, accessHash: Int64, participantsCount: Int32, params: Api.DataJSON?, version: Int32) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .channelParticipants(let count, let participants, let users): + case .groupCallDiscarded(let id, let accessHash, let duration): if boxed { - buffer.appendInt32(-177282392) - } - serializeInt32(count, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(participants.count)) - for item in participants { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) + buffer.appendInt32(2004925620) } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeInt32(duration, buffer: buffer, boxed: false) break - case .channelParticipantsNotModified: + case .groupCall(let flags, let id, let accessHash, let participantsCount, let params, let version): if boxed { - buffer.appendInt32(-266911767) + buffer.appendInt32(1435512961) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeInt32(participantsCount, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {params!.serialize(buffer, true)} + serializeInt32(version, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .groupCallDiscarded(let id, let accessHash, let duration): + return ("groupCallDiscarded", [("id", id), ("accessHash", accessHash), ("duration", duration)]) + case .groupCall(let flags, let id, let accessHash, let participantsCount, let params, let version): + return ("groupCall", [("flags", flags), ("id", id), ("accessHash", accessHash), ("participantsCount", participantsCount), ("params", params), ("version", version)]) + } + } + + public static func parse_groupCallDiscarded(_ reader: BufferReader) -> GroupCall? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int64? + _2 = reader.readInt64() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.GroupCall.groupCallDiscarded(id: _1!, accessHash: _2!, duration: _3!) + } + else { + return nil + } + } + public static func parse_groupCall(_ reader: BufferReader) -> GroupCall? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Int64? + _3 = reader.readInt64() + var _4: Int32? + _4 = reader.readInt32() + var _5: Api.DataJSON? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.DataJSON + } } + var _6: Int32? + _6 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c6 = _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.GroupCall.groupCall(flags: _1!, id: _2!, accessHash: _3!, participantsCount: _4!, params: _5, version: _6!) + } + else { + return nil + } + } + + } + public enum InputGeoPoint: TypeConstructorDescription { + case inputGeoPointEmpty + case inputGeoPoint(flags: Int32, lat: Double, long: Double, accuracyRadius: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputGeoPointEmpty: + if boxed { + buffer.appendInt32(-457104426) } break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .channelParticipants(let count, let participants, let users): - return ("channelParticipants", [("count", count), ("participants", participants), ("users", users)]) - case .channelParticipantsNotModified: - return ("channelParticipantsNotModified", []) - } - } - - public static func parse_channelParticipants(_ reader: BufferReader) -> ChannelParticipants? { - var _1: Int32? - _1 = reader.readInt32() - var _2: [Api.ChannelParticipant]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ChannelParticipant.self) - } - var _3: [Api.User]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.channels.ChannelParticipants.channelParticipants(count: _1!, participants: _2!, users: _3!) - } - else { - return nil - } - } - public static func parse_channelParticipantsNotModified(_ reader: BufferReader) -> ChannelParticipants? { - return Api.channels.ChannelParticipants.channelParticipantsNotModified - } - - } - public enum ChannelParticipant: TypeConstructorDescription { - case channelParticipant(participant: Api.ChannelParticipant, users: [Api.User]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .channelParticipant(let participant, let users): + case .inputGeoPoint(let flags, let lat, let long, let accuracyRadius): if boxed { - buffer.appendInt32(-791039645) - } - participant.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .channelParticipant(let participant, let users): - return ("channelParticipant", [("participant", participant), ("users", users)]) - } - } - - public static func parse_channelParticipant(_ reader: BufferReader) -> ChannelParticipant? { - var _1: Api.ChannelParticipant? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.ChannelParticipant - } - var _2: [Api.User]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.channels.ChannelParticipant.channelParticipant(participant: _1!, users: _2!) - } - else { - return nil - } - } - - } - public enum AdminLogResults: TypeConstructorDescription { - case adminLogResults(events: [Api.ChannelAdminLogEvent], chats: [Api.Chat], users: [Api.User]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .adminLogResults(let events, let chats, let users): - if boxed { - buffer.appendInt32(-309659827) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(events.count)) - for item in events { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(chats.count)) - for item in chats { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .adminLogResults(let events, let chats, let users): - return ("adminLogResults", [("events", events), ("chats", chats), ("users", users)]) - } - } - - public static func parse_adminLogResults(_ reader: BufferReader) -> AdminLogResults? { - var _1: [Api.ChannelAdminLogEvent]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ChannelAdminLogEvent.self) - } - var _2: [Api.Chat]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) - } - var _3: [Api.User]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.channels.AdminLogResults.adminLogResults(events: _1!, chats: _2!, users: _3!) - } - else { - return nil - } - } - - } -} -} -public extension Api { -public struct payments { - public enum ValidatedRequestedInfo: TypeConstructorDescription { - case validatedRequestedInfo(flags: Int32, id: String?, shippingOptions: [Api.ShippingOption]?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .validatedRequestedInfo(let flags, let id, let shippingOptions): - if boxed { - buffer.appendInt32(-784000893) + buffer.appendInt32(1210199983) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeDouble(lat, buffer: buffer, boxed: false) + serializeDouble(long, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(accuracyRadius!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputGeoPointEmpty: + return ("inputGeoPointEmpty", []) + case .inputGeoPoint(let flags, let lat, let long, let accuracyRadius): + return ("inputGeoPoint", [("flags", flags), ("lat", lat), ("long", long), ("accuracyRadius", accuracyRadius)]) + } + } + + public static func parse_inputGeoPointEmpty(_ reader: BufferReader) -> InputGeoPoint? { + return Api.InputGeoPoint.inputGeoPointEmpty + } + public static func parse_inputGeoPoint(_ reader: BufferReader) -> InputGeoPoint? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Double? + _2 = reader.readDouble() + var _3: Double? + _3 = reader.readDouble() + var _4: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_4 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputGeoPoint.inputGeoPoint(flags: _1!, lat: _2!, long: _3!, accuracyRadius: _4) + } + else { + return nil + } + } + + } + public enum ChatFull: TypeConstructorDescription { + case channelFull(flags: Int32, id: Int32, about: String, participantsCount: Int32?, adminsCount: Int32?, kickedCount: Int32?, bannedCount: Int32?, onlineCount: Int32?, readInboxMaxId: Int32, readOutboxMaxId: Int32, unreadCount: Int32, chatPhoto: Api.Photo, notifySettings: Api.PeerNotifySettings, exportedInvite: Api.ExportedChatInvite?, botInfo: [Api.BotInfo], migratedFromChatId: Int32?, migratedFromMaxId: Int32?, pinnedMsgId: Int32?, stickerset: Api.StickerSet?, availableMinId: Int32?, folderId: Int32?, linkedChatId: Int32?, location: Api.ChannelLocation?, slowmodeSeconds: Int32?, slowmodeNextSendDate: Int32?, statsDc: Int32?, pts: Int32, call: Api.InputGroupCall?, ttl: Api.PeerHistoryTTL?) + case chatFull(flags: Int32, id: Int32, about: String, participants: Api.ChatParticipants, chatPhoto: Api.Photo?, notifySettings: Api.PeerNotifySettings, exportedInvite: Api.ExportedChatInvite?, botInfo: [Api.BotInfo]?, pinnedMsgId: Int32?, folderId: Int32?, call: Api.InputGroupCall?, ttl: Api.PeerHistoryTTL?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .channelFull(let flags, let id, let about, let participantsCount, let adminsCount, let kickedCount, let bannedCount, let onlineCount, let readInboxMaxId, let readOutboxMaxId, let unreadCount, let chatPhoto, let notifySettings, let exportedInvite, let botInfo, let migratedFromChatId, let migratedFromMaxId, let pinnedMsgId, let stickerset, let availableMinId, let folderId, let linkedChatId, let location, let slowmodeSeconds, let slowmodeNextSendDate, let statsDc, let pts, let call, let ttl): + if boxed { + buffer.appendInt32(-66811386) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + serializeString(about, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(participantsCount!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(adminsCount!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(kickedCount!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(bannedCount!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 13) != 0 {serializeInt32(onlineCount!, buffer: buffer, boxed: false)} + serializeInt32(readInboxMaxId, buffer: buffer, boxed: false) + serializeInt32(readOutboxMaxId, buffer: buffer, boxed: false) + serializeInt32(unreadCount, buffer: buffer, boxed: false) + chatPhoto.serialize(buffer, true) + notifySettings.serialize(buffer, true) + if Int(flags) & Int(1 << 23) != 0 {exportedInvite!.serialize(buffer, true)} + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(botInfo.count)) + for item in botInfo { + item.serialize(buffer, true) + } + if Int(flags) & Int(1 << 4) != 0 {serializeInt32(migratedFromChatId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 4) != 0 {serializeInt32(migratedFromMaxId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 5) != 0 {serializeInt32(pinnedMsgId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 8) != 0 {stickerset!.serialize(buffer, true)} + if Int(flags) & Int(1 << 9) != 0 {serializeInt32(availableMinId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 11) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 14) != 0 {serializeInt32(linkedChatId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 15) != 0 {location!.serialize(buffer, true)} + if Int(flags) & Int(1 << 17) != 0 {serializeInt32(slowmodeSeconds!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 18) != 0 {serializeInt32(slowmodeNextSendDate!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 12) != 0 {serializeInt32(statsDc!, buffer: buffer, boxed: false)} + serializeInt32(pts, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 21) != 0 {call!.serialize(buffer, true)} + if Int(flags) & Int(1 << 24) != 0 {ttl!.serialize(buffer, true)} + break + case .chatFull(let flags, let id, let about, let participants, let chatPhoto, let notifySettings, let exportedInvite, let botInfo, let pinnedMsgId, let folderId, let call, let ttl): + if boxed { + buffer.appendInt32(-500874592) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + serializeString(about, buffer: buffer, boxed: false) + participants.serialize(buffer, true) + if Int(flags) & Int(1 << 2) != 0 {chatPhoto!.serialize(buffer, true)} + notifySettings.serialize(buffer, true) + if Int(flags) & Int(1 << 13) != 0 {exportedInvite!.serialize(buffer, true)} + if Int(flags) & Int(1 << 3) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(botInfo!.count)) + for item in botInfo! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 6) != 0 {serializeInt32(pinnedMsgId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 11) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 12) != 0 {call!.serialize(buffer, true)} + if Int(flags) & Int(1 << 14) != 0 {ttl!.serialize(buffer, true)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .channelFull(let flags, let id, let about, let participantsCount, let adminsCount, let kickedCount, let bannedCount, let onlineCount, let readInboxMaxId, let readOutboxMaxId, let unreadCount, let chatPhoto, let notifySettings, let exportedInvite, let botInfo, let migratedFromChatId, let migratedFromMaxId, let pinnedMsgId, let stickerset, let availableMinId, let folderId, let linkedChatId, let location, let slowmodeSeconds, let slowmodeNextSendDate, let statsDc, let pts, let call, let ttl): + return ("channelFull", [("flags", flags), ("id", id), ("about", about), ("participantsCount", participantsCount), ("adminsCount", adminsCount), ("kickedCount", kickedCount), ("bannedCount", bannedCount), ("onlineCount", onlineCount), ("readInboxMaxId", readInboxMaxId), ("readOutboxMaxId", readOutboxMaxId), ("unreadCount", unreadCount), ("chatPhoto", chatPhoto), ("notifySettings", notifySettings), ("exportedInvite", exportedInvite), ("botInfo", botInfo), ("migratedFromChatId", migratedFromChatId), ("migratedFromMaxId", migratedFromMaxId), ("pinnedMsgId", pinnedMsgId), ("stickerset", stickerset), ("availableMinId", availableMinId), ("folderId", folderId), ("linkedChatId", linkedChatId), ("location", location), ("slowmodeSeconds", slowmodeSeconds), ("slowmodeNextSendDate", slowmodeNextSendDate), ("statsDc", statsDc), ("pts", pts), ("call", call), ("ttl", ttl)]) + case .chatFull(let flags, let id, let about, let participants, let chatPhoto, let notifySettings, let exportedInvite, let botInfo, let pinnedMsgId, let folderId, let call, let ttl): + return ("chatFull", [("flags", flags), ("id", id), ("about", about), ("participants", participants), ("chatPhoto", chatPhoto), ("notifySettings", notifySettings), ("exportedInvite", exportedInvite), ("botInfo", botInfo), ("pinnedMsgId", pinnedMsgId), ("folderId", folderId), ("call", call), ("ttl", ttl)]) + } + } + + public static func parse_channelFull(_ reader: BufferReader) -> ChatFull? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: String? + _3 = parseString(reader) + var _4: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_4 = reader.readInt32() } + var _5: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_5 = reader.readInt32() } + var _6: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_6 = reader.readInt32() } + var _7: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_7 = reader.readInt32() } + var _8: Int32? + if Int(_1!) & Int(1 << 13) != 0 {_8 = reader.readInt32() } + var _9: Int32? + _9 = reader.readInt32() + var _10: Int32? + _10 = reader.readInt32() + var _11: Int32? + _11 = reader.readInt32() + var _12: Api.Photo? + if let signature = reader.readInt32() { + _12 = Api.parse(reader, signature: signature) as? Api.Photo + } + var _13: Api.PeerNotifySettings? + if let signature = reader.readInt32() { + _13 = Api.parse(reader, signature: signature) as? Api.PeerNotifySettings + } + var _14: Api.ExportedChatInvite? + if Int(_1!) & Int(1 << 23) != 0 {if let signature = reader.readInt32() { + _14 = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite + } } + var _15: [Api.BotInfo]? + if let _ = reader.readInt32() { + _15 = Api.parseVector(reader, elementSignature: 0, elementType: Api.BotInfo.self) + } + var _16: Int32? + if Int(_1!) & Int(1 << 4) != 0 {_16 = reader.readInt32() } + var _17: Int32? + if Int(_1!) & Int(1 << 4) != 0 {_17 = reader.readInt32() } + var _18: Int32? + if Int(_1!) & Int(1 << 5) != 0 {_18 = reader.readInt32() } + var _19: Api.StickerSet? + if Int(_1!) & Int(1 << 8) != 0 {if let signature = reader.readInt32() { + _19 = Api.parse(reader, signature: signature) as? Api.StickerSet + } } + var _20: Int32? + if Int(_1!) & Int(1 << 9) != 0 {_20 = reader.readInt32() } + var _21: Int32? + if Int(_1!) & Int(1 << 11) != 0 {_21 = reader.readInt32() } + var _22: Int32? + if Int(_1!) & Int(1 << 14) != 0 {_22 = reader.readInt32() } + var _23: Api.ChannelLocation? + if Int(_1!) & Int(1 << 15) != 0 {if let signature = reader.readInt32() { + _23 = Api.parse(reader, signature: signature) as? Api.ChannelLocation + } } + var _24: Int32? + if Int(_1!) & Int(1 << 17) != 0 {_24 = reader.readInt32() } + var _25: Int32? + if Int(_1!) & Int(1 << 18) != 0 {_25 = reader.readInt32() } + var _26: Int32? + if Int(_1!) & Int(1 << 12) != 0 {_26 = reader.readInt32() } + var _27: Int32? + _27 = reader.readInt32() + var _28: Api.InputGroupCall? + if Int(_1!) & Int(1 << 21) != 0 {if let signature = reader.readInt32() { + _28 = Api.parse(reader, signature: signature) as? Api.InputGroupCall + } } + var _29: Api.PeerHistoryTTL? + if Int(_1!) & Int(1 << 24) != 0 {if let signature = reader.readInt32() { + _29 = Api.parse(reader, signature: signature) as? Api.PeerHistoryTTL + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 2) == 0) || _7 != nil + let _c8 = (Int(_1!) & Int(1 << 13) == 0) || _8 != nil + let _c9 = _9 != nil + let _c10 = _10 != nil + let _c11 = _11 != nil + let _c12 = _12 != nil + let _c13 = _13 != nil + let _c14 = (Int(_1!) & Int(1 << 23) == 0) || _14 != nil + let _c15 = _15 != nil + let _c16 = (Int(_1!) & Int(1 << 4) == 0) || _16 != nil + let _c17 = (Int(_1!) & Int(1 << 4) == 0) || _17 != nil + let _c18 = (Int(_1!) & Int(1 << 5) == 0) || _18 != nil + let _c19 = (Int(_1!) & Int(1 << 8) == 0) || _19 != nil + let _c20 = (Int(_1!) & Int(1 << 9) == 0) || _20 != nil + let _c21 = (Int(_1!) & Int(1 << 11) == 0) || _21 != nil + let _c22 = (Int(_1!) & Int(1 << 14) == 0) || _22 != nil + let _c23 = (Int(_1!) & Int(1 << 15) == 0) || _23 != nil + let _c24 = (Int(_1!) & Int(1 << 17) == 0) || _24 != nil + let _c25 = (Int(_1!) & Int(1 << 18) == 0) || _25 != nil + let _c26 = (Int(_1!) & Int(1 << 12) == 0) || _26 != nil + let _c27 = _27 != nil + let _c28 = (Int(_1!) & Int(1 << 21) == 0) || _28 != nil + let _c29 = (Int(_1!) & Int(1 << 24) == 0) || _29 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 && _c20 && _c21 && _c22 && _c23 && _c24 && _c25 && _c26 && _c27 && _c28 && _c29 { + return Api.ChatFull.channelFull(flags: _1!, id: _2!, about: _3!, participantsCount: _4, adminsCount: _5, kickedCount: _6, bannedCount: _7, onlineCount: _8, readInboxMaxId: _9!, readOutboxMaxId: _10!, unreadCount: _11!, chatPhoto: _12!, notifySettings: _13!, exportedInvite: _14, botInfo: _15!, migratedFromChatId: _16, migratedFromMaxId: _17, pinnedMsgId: _18, stickerset: _19, availableMinId: _20, folderId: _21, linkedChatId: _22, location: _23, slowmodeSeconds: _24, slowmodeNextSendDate: _25, statsDc: _26, pts: _27!, call: _28, ttl: _29) + } + else { + return nil + } + } + public static func parse_chatFull(_ reader: BufferReader) -> ChatFull? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: String? + _3 = parseString(reader) + var _4: Api.ChatParticipants? + if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.ChatParticipants + } + var _5: Api.Photo? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.Photo + } } + var _6: Api.PeerNotifySettings? + if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.PeerNotifySettings + } + var _7: Api.ExportedChatInvite? + if Int(_1!) & Int(1 << 13) != 0 {if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite + } } + var _8: [Api.BotInfo]? + if Int(_1!) & Int(1 << 3) != 0 {if let _ = reader.readInt32() { + _8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.BotInfo.self) + } } + var _9: Int32? + if Int(_1!) & Int(1 << 6) != 0 {_9 = reader.readInt32() } + var _10: Int32? + if Int(_1!) & Int(1 << 11) != 0 {_10 = reader.readInt32() } + var _11: Api.InputGroupCall? + if Int(_1!) & Int(1 << 12) != 0 {if let signature = reader.readInt32() { + _11 = Api.parse(reader, signature: signature) as? Api.InputGroupCall + } } + var _12: Api.PeerHistoryTTL? + if Int(_1!) & Int(1 << 14) != 0 {if let signature = reader.readInt32() { + _12 = Api.parse(reader, signature: signature) as? Api.PeerHistoryTTL + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c6 = _6 != nil + let _c7 = (Int(_1!) & Int(1 << 13) == 0) || _7 != nil + let _c8 = (Int(_1!) & Int(1 << 3) == 0) || _8 != nil + let _c9 = (Int(_1!) & Int(1 << 6) == 0) || _9 != nil + let _c10 = (Int(_1!) & Int(1 << 11) == 0) || _10 != nil + let _c11 = (Int(_1!) & Int(1 << 12) == 0) || _11 != nil + let _c12 = (Int(_1!) & Int(1 << 14) == 0) || _12 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 { + return Api.ChatFull.chatFull(flags: _1!, id: _2!, about: _3!, participants: _4!, chatPhoto: _5, notifySettings: _6!, exportedInvite: _7, botInfo: _8, pinnedMsgId: _9, folderId: _10, call: _11, ttl: _12) + } + else { + return nil + } + } + + } + public enum PollResults: TypeConstructorDescription { + case pollResults(flags: Int32, results: [Api.PollAnswerVoters]?, totalVoters: Int32?, recentVoters: [Int32]?, solution: String?, solutionEntities: [Api.MessageEntity]?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .pollResults(let flags, let results, let totalVoters, let recentVoters, let solution, let solutionEntities): + if boxed { + buffer.appendInt32(-1159937629) } serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeString(id!, buffer: buffer, boxed: false)} if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(shippingOptions!.count)) - for item in shippingOptions! { + buffer.appendInt32(Int32(results!.count)) + for item in results! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(totalVoters!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(recentVoters!.count)) + for item in recentVoters! { + serializeInt32(item, buffer: buffer, boxed: false) + }} + if Int(flags) & Int(1 << 4) != 0 {serializeString(solution!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 4) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(solutionEntities!.count)) + for item in solutionEntities! { item.serialize(buffer, true) }} break @@ -198,165 +422,38 @@ public struct payments { public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .validatedRequestedInfo(let flags, let id, let shippingOptions): - return ("validatedRequestedInfo", [("flags", flags), ("id", id), ("shippingOptions", shippingOptions)]) + case .pollResults(let flags, let results, let totalVoters, let recentVoters, let solution, let solutionEntities): + return ("pollResults", [("flags", flags), ("results", results), ("totalVoters", totalVoters), ("recentVoters", recentVoters), ("solution", solution), ("solutionEntities", solutionEntities)]) } } - public static func parse_validatedRequestedInfo(_ reader: BufferReader) -> ValidatedRequestedInfo? { + public static func parse_pollResults(_ reader: BufferReader) -> PollResults? { var _1: Int32? _1 = reader.readInt32() - var _2: String? - if Int(_1!) & Int(1 << 0) != 0 {_2 = parseString(reader) } - var _3: [Api.ShippingOption]? + var _2: [Api.PollAnswerVoters]? if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ShippingOption.self) + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PollAnswerVoters.self) + } } + var _3: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_3 = reader.readInt32() } + var _4: [Int32]? + if Int(_1!) & Int(1 << 3) != 0 {if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) } } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.payments.ValidatedRequestedInfo.validatedRequestedInfo(flags: _1!, id: _2, shippingOptions: _3) - } - else { - return nil - } - } - - } - public enum PaymentResult: TypeConstructorDescription { - case paymentResult(updates: Api.Updates) - case paymentVerificationNeeded(url: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .paymentResult(let updates): - if boxed { - buffer.appendInt32(1314881805) - } - updates.serialize(buffer, true) - break - case .paymentVerificationNeeded(let url): - if boxed { - buffer.appendInt32(-666824391) - } - serializeString(url, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .paymentResult(let updates): - return ("paymentResult", [("updates", updates)]) - case .paymentVerificationNeeded(let url): - return ("paymentVerificationNeeded", [("url", url)]) - } - } - - public static func parse_paymentResult(_ reader: BufferReader) -> PaymentResult? { - var _1: Api.Updates? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Updates - } - let _c1 = _1 != nil - if _c1 { - return Api.payments.PaymentResult.paymentResult(updates: _1!) - } - else { - return nil - } - } - public static func parse_paymentVerificationNeeded(_ reader: BufferReader) -> PaymentResult? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.payments.PaymentResult.paymentVerificationNeeded(url: _1!) - } - else { - return nil - } - } - - } - public enum PaymentForm: TypeConstructorDescription { - case paymentForm(flags: Int32, botId: Int32, invoice: Api.Invoice, providerId: Int32, url: String, nativeProvider: String?, nativeParams: Api.DataJSON?, savedInfo: Api.PaymentRequestedInfo?, savedCredentials: Api.PaymentSavedCredentials?, users: [Api.User]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .paymentForm(let flags, let botId, let invoice, let providerId, let url, let nativeProvider, let nativeParams, let savedInfo, let savedCredentials, let users): - if boxed { - buffer.appendInt32(1062645411) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(botId, buffer: buffer, boxed: false) - invoice.serialize(buffer, true) - serializeInt32(providerId, buffer: buffer, boxed: false) - serializeString(url, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 4) != 0 {serializeString(nativeProvider!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 4) != 0 {nativeParams!.serialize(buffer, true)} - if Int(flags) & Int(1 << 0) != 0 {savedInfo!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {savedCredentials!.serialize(buffer, true)} - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .paymentForm(let flags, let botId, let invoice, let providerId, let url, let nativeProvider, let nativeParams, let savedInfo, let savedCredentials, let users): - return ("paymentForm", [("flags", flags), ("botId", botId), ("invoice", invoice), ("providerId", providerId), ("url", url), ("nativeProvider", nativeProvider), ("nativeParams", nativeParams), ("savedInfo", savedInfo), ("savedCredentials", savedCredentials), ("users", users)]) - } - } - - public static func parse_paymentForm(_ reader: BufferReader) -> PaymentForm? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Api.Invoice? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.Invoice - } - var _4: Int32? - _4 = reader.readInt32() var _5: String? - _5 = parseString(reader) - var _6: String? - if Int(_1!) & Int(1 << 4) != 0 {_6 = parseString(reader) } - var _7: Api.DataJSON? - if Int(_1!) & Int(1 << 4) != 0 {if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.DataJSON + if Int(_1!) & Int(1 << 4) != 0 {_5 = parseString(reader) } + var _6: [Api.MessageEntity]? + if Int(_1!) & Int(1 << 4) != 0 {if let _ = reader.readInt32() { + _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } } - var _8: Api.PaymentRequestedInfo? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _8 = Api.parse(reader, signature: signature) as? Api.PaymentRequestedInfo - } } - var _9: Api.PaymentSavedCredentials? - if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { - _9 = Api.parse(reader, signature: signature) as? Api.PaymentSavedCredentials - } } - var _10: [Api.User]? - if let _ = reader.readInt32() { - _10 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil + let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 4) == 0) || _5 != nil let _c6 = (Int(_1!) & Int(1 << 4) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 0) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 1) == 0) || _9 != nil - let _c10 = _10 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 { - return Api.payments.PaymentForm.paymentForm(flags: _1!, botId: _2!, invoice: _3!, providerId: _4!, url: _5!, nativeProvider: _6, nativeParams: _7, savedInfo: _8, savedCredentials: _9, users: _10!) + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.PollResults.pollResults(flags: _1!, results: _2, totalVoters: _3, recentVoters: _4, solution: _5, solutionEntities: _6) } else { return nil @@ -364,279 +461,807 @@ public struct payments { } } - public enum PaymentReceipt: TypeConstructorDescription { - case paymentReceipt(flags: Int32, date: Int32, botId: Int32, invoice: Api.Invoice, providerId: Int32, info: Api.PaymentRequestedInfo?, shipping: Api.ShippingOption?, currency: String, totalAmount: Int64, credentialsTitle: String, users: [Api.User]) + public enum ChatParticipant: TypeConstructorDescription { + case chatParticipant(userId: Int32, inviterId: Int32, date: Int32) + case chatParticipantCreator(userId: Int32) + case chatParticipantAdmin(userId: Int32, inviterId: Int32, date: Int32) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .paymentReceipt(let flags, let date, let botId, let invoice, let providerId, let info, let shipping, let currency, let totalAmount, let credentialsTitle, let users): + case .chatParticipant(let userId, let inviterId, let date): if boxed { - buffer.appendInt32(1342771681) + buffer.appendInt32(-925415106) } - serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + serializeInt32(inviterId, buffer: buffer, boxed: false) serializeInt32(date, buffer: buffer, boxed: false) - serializeInt32(botId, buffer: buffer, boxed: false) - invoice.serialize(buffer, true) - serializeInt32(providerId, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {info!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {shipping!.serialize(buffer, true)} - serializeString(currency, buffer: buffer, boxed: false) - serializeInt64(totalAmount, buffer: buffer, boxed: false) - serializeString(credentialsTitle, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) + break + case .chatParticipantCreator(let userId): + if boxed { + buffer.appendInt32(-636267638) } + serializeInt32(userId, buffer: buffer, boxed: false) + break + case .chatParticipantAdmin(let userId, let inviterId, let date): + if boxed { + buffer.appendInt32(-489233354) + } + serializeInt32(userId, buffer: buffer, boxed: false) + serializeInt32(inviterId, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) break } } public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .paymentReceipt(let flags, let date, let botId, let invoice, let providerId, let info, let shipping, let currency, let totalAmount, let credentialsTitle, let users): - return ("paymentReceipt", [("flags", flags), ("date", date), ("botId", botId), ("invoice", invoice), ("providerId", providerId), ("info", info), ("shipping", shipping), ("currency", currency), ("totalAmount", totalAmount), ("credentialsTitle", credentialsTitle), ("users", users)]) + case .chatParticipant(let userId, let inviterId, let date): + return ("chatParticipant", [("userId", userId), ("inviterId", inviterId), ("date", date)]) + case .chatParticipantCreator(let userId): + return ("chatParticipantCreator", [("userId", userId)]) + case .chatParticipantAdmin(let userId, let inviterId, let date): + return ("chatParticipantAdmin", [("userId", userId), ("inviterId", inviterId), ("date", date)]) } } - public static func parse_paymentReceipt(_ reader: BufferReader) -> PaymentReceipt? { + public static func parse_chatParticipant(_ reader: BufferReader) -> ChatParticipant? { var _1: Int32? _1 = reader.readInt32() var _2: Int32? _2 = reader.readInt32() var _3: Int32? _3 = reader.readInt32() - var _4: Api.Invoice? - if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.Invoice + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.ChatParticipant.chatParticipant(userId: _1!, inviterId: _2!, date: _3!) } - var _5: Int32? - _5 = reader.readInt32() - var _6: Api.PaymentRequestedInfo? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.PaymentRequestedInfo - } } - var _7: Api.ShippingOption? - if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.ShippingOption - } } - var _8: String? - _8 = parseString(reader) - var _9: Int64? - _9 = reader.readInt64() - var _10: String? - _10 = parseString(reader) - var _11: [Api.User]? + else { + return nil + } + } + public static func parse_chatParticipantCreator(_ reader: BufferReader) -> ChatParticipant? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.ChatParticipant.chatParticipantCreator(userId: _1!) + } + else { + return nil + } + } + public static func parse_chatParticipantAdmin(_ reader: BufferReader) -> ChatParticipant? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.ChatParticipant.chatParticipantAdmin(userId: _1!, inviterId: _2!, date: _3!) + } + else { + return nil + } + } + + } + public enum CdnConfig: TypeConstructorDescription { + case cdnConfig(publicKeys: [Api.CdnPublicKey]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .cdnConfig(let publicKeys): + if boxed { + buffer.appendInt32(1462101002) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(publicKeys.count)) + for item in publicKeys { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .cdnConfig(let publicKeys): + return ("cdnConfig", [("publicKeys", publicKeys)]) + } + } + + public static func parse_cdnConfig(_ reader: BufferReader) -> CdnConfig? { + var _1: [Api.CdnPublicKey]? if let _ = reader.readInt32() { - _11 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.CdnPublicKey.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.CdnConfig.cdnConfig(publicKeys: _1!) + } + else { + return nil + } + } + + } + indirect public enum PageBlock: TypeConstructorDescription { + case pageBlockUnsupported + case pageBlockTitle(text: Api.RichText) + case pageBlockSubtitle(text: Api.RichText) + case pageBlockAuthorDate(author: Api.RichText, publishedDate: Int32) + case pageBlockHeader(text: Api.RichText) + case pageBlockSubheader(text: Api.RichText) + case pageBlockParagraph(text: Api.RichText) + case pageBlockPreformatted(text: Api.RichText, language: String) + case pageBlockFooter(text: Api.RichText) + case pageBlockDivider + case pageBlockAnchor(name: String) + case pageBlockBlockquote(text: Api.RichText, caption: Api.RichText) + case pageBlockPullquote(text: Api.RichText, caption: Api.RichText) + case pageBlockCover(cover: Api.PageBlock) + case pageBlockChannel(channel: Api.Chat) + case pageBlockKicker(text: Api.RichText) + case pageBlockTable(flags: Int32, title: Api.RichText, rows: [Api.PageTableRow]) + case pageBlockPhoto(flags: Int32, photoId: Int64, caption: Api.PageCaption, url: String?, webpageId: Int64?) + case pageBlockVideo(flags: Int32, videoId: Int64, caption: Api.PageCaption) + case pageBlockAudio(audioId: Int64, caption: Api.PageCaption) + case pageBlockEmbed(flags: Int32, url: String?, html: String?, posterPhotoId: Int64?, w: Int32?, h: Int32?, caption: Api.PageCaption) + case pageBlockEmbedPost(url: String, webpageId: Int64, authorPhotoId: Int64, author: String, date: Int32, blocks: [Api.PageBlock], caption: Api.PageCaption) + case pageBlockCollage(items: [Api.PageBlock], caption: Api.PageCaption) + case pageBlockSlideshow(items: [Api.PageBlock], caption: Api.PageCaption) + case pageBlockList(items: [Api.PageListItem]) + case pageBlockOrderedList(items: [Api.PageListOrderedItem]) + case pageBlockDetails(flags: Int32, blocks: [Api.PageBlock], title: Api.RichText) + case pageBlockRelatedArticles(title: Api.RichText, articles: [Api.PageRelatedArticle]) + case pageBlockMap(geo: Api.GeoPoint, zoom: Int32, w: Int32, h: Int32, caption: Api.PageCaption) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .pageBlockUnsupported: + if boxed { + buffer.appendInt32(324435594) + } + + break + case .pageBlockTitle(let text): + if boxed { + buffer.appendInt32(1890305021) + } + text.serialize(buffer, true) + break + case .pageBlockSubtitle(let text): + if boxed { + buffer.appendInt32(-1879401953) + } + text.serialize(buffer, true) + break + case .pageBlockAuthorDate(let author, let publishedDate): + if boxed { + buffer.appendInt32(-1162877472) + } + author.serialize(buffer, true) + serializeInt32(publishedDate, buffer: buffer, boxed: false) + break + case .pageBlockHeader(let text): + if boxed { + buffer.appendInt32(-1076861716) + } + text.serialize(buffer, true) + break + case .pageBlockSubheader(let text): + if boxed { + buffer.appendInt32(-248793375) + } + text.serialize(buffer, true) + break + case .pageBlockParagraph(let text): + if boxed { + buffer.appendInt32(1182402406) + } + text.serialize(buffer, true) + break + case .pageBlockPreformatted(let text, let language): + if boxed { + buffer.appendInt32(-1066346178) + } + text.serialize(buffer, true) + serializeString(language, buffer: buffer, boxed: false) + break + case .pageBlockFooter(let text): + if boxed { + buffer.appendInt32(1216809369) + } + text.serialize(buffer, true) + break + case .pageBlockDivider: + if boxed { + buffer.appendInt32(-618614392) + } + + break + case .pageBlockAnchor(let name): + if boxed { + buffer.appendInt32(-837994576) + } + serializeString(name, buffer: buffer, boxed: false) + break + case .pageBlockBlockquote(let text, let caption): + if boxed { + buffer.appendInt32(641563686) + } + text.serialize(buffer, true) + caption.serialize(buffer, true) + break + case .pageBlockPullquote(let text, let caption): + if boxed { + buffer.appendInt32(1329878739) + } + text.serialize(buffer, true) + caption.serialize(buffer, true) + break + case .pageBlockCover(let cover): + if boxed { + buffer.appendInt32(972174080) + } + cover.serialize(buffer, true) + break + case .pageBlockChannel(let channel): + if boxed { + buffer.appendInt32(-283684427) + } + channel.serialize(buffer, true) + break + case .pageBlockKicker(let text): + if boxed { + buffer.appendInt32(504660880) + } + text.serialize(buffer, true) + break + case .pageBlockTable(let flags, let title, let rows): + if boxed { + buffer.appendInt32(-1085412734) + } + serializeInt32(flags, buffer: buffer, boxed: false) + title.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(rows.count)) + for item in rows { + item.serialize(buffer, true) + } + break + case .pageBlockPhoto(let flags, let photoId, let caption, let url, let webpageId): + if boxed { + buffer.appendInt32(391759200) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(photoId, buffer: buffer, boxed: false) + caption.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeString(url!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 0) != 0 {serializeInt64(webpageId!, buffer: buffer, boxed: false)} + break + case .pageBlockVideo(let flags, let videoId, let caption): + if boxed { + buffer.appendInt32(2089805750) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(videoId, buffer: buffer, boxed: false) + caption.serialize(buffer, true) + break + case .pageBlockAudio(let audioId, let caption): + if boxed { + buffer.appendInt32(-2143067670) + } + serializeInt64(audioId, buffer: buffer, boxed: false) + caption.serialize(buffer, true) + break + case .pageBlockEmbed(let flags, let url, let html, let posterPhotoId, let w, let h, let caption): + if boxed { + buffer.appendInt32(-1468953147) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeString(url!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeString(html!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 4) != 0 {serializeInt64(posterPhotoId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 5) != 0 {serializeInt32(w!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 5) != 0 {serializeInt32(h!, buffer: buffer, boxed: false)} + caption.serialize(buffer, true) + break + case .pageBlockEmbedPost(let url, let webpageId, let authorPhotoId, let author, let date, let blocks, let caption): + if boxed { + buffer.appendInt32(-229005301) + } + serializeString(url, buffer: buffer, boxed: false) + serializeInt64(webpageId, buffer: buffer, boxed: false) + serializeInt64(authorPhotoId, buffer: buffer, boxed: false) + serializeString(author, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(blocks.count)) + for item in blocks { + item.serialize(buffer, true) + } + caption.serialize(buffer, true) + break + case .pageBlockCollage(let items, let caption): + if boxed { + buffer.appendInt32(1705048653) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(items.count)) + for item in items { + item.serialize(buffer, true) + } + caption.serialize(buffer, true) + break + case .pageBlockSlideshow(let items, let caption): + if boxed { + buffer.appendInt32(52401552) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(items.count)) + for item in items { + item.serialize(buffer, true) + } + caption.serialize(buffer, true) + break + case .pageBlockList(let items): + if boxed { + buffer.appendInt32(-454524911) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(items.count)) + for item in items { + item.serialize(buffer, true) + } + break + case .pageBlockOrderedList(let items): + if boxed { + buffer.appendInt32(-1702174239) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(items.count)) + for item in items { + item.serialize(buffer, true) + } + break + case .pageBlockDetails(let flags, let blocks, let title): + if boxed { + buffer.appendInt32(1987480557) + } + serializeInt32(flags, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(blocks.count)) + for item in blocks { + item.serialize(buffer, true) + } + title.serialize(buffer, true) + break + case .pageBlockRelatedArticles(let title, let articles): + if boxed { + buffer.appendInt32(370236054) + } + title.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(articles.count)) + for item in articles { + item.serialize(buffer, true) + } + break + case .pageBlockMap(let geo, let zoom, let w, let h, let caption): + if boxed { + buffer.appendInt32(-1538310410) + } + geo.serialize(buffer, true) + serializeInt32(zoom, buffer: buffer, boxed: false) + serializeInt32(w, buffer: buffer, boxed: false) + serializeInt32(h, buffer: buffer, boxed: false) + caption.serialize(buffer, true) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .pageBlockUnsupported: + return ("pageBlockUnsupported", []) + case .pageBlockTitle(let text): + return ("pageBlockTitle", [("text", text)]) + case .pageBlockSubtitle(let text): + return ("pageBlockSubtitle", [("text", text)]) + case .pageBlockAuthorDate(let author, let publishedDate): + return ("pageBlockAuthorDate", [("author", author), ("publishedDate", publishedDate)]) + case .pageBlockHeader(let text): + return ("pageBlockHeader", [("text", text)]) + case .pageBlockSubheader(let text): + return ("pageBlockSubheader", [("text", text)]) + case .pageBlockParagraph(let text): + return ("pageBlockParagraph", [("text", text)]) + case .pageBlockPreformatted(let text, let language): + return ("pageBlockPreformatted", [("text", text), ("language", language)]) + case .pageBlockFooter(let text): + return ("pageBlockFooter", [("text", text)]) + case .pageBlockDivider: + return ("pageBlockDivider", []) + case .pageBlockAnchor(let name): + return ("pageBlockAnchor", [("name", name)]) + case .pageBlockBlockquote(let text, let caption): + return ("pageBlockBlockquote", [("text", text), ("caption", caption)]) + case .pageBlockPullquote(let text, let caption): + return ("pageBlockPullquote", [("text", text), ("caption", caption)]) + case .pageBlockCover(let cover): + return ("pageBlockCover", [("cover", cover)]) + case .pageBlockChannel(let channel): + return ("pageBlockChannel", [("channel", channel)]) + case .pageBlockKicker(let text): + return ("pageBlockKicker", [("text", text)]) + case .pageBlockTable(let flags, let title, let rows): + return ("pageBlockTable", [("flags", flags), ("title", title), ("rows", rows)]) + case .pageBlockPhoto(let flags, let photoId, let caption, let url, let webpageId): + return ("pageBlockPhoto", [("flags", flags), ("photoId", photoId), ("caption", caption), ("url", url), ("webpageId", webpageId)]) + case .pageBlockVideo(let flags, let videoId, let caption): + return ("pageBlockVideo", [("flags", flags), ("videoId", videoId), ("caption", caption)]) + case .pageBlockAudio(let audioId, let caption): + return ("pageBlockAudio", [("audioId", audioId), ("caption", caption)]) + case .pageBlockEmbed(let flags, let url, let html, let posterPhotoId, let w, let h, let caption): + return ("pageBlockEmbed", [("flags", flags), ("url", url), ("html", html), ("posterPhotoId", posterPhotoId), ("w", w), ("h", h), ("caption", caption)]) + case .pageBlockEmbedPost(let url, let webpageId, let authorPhotoId, let author, let date, let blocks, let caption): + return ("pageBlockEmbedPost", [("url", url), ("webpageId", webpageId), ("authorPhotoId", authorPhotoId), ("author", author), ("date", date), ("blocks", blocks), ("caption", caption)]) + case .pageBlockCollage(let items, let caption): + return ("pageBlockCollage", [("items", items), ("caption", caption)]) + case .pageBlockSlideshow(let items, let caption): + return ("pageBlockSlideshow", [("items", items), ("caption", caption)]) + case .pageBlockList(let items): + return ("pageBlockList", [("items", items)]) + case .pageBlockOrderedList(let items): + return ("pageBlockOrderedList", [("items", items)]) + case .pageBlockDetails(let flags, let blocks, let title): + return ("pageBlockDetails", [("flags", flags), ("blocks", blocks), ("title", title)]) + case .pageBlockRelatedArticles(let title, let articles): + return ("pageBlockRelatedArticles", [("title", title), ("articles", articles)]) + case .pageBlockMap(let geo, let zoom, let w, let h, let caption): + return ("pageBlockMap", [("geo", geo), ("zoom", zoom), ("w", w), ("h", h), ("caption", caption)]) + } + } + + public static func parse_pageBlockUnsupported(_ reader: BufferReader) -> PageBlock? { + return Api.PageBlock.pageBlockUnsupported + } + public static func parse_pageBlockTitle(_ reader: BufferReader) -> PageBlock? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + if _c1 { + return Api.PageBlock.pageBlockTitle(text: _1!) + } + else { + return nil + } + } + public static func parse_pageBlockSubtitle(_ reader: BufferReader) -> PageBlock? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + if _c1 { + return Api.PageBlock.pageBlockSubtitle(text: _1!) + } + else { + return nil + } + } + public static func parse_pageBlockAuthorDate(_ reader: BufferReader) -> PageBlock? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.PageBlock.pageBlockAuthorDate(author: _1!, publishedDate: _2!) + } + else { + return nil + } + } + public static func parse_pageBlockHeader(_ reader: BufferReader) -> PageBlock? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + if _c1 { + return Api.PageBlock.pageBlockHeader(text: _1!) + } + else { + return nil + } + } + public static func parse_pageBlockSubheader(_ reader: BufferReader) -> PageBlock? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + if _c1 { + return Api.PageBlock.pageBlockSubheader(text: _1!) + } + else { + return nil + } + } + public static func parse_pageBlockParagraph(_ reader: BufferReader) -> PageBlock? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + if _c1 { + return Api.PageBlock.pageBlockParagraph(text: _1!) + } + else { + return nil + } + } + public static func parse_pageBlockPreformatted(_ reader: BufferReader) -> PageBlock? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.PageBlock.pageBlockPreformatted(text: _1!, language: _2!) + } + else { + return nil + } + } + public static func parse_pageBlockFooter(_ reader: BufferReader) -> PageBlock? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + if _c1 { + return Api.PageBlock.pageBlockFooter(text: _1!) + } + else { + return nil + } + } + public static func parse_pageBlockDivider(_ reader: BufferReader) -> PageBlock? { + return Api.PageBlock.pageBlockDivider + } + public static func parse_pageBlockAnchor(_ reader: BufferReader) -> PageBlock? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.PageBlock.pageBlockAnchor(name: _1!) + } + else { + return nil + } + } + public static func parse_pageBlockBlockquote(_ reader: BufferReader) -> PageBlock? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + var _2: Api.RichText? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.PageBlock.pageBlockBlockquote(text: _1!, caption: _2!) + } + else { + return nil + } + } + public static func parse_pageBlockPullquote(_ reader: BufferReader) -> PageBlock? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + var _2: Api.RichText? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.PageBlock.pageBlockPullquote(text: _1!, caption: _2!) + } + else { + return nil + } + } + public static func parse_pageBlockCover(_ reader: BufferReader) -> PageBlock? { + var _1: Api.PageBlock? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.PageBlock + } + let _c1 = _1 != nil + if _c1 { + return Api.PageBlock.pageBlockCover(cover: _1!) + } + else { + return nil + } + } + public static func parse_pageBlockChannel(_ reader: BufferReader) -> PageBlock? { + var _1: Api.Chat? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Chat + } + let _c1 = _1 != nil + if _c1 { + return Api.PageBlock.pageBlockChannel(channel: _1!) + } + else { + return nil + } + } + public static func parse_pageBlockKicker(_ reader: BufferReader) -> PageBlock? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + if _c1 { + return Api.PageBlock.pageBlockKicker(text: _1!) + } + else { + return nil + } + } + public static func parse_pageBlockTable(_ reader: BufferReader) -> PageBlock? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.RichText? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.RichText + } + var _3: [Api.PageTableRow]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageTableRow.self) } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil - let _c8 = _8 != nil - let _c9 = _9 != nil - let _c10 = _10 != nil - let _c11 = _11 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { - return Api.payments.PaymentReceipt.paymentReceipt(flags: _1!, date: _2!, botId: _3!, invoice: _4!, providerId: _5!, info: _6, shipping: _7, currency: _8!, totalAmount: _9!, credentialsTitle: _10!, users: _11!) + if _c1 && _c2 && _c3 { + return Api.PageBlock.pageBlockTable(flags: _1!, title: _2!, rows: _3!) } else { return nil } } - - } - public enum SavedInfo: TypeConstructorDescription { - case savedInfo(flags: Int32, savedInfo: Api.PaymentRequestedInfo?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .savedInfo(let flags, let savedInfo): - if boxed { - buffer.appendInt32(-74456004) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {savedInfo!.serialize(buffer, true)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .savedInfo(let flags, let savedInfo): - return ("savedInfo", [("flags", flags), ("savedInfo", savedInfo)]) - } - } - - public static func parse_savedInfo(_ reader: BufferReader) -> SavedInfo? { + public static func parse_pageBlockPhoto(_ reader: BufferReader) -> PageBlock? { var _1: Int32? _1 = reader.readInt32() - var _2: Api.PaymentRequestedInfo? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.PaymentRequestedInfo - } } + var _2: Int64? + _2 = reader.readInt64() + var _3: Api.PageCaption? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.PageCaption + } + var _4: String? + if Int(_1!) & Int(1 << 0) != 0 {_4 = parseString(reader) } + var _5: Int64? + if Int(_1!) & Int(1 << 0) != 0 {_5 = reader.readInt64() } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - if _c1 && _c2 { - return Api.payments.SavedInfo.savedInfo(flags: _1!, savedInfo: _2) + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.PageBlock.pageBlockPhoto(flags: _1!, photoId: _2!, caption: _3!, url: _4, webpageId: _5) } else { return nil } } - - } - public enum BankCardData: TypeConstructorDescription { - case bankCardData(title: String, openUrls: [Api.BankCardOpenUrl]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .bankCardData(let title, let openUrls): - if boxed { - buffer.appendInt32(1042605427) - } - serializeString(title, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(openUrls.count)) - for item in openUrls { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .bankCardData(let title, let openUrls): - return ("bankCardData", [("title", title), ("openUrls", openUrls)]) - } - } - - public static func parse_bankCardData(_ reader: BufferReader) -> BankCardData? { - var _1: String? - _1 = parseString(reader) - var _2: [Api.BankCardOpenUrl]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.BankCardOpenUrl.self) + public static func parse_pageBlockVideo(_ reader: BufferReader) -> PageBlock? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Api.PageCaption? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.PageCaption + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.PageBlock.pageBlockVideo(flags: _1!, videoId: _2!, caption: _3!) + } + else { + return nil + } + } + public static func parse_pageBlockAudio(_ reader: BufferReader) -> PageBlock? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Api.PageCaption? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.PageCaption } let _c1 = _1 != nil let _c2 = _2 != nil if _c1 && _c2 { - return Api.payments.BankCardData.bankCardData(title: _1!, openUrls: _2!) + return Api.PageBlock.pageBlockAudio(audioId: _1!, caption: _2!) } else { return nil } } - - } -} -} -public extension Api { -public struct stats { - public enum BroadcastStats: TypeConstructorDescription { - case broadcastStats(period: Api.StatsDateRangeDays, followers: Api.StatsAbsValueAndPrev, viewsPerPost: Api.StatsAbsValueAndPrev, sharesPerPost: Api.StatsAbsValueAndPrev, enabledNotifications: Api.StatsPercentValue, growthGraph: Api.StatsGraph, followersGraph: Api.StatsGraph, muteGraph: Api.StatsGraph, topHoursGraph: Api.StatsGraph, interactionsGraph: Api.StatsGraph, ivInteractionsGraph: Api.StatsGraph, viewsBySourceGraph: Api.StatsGraph, newFollowersBySourceGraph: Api.StatsGraph, languagesGraph: Api.StatsGraph, recentMessageInteractions: [Api.MessageInteractionCounters]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .broadcastStats(let period, let followers, let viewsPerPost, let sharesPerPost, let enabledNotifications, let growthGraph, let followersGraph, let muteGraph, let topHoursGraph, let interactionsGraph, let ivInteractionsGraph, let viewsBySourceGraph, let newFollowersBySourceGraph, let languagesGraph, let recentMessageInteractions): - if boxed { - buffer.appendInt32(-1107852396) - } - period.serialize(buffer, true) - followers.serialize(buffer, true) - viewsPerPost.serialize(buffer, true) - sharesPerPost.serialize(buffer, true) - enabledNotifications.serialize(buffer, true) - growthGraph.serialize(buffer, true) - followersGraph.serialize(buffer, true) - muteGraph.serialize(buffer, true) - topHoursGraph.serialize(buffer, true) - interactionsGraph.serialize(buffer, true) - ivInteractionsGraph.serialize(buffer, true) - viewsBySourceGraph.serialize(buffer, true) - newFollowersBySourceGraph.serialize(buffer, true) - languagesGraph.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(recentMessageInteractions.count)) - for item in recentMessageInteractions { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .broadcastStats(let period, let followers, let viewsPerPost, let sharesPerPost, let enabledNotifications, let growthGraph, let followersGraph, let muteGraph, let topHoursGraph, let interactionsGraph, let ivInteractionsGraph, let viewsBySourceGraph, let newFollowersBySourceGraph, let languagesGraph, let recentMessageInteractions): - return ("broadcastStats", [("period", period), ("followers", followers), ("viewsPerPost", viewsPerPost), ("sharesPerPost", sharesPerPost), ("enabledNotifications", enabledNotifications), ("growthGraph", growthGraph), ("followersGraph", followersGraph), ("muteGraph", muteGraph), ("topHoursGraph", topHoursGraph), ("interactionsGraph", interactionsGraph), ("ivInteractionsGraph", ivInteractionsGraph), ("viewsBySourceGraph", viewsBySourceGraph), ("newFollowersBySourceGraph", newFollowersBySourceGraph), ("languagesGraph", languagesGraph), ("recentMessageInteractions", recentMessageInteractions)]) - } - } - - public static func parse_broadcastStats(_ reader: BufferReader) -> BroadcastStats? { - var _1: Api.StatsDateRangeDays? + public static func parse_pageBlockEmbed(_ reader: BufferReader) -> PageBlock? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + if Int(_1!) & Int(1 << 1) != 0 {_2 = parseString(reader) } + var _3: String? + if Int(_1!) & Int(1 << 2) != 0 {_3 = parseString(reader) } + var _4: Int64? + if Int(_1!) & Int(1 << 4) != 0 {_4 = reader.readInt64() } + var _5: Int32? + if Int(_1!) & Int(1 << 5) != 0 {_5 = reader.readInt32() } + var _6: Int32? + if Int(_1!) & Int(1 << 5) != 0 {_6 = reader.readInt32() } + var _7: Api.PageCaption? if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.StatsDateRangeDays + _7 = Api.parse(reader, signature: signature) as? Api.PageCaption } - var _2: Api.StatsAbsValueAndPrev? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.StatsAbsValueAndPrev + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 4) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 5) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 5) == 0) || _6 != nil + let _c7 = _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.PageBlock.pageBlockEmbed(flags: _1!, url: _2, html: _3, posterPhotoId: _4, w: _5, h: _6, caption: _7!) } - var _3: Api.StatsAbsValueAndPrev? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.StatsAbsValueAndPrev + else { + return nil } - var _4: Api.StatsAbsValueAndPrev? - if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.StatsAbsValueAndPrev - } - var _5: Api.StatsPercentValue? - if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.StatsPercentValue - } - var _6: Api.StatsGraph? - if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.StatsGraph - } - var _7: Api.StatsGraph? - if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.StatsGraph - } - var _8: Api.StatsGraph? - if let signature = reader.readInt32() { - _8 = Api.parse(reader, signature: signature) as? Api.StatsGraph - } - var _9: Api.StatsGraph? - if let signature = reader.readInt32() { - _9 = Api.parse(reader, signature: signature) as? Api.StatsGraph - } - var _10: Api.StatsGraph? - if let signature = reader.readInt32() { - _10 = Api.parse(reader, signature: signature) as? Api.StatsGraph - } - var _11: Api.StatsGraph? - if let signature = reader.readInt32() { - _11 = Api.parse(reader, signature: signature) as? Api.StatsGraph - } - var _12: Api.StatsGraph? - if let signature = reader.readInt32() { - _12 = Api.parse(reader, signature: signature) as? Api.StatsGraph - } - var _13: Api.StatsGraph? - if let signature = reader.readInt32() { - _13 = Api.parse(reader, signature: signature) as? Api.StatsGraph - } - var _14: Api.StatsGraph? - if let signature = reader.readInt32() { - _14 = Api.parse(reader, signature: signature) as? Api.StatsGraph - } - var _15: [Api.MessageInteractionCounters]? + } + public static func parse_pageBlockEmbedPost(_ reader: BufferReader) -> PageBlock? { + var _1: String? + _1 = parseString(reader) + var _2: Int64? + _2 = reader.readInt64() + var _3: Int64? + _3 = reader.readInt64() + var _4: String? + _4 = parseString(reader) + var _5: Int32? + _5 = reader.readInt32() + var _6: [Api.PageBlock]? if let _ = reader.readInt32() { - _15 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageInteractionCounters.self) + _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageBlock.self) + } + var _7: Api.PageCaption? + if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.PageCaption } let _c1 = _1 != nil let _c2 = _2 != nil @@ -645,16 +1270,136 @@ public struct stats { let _c5 = _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil - let _c8 = _8 != nil - let _c9 = _9 != nil - let _c10 = _10 != nil - let _c11 = _11 != nil - let _c12 = _12 != nil - let _c13 = _13 != nil - let _c14 = _14 != nil - let _c15 = _15 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 { - return Api.stats.BroadcastStats.broadcastStats(period: _1!, followers: _2!, viewsPerPost: _3!, sharesPerPost: _4!, enabledNotifications: _5!, growthGraph: _6!, followersGraph: _7!, muteGraph: _8!, topHoursGraph: _9!, interactionsGraph: _10!, ivInteractionsGraph: _11!, viewsBySourceGraph: _12!, newFollowersBySourceGraph: _13!, languagesGraph: _14!, recentMessageInteractions: _15!) + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.PageBlock.pageBlockEmbedPost(url: _1!, webpageId: _2!, authorPhotoId: _3!, author: _4!, date: _5!, blocks: _6!, caption: _7!) + } + else { + return nil + } + } + public static func parse_pageBlockCollage(_ reader: BufferReader) -> PageBlock? { + var _1: [Api.PageBlock]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageBlock.self) + } + var _2: Api.PageCaption? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.PageCaption + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.PageBlock.pageBlockCollage(items: _1!, caption: _2!) + } + else { + return nil + } + } + public static func parse_pageBlockSlideshow(_ reader: BufferReader) -> PageBlock? { + var _1: [Api.PageBlock]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageBlock.self) + } + var _2: Api.PageCaption? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.PageCaption + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.PageBlock.pageBlockSlideshow(items: _1!, caption: _2!) + } + else { + return nil + } + } + public static func parse_pageBlockList(_ reader: BufferReader) -> PageBlock? { + var _1: [Api.PageListItem]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageListItem.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.PageBlock.pageBlockList(items: _1!) + } + else { + return nil + } + } + public static func parse_pageBlockOrderedList(_ reader: BufferReader) -> PageBlock? { + var _1: [Api.PageListOrderedItem]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageListOrderedItem.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.PageBlock.pageBlockOrderedList(items: _1!) + } + else { + return nil + } + } + public static func parse_pageBlockDetails(_ reader: BufferReader) -> PageBlock? { + var _1: Int32? + _1 = reader.readInt32() + var _2: [Api.PageBlock]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageBlock.self) + } + var _3: Api.RichText? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.PageBlock.pageBlockDetails(flags: _1!, blocks: _2!, title: _3!) + } + else { + return nil + } + } + public static func parse_pageBlockRelatedArticles(_ reader: BufferReader) -> PageBlock? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + var _2: [Api.PageRelatedArticle]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageRelatedArticle.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.PageBlock.pageBlockRelatedArticles(title: _1!, articles: _2!) + } + else { + return nil + } + } + public static func parse_pageBlockMap(_ reader: BufferReader) -> PageBlock? { + var _1: Api.GeoPoint? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.GeoPoint + } + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Api.PageCaption? + if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.PageCaption + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.PageBlock.pageBlockMap(geo: _1!, zoom: _2!, w: _3!, h: _4!, caption: _5!) } else { return nil @@ -662,46 +1407,26 @@ public struct stats { } } - public enum MegagroupStats: TypeConstructorDescription { - case megagroupStats(period: Api.StatsDateRangeDays, members: Api.StatsAbsValueAndPrev, messages: Api.StatsAbsValueAndPrev, viewers: Api.StatsAbsValueAndPrev, posters: Api.StatsAbsValueAndPrev, growthGraph: Api.StatsGraph, membersGraph: Api.StatsGraph, newMembersBySourceGraph: Api.StatsGraph, languagesGraph: Api.StatsGraph, messagesGraph: Api.StatsGraph, actionsGraph: Api.StatsGraph, topHoursGraph: Api.StatsGraph, weekdaysGraph: Api.StatsGraph, topPosters: [Api.StatsGroupTopPoster], topAdmins: [Api.StatsGroupTopAdmin], topInviters: [Api.StatsGroupTopInviter], users: [Api.User]) + public enum SecureRequiredType: TypeConstructorDescription { + case secureRequiredType(flags: Int32, type: Api.SecureValueType) + case secureRequiredTypeOneOf(types: [Api.SecureRequiredType]) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .megagroupStats(let period, let members, let messages, let viewers, let posters, let growthGraph, let membersGraph, let newMembersBySourceGraph, let languagesGraph, let messagesGraph, let actionsGraph, let topHoursGraph, let weekdaysGraph, let topPosters, let topAdmins, let topInviters, let users): + case .secureRequiredType(let flags, let type): if boxed { - buffer.appendInt32(-276825834) + buffer.appendInt32(-2103600678) } - period.serialize(buffer, true) - members.serialize(buffer, true) - messages.serialize(buffer, true) - viewers.serialize(buffer, true) - posters.serialize(buffer, true) - growthGraph.serialize(buffer, true) - membersGraph.serialize(buffer, true) - newMembersBySourceGraph.serialize(buffer, true) - languagesGraph.serialize(buffer, true) - messagesGraph.serialize(buffer, true) - actionsGraph.serialize(buffer, true) - topHoursGraph.serialize(buffer, true) - weekdaysGraph.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(topPosters.count)) - for item in topPosters { - item.serialize(buffer, true) + serializeInt32(flags, buffer: buffer, boxed: false) + type.serialize(buffer, true) + break + case .secureRequiredTypeOneOf(let types): + if boxed { + buffer.appendInt32(41187252) } buffer.appendInt32(481674261) - buffer.appendInt32(Int32(topAdmins.count)) - for item in topAdmins { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(topInviters.count)) - for item in topInviters { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { + buffer.appendInt32(Int32(types.count)) + for item in types { item.serialize(buffer, true) } break @@ -710,80 +1435,12622 @@ public struct stats { public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .megagroupStats(let period, let members, let messages, let viewers, let posters, let growthGraph, let membersGraph, let newMembersBySourceGraph, let languagesGraph, let messagesGraph, let actionsGraph, let topHoursGraph, let weekdaysGraph, let topPosters, let topAdmins, let topInviters, let users): - return ("megagroupStats", [("period", period), ("members", members), ("messages", messages), ("viewers", viewers), ("posters", posters), ("growthGraph", growthGraph), ("membersGraph", membersGraph), ("newMembersBySourceGraph", newMembersBySourceGraph), ("languagesGraph", languagesGraph), ("messagesGraph", messagesGraph), ("actionsGraph", actionsGraph), ("topHoursGraph", topHoursGraph), ("weekdaysGraph", weekdaysGraph), ("topPosters", topPosters), ("topAdmins", topAdmins), ("topInviters", topInviters), ("users", users)]) + case .secureRequiredType(let flags, let type): + return ("secureRequiredType", [("flags", flags), ("type", type)]) + case .secureRequiredTypeOneOf(let types): + return ("secureRequiredTypeOneOf", [("types", types)]) } } - public static func parse_megagroupStats(_ reader: BufferReader) -> MegagroupStats? { - var _1: Api.StatsDateRangeDays? + public static func parse_secureRequiredType(_ reader: BufferReader) -> SecureRequiredType? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.SecureValueType? if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.StatsDateRangeDays + _2 = Api.parse(reader, signature: signature) as? Api.SecureValueType } - var _2: Api.StatsAbsValueAndPrev? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.StatsAbsValueAndPrev + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.SecureRequiredType.secureRequiredType(flags: _1!, type: _2!) } - var _3: Api.StatsAbsValueAndPrev? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.StatsAbsValueAndPrev + else { + return nil } - var _4: Api.StatsAbsValueAndPrev? - if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.StatsAbsValueAndPrev - } - var _5: Api.StatsAbsValueAndPrev? - if let signature = reader.readInt32() { - _5 = Api.parse(reader, signature: signature) as? Api.StatsAbsValueAndPrev - } - var _6: Api.StatsGraph? - if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.StatsGraph - } - var _7: Api.StatsGraph? - if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.StatsGraph - } - var _8: Api.StatsGraph? - if let signature = reader.readInt32() { - _8 = Api.parse(reader, signature: signature) as? Api.StatsGraph - } - var _9: Api.StatsGraph? - if let signature = reader.readInt32() { - _9 = Api.parse(reader, signature: signature) as? Api.StatsGraph - } - var _10: Api.StatsGraph? - if let signature = reader.readInt32() { - _10 = Api.parse(reader, signature: signature) as? Api.StatsGraph - } - var _11: Api.StatsGraph? - if let signature = reader.readInt32() { - _11 = Api.parse(reader, signature: signature) as? Api.StatsGraph - } - var _12: Api.StatsGraph? - if let signature = reader.readInt32() { - _12 = Api.parse(reader, signature: signature) as? Api.StatsGraph - } - var _13: Api.StatsGraph? - if let signature = reader.readInt32() { - _13 = Api.parse(reader, signature: signature) as? Api.StatsGraph - } - var _14: [Api.StatsGroupTopPoster]? + } + public static func parse_secureRequiredTypeOneOf(_ reader: BufferReader) -> SecureRequiredType? { + var _1: [Api.SecureRequiredType]? if let _ = reader.readInt32() { - _14 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StatsGroupTopPoster.self) + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureRequiredType.self) } - var _15: [Api.StatsGroupTopAdmin]? + let _c1 = _1 != nil + if _c1 { + return Api.SecureRequiredType.secureRequiredTypeOneOf(types: _1!) + } + else { + return nil + } + } + + } + public enum JSONValue: TypeConstructorDescription { + case jsonNull + case jsonBool(value: Api.Bool) + case jsonNumber(value: Double) + case jsonString(value: String) + case jsonArray(value: [Api.JSONValue]) + case jsonObject(value: [Api.JSONObjectValue]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .jsonNull: + if boxed { + buffer.appendInt32(1064139624) + } + + break + case .jsonBool(let value): + if boxed { + buffer.appendInt32(-952869270) + } + value.serialize(buffer, true) + break + case .jsonNumber(let value): + if boxed { + buffer.appendInt32(736157604) + } + serializeDouble(value, buffer: buffer, boxed: false) + break + case .jsonString(let value): + if boxed { + buffer.appendInt32(-1222740358) + } + serializeString(value, buffer: buffer, boxed: false) + break + case .jsonArray(let value): + if boxed { + buffer.appendInt32(-146520221) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(value.count)) + for item in value { + item.serialize(buffer, true) + } + break + case .jsonObject(let value): + if boxed { + buffer.appendInt32(-1715350371) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(value.count)) + for item in value { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .jsonNull: + return ("jsonNull", []) + case .jsonBool(let value): + return ("jsonBool", [("value", value)]) + case .jsonNumber(let value): + return ("jsonNumber", [("value", value)]) + case .jsonString(let value): + return ("jsonString", [("value", value)]) + case .jsonArray(let value): + return ("jsonArray", [("value", value)]) + case .jsonObject(let value): + return ("jsonObject", [("value", value)]) + } + } + + public static func parse_jsonNull(_ reader: BufferReader) -> JSONValue? { + return Api.JSONValue.jsonNull + } + public static func parse_jsonBool(_ reader: BufferReader) -> JSONValue? { + var _1: Api.Bool? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Bool + } + let _c1 = _1 != nil + if _c1 { + return Api.JSONValue.jsonBool(value: _1!) + } + else { + return nil + } + } + public static func parse_jsonNumber(_ reader: BufferReader) -> JSONValue? { + var _1: Double? + _1 = reader.readDouble() + let _c1 = _1 != nil + if _c1 { + return Api.JSONValue.jsonNumber(value: _1!) + } + else { + return nil + } + } + public static func parse_jsonString(_ reader: BufferReader) -> JSONValue? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.JSONValue.jsonString(value: _1!) + } + else { + return nil + } + } + public static func parse_jsonArray(_ reader: BufferReader) -> JSONValue? { + var _1: [Api.JSONValue]? if let _ = reader.readInt32() { - _15 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StatsGroupTopAdmin.self) + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.JSONValue.self) } - var _16: [Api.StatsGroupTopInviter]? + let _c1 = _1 != nil + if _c1 { + return Api.JSONValue.jsonArray(value: _1!) + } + else { + return nil + } + } + public static func parse_jsonObject(_ reader: BufferReader) -> JSONValue? { + var _1: [Api.JSONObjectValue]? if let _ = reader.readInt32() { - _16 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StatsGroupTopInviter.self) + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.JSONObjectValue.self) } - var _17: [Api.User]? + let _c1 = _1 != nil + if _c1 { + return Api.JSONValue.jsonObject(value: _1!) + } + else { + return nil + } + } + + } + public enum Photo: TypeConstructorDescription { + case photoEmpty(id: Int64) + case photo(flags: Int32, id: Int64, accessHash: Int64, fileReference: Buffer, date: Int32, sizes: [Api.PhotoSize], videoSizes: [Api.VideoSize]?, dcId: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .photoEmpty(let id): + if boxed { + buffer.appendInt32(590459437) + } + serializeInt64(id, buffer: buffer, boxed: false) + break + case .photo(let flags, let id, let accessHash, let fileReference, let date, let sizes, let videoSizes, let dcId): + if boxed { + buffer.appendInt32(-82216347) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeBytes(fileReference, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(sizes.count)) + for item in sizes { + item.serialize(buffer, true) + } + if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(videoSizes!.count)) + for item in videoSizes! { + item.serialize(buffer, true) + }} + serializeInt32(dcId, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .photoEmpty(let id): + return ("photoEmpty", [("id", id)]) + case .photo(let flags, let id, let accessHash, let fileReference, let date, let sizes, let videoSizes, let dcId): + return ("photo", [("flags", flags), ("id", id), ("accessHash", accessHash), ("fileReference", fileReference), ("date", date), ("sizes", sizes), ("videoSizes", videoSizes), ("dcId", dcId)]) + } + } + + public static func parse_photoEmpty(_ reader: BufferReader) -> Photo? { + var _1: Int64? + _1 = reader.readInt64() + let _c1 = _1 != nil + if _c1 { + return Api.Photo.photoEmpty(id: _1!) + } + else { + return nil + } + } + public static func parse_photo(_ reader: BufferReader) -> Photo? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Int64? + _3 = reader.readInt64() + var _4: Buffer? + _4 = parseBytes(reader) + var _5: Int32? + _5 = reader.readInt32() + var _6: [Api.PhotoSize]? if let _ = reader.readInt32() { - _17 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PhotoSize.self) } + var _7: [Api.VideoSize]? + if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { + _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.VideoSize.self) + } } + var _8: Int32? + _8 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil + let _c8 = _8 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { + return Api.Photo.photo(flags: _1!, id: _2!, accessHash: _3!, fileReference: _4!, date: _5!, sizes: _6!, videoSizes: _7, dcId: _8!) + } + else { + return nil + } + } + + } + public enum Chat: TypeConstructorDescription { + case chatEmpty(id: Int32) + case chatForbidden(id: Int32, title: String) + case channelForbidden(flags: Int32, id: Int32, accessHash: Int64, title: String, untilDate: Int32?) + case chat(flags: Int32, id: Int32, title: String, photo: Api.ChatPhoto, participantsCount: Int32, date: Int32, version: Int32, migratedTo: Api.InputChannel?, adminRights: Api.ChatAdminRights?, defaultBannedRights: Api.ChatBannedRights?) + case channel(flags: Int32, id: Int32, accessHash: Int64?, title: String, username: String?, photo: Api.ChatPhoto, date: Int32, version: Int32, restrictionReason: [Api.RestrictionReason]?, adminRights: Api.ChatAdminRights?, bannedRights: Api.ChatBannedRights?, defaultBannedRights: Api.ChatBannedRights?, participantsCount: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .chatEmpty(let id): + if boxed { + buffer.appendInt32(-1683826688) + } + serializeInt32(id, buffer: buffer, boxed: false) + break + case .chatForbidden(let id, let title): + if boxed { + buffer.appendInt32(120753115) + } + serializeInt32(id, buffer: buffer, boxed: false) + serializeString(title, buffer: buffer, boxed: false) + break + case .channelForbidden(let flags, let id, let accessHash, let title, let untilDate): + if boxed { + buffer.appendInt32(681420594) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeString(title, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 16) != 0 {serializeInt32(untilDate!, buffer: buffer, boxed: false)} + break + case .chat(let flags, let id, let title, let photo, let participantsCount, let date, let version, let migratedTo, let adminRights, let defaultBannedRights): + if boxed { + buffer.appendInt32(1004149726) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + serializeString(title, buffer: buffer, boxed: false) + photo.serialize(buffer, true) + serializeInt32(participantsCount, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + serializeInt32(version, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 6) != 0 {migratedTo!.serialize(buffer, true)} + if Int(flags) & Int(1 << 14) != 0 {adminRights!.serialize(buffer, true)} + if Int(flags) & Int(1 << 18) != 0 {defaultBannedRights!.serialize(buffer, true)} + break + case .channel(let flags, let id, let accessHash, let title, let username, let photo, let date, let version, let restrictionReason, let adminRights, let bannedRights, let defaultBannedRights, let participantsCount): + if boxed { + buffer.appendInt32(-753232354) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 13) != 0 {serializeInt64(accessHash!, buffer: buffer, boxed: false)} + serializeString(title, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 6) != 0 {serializeString(username!, buffer: buffer, boxed: false)} + photo.serialize(buffer, true) + serializeInt32(date, buffer: buffer, boxed: false) + serializeInt32(version, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 9) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(restrictionReason!.count)) + for item in restrictionReason! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 14) != 0 {adminRights!.serialize(buffer, true)} + if Int(flags) & Int(1 << 15) != 0 {bannedRights!.serialize(buffer, true)} + if Int(flags) & Int(1 << 18) != 0 {defaultBannedRights!.serialize(buffer, true)} + if Int(flags) & Int(1 << 17) != 0 {serializeInt32(participantsCount!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .chatEmpty(let id): + return ("chatEmpty", [("id", id)]) + case .chatForbidden(let id, let title): + return ("chatForbidden", [("id", id), ("title", title)]) + case .channelForbidden(let flags, let id, let accessHash, let title, let untilDate): + return ("channelForbidden", [("flags", flags), ("id", id), ("accessHash", accessHash), ("title", title), ("untilDate", untilDate)]) + case .chat(let flags, let id, let title, let photo, let participantsCount, let date, let version, let migratedTo, let adminRights, let defaultBannedRights): + return ("chat", [("flags", flags), ("id", id), ("title", title), ("photo", photo), ("participantsCount", participantsCount), ("date", date), ("version", version), ("migratedTo", migratedTo), ("adminRights", adminRights), ("defaultBannedRights", defaultBannedRights)]) + case .channel(let flags, let id, let accessHash, let title, let username, let photo, let date, let version, let restrictionReason, let adminRights, let bannedRights, let defaultBannedRights, let participantsCount): + return ("channel", [("flags", flags), ("id", id), ("accessHash", accessHash), ("title", title), ("username", username), ("photo", photo), ("date", date), ("version", version), ("restrictionReason", restrictionReason), ("adminRights", adminRights), ("bannedRights", bannedRights), ("defaultBannedRights", defaultBannedRights), ("participantsCount", participantsCount)]) + } + } + + public static func parse_chatEmpty(_ reader: BufferReader) -> Chat? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.Chat.chatEmpty(id: _1!) + } + else { + return nil + } + } + public static func parse_chatForbidden(_ reader: BufferReader) -> Chat? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Chat.chatForbidden(id: _1!, title: _2!) + } + else { + return nil + } + } + public static func parse_channelForbidden(_ reader: BufferReader) -> Chat? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int64? + _3 = reader.readInt64() + var _4: String? + _4 = parseString(reader) + var _5: Int32? + if Int(_1!) & Int(1 << 16) != 0 {_5 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 16) == 0) || _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.Chat.channelForbidden(flags: _1!, id: _2!, accessHash: _3!, title: _4!, untilDate: _5) + } + else { + return nil + } + } + public static func parse_chat(_ reader: BufferReader) -> Chat? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: String? + _3 = parseString(reader) + var _4: Api.ChatPhoto? + if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.ChatPhoto + } + var _5: Int32? + _5 = reader.readInt32() + var _6: Int32? + _6 = reader.readInt32() + var _7: Int32? + _7 = reader.readInt32() + var _8: Api.InputChannel? + if Int(_1!) & Int(1 << 6) != 0 {if let signature = reader.readInt32() { + _8 = Api.parse(reader, signature: signature) as? Api.InputChannel + } } + var _9: Api.ChatAdminRights? + if Int(_1!) & Int(1 << 14) != 0 {if let signature = reader.readInt32() { + _9 = Api.parse(reader, signature: signature) as? Api.ChatAdminRights + } } + var _10: Api.ChatBannedRights? + if Int(_1!) & Int(1 << 18) != 0 {if let signature = reader.readInt32() { + _10 = Api.parse(reader, signature: signature) as? Api.ChatBannedRights + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = (Int(_1!) & Int(1 << 6) == 0) || _8 != nil + let _c9 = (Int(_1!) & Int(1 << 14) == 0) || _9 != nil + let _c10 = (Int(_1!) & Int(1 << 18) == 0) || _10 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 { + return Api.Chat.chat(flags: _1!, id: _2!, title: _3!, photo: _4!, participantsCount: _5!, date: _6!, version: _7!, migratedTo: _8, adminRights: _9, defaultBannedRights: _10) + } + else { + return nil + } + } + public static func parse_channel(_ reader: BufferReader) -> Chat? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int64? + if Int(_1!) & Int(1 << 13) != 0 {_3 = reader.readInt64() } + var _4: String? + _4 = parseString(reader) + var _5: String? + if Int(_1!) & Int(1 << 6) != 0 {_5 = parseString(reader) } + var _6: Api.ChatPhoto? + if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.ChatPhoto + } + var _7: Int32? + _7 = reader.readInt32() + var _8: Int32? + _8 = reader.readInt32() + var _9: [Api.RestrictionReason]? + if Int(_1!) & Int(1 << 9) != 0 {if let _ = reader.readInt32() { + _9 = Api.parseVector(reader, elementSignature: 0, elementType: Api.RestrictionReason.self) + } } + var _10: Api.ChatAdminRights? + if Int(_1!) & Int(1 << 14) != 0 {if let signature = reader.readInt32() { + _10 = Api.parse(reader, signature: signature) as? Api.ChatAdminRights + } } + var _11: Api.ChatBannedRights? + if Int(_1!) & Int(1 << 15) != 0 {if let signature = reader.readInt32() { + _11 = Api.parse(reader, signature: signature) as? Api.ChatBannedRights + } } + var _12: Api.ChatBannedRights? + if Int(_1!) & Int(1 << 18) != 0 {if let signature = reader.readInt32() { + _12 = Api.parse(reader, signature: signature) as? Api.ChatBannedRights + } } + var _13: Int32? + if Int(_1!) & Int(1 << 17) != 0 {_13 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 13) == 0) || _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 6) == 0) || _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = _8 != nil + let _c9 = (Int(_1!) & Int(1 << 9) == 0) || _9 != nil + let _c10 = (Int(_1!) & Int(1 << 14) == 0) || _10 != nil + let _c11 = (Int(_1!) & Int(1 << 15) == 0) || _11 != nil + let _c12 = (Int(_1!) & Int(1 << 18) == 0) || _12 != nil + let _c13 = (Int(_1!) & Int(1 << 17) == 0) || _13 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 { + return Api.Chat.channel(flags: _1!, id: _2!, accessHash: _3, title: _4!, username: _5, photo: _6!, date: _7!, version: _8!, restrictionReason: _9, adminRights: _10, bannedRights: _11, defaultBannedRights: _12, participantsCount: _13) + } + else { + return nil + } + } + + } + public enum StatsURL: TypeConstructorDescription { + case statsURL(url: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .statsURL(let url): + if boxed { + buffer.appendInt32(1202287072) + } + serializeString(url, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .statsURL(let url): + return ("statsURL", [("url", url)]) + } + } + + public static func parse_statsURL(_ reader: BufferReader) -> StatsURL? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.StatsURL.statsURL(url: _1!) + } + else { + return nil + } + } + + } + public enum ChatInvite: TypeConstructorDescription { + case chatInviteAlready(chat: Api.Chat) + case chatInvite(flags: Int32, title: String, photo: Api.Photo, participantsCount: Int32, participants: [Api.User]?) + case chatInvitePeek(chat: Api.Chat, expires: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .chatInviteAlready(let chat): + if boxed { + buffer.appendInt32(1516793212) + } + chat.serialize(buffer, true) + break + case .chatInvite(let flags, let title, let photo, let participantsCount, let participants): + if boxed { + buffer.appendInt32(-540871282) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(title, buffer: buffer, boxed: false) + photo.serialize(buffer, true) + serializeInt32(participantsCount, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 4) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(participants!.count)) + for item in participants! { + item.serialize(buffer, true) + }} + break + case .chatInvitePeek(let chat, let expires): + if boxed { + buffer.appendInt32(1634294960) + } + chat.serialize(buffer, true) + serializeInt32(expires, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .chatInviteAlready(let chat): + return ("chatInviteAlready", [("chat", chat)]) + case .chatInvite(let flags, let title, let photo, let participantsCount, let participants): + return ("chatInvite", [("flags", flags), ("title", title), ("photo", photo), ("participantsCount", participantsCount), ("participants", participants)]) + case .chatInvitePeek(let chat, let expires): + return ("chatInvitePeek", [("chat", chat), ("expires", expires)]) + } + } + + public static func parse_chatInviteAlready(_ reader: BufferReader) -> ChatInvite? { + var _1: Api.Chat? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Chat + } + let _c1 = _1 != nil + if _c1 { + return Api.ChatInvite.chatInviteAlready(chat: _1!) + } + else { + return nil + } + } + public static func parse_chatInvite(_ reader: BufferReader) -> ChatInvite? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: Api.Photo? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.Photo + } + var _4: Int32? + _4 = reader.readInt32() + var _5: [Api.User]? + if Int(_1!) & Int(1 << 4) != 0 {if let _ = reader.readInt32() { + _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 4) == 0) || _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.ChatInvite.chatInvite(flags: _1!, title: _2!, photo: _3!, participantsCount: _4!, participants: _5) + } + else { + return nil + } + } + public static func parse_chatInvitePeek(_ reader: BufferReader) -> ChatInvite? { + var _1: Api.Chat? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Chat + } + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ChatInvite.chatInvitePeek(chat: _1!, expires: _2!) + } + else { + return nil + } + } + + } + public enum InlineQueryPeerType: TypeConstructorDescription { + case inlineQueryPeerTypeSameBotPM + case inlineQueryPeerTypePM + case inlineQueryPeerTypeChat + case inlineQueryPeerTypeMegagroup + case inlineQueryPeerTypeBroadcast + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inlineQueryPeerTypeSameBotPM: + if boxed { + buffer.appendInt32(813821341) + } + + break + case .inlineQueryPeerTypePM: + if boxed { + buffer.appendInt32(-2093215828) + } + + break + case .inlineQueryPeerTypeChat: + if boxed { + buffer.appendInt32(-681130742) + } + + break + case .inlineQueryPeerTypeMegagroup: + if boxed { + buffer.appendInt32(1589952067) + } + + break + case .inlineQueryPeerTypeBroadcast: + if boxed { + buffer.appendInt32(1664413338) + } + + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inlineQueryPeerTypeSameBotPM: + return ("inlineQueryPeerTypeSameBotPM", []) + case .inlineQueryPeerTypePM: + return ("inlineQueryPeerTypePM", []) + case .inlineQueryPeerTypeChat: + return ("inlineQueryPeerTypeChat", []) + case .inlineQueryPeerTypeMegagroup: + return ("inlineQueryPeerTypeMegagroup", []) + case .inlineQueryPeerTypeBroadcast: + return ("inlineQueryPeerTypeBroadcast", []) + } + } + + public static func parse_inlineQueryPeerTypeSameBotPM(_ reader: BufferReader) -> InlineQueryPeerType? { + return Api.InlineQueryPeerType.inlineQueryPeerTypeSameBotPM + } + public static func parse_inlineQueryPeerTypePM(_ reader: BufferReader) -> InlineQueryPeerType? { + return Api.InlineQueryPeerType.inlineQueryPeerTypePM + } + public static func parse_inlineQueryPeerTypeChat(_ reader: BufferReader) -> InlineQueryPeerType? { + return Api.InlineQueryPeerType.inlineQueryPeerTypeChat + } + public static func parse_inlineQueryPeerTypeMegagroup(_ reader: BufferReader) -> InlineQueryPeerType? { + return Api.InlineQueryPeerType.inlineQueryPeerTypeMegagroup + } + public static func parse_inlineQueryPeerTypeBroadcast(_ reader: BufferReader) -> InlineQueryPeerType? { + return Api.InlineQueryPeerType.inlineQueryPeerTypeBroadcast + } + + } + public enum AutoDownloadSettings: TypeConstructorDescription { + case autoDownloadSettings(flags: Int32, photoSizeMax: Int32, videoSizeMax: Int32, fileSizeMax: Int32, videoUploadMaxbitrate: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .autoDownloadSettings(let flags, let photoSizeMax, let videoSizeMax, let fileSizeMax, let videoUploadMaxbitrate): + if boxed { + buffer.appendInt32(-532532493) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(photoSizeMax, buffer: buffer, boxed: false) + serializeInt32(videoSizeMax, buffer: buffer, boxed: false) + serializeInt32(fileSizeMax, buffer: buffer, boxed: false) + serializeInt32(videoUploadMaxbitrate, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .autoDownloadSettings(let flags, let photoSizeMax, let videoSizeMax, let fileSizeMax, let videoUploadMaxbitrate): + return ("autoDownloadSettings", [("flags", flags), ("photoSizeMax", photoSizeMax), ("videoSizeMax", videoSizeMax), ("fileSizeMax", fileSizeMax), ("videoUploadMaxbitrate", videoUploadMaxbitrate)]) + } + } + + public static func parse_autoDownloadSettings(_ reader: BufferReader) -> AutoDownloadSettings? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.AutoDownloadSettings.autoDownloadSettings(flags: _1!, photoSizeMax: _2!, videoSizeMax: _3!, fileSizeMax: _4!, videoUploadMaxbitrate: _5!) + } + else { + return nil + } + } + + } + public enum StickerSetCovered: TypeConstructorDescription { + case stickerSetCovered(set: Api.StickerSet, cover: Api.Document) + case stickerSetMultiCovered(set: Api.StickerSet, covers: [Api.Document]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .stickerSetCovered(let set, let cover): + if boxed { + buffer.appendInt32(1678812626) + } + set.serialize(buffer, true) + cover.serialize(buffer, true) + break + case .stickerSetMultiCovered(let set, let covers): + if boxed { + buffer.appendInt32(872932635) + } + set.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(covers.count)) + for item in covers { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .stickerSetCovered(let set, let cover): + return ("stickerSetCovered", [("set", set), ("cover", cover)]) + case .stickerSetMultiCovered(let set, let covers): + return ("stickerSetMultiCovered", [("set", set), ("covers", covers)]) + } + } + + public static func parse_stickerSetCovered(_ reader: BufferReader) -> StickerSetCovered? { + var _1: Api.StickerSet? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.StickerSet + } + var _2: Api.Document? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Document + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.StickerSetCovered.stickerSetCovered(set: _1!, cover: _2!) + } + else { + return nil + } + } + public static func parse_stickerSetMultiCovered(_ reader: BufferReader) -> StickerSetCovered? { + var _1: Api.StickerSet? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.StickerSet + } + var _2: [Api.Document]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Document.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.StickerSetCovered.stickerSetMultiCovered(set: _1!, covers: _2!) + } + else { + return nil + } + } + + } + public enum RecentMeUrl: TypeConstructorDescription { + case recentMeUrlUnknown(url: String) + case recentMeUrlUser(url: String, userId: Int32) + case recentMeUrlChat(url: String, chatId: Int32) + case recentMeUrlChatInvite(url: String, chatInvite: Api.ChatInvite) + case recentMeUrlStickerSet(url: String, set: Api.StickerSetCovered) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .recentMeUrlUnknown(let url): + if boxed { + buffer.appendInt32(1189204285) + } + serializeString(url, buffer: buffer, boxed: false) + break + case .recentMeUrlUser(let url, let userId): + if boxed { + buffer.appendInt32(-1917045962) + } + serializeString(url, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + break + case .recentMeUrlChat(let url, let chatId): + if boxed { + buffer.appendInt32(-1608834311) + } + serializeString(url, buffer: buffer, boxed: false) + serializeInt32(chatId, buffer: buffer, boxed: false) + break + case .recentMeUrlChatInvite(let url, let chatInvite): + if boxed { + buffer.appendInt32(-347535331) + } + serializeString(url, buffer: buffer, boxed: false) + chatInvite.serialize(buffer, true) + break + case .recentMeUrlStickerSet(let url, let set): + if boxed { + buffer.appendInt32(-1140172836) + } + serializeString(url, buffer: buffer, boxed: false) + set.serialize(buffer, true) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .recentMeUrlUnknown(let url): + return ("recentMeUrlUnknown", [("url", url)]) + case .recentMeUrlUser(let url, let userId): + return ("recentMeUrlUser", [("url", url), ("userId", userId)]) + case .recentMeUrlChat(let url, let chatId): + return ("recentMeUrlChat", [("url", url), ("chatId", chatId)]) + case .recentMeUrlChatInvite(let url, let chatInvite): + return ("recentMeUrlChatInvite", [("url", url), ("chatInvite", chatInvite)]) + case .recentMeUrlStickerSet(let url, let set): + return ("recentMeUrlStickerSet", [("url", url), ("set", set)]) + } + } + + public static func parse_recentMeUrlUnknown(_ reader: BufferReader) -> RecentMeUrl? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.RecentMeUrl.recentMeUrlUnknown(url: _1!) + } + else { + return nil + } + } + public static func parse_recentMeUrlUser(_ reader: BufferReader) -> RecentMeUrl? { + var _1: String? + _1 = parseString(reader) + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.RecentMeUrl.recentMeUrlUser(url: _1!, userId: _2!) + } + else { + return nil + } + } + public static func parse_recentMeUrlChat(_ reader: BufferReader) -> RecentMeUrl? { + var _1: String? + _1 = parseString(reader) + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.RecentMeUrl.recentMeUrlChat(url: _1!, chatId: _2!) + } + else { + return nil + } + } + public static func parse_recentMeUrlChatInvite(_ reader: BufferReader) -> RecentMeUrl? { + var _1: String? + _1 = parseString(reader) + var _2: Api.ChatInvite? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.ChatInvite + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.RecentMeUrl.recentMeUrlChatInvite(url: _1!, chatInvite: _2!) + } + else { + return nil + } + } + public static func parse_recentMeUrlStickerSet(_ reader: BufferReader) -> RecentMeUrl? { + var _1: String? + _1 = parseString(reader) + var _2: Api.StickerSetCovered? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.StickerSetCovered + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.RecentMeUrl.recentMeUrlStickerSet(url: _1!, set: _2!) + } + else { + return nil + } + } + + } + public enum RestrictionReason: TypeConstructorDescription { + case restrictionReason(platform: String, reason: String, text: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .restrictionReason(let platform, let reason, let text): + if boxed { + buffer.appendInt32(-797791052) + } + serializeString(platform, buffer: buffer, boxed: false) + serializeString(reason, buffer: buffer, boxed: false) + serializeString(text, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .restrictionReason(let platform, let reason, let text): + return ("restrictionReason", [("platform", platform), ("reason", reason), ("text", text)]) + } + } + + public static func parse_restrictionReason(_ reader: BufferReader) -> RestrictionReason? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.RestrictionReason.restrictionReason(platform: _1!, reason: _2!, text: _3!) + } + else { + return nil + } + } + + } + indirect public enum RichText: TypeConstructorDescription { + case textEmpty + case textPlain(text: String) + case textBold(text: Api.RichText) + case textItalic(text: Api.RichText) + case textUnderline(text: Api.RichText) + case textStrike(text: Api.RichText) + case textFixed(text: Api.RichText) + case textUrl(text: Api.RichText, url: String, webpageId: Int64) + case textEmail(text: Api.RichText, email: String) + case textConcat(texts: [Api.RichText]) + case textSubscript(text: Api.RichText) + case textSuperscript(text: Api.RichText) + case textMarked(text: Api.RichText) + case textPhone(text: Api.RichText, phone: String) + case textImage(documentId: Int64, w: Int32, h: Int32) + case textAnchor(text: Api.RichText, name: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .textEmpty: + if boxed { + buffer.appendInt32(-599948721) + } + + break + case .textPlain(let text): + if boxed { + buffer.appendInt32(1950782688) + } + serializeString(text, buffer: buffer, boxed: false) + break + case .textBold(let text): + if boxed { + buffer.appendInt32(1730456516) + } + text.serialize(buffer, true) + break + case .textItalic(let text): + if boxed { + buffer.appendInt32(-653089380) + } + text.serialize(buffer, true) + break + case .textUnderline(let text): + if boxed { + buffer.appendInt32(-1054465340) + } + text.serialize(buffer, true) + break + case .textStrike(let text): + if boxed { + buffer.appendInt32(-1678197867) + } + text.serialize(buffer, true) + break + case .textFixed(let text): + if boxed { + buffer.appendInt32(1816074681) + } + text.serialize(buffer, true) + break + case .textUrl(let text, let url, let webpageId): + if boxed { + buffer.appendInt32(1009288385) + } + text.serialize(buffer, true) + serializeString(url, buffer: buffer, boxed: false) + serializeInt64(webpageId, buffer: buffer, boxed: false) + break + case .textEmail(let text, let email): + if boxed { + buffer.appendInt32(-564523562) + } + text.serialize(buffer, true) + serializeString(email, buffer: buffer, boxed: false) + break + case .textConcat(let texts): + if boxed { + buffer.appendInt32(2120376535) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(texts.count)) + for item in texts { + item.serialize(buffer, true) + } + break + case .textSubscript(let text): + if boxed { + buffer.appendInt32(-311786236) + } + text.serialize(buffer, true) + break + case .textSuperscript(let text): + if boxed { + buffer.appendInt32(-939827711) + } + text.serialize(buffer, true) + break + case .textMarked(let text): + if boxed { + buffer.appendInt32(55281185) + } + text.serialize(buffer, true) + break + case .textPhone(let text, let phone): + if boxed { + buffer.appendInt32(483104362) + } + text.serialize(buffer, true) + serializeString(phone, buffer: buffer, boxed: false) + break + case .textImage(let documentId, let w, let h): + if boxed { + buffer.appendInt32(136105807) + } + serializeInt64(documentId, buffer: buffer, boxed: false) + serializeInt32(w, buffer: buffer, boxed: false) + serializeInt32(h, buffer: buffer, boxed: false) + break + case .textAnchor(let text, let name): + if boxed { + buffer.appendInt32(894777186) + } + text.serialize(buffer, true) + serializeString(name, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .textEmpty: + return ("textEmpty", []) + case .textPlain(let text): + return ("textPlain", [("text", text)]) + case .textBold(let text): + return ("textBold", [("text", text)]) + case .textItalic(let text): + return ("textItalic", [("text", text)]) + case .textUnderline(let text): + return ("textUnderline", [("text", text)]) + case .textStrike(let text): + return ("textStrike", [("text", text)]) + case .textFixed(let text): + return ("textFixed", [("text", text)]) + case .textUrl(let text, let url, let webpageId): + return ("textUrl", [("text", text), ("url", url), ("webpageId", webpageId)]) + case .textEmail(let text, let email): + return ("textEmail", [("text", text), ("email", email)]) + case .textConcat(let texts): + return ("textConcat", [("texts", texts)]) + case .textSubscript(let text): + return ("textSubscript", [("text", text)]) + case .textSuperscript(let text): + return ("textSuperscript", [("text", text)]) + case .textMarked(let text): + return ("textMarked", [("text", text)]) + case .textPhone(let text, let phone): + return ("textPhone", [("text", text), ("phone", phone)]) + case .textImage(let documentId, let w, let h): + return ("textImage", [("documentId", documentId), ("w", w), ("h", h)]) + case .textAnchor(let text, let name): + return ("textAnchor", [("text", text), ("name", name)]) + } + } + + public static func parse_textEmpty(_ reader: BufferReader) -> RichText? { + return Api.RichText.textEmpty + } + public static func parse_textPlain(_ reader: BufferReader) -> RichText? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.RichText.textPlain(text: _1!) + } + else { + return nil + } + } + public static func parse_textBold(_ reader: BufferReader) -> RichText? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + if _c1 { + return Api.RichText.textBold(text: _1!) + } + else { + return nil + } + } + public static func parse_textItalic(_ reader: BufferReader) -> RichText? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + if _c1 { + return Api.RichText.textItalic(text: _1!) + } + else { + return nil + } + } + public static func parse_textUnderline(_ reader: BufferReader) -> RichText? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + if _c1 { + return Api.RichText.textUnderline(text: _1!) + } + else { + return nil + } + } + public static func parse_textStrike(_ reader: BufferReader) -> RichText? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + if _c1 { + return Api.RichText.textStrike(text: _1!) + } + else { + return nil + } + } + public static func parse_textFixed(_ reader: BufferReader) -> RichText? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + if _c1 { + return Api.RichText.textFixed(text: _1!) + } + else { + return nil + } + } + public static func parse_textUrl(_ reader: BufferReader) -> RichText? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + var _2: String? + _2 = parseString(reader) + var _3: Int64? + _3 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.RichText.textUrl(text: _1!, url: _2!, webpageId: _3!) + } + else { + return nil + } + } + public static func parse_textEmail(_ reader: BufferReader) -> RichText? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.RichText.textEmail(text: _1!, email: _2!) + } + else { + return nil + } + } + public static func parse_textConcat(_ reader: BufferReader) -> RichText? { + var _1: [Api.RichText]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.RichText.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.RichText.textConcat(texts: _1!) + } + else { + return nil + } + } + public static func parse_textSubscript(_ reader: BufferReader) -> RichText? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + if _c1 { + return Api.RichText.textSubscript(text: _1!) + } + else { + return nil + } + } + public static func parse_textSuperscript(_ reader: BufferReader) -> RichText? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + if _c1 { + return Api.RichText.textSuperscript(text: _1!) + } + else { + return nil + } + } + public static func parse_textMarked(_ reader: BufferReader) -> RichText? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + if _c1 { + return Api.RichText.textMarked(text: _1!) + } + else { + return nil + } + } + public static func parse_textPhone(_ reader: BufferReader) -> RichText? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.RichText.textPhone(text: _1!, phone: _2!) + } + else { + return nil + } + } + public static func parse_textImage(_ reader: BufferReader) -> RichText? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.RichText.textImage(documentId: _1!, w: _2!, h: _3!) + } + else { + return nil + } + } + public static func parse_textAnchor(_ reader: BufferReader) -> RichText? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.RichText.textAnchor(text: _1!, name: _2!) + } + else { + return nil + } + } + + } + public enum UserFull: TypeConstructorDescription { + case userFull(flags: Int32, user: Api.User, about: String?, settings: Api.PeerSettings, profilePhoto: Api.Photo?, notifySettings: Api.PeerNotifySettings, botInfo: Api.BotInfo?, pinnedMsgId: Int32?, commonChatsCount: Int32, folderId: Int32?, ttl: Api.PeerHistoryTTL?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .userFull(let flags, let user, let about, let settings, let profilePhoto, let notifySettings, let botInfo, let pinnedMsgId, let commonChatsCount, let folderId, let ttl): + if boxed { + buffer.appendInt32(-1522240089) + } + serializeInt32(flags, buffer: buffer, boxed: false) + user.serialize(buffer, true) + if Int(flags) & Int(1 << 1) != 0 {serializeString(about!, buffer: buffer, boxed: false)} + settings.serialize(buffer, true) + if Int(flags) & Int(1 << 2) != 0 {profilePhoto!.serialize(buffer, true)} + notifySettings.serialize(buffer, true) + if Int(flags) & Int(1 << 3) != 0 {botInfo!.serialize(buffer, true)} + if Int(flags) & Int(1 << 6) != 0 {serializeInt32(pinnedMsgId!, buffer: buffer, boxed: false)} + serializeInt32(commonChatsCount, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 11) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 14) != 0 {ttl!.serialize(buffer, true)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .userFull(let flags, let user, let about, let settings, let profilePhoto, let notifySettings, let botInfo, let pinnedMsgId, let commonChatsCount, let folderId, let ttl): + return ("userFull", [("flags", flags), ("user", user), ("about", about), ("settings", settings), ("profilePhoto", profilePhoto), ("notifySettings", notifySettings), ("botInfo", botInfo), ("pinnedMsgId", pinnedMsgId), ("commonChatsCount", commonChatsCount), ("folderId", folderId), ("ttl", ttl)]) + } + } + + public static func parse_userFull(_ reader: BufferReader) -> UserFull? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.User? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.User + } + var _3: String? + if Int(_1!) & Int(1 << 1) != 0 {_3 = parseString(reader) } + var _4: Api.PeerSettings? + if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.PeerSettings + } + var _5: Api.Photo? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.Photo + } } + var _6: Api.PeerNotifySettings? + if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.PeerNotifySettings + } + var _7: Api.BotInfo? + if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.BotInfo + } } + var _8: Int32? + if Int(_1!) & Int(1 << 6) != 0 {_8 = reader.readInt32() } + var _9: Int32? + _9 = reader.readInt32() + var _10: Int32? + if Int(_1!) & Int(1 << 11) != 0 {_10 = reader.readInt32() } + var _11: Api.PeerHistoryTTL? + if Int(_1!) & Int(1 << 14) != 0 {if let signature = reader.readInt32() { + _11 = Api.parse(reader, signature: signature) as? Api.PeerHistoryTTL + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c6 = _6 != nil + let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil + let _c8 = (Int(_1!) & Int(1 << 6) == 0) || _8 != nil + let _c9 = _9 != nil + let _c10 = (Int(_1!) & Int(1 << 11) == 0) || _10 != nil + let _c11 = (Int(_1!) & Int(1 << 14) == 0) || _11 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { + return Api.UserFull.userFull(flags: _1!, user: _2!, about: _3, settings: _4!, profilePhoto: _5, notifySettings: _6!, botInfo: _7, pinnedMsgId: _8, commonChatsCount: _9!, folderId: _10, ttl: _11) + } + else { + return nil + } + } + + } + public enum InputChannel: TypeConstructorDescription { + case inputChannelEmpty + case inputChannel(channelId: Int32, accessHash: Int64) + case inputChannelFromMessage(peer: Api.InputPeer, msgId: Int32, channelId: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputChannelEmpty: + if boxed { + buffer.appendInt32(-292807034) + } + + break + case .inputChannel(let channelId, let accessHash): + if boxed { + buffer.appendInt32(-1343524562) + } + serializeInt32(channelId, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + break + case .inputChannelFromMessage(let peer, let msgId, let channelId): + if boxed { + buffer.appendInt32(707290417) + } + peer.serialize(buffer, true) + serializeInt32(msgId, buffer: buffer, boxed: false) + serializeInt32(channelId, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputChannelEmpty: + return ("inputChannelEmpty", []) + case .inputChannel(let channelId, let accessHash): + return ("inputChannel", [("channelId", channelId), ("accessHash", accessHash)]) + case .inputChannelFromMessage(let peer, let msgId, let channelId): + return ("inputChannelFromMessage", [("peer", peer), ("msgId", msgId), ("channelId", channelId)]) + } + } + + public static func parse_inputChannelEmpty(_ reader: BufferReader) -> InputChannel? { + return Api.InputChannel.inputChannelEmpty + } + public static func parse_inputChannel(_ reader: BufferReader) -> InputChannel? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputChannel.inputChannel(channelId: _1!, accessHash: _2!) + } + else { + return nil + } + } + public static func parse_inputChannelFromMessage(_ reader: BufferReader) -> InputChannel? { + var _1: Api.InputPeer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputPeer + } + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.InputChannel.inputChannelFromMessage(peer: _1!, msgId: _2!, channelId: _3!) + } + else { + return nil + } + } + + } + public enum DcOption: TypeConstructorDescription { + case dcOption(flags: Int32, id: Int32, ipAddress: String, port: Int32, secret: Buffer?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .dcOption(let flags, let id, let ipAddress, let port, let secret): + if boxed { + buffer.appendInt32(414687501) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + serializeString(ipAddress, buffer: buffer, boxed: false) + serializeInt32(port, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 10) != 0 {serializeBytes(secret!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .dcOption(let flags, let id, let ipAddress, let port, let secret): + return ("dcOption", [("flags", flags), ("id", id), ("ipAddress", ipAddress), ("port", port), ("secret", secret)]) + } + } + + public static func parse_dcOption(_ reader: BufferReader) -> DcOption? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: String? + _3 = parseString(reader) + var _4: Int32? + _4 = reader.readInt32() + var _5: Buffer? + if Int(_1!) & Int(1 << 10) != 0 {_5 = parseBytes(reader) } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 10) == 0) || _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.DcOption.dcOption(flags: _1!, id: _2!, ipAddress: _3!, port: _4!, secret: _5) + } + else { + return nil + } + } + + } + public enum PollAnswerVoters: TypeConstructorDescription { + case pollAnswerVoters(flags: Int32, option: Buffer, voters: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .pollAnswerVoters(let flags, let option, let voters): + if boxed { + buffer.appendInt32(997055186) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeBytes(option, buffer: buffer, boxed: false) + serializeInt32(voters, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .pollAnswerVoters(let flags, let option, let voters): + return ("pollAnswerVoters", [("flags", flags), ("option", option), ("voters", voters)]) + } + } + + public static func parse_pollAnswerVoters(_ reader: BufferReader) -> PollAnswerVoters? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Buffer? + _2 = parseBytes(reader) + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.PollAnswerVoters.pollAnswerVoters(flags: _1!, option: _2!, voters: _3!) + } + else { + return nil + } + } + + } + public enum LangPackLanguage: TypeConstructorDescription { + case langPackLanguage(flags: Int32, name: String, nativeName: String, langCode: String, baseLangCode: String?, pluralCode: String, stringsCount: Int32, translatedCount: Int32, translationsUrl: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .langPackLanguage(let flags, let name, let nativeName, let langCode, let baseLangCode, let pluralCode, let stringsCount, let translatedCount, let translationsUrl): + if boxed { + buffer.appendInt32(-288727837) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(name, buffer: buffer, boxed: false) + serializeString(nativeName, buffer: buffer, boxed: false) + serializeString(langCode, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeString(baseLangCode!, buffer: buffer, boxed: false)} + serializeString(pluralCode, buffer: buffer, boxed: false) + serializeInt32(stringsCount, buffer: buffer, boxed: false) + serializeInt32(translatedCount, buffer: buffer, boxed: false) + serializeString(translationsUrl, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .langPackLanguage(let flags, let name, let nativeName, let langCode, let baseLangCode, let pluralCode, let stringsCount, let translatedCount, let translationsUrl): + return ("langPackLanguage", [("flags", flags), ("name", name), ("nativeName", nativeName), ("langCode", langCode), ("baseLangCode", baseLangCode), ("pluralCode", pluralCode), ("stringsCount", stringsCount), ("translatedCount", translatedCount), ("translationsUrl", translationsUrl)]) + } + } + + public static func parse_langPackLanguage(_ reader: BufferReader) -> LangPackLanguage? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + var _5: String? + if Int(_1!) & Int(1 << 1) != 0 {_5 = parseString(reader) } + var _6: String? + _6 = parseString(reader) + var _7: Int32? + _7 = reader.readInt32() + var _8: Int32? + _8 = reader.readInt32() + var _9: String? + _9 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = _8 != nil + let _c9 = _9 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { + return Api.LangPackLanguage.langPackLanguage(flags: _1!, name: _2!, nativeName: _3!, langCode: _4!, baseLangCode: _5, pluralCode: _6!, stringsCount: _7!, translatedCount: _8!, translationsUrl: _9!) + } + else { + return nil + } + } + + } + public enum VideoSize: TypeConstructorDescription { + case videoSize(flags: Int32, type: String, location: Api.FileLocation, w: Int32, h: Int32, size: Int32, videoStartTs: Double?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .videoSize(let flags, let type, let location, let w, let h, let size, let videoStartTs): + if boxed { + buffer.appendInt32(-399391402) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(type, buffer: buffer, boxed: false) + location.serialize(buffer, true) + serializeInt32(w, buffer: buffer, boxed: false) + serializeInt32(h, buffer: buffer, boxed: false) + serializeInt32(size, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeDouble(videoStartTs!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .videoSize(let flags, let type, let location, let w, let h, let size, let videoStartTs): + return ("videoSize", [("flags", flags), ("type", type), ("location", location), ("w", w), ("h", h), ("size", size), ("videoStartTs", videoStartTs)]) + } + } + + public static func parse_videoSize(_ reader: BufferReader) -> VideoSize? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: Api.FileLocation? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.FileLocation + } + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + var _6: Int32? + _6 = reader.readInt32() + var _7: Double? + if Int(_1!) & Int(1 << 0) != 0 {_7 = reader.readDouble() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = (Int(_1!) & Int(1 << 0) == 0) || _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.VideoSize.videoSize(flags: _1!, type: _2!, location: _3!, w: _4!, h: _5!, size: _6!, videoStartTs: _7) + } + else { + return nil + } + } + + } + public enum LangPackDifference: TypeConstructorDescription { + case langPackDifference(langCode: String, fromVersion: Int32, version: Int32, strings: [Api.LangPackString]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .langPackDifference(let langCode, let fromVersion, let version, let strings): + if boxed { + buffer.appendInt32(-209337866) + } + serializeString(langCode, buffer: buffer, boxed: false) + serializeInt32(fromVersion, buffer: buffer, boxed: false) + serializeInt32(version, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(strings.count)) + for item in strings { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .langPackDifference(let langCode, let fromVersion, let version, let strings): + return ("langPackDifference", [("langCode", langCode), ("fromVersion", fromVersion), ("version", version), ("strings", strings)]) + } + } + + public static func parse_langPackDifference(_ reader: BufferReader) -> LangPackDifference? { + var _1: String? + _1 = parseString(reader) + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: [Api.LangPackString]? + if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.LangPackString.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.LangPackDifference.langPackDifference(langCode: _1!, fromVersion: _2!, version: _3!, strings: _4!) + } + else { + return nil + } + } + + } + public enum PeerHistoryTTL: TypeConstructorDescription { + case peerHistoryTTLPM(flags: Int32, myTtlPeriod: Int32?, peerTtlPeriod: Int32?) + case peerHistoryTTL(ttlPeriod: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .peerHistoryTTLPM(let flags, let myTtlPeriod, let peerTtlPeriod): + if boxed { + buffer.appendInt32(-815649386) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(myTtlPeriod!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(peerTtlPeriod!, buffer: buffer, boxed: false)} + break + case .peerHistoryTTL(let ttlPeriod): + if boxed { + buffer.appendInt32(1041354473) + } + serializeInt32(ttlPeriod, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .peerHistoryTTLPM(let flags, let myTtlPeriod, let peerTtlPeriod): + return ("peerHistoryTTLPM", [("flags", flags), ("myTtlPeriod", myTtlPeriod), ("peerTtlPeriod", peerTtlPeriod)]) + case .peerHistoryTTL(let ttlPeriod): + return ("peerHistoryTTL", [("ttlPeriod", ttlPeriod)]) + } + } + + public static func parse_peerHistoryTTLPM(_ reader: BufferReader) -> PeerHistoryTTL? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_2 = reader.readInt32() } + var _3: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_3 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.PeerHistoryTTL.peerHistoryTTLPM(flags: _1!, myTtlPeriod: _2, peerTtlPeriod: _3) + } + else { + return nil + } + } + public static func parse_peerHistoryTTL(_ reader: BufferReader) -> PeerHistoryTTL? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.PeerHistoryTTL.peerHistoryTTL(ttlPeriod: _1!) + } + else { + return nil + } + } + + } + public enum WallPaperSettings: TypeConstructorDescription { + case wallPaperSettings(flags: Int32, backgroundColor: Int32?, secondBackgroundColor: Int32?, intensity: Int32?, rotation: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .wallPaperSettings(let flags, let backgroundColor, let secondBackgroundColor, let intensity, let rotation): + if boxed { + buffer.appendInt32(84438264) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(backgroundColor!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 4) != 0 {serializeInt32(secondBackgroundColor!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeInt32(intensity!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 4) != 0 {serializeInt32(rotation!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .wallPaperSettings(let flags, let backgroundColor, let secondBackgroundColor, let intensity, let rotation): + return ("wallPaperSettings", [("flags", flags), ("backgroundColor", backgroundColor), ("secondBackgroundColor", secondBackgroundColor), ("intensity", intensity), ("rotation", rotation)]) + } + } + + public static func parse_wallPaperSettings(_ reader: BufferReader) -> WallPaperSettings? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } + var _3: Int32? + if Int(_1!) & Int(1 << 4) != 0 {_3 = reader.readInt32() } + var _4: Int32? + if Int(_1!) & Int(1 << 3) != 0 {_4 = reader.readInt32() } + var _5: Int32? + if Int(_1!) & Int(1 << 4) != 0 {_5 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 4) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 4) == 0) || _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.WallPaperSettings.wallPaperSettings(flags: _1!, backgroundColor: _2, secondBackgroundColor: _3, intensity: _4, rotation: _5) + } + else { + return nil + } + } + + } + public enum EmojiURL: TypeConstructorDescription { + case emojiURL(url: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .emojiURL(let url): + if boxed { + buffer.appendInt32(-1519029347) + } + serializeString(url, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .emojiURL(let url): + return ("emojiURL", [("url", url)]) + } + } + + public static func parse_emojiURL(_ reader: BufferReader) -> EmojiURL? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.EmojiURL.emojiURL(url: _1!) + } + else { + return nil + } + } + + } + public enum StatsGroupTopAdmin: TypeConstructorDescription { + case statsGroupTopAdmin(userId: Int32, deleted: Int32, kicked: Int32, banned: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .statsGroupTopAdmin(let userId, let deleted, let kicked, let banned): + if boxed { + buffer.appendInt32(1611985938) + } + serializeInt32(userId, buffer: buffer, boxed: false) + serializeInt32(deleted, buffer: buffer, boxed: false) + serializeInt32(kicked, buffer: buffer, boxed: false) + serializeInt32(banned, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .statsGroupTopAdmin(let userId, let deleted, let kicked, let banned): + return ("statsGroupTopAdmin", [("userId", userId), ("deleted", deleted), ("kicked", kicked), ("banned", banned)]) + } + } + + public static func parse_statsGroupTopAdmin(_ reader: BufferReader) -> StatsGroupTopAdmin? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.StatsGroupTopAdmin.statsGroupTopAdmin(userId: _1!, deleted: _2!, kicked: _3!, banned: _4!) + } + else { + return nil + } + } + + } + public enum InputCheckPasswordSRP: TypeConstructorDescription { + case inputCheckPasswordEmpty + case inputCheckPasswordSRP(srpId: Int64, A: Buffer, M1: Buffer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputCheckPasswordEmpty: + if boxed { + buffer.appendInt32(-1736378792) + } + + break + case .inputCheckPasswordSRP(let srpId, let A, let M1): + if boxed { + buffer.appendInt32(-763367294) + } + serializeInt64(srpId, buffer: buffer, boxed: false) + serializeBytes(A, buffer: buffer, boxed: false) + serializeBytes(M1, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputCheckPasswordEmpty: + return ("inputCheckPasswordEmpty", []) + case .inputCheckPasswordSRP(let srpId, let A, let M1): + return ("inputCheckPasswordSRP", [("srpId", srpId), ("A", A), ("M1", M1)]) + } + } + + public static func parse_inputCheckPasswordEmpty(_ reader: BufferReader) -> InputCheckPasswordSRP? { + return Api.InputCheckPasswordSRP.inputCheckPasswordEmpty + } + public static func parse_inputCheckPasswordSRP(_ reader: BufferReader) -> InputCheckPasswordSRP? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Buffer? + _2 = parseBytes(reader) + var _3: Buffer? + _3 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.InputCheckPasswordSRP.inputCheckPasswordSRP(srpId: _1!, A: _2!, M1: _3!) + } + else { + return nil + } + } + + } + public enum InputEncryptedFile: TypeConstructorDescription { + case inputEncryptedFileEmpty + case inputEncryptedFileUploaded(id: Int64, parts: Int32, md5Checksum: String, keyFingerprint: Int32) + case inputEncryptedFile(id: Int64, accessHash: Int64) + case inputEncryptedFileBigUploaded(id: Int64, parts: Int32, keyFingerprint: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputEncryptedFileEmpty: + if boxed { + buffer.appendInt32(406307684) + } + + break + case .inputEncryptedFileUploaded(let id, let parts, let md5Checksum, let keyFingerprint): + if boxed { + buffer.appendInt32(1690108678) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt32(parts, buffer: buffer, boxed: false) + serializeString(md5Checksum, buffer: buffer, boxed: false) + serializeInt32(keyFingerprint, buffer: buffer, boxed: false) + break + case .inputEncryptedFile(let id, let accessHash): + if boxed { + buffer.appendInt32(1511503333) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + break + case .inputEncryptedFileBigUploaded(let id, let parts, let keyFingerprint): + if boxed { + buffer.appendInt32(767652808) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt32(parts, buffer: buffer, boxed: false) + serializeInt32(keyFingerprint, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputEncryptedFileEmpty: + return ("inputEncryptedFileEmpty", []) + case .inputEncryptedFileUploaded(let id, let parts, let md5Checksum, let keyFingerprint): + return ("inputEncryptedFileUploaded", [("id", id), ("parts", parts), ("md5Checksum", md5Checksum), ("keyFingerprint", keyFingerprint)]) + case .inputEncryptedFile(let id, let accessHash): + return ("inputEncryptedFile", [("id", id), ("accessHash", accessHash)]) + case .inputEncryptedFileBigUploaded(let id, let parts, let keyFingerprint): + return ("inputEncryptedFileBigUploaded", [("id", id), ("parts", parts), ("keyFingerprint", keyFingerprint)]) + } + } + + public static func parse_inputEncryptedFileEmpty(_ reader: BufferReader) -> InputEncryptedFile? { + return Api.InputEncryptedFile.inputEncryptedFileEmpty + } + public static func parse_inputEncryptedFileUploaded(_ reader: BufferReader) -> InputEncryptedFile? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int32? + _2 = reader.readInt32() + var _3: String? + _3 = parseString(reader) + var _4: Int32? + _4 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputEncryptedFile.inputEncryptedFileUploaded(id: _1!, parts: _2!, md5Checksum: _3!, keyFingerprint: _4!) + } + else { + return nil + } + } + public static func parse_inputEncryptedFile(_ reader: BufferReader) -> InputEncryptedFile? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputEncryptedFile.inputEncryptedFile(id: _1!, accessHash: _2!) + } + else { + return nil + } + } + public static func parse_inputEncryptedFileBigUploaded(_ reader: BufferReader) -> InputEncryptedFile? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.InputEncryptedFile.inputEncryptedFileBigUploaded(id: _1!, parts: _2!, keyFingerprint: _3!) + } + else { + return nil + } + } + + } + public enum GroupCallParticipant: TypeConstructorDescription { + case groupCallParticipant(flags: Int32, userId: Int32, date: Int32, activeDate: Int32?, source: Int32, volume: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .groupCallParticipant(let flags, let userId, let date, let activeDate, let source, let volume): + if boxed { + buffer.appendInt32(1690708501) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 3) != 0 {serializeInt32(activeDate!, buffer: buffer, boxed: false)} + serializeInt32(source, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 7) != 0 {serializeInt32(volume!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .groupCallParticipant(let flags, let userId, let date, let activeDate, let source, let volume): + return ("groupCallParticipant", [("flags", flags), ("userId", userId), ("date", date), ("activeDate", activeDate), ("source", source), ("volume", volume)]) + } + } + + public static func parse_groupCallParticipant(_ reader: BufferReader) -> GroupCallParticipant? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + if Int(_1!) & Int(1 << 3) != 0 {_4 = reader.readInt32() } + var _5: Int32? + _5 = reader.readInt32() + var _6: Int32? + if Int(_1!) & Int(1 << 7) != 0 {_6 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil + let _c5 = _5 != nil + let _c6 = (Int(_1!) & Int(1 << 7) == 0) || _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.GroupCallParticipant.groupCallParticipant(flags: _1!, userId: _2!, date: _3!, activeDate: _4, source: _5!, volume: _6) + } + else { + return nil + } + } + + } + public enum ExportedMessageLink: TypeConstructorDescription { + case exportedMessageLink(link: String, html: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .exportedMessageLink(let link, let html): + if boxed { + buffer.appendInt32(1571494644) + } + serializeString(link, buffer: buffer, boxed: false) + serializeString(html, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .exportedMessageLink(let link, let html): + return ("exportedMessageLink", [("link", link), ("html", html)]) + } + } + + public static func parse_exportedMessageLink(_ reader: BufferReader) -> ExportedMessageLink? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ExportedMessageLink.exportedMessageLink(link: _1!, html: _2!) + } + else { + return nil + } + } + + } + public enum InputFile: TypeConstructorDescription { + case inputFile(id: Int64, parts: Int32, name: String, md5Checksum: String) + case inputFileBig(id: Int64, parts: Int32, name: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputFile(let id, let parts, let name, let md5Checksum): + if boxed { + buffer.appendInt32(-181407105) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt32(parts, buffer: buffer, boxed: false) + serializeString(name, buffer: buffer, boxed: false) + serializeString(md5Checksum, buffer: buffer, boxed: false) + break + case .inputFileBig(let id, let parts, let name): + if boxed { + buffer.appendInt32(-95482955) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt32(parts, buffer: buffer, boxed: false) + serializeString(name, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputFile(let id, let parts, let name, let md5Checksum): + return ("inputFile", [("id", id), ("parts", parts), ("name", name), ("md5Checksum", md5Checksum)]) + case .inputFileBig(let id, let parts, let name): + return ("inputFileBig", [("id", id), ("parts", parts), ("name", name)]) + } + } + + public static func parse_inputFile(_ reader: BufferReader) -> InputFile? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int32? + _2 = reader.readInt32() + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputFile.inputFile(id: _1!, parts: _2!, name: _3!, md5Checksum: _4!) + } + else { + return nil + } + } + public static func parse_inputFileBig(_ reader: BufferReader) -> InputFile? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int32? + _2 = reader.readInt32() + var _3: String? + _3 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.InputFile.inputFileBig(id: _1!, parts: _2!, name: _3!) + } + else { + return nil + } + } + + } + public enum Peer: TypeConstructorDescription { + case peerUser(userId: Int32) + case peerChat(chatId: Int32) + case peerChannel(channelId: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .peerUser(let userId): + if boxed { + buffer.appendInt32(-1649296275) + } + serializeInt32(userId, buffer: buffer, boxed: false) + break + case .peerChat(let chatId): + if boxed { + buffer.appendInt32(-1160714821) + } + serializeInt32(chatId, buffer: buffer, boxed: false) + break + case .peerChannel(let channelId): + if boxed { + buffer.appendInt32(-1109531342) + } + serializeInt32(channelId, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .peerUser(let userId): + return ("peerUser", [("userId", userId)]) + case .peerChat(let chatId): + return ("peerChat", [("chatId", chatId)]) + case .peerChannel(let channelId): + return ("peerChannel", [("channelId", channelId)]) + } + } + + public static func parse_peerUser(_ reader: BufferReader) -> Peer? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.Peer.peerUser(userId: _1!) + } + else { + return nil + } + } + public static func parse_peerChat(_ reader: BufferReader) -> Peer? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.Peer.peerChat(chatId: _1!) + } + else { + return nil + } + } + public static func parse_peerChannel(_ reader: BufferReader) -> Peer? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.Peer.peerChannel(channelId: _1!) + } + else { + return nil + } + } + + } + public enum PaymentRequestedInfo: TypeConstructorDescription { + case paymentRequestedInfo(flags: Int32, name: String?, phone: String?, email: String?, shippingAddress: Api.PostAddress?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .paymentRequestedInfo(let flags, let name, let phone, let email, let shippingAddress): + if boxed { + buffer.appendInt32(-1868808300) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeString(name!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeString(phone!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeString(email!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {shippingAddress!.serialize(buffer, true)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .paymentRequestedInfo(let flags, let name, let phone, let email, let shippingAddress): + return ("paymentRequestedInfo", [("flags", flags), ("name", name), ("phone", phone), ("email", email), ("shippingAddress", shippingAddress)]) + } + } + + public static func parse_paymentRequestedInfo(_ reader: BufferReader) -> PaymentRequestedInfo? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + if Int(_1!) & Int(1 << 0) != 0 {_2 = parseString(reader) } + var _3: String? + if Int(_1!) & Int(1 << 1) != 0 {_3 = parseString(reader) } + var _4: String? + if Int(_1!) & Int(1 << 2) != 0 {_4 = parseString(reader) } + var _5: Api.PostAddress? + if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.PostAddress + } } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.PaymentRequestedInfo.paymentRequestedInfo(flags: _1!, name: _2, phone: _3, email: _4, shippingAddress: _5) + } + else { + return nil + } + } + + } + public enum UserStatus: TypeConstructorDescription { + case userStatusEmpty + case userStatusOnline(expires: Int32) + case userStatusOffline(wasOnline: Int32) + case userStatusRecently + case userStatusLastWeek + case userStatusLastMonth + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .userStatusEmpty: + if boxed { + buffer.appendInt32(164646985) + } + + break + case .userStatusOnline(let expires): + if boxed { + buffer.appendInt32(-306628279) + } + serializeInt32(expires, buffer: buffer, boxed: false) + break + case .userStatusOffline(let wasOnline): + if boxed { + buffer.appendInt32(9203775) + } + serializeInt32(wasOnline, buffer: buffer, boxed: false) + break + case .userStatusRecently: + if boxed { + buffer.appendInt32(-496024847) + } + + break + case .userStatusLastWeek: + if boxed { + buffer.appendInt32(129960444) + } + + break + case .userStatusLastMonth: + if boxed { + buffer.appendInt32(2011940674) + } + + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .userStatusEmpty: + return ("userStatusEmpty", []) + case .userStatusOnline(let expires): + return ("userStatusOnline", [("expires", expires)]) + case .userStatusOffline(let wasOnline): + return ("userStatusOffline", [("wasOnline", wasOnline)]) + case .userStatusRecently: + return ("userStatusRecently", []) + case .userStatusLastWeek: + return ("userStatusLastWeek", []) + case .userStatusLastMonth: + return ("userStatusLastMonth", []) + } + } + + public static func parse_userStatusEmpty(_ reader: BufferReader) -> UserStatus? { + return Api.UserStatus.userStatusEmpty + } + public static func parse_userStatusOnline(_ reader: BufferReader) -> UserStatus? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.UserStatus.userStatusOnline(expires: _1!) + } + else { + return nil + } + } + public static func parse_userStatusOffline(_ reader: BufferReader) -> UserStatus? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.UserStatus.userStatusOffline(wasOnline: _1!) + } + else { + return nil + } + } + public static func parse_userStatusRecently(_ reader: BufferReader) -> UserStatus? { + return Api.UserStatus.userStatusRecently + } + public static func parse_userStatusLastWeek(_ reader: BufferReader) -> UserStatus? { + return Api.UserStatus.userStatusLastWeek + } + public static func parse_userStatusLastMonth(_ reader: BufferReader) -> UserStatus? { + return Api.UserStatus.userStatusLastMonth + } + + } + public enum Folder: TypeConstructorDescription { + case folder(flags: Int32, id: Int32, title: String, photo: Api.ChatPhoto?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .folder(let flags, let id, let title, let photo): + if boxed { + buffer.appendInt32(-11252123) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + serializeString(title, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 3) != 0 {photo!.serialize(buffer, true)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .folder(let flags, let id, let title, let photo): + return ("folder", [("flags", flags), ("id", id), ("title", title), ("photo", photo)]) + } + } + + public static func parse_folder(_ reader: BufferReader) -> Folder? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: String? + _3 = parseString(reader) + var _4: Api.ChatPhoto? + if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.ChatPhoto + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.Folder.folder(flags: _1!, id: _2!, title: _3!, photo: _4) + } + else { + return nil + } + } + + } + public enum Dialog: TypeConstructorDescription { + case dialog(flags: Int32, peer: Api.Peer, topMessage: Int32, readInboxMaxId: Int32, readOutboxMaxId: Int32, unreadCount: Int32, unreadMentionsCount: Int32, notifySettings: Api.PeerNotifySettings, pts: Int32?, draft: Api.DraftMessage?, folderId: Int32?) + case dialogFolder(flags: Int32, folder: Api.Folder, peer: Api.Peer, topMessage: Int32, unreadMutedPeersCount: Int32, unreadUnmutedPeersCount: Int32, unreadMutedMessagesCount: Int32, unreadUnmutedMessagesCount: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .dialog(let flags, let peer, let topMessage, let readInboxMaxId, let readOutboxMaxId, let unreadCount, let unreadMentionsCount, let notifySettings, let pts, let draft, let folderId): + if boxed { + buffer.appendInt32(739712882) + } + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + serializeInt32(topMessage, buffer: buffer, boxed: false) + serializeInt32(readInboxMaxId, buffer: buffer, boxed: false) + serializeInt32(readOutboxMaxId, buffer: buffer, boxed: false) + serializeInt32(unreadCount, buffer: buffer, boxed: false) + serializeInt32(unreadMentionsCount, buffer: buffer, boxed: false) + notifySettings.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(pts!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {draft!.serialize(buffer, true)} + if Int(flags) & Int(1 << 4) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} + break + case .dialogFolder(let flags, let folder, let peer, let topMessage, let unreadMutedPeersCount, let unreadUnmutedPeersCount, let unreadMutedMessagesCount, let unreadUnmutedMessagesCount): + if boxed { + buffer.appendInt32(1908216652) + } + serializeInt32(flags, buffer: buffer, boxed: false) + folder.serialize(buffer, true) + peer.serialize(buffer, true) + serializeInt32(topMessage, buffer: buffer, boxed: false) + serializeInt32(unreadMutedPeersCount, buffer: buffer, boxed: false) + serializeInt32(unreadUnmutedPeersCount, buffer: buffer, boxed: false) + serializeInt32(unreadMutedMessagesCount, buffer: buffer, boxed: false) + serializeInt32(unreadUnmutedMessagesCount, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .dialog(let flags, let peer, let topMessage, let readInboxMaxId, let readOutboxMaxId, let unreadCount, let unreadMentionsCount, let notifySettings, let pts, let draft, let folderId): + return ("dialog", [("flags", flags), ("peer", peer), ("topMessage", topMessage), ("readInboxMaxId", readInboxMaxId), ("readOutboxMaxId", readOutboxMaxId), ("unreadCount", unreadCount), ("unreadMentionsCount", unreadMentionsCount), ("notifySettings", notifySettings), ("pts", pts), ("draft", draft), ("folderId", folderId)]) + case .dialogFolder(let flags, let folder, let peer, let topMessage, let unreadMutedPeersCount, let unreadUnmutedPeersCount, let unreadMutedMessagesCount, let unreadUnmutedMessagesCount): + return ("dialogFolder", [("flags", flags), ("folder", folder), ("peer", peer), ("topMessage", topMessage), ("unreadMutedPeersCount", unreadMutedPeersCount), ("unreadUnmutedPeersCount", unreadUnmutedPeersCount), ("unreadMutedMessagesCount", unreadMutedMessagesCount), ("unreadUnmutedMessagesCount", unreadUnmutedMessagesCount)]) + } + } + + public static func parse_dialog(_ reader: BufferReader) -> Dialog? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.Peer? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + var _6: Int32? + _6 = reader.readInt32() + var _7: Int32? + _7 = reader.readInt32() + var _8: Api.PeerNotifySettings? + if let signature = reader.readInt32() { + _8 = Api.parse(reader, signature: signature) as? Api.PeerNotifySettings + } + var _9: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_9 = reader.readInt32() } + var _10: Api.DraftMessage? + if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { + _10 = Api.parse(reader, signature: signature) as? Api.DraftMessage + } } + var _11: Int32? + if Int(_1!) & Int(1 << 4) != 0 {_11 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = _8 != nil + let _c9 = (Int(_1!) & Int(1 << 0) == 0) || _9 != nil + let _c10 = (Int(_1!) & Int(1 << 1) == 0) || _10 != nil + let _c11 = (Int(_1!) & Int(1 << 4) == 0) || _11 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { + return Api.Dialog.dialog(flags: _1!, peer: _2!, topMessage: _3!, readInboxMaxId: _4!, readOutboxMaxId: _5!, unreadCount: _6!, unreadMentionsCount: _7!, notifySettings: _8!, pts: _9, draft: _10, folderId: _11) + } + else { + return nil + } + } + public static func parse_dialogFolder(_ reader: BufferReader) -> Dialog? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.Folder? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Folder + } + var _3: Api.Peer? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + var _6: Int32? + _6 = reader.readInt32() + var _7: Int32? + _7 = reader.readInt32() + var _8: Int32? + _8 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = _8 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { + return Api.Dialog.dialogFolder(flags: _1!, folder: _2!, peer: _3!, topMessage: _4!, unreadMutedPeersCount: _5!, unreadUnmutedPeersCount: _6!, unreadMutedMessagesCount: _7!, unreadUnmutedMessagesCount: _8!) + } + else { + return nil + } + } + + } + public enum SendMessageAction: TypeConstructorDescription { + case sendMessageTypingAction + case sendMessageCancelAction + case sendMessageRecordVideoAction + case sendMessageUploadVideoAction(progress: Int32) + case sendMessageRecordAudioAction + case sendMessageUploadAudioAction(progress: Int32) + case sendMessageUploadPhotoAction(progress: Int32) + case sendMessageUploadDocumentAction(progress: Int32) + case sendMessageGeoLocationAction + case sendMessageChooseContactAction + case sendMessageGamePlayAction + case sendMessageRecordRoundAction + case sendMessageUploadRoundAction(progress: Int32) + case speakingInGroupCallAction + case sendMessageHistoryImportAction(progress: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .sendMessageTypingAction: + if boxed { + buffer.appendInt32(381645902) + } + + break + case .sendMessageCancelAction: + if boxed { + buffer.appendInt32(-44119819) + } + + break + case .sendMessageRecordVideoAction: + if boxed { + buffer.appendInt32(-1584933265) + } + + break + case .sendMessageUploadVideoAction(let progress): + if boxed { + buffer.appendInt32(-378127636) + } + serializeInt32(progress, buffer: buffer, boxed: false) + break + case .sendMessageRecordAudioAction: + if boxed { + buffer.appendInt32(-718310409) + } + + break + case .sendMessageUploadAudioAction(let progress): + if boxed { + buffer.appendInt32(-212740181) + } + serializeInt32(progress, buffer: buffer, boxed: false) + break + case .sendMessageUploadPhotoAction(let progress): + if boxed { + buffer.appendInt32(-774682074) + } + serializeInt32(progress, buffer: buffer, boxed: false) + break + case .sendMessageUploadDocumentAction(let progress): + if boxed { + buffer.appendInt32(-1441998364) + } + serializeInt32(progress, buffer: buffer, boxed: false) + break + case .sendMessageGeoLocationAction: + if boxed { + buffer.appendInt32(393186209) + } + + break + case .sendMessageChooseContactAction: + if boxed { + buffer.appendInt32(1653390447) + } + + break + case .sendMessageGamePlayAction: + if boxed { + buffer.appendInt32(-580219064) + } + + break + case .sendMessageRecordRoundAction: + if boxed { + buffer.appendInt32(-1997373508) + } + + break + case .sendMessageUploadRoundAction(let progress): + if boxed { + buffer.appendInt32(608050278) + } + serializeInt32(progress, buffer: buffer, boxed: false) + break + case .speakingInGroupCallAction: + if boxed { + buffer.appendInt32(-651419003) + } + + break + case .sendMessageHistoryImportAction(let progress): + if boxed { + buffer.appendInt32(-606432698) + } + serializeInt32(progress, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .sendMessageTypingAction: + return ("sendMessageTypingAction", []) + case .sendMessageCancelAction: + return ("sendMessageCancelAction", []) + case .sendMessageRecordVideoAction: + return ("sendMessageRecordVideoAction", []) + case .sendMessageUploadVideoAction(let progress): + return ("sendMessageUploadVideoAction", [("progress", progress)]) + case .sendMessageRecordAudioAction: + return ("sendMessageRecordAudioAction", []) + case .sendMessageUploadAudioAction(let progress): + return ("sendMessageUploadAudioAction", [("progress", progress)]) + case .sendMessageUploadPhotoAction(let progress): + return ("sendMessageUploadPhotoAction", [("progress", progress)]) + case .sendMessageUploadDocumentAction(let progress): + return ("sendMessageUploadDocumentAction", [("progress", progress)]) + case .sendMessageGeoLocationAction: + return ("sendMessageGeoLocationAction", []) + case .sendMessageChooseContactAction: + return ("sendMessageChooseContactAction", []) + case .sendMessageGamePlayAction: + return ("sendMessageGamePlayAction", []) + case .sendMessageRecordRoundAction: + return ("sendMessageRecordRoundAction", []) + case .sendMessageUploadRoundAction(let progress): + return ("sendMessageUploadRoundAction", [("progress", progress)]) + case .speakingInGroupCallAction: + return ("speakingInGroupCallAction", []) + case .sendMessageHistoryImportAction(let progress): + return ("sendMessageHistoryImportAction", [("progress", progress)]) + } + } + + public static func parse_sendMessageTypingAction(_ reader: BufferReader) -> SendMessageAction? { + return Api.SendMessageAction.sendMessageTypingAction + } + public static func parse_sendMessageCancelAction(_ reader: BufferReader) -> SendMessageAction? { + return Api.SendMessageAction.sendMessageCancelAction + } + public static func parse_sendMessageRecordVideoAction(_ reader: BufferReader) -> SendMessageAction? { + return Api.SendMessageAction.sendMessageRecordVideoAction + } + public static func parse_sendMessageUploadVideoAction(_ reader: BufferReader) -> SendMessageAction? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.SendMessageAction.sendMessageUploadVideoAction(progress: _1!) + } + else { + return nil + } + } + public static func parse_sendMessageRecordAudioAction(_ reader: BufferReader) -> SendMessageAction? { + return Api.SendMessageAction.sendMessageRecordAudioAction + } + public static func parse_sendMessageUploadAudioAction(_ reader: BufferReader) -> SendMessageAction? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.SendMessageAction.sendMessageUploadAudioAction(progress: _1!) + } + else { + return nil + } + } + public static func parse_sendMessageUploadPhotoAction(_ reader: BufferReader) -> SendMessageAction? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.SendMessageAction.sendMessageUploadPhotoAction(progress: _1!) + } + else { + return nil + } + } + public static func parse_sendMessageUploadDocumentAction(_ reader: BufferReader) -> SendMessageAction? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.SendMessageAction.sendMessageUploadDocumentAction(progress: _1!) + } + else { + return nil + } + } + public static func parse_sendMessageGeoLocationAction(_ reader: BufferReader) -> SendMessageAction? { + return Api.SendMessageAction.sendMessageGeoLocationAction + } + public static func parse_sendMessageChooseContactAction(_ reader: BufferReader) -> SendMessageAction? { + return Api.SendMessageAction.sendMessageChooseContactAction + } + public static func parse_sendMessageGamePlayAction(_ reader: BufferReader) -> SendMessageAction? { + return Api.SendMessageAction.sendMessageGamePlayAction + } + public static func parse_sendMessageRecordRoundAction(_ reader: BufferReader) -> SendMessageAction? { + return Api.SendMessageAction.sendMessageRecordRoundAction + } + public static func parse_sendMessageUploadRoundAction(_ reader: BufferReader) -> SendMessageAction? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.SendMessageAction.sendMessageUploadRoundAction(progress: _1!) + } + else { + return nil + } + } + public static func parse_speakingInGroupCallAction(_ reader: BufferReader) -> SendMessageAction? { + return Api.SendMessageAction.speakingInGroupCallAction + } + public static func parse_sendMessageHistoryImportAction(_ reader: BufferReader) -> SendMessageAction? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.SendMessageAction.sendMessageHistoryImportAction(progress: _1!) + } + else { + return nil + } + } + + } + public enum PrivacyKey: TypeConstructorDescription { + case privacyKeyStatusTimestamp + case privacyKeyChatInvite + case privacyKeyPhoneCall + case privacyKeyPhoneP2P + case privacyKeyForwards + case privacyKeyProfilePhoto + case privacyKeyPhoneNumber + case privacyKeyAddedByPhone + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .privacyKeyStatusTimestamp: + if boxed { + buffer.appendInt32(-1137792208) + } + + break + case .privacyKeyChatInvite: + if boxed { + buffer.appendInt32(1343122938) + } + + break + case .privacyKeyPhoneCall: + if boxed { + buffer.appendInt32(1030105979) + } + + break + case .privacyKeyPhoneP2P: + if boxed { + buffer.appendInt32(961092808) + } + + break + case .privacyKeyForwards: + if boxed { + buffer.appendInt32(1777096355) + } + + break + case .privacyKeyProfilePhoto: + if boxed { + buffer.appendInt32(-1777000467) + } + + break + case .privacyKeyPhoneNumber: + if boxed { + buffer.appendInt32(-778378131) + } + + break + case .privacyKeyAddedByPhone: + if boxed { + buffer.appendInt32(1124062251) + } + + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .privacyKeyStatusTimestamp: + return ("privacyKeyStatusTimestamp", []) + case .privacyKeyChatInvite: + return ("privacyKeyChatInvite", []) + case .privacyKeyPhoneCall: + return ("privacyKeyPhoneCall", []) + case .privacyKeyPhoneP2P: + return ("privacyKeyPhoneP2P", []) + case .privacyKeyForwards: + return ("privacyKeyForwards", []) + case .privacyKeyProfilePhoto: + return ("privacyKeyProfilePhoto", []) + case .privacyKeyPhoneNumber: + return ("privacyKeyPhoneNumber", []) + case .privacyKeyAddedByPhone: + return ("privacyKeyAddedByPhone", []) + } + } + + public static func parse_privacyKeyStatusTimestamp(_ reader: BufferReader) -> PrivacyKey? { + return Api.PrivacyKey.privacyKeyStatusTimestamp + } + public static func parse_privacyKeyChatInvite(_ reader: BufferReader) -> PrivacyKey? { + return Api.PrivacyKey.privacyKeyChatInvite + } + public static func parse_privacyKeyPhoneCall(_ reader: BufferReader) -> PrivacyKey? { + return Api.PrivacyKey.privacyKeyPhoneCall + } + public static func parse_privacyKeyPhoneP2P(_ reader: BufferReader) -> PrivacyKey? { + return Api.PrivacyKey.privacyKeyPhoneP2P + } + public static func parse_privacyKeyForwards(_ reader: BufferReader) -> PrivacyKey? { + return Api.PrivacyKey.privacyKeyForwards + } + public static func parse_privacyKeyProfilePhoto(_ reader: BufferReader) -> PrivacyKey? { + return Api.PrivacyKey.privacyKeyProfilePhoto + } + public static func parse_privacyKeyPhoneNumber(_ reader: BufferReader) -> PrivacyKey? { + return Api.PrivacyKey.privacyKeyPhoneNumber + } + public static func parse_privacyKeyAddedByPhone(_ reader: BufferReader) -> PrivacyKey? { + return Api.PrivacyKey.privacyKeyAddedByPhone + } + + } + public enum Update: TypeConstructorDescription { + case updateNewMessage(message: Api.Message, pts: Int32, ptsCount: Int32) + case updateMessageID(id: Int32, randomId: Int64) + case updateDeleteMessages(messages: [Int32], pts: Int32, ptsCount: Int32) + case updateUserTyping(userId: Int32, action: Api.SendMessageAction) + case updateChatUserTyping(chatId: Int32, userId: Int32, action: Api.SendMessageAction) + case updateChatParticipants(participants: Api.ChatParticipants) + case updateUserStatus(userId: Int32, status: Api.UserStatus) + case updateUserName(userId: Int32, firstName: String, lastName: String, username: String) + case updateUserPhoto(userId: Int32, date: Int32, photo: Api.UserProfilePhoto, previous: Api.Bool) + case updateNewEncryptedMessage(message: Api.EncryptedMessage, qts: Int32) + case updateEncryptedChatTyping(chatId: Int32) + case updateEncryption(chat: Api.EncryptedChat, date: Int32) + case updateEncryptedMessagesRead(chatId: Int32, maxDate: Int32, date: Int32) + case updateChatParticipantAdd(chatId: Int32, userId: Int32, inviterId: Int32, date: Int32, version: Int32) + case updateChatParticipantDelete(chatId: Int32, userId: Int32, version: Int32) + case updateDcOptions(dcOptions: [Api.DcOption]) + case updateNotifySettings(peer: Api.NotifyPeer, notifySettings: Api.PeerNotifySettings) + case updateServiceNotification(flags: Int32, inboxDate: Int32?, type: String, message: String, media: Api.MessageMedia, entities: [Api.MessageEntity]) + case updatePrivacy(key: Api.PrivacyKey, rules: [Api.PrivacyRule]) + case updateUserPhone(userId: Int32, phone: String) + case updateReadHistoryOutbox(peer: Api.Peer, maxId: Int32, pts: Int32, ptsCount: Int32) + case updateWebPage(webpage: Api.WebPage, pts: Int32, ptsCount: Int32) + case updateReadMessagesContents(messages: [Int32], pts: Int32, ptsCount: Int32) + case updateChannelTooLong(flags: Int32, channelId: Int32, pts: Int32?) + case updateChannel(channelId: Int32) + case updateNewChannelMessage(message: Api.Message, pts: Int32, ptsCount: Int32) + case updateDeleteChannelMessages(channelId: Int32, messages: [Int32], pts: Int32, ptsCount: Int32) + case updateChannelMessageViews(channelId: Int32, id: Int32, views: Int32) + case updateChatParticipantAdmin(chatId: Int32, userId: Int32, isAdmin: Api.Bool, version: Int32) + case updateNewStickerSet(stickerset: Api.messages.StickerSet) + case updateStickerSetsOrder(flags: Int32, order: [Int64]) + case updateStickerSets + case updateSavedGifs + case updateBotInlineSend(flags: Int32, userId: Int32, query: String, geo: Api.GeoPoint?, id: String, msgId: Api.InputBotInlineMessageID?) + case updateEditChannelMessage(message: Api.Message, pts: Int32, ptsCount: Int32) + case updateBotCallbackQuery(flags: Int32, queryId: Int64, userId: Int32, peer: Api.Peer, msgId: Int32, chatInstance: Int64, data: Buffer?, gameShortName: String?) + case updateEditMessage(message: Api.Message, pts: Int32, ptsCount: Int32) + case updateInlineBotCallbackQuery(flags: Int32, queryId: Int64, userId: Int32, msgId: Api.InputBotInlineMessageID, chatInstance: Int64, data: Buffer?, gameShortName: String?) + case updateReadChannelOutbox(channelId: Int32, maxId: Int32) + case updateDraftMessage(peer: Api.Peer, draft: Api.DraftMessage) + case updateReadFeaturedStickers + case updateRecentStickers + case updateConfig + case updatePtsChanged + case updateChannelWebPage(channelId: Int32, webpage: Api.WebPage, pts: Int32, ptsCount: Int32) + case updateBotWebhookJSON(data: Api.DataJSON) + case updateBotWebhookJSONQuery(queryId: Int64, data: Api.DataJSON, timeout: Int32) + case updateBotShippingQuery(queryId: Int64, userId: Int32, payload: Buffer, shippingAddress: Api.PostAddress) + case updateBotPrecheckoutQuery(flags: Int32, queryId: Int64, userId: Int32, payload: Buffer, info: Api.PaymentRequestedInfo?, shippingOptionId: String?, currency: String, totalAmount: Int64) + case updatePhoneCall(phoneCall: Api.PhoneCall) + case updateLangPack(difference: Api.LangPackDifference) + case updateFavedStickers + case updateChannelReadMessagesContents(channelId: Int32, messages: [Int32]) + case updateContactsReset + case updateChannelAvailableMessages(channelId: Int32, availableMinId: Int32) + case updateDialogUnreadMark(flags: Int32, peer: Api.DialogPeer) + case updateLangPackTooLong(langCode: String) + case updateMessagePoll(flags: Int32, pollId: Int64, poll: Api.Poll?, results: Api.PollResults) + case updateChatDefaultBannedRights(peer: Api.Peer, defaultBannedRights: Api.ChatBannedRights, version: Int32) + case updateFolderPeers(folderPeers: [Api.FolderPeer], pts: Int32, ptsCount: Int32) + case updateDialogPinned(flags: Int32, folderId: Int32?, peer: Api.DialogPeer) + case updatePinnedDialogs(flags: Int32, folderId: Int32?, order: [Api.DialogPeer]?) + case updateReadChannelInbox(flags: Int32, folderId: Int32?, channelId: Int32, maxId: Int32, stillUnreadCount: Int32, pts: Int32) + case updateReadHistoryInbox(flags: Int32, folderId: Int32?, peer: Api.Peer, maxId: Int32, stillUnreadCount: Int32, pts: Int32, ptsCount: Int32) + case updatePeerSettings(peer: Api.Peer, settings: Api.PeerSettings) + case updatePeerLocated(peers: [Api.PeerLocated]) + case updateNewScheduledMessage(message: Api.Message) + case updateDeleteScheduledMessages(peer: Api.Peer, messages: [Int32]) + case updateTheme(theme: Api.Theme) + case updateGeoLiveViewed(peer: Api.Peer, msgId: Int32) + case updateLoginToken + case updateMessagePollVote(pollId: Int64, userId: Int32, options: [Buffer]) + case updateDialogFilter(flags: Int32, id: Int32, filter: Api.DialogFilter?) + case updateDialogFilterOrder(order: [Int32]) + case updateDialogFilters + case updatePhoneCallSignalingData(phoneCallId: Int64, data: Buffer) + case updateChannelParticipant(flags: Int32, channelId: Int32, date: Int32, userId: Int32, prevParticipant: Api.ChannelParticipant?, newParticipant: Api.ChannelParticipant?, qts: Int32) + case updateChannelMessageForwards(channelId: Int32, id: Int32, forwards: Int32) + case updateReadChannelDiscussionInbox(flags: Int32, channelId: Int32, topMsgId: Int32, readMaxId: Int32, broadcastId: Int32?, broadcastPost: Int32?) + case updateReadChannelDiscussionOutbox(channelId: Int32, topMsgId: Int32, readMaxId: Int32) + case updatePeerBlocked(peerId: Api.Peer, blocked: Api.Bool) + case updateChannelUserTyping(flags: Int32, channelId: Int32, topMsgId: Int32?, userId: Int32, action: Api.SendMessageAction) + case updatePinnedMessages(flags: Int32, peer: Api.Peer, messages: [Int32], pts: Int32, ptsCount: Int32) + case updatePinnedChannelMessages(flags: Int32, channelId: Int32, messages: [Int32], pts: Int32, ptsCount: Int32) + case updateChat(chatId: Int32) + case updateGroupCallParticipants(call: Api.InputGroupCall, participants: [Api.GroupCallParticipant], version: Int32) + case updateGroupCall(chatId: Int32, call: Api.GroupCall) + case updateBotInlineQuery(flags: Int32, queryId: Int64, userId: Int32, query: String, geo: Api.GeoPoint?, peerType: Api.InlineQueryPeerType?, offset: String) + case updatePeerHistoryTTL(flags: Int32, peer: Api.Peer, ttl: Api.PeerHistoryTTL?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .updateNewMessage(let message, let pts, let ptsCount): + if boxed { + buffer.appendInt32(522914557) + } + message.serialize(buffer, true) + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(ptsCount, buffer: buffer, boxed: false) + break + case .updateMessageID(let id, let randomId): + if boxed { + buffer.appendInt32(1318109142) + } + serializeInt32(id, buffer: buffer, boxed: false) + serializeInt64(randomId, buffer: buffer, boxed: false) + break + case .updateDeleteMessages(let messages, let pts, let ptsCount): + if boxed { + buffer.appendInt32(-1576161051) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(messages.count)) + for item in messages { + serializeInt32(item, buffer: buffer, boxed: false) + } + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(ptsCount, buffer: buffer, boxed: false) + break + case .updateUserTyping(let userId, let action): + if boxed { + buffer.appendInt32(1548249383) + } + serializeInt32(userId, buffer: buffer, boxed: false) + action.serialize(buffer, true) + break + case .updateChatUserTyping(let chatId, let userId, let action): + if boxed { + buffer.appendInt32(-1704596961) + } + serializeInt32(chatId, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + action.serialize(buffer, true) + break + case .updateChatParticipants(let participants): + if boxed { + buffer.appendInt32(125178264) + } + participants.serialize(buffer, true) + break + case .updateUserStatus(let userId, let status): + if boxed { + buffer.appendInt32(469489699) + } + serializeInt32(userId, buffer: buffer, boxed: false) + status.serialize(buffer, true) + break + case .updateUserName(let userId, let firstName, let lastName, let username): + if boxed { + buffer.appendInt32(-1489818765) + } + serializeInt32(userId, buffer: buffer, boxed: false) + serializeString(firstName, buffer: buffer, boxed: false) + serializeString(lastName, buffer: buffer, boxed: false) + serializeString(username, buffer: buffer, boxed: false) + break + case .updateUserPhoto(let userId, let date, let photo, let previous): + if boxed { + buffer.appendInt32(-1791935732) + } + serializeInt32(userId, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + photo.serialize(buffer, true) + previous.serialize(buffer, true) + break + case .updateNewEncryptedMessage(let message, let qts): + if boxed { + buffer.appendInt32(314359194) + } + message.serialize(buffer, true) + serializeInt32(qts, buffer: buffer, boxed: false) + break + case .updateEncryptedChatTyping(let chatId): + if boxed { + buffer.appendInt32(386986326) + } + serializeInt32(chatId, buffer: buffer, boxed: false) + break + case .updateEncryption(let chat, let date): + if boxed { + buffer.appendInt32(-1264392051) + } + chat.serialize(buffer, true) + serializeInt32(date, buffer: buffer, boxed: false) + break + case .updateEncryptedMessagesRead(let chatId, let maxDate, let date): + if boxed { + buffer.appendInt32(956179895) + } + serializeInt32(chatId, buffer: buffer, boxed: false) + serializeInt32(maxDate, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + break + case .updateChatParticipantAdd(let chatId, let userId, let inviterId, let date, let version): + if boxed { + buffer.appendInt32(-364179876) + } + serializeInt32(chatId, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + serializeInt32(inviterId, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + serializeInt32(version, buffer: buffer, boxed: false) + break + case .updateChatParticipantDelete(let chatId, let userId, let version): + if boxed { + buffer.appendInt32(1851755554) + } + serializeInt32(chatId, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + serializeInt32(version, buffer: buffer, boxed: false) + break + case .updateDcOptions(let dcOptions): + if boxed { + buffer.appendInt32(-1906403213) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(dcOptions.count)) + for item in dcOptions { + item.serialize(buffer, true) + } + break + case .updateNotifySettings(let peer, let notifySettings): + if boxed { + buffer.appendInt32(-1094555409) + } + peer.serialize(buffer, true) + notifySettings.serialize(buffer, true) + break + case .updateServiceNotification(let flags, let inboxDate, let type, let message, let media, let entities): + if boxed { + buffer.appendInt32(-337352679) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(inboxDate!, buffer: buffer, boxed: false)} + serializeString(type, buffer: buffer, boxed: false) + serializeString(message, buffer: buffer, boxed: false) + media.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities.count)) + for item in entities { + item.serialize(buffer, true) + } + break + case .updatePrivacy(let key, let rules): + if boxed { + buffer.appendInt32(-298113238) + } + key.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(rules.count)) + for item in rules { + item.serialize(buffer, true) + } + break + case .updateUserPhone(let userId, let phone): + if boxed { + buffer.appendInt32(314130811) + } + serializeInt32(userId, buffer: buffer, boxed: false) + serializeString(phone, buffer: buffer, boxed: false) + break + case .updateReadHistoryOutbox(let peer, let maxId, let pts, let ptsCount): + if boxed { + buffer.appendInt32(791617983) + } + peer.serialize(buffer, true) + serializeInt32(maxId, buffer: buffer, boxed: false) + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(ptsCount, buffer: buffer, boxed: false) + break + case .updateWebPage(let webpage, let pts, let ptsCount): + if boxed { + buffer.appendInt32(2139689491) + } + webpage.serialize(buffer, true) + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(ptsCount, buffer: buffer, boxed: false) + break + case .updateReadMessagesContents(let messages, let pts, let ptsCount): + if boxed { + buffer.appendInt32(1757493555) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(messages.count)) + for item in messages { + serializeInt32(item, buffer: buffer, boxed: false) + } + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(ptsCount, buffer: buffer, boxed: false) + break + case .updateChannelTooLong(let flags, let channelId, let pts): + if boxed { + buffer.appendInt32(-352032773) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(channelId, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(pts!, buffer: buffer, boxed: false)} + break + case .updateChannel(let channelId): + if boxed { + buffer.appendInt32(-1227598250) + } + serializeInt32(channelId, buffer: buffer, boxed: false) + break + case .updateNewChannelMessage(let message, let pts, let ptsCount): + if boxed { + buffer.appendInt32(1656358105) + } + message.serialize(buffer, true) + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(ptsCount, buffer: buffer, boxed: false) + break + case .updateDeleteChannelMessages(let channelId, let messages, let pts, let ptsCount): + if boxed { + buffer.appendInt32(-1015733815) + } + serializeInt32(channelId, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(messages.count)) + for item in messages { + serializeInt32(item, buffer: buffer, boxed: false) + } + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(ptsCount, buffer: buffer, boxed: false) + break + case .updateChannelMessageViews(let channelId, let id, let views): + if boxed { + buffer.appendInt32(-1734268085) + } + serializeInt32(channelId, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + serializeInt32(views, buffer: buffer, boxed: false) + break + case .updateChatParticipantAdmin(let chatId, let userId, let isAdmin, let version): + if boxed { + buffer.appendInt32(-1232070311) + } + serializeInt32(chatId, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + isAdmin.serialize(buffer, true) + serializeInt32(version, buffer: buffer, boxed: false) + break + case .updateNewStickerSet(let stickerset): + if boxed { + buffer.appendInt32(1753886890) + } + stickerset.serialize(buffer, true) + break + case .updateStickerSetsOrder(let flags, let order): + if boxed { + buffer.appendInt32(196268545) + } + serializeInt32(flags, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(order.count)) + for item in order { + serializeInt64(item, buffer: buffer, boxed: false) + } + break + case .updateStickerSets: + if boxed { + buffer.appendInt32(1135492588) + } + + break + case .updateSavedGifs: + if boxed { + buffer.appendInt32(-1821035490) + } + + break + case .updateBotInlineSend(let flags, let userId, let query, let geo, let id, let msgId): + if boxed { + buffer.appendInt32(239663460) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + serializeString(query, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {geo!.serialize(buffer, true)} + serializeString(id, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {msgId!.serialize(buffer, true)} + break + case .updateEditChannelMessage(let message, let pts, let ptsCount): + if boxed { + buffer.appendInt32(457133559) + } + message.serialize(buffer, true) + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(ptsCount, buffer: buffer, boxed: false) + break + case .updateBotCallbackQuery(let flags, let queryId, let userId, let peer, let msgId, let chatInstance, let data, let gameShortName): + if boxed { + buffer.appendInt32(-415938591) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(queryId, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + serializeInt32(msgId, buffer: buffer, boxed: false) + serializeInt64(chatInstance, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeBytes(data!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeString(gameShortName!, buffer: buffer, boxed: false)} + break + case .updateEditMessage(let message, let pts, let ptsCount): + if boxed { + buffer.appendInt32(-469536605) + } + message.serialize(buffer, true) + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(ptsCount, buffer: buffer, boxed: false) + break + case .updateInlineBotCallbackQuery(let flags, let queryId, let userId, let msgId, let chatInstance, let data, let gameShortName): + if boxed { + buffer.appendInt32(-103646630) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(queryId, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + msgId.serialize(buffer, true) + serializeInt64(chatInstance, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeBytes(data!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeString(gameShortName!, buffer: buffer, boxed: false)} + break + case .updateReadChannelOutbox(let channelId, let maxId): + if boxed { + buffer.appendInt32(634833351) + } + serializeInt32(channelId, buffer: buffer, boxed: false) + serializeInt32(maxId, buffer: buffer, boxed: false) + break + case .updateDraftMessage(let peer, let draft): + if boxed { + buffer.appendInt32(-299124375) + } + peer.serialize(buffer, true) + draft.serialize(buffer, true) + break + case .updateReadFeaturedStickers: + if boxed { + buffer.appendInt32(1461528386) + } + + break + case .updateRecentStickers: + if boxed { + buffer.appendInt32(-1706939360) + } + + break + case .updateConfig: + if boxed { + buffer.appendInt32(-1574314746) + } + + break + case .updatePtsChanged: + if boxed { + buffer.appendInt32(861169551) + } + + break + case .updateChannelWebPage(let channelId, let webpage, let pts, let ptsCount): + if boxed { + buffer.appendInt32(1081547008) + } + serializeInt32(channelId, buffer: buffer, boxed: false) + webpage.serialize(buffer, true) + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(ptsCount, buffer: buffer, boxed: false) + break + case .updateBotWebhookJSON(let data): + if boxed { + buffer.appendInt32(-2095595325) + } + data.serialize(buffer, true) + break + case .updateBotWebhookJSONQuery(let queryId, let data, let timeout): + if boxed { + buffer.appendInt32(-1684914010) + } + serializeInt64(queryId, buffer: buffer, boxed: false) + data.serialize(buffer, true) + serializeInt32(timeout, buffer: buffer, boxed: false) + break + case .updateBotShippingQuery(let queryId, let userId, let payload, let shippingAddress): + if boxed { + buffer.appendInt32(-523384512) + } + serializeInt64(queryId, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + serializeBytes(payload, buffer: buffer, boxed: false) + shippingAddress.serialize(buffer, true) + break + case .updateBotPrecheckoutQuery(let flags, let queryId, let userId, let payload, let info, let shippingOptionId, let currency, let totalAmount): + if boxed { + buffer.appendInt32(1563376297) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(queryId, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + serializeBytes(payload, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {info!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {serializeString(shippingOptionId!, buffer: buffer, boxed: false)} + serializeString(currency, buffer: buffer, boxed: false) + serializeInt64(totalAmount, buffer: buffer, boxed: false) + break + case .updatePhoneCall(let phoneCall): + if boxed { + buffer.appendInt32(-1425052898) + } + phoneCall.serialize(buffer, true) + break + case .updateLangPack(let difference): + if boxed { + buffer.appendInt32(1442983757) + } + difference.serialize(buffer, true) + break + case .updateFavedStickers: + if boxed { + buffer.appendInt32(-451831443) + } + + break + case .updateChannelReadMessagesContents(let channelId, let messages): + if boxed { + buffer.appendInt32(-1987495099) + } + serializeInt32(channelId, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(messages.count)) + for item in messages { + serializeInt32(item, buffer: buffer, boxed: false) + } + break + case .updateContactsReset: + if boxed { + buffer.appendInt32(1887741886) + } + + break + case .updateChannelAvailableMessages(let channelId, let availableMinId): + if boxed { + buffer.appendInt32(1893427255) + } + serializeInt32(channelId, buffer: buffer, boxed: false) + serializeInt32(availableMinId, buffer: buffer, boxed: false) + break + case .updateDialogUnreadMark(let flags, let peer): + if boxed { + buffer.appendInt32(-513517117) + } + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + break + case .updateLangPackTooLong(let langCode): + if boxed { + buffer.appendInt32(1180041828) + } + serializeString(langCode, buffer: buffer, boxed: false) + break + case .updateMessagePoll(let flags, let pollId, let poll, let results): + if boxed { + buffer.appendInt32(-1398708869) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(pollId, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {poll!.serialize(buffer, true)} + results.serialize(buffer, true) + break + case .updateChatDefaultBannedRights(let peer, let defaultBannedRights, let version): + if boxed { + buffer.appendInt32(1421875280) + } + peer.serialize(buffer, true) + defaultBannedRights.serialize(buffer, true) + serializeInt32(version, buffer: buffer, boxed: false) + break + case .updateFolderPeers(let folderPeers, let pts, let ptsCount): + if boxed { + buffer.appendInt32(422972864) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(folderPeers.count)) + for item in folderPeers { + item.serialize(buffer, true) + } + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(ptsCount, buffer: buffer, boxed: false) + break + case .updateDialogPinned(let flags, let folderId, let peer): + if boxed { + buffer.appendInt32(1852826908) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} + peer.serialize(buffer, true) + break + case .updatePinnedDialogs(let flags, let folderId, let order): + if boxed { + buffer.appendInt32(-99664734) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 0) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(order!.count)) + for item in order! { + item.serialize(buffer, true) + }} + break + case .updateReadChannelInbox(let flags, let folderId, let channelId, let maxId, let stillUnreadCount, let pts): + if boxed { + buffer.appendInt32(856380452) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} + serializeInt32(channelId, buffer: buffer, boxed: false) + serializeInt32(maxId, buffer: buffer, boxed: false) + serializeInt32(stillUnreadCount, buffer: buffer, boxed: false) + serializeInt32(pts, buffer: buffer, boxed: false) + break + case .updateReadHistoryInbox(let flags, let folderId, let peer, let maxId, let stillUnreadCount, let pts, let ptsCount): + if boxed { + buffer.appendInt32(-1667805217) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} + peer.serialize(buffer, true) + serializeInt32(maxId, buffer: buffer, boxed: false) + serializeInt32(stillUnreadCount, buffer: buffer, boxed: false) + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(ptsCount, buffer: buffer, boxed: false) + break + case .updatePeerSettings(let peer, let settings): + if boxed { + buffer.appendInt32(1786671974) + } + peer.serialize(buffer, true) + settings.serialize(buffer, true) + break + case .updatePeerLocated(let peers): + if boxed { + buffer.appendInt32(-1263546448) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(peers.count)) + for item in peers { + item.serialize(buffer, true) + } + break + case .updateNewScheduledMessage(let message): + if boxed { + buffer.appendInt32(967122427) + } + message.serialize(buffer, true) + break + case .updateDeleteScheduledMessages(let peer, let messages): + if boxed { + buffer.appendInt32(-1870238482) + } + peer.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(messages.count)) + for item in messages { + serializeInt32(item, buffer: buffer, boxed: false) + } + break + case .updateTheme(let theme): + if boxed { + buffer.appendInt32(-2112423005) + } + theme.serialize(buffer, true) + break + case .updateGeoLiveViewed(let peer, let msgId): + if boxed { + buffer.appendInt32(-2027964103) + } + peer.serialize(buffer, true) + serializeInt32(msgId, buffer: buffer, boxed: false) + break + case .updateLoginToken: + if boxed { + buffer.appendInt32(1448076945) + } + + break + case .updateMessagePollVote(let pollId, let userId, let options): + if boxed { + buffer.appendInt32(1123585836) + } + serializeInt64(pollId, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(options.count)) + for item in options { + serializeBytes(item, buffer: buffer, boxed: false) + } + break + case .updateDialogFilter(let flags, let id, let filter): + if boxed { + buffer.appendInt32(654302845) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {filter!.serialize(buffer, true)} + break + case .updateDialogFilterOrder(let order): + if boxed { + buffer.appendInt32(-1512627963) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(order.count)) + for item in order { + serializeInt32(item, buffer: buffer, boxed: false) + } + break + case .updateDialogFilters: + if boxed { + buffer.appendInt32(889491791) + } + + break + case .updatePhoneCallSignalingData(let phoneCallId, let data): + if boxed { + buffer.appendInt32(643940105) + } + serializeInt64(phoneCallId, buffer: buffer, boxed: false) + serializeBytes(data, buffer: buffer, boxed: false) + break + case .updateChannelParticipant(let flags, let channelId, let date, let userId, let prevParticipant, let newParticipant, let qts): + if boxed { + buffer.appendInt32(1708307556) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(channelId, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {prevParticipant!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {newParticipant!.serialize(buffer, true)} + serializeInt32(qts, buffer: buffer, boxed: false) + break + case .updateChannelMessageForwards(let channelId, let id, let forwards): + if boxed { + buffer.appendInt32(1854571743) + } + serializeInt32(channelId, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + serializeInt32(forwards, buffer: buffer, boxed: false) + break + case .updateReadChannelDiscussionInbox(let flags, let channelId, let topMsgId, let readMaxId, let broadcastId, let broadcastPost): + if boxed { + buffer.appendInt32(482860628) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(channelId, buffer: buffer, boxed: false) + serializeInt32(topMsgId, buffer: buffer, boxed: false) + serializeInt32(readMaxId, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(broadcastId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(broadcastPost!, buffer: buffer, boxed: false)} + break + case .updateReadChannelDiscussionOutbox(let channelId, let topMsgId, let readMaxId): + if boxed { + buffer.appendInt32(1178116716) + } + serializeInt32(channelId, buffer: buffer, boxed: false) + serializeInt32(topMsgId, buffer: buffer, boxed: false) + serializeInt32(readMaxId, buffer: buffer, boxed: false) + break + case .updatePeerBlocked(let peerId, let blocked): + if boxed { + buffer.appendInt32(610945826) + } + peerId.serialize(buffer, true) + blocked.serialize(buffer, true) + break + case .updateChannelUserTyping(let flags, let channelId, let topMsgId, let userId, let action): + if boxed { + buffer.appendInt32(-13975905) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(channelId, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(topMsgId!, buffer: buffer, boxed: false)} + serializeInt32(userId, buffer: buffer, boxed: false) + action.serialize(buffer, true) + break + case .updatePinnedMessages(let flags, let peer, let messages, let pts, let ptsCount): + if boxed { + buffer.appendInt32(-309990731) + } + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(messages.count)) + for item in messages { + serializeInt32(item, buffer: buffer, boxed: false) + } + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(ptsCount, buffer: buffer, boxed: false) + break + case .updatePinnedChannelMessages(let flags, let channelId, let messages, let pts, let ptsCount): + if boxed { + buffer.appendInt32(-2054649973) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(channelId, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(messages.count)) + for item in messages { + serializeInt32(item, buffer: buffer, boxed: false) + } + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(ptsCount, buffer: buffer, boxed: false) + break + case .updateChat(let chatId): + if boxed { + buffer.appendInt32(321954198) + } + serializeInt32(chatId, buffer: buffer, boxed: false) + break + case .updateGroupCallParticipants(let call, let participants, let version): + if boxed { + buffer.appendInt32(-219423922) + } + call.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(participants.count)) + for item in participants { + item.serialize(buffer, true) + } + serializeInt32(version, buffer: buffer, boxed: false) + break + case .updateGroupCall(let chatId, let call): + if boxed { + buffer.appendInt32(-1537295973) + } + serializeInt32(chatId, buffer: buffer, boxed: false) + call.serialize(buffer, true) + break + case .updateBotInlineQuery(let flags, let queryId, let userId, let query, let geo, let peerType, let offset): + if boxed { + buffer.appendInt32(1059076315) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(queryId, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + serializeString(query, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {geo!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {peerType!.serialize(buffer, true)} + serializeString(offset, buffer: buffer, boxed: false) + break + case .updatePeerHistoryTTL(let flags, let peer, let ttl): + if boxed { + buffer.appendInt32(19291112) + } + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {ttl!.serialize(buffer, true)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .updateNewMessage(let message, let pts, let ptsCount): + return ("updateNewMessage", [("message", message), ("pts", pts), ("ptsCount", ptsCount)]) + case .updateMessageID(let id, let randomId): + return ("updateMessageID", [("id", id), ("randomId", randomId)]) + case .updateDeleteMessages(let messages, let pts, let ptsCount): + return ("updateDeleteMessages", [("messages", messages), ("pts", pts), ("ptsCount", ptsCount)]) + case .updateUserTyping(let userId, let action): + return ("updateUserTyping", [("userId", userId), ("action", action)]) + case .updateChatUserTyping(let chatId, let userId, let action): + return ("updateChatUserTyping", [("chatId", chatId), ("userId", userId), ("action", action)]) + case .updateChatParticipants(let participants): + return ("updateChatParticipants", [("participants", participants)]) + case .updateUserStatus(let userId, let status): + return ("updateUserStatus", [("userId", userId), ("status", status)]) + case .updateUserName(let userId, let firstName, let lastName, let username): + return ("updateUserName", [("userId", userId), ("firstName", firstName), ("lastName", lastName), ("username", username)]) + case .updateUserPhoto(let userId, let date, let photo, let previous): + return ("updateUserPhoto", [("userId", userId), ("date", date), ("photo", photo), ("previous", previous)]) + case .updateNewEncryptedMessage(let message, let qts): + return ("updateNewEncryptedMessage", [("message", message), ("qts", qts)]) + case .updateEncryptedChatTyping(let chatId): + return ("updateEncryptedChatTyping", [("chatId", chatId)]) + case .updateEncryption(let chat, let date): + return ("updateEncryption", [("chat", chat), ("date", date)]) + case .updateEncryptedMessagesRead(let chatId, let maxDate, let date): + return ("updateEncryptedMessagesRead", [("chatId", chatId), ("maxDate", maxDate), ("date", date)]) + case .updateChatParticipantAdd(let chatId, let userId, let inviterId, let date, let version): + return ("updateChatParticipantAdd", [("chatId", chatId), ("userId", userId), ("inviterId", inviterId), ("date", date), ("version", version)]) + case .updateChatParticipantDelete(let chatId, let userId, let version): + return ("updateChatParticipantDelete", [("chatId", chatId), ("userId", userId), ("version", version)]) + case .updateDcOptions(let dcOptions): + return ("updateDcOptions", [("dcOptions", dcOptions)]) + case .updateNotifySettings(let peer, let notifySettings): + return ("updateNotifySettings", [("peer", peer), ("notifySettings", notifySettings)]) + case .updateServiceNotification(let flags, let inboxDate, let type, let message, let media, let entities): + return ("updateServiceNotification", [("flags", flags), ("inboxDate", inboxDate), ("type", type), ("message", message), ("media", media), ("entities", entities)]) + case .updatePrivacy(let key, let rules): + return ("updatePrivacy", [("key", key), ("rules", rules)]) + case .updateUserPhone(let userId, let phone): + return ("updateUserPhone", [("userId", userId), ("phone", phone)]) + case .updateReadHistoryOutbox(let peer, let maxId, let pts, let ptsCount): + return ("updateReadHistoryOutbox", [("peer", peer), ("maxId", maxId), ("pts", pts), ("ptsCount", ptsCount)]) + case .updateWebPage(let webpage, let pts, let ptsCount): + return ("updateWebPage", [("webpage", webpage), ("pts", pts), ("ptsCount", ptsCount)]) + case .updateReadMessagesContents(let messages, let pts, let ptsCount): + return ("updateReadMessagesContents", [("messages", messages), ("pts", pts), ("ptsCount", ptsCount)]) + case .updateChannelTooLong(let flags, let channelId, let pts): + return ("updateChannelTooLong", [("flags", flags), ("channelId", channelId), ("pts", pts)]) + case .updateChannel(let channelId): + return ("updateChannel", [("channelId", channelId)]) + case .updateNewChannelMessage(let message, let pts, let ptsCount): + return ("updateNewChannelMessage", [("message", message), ("pts", pts), ("ptsCount", ptsCount)]) + case .updateDeleteChannelMessages(let channelId, let messages, let pts, let ptsCount): + return ("updateDeleteChannelMessages", [("channelId", channelId), ("messages", messages), ("pts", pts), ("ptsCount", ptsCount)]) + case .updateChannelMessageViews(let channelId, let id, let views): + return ("updateChannelMessageViews", [("channelId", channelId), ("id", id), ("views", views)]) + case .updateChatParticipantAdmin(let chatId, let userId, let isAdmin, let version): + return ("updateChatParticipantAdmin", [("chatId", chatId), ("userId", userId), ("isAdmin", isAdmin), ("version", version)]) + case .updateNewStickerSet(let stickerset): + return ("updateNewStickerSet", [("stickerset", stickerset)]) + case .updateStickerSetsOrder(let flags, let order): + return ("updateStickerSetsOrder", [("flags", flags), ("order", order)]) + case .updateStickerSets: + return ("updateStickerSets", []) + case .updateSavedGifs: + return ("updateSavedGifs", []) + case .updateBotInlineSend(let flags, let userId, let query, let geo, let id, let msgId): + return ("updateBotInlineSend", [("flags", flags), ("userId", userId), ("query", query), ("geo", geo), ("id", id), ("msgId", msgId)]) + case .updateEditChannelMessage(let message, let pts, let ptsCount): + return ("updateEditChannelMessage", [("message", message), ("pts", pts), ("ptsCount", ptsCount)]) + case .updateBotCallbackQuery(let flags, let queryId, let userId, let peer, let msgId, let chatInstance, let data, let gameShortName): + return ("updateBotCallbackQuery", [("flags", flags), ("queryId", queryId), ("userId", userId), ("peer", peer), ("msgId", msgId), ("chatInstance", chatInstance), ("data", data), ("gameShortName", gameShortName)]) + case .updateEditMessage(let message, let pts, let ptsCount): + return ("updateEditMessage", [("message", message), ("pts", pts), ("ptsCount", ptsCount)]) + case .updateInlineBotCallbackQuery(let flags, let queryId, let userId, let msgId, let chatInstance, let data, let gameShortName): + return ("updateInlineBotCallbackQuery", [("flags", flags), ("queryId", queryId), ("userId", userId), ("msgId", msgId), ("chatInstance", chatInstance), ("data", data), ("gameShortName", gameShortName)]) + case .updateReadChannelOutbox(let channelId, let maxId): + return ("updateReadChannelOutbox", [("channelId", channelId), ("maxId", maxId)]) + case .updateDraftMessage(let peer, let draft): + return ("updateDraftMessage", [("peer", peer), ("draft", draft)]) + case .updateReadFeaturedStickers: + return ("updateReadFeaturedStickers", []) + case .updateRecentStickers: + return ("updateRecentStickers", []) + case .updateConfig: + return ("updateConfig", []) + case .updatePtsChanged: + return ("updatePtsChanged", []) + case .updateChannelWebPage(let channelId, let webpage, let pts, let ptsCount): + return ("updateChannelWebPage", [("channelId", channelId), ("webpage", webpage), ("pts", pts), ("ptsCount", ptsCount)]) + case .updateBotWebhookJSON(let data): + return ("updateBotWebhookJSON", [("data", data)]) + case .updateBotWebhookJSONQuery(let queryId, let data, let timeout): + return ("updateBotWebhookJSONQuery", [("queryId", queryId), ("data", data), ("timeout", timeout)]) + case .updateBotShippingQuery(let queryId, let userId, let payload, let shippingAddress): + return ("updateBotShippingQuery", [("queryId", queryId), ("userId", userId), ("payload", payload), ("shippingAddress", shippingAddress)]) + case .updateBotPrecheckoutQuery(let flags, let queryId, let userId, let payload, let info, let shippingOptionId, let currency, let totalAmount): + return ("updateBotPrecheckoutQuery", [("flags", flags), ("queryId", queryId), ("userId", userId), ("payload", payload), ("info", info), ("shippingOptionId", shippingOptionId), ("currency", currency), ("totalAmount", totalAmount)]) + case .updatePhoneCall(let phoneCall): + return ("updatePhoneCall", [("phoneCall", phoneCall)]) + case .updateLangPack(let difference): + return ("updateLangPack", [("difference", difference)]) + case .updateFavedStickers: + return ("updateFavedStickers", []) + case .updateChannelReadMessagesContents(let channelId, let messages): + return ("updateChannelReadMessagesContents", [("channelId", channelId), ("messages", messages)]) + case .updateContactsReset: + return ("updateContactsReset", []) + case .updateChannelAvailableMessages(let channelId, let availableMinId): + return ("updateChannelAvailableMessages", [("channelId", channelId), ("availableMinId", availableMinId)]) + case .updateDialogUnreadMark(let flags, let peer): + return ("updateDialogUnreadMark", [("flags", flags), ("peer", peer)]) + case .updateLangPackTooLong(let langCode): + return ("updateLangPackTooLong", [("langCode", langCode)]) + case .updateMessagePoll(let flags, let pollId, let poll, let results): + return ("updateMessagePoll", [("flags", flags), ("pollId", pollId), ("poll", poll), ("results", results)]) + case .updateChatDefaultBannedRights(let peer, let defaultBannedRights, let version): + return ("updateChatDefaultBannedRights", [("peer", peer), ("defaultBannedRights", defaultBannedRights), ("version", version)]) + case .updateFolderPeers(let folderPeers, let pts, let ptsCount): + return ("updateFolderPeers", [("folderPeers", folderPeers), ("pts", pts), ("ptsCount", ptsCount)]) + case .updateDialogPinned(let flags, let folderId, let peer): + return ("updateDialogPinned", [("flags", flags), ("folderId", folderId), ("peer", peer)]) + case .updatePinnedDialogs(let flags, let folderId, let order): + return ("updatePinnedDialogs", [("flags", flags), ("folderId", folderId), ("order", order)]) + case .updateReadChannelInbox(let flags, let folderId, let channelId, let maxId, let stillUnreadCount, let pts): + return ("updateReadChannelInbox", [("flags", flags), ("folderId", folderId), ("channelId", channelId), ("maxId", maxId), ("stillUnreadCount", stillUnreadCount), ("pts", pts)]) + case .updateReadHistoryInbox(let flags, let folderId, let peer, let maxId, let stillUnreadCount, let pts, let ptsCount): + return ("updateReadHistoryInbox", [("flags", flags), ("folderId", folderId), ("peer", peer), ("maxId", maxId), ("stillUnreadCount", stillUnreadCount), ("pts", pts), ("ptsCount", ptsCount)]) + case .updatePeerSettings(let peer, let settings): + return ("updatePeerSettings", [("peer", peer), ("settings", settings)]) + case .updatePeerLocated(let peers): + return ("updatePeerLocated", [("peers", peers)]) + case .updateNewScheduledMessage(let message): + return ("updateNewScheduledMessage", [("message", message)]) + case .updateDeleteScheduledMessages(let peer, let messages): + return ("updateDeleteScheduledMessages", [("peer", peer), ("messages", messages)]) + case .updateTheme(let theme): + return ("updateTheme", [("theme", theme)]) + case .updateGeoLiveViewed(let peer, let msgId): + return ("updateGeoLiveViewed", [("peer", peer), ("msgId", msgId)]) + case .updateLoginToken: + return ("updateLoginToken", []) + case .updateMessagePollVote(let pollId, let userId, let options): + return ("updateMessagePollVote", [("pollId", pollId), ("userId", userId), ("options", options)]) + case .updateDialogFilter(let flags, let id, let filter): + return ("updateDialogFilter", [("flags", flags), ("id", id), ("filter", filter)]) + case .updateDialogFilterOrder(let order): + return ("updateDialogFilterOrder", [("order", order)]) + case .updateDialogFilters: + return ("updateDialogFilters", []) + case .updatePhoneCallSignalingData(let phoneCallId, let data): + return ("updatePhoneCallSignalingData", [("phoneCallId", phoneCallId), ("data", data)]) + case .updateChannelParticipant(let flags, let channelId, let date, let userId, let prevParticipant, let newParticipant, let qts): + return ("updateChannelParticipant", [("flags", flags), ("channelId", channelId), ("date", date), ("userId", userId), ("prevParticipant", prevParticipant), ("newParticipant", newParticipant), ("qts", qts)]) + case .updateChannelMessageForwards(let channelId, let id, let forwards): + return ("updateChannelMessageForwards", [("channelId", channelId), ("id", id), ("forwards", forwards)]) + case .updateReadChannelDiscussionInbox(let flags, let channelId, let topMsgId, let readMaxId, let broadcastId, let broadcastPost): + return ("updateReadChannelDiscussionInbox", [("flags", flags), ("channelId", channelId), ("topMsgId", topMsgId), ("readMaxId", readMaxId), ("broadcastId", broadcastId), ("broadcastPost", broadcastPost)]) + case .updateReadChannelDiscussionOutbox(let channelId, let topMsgId, let readMaxId): + return ("updateReadChannelDiscussionOutbox", [("channelId", channelId), ("topMsgId", topMsgId), ("readMaxId", readMaxId)]) + case .updatePeerBlocked(let peerId, let blocked): + return ("updatePeerBlocked", [("peerId", peerId), ("blocked", blocked)]) + case .updateChannelUserTyping(let flags, let channelId, let topMsgId, let userId, let action): + return ("updateChannelUserTyping", [("flags", flags), ("channelId", channelId), ("topMsgId", topMsgId), ("userId", userId), ("action", action)]) + case .updatePinnedMessages(let flags, let peer, let messages, let pts, let ptsCount): + return ("updatePinnedMessages", [("flags", flags), ("peer", peer), ("messages", messages), ("pts", pts), ("ptsCount", ptsCount)]) + case .updatePinnedChannelMessages(let flags, let channelId, let messages, let pts, let ptsCount): + return ("updatePinnedChannelMessages", [("flags", flags), ("channelId", channelId), ("messages", messages), ("pts", pts), ("ptsCount", ptsCount)]) + case .updateChat(let chatId): + return ("updateChat", [("chatId", chatId)]) + case .updateGroupCallParticipants(let call, let participants, let version): + return ("updateGroupCallParticipants", [("call", call), ("participants", participants), ("version", version)]) + case .updateGroupCall(let chatId, let call): + return ("updateGroupCall", [("chatId", chatId), ("call", call)]) + case .updateBotInlineQuery(let flags, let queryId, let userId, let query, let geo, let peerType, let offset): + return ("updateBotInlineQuery", [("flags", flags), ("queryId", queryId), ("userId", userId), ("query", query), ("geo", geo), ("peerType", peerType), ("offset", offset)]) + case .updatePeerHistoryTTL(let flags, let peer, let ttl): + return ("updatePeerHistoryTTL", [("flags", flags), ("peer", peer), ("ttl", ttl)]) + } + } + + public static func parse_updateNewMessage(_ reader: BufferReader) -> Update? { + var _1: Api.Message? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Message + } + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateNewMessage(message: _1!, pts: _2!, ptsCount: _3!) + } + else { + return nil + } + } + public static func parse_updateMessageID(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Update.updateMessageID(id: _1!, randomId: _2!) + } + else { + return nil + } + } + public static func parse_updateDeleteMessages(_ reader: BufferReader) -> Update? { + var _1: [Int32]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) + } + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateDeleteMessages(messages: _1!, pts: _2!, ptsCount: _3!) + } + else { + return nil + } + } + public static func parse_updateUserTyping(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.SendMessageAction? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.SendMessageAction + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Update.updateUserTyping(userId: _1!, action: _2!) + } + else { + return nil + } + } + public static func parse_updateChatUserTyping(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Api.SendMessageAction? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.SendMessageAction + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateChatUserTyping(chatId: _1!, userId: _2!, action: _3!) + } + else { + return nil + } + } + public static func parse_updateChatParticipants(_ reader: BufferReader) -> Update? { + var _1: Api.ChatParticipants? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.ChatParticipants + } + let _c1 = _1 != nil + if _c1 { + return Api.Update.updateChatParticipants(participants: _1!) + } + else { + return nil + } + } + public static func parse_updateUserStatus(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.UserStatus? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.UserStatus + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Update.updateUserStatus(userId: _1!, status: _2!) + } + else { + return nil + } + } + public static func parse_updateUserName(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.Update.updateUserName(userId: _1!, firstName: _2!, lastName: _3!, username: _4!) + } + else { + return nil + } + } + public static func parse_updateUserPhoto(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Api.UserProfilePhoto? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.UserProfilePhoto + } + var _4: Api.Bool? + if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.Bool + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.Update.updateUserPhoto(userId: _1!, date: _2!, photo: _3!, previous: _4!) + } + else { + return nil + } + } + public static func parse_updateNewEncryptedMessage(_ reader: BufferReader) -> Update? { + var _1: Api.EncryptedMessage? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.EncryptedMessage + } + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Update.updateNewEncryptedMessage(message: _1!, qts: _2!) + } + else { + return nil + } + } + public static func parse_updateEncryptedChatTyping(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.Update.updateEncryptedChatTyping(chatId: _1!) + } + else { + return nil + } + } + public static func parse_updateEncryption(_ reader: BufferReader) -> Update? { + var _1: Api.EncryptedChat? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.EncryptedChat + } + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Update.updateEncryption(chat: _1!, date: _2!) + } + else { + return nil + } + } + public static func parse_updateEncryptedMessagesRead(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateEncryptedMessagesRead(chatId: _1!, maxDate: _2!, date: _3!) + } + else { + return nil + } + } + public static func parse_updateChatParticipantAdd(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.Update.updateChatParticipantAdd(chatId: _1!, userId: _2!, inviterId: _3!, date: _4!, version: _5!) + } + else { + return nil + } + } + public static func parse_updateChatParticipantDelete(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateChatParticipantDelete(chatId: _1!, userId: _2!, version: _3!) + } + else { + return nil + } + } + public static func parse_updateDcOptions(_ reader: BufferReader) -> Update? { + var _1: [Api.DcOption]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DcOption.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.Update.updateDcOptions(dcOptions: _1!) + } + else { + return nil + } + } + public static func parse_updateNotifySettings(_ reader: BufferReader) -> Update? { + var _1: Api.NotifyPeer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.NotifyPeer + } + var _2: Api.PeerNotifySettings? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.PeerNotifySettings + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Update.updateNotifySettings(peer: _1!, notifySettings: _2!) + } + else { + return nil + } + } + public static func parse_updateServiceNotification(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_2 = reader.readInt32() } + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + var _5: Api.MessageMedia? + if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.MessageMedia + } + var _6: [Api.MessageEntity]? + if let _ = reader.readInt32() { + _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) + } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.Update.updateServiceNotification(flags: _1!, inboxDate: _2, type: _3!, message: _4!, media: _5!, entities: _6!) + } + else { + return nil + } + } + public static func parse_updatePrivacy(_ reader: BufferReader) -> Update? { + var _1: Api.PrivacyKey? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.PrivacyKey + } + var _2: [Api.PrivacyRule]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PrivacyRule.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Update.updatePrivacy(key: _1!, rules: _2!) + } + else { + return nil + } + } + public static func parse_updateUserPhone(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Update.updateUserPhone(userId: _1!, phone: _2!) + } + else { + return nil + } + } + public static func parse_updateReadHistoryOutbox(_ reader: BufferReader) -> Update? { + var _1: Api.Peer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.Update.updateReadHistoryOutbox(peer: _1!, maxId: _2!, pts: _3!, ptsCount: _4!) + } + else { + return nil + } + } + public static func parse_updateWebPage(_ reader: BufferReader) -> Update? { + var _1: Api.WebPage? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.WebPage + } + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateWebPage(webpage: _1!, pts: _2!, ptsCount: _3!) + } + else { + return nil + } + } + public static func parse_updateReadMessagesContents(_ reader: BufferReader) -> Update? { + var _1: [Int32]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) + } + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateReadMessagesContents(messages: _1!, pts: _2!, ptsCount: _3!) + } + else { + return nil + } + } + public static func parse_updateChannelTooLong(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateChannelTooLong(flags: _1!, channelId: _2!, pts: _3) + } + else { + return nil + } + } + public static func parse_updateChannel(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.Update.updateChannel(channelId: _1!) + } + else { + return nil + } + } + public static func parse_updateNewChannelMessage(_ reader: BufferReader) -> Update? { + var _1: Api.Message? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Message + } + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateNewChannelMessage(message: _1!, pts: _2!, ptsCount: _3!) + } + else { + return nil + } + } + public static func parse_updateDeleteChannelMessages(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: [Int32]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) + } + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.Update.updateDeleteChannelMessages(channelId: _1!, messages: _2!, pts: _3!, ptsCount: _4!) + } + else { + return nil + } + } + public static func parse_updateChannelMessageViews(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateChannelMessageViews(channelId: _1!, id: _2!, views: _3!) + } + else { + return nil + } + } + public static func parse_updateChatParticipantAdmin(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Api.Bool? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.Bool + } + var _4: Int32? + _4 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.Update.updateChatParticipantAdmin(chatId: _1!, userId: _2!, isAdmin: _3!, version: _4!) + } + else { + return nil + } + } + public static func parse_updateNewStickerSet(_ reader: BufferReader) -> Update? { + var _1: Api.messages.StickerSet? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.messages.StickerSet + } + let _c1 = _1 != nil + if _c1 { + return Api.Update.updateNewStickerSet(stickerset: _1!) + } + else { + return nil + } + } + public static func parse_updateStickerSetsOrder(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: [Int64]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Update.updateStickerSetsOrder(flags: _1!, order: _2!) + } + else { + return nil + } + } + public static func parse_updateStickerSets(_ reader: BufferReader) -> Update? { + return Api.Update.updateStickerSets + } + public static func parse_updateSavedGifs(_ reader: BufferReader) -> Update? { + return Api.Update.updateSavedGifs + } + public static func parse_updateBotInlineSend(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: String? + _3 = parseString(reader) + var _4: Api.GeoPoint? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.GeoPoint + } } + var _5: String? + _5 = parseString(reader) + var _6: Api.InputBotInlineMessageID? + if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.InputBotInlineMessageID + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c5 = _5 != nil + let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.Update.updateBotInlineSend(flags: _1!, userId: _2!, query: _3!, geo: _4, id: _5!, msgId: _6) + } + else { + return nil + } + } + public static func parse_updateEditChannelMessage(_ reader: BufferReader) -> Update? { + var _1: Api.Message? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Message + } + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateEditChannelMessage(message: _1!, pts: _2!, ptsCount: _3!) + } + else { + return nil + } + } + public static func parse_updateBotCallbackQuery(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Int32? + _3 = reader.readInt32() + var _4: Api.Peer? + if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _5: Int32? + _5 = reader.readInt32() + var _6: Int64? + _6 = reader.readInt64() + var _7: Buffer? + if Int(_1!) & Int(1 << 0) != 0 {_7 = parseBytes(reader) } + var _8: String? + if Int(_1!) & Int(1 << 1) != 0 {_8 = parseString(reader) } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = (Int(_1!) & Int(1 << 0) == 0) || _7 != nil + let _c8 = (Int(_1!) & Int(1 << 1) == 0) || _8 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { + return Api.Update.updateBotCallbackQuery(flags: _1!, queryId: _2!, userId: _3!, peer: _4!, msgId: _5!, chatInstance: _6!, data: _7, gameShortName: _8) + } + else { + return nil + } + } + public static func parse_updateEditMessage(_ reader: BufferReader) -> Update? { + var _1: Api.Message? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Message + } + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateEditMessage(message: _1!, pts: _2!, ptsCount: _3!) + } + else { + return nil + } + } + public static func parse_updateInlineBotCallbackQuery(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Int32? + _3 = reader.readInt32() + var _4: Api.InputBotInlineMessageID? + if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.InputBotInlineMessageID + } + var _5: Int64? + _5 = reader.readInt64() + var _6: Buffer? + if Int(_1!) & Int(1 << 0) != 0 {_6 = parseBytes(reader) } + var _7: String? + if Int(_1!) & Int(1 << 1) != 0 {_7 = parseString(reader) } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.Update.updateInlineBotCallbackQuery(flags: _1!, queryId: _2!, userId: _3!, msgId: _4!, chatInstance: _5!, data: _6, gameShortName: _7) + } + else { + return nil + } + } + public static func parse_updateReadChannelOutbox(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Update.updateReadChannelOutbox(channelId: _1!, maxId: _2!) + } + else { + return nil + } + } + public static func parse_updateDraftMessage(_ reader: BufferReader) -> Update? { + var _1: Api.Peer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _2: Api.DraftMessage? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.DraftMessage + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Update.updateDraftMessage(peer: _1!, draft: _2!) + } + else { + return nil + } + } + public static func parse_updateReadFeaturedStickers(_ reader: BufferReader) -> Update? { + return Api.Update.updateReadFeaturedStickers + } + public static func parse_updateRecentStickers(_ reader: BufferReader) -> Update? { + return Api.Update.updateRecentStickers + } + public static func parse_updateConfig(_ reader: BufferReader) -> Update? { + return Api.Update.updateConfig + } + public static func parse_updatePtsChanged(_ reader: BufferReader) -> Update? { + return Api.Update.updatePtsChanged + } + public static func parse_updateChannelWebPage(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.WebPage? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.WebPage + } + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.Update.updateChannelWebPage(channelId: _1!, webpage: _2!, pts: _3!, ptsCount: _4!) + } + else { + return nil + } + } + public static func parse_updateBotWebhookJSON(_ reader: BufferReader) -> Update? { + var _1: Api.DataJSON? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.DataJSON + } + let _c1 = _1 != nil + if _c1 { + return Api.Update.updateBotWebhookJSON(data: _1!) + } + else { + return nil + } + } + public static func parse_updateBotWebhookJSONQuery(_ reader: BufferReader) -> Update? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Api.DataJSON? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.DataJSON + } + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateBotWebhookJSONQuery(queryId: _1!, data: _2!, timeout: _3!) + } + else { + return nil + } + } + public static func parse_updateBotShippingQuery(_ reader: BufferReader) -> Update? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int32? + _2 = reader.readInt32() + var _3: Buffer? + _3 = parseBytes(reader) + var _4: Api.PostAddress? + if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.PostAddress + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.Update.updateBotShippingQuery(queryId: _1!, userId: _2!, payload: _3!, shippingAddress: _4!) + } + else { + return nil + } + } + public static func parse_updateBotPrecheckoutQuery(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Int32? + _3 = reader.readInt32() + var _4: Buffer? + _4 = parseBytes(reader) + var _5: Api.PaymentRequestedInfo? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.PaymentRequestedInfo + } } + var _6: String? + if Int(_1!) & Int(1 << 1) != 0 {_6 = parseString(reader) } + var _7: String? + _7 = parseString(reader) + var _8: Int64? + _8 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c7 = _7 != nil + let _c8 = _8 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { + return Api.Update.updateBotPrecheckoutQuery(flags: _1!, queryId: _2!, userId: _3!, payload: _4!, info: _5, shippingOptionId: _6, currency: _7!, totalAmount: _8!) + } + else { + return nil + } + } + public static func parse_updatePhoneCall(_ reader: BufferReader) -> Update? { + var _1: Api.PhoneCall? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.PhoneCall + } + let _c1 = _1 != nil + if _c1 { + return Api.Update.updatePhoneCall(phoneCall: _1!) + } + else { + return nil + } + } + public static func parse_updateLangPack(_ reader: BufferReader) -> Update? { + var _1: Api.LangPackDifference? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.LangPackDifference + } + let _c1 = _1 != nil + if _c1 { + return Api.Update.updateLangPack(difference: _1!) + } + else { + return nil + } + } + public static func parse_updateFavedStickers(_ reader: BufferReader) -> Update? { + return Api.Update.updateFavedStickers + } + public static func parse_updateChannelReadMessagesContents(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: [Int32]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Update.updateChannelReadMessagesContents(channelId: _1!, messages: _2!) + } + else { + return nil + } + } + public static func parse_updateContactsReset(_ reader: BufferReader) -> Update? { + return Api.Update.updateContactsReset + } + public static func parse_updateChannelAvailableMessages(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Update.updateChannelAvailableMessages(channelId: _1!, availableMinId: _2!) + } + else { + return nil + } + } + public static func parse_updateDialogUnreadMark(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.DialogPeer? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.DialogPeer + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Update.updateDialogUnreadMark(flags: _1!, peer: _2!) + } + else { + return nil + } + } + public static func parse_updateLangPackTooLong(_ reader: BufferReader) -> Update? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.Update.updateLangPackTooLong(langCode: _1!) + } + else { + return nil + } + } + public static func parse_updateMessagePoll(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Api.Poll? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.Poll + } } + var _4: Api.PollResults? + if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.PollResults + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.Update.updateMessagePoll(flags: _1!, pollId: _2!, poll: _3, results: _4!) + } + else { + return nil + } + } + public static func parse_updateChatDefaultBannedRights(_ reader: BufferReader) -> Update? { + var _1: Api.Peer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _2: Api.ChatBannedRights? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.ChatBannedRights + } + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateChatDefaultBannedRights(peer: _1!, defaultBannedRights: _2!, version: _3!) + } + else { + return nil + } + } + public static func parse_updateFolderPeers(_ reader: BufferReader) -> Update? { + var _1: [Api.FolderPeer]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.FolderPeer.self) + } + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateFolderPeers(folderPeers: _1!, pts: _2!, ptsCount: _3!) + } + else { + return nil + } + } + public static func parse_updateDialogPinned(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_2 = reader.readInt32() } + var _3: Api.DialogPeer? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.DialogPeer + } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateDialogPinned(flags: _1!, folderId: _2, peer: _3!) + } + else { + return nil + } + } + public static func parse_updatePinnedDialogs(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_2 = reader.readInt32() } + var _3: [Api.DialogPeer]? + if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DialogPeer.self) + } } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updatePinnedDialogs(flags: _1!, folderId: _2, order: _3) + } + else { + return nil + } + } + public static func parse_updateReadChannelInbox(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + var _6: Int32? + _6 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.Update.updateReadChannelInbox(flags: _1!, folderId: _2, channelId: _3!, maxId: _4!, stillUnreadCount: _5!, pts: _6!) + } + else { + return nil + } + } + public static func parse_updateReadHistoryInbox(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } + var _3: Api.Peer? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + var _6: Int32? + _6 = reader.readInt32() + var _7: Int32? + _7 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.Update.updateReadHistoryInbox(flags: _1!, folderId: _2, peer: _3!, maxId: _4!, stillUnreadCount: _5!, pts: _6!, ptsCount: _7!) + } + else { + return nil + } + } + public static func parse_updatePeerSettings(_ reader: BufferReader) -> Update? { + var _1: Api.Peer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _2: Api.PeerSettings? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.PeerSettings + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Update.updatePeerSettings(peer: _1!, settings: _2!) + } + else { + return nil + } + } + public static func parse_updatePeerLocated(_ reader: BufferReader) -> Update? { + var _1: [Api.PeerLocated]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PeerLocated.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.Update.updatePeerLocated(peers: _1!) + } + else { + return nil + } + } + public static func parse_updateNewScheduledMessage(_ reader: BufferReader) -> Update? { + var _1: Api.Message? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Message + } + let _c1 = _1 != nil + if _c1 { + return Api.Update.updateNewScheduledMessage(message: _1!) + } + else { + return nil + } + } + public static func parse_updateDeleteScheduledMessages(_ reader: BufferReader) -> Update? { + var _1: Api.Peer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _2: [Int32]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Update.updateDeleteScheduledMessages(peer: _1!, messages: _2!) + } + else { + return nil + } + } + public static func parse_updateTheme(_ reader: BufferReader) -> Update? { + var _1: Api.Theme? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Theme + } + let _c1 = _1 != nil + if _c1 { + return Api.Update.updateTheme(theme: _1!) + } + else { + return nil + } + } + public static func parse_updateGeoLiveViewed(_ reader: BufferReader) -> Update? { + var _1: Api.Peer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Update.updateGeoLiveViewed(peer: _1!, msgId: _2!) + } + else { + return nil + } + } + public static func parse_updateLoginToken(_ reader: BufferReader) -> Update? { + return Api.Update.updateLoginToken + } + public static func parse_updateMessagePollVote(_ reader: BufferReader) -> Update? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int32? + _2 = reader.readInt32() + var _3: [Buffer]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: -1255641564, elementType: Buffer.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateMessagePollVote(pollId: _1!, userId: _2!, options: _3!) + } + else { + return nil + } + } + public static func parse_updateDialogFilter(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Api.DialogFilter? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.DialogFilter + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateDialogFilter(flags: _1!, id: _2!, filter: _3) + } + else { + return nil + } + } + public static func parse_updateDialogFilterOrder(_ reader: BufferReader) -> Update? { + var _1: [Int32]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.Update.updateDialogFilterOrder(order: _1!) + } + else { + return nil + } + } + public static func parse_updateDialogFilters(_ reader: BufferReader) -> Update? { + return Api.Update.updateDialogFilters + } + public static func parse_updatePhoneCallSignalingData(_ reader: BufferReader) -> Update? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Buffer? + _2 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Update.updatePhoneCallSignalingData(phoneCallId: _1!, data: _2!) + } + else { + return nil + } + } + public static func parse_updateChannelParticipant(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Api.ChannelParticipant? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.ChannelParticipant + } } + var _6: Api.ChannelParticipant? + if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.ChannelParticipant + } } + var _7: Int32? + _7 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c7 = _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.Update.updateChannelParticipant(flags: _1!, channelId: _2!, date: _3!, userId: _4!, prevParticipant: _5, newParticipant: _6, qts: _7!) + } + else { + return nil + } + } + public static func parse_updateChannelMessageForwards(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateChannelMessageForwards(channelId: _1!, id: _2!, forwards: _3!) + } + else { + return nil + } + } + public static func parse_updateReadChannelDiscussionInbox(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_5 = reader.readInt32() } + var _6: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_6 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.Update.updateReadChannelDiscussionInbox(flags: _1!, channelId: _2!, topMsgId: _3!, readMaxId: _4!, broadcastId: _5, broadcastPost: _6) + } + else { + return nil + } + } + public static func parse_updateReadChannelDiscussionOutbox(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateReadChannelDiscussionOutbox(channelId: _1!, topMsgId: _2!, readMaxId: _3!) + } + else { + return nil + } + } + public static func parse_updatePeerBlocked(_ reader: BufferReader) -> Update? { + var _1: Api.Peer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _2: Api.Bool? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Bool + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Update.updatePeerBlocked(peerId: _1!, blocked: _2!) + } + else { + return nil + } + } + public static func parse_updateChannelUserTyping(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } + var _4: Int32? + _4 = reader.readInt32() + var _5: Api.SendMessageAction? + if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.SendMessageAction + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.Update.updateChannelUserTyping(flags: _1!, channelId: _2!, topMsgId: _3, userId: _4!, action: _5!) + } + else { + return nil + } + } + public static func parse_updatePinnedMessages(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.Peer? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _3: [Int32]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) + } + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.Update.updatePinnedMessages(flags: _1!, peer: _2!, messages: _3!, pts: _4!, ptsCount: _5!) + } + else { + return nil + } + } + public static func parse_updatePinnedChannelMessages(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: [Int32]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) + } + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.Update.updatePinnedChannelMessages(flags: _1!, channelId: _2!, messages: _3!, pts: _4!, ptsCount: _5!) + } + else { + return nil + } + } + public static func parse_updateChat(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.Update.updateChat(chatId: _1!) + } + else { + return nil + } + } + public static func parse_updateGroupCallParticipants(_ reader: BufferReader) -> Update? { + var _1: Api.InputGroupCall? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputGroupCall + } + var _2: [Api.GroupCallParticipant]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.GroupCallParticipant.self) + } + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updateGroupCallParticipants(call: _1!, participants: _2!, version: _3!) + } + else { + return nil + } + } + public static func parse_updateGroupCall(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.GroupCall? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.GroupCall + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Update.updateGroupCall(chatId: _1!, call: _2!) + } + else { + return nil + } + } + public static func parse_updateBotInlineQuery(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Int32? + _3 = reader.readInt32() + var _4: String? + _4 = parseString(reader) + var _5: Api.GeoPoint? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.GeoPoint + } } + var _6: Api.InlineQueryPeerType? + if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.InlineQueryPeerType + } } + var _7: String? + _7 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c7 = _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.Update.updateBotInlineQuery(flags: _1!, queryId: _2!, userId: _3!, query: _4!, geo: _5, peerType: _6, offset: _7!) + } + else { + return nil + } + } + public static func parse_updatePeerHistoryTTL(_ reader: BufferReader) -> Update? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.Peer? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _3: Api.PeerHistoryTTL? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.PeerHistoryTTL + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.Update.updatePeerHistoryTTL(flags: _1!, peer: _2!, ttl: _3) + } + else { + return nil + } + } + + } + public enum PopularContact: TypeConstructorDescription { + case popularContact(clientId: Int64, importers: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .popularContact(let clientId, let importers): + if boxed { + buffer.appendInt32(1558266229) + } + serializeInt64(clientId, buffer: buffer, boxed: false) + serializeInt32(importers, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .popularContact(let clientId, let importers): + return ("popularContact", [("clientId", clientId), ("importers", importers)]) + } + } + + public static func parse_popularContact(_ reader: BufferReader) -> PopularContact? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.PopularContact.popularContact(clientId: _1!, importers: _2!) + } + else { + return nil + } + } + + } + public enum FolderPeer: TypeConstructorDescription { + case folderPeer(peer: Api.Peer, folderId: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .folderPeer(let peer, let folderId): + if boxed { + buffer.appendInt32(-373643672) + } + peer.serialize(buffer, true) + serializeInt32(folderId, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .folderPeer(let peer, let folderId): + return ("folderPeer", [("peer", peer), ("folderId", folderId)]) + } + } + + public static func parse_folderPeer(_ reader: BufferReader) -> FolderPeer? { + var _1: Api.Peer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.FolderPeer.folderPeer(peer: _1!, folderId: _2!) + } + else { + return nil + } + } + + } + public enum ChannelParticipant: TypeConstructorDescription { + case channelParticipant(userId: Int32, date: Int32) + case channelParticipantSelf(userId: Int32, inviterId: Int32, date: Int32) + case channelParticipantBanned(flags: Int32, userId: Int32, kickedBy: Int32, date: Int32, bannedRights: Api.ChatBannedRights) + case channelParticipantAdmin(flags: Int32, userId: Int32, inviterId: Int32?, promotedBy: Int32, date: Int32, adminRights: Api.ChatAdminRights, rank: String?) + case channelParticipantCreator(flags: Int32, userId: Int32, adminRights: Api.ChatAdminRights, rank: String?) + case channelParticipantLeft(userId: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .channelParticipant(let userId, let date): + if boxed { + buffer.appendInt32(367766557) + } + serializeInt32(userId, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + break + case .channelParticipantSelf(let userId, let inviterId, let date): + if boxed { + buffer.appendInt32(-1557620115) + } + serializeInt32(userId, buffer: buffer, boxed: false) + serializeInt32(inviterId, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + break + case .channelParticipantBanned(let flags, let userId, let kickedBy, let date, let bannedRights): + if boxed { + buffer.appendInt32(470789295) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + serializeInt32(kickedBy, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + bannedRights.serialize(buffer, true) + break + case .channelParticipantAdmin(let flags, let userId, let inviterId, let promotedBy, let date, let adminRights, let rank): + if boxed { + buffer.appendInt32(-859915345) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(inviterId!, buffer: buffer, boxed: false)} + serializeInt32(promotedBy, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + adminRights.serialize(buffer, true) + if Int(flags) & Int(1 << 2) != 0 {serializeString(rank!, buffer: buffer, boxed: false)} + break + case .channelParticipantCreator(let flags, let userId, let adminRights, let rank): + if boxed { + buffer.appendInt32(1149094475) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + adminRights.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeString(rank!, buffer: buffer, boxed: false)} + break + case .channelParticipantLeft(let userId): + if boxed { + buffer.appendInt32(-1010402965) + } + serializeInt32(userId, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .channelParticipant(let userId, let date): + return ("channelParticipant", [("userId", userId), ("date", date)]) + case .channelParticipantSelf(let userId, let inviterId, let date): + return ("channelParticipantSelf", [("userId", userId), ("inviterId", inviterId), ("date", date)]) + case .channelParticipantBanned(let flags, let userId, let kickedBy, let date, let bannedRights): + return ("channelParticipantBanned", [("flags", flags), ("userId", userId), ("kickedBy", kickedBy), ("date", date), ("bannedRights", bannedRights)]) + case .channelParticipantAdmin(let flags, let userId, let inviterId, let promotedBy, let date, let adminRights, let rank): + return ("channelParticipantAdmin", [("flags", flags), ("userId", userId), ("inviterId", inviterId), ("promotedBy", promotedBy), ("date", date), ("adminRights", adminRights), ("rank", rank)]) + case .channelParticipantCreator(let flags, let userId, let adminRights, let rank): + return ("channelParticipantCreator", [("flags", flags), ("userId", userId), ("adminRights", adminRights), ("rank", rank)]) + case .channelParticipantLeft(let userId): + return ("channelParticipantLeft", [("userId", userId)]) + } + } + + public static func parse_channelParticipant(_ reader: BufferReader) -> ChannelParticipant? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ChannelParticipant.channelParticipant(userId: _1!, date: _2!) + } + else { + return nil + } + } + public static func parse_channelParticipantSelf(_ reader: BufferReader) -> ChannelParticipant? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.ChannelParticipant.channelParticipantSelf(userId: _1!, inviterId: _2!, date: _3!) + } + else { + return nil + } + } + public static func parse_channelParticipantBanned(_ reader: BufferReader) -> ChannelParticipant? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Api.ChatBannedRights? + if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.ChatBannedRights + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.ChannelParticipant.channelParticipantBanned(flags: _1!, userId: _2!, kickedBy: _3!, date: _4!, bannedRights: _5!) + } + else { + return nil + } + } + public static func parse_channelParticipantAdmin(_ reader: BufferReader) -> ChannelParticipant? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_3 = reader.readInt32() } + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + var _6: Api.ChatAdminRights? + if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.ChatAdminRights + } + var _7: String? + if Int(_1!) & Int(1 << 2) != 0 {_7 = parseString(reader) } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = (Int(_1!) & Int(1 << 2) == 0) || _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.ChannelParticipant.channelParticipantAdmin(flags: _1!, userId: _2!, inviterId: _3, promotedBy: _4!, date: _5!, adminRights: _6!, rank: _7) + } + else { + return nil + } + } + public static func parse_channelParticipantCreator(_ reader: BufferReader) -> ChannelParticipant? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Api.ChatAdminRights? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.ChatAdminRights + } + var _4: String? + if Int(_1!) & Int(1 << 0) != 0 {_4 = parseString(reader) } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.ChannelParticipant.channelParticipantCreator(flags: _1!, userId: _2!, adminRights: _3!, rank: _4) + } + else { + return nil + } + } + public static func parse_channelParticipantLeft(_ reader: BufferReader) -> ChannelParticipant? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.ChannelParticipant.channelParticipantLeft(userId: _1!) + } + else { + return nil + } + } + + } + public enum MessageUserVote: TypeConstructorDescription { + case messageUserVote(userId: Int32, option: Buffer, date: Int32) + case messageUserVoteInputOption(userId: Int32, date: Int32) + case messageUserVoteMultiple(userId: Int32, options: [Buffer], date: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .messageUserVote(let userId, let option, let date): + if boxed { + buffer.appendInt32(-1567730343) + } + serializeInt32(userId, buffer: buffer, boxed: false) + serializeBytes(option, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + break + case .messageUserVoteInputOption(let userId, let date): + if boxed { + buffer.appendInt32(909603888) + } + serializeInt32(userId, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + break + case .messageUserVoteMultiple(let userId, let options, let date): + if boxed { + buffer.appendInt32(244310238) + } + serializeInt32(userId, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(options.count)) + for item in options { + serializeBytes(item, buffer: buffer, boxed: false) + } + serializeInt32(date, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .messageUserVote(let userId, let option, let date): + return ("messageUserVote", [("userId", userId), ("option", option), ("date", date)]) + case .messageUserVoteInputOption(let userId, let date): + return ("messageUserVoteInputOption", [("userId", userId), ("date", date)]) + case .messageUserVoteMultiple(let userId, let options, let date): + return ("messageUserVoteMultiple", [("userId", userId), ("options", options), ("date", date)]) + } + } + + public static func parse_messageUserVote(_ reader: BufferReader) -> MessageUserVote? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Buffer? + _2 = parseBytes(reader) + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.MessageUserVote.messageUserVote(userId: _1!, option: _2!, date: _3!) + } + else { + return nil + } + } + public static func parse_messageUserVoteInputOption(_ reader: BufferReader) -> MessageUserVote? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageUserVote.messageUserVoteInputOption(userId: _1!, date: _2!) + } + else { + return nil + } + } + public static func parse_messageUserVoteMultiple(_ reader: BufferReader) -> MessageUserVote? { + var _1: Int32? + _1 = reader.readInt32() + var _2: [Buffer]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: -1255641564, elementType: Buffer.self) + } + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.MessageUserVote.messageUserVoteMultiple(userId: _1!, options: _2!, date: _3!) + } + else { + return nil + } + } + + } + public enum InputDialogPeer: TypeConstructorDescription { + case inputDialogPeer(peer: Api.InputPeer) + case inputDialogPeerFolder(folderId: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputDialogPeer(let peer): + if boxed { + buffer.appendInt32(-55902537) + } + peer.serialize(buffer, true) + break + case .inputDialogPeerFolder(let folderId): + if boxed { + buffer.appendInt32(1684014375) + } + serializeInt32(folderId, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputDialogPeer(let peer): + return ("inputDialogPeer", [("peer", peer)]) + case .inputDialogPeerFolder(let folderId): + return ("inputDialogPeerFolder", [("folderId", folderId)]) + } + } + + public static func parse_inputDialogPeer(_ reader: BufferReader) -> InputDialogPeer? { + var _1: Api.InputPeer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputPeer + } + let _c1 = _1 != nil + if _c1 { + return Api.InputDialogPeer.inputDialogPeer(peer: _1!) + } + else { + return nil + } + } + public static func parse_inputDialogPeerFolder(_ reader: BufferReader) -> InputDialogPeer? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.InputDialogPeer.inputDialogPeerFolder(folderId: _1!) + } + else { + return nil + } + } + + } + public enum Error: TypeConstructorDescription { + case error(code: Int32, text: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .error(let code, let text): + if boxed { + buffer.appendInt32(-994444869) + } + serializeInt32(code, buffer: buffer, boxed: false) + serializeString(text, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .error(let code, let text): + return ("error", [("code", code), ("text", text)]) + } + } + + public static func parse_error(_ reader: BufferReader) -> Error? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Error.error(code: _1!, text: _2!) + } + else { + return nil + } + } + + } + public enum KeyboardButton: TypeConstructorDescription { + case keyboardButton(text: String) + case keyboardButtonUrl(text: String, url: String) + case keyboardButtonRequestPhone(text: String) + case keyboardButtonRequestGeoLocation(text: String) + case keyboardButtonSwitchInline(flags: Int32, text: String, query: String) + case keyboardButtonGame(text: String) + case keyboardButtonBuy(text: String) + case keyboardButtonUrlAuth(flags: Int32, text: String, fwdText: String?, url: String, buttonId: Int32) + case inputKeyboardButtonUrlAuth(flags: Int32, text: String, fwdText: String?, url: String, bot: Api.InputUser) + case keyboardButtonRequestPoll(flags: Int32, quiz: Api.Bool?, text: String) + case keyboardButtonCallback(flags: Int32, text: String, data: Buffer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .keyboardButton(let text): + if boxed { + buffer.appendInt32(-1560655744) + } + serializeString(text, buffer: buffer, boxed: false) + break + case .keyboardButtonUrl(let text, let url): + if boxed { + buffer.appendInt32(629866245) + } + serializeString(text, buffer: buffer, boxed: false) + serializeString(url, buffer: buffer, boxed: false) + break + case .keyboardButtonRequestPhone(let text): + if boxed { + buffer.appendInt32(-1318425559) + } + serializeString(text, buffer: buffer, boxed: false) + break + case .keyboardButtonRequestGeoLocation(let text): + if boxed { + buffer.appendInt32(-59151553) + } + serializeString(text, buffer: buffer, boxed: false) + break + case .keyboardButtonSwitchInline(let flags, let text, let query): + if boxed { + buffer.appendInt32(90744648) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(text, buffer: buffer, boxed: false) + serializeString(query, buffer: buffer, boxed: false) + break + case .keyboardButtonGame(let text): + if boxed { + buffer.appendInt32(1358175439) + } + serializeString(text, buffer: buffer, boxed: false) + break + case .keyboardButtonBuy(let text): + if boxed { + buffer.appendInt32(-1344716869) + } + serializeString(text, buffer: buffer, boxed: false) + break + case .keyboardButtonUrlAuth(let flags, let text, let fwdText, let url, let buttonId): + if boxed { + buffer.appendInt32(280464681) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(text, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeString(fwdText!, buffer: buffer, boxed: false)} + serializeString(url, buffer: buffer, boxed: false) + serializeInt32(buttonId, buffer: buffer, boxed: false) + break + case .inputKeyboardButtonUrlAuth(let flags, let text, let fwdText, let url, let bot): + if boxed { + buffer.appendInt32(-802258988) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(text, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeString(fwdText!, buffer: buffer, boxed: false)} + serializeString(url, buffer: buffer, boxed: false) + bot.serialize(buffer, true) + break + case .keyboardButtonRequestPoll(let flags, let quiz, let text): + if boxed { + buffer.appendInt32(-1144565411) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {quiz!.serialize(buffer, true)} + serializeString(text, buffer: buffer, boxed: false) + break + case .keyboardButtonCallback(let flags, let text, let data): + if boxed { + buffer.appendInt32(901503851) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(text, buffer: buffer, boxed: false) + serializeBytes(data, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .keyboardButton(let text): + return ("keyboardButton", [("text", text)]) + case .keyboardButtonUrl(let text, let url): + return ("keyboardButtonUrl", [("text", text), ("url", url)]) + case .keyboardButtonRequestPhone(let text): + return ("keyboardButtonRequestPhone", [("text", text)]) + case .keyboardButtonRequestGeoLocation(let text): + return ("keyboardButtonRequestGeoLocation", [("text", text)]) + case .keyboardButtonSwitchInline(let flags, let text, let query): + return ("keyboardButtonSwitchInline", [("flags", flags), ("text", text), ("query", query)]) + case .keyboardButtonGame(let text): + return ("keyboardButtonGame", [("text", text)]) + case .keyboardButtonBuy(let text): + return ("keyboardButtonBuy", [("text", text)]) + case .keyboardButtonUrlAuth(let flags, let text, let fwdText, let url, let buttonId): + return ("keyboardButtonUrlAuth", [("flags", flags), ("text", text), ("fwdText", fwdText), ("url", url), ("buttonId", buttonId)]) + case .inputKeyboardButtonUrlAuth(let flags, let text, let fwdText, let url, let bot): + return ("inputKeyboardButtonUrlAuth", [("flags", flags), ("text", text), ("fwdText", fwdText), ("url", url), ("bot", bot)]) + case .keyboardButtonRequestPoll(let flags, let quiz, let text): + return ("keyboardButtonRequestPoll", [("flags", flags), ("quiz", quiz), ("text", text)]) + case .keyboardButtonCallback(let flags, let text, let data): + return ("keyboardButtonCallback", [("flags", flags), ("text", text), ("data", data)]) + } + } + + public static func parse_keyboardButton(_ reader: BufferReader) -> KeyboardButton? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.KeyboardButton.keyboardButton(text: _1!) + } + else { + return nil + } + } + public static func parse_keyboardButtonUrl(_ reader: BufferReader) -> KeyboardButton? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.KeyboardButton.keyboardButtonUrl(text: _1!, url: _2!) + } + else { + return nil + } + } + public static func parse_keyboardButtonRequestPhone(_ reader: BufferReader) -> KeyboardButton? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.KeyboardButton.keyboardButtonRequestPhone(text: _1!) + } + else { + return nil + } + } + public static func parse_keyboardButtonRequestGeoLocation(_ reader: BufferReader) -> KeyboardButton? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.KeyboardButton.keyboardButtonRequestGeoLocation(text: _1!) + } + else { + return nil + } + } + public static func parse_keyboardButtonSwitchInline(_ reader: BufferReader) -> KeyboardButton? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.KeyboardButton.keyboardButtonSwitchInline(flags: _1!, text: _2!, query: _3!) + } + else { + return nil + } + } + public static func parse_keyboardButtonGame(_ reader: BufferReader) -> KeyboardButton? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.KeyboardButton.keyboardButtonGame(text: _1!) + } + else { + return nil + } + } + public static func parse_keyboardButtonBuy(_ reader: BufferReader) -> KeyboardButton? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.KeyboardButton.keyboardButtonBuy(text: _1!) + } + else { + return nil + } + } + public static func parse_keyboardButtonUrlAuth(_ reader: BufferReader) -> KeyboardButton? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: String? + if Int(_1!) & Int(1 << 0) != 0 {_3 = parseString(reader) } + var _4: String? + _4 = parseString(reader) + var _5: Int32? + _5 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.KeyboardButton.keyboardButtonUrlAuth(flags: _1!, text: _2!, fwdText: _3, url: _4!, buttonId: _5!) + } + else { + return nil + } + } + public static func parse_inputKeyboardButtonUrlAuth(_ reader: BufferReader) -> KeyboardButton? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: String? + if Int(_1!) & Int(1 << 1) != 0 {_3 = parseString(reader) } + var _4: String? + _4 = parseString(reader) + var _5: Api.InputUser? + if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.InputUser + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.KeyboardButton.inputKeyboardButtonUrlAuth(flags: _1!, text: _2!, fwdText: _3, url: _4!, bot: _5!) + } + else { + return nil + } + } + public static func parse_keyboardButtonRequestPoll(_ reader: BufferReader) -> KeyboardButton? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.Bool? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Bool + } } + var _3: String? + _3 = parseString(reader) + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.KeyboardButton.keyboardButtonRequestPoll(flags: _1!, quiz: _2, text: _3!) + } + else { + return nil + } + } + public static func parse_keyboardButtonCallback(_ reader: BufferReader) -> KeyboardButton? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: Buffer? + _3 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.KeyboardButton.keyboardButtonCallback(flags: _1!, text: _2!, data: _3!) + } + else { + return nil + } + } + + } + public enum ContactStatus: TypeConstructorDescription { + case contactStatus(userId: Int32, status: Api.UserStatus) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .contactStatus(let userId, let status): + if boxed { + buffer.appendInt32(-748155807) + } + serializeInt32(userId, buffer: buffer, boxed: false) + status.serialize(buffer, true) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .contactStatus(let userId, let status): + return ("contactStatus", [("userId", userId), ("status", status)]) + } + } + + public static func parse_contactStatus(_ reader: BufferReader) -> ContactStatus? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.UserStatus? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.UserStatus + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ContactStatus.contactStatus(userId: _1!, status: _2!) + } + else { + return nil + } + } + + } + public enum SecureFile: TypeConstructorDescription { + case secureFileEmpty + case secureFile(id: Int64, accessHash: Int64, size: Int32, dcId: Int32, date: Int32, fileHash: Buffer, secret: Buffer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .secureFileEmpty: + if boxed { + buffer.appendInt32(1679398724) + } + + break + case .secureFile(let id, let accessHash, let size, let dcId, let date, let fileHash, let secret): + if boxed { + buffer.appendInt32(-534283678) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeInt32(size, buffer: buffer, boxed: false) + serializeInt32(dcId, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + serializeBytes(fileHash, buffer: buffer, boxed: false) + serializeBytes(secret, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .secureFileEmpty: + return ("secureFileEmpty", []) + case .secureFile(let id, let accessHash, let size, let dcId, let date, let fileHash, let secret): + return ("secureFile", [("id", id), ("accessHash", accessHash), ("size", size), ("dcId", dcId), ("date", date), ("fileHash", fileHash), ("secret", secret)]) + } + } + + public static func parse_secureFileEmpty(_ reader: BufferReader) -> SecureFile? { + return Api.SecureFile.secureFileEmpty + } + public static func parse_secureFile(_ reader: BufferReader) -> SecureFile? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int64? + _2 = reader.readInt64() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + var _6: Buffer? + _6 = parseBytes(reader) + var _7: Buffer? + _7 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.SecureFile.secureFile(id: _1!, accessHash: _2!, size: _3!, dcId: _4!, date: _5!, fileHash: _6!, secret: _7!) + } + else { + return nil + } + } + + } + public enum PhotoSize: TypeConstructorDescription { + case photoSizeEmpty(type: String) + case photoSize(type: String, location: Api.FileLocation, w: Int32, h: Int32, size: Int32) + case photoCachedSize(type: String, location: Api.FileLocation, w: Int32, h: Int32, bytes: Buffer) + case photoStrippedSize(type: String, bytes: Buffer) + case photoSizeProgressive(type: String, location: Api.FileLocation, w: Int32, h: Int32, sizes: [Int32]) + case photoPathSize(type: String, bytes: Buffer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .photoSizeEmpty(let type): + if boxed { + buffer.appendInt32(236446268) + } + serializeString(type, buffer: buffer, boxed: false) + break + case .photoSize(let type, let location, let w, let h, let size): + if boxed { + buffer.appendInt32(2009052699) + } + serializeString(type, buffer: buffer, boxed: false) + location.serialize(buffer, true) + serializeInt32(w, buffer: buffer, boxed: false) + serializeInt32(h, buffer: buffer, boxed: false) + serializeInt32(size, buffer: buffer, boxed: false) + break + case .photoCachedSize(let type, let location, let w, let h, let bytes): + if boxed { + buffer.appendInt32(-374917894) + } + serializeString(type, buffer: buffer, boxed: false) + location.serialize(buffer, true) + serializeInt32(w, buffer: buffer, boxed: false) + serializeInt32(h, buffer: buffer, boxed: false) + serializeBytes(bytes, buffer: buffer, boxed: false) + break + case .photoStrippedSize(let type, let bytes): + if boxed { + buffer.appendInt32(-525288402) + } + serializeString(type, buffer: buffer, boxed: false) + serializeBytes(bytes, buffer: buffer, boxed: false) + break + case .photoSizeProgressive(let type, let location, let w, let h, let sizes): + if boxed { + buffer.appendInt32(1520986705) + } + serializeString(type, buffer: buffer, boxed: false) + location.serialize(buffer, true) + serializeInt32(w, buffer: buffer, boxed: false) + serializeInt32(h, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(sizes.count)) + for item in sizes { + serializeInt32(item, buffer: buffer, boxed: false) + } + break + case .photoPathSize(let type, let bytes): + if boxed { + buffer.appendInt32(-668906175) + } + serializeString(type, buffer: buffer, boxed: false) + serializeBytes(bytes, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .photoSizeEmpty(let type): + return ("photoSizeEmpty", [("type", type)]) + case .photoSize(let type, let location, let w, let h, let size): + return ("photoSize", [("type", type), ("location", location), ("w", w), ("h", h), ("size", size)]) + case .photoCachedSize(let type, let location, let w, let h, let bytes): + return ("photoCachedSize", [("type", type), ("location", location), ("w", w), ("h", h), ("bytes", bytes)]) + case .photoStrippedSize(let type, let bytes): + return ("photoStrippedSize", [("type", type), ("bytes", bytes)]) + case .photoSizeProgressive(let type, let location, let w, let h, let sizes): + return ("photoSizeProgressive", [("type", type), ("location", location), ("w", w), ("h", h), ("sizes", sizes)]) + case .photoPathSize(let type, let bytes): + return ("photoPathSize", [("type", type), ("bytes", bytes)]) + } + } + + public static func parse_photoSizeEmpty(_ reader: BufferReader) -> PhotoSize? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.PhotoSize.photoSizeEmpty(type: _1!) + } + else { + return nil + } + } + public static func parse_photoSize(_ reader: BufferReader) -> PhotoSize? { + var _1: String? + _1 = parseString(reader) + var _2: Api.FileLocation? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.FileLocation + } + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.PhotoSize.photoSize(type: _1!, location: _2!, w: _3!, h: _4!, size: _5!) + } + else { + return nil + } + } + public static func parse_photoCachedSize(_ reader: BufferReader) -> PhotoSize? { + var _1: String? + _1 = parseString(reader) + var _2: Api.FileLocation? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.FileLocation + } + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Buffer? + _5 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.PhotoSize.photoCachedSize(type: _1!, location: _2!, w: _3!, h: _4!, bytes: _5!) + } + else { + return nil + } + } + public static func parse_photoStrippedSize(_ reader: BufferReader) -> PhotoSize? { + var _1: String? + _1 = parseString(reader) + var _2: Buffer? + _2 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.PhotoSize.photoStrippedSize(type: _1!, bytes: _2!) + } + else { + return nil + } + } + public static func parse_photoSizeProgressive(_ reader: BufferReader) -> PhotoSize? { + var _1: String? + _1 = parseString(reader) + var _2: Api.FileLocation? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.FileLocation + } + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: [Int32]? + if let _ = reader.readInt32() { + _5 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.PhotoSize.photoSizeProgressive(type: _1!, location: _2!, w: _3!, h: _4!, sizes: _5!) + } + else { + return nil + } + } + public static func parse_photoPathSize(_ reader: BufferReader) -> PhotoSize? { + var _1: String? + _1 = parseString(reader) + var _2: Buffer? + _2 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.PhotoSize.photoPathSize(type: _1!, bytes: _2!) + } + else { + return nil + } + } + + } + public enum GlobalPrivacySettings: TypeConstructorDescription { + case globalPrivacySettings(flags: Int32, archiveAndMuteNewNoncontactPeers: Api.Bool?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .globalPrivacySettings(let flags, let archiveAndMuteNewNoncontactPeers): + if boxed { + buffer.appendInt32(-1096616924) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {archiveAndMuteNewNoncontactPeers!.serialize(buffer, true)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .globalPrivacySettings(let flags, let archiveAndMuteNewNoncontactPeers): + return ("globalPrivacySettings", [("flags", flags), ("archiveAndMuteNewNoncontactPeers", archiveAndMuteNewNoncontactPeers)]) + } + } + + public static func parse_globalPrivacySettings(_ reader: BufferReader) -> GlobalPrivacySettings? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.Bool? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Bool + } } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + if _c1 && _c2 { + return Api.GlobalPrivacySettings.globalPrivacySettings(flags: _1!, archiveAndMuteNewNoncontactPeers: _2) + } + else { + return nil + } + } + + } + public enum InlineBotSwitchPM: TypeConstructorDescription { + case inlineBotSwitchPM(text: String, startParam: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inlineBotSwitchPM(let text, let startParam): + if boxed { + buffer.appendInt32(1008755359) + } + serializeString(text, buffer: buffer, boxed: false) + serializeString(startParam, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inlineBotSwitchPM(let text, let startParam): + return ("inlineBotSwitchPM", [("text", text), ("startParam", startParam)]) + } + } + + public static func parse_inlineBotSwitchPM(_ reader: BufferReader) -> InlineBotSwitchPM? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InlineBotSwitchPM.inlineBotSwitchPM(text: _1!, startParam: _2!) + } + else { + return nil + } + } + + } + public enum InputTheme: TypeConstructorDescription { + case inputTheme(id: Int64, accessHash: Int64) + case inputThemeSlug(slug: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputTheme(let id, let accessHash): + if boxed { + buffer.appendInt32(1012306921) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + break + case .inputThemeSlug(let slug): + if boxed { + buffer.appendInt32(-175567375) + } + serializeString(slug, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputTheme(let id, let accessHash): + return ("inputTheme", [("id", id), ("accessHash", accessHash)]) + case .inputThemeSlug(let slug): + return ("inputThemeSlug", [("slug", slug)]) + } + } + + public static func parse_inputTheme(_ reader: BufferReader) -> InputTheme? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputTheme.inputTheme(id: _1!, accessHash: _2!) + } + else { + return nil + } + } + public static func parse_inputThemeSlug(_ reader: BufferReader) -> InputTheme? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.InputTheme.inputThemeSlug(slug: _1!) + } + else { + return nil + } + } + + } + public enum FileLocation: TypeConstructorDescription { + case fileLocationToBeDeprecated(volumeId: Int64, localId: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .fileLocationToBeDeprecated(let volumeId, let localId): + if boxed { + buffer.appendInt32(-1132476723) + } + serializeInt64(volumeId, buffer: buffer, boxed: false) + serializeInt32(localId, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .fileLocationToBeDeprecated(let volumeId, let localId): + return ("fileLocationToBeDeprecated", [("volumeId", volumeId), ("localId", localId)]) + } + } + + public static func parse_fileLocationToBeDeprecated(_ reader: BufferReader) -> FileLocation? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.FileLocation.fileLocationToBeDeprecated(volumeId: _1!, localId: _2!) + } + else { + return nil + } + } + + } + public enum Poll: TypeConstructorDescription { + case poll(id: Int64, flags: Int32, question: String, answers: [Api.PollAnswer], closePeriod: Int32?, closeDate: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .poll(let id, let flags, let question, let answers, let closePeriod, let closeDate): + if boxed { + buffer.appendInt32(-2032041631) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(question, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(answers.count)) + for item in answers { + item.serialize(buffer, true) + } + if Int(flags) & Int(1 << 4) != 0 {serializeInt32(closePeriod!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 5) != 0 {serializeInt32(closeDate!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .poll(let id, let flags, let question, let answers, let closePeriod, let closeDate): + return ("poll", [("id", id), ("flags", flags), ("question", question), ("answers", answers), ("closePeriod", closePeriod), ("closeDate", closeDate)]) + } + } + + public static func parse_poll(_ reader: BufferReader) -> Poll? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int32? + _2 = reader.readInt32() + var _3: String? + _3 = parseString(reader) + var _4: [Api.PollAnswer]? + if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PollAnswer.self) + } + var _5: Int32? + if Int(_2!) & Int(1 << 4) != 0 {_5 = reader.readInt32() } + var _6: Int32? + if Int(_2!) & Int(1 << 5) != 0 {_6 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_2!) & Int(1 << 4) == 0) || _5 != nil + let _c6 = (Int(_2!) & Int(1 << 5) == 0) || _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.Poll.poll(id: _1!, flags: _2!, question: _3!, answers: _4!, closePeriod: _5, closeDate: _6) + } + else { + return nil + } + } + + } + public enum InputNotifyPeer: TypeConstructorDescription { + case inputNotifyUsers + case inputNotifyChats + case inputNotifyBroadcasts + case inputNotifyPeer(peer: Api.InputPeer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputNotifyUsers: + if boxed { + buffer.appendInt32(423314455) + } + + break + case .inputNotifyChats: + if boxed { + buffer.appendInt32(1251338318) + } + + break + case .inputNotifyBroadcasts: + if boxed { + buffer.appendInt32(-1311015810) + } + + break + case .inputNotifyPeer(let peer): + if boxed { + buffer.appendInt32(-1195615476) + } + peer.serialize(buffer, true) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputNotifyUsers: + return ("inputNotifyUsers", []) + case .inputNotifyChats: + return ("inputNotifyChats", []) + case .inputNotifyBroadcasts: + return ("inputNotifyBroadcasts", []) + case .inputNotifyPeer(let peer): + return ("inputNotifyPeer", [("peer", peer)]) + } + } + + public static func parse_inputNotifyUsers(_ reader: BufferReader) -> InputNotifyPeer? { + return Api.InputNotifyPeer.inputNotifyUsers + } + public static func parse_inputNotifyChats(_ reader: BufferReader) -> InputNotifyPeer? { + return Api.InputNotifyPeer.inputNotifyChats + } + public static func parse_inputNotifyBroadcasts(_ reader: BufferReader) -> InputNotifyPeer? { + return Api.InputNotifyPeer.inputNotifyBroadcasts + } + public static func parse_inputNotifyPeer(_ reader: BufferReader) -> InputNotifyPeer? { + var _1: Api.InputPeer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputPeer + } + let _c1 = _1 != nil + if _c1 { + return Api.InputNotifyPeer.inputNotifyPeer(peer: _1!) + } + else { + return nil + } + } + + } + public enum EncryptedMessage: TypeConstructorDescription { + case encryptedMessage(randomId: Int64, chatId: Int32, date: Int32, bytes: Buffer, file: Api.EncryptedFile) + case encryptedMessageService(randomId: Int64, chatId: Int32, date: Int32, bytes: Buffer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .encryptedMessage(let randomId, let chatId, let date, let bytes, let file): + if boxed { + buffer.appendInt32(-317144808) + } + serializeInt64(randomId, buffer: buffer, boxed: false) + serializeInt32(chatId, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + serializeBytes(bytes, buffer: buffer, boxed: false) + file.serialize(buffer, true) + break + case .encryptedMessageService(let randomId, let chatId, let date, let bytes): + if boxed { + buffer.appendInt32(594758406) + } + serializeInt64(randomId, buffer: buffer, boxed: false) + serializeInt32(chatId, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + serializeBytes(bytes, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .encryptedMessage(let randomId, let chatId, let date, let bytes, let file): + return ("encryptedMessage", [("randomId", randomId), ("chatId", chatId), ("date", date), ("bytes", bytes), ("file", file)]) + case .encryptedMessageService(let randomId, let chatId, let date, let bytes): + return ("encryptedMessageService", [("randomId", randomId), ("chatId", chatId), ("date", date), ("bytes", bytes)]) + } + } + + public static func parse_encryptedMessage(_ reader: BufferReader) -> EncryptedMessage? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: Buffer? + _4 = parseBytes(reader) + var _5: Api.EncryptedFile? + if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.EncryptedFile + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.EncryptedMessage.encryptedMessage(randomId: _1!, chatId: _2!, date: _3!, bytes: _4!, file: _5!) + } + else { + return nil + } + } + public static func parse_encryptedMessageService(_ reader: BufferReader) -> EncryptedMessage? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: Buffer? + _4 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.EncryptedMessage.encryptedMessageService(randomId: _1!, chatId: _2!, date: _3!, bytes: _4!) + } + else { + return nil + } + } + + } + public enum ChannelParticipantsFilter: TypeConstructorDescription { + case channelParticipantsRecent + case channelParticipantsAdmins + case channelParticipantsBots + case channelParticipantsBanned(q: String) + case channelParticipantsSearch(q: String) + case channelParticipantsKicked(q: String) + case channelParticipantsContacts(q: String) + case channelParticipantsMentions(flags: Int32, q: String?, topMsgId: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .channelParticipantsRecent: + if boxed { + buffer.appendInt32(-566281095) + } + + break + case .channelParticipantsAdmins: + if boxed { + buffer.appendInt32(-1268741783) + } + + break + case .channelParticipantsBots: + if boxed { + buffer.appendInt32(-1328445861) + } + + break + case .channelParticipantsBanned(let q): + if boxed { + buffer.appendInt32(338142689) + } + serializeString(q, buffer: buffer, boxed: false) + break + case .channelParticipantsSearch(let q): + if boxed { + buffer.appendInt32(106343499) + } + serializeString(q, buffer: buffer, boxed: false) + break + case .channelParticipantsKicked(let q): + if boxed { + buffer.appendInt32(-1548400251) + } + serializeString(q, buffer: buffer, boxed: false) + break + case .channelParticipantsContacts(let q): + if boxed { + buffer.appendInt32(-1150621555) + } + serializeString(q, buffer: buffer, boxed: false) + break + case .channelParticipantsMentions(let flags, let q, let topMsgId): + if boxed { + buffer.appendInt32(-531931925) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeString(q!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(topMsgId!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .channelParticipantsRecent: + return ("channelParticipantsRecent", []) + case .channelParticipantsAdmins: + return ("channelParticipantsAdmins", []) + case .channelParticipantsBots: + return ("channelParticipantsBots", []) + case .channelParticipantsBanned(let q): + return ("channelParticipantsBanned", [("q", q)]) + case .channelParticipantsSearch(let q): + return ("channelParticipantsSearch", [("q", q)]) + case .channelParticipantsKicked(let q): + return ("channelParticipantsKicked", [("q", q)]) + case .channelParticipantsContacts(let q): + return ("channelParticipantsContacts", [("q", q)]) + case .channelParticipantsMentions(let flags, let q, let topMsgId): + return ("channelParticipantsMentions", [("flags", flags), ("q", q), ("topMsgId", topMsgId)]) + } + } + + public static func parse_channelParticipantsRecent(_ reader: BufferReader) -> ChannelParticipantsFilter? { + return Api.ChannelParticipantsFilter.channelParticipantsRecent + } + public static func parse_channelParticipantsAdmins(_ reader: BufferReader) -> ChannelParticipantsFilter? { + return Api.ChannelParticipantsFilter.channelParticipantsAdmins + } + public static func parse_channelParticipantsBots(_ reader: BufferReader) -> ChannelParticipantsFilter? { + return Api.ChannelParticipantsFilter.channelParticipantsBots + } + public static func parse_channelParticipantsBanned(_ reader: BufferReader) -> ChannelParticipantsFilter? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.ChannelParticipantsFilter.channelParticipantsBanned(q: _1!) + } + else { + return nil + } + } + public static func parse_channelParticipantsSearch(_ reader: BufferReader) -> ChannelParticipantsFilter? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.ChannelParticipantsFilter.channelParticipantsSearch(q: _1!) + } + else { + return nil + } + } + public static func parse_channelParticipantsKicked(_ reader: BufferReader) -> ChannelParticipantsFilter? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.ChannelParticipantsFilter.channelParticipantsKicked(q: _1!) + } + else { + return nil + } + } + public static func parse_channelParticipantsContacts(_ reader: BufferReader) -> ChannelParticipantsFilter? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.ChannelParticipantsFilter.channelParticipantsContacts(q: _1!) + } + else { + return nil + } + } + public static func parse_channelParticipantsMentions(_ reader: BufferReader) -> ChannelParticipantsFilter? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + if Int(_1!) & Int(1 << 0) != 0 {_2 = parseString(reader) } + var _3: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_3 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.ChannelParticipantsFilter.channelParticipantsMentions(flags: _1!, q: _2, topMsgId: _3) + } + else { + return nil + } + } + + } + public enum WebPage: TypeConstructorDescription { + case webPageEmpty(id: Int64) + case webPagePending(id: Int64, date: Int32) + case webPage(flags: Int32, id: Int64, url: String, displayUrl: String, hash: Int32, type: String?, siteName: String?, title: String?, description: String?, photo: Api.Photo?, embedUrl: String?, embedType: String?, embedWidth: Int32?, embedHeight: Int32?, duration: Int32?, author: String?, document: Api.Document?, cachedPage: Api.Page?, attributes: [Api.WebPageAttribute]?) + case webPageNotModified(flags: Int32, cachedPageViews: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .webPageEmpty(let id): + if boxed { + buffer.appendInt32(-350980120) + } + serializeInt64(id, buffer: buffer, boxed: false) + break + case .webPagePending(let id, let date): + if boxed { + buffer.appendInt32(-981018084) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + break + case .webPage(let flags, let id, let url, let displayUrl, let hash, let type, let siteName, let title, let description, let photo, let embedUrl, let embedType, let embedWidth, let embedHeight, let duration, let author, let document, let cachedPage, let attributes): + if boxed { + buffer.appendInt32(-392411726) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(id, buffer: buffer, boxed: false) + serializeString(url, buffer: buffer, boxed: false) + serializeString(displayUrl, buffer: buffer, boxed: false) + serializeInt32(hash, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeString(type!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeString(siteName!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeString(title!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeString(description!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 4) != 0 {photo!.serialize(buffer, true)} + if Int(flags) & Int(1 << 5) != 0 {serializeString(embedUrl!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 5) != 0 {serializeString(embedType!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 6) != 0 {serializeInt32(embedWidth!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 6) != 0 {serializeInt32(embedHeight!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 7) != 0 {serializeInt32(duration!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 8) != 0 {serializeString(author!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 9) != 0 {document!.serialize(buffer, true)} + if Int(flags) & Int(1 << 10) != 0 {cachedPage!.serialize(buffer, true)} + if Int(flags) & Int(1 << 12) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(attributes!.count)) + for item in attributes! { + item.serialize(buffer, true) + }} + break + case .webPageNotModified(let flags, let cachedPageViews): + if boxed { + buffer.appendInt32(1930545681) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(cachedPageViews!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .webPageEmpty(let id): + return ("webPageEmpty", [("id", id)]) + case .webPagePending(let id, let date): + return ("webPagePending", [("id", id), ("date", date)]) + case .webPage(let flags, let id, let url, let displayUrl, let hash, let type, let siteName, let title, let description, let photo, let embedUrl, let embedType, let embedWidth, let embedHeight, let duration, let author, let document, let cachedPage, let attributes): + return ("webPage", [("flags", flags), ("id", id), ("url", url), ("displayUrl", displayUrl), ("hash", hash), ("type", type), ("siteName", siteName), ("title", title), ("description", description), ("photo", photo), ("embedUrl", embedUrl), ("embedType", embedType), ("embedWidth", embedWidth), ("embedHeight", embedHeight), ("duration", duration), ("author", author), ("document", document), ("cachedPage", cachedPage), ("attributes", attributes)]) + case .webPageNotModified(let flags, let cachedPageViews): + return ("webPageNotModified", [("flags", flags), ("cachedPageViews", cachedPageViews)]) + } + } + + public static func parse_webPageEmpty(_ reader: BufferReader) -> WebPage? { + var _1: Int64? + _1 = reader.readInt64() + let _c1 = _1 != nil + if _c1 { + return Api.WebPage.webPageEmpty(id: _1!) + } + else { + return nil + } + } + public static func parse_webPagePending(_ reader: BufferReader) -> WebPage? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.WebPage.webPagePending(id: _1!, date: _2!) + } + else { + return nil + } + } + public static func parse_webPage(_ reader: BufferReader) -> WebPage? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + var _5: Int32? + _5 = reader.readInt32() + var _6: String? + if Int(_1!) & Int(1 << 0) != 0 {_6 = parseString(reader) } + var _7: String? + if Int(_1!) & Int(1 << 1) != 0 {_7 = parseString(reader) } + var _8: String? + if Int(_1!) & Int(1 << 2) != 0 {_8 = parseString(reader) } + var _9: String? + if Int(_1!) & Int(1 << 3) != 0 {_9 = parseString(reader) } + var _10: Api.Photo? + if Int(_1!) & Int(1 << 4) != 0 {if let signature = reader.readInt32() { + _10 = Api.parse(reader, signature: signature) as? Api.Photo + } } + var _11: String? + if Int(_1!) & Int(1 << 5) != 0 {_11 = parseString(reader) } + var _12: String? + if Int(_1!) & Int(1 << 5) != 0 {_12 = parseString(reader) } + var _13: Int32? + if Int(_1!) & Int(1 << 6) != 0 {_13 = reader.readInt32() } + var _14: Int32? + if Int(_1!) & Int(1 << 6) != 0 {_14 = reader.readInt32() } + var _15: Int32? + if Int(_1!) & Int(1 << 7) != 0 {_15 = reader.readInt32() } + var _16: String? + if Int(_1!) & Int(1 << 8) != 0 {_16 = parseString(reader) } + var _17: Api.Document? + if Int(_1!) & Int(1 << 9) != 0 {if let signature = reader.readInt32() { + _17 = Api.parse(reader, signature: signature) as? Api.Document + } } + var _18: Api.Page? + if Int(_1!) & Int(1 << 10) != 0 {if let signature = reader.readInt32() { + _18 = Api.parse(reader, signature: signature) as? Api.Page + } } + var _19: [Api.WebPageAttribute]? + if Int(_1!) & Int(1 << 12) != 0 {if let _ = reader.readInt32() { + _19 = Api.parseVector(reader, elementSignature: 0, elementType: Api.WebPageAttribute.self) + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil + let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil + let _c9 = (Int(_1!) & Int(1 << 3) == 0) || _9 != nil + let _c10 = (Int(_1!) & Int(1 << 4) == 0) || _10 != nil + let _c11 = (Int(_1!) & Int(1 << 5) == 0) || _11 != nil + let _c12 = (Int(_1!) & Int(1 << 5) == 0) || _12 != nil + let _c13 = (Int(_1!) & Int(1 << 6) == 0) || _13 != nil + let _c14 = (Int(_1!) & Int(1 << 6) == 0) || _14 != nil + let _c15 = (Int(_1!) & Int(1 << 7) == 0) || _15 != nil + let _c16 = (Int(_1!) & Int(1 << 8) == 0) || _16 != nil + let _c17 = (Int(_1!) & Int(1 << 9) == 0) || _17 != nil + let _c18 = (Int(_1!) & Int(1 << 10) == 0) || _18 != nil + let _c19 = (Int(_1!) & Int(1 << 12) == 0) || _19 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 { + return Api.WebPage.webPage(flags: _1!, id: _2!, url: _3!, displayUrl: _4!, hash: _5!, type: _6, siteName: _7, title: _8, description: _9, photo: _10, embedUrl: _11, embedType: _12, embedWidth: _13, embedHeight: _14, duration: _15, author: _16, document: _17, cachedPage: _18, attributes: _19) + } + else { + return nil + } + } + public static func parse_webPageNotModified(_ reader: BufferReader) -> WebPage? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + if _c1 && _c2 { + return Api.WebPage.webPageNotModified(flags: _1!, cachedPageViews: _2) + } + else { + return nil + } + } + + } + public enum InputBotInlineMessage: TypeConstructorDescription { + case inputBotInlineMessageText(flags: Int32, message: String, entities: [Api.MessageEntity]?, replyMarkup: Api.ReplyMarkup?) + case inputBotInlineMessageGame(flags: Int32, replyMarkup: Api.ReplyMarkup?) + case inputBotInlineMessageMediaAuto(flags: Int32, message: String, entities: [Api.MessageEntity]?, replyMarkup: Api.ReplyMarkup?) + case inputBotInlineMessageMediaVenue(flags: Int32, geoPoint: Api.InputGeoPoint, title: String, address: String, provider: String, venueId: String, venueType: String, replyMarkup: Api.ReplyMarkup?) + case inputBotInlineMessageMediaContact(flags: Int32, phoneNumber: String, firstName: String, lastName: String, vcard: String, replyMarkup: Api.ReplyMarkup?) + case inputBotInlineMessageMediaGeo(flags: Int32, geoPoint: Api.InputGeoPoint, heading: Int32?, period: Int32?, proximityNotificationRadius: Int32?, replyMarkup: Api.ReplyMarkup?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputBotInlineMessageText(let flags, let message, let entities, let replyMarkup): + if boxed { + buffer.appendInt32(1036876423) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(message, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities!.count)) + for item in entities! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} + break + case .inputBotInlineMessageGame(let flags, let replyMarkup): + if boxed { + buffer.appendInt32(1262639204) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} + break + case .inputBotInlineMessageMediaAuto(let flags, let message, let entities, let replyMarkup): + if boxed { + buffer.appendInt32(864077702) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(message, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities!.count)) + for item in entities! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} + break + case .inputBotInlineMessageMediaVenue(let flags, let geoPoint, let title, let address, let provider, let venueId, let venueType, let replyMarkup): + if boxed { + buffer.appendInt32(1098628881) + } + serializeInt32(flags, buffer: buffer, boxed: false) + geoPoint.serialize(buffer, true) + serializeString(title, buffer: buffer, boxed: false) + serializeString(address, buffer: buffer, boxed: false) + serializeString(provider, buffer: buffer, boxed: false) + serializeString(venueId, buffer: buffer, boxed: false) + serializeString(venueType, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} + break + case .inputBotInlineMessageMediaContact(let flags, let phoneNumber, let firstName, let lastName, let vcard, let replyMarkup): + if boxed { + buffer.appendInt32(-1494368259) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(phoneNumber, buffer: buffer, boxed: false) + serializeString(firstName, buffer: buffer, boxed: false) + serializeString(lastName, buffer: buffer, boxed: false) + serializeString(vcard, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} + break + case .inputBotInlineMessageMediaGeo(let flags, let geoPoint, let heading, let period, let proximityNotificationRadius, let replyMarkup): + if boxed { + buffer.appendInt32(-1768777083) + } + serializeInt32(flags, buffer: buffer, boxed: false) + geoPoint.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(heading!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(period!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeInt32(proximityNotificationRadius!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputBotInlineMessageText(let flags, let message, let entities, let replyMarkup): + return ("inputBotInlineMessageText", [("flags", flags), ("message", message), ("entities", entities), ("replyMarkup", replyMarkup)]) + case .inputBotInlineMessageGame(let flags, let replyMarkup): + return ("inputBotInlineMessageGame", [("flags", flags), ("replyMarkup", replyMarkup)]) + case .inputBotInlineMessageMediaAuto(let flags, let message, let entities, let replyMarkup): + return ("inputBotInlineMessageMediaAuto", [("flags", flags), ("message", message), ("entities", entities), ("replyMarkup", replyMarkup)]) + case .inputBotInlineMessageMediaVenue(let flags, let geoPoint, let title, let address, let provider, let venueId, let venueType, let replyMarkup): + return ("inputBotInlineMessageMediaVenue", [("flags", flags), ("geoPoint", geoPoint), ("title", title), ("address", address), ("provider", provider), ("venueId", venueId), ("venueType", venueType), ("replyMarkup", replyMarkup)]) + case .inputBotInlineMessageMediaContact(let flags, let phoneNumber, let firstName, let lastName, let vcard, let replyMarkup): + return ("inputBotInlineMessageMediaContact", [("flags", flags), ("phoneNumber", phoneNumber), ("firstName", firstName), ("lastName", lastName), ("vcard", vcard), ("replyMarkup", replyMarkup)]) + case .inputBotInlineMessageMediaGeo(let flags, let geoPoint, let heading, let period, let proximityNotificationRadius, let replyMarkup): + return ("inputBotInlineMessageMediaGeo", [("flags", flags), ("geoPoint", geoPoint), ("heading", heading), ("period", period), ("proximityNotificationRadius", proximityNotificationRadius), ("replyMarkup", replyMarkup)]) + } + } + + public static func parse_inputBotInlineMessageText(_ reader: BufferReader) -> InputBotInlineMessage? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: [Api.MessageEntity]? + if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) + } } + var _4: Api.ReplyMarkup? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputBotInlineMessage.inputBotInlineMessageText(flags: _1!, message: _2!, entities: _3, replyMarkup: _4) + } + else { + return nil + } + } + public static func parse_inputBotInlineMessageGame(_ reader: BufferReader) -> InputBotInlineMessage? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.ReplyMarkup? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup + } } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 2) == 0) || _2 != nil + if _c1 && _c2 { + return Api.InputBotInlineMessage.inputBotInlineMessageGame(flags: _1!, replyMarkup: _2) + } + else { + return nil + } + } + public static func parse_inputBotInlineMessageMediaAuto(_ reader: BufferReader) -> InputBotInlineMessage? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: [Api.MessageEntity]? + if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) + } } + var _4: Api.ReplyMarkup? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputBotInlineMessage.inputBotInlineMessageMediaAuto(flags: _1!, message: _2!, entities: _3, replyMarkup: _4) + } + else { + return nil + } + } + public static func parse_inputBotInlineMessageMediaVenue(_ reader: BufferReader) -> InputBotInlineMessage? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.InputGeoPoint? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.InputGeoPoint + } + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + var _5: String? + _5 = parseString(reader) + var _6: String? + _6 = parseString(reader) + var _7: String? + _7 = parseString(reader) + var _8: Api.ReplyMarkup? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _8 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { + return Api.InputBotInlineMessage.inputBotInlineMessageMediaVenue(flags: _1!, geoPoint: _2!, title: _3!, address: _4!, provider: _5!, venueId: _6!, venueType: _7!, replyMarkup: _8) + } + else { + return nil + } + } + public static func parse_inputBotInlineMessageMediaContact(_ reader: BufferReader) -> InputBotInlineMessage? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + var _5: String? + _5 = parseString(reader) + var _6: Api.ReplyMarkup? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.InputBotInlineMessage.inputBotInlineMessageMediaContact(flags: _1!, phoneNumber: _2!, firstName: _3!, lastName: _4!, vcard: _5!, replyMarkup: _6) + } + else { + return nil + } + } + public static func parse_inputBotInlineMessageMediaGeo(_ reader: BufferReader) -> InputBotInlineMessage? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.InputGeoPoint? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.InputGeoPoint + } + var _3: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } + var _4: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt32() } + var _5: Int32? + if Int(_1!) & Int(1 << 3) != 0 {_5 = reader.readInt32() } + var _6: Api.ReplyMarkup? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.InputBotInlineMessage.inputBotInlineMessageMediaGeo(flags: _1!, geoPoint: _2!, heading: _3, period: _4, proximityNotificationRadius: _5, replyMarkup: _6) + } + else { + return nil + } + } + + } + public enum KeyboardButtonRow: TypeConstructorDescription { + case keyboardButtonRow(buttons: [Api.KeyboardButton]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .keyboardButtonRow(let buttons): + if boxed { + buffer.appendInt32(2002815875) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(buttons.count)) + for item in buttons { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .keyboardButtonRow(let buttons): + return ("keyboardButtonRow", [("buttons", buttons)]) + } + } + + public static func parse_keyboardButtonRow(_ reader: BufferReader) -> KeyboardButtonRow? { + var _1: [Api.KeyboardButton]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.KeyboardButton.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.KeyboardButtonRow.keyboardButtonRow(buttons: _1!) + } + else { + return nil + } + } + + } + public enum StickerSet: TypeConstructorDescription { + case stickerSet(flags: Int32, installedDate: Int32?, id: Int64, accessHash: Int64, title: String, shortName: String, thumbs: [Api.PhotoSize]?, thumbDcId: Int32?, count: Int32, hash: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .stickerSet(let flags, let installedDate, let id, let accessHash, let title, let shortName, let thumbs, let thumbDcId, let count, let hash): + if boxed { + buffer.appendInt32(1088567208) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(installedDate!, buffer: buffer, boxed: false)} + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeString(title, buffer: buffer, boxed: false) + serializeString(shortName, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 4) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(thumbs!.count)) + for item in thumbs! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 4) != 0 {serializeInt32(thumbDcId!, buffer: buffer, boxed: false)} + serializeInt32(count, buffer: buffer, boxed: false) + serializeInt32(hash, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .stickerSet(let flags, let installedDate, let id, let accessHash, let title, let shortName, let thumbs, let thumbDcId, let count, let hash): + return ("stickerSet", [("flags", flags), ("installedDate", installedDate), ("id", id), ("accessHash", accessHash), ("title", title), ("shortName", shortName), ("thumbs", thumbs), ("thumbDcId", thumbDcId), ("count", count), ("hash", hash)]) + } + } + + public static func parse_stickerSet(_ reader: BufferReader) -> StickerSet? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } + var _3: Int64? + _3 = reader.readInt64() + var _4: Int64? + _4 = reader.readInt64() + var _5: String? + _5 = parseString(reader) + var _6: String? + _6 = parseString(reader) + var _7: [Api.PhotoSize]? + if Int(_1!) & Int(1 << 4) != 0 {if let _ = reader.readInt32() { + _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PhotoSize.self) + } } + var _8: Int32? + if Int(_1!) & Int(1 << 4) != 0 {_8 = reader.readInt32() } + var _9: Int32? + _9 = reader.readInt32() + var _10: Int32? + _10 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil + let _c8 = (Int(_1!) & Int(1 << 4) == 0) || _8 != nil + let _c9 = _9 != nil + let _c10 = _10 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 { + return Api.StickerSet.stickerSet(flags: _1!, installedDate: _2, id: _3!, accessHash: _4!, title: _5!, shortName: _6!, thumbs: _7, thumbDcId: _8, count: _9!, hash: _10!) + } + else { + return nil + } + } + + } + public enum SecureSecretSettings: TypeConstructorDescription { + case secureSecretSettings(secureAlgo: Api.SecurePasswordKdfAlgo, secureSecret: Buffer, secureSecretId: Int64) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .secureSecretSettings(let secureAlgo, let secureSecret, let secureSecretId): + if boxed { + buffer.appendInt32(354925740) + } + secureAlgo.serialize(buffer, true) + serializeBytes(secureSecret, buffer: buffer, boxed: false) + serializeInt64(secureSecretId, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .secureSecretSettings(let secureAlgo, let secureSecret, let secureSecretId): + return ("secureSecretSettings", [("secureAlgo", secureAlgo), ("secureSecret", secureSecret), ("secureSecretId", secureSecretId)]) + } + } + + public static func parse_secureSecretSettings(_ reader: BufferReader) -> SecureSecretSettings? { + var _1: Api.SecurePasswordKdfAlgo? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.SecurePasswordKdfAlgo + } + var _2: Buffer? + _2 = parseBytes(reader) + var _3: Int64? + _3 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.SecureSecretSettings.secureSecretSettings(secureAlgo: _1!, secureSecret: _2!, secureSecretId: _3!) + } + else { + return nil + } + } + + } + public enum InputContact: TypeConstructorDescription { + case inputPhoneContact(clientId: Int64, phone: String, firstName: String, lastName: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputPhoneContact(let clientId, let phone, let firstName, let lastName): + if boxed { + buffer.appendInt32(-208488460) + } + serializeInt64(clientId, buffer: buffer, boxed: false) + serializeString(phone, buffer: buffer, boxed: false) + serializeString(firstName, buffer: buffer, boxed: false) + serializeString(lastName, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputPhoneContact(let clientId, let phone, let firstName, let lastName): + return ("inputPhoneContact", [("clientId", clientId), ("phone", phone), ("firstName", firstName), ("lastName", lastName)]) + } + } + + public static func parse_inputPhoneContact(_ reader: BufferReader) -> InputContact? { + var _1: Int64? + _1 = reader.readInt64() + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputContact.inputPhoneContact(clientId: _1!, phone: _2!, firstName: _3!, lastName: _4!) + } + else { + return nil + } + } + + } + public enum TopPeerCategory: TypeConstructorDescription { + case topPeerCategoryBotsPM + case topPeerCategoryBotsInline + case topPeerCategoryCorrespondents + case topPeerCategoryGroups + case topPeerCategoryChannels + case topPeerCategoryPhoneCalls + case topPeerCategoryForwardUsers + case topPeerCategoryForwardChats + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .topPeerCategoryBotsPM: + if boxed { + buffer.appendInt32(-1419371685) + } + + break + case .topPeerCategoryBotsInline: + if boxed { + buffer.appendInt32(344356834) + } + + break + case .topPeerCategoryCorrespondents: + if boxed { + buffer.appendInt32(104314861) + } + + break + case .topPeerCategoryGroups: + if boxed { + buffer.appendInt32(-1122524854) + } + + break + case .topPeerCategoryChannels: + if boxed { + buffer.appendInt32(371037736) + } + + break + case .topPeerCategoryPhoneCalls: + if boxed { + buffer.appendInt32(511092620) + } + + break + case .topPeerCategoryForwardUsers: + if boxed { + buffer.appendInt32(-1472172887) + } + + break + case .topPeerCategoryForwardChats: + if boxed { + buffer.appendInt32(-68239120) + } + + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .topPeerCategoryBotsPM: + return ("topPeerCategoryBotsPM", []) + case .topPeerCategoryBotsInline: + return ("topPeerCategoryBotsInline", []) + case .topPeerCategoryCorrespondents: + return ("topPeerCategoryCorrespondents", []) + case .topPeerCategoryGroups: + return ("topPeerCategoryGroups", []) + case .topPeerCategoryChannels: + return ("topPeerCategoryChannels", []) + case .topPeerCategoryPhoneCalls: + return ("topPeerCategoryPhoneCalls", []) + case .topPeerCategoryForwardUsers: + return ("topPeerCategoryForwardUsers", []) + case .topPeerCategoryForwardChats: + return ("topPeerCategoryForwardChats", []) + } + } + + public static func parse_topPeerCategoryBotsPM(_ reader: BufferReader) -> TopPeerCategory? { + return Api.TopPeerCategory.topPeerCategoryBotsPM + } + public static func parse_topPeerCategoryBotsInline(_ reader: BufferReader) -> TopPeerCategory? { + return Api.TopPeerCategory.topPeerCategoryBotsInline + } + public static func parse_topPeerCategoryCorrespondents(_ reader: BufferReader) -> TopPeerCategory? { + return Api.TopPeerCategory.topPeerCategoryCorrespondents + } + public static func parse_topPeerCategoryGroups(_ reader: BufferReader) -> TopPeerCategory? { + return Api.TopPeerCategory.topPeerCategoryGroups + } + public static func parse_topPeerCategoryChannels(_ reader: BufferReader) -> TopPeerCategory? { + return Api.TopPeerCategory.topPeerCategoryChannels + } + public static func parse_topPeerCategoryPhoneCalls(_ reader: BufferReader) -> TopPeerCategory? { + return Api.TopPeerCategory.topPeerCategoryPhoneCalls + } + public static func parse_topPeerCategoryForwardUsers(_ reader: BufferReader) -> TopPeerCategory? { + return Api.TopPeerCategory.topPeerCategoryForwardUsers + } + public static func parse_topPeerCategoryForwardChats(_ reader: BufferReader) -> TopPeerCategory? { + return Api.TopPeerCategory.topPeerCategoryForwardChats + } + + } + public enum ChannelMessagesFilter: TypeConstructorDescription { + case channelMessagesFilterEmpty + case channelMessagesFilter(flags: Int32, ranges: [Api.MessageRange]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .channelMessagesFilterEmpty: + if boxed { + buffer.appendInt32(-1798033689) + } + + break + case .channelMessagesFilter(let flags, let ranges): + if boxed { + buffer.appendInt32(-847783593) + } + serializeInt32(flags, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(ranges.count)) + for item in ranges { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .channelMessagesFilterEmpty: + return ("channelMessagesFilterEmpty", []) + case .channelMessagesFilter(let flags, let ranges): + return ("channelMessagesFilter", [("flags", flags), ("ranges", ranges)]) + } + } + + public static func parse_channelMessagesFilterEmpty(_ reader: BufferReader) -> ChannelMessagesFilter? { + return Api.ChannelMessagesFilter.channelMessagesFilterEmpty + } + public static func parse_channelMessagesFilter(_ reader: BufferReader) -> ChannelMessagesFilter? { + var _1: Int32? + _1 = reader.readInt32() + var _2: [Api.MessageRange]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageRange.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ChannelMessagesFilter.channelMessagesFilter(flags: _1!, ranges: _2!) + } + else { + return nil + } + } + + } + public enum ChatAdminWithInvites: TypeConstructorDescription { + case chatAdminWithInvites(adminId: Int32, invitesCount: Int32, revokedInvitesCount: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .chatAdminWithInvites(let adminId, let invitesCount, let revokedInvitesCount): + if boxed { + buffer.appendInt32(-539872497) + } + serializeInt32(adminId, buffer: buffer, boxed: false) + serializeInt32(invitesCount, buffer: buffer, boxed: false) + serializeInt32(revokedInvitesCount, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .chatAdminWithInvites(let adminId, let invitesCount, let revokedInvitesCount): + return ("chatAdminWithInvites", [("adminId", adminId), ("invitesCount", invitesCount), ("revokedInvitesCount", revokedInvitesCount)]) + } + } + + public static func parse_chatAdminWithInvites(_ reader: BufferReader) -> ChatAdminWithInvites? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.ChatAdminWithInvites.chatAdminWithInvites(adminId: _1!, invitesCount: _2!, revokedInvitesCount: _3!) + } + else { + return nil + } + } + + } + public enum DialogFilterSuggested: TypeConstructorDescription { + case dialogFilterSuggested(filter: Api.DialogFilter, description: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .dialogFilterSuggested(let filter, let description): + if boxed { + buffer.appendInt32(2004110666) + } + filter.serialize(buffer, true) + serializeString(description, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .dialogFilterSuggested(let filter, let description): + return ("dialogFilterSuggested", [("filter", filter), ("description", description)]) + } + } + + public static func parse_dialogFilterSuggested(_ reader: BufferReader) -> DialogFilterSuggested? { + var _1: Api.DialogFilter? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.DialogFilter + } + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.DialogFilterSuggested.dialogFilterSuggested(filter: _1!, description: _2!) + } + else { + return nil + } + } + + } + public enum InputDocument: TypeConstructorDescription { + case inputDocumentEmpty + case inputDocument(id: Int64, accessHash: Int64, fileReference: Buffer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputDocumentEmpty: + if boxed { + buffer.appendInt32(1928391342) + } + + break + case .inputDocument(let id, let accessHash, let fileReference): + if boxed { + buffer.appendInt32(448771445) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeBytes(fileReference, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputDocumentEmpty: + return ("inputDocumentEmpty", []) + case .inputDocument(let id, let accessHash, let fileReference): + return ("inputDocument", [("id", id), ("accessHash", accessHash), ("fileReference", fileReference)]) + } + } + + public static func parse_inputDocumentEmpty(_ reader: BufferReader) -> InputDocument? { + return Api.InputDocument.inputDocumentEmpty + } + public static func parse_inputDocument(_ reader: BufferReader) -> InputDocument? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int64? + _2 = reader.readInt64() + var _3: Buffer? + _3 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.InputDocument.inputDocument(id: _1!, accessHash: _2!, fileReference: _3!) + } + else { + return nil + } + } + + } + public enum PollAnswer: TypeConstructorDescription { + case pollAnswer(text: String, option: Buffer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .pollAnswer(let text, let option): + if boxed { + buffer.appendInt32(1823064809) + } + serializeString(text, buffer: buffer, boxed: false) + serializeBytes(option, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .pollAnswer(let text, let option): + return ("pollAnswer", [("text", text), ("option", option)]) + } + } + + public static func parse_pollAnswer(_ reader: BufferReader) -> PollAnswer? { + var _1: String? + _1 = parseString(reader) + var _2: Buffer? + _2 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.PollAnswer.pollAnswer(text: _1!, option: _2!) + } + else { + return nil + } + } + + } + public enum SecureData: TypeConstructorDescription { + case secureData(data: Buffer, dataHash: Buffer, secret: Buffer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .secureData(let data, let dataHash, let secret): + if boxed { + buffer.appendInt32(-1964327229) + } + serializeBytes(data, buffer: buffer, boxed: false) + serializeBytes(dataHash, buffer: buffer, boxed: false) + serializeBytes(secret, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .secureData(let data, let dataHash, let secret): + return ("secureData", [("data", data), ("dataHash", dataHash), ("secret", secret)]) + } + } + + public static func parse_secureData(_ reader: BufferReader) -> SecureData? { + var _1: Buffer? + _1 = parseBytes(reader) + var _2: Buffer? + _2 = parseBytes(reader) + var _3: Buffer? + _3 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.SecureData.secureData(data: _1!, dataHash: _2!, secret: _3!) + } + else { + return nil + } + } + + } + public enum InputMedia: TypeConstructorDescription { + case inputMediaEmpty + case inputMediaGeoPoint(geoPoint: Api.InputGeoPoint) + case inputMediaGifExternal(url: String, q: String) + case inputMediaGame(id: Api.InputGame) + case inputMediaVenue(geoPoint: Api.InputGeoPoint, title: String, address: String, provider: String, venueId: String, venueType: String) + case inputMediaInvoice(flags: Int32, title: String, description: String, photo: Api.InputWebDocument?, invoice: Api.Invoice, payload: Buffer, provider: String, providerData: Api.DataJSON, startParam: String) + case inputMediaUploadedPhoto(flags: Int32, file: Api.InputFile, stickers: [Api.InputDocument]?, ttlSeconds: Int32?) + case inputMediaUploadedDocument(flags: Int32, file: Api.InputFile, thumb: Api.InputFile?, mimeType: String, attributes: [Api.DocumentAttribute], stickers: [Api.InputDocument]?, ttlSeconds: Int32?) + case inputMediaPhoto(flags: Int32, id: Api.InputPhoto, ttlSeconds: Int32?) + case inputMediaPhotoExternal(flags: Int32, url: String, ttlSeconds: Int32?) + case inputMediaDocumentExternal(flags: Int32, url: String, ttlSeconds: Int32?) + case inputMediaContact(phoneNumber: String, firstName: String, lastName: String, vcard: String) + case inputMediaPoll(flags: Int32, poll: Api.Poll, correctAnswers: [Buffer]?, solution: String?, solutionEntities: [Api.MessageEntity]?) + case inputMediaDice(emoticon: String) + case inputMediaGeoLive(flags: Int32, geoPoint: Api.InputGeoPoint, heading: Int32?, period: Int32?, proximityNotificationRadius: Int32?) + case inputMediaDocument(flags: Int32, id: Api.InputDocument, ttlSeconds: Int32?, query: String?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputMediaEmpty: + if boxed { + buffer.appendInt32(-1771768449) + } + + break + case .inputMediaGeoPoint(let geoPoint): + if boxed { + buffer.appendInt32(-104578748) + } + geoPoint.serialize(buffer, true) + break + case .inputMediaGifExternal(let url, let q): + if boxed { + buffer.appendInt32(1212395773) + } + serializeString(url, buffer: buffer, boxed: false) + serializeString(q, buffer: buffer, boxed: false) + break + case .inputMediaGame(let id): + if boxed { + buffer.appendInt32(-750828557) + } + id.serialize(buffer, true) + break + case .inputMediaVenue(let geoPoint, let title, let address, let provider, let venueId, let venueType): + if boxed { + buffer.appendInt32(-1052959727) + } + geoPoint.serialize(buffer, true) + serializeString(title, buffer: buffer, boxed: false) + serializeString(address, buffer: buffer, boxed: false) + serializeString(provider, buffer: buffer, boxed: false) + serializeString(venueId, buffer: buffer, boxed: false) + serializeString(venueType, buffer: buffer, boxed: false) + break + case .inputMediaInvoice(let flags, let title, let description, let photo, let invoice, let payload, let provider, let providerData, let startParam): + if boxed { + buffer.appendInt32(-186607933) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(title, buffer: buffer, boxed: false) + serializeString(description, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {photo!.serialize(buffer, true)} + invoice.serialize(buffer, true) + serializeBytes(payload, buffer: buffer, boxed: false) + serializeString(provider, buffer: buffer, boxed: false) + providerData.serialize(buffer, true) + serializeString(startParam, buffer: buffer, boxed: false) + break + case .inputMediaUploadedPhoto(let flags, let file, let stickers, let ttlSeconds): + if boxed { + buffer.appendInt32(505969924) + } + serializeInt32(flags, buffer: buffer, boxed: false) + file.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(stickers!.count)) + for item in stickers! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} + break + case .inputMediaUploadedDocument(let flags, let file, let thumb, let mimeType, let attributes, let stickers, let ttlSeconds): + if boxed { + buffer.appendInt32(1530447553) + } + serializeInt32(flags, buffer: buffer, boxed: false) + file.serialize(buffer, true) + if Int(flags) & Int(1 << 2) != 0 {thumb!.serialize(buffer, true)} + serializeString(mimeType, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(attributes.count)) + for item in attributes { + item.serialize(buffer, true) + } + if Int(flags) & Int(1 << 0) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(stickers!.count)) + for item in stickers! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} + break + case .inputMediaPhoto(let flags, let id, let ttlSeconds): + if boxed { + buffer.appendInt32(-1279654347) + } + serializeInt32(flags, buffer: buffer, boxed: false) + id.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} + break + case .inputMediaPhotoExternal(let flags, let url, let ttlSeconds): + if boxed { + buffer.appendInt32(-440664550) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(url, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} + break + case .inputMediaDocumentExternal(let flags, let url, let ttlSeconds): + if boxed { + buffer.appendInt32(-78455655) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(url, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} + break + case .inputMediaContact(let phoneNumber, let firstName, let lastName, let vcard): + if boxed { + buffer.appendInt32(-122978821) + } + serializeString(phoneNumber, buffer: buffer, boxed: false) + serializeString(firstName, buffer: buffer, boxed: false) + serializeString(lastName, buffer: buffer, boxed: false) + serializeString(vcard, buffer: buffer, boxed: false) + break + case .inputMediaPoll(let flags, let poll, let correctAnswers, let solution, let solutionEntities): + if boxed { + buffer.appendInt32(261416433) + } + serializeInt32(flags, buffer: buffer, boxed: false) + poll.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(correctAnswers!.count)) + for item in correctAnswers! { + serializeBytes(item, buffer: buffer, boxed: false) + }} + if Int(flags) & Int(1 << 1) != 0 {serializeString(solution!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(solutionEntities!.count)) + for item in solutionEntities! { + item.serialize(buffer, true) + }} + break + case .inputMediaDice(let emoticon): + if boxed { + buffer.appendInt32(-428884101) + } + serializeString(emoticon, buffer: buffer, boxed: false) + break + case .inputMediaGeoLive(let flags, let geoPoint, let heading, let period, let proximityNotificationRadius): + if boxed { + buffer.appendInt32(-1759532989) + } + serializeInt32(flags, buffer: buffer, boxed: false) + geoPoint.serialize(buffer, true) + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(heading!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(period!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeInt32(proximityNotificationRadius!, buffer: buffer, boxed: false)} + break + case .inputMediaDocument(let flags, let id, let ttlSeconds, let query): + if boxed { + buffer.appendInt32(860303448) + } + serializeInt32(flags, buffer: buffer, boxed: false) + id.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeString(query!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputMediaEmpty: + return ("inputMediaEmpty", []) + case .inputMediaGeoPoint(let geoPoint): + return ("inputMediaGeoPoint", [("geoPoint", geoPoint)]) + case .inputMediaGifExternal(let url, let q): + return ("inputMediaGifExternal", [("url", url), ("q", q)]) + case .inputMediaGame(let id): + return ("inputMediaGame", [("id", id)]) + case .inputMediaVenue(let geoPoint, let title, let address, let provider, let venueId, let venueType): + return ("inputMediaVenue", [("geoPoint", geoPoint), ("title", title), ("address", address), ("provider", provider), ("venueId", venueId), ("venueType", venueType)]) + case .inputMediaInvoice(let flags, let title, let description, let photo, let invoice, let payload, let provider, let providerData, let startParam): + return ("inputMediaInvoice", [("flags", flags), ("title", title), ("description", description), ("photo", photo), ("invoice", invoice), ("payload", payload), ("provider", provider), ("providerData", providerData), ("startParam", startParam)]) + case .inputMediaUploadedPhoto(let flags, let file, let stickers, let ttlSeconds): + return ("inputMediaUploadedPhoto", [("flags", flags), ("file", file), ("stickers", stickers), ("ttlSeconds", ttlSeconds)]) + case .inputMediaUploadedDocument(let flags, let file, let thumb, let mimeType, let attributes, let stickers, let ttlSeconds): + return ("inputMediaUploadedDocument", [("flags", flags), ("file", file), ("thumb", thumb), ("mimeType", mimeType), ("attributes", attributes), ("stickers", stickers), ("ttlSeconds", ttlSeconds)]) + case .inputMediaPhoto(let flags, let id, let ttlSeconds): + return ("inputMediaPhoto", [("flags", flags), ("id", id), ("ttlSeconds", ttlSeconds)]) + case .inputMediaPhotoExternal(let flags, let url, let ttlSeconds): + return ("inputMediaPhotoExternal", [("flags", flags), ("url", url), ("ttlSeconds", ttlSeconds)]) + case .inputMediaDocumentExternal(let flags, let url, let ttlSeconds): + return ("inputMediaDocumentExternal", [("flags", flags), ("url", url), ("ttlSeconds", ttlSeconds)]) + case .inputMediaContact(let phoneNumber, let firstName, let lastName, let vcard): + return ("inputMediaContact", [("phoneNumber", phoneNumber), ("firstName", firstName), ("lastName", lastName), ("vcard", vcard)]) + case .inputMediaPoll(let flags, let poll, let correctAnswers, let solution, let solutionEntities): + return ("inputMediaPoll", [("flags", flags), ("poll", poll), ("correctAnswers", correctAnswers), ("solution", solution), ("solutionEntities", solutionEntities)]) + case .inputMediaDice(let emoticon): + return ("inputMediaDice", [("emoticon", emoticon)]) + case .inputMediaGeoLive(let flags, let geoPoint, let heading, let period, let proximityNotificationRadius): + return ("inputMediaGeoLive", [("flags", flags), ("geoPoint", geoPoint), ("heading", heading), ("period", period), ("proximityNotificationRadius", proximityNotificationRadius)]) + case .inputMediaDocument(let flags, let id, let ttlSeconds, let query): + return ("inputMediaDocument", [("flags", flags), ("id", id), ("ttlSeconds", ttlSeconds), ("query", query)]) + } + } + + public static func parse_inputMediaEmpty(_ reader: BufferReader) -> InputMedia? { + return Api.InputMedia.inputMediaEmpty + } + public static func parse_inputMediaGeoPoint(_ reader: BufferReader) -> InputMedia? { + var _1: Api.InputGeoPoint? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputGeoPoint + } + let _c1 = _1 != nil + if _c1 { + return Api.InputMedia.inputMediaGeoPoint(geoPoint: _1!) + } + else { + return nil + } + } + public static func parse_inputMediaGifExternal(_ reader: BufferReader) -> InputMedia? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputMedia.inputMediaGifExternal(url: _1!, q: _2!) + } + else { + return nil + } + } + public static func parse_inputMediaGame(_ reader: BufferReader) -> InputMedia? { + var _1: Api.InputGame? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputGame + } + let _c1 = _1 != nil + if _c1 { + return Api.InputMedia.inputMediaGame(id: _1!) + } + else { + return nil + } + } + public static func parse_inputMediaVenue(_ reader: BufferReader) -> InputMedia? { + var _1: Api.InputGeoPoint? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputGeoPoint + } + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + var _5: String? + _5 = parseString(reader) + var _6: String? + _6 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.InputMedia.inputMediaVenue(geoPoint: _1!, title: _2!, address: _3!, provider: _4!, venueId: _5!, venueType: _6!) + } + else { + return nil + } + } + public static func parse_inputMediaInvoice(_ reader: BufferReader) -> InputMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: Api.InputWebDocument? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.InputWebDocument + } } + var _5: Api.Invoice? + if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.Invoice + } + var _6: Buffer? + _6 = parseBytes(reader) + var _7: String? + _7 = parseString(reader) + var _8: Api.DataJSON? + if let signature = reader.readInt32() { + _8 = Api.parse(reader, signature: signature) as? Api.DataJSON + } + var _9: String? + _9 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = _8 != nil + let _c9 = _9 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { + return Api.InputMedia.inputMediaInvoice(flags: _1!, title: _2!, description: _3!, photo: _4, invoice: _5!, payload: _6!, provider: _7!, providerData: _8!, startParam: _9!) + } + else { + return nil + } + } + public static func parse_inputMediaUploadedPhoto(_ reader: BufferReader) -> InputMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.InputFile? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.InputFile + } + var _3: [Api.InputDocument]? + if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputDocument.self) + } } + var _4: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputMedia.inputMediaUploadedPhoto(flags: _1!, file: _2!, stickers: _3, ttlSeconds: _4) + } + else { + return nil + } + } + public static func parse_inputMediaUploadedDocument(_ reader: BufferReader) -> InputMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.InputFile? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.InputFile + } + var _3: Api.InputFile? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.InputFile + } } + var _4: String? + _4 = parseString(reader) + var _5: [Api.DocumentAttribute]? + if let _ = reader.readInt32() { + _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DocumentAttribute.self) + } + var _6: [Api.InputDocument]? + if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { + _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputDocument.self) + } } + var _7: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_7 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.InputMedia.inputMediaUploadedDocument(flags: _1!, file: _2!, thumb: _3, mimeType: _4!, attributes: _5!, stickers: _6, ttlSeconds: _7) + } + else { + return nil + } + } + public static func parse_inputMediaPhoto(_ reader: BufferReader) -> InputMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.InputPhoto? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.InputPhoto + } + var _3: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.InputMedia.inputMediaPhoto(flags: _1!, id: _2!, ttlSeconds: _3) + } + else { + return nil + } + } + public static func parse_inputMediaPhotoExternal(_ reader: BufferReader) -> InputMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.InputMedia.inputMediaPhotoExternal(flags: _1!, url: _2!, ttlSeconds: _3) + } + else { + return nil + } + } + public static func parse_inputMediaDocumentExternal(_ reader: BufferReader) -> InputMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.InputMedia.inputMediaDocumentExternal(flags: _1!, url: _2!, ttlSeconds: _3) + } + else { + return nil + } + } + public static func parse_inputMediaContact(_ reader: BufferReader) -> InputMedia? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputMedia.inputMediaContact(phoneNumber: _1!, firstName: _2!, lastName: _3!, vcard: _4!) + } + else { + return nil + } + } + public static func parse_inputMediaPoll(_ reader: BufferReader) -> InputMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.Poll? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Poll + } + var _3: [Buffer]? + if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: -1255641564, elementType: Buffer.self) + } } + var _4: String? + if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } + var _5: [Api.MessageEntity]? + if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { + _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.InputMedia.inputMediaPoll(flags: _1!, poll: _2!, correctAnswers: _3, solution: _4, solutionEntities: _5) + } + else { + return nil + } + } + public static func parse_inputMediaDice(_ reader: BufferReader) -> InputMedia? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.InputMedia.inputMediaDice(emoticon: _1!) + } + else { + return nil + } + } + public static func parse_inputMediaGeoLive(_ reader: BufferReader) -> InputMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.InputGeoPoint? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.InputGeoPoint + } + var _3: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_3 = reader.readInt32() } + var _4: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt32() } + var _5: Int32? + if Int(_1!) & Int(1 << 3) != 0 {_5 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.InputMedia.inputMediaGeoLive(flags: _1!, geoPoint: _2!, heading: _3, period: _4, proximityNotificationRadius: _5) + } + else { + return nil + } + } + public static func parse_inputMediaDocument(_ reader: BufferReader) -> InputMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.InputDocument? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.InputDocument + } + var _3: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } + var _4: String? + if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputMedia.inputMediaDocument(flags: _1!, id: _2!, ttlSeconds: _3, query: _4) + } + else { + return nil + } + } + + } + indirect public enum InputPeer: TypeConstructorDescription { + case inputPeerEmpty + case inputPeerSelf + case inputPeerChat(chatId: Int32) + case inputPeerUser(userId: Int32, accessHash: Int64) + case inputPeerChannel(channelId: Int32, accessHash: Int64) + case inputPeerUserFromMessage(peer: Api.InputPeer, msgId: Int32, userId: Int32) + case inputPeerChannelFromMessage(peer: Api.InputPeer, msgId: Int32, channelId: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputPeerEmpty: + if boxed { + buffer.appendInt32(2134579434) + } + + break + case .inputPeerSelf: + if boxed { + buffer.appendInt32(2107670217) + } + + break + case .inputPeerChat(let chatId): + if boxed { + buffer.appendInt32(396093539) + } + serializeInt32(chatId, buffer: buffer, boxed: false) + break + case .inputPeerUser(let userId, let accessHash): + if boxed { + buffer.appendInt32(2072935910) + } + serializeInt32(userId, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + break + case .inputPeerChannel(let channelId, let accessHash): + if boxed { + buffer.appendInt32(548253432) + } + serializeInt32(channelId, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + break + case .inputPeerUserFromMessage(let peer, let msgId, let userId): + if boxed { + buffer.appendInt32(398123750) + } + peer.serialize(buffer, true) + serializeInt32(msgId, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + break + case .inputPeerChannelFromMessage(let peer, let msgId, let channelId): + if boxed { + buffer.appendInt32(-1667893317) + } + peer.serialize(buffer, true) + serializeInt32(msgId, buffer: buffer, boxed: false) + serializeInt32(channelId, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputPeerEmpty: + return ("inputPeerEmpty", []) + case .inputPeerSelf: + return ("inputPeerSelf", []) + case .inputPeerChat(let chatId): + return ("inputPeerChat", [("chatId", chatId)]) + case .inputPeerUser(let userId, let accessHash): + return ("inputPeerUser", [("userId", userId), ("accessHash", accessHash)]) + case .inputPeerChannel(let channelId, let accessHash): + return ("inputPeerChannel", [("channelId", channelId), ("accessHash", accessHash)]) + case .inputPeerUserFromMessage(let peer, let msgId, let userId): + return ("inputPeerUserFromMessage", [("peer", peer), ("msgId", msgId), ("userId", userId)]) + case .inputPeerChannelFromMessage(let peer, let msgId, let channelId): + return ("inputPeerChannelFromMessage", [("peer", peer), ("msgId", msgId), ("channelId", channelId)]) + } + } + + public static func parse_inputPeerEmpty(_ reader: BufferReader) -> InputPeer? { + return Api.InputPeer.inputPeerEmpty + } + public static func parse_inputPeerSelf(_ reader: BufferReader) -> InputPeer? { + return Api.InputPeer.inputPeerSelf + } + public static func parse_inputPeerChat(_ reader: BufferReader) -> InputPeer? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.InputPeer.inputPeerChat(chatId: _1!) + } + else { + return nil + } + } + public static func parse_inputPeerUser(_ reader: BufferReader) -> InputPeer? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputPeer.inputPeerUser(userId: _1!, accessHash: _2!) + } + else { + return nil + } + } + public static func parse_inputPeerChannel(_ reader: BufferReader) -> InputPeer? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputPeer.inputPeerChannel(channelId: _1!, accessHash: _2!) + } + else { + return nil + } + } + public static func parse_inputPeerUserFromMessage(_ reader: BufferReader) -> InputPeer? { + var _1: Api.InputPeer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputPeer + } + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.InputPeer.inputPeerUserFromMessage(peer: _1!, msgId: _2!, userId: _3!) + } + else { + return nil + } + } + public static func parse_inputPeerChannelFromMessage(_ reader: BufferReader) -> InputPeer? { + var _1: Api.InputPeer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputPeer + } + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.InputPeer.inputPeerChannelFromMessage(peer: _1!, msgId: _2!, channelId: _3!) + } + else { + return nil + } + } + + } + public enum Contact: TypeConstructorDescription { + case contact(userId: Int32, mutual: Api.Bool) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .contact(let userId, let mutual): + if boxed { + buffer.appendInt32(-116274796) + } + serializeInt32(userId, buffer: buffer, boxed: false) + mutual.serialize(buffer, true) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .contact(let userId, let mutual): + return ("contact", [("userId", userId), ("mutual", mutual)]) + } + } + + public static func parse_contact(_ reader: BufferReader) -> Contact? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.Bool? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Bool + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Contact.contact(userId: _1!, mutual: _2!) + } + else { + return nil + } + } + + } + public enum FileHash: TypeConstructorDescription { + case fileHash(offset: Int32, limit: Int32, hash: Buffer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .fileHash(let offset, let limit, let hash): + if boxed { + buffer.appendInt32(1648543603) + } + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(limit, buffer: buffer, boxed: false) + serializeBytes(hash, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .fileHash(let offset, let limit, let hash): + return ("fileHash", [("offset", offset), ("limit", limit), ("hash", hash)]) + } + } + + public static func parse_fileHash(_ reader: BufferReader) -> FileHash? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Buffer? + _3 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.FileHash.fileHash(offset: _1!, limit: _2!, hash: _3!) + } + else { + return nil + } + } + + } + public enum BotInlineResult: TypeConstructorDescription { + case botInlineMediaResult(flags: Int32, id: String, type: String, photo: Api.Photo?, document: Api.Document?, title: String?, description: String?, sendMessage: Api.BotInlineMessage) + case botInlineResult(flags: Int32, id: String, type: String, title: String?, description: String?, url: String?, thumb: Api.WebDocument?, content: Api.WebDocument?, sendMessage: Api.BotInlineMessage) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .botInlineMediaResult(let flags, let id, let type, let photo, let document, let title, let description, let sendMessage): + if boxed { + buffer.appendInt32(400266251) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(id, buffer: buffer, boxed: false) + serializeString(type, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {photo!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {document!.serialize(buffer, true)} + if Int(flags) & Int(1 << 2) != 0 {serializeString(title!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeString(description!, buffer: buffer, boxed: false)} + sendMessage.serialize(buffer, true) + break + case .botInlineResult(let flags, let id, let type, let title, let description, let url, let thumb, let content, let sendMessage): + if boxed { + buffer.appendInt32(295067450) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(id, buffer: buffer, boxed: false) + serializeString(type, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeString(title!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeString(description!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeString(url!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 4) != 0 {thumb!.serialize(buffer, true)} + if Int(flags) & Int(1 << 5) != 0 {content!.serialize(buffer, true)} + sendMessage.serialize(buffer, true) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .botInlineMediaResult(let flags, let id, let type, let photo, let document, let title, let description, let sendMessage): + return ("botInlineMediaResult", [("flags", flags), ("id", id), ("type", type), ("photo", photo), ("document", document), ("title", title), ("description", description), ("sendMessage", sendMessage)]) + case .botInlineResult(let flags, let id, let type, let title, let description, let url, let thumb, let content, let sendMessage): + return ("botInlineResult", [("flags", flags), ("id", id), ("type", type), ("title", title), ("description", description), ("url", url), ("thumb", thumb), ("content", content), ("sendMessage", sendMessage)]) + } + } + + public static func parse_botInlineMediaResult(_ reader: BufferReader) -> BotInlineResult? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: Api.Photo? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.Photo + } } + var _5: Api.Document? + if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.Document + } } + var _6: String? + if Int(_1!) & Int(1 << 2) != 0 {_6 = parseString(reader) } + var _7: String? + if Int(_1!) & Int(1 << 3) != 0 {_7 = parseString(reader) } + var _8: Api.BotInlineMessage? + if let signature = reader.readInt32() { + _8 = Api.parse(reader, signature: signature) as? Api.BotInlineMessage + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil + let _c8 = _8 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { + return Api.BotInlineResult.botInlineMediaResult(flags: _1!, id: _2!, type: _3!, photo: _4, document: _5, title: _6, description: _7, sendMessage: _8!) + } + else { + return nil + } + } + public static func parse_botInlineResult(_ reader: BufferReader) -> BotInlineResult? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: String? + if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } + var _5: String? + if Int(_1!) & Int(1 << 2) != 0 {_5 = parseString(reader) } + var _6: String? + if Int(_1!) & Int(1 << 3) != 0 {_6 = parseString(reader) } + var _7: Api.WebDocument? + if Int(_1!) & Int(1 << 4) != 0 {if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.WebDocument + } } + var _8: Api.WebDocument? + if Int(_1!) & Int(1 << 5) != 0 {if let signature = reader.readInt32() { + _8 = Api.parse(reader, signature: signature) as? Api.WebDocument + } } + var _9: Api.BotInlineMessage? + if let signature = reader.readInt32() { + _9 = Api.parse(reader, signature: signature) as? Api.BotInlineMessage + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil + let _c8 = (Int(_1!) & Int(1 << 5) == 0) || _8 != nil + let _c9 = _9 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { + return Api.BotInlineResult.botInlineResult(flags: _1!, id: _2!, type: _3!, title: _4, description: _5, url: _6, thumb: _7, content: _8, sendMessage: _9!) + } + else { + return nil + } + } + + } + public enum InputGroupCall: TypeConstructorDescription { + case inputGroupCall(id: Int64, accessHash: Int64) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputGroupCall(let id, let accessHash): + if boxed { + buffer.appendInt32(-659913713) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputGroupCall(let id, let accessHash): + return ("inputGroupCall", [("id", id), ("accessHash", accessHash)]) + } + } + + public static func parse_inputGroupCall(_ reader: BufferReader) -> InputGroupCall? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputGroupCall.inputGroupCall(id: _1!, accessHash: _2!) + } + else { + return nil + } + } + + } + public enum InputSingleMedia: TypeConstructorDescription { + case inputSingleMedia(flags: Int32, media: Api.InputMedia, randomId: Int64, message: String, entities: [Api.MessageEntity]?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputSingleMedia(let flags, let media, let randomId, let message, let entities): + if boxed { + buffer.appendInt32(482797855) + } + serializeInt32(flags, buffer: buffer, boxed: false) + media.serialize(buffer, true) + serializeInt64(randomId, buffer: buffer, boxed: false) + serializeString(message, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities!.count)) + for item in entities! { + item.serialize(buffer, true) + }} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputSingleMedia(let flags, let media, let randomId, let message, let entities): + return ("inputSingleMedia", [("flags", flags), ("media", media), ("randomId", randomId), ("message", message), ("entities", entities)]) + } + } + + public static func parse_inputSingleMedia(_ reader: BufferReader) -> InputSingleMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.InputMedia? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.InputMedia + } + var _3: Int64? + _3 = reader.readInt64() + var _4: String? + _4 = parseString(reader) + var _5: [Api.MessageEntity]? + if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { + _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.InputSingleMedia.inputSingleMedia(flags: _1!, media: _2!, randomId: _3!, message: _4!, entities: _5) + } + else { + return nil + } + } + + } + public enum MessageViews: TypeConstructorDescription { + case messageViews(flags: Int32, views: Int32?, forwards: Int32?, replies: Api.MessageReplies?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .messageViews(let flags, let views, let forwards, let replies): + if boxed { + buffer.appendInt32(1163625789) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(views!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(forwards!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {replies!.serialize(buffer, true)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .messageViews(let flags, let views, let forwards, let replies): + return ("messageViews", [("flags", flags), ("views", views), ("forwards", forwards), ("replies", replies)]) + } + } + + public static func parse_messageViews(_ reader: BufferReader) -> MessageViews? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } + var _3: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_3 = reader.readInt32() } + var _4: Api.MessageReplies? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.MessageReplies + } } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.MessageViews.messageViews(flags: _1!, views: _2, forwards: _3, replies: _4) + } + else { + return nil + } + } + + } + public enum InputPrivacyRule: TypeConstructorDescription { + case inputPrivacyValueAllowContacts + case inputPrivacyValueAllowAll + case inputPrivacyValueAllowUsers(users: [Api.InputUser]) + case inputPrivacyValueDisallowContacts + case inputPrivacyValueDisallowAll + case inputPrivacyValueDisallowUsers(users: [Api.InputUser]) + case inputPrivacyValueAllowChatParticipants(chats: [Int32]) + case inputPrivacyValueDisallowChatParticipants(chats: [Int32]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputPrivacyValueAllowContacts: + if boxed { + buffer.appendInt32(218751099) + } + + break + case .inputPrivacyValueAllowAll: + if boxed { + buffer.appendInt32(407582158) + } + + break + case .inputPrivacyValueAllowUsers(let users): + if boxed { + buffer.appendInt32(320652927) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + break + case .inputPrivacyValueDisallowContacts: + if boxed { + buffer.appendInt32(195371015) + } + + break + case .inputPrivacyValueDisallowAll: + if boxed { + buffer.appendInt32(-697604407) + } + + break + case .inputPrivacyValueDisallowUsers(let users): + if boxed { + buffer.appendInt32(-1877932953) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + break + case .inputPrivacyValueAllowChatParticipants(let chats): + if boxed { + buffer.appendInt32(1283572154) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(chats.count)) + for item in chats { + serializeInt32(item, buffer: buffer, boxed: false) + } + break + case .inputPrivacyValueDisallowChatParticipants(let chats): + if boxed { + buffer.appendInt32(-668769361) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(chats.count)) + for item in chats { + serializeInt32(item, buffer: buffer, boxed: false) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputPrivacyValueAllowContacts: + return ("inputPrivacyValueAllowContacts", []) + case .inputPrivacyValueAllowAll: + return ("inputPrivacyValueAllowAll", []) + case .inputPrivacyValueAllowUsers(let users): + return ("inputPrivacyValueAllowUsers", [("users", users)]) + case .inputPrivacyValueDisallowContacts: + return ("inputPrivacyValueDisallowContacts", []) + case .inputPrivacyValueDisallowAll: + return ("inputPrivacyValueDisallowAll", []) + case .inputPrivacyValueDisallowUsers(let users): + return ("inputPrivacyValueDisallowUsers", [("users", users)]) + case .inputPrivacyValueAllowChatParticipants(let chats): + return ("inputPrivacyValueAllowChatParticipants", [("chats", chats)]) + case .inputPrivacyValueDisallowChatParticipants(let chats): + return ("inputPrivacyValueDisallowChatParticipants", [("chats", chats)]) + } + } + + public static func parse_inputPrivacyValueAllowContacts(_ reader: BufferReader) -> InputPrivacyRule? { + return Api.InputPrivacyRule.inputPrivacyValueAllowContacts + } + public static func parse_inputPrivacyValueAllowAll(_ reader: BufferReader) -> InputPrivacyRule? { + return Api.InputPrivacyRule.inputPrivacyValueAllowAll + } + public static func parse_inputPrivacyValueAllowUsers(_ reader: BufferReader) -> InputPrivacyRule? { + var _1: [Api.InputUser]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputUser.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.InputPrivacyRule.inputPrivacyValueAllowUsers(users: _1!) + } + else { + return nil + } + } + public static func parse_inputPrivacyValueDisallowContacts(_ reader: BufferReader) -> InputPrivacyRule? { + return Api.InputPrivacyRule.inputPrivacyValueDisallowContacts + } + public static func parse_inputPrivacyValueDisallowAll(_ reader: BufferReader) -> InputPrivacyRule? { + return Api.InputPrivacyRule.inputPrivacyValueDisallowAll + } + public static func parse_inputPrivacyValueDisallowUsers(_ reader: BufferReader) -> InputPrivacyRule? { + var _1: [Api.InputUser]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputUser.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.InputPrivacyRule.inputPrivacyValueDisallowUsers(users: _1!) + } + else { + return nil + } + } + public static func parse_inputPrivacyValueAllowChatParticipants(_ reader: BufferReader) -> InputPrivacyRule? { + var _1: [Int32]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.InputPrivacyRule.inputPrivacyValueAllowChatParticipants(chats: _1!) + } + else { + return nil + } + } + public static func parse_inputPrivacyValueDisallowChatParticipants(_ reader: BufferReader) -> InputPrivacyRule? { + var _1: [Int32]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.InputPrivacyRule.inputPrivacyValueDisallowChatParticipants(chats: _1!) + } + else { + return nil + } + } + + } + public enum ChannelAdminLogEventAction: TypeConstructorDescription { + case channelAdminLogEventActionChangeTitle(prevValue: String, newValue: String) + case channelAdminLogEventActionChangeAbout(prevValue: String, newValue: String) + case channelAdminLogEventActionChangeUsername(prevValue: String, newValue: String) + case channelAdminLogEventActionToggleInvites(newValue: Api.Bool) + case channelAdminLogEventActionToggleSignatures(newValue: Api.Bool) + case channelAdminLogEventActionUpdatePinned(message: Api.Message) + case channelAdminLogEventActionEditMessage(prevMessage: Api.Message, newMessage: Api.Message) + case channelAdminLogEventActionDeleteMessage(message: Api.Message) + case channelAdminLogEventActionParticipantJoin + case channelAdminLogEventActionParticipantLeave + case channelAdminLogEventActionParticipantInvite(participant: Api.ChannelParticipant) + case channelAdminLogEventActionParticipantToggleBan(prevParticipant: Api.ChannelParticipant, newParticipant: Api.ChannelParticipant) + case channelAdminLogEventActionParticipantToggleAdmin(prevParticipant: Api.ChannelParticipant, newParticipant: Api.ChannelParticipant) + case channelAdminLogEventActionChangeStickerSet(prevStickerset: Api.InputStickerSet, newStickerset: Api.InputStickerSet) + case channelAdminLogEventActionTogglePreHistoryHidden(newValue: Api.Bool) + case channelAdminLogEventActionDefaultBannedRights(prevBannedRights: Api.ChatBannedRights, newBannedRights: Api.ChatBannedRights) + case channelAdminLogEventActionStopPoll(message: Api.Message) + case channelAdminLogEventActionChangePhoto(prevPhoto: Api.Photo, newPhoto: Api.Photo) + case channelAdminLogEventActionChangeLinkedChat(prevValue: Int32, newValue: Int32) + case channelAdminLogEventActionChangeLocation(prevValue: Api.ChannelLocation, newValue: Api.ChannelLocation) + case channelAdminLogEventActionToggleSlowMode(prevValue: Int32, newValue: Int32) + case channelAdminLogEventActionStartGroupCall(call: Api.InputGroupCall) + case channelAdminLogEventActionDiscardGroupCall(call: Api.InputGroupCall) + case channelAdminLogEventActionParticipantMute(participant: Api.GroupCallParticipant) + case channelAdminLogEventActionParticipantUnmute(participant: Api.GroupCallParticipant) + case channelAdminLogEventActionToggleGroupCallSetting(joinMuted: Api.Bool) + case channelAdminLogEventActionExportedInviteDelete(invite: Api.ExportedChatInvite) + case channelAdminLogEventActionExportedInviteRevoke(invite: Api.ExportedChatInvite) + case channelAdminLogEventActionExportedInviteEdit(prevInvite: Api.ExportedChatInvite, newInvite: Api.ExportedChatInvite) + case channelAdminLogEventActionParticipantJoinByInvite(invite: Api.ExportedChatInvite) + case channelAdminLogEventActionParticipantVolume(participant: Api.GroupCallParticipant) + case channelAdminLogEventActionChangeHistoryTTL(prevValue: Int32, newValue: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .channelAdminLogEventActionChangeTitle(let prevValue, let newValue): + if boxed { + buffer.appendInt32(-421545947) + } + serializeString(prevValue, buffer: buffer, boxed: false) + serializeString(newValue, buffer: buffer, boxed: false) + break + case .channelAdminLogEventActionChangeAbout(let prevValue, let newValue): + if boxed { + buffer.appendInt32(1427671598) + } + serializeString(prevValue, buffer: buffer, boxed: false) + serializeString(newValue, buffer: buffer, boxed: false) + break + case .channelAdminLogEventActionChangeUsername(let prevValue, let newValue): + if boxed { + buffer.appendInt32(1783299128) + } + serializeString(prevValue, buffer: buffer, boxed: false) + serializeString(newValue, buffer: buffer, boxed: false) + break + case .channelAdminLogEventActionToggleInvites(let newValue): + if boxed { + buffer.appendInt32(460916654) + } + newValue.serialize(buffer, true) + break + case .channelAdminLogEventActionToggleSignatures(let newValue): + if boxed { + buffer.appendInt32(648939889) + } + newValue.serialize(buffer, true) + break + case .channelAdminLogEventActionUpdatePinned(let message): + if boxed { + buffer.appendInt32(-370660328) + } + message.serialize(buffer, true) + break + case .channelAdminLogEventActionEditMessage(let prevMessage, let newMessage): + if boxed { + buffer.appendInt32(1889215493) + } + prevMessage.serialize(buffer, true) + newMessage.serialize(buffer, true) + break + case .channelAdminLogEventActionDeleteMessage(let message): + if boxed { + buffer.appendInt32(1121994683) + } + message.serialize(buffer, true) + break + case .channelAdminLogEventActionParticipantJoin: + if boxed { + buffer.appendInt32(405815507) + } + + break + case .channelAdminLogEventActionParticipantLeave: + if boxed { + buffer.appendInt32(-124291086) + } + + break + case .channelAdminLogEventActionParticipantInvite(let participant): + if boxed { + buffer.appendInt32(-484690728) + } + participant.serialize(buffer, true) + break + case .channelAdminLogEventActionParticipantToggleBan(let prevParticipant, let newParticipant): + if boxed { + buffer.appendInt32(-422036098) + } + prevParticipant.serialize(buffer, true) + newParticipant.serialize(buffer, true) + break + case .channelAdminLogEventActionParticipantToggleAdmin(let prevParticipant, let newParticipant): + if boxed { + buffer.appendInt32(-714643696) + } + prevParticipant.serialize(buffer, true) + newParticipant.serialize(buffer, true) + break + case .channelAdminLogEventActionChangeStickerSet(let prevStickerset, let newStickerset): + if boxed { + buffer.appendInt32(-1312568665) + } + prevStickerset.serialize(buffer, true) + newStickerset.serialize(buffer, true) + break + case .channelAdminLogEventActionTogglePreHistoryHidden(let newValue): + if boxed { + buffer.appendInt32(1599903217) + } + newValue.serialize(buffer, true) + break + case .channelAdminLogEventActionDefaultBannedRights(let prevBannedRights, let newBannedRights): + if boxed { + buffer.appendInt32(771095562) + } + prevBannedRights.serialize(buffer, true) + newBannedRights.serialize(buffer, true) + break + case .channelAdminLogEventActionStopPoll(let message): + if boxed { + buffer.appendInt32(-1895328189) + } + message.serialize(buffer, true) + break + case .channelAdminLogEventActionChangePhoto(let prevPhoto, let newPhoto): + if boxed { + buffer.appendInt32(1129042607) + } + prevPhoto.serialize(buffer, true) + newPhoto.serialize(buffer, true) + break + case .channelAdminLogEventActionChangeLinkedChat(let prevValue, let newValue): + if boxed { + buffer.appendInt32(-1569748965) + } + serializeInt32(prevValue, buffer: buffer, boxed: false) + serializeInt32(newValue, buffer: buffer, boxed: false) + break + case .channelAdminLogEventActionChangeLocation(let prevValue, let newValue): + if boxed { + buffer.appendInt32(241923758) + } + prevValue.serialize(buffer, true) + newValue.serialize(buffer, true) + break + case .channelAdminLogEventActionToggleSlowMode(let prevValue, let newValue): + if boxed { + buffer.appendInt32(1401984889) + } + serializeInt32(prevValue, buffer: buffer, boxed: false) + serializeInt32(newValue, buffer: buffer, boxed: false) + break + case .channelAdminLogEventActionStartGroupCall(let call): + if boxed { + buffer.appendInt32(589338437) + } + call.serialize(buffer, true) + break + case .channelAdminLogEventActionDiscardGroupCall(let call): + if boxed { + buffer.appendInt32(-610299584) + } + call.serialize(buffer, true) + break + case .channelAdminLogEventActionParticipantMute(let participant): + if boxed { + buffer.appendInt32(-115071790) + } + participant.serialize(buffer, true) + break + case .channelAdminLogEventActionParticipantUnmute(let participant): + if boxed { + buffer.appendInt32(-431740480) + } + participant.serialize(buffer, true) + break + case .channelAdminLogEventActionToggleGroupCallSetting(let joinMuted): + if boxed { + buffer.appendInt32(1456906823) + } + joinMuted.serialize(buffer, true) + break + case .channelAdminLogEventActionExportedInviteDelete(let invite): + if boxed { + buffer.appendInt32(1515256996) + } + invite.serialize(buffer, true) + break + case .channelAdminLogEventActionExportedInviteRevoke(let invite): + if boxed { + buffer.appendInt32(1091179342) + } + invite.serialize(buffer, true) + break + case .channelAdminLogEventActionExportedInviteEdit(let prevInvite, let newInvite): + if boxed { + buffer.appendInt32(-384910503) + } + prevInvite.serialize(buffer, true) + newInvite.serialize(buffer, true) + break + case .channelAdminLogEventActionParticipantJoinByInvite(let invite): + if boxed { + buffer.appendInt32(1557846647) + } + invite.serialize(buffer, true) + break + case .channelAdminLogEventActionParticipantVolume(let participant): + if boxed { + buffer.appendInt32(1048537159) + } + participant.serialize(buffer, true) + break + case .channelAdminLogEventActionChangeHistoryTTL(let prevValue, let newValue): + if boxed { + buffer.appendInt32(1855199800) + } + serializeInt32(prevValue, buffer: buffer, boxed: false) + serializeInt32(newValue, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .channelAdminLogEventActionChangeTitle(let prevValue, let newValue): + return ("channelAdminLogEventActionChangeTitle", [("prevValue", prevValue), ("newValue", newValue)]) + case .channelAdminLogEventActionChangeAbout(let prevValue, let newValue): + return ("channelAdminLogEventActionChangeAbout", [("prevValue", prevValue), ("newValue", newValue)]) + case .channelAdminLogEventActionChangeUsername(let prevValue, let newValue): + return ("channelAdminLogEventActionChangeUsername", [("prevValue", prevValue), ("newValue", newValue)]) + case .channelAdminLogEventActionToggleInvites(let newValue): + return ("channelAdminLogEventActionToggleInvites", [("newValue", newValue)]) + case .channelAdminLogEventActionToggleSignatures(let newValue): + return ("channelAdminLogEventActionToggleSignatures", [("newValue", newValue)]) + case .channelAdminLogEventActionUpdatePinned(let message): + return ("channelAdminLogEventActionUpdatePinned", [("message", message)]) + case .channelAdminLogEventActionEditMessage(let prevMessage, let newMessage): + return ("channelAdminLogEventActionEditMessage", [("prevMessage", prevMessage), ("newMessage", newMessage)]) + case .channelAdminLogEventActionDeleteMessage(let message): + return ("channelAdminLogEventActionDeleteMessage", [("message", message)]) + case .channelAdminLogEventActionParticipantJoin: + return ("channelAdminLogEventActionParticipantJoin", []) + case .channelAdminLogEventActionParticipantLeave: + return ("channelAdminLogEventActionParticipantLeave", []) + case .channelAdminLogEventActionParticipantInvite(let participant): + return ("channelAdminLogEventActionParticipantInvite", [("participant", participant)]) + case .channelAdminLogEventActionParticipantToggleBan(let prevParticipant, let newParticipant): + return ("channelAdminLogEventActionParticipantToggleBan", [("prevParticipant", prevParticipant), ("newParticipant", newParticipant)]) + case .channelAdminLogEventActionParticipantToggleAdmin(let prevParticipant, let newParticipant): + return ("channelAdminLogEventActionParticipantToggleAdmin", [("prevParticipant", prevParticipant), ("newParticipant", newParticipant)]) + case .channelAdminLogEventActionChangeStickerSet(let prevStickerset, let newStickerset): + return ("channelAdminLogEventActionChangeStickerSet", [("prevStickerset", prevStickerset), ("newStickerset", newStickerset)]) + case .channelAdminLogEventActionTogglePreHistoryHidden(let newValue): + return ("channelAdminLogEventActionTogglePreHistoryHidden", [("newValue", newValue)]) + case .channelAdminLogEventActionDefaultBannedRights(let prevBannedRights, let newBannedRights): + return ("channelAdminLogEventActionDefaultBannedRights", [("prevBannedRights", prevBannedRights), ("newBannedRights", newBannedRights)]) + case .channelAdminLogEventActionStopPoll(let message): + return ("channelAdminLogEventActionStopPoll", [("message", message)]) + case .channelAdminLogEventActionChangePhoto(let prevPhoto, let newPhoto): + return ("channelAdminLogEventActionChangePhoto", [("prevPhoto", prevPhoto), ("newPhoto", newPhoto)]) + case .channelAdminLogEventActionChangeLinkedChat(let prevValue, let newValue): + return ("channelAdminLogEventActionChangeLinkedChat", [("prevValue", prevValue), ("newValue", newValue)]) + case .channelAdminLogEventActionChangeLocation(let prevValue, let newValue): + return ("channelAdminLogEventActionChangeLocation", [("prevValue", prevValue), ("newValue", newValue)]) + case .channelAdminLogEventActionToggleSlowMode(let prevValue, let newValue): + return ("channelAdminLogEventActionToggleSlowMode", [("prevValue", prevValue), ("newValue", newValue)]) + case .channelAdminLogEventActionStartGroupCall(let call): + return ("channelAdminLogEventActionStartGroupCall", [("call", call)]) + case .channelAdminLogEventActionDiscardGroupCall(let call): + return ("channelAdminLogEventActionDiscardGroupCall", [("call", call)]) + case .channelAdminLogEventActionParticipantMute(let participant): + return ("channelAdminLogEventActionParticipantMute", [("participant", participant)]) + case .channelAdminLogEventActionParticipantUnmute(let participant): + return ("channelAdminLogEventActionParticipantUnmute", [("participant", participant)]) + case .channelAdminLogEventActionToggleGroupCallSetting(let joinMuted): + return ("channelAdminLogEventActionToggleGroupCallSetting", [("joinMuted", joinMuted)]) + case .channelAdminLogEventActionExportedInviteDelete(let invite): + return ("channelAdminLogEventActionExportedInviteDelete", [("invite", invite)]) + case .channelAdminLogEventActionExportedInviteRevoke(let invite): + return ("channelAdminLogEventActionExportedInviteRevoke", [("invite", invite)]) + case .channelAdminLogEventActionExportedInviteEdit(let prevInvite, let newInvite): + return ("channelAdminLogEventActionExportedInviteEdit", [("prevInvite", prevInvite), ("newInvite", newInvite)]) + case .channelAdminLogEventActionParticipantJoinByInvite(let invite): + return ("channelAdminLogEventActionParticipantJoinByInvite", [("invite", invite)]) + case .channelAdminLogEventActionParticipantVolume(let participant): + return ("channelAdminLogEventActionParticipantVolume", [("participant", participant)]) + case .channelAdminLogEventActionChangeHistoryTTL(let prevValue, let newValue): + return ("channelAdminLogEventActionChangeHistoryTTL", [("prevValue", prevValue), ("newValue", newValue)]) + } + } + + public static func parse_channelAdminLogEventActionChangeTitle(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionChangeTitle(prevValue: _1!, newValue: _2!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionChangeAbout(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionChangeAbout(prevValue: _1!, newValue: _2!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionChangeUsername(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionChangeUsername(prevValue: _1!, newValue: _2!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionToggleInvites(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.Bool? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Bool + } + let _c1 = _1 != nil + if _c1 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionToggleInvites(newValue: _1!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionToggleSignatures(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.Bool? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Bool + } + let _c1 = _1 != nil + if _c1 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionToggleSignatures(newValue: _1!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionUpdatePinned(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.Message? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Message + } + let _c1 = _1 != nil + if _c1 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionUpdatePinned(message: _1!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionEditMessage(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.Message? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Message + } + var _2: Api.Message? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Message + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionEditMessage(prevMessage: _1!, newMessage: _2!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionDeleteMessage(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.Message? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Message + } + let _c1 = _1 != nil + if _c1 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionDeleteMessage(message: _1!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionParticipantJoin(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionParticipantJoin + } + public static func parse_channelAdminLogEventActionParticipantLeave(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionParticipantLeave + } + public static func parse_channelAdminLogEventActionParticipantInvite(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.ChannelParticipant? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.ChannelParticipant + } + let _c1 = _1 != nil + if _c1 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionParticipantInvite(participant: _1!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionParticipantToggleBan(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.ChannelParticipant? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.ChannelParticipant + } + var _2: Api.ChannelParticipant? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.ChannelParticipant + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionParticipantToggleBan(prevParticipant: _1!, newParticipant: _2!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionParticipantToggleAdmin(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.ChannelParticipant? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.ChannelParticipant + } + var _2: Api.ChannelParticipant? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.ChannelParticipant + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionParticipantToggleAdmin(prevParticipant: _1!, newParticipant: _2!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionChangeStickerSet(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.InputStickerSet? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputStickerSet + } + var _2: Api.InputStickerSet? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.InputStickerSet + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionChangeStickerSet(prevStickerset: _1!, newStickerset: _2!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionTogglePreHistoryHidden(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.Bool? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Bool + } + let _c1 = _1 != nil + if _c1 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionTogglePreHistoryHidden(newValue: _1!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionDefaultBannedRights(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.ChatBannedRights? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.ChatBannedRights + } + var _2: Api.ChatBannedRights? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.ChatBannedRights + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionDefaultBannedRights(prevBannedRights: _1!, newBannedRights: _2!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionStopPoll(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.Message? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Message + } + let _c1 = _1 != nil + if _c1 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionStopPoll(message: _1!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionChangePhoto(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.Photo? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Photo + } + var _2: Api.Photo? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Photo + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionChangePhoto(prevPhoto: _1!, newPhoto: _2!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionChangeLinkedChat(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionChangeLinkedChat(prevValue: _1!, newValue: _2!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionChangeLocation(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.ChannelLocation? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.ChannelLocation + } + var _2: Api.ChannelLocation? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.ChannelLocation + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionChangeLocation(prevValue: _1!, newValue: _2!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionToggleSlowMode(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionToggleSlowMode(prevValue: _1!, newValue: _2!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionStartGroupCall(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.InputGroupCall? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputGroupCall + } + let _c1 = _1 != nil + if _c1 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionStartGroupCall(call: _1!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionDiscardGroupCall(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.InputGroupCall? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputGroupCall + } + let _c1 = _1 != nil + if _c1 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionDiscardGroupCall(call: _1!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionParticipantMute(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.GroupCallParticipant? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.GroupCallParticipant + } + let _c1 = _1 != nil + if _c1 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionParticipantMute(participant: _1!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionParticipantUnmute(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.GroupCallParticipant? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.GroupCallParticipant + } + let _c1 = _1 != nil + if _c1 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionParticipantUnmute(participant: _1!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionToggleGroupCallSetting(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.Bool? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Bool + } + let _c1 = _1 != nil + if _c1 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionToggleGroupCallSetting(joinMuted: _1!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionExportedInviteDelete(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.ExportedChatInvite? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite + } + let _c1 = _1 != nil + if _c1 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionExportedInviteDelete(invite: _1!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionExportedInviteRevoke(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.ExportedChatInvite? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite + } + let _c1 = _1 != nil + if _c1 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionExportedInviteRevoke(invite: _1!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionExportedInviteEdit(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.ExportedChatInvite? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite + } + var _2: Api.ExportedChatInvite? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionExportedInviteEdit(prevInvite: _1!, newInvite: _2!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionParticipantJoinByInvite(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.ExportedChatInvite? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite + } + let _c1 = _1 != nil + if _c1 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionParticipantJoinByInvite(invite: _1!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionParticipantVolume(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.GroupCallParticipant? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.GroupCallParticipant + } + let _c1 = _1 != nil + if _c1 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionParticipantVolume(participant: _1!) + } + else { + return nil + } + } + public static func parse_channelAdminLogEventActionChangeHistoryTTL(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionChangeHistoryTTL(prevValue: _1!, newValue: _2!) + } + else { + return nil + } + } + + } + public enum SecurePlainData: TypeConstructorDescription { + case securePlainPhone(phone: String) + case securePlainEmail(email: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .securePlainPhone(let phone): + if boxed { + buffer.appendInt32(2103482845) + } + serializeString(phone, buffer: buffer, boxed: false) + break + case .securePlainEmail(let email): + if boxed { + buffer.appendInt32(569137759) + } + serializeString(email, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .securePlainPhone(let phone): + return ("securePlainPhone", [("phone", phone)]) + case .securePlainEmail(let email): + return ("securePlainEmail", [("email", email)]) + } + } + + public static func parse_securePlainPhone(_ reader: BufferReader) -> SecurePlainData? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.SecurePlainData.securePlainPhone(phone: _1!) + } + else { + return nil + } + } + public static func parse_securePlainEmail(_ reader: BufferReader) -> SecurePlainData? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.SecurePlainData.securePlainEmail(email: _1!) + } + else { + return nil + } + } + + } + public enum StatsGraph: TypeConstructorDescription { + case statsGraphAsync(token: String) + case statsGraphError(error: String) + case statsGraph(flags: Int32, json: Api.DataJSON, zoomToken: String?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .statsGraphAsync(let token): + if boxed { + buffer.appendInt32(1244130093) + } + serializeString(token, buffer: buffer, boxed: false) + break + case .statsGraphError(let error): + if boxed { + buffer.appendInt32(-1092839390) + } + serializeString(error, buffer: buffer, boxed: false) + break + case .statsGraph(let flags, let json, let zoomToken): + if boxed { + buffer.appendInt32(-1901828938) + } + serializeInt32(flags, buffer: buffer, boxed: false) + json.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeString(zoomToken!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .statsGraphAsync(let token): + return ("statsGraphAsync", [("token", token)]) + case .statsGraphError(let error): + return ("statsGraphError", [("error", error)]) + case .statsGraph(let flags, let json, let zoomToken): + return ("statsGraph", [("flags", flags), ("json", json), ("zoomToken", zoomToken)]) + } + } + + public static func parse_statsGraphAsync(_ reader: BufferReader) -> StatsGraph? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.StatsGraph.statsGraphAsync(token: _1!) + } + else { + return nil + } + } + public static func parse_statsGraphError(_ reader: BufferReader) -> StatsGraph? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.StatsGraph.statsGraphError(error: _1!) + } + else { + return nil + } + } + public static func parse_statsGraph(_ reader: BufferReader) -> StatsGraph? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.DataJSON? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.DataJSON + } + var _3: String? + if Int(_1!) & Int(1 << 0) != 0 {_3 = parseString(reader) } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.StatsGraph.statsGraph(flags: _1!, json: _2!, zoomToken: _3) + } + else { + return nil + } + } + + } + public enum PageTableCell: TypeConstructorDescription { + case pageTableCell(flags: Int32, text: Api.RichText?, colspan: Int32?, rowspan: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .pageTableCell(let flags, let text, let colspan, let rowspan): + if boxed { + buffer.appendInt32(878078826) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 7) != 0 {text!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(colspan!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(rowspan!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .pageTableCell(let flags, let text, let colspan, let rowspan): + return ("pageTableCell", [("flags", flags), ("text", text), ("colspan", colspan), ("rowspan", rowspan)]) + } + } + + public static func parse_pageTableCell(_ reader: BufferReader) -> PageTableCell? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.RichText? + if Int(_1!) & Int(1 << 7) != 0 {if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.RichText + } } + var _3: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_3 = reader.readInt32() } + var _4: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_4 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 7) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.PageTableCell.pageTableCell(flags: _1!, text: _2, colspan: _3, rowspan: _4) + } + else { + return nil + } + } + + } + public enum ChatBannedRights: TypeConstructorDescription { + case chatBannedRights(flags: Int32, untilDate: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .chatBannedRights(let flags, let untilDate): + if boxed { + buffer.appendInt32(-1626209256) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(untilDate, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .chatBannedRights(let flags, let untilDate): + return ("chatBannedRights", [("flags", flags), ("untilDate", untilDate)]) + } + } + + public static func parse_chatBannedRights(_ reader: BufferReader) -> ChatBannedRights? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ChatBannedRights.chatBannedRights(flags: _1!, untilDate: _2!) + } + else { + return nil + } + } + + } + public enum LabeledPrice: TypeConstructorDescription { + case labeledPrice(label: String, amount: Int64) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .labeledPrice(let label, let amount): + if boxed { + buffer.appendInt32(-886477832) + } + serializeString(label, buffer: buffer, boxed: false) + serializeInt64(amount, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .labeledPrice(let label, let amount): + return ("labeledPrice", [("label", label), ("amount", amount)]) + } + } + + public static func parse_labeledPrice(_ reader: BufferReader) -> LabeledPrice? { + var _1: String? + _1 = parseString(reader) + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.LabeledPrice.labeledPrice(label: _1!, amount: _2!) + } + else { + return nil + } + } + + } + public enum InputSecureValue: TypeConstructorDescription { + case inputSecureValue(flags: Int32, type: Api.SecureValueType, data: Api.SecureData?, frontSide: Api.InputSecureFile?, reverseSide: Api.InputSecureFile?, selfie: Api.InputSecureFile?, translation: [Api.InputSecureFile]?, files: [Api.InputSecureFile]?, plainData: Api.SecurePlainData?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputSecureValue(let flags, let type, let data, let frontSide, let reverseSide, let selfie, let translation, let files, let plainData): + if boxed { + buffer.appendInt32(-618540889) + } + serializeInt32(flags, buffer: buffer, boxed: false) + type.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {data!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {frontSide!.serialize(buffer, true)} + if Int(flags) & Int(1 << 2) != 0 {reverseSide!.serialize(buffer, true)} + if Int(flags) & Int(1 << 3) != 0 {selfie!.serialize(buffer, true)} + if Int(flags) & Int(1 << 6) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(translation!.count)) + for item in translation! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 4) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(files!.count)) + for item in files! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 5) != 0 {plainData!.serialize(buffer, true)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputSecureValue(let flags, let type, let data, let frontSide, let reverseSide, let selfie, let translation, let files, let plainData): + return ("inputSecureValue", [("flags", flags), ("type", type), ("data", data), ("frontSide", frontSide), ("reverseSide", reverseSide), ("selfie", selfie), ("translation", translation), ("files", files), ("plainData", plainData)]) + } + } + + public static func parse_inputSecureValue(_ reader: BufferReader) -> InputSecureValue? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.SecureValueType? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.SecureValueType + } + var _3: Api.SecureData? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.SecureData + } } + var _4: Api.InputSecureFile? + if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.InputSecureFile + } } + var _5: Api.InputSecureFile? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.InputSecureFile + } } + var _6: Api.InputSecureFile? + if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.InputSecureFile + } } + var _7: [Api.InputSecureFile]? + if Int(_1!) & Int(1 << 6) != 0 {if let _ = reader.readInt32() { + _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputSecureFile.self) + } } + var _8: [Api.InputSecureFile]? + if Int(_1!) & Int(1 << 4) != 0 {if let _ = reader.readInt32() { + _8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputSecureFile.self) + } } + var _9: Api.SecurePlainData? + if Int(_1!) & Int(1 << 5) != 0 {if let signature = reader.readInt32() { + _9 = Api.parse(reader, signature: signature) as? Api.SecurePlainData + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 6) == 0) || _7 != nil + let _c8 = (Int(_1!) & Int(1 << 4) == 0) || _8 != nil + let _c9 = (Int(_1!) & Int(1 << 5) == 0) || _9 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { + return Api.InputSecureValue.inputSecureValue(flags: _1!, type: _2!, data: _3, frontSide: _4, reverseSide: _5, selfie: _6, translation: _7, files: _8, plainData: _9) + } + else { + return nil + } + } + + } + public enum ReportReason: TypeConstructorDescription { + case inputReportReasonSpam + case inputReportReasonViolence + case inputReportReasonPornography + case inputReportReasonCopyright + case inputReportReasonChildAbuse + case inputReportReasonGeoIrrelevant + case inputReportReasonFake + case inputReportReasonOther + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputReportReasonSpam: + if boxed { + buffer.appendInt32(1490799288) + } + + break + case .inputReportReasonViolence: + if boxed { + buffer.appendInt32(505595789) + } + + break + case .inputReportReasonPornography: + if boxed { + buffer.appendInt32(777640226) + } + + break + case .inputReportReasonCopyright: + if boxed { + buffer.appendInt32(-1685456582) + } + + break + case .inputReportReasonChildAbuse: + if boxed { + buffer.appendInt32(-1376497949) + } + + break + case .inputReportReasonGeoIrrelevant: + if boxed { + buffer.appendInt32(-606798099) + } + + break + case .inputReportReasonFake: + if boxed { + buffer.appendInt32(-170010905) + } + + break + case .inputReportReasonOther: + if boxed { + buffer.appendInt32(-1041980751) + } + + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputReportReasonSpam: + return ("inputReportReasonSpam", []) + case .inputReportReasonViolence: + return ("inputReportReasonViolence", []) + case .inputReportReasonPornography: + return ("inputReportReasonPornography", []) + case .inputReportReasonCopyright: + return ("inputReportReasonCopyright", []) + case .inputReportReasonChildAbuse: + return ("inputReportReasonChildAbuse", []) + case .inputReportReasonGeoIrrelevant: + return ("inputReportReasonGeoIrrelevant", []) + case .inputReportReasonFake: + return ("inputReportReasonFake", []) + case .inputReportReasonOther: + return ("inputReportReasonOther", []) + } + } + + public static func parse_inputReportReasonSpam(_ reader: BufferReader) -> ReportReason? { + return Api.ReportReason.inputReportReasonSpam + } + public static func parse_inputReportReasonViolence(_ reader: BufferReader) -> ReportReason? { + return Api.ReportReason.inputReportReasonViolence + } + public static func parse_inputReportReasonPornography(_ reader: BufferReader) -> ReportReason? { + return Api.ReportReason.inputReportReasonPornography + } + public static func parse_inputReportReasonCopyright(_ reader: BufferReader) -> ReportReason? { + return Api.ReportReason.inputReportReasonCopyright + } + public static func parse_inputReportReasonChildAbuse(_ reader: BufferReader) -> ReportReason? { + return Api.ReportReason.inputReportReasonChildAbuse + } + public static func parse_inputReportReasonGeoIrrelevant(_ reader: BufferReader) -> ReportReason? { + return Api.ReportReason.inputReportReasonGeoIrrelevant + } + public static func parse_inputReportReasonFake(_ reader: BufferReader) -> ReportReason? { + return Api.ReportReason.inputReportReasonFake + } + public static func parse_inputReportReasonOther(_ reader: BufferReader) -> ReportReason? { + return Api.ReportReason.inputReportReasonOther + } + + } + public enum InputEncryptedChat: TypeConstructorDescription { + case inputEncryptedChat(chatId: Int32, accessHash: Int64) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputEncryptedChat(let chatId, let accessHash): + if boxed { + buffer.appendInt32(-247351839) + } + serializeInt32(chatId, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputEncryptedChat(let chatId, let accessHash): + return ("inputEncryptedChat", [("chatId", chatId), ("accessHash", accessHash)]) + } + } + + public static func parse_inputEncryptedChat(_ reader: BufferReader) -> InputEncryptedChat? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputEncryptedChat.inputEncryptedChat(chatId: _1!, accessHash: _2!) + } + else { + return nil + } + } + + } + public enum PageTableRow: TypeConstructorDescription { + case pageTableRow(cells: [Api.PageTableCell]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .pageTableRow(let cells): + if boxed { + buffer.appendInt32(-524237339) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(cells.count)) + for item in cells { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .pageTableRow(let cells): + return ("pageTableRow", [("cells", cells)]) + } + } + + public static func parse_pageTableRow(_ reader: BufferReader) -> PageTableRow? { + var _1: [Api.PageTableCell]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageTableCell.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.PageTableRow.pageTableRow(cells: _1!) + } + else { + return nil + } + } + + } + public enum DraftMessage: TypeConstructorDescription { + case draftMessage(flags: Int32, replyToMsgId: Int32?, message: String, entities: [Api.MessageEntity]?, date: Int32) + case draftMessageEmpty(flags: Int32, date: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .draftMessage(let flags, let replyToMsgId, let message, let entities, let date): + if boxed { + buffer.appendInt32(-40996577) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(replyToMsgId!, buffer: buffer, boxed: false)} + serializeString(message, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 3) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities!.count)) + for item in entities! { + item.serialize(buffer, true) + }} + serializeInt32(date, buffer: buffer, boxed: false) + break + case .draftMessageEmpty(let flags, let date): + if boxed { + buffer.appendInt32(453805082) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(date!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .draftMessage(let flags, let replyToMsgId, let message, let entities, let date): + return ("draftMessage", [("flags", flags), ("replyToMsgId", replyToMsgId), ("message", message), ("entities", entities), ("date", date)]) + case .draftMessageEmpty(let flags, let date): + return ("draftMessageEmpty", [("flags", flags), ("date", date)]) + } + } + + public static func parse_draftMessage(_ reader: BufferReader) -> DraftMessage? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } + var _3: String? + _3 = parseString(reader) + var _4: [Api.MessageEntity]? + if Int(_1!) & Int(1 << 3) != 0 {if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) + } } + var _5: Int32? + _5 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = _3 != nil + let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.DraftMessage.draftMessage(flags: _1!, replyToMsgId: _2, message: _3!, entities: _4, date: _5!) + } + else { + return nil + } + } + public static func parse_draftMessageEmpty(_ reader: BufferReader) -> DraftMessage? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + if _c1 && _c2 { + return Api.DraftMessage.draftMessageEmpty(flags: _1!, date: _2) + } + else { + return nil + } + } + + } + public enum StatsGroupTopPoster: TypeConstructorDescription { + case statsGroupTopPoster(userId: Int32, messages: Int32, avgChars: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .statsGroupTopPoster(let userId, let messages, let avgChars): + if boxed { + buffer.appendInt32(418631927) + } + serializeInt32(userId, buffer: buffer, boxed: false) + serializeInt32(messages, buffer: buffer, boxed: false) + serializeInt32(avgChars, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .statsGroupTopPoster(let userId, let messages, let avgChars): + return ("statsGroupTopPoster", [("userId", userId), ("messages", messages), ("avgChars", avgChars)]) + } + } + + public static func parse_statsGroupTopPoster(_ reader: BufferReader) -> StatsGroupTopPoster? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.StatsGroupTopPoster.statsGroupTopPoster(userId: _1!, messages: _2!, avgChars: _3!) + } + else { + return nil + } + } + + } + public enum EncryptedFile: TypeConstructorDescription { + case encryptedFileEmpty + case encryptedFile(id: Int64, accessHash: Int64, size: Int32, dcId: Int32, keyFingerprint: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .encryptedFileEmpty: + if boxed { + buffer.appendInt32(-1038136962) + } + + break + case .encryptedFile(let id, let accessHash, let size, let dcId, let keyFingerprint): + if boxed { + buffer.appendInt32(1248893260) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeInt32(size, buffer: buffer, boxed: false) + serializeInt32(dcId, buffer: buffer, boxed: false) + serializeInt32(keyFingerprint, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .encryptedFileEmpty: + return ("encryptedFileEmpty", []) + case .encryptedFile(let id, let accessHash, let size, let dcId, let keyFingerprint): + return ("encryptedFile", [("id", id), ("accessHash", accessHash), ("size", size), ("dcId", dcId), ("keyFingerprint", keyFingerprint)]) + } + } + + public static func parse_encryptedFileEmpty(_ reader: BufferReader) -> EncryptedFile? { + return Api.EncryptedFile.encryptedFileEmpty + } + public static func parse_encryptedFile(_ reader: BufferReader) -> EncryptedFile? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int64? + _2 = reader.readInt64() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.EncryptedFile.encryptedFile(id: _1!, accessHash: _2!, size: _3!, dcId: _4!, keyFingerprint: _5!) + } + else { + return nil + } + } + + } + public enum CodeSettings: TypeConstructorDescription { + case codeSettings(flags: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .codeSettings(let flags): + if boxed { + buffer.appendInt32(-557924733) + } + serializeInt32(flags, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .codeSettings(let flags): + return ("codeSettings", [("flags", flags)]) + } + } + + public static func parse_codeSettings(_ reader: BufferReader) -> CodeSettings? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.CodeSettings.codeSettings(flags: _1!) + } + else { + return nil + } + } + + } + public enum SecureValueError: TypeConstructorDescription { + case secureValueErrorData(type: Api.SecureValueType, dataHash: Buffer, field: String, text: String) + case secureValueErrorFrontSide(type: Api.SecureValueType, fileHash: Buffer, text: String) + case secureValueErrorReverseSide(type: Api.SecureValueType, fileHash: Buffer, text: String) + case secureValueErrorSelfie(type: Api.SecureValueType, fileHash: Buffer, text: String) + case secureValueErrorFile(type: Api.SecureValueType, fileHash: Buffer, text: String) + case secureValueErrorFiles(type: Api.SecureValueType, fileHash: [Buffer], text: String) + case secureValueError(type: Api.SecureValueType, hash: Buffer, text: String) + case secureValueErrorTranslationFile(type: Api.SecureValueType, fileHash: Buffer, text: String) + case secureValueErrorTranslationFiles(type: Api.SecureValueType, fileHash: [Buffer], text: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .secureValueErrorData(let type, let dataHash, let field, let text): + if boxed { + buffer.appendInt32(-391902247) + } + type.serialize(buffer, true) + serializeBytes(dataHash, buffer: buffer, boxed: false) + serializeString(field, buffer: buffer, boxed: false) + serializeString(text, buffer: buffer, boxed: false) + break + case .secureValueErrorFrontSide(let type, let fileHash, let text): + if boxed { + buffer.appendInt32(12467706) + } + type.serialize(buffer, true) + serializeBytes(fileHash, buffer: buffer, boxed: false) + serializeString(text, buffer: buffer, boxed: false) + break + case .secureValueErrorReverseSide(let type, let fileHash, let text): + if boxed { + buffer.appendInt32(-2037765467) + } + type.serialize(buffer, true) + serializeBytes(fileHash, buffer: buffer, boxed: false) + serializeString(text, buffer: buffer, boxed: false) + break + case .secureValueErrorSelfie(let type, let fileHash, let text): + if boxed { + buffer.appendInt32(-449327402) + } + type.serialize(buffer, true) + serializeBytes(fileHash, buffer: buffer, boxed: false) + serializeString(text, buffer: buffer, boxed: false) + break + case .secureValueErrorFile(let type, let fileHash, let text): + if boxed { + buffer.appendInt32(2054162547) + } + type.serialize(buffer, true) + serializeBytes(fileHash, buffer: buffer, boxed: false) + serializeString(text, buffer: buffer, boxed: false) + break + case .secureValueErrorFiles(let type, let fileHash, let text): + if boxed { + buffer.appendInt32(1717706985) + } + type.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(fileHash.count)) + for item in fileHash { + serializeBytes(item, buffer: buffer, boxed: false) + } + serializeString(text, buffer: buffer, boxed: false) + break + case .secureValueError(let type, let hash, let text): + if boxed { + buffer.appendInt32(-2036501105) + } + type.serialize(buffer, true) + serializeBytes(hash, buffer: buffer, boxed: false) + serializeString(text, buffer: buffer, boxed: false) + break + case .secureValueErrorTranslationFile(let type, let fileHash, let text): + if boxed { + buffer.appendInt32(-1592506512) + } + type.serialize(buffer, true) + serializeBytes(fileHash, buffer: buffer, boxed: false) + serializeString(text, buffer: buffer, boxed: false) + break + case .secureValueErrorTranslationFiles(let type, let fileHash, let text): + if boxed { + buffer.appendInt32(878931416) + } + type.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(fileHash.count)) + for item in fileHash { + serializeBytes(item, buffer: buffer, boxed: false) + } + serializeString(text, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .secureValueErrorData(let type, let dataHash, let field, let text): + return ("secureValueErrorData", [("type", type), ("dataHash", dataHash), ("field", field), ("text", text)]) + case .secureValueErrorFrontSide(let type, let fileHash, let text): + return ("secureValueErrorFrontSide", [("type", type), ("fileHash", fileHash), ("text", text)]) + case .secureValueErrorReverseSide(let type, let fileHash, let text): + return ("secureValueErrorReverseSide", [("type", type), ("fileHash", fileHash), ("text", text)]) + case .secureValueErrorSelfie(let type, let fileHash, let text): + return ("secureValueErrorSelfie", [("type", type), ("fileHash", fileHash), ("text", text)]) + case .secureValueErrorFile(let type, let fileHash, let text): + return ("secureValueErrorFile", [("type", type), ("fileHash", fileHash), ("text", text)]) + case .secureValueErrorFiles(let type, let fileHash, let text): + return ("secureValueErrorFiles", [("type", type), ("fileHash", fileHash), ("text", text)]) + case .secureValueError(let type, let hash, let text): + return ("secureValueError", [("type", type), ("hash", hash), ("text", text)]) + case .secureValueErrorTranslationFile(let type, let fileHash, let text): + return ("secureValueErrorTranslationFile", [("type", type), ("fileHash", fileHash), ("text", text)]) + case .secureValueErrorTranslationFiles(let type, let fileHash, let text): + return ("secureValueErrorTranslationFiles", [("type", type), ("fileHash", fileHash), ("text", text)]) + } + } + + public static func parse_secureValueErrorData(_ reader: BufferReader) -> SecureValueError? { + var _1: Api.SecureValueType? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.SecureValueType + } + var _2: Buffer? + _2 = parseBytes(reader) + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.SecureValueError.secureValueErrorData(type: _1!, dataHash: _2!, field: _3!, text: _4!) + } + else { + return nil + } + } + public static func parse_secureValueErrorFrontSide(_ reader: BufferReader) -> SecureValueError? { + var _1: Api.SecureValueType? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.SecureValueType + } + var _2: Buffer? + _2 = parseBytes(reader) + var _3: String? + _3 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.SecureValueError.secureValueErrorFrontSide(type: _1!, fileHash: _2!, text: _3!) + } + else { + return nil + } + } + public static func parse_secureValueErrorReverseSide(_ reader: BufferReader) -> SecureValueError? { + var _1: Api.SecureValueType? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.SecureValueType + } + var _2: Buffer? + _2 = parseBytes(reader) + var _3: String? + _3 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.SecureValueError.secureValueErrorReverseSide(type: _1!, fileHash: _2!, text: _3!) + } + else { + return nil + } + } + public static func parse_secureValueErrorSelfie(_ reader: BufferReader) -> SecureValueError? { + var _1: Api.SecureValueType? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.SecureValueType + } + var _2: Buffer? + _2 = parseBytes(reader) + var _3: String? + _3 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.SecureValueError.secureValueErrorSelfie(type: _1!, fileHash: _2!, text: _3!) + } + else { + return nil + } + } + public static func parse_secureValueErrorFile(_ reader: BufferReader) -> SecureValueError? { + var _1: Api.SecureValueType? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.SecureValueType + } + var _2: Buffer? + _2 = parseBytes(reader) + var _3: String? + _3 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.SecureValueError.secureValueErrorFile(type: _1!, fileHash: _2!, text: _3!) + } + else { + return nil + } + } + public static func parse_secureValueErrorFiles(_ reader: BufferReader) -> SecureValueError? { + var _1: Api.SecureValueType? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.SecureValueType + } + var _2: [Buffer]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: -1255641564, elementType: Buffer.self) + } + var _3: String? + _3 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.SecureValueError.secureValueErrorFiles(type: _1!, fileHash: _2!, text: _3!) + } + else { + return nil + } + } + public static func parse_secureValueError(_ reader: BufferReader) -> SecureValueError? { + var _1: Api.SecureValueType? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.SecureValueType + } + var _2: Buffer? + _2 = parseBytes(reader) + var _3: String? + _3 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.SecureValueError.secureValueError(type: _1!, hash: _2!, text: _3!) + } + else { + return nil + } + } + public static func parse_secureValueErrorTranslationFile(_ reader: BufferReader) -> SecureValueError? { + var _1: Api.SecureValueType? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.SecureValueType + } + var _2: Buffer? + _2 = parseBytes(reader) + var _3: String? + _3 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.SecureValueError.secureValueErrorTranslationFile(type: _1!, fileHash: _2!, text: _3!) + } + else { + return nil + } + } + public static func parse_secureValueErrorTranslationFiles(_ reader: BufferReader) -> SecureValueError? { + var _1: Api.SecureValueType? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.SecureValueType + } + var _2: [Buffer]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: -1255641564, elementType: Buffer.self) + } + var _3: String? + _3 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.SecureValueError.secureValueErrorTranslationFiles(type: _1!, fileHash: _2!, text: _3!) + } + else { + return nil + } + } + + } + public enum NotifyPeer: TypeConstructorDescription { + case notifyPeer(peer: Api.Peer) + case notifyUsers + case notifyChats + case notifyBroadcasts + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .notifyPeer(let peer): + if boxed { + buffer.appendInt32(-1613493288) + } + peer.serialize(buffer, true) + break + case .notifyUsers: + if boxed { + buffer.appendInt32(-1261946036) + } + + break + case .notifyChats: + if boxed { + buffer.appendInt32(-1073230141) + } + + break + case .notifyBroadcasts: + if boxed { + buffer.appendInt32(-703403793) + } + + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .notifyPeer(let peer): + return ("notifyPeer", [("peer", peer)]) + case .notifyUsers: + return ("notifyUsers", []) + case .notifyChats: + return ("notifyChats", []) + case .notifyBroadcasts: + return ("notifyBroadcasts", []) + } + } + + public static func parse_notifyPeer(_ reader: BufferReader) -> NotifyPeer? { + var _1: Api.Peer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Peer + } + let _c1 = _1 != nil + if _c1 { + return Api.NotifyPeer.notifyPeer(peer: _1!) + } + else { + return nil + } + } + public static func parse_notifyUsers(_ reader: BufferReader) -> NotifyPeer? { + return Api.NotifyPeer.notifyUsers + } + public static func parse_notifyChats(_ reader: BufferReader) -> NotifyPeer? { + return Api.NotifyPeer.notifyChats + } + public static func parse_notifyBroadcasts(_ reader: BufferReader) -> NotifyPeer? { + return Api.NotifyPeer.notifyBroadcasts + } + + } + public enum InputPrivacyKey: TypeConstructorDescription { + case inputPrivacyKeyStatusTimestamp + case inputPrivacyKeyChatInvite + case inputPrivacyKeyPhoneCall + case inputPrivacyKeyPhoneP2P + case inputPrivacyKeyForwards + case inputPrivacyKeyProfilePhoto + case inputPrivacyKeyPhoneNumber + case inputPrivacyKeyAddedByPhone + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputPrivacyKeyStatusTimestamp: + if boxed { + buffer.appendInt32(1335282456) + } + + break + case .inputPrivacyKeyChatInvite: + if boxed { + buffer.appendInt32(-1107622874) + } + + break + case .inputPrivacyKeyPhoneCall: + if boxed { + buffer.appendInt32(-88417185) + } + + break + case .inputPrivacyKeyPhoneP2P: + if boxed { + buffer.appendInt32(-610373422) + } + + break + case .inputPrivacyKeyForwards: + if boxed { + buffer.appendInt32(-1529000952) + } + + break + case .inputPrivacyKeyProfilePhoto: + if boxed { + buffer.appendInt32(1461304012) + } + + break + case .inputPrivacyKeyPhoneNumber: + if boxed { + buffer.appendInt32(55761658) + } + + break + case .inputPrivacyKeyAddedByPhone: + if boxed { + buffer.appendInt32(-786326563) + } + + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputPrivacyKeyStatusTimestamp: + return ("inputPrivacyKeyStatusTimestamp", []) + case .inputPrivacyKeyChatInvite: + return ("inputPrivacyKeyChatInvite", []) + case .inputPrivacyKeyPhoneCall: + return ("inputPrivacyKeyPhoneCall", []) + case .inputPrivacyKeyPhoneP2P: + return ("inputPrivacyKeyPhoneP2P", []) + case .inputPrivacyKeyForwards: + return ("inputPrivacyKeyForwards", []) + case .inputPrivacyKeyProfilePhoto: + return ("inputPrivacyKeyProfilePhoto", []) + case .inputPrivacyKeyPhoneNumber: + return ("inputPrivacyKeyPhoneNumber", []) + case .inputPrivacyKeyAddedByPhone: + return ("inputPrivacyKeyAddedByPhone", []) + } + } + + public static func parse_inputPrivacyKeyStatusTimestamp(_ reader: BufferReader) -> InputPrivacyKey? { + return Api.InputPrivacyKey.inputPrivacyKeyStatusTimestamp + } + public static func parse_inputPrivacyKeyChatInvite(_ reader: BufferReader) -> InputPrivacyKey? { + return Api.InputPrivacyKey.inputPrivacyKeyChatInvite + } + public static func parse_inputPrivacyKeyPhoneCall(_ reader: BufferReader) -> InputPrivacyKey? { + return Api.InputPrivacyKey.inputPrivacyKeyPhoneCall + } + public static func parse_inputPrivacyKeyPhoneP2P(_ reader: BufferReader) -> InputPrivacyKey? { + return Api.InputPrivacyKey.inputPrivacyKeyPhoneP2P + } + public static func parse_inputPrivacyKeyForwards(_ reader: BufferReader) -> InputPrivacyKey? { + return Api.InputPrivacyKey.inputPrivacyKeyForwards + } + public static func parse_inputPrivacyKeyProfilePhoto(_ reader: BufferReader) -> InputPrivacyKey? { + return Api.InputPrivacyKey.inputPrivacyKeyProfilePhoto + } + public static func parse_inputPrivacyKeyPhoneNumber(_ reader: BufferReader) -> InputPrivacyKey? { + return Api.InputPrivacyKey.inputPrivacyKeyPhoneNumber + } + public static func parse_inputPrivacyKeyAddedByPhone(_ reader: BufferReader) -> InputPrivacyKey? { + return Api.InputPrivacyKey.inputPrivacyKeyAddedByPhone + } + + } + public enum ReplyMarkup: TypeConstructorDescription { + case replyKeyboardHide(flags: Int32) + case replyKeyboardForceReply(flags: Int32) + case replyKeyboardMarkup(flags: Int32, rows: [Api.KeyboardButtonRow]) + case replyInlineMarkup(rows: [Api.KeyboardButtonRow]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .replyKeyboardHide(let flags): + if boxed { + buffer.appendInt32(-1606526075) + } + serializeInt32(flags, buffer: buffer, boxed: false) + break + case .replyKeyboardForceReply(let flags): + if boxed { + buffer.appendInt32(-200242528) + } + serializeInt32(flags, buffer: buffer, boxed: false) + break + case .replyKeyboardMarkup(let flags, let rows): + if boxed { + buffer.appendInt32(889353612) + } + serializeInt32(flags, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(rows.count)) + for item in rows { + item.serialize(buffer, true) + } + break + case .replyInlineMarkup(let rows): + if boxed { + buffer.appendInt32(1218642516) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(rows.count)) + for item in rows { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .replyKeyboardHide(let flags): + return ("replyKeyboardHide", [("flags", flags)]) + case .replyKeyboardForceReply(let flags): + return ("replyKeyboardForceReply", [("flags", flags)]) + case .replyKeyboardMarkup(let flags, let rows): + return ("replyKeyboardMarkup", [("flags", flags), ("rows", rows)]) + case .replyInlineMarkup(let rows): + return ("replyInlineMarkup", [("rows", rows)]) + } + } + + public static func parse_replyKeyboardHide(_ reader: BufferReader) -> ReplyMarkup? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.ReplyMarkup.replyKeyboardHide(flags: _1!) + } + else { + return nil + } + } + public static func parse_replyKeyboardForceReply(_ reader: BufferReader) -> ReplyMarkup? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.ReplyMarkup.replyKeyboardForceReply(flags: _1!) + } + else { + return nil + } + } + public static func parse_replyKeyboardMarkup(_ reader: BufferReader) -> ReplyMarkup? { + var _1: Int32? + _1 = reader.readInt32() + var _2: [Api.KeyboardButtonRow]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.KeyboardButtonRow.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ReplyMarkup.replyKeyboardMarkup(flags: _1!, rows: _2!) + } + else { + return nil + } + } + public static func parse_replyInlineMarkup(_ reader: BufferReader) -> ReplyMarkup? { + var _1: [Api.KeyboardButtonRow]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.KeyboardButtonRow.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.ReplyMarkup.replyInlineMarkup(rows: _1!) + } + else { + return nil + } + } + + } + public enum EmojiKeywordsDifference: TypeConstructorDescription { + case emojiKeywordsDifference(langCode: String, fromVersion: Int32, version: Int32, keywords: [Api.EmojiKeyword]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .emojiKeywordsDifference(let langCode, let fromVersion, let version, let keywords): + if boxed { + buffer.appendInt32(1556570557) + } + serializeString(langCode, buffer: buffer, boxed: false) + serializeInt32(fromVersion, buffer: buffer, boxed: false) + serializeInt32(version, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(keywords.count)) + for item in keywords { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .emojiKeywordsDifference(let langCode, let fromVersion, let version, let keywords): + return ("emojiKeywordsDifference", [("langCode", langCode), ("fromVersion", fromVersion), ("version", version), ("keywords", keywords)]) + } + } + + public static func parse_emojiKeywordsDifference(_ reader: BufferReader) -> EmojiKeywordsDifference? { + var _1: String? + _1 = parseString(reader) + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: [Api.EmojiKeyword]? + if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.EmojiKeyword.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.EmojiKeywordsDifference.emojiKeywordsDifference(langCode: _1!, fromVersion: _2!, version: _3!, keywords: _4!) + } + else { + return nil + } + } + + } + public enum HighScore: TypeConstructorDescription { + case highScore(pos: Int32, userId: Int32, score: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .highScore(let pos, let userId, let score): + if boxed { + buffer.appendInt32(1493171408) + } + serializeInt32(pos, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + serializeInt32(score, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .highScore(let pos, let userId, let score): + return ("highScore", [("pos", pos), ("userId", userId), ("score", score)]) + } + } + + public static func parse_highScore(_ reader: BufferReader) -> HighScore? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.HighScore.highScore(pos: _1!, userId: _2!, score: _3!) + } + else { + return nil + } + } + + } + public enum TopPeer: TypeConstructorDescription { + case topPeer(peer: Api.Peer, rating: Double) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .topPeer(let peer, let rating): + if boxed { + buffer.appendInt32(-305282981) + } + peer.serialize(buffer, true) + serializeDouble(rating, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .topPeer(let peer, let rating): + return ("topPeer", [("peer", peer), ("rating", rating)]) + } + } + + public static func parse_topPeer(_ reader: BufferReader) -> TopPeer? { + var _1: Api.Peer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _2: Double? + _2 = reader.readDouble() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.TopPeer.topPeer(peer: _1!, rating: _2!) + } + else { + return nil + } + } + + } + public enum MessageReplyHeader: TypeConstructorDescription { + case messageReplyHeader(flags: Int32, replyToMsgId: Int32, replyToPeerId: Api.Peer?, replyToTopId: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .messageReplyHeader(let flags, let replyToMsgId, let replyToPeerId, let replyToTopId): + if boxed { + buffer.appendInt32(-1495959709) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(replyToMsgId, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {replyToPeerId!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(replyToTopId!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .messageReplyHeader(let flags, let replyToMsgId, let replyToPeerId, let replyToTopId): + return ("messageReplyHeader", [("flags", flags), ("replyToMsgId", replyToMsgId), ("replyToPeerId", replyToPeerId), ("replyToTopId", replyToTopId)]) + } + } + + public static func parse_messageReplyHeader(_ reader: BufferReader) -> MessageReplyHeader? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Api.Peer? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.Peer + } } + var _4: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.MessageReplyHeader.messageReplyHeader(flags: _1!, replyToMsgId: _2!, replyToPeerId: _3, replyToTopId: _4) + } + else { + return nil + } + } + + } + public enum SecureValue: TypeConstructorDescription { + case secureValue(flags: Int32, type: Api.SecureValueType, data: Api.SecureData?, frontSide: Api.SecureFile?, reverseSide: Api.SecureFile?, selfie: Api.SecureFile?, translation: [Api.SecureFile]?, files: [Api.SecureFile]?, plainData: Api.SecurePlainData?, hash: Buffer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .secureValue(let flags, let type, let data, let frontSide, let reverseSide, let selfie, let translation, let files, let plainData, let hash): + if boxed { + buffer.appendInt32(411017418) + } + serializeInt32(flags, buffer: buffer, boxed: false) + type.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {data!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {frontSide!.serialize(buffer, true)} + if Int(flags) & Int(1 << 2) != 0 {reverseSide!.serialize(buffer, true)} + if Int(flags) & Int(1 << 3) != 0 {selfie!.serialize(buffer, true)} + if Int(flags) & Int(1 << 6) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(translation!.count)) + for item in translation! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 4) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(files!.count)) + for item in files! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 5) != 0 {plainData!.serialize(buffer, true)} + serializeBytes(hash, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .secureValue(let flags, let type, let data, let frontSide, let reverseSide, let selfie, let translation, let files, let plainData, let hash): + return ("secureValue", [("flags", flags), ("type", type), ("data", data), ("frontSide", frontSide), ("reverseSide", reverseSide), ("selfie", selfie), ("translation", translation), ("files", files), ("plainData", plainData), ("hash", hash)]) + } + } + + public static func parse_secureValue(_ reader: BufferReader) -> SecureValue? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.SecureValueType? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.SecureValueType + } + var _3: Api.SecureData? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.SecureData + } } + var _4: Api.SecureFile? + if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.SecureFile + } } + var _5: Api.SecureFile? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.SecureFile + } } + var _6: Api.SecureFile? + if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.SecureFile + } } + var _7: [Api.SecureFile]? + if Int(_1!) & Int(1 << 6) != 0 {if let _ = reader.readInt32() { + _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureFile.self) + } } + var _8: [Api.SecureFile]? + if Int(_1!) & Int(1 << 4) != 0 {if let _ = reader.readInt32() { + _8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureFile.self) + } } + var _9: Api.SecurePlainData? + if Int(_1!) & Int(1 << 5) != 0 {if let signature = reader.readInt32() { + _9 = Api.parse(reader, signature: signature) as? Api.SecurePlainData + } } + var _10: Buffer? + _10 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 6) == 0) || _7 != nil + let _c8 = (Int(_1!) & Int(1 << 4) == 0) || _8 != nil + let _c9 = (Int(_1!) & Int(1 << 5) == 0) || _9 != nil + let _c10 = _10 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 { + return Api.SecureValue.secureValue(flags: _1!, type: _2!, data: _3, frontSide: _4, reverseSide: _5, selfie: _6, translation: _7, files: _8, plainData: _9, hash: _10!) + } + else { + return nil + } + } + + } + public enum SecureValueHash: TypeConstructorDescription { + case secureValueHash(type: Api.SecureValueType, hash: Buffer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .secureValueHash(let type, let hash): + if boxed { + buffer.appendInt32(-316748368) + } + type.serialize(buffer, true) + serializeBytes(hash, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .secureValueHash(let type, let hash): + return ("secureValueHash", [("type", type), ("hash", hash)]) + } + } + + public static func parse_secureValueHash(_ reader: BufferReader) -> SecureValueHash? { + var _1: Api.SecureValueType? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.SecureValueType + } + var _2: Buffer? + _2 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.SecureValueHash.secureValueHash(type: _1!, hash: _2!) + } + else { + return nil + } + } + + } + public enum PageListItem: TypeConstructorDescription { + case pageListItemText(text: Api.RichText) + case pageListItemBlocks(blocks: [Api.PageBlock]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .pageListItemText(let text): + if boxed { + buffer.appendInt32(-1188055347) + } + text.serialize(buffer, true) + break + case .pageListItemBlocks(let blocks): + if boxed { + buffer.appendInt32(635466748) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(blocks.count)) + for item in blocks { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .pageListItemText(let text): + return ("pageListItemText", [("text", text)]) + case .pageListItemBlocks(let blocks): + return ("pageListItemBlocks", [("blocks", blocks)]) + } + } + + public static func parse_pageListItemText(_ reader: BufferReader) -> PageListItem? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + if _c1 { + return Api.PageListItem.pageListItemText(text: _1!) + } + else { + return nil + } + } + public static func parse_pageListItemBlocks(_ reader: BufferReader) -> PageListItem? { + var _1: [Api.PageBlock]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageBlock.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.PageListItem.pageListItemBlocks(blocks: _1!) + } + else { + return nil + } + } + + } + public enum PeerBlocked: TypeConstructorDescription { + case peerBlocked(peerId: Api.Peer, date: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .peerBlocked(let peerId, let date): + if boxed { + buffer.appendInt32(-386039788) + } + peerId.serialize(buffer, true) + serializeInt32(date, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .peerBlocked(let peerId, let date): + return ("peerBlocked", [("peerId", peerId), ("date", date)]) + } + } + + public static func parse_peerBlocked(_ reader: BufferReader) -> PeerBlocked? { + var _1: Api.Peer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.PeerBlocked.peerBlocked(peerId: _1!, date: _2!) + } + else { + return nil + } + } + + } + public enum InputUser: TypeConstructorDescription { + case inputUserEmpty + case inputUserSelf + case inputUser(userId: Int32, accessHash: Int64) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputUserEmpty: + if boxed { + buffer.appendInt32(-1182234929) + } + + break + case .inputUserSelf: + if boxed { + buffer.appendInt32(-138301121) + } + + break + case .inputUser(let userId, let accessHash): + if boxed { + buffer.appendInt32(-668391402) + } + serializeInt32(userId, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputUserEmpty: + return ("inputUserEmpty", []) + case .inputUserSelf: + return ("inputUserSelf", []) + case .inputUser(let userId, let accessHash): + return ("inputUser", [("userId", userId), ("accessHash", accessHash)]) + } + } + + public static func parse_inputUserEmpty(_ reader: BufferReader) -> InputUser? { + return Api.InputUser.inputUserEmpty + } + public static func parse_inputUserSelf(_ reader: BufferReader) -> InputUser? { + return Api.InputUser.inputUserSelf + } + public static func parse_inputUser(_ reader: BufferReader) -> InputUser? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputUser.inputUser(userId: _1!, accessHash: _2!) + } + else { + return nil + } + } + + } + public enum Page: TypeConstructorDescription { + case page(flags: Int32, url: String, blocks: [Api.PageBlock], photos: [Api.Photo], documents: [Api.Document], views: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .page(let flags, let url, let blocks, let photos, let documents, let views): + if boxed { + buffer.appendInt32(-1738178803) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(url, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(blocks.count)) + for item in blocks { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(photos.count)) + for item in photos { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(documents.count)) + for item in documents { + item.serialize(buffer, true) + } + if Int(flags) & Int(1 << 3) != 0 {serializeInt32(views!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .page(let flags, let url, let blocks, let photos, let documents, let views): + return ("page", [("flags", flags), ("url", url), ("blocks", blocks), ("photos", photos), ("documents", documents), ("views", views)]) + } + } + + public static func parse_page(_ reader: BufferReader) -> Page? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: [Api.PageBlock]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageBlock.self) + } + var _4: [Api.Photo]? + if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Photo.self) + } + var _5: [Api.Document]? + if let _ = reader.readInt32() { + _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Document.self) + } + var _6: Int32? + if Int(_1!) & Int(1 << 3) != 0 {_6 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.Page.page(flags: _1!, url: _2!, blocks: _3!, photos: _4!, documents: _5!, views: _6) + } + else { + return nil + } + } + + } + public enum SecureCredentialsEncrypted: TypeConstructorDescription { + case secureCredentialsEncrypted(data: Buffer, hash: Buffer, secret: Buffer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .secureCredentialsEncrypted(let data, let hash, let secret): + if boxed { + buffer.appendInt32(871426631) + } + serializeBytes(data, buffer: buffer, boxed: false) + serializeBytes(hash, buffer: buffer, boxed: false) + serializeBytes(secret, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .secureCredentialsEncrypted(let data, let hash, let secret): + return ("secureCredentialsEncrypted", [("data", data), ("hash", hash), ("secret", secret)]) + } + } + + public static func parse_secureCredentialsEncrypted(_ reader: BufferReader) -> SecureCredentialsEncrypted? { + var _1: Buffer? + _1 = parseBytes(reader) + var _2: Buffer? + _2 = parseBytes(reader) + var _3: Buffer? + _3 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.SecureCredentialsEncrypted.secureCredentialsEncrypted(data: _1!, hash: _2!, secret: _3!) + } + else { + return nil + } + } + + } + public enum StatsPercentValue: TypeConstructorDescription { + case statsPercentValue(part: Double, total: Double) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .statsPercentValue(let part, let total): + if boxed { + buffer.appendInt32(-875679776) + } + serializeDouble(part, buffer: buffer, boxed: false) + serializeDouble(total, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .statsPercentValue(let part, let total): + return ("statsPercentValue", [("part", part), ("total", total)]) + } + } + + public static func parse_statsPercentValue(_ reader: BufferReader) -> StatsPercentValue? { + var _1: Double? + _1 = reader.readDouble() + var _2: Double? + _2 = reader.readDouble() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.StatsPercentValue.statsPercentValue(part: _1!, total: _2!) + } + else { + return nil + } + } + + } + public enum ChannelLocation: TypeConstructorDescription { + case channelLocationEmpty + case channelLocation(geoPoint: Api.GeoPoint, address: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .channelLocationEmpty: + if boxed { + buffer.appendInt32(-1078612597) + } + + break + case .channelLocation(let geoPoint, let address): + if boxed { + buffer.appendInt32(547062491) + } + geoPoint.serialize(buffer, true) + serializeString(address, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .channelLocationEmpty: + return ("channelLocationEmpty", []) + case .channelLocation(let geoPoint, let address): + return ("channelLocation", [("geoPoint", geoPoint), ("address", address)]) + } + } + + public static func parse_channelLocationEmpty(_ reader: BufferReader) -> ChannelLocation? { + return Api.ChannelLocation.channelLocationEmpty + } + public static func parse_channelLocation(_ reader: BufferReader) -> ChannelLocation? { + var _1: Api.GeoPoint? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.GeoPoint + } + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ChannelLocation.channelLocation(geoPoint: _1!, address: _2!) + } + else { + return nil + } + } + + } + public enum MessageRange: TypeConstructorDescription { + case messageRange(minId: Int32, maxId: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .messageRange(let minId, let maxId): + if boxed { + buffer.appendInt32(182649427) + } + serializeInt32(minId, buffer: buffer, boxed: false) + serializeInt32(maxId, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .messageRange(let minId, let maxId): + return ("messageRange", [("minId", minId), ("maxId", maxId)]) + } + } + + public static func parse_messageRange(_ reader: BufferReader) -> MessageRange? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageRange.messageRange(minId: _1!, maxId: _2!) + } + else { + return nil + } + } + + } + public enum Config: TypeConstructorDescription { + case config(flags: Int32, date: Int32, expires: Int32, testMode: Api.Bool, thisDc: Int32, dcOptions: [Api.DcOption], dcTxtDomainName: String, chatSizeMax: Int32, megagroupSizeMax: Int32, forwardedCountMax: Int32, onlineUpdatePeriodMs: Int32, offlineBlurTimeoutMs: Int32, offlineIdleTimeoutMs: Int32, onlineCloudTimeoutMs: Int32, notifyCloudDelayMs: Int32, notifyDefaultDelayMs: Int32, pushChatPeriodMs: Int32, pushChatLimit: Int32, savedGifsLimit: Int32, editTimeLimit: Int32, revokeTimeLimit: Int32, revokePmTimeLimit: Int32, ratingEDecay: Int32, stickersRecentLimit: Int32, stickersFavedLimit: Int32, channelsReadMediaPeriod: Int32, tmpSessions: Int32?, pinnedDialogsCountMax: Int32, pinnedInfolderCountMax: Int32, callReceiveTimeoutMs: Int32, callRingTimeoutMs: Int32, callConnectTimeoutMs: Int32, callPacketTimeoutMs: Int32, meUrlPrefix: String, autoupdateUrlPrefix: String?, gifSearchUsername: String?, venueSearchUsername: String?, imgSearchUsername: String?, staticMapsProvider: String?, captionLengthMax: Int32, messageLengthMax: Int32, webfileDcId: Int32, suggestedLangCode: String?, langPackVersion: Int32?, baseLangPackVersion: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .config(let flags, let date, let expires, let testMode, let thisDc, let dcOptions, let dcTxtDomainName, let chatSizeMax, let megagroupSizeMax, let forwardedCountMax, let onlineUpdatePeriodMs, let offlineBlurTimeoutMs, let offlineIdleTimeoutMs, let onlineCloudTimeoutMs, let notifyCloudDelayMs, let notifyDefaultDelayMs, let pushChatPeriodMs, let pushChatLimit, let savedGifsLimit, let editTimeLimit, let revokeTimeLimit, let revokePmTimeLimit, let ratingEDecay, let stickersRecentLimit, let stickersFavedLimit, let channelsReadMediaPeriod, let tmpSessions, let pinnedDialogsCountMax, let pinnedInfolderCountMax, let callReceiveTimeoutMs, let callRingTimeoutMs, let callConnectTimeoutMs, let callPacketTimeoutMs, let meUrlPrefix, let autoupdateUrlPrefix, let gifSearchUsername, let venueSearchUsername, let imgSearchUsername, let staticMapsProvider, let captionLengthMax, let messageLengthMax, let webfileDcId, let suggestedLangCode, let langPackVersion, let baseLangPackVersion): + if boxed { + buffer.appendInt32(856375399) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + serializeInt32(expires, buffer: buffer, boxed: false) + testMode.serialize(buffer, true) + serializeInt32(thisDc, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(dcOptions.count)) + for item in dcOptions { + item.serialize(buffer, true) + } + serializeString(dcTxtDomainName, buffer: buffer, boxed: false) + serializeInt32(chatSizeMax, buffer: buffer, boxed: false) + serializeInt32(megagroupSizeMax, buffer: buffer, boxed: false) + serializeInt32(forwardedCountMax, buffer: buffer, boxed: false) + serializeInt32(onlineUpdatePeriodMs, buffer: buffer, boxed: false) + serializeInt32(offlineBlurTimeoutMs, buffer: buffer, boxed: false) + serializeInt32(offlineIdleTimeoutMs, buffer: buffer, boxed: false) + serializeInt32(onlineCloudTimeoutMs, buffer: buffer, boxed: false) + serializeInt32(notifyCloudDelayMs, buffer: buffer, boxed: false) + serializeInt32(notifyDefaultDelayMs, buffer: buffer, boxed: false) + serializeInt32(pushChatPeriodMs, buffer: buffer, boxed: false) + serializeInt32(pushChatLimit, buffer: buffer, boxed: false) + serializeInt32(savedGifsLimit, buffer: buffer, boxed: false) + serializeInt32(editTimeLimit, buffer: buffer, boxed: false) + serializeInt32(revokeTimeLimit, buffer: buffer, boxed: false) + serializeInt32(revokePmTimeLimit, buffer: buffer, boxed: false) + serializeInt32(ratingEDecay, buffer: buffer, boxed: false) + serializeInt32(stickersRecentLimit, buffer: buffer, boxed: false) + serializeInt32(stickersFavedLimit, buffer: buffer, boxed: false) + serializeInt32(channelsReadMediaPeriod, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(tmpSessions!, buffer: buffer, boxed: false)} + serializeInt32(pinnedDialogsCountMax, buffer: buffer, boxed: false) + serializeInt32(pinnedInfolderCountMax, buffer: buffer, boxed: false) + serializeInt32(callReceiveTimeoutMs, buffer: buffer, boxed: false) + serializeInt32(callRingTimeoutMs, buffer: buffer, boxed: false) + serializeInt32(callConnectTimeoutMs, buffer: buffer, boxed: false) + serializeInt32(callPacketTimeoutMs, buffer: buffer, boxed: false) + serializeString(meUrlPrefix, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 7) != 0 {serializeString(autoupdateUrlPrefix!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 9) != 0 {serializeString(gifSearchUsername!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 10) != 0 {serializeString(venueSearchUsername!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 11) != 0 {serializeString(imgSearchUsername!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 12) != 0 {serializeString(staticMapsProvider!, buffer: buffer, boxed: false)} + serializeInt32(captionLengthMax, buffer: buffer, boxed: false) + serializeInt32(messageLengthMax, buffer: buffer, boxed: false) + serializeInt32(webfileDcId, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 2) != 0 {serializeString(suggestedLangCode!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(langPackVersion!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(baseLangPackVersion!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .config(let flags, let date, let expires, let testMode, let thisDc, let dcOptions, let dcTxtDomainName, let chatSizeMax, let megagroupSizeMax, let forwardedCountMax, let onlineUpdatePeriodMs, let offlineBlurTimeoutMs, let offlineIdleTimeoutMs, let onlineCloudTimeoutMs, let notifyCloudDelayMs, let notifyDefaultDelayMs, let pushChatPeriodMs, let pushChatLimit, let savedGifsLimit, let editTimeLimit, let revokeTimeLimit, let revokePmTimeLimit, let ratingEDecay, let stickersRecentLimit, let stickersFavedLimit, let channelsReadMediaPeriod, let tmpSessions, let pinnedDialogsCountMax, let pinnedInfolderCountMax, let callReceiveTimeoutMs, let callRingTimeoutMs, let callConnectTimeoutMs, let callPacketTimeoutMs, let meUrlPrefix, let autoupdateUrlPrefix, let gifSearchUsername, let venueSearchUsername, let imgSearchUsername, let staticMapsProvider, let captionLengthMax, let messageLengthMax, let webfileDcId, let suggestedLangCode, let langPackVersion, let baseLangPackVersion): + return ("config", [("flags", flags), ("date", date), ("expires", expires), ("testMode", testMode), ("thisDc", thisDc), ("dcOptions", dcOptions), ("dcTxtDomainName", dcTxtDomainName), ("chatSizeMax", chatSizeMax), ("megagroupSizeMax", megagroupSizeMax), ("forwardedCountMax", forwardedCountMax), ("onlineUpdatePeriodMs", onlineUpdatePeriodMs), ("offlineBlurTimeoutMs", offlineBlurTimeoutMs), ("offlineIdleTimeoutMs", offlineIdleTimeoutMs), ("onlineCloudTimeoutMs", onlineCloudTimeoutMs), ("notifyCloudDelayMs", notifyCloudDelayMs), ("notifyDefaultDelayMs", notifyDefaultDelayMs), ("pushChatPeriodMs", pushChatPeriodMs), ("pushChatLimit", pushChatLimit), ("savedGifsLimit", savedGifsLimit), ("editTimeLimit", editTimeLimit), ("revokeTimeLimit", revokeTimeLimit), ("revokePmTimeLimit", revokePmTimeLimit), ("ratingEDecay", ratingEDecay), ("stickersRecentLimit", stickersRecentLimit), ("stickersFavedLimit", stickersFavedLimit), ("channelsReadMediaPeriod", channelsReadMediaPeriod), ("tmpSessions", tmpSessions), ("pinnedDialogsCountMax", pinnedDialogsCountMax), ("pinnedInfolderCountMax", pinnedInfolderCountMax), ("callReceiveTimeoutMs", callReceiveTimeoutMs), ("callRingTimeoutMs", callRingTimeoutMs), ("callConnectTimeoutMs", callConnectTimeoutMs), ("callPacketTimeoutMs", callPacketTimeoutMs), ("meUrlPrefix", meUrlPrefix), ("autoupdateUrlPrefix", autoupdateUrlPrefix), ("gifSearchUsername", gifSearchUsername), ("venueSearchUsername", venueSearchUsername), ("imgSearchUsername", imgSearchUsername), ("staticMapsProvider", staticMapsProvider), ("captionLengthMax", captionLengthMax), ("messageLengthMax", messageLengthMax), ("webfileDcId", webfileDcId), ("suggestedLangCode", suggestedLangCode), ("langPackVersion", langPackVersion), ("baseLangPackVersion", baseLangPackVersion)]) + } + } + + public static func parse_config(_ reader: BufferReader) -> Config? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: Api.Bool? + if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.Bool + } + var _5: Int32? + _5 = reader.readInt32() + var _6: [Api.DcOption]? + if let _ = reader.readInt32() { + _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DcOption.self) + } + var _7: String? + _7 = parseString(reader) + var _8: Int32? + _8 = reader.readInt32() + var _9: Int32? + _9 = reader.readInt32() + var _10: Int32? + _10 = reader.readInt32() + var _11: Int32? + _11 = reader.readInt32() + var _12: Int32? + _12 = reader.readInt32() + var _13: Int32? + _13 = reader.readInt32() + var _14: Int32? + _14 = reader.readInt32() + var _15: Int32? + _15 = reader.readInt32() + var _16: Int32? + _16 = reader.readInt32() + var _17: Int32? + _17 = reader.readInt32() + var _18: Int32? + _18 = reader.readInt32() + var _19: Int32? + _19 = reader.readInt32() + var _20: Int32? + _20 = reader.readInt32() + var _21: Int32? + _21 = reader.readInt32() + var _22: Int32? + _22 = reader.readInt32() + var _23: Int32? + _23 = reader.readInt32() + var _24: Int32? + _24 = reader.readInt32() + var _25: Int32? + _25 = reader.readInt32() + var _26: Int32? + _26 = reader.readInt32() + var _27: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_27 = reader.readInt32() } + var _28: Int32? + _28 = reader.readInt32() + var _29: Int32? + _29 = reader.readInt32() + var _30: Int32? + _30 = reader.readInt32() + var _31: Int32? + _31 = reader.readInt32() + var _32: Int32? + _32 = reader.readInt32() + var _33: Int32? + _33 = reader.readInt32() + var _34: String? + _34 = parseString(reader) + var _35: String? + if Int(_1!) & Int(1 << 7) != 0 {_35 = parseString(reader) } + var _36: String? + if Int(_1!) & Int(1 << 9) != 0 {_36 = parseString(reader) } + var _37: String? + if Int(_1!) & Int(1 << 10) != 0 {_37 = parseString(reader) } + var _38: String? + if Int(_1!) & Int(1 << 11) != 0 {_38 = parseString(reader) } + var _39: String? + if Int(_1!) & Int(1 << 12) != 0 {_39 = parseString(reader) } + var _40: Int32? + _40 = reader.readInt32() + var _41: Int32? + _41 = reader.readInt32() + var _42: Int32? + _42 = reader.readInt32() + var _43: String? + if Int(_1!) & Int(1 << 2) != 0 {_43 = parseString(reader) } + var _44: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_44 = reader.readInt32() } + var _45: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_45 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil @@ -801,8 +14068,36 @@ public struct stats { let _c15 = _15 != nil let _c16 = _16 != nil let _c17 = _17 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 { - return Api.stats.MegagroupStats.megagroupStats(period: _1!, members: _2!, messages: _3!, viewers: _4!, posters: _5!, growthGraph: _6!, membersGraph: _7!, newMembersBySourceGraph: _8!, languagesGraph: _9!, messagesGraph: _10!, actionsGraph: _11!, topHoursGraph: _12!, weekdaysGraph: _13!, topPosters: _14!, topAdmins: _15!, topInviters: _16!, users: _17!) + let _c18 = _18 != nil + let _c19 = _19 != nil + let _c20 = _20 != nil + let _c21 = _21 != nil + let _c22 = _22 != nil + let _c23 = _23 != nil + let _c24 = _24 != nil + let _c25 = _25 != nil + let _c26 = _26 != nil + let _c27 = (Int(_1!) & Int(1 << 0) == 0) || _27 != nil + let _c28 = _28 != nil + let _c29 = _29 != nil + let _c30 = _30 != nil + let _c31 = _31 != nil + let _c32 = _32 != nil + let _c33 = _33 != nil + let _c34 = _34 != nil + let _c35 = (Int(_1!) & Int(1 << 7) == 0) || _35 != nil + let _c36 = (Int(_1!) & Int(1 << 9) == 0) || _36 != nil + let _c37 = (Int(_1!) & Int(1 << 10) == 0) || _37 != nil + let _c38 = (Int(_1!) & Int(1 << 11) == 0) || _38 != nil + let _c39 = (Int(_1!) & Int(1 << 12) == 0) || _39 != nil + let _c40 = _40 != nil + let _c41 = _41 != nil + let _c42 = _42 != nil + let _c43 = (Int(_1!) & Int(1 << 2) == 0) || _43 != nil + let _c44 = (Int(_1!) & Int(1 << 2) == 0) || _44 != nil + let _c45 = (Int(_1!) & Int(1 << 2) == 0) || _45 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 && _c20 && _c21 && _c22 && _c23 && _c24 && _c25 && _c26 && _c27 && _c28 && _c29 && _c30 && _c31 && _c32 && _c33 && _c34 && _c35 && _c36 && _c37 && _c38 && _c39 && _c40 && _c41 && _c42 && _c43 && _c44 && _c45 { + return Api.Config.config(flags: _1!, date: _2!, expires: _3!, testMode: _4!, thisDc: _5!, dcOptions: _6!, dcTxtDomainName: _7!, chatSizeMax: _8!, megagroupSizeMax: _9!, forwardedCountMax: _10!, onlineUpdatePeriodMs: _11!, offlineBlurTimeoutMs: _12!, offlineIdleTimeoutMs: _13!, onlineCloudTimeoutMs: _14!, notifyCloudDelayMs: _15!, notifyDefaultDelayMs: _16!, pushChatPeriodMs: _17!, pushChatLimit: _18!, savedGifsLimit: _19!, editTimeLimit: _20!, revokeTimeLimit: _21!, revokePmTimeLimit: _22!, ratingEDecay: _23!, stickersRecentLimit: _24!, stickersFavedLimit: _25!, channelsReadMediaPeriod: _26!, tmpSessions: _27, pinnedDialogsCountMax: _28!, pinnedInfolderCountMax: _29!, callReceiveTimeoutMs: _30!, callRingTimeoutMs: _31!, callConnectTimeoutMs: _32!, callPacketTimeoutMs: _33!, meUrlPrefix: _34!, autoupdateUrlPrefix: _35, gifSearchUsername: _36, venueSearchUsername: _37, imgSearchUsername: _38, staticMapsProvider: _39, captionLengthMax: _40!, messageLengthMax: _41!, webfileDcId: _42!, suggestedLangCode: _43, langPackVersion: _44, baseLangPackVersion: _45) } else { return nil @@ -810,35 +14105,49 @@ public struct stats { } } - public enum MessageStats: TypeConstructorDescription { - case messageStats(viewsGraph: Api.StatsGraph) + public enum TopPeerCategoryPeers: TypeConstructorDescription { + case topPeerCategoryPeers(category: Api.TopPeerCategory, count: Int32, peers: [Api.TopPeer]) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .messageStats(let viewsGraph): + case .topPeerCategoryPeers(let category, let count, let peers): if boxed { - buffer.appendInt32(-1986399595) + buffer.appendInt32(-75283823) + } + category.serialize(buffer, true) + serializeInt32(count, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(peers.count)) + for item in peers { + item.serialize(buffer, true) } - viewsGraph.serialize(buffer, true) break } } public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .messageStats(let viewsGraph): - return ("messageStats", [("viewsGraph", viewsGraph)]) + case .topPeerCategoryPeers(let category, let count, let peers): + return ("topPeerCategoryPeers", [("category", category), ("count", count), ("peers", peers)]) } } - public static func parse_messageStats(_ reader: BufferReader) -> MessageStats? { - var _1: Api.StatsGraph? + public static func parse_topPeerCategoryPeers(_ reader: BufferReader) -> TopPeerCategoryPeers? { + var _1: Api.TopPeerCategory? if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.StatsGraph + _1 = Api.parse(reader, signature: signature) as? Api.TopPeerCategory + } + var _2: Int32? + _2 = reader.readInt32() + var _3: [Api.TopPeer]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.TopPeer.self) } let _c1 = _1 != nil - if _c1 { - return Api.stats.MessageStats.messageStats(viewsGraph: _1!) + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.TopPeerCategoryPeers.topPeerCategoryPeers(category: _1!, count: _2!, peers: _3!) } else { return nil @@ -846,87 +14155,203 @@ public struct stats { } } -} -} -public extension Api { -public struct auth { - public enum LoginToken: TypeConstructorDescription { - case loginToken(expires: Int32, token: Buffer) - case loginTokenMigrateTo(dcId: Int32, token: Buffer) - case loginTokenSuccess(authorization: Api.auth.Authorization) + public enum Game: TypeConstructorDescription { + case game(flags: Int32, id: Int64, accessHash: Int64, shortName: String, title: String, description: String, photo: Api.Photo, document: Api.Document?) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .loginToken(let expires, let token): + case .game(let flags, let id, let accessHash, let shortName, let title, let description, let photo, let document): if boxed { - buffer.appendInt32(1654593920) + buffer.appendInt32(-1107729093) } - serializeInt32(expires, buffer: buffer, boxed: false) - serializeBytes(token, buffer: buffer, boxed: false) - break - case .loginTokenMigrateTo(let dcId, let token): - if boxed { - buffer.appendInt32(110008598) - } - serializeInt32(dcId, buffer: buffer, boxed: false) - serializeBytes(token, buffer: buffer, boxed: false) - break - case .loginTokenSuccess(let authorization): - if boxed { - buffer.appendInt32(957176926) - } - authorization.serialize(buffer, true) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeString(shortName, buffer: buffer, boxed: false) + serializeString(title, buffer: buffer, boxed: false) + serializeString(description, buffer: buffer, boxed: false) + photo.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {document!.serialize(buffer, true)} break } } public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .loginToken(let expires, let token): - return ("loginToken", [("expires", expires), ("token", token)]) - case .loginTokenMigrateTo(let dcId, let token): - return ("loginTokenMigrateTo", [("dcId", dcId), ("token", token)]) - case .loginTokenSuccess(let authorization): - return ("loginTokenSuccess", [("authorization", authorization)]) + case .game(let flags, let id, let accessHash, let shortName, let title, let description, let photo, let document): + return ("game", [("flags", flags), ("id", id), ("accessHash", accessHash), ("shortName", shortName), ("title", title), ("description", description), ("photo", photo), ("document", document)]) } } - public static func parse_loginToken(_ reader: BufferReader) -> LoginToken? { + public static func parse_game(_ reader: BufferReader) -> Game? { var _1: Int32? _1 = reader.readInt32() - var _2: Buffer? - _2 = parseBytes(reader) + var _2: Int64? + _2 = reader.readInt64() + var _3: Int64? + _3 = reader.readInt64() + var _4: String? + _4 = parseString(reader) + var _5: String? + _5 = parseString(reader) + var _6: String? + _6 = parseString(reader) + var _7: Api.Photo? + if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.Photo + } + var _8: Api.Document? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _8 = Api.parse(reader, signature: signature) as? Api.Document + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = (Int(_1!) & Int(1 << 0) == 0) || _8 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { + return Api.Game.game(flags: _1!, id: _2!, accessHash: _3!, shortName: _4!, title: _5!, description: _6!, photo: _7!, document: _8) + } + else { + return nil + } + } + + } + public enum ChatAdminRights: TypeConstructorDescription { + case chatAdminRights(flags: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .chatAdminRights(let flags): + if boxed { + buffer.appendInt32(1605510357) + } + serializeInt32(flags, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .chatAdminRights(let flags): + return ("chatAdminRights", [("flags", flags)]) + } + } + + public static func parse_chatAdminRights(_ reader: BufferReader) -> ChatAdminRights? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.ChatAdminRights.chatAdminRights(flags: _1!) + } + else { + return nil + } + } + + } + public enum SecurePasswordKdfAlgo: TypeConstructorDescription { + case securePasswordKdfAlgoUnknown + case securePasswordKdfAlgoPBKDF2HMACSHA512iter100000(salt: Buffer) + case securePasswordKdfAlgoSHA512(salt: Buffer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .securePasswordKdfAlgoUnknown: + if boxed { + buffer.appendInt32(4883767) + } + + break + case .securePasswordKdfAlgoPBKDF2HMACSHA512iter100000(let salt): + if boxed { + buffer.appendInt32(-1141711456) + } + serializeBytes(salt, buffer: buffer, boxed: false) + break + case .securePasswordKdfAlgoSHA512(let salt): + if boxed { + buffer.appendInt32(-2042159726) + } + serializeBytes(salt, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .securePasswordKdfAlgoUnknown: + return ("securePasswordKdfAlgoUnknown", []) + case .securePasswordKdfAlgoPBKDF2HMACSHA512iter100000(let salt): + return ("securePasswordKdfAlgoPBKDF2HMACSHA512iter100000", [("salt", salt)]) + case .securePasswordKdfAlgoSHA512(let salt): + return ("securePasswordKdfAlgoSHA512", [("salt", salt)]) + } + } + + public static func parse_securePasswordKdfAlgoUnknown(_ reader: BufferReader) -> SecurePasswordKdfAlgo? { + return Api.SecurePasswordKdfAlgo.securePasswordKdfAlgoUnknown + } + public static func parse_securePasswordKdfAlgoPBKDF2HMACSHA512iter100000(_ reader: BufferReader) -> SecurePasswordKdfAlgo? { + var _1: Buffer? + _1 = parseBytes(reader) + let _c1 = _1 != nil + if _c1 { + return Api.SecurePasswordKdfAlgo.securePasswordKdfAlgoPBKDF2HMACSHA512iter100000(salt: _1!) + } + else { + return nil + } + } + public static func parse_securePasswordKdfAlgoSHA512(_ reader: BufferReader) -> SecurePasswordKdfAlgo? { + var _1: Buffer? + _1 = parseBytes(reader) + let _c1 = _1 != nil + if _c1 { + return Api.SecurePasswordKdfAlgo.securePasswordKdfAlgoSHA512(salt: _1!) + } + else { + return nil + } + } + + } + public enum BotCommand: TypeConstructorDescription { + case botCommand(command: String, description: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .botCommand(let command, let description): + if boxed { + buffer.appendInt32(-1032140601) + } + serializeString(command, buffer: buffer, boxed: false) + serializeString(description, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .botCommand(let command, let description): + return ("botCommand", [("command", command), ("description", description)]) + } + } + + public static func parse_botCommand(_ reader: BufferReader) -> BotCommand? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) let _c1 = _1 != nil let _c2 = _2 != nil if _c1 && _c2 { - return Api.auth.LoginToken.loginToken(expires: _1!, token: _2!) - } - else { - return nil - } - } - public static func parse_loginTokenMigrateTo(_ reader: BufferReader) -> LoginToken? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Buffer? - _2 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.auth.LoginToken.loginTokenMigrateTo(dcId: _1!, token: _2!) - } - else { - return nil - } - } - public static func parse_loginTokenSuccess(_ reader: BufferReader) -> LoginToken? { - var _1: Api.auth.Authorization? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.auth.Authorization - } - let _c1 = _1 != nil - if _c1 { - return Api.auth.LoginToken.loginTokenSuccess(authorization: _1!) + return Api.BotCommand.botCommand(command: _1!, description: _2!) } else { return nil @@ -934,141 +14359,37 @@ public struct auth { } } - public enum Authorization: TypeConstructorDescription { - case authorization(flags: Int32, tmpSessions: Int32?, user: Api.User) - case authorizationSignUpRequired(flags: Int32, termsOfService: Api.help.TermsOfService?) + public enum ChatInviteImporter: TypeConstructorDescription { + case chatInviteImporter(userId: Int32, date: Int32) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .authorization(let flags, let tmpSessions, let user): + case .chatInviteImporter(let userId, let date): if boxed { - buffer.appendInt32(-855308010) + buffer.appendInt32(507405952) } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(tmpSessions!, buffer: buffer, boxed: false)} - user.serialize(buffer, true) - break - case .authorizationSignUpRequired(let flags, let termsOfService): - if boxed { - buffer.appendInt32(1148485274) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {termsOfService!.serialize(buffer, true)} + serializeInt32(userId, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) break } } public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .authorization(let flags, let tmpSessions, let user): - return ("authorization", [("flags", flags), ("tmpSessions", tmpSessions), ("user", user)]) - case .authorizationSignUpRequired(let flags, let termsOfService): - return ("authorizationSignUpRequired", [("flags", flags), ("termsOfService", termsOfService)]) + case .chatInviteImporter(let userId, let date): + return ("chatInviteImporter", [("userId", userId), ("date", date)]) } } - public static func parse_authorization(_ reader: BufferReader) -> Authorization? { + public static func parse_chatInviteImporter(_ reader: BufferReader) -> ChatInviteImporter? { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } - var _3: Api.User? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.User - } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.auth.Authorization.authorization(flags: _1!, tmpSessions: _2, user: _3!) - } - else { - return nil - } - } - public static func parse_authorizationSignUpRequired(_ reader: BufferReader) -> Authorization? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.help.TermsOfService? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.help.TermsOfService - } } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - if _c1 && _c2 { - return Api.auth.Authorization.authorizationSignUpRequired(flags: _1!, termsOfService: _2) - } - else { - return nil - } - } - - } - public enum PasswordRecovery: TypeConstructorDescription { - case passwordRecovery(emailPattern: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .passwordRecovery(let emailPattern): - if boxed { - buffer.appendInt32(326715557) - } - serializeString(emailPattern, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .passwordRecovery(let emailPattern): - return ("passwordRecovery", [("emailPattern", emailPattern)]) - } - } - - public static func parse_passwordRecovery(_ reader: BufferReader) -> PasswordRecovery? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.auth.PasswordRecovery.passwordRecovery(emailPattern: _1!) - } - else { - return nil - } - } - - } - public enum ExportedAuthorization: TypeConstructorDescription { - case exportedAuthorization(id: Int32, bytes: Buffer) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .exportedAuthorization(let id, let bytes): - if boxed { - buffer.appendInt32(-543777747) - } - serializeInt32(id, buffer: buffer, boxed: false) - serializeBytes(bytes, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .exportedAuthorization(let id, let bytes): - return ("exportedAuthorization", [("id", id), ("bytes", bytes)]) - } - } - - public static func parse_exportedAuthorization(_ reader: BufferReader) -> ExportedAuthorization? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Buffer? - _2 = parseBytes(reader) + _2 = reader.readInt32() let _c1 = _1 != nil let _c2 = _2 != nil if _c1 && _c2 { - return Api.auth.ExportedAuthorization.exportedAuthorization(id: _1!, bytes: _2!) + return Api.ChatInviteImporter.chatInviteImporter(userId: _1!, date: _2!) } else { return nil @@ -1076,677 +14397,1748 @@ public struct auth { } } - public enum SentCode: TypeConstructorDescription { - case sentCode(flags: Int32, type: Api.auth.SentCodeType, phoneCodeHash: String, nextType: Api.auth.CodeType?, timeout: Int32?) + public enum CdnPublicKey: TypeConstructorDescription { + case cdnPublicKey(dcId: Int32, publicKey: String) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .sentCode(let flags, let type, let phoneCodeHash, let nextType, let timeout): + case .cdnPublicKey(let dcId, let publicKey): if boxed { - buffer.appendInt32(1577067778) + buffer.appendInt32(-914167110) } - serializeInt32(flags, buffer: buffer, boxed: false) - type.serialize(buffer, true) - serializeString(phoneCodeHash, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {nextType!.serialize(buffer, true)} - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(timeout!, buffer: buffer, boxed: false)} + serializeInt32(dcId, buffer: buffer, boxed: false) + serializeString(publicKey, buffer: buffer, boxed: false) break } } public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .sentCode(let flags, let type, let phoneCodeHash, let nextType, let timeout): - return ("sentCode", [("flags", flags), ("type", type), ("phoneCodeHash", phoneCodeHash), ("nextType", nextType), ("timeout", timeout)]) + case .cdnPublicKey(let dcId, let publicKey): + return ("cdnPublicKey", [("dcId", dcId), ("publicKey", publicKey)]) } } - public static func parse_sentCode(_ reader: BufferReader) -> SentCode? { + public static func parse_cdnPublicKey(_ reader: BufferReader) -> CdnPublicKey? { var _1: Int32? _1 = reader.readInt32() - var _2: Api.auth.SentCodeType? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.auth.SentCodeType + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.CdnPublicKey.cdnPublicKey(dcId: _1!, publicKey: _2!) } - var _3: String? - _3 = parseString(reader) - var _4: Api.auth.CodeType? - if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { - _4 = Api.parse(reader, signature: signature) as? Api.auth.CodeType + else { + return nil + } + } + + } + public enum MessageReplies: TypeConstructorDescription { + case messageReplies(flags: Int32, replies: Int32, repliesPts: Int32, recentRepliers: [Api.Peer]?, channelId: Int32?, maxId: Int32?, readMaxId: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .messageReplies(let flags, let replies, let repliesPts, let recentRepliers, let channelId, let maxId, let readMaxId): + if boxed { + buffer.appendInt32(1093204652) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(replies, buffer: buffer, boxed: false) + serializeInt32(repliesPts, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(recentRepliers!.count)) + for item in recentRepliers! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(channelId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(maxId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeInt32(readMaxId!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .messageReplies(let flags, let replies, let repliesPts, let recentRepliers, let channelId, let maxId, let readMaxId): + return ("messageReplies", [("flags", flags), ("replies", replies), ("repliesPts", repliesPts), ("recentRepliers", recentRepliers), ("channelId", channelId), ("maxId", maxId), ("readMaxId", readMaxId)]) + } + } + + public static func parse_messageReplies(_ reader: BufferReader) -> MessageReplies? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: [Api.Peer]? + if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Peer.self) } } var _5: Int32? - if Int(_1!) & Int(1 << 2) != 0 {_5 = reader.readInt32() } + if Int(_1!) & Int(1 << 0) != 0 {_5 = reader.readInt32() } + var _6: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_6 = reader.readInt32() } + var _7: Int32? + if Int(_1!) & Int(1 << 3) != 0 {_7 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.MessageReplies.messageReplies(flags: _1!, replies: _2!, repliesPts: _3!, recentRepliers: _4, channelId: _5, maxId: _6, readMaxId: _7) + } + else { + return nil + } + } + + } + public enum InputGame: TypeConstructorDescription { + case inputGameID(id: Int64, accessHash: Int64) + case inputGameShortName(botId: Api.InputUser, shortName: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputGameID(let id, let accessHash): + if boxed { + buffer.appendInt32(53231223) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + break + case .inputGameShortName(let botId, let shortName): + if boxed { + buffer.appendInt32(-1020139510) + } + botId.serialize(buffer, true) + serializeString(shortName, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputGameID(let id, let accessHash): + return ("inputGameID", [("id", id), ("accessHash", accessHash)]) + case .inputGameShortName(let botId, let shortName): + return ("inputGameShortName", [("botId", botId), ("shortName", shortName)]) + } + } + + public static func parse_inputGameID(_ reader: BufferReader) -> InputGame? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputGame.inputGameID(id: _1!, accessHash: _2!) + } + else { + return nil + } + } + public static func parse_inputGameShortName(_ reader: BufferReader) -> InputGame? { + var _1: Api.InputUser? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputUser + } + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputGame.inputGameShortName(botId: _1!, shortName: _2!) + } + else { + return nil + } + } + + } + public enum InputMessage: TypeConstructorDescription { + case inputMessageID(id: Int32) + case inputMessageReplyTo(id: Int32) + case inputMessagePinned + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputMessageID(let id): + if boxed { + buffer.appendInt32(-1502174430) + } + serializeInt32(id, buffer: buffer, boxed: false) + break + case .inputMessageReplyTo(let id): + if boxed { + buffer.appendInt32(-1160215659) + } + serializeInt32(id, buffer: buffer, boxed: false) + break + case .inputMessagePinned: + if boxed { + buffer.appendInt32(-2037963464) + } + + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputMessageID(let id): + return ("inputMessageID", [("id", id)]) + case .inputMessageReplyTo(let id): + return ("inputMessageReplyTo", [("id", id)]) + case .inputMessagePinned: + return ("inputMessagePinned", []) + } + } + + public static func parse_inputMessageID(_ reader: BufferReader) -> InputMessage? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.InputMessage.inputMessageID(id: _1!) + } + else { + return nil + } + } + public static func parse_inputMessageReplyTo(_ reader: BufferReader) -> InputMessage? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.InputMessage.inputMessageReplyTo(id: _1!) + } + else { + return nil + } + } + public static func parse_inputMessagePinned(_ reader: BufferReader) -> InputMessage? { + return Api.InputMessage.inputMessagePinned + } + + } + public enum PhoneCallProtocol: TypeConstructorDescription { + case phoneCallProtocol(flags: Int32, minLayer: Int32, maxLayer: Int32, libraryVersions: [String]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .phoneCallProtocol(let flags, let minLayer, let maxLayer, let libraryVersions): + if boxed { + buffer.appendInt32(-58224696) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(minLayer, buffer: buffer, boxed: false) + serializeInt32(maxLayer, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(libraryVersions.count)) + for item in libraryVersions { + serializeString(item, buffer: buffer, boxed: false) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .phoneCallProtocol(let flags, let minLayer, let maxLayer, let libraryVersions): + return ("phoneCallProtocol", [("flags", flags), ("minLayer", minLayer), ("maxLayer", maxLayer), ("libraryVersions", libraryVersions)]) + } + } + + public static func parse_phoneCallProtocol(_ reader: BufferReader) -> PhoneCallProtocol? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: [String]? + if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.PhoneCallProtocol.phoneCallProtocol(flags: _1!, minLayer: _2!, maxLayer: _3!, libraryVersions: _4!) + } + else { + return nil + } + } + + } + public enum StatsDateRangeDays: TypeConstructorDescription { + case statsDateRangeDays(minDate: Int32, maxDate: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .statsDateRangeDays(let minDate, let maxDate): + if boxed { + buffer.appendInt32(-1237848657) + } + serializeInt32(minDate, buffer: buffer, boxed: false) + serializeInt32(maxDate, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .statsDateRangeDays(let minDate, let maxDate): + return ("statsDateRangeDays", [("minDate", minDate), ("maxDate", maxDate)]) + } + } + + public static func parse_statsDateRangeDays(_ reader: BufferReader) -> StatsDateRangeDays? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.StatsDateRangeDays.statsDateRangeDays(minDate: _1!, maxDate: _2!) + } + else { + return nil + } + } + + } + public enum MessageFwdAuthor: TypeConstructorDescription { + case messageFwdAuthor(channelId: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .messageFwdAuthor(let channelId): + if boxed { + buffer.appendInt32(-1567175714) + } + serializeInt32(channelId, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .messageFwdAuthor(let channelId): + return ("messageFwdAuthor", [("channelId", channelId)]) + } + } + + public static func parse_messageFwdAuthor(_ reader: BufferReader) -> MessageFwdAuthor? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.MessageFwdAuthor.messageFwdAuthor(channelId: _1!) + } + else { + return nil + } + } + + } + public enum WallPaper: TypeConstructorDescription { + case wallPaper(id: Int64, flags: Int32, accessHash: Int64, slug: String, document: Api.Document, settings: Api.WallPaperSettings?) + case wallPaperNoFile(flags: Int32, settings: Api.WallPaperSettings?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .wallPaper(let id, let flags, let accessHash, let slug, let document, let settings): + if boxed { + buffer.appendInt32(-1539849235) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeString(slug, buffer: buffer, boxed: false) + document.serialize(buffer, true) + if Int(flags) & Int(1 << 2) != 0 {settings!.serialize(buffer, true)} + break + case .wallPaperNoFile(let flags, let settings): + if boxed { + buffer.appendInt32(-1963717851) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 2) != 0 {settings!.serialize(buffer, true)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .wallPaper(let id, let flags, let accessHash, let slug, let document, let settings): + return ("wallPaper", [("id", id), ("flags", flags), ("accessHash", accessHash), ("slug", slug), ("document", document), ("settings", settings)]) + case .wallPaperNoFile(let flags, let settings): + return ("wallPaperNoFile", [("flags", flags), ("settings", settings)]) + } + } + + public static func parse_wallPaper(_ reader: BufferReader) -> WallPaper? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int64? + _3 = reader.readInt64() + var _4: String? + _4 = parseString(reader) + var _5: Api.Document? + if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.Document + } + var _6: Api.WallPaperSettings? + if Int(_2!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.WallPaperSettings + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = (Int(_2!) & Int(1 << 2) == 0) || _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.WallPaper.wallPaper(id: _1!, flags: _2!, accessHash: _3!, slug: _4!, document: _5!, settings: _6) + } + else { + return nil + } + } + public static func parse_wallPaperNoFile(_ reader: BufferReader) -> WallPaper? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.WallPaperSettings? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.WallPaperSettings + } } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 2) == 0) || _2 != nil + if _c1 && _c2 { + return Api.WallPaper.wallPaperNoFile(flags: _1!, settings: _2) + } + else { + return nil + } + } + + } + public enum Invoice: TypeConstructorDescription { + case invoice(flags: Int32, currency: String, prices: [Api.LabeledPrice]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .invoice(let flags, let currency, let prices): + if boxed { + buffer.appendInt32(-1022713000) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(currency, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(prices.count)) + for item in prices { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .invoice(let flags, let currency, let prices): + return ("invoice", [("flags", flags), ("currency", currency), ("prices", prices)]) + } + } + + public static func parse_invoice(_ reader: BufferReader) -> Invoice? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: [Api.LabeledPrice]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.LabeledPrice.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.Invoice.invoice(flags: _1!, currency: _2!, prices: _3!) + } + else { + return nil + } + } + + } + public enum PeerSettings: TypeConstructorDescription { + case peerSettings(flags: Int32, geoDistance: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .peerSettings(let flags, let geoDistance): + if boxed { + buffer.appendInt32(1933519201) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 6) != 0 {serializeInt32(geoDistance!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .peerSettings(let flags, let geoDistance): + return ("peerSettings", [("flags", flags), ("geoDistance", geoDistance)]) + } + } + + public static func parse_peerSettings(_ reader: BufferReader) -> PeerSettings? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + if Int(_1!) & Int(1 << 6) != 0 {_2 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 6) == 0) || _2 != nil + if _c1 && _c2 { + return Api.PeerSettings.peerSettings(flags: _1!, geoDistance: _2) + } + else { + return nil + } + } + + } + public enum InputChatPhoto: TypeConstructorDescription { + case inputChatPhotoEmpty + case inputChatPhoto(id: Api.InputPhoto) + case inputChatUploadedPhoto(flags: Int32, file: Api.InputFile?, video: Api.InputFile?, videoStartTs: Double?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputChatPhotoEmpty: + if boxed { + buffer.appendInt32(480546647) + } + + break + case .inputChatPhoto(let id): + if boxed { + buffer.appendInt32(-1991004873) + } + id.serialize(buffer, true) + break + case .inputChatUploadedPhoto(let flags, let file, let video, let videoStartTs): + if boxed { + buffer.appendInt32(-968723890) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {file!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {video!.serialize(buffer, true)} + if Int(flags) & Int(1 << 2) != 0 {serializeDouble(videoStartTs!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputChatPhotoEmpty: + return ("inputChatPhotoEmpty", []) + case .inputChatPhoto(let id): + return ("inputChatPhoto", [("id", id)]) + case .inputChatUploadedPhoto(let flags, let file, let video, let videoStartTs): + return ("inputChatUploadedPhoto", [("flags", flags), ("file", file), ("video", video), ("videoStartTs", videoStartTs)]) + } + } + + public static func parse_inputChatPhotoEmpty(_ reader: BufferReader) -> InputChatPhoto? { + return Api.InputChatPhoto.inputChatPhotoEmpty + } + public static func parse_inputChatPhoto(_ reader: BufferReader) -> InputChatPhoto? { + var _1: Api.InputPhoto? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputPhoto + } + let _c1 = _1 != nil + if _c1 { + return Api.InputChatPhoto.inputChatPhoto(id: _1!) + } + else { + return nil + } + } + public static func parse_inputChatUploadedPhoto(_ reader: BufferReader) -> InputChatPhoto? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.InputFile? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.InputFile + } } + var _3: Api.InputFile? + if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.InputFile + } } + var _4: Double? + if Int(_1!) & Int(1 << 2) != 0 {_4 = reader.readDouble() } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputChatPhoto.inputChatUploadedPhoto(flags: _1!, file: _2, video: _3, videoStartTs: _4) + } + else { + return nil + } + } + + } + public enum PaymentCharge: TypeConstructorDescription { + case paymentCharge(id: String, providerChargeId: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .paymentCharge(let id, let providerChargeId): + if boxed { + buffer.appendInt32(-368917890) + } + serializeString(id, buffer: buffer, boxed: false) + serializeString(providerChargeId, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .paymentCharge(let id, let providerChargeId): + return ("paymentCharge", [("id", id), ("providerChargeId", providerChargeId)]) + } + } + + public static func parse_paymentCharge(_ reader: BufferReader) -> PaymentCharge? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.PaymentCharge.paymentCharge(id: _1!, providerChargeId: _2!) + } + else { + return nil + } + } + + } + public enum MessageInteractionCounters: TypeConstructorDescription { + case messageInteractionCounters(msgId: Int32, views: Int32, forwards: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .messageInteractionCounters(let msgId, let views, let forwards): + if boxed { + buffer.appendInt32(-1387279939) + } + serializeInt32(msgId, buffer: buffer, boxed: false) + serializeInt32(views, buffer: buffer, boxed: false) + serializeInt32(forwards, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .messageInteractionCounters(let msgId, let views, let forwards): + return ("messageInteractionCounters", [("msgId", msgId), ("views", views), ("forwards", forwards)]) + } + } + + public static func parse_messageInteractionCounters(_ reader: BufferReader) -> MessageInteractionCounters? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.MessageInteractionCounters.messageInteractionCounters(msgId: _1!, views: _2!, forwards: _3!) + } + else { + return nil + } + } + + } + public enum Updates: TypeConstructorDescription { + case updatesTooLong + case updateShort(update: Api.Update, date: Int32) + case updatesCombined(updates: [Api.Update], users: [Api.User], chats: [Api.Chat], date: Int32, seqStart: Int32, seq: Int32) + case updates(updates: [Api.Update], users: [Api.User], chats: [Api.Chat], date: Int32, seq: Int32) + case updateShortMessage(flags: Int32, id: Int32, userId: Int32, message: String, pts: Int32, ptsCount: Int32, date: Int32, fwdFrom: Api.MessageFwdHeader?, viaBotId: Int32?, replyTo: Api.MessageReplyHeader?, entities: [Api.MessageEntity]?, ttlPeriod: Int32?) + case updateShortChatMessage(flags: Int32, id: Int32, fromId: Int32, chatId: Int32, message: String, pts: Int32, ptsCount: Int32, date: Int32, fwdFrom: Api.MessageFwdHeader?, viaBotId: Int32?, replyTo: Api.MessageReplyHeader?, entities: [Api.MessageEntity]?, ttlPeriod: Int32?) + case updateShortSentMessage(flags: Int32, id: Int32, pts: Int32, ptsCount: Int32, date: Int32, media: Api.MessageMedia?, entities: [Api.MessageEntity]?, ttlPeriod: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .updatesTooLong: + if boxed { + buffer.appendInt32(-484987010) + } + + break + case .updateShort(let update, let date): + if boxed { + buffer.appendInt32(2027216577) + } + update.serialize(buffer, true) + serializeInt32(date, buffer: buffer, boxed: false) + break + case .updatesCombined(let updates, let users, let chats, let date, let seqStart, let seq): + if boxed { + buffer.appendInt32(1918567619) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(updates.count)) + for item in updates { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(chats.count)) + for item in chats { + item.serialize(buffer, true) + } + serializeInt32(date, buffer: buffer, boxed: false) + serializeInt32(seqStart, buffer: buffer, boxed: false) + serializeInt32(seq, buffer: buffer, boxed: false) + break + case .updates(let updates, let users, let chats, let date, let seq): + if boxed { + buffer.appendInt32(1957577280) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(updates.count)) + for item in updates { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(chats.count)) + for item in chats { + item.serialize(buffer, true) + } + serializeInt32(date, buffer: buffer, boxed: false) + serializeInt32(seq, buffer: buffer, boxed: false) + break + case .updateShortMessage(let flags, let id, let userId, let message, let pts, let ptsCount, let date, let fwdFrom, let viaBotId, let replyTo, let entities, let ttlPeriod): + if boxed { + buffer.appendInt32(-84936653) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + serializeString(message, buffer: buffer, boxed: false) + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(ptsCount, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 2) != 0 {fwdFrom!.serialize(buffer, true)} + if Int(flags) & Int(1 << 11) != 0 {serializeInt32(viaBotId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {replyTo!.serialize(buffer, true)} + if Int(flags) & Int(1 << 7) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities!.count)) + for item in entities! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 25) != 0 {serializeInt32(ttlPeriod!, buffer: buffer, boxed: false)} + break + case .updateShortChatMessage(let flags, let id, let fromId, let chatId, let message, let pts, let ptsCount, let date, let fwdFrom, let viaBotId, let replyTo, let entities, let ttlPeriod): + if boxed { + buffer.appendInt32(290961496) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + serializeInt32(fromId, buffer: buffer, boxed: false) + serializeInt32(chatId, buffer: buffer, boxed: false) + serializeString(message, buffer: buffer, boxed: false) + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(ptsCount, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 2) != 0 {fwdFrom!.serialize(buffer, true)} + if Int(flags) & Int(1 << 11) != 0 {serializeInt32(viaBotId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {replyTo!.serialize(buffer, true)} + if Int(flags) & Int(1 << 7) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities!.count)) + for item in entities! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 25) != 0 {serializeInt32(ttlPeriod!, buffer: buffer, boxed: false)} + break + case .updateShortSentMessage(let flags, let id, let pts, let ptsCount, let date, let media, let entities, let ttlPeriod): + if boxed { + buffer.appendInt32(-1877614335) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(ptsCount, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 9) != 0 {media!.serialize(buffer, true)} + if Int(flags) & Int(1 << 7) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities!.count)) + for item in entities! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 25) != 0 {serializeInt32(ttlPeriod!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .updatesTooLong: + return ("updatesTooLong", []) + case .updateShort(let update, let date): + return ("updateShort", [("update", update), ("date", date)]) + case .updatesCombined(let updates, let users, let chats, let date, let seqStart, let seq): + return ("updatesCombined", [("updates", updates), ("users", users), ("chats", chats), ("date", date), ("seqStart", seqStart), ("seq", seq)]) + case .updates(let updates, let users, let chats, let date, let seq): + return ("updates", [("updates", updates), ("users", users), ("chats", chats), ("date", date), ("seq", seq)]) + case .updateShortMessage(let flags, let id, let userId, let message, let pts, let ptsCount, let date, let fwdFrom, let viaBotId, let replyTo, let entities, let ttlPeriod): + return ("updateShortMessage", [("flags", flags), ("id", id), ("userId", userId), ("message", message), ("pts", pts), ("ptsCount", ptsCount), ("date", date), ("fwdFrom", fwdFrom), ("viaBotId", viaBotId), ("replyTo", replyTo), ("entities", entities), ("ttlPeriod", ttlPeriod)]) + case .updateShortChatMessage(let flags, let id, let fromId, let chatId, let message, let pts, let ptsCount, let date, let fwdFrom, let viaBotId, let replyTo, let entities, let ttlPeriod): + return ("updateShortChatMessage", [("flags", flags), ("id", id), ("fromId", fromId), ("chatId", chatId), ("message", message), ("pts", pts), ("ptsCount", ptsCount), ("date", date), ("fwdFrom", fwdFrom), ("viaBotId", viaBotId), ("replyTo", replyTo), ("entities", entities), ("ttlPeriod", ttlPeriod)]) + case .updateShortSentMessage(let flags, let id, let pts, let ptsCount, let date, let media, let entities, let ttlPeriod): + return ("updateShortSentMessage", [("flags", flags), ("id", id), ("pts", pts), ("ptsCount", ptsCount), ("date", date), ("media", media), ("entities", entities), ("ttlPeriod", ttlPeriod)]) + } + } + + public static func parse_updatesTooLong(_ reader: BufferReader) -> Updates? { + return Api.Updates.updatesTooLong + } + public static func parse_updateShort(_ reader: BufferReader) -> Updates? { + var _1: Api.Update? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Update + } + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.Updates.updateShort(update: _1!, date: _2!) + } + else { + return nil + } + } + public static func parse_updatesCombined(_ reader: BufferReader) -> Updates? { + var _1: [Api.Update]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Update.self) + } + var _2: [Api.User]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + var _3: [Api.Chat]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) + } + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + var _6: Int32? + _6 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.Updates.updatesCombined(updates: _1!, users: _2!, chats: _3!, date: _4!, seqStart: _5!, seq: _6!) + } + else { + return nil + } + } + public static func parse_updates(_ reader: BufferReader) -> Updates? { + var _1: [Api.Update]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Update.self) + } + var _2: [Api.User]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + var _3: [Api.Chat]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) + } + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.Updates.updates(updates: _1!, users: _2!, chats: _3!, date: _4!, seq: _5!) + } + else { + return nil + } + } + public static func parse_updateShortMessage(_ reader: BufferReader) -> Updates? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: String? + _4 = parseString(reader) + var _5: Int32? + _5 = reader.readInt32() + var _6: Int32? + _6 = reader.readInt32() + var _7: Int32? + _7 = reader.readInt32() + var _8: Api.MessageFwdHeader? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _8 = Api.parse(reader, signature: signature) as? Api.MessageFwdHeader + } } + var _9: Int32? + if Int(_1!) & Int(1 << 11) != 0 {_9 = reader.readInt32() } + var _10: Api.MessageReplyHeader? + if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { + _10 = Api.parse(reader, signature: signature) as? Api.MessageReplyHeader + } } + var _11: [Api.MessageEntity]? + if Int(_1!) & Int(1 << 7) != 0 {if let _ = reader.readInt32() { + _11 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) + } } + var _12: Int32? + if Int(_1!) & Int(1 << 25) != 0 {_12 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil + let _c9 = (Int(_1!) & Int(1 << 11) == 0) || _9 != nil + let _c10 = (Int(_1!) & Int(1 << 3) == 0) || _10 != nil + let _c11 = (Int(_1!) & Int(1 << 7) == 0) || _11 != nil + let _c12 = (Int(_1!) & Int(1 << 25) == 0) || _12 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 { + return Api.Updates.updateShortMessage(flags: _1!, id: _2!, userId: _3!, message: _4!, pts: _5!, ptsCount: _6!, date: _7!, fwdFrom: _8, viaBotId: _9, replyTo: _10, entities: _11, ttlPeriod: _12) + } + else { + return nil + } + } + public static func parse_updateShortChatMessage(_ reader: BufferReader) -> Updates? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: String? + _5 = parseString(reader) + var _6: Int32? + _6 = reader.readInt32() + var _7: Int32? + _7 = reader.readInt32() + var _8: Int32? + _8 = reader.readInt32() + var _9: Api.MessageFwdHeader? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _9 = Api.parse(reader, signature: signature) as? Api.MessageFwdHeader + } } + var _10: Int32? + if Int(_1!) & Int(1 << 11) != 0 {_10 = reader.readInt32() } + var _11: Api.MessageReplyHeader? + if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { + _11 = Api.parse(reader, signature: signature) as? Api.MessageReplyHeader + } } + var _12: [Api.MessageEntity]? + if Int(_1!) & Int(1 << 7) != 0 {if let _ = reader.readInt32() { + _12 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) + } } + var _13: Int32? + if Int(_1!) & Int(1 << 25) != 0 {_13 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = _8 != nil + let _c9 = (Int(_1!) & Int(1 << 2) == 0) || _9 != nil + let _c10 = (Int(_1!) & Int(1 << 11) == 0) || _10 != nil + let _c11 = (Int(_1!) & Int(1 << 3) == 0) || _11 != nil + let _c12 = (Int(_1!) & Int(1 << 7) == 0) || _12 != nil + let _c13 = (Int(_1!) & Int(1 << 25) == 0) || _13 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 { + return Api.Updates.updateShortChatMessage(flags: _1!, id: _2!, fromId: _3!, chatId: _4!, message: _5!, pts: _6!, ptsCount: _7!, date: _8!, fwdFrom: _9, viaBotId: _10, replyTo: _11, entities: _12, ttlPeriod: _13) + } + else { + return nil + } + } + public static func parse_updateShortSentMessage(_ reader: BufferReader) -> Updates? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + var _6: Api.MessageMedia? + if Int(_1!) & Int(1 << 9) != 0 {if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.MessageMedia + } } + var _7: [Api.MessageEntity]? + if Int(_1!) & Int(1 << 7) != 0 {if let _ = reader.readInt32() { + _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) + } } + var _8: Int32? + if Int(_1!) & Int(1 << 25) != 0 {_8 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = (Int(_1!) & Int(1 << 9) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 7) == 0) || _7 != nil + let _c8 = (Int(_1!) & Int(1 << 25) == 0) || _8 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { + return Api.Updates.updateShortSentMessage(flags: _1!, id: _2!, pts: _3!, ptsCount: _4!, date: _5!, media: _6, entities: _7, ttlPeriod: _8) + } + else { + return nil + } + } + + } + public enum StatsAbsValueAndPrev: TypeConstructorDescription { + case statsAbsValueAndPrev(current: Double, previous: Double) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .statsAbsValueAndPrev(let current, let previous): + if boxed { + buffer.appendInt32(-884757282) + } + serializeDouble(current, buffer: buffer, boxed: false) + serializeDouble(previous, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .statsAbsValueAndPrev(let current, let previous): + return ("statsAbsValueAndPrev", [("current", current), ("previous", previous)]) + } + } + + public static func parse_statsAbsValueAndPrev(_ reader: BufferReader) -> StatsAbsValueAndPrev? { + var _1: Double? + _1 = reader.readDouble() + var _2: Double? + _2 = reader.readDouble() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.StatsAbsValueAndPrev.statsAbsValueAndPrev(current: _1!, previous: _2!) + } + else { + return nil + } + } + + } + public enum MessageMedia: TypeConstructorDescription { + case messageMediaEmpty + case messageMediaGeo(geo: Api.GeoPoint) + case messageMediaUnsupported + case messageMediaWebPage(webpage: Api.WebPage) + case messageMediaGame(game: Api.Game) + case messageMediaInvoice(flags: Int32, title: String, description: String, photo: Api.WebDocument?, receiptMsgId: Int32?, currency: String, totalAmount: Int64, startParam: String) + case messageMediaVenue(geo: Api.GeoPoint, title: String, address: String, provider: String, venueId: String, venueType: String) + case messageMediaPhoto(flags: Int32, photo: Api.Photo?, ttlSeconds: Int32?) + case messageMediaDocument(flags: Int32, document: Api.Document?, ttlSeconds: Int32?) + case messageMediaContact(phoneNumber: String, firstName: String, lastName: String, vcard: String, userId: Int32) + case messageMediaPoll(poll: Api.Poll, results: Api.PollResults) + case messageMediaDice(value: Int32, emoticon: String) + case messageMediaGeoLive(flags: Int32, geo: Api.GeoPoint, heading: Int32?, period: Int32, proximityNotificationRadius: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .messageMediaEmpty: + if boxed { + buffer.appendInt32(1038967584) + } + + break + case .messageMediaGeo(let geo): + if boxed { + buffer.appendInt32(1457575028) + } + geo.serialize(buffer, true) + break + case .messageMediaUnsupported: + if boxed { + buffer.appendInt32(-1618676578) + } + + break + case .messageMediaWebPage(let webpage): + if boxed { + buffer.appendInt32(-1557277184) + } + webpage.serialize(buffer, true) + break + case .messageMediaGame(let game): + if boxed { + buffer.appendInt32(-38694904) + } + game.serialize(buffer, true) + break + case .messageMediaInvoice(let flags, let title, let description, let photo, let receiptMsgId, let currency, let totalAmount, let startParam): + if boxed { + buffer.appendInt32(-2074799289) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(title, buffer: buffer, boxed: false) + serializeString(description, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {photo!.serialize(buffer, true)} + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(receiptMsgId!, buffer: buffer, boxed: false)} + serializeString(currency, buffer: buffer, boxed: false) + serializeInt64(totalAmount, buffer: buffer, boxed: false) + serializeString(startParam, buffer: buffer, boxed: false) + break + case .messageMediaVenue(let geo, let title, let address, let provider, let venueId, let venueType): + if boxed { + buffer.appendInt32(784356159) + } + geo.serialize(buffer, true) + serializeString(title, buffer: buffer, boxed: false) + serializeString(address, buffer: buffer, boxed: false) + serializeString(provider, buffer: buffer, boxed: false) + serializeString(venueId, buffer: buffer, boxed: false) + serializeString(venueType, buffer: buffer, boxed: false) + break + case .messageMediaPhoto(let flags, let photo, let ttlSeconds): + if boxed { + buffer.appendInt32(1766936791) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {photo!.serialize(buffer, true)} + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} + break + case .messageMediaDocument(let flags, let document, let ttlSeconds): + if boxed { + buffer.appendInt32(-1666158377) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {document!.serialize(buffer, true)} + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(ttlSeconds!, buffer: buffer, boxed: false)} + break + case .messageMediaContact(let phoneNumber, let firstName, let lastName, let vcard, let userId): + if boxed { + buffer.appendInt32(-873313984) + } + serializeString(phoneNumber, buffer: buffer, boxed: false) + serializeString(firstName, buffer: buffer, boxed: false) + serializeString(lastName, buffer: buffer, boxed: false) + serializeString(vcard, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + break + case .messageMediaPoll(let poll, let results): + if boxed { + buffer.appendInt32(1272375192) + } + poll.serialize(buffer, true) + results.serialize(buffer, true) + break + case .messageMediaDice(let value, let emoticon): + if boxed { + buffer.appendInt32(1065280907) + } + serializeInt32(value, buffer: buffer, boxed: false) + serializeString(emoticon, buffer: buffer, boxed: false) + break + case .messageMediaGeoLive(let flags, let geo, let heading, let period, let proximityNotificationRadius): + if boxed { + buffer.appendInt32(-1186937242) + } + serializeInt32(flags, buffer: buffer, boxed: false) + geo.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(heading!, buffer: buffer, boxed: false)} + serializeInt32(period, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(proximityNotificationRadius!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .messageMediaEmpty: + return ("messageMediaEmpty", []) + case .messageMediaGeo(let geo): + return ("messageMediaGeo", [("geo", geo)]) + case .messageMediaUnsupported: + return ("messageMediaUnsupported", []) + case .messageMediaWebPage(let webpage): + return ("messageMediaWebPage", [("webpage", webpage)]) + case .messageMediaGame(let game): + return ("messageMediaGame", [("game", game)]) + case .messageMediaInvoice(let flags, let title, let description, let photo, let receiptMsgId, let currency, let totalAmount, let startParam): + return ("messageMediaInvoice", [("flags", flags), ("title", title), ("description", description), ("photo", photo), ("receiptMsgId", receiptMsgId), ("currency", currency), ("totalAmount", totalAmount), ("startParam", startParam)]) + case .messageMediaVenue(let geo, let title, let address, let provider, let venueId, let venueType): + return ("messageMediaVenue", [("geo", geo), ("title", title), ("address", address), ("provider", provider), ("venueId", venueId), ("venueType", venueType)]) + case .messageMediaPhoto(let flags, let photo, let ttlSeconds): + return ("messageMediaPhoto", [("flags", flags), ("photo", photo), ("ttlSeconds", ttlSeconds)]) + case .messageMediaDocument(let flags, let document, let ttlSeconds): + return ("messageMediaDocument", [("flags", flags), ("document", document), ("ttlSeconds", ttlSeconds)]) + case .messageMediaContact(let phoneNumber, let firstName, let lastName, let vcard, let userId): + return ("messageMediaContact", [("phoneNumber", phoneNumber), ("firstName", firstName), ("lastName", lastName), ("vcard", vcard), ("userId", userId)]) + case .messageMediaPoll(let poll, let results): + return ("messageMediaPoll", [("poll", poll), ("results", results)]) + case .messageMediaDice(let value, let emoticon): + return ("messageMediaDice", [("value", value), ("emoticon", emoticon)]) + case .messageMediaGeoLive(let flags, let geo, let heading, let period, let proximityNotificationRadius): + return ("messageMediaGeoLive", [("flags", flags), ("geo", geo), ("heading", heading), ("period", period), ("proximityNotificationRadius", proximityNotificationRadius)]) + } + } + + public static func parse_messageMediaEmpty(_ reader: BufferReader) -> MessageMedia? { + return Api.MessageMedia.messageMediaEmpty + } + public static func parse_messageMediaGeo(_ reader: BufferReader) -> MessageMedia? { + var _1: Api.GeoPoint? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.GeoPoint + } + let _c1 = _1 != nil + if _c1 { + return Api.MessageMedia.messageMediaGeo(geo: _1!) + } + else { + return nil + } + } + public static func parse_messageMediaUnsupported(_ reader: BufferReader) -> MessageMedia? { + return Api.MessageMedia.messageMediaUnsupported + } + public static func parse_messageMediaWebPage(_ reader: BufferReader) -> MessageMedia? { + var _1: Api.WebPage? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.WebPage + } + let _c1 = _1 != nil + if _c1 { + return Api.MessageMedia.messageMediaWebPage(webpage: _1!) + } + else { + return nil + } + } + public static func parse_messageMediaGame(_ reader: BufferReader) -> MessageMedia? { + var _1: Api.Game? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Game + } + let _c1 = _1 != nil + if _c1 { + return Api.MessageMedia.messageMediaGame(game: _1!) + } + else { + return nil + } + } + public static func parse_messageMediaInvoice(_ reader: BufferReader) -> MessageMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: Api.WebDocument? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.WebDocument + } } + var _5: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_5 = reader.readInt32() } + var _6: String? + _6 = parseString(reader) + var _7: Int64? + _7 = reader.readInt64() + var _8: String? + _8 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = _8 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { + return Api.MessageMedia.messageMediaInvoice(flags: _1!, title: _2!, description: _3!, photo: _4, receiptMsgId: _5, currency: _6!, totalAmount: _7!, startParam: _8!) + } + else { + return nil + } + } + public static func parse_messageMediaVenue(_ reader: BufferReader) -> MessageMedia? { + var _1: Api.GeoPoint? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.GeoPoint + } + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + var _5: String? + _5 = parseString(reader) + var _6: String? + _6 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.MessageMedia.messageMediaVenue(geo: _1!, title: _2!, address: _3!, provider: _4!, venueId: _5!, venueType: _6!) + } + else { + return nil + } + } + public static func parse_messageMediaPhoto(_ reader: BufferReader) -> MessageMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.Photo? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Photo + } } + var _3: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_3 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.MessageMedia.messageMediaPhoto(flags: _1!, photo: _2, ttlSeconds: _3) + } + else { + return nil + } + } + public static func parse_messageMediaDocument(_ reader: BufferReader) -> MessageMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.Document? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Document + } } + var _3: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_3 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.MessageMedia.messageMediaDocument(flags: _1!, document: _2, ttlSeconds: _3) + } + else { + return nil + } + } + public static func parse_messageMediaContact(_ reader: BufferReader) -> MessageMedia? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + var _5: Int32? + _5 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.MessageMedia.messageMediaContact(phoneNumber: _1!, firstName: _2!, lastName: _3!, vcard: _4!, userId: _5!) + } + else { + return nil + } + } + public static func parse_messageMediaPoll(_ reader: BufferReader) -> MessageMedia? { + var _1: Api.Poll? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Poll + } + var _2: Api.PollResults? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.PollResults + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageMedia.messageMediaPoll(poll: _1!, results: _2!) + } + else { + return nil + } + } + public static func parse_messageMediaDice(_ reader: BufferReader) -> MessageMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageMedia.messageMediaDice(value: _1!, emoticon: _2!) + } + else { + return nil + } + } + public static func parse_messageMediaGeoLive(_ reader: BufferReader) -> MessageMedia? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.GeoPoint? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.GeoPoint + } + var _3: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_5 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.MessageMedia.messageMediaGeoLive(flags: _1!, geo: _2!, heading: _3, period: _4!, proximityNotificationRadius: _5) + } + else { + return nil + } + } + + } + public enum PaymentSavedCredentials: TypeConstructorDescription { + case paymentSavedCredentialsCard(id: String, title: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .paymentSavedCredentialsCard(let id, let title): + if boxed { + buffer.appendInt32(-842892769) + } + serializeString(id, buffer: buffer, boxed: false) + serializeString(title, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .paymentSavedCredentialsCard(let id, let title): + return ("paymentSavedCredentialsCard", [("id", id), ("title", title)]) + } + } + + public static func parse_paymentSavedCredentialsCard(_ reader: BufferReader) -> PaymentSavedCredentials? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.PaymentSavedCredentials.paymentSavedCredentialsCard(id: _1!, title: _2!) + } + else { + return nil + } + } + + } + public enum Null: TypeConstructorDescription { + case null + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .null: + if boxed { + buffer.appendInt32(1450380236) + } + + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .null: + return ("null", []) + } + } + + public static func parse_null(_ reader: BufferReader) -> Null? { + return Api.Null.null + } + + } + public enum DocumentAttribute: TypeConstructorDescription { + case documentAttributeImageSize(w: Int32, h: Int32) + case documentAttributeAnimated + case documentAttributeSticker(flags: Int32, alt: String, stickerset: Api.InputStickerSet, maskCoords: Api.MaskCoords?) + case documentAttributeVideo(flags: Int32, duration: Int32, w: Int32, h: Int32) + case documentAttributeAudio(flags: Int32, duration: Int32, title: String?, performer: String?, waveform: Buffer?) + case documentAttributeFilename(fileName: String) + case documentAttributeHasStickers + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .documentAttributeImageSize(let w, let h): + if boxed { + buffer.appendInt32(1815593308) + } + serializeInt32(w, buffer: buffer, boxed: false) + serializeInt32(h, buffer: buffer, boxed: false) + break + case .documentAttributeAnimated: + if boxed { + buffer.appendInt32(297109817) + } + + break + case .documentAttributeSticker(let flags, let alt, let stickerset, let maskCoords): + if boxed { + buffer.appendInt32(1662637586) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(alt, buffer: buffer, boxed: false) + stickerset.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {maskCoords!.serialize(buffer, true)} + break + case .documentAttributeVideo(let flags, let duration, let w, let h): + if boxed { + buffer.appendInt32(250621158) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(duration, buffer: buffer, boxed: false) + serializeInt32(w, buffer: buffer, boxed: false) + serializeInt32(h, buffer: buffer, boxed: false) + break + case .documentAttributeAudio(let flags, let duration, let title, let performer, let waveform): + if boxed { + buffer.appendInt32(-1739392570) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(duration, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeString(title!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeString(performer!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeBytes(waveform!, buffer: buffer, boxed: false)} + break + case .documentAttributeFilename(let fileName): + if boxed { + buffer.appendInt32(358154344) + } + serializeString(fileName, buffer: buffer, boxed: false) + break + case .documentAttributeHasStickers: + if boxed { + buffer.appendInt32(-1744710921) + } + + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .documentAttributeImageSize(let w, let h): + return ("documentAttributeImageSize", [("w", w), ("h", h)]) + case .documentAttributeAnimated: + return ("documentAttributeAnimated", []) + case .documentAttributeSticker(let flags, let alt, let stickerset, let maskCoords): + return ("documentAttributeSticker", [("flags", flags), ("alt", alt), ("stickerset", stickerset), ("maskCoords", maskCoords)]) + case .documentAttributeVideo(let flags, let duration, let w, let h): + return ("documentAttributeVideo", [("flags", flags), ("duration", duration), ("w", w), ("h", h)]) + case .documentAttributeAudio(let flags, let duration, let title, let performer, let waveform): + return ("documentAttributeAudio", [("flags", flags), ("duration", duration), ("title", title), ("performer", performer), ("waveform", waveform)]) + case .documentAttributeFilename(let fileName): + return ("documentAttributeFilename", [("fileName", fileName)]) + case .documentAttributeHasStickers: + return ("documentAttributeHasStickers", []) + } + } + + public static func parse_documentAttributeImageSize(_ reader: BufferReader) -> DocumentAttribute? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.DocumentAttribute.documentAttributeImageSize(w: _1!, h: _2!) + } + else { + return nil + } + } + public static func parse_documentAttributeAnimated(_ reader: BufferReader) -> DocumentAttribute? { + return Api.DocumentAttribute.documentAttributeAnimated + } + public static func parse_documentAttributeSticker(_ reader: BufferReader) -> DocumentAttribute? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: Api.InputStickerSet? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.InputStickerSet + } + var _4: Api.MaskCoords? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.MaskCoords + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.DocumentAttribute.documentAttributeSticker(flags: _1!, alt: _2!, stickerset: _3!, maskCoords: _4) + } + else { + return nil + } + } + public static func parse_documentAttributeVideo(_ reader: BufferReader) -> DocumentAttribute? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.DocumentAttribute.documentAttributeVideo(flags: _1!, duration: _2!, w: _3!, h: _4!) + } + else { + return nil + } + } + public static func parse_documentAttributeAudio(_ reader: BufferReader) -> DocumentAttribute? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: String? + if Int(_1!) & Int(1 << 0) != 0 {_3 = parseString(reader) } + var _4: String? + if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } + var _5: Buffer? + if Int(_1!) & Int(1 << 2) != 0 {_5 = parseBytes(reader) } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.auth.SentCode.sentCode(flags: _1!, type: _2!, phoneCodeHash: _3!, nextType: _4, timeout: _5) + return Api.DocumentAttribute.documentAttributeAudio(flags: _1!, duration: _2!, title: _3, performer: _4, waveform: _5) } else { return nil } } - - } - public enum CodeType: TypeConstructorDescription { - case codeTypeSms - case codeTypeCall - case codeTypeFlashCall - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .codeTypeSms: - if boxed { - buffer.appendInt32(1923290508) - } - - break - case .codeTypeCall: - if boxed { - buffer.appendInt32(1948046307) - } - - break - case .codeTypeFlashCall: - if boxed { - buffer.appendInt32(577556219) - } - - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .codeTypeSms: - return ("codeTypeSms", []) - case .codeTypeCall: - return ("codeTypeCall", []) - case .codeTypeFlashCall: - return ("codeTypeFlashCall", []) - } - } - - public static func parse_codeTypeSms(_ reader: BufferReader) -> CodeType? { - return Api.auth.CodeType.codeTypeSms - } - public static func parse_codeTypeCall(_ reader: BufferReader) -> CodeType? { - return Api.auth.CodeType.codeTypeCall - } - public static func parse_codeTypeFlashCall(_ reader: BufferReader) -> CodeType? { - return Api.auth.CodeType.codeTypeFlashCall - } - - } - public enum SentCodeType: TypeConstructorDescription { - case sentCodeTypeApp(length: Int32) - case sentCodeTypeSms(length: Int32) - case sentCodeTypeCall(length: Int32) - case sentCodeTypeFlashCall(pattern: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .sentCodeTypeApp(let length): - if boxed { - buffer.appendInt32(1035688326) - } - serializeInt32(length, buffer: buffer, boxed: false) - break - case .sentCodeTypeSms(let length): - if boxed { - buffer.appendInt32(-1073693790) - } - serializeInt32(length, buffer: buffer, boxed: false) - break - case .sentCodeTypeCall(let length): - if boxed { - buffer.appendInt32(1398007207) - } - serializeInt32(length, buffer: buffer, boxed: false) - break - case .sentCodeTypeFlashCall(let pattern): - if boxed { - buffer.appendInt32(-1425815847) - } - serializeString(pattern, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .sentCodeTypeApp(let length): - return ("sentCodeTypeApp", [("length", length)]) - case .sentCodeTypeSms(let length): - return ("sentCodeTypeSms", [("length", length)]) - case .sentCodeTypeCall(let length): - return ("sentCodeTypeCall", [("length", length)]) - case .sentCodeTypeFlashCall(let pattern): - return ("sentCodeTypeFlashCall", [("pattern", pattern)]) - } - } - - public static func parse_sentCodeTypeApp(_ reader: BufferReader) -> SentCodeType? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.auth.SentCodeType.sentCodeTypeApp(length: _1!) - } - else { - return nil - } - } - public static func parse_sentCodeTypeSms(_ reader: BufferReader) -> SentCodeType? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.auth.SentCodeType.sentCodeTypeSms(length: _1!) - } - else { - return nil - } - } - public static func parse_sentCodeTypeCall(_ reader: BufferReader) -> SentCodeType? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.auth.SentCodeType.sentCodeTypeCall(length: _1!) - } - else { - return nil - } - } - public static func parse_sentCodeTypeFlashCall(_ reader: BufferReader) -> SentCodeType? { + public static func parse_documentAttributeFilename(_ reader: BufferReader) -> DocumentAttribute? { var _1: String? _1 = parseString(reader) let _c1 = _1 != nil if _c1 { - return Api.auth.SentCodeType.sentCodeTypeFlashCall(pattern: _1!) + return Api.DocumentAttribute.documentAttributeFilename(fileName: _1!) } else { return nil } } + public static func parse_documentAttributeHasStickers(_ reader: BufferReader) -> DocumentAttribute? { + return Api.DocumentAttribute.documentAttributeHasStickers + } } -} -} -public extension Api { -public struct contacts { - public enum Blocked: TypeConstructorDescription { - case blocked(blocked: [Api.PeerBlocked], chats: [Api.Chat], users: [Api.User]) - case blockedSlice(count: Int32, blocked: [Api.PeerBlocked], chats: [Api.Chat], users: [Api.User]) + public enum BankCardOpenUrl: TypeConstructorDescription { + case bankCardOpenUrl(url: String, name: String) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .blocked(let blocked, let chats, let users): + case .bankCardOpenUrl(let url, let name): if boxed { - buffer.appendInt32(182326673) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(blocked.count)) - for item in blocked { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(chats.count)) - for item in chats { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - break - case .blockedSlice(let count, let blocked, let chats, let users): - if boxed { - buffer.appendInt32(-513392236) - } - serializeInt32(count, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(blocked.count)) - for item in blocked { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(chats.count)) - for item in chats { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .blocked(let blocked, let chats, let users): - return ("blocked", [("blocked", blocked), ("chats", chats), ("users", users)]) - case .blockedSlice(let count, let blocked, let chats, let users): - return ("blockedSlice", [("count", count), ("blocked", blocked), ("chats", chats), ("users", users)]) - } - } - - public static func parse_blocked(_ reader: BufferReader) -> Blocked? { - var _1: [Api.PeerBlocked]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PeerBlocked.self) - } - var _2: [Api.Chat]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) - } - var _3: [Api.User]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.contacts.Blocked.blocked(blocked: _1!, chats: _2!, users: _3!) - } - else { - return nil - } - } - public static func parse_blockedSlice(_ reader: BufferReader) -> Blocked? { - var _1: Int32? - _1 = reader.readInt32() - var _2: [Api.PeerBlocked]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PeerBlocked.self) - } - var _3: [Api.Chat]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) - } - var _4: [Api.User]? - if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.contacts.Blocked.blockedSlice(count: _1!, blocked: _2!, chats: _3!, users: _4!) - } - else { - return nil - } - } - - } - public enum Contacts: TypeConstructorDescription { - case contactsNotModified - case contacts(contacts: [Api.Contact], savedCount: Int32, users: [Api.User]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .contactsNotModified: - if boxed { - buffer.appendInt32(-1219778094) - } - - break - case .contacts(let contacts, let savedCount, let users): - if boxed { - buffer.appendInt32(-353862078) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(contacts.count)) - for item in contacts { - item.serialize(buffer, true) - } - serializeInt32(savedCount, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .contactsNotModified: - return ("contactsNotModified", []) - case .contacts(let contacts, let savedCount, let users): - return ("contacts", [("contacts", contacts), ("savedCount", savedCount), ("users", users)]) - } - } - - public static func parse_contactsNotModified(_ reader: BufferReader) -> Contacts? { - return Api.contacts.Contacts.contactsNotModified - } - public static func parse_contacts(_ reader: BufferReader) -> Contacts? { - var _1: [Api.Contact]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Contact.self) - } - var _2: Int32? - _2 = reader.readInt32() - var _3: [Api.User]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.contacts.Contacts.contacts(contacts: _1!, savedCount: _2!, users: _3!) - } - else { - return nil - } - } - - } - public enum ResolvedPeer: TypeConstructorDescription { - case resolvedPeer(peer: Api.Peer, chats: [Api.Chat], users: [Api.User]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .resolvedPeer(let peer, let chats, let users): - if boxed { - buffer.appendInt32(2131196633) - } - peer.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(chats.count)) - for item in chats { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .resolvedPeer(let peer, let chats, let users): - return ("resolvedPeer", [("peer", peer), ("chats", chats), ("users", users)]) - } - } - - public static func parse_resolvedPeer(_ reader: BufferReader) -> ResolvedPeer? { - var _1: Api.Peer? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _2: [Api.Chat]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) - } - var _3: [Api.User]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.contacts.ResolvedPeer.resolvedPeer(peer: _1!, chats: _2!, users: _3!) - } - else { - return nil - } - } - - } - public enum ImportedContacts: TypeConstructorDescription { - case importedContacts(imported: [Api.ImportedContact], popularInvites: [Api.PopularContact], retryContacts: [Int64], users: [Api.User]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .importedContacts(let imported, let popularInvites, let retryContacts, let users): - if boxed { - buffer.appendInt32(2010127419) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(imported.count)) - for item in imported { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(popularInvites.count)) - for item in popularInvites { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(retryContacts.count)) - for item in retryContacts { - serializeInt64(item, buffer: buffer, boxed: false) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .importedContacts(let imported, let popularInvites, let retryContacts, let users): - return ("importedContacts", [("imported", imported), ("popularInvites", popularInvites), ("retryContacts", retryContacts), ("users", users)]) - } - } - - public static func parse_importedContacts(_ reader: BufferReader) -> ImportedContacts? { - var _1: [Api.ImportedContact]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ImportedContact.self) - } - var _2: [Api.PopularContact]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PopularContact.self) - } - var _3: [Int64]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self) - } - var _4: [Api.User]? - if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.contacts.ImportedContacts.importedContacts(imported: _1!, popularInvites: _2!, retryContacts: _3!, users: _4!) - } - else { - return nil - } - } - - } - public enum Found: TypeConstructorDescription { - case found(myResults: [Api.Peer], results: [Api.Peer], chats: [Api.Chat], users: [Api.User]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .found(let myResults, let results, let chats, let users): - if boxed { - buffer.appendInt32(-1290580579) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(myResults.count)) - for item in myResults { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(results.count)) - for item in results { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(chats.count)) - for item in chats { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .found(let myResults, let results, let chats, let users): - return ("found", [("myResults", myResults), ("results", results), ("chats", chats), ("users", users)]) - } - } - - public static func parse_found(_ reader: BufferReader) -> Found? { - var _1: [Api.Peer]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Peer.self) - } - var _2: [Api.Peer]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Peer.self) - } - var _3: [Api.Chat]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) - } - var _4: [Api.User]? - if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.contacts.Found.found(myResults: _1!, results: _2!, chats: _3!, users: _4!) - } - else { - return nil - } - } - - } - public enum TopPeers: TypeConstructorDescription { - case topPeersNotModified - case topPeers(categories: [Api.TopPeerCategoryPeers], chats: [Api.Chat], users: [Api.User]) - case topPeersDisabled - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .topPeersNotModified: - if boxed { - buffer.appendInt32(-567906571) - } - - break - case .topPeers(let categories, let chats, let users): - if boxed { - buffer.appendInt32(1891070632) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(categories.count)) - for item in categories { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(chats.count)) - for item in chats { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - break - case .topPeersDisabled: - if boxed { - buffer.appendInt32(-1255369827) - } - - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .topPeersNotModified: - return ("topPeersNotModified", []) - case .topPeers(let categories, let chats, let users): - return ("topPeers", [("categories", categories), ("chats", chats), ("users", users)]) - case .topPeersDisabled: - return ("topPeersDisabled", []) - } - } - - public static func parse_topPeersNotModified(_ reader: BufferReader) -> TopPeers? { - return Api.contacts.TopPeers.topPeersNotModified - } - public static func parse_topPeers(_ reader: BufferReader) -> TopPeers? { - var _1: [Api.TopPeerCategoryPeers]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.TopPeerCategoryPeers.self) - } - var _2: [Api.Chat]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) - } - var _3: [Api.User]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.contacts.TopPeers.topPeers(categories: _1!, chats: _2!, users: _3!) - } - else { - return nil - } - } - public static func parse_topPeersDisabled(_ reader: BufferReader) -> TopPeers? { - return Api.contacts.TopPeers.topPeersDisabled - } - - } -} -} -public extension Api { -public struct help { - public enum SupportName: TypeConstructorDescription { - case supportName(name: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .supportName(let name): - if boxed { - buffer.appendInt32(-1945767479) + buffer.appendInt32(-177732982) } + serializeString(url, buffer: buffer, boxed: false) serializeString(name, buffer: buffer, boxed: false) break } @@ -1754,17 +16146,20 @@ public struct help { public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .supportName(let name): - return ("supportName", [("name", name)]) + case .bankCardOpenUrl(let url, let name): + return ("bankCardOpenUrl", [("url", url), ("name", name)]) } } - public static func parse_supportName(_ reader: BufferReader) -> SupportName? { + public static func parse_bankCardOpenUrl(_ reader: BufferReader) -> BankCardOpenUrl? { var _1: String? _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) let _c1 = _1 != nil - if _c1 { - return Api.help.SupportName.supportName(name: _1!) + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.BankCardOpenUrl.bankCardOpenUrl(url: _1!, name: _2!) } else { return nil @@ -1772,31 +16167,134 @@ public struct help { } } - public enum AppUpdate: TypeConstructorDescription { - case appUpdate(flags: Int32, id: Int32, version: String, text: String, entities: [Api.MessageEntity], document: Api.Document?, url: String?) - case noAppUpdate + public enum ChatPhoto: TypeConstructorDescription { + case chatPhotoEmpty + case chatPhoto(flags: Int32, photoSmall: Api.FileLocation, photoBig: Api.FileLocation, dcId: Int32) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .appUpdate(let flags, let id, let version, let text, let entities, let document, let url): + case .chatPhotoEmpty: if boxed { - buffer.appendInt32(497489295) + buffer.appendInt32(935395612) + } + + break + case .chatPhoto(let flags, let photoSmall, let photoBig, let dcId): + if boxed { + buffer.appendInt32(-770990276) } serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - serializeString(version, buffer: buffer, boxed: false) - serializeString(text, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities.count)) - for item in entities { - item.serialize(buffer, true) - } - if Int(flags) & Int(1 << 1) != 0 {document!.serialize(buffer, true)} - if Int(flags) & Int(1 << 2) != 0 {serializeString(url!, buffer: buffer, boxed: false)} + photoSmall.serialize(buffer, true) + photoBig.serialize(buffer, true) + serializeInt32(dcId, buffer: buffer, boxed: false) break - case .noAppUpdate: + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .chatPhotoEmpty: + return ("chatPhotoEmpty", []) + case .chatPhoto(let flags, let photoSmall, let photoBig, let dcId): + return ("chatPhoto", [("flags", flags), ("photoSmall", photoSmall), ("photoBig", photoBig), ("dcId", dcId)]) + } + } + + public static func parse_chatPhotoEmpty(_ reader: BufferReader) -> ChatPhoto? { + return Api.ChatPhoto.chatPhotoEmpty + } + public static func parse_chatPhoto(_ reader: BufferReader) -> ChatPhoto? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.FileLocation? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.FileLocation + } + var _3: Api.FileLocation? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.FileLocation + } + var _4: Int32? + _4 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.ChatPhoto.chatPhoto(flags: _1!, photoSmall: _2!, photoBig: _3!, dcId: _4!) + } + else { + return nil + } + } + + } + public enum PageCaption: TypeConstructorDescription { + case pageCaption(text: Api.RichText, credit: Api.RichText) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .pageCaption(let text, let credit): if boxed { - buffer.appendInt32(-1000708810) + buffer.appendInt32(1869903447) + } + text.serialize(buffer, true) + credit.serialize(buffer, true) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .pageCaption(let text, let credit): + return ("pageCaption", [("text", text), ("credit", credit)]) + } + } + + public static func parse_pageCaption(_ reader: BufferReader) -> PageCaption? { + var _1: Api.RichText? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.RichText + } + var _2: Api.RichText? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.PageCaption.pageCaption(text: _1!, credit: _2!) + } + else { + return nil + } + } + + } + public enum UrlAuthResult: TypeConstructorDescription { + case urlAuthResultRequest(flags: Int32, bot: Api.User, domain: String) + case urlAuthResultAccepted(url: String) + case urlAuthResultDefault + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .urlAuthResultRequest(let flags, let bot, let domain): + if boxed { + buffer.appendInt32(-1831650802) + } + serializeInt32(flags, buffer: buffer, boxed: false) + bot.serialize(buffer, true) + serializeString(domain, buffer: buffer, boxed: false) + break + case .urlAuthResultAccepted(let url): + if boxed { + buffer.appendInt32(-1886646706) + } + serializeString(url, buffer: buffer, boxed: false) + break + case .urlAuthResultDefault: + if boxed { + buffer.appendInt32(-1445536993) } break @@ -1805,14 +16303,1132 @@ public struct help { public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .appUpdate(let flags, let id, let version, let text, let entities, let document, let url): - return ("appUpdate", [("flags", flags), ("id", id), ("version", version), ("text", text), ("entities", entities), ("document", document), ("url", url)]) - case .noAppUpdate: - return ("noAppUpdate", []) + case .urlAuthResultRequest(let flags, let bot, let domain): + return ("urlAuthResultRequest", [("flags", flags), ("bot", bot), ("domain", domain)]) + case .urlAuthResultAccepted(let url): + return ("urlAuthResultAccepted", [("url", url)]) + case .urlAuthResultDefault: + return ("urlAuthResultDefault", []) } } - public static func parse_appUpdate(_ reader: BufferReader) -> AppUpdate? { + public static func parse_urlAuthResultRequest(_ reader: BufferReader) -> UrlAuthResult? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.User? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.User + } + var _3: String? + _3 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.UrlAuthResult.urlAuthResultRequest(flags: _1!, bot: _2!, domain: _3!) + } + else { + return nil + } + } + public static func parse_urlAuthResultAccepted(_ reader: BufferReader) -> UrlAuthResult? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.UrlAuthResult.urlAuthResultAccepted(url: _1!) + } + else { + return nil + } + } + public static func parse_urlAuthResultDefault(_ reader: BufferReader) -> UrlAuthResult? { + return Api.UrlAuthResult.urlAuthResultDefault + } + + } + public enum InputStickerSet: TypeConstructorDescription { + case inputStickerSetEmpty + case inputStickerSetID(id: Int64, accessHash: Int64) + case inputStickerSetShortName(shortName: String) + case inputStickerSetAnimatedEmoji + case inputStickerSetDice(emoticon: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputStickerSetEmpty: + if boxed { + buffer.appendInt32(-4838507) + } + + break + case .inputStickerSetID(let id, let accessHash): + if boxed { + buffer.appendInt32(-1645763991) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + break + case .inputStickerSetShortName(let shortName): + if boxed { + buffer.appendInt32(-2044933984) + } + serializeString(shortName, buffer: buffer, boxed: false) + break + case .inputStickerSetAnimatedEmoji: + if boxed { + buffer.appendInt32(42402760) + } + + break + case .inputStickerSetDice(let emoticon): + if boxed { + buffer.appendInt32(-427863538) + } + serializeString(emoticon, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputStickerSetEmpty: + return ("inputStickerSetEmpty", []) + case .inputStickerSetID(let id, let accessHash): + return ("inputStickerSetID", [("id", id), ("accessHash", accessHash)]) + case .inputStickerSetShortName(let shortName): + return ("inputStickerSetShortName", [("shortName", shortName)]) + case .inputStickerSetAnimatedEmoji: + return ("inputStickerSetAnimatedEmoji", []) + case .inputStickerSetDice(let emoticon): + return ("inputStickerSetDice", [("emoticon", emoticon)]) + } + } + + public static func parse_inputStickerSetEmpty(_ reader: BufferReader) -> InputStickerSet? { + return Api.InputStickerSet.inputStickerSetEmpty + } + public static func parse_inputStickerSetID(_ reader: BufferReader) -> InputStickerSet? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputStickerSet.inputStickerSetID(id: _1!, accessHash: _2!) + } + else { + return nil + } + } + public static func parse_inputStickerSetShortName(_ reader: BufferReader) -> InputStickerSet? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.InputStickerSet.inputStickerSetShortName(shortName: _1!) + } + else { + return nil + } + } + public static func parse_inputStickerSetAnimatedEmoji(_ reader: BufferReader) -> InputStickerSet? { + return Api.InputStickerSet.inputStickerSetAnimatedEmoji + } + public static func parse_inputStickerSetDice(_ reader: BufferReader) -> InputStickerSet? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.InputStickerSet.inputStickerSetDice(emoticon: _1!) + } + else { + return nil + } + } + + } + public enum BotInfo: TypeConstructorDescription { + case botInfo(userId: Int32, description: String, commands: [Api.BotCommand]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .botInfo(let userId, let description, let commands): + if boxed { + buffer.appendInt32(-1729618630) + } + serializeInt32(userId, buffer: buffer, boxed: false) + serializeString(description, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(commands.count)) + for item in commands { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .botInfo(let userId, let description, let commands): + return ("botInfo", [("userId", userId), ("description", description), ("commands", commands)]) + } + } + + public static func parse_botInfo(_ reader: BufferReader) -> BotInfo? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: [Api.BotCommand]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.BotCommand.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.BotInfo.botInfo(userId: _1!, description: _2!, commands: _3!) + } + else { + return nil + } + } + + } + public enum FoundGif: TypeConstructorDescription { + case foundGif(url: String, thumbUrl: String, contentUrl: String, contentType: String, w: Int32, h: Int32) + case foundGifCached(url: String, photo: Api.Photo, document: Api.Document) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .foundGif(let url, let thumbUrl, let contentUrl, let contentType, let w, let h): + if boxed { + buffer.appendInt32(372165663) + } + serializeString(url, buffer: buffer, boxed: false) + serializeString(thumbUrl, buffer: buffer, boxed: false) + serializeString(contentUrl, buffer: buffer, boxed: false) + serializeString(contentType, buffer: buffer, boxed: false) + serializeInt32(w, buffer: buffer, boxed: false) + serializeInt32(h, buffer: buffer, boxed: false) + break + case .foundGifCached(let url, let photo, let document): + if boxed { + buffer.appendInt32(-1670052855) + } + serializeString(url, buffer: buffer, boxed: false) + photo.serialize(buffer, true) + document.serialize(buffer, true) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .foundGif(let url, let thumbUrl, let contentUrl, let contentType, let w, let h): + return ("foundGif", [("url", url), ("thumbUrl", thumbUrl), ("contentUrl", contentUrl), ("contentType", contentType), ("w", w), ("h", h)]) + case .foundGifCached(let url, let photo, let document): + return ("foundGifCached", [("url", url), ("photo", photo), ("document", document)]) + } + } + + public static func parse_foundGif(_ reader: BufferReader) -> FoundGif? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + var _5: Int32? + _5 = reader.readInt32() + var _6: Int32? + _6 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.FoundGif.foundGif(url: _1!, thumbUrl: _2!, contentUrl: _3!, contentType: _4!, w: _5!, h: _6!) + } + else { + return nil + } + } + public static func parse_foundGifCached(_ reader: BufferReader) -> FoundGif? { + var _1: String? + _1 = parseString(reader) + var _2: Api.Photo? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Photo + } + var _3: Api.Document? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.Document + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.FoundGif.foundGifCached(url: _1!, photo: _2!, document: _3!) + } + else { + return nil + } + } + + } + public enum User: TypeConstructorDescription { + case userEmpty(id: Int32) + case user(flags: Int32, id: Int32, accessHash: Int64?, firstName: String?, lastName: String?, username: String?, phone: String?, photo: Api.UserProfilePhoto?, status: Api.UserStatus?, botInfoVersion: Int32?, restrictionReason: [Api.RestrictionReason]?, botInlinePlaceholder: String?, langCode: String?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .userEmpty(let id): + if boxed { + buffer.appendInt32(537022650) + } + serializeInt32(id, buffer: buffer, boxed: false) + break + case .user(let flags, let id, let accessHash, let firstName, let lastName, let username, let phone, let photo, let status, let botInfoVersion, let restrictionReason, let botInlinePlaceholder, let langCode): + if boxed { + buffer.appendInt32(-1820043071) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt64(accessHash!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeString(firstName!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeString(lastName!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeString(username!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 4) != 0 {serializeString(phone!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 5) != 0 {photo!.serialize(buffer, true)} + if Int(flags) & Int(1 << 6) != 0 {status!.serialize(buffer, true)} + if Int(flags) & Int(1 << 14) != 0 {serializeInt32(botInfoVersion!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 18) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(restrictionReason!.count)) + for item in restrictionReason! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 19) != 0 {serializeString(botInlinePlaceholder!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 22) != 0 {serializeString(langCode!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .userEmpty(let id): + return ("userEmpty", [("id", id)]) + case .user(let flags, let id, let accessHash, let firstName, let lastName, let username, let phone, let photo, let status, let botInfoVersion, let restrictionReason, let botInlinePlaceholder, let langCode): + return ("user", [("flags", flags), ("id", id), ("accessHash", accessHash), ("firstName", firstName), ("lastName", lastName), ("username", username), ("phone", phone), ("photo", photo), ("status", status), ("botInfoVersion", botInfoVersion), ("restrictionReason", restrictionReason), ("botInlinePlaceholder", botInlinePlaceholder), ("langCode", langCode)]) + } + } + + public static func parse_userEmpty(_ reader: BufferReader) -> User? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.User.userEmpty(id: _1!) + } + else { + return nil + } + } + public static func parse_user(_ reader: BufferReader) -> User? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int64? + if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt64() } + var _4: String? + if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } + var _5: String? + if Int(_1!) & Int(1 << 2) != 0 {_5 = parseString(reader) } + var _6: String? + if Int(_1!) & Int(1 << 3) != 0 {_6 = parseString(reader) } + var _7: String? + if Int(_1!) & Int(1 << 4) != 0 {_7 = parseString(reader) } + var _8: Api.UserProfilePhoto? + if Int(_1!) & Int(1 << 5) != 0 {if let signature = reader.readInt32() { + _8 = Api.parse(reader, signature: signature) as? Api.UserProfilePhoto + } } + var _9: Api.UserStatus? + if Int(_1!) & Int(1 << 6) != 0 {if let signature = reader.readInt32() { + _9 = Api.parse(reader, signature: signature) as? Api.UserStatus + } } + var _10: Int32? + if Int(_1!) & Int(1 << 14) != 0 {_10 = reader.readInt32() } + var _11: [Api.RestrictionReason]? + if Int(_1!) & Int(1 << 18) != 0 {if let _ = reader.readInt32() { + _11 = Api.parseVector(reader, elementSignature: 0, elementType: Api.RestrictionReason.self) + } } + var _12: String? + if Int(_1!) & Int(1 << 19) != 0 {_12 = parseString(reader) } + var _13: String? + if Int(_1!) & Int(1 << 22) != 0 {_13 = parseString(reader) } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil + let _c8 = (Int(_1!) & Int(1 << 5) == 0) || _8 != nil + let _c9 = (Int(_1!) & Int(1 << 6) == 0) || _9 != nil + let _c10 = (Int(_1!) & Int(1 << 14) == 0) || _10 != nil + let _c11 = (Int(_1!) & Int(1 << 18) == 0) || _11 != nil + let _c12 = (Int(_1!) & Int(1 << 19) == 0) || _12 != nil + let _c13 = (Int(_1!) & Int(1 << 22) == 0) || _13 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 { + return Api.User.user(flags: _1!, id: _2!, accessHash: _3, firstName: _4, lastName: _5, username: _6, phone: _7, photo: _8, status: _9, botInfoVersion: _10, restrictionReason: _11, botInlinePlaceholder: _12, langCode: _13) + } + else { + return nil + } + } + + } + public enum Message: TypeConstructorDescription { + case messageService(flags: Int32, id: Int32, fromId: Api.Peer?, peerId: Api.Peer, replyTo: Api.MessageReplyHeader?, date: Int32, action: Api.MessageAction) + case messageEmpty(flags: Int32, id: Int32, peerId: Api.Peer?) + case message(flags: Int32, id: Int32, fromId: Api.Peer?, peerId: Api.Peer, fwdFrom: Api.MessageFwdHeader?, viaBotId: Int32?, replyTo: Api.MessageReplyHeader?, date: Int32, message: String, media: Api.MessageMedia?, replyMarkup: Api.ReplyMarkup?, entities: [Api.MessageEntity]?, views: Int32?, forwards: Int32?, replies: Api.MessageReplies?, editDate: Int32?, postAuthor: String?, groupedId: Int64?, restrictionReason: [Api.RestrictionReason]?, ttlPeriod: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .messageService(let flags, let id, let fromId, let peerId, let replyTo, let date, let action): + if boxed { + buffer.appendInt32(678405636) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 8) != 0 {fromId!.serialize(buffer, true)} + peerId.serialize(buffer, true) + if Int(flags) & Int(1 << 3) != 0 {replyTo!.serialize(buffer, true)} + serializeInt32(date, buffer: buffer, boxed: false) + action.serialize(buffer, true) + break + case .messageEmpty(let flags, let id, let peerId): + if boxed { + buffer.appendInt32(-1868117372) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {peerId!.serialize(buffer, true)} + break + case .message(let flags, let id, let fromId, let peerId, let fwdFrom, let viaBotId, let replyTo, let date, let message, let media, let replyMarkup, let entities, let views, let forwards, let replies, let editDate, let postAuthor, let groupedId, let restrictionReason, let ttlPeriod): + if boxed { + buffer.appendInt32(-1125940270) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 8) != 0 {fromId!.serialize(buffer, true)} + peerId.serialize(buffer, true) + if Int(flags) & Int(1 << 2) != 0 {fwdFrom!.serialize(buffer, true)} + if Int(flags) & Int(1 << 11) != 0 {serializeInt32(viaBotId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {replyTo!.serialize(buffer, true)} + serializeInt32(date, buffer: buffer, boxed: false) + serializeString(message, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 9) != 0 {media!.serialize(buffer, true)} + if Int(flags) & Int(1 << 6) != 0 {replyMarkup!.serialize(buffer, true)} + if Int(flags) & Int(1 << 7) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities!.count)) + for item in entities! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 10) != 0 {serializeInt32(views!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 10) != 0 {serializeInt32(forwards!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 23) != 0 {replies!.serialize(buffer, true)} + if Int(flags) & Int(1 << 15) != 0 {serializeInt32(editDate!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 16) != 0 {serializeString(postAuthor!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 17) != 0 {serializeInt64(groupedId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 22) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(restrictionReason!.count)) + for item in restrictionReason! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 25) != 0 {serializeInt32(ttlPeriod!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .messageService(let flags, let id, let fromId, let peerId, let replyTo, let date, let action): + return ("messageService", [("flags", flags), ("id", id), ("fromId", fromId), ("peerId", peerId), ("replyTo", replyTo), ("date", date), ("action", action)]) + case .messageEmpty(let flags, let id, let peerId): + return ("messageEmpty", [("flags", flags), ("id", id), ("peerId", peerId)]) + case .message(let flags, let id, let fromId, let peerId, let fwdFrom, let viaBotId, let replyTo, let date, let message, let media, let replyMarkup, let entities, let views, let forwards, let replies, let editDate, let postAuthor, let groupedId, let restrictionReason, let ttlPeriod): + return ("message", [("flags", flags), ("id", id), ("fromId", fromId), ("peerId", peerId), ("fwdFrom", fwdFrom), ("viaBotId", viaBotId), ("replyTo", replyTo), ("date", date), ("message", message), ("media", media), ("replyMarkup", replyMarkup), ("entities", entities), ("views", views), ("forwards", forwards), ("replies", replies), ("editDate", editDate), ("postAuthor", postAuthor), ("groupedId", groupedId), ("restrictionReason", restrictionReason), ("ttlPeriod", ttlPeriod)]) + } + } + + public static func parse_messageService(_ reader: BufferReader) -> Message? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Api.Peer? + if Int(_1!) & Int(1 << 8) != 0 {if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.Peer + } } + var _4: Api.Peer? + if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _5: Api.MessageReplyHeader? + if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.MessageReplyHeader + } } + var _6: Int32? + _6 = reader.readInt32() + var _7: Api.MessageAction? + if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.MessageAction + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 8) == 0) || _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.Message.messageService(flags: _1!, id: _2!, fromId: _3, peerId: _4!, replyTo: _5, date: _6!, action: _7!) + } + else { + return nil + } + } + public static func parse_messageEmpty(_ reader: BufferReader) -> Message? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Api.Peer? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.Peer + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.Message.messageEmpty(flags: _1!, id: _2!, peerId: _3) + } + else { + return nil + } + } + public static func parse_message(_ reader: BufferReader) -> Message? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Api.Peer? + if Int(_1!) & Int(1 << 8) != 0 {if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.Peer + } } + var _4: Api.Peer? + if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _5: Api.MessageFwdHeader? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.MessageFwdHeader + } } + var _6: Int32? + if Int(_1!) & Int(1 << 11) != 0 {_6 = reader.readInt32() } + var _7: Api.MessageReplyHeader? + if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.MessageReplyHeader + } } + var _8: Int32? + _8 = reader.readInt32() + var _9: String? + _9 = parseString(reader) + var _10: Api.MessageMedia? + if Int(_1!) & Int(1 << 9) != 0 {if let signature = reader.readInt32() { + _10 = Api.parse(reader, signature: signature) as? Api.MessageMedia + } } + var _11: Api.ReplyMarkup? + if Int(_1!) & Int(1 << 6) != 0 {if let signature = reader.readInt32() { + _11 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup + } } + var _12: [Api.MessageEntity]? + if Int(_1!) & Int(1 << 7) != 0 {if let _ = reader.readInt32() { + _12 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) + } } + var _13: Int32? + if Int(_1!) & Int(1 << 10) != 0 {_13 = reader.readInt32() } + var _14: Int32? + if Int(_1!) & Int(1 << 10) != 0 {_14 = reader.readInt32() } + var _15: Api.MessageReplies? + if Int(_1!) & Int(1 << 23) != 0 {if let signature = reader.readInt32() { + _15 = Api.parse(reader, signature: signature) as? Api.MessageReplies + } } + var _16: Int32? + if Int(_1!) & Int(1 << 15) != 0 {_16 = reader.readInt32() } + var _17: String? + if Int(_1!) & Int(1 << 16) != 0 {_17 = parseString(reader) } + var _18: Int64? + if Int(_1!) & Int(1 << 17) != 0 {_18 = reader.readInt64() } + var _19: [Api.RestrictionReason]? + if Int(_1!) & Int(1 << 22) != 0 {if let _ = reader.readInt32() { + _19 = Api.parseVector(reader, elementSignature: 0, elementType: Api.RestrictionReason.self) + } } + var _20: Int32? + if Int(_1!) & Int(1 << 25) != 0 {_20 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 8) == 0) || _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 11) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil + let _c8 = _8 != nil + let _c9 = _9 != nil + let _c10 = (Int(_1!) & Int(1 << 9) == 0) || _10 != nil + let _c11 = (Int(_1!) & Int(1 << 6) == 0) || _11 != nil + let _c12 = (Int(_1!) & Int(1 << 7) == 0) || _12 != nil + let _c13 = (Int(_1!) & Int(1 << 10) == 0) || _13 != nil + let _c14 = (Int(_1!) & Int(1 << 10) == 0) || _14 != nil + let _c15 = (Int(_1!) & Int(1 << 23) == 0) || _15 != nil + let _c16 = (Int(_1!) & Int(1 << 15) == 0) || _16 != nil + let _c17 = (Int(_1!) & Int(1 << 16) == 0) || _17 != nil + let _c18 = (Int(_1!) & Int(1 << 17) == 0) || _18 != nil + let _c19 = (Int(_1!) & Int(1 << 22) == 0) || _19 != nil + let _c20 = (Int(_1!) & Int(1 << 25) == 0) || _20 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 && _c20 { + return Api.Message.message(flags: _1!, id: _2!, fromId: _3, peerId: _4!, fwdFrom: _5, viaBotId: _6, replyTo: _7, date: _8!, message: _9!, media: _10, replyMarkup: _11, entities: _12, views: _13, forwards: _14, replies: _15, editDate: _16, postAuthor: _17, groupedId: _18, restrictionReason: _19, ttlPeriod: _20) + } + else { + return nil + } + } + + } + public enum StatsGroupTopInviter: TypeConstructorDescription { + case statsGroupTopInviter(userId: Int32, invitations: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .statsGroupTopInviter(let userId, let invitations): + if boxed { + buffer.appendInt32(831924812) + } + serializeInt32(userId, buffer: buffer, boxed: false) + serializeInt32(invitations, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .statsGroupTopInviter(let userId, let invitations): + return ("statsGroupTopInviter", [("userId", userId), ("invitations", invitations)]) + } + } + + public static func parse_statsGroupTopInviter(_ reader: BufferReader) -> StatsGroupTopInviter? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.StatsGroupTopInviter.statsGroupTopInviter(userId: _1!, invitations: _2!) + } + else { + return nil + } + } + + } + public enum InputFileLocation: TypeConstructorDescription { + case inputEncryptedFileLocation(id: Int64, accessHash: Int64) + case inputSecureFileLocation(id: Int64, accessHash: Int64) + case inputFileLocation(volumeId: Int64, localId: Int32, secret: Int64, fileReference: Buffer) + case inputPhotoFileLocation(id: Int64, accessHash: Int64, fileReference: Buffer, thumbSize: String) + case inputDocumentFileLocation(id: Int64, accessHash: Int64, fileReference: Buffer, thumbSize: String) + case inputPeerPhotoFileLocation(flags: Int32, peer: Api.InputPeer, volumeId: Int64, localId: Int32) + case inputStickerSetThumb(stickerset: Api.InputStickerSet, volumeId: Int64, localId: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputEncryptedFileLocation(let id, let accessHash): + if boxed { + buffer.appendInt32(-182231723) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + break + case .inputSecureFileLocation(let id, let accessHash): + if boxed { + buffer.appendInt32(-876089816) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + break + case .inputFileLocation(let volumeId, let localId, let secret, let fileReference): + if boxed { + buffer.appendInt32(-539317279) + } + serializeInt64(volumeId, buffer: buffer, boxed: false) + serializeInt32(localId, buffer: buffer, boxed: false) + serializeInt64(secret, buffer: buffer, boxed: false) + serializeBytes(fileReference, buffer: buffer, boxed: false) + break + case .inputPhotoFileLocation(let id, let accessHash, let fileReference, let thumbSize): + if boxed { + buffer.appendInt32(1075322878) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeBytes(fileReference, buffer: buffer, boxed: false) + serializeString(thumbSize, buffer: buffer, boxed: false) + break + case .inputDocumentFileLocation(let id, let accessHash, let fileReference, let thumbSize): + if boxed { + buffer.appendInt32(-1160743548) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeBytes(fileReference, buffer: buffer, boxed: false) + serializeString(thumbSize, buffer: buffer, boxed: false) + break + case .inputPeerPhotoFileLocation(let flags, let peer, let volumeId, let localId): + if boxed { + buffer.appendInt32(668375447) + } + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + serializeInt64(volumeId, buffer: buffer, boxed: false) + serializeInt32(localId, buffer: buffer, boxed: false) + break + case .inputStickerSetThumb(let stickerset, let volumeId, let localId): + if boxed { + buffer.appendInt32(230353641) + } + stickerset.serialize(buffer, true) + serializeInt64(volumeId, buffer: buffer, boxed: false) + serializeInt32(localId, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputEncryptedFileLocation(let id, let accessHash): + return ("inputEncryptedFileLocation", [("id", id), ("accessHash", accessHash)]) + case .inputSecureFileLocation(let id, let accessHash): + return ("inputSecureFileLocation", [("id", id), ("accessHash", accessHash)]) + case .inputFileLocation(let volumeId, let localId, let secret, let fileReference): + return ("inputFileLocation", [("volumeId", volumeId), ("localId", localId), ("secret", secret), ("fileReference", fileReference)]) + case .inputPhotoFileLocation(let id, let accessHash, let fileReference, let thumbSize): + return ("inputPhotoFileLocation", [("id", id), ("accessHash", accessHash), ("fileReference", fileReference), ("thumbSize", thumbSize)]) + case .inputDocumentFileLocation(let id, let accessHash, let fileReference, let thumbSize): + return ("inputDocumentFileLocation", [("id", id), ("accessHash", accessHash), ("fileReference", fileReference), ("thumbSize", thumbSize)]) + case .inputPeerPhotoFileLocation(let flags, let peer, let volumeId, let localId): + return ("inputPeerPhotoFileLocation", [("flags", flags), ("peer", peer), ("volumeId", volumeId), ("localId", localId)]) + case .inputStickerSetThumb(let stickerset, let volumeId, let localId): + return ("inputStickerSetThumb", [("stickerset", stickerset), ("volumeId", volumeId), ("localId", localId)]) + } + } + + public static func parse_inputEncryptedFileLocation(_ reader: BufferReader) -> InputFileLocation? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputFileLocation.inputEncryptedFileLocation(id: _1!, accessHash: _2!) + } + else { + return nil + } + } + public static func parse_inputSecureFileLocation(_ reader: BufferReader) -> InputFileLocation? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputFileLocation.inputSecureFileLocation(id: _1!, accessHash: _2!) + } + else { + return nil + } + } + public static func parse_inputFileLocation(_ reader: BufferReader) -> InputFileLocation? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int64? + _3 = reader.readInt64() + var _4: Buffer? + _4 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputFileLocation.inputFileLocation(volumeId: _1!, localId: _2!, secret: _3!, fileReference: _4!) + } + else { + return nil + } + } + public static func parse_inputPhotoFileLocation(_ reader: BufferReader) -> InputFileLocation? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int64? + _2 = reader.readInt64() + var _3: Buffer? + _3 = parseBytes(reader) + var _4: String? + _4 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputFileLocation.inputPhotoFileLocation(id: _1!, accessHash: _2!, fileReference: _3!, thumbSize: _4!) + } + else { + return nil + } + } + public static func parse_inputDocumentFileLocation(_ reader: BufferReader) -> InputFileLocation? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int64? + _2 = reader.readInt64() + var _3: Buffer? + _3 = parseBytes(reader) + var _4: String? + _4 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputFileLocation.inputDocumentFileLocation(id: _1!, accessHash: _2!, fileReference: _3!, thumbSize: _4!) + } + else { + return nil + } + } + public static func parse_inputPeerPhotoFileLocation(_ reader: BufferReader) -> InputFileLocation? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.InputPeer? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.InputPeer + } + var _3: Int64? + _3 = reader.readInt64() + var _4: Int32? + _4 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputFileLocation.inputPeerPhotoFileLocation(flags: _1!, peer: _2!, volumeId: _3!, localId: _4!) + } + else { + return nil + } + } + public static func parse_inputStickerSetThumb(_ reader: BufferReader) -> InputFileLocation? { + var _1: Api.InputStickerSet? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputStickerSet + } + var _2: Int64? + _2 = reader.readInt64() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.InputFileLocation.inputStickerSetThumb(stickerset: _1!, volumeId: _2!, localId: _3!) + } + else { + return nil + } + } + + } + public enum GeoPoint: TypeConstructorDescription { + case geoPointEmpty + case geoPoint(flags: Int32, long: Double, lat: Double, accessHash: Int64, accuracyRadius: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .geoPointEmpty: + if boxed { + buffer.appendInt32(286776671) + } + + break + case .geoPoint(let flags, let long, let lat, let accessHash, let accuracyRadius): + if boxed { + buffer.appendInt32(-1297942941) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeDouble(long, buffer: buffer, boxed: false) + serializeDouble(lat, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(accuracyRadius!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .geoPointEmpty: + return ("geoPointEmpty", []) + case .geoPoint(let flags, let long, let lat, let accessHash, let accuracyRadius): + return ("geoPoint", [("flags", flags), ("long", long), ("lat", lat), ("accessHash", accessHash), ("accuracyRadius", accuracyRadius)]) + } + } + + public static func parse_geoPointEmpty(_ reader: BufferReader) -> GeoPoint? { + return Api.GeoPoint.geoPointEmpty + } + public static func parse_geoPoint(_ reader: BufferReader) -> GeoPoint? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Double? + _2 = reader.readDouble() + var _3: Double? + _3 = reader.readDouble() + var _4: Int64? + _4 = reader.readInt64() + var _5: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_5 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.GeoPoint.geoPoint(flags: _1!, long: _2!, lat: _3!, accessHash: _4!, accuracyRadius: _5) + } + else { + return nil + } + } + + } + public enum InputPhoneCall: TypeConstructorDescription { + case inputPhoneCall(id: Int64, accessHash: Int64) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputPhoneCall(let id, let accessHash): + if boxed { + buffer.appendInt32(506920429) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputPhoneCall(let id, let accessHash): + return ("inputPhoneCall", [("id", id), ("accessHash", accessHash)]) + } + } + + public static func parse_inputPhoneCall(_ reader: BufferReader) -> InputPhoneCall? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputPhoneCall.inputPhoneCall(id: _1!, accessHash: _2!) + } + else { + return nil + } + } + + } + public enum ReceivedNotifyMessage: TypeConstructorDescription { + case receivedNotifyMessage(id: Int32, flags: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .receivedNotifyMessage(let id, let flags): + if boxed { + buffer.appendInt32(-1551583367) + } + serializeInt32(id, buffer: buffer, boxed: false) + serializeInt32(flags, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .receivedNotifyMessage(let id, let flags): + return ("receivedNotifyMessage", [("id", id), ("flags", flags)]) + } + } + + public static func parse_receivedNotifyMessage(_ reader: BufferReader) -> ReceivedNotifyMessage? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ReceivedNotifyMessage.receivedNotifyMessage(id: _1!, flags: _2!) + } + else { + return nil + } + } + + } + public enum ChatParticipants: TypeConstructorDescription { + case chatParticipantsForbidden(flags: Int32, chatId: Int32, selfParticipant: Api.ChatParticipant?) + case chatParticipants(chatId: Int32, participants: [Api.ChatParticipant], version: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .chatParticipantsForbidden(let flags, let chatId, let selfParticipant): + if boxed { + buffer.appendInt32(-57668565) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(chatId, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {selfParticipant!.serialize(buffer, true)} + break + case .chatParticipants(let chatId, let participants, let version): + if boxed { + buffer.appendInt32(1061556205) + } + serializeInt32(chatId, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(participants.count)) + for item in participants { + item.serialize(buffer, true) + } + serializeInt32(version, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .chatParticipantsForbidden(let flags, let chatId, let selfParticipant): + return ("chatParticipantsForbidden", [("flags", flags), ("chatId", chatId), ("selfParticipant", selfParticipant)]) + case .chatParticipants(let chatId, let participants, let version): + return ("chatParticipants", [("chatId", chatId), ("participants", participants), ("version", version)]) + } + } + + public static func parse_chatParticipantsForbidden(_ reader: BufferReader) -> ChatParticipants? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Api.ChatParticipant? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.ChatParticipant + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.ChatParticipants.chatParticipantsForbidden(flags: _1!, chatId: _2!, selfParticipant: _3) + } + else { + return nil + } + } + public static func parse_chatParticipants(_ reader: BufferReader) -> ChatParticipants? { + var _1: Int32? + _1 = reader.readInt32() + var _2: [Api.ChatParticipant]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ChatParticipant.self) + } + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.ChatParticipants.chatParticipants(chatId: _1!, participants: _2!, version: _3!) + } + else { + return nil + } + } + + } + public enum DialogFilter: TypeConstructorDescription { + case dialogFilter(flags: Int32, id: Int32, title: String, emoticon: String?, pinnedPeers: [Api.InputPeer], includePeers: [Api.InputPeer], excludePeers: [Api.InputPeer]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .dialogFilter(let flags, let id, let title, let emoticon, let pinnedPeers, let includePeers, let excludePeers): + if boxed { + buffer.appendInt32(1949890536) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + serializeString(title, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 25) != 0 {serializeString(emoticon!, buffer: buffer, boxed: false)} + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(pinnedPeers.count)) + for item in pinnedPeers { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(includePeers.count)) + for item in includePeers { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(excludePeers.count)) + for item in excludePeers { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .dialogFilter(let flags, let id, let title, let emoticon, let pinnedPeers, let includePeers, let excludePeers): + return ("dialogFilter", [("flags", flags), ("id", id), ("title", title), ("emoticon", emoticon), ("pinnedPeers", pinnedPeers), ("includePeers", includePeers), ("excludePeers", excludePeers)]) + } + } + + public static func parse_dialogFilter(_ reader: BufferReader) -> DialogFilter? { var _1: Int32? _1 = reader.readInt32() var _2: Int32? @@ -1820,71 +17436,100 @@ public struct help { var _3: String? _3 = parseString(reader) var _4: String? - _4 = parseString(reader) - var _5: [Api.MessageEntity]? + if Int(_1!) & Int(1 << 25) != 0 {_4 = parseString(reader) } + var _5: [Api.InputPeer]? if let _ = reader.readInt32() { - _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) + _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputPeer.self) + } + var _6: [Api.InputPeer]? + if let _ = reader.readInt32() { + _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputPeer.self) + } + var _7: [Api.InputPeer]? + if let _ = reader.readInt32() { + _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputPeer.self) } - var _6: Api.Document? - if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.Document - } } - var _7: String? - if Int(_1!) & Int(1 << 2) != 0 {_7 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = _4 != nil + let _c4 = (Int(_1!) & Int(1 << 25) == 0) || _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 2) == 0) || _7 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.help.AppUpdate.appUpdate(flags: _1!, id: _2!, version: _3!, text: _4!, entities: _5!, document: _6, url: _7) + return Api.DialogFilter.dialogFilter(flags: _1!, id: _2!, title: _3!, emoticon: _4, pinnedPeers: _5!, includePeers: _6!, excludePeers: _7!) } else { return nil } } - public static func parse_noAppUpdate(_ reader: BufferReader) -> AppUpdate? { - return Api.help.AppUpdate.noAppUpdate - } } - public enum PassportConfig: TypeConstructorDescription { - case passportConfigNotModified - case passportConfig(hash: Int32, countriesLangs: Api.DataJSON) + public enum InputPaymentCredentials: TypeConstructorDescription { + case inputPaymentCredentialsSaved(id: String, tmpPassword: Buffer) + case inputPaymentCredentials(flags: Int32, data: Api.DataJSON) + case inputPaymentCredentialsApplePay(paymentData: Api.DataJSON) + case inputPaymentCredentialsGooglePay(paymentToken: Api.DataJSON) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .passportConfigNotModified: + case .inputPaymentCredentialsSaved(let id, let tmpPassword): if boxed { - buffer.appendInt32(-1078332329) + buffer.appendInt32(-1056001329) } - + serializeString(id, buffer: buffer, boxed: false) + serializeBytes(tmpPassword, buffer: buffer, boxed: false) break - case .passportConfig(let hash, let countriesLangs): + case .inputPaymentCredentials(let flags, let data): if boxed { - buffer.appendInt32(-1600596305) + buffer.appendInt32(873977640) } - serializeInt32(hash, buffer: buffer, boxed: false) - countriesLangs.serialize(buffer, true) + serializeInt32(flags, buffer: buffer, boxed: false) + data.serialize(buffer, true) + break + case .inputPaymentCredentialsApplePay(let paymentData): + if boxed { + buffer.appendInt32(178373535) + } + paymentData.serialize(buffer, true) + break + case .inputPaymentCredentialsGooglePay(let paymentToken): + if boxed { + buffer.appendInt32(-1966921727) + } + paymentToken.serialize(buffer, true) break } } public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .passportConfigNotModified: - return ("passportConfigNotModified", []) - case .passportConfig(let hash, let countriesLangs): - return ("passportConfig", [("hash", hash), ("countriesLangs", countriesLangs)]) + case .inputPaymentCredentialsSaved(let id, let tmpPassword): + return ("inputPaymentCredentialsSaved", [("id", id), ("tmpPassword", tmpPassword)]) + case .inputPaymentCredentials(let flags, let data): + return ("inputPaymentCredentials", [("flags", flags), ("data", data)]) + case .inputPaymentCredentialsApplePay(let paymentData): + return ("inputPaymentCredentialsApplePay", [("paymentData", paymentData)]) + case .inputPaymentCredentialsGooglePay(let paymentToken): + return ("inputPaymentCredentialsGooglePay", [("paymentToken", paymentToken)]) } } - public static func parse_passportConfigNotModified(_ reader: BufferReader) -> PassportConfig? { - return Api.help.PassportConfig.passportConfigNotModified + public static func parse_inputPaymentCredentialsSaved(_ reader: BufferReader) -> InputPaymentCredentials? { + var _1: String? + _1 = parseString(reader) + var _2: Buffer? + _2 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputPaymentCredentials.inputPaymentCredentialsSaved(id: _1!, tmpPassword: _2!) + } + else { + return nil + } } - public static func parse_passportConfig(_ reader: BufferReader) -> PassportConfig? { + public static func parse_inputPaymentCredentials(_ reader: BufferReader) -> InputPaymentCredentials? { var _1: Int32? _1 = reader.readInt32() var _2: Api.DataJSON? @@ -1894,7 +17539,33 @@ public struct help { let _c1 = _1 != nil let _c2 = _2 != nil if _c1 && _c2 { - return Api.help.PassportConfig.passportConfig(hash: _1!, countriesLangs: _2!) + return Api.InputPaymentCredentials.inputPaymentCredentials(flags: _1!, data: _2!) + } + else { + return nil + } + } + public static func parse_inputPaymentCredentialsApplePay(_ reader: BufferReader) -> InputPaymentCredentials? { + var _1: Api.DataJSON? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.DataJSON + } + let _c1 = _1 != nil + if _c1 { + return Api.InputPaymentCredentials.inputPaymentCredentialsApplePay(paymentData: _1!) + } + else { + return nil + } + } + public static func parse_inputPaymentCredentialsGooglePay(_ reader: BufferReader) -> InputPaymentCredentials? { + var _1: Api.DataJSON? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.DataJSON + } + let _c1 = _1 != nil + if _c1 { + return Api.InputPaymentCredentials.inputPaymentCredentialsGooglePay(paymentToken: _1!) } else { return nil @@ -1902,21 +17573,1488 @@ public struct help { } } - public enum DeepLinkInfo: TypeConstructorDescription { - case deepLinkInfoEmpty - case deepLinkInfo(flags: Int32, message: String, entities: [Api.MessageEntity]?) + public enum ShippingOption: TypeConstructorDescription { + case shippingOption(id: String, title: String, prices: [Api.LabeledPrice]) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .deepLinkInfoEmpty: + case .shippingOption(let id, let title, let prices): if boxed { - buffer.appendInt32(1722786150) + buffer.appendInt32(-1239335713) + } + serializeString(id, buffer: buffer, boxed: false) + serializeString(title, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(prices.count)) + for item in prices { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .shippingOption(let id, let title, let prices): + return ("shippingOption", [("id", id), ("title", title), ("prices", prices)]) + } + } + + public static func parse_shippingOption(_ reader: BufferReader) -> ShippingOption? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) + var _3: [Api.LabeledPrice]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.LabeledPrice.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.ShippingOption.shippingOption(id: _1!, title: _2!, prices: _3!) + } + else { + return nil + } + } + + } + public enum InputSecureFile: TypeConstructorDescription { + case inputSecureFileUploaded(id: Int64, parts: Int32, md5Checksum: String, fileHash: Buffer, secret: Buffer) + case inputSecureFile(id: Int64, accessHash: Int64) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputSecureFileUploaded(let id, let parts, let md5Checksum, let fileHash, let secret): + if boxed { + buffer.appendInt32(859091184) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt32(parts, buffer: buffer, boxed: false) + serializeString(md5Checksum, buffer: buffer, boxed: false) + serializeBytes(fileHash, buffer: buffer, boxed: false) + serializeBytes(secret, buffer: buffer, boxed: false) + break + case .inputSecureFile(let id, let accessHash): + if boxed { + buffer.appendInt32(1399317950) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputSecureFileUploaded(let id, let parts, let md5Checksum, let fileHash, let secret): + return ("inputSecureFileUploaded", [("id", id), ("parts", parts), ("md5Checksum", md5Checksum), ("fileHash", fileHash), ("secret", secret)]) + case .inputSecureFile(let id, let accessHash): + return ("inputSecureFile", [("id", id), ("accessHash", accessHash)]) + } + } + + public static func parse_inputSecureFileUploaded(_ reader: BufferReader) -> InputSecureFile? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int32? + _2 = reader.readInt32() + var _3: String? + _3 = parseString(reader) + var _4: Buffer? + _4 = parseBytes(reader) + var _5: Buffer? + _5 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.InputSecureFile.inputSecureFileUploaded(id: _1!, parts: _2!, md5Checksum: _3!, fileHash: _4!, secret: _5!) + } + else { + return nil + } + } + public static func parse_inputSecureFile(_ reader: BufferReader) -> InputSecureFile? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputSecureFile.inputSecureFile(id: _1!, accessHash: _2!) + } + else { + return nil + } + } + + } + public enum PostAddress: TypeConstructorDescription { + case postAddress(streetLine1: String, streetLine2: String, city: String, state: String, countryIso2: String, postCode: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .postAddress(let streetLine1, let streetLine2, let city, let state, let countryIso2, let postCode): + if boxed { + buffer.appendInt32(512535275) + } + serializeString(streetLine1, buffer: buffer, boxed: false) + serializeString(streetLine2, buffer: buffer, boxed: false) + serializeString(city, buffer: buffer, boxed: false) + serializeString(state, buffer: buffer, boxed: false) + serializeString(countryIso2, buffer: buffer, boxed: false) + serializeString(postCode, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .postAddress(let streetLine1, let streetLine2, let city, let state, let countryIso2, let postCode): + return ("postAddress", [("streetLine1", streetLine1), ("streetLine2", streetLine2), ("city", city), ("state", state), ("countryIso2", countryIso2), ("postCode", postCode)]) + } + } + + public static func parse_postAddress(_ reader: BufferReader) -> PostAddress? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + var _5: String? + _5 = parseString(reader) + var _6: String? + _6 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.PostAddress.postAddress(streetLine1: _1!, streetLine2: _2!, city: _3!, state: _4!, countryIso2: _5!, postCode: _6!) + } + else { + return nil + } + } + + } + public enum InputFolderPeer: TypeConstructorDescription { + case inputFolderPeer(peer: Api.InputPeer, folderId: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputFolderPeer(let peer, let folderId): + if boxed { + buffer.appendInt32(-70073706) + } + peer.serialize(buffer, true) + serializeInt32(folderId, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputFolderPeer(let peer, let folderId): + return ("inputFolderPeer", [("peer", peer), ("folderId", folderId)]) + } + } + + public static func parse_inputFolderPeer(_ reader: BufferReader) -> InputFolderPeer? { + var _1: Api.InputPeer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputPeer + } + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputFolderPeer.inputFolderPeer(peer: _1!, folderId: _2!) + } + else { + return nil + } + } + + } + public enum DataJSON: TypeConstructorDescription { + case dataJSON(data: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .dataJSON(let data): + if boxed { + buffer.appendInt32(2104790276) + } + serializeString(data, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .dataJSON(let data): + return ("dataJSON", [("data", data)]) + } + } + + public static func parse_dataJSON(_ reader: BufferReader) -> DataJSON? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.DataJSON.dataJSON(data: _1!) + } + else { + return nil + } + } + + } + public enum InputWallPaper: TypeConstructorDescription { + case inputWallPaper(id: Int64, accessHash: Int64) + case inputWallPaperSlug(slug: String) + case inputWallPaperNoFile + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputWallPaper(let id, let accessHash): + if boxed { + buffer.appendInt32(-433014407) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + break + case .inputWallPaperSlug(let slug): + if boxed { + buffer.appendInt32(1913199744) + } + serializeString(slug, buffer: buffer, boxed: false) + break + case .inputWallPaperNoFile: + if boxed { + buffer.appendInt32(-2077770836) } break - case .deepLinkInfo(let flags, let message, let entities): + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputWallPaper(let id, let accessHash): + return ("inputWallPaper", [("id", id), ("accessHash", accessHash)]) + case .inputWallPaperSlug(let slug): + return ("inputWallPaperSlug", [("slug", slug)]) + case .inputWallPaperNoFile: + return ("inputWallPaperNoFile", []) + } + } + + public static func parse_inputWallPaper(_ reader: BufferReader) -> InputWallPaper? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputWallPaper.inputWallPaper(id: _1!, accessHash: _2!) + } + else { + return nil + } + } + public static func parse_inputWallPaperSlug(_ reader: BufferReader) -> InputWallPaper? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.InputWallPaper.inputWallPaperSlug(slug: _1!) + } + else { + return nil + } + } + public static func parse_inputWallPaperNoFile(_ reader: BufferReader) -> InputWallPaper? { + return Api.InputWallPaper.inputWallPaperNoFile + } + + } + public enum InputThemeSettings: TypeConstructorDescription { + case inputThemeSettings(flags: Int32, baseTheme: Api.BaseTheme, accentColor: Int32, messageTopColor: Int32?, messageBottomColor: Int32?, wallpaper: Api.InputWallPaper?, wallpaperSettings: Api.WallPaperSettings?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputThemeSettings(let flags, let baseTheme, let accentColor, let messageTopColor, let messageBottomColor, let wallpaper, let wallpaperSettings): if boxed { - buffer.appendInt32(1783556146) + buffer.appendInt32(-1118798639) + } + serializeInt32(flags, buffer: buffer, boxed: false) + baseTheme.serialize(buffer, true) + serializeInt32(accentColor, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(messageTopColor!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(messageBottomColor!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {wallpaper!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {wallpaperSettings!.serialize(buffer, true)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputThemeSettings(let flags, let baseTheme, let accentColor, let messageTopColor, let messageBottomColor, let wallpaper, let wallpaperSettings): + return ("inputThemeSettings", [("flags", flags), ("baseTheme", baseTheme), ("accentColor", accentColor), ("messageTopColor", messageTopColor), ("messageBottomColor", messageBottomColor), ("wallpaper", wallpaper), ("wallpaperSettings", wallpaperSettings)]) + } + } + + public static func parse_inputThemeSettings(_ reader: BufferReader) -> InputThemeSettings? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.BaseTheme? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.BaseTheme + } + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_4 = reader.readInt32() } + var _5: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_5 = reader.readInt32() } + var _6: Api.InputWallPaper? + if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.InputWallPaper + } } + var _7: Api.WallPaperSettings? + if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.WallPaperSettings + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.InputThemeSettings.inputThemeSettings(flags: _1!, baseTheme: _2!, accentColor: _3!, messageTopColor: _4, messageBottomColor: _5, wallpaper: _6, wallpaperSettings: _7) + } + else { + return nil + } + } + + } + public enum InputStickeredMedia: TypeConstructorDescription { + case inputStickeredMediaPhoto(id: Api.InputPhoto) + case inputStickeredMediaDocument(id: Api.InputDocument) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputStickeredMediaPhoto(let id): + if boxed { + buffer.appendInt32(1251549527) + } + id.serialize(buffer, true) + break + case .inputStickeredMediaDocument(let id): + if boxed { + buffer.appendInt32(70813275) + } + id.serialize(buffer, true) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputStickeredMediaPhoto(let id): + return ("inputStickeredMediaPhoto", [("id", id)]) + case .inputStickeredMediaDocument(let id): + return ("inputStickeredMediaDocument", [("id", id)]) + } + } + + public static func parse_inputStickeredMediaPhoto(_ reader: BufferReader) -> InputStickeredMedia? { + var _1: Api.InputPhoto? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputPhoto + } + let _c1 = _1 != nil + if _c1 { + return Api.InputStickeredMedia.inputStickeredMediaPhoto(id: _1!) + } + else { + return nil + } + } + public static func parse_inputStickeredMediaDocument(_ reader: BufferReader) -> InputStickeredMedia? { + var _1: Api.InputDocument? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputDocument + } + let _c1 = _1 != nil + if _c1 { + return Api.InputStickeredMedia.inputStickeredMediaDocument(id: _1!) + } + else { + return nil + } + } + + } + public enum WebPageAttribute: TypeConstructorDescription { + case webPageAttributeTheme(flags: Int32, documents: [Api.Document]?, settings: Api.ThemeSettings?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .webPageAttributeTheme(let flags, let documents, let settings): + if boxed { + buffer.appendInt32(1421174295) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(documents!.count)) + for item in documents! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 1) != 0 {settings!.serialize(buffer, true)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .webPageAttributeTheme(let flags, let documents, let settings): + return ("webPageAttributeTheme", [("flags", flags), ("documents", documents), ("settings", settings)]) + } + } + + public static func parse_webPageAttributeTheme(_ reader: BufferReader) -> WebPageAttribute? { + var _1: Int32? + _1 = reader.readInt32() + var _2: [Api.Document]? + if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Document.self) + } } + var _3: Api.ThemeSettings? + if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.ThemeSettings + } } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.WebPageAttribute.webPageAttributeTheme(flags: _1!, documents: _2, settings: _3) + } + else { + return nil + } + } + + } + public enum PhoneCallDiscardReason: TypeConstructorDescription { + case phoneCallDiscardReasonMissed + case phoneCallDiscardReasonDisconnect + case phoneCallDiscardReasonHangup + case phoneCallDiscardReasonBusy + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .phoneCallDiscardReasonMissed: + if boxed { + buffer.appendInt32(-2048646399) + } + + break + case .phoneCallDiscardReasonDisconnect: + if boxed { + buffer.appendInt32(-527056480) + } + + break + case .phoneCallDiscardReasonHangup: + if boxed { + buffer.appendInt32(1471006352) + } + + break + case .phoneCallDiscardReasonBusy: + if boxed { + buffer.appendInt32(-84416311) + } + + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .phoneCallDiscardReasonMissed: + return ("phoneCallDiscardReasonMissed", []) + case .phoneCallDiscardReasonDisconnect: + return ("phoneCallDiscardReasonDisconnect", []) + case .phoneCallDiscardReasonHangup: + return ("phoneCallDiscardReasonHangup", []) + case .phoneCallDiscardReasonBusy: + return ("phoneCallDiscardReasonBusy", []) + } + } + + public static func parse_phoneCallDiscardReasonMissed(_ reader: BufferReader) -> PhoneCallDiscardReason? { + return Api.PhoneCallDiscardReason.phoneCallDiscardReasonMissed + } + public static func parse_phoneCallDiscardReasonDisconnect(_ reader: BufferReader) -> PhoneCallDiscardReason? { + return Api.PhoneCallDiscardReason.phoneCallDiscardReasonDisconnect + } + public static func parse_phoneCallDiscardReasonHangup(_ reader: BufferReader) -> PhoneCallDiscardReason? { + return Api.PhoneCallDiscardReason.phoneCallDiscardReasonHangup + } + public static func parse_phoneCallDiscardReasonBusy(_ reader: BufferReader) -> PhoneCallDiscardReason? { + return Api.PhoneCallDiscardReason.phoneCallDiscardReasonBusy + } + + } + public enum NearestDc: TypeConstructorDescription { + case nearestDc(country: String, thisDc: Int32, nearestDc: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .nearestDc(let country, let thisDc, let nearestDc): + if boxed { + buffer.appendInt32(-1910892683) + } + serializeString(country, buffer: buffer, boxed: false) + serializeInt32(thisDc, buffer: buffer, boxed: false) + serializeInt32(nearestDc, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .nearestDc(let country, let thisDc, let nearestDc): + return ("nearestDc", [("country", country), ("thisDc", thisDc), ("nearestDc", nearestDc)]) + } + } + + public static func parse_nearestDc(_ reader: BufferReader) -> NearestDc? { + var _1: String? + _1 = parseString(reader) + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.NearestDc.nearestDc(country: _1!, thisDc: _2!, nearestDc: _3!) + } + else { + return nil + } + } + + } + public enum JSONObjectValue: TypeConstructorDescription { + case jsonObjectValue(key: String, value: Api.JSONValue) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .jsonObjectValue(let key, let value): + if boxed { + buffer.appendInt32(-1059185703) + } + serializeString(key, buffer: buffer, boxed: false) + value.serialize(buffer, true) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .jsonObjectValue(let key, let value): + return ("jsonObjectValue", [("key", key), ("value", value)]) + } + } + + public static func parse_jsonObjectValue(_ reader: BufferReader) -> JSONObjectValue? { + var _1: String? + _1 = parseString(reader) + var _2: Api.JSONValue? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.JSONValue + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.JSONObjectValue.jsonObjectValue(key: _1!, value: _2!) + } + else { + return nil + } + } + + } + public enum InputWebDocument: TypeConstructorDescription { + case inputWebDocument(url: String, size: Int32, mimeType: String, attributes: [Api.DocumentAttribute]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputWebDocument(let url, let size, let mimeType, let attributes): + if boxed { + buffer.appendInt32(-1678949555) + } + serializeString(url, buffer: buffer, boxed: false) + serializeInt32(size, buffer: buffer, boxed: false) + serializeString(mimeType, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(attributes.count)) + for item in attributes { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputWebDocument(let url, let size, let mimeType, let attributes): + return ("inputWebDocument", [("url", url), ("size", size), ("mimeType", mimeType), ("attributes", attributes)]) + } + } + + public static func parse_inputWebDocument(_ reader: BufferReader) -> InputWebDocument? { + var _1: String? + _1 = parseString(reader) + var _2: Int32? + _2 = reader.readInt32() + var _3: String? + _3 = parseString(reader) + var _4: [Api.DocumentAttribute]? + if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DocumentAttribute.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputWebDocument.inputWebDocument(url: _1!, size: _2!, mimeType: _3!, attributes: _4!) + } + else { + return nil + } + } + + } + public enum ChannelAdminLogEvent: TypeConstructorDescription { + case channelAdminLogEvent(id: Int64, date: Int32, userId: Int32, action: Api.ChannelAdminLogEventAction) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .channelAdminLogEvent(let id, let date, let userId, let action): + if boxed { + buffer.appendInt32(995769920) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + action.serialize(buffer, true) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .channelAdminLogEvent(let id, let date, let userId, let action): + return ("channelAdminLogEvent", [("id", id), ("date", date), ("userId", userId), ("action", action)]) + } + } + + public static func parse_channelAdminLogEvent(_ reader: BufferReader) -> ChannelAdminLogEvent? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: Api.ChannelAdminLogEventAction? + if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.ChannelAdminLogEventAction + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.ChannelAdminLogEvent.channelAdminLogEvent(id: _1!, date: _2!, userId: _3!, action: _4!) + } + else { + return nil + } + } + + } + public enum Bool: TypeConstructorDescription { + case boolFalse + case boolTrue + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .boolFalse: + if boxed { + buffer.appendInt32(-1132882121) + } + + break + case .boolTrue: + if boxed { + buffer.appendInt32(-1720552011) + } + + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .boolFalse: + return ("boolFalse", []) + case .boolTrue: + return ("boolTrue", []) + } + } + + public static func parse_boolFalse(_ reader: BufferReader) -> Bool? { + return Api.Bool.boolFalse + } + public static func parse_boolTrue(_ reader: BufferReader) -> Bool? { + return Api.Bool.boolTrue + } + + } + public enum LangPackString: TypeConstructorDescription { + case langPackString(key: String, value: String) + case langPackStringPluralized(flags: Int32, key: String, zeroValue: String?, oneValue: String?, twoValue: String?, fewValue: String?, manyValue: String?, otherValue: String) + case langPackStringDeleted(key: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .langPackString(let key, let value): + if boxed { + buffer.appendInt32(-892239370) + } + serializeString(key, buffer: buffer, boxed: false) + serializeString(value, buffer: buffer, boxed: false) + break + case .langPackStringPluralized(let flags, let key, let zeroValue, let oneValue, let twoValue, let fewValue, let manyValue, let otherValue): + if boxed { + buffer.appendInt32(1816636575) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(key, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeString(zeroValue!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeString(oneValue!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeString(twoValue!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeString(fewValue!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 4) != 0 {serializeString(manyValue!, buffer: buffer, boxed: false)} + serializeString(otherValue, buffer: buffer, boxed: false) + break + case .langPackStringDeleted(let key): + if boxed { + buffer.appendInt32(695856818) + } + serializeString(key, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .langPackString(let key, let value): + return ("langPackString", [("key", key), ("value", value)]) + case .langPackStringPluralized(let flags, let key, let zeroValue, let oneValue, let twoValue, let fewValue, let manyValue, let otherValue): + return ("langPackStringPluralized", [("flags", flags), ("key", key), ("zeroValue", zeroValue), ("oneValue", oneValue), ("twoValue", twoValue), ("fewValue", fewValue), ("manyValue", manyValue), ("otherValue", otherValue)]) + case .langPackStringDeleted(let key): + return ("langPackStringDeleted", [("key", key)]) + } + } + + public static func parse_langPackString(_ reader: BufferReader) -> LangPackString? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.LangPackString.langPackString(key: _1!, value: _2!) + } + else { + return nil + } + } + public static func parse_langPackStringPluralized(_ reader: BufferReader) -> LangPackString? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: String? + if Int(_1!) & Int(1 << 0) != 0 {_3 = parseString(reader) } + var _4: String? + if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } + var _5: String? + if Int(_1!) & Int(1 << 2) != 0 {_5 = parseString(reader) } + var _6: String? + if Int(_1!) & Int(1 << 3) != 0 {_6 = parseString(reader) } + var _7: String? + if Int(_1!) & Int(1 << 4) != 0 {_7 = parseString(reader) } + var _8: String? + _8 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil + let _c8 = _8 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { + return Api.LangPackString.langPackStringPluralized(flags: _1!, key: _2!, zeroValue: _3, oneValue: _4, twoValue: _5, fewValue: _6, manyValue: _7, otherValue: _8!) + } + else { + return nil + } + } + public static func parse_langPackStringDeleted(_ reader: BufferReader) -> LangPackString? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.LangPackString.langPackStringDeleted(key: _1!) + } + else { + return nil + } + } + + } + public enum InputWebFileLocation: TypeConstructorDescription { + case inputWebFileLocation(url: String, accessHash: Int64) + case inputWebFileGeoMessageLocation(peer: Api.InputPeer, msgId: Int32, w: Int32, h: Int32, zoom: Int32, scale: Int32) + case inputWebFileGeoPointLocation(geoPoint: Api.InputGeoPoint, accessHash: Int64, w: Int32, h: Int32, zoom: Int32, scale: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputWebFileLocation(let url, let accessHash): + if boxed { + buffer.appendInt32(-1036396922) + } + serializeString(url, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + break + case .inputWebFileGeoMessageLocation(let peer, let msgId, let w, let h, let zoom, let scale): + if boxed { + buffer.appendInt32(1430205163) + } + peer.serialize(buffer, true) + serializeInt32(msgId, buffer: buffer, boxed: false) + serializeInt32(w, buffer: buffer, boxed: false) + serializeInt32(h, buffer: buffer, boxed: false) + serializeInt32(zoom, buffer: buffer, boxed: false) + serializeInt32(scale, buffer: buffer, boxed: false) + break + case .inputWebFileGeoPointLocation(let geoPoint, let accessHash, let w, let h, let zoom, let scale): + if boxed { + buffer.appendInt32(-1625153079) + } + geoPoint.serialize(buffer, true) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeInt32(w, buffer: buffer, boxed: false) + serializeInt32(h, buffer: buffer, boxed: false) + serializeInt32(zoom, buffer: buffer, boxed: false) + serializeInt32(scale, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputWebFileLocation(let url, let accessHash): + return ("inputWebFileLocation", [("url", url), ("accessHash", accessHash)]) + case .inputWebFileGeoMessageLocation(let peer, let msgId, let w, let h, let zoom, let scale): + return ("inputWebFileGeoMessageLocation", [("peer", peer), ("msgId", msgId), ("w", w), ("h", h), ("zoom", zoom), ("scale", scale)]) + case .inputWebFileGeoPointLocation(let geoPoint, let accessHash, let w, let h, let zoom, let scale): + return ("inputWebFileGeoPointLocation", [("geoPoint", geoPoint), ("accessHash", accessHash), ("w", w), ("h", h), ("zoom", zoom), ("scale", scale)]) + } + } + + public static func parse_inputWebFileLocation(_ reader: BufferReader) -> InputWebFileLocation? { + var _1: String? + _1 = parseString(reader) + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.InputWebFileLocation.inputWebFileLocation(url: _1!, accessHash: _2!) + } + else { + return nil + } + } + public static func parse_inputWebFileGeoMessageLocation(_ reader: BufferReader) -> InputWebFileLocation? { + var _1: Api.InputPeer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputPeer + } + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + var _6: Int32? + _6 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.InputWebFileLocation.inputWebFileGeoMessageLocation(peer: _1!, msgId: _2!, w: _3!, h: _4!, zoom: _5!, scale: _6!) + } + else { + return nil + } + } + public static func parse_inputWebFileGeoPointLocation(_ reader: BufferReader) -> InputWebFileLocation? { + var _1: Api.InputGeoPoint? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputGeoPoint + } + var _2: Int64? + _2 = reader.readInt64() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + var _6: Int32? + _6 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.InputWebFileLocation.inputWebFileGeoPointLocation(geoPoint: _1!, accessHash: _2!, w: _3!, h: _4!, zoom: _5!, scale: _6!) + } + else { + return nil + } + } + + } + public enum MessageFwdHeader: TypeConstructorDescription { + case messageFwdHeader(flags: Int32, fromId: Api.Peer?, fromName: String?, date: Int32, channelPost: Int32?, postAuthor: String?, savedFromPeer: Api.Peer?, savedFromMsgId: Int32?, psaType: String?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .messageFwdHeader(let flags, let fromId, let fromName, let date, let channelPost, let postAuthor, let savedFromPeer, let savedFromMsgId, let psaType): + if boxed { + buffer.appendInt32(1601666510) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {fromId!.serialize(buffer, true)} + if Int(flags) & Int(1 << 5) != 0 {serializeString(fromName!, buffer: buffer, boxed: false)} + serializeInt32(date, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(channelPost!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeString(postAuthor!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 4) != 0 {savedFromPeer!.serialize(buffer, true)} + if Int(flags) & Int(1 << 4) != 0 {serializeInt32(savedFromMsgId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 6) != 0 {serializeString(psaType!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .messageFwdHeader(let flags, let fromId, let fromName, let date, let channelPost, let postAuthor, let savedFromPeer, let savedFromMsgId, let psaType): + return ("messageFwdHeader", [("flags", flags), ("fromId", fromId), ("fromName", fromName), ("date", date), ("channelPost", channelPost), ("postAuthor", postAuthor), ("savedFromPeer", savedFromPeer), ("savedFromMsgId", savedFromMsgId), ("psaType", psaType)]) + } + } + + public static func parse_messageFwdHeader(_ reader: BufferReader) -> MessageFwdHeader? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.Peer? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Peer + } } + var _3: String? + if Int(_1!) & Int(1 << 5) != 0 {_3 = parseString(reader) } + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_5 = reader.readInt32() } + var _6: String? + if Int(_1!) & Int(1 << 3) != 0 {_6 = parseString(reader) } + var _7: Api.Peer? + if Int(_1!) & Int(1 << 4) != 0 {if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.Peer + } } + var _8: Int32? + if Int(_1!) & Int(1 << 4) != 0 {_8 = reader.readInt32() } + var _9: String? + if Int(_1!) & Int(1 << 6) != 0 {_9 = parseString(reader) } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 5) == 0) || _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil + let _c8 = (Int(_1!) & Int(1 << 4) == 0) || _8 != nil + let _c9 = (Int(_1!) & Int(1 << 6) == 0) || _9 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { + return Api.MessageFwdHeader.messageFwdHeader(flags: _1!, fromId: _2, fromName: _3, date: _4!, channelPost: _5, postAuthor: _6, savedFromPeer: _7, savedFromMsgId: _8, psaType: _9) + } + else { + return nil + } + } + + } + public enum BaseTheme: TypeConstructorDescription { + case baseThemeClassic + case baseThemeDay + case baseThemeNight + case baseThemeTinted + case baseThemeArctic + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .baseThemeClassic: + if boxed { + buffer.appendInt32(-1012849566) + } + + break + case .baseThemeDay: + if boxed { + buffer.appendInt32(-69724536) + } + + break + case .baseThemeNight: + if boxed { + buffer.appendInt32(-1212997976) + } + + break + case .baseThemeTinted: + if boxed { + buffer.appendInt32(1834973166) + } + + break + case .baseThemeArctic: + if boxed { + buffer.appendInt32(1527845466) + } + + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .baseThemeClassic: + return ("baseThemeClassic", []) + case .baseThemeDay: + return ("baseThemeDay", []) + case .baseThemeNight: + return ("baseThemeNight", []) + case .baseThemeTinted: + return ("baseThemeTinted", []) + case .baseThemeArctic: + return ("baseThemeArctic", []) + } + } + + public static func parse_baseThemeClassic(_ reader: BufferReader) -> BaseTheme? { + return Api.BaseTheme.baseThemeClassic + } + public static func parse_baseThemeDay(_ reader: BufferReader) -> BaseTheme? { + return Api.BaseTheme.baseThemeDay + } + public static func parse_baseThemeNight(_ reader: BufferReader) -> BaseTheme? { + return Api.BaseTheme.baseThemeNight + } + public static func parse_baseThemeTinted(_ reader: BufferReader) -> BaseTheme? { + return Api.BaseTheme.baseThemeTinted + } + public static func parse_baseThemeArctic(_ reader: BufferReader) -> BaseTheme? { + return Api.BaseTheme.baseThemeArctic + } + + } + public enum MessagesFilter: TypeConstructorDescription { + case inputMessagesFilterEmpty + case inputMessagesFilterPhotos + case inputMessagesFilterVideo + case inputMessagesFilterPhotoVideo + case inputMessagesFilterPhotoVideoDocuments + case inputMessagesFilterDocument + case inputMessagesFilterUrl + case inputMessagesFilterGif + case inputMessagesFilterVoice + case inputMessagesFilterMusic + case inputMessagesFilterChatPhotos + case inputMessagesFilterPhoneCalls(flags: Int32) + case inputMessagesFilterRoundVoice + case inputMessagesFilterRoundVideo + case inputMessagesFilterMyMentions + case inputMessagesFilterMyMentionsUnread + case inputMessagesFilterGeo + case inputMessagesFilterContacts + case inputMessagesFilterPinned + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputMessagesFilterEmpty: + if boxed { + buffer.appendInt32(1474492012) + } + + break + case .inputMessagesFilterPhotos: + if boxed { + buffer.appendInt32(-1777752804) + } + + break + case .inputMessagesFilterVideo: + if boxed { + buffer.appendInt32(-1614803355) + } + + break + case .inputMessagesFilterPhotoVideo: + if boxed { + buffer.appendInt32(1458172132) + } + + break + case .inputMessagesFilterPhotoVideoDocuments: + if boxed { + buffer.appendInt32(-648121413) + } + + break + case .inputMessagesFilterDocument: + if boxed { + buffer.appendInt32(-1629621880) + } + + break + case .inputMessagesFilterUrl: + if boxed { + buffer.appendInt32(2129714567) + } + + break + case .inputMessagesFilterGif: + if boxed { + buffer.appendInt32(-3644025) + } + + break + case .inputMessagesFilterVoice: + if boxed { + buffer.appendInt32(1358283666) + } + + break + case .inputMessagesFilterMusic: + if boxed { + buffer.appendInt32(928101534) + } + + break + case .inputMessagesFilterChatPhotos: + if boxed { + buffer.appendInt32(975236280) + } + + break + case .inputMessagesFilterPhoneCalls(let flags): + if boxed { + buffer.appendInt32(-2134272152) + } + serializeInt32(flags, buffer: buffer, boxed: false) + break + case .inputMessagesFilterRoundVoice: + if boxed { + buffer.appendInt32(2054952868) + } + + break + case .inputMessagesFilterRoundVideo: + if boxed { + buffer.appendInt32(-1253451181) + } + + break + case .inputMessagesFilterMyMentions: + if boxed { + buffer.appendInt32(-1040652646) + } + + break + case .inputMessagesFilterMyMentionsUnread: + if boxed { + buffer.appendInt32(1187706024) + } + + break + case .inputMessagesFilterGeo: + if boxed { + buffer.appendInt32(-419271411) + } + + break + case .inputMessagesFilterContacts: + if boxed { + buffer.appendInt32(-530392189) + } + + break + case .inputMessagesFilterPinned: + if boxed { + buffer.appendInt32(464520273) + } + + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputMessagesFilterEmpty: + return ("inputMessagesFilterEmpty", []) + case .inputMessagesFilterPhotos: + return ("inputMessagesFilterPhotos", []) + case .inputMessagesFilterVideo: + return ("inputMessagesFilterVideo", []) + case .inputMessagesFilterPhotoVideo: + return ("inputMessagesFilterPhotoVideo", []) + case .inputMessagesFilterPhotoVideoDocuments: + return ("inputMessagesFilterPhotoVideoDocuments", []) + case .inputMessagesFilterDocument: + return ("inputMessagesFilterDocument", []) + case .inputMessagesFilterUrl: + return ("inputMessagesFilterUrl", []) + case .inputMessagesFilterGif: + return ("inputMessagesFilterGif", []) + case .inputMessagesFilterVoice: + return ("inputMessagesFilterVoice", []) + case .inputMessagesFilterMusic: + return ("inputMessagesFilterMusic", []) + case .inputMessagesFilterChatPhotos: + return ("inputMessagesFilterChatPhotos", []) + case .inputMessagesFilterPhoneCalls(let flags): + return ("inputMessagesFilterPhoneCalls", [("flags", flags)]) + case .inputMessagesFilterRoundVoice: + return ("inputMessagesFilterRoundVoice", []) + case .inputMessagesFilterRoundVideo: + return ("inputMessagesFilterRoundVideo", []) + case .inputMessagesFilterMyMentions: + return ("inputMessagesFilterMyMentions", []) + case .inputMessagesFilterMyMentionsUnread: + return ("inputMessagesFilterMyMentionsUnread", []) + case .inputMessagesFilterGeo: + return ("inputMessagesFilterGeo", []) + case .inputMessagesFilterContacts: + return ("inputMessagesFilterContacts", []) + case .inputMessagesFilterPinned: + return ("inputMessagesFilterPinned", []) + } + } + + public static func parse_inputMessagesFilterEmpty(_ reader: BufferReader) -> MessagesFilter? { + return Api.MessagesFilter.inputMessagesFilterEmpty + } + public static func parse_inputMessagesFilterPhotos(_ reader: BufferReader) -> MessagesFilter? { + return Api.MessagesFilter.inputMessagesFilterPhotos + } + public static func parse_inputMessagesFilterVideo(_ reader: BufferReader) -> MessagesFilter? { + return Api.MessagesFilter.inputMessagesFilterVideo + } + public static func parse_inputMessagesFilterPhotoVideo(_ reader: BufferReader) -> MessagesFilter? { + return Api.MessagesFilter.inputMessagesFilterPhotoVideo + } + public static func parse_inputMessagesFilterPhotoVideoDocuments(_ reader: BufferReader) -> MessagesFilter? { + return Api.MessagesFilter.inputMessagesFilterPhotoVideoDocuments + } + public static func parse_inputMessagesFilterDocument(_ reader: BufferReader) -> MessagesFilter? { + return Api.MessagesFilter.inputMessagesFilterDocument + } + public static func parse_inputMessagesFilterUrl(_ reader: BufferReader) -> MessagesFilter? { + return Api.MessagesFilter.inputMessagesFilterUrl + } + public static func parse_inputMessagesFilterGif(_ reader: BufferReader) -> MessagesFilter? { + return Api.MessagesFilter.inputMessagesFilterGif + } + public static func parse_inputMessagesFilterVoice(_ reader: BufferReader) -> MessagesFilter? { + return Api.MessagesFilter.inputMessagesFilterVoice + } + public static func parse_inputMessagesFilterMusic(_ reader: BufferReader) -> MessagesFilter? { + return Api.MessagesFilter.inputMessagesFilterMusic + } + public static func parse_inputMessagesFilterChatPhotos(_ reader: BufferReader) -> MessagesFilter? { + return Api.MessagesFilter.inputMessagesFilterChatPhotos + } + public static func parse_inputMessagesFilterPhoneCalls(_ reader: BufferReader) -> MessagesFilter? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.MessagesFilter.inputMessagesFilterPhoneCalls(flags: _1!) + } + else { + return nil + } + } + public static func parse_inputMessagesFilterRoundVoice(_ reader: BufferReader) -> MessagesFilter? { + return Api.MessagesFilter.inputMessagesFilterRoundVoice + } + public static func parse_inputMessagesFilterRoundVideo(_ reader: BufferReader) -> MessagesFilter? { + return Api.MessagesFilter.inputMessagesFilterRoundVideo + } + public static func parse_inputMessagesFilterMyMentions(_ reader: BufferReader) -> MessagesFilter? { + return Api.MessagesFilter.inputMessagesFilterMyMentions + } + public static func parse_inputMessagesFilterMyMentionsUnread(_ reader: BufferReader) -> MessagesFilter? { + return Api.MessagesFilter.inputMessagesFilterMyMentionsUnread + } + public static func parse_inputMessagesFilterGeo(_ reader: BufferReader) -> MessagesFilter? { + return Api.MessagesFilter.inputMessagesFilterGeo + } + public static func parse_inputMessagesFilterContacts(_ reader: BufferReader) -> MessagesFilter? { + return Api.MessagesFilter.inputMessagesFilterContacts + } + public static func parse_inputMessagesFilterPinned(_ reader: BufferReader) -> MessagesFilter? { + return Api.MessagesFilter.inputMessagesFilterPinned + } + + } + public enum EmojiKeyword: TypeConstructorDescription { + case emojiKeyword(keyword: String, emoticons: [String]) + case emojiKeywordDeleted(keyword: String, emoticons: [String]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .emojiKeyword(let keyword, let emoticons): + if boxed { + buffer.appendInt32(-709641735) + } + serializeString(keyword, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(emoticons.count)) + for item in emoticons { + serializeString(item, buffer: buffer, boxed: false) + } + break + case .emojiKeywordDeleted(let keyword, let emoticons): + if boxed { + buffer.appendInt32(594408994) + } + serializeString(keyword, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(emoticons.count)) + for item in emoticons { + serializeString(item, buffer: buffer, boxed: false) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .emojiKeyword(let keyword, let emoticons): + return ("emojiKeyword", [("keyword", keyword), ("emoticons", emoticons)]) + case .emojiKeywordDeleted(let keyword, let emoticons): + return ("emojiKeywordDeleted", [("keyword", keyword), ("emoticons", emoticons)]) + } + } + + public static func parse_emojiKeyword(_ reader: BufferReader) -> EmojiKeyword? { + var _1: String? + _1 = parseString(reader) + var _2: [String]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.EmojiKeyword.emojiKeyword(keyword: _1!, emoticons: _2!) + } + else { + return nil + } + } + public static func parse_emojiKeywordDeleted(_ reader: BufferReader) -> EmojiKeyword? { + var _1: String? + _1 = parseString(reader) + var _2: [String]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.EmojiKeyword.emojiKeywordDeleted(keyword: _1!, emoticons: _2!) + } + else { + return nil + } + } + + } + public enum BotInlineMessage: TypeConstructorDescription { + case botInlineMessageText(flags: Int32, message: String, entities: [Api.MessageEntity]?, replyMarkup: Api.ReplyMarkup?) + case botInlineMessageMediaAuto(flags: Int32, message: String, entities: [Api.MessageEntity]?, replyMarkup: Api.ReplyMarkup?) + case botInlineMessageMediaVenue(flags: Int32, geo: Api.GeoPoint, title: String, address: String, provider: String, venueId: String, venueType: String, replyMarkup: Api.ReplyMarkup?) + case botInlineMessageMediaContact(flags: Int32, phoneNumber: String, firstName: String, lastName: String, vcard: String, replyMarkup: Api.ReplyMarkup?) + case botInlineMessageMediaGeo(flags: Int32, geo: Api.GeoPoint, heading: Int32?, period: Int32?, proximityNotificationRadius: Int32?, replyMarkup: Api.ReplyMarkup?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .botInlineMessageText(let flags, let message, let entities, let replyMarkup): + if boxed { + buffer.appendInt32(-1937807902) } serializeInt32(flags, buffer: buffer, boxed: false) serializeString(message, buffer: buffer, boxed: false) @@ -1925,23 +19063,75 @@ public struct help { for item in entities! { item.serialize(buffer, true) }} + if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} + break + case .botInlineMessageMediaAuto(let flags, let message, let entities, let replyMarkup): + if boxed { + buffer.appendInt32(1984755728) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(message, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities!.count)) + for item in entities! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} + break + case .botInlineMessageMediaVenue(let flags, let geo, let title, let address, let provider, let venueId, let venueType, let replyMarkup): + if boxed { + buffer.appendInt32(-1970903652) + } + serializeInt32(flags, buffer: buffer, boxed: false) + geo.serialize(buffer, true) + serializeString(title, buffer: buffer, boxed: false) + serializeString(address, buffer: buffer, boxed: false) + serializeString(provider, buffer: buffer, boxed: false) + serializeString(venueId, buffer: buffer, boxed: false) + serializeString(venueType, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} + break + case .botInlineMessageMediaContact(let flags, let phoneNumber, let firstName, let lastName, let vcard, let replyMarkup): + if boxed { + buffer.appendInt32(416402882) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(phoneNumber, buffer: buffer, boxed: false) + serializeString(firstName, buffer: buffer, boxed: false) + serializeString(lastName, buffer: buffer, boxed: false) + serializeString(vcard, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} + break + case .botInlineMessageMediaGeo(let flags, let geo, let heading, let period, let proximityNotificationRadius, let replyMarkup): + if boxed { + buffer.appendInt32(85477117) + } + serializeInt32(flags, buffer: buffer, boxed: false) + geo.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(heading!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(period!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeInt32(proximityNotificationRadius!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} break } } public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .deepLinkInfoEmpty: - return ("deepLinkInfoEmpty", []) - case .deepLinkInfo(let flags, let message, let entities): - return ("deepLinkInfo", [("flags", flags), ("message", message), ("entities", entities)]) + case .botInlineMessageText(let flags, let message, let entities, let replyMarkup): + return ("botInlineMessageText", [("flags", flags), ("message", message), ("entities", entities), ("replyMarkup", replyMarkup)]) + case .botInlineMessageMediaAuto(let flags, let message, let entities, let replyMarkup): + return ("botInlineMessageMediaAuto", [("flags", flags), ("message", message), ("entities", entities), ("replyMarkup", replyMarkup)]) + case .botInlineMessageMediaVenue(let flags, let geo, let title, let address, let provider, let venueId, let venueType, let replyMarkup): + return ("botInlineMessageMediaVenue", [("flags", flags), ("geo", geo), ("title", title), ("address", address), ("provider", provider), ("venueId", venueId), ("venueType", venueType), ("replyMarkup", replyMarkup)]) + case .botInlineMessageMediaContact(let flags, let phoneNumber, let firstName, let lastName, let vcard, let replyMarkup): + return ("botInlineMessageMediaContact", [("flags", flags), ("phoneNumber", phoneNumber), ("firstName", firstName), ("lastName", lastName), ("vcard", vcard), ("replyMarkup", replyMarkup)]) + case .botInlineMessageMediaGeo(let flags, let geo, let heading, let period, let proximityNotificationRadius, let replyMarkup): + return ("botInlineMessageMediaGeo", [("flags", flags), ("geo", geo), ("heading", heading), ("period", period), ("proximityNotificationRadius", proximityNotificationRadius), ("replyMarkup", replyMarkup)]) } } - public static func parse_deepLinkInfoEmpty(_ reader: BufferReader) -> DeepLinkInfo? { - return Api.help.DeepLinkInfo.deepLinkInfoEmpty - } - public static func parse_deepLinkInfo(_ reader: BufferReader) -> DeepLinkInfo? { + public static func parse_botInlineMessageText(_ reader: BufferReader) -> BotInlineMessage? { var _1: Int32? _1 = reader.readInt32() var _2: String? @@ -1950,69 +19140,134 @@ public struct help { if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } } + var _4: Api.ReplyMarkup? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup + } } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.help.DeepLinkInfo.deepLinkInfo(flags: _1!, message: _2!, entities: _3) + let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.BotInlineMessage.botInlineMessageText(flags: _1!, message: _2!, entities: _3, replyMarkup: _4) } else { return nil } } - - } - public enum TermsOfService: TypeConstructorDescription { - case termsOfService(flags: Int32, id: Api.DataJSON, text: String, entities: [Api.MessageEntity], minAgeConfirm: Int32?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .termsOfService(let flags, let id, let text, let entities, let minAgeConfirm): - if boxed { - buffer.appendInt32(2013922064) - } - serializeInt32(flags, buffer: buffer, boxed: false) - id.serialize(buffer, true) - serializeString(text, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities.count)) - for item in entities { - item.serialize(buffer, true) - } - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(minAgeConfirm!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .termsOfService(let flags, let id, let text, let entities, let minAgeConfirm): - return ("termsOfService", [("flags", flags), ("id", id), ("text", text), ("entities", entities), ("minAgeConfirm", minAgeConfirm)]) - } - } - - public static func parse_termsOfService(_ reader: BufferReader) -> TermsOfService? { + public static func parse_botInlineMessageMediaAuto(_ reader: BufferReader) -> BotInlineMessage? { var _1: Int32? _1 = reader.readInt32() - var _2: Api.DataJSON? + var _2: String? + _2 = parseString(reader) + var _3: [Api.MessageEntity]? + if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) + } } + var _4: Api.ReplyMarkup? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.BotInlineMessage.botInlineMessageMediaAuto(flags: _1!, message: _2!, entities: _3, replyMarkup: _4) + } + else { + return nil + } + } + public static func parse_botInlineMessageMediaVenue(_ reader: BufferReader) -> BotInlineMessage? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.GeoPoint? if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.DataJSON + _2 = Api.parse(reader, signature: signature) as? Api.GeoPoint } var _3: String? _3 = parseString(reader) - var _4: [Api.MessageEntity]? - if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) - } - var _5: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_5 = reader.readInt32() } + var _4: String? + _4 = parseString(reader) + var _5: String? + _5 = parseString(reader) + var _6: String? + _6 = parseString(reader) + var _7: String? + _7 = parseString(reader) + var _8: Api.ReplyMarkup? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _8 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup + } } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.help.TermsOfService.termsOfService(flags: _1!, id: _2!, text: _3!, entities: _4!, minAgeConfirm: _5) + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { + return Api.BotInlineMessage.botInlineMessageMediaVenue(flags: _1!, geo: _2!, title: _3!, address: _4!, provider: _5!, venueId: _6!, venueType: _7!, replyMarkup: _8) + } + else { + return nil + } + } + public static func parse_botInlineMessageMediaContact(_ reader: BufferReader) -> BotInlineMessage? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + var _5: String? + _5 = parseString(reader) + var _6: Api.ReplyMarkup? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.BotInlineMessage.botInlineMessageMediaContact(flags: _1!, phoneNumber: _2!, firstName: _3!, lastName: _4!, vcard: _5!, replyMarkup: _6) + } + else { + return nil + } + } + public static func parse_botInlineMessageMediaGeo(_ reader: BufferReader) -> BotInlineMessage? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.GeoPoint? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.GeoPoint + } + var _3: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } + var _4: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt32() } + var _5: Int32? + if Int(_1!) & Int(1 << 3) != 0 {_5 = reader.readInt32() } + var _6: Api.ReplyMarkup? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.BotInlineMessage.botInlineMessageMediaGeo(flags: _1!, geo: _2!, heading: _3, period: _4, proximityNotificationRadius: _5, replyMarkup: _6) } else { return nil @@ -2020,36 +19275,698 @@ public struct help { } } - public enum Country: TypeConstructorDescription { - case country(flags: Int32, iso2: String, defaultName: String, name: String?, countryCodes: [Api.help.CountryCode]) + public enum InputPeerNotifySettings: TypeConstructorDescription { + case inputPeerNotifySettings(flags: Int32, showPreviews: Api.Bool?, silent: Api.Bool?, muteUntil: Int32?, sound: String?) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .country(let flags, let iso2, let defaultName, let name, let countryCodes): + case .inputPeerNotifySettings(let flags, let showPreviews, let silent, let muteUntil, let sound): if boxed { - buffer.appendInt32(-1014526429) + buffer.appendInt32(-1673717362) } serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(iso2, buffer: buffer, boxed: false) - serializeString(defaultName, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeString(name!, buffer: buffer, boxed: false)} - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(countryCodes.count)) - for item in countryCodes { - item.serialize(buffer, true) - } + if Int(flags) & Int(1 << 0) != 0 {showPreviews!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {silent!.serialize(buffer, true)} + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(muteUntil!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeString(sound!, buffer: buffer, boxed: false)} break } } public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .country(let flags, let iso2, let defaultName, let name, let countryCodes): - return ("country", [("flags", flags), ("iso2", iso2), ("defaultName", defaultName), ("name", name), ("countryCodes", countryCodes)]) + case .inputPeerNotifySettings(let flags, let showPreviews, let silent, let muteUntil, let sound): + return ("inputPeerNotifySettings", [("flags", flags), ("showPreviews", showPreviews), ("silent", silent), ("muteUntil", muteUntil), ("sound", sound)]) } } - public static func parse_country(_ reader: BufferReader) -> Country? { + public static func parse_inputPeerNotifySettings(_ reader: BufferReader) -> InputPeerNotifySettings? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.Bool? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Bool + } } + var _3: Api.Bool? + if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.Bool + } } + var _4: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_4 = reader.readInt32() } + var _5: String? + if Int(_1!) & Int(1 << 3) != 0 {_5 = parseString(reader) } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.InputPeerNotifySettings.inputPeerNotifySettings(flags: _1!, showPreviews: _2, silent: _3, muteUntil: _4, sound: _5) + } + else { + return nil + } + } + + } + public enum ExportedChatInvite: TypeConstructorDescription { + case chatInviteExported(flags: Int32, link: String, adminId: Int32, date: Int32, startDate: Int32?, expireDate: Int32?, usageLimit: Int32?, usage: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .chatInviteExported(let flags, let link, let adminId, let date, let startDate, let expireDate, let usageLimit, let usage): + if boxed { + buffer.appendInt32(1847917725) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(link, buffer: buffer, boxed: false) + serializeInt32(adminId, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 4) != 0 {serializeInt32(startDate!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(expireDate!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(usageLimit!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeInt32(usage!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .chatInviteExported(let flags, let link, let adminId, let date, let startDate, let expireDate, let usageLimit, let usage): + return ("chatInviteExported", [("flags", flags), ("link", link), ("adminId", adminId), ("date", date), ("startDate", startDate), ("expireDate", expireDate), ("usageLimit", usageLimit), ("usage", usage)]) + } + } + + public static func parse_chatInviteExported(_ reader: BufferReader) -> ExportedChatInvite? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + if Int(_1!) & Int(1 << 4) != 0 {_5 = reader.readInt32() } + var _6: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_6 = reader.readInt32() } + var _7: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_7 = reader.readInt32() } + var _8: Int32? + if Int(_1!) & Int(1 << 3) != 0 {_8 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 4) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 2) == 0) || _7 != nil + let _c8 = (Int(_1!) & Int(1 << 3) == 0) || _8 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { + return Api.ExportedChatInvite.chatInviteExported(flags: _1!, link: _2!, adminId: _3!, date: _4!, startDate: _5, expireDate: _6, usageLimit: _7, usage: _8) + } + else { + return nil + } + } + + } + public enum Authorization: TypeConstructorDescription { + case authorization(flags: Int32, hash: Int64, deviceModel: String, platform: String, systemVersion: String, apiId: Int32, appName: String, appVersion: String, dateCreated: Int32, dateActive: Int32, ip: String, country: String, region: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .authorization(let flags, let hash, let deviceModel, let platform, let systemVersion, let apiId, let appName, let appVersion, let dateCreated, let dateActive, let ip, let country, let region): + if boxed { + buffer.appendInt32(-1392388579) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(hash, buffer: buffer, boxed: false) + serializeString(deviceModel, buffer: buffer, boxed: false) + serializeString(platform, buffer: buffer, boxed: false) + serializeString(systemVersion, buffer: buffer, boxed: false) + serializeInt32(apiId, buffer: buffer, boxed: false) + serializeString(appName, buffer: buffer, boxed: false) + serializeString(appVersion, buffer: buffer, boxed: false) + serializeInt32(dateCreated, buffer: buffer, boxed: false) + serializeInt32(dateActive, buffer: buffer, boxed: false) + serializeString(ip, buffer: buffer, boxed: false) + serializeString(country, buffer: buffer, boxed: false) + serializeString(region, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .authorization(let flags, let hash, let deviceModel, let platform, let systemVersion, let apiId, let appName, let appVersion, let dateCreated, let dateActive, let ip, let country, let region): + return ("authorization", [("flags", flags), ("hash", hash), ("deviceModel", deviceModel), ("platform", platform), ("systemVersion", systemVersion), ("apiId", apiId), ("appName", appName), ("appVersion", appVersion), ("dateCreated", dateCreated), ("dateActive", dateActive), ("ip", ip), ("country", country), ("region", region)]) + } + } + + public static func parse_authorization(_ reader: BufferReader) -> Authorization? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + var _5: String? + _5 = parseString(reader) + var _6: Int32? + _6 = reader.readInt32() + var _7: String? + _7 = parseString(reader) + var _8: String? + _8 = parseString(reader) + var _9: Int32? + _9 = reader.readInt32() + var _10: Int32? + _10 = reader.readInt32() + var _11: String? + _11 = parseString(reader) + var _12: String? + _12 = parseString(reader) + var _13: String? + _13 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = _8 != nil + let _c9 = _9 != nil + let _c10 = _10 != nil + let _c11 = _11 != nil + let _c12 = _12 != nil + let _c13 = _13 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 { + return Api.Authorization.authorization(flags: _1!, hash: _2!, deviceModel: _3!, platform: _4!, systemVersion: _5!, apiId: _6!, appName: _7!, appVersion: _8!, dateCreated: _9!, dateActive: _10!, ip: _11!, country: _12!, region: _13!) + } + else { + return nil + } + } + + } + public enum MaskCoords: TypeConstructorDescription { + case maskCoords(n: Int32, x: Double, y: Double, zoom: Double) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .maskCoords(let n, let x, let y, let zoom): + if boxed { + buffer.appendInt32(-1361650766) + } + serializeInt32(n, buffer: buffer, boxed: false) + serializeDouble(x, buffer: buffer, boxed: false) + serializeDouble(y, buffer: buffer, boxed: false) + serializeDouble(zoom, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .maskCoords(let n, let x, let y, let zoom): + return ("maskCoords", [("n", n), ("x", x), ("y", y), ("zoom", zoom)]) + } + } + + public static func parse_maskCoords(_ reader: BufferReader) -> MaskCoords? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Double? + _2 = reader.readDouble() + var _3: Double? + _3 = reader.readDouble() + var _4: Double? + _4 = reader.readDouble() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.MaskCoords.maskCoords(n: _1!, x: _2!, y: _3!, zoom: _4!) + } + else { + return nil + } + } + + } + public enum PhoneConnection: TypeConstructorDescription { + case phoneConnection(id: Int64, ip: String, ipv6: String, port: Int32, peerTag: Buffer) + case phoneConnectionWebrtc(flags: Int32, id: Int64, ip: String, ipv6: String, port: Int32, username: String, password: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .phoneConnection(let id, let ip, let ipv6, let port, let peerTag): + if boxed { + buffer.appendInt32(-1655957568) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeString(ip, buffer: buffer, boxed: false) + serializeString(ipv6, buffer: buffer, boxed: false) + serializeInt32(port, buffer: buffer, boxed: false) + serializeBytes(peerTag, buffer: buffer, boxed: false) + break + case .phoneConnectionWebrtc(let flags, let id, let ip, let ipv6, let port, let username, let password): + if boxed { + buffer.appendInt32(1667228533) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(id, buffer: buffer, boxed: false) + serializeString(ip, buffer: buffer, boxed: false) + serializeString(ipv6, buffer: buffer, boxed: false) + serializeInt32(port, buffer: buffer, boxed: false) + serializeString(username, buffer: buffer, boxed: false) + serializeString(password, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .phoneConnection(let id, let ip, let ipv6, let port, let peerTag): + return ("phoneConnection", [("id", id), ("ip", ip), ("ipv6", ipv6), ("port", port), ("peerTag", peerTag)]) + case .phoneConnectionWebrtc(let flags, let id, let ip, let ipv6, let port, let username, let password): + return ("phoneConnectionWebrtc", [("flags", flags), ("id", id), ("ip", ip), ("ipv6", ipv6), ("port", port), ("username", username), ("password", password)]) + } + } + + public static func parse_phoneConnection(_ reader: BufferReader) -> PhoneConnection? { + var _1: Int64? + _1 = reader.readInt64() + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: Int32? + _4 = reader.readInt32() + var _5: Buffer? + _5 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.PhoneConnection.phoneConnection(id: _1!, ip: _2!, ipv6: _3!, port: _4!, peerTag: _5!) + } + else { + return nil + } + } + public static func parse_phoneConnectionWebrtc(_ reader: BufferReader) -> PhoneConnection? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + var _5: Int32? + _5 = reader.readInt32() + var _6: String? + _6 = parseString(reader) + var _7: String? + _7 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.PhoneConnection.phoneConnectionWebrtc(flags: _1!, id: _2!, ip: _3!, ipv6: _4!, port: _5!, username: _6!, password: _7!) + } + else { + return nil + } + } + + } + public enum AccountDaysTTL: TypeConstructorDescription { + case accountDaysTTL(days: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .accountDaysTTL(let days): + if boxed { + buffer.appendInt32(-1194283041) + } + serializeInt32(days, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .accountDaysTTL(let days): + return ("accountDaysTTL", [("days", days)]) + } + } + + public static func parse_accountDaysTTL(_ reader: BufferReader) -> AccountDaysTTL? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.AccountDaysTTL.accountDaysTTL(days: _1!) + } + else { + return nil + } + } + + } + public enum SecureValueType: TypeConstructorDescription { + case secureValueTypePersonalDetails + case secureValueTypePassport + case secureValueTypeDriverLicense + case secureValueTypeIdentityCard + case secureValueTypeInternalPassport + case secureValueTypeAddress + case secureValueTypeUtilityBill + case secureValueTypeBankStatement + case secureValueTypeRentalAgreement + case secureValueTypePassportRegistration + case secureValueTypeTemporaryRegistration + case secureValueTypePhone + case secureValueTypeEmail + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .secureValueTypePersonalDetails: + if boxed { + buffer.appendInt32(-1658158621) + } + + break + case .secureValueTypePassport: + if boxed { + buffer.appendInt32(1034709504) + } + + break + case .secureValueTypeDriverLicense: + if boxed { + buffer.appendInt32(115615172) + } + + break + case .secureValueTypeIdentityCard: + if boxed { + buffer.appendInt32(-1596951477) + } + + break + case .secureValueTypeInternalPassport: + if boxed { + buffer.appendInt32(-1717268701) + } + + break + case .secureValueTypeAddress: + if boxed { + buffer.appendInt32(-874308058) + } + + break + case .secureValueTypeUtilityBill: + if boxed { + buffer.appendInt32(-63531698) + } + + break + case .secureValueTypeBankStatement: + if boxed { + buffer.appendInt32(-1995211763) + } + + break + case .secureValueTypeRentalAgreement: + if boxed { + buffer.appendInt32(-1954007928) + } + + break + case .secureValueTypePassportRegistration: + if boxed { + buffer.appendInt32(-1713143702) + } + + break + case .secureValueTypeTemporaryRegistration: + if boxed { + buffer.appendInt32(-368907213) + } + + break + case .secureValueTypePhone: + if boxed { + buffer.appendInt32(-1289704741) + } + + break + case .secureValueTypeEmail: + if boxed { + buffer.appendInt32(-1908627474) + } + + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .secureValueTypePersonalDetails: + return ("secureValueTypePersonalDetails", []) + case .secureValueTypePassport: + return ("secureValueTypePassport", []) + case .secureValueTypeDriverLicense: + return ("secureValueTypeDriverLicense", []) + case .secureValueTypeIdentityCard: + return ("secureValueTypeIdentityCard", []) + case .secureValueTypeInternalPassport: + return ("secureValueTypeInternalPassport", []) + case .secureValueTypeAddress: + return ("secureValueTypeAddress", []) + case .secureValueTypeUtilityBill: + return ("secureValueTypeUtilityBill", []) + case .secureValueTypeBankStatement: + return ("secureValueTypeBankStatement", []) + case .secureValueTypeRentalAgreement: + return ("secureValueTypeRentalAgreement", []) + case .secureValueTypePassportRegistration: + return ("secureValueTypePassportRegistration", []) + case .secureValueTypeTemporaryRegistration: + return ("secureValueTypeTemporaryRegistration", []) + case .secureValueTypePhone: + return ("secureValueTypePhone", []) + case .secureValueTypeEmail: + return ("secureValueTypeEmail", []) + } + } + + public static func parse_secureValueTypePersonalDetails(_ reader: BufferReader) -> SecureValueType? { + return Api.SecureValueType.secureValueTypePersonalDetails + } + public static func parse_secureValueTypePassport(_ reader: BufferReader) -> SecureValueType? { + return Api.SecureValueType.secureValueTypePassport + } + public static func parse_secureValueTypeDriverLicense(_ reader: BufferReader) -> SecureValueType? { + return Api.SecureValueType.secureValueTypeDriverLicense + } + public static func parse_secureValueTypeIdentityCard(_ reader: BufferReader) -> SecureValueType? { + return Api.SecureValueType.secureValueTypeIdentityCard + } + public static func parse_secureValueTypeInternalPassport(_ reader: BufferReader) -> SecureValueType? { + return Api.SecureValueType.secureValueTypeInternalPassport + } + public static func parse_secureValueTypeAddress(_ reader: BufferReader) -> SecureValueType? { + return Api.SecureValueType.secureValueTypeAddress + } + public static func parse_secureValueTypeUtilityBill(_ reader: BufferReader) -> SecureValueType? { + return Api.SecureValueType.secureValueTypeUtilityBill + } + public static func parse_secureValueTypeBankStatement(_ reader: BufferReader) -> SecureValueType? { + return Api.SecureValueType.secureValueTypeBankStatement + } + public static func parse_secureValueTypeRentalAgreement(_ reader: BufferReader) -> SecureValueType? { + return Api.SecureValueType.secureValueTypeRentalAgreement + } + public static func parse_secureValueTypePassportRegistration(_ reader: BufferReader) -> SecureValueType? { + return Api.SecureValueType.secureValueTypePassportRegistration + } + public static func parse_secureValueTypeTemporaryRegistration(_ reader: BufferReader) -> SecureValueType? { + return Api.SecureValueType.secureValueTypeTemporaryRegistration + } + public static func parse_secureValueTypePhone(_ reader: BufferReader) -> SecureValueType? { + return Api.SecureValueType.secureValueTypePhone + } + public static func parse_secureValueTypeEmail(_ reader: BufferReader) -> SecureValueType? { + return Api.SecureValueType.secureValueTypeEmail + } + + } + public enum PasswordKdfAlgo: TypeConstructorDescription { + case passwordKdfAlgoUnknown + case passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow(salt1: Buffer, salt2: Buffer, g: Int32, p: Buffer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .passwordKdfAlgoUnknown: + if boxed { + buffer.appendInt32(-732254058) + } + + break + case .passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow(let salt1, let salt2, let g, let p): + if boxed { + buffer.appendInt32(982592842) + } + serializeBytes(salt1, buffer: buffer, boxed: false) + serializeBytes(salt2, buffer: buffer, boxed: false) + serializeInt32(g, buffer: buffer, boxed: false) + serializeBytes(p, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .passwordKdfAlgoUnknown: + return ("passwordKdfAlgoUnknown", []) + case .passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow(let salt1, let salt2, let g, let p): + return ("passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow", [("salt1", salt1), ("salt2", salt2), ("g", g), ("p", p)]) + } + } + + public static func parse_passwordKdfAlgoUnknown(_ reader: BufferReader) -> PasswordKdfAlgo? { + return Api.PasswordKdfAlgo.passwordKdfAlgoUnknown + } + public static func parse_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow(_ reader: BufferReader) -> PasswordKdfAlgo? { + var _1: Buffer? + _1 = parseBytes(reader) + var _2: Buffer? + _2 = parseBytes(reader) + var _3: Int32? + _3 = reader.readInt32() + var _4: Buffer? + _4 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.PasswordKdfAlgo.passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow(salt1: _1!, salt2: _2!, g: _3!, p: _4!) + } + else { + return nil + } + } + + } + public enum InputBotInlineResult: TypeConstructorDescription { + case inputBotInlineResultPhoto(id: String, type: String, photo: Api.InputPhoto, sendMessage: Api.InputBotInlineMessage) + case inputBotInlineResultDocument(flags: Int32, id: String, type: String, title: String?, description: String?, document: Api.InputDocument, sendMessage: Api.InputBotInlineMessage) + case inputBotInlineResultGame(id: String, shortName: String, sendMessage: Api.InputBotInlineMessage) + case inputBotInlineResult(flags: Int32, id: String, type: String, title: String?, description: String?, url: String?, thumb: Api.InputWebDocument?, content: Api.InputWebDocument?, sendMessage: Api.InputBotInlineMessage) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputBotInlineResultPhoto(let id, let type, let photo, let sendMessage): + if boxed { + buffer.appendInt32(-1462213465) + } + serializeString(id, buffer: buffer, boxed: false) + serializeString(type, buffer: buffer, boxed: false) + photo.serialize(buffer, true) + sendMessage.serialize(buffer, true) + break + case .inputBotInlineResultDocument(let flags, let id, let type, let title, let description, let document, let sendMessage): + if boxed { + buffer.appendInt32(-459324) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(id, buffer: buffer, boxed: false) + serializeString(type, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeString(title!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeString(description!, buffer: buffer, boxed: false)} + document.serialize(buffer, true) + sendMessage.serialize(buffer, true) + break + case .inputBotInlineResultGame(let id, let shortName, let sendMessage): + if boxed { + buffer.appendInt32(1336154098) + } + serializeString(id, buffer: buffer, boxed: false) + serializeString(shortName, buffer: buffer, boxed: false) + sendMessage.serialize(buffer, true) + break + case .inputBotInlineResult(let flags, let id, let type, let title, let description, let url, let thumb, let content, let sendMessage): + if boxed { + buffer.appendInt32(-2000710887) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(id, buffer: buffer, boxed: false) + serializeString(type, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeString(title!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeString(description!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeString(url!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 4) != 0 {thumb!.serialize(buffer, true)} + if Int(flags) & Int(1 << 5) != 0 {content!.serialize(buffer, true)} + sendMessage.serialize(buffer, true) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputBotInlineResultPhoto(let id, let type, let photo, let sendMessage): + return ("inputBotInlineResultPhoto", [("id", id), ("type", type), ("photo", photo), ("sendMessage", sendMessage)]) + case .inputBotInlineResultDocument(let flags, let id, let type, let title, let description, let document, let sendMessage): + return ("inputBotInlineResultDocument", [("flags", flags), ("id", id), ("type", type), ("title", title), ("description", description), ("document", document), ("sendMessage", sendMessage)]) + case .inputBotInlineResultGame(let id, let shortName, let sendMessage): + return ("inputBotInlineResultGame", [("id", id), ("shortName", shortName), ("sendMessage", sendMessage)]) + case .inputBotInlineResult(let flags, let id, let type, let title, let description, let url, let thumb, let content, let sendMessage): + return ("inputBotInlineResult", [("flags", flags), ("id", id), ("type", type), ("title", title), ("description", description), ("url", url), ("thumb", thumb), ("content", content), ("sendMessage", sendMessage)]) + } + } + + public static func parse_inputBotInlineResultPhoto(_ reader: BufferReader) -> InputBotInlineResult? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) + var _3: Api.InputPhoto? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.InputPhoto + } + var _4: Api.InputBotInlineMessage? + if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.InputBotInlineMessage + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputBotInlineResult.inputBotInlineResultPhoto(id: _1!, type: _2!, photo: _3!, sendMessage: _4!) + } + else { + return nil + } + } + public static func parse_inputBotInlineResultDocument(_ reader: BufferReader) -> InputBotInlineResult? { var _1: Int32? _1 = reader.readInt32() var _2: String? @@ -2058,365 +19975,85 @@ public struct help { _3 = parseString(reader) var _4: String? if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } - var _5: [Api.help.CountryCode]? - if let _ = reader.readInt32() { - _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.help.CountryCode.self) + var _5: String? + if Int(_1!) & Int(1 << 2) != 0 {_5 = parseString(reader) } + var _6: Api.InputDocument? + if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.InputDocument + } + var _7: Api.InputBotInlineMessage? + if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.InputBotInlineMessage } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.help.Country.country(flags: _1!, iso2: _2!, defaultName: _3!, name: _4, countryCodes: _5!) - } - else { - return nil - } - } - - } - public enum PromoData: TypeConstructorDescription { - case promoDataEmpty(expires: Int32) - case promoData(flags: Int32, expires: Int32, peer: Api.Peer, chats: [Api.Chat], users: [Api.User], psaType: String?, psaMessage: String?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .promoDataEmpty(let expires): - if boxed { - buffer.appendInt32(-1728664459) - } - serializeInt32(expires, buffer: buffer, boxed: false) - break - case .promoData(let flags, let expires, let peer, let chats, let users, let psaType, let psaMessage): - if boxed { - buffer.appendInt32(-1942390465) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(expires, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(chats.count)) - for item in chats { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - if Int(flags) & Int(1 << 1) != 0 {serializeString(psaType!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeString(psaMessage!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .promoDataEmpty(let expires): - return ("promoDataEmpty", [("expires", expires)]) - case .promoData(let flags, let expires, let peer, let chats, let users, let psaType, let psaMessage): - return ("promoData", [("flags", flags), ("expires", expires), ("peer", peer), ("chats", chats), ("users", users), ("psaType", psaType), ("psaMessage", psaMessage)]) - } - } - - public static func parse_promoDataEmpty(_ reader: BufferReader) -> PromoData? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.help.PromoData.promoDataEmpty(expires: _1!) - } - else { - return nil - } - } - public static func parse_promoData(_ reader: BufferReader) -> PromoData? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Api.Peer? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _4: [Api.Chat]? - if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) - } - var _5: [Api.User]? - if let _ = reader.readInt32() { - _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } - var _6: String? - if Int(_1!) & Int(1 << 1) != 0 {_6 = parseString(reader) } - var _7: String? - if Int(_1!) & Int(1 << 2) != 0 {_7 = parseString(reader) } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 2) == 0) || _7 != nil + let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.help.PromoData.promoData(flags: _1!, expires: _2!, peer: _3!, chats: _4!, users: _5!, psaType: _6, psaMessage: _7) + return Api.InputBotInlineResult.inputBotInlineResultDocument(flags: _1!, id: _2!, type: _3!, title: _4, description: _5, document: _6!, sendMessage: _7!) } else { return nil } } - - } - public enum RecentMeUrls: TypeConstructorDescription { - case recentMeUrls(urls: [Api.RecentMeUrl], chats: [Api.Chat], users: [Api.User]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .recentMeUrls(let urls, let chats, let users): - if boxed { - buffer.appendInt32(235081943) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(urls.count)) - for item in urls { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(chats.count)) - for item in chats { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .recentMeUrls(let urls, let chats, let users): - return ("recentMeUrls", [("urls", urls), ("chats", chats), ("users", users)]) - } - } - - public static func parse_recentMeUrls(_ reader: BufferReader) -> RecentMeUrls? { - var _1: [Api.RecentMeUrl]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.RecentMeUrl.self) - } - var _2: [Api.Chat]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) - } - var _3: [Api.User]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + public static func parse_inputBotInlineResultGame(_ reader: BufferReader) -> InputBotInlineResult? { + var _1: String? + _1 = parseString(reader) + var _2: String? + _2 = parseString(reader) + var _3: Api.InputBotInlineMessage? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.InputBotInlineMessage } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil if _c1 && _c2 && _c3 { - return Api.help.RecentMeUrls.recentMeUrls(urls: _1!, chats: _2!, users: _3!) + return Api.InputBotInlineResult.inputBotInlineResultGame(id: _1!, shortName: _2!, sendMessage: _3!) } else { return nil } } - - } - public enum CountryCode: TypeConstructorDescription { - case countryCode(flags: Int32, countryCode: String, prefixes: [String]?, patterns: [String]?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .countryCode(let flags, let countryCode, let prefixes, let patterns): - if boxed { - buffer.appendInt32(1107543535) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(countryCode, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(prefixes!.count)) - for item in prefixes! { - serializeString(item, buffer: buffer, boxed: false) - }} - if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(patterns!.count)) - for item in patterns! { - serializeString(item, buffer: buffer, boxed: false) - }} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .countryCode(let flags, let countryCode, let prefixes, let patterns): - return ("countryCode", [("flags", flags), ("countryCode", countryCode), ("prefixes", prefixes), ("patterns", patterns)]) - } - } - - public static func parse_countryCode(_ reader: BufferReader) -> CountryCode? { + public static func parse_inputBotInlineResult(_ reader: BufferReader) -> InputBotInlineResult? { var _1: Int32? _1 = reader.readInt32() var _2: String? _2 = parseString(reader) - var _3: [String]? - if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self) - } } - var _4: [String]? - if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self) - } } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.help.CountryCode.countryCode(flags: _1!, countryCode: _2!, prefixes: _3, patterns: _4) - } - else { - return nil - } - } - - } - public enum Support: TypeConstructorDescription { - case support(phoneNumber: String, user: Api.User) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .support(let phoneNumber, let user): - if boxed { - buffer.appendInt32(398898678) - } - serializeString(phoneNumber, buffer: buffer, boxed: false) - user.serialize(buffer, true) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .support(let phoneNumber, let user): - return ("support", [("phoneNumber", phoneNumber), ("user", user)]) - } - } - - public static func parse_support(_ reader: BufferReader) -> Support? { - var _1: String? - _1 = parseString(reader) - var _2: Api.User? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.User - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.help.Support.support(phoneNumber: _1!, user: _2!) - } - else { - return nil - } - } - - } - public enum InviteText: TypeConstructorDescription { - case inviteText(message: String) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .inviteText(let message): - if boxed { - buffer.appendInt32(415997816) - } - serializeString(message, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .inviteText(let message): - return ("inviteText", [("message", message)]) - } - } - - public static func parse_inviteText(_ reader: BufferReader) -> InviteText? { - var _1: String? - _1 = parseString(reader) - let _c1 = _1 != nil - if _c1 { - return Api.help.InviteText.inviteText(message: _1!) - } - else { - return nil - } - } - - } - public enum UserInfo: TypeConstructorDescription { - case userInfoEmpty - case userInfo(message: String, entities: [Api.MessageEntity], author: String, date: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .userInfoEmpty: - if boxed { - buffer.appendInt32(-206688531) - } - - break - case .userInfo(let message, let entities, let author, let date): - if boxed { - buffer.appendInt32(32192344) - } - serializeString(message, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities.count)) - for item in entities { - item.serialize(buffer, true) - } - serializeString(author, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .userInfoEmpty: - return ("userInfoEmpty", []) - case .userInfo(let message, let entities, let author, let date): - return ("userInfo", [("message", message), ("entities", entities), ("author", author), ("date", date)]) - } - } - - public static func parse_userInfoEmpty(_ reader: BufferReader) -> UserInfo? { - return Api.help.UserInfo.userInfoEmpty - } - public static func parse_userInfo(_ reader: BufferReader) -> UserInfo? { - var _1: String? - _1 = parseString(reader) - var _2: [Api.MessageEntity]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) - } var _3: String? _3 = parseString(reader) - var _4: Int32? - _4 = reader.readInt32() + var _4: String? + if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } + var _5: String? + if Int(_1!) & Int(1 << 2) != 0 {_5 = parseString(reader) } + var _6: String? + if Int(_1!) & Int(1 << 3) != 0 {_6 = parseString(reader) } + var _7: Api.InputWebDocument? + if Int(_1!) & Int(1 << 4) != 0 {if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.InputWebDocument + } } + var _8: Api.InputWebDocument? + if Int(_1!) & Int(1 << 5) != 0 {if let signature = reader.readInt32() { + _8 = Api.parse(reader, signature: signature) as? Api.InputWebDocument + } } + var _9: Api.InputBotInlineMessage? + if let signature = reader.readInt32() { + _9 = Api.parse(reader, signature: signature) as? Api.InputBotInlineMessage + } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = _4 != nil - if _c1 && _c2 && _c3 && _c4 { - return Api.help.UserInfo.userInfo(message: _1!, entities: _2!, author: _3!, date: _4!) + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil + let _c8 = (Int(_1!) & Int(1 << 5) == 0) || _8 != nil + let _c9 = _9 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { + return Api.InputBotInlineResult.inputBotInlineResult(flags: _1!, id: _2!, type: _3!, title: _4, description: _5, url: _6, thumb: _7, content: _8, sendMessage: _9!) } else { return nil @@ -2424,115 +20061,2797 @@ public struct help { } } - public enum TermsOfServiceUpdate: TypeConstructorDescription { - case termsOfServiceUpdateEmpty(expires: Int32) - case termsOfServiceUpdate(expires: Int32, termsOfService: Api.help.TermsOfService) + public enum PrivacyRule: TypeConstructorDescription { + case privacyValueAllowContacts + case privacyValueAllowAll + case privacyValueAllowUsers(users: [Int32]) + case privacyValueDisallowContacts + case privacyValueDisallowAll + case privacyValueDisallowUsers(users: [Int32]) + case privacyValueAllowChatParticipants(chats: [Int32]) + case privacyValueDisallowChatParticipants(chats: [Int32]) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .termsOfServiceUpdateEmpty(let expires): + case .privacyValueAllowContacts: if boxed { - buffer.appendInt32(-483352705) + buffer.appendInt32(-123988) } - serializeInt32(expires, buffer: buffer, boxed: false) + break - case .termsOfServiceUpdate(let expires, let termsOfService): + case .privacyValueAllowAll: if boxed { - buffer.appendInt32(686618977) + buffer.appendInt32(1698855810) + } + + break + case .privacyValueAllowUsers(let users): + if boxed { + buffer.appendInt32(1297858060) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + serializeInt32(item, buffer: buffer, boxed: false) + } + break + case .privacyValueDisallowContacts: + if boxed { + buffer.appendInt32(-125240806) + } + + break + case .privacyValueDisallowAll: + if boxed { + buffer.appendInt32(-1955338397) + } + + break + case .privacyValueDisallowUsers(let users): + if boxed { + buffer.appendInt32(209668535) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + serializeInt32(item, buffer: buffer, boxed: false) + } + break + case .privacyValueAllowChatParticipants(let chats): + if boxed { + buffer.appendInt32(415136107) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(chats.count)) + for item in chats { + serializeInt32(item, buffer: buffer, boxed: false) + } + break + case .privacyValueDisallowChatParticipants(let chats): + if boxed { + buffer.appendInt32(-1397881200) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(chats.count)) + for item in chats { + serializeInt32(item, buffer: buffer, boxed: false) } - serializeInt32(expires, buffer: buffer, boxed: false) - termsOfService.serialize(buffer, true) break } } public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .termsOfServiceUpdateEmpty(let expires): - return ("termsOfServiceUpdateEmpty", [("expires", expires)]) - case .termsOfServiceUpdate(let expires, let termsOfService): - return ("termsOfServiceUpdate", [("expires", expires), ("termsOfService", termsOfService)]) + case .privacyValueAllowContacts: + return ("privacyValueAllowContacts", []) + case .privacyValueAllowAll: + return ("privacyValueAllowAll", []) + case .privacyValueAllowUsers(let users): + return ("privacyValueAllowUsers", [("users", users)]) + case .privacyValueDisallowContacts: + return ("privacyValueDisallowContacts", []) + case .privacyValueDisallowAll: + return ("privacyValueDisallowAll", []) + case .privacyValueDisallowUsers(let users): + return ("privacyValueDisallowUsers", [("users", users)]) + case .privacyValueAllowChatParticipants(let chats): + return ("privacyValueAllowChatParticipants", [("chats", chats)]) + case .privacyValueDisallowChatParticipants(let chats): + return ("privacyValueDisallowChatParticipants", [("chats", chats)]) } } - public static func parse_termsOfServiceUpdateEmpty(_ reader: BufferReader) -> TermsOfServiceUpdate? { - var _1: Int32? - _1 = reader.readInt32() + public static func parse_privacyValueAllowContacts(_ reader: BufferReader) -> PrivacyRule? { + return Api.PrivacyRule.privacyValueAllowContacts + } + public static func parse_privacyValueAllowAll(_ reader: BufferReader) -> PrivacyRule? { + return Api.PrivacyRule.privacyValueAllowAll + } + public static func parse_privacyValueAllowUsers(_ reader: BufferReader) -> PrivacyRule? { + var _1: [Int32]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) + } let _c1 = _1 != nil if _c1 { - return Api.help.TermsOfServiceUpdate.termsOfServiceUpdateEmpty(expires: _1!) + return Api.PrivacyRule.privacyValueAllowUsers(users: _1!) } else { return nil } } - public static func parse_termsOfServiceUpdate(_ reader: BufferReader) -> TermsOfServiceUpdate? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.help.TermsOfService? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.help.TermsOfService + public static func parse_privacyValueDisallowContacts(_ reader: BufferReader) -> PrivacyRule? { + return Api.PrivacyRule.privacyValueDisallowContacts + } + public static func parse_privacyValueDisallowAll(_ reader: BufferReader) -> PrivacyRule? { + return Api.PrivacyRule.privacyValueDisallowAll + } + public static func parse_privacyValueDisallowUsers(_ reader: BufferReader) -> PrivacyRule? { + var _1: [Int32]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.PrivacyRule.privacyValueDisallowUsers(users: _1!) + } + else { + return nil + } + } + public static func parse_privacyValueAllowChatParticipants(_ reader: BufferReader) -> PrivacyRule? { + var _1: [Int32]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.PrivacyRule.privacyValueAllowChatParticipants(chats: _1!) + } + else { + return nil + } + } + public static func parse_privacyValueDisallowChatParticipants(_ reader: BufferReader) -> PrivacyRule? { + var _1: [Int32]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.PrivacyRule.privacyValueDisallowChatParticipants(chats: _1!) + } + else { + return nil + } + } + + } + public enum MessageAction: TypeConstructorDescription { + case messageActionEmpty + case messageActionChatCreate(title: String, users: [Int32]) + case messageActionChatEditTitle(title: String) + case messageActionChatEditPhoto(photo: Api.Photo) + case messageActionChatDeletePhoto + case messageActionChatAddUser(users: [Int32]) + case messageActionChatDeleteUser(userId: Int32) + case messageActionChatJoinedByLink(inviterId: Int32) + case messageActionChannelCreate(title: String) + case messageActionChatMigrateTo(channelId: Int32) + case messageActionChannelMigrateFrom(title: String, chatId: Int32) + case messageActionPinMessage + case messageActionHistoryClear + case messageActionGameScore(gameId: Int64, score: Int32) + case messageActionPaymentSentMe(flags: Int32, currency: String, totalAmount: Int64, payload: Buffer, info: Api.PaymentRequestedInfo?, shippingOptionId: String?, charge: Api.PaymentCharge) + case messageActionPaymentSent(currency: String, totalAmount: Int64) + case messageActionPhoneCall(flags: Int32, callId: Int64, reason: Api.PhoneCallDiscardReason?, duration: Int32?) + case messageActionScreenshotTaken + case messageActionCustomAction(message: String) + case messageActionBotAllowed(domain: String) + case messageActionSecureValuesSentMe(values: [Api.SecureValue], credentials: Api.SecureCredentialsEncrypted) + case messageActionSecureValuesSent(types: [Api.SecureValueType]) + case messageActionContactSignUp + case messageActionGeoProximityReached(fromId: Api.Peer, toId: Api.Peer, distance: Int32) + case messageActionGroupCall(flags: Int32, call: Api.InputGroupCall, duration: Int32?) + case messageActionInviteToGroupCall(call: Api.InputGroupCall, users: [Int32]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .messageActionEmpty: + if boxed { + buffer.appendInt32(-1230047312) + } + + break + case .messageActionChatCreate(let title, let users): + if boxed { + buffer.appendInt32(-1503425638) + } + serializeString(title, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + serializeInt32(item, buffer: buffer, boxed: false) + } + break + case .messageActionChatEditTitle(let title): + if boxed { + buffer.appendInt32(-1247687078) + } + serializeString(title, buffer: buffer, boxed: false) + break + case .messageActionChatEditPhoto(let photo): + if boxed { + buffer.appendInt32(2144015272) + } + photo.serialize(buffer, true) + break + case .messageActionChatDeletePhoto: + if boxed { + buffer.appendInt32(-1780220945) + } + + break + case .messageActionChatAddUser(let users): + if boxed { + buffer.appendInt32(1217033015) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + serializeInt32(item, buffer: buffer, boxed: false) + } + break + case .messageActionChatDeleteUser(let userId): + if boxed { + buffer.appendInt32(-1297179892) + } + serializeInt32(userId, buffer: buffer, boxed: false) + break + case .messageActionChatJoinedByLink(let inviterId): + if boxed { + buffer.appendInt32(-123931160) + } + serializeInt32(inviterId, buffer: buffer, boxed: false) + break + case .messageActionChannelCreate(let title): + if boxed { + buffer.appendInt32(-1781355374) + } + serializeString(title, buffer: buffer, boxed: false) + break + case .messageActionChatMigrateTo(let channelId): + if boxed { + buffer.appendInt32(1371385889) + } + serializeInt32(channelId, buffer: buffer, boxed: false) + break + case .messageActionChannelMigrateFrom(let title, let chatId): + if boxed { + buffer.appendInt32(-1336546578) + } + serializeString(title, buffer: buffer, boxed: false) + serializeInt32(chatId, buffer: buffer, boxed: false) + break + case .messageActionPinMessage: + if boxed { + buffer.appendInt32(-1799538451) + } + + break + case .messageActionHistoryClear: + if boxed { + buffer.appendInt32(-1615153660) + } + + break + case .messageActionGameScore(let gameId, let score): + if boxed { + buffer.appendInt32(-1834538890) + } + serializeInt64(gameId, buffer: buffer, boxed: false) + serializeInt32(score, buffer: buffer, boxed: false) + break + case .messageActionPaymentSentMe(let flags, let currency, let totalAmount, let payload, let info, let shippingOptionId, let charge): + if boxed { + buffer.appendInt32(-1892568281) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(currency, buffer: buffer, boxed: false) + serializeInt64(totalAmount, buffer: buffer, boxed: false) + serializeBytes(payload, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {info!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {serializeString(shippingOptionId!, buffer: buffer, boxed: false)} + charge.serialize(buffer, true) + break + case .messageActionPaymentSent(let currency, let totalAmount): + if boxed { + buffer.appendInt32(1080663248) + } + serializeString(currency, buffer: buffer, boxed: false) + serializeInt64(totalAmount, buffer: buffer, boxed: false) + break + case .messageActionPhoneCall(let flags, let callId, let reason, let duration): + if boxed { + buffer.appendInt32(-2132731265) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(callId, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {reason!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(duration!, buffer: buffer, boxed: false)} + break + case .messageActionScreenshotTaken: + if boxed { + buffer.appendInt32(1200788123) + } + + break + case .messageActionCustomAction(let message): + if boxed { + buffer.appendInt32(-85549226) + } + serializeString(message, buffer: buffer, boxed: false) + break + case .messageActionBotAllowed(let domain): + if boxed { + buffer.appendInt32(-1410748418) + } + serializeString(domain, buffer: buffer, boxed: false) + break + case .messageActionSecureValuesSentMe(let values, let credentials): + if boxed { + buffer.appendInt32(455635795) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(values.count)) + for item in values { + item.serialize(buffer, true) + } + credentials.serialize(buffer, true) + break + case .messageActionSecureValuesSent(let types): + if boxed { + buffer.appendInt32(-648257196) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(types.count)) + for item in types { + item.serialize(buffer, true) + } + break + case .messageActionContactSignUp: + if boxed { + buffer.appendInt32(-202219658) + } + + break + case .messageActionGeoProximityReached(let fromId, let toId, let distance): + if boxed { + buffer.appendInt32(-1730095465) + } + fromId.serialize(buffer, true) + toId.serialize(buffer, true) + serializeInt32(distance, buffer: buffer, boxed: false) + break + case .messageActionGroupCall(let flags, let call, let duration): + if boxed { + buffer.appendInt32(2047704898) + } + serializeInt32(flags, buffer: buffer, boxed: false) + call.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(duration!, buffer: buffer, boxed: false)} + break + case .messageActionInviteToGroupCall(let call, let users): + if boxed { + buffer.appendInt32(1991897370) + } + call.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + serializeInt32(item, buffer: buffer, boxed: false) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .messageActionEmpty: + return ("messageActionEmpty", []) + case .messageActionChatCreate(let title, let users): + return ("messageActionChatCreate", [("title", title), ("users", users)]) + case .messageActionChatEditTitle(let title): + return ("messageActionChatEditTitle", [("title", title)]) + case .messageActionChatEditPhoto(let photo): + return ("messageActionChatEditPhoto", [("photo", photo)]) + case .messageActionChatDeletePhoto: + return ("messageActionChatDeletePhoto", []) + case .messageActionChatAddUser(let users): + return ("messageActionChatAddUser", [("users", users)]) + case .messageActionChatDeleteUser(let userId): + return ("messageActionChatDeleteUser", [("userId", userId)]) + case .messageActionChatJoinedByLink(let inviterId): + return ("messageActionChatJoinedByLink", [("inviterId", inviterId)]) + case .messageActionChannelCreate(let title): + return ("messageActionChannelCreate", [("title", title)]) + case .messageActionChatMigrateTo(let channelId): + return ("messageActionChatMigrateTo", [("channelId", channelId)]) + case .messageActionChannelMigrateFrom(let title, let chatId): + return ("messageActionChannelMigrateFrom", [("title", title), ("chatId", chatId)]) + case .messageActionPinMessage: + return ("messageActionPinMessage", []) + case .messageActionHistoryClear: + return ("messageActionHistoryClear", []) + case .messageActionGameScore(let gameId, let score): + return ("messageActionGameScore", [("gameId", gameId), ("score", score)]) + case .messageActionPaymentSentMe(let flags, let currency, let totalAmount, let payload, let info, let shippingOptionId, let charge): + return ("messageActionPaymentSentMe", [("flags", flags), ("currency", currency), ("totalAmount", totalAmount), ("payload", payload), ("info", info), ("shippingOptionId", shippingOptionId), ("charge", charge)]) + case .messageActionPaymentSent(let currency, let totalAmount): + return ("messageActionPaymentSent", [("currency", currency), ("totalAmount", totalAmount)]) + case .messageActionPhoneCall(let flags, let callId, let reason, let duration): + return ("messageActionPhoneCall", [("flags", flags), ("callId", callId), ("reason", reason), ("duration", duration)]) + case .messageActionScreenshotTaken: + return ("messageActionScreenshotTaken", []) + case .messageActionCustomAction(let message): + return ("messageActionCustomAction", [("message", message)]) + case .messageActionBotAllowed(let domain): + return ("messageActionBotAllowed", [("domain", domain)]) + case .messageActionSecureValuesSentMe(let values, let credentials): + return ("messageActionSecureValuesSentMe", [("values", values), ("credentials", credentials)]) + case .messageActionSecureValuesSent(let types): + return ("messageActionSecureValuesSent", [("types", types)]) + case .messageActionContactSignUp: + return ("messageActionContactSignUp", []) + case .messageActionGeoProximityReached(let fromId, let toId, let distance): + return ("messageActionGeoProximityReached", [("fromId", fromId), ("toId", toId), ("distance", distance)]) + case .messageActionGroupCall(let flags, let call, let duration): + return ("messageActionGroupCall", [("flags", flags), ("call", call), ("duration", duration)]) + case .messageActionInviteToGroupCall(let call, let users): + return ("messageActionInviteToGroupCall", [("call", call), ("users", users)]) + } + } + + public static func parse_messageActionEmpty(_ reader: BufferReader) -> MessageAction? { + return Api.MessageAction.messageActionEmpty + } + public static func parse_messageActionChatCreate(_ reader: BufferReader) -> MessageAction? { + var _1: String? + _1 = parseString(reader) + var _2: [Int32]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) } let _c1 = _1 != nil let _c2 = _2 != nil if _c1 && _c2 { - return Api.help.TermsOfServiceUpdate.termsOfServiceUpdate(expires: _1!, termsOfService: _2!) + return Api.MessageAction.messageActionChatCreate(title: _1!, users: _2!) } else { return nil } } - - } - public enum CountriesList: TypeConstructorDescription { - case countriesListNotModified - case countriesList(countries: [Api.help.Country], hash: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .countriesListNotModified: - if boxed { - buffer.appendInt32(-1815339214) - } - - break - case .countriesList(let countries, let hash): - if boxed { - buffer.appendInt32(-2016381538) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(countries.count)) - for item in countries { - item.serialize(buffer, true) - } - serializeInt32(hash, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .countriesListNotModified: - return ("countriesListNotModified", []) - case .countriesList(let countries, let hash): - return ("countriesList", [("countries", countries), ("hash", hash)]) - } - } - - public static func parse_countriesListNotModified(_ reader: BufferReader) -> CountriesList? { - return Api.help.CountriesList.countriesListNotModified - } - public static func parse_countriesList(_ reader: BufferReader) -> CountriesList? { - var _1: [Api.help.Country]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.help.Country.self) + public static func parse_messageActionChatEditTitle(_ reader: BufferReader) -> MessageAction? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.MessageAction.messageActionChatEditTitle(title: _1!) } + else { + return nil + } + } + public static func parse_messageActionChatEditPhoto(_ reader: BufferReader) -> MessageAction? { + var _1: Api.Photo? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Photo + } + let _c1 = _1 != nil + if _c1 { + return Api.MessageAction.messageActionChatEditPhoto(photo: _1!) + } + else { + return nil + } + } + public static func parse_messageActionChatDeletePhoto(_ reader: BufferReader) -> MessageAction? { + return Api.MessageAction.messageActionChatDeletePhoto + } + public static func parse_messageActionChatAddUser(_ reader: BufferReader) -> MessageAction? { + var _1: [Int32]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.MessageAction.messageActionChatAddUser(users: _1!) + } + else { + return nil + } + } + public static func parse_messageActionChatDeleteUser(_ reader: BufferReader) -> MessageAction? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.MessageAction.messageActionChatDeleteUser(userId: _1!) + } + else { + return nil + } + } + public static func parse_messageActionChatJoinedByLink(_ reader: BufferReader) -> MessageAction? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.MessageAction.messageActionChatJoinedByLink(inviterId: _1!) + } + else { + return nil + } + } + public static func parse_messageActionChannelCreate(_ reader: BufferReader) -> MessageAction? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.MessageAction.messageActionChannelCreate(title: _1!) + } + else { + return nil + } + } + public static func parse_messageActionChatMigrateTo(_ reader: BufferReader) -> MessageAction? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.MessageAction.messageActionChatMigrateTo(channelId: _1!) + } + else { + return nil + } + } + public static func parse_messageActionChannelMigrateFrom(_ reader: BufferReader) -> MessageAction? { + var _1: String? + _1 = parseString(reader) var _2: Int32? _2 = reader.readInt32() let _c1 = _1 != nil let _c2 = _2 != nil if _c1 && _c2 { - return Api.help.CountriesList.countriesList(countries: _1!, hash: _2!) + return Api.MessageAction.messageActionChannelMigrateFrom(title: _1!, chatId: _2!) + } + else { + return nil + } + } + public static func parse_messageActionPinMessage(_ reader: BufferReader) -> MessageAction? { + return Api.MessageAction.messageActionPinMessage + } + public static func parse_messageActionHistoryClear(_ reader: BufferReader) -> MessageAction? { + return Api.MessageAction.messageActionHistoryClear + } + public static func parse_messageActionGameScore(_ reader: BufferReader) -> MessageAction? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageAction.messageActionGameScore(gameId: _1!, score: _2!) + } + else { + return nil + } + } + public static func parse_messageActionPaymentSentMe(_ reader: BufferReader) -> MessageAction? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: Int64? + _3 = reader.readInt64() + var _4: Buffer? + _4 = parseBytes(reader) + var _5: Api.PaymentRequestedInfo? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.PaymentRequestedInfo + } } + var _6: String? + if Int(_1!) & Int(1 << 1) != 0 {_6 = parseString(reader) } + var _7: Api.PaymentCharge? + if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.PaymentCharge + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c7 = _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.MessageAction.messageActionPaymentSentMe(flags: _1!, currency: _2!, totalAmount: _3!, payload: _4!, info: _5, shippingOptionId: _6, charge: _7!) + } + else { + return nil + } + } + public static func parse_messageActionPaymentSent(_ reader: BufferReader) -> MessageAction? { + var _1: String? + _1 = parseString(reader) + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageAction.messageActionPaymentSent(currency: _1!, totalAmount: _2!) + } + else { + return nil + } + } + public static func parse_messageActionPhoneCall(_ reader: BufferReader) -> MessageAction? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Api.PhoneCallDiscardReason? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.PhoneCallDiscardReason + } } + var _4: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.MessageAction.messageActionPhoneCall(flags: _1!, callId: _2!, reason: _3, duration: _4) + } + else { + return nil + } + } + public static func parse_messageActionScreenshotTaken(_ reader: BufferReader) -> MessageAction? { + return Api.MessageAction.messageActionScreenshotTaken + } + public static func parse_messageActionCustomAction(_ reader: BufferReader) -> MessageAction? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.MessageAction.messageActionCustomAction(message: _1!) + } + else { + return nil + } + } + public static func parse_messageActionBotAllowed(_ reader: BufferReader) -> MessageAction? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.MessageAction.messageActionBotAllowed(domain: _1!) + } + else { + return nil + } + } + public static func parse_messageActionSecureValuesSentMe(_ reader: BufferReader) -> MessageAction? { + var _1: [Api.SecureValue]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureValue.self) + } + var _2: Api.SecureCredentialsEncrypted? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.SecureCredentialsEncrypted + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageAction.messageActionSecureValuesSentMe(values: _1!, credentials: _2!) + } + else { + return nil + } + } + public static func parse_messageActionSecureValuesSent(_ reader: BufferReader) -> MessageAction? { + var _1: [Api.SecureValueType]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureValueType.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.MessageAction.messageActionSecureValuesSent(types: _1!) + } + else { + return nil + } + } + public static func parse_messageActionContactSignUp(_ reader: BufferReader) -> MessageAction? { + return Api.MessageAction.messageActionContactSignUp + } + public static func parse_messageActionGeoProximityReached(_ reader: BufferReader) -> MessageAction? { + var _1: Api.Peer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _2: Api.Peer? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.MessageAction.messageActionGeoProximityReached(fromId: _1!, toId: _2!, distance: _3!) + } + else { + return nil + } + } + public static func parse_messageActionGroupCall(_ reader: BufferReader) -> MessageAction? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.InputGroupCall? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.InputGroupCall + } + var _3: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_3 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.MessageAction.messageActionGroupCall(flags: _1!, call: _2!, duration: _3) + } + else { + return nil + } + } + public static func parse_messageActionInviteToGroupCall(_ reader: BufferReader) -> MessageAction? { + var _1: Api.InputGroupCall? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.InputGroupCall + } + var _2: [Int32]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageAction.messageActionInviteToGroupCall(call: _1!, users: _2!) + } + else { + return nil + } + } + + } + public enum PhoneCall: TypeConstructorDescription { + case phoneCallEmpty(id: Int64) + case phoneCallWaiting(flags: Int32, id: Int64, accessHash: Int64, date: Int32, adminId: Int32, participantId: Int32, protocol: Api.PhoneCallProtocol, receiveDate: Int32?) + case phoneCallRequested(flags: Int32, id: Int64, accessHash: Int64, date: Int32, adminId: Int32, participantId: Int32, gAHash: Buffer, protocol: Api.PhoneCallProtocol) + case phoneCallAccepted(flags: Int32, id: Int64, accessHash: Int64, date: Int32, adminId: Int32, participantId: Int32, gB: Buffer, protocol: Api.PhoneCallProtocol) + case phoneCall(flags: Int32, id: Int64, accessHash: Int64, date: Int32, adminId: Int32, participantId: Int32, gAOrB: Buffer, keyFingerprint: Int64, protocol: Api.PhoneCallProtocol, connections: [Api.PhoneConnection], startDate: Int32) + case phoneCallDiscarded(flags: Int32, id: Int64, reason: Api.PhoneCallDiscardReason?, duration: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .phoneCallEmpty(let id): + if boxed { + buffer.appendInt32(1399245077) + } + serializeInt64(id, buffer: buffer, boxed: false) + break + case .phoneCallWaiting(let flags, let id, let accessHash, let date, let adminId, let participantId, let `protocol`, let receiveDate): + if boxed { + buffer.appendInt32(462375633) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + serializeInt32(adminId, buffer: buffer, boxed: false) + serializeInt32(participantId, buffer: buffer, boxed: false) + `protocol`.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(receiveDate!, buffer: buffer, boxed: false)} + break + case .phoneCallRequested(let flags, let id, let accessHash, let date, let adminId, let participantId, let gAHash, let `protocol`): + if boxed { + buffer.appendInt32(-2014659757) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + serializeInt32(adminId, buffer: buffer, boxed: false) + serializeInt32(participantId, buffer: buffer, boxed: false) + serializeBytes(gAHash, buffer: buffer, boxed: false) + `protocol`.serialize(buffer, true) + break + case .phoneCallAccepted(let flags, let id, let accessHash, let date, let adminId, let participantId, let gB, let `protocol`): + if boxed { + buffer.appendInt32(-1719909046) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + serializeInt32(adminId, buffer: buffer, boxed: false) + serializeInt32(participantId, buffer: buffer, boxed: false) + serializeBytes(gB, buffer: buffer, boxed: false) + `protocol`.serialize(buffer, true) + break + case .phoneCall(let flags, let id, let accessHash, let date, let adminId, let participantId, let gAOrB, let keyFingerprint, let `protocol`, let connections, let startDate): + if boxed { + buffer.appendInt32(-2025673089) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + serializeInt32(adminId, buffer: buffer, boxed: false) + serializeInt32(participantId, buffer: buffer, boxed: false) + serializeBytes(gAOrB, buffer: buffer, boxed: false) + serializeInt64(keyFingerprint, buffer: buffer, boxed: false) + `protocol`.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(connections.count)) + for item in connections { + item.serialize(buffer, true) + } + serializeInt32(startDate, buffer: buffer, boxed: false) + break + case .phoneCallDiscarded(let flags, let id, let reason, let duration): + if boxed { + buffer.appendInt32(1355435489) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(id, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {reason!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(duration!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .phoneCallEmpty(let id): + return ("phoneCallEmpty", [("id", id)]) + case .phoneCallWaiting(let flags, let id, let accessHash, let date, let adminId, let participantId, let `protocol`, let receiveDate): + return ("phoneCallWaiting", [("flags", flags), ("id", id), ("accessHash", accessHash), ("date", date), ("adminId", adminId), ("participantId", participantId), ("`protocol`", `protocol`), ("receiveDate", receiveDate)]) + case .phoneCallRequested(let flags, let id, let accessHash, let date, let adminId, let participantId, let gAHash, let `protocol`): + return ("phoneCallRequested", [("flags", flags), ("id", id), ("accessHash", accessHash), ("date", date), ("adminId", adminId), ("participantId", participantId), ("gAHash", gAHash), ("`protocol`", `protocol`)]) + case .phoneCallAccepted(let flags, let id, let accessHash, let date, let adminId, let participantId, let gB, let `protocol`): + return ("phoneCallAccepted", [("flags", flags), ("id", id), ("accessHash", accessHash), ("date", date), ("adminId", adminId), ("participantId", participantId), ("gB", gB), ("`protocol`", `protocol`)]) + case .phoneCall(let flags, let id, let accessHash, let date, let adminId, let participantId, let gAOrB, let keyFingerprint, let `protocol`, let connections, let startDate): + return ("phoneCall", [("flags", flags), ("id", id), ("accessHash", accessHash), ("date", date), ("adminId", adminId), ("participantId", participantId), ("gAOrB", gAOrB), ("keyFingerprint", keyFingerprint), ("`protocol`", `protocol`), ("connections", connections), ("startDate", startDate)]) + case .phoneCallDiscarded(let flags, let id, let reason, let duration): + return ("phoneCallDiscarded", [("flags", flags), ("id", id), ("reason", reason), ("duration", duration)]) + } + } + + public static func parse_phoneCallEmpty(_ reader: BufferReader) -> PhoneCall? { + var _1: Int64? + _1 = reader.readInt64() + let _c1 = _1 != nil + if _c1 { + return Api.PhoneCall.phoneCallEmpty(id: _1!) + } + else { + return nil + } + } + public static func parse_phoneCallWaiting(_ reader: BufferReader) -> PhoneCall? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Int64? + _3 = reader.readInt64() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + var _6: Int32? + _6 = reader.readInt32() + var _7: Api.PhoneCallProtocol? + if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.PhoneCallProtocol + } + var _8: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_8 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = (Int(_1!) & Int(1 << 0) == 0) || _8 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { + return Api.PhoneCall.phoneCallWaiting(flags: _1!, id: _2!, accessHash: _3!, date: _4!, adminId: _5!, participantId: _6!, protocol: _7!, receiveDate: _8) + } + else { + return nil + } + } + public static func parse_phoneCallRequested(_ reader: BufferReader) -> PhoneCall? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Int64? + _3 = reader.readInt64() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + var _6: Int32? + _6 = reader.readInt32() + var _7: Buffer? + _7 = parseBytes(reader) + var _8: Api.PhoneCallProtocol? + if let signature = reader.readInt32() { + _8 = Api.parse(reader, signature: signature) as? Api.PhoneCallProtocol + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = _8 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { + return Api.PhoneCall.phoneCallRequested(flags: _1!, id: _2!, accessHash: _3!, date: _4!, adminId: _5!, participantId: _6!, gAHash: _7!, protocol: _8!) + } + else { + return nil + } + } + public static func parse_phoneCallAccepted(_ reader: BufferReader) -> PhoneCall? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Int64? + _3 = reader.readInt64() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + var _6: Int32? + _6 = reader.readInt32() + var _7: Buffer? + _7 = parseBytes(reader) + var _8: Api.PhoneCallProtocol? + if let signature = reader.readInt32() { + _8 = Api.parse(reader, signature: signature) as? Api.PhoneCallProtocol + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = _8 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { + return Api.PhoneCall.phoneCallAccepted(flags: _1!, id: _2!, accessHash: _3!, date: _4!, adminId: _5!, participantId: _6!, gB: _7!, protocol: _8!) + } + else { + return nil + } + } + public static func parse_phoneCall(_ reader: BufferReader) -> PhoneCall? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Int64? + _3 = reader.readInt64() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + var _6: Int32? + _6 = reader.readInt32() + var _7: Buffer? + _7 = parseBytes(reader) + var _8: Int64? + _8 = reader.readInt64() + var _9: Api.PhoneCallProtocol? + if let signature = reader.readInt32() { + _9 = Api.parse(reader, signature: signature) as? Api.PhoneCallProtocol + } + var _10: [Api.PhoneConnection]? + if let _ = reader.readInt32() { + _10 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PhoneConnection.self) + } + var _11: Int32? + _11 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = _8 != nil + let _c9 = _9 != nil + let _c10 = _10 != nil + let _c11 = _11 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { + return Api.PhoneCall.phoneCall(flags: _1!, id: _2!, accessHash: _3!, date: _4!, adminId: _5!, participantId: _6!, gAOrB: _7!, keyFingerprint: _8!, protocol: _9!, connections: _10!, startDate: _11!) + } + else { + return nil + } + } + public static func parse_phoneCallDiscarded(_ reader: BufferReader) -> PhoneCall? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Api.PhoneCallDiscardReason? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.PhoneCallDiscardReason + } } + var _4: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_4 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.PhoneCall.phoneCallDiscarded(flags: _1!, id: _2!, reason: _3, duration: _4) + } + else { + return nil + } + } + + } + public enum DialogPeer: TypeConstructorDescription { + case dialogPeer(peer: Api.Peer) + case dialogPeerFolder(folderId: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .dialogPeer(let peer): + if boxed { + buffer.appendInt32(-445792507) + } + peer.serialize(buffer, true) + break + case .dialogPeerFolder(let folderId): + if boxed { + buffer.appendInt32(1363483106) + } + serializeInt32(folderId, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .dialogPeer(let peer): + return ("dialogPeer", [("peer", peer)]) + case .dialogPeerFolder(let folderId): + return ("dialogPeerFolder", [("folderId", folderId)]) + } + } + + public static func parse_dialogPeer(_ reader: BufferReader) -> DialogPeer? { + var _1: Api.Peer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Peer + } + let _c1 = _1 != nil + if _c1 { + return Api.DialogPeer.dialogPeer(peer: _1!) + } + else { + return nil + } + } + public static func parse_dialogPeerFolder(_ reader: BufferReader) -> DialogPeer? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.DialogPeer.dialogPeerFolder(folderId: _1!) + } + else { + return nil + } + } + + } + public enum WebDocument: TypeConstructorDescription { + case webDocumentNoProxy(url: String, size: Int32, mimeType: String, attributes: [Api.DocumentAttribute]) + case webDocument(url: String, accessHash: Int64, size: Int32, mimeType: String, attributes: [Api.DocumentAttribute]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .webDocumentNoProxy(let url, let size, let mimeType, let attributes): + if boxed { + buffer.appendInt32(-104284986) + } + serializeString(url, buffer: buffer, boxed: false) + serializeInt32(size, buffer: buffer, boxed: false) + serializeString(mimeType, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(attributes.count)) + for item in attributes { + item.serialize(buffer, true) + } + break + case .webDocument(let url, let accessHash, let size, let mimeType, let attributes): + if boxed { + buffer.appendInt32(475467473) + } + serializeString(url, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeInt32(size, buffer: buffer, boxed: false) + serializeString(mimeType, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(attributes.count)) + for item in attributes { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .webDocumentNoProxy(let url, let size, let mimeType, let attributes): + return ("webDocumentNoProxy", [("url", url), ("size", size), ("mimeType", mimeType), ("attributes", attributes)]) + case .webDocument(let url, let accessHash, let size, let mimeType, let attributes): + return ("webDocument", [("url", url), ("accessHash", accessHash), ("size", size), ("mimeType", mimeType), ("attributes", attributes)]) + } + } + + public static func parse_webDocumentNoProxy(_ reader: BufferReader) -> WebDocument? { + var _1: String? + _1 = parseString(reader) + var _2: Int32? + _2 = reader.readInt32() + var _3: String? + _3 = parseString(reader) + var _4: [Api.DocumentAttribute]? + if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DocumentAttribute.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.WebDocument.webDocumentNoProxy(url: _1!, size: _2!, mimeType: _3!, attributes: _4!) + } + else { + return nil + } + } + public static func parse_webDocument(_ reader: BufferReader) -> WebDocument? { + var _1: String? + _1 = parseString(reader) + var _2: Int64? + _2 = reader.readInt64() + var _3: Int32? + _3 = reader.readInt32() + var _4: String? + _4 = parseString(reader) + var _5: [Api.DocumentAttribute]? + if let _ = reader.readInt32() { + _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DocumentAttribute.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.WebDocument.webDocument(url: _1!, accessHash: _2!, size: _3!, mimeType: _4!, attributes: _5!) + } + else { + return nil + } + } + + } + public enum Theme: TypeConstructorDescription { + case theme(flags: Int32, id: Int64, accessHash: Int64, slug: String, title: String, document: Api.Document?, settings: Api.ThemeSettings?, installsCount: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .theme(let flags, let id, let accessHash, let slug, let title, let document, let settings, let installsCount): + if boxed { + buffer.appendInt32(42930452) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeString(slug, buffer: buffer, boxed: false) + serializeString(title, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 2) != 0 {document!.serialize(buffer, true)} + if Int(flags) & Int(1 << 3) != 0 {settings!.serialize(buffer, true)} + serializeInt32(installsCount, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .theme(let flags, let id, let accessHash, let slug, let title, let document, let settings, let installsCount): + return ("theme", [("flags", flags), ("id", id), ("accessHash", accessHash), ("slug", slug), ("title", title), ("document", document), ("settings", settings), ("installsCount", installsCount)]) + } + } + + public static func parse_theme(_ reader: BufferReader) -> Theme? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Int64? + _3 = reader.readInt64() + var _4: String? + _4 = parseString(reader) + var _5: String? + _5 = parseString(reader) + var _6: Api.Document? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.Document + } } + var _7: Api.ThemeSettings? + if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.ThemeSettings + } } + var _8: Int32? + _8 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil + let _c8 = _8 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { + return Api.Theme.theme(flags: _1!, id: _2!, accessHash: _3!, slug: _4!, title: _5!, document: _6, settings: _7, installsCount: _8!) + } + else { + return nil + } + } + + } + public enum ChannelAdminLogEventsFilter: TypeConstructorDescription { + case channelAdminLogEventsFilter(flags: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .channelAdminLogEventsFilter(let flags): + if boxed { + buffer.appendInt32(-368018716) + } + serializeInt32(flags, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .channelAdminLogEventsFilter(let flags): + return ("channelAdminLogEventsFilter", [("flags", flags)]) + } + } + + public static func parse_channelAdminLogEventsFilter(_ reader: BufferReader) -> ChannelAdminLogEventsFilter? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.ChannelAdminLogEventsFilter.channelAdminLogEventsFilter(flags: _1!) + } + else { + return nil + } + } + + } + public enum ThemeSettings: TypeConstructorDescription { + case themeSettings(flags: Int32, baseTheme: Api.BaseTheme, accentColor: Int32, messageTopColor: Int32?, messageBottomColor: Int32?, wallpaper: Api.WallPaper?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .themeSettings(let flags, let baseTheme, let accentColor, let messageTopColor, let messageBottomColor, let wallpaper): + if boxed { + buffer.appendInt32(-1676371894) + } + serializeInt32(flags, buffer: buffer, boxed: false) + baseTheme.serialize(buffer, true) + serializeInt32(accentColor, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(messageTopColor!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(messageBottomColor!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {wallpaper!.serialize(buffer, true)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .themeSettings(let flags, let baseTheme, let accentColor, let messageTopColor, let messageBottomColor, let wallpaper): + return ("themeSettings", [("flags", flags), ("baseTheme", baseTheme), ("accentColor", accentColor), ("messageTopColor", messageTopColor), ("messageBottomColor", messageBottomColor), ("wallpaper", wallpaper)]) + } + } + + public static func parse_themeSettings(_ reader: BufferReader) -> ThemeSettings? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.BaseTheme? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.BaseTheme + } + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_4 = reader.readInt32() } + var _5: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_5 = reader.readInt32() } + var _6: Api.WallPaper? + if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.WallPaper + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.ThemeSettings.themeSettings(flags: _1!, baseTheme: _2!, accentColor: _3!, messageTopColor: _4, messageBottomColor: _5, wallpaper: _6) + } + else { + return nil + } + } + + } + public enum PeerNotifySettings: TypeConstructorDescription { + case peerNotifySettings(flags: Int32, showPreviews: Api.Bool?, silent: Api.Bool?, muteUntil: Int32?, sound: String?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .peerNotifySettings(let flags, let showPreviews, let silent, let muteUntil, let sound): + if boxed { + buffer.appendInt32(-1353671392) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {showPreviews!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {silent!.serialize(buffer, true)} + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(muteUntil!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeString(sound!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .peerNotifySettings(let flags, let showPreviews, let silent, let muteUntil, let sound): + return ("peerNotifySettings", [("flags", flags), ("showPreviews", showPreviews), ("silent", silent), ("muteUntil", muteUntil), ("sound", sound)]) + } + } + + public static func parse_peerNotifySettings(_ reader: BufferReader) -> PeerNotifySettings? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.Bool? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.Bool + } } + var _3: Api.Bool? + if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.Bool + } } + var _4: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_4 = reader.readInt32() } + var _5: String? + if Int(_1!) & Int(1 << 3) != 0 {_5 = parseString(reader) } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.PeerNotifySettings.peerNotifySettings(flags: _1!, showPreviews: _2, silent: _3, muteUntil: _4, sound: _5) + } + else { + return nil + } + } + + } + public enum InputBotInlineMessageID: TypeConstructorDescription { + case inputBotInlineMessageID(dcId: Int32, id: Int64, accessHash: Int64) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputBotInlineMessageID(let dcId, let id, let accessHash): + if boxed { + buffer.appendInt32(-1995686519) + } + serializeInt32(dcId, buffer: buffer, boxed: false) + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputBotInlineMessageID(let dcId, let id, let accessHash): + return ("inputBotInlineMessageID", [("dcId", dcId), ("id", id), ("accessHash", accessHash)]) + } + } + + public static func parse_inputBotInlineMessageID(_ reader: BufferReader) -> InputBotInlineMessageID? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Int64? + _3 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.InputBotInlineMessageID.inputBotInlineMessageID(dcId: _1!, id: _2!, accessHash: _3!) + } + else { + return nil + } + } + + } + public enum PageRelatedArticle: TypeConstructorDescription { + case pageRelatedArticle(flags: Int32, url: String, webpageId: Int64, title: String?, description: String?, photoId: Int64?, author: String?, publishedDate: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .pageRelatedArticle(let flags, let url, let webpageId, let title, let description, let photoId, let author, let publishedDate): + if boxed { + buffer.appendInt32(-1282352120) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(url, buffer: buffer, boxed: false) + serializeInt64(webpageId, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeString(title!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeString(description!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeInt64(photoId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeString(author!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 4) != 0 {serializeInt32(publishedDate!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .pageRelatedArticle(let flags, let url, let webpageId, let title, let description, let photoId, let author, let publishedDate): + return ("pageRelatedArticle", [("flags", flags), ("url", url), ("webpageId", webpageId), ("title", title), ("description", description), ("photoId", photoId), ("author", author), ("publishedDate", publishedDate)]) + } + } + + public static func parse_pageRelatedArticle(_ reader: BufferReader) -> PageRelatedArticle? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: Int64? + _3 = reader.readInt64() + var _4: String? + if Int(_1!) & Int(1 << 0) != 0 {_4 = parseString(reader) } + var _5: String? + if Int(_1!) & Int(1 << 1) != 0 {_5 = parseString(reader) } + var _6: Int64? + if Int(_1!) & Int(1 << 2) != 0 {_6 = reader.readInt64() } + var _7: String? + if Int(_1!) & Int(1 << 3) != 0 {_7 = parseString(reader) } + var _8: Int32? + if Int(_1!) & Int(1 << 4) != 0 {_8 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil + let _c8 = (Int(_1!) & Int(1 << 4) == 0) || _8 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { + return Api.PageRelatedArticle.pageRelatedArticle(flags: _1!, url: _2!, webpageId: _3!, title: _4, description: _5, photoId: _6, author: _7, publishedDate: _8) + } + else { + return nil + } + } + + } + public enum StickerPack: TypeConstructorDescription { + case stickerPack(emoticon: String, documents: [Int64]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .stickerPack(let emoticon, let documents): + if boxed { + buffer.appendInt32(313694676) + } + serializeString(emoticon, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(documents.count)) + for item in documents { + serializeInt64(item, buffer: buffer, boxed: false) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .stickerPack(let emoticon, let documents): + return ("stickerPack", [("emoticon", emoticon), ("documents", documents)]) + } + } + + public static func parse_stickerPack(_ reader: BufferReader) -> StickerPack? { + var _1: String? + _1 = parseString(reader) + var _2: [Int64]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.StickerPack.stickerPack(emoticon: _1!, documents: _2!) + } + else { + return nil + } + } + + } + public enum UserProfilePhoto: TypeConstructorDescription { + case userProfilePhotoEmpty + case userProfilePhoto(flags: Int32, photoId: Int64, photoSmall: Api.FileLocation, photoBig: Api.FileLocation, dcId: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .userProfilePhotoEmpty: + if boxed { + buffer.appendInt32(1326562017) + } + + break + case .userProfilePhoto(let flags, let photoId, let photoSmall, let photoBig, let dcId): + if boxed { + buffer.appendInt32(1775479590) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(photoId, buffer: buffer, boxed: false) + photoSmall.serialize(buffer, true) + photoBig.serialize(buffer, true) + serializeInt32(dcId, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .userProfilePhotoEmpty: + return ("userProfilePhotoEmpty", []) + case .userProfilePhoto(let flags, let photoId, let photoSmall, let photoBig, let dcId): + return ("userProfilePhoto", [("flags", flags), ("photoId", photoId), ("photoSmall", photoSmall), ("photoBig", photoBig), ("dcId", dcId)]) + } + } + + public static func parse_userProfilePhotoEmpty(_ reader: BufferReader) -> UserProfilePhoto? { + return Api.UserProfilePhoto.userProfilePhotoEmpty + } + public static func parse_userProfilePhoto(_ reader: BufferReader) -> UserProfilePhoto? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Api.FileLocation? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.FileLocation + } + var _4: Api.FileLocation? + if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.FileLocation + } + var _5: Int32? + _5 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.UserProfilePhoto.userProfilePhoto(flags: _1!, photoId: _2!, photoSmall: _3!, photoBig: _4!, dcId: _5!) + } + else { + return nil + } + } + + } + public enum ChatOnlines: TypeConstructorDescription { + case chatOnlines(onlines: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .chatOnlines(let onlines): + if boxed { + buffer.appendInt32(-264117680) + } + serializeInt32(onlines, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .chatOnlines(let onlines): + return ("chatOnlines", [("onlines", onlines)]) + } + } + + public static func parse_chatOnlines(_ reader: BufferReader) -> ChatOnlines? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.ChatOnlines.chatOnlines(onlines: _1!) + } + else { + return nil + } + } + + } + public enum InputAppEvent: TypeConstructorDescription { + case inputAppEvent(time: Double, type: String, peer: Int64, data: Api.JSONValue) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputAppEvent(let time, let type, let peer, let data): + if boxed { + buffer.appendInt32(488313413) + } + serializeDouble(time, buffer: buffer, boxed: false) + serializeString(type, buffer: buffer, boxed: false) + serializeInt64(peer, buffer: buffer, boxed: false) + data.serialize(buffer, true) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputAppEvent(let time, let type, let peer, let data): + return ("inputAppEvent", [("time", time), ("type", type), ("peer", peer), ("data", data)]) + } + } + + public static func parse_inputAppEvent(_ reader: BufferReader) -> InputAppEvent? { + var _1: Double? + _1 = reader.readDouble() + var _2: String? + _2 = parseString(reader) + var _3: Int64? + _3 = reader.readInt64() + var _4: Api.JSONValue? + if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.JSONValue + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.InputAppEvent.inputAppEvent(time: _1!, type: _2!, peer: _3!, data: _4!) + } + else { + return nil + } + } + + } + public enum MessageEntity: TypeConstructorDescription { + case messageEntityUnknown(offset: Int32, length: Int32) + case messageEntityMention(offset: Int32, length: Int32) + case messageEntityHashtag(offset: Int32, length: Int32) + case messageEntityBotCommand(offset: Int32, length: Int32) + case messageEntityUrl(offset: Int32, length: Int32) + case messageEntityEmail(offset: Int32, length: Int32) + case messageEntityBold(offset: Int32, length: Int32) + case messageEntityItalic(offset: Int32, length: Int32) + case messageEntityCode(offset: Int32, length: Int32) + case messageEntityPre(offset: Int32, length: Int32, language: String) + case messageEntityTextUrl(offset: Int32, length: Int32, url: String) + case messageEntityMentionName(offset: Int32, length: Int32, userId: Int32) + case inputMessageEntityMentionName(offset: Int32, length: Int32, userId: Api.InputUser) + case messageEntityPhone(offset: Int32, length: Int32) + case messageEntityCashtag(offset: Int32, length: Int32) + case messageEntityUnderline(offset: Int32, length: Int32) + case messageEntityStrike(offset: Int32, length: Int32) + case messageEntityBlockquote(offset: Int32, length: Int32) + case messageEntityBankCard(offset: Int32, length: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .messageEntityUnknown(let offset, let length): + if boxed { + buffer.appendInt32(-1148011883) + } + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(length, buffer: buffer, boxed: false) + break + case .messageEntityMention(let offset, let length): + if boxed { + buffer.appendInt32(-100378723) + } + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(length, buffer: buffer, boxed: false) + break + case .messageEntityHashtag(let offset, let length): + if boxed { + buffer.appendInt32(1868782349) + } + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(length, buffer: buffer, boxed: false) + break + case .messageEntityBotCommand(let offset, let length): + if boxed { + buffer.appendInt32(1827637959) + } + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(length, buffer: buffer, boxed: false) + break + case .messageEntityUrl(let offset, let length): + if boxed { + buffer.appendInt32(1859134776) + } + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(length, buffer: buffer, boxed: false) + break + case .messageEntityEmail(let offset, let length): + if boxed { + buffer.appendInt32(1692693954) + } + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(length, buffer: buffer, boxed: false) + break + case .messageEntityBold(let offset, let length): + if boxed { + buffer.appendInt32(-1117713463) + } + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(length, buffer: buffer, boxed: false) + break + case .messageEntityItalic(let offset, let length): + if boxed { + buffer.appendInt32(-2106619040) + } + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(length, buffer: buffer, boxed: false) + break + case .messageEntityCode(let offset, let length): + if boxed { + buffer.appendInt32(681706865) + } + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(length, buffer: buffer, boxed: false) + break + case .messageEntityPre(let offset, let length, let language): + if boxed { + buffer.appendInt32(1938967520) + } + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(length, buffer: buffer, boxed: false) + serializeString(language, buffer: buffer, boxed: false) + break + case .messageEntityTextUrl(let offset, let length, let url): + if boxed { + buffer.appendInt32(1990644519) + } + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(length, buffer: buffer, boxed: false) + serializeString(url, buffer: buffer, boxed: false) + break + case .messageEntityMentionName(let offset, let length, let userId): + if boxed { + buffer.appendInt32(892193368) + } + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(length, buffer: buffer, boxed: false) + serializeInt32(userId, buffer: buffer, boxed: false) + break + case .inputMessageEntityMentionName(let offset, let length, let userId): + if boxed { + buffer.appendInt32(546203849) + } + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(length, buffer: buffer, boxed: false) + userId.serialize(buffer, true) + break + case .messageEntityPhone(let offset, let length): + if boxed { + buffer.appendInt32(-1687559349) + } + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(length, buffer: buffer, boxed: false) + break + case .messageEntityCashtag(let offset, let length): + if boxed { + buffer.appendInt32(1280209983) + } + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(length, buffer: buffer, boxed: false) + break + case .messageEntityUnderline(let offset, let length): + if boxed { + buffer.appendInt32(-1672577397) + } + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(length, buffer: buffer, boxed: false) + break + case .messageEntityStrike(let offset, let length): + if boxed { + buffer.appendInt32(-1090087980) + } + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(length, buffer: buffer, boxed: false) + break + case .messageEntityBlockquote(let offset, let length): + if boxed { + buffer.appendInt32(34469328) + } + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(length, buffer: buffer, boxed: false) + break + case .messageEntityBankCard(let offset, let length): + if boxed { + buffer.appendInt32(1981704948) + } + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(length, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .messageEntityUnknown(let offset, let length): + return ("messageEntityUnknown", [("offset", offset), ("length", length)]) + case .messageEntityMention(let offset, let length): + return ("messageEntityMention", [("offset", offset), ("length", length)]) + case .messageEntityHashtag(let offset, let length): + return ("messageEntityHashtag", [("offset", offset), ("length", length)]) + case .messageEntityBotCommand(let offset, let length): + return ("messageEntityBotCommand", [("offset", offset), ("length", length)]) + case .messageEntityUrl(let offset, let length): + return ("messageEntityUrl", [("offset", offset), ("length", length)]) + case .messageEntityEmail(let offset, let length): + return ("messageEntityEmail", [("offset", offset), ("length", length)]) + case .messageEntityBold(let offset, let length): + return ("messageEntityBold", [("offset", offset), ("length", length)]) + case .messageEntityItalic(let offset, let length): + return ("messageEntityItalic", [("offset", offset), ("length", length)]) + case .messageEntityCode(let offset, let length): + return ("messageEntityCode", [("offset", offset), ("length", length)]) + case .messageEntityPre(let offset, let length, let language): + return ("messageEntityPre", [("offset", offset), ("length", length), ("language", language)]) + case .messageEntityTextUrl(let offset, let length, let url): + return ("messageEntityTextUrl", [("offset", offset), ("length", length), ("url", url)]) + case .messageEntityMentionName(let offset, let length, let userId): + return ("messageEntityMentionName", [("offset", offset), ("length", length), ("userId", userId)]) + case .inputMessageEntityMentionName(let offset, let length, let userId): + return ("inputMessageEntityMentionName", [("offset", offset), ("length", length), ("userId", userId)]) + case .messageEntityPhone(let offset, let length): + return ("messageEntityPhone", [("offset", offset), ("length", length)]) + case .messageEntityCashtag(let offset, let length): + return ("messageEntityCashtag", [("offset", offset), ("length", length)]) + case .messageEntityUnderline(let offset, let length): + return ("messageEntityUnderline", [("offset", offset), ("length", length)]) + case .messageEntityStrike(let offset, let length): + return ("messageEntityStrike", [("offset", offset), ("length", length)]) + case .messageEntityBlockquote(let offset, let length): + return ("messageEntityBlockquote", [("offset", offset), ("length", length)]) + case .messageEntityBankCard(let offset, let length): + return ("messageEntityBankCard", [("offset", offset), ("length", length)]) + } + } + + public static func parse_messageEntityUnknown(_ reader: BufferReader) -> MessageEntity? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageEntity.messageEntityUnknown(offset: _1!, length: _2!) + } + else { + return nil + } + } + public static func parse_messageEntityMention(_ reader: BufferReader) -> MessageEntity? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageEntity.messageEntityMention(offset: _1!, length: _2!) + } + else { + return nil + } + } + public static func parse_messageEntityHashtag(_ reader: BufferReader) -> MessageEntity? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageEntity.messageEntityHashtag(offset: _1!, length: _2!) + } + else { + return nil + } + } + public static func parse_messageEntityBotCommand(_ reader: BufferReader) -> MessageEntity? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageEntity.messageEntityBotCommand(offset: _1!, length: _2!) + } + else { + return nil + } + } + public static func parse_messageEntityUrl(_ reader: BufferReader) -> MessageEntity? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageEntity.messageEntityUrl(offset: _1!, length: _2!) + } + else { + return nil + } + } + public static func parse_messageEntityEmail(_ reader: BufferReader) -> MessageEntity? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageEntity.messageEntityEmail(offset: _1!, length: _2!) + } + else { + return nil + } + } + public static func parse_messageEntityBold(_ reader: BufferReader) -> MessageEntity? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageEntity.messageEntityBold(offset: _1!, length: _2!) + } + else { + return nil + } + } + public static func parse_messageEntityItalic(_ reader: BufferReader) -> MessageEntity? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageEntity.messageEntityItalic(offset: _1!, length: _2!) + } + else { + return nil + } + } + public static func parse_messageEntityCode(_ reader: BufferReader) -> MessageEntity? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageEntity.messageEntityCode(offset: _1!, length: _2!) + } + else { + return nil + } + } + public static func parse_messageEntityPre(_ reader: BufferReader) -> MessageEntity? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: String? + _3 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.MessageEntity.messageEntityPre(offset: _1!, length: _2!, language: _3!) + } + else { + return nil + } + } + public static func parse_messageEntityTextUrl(_ reader: BufferReader) -> MessageEntity? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: String? + _3 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.MessageEntity.messageEntityTextUrl(offset: _1!, length: _2!, url: _3!) + } + else { + return nil + } + } + public static func parse_messageEntityMentionName(_ reader: BufferReader) -> MessageEntity? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.MessageEntity.messageEntityMentionName(offset: _1!, length: _2!, userId: _3!) + } + else { + return nil + } + } + public static func parse_inputMessageEntityMentionName(_ reader: BufferReader) -> MessageEntity? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Api.InputUser? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.InputUser + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.MessageEntity.inputMessageEntityMentionName(offset: _1!, length: _2!, userId: _3!) + } + else { + return nil + } + } + public static func parse_messageEntityPhone(_ reader: BufferReader) -> MessageEntity? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageEntity.messageEntityPhone(offset: _1!, length: _2!) + } + else { + return nil + } + } + public static func parse_messageEntityCashtag(_ reader: BufferReader) -> MessageEntity? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageEntity.messageEntityCashtag(offset: _1!, length: _2!) + } + else { + return nil + } + } + public static func parse_messageEntityUnderline(_ reader: BufferReader) -> MessageEntity? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageEntity.messageEntityUnderline(offset: _1!, length: _2!) + } + else { + return nil + } + } + public static func parse_messageEntityStrike(_ reader: BufferReader) -> MessageEntity? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageEntity.messageEntityStrike(offset: _1!, length: _2!) + } + else { + return nil + } + } + public static func parse_messageEntityBlockquote(_ reader: BufferReader) -> MessageEntity? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageEntity.messageEntityBlockquote(offset: _1!, length: _2!) + } + else { + return nil + } + } + public static func parse_messageEntityBankCard(_ reader: BufferReader) -> MessageEntity? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.MessageEntity.messageEntityBankCard(offset: _1!, length: _2!) + } + else { + return nil + } + } + + } + public enum InputPhoto: TypeConstructorDescription { + case inputPhotoEmpty + case inputPhoto(id: Int64, accessHash: Int64, fileReference: Buffer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inputPhotoEmpty: + if boxed { + buffer.appendInt32(483901197) + } + + break + case .inputPhoto(let id, let accessHash, let fileReference): + if boxed { + buffer.appendInt32(1001634122) + } + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeBytes(fileReference, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inputPhotoEmpty: + return ("inputPhotoEmpty", []) + case .inputPhoto(let id, let accessHash, let fileReference): + return ("inputPhoto", [("id", id), ("accessHash", accessHash), ("fileReference", fileReference)]) + } + } + + public static func parse_inputPhotoEmpty(_ reader: BufferReader) -> InputPhoto? { + return Api.InputPhoto.inputPhotoEmpty + } + public static func parse_inputPhoto(_ reader: BufferReader) -> InputPhoto? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int64? + _2 = reader.readInt64() + var _3: Buffer? + _3 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.InputPhoto.inputPhoto(id: _1!, accessHash: _2!, fileReference: _3!) + } + else { + return nil + } + } + + } + public enum PageListOrderedItem: TypeConstructorDescription { + case pageListOrderedItemText(num: String, text: Api.RichText) + case pageListOrderedItemBlocks(num: String, blocks: [Api.PageBlock]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .pageListOrderedItemText(let num, let text): + if boxed { + buffer.appendInt32(1577484359) + } + serializeString(num, buffer: buffer, boxed: false) + text.serialize(buffer, true) + break + case .pageListOrderedItemBlocks(let num, let blocks): + if boxed { + buffer.appendInt32(-1730311882) + } + serializeString(num, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(blocks.count)) + for item in blocks { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .pageListOrderedItemText(let num, let text): + return ("pageListOrderedItemText", [("num", num), ("text", text)]) + case .pageListOrderedItemBlocks(let num, let blocks): + return ("pageListOrderedItemBlocks", [("num", num), ("blocks", blocks)]) + } + } + + public static func parse_pageListOrderedItemText(_ reader: BufferReader) -> PageListOrderedItem? { + var _1: String? + _1 = parseString(reader) + var _2: Api.RichText? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.RichText + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.PageListOrderedItem.pageListOrderedItemText(num: _1!, text: _2!) + } + else { + return nil + } + } + public static func parse_pageListOrderedItemBlocks(_ reader: BufferReader) -> PageListOrderedItem? { + var _1: String? + _1 = parseString(reader) + var _2: [Api.PageBlock]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PageBlock.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.PageListOrderedItem.pageListOrderedItemBlocks(num: _1!, blocks: _2!) + } + else { + return nil + } + } + + } + public enum EncryptedChat: TypeConstructorDescription { + case encryptedChatEmpty(id: Int32) + case encryptedChatWaiting(id: Int32, accessHash: Int64, date: Int32, adminId: Int32, participantId: Int32) + case encryptedChat(id: Int32, accessHash: Int64, date: Int32, adminId: Int32, participantId: Int32, gAOrB: Buffer, keyFingerprint: Int64) + case encryptedChatRequested(flags: Int32, folderId: Int32?, id: Int32, accessHash: Int64, date: Int32, adminId: Int32, participantId: Int32, gA: Buffer) + case encryptedChatDiscarded(flags: Int32, id: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .encryptedChatEmpty(let id): + if boxed { + buffer.appendInt32(-1417756512) + } + serializeInt32(id, buffer: buffer, boxed: false) + break + case .encryptedChatWaiting(let id, let accessHash, let date, let adminId, let participantId): + if boxed { + buffer.appendInt32(1006044124) + } + serializeInt32(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + serializeInt32(adminId, buffer: buffer, boxed: false) + serializeInt32(participantId, buffer: buffer, boxed: false) + break + case .encryptedChat(let id, let accessHash, let date, let adminId, let participantId, let gAOrB, let keyFingerprint): + if boxed { + buffer.appendInt32(-94974410) + } + serializeInt32(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + serializeInt32(adminId, buffer: buffer, boxed: false) + serializeInt32(participantId, buffer: buffer, boxed: false) + serializeBytes(gAOrB, buffer: buffer, boxed: false) + serializeInt64(keyFingerprint, buffer: buffer, boxed: false) + break + case .encryptedChatRequested(let flags, let folderId, let id, let accessHash, let date, let adminId, let participantId, let gA): + if boxed { + buffer.appendInt32(1651608194) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} + serializeInt32(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + serializeInt32(adminId, buffer: buffer, boxed: false) + serializeInt32(participantId, buffer: buffer, boxed: false) + serializeBytes(gA, buffer: buffer, boxed: false) + break + case .encryptedChatDiscarded(let flags, let id): + if boxed { + buffer.appendInt32(505183301) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .encryptedChatEmpty(let id): + return ("encryptedChatEmpty", [("id", id)]) + case .encryptedChatWaiting(let id, let accessHash, let date, let adminId, let participantId): + return ("encryptedChatWaiting", [("id", id), ("accessHash", accessHash), ("date", date), ("adminId", adminId), ("participantId", participantId)]) + case .encryptedChat(let id, let accessHash, let date, let adminId, let participantId, let gAOrB, let keyFingerprint): + return ("encryptedChat", [("id", id), ("accessHash", accessHash), ("date", date), ("adminId", adminId), ("participantId", participantId), ("gAOrB", gAOrB), ("keyFingerprint", keyFingerprint)]) + case .encryptedChatRequested(let flags, let folderId, let id, let accessHash, let date, let adminId, let participantId, let gA): + return ("encryptedChatRequested", [("flags", flags), ("folderId", folderId), ("id", id), ("accessHash", accessHash), ("date", date), ("adminId", adminId), ("participantId", participantId), ("gA", gA)]) + case .encryptedChatDiscarded(let flags, let id): + return ("encryptedChatDiscarded", [("flags", flags), ("id", id)]) + } + } + + public static func parse_encryptedChatEmpty(_ reader: BufferReader) -> EncryptedChat? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.EncryptedChat.encryptedChatEmpty(id: _1!) + } + else { + return nil + } + } + public static func parse_encryptedChatWaiting(_ reader: BufferReader) -> EncryptedChat? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.EncryptedChat.encryptedChatWaiting(id: _1!, accessHash: _2!, date: _3!, adminId: _4!, participantId: _5!) + } + else { + return nil + } + } + public static func parse_encryptedChat(_ reader: BufferReader) -> EncryptedChat? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + var _6: Buffer? + _6 = parseBytes(reader) + var _7: Int64? + _7 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.EncryptedChat.encryptedChat(id: _1!, accessHash: _2!, date: _3!, adminId: _4!, participantId: _5!, gAOrB: _6!, keyFingerprint: _7!) + } + else { + return nil + } + } + public static func parse_encryptedChatRequested(_ reader: BufferReader) -> EncryptedChat? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } + var _3: Int32? + _3 = reader.readInt32() + var _4: Int64? + _4 = reader.readInt64() + var _5: Int32? + _5 = reader.readInt32() + var _6: Int32? + _6 = reader.readInt32() + var _7: Int32? + _7 = reader.readInt32() + var _8: Buffer? + _8 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = _8 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { + return Api.EncryptedChat.encryptedChatRequested(flags: _1!, folderId: _2, id: _3!, accessHash: _4!, date: _5!, adminId: _6!, participantId: _7!, gA: _8!) + } + else { + return nil + } + } + public static func parse_encryptedChatDiscarded(_ reader: BufferReader) -> EncryptedChat? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.EncryptedChat.encryptedChatDiscarded(flags: _1!, id: _2!) + } + else { + return nil + } + } + + } + public enum PeerLocated: TypeConstructorDescription { + case peerLocated(peer: Api.Peer, expires: Int32, distance: Int32) + case peerSelfLocated(expires: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .peerLocated(let peer, let expires, let distance): + if boxed { + buffer.appendInt32(-901375139) + } + peer.serialize(buffer, true) + serializeInt32(expires, buffer: buffer, boxed: false) + serializeInt32(distance, buffer: buffer, boxed: false) + break + case .peerSelfLocated(let expires): + if boxed { + buffer.appendInt32(-118740917) + } + serializeInt32(expires, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .peerLocated(let peer, let expires, let distance): + return ("peerLocated", [("peer", peer), ("expires", expires), ("distance", distance)]) + case .peerSelfLocated(let expires): + return ("peerSelfLocated", [("expires", expires)]) + } + } + + public static func parse_peerLocated(_ reader: BufferReader) -> PeerLocated? { + var _1: Api.Peer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.PeerLocated.peerLocated(peer: _1!, expires: _2!, distance: _3!) + } + else { + return nil + } + } + public static func parse_peerSelfLocated(_ reader: BufferReader) -> PeerLocated? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.PeerLocated.peerSelfLocated(expires: _1!) + } + else { + return nil + } + } + + } + public enum Document: TypeConstructorDescription { + case documentEmpty(id: Int64) + case document(flags: Int32, id: Int64, accessHash: Int64, fileReference: Buffer, date: Int32, mimeType: String, size: Int32, thumbs: [Api.PhotoSize]?, videoThumbs: [Api.VideoSize]?, dcId: Int32, attributes: [Api.DocumentAttribute]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .documentEmpty(let id): + if boxed { + buffer.appendInt32(922273905) + } + serializeInt64(id, buffer: buffer, boxed: false) + break + case .document(let flags, let id, let accessHash, let fileReference, let date, let mimeType, let size, let thumbs, let videoThumbs, let dcId, let attributes): + if boxed { + buffer.appendInt32(512177195) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(id, buffer: buffer, boxed: false) + serializeInt64(accessHash, buffer: buffer, boxed: false) + serializeBytes(fileReference, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + serializeString(mimeType, buffer: buffer, boxed: false) + serializeInt32(size, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(thumbs!.count)) + for item in thumbs! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(videoThumbs!.count)) + for item in videoThumbs! { + item.serialize(buffer, true) + }} + serializeInt32(dcId, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(attributes.count)) + for item in attributes { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .documentEmpty(let id): + return ("documentEmpty", [("id", id)]) + case .document(let flags, let id, let accessHash, let fileReference, let date, let mimeType, let size, let thumbs, let videoThumbs, let dcId, let attributes): + return ("document", [("flags", flags), ("id", id), ("accessHash", accessHash), ("fileReference", fileReference), ("date", date), ("mimeType", mimeType), ("size", size), ("thumbs", thumbs), ("videoThumbs", videoThumbs), ("dcId", dcId), ("attributes", attributes)]) + } + } + + public static func parse_documentEmpty(_ reader: BufferReader) -> Document? { + var _1: Int64? + _1 = reader.readInt64() + let _c1 = _1 != nil + if _c1 { + return Api.Document.documentEmpty(id: _1!) + } + else { + return nil + } + } + public static func parse_document(_ reader: BufferReader) -> Document? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + var _3: Int64? + _3 = reader.readInt64() + var _4: Buffer? + _4 = parseBytes(reader) + var _5: Int32? + _5 = reader.readInt32() + var _6: String? + _6 = parseString(reader) + var _7: Int32? + _7 = reader.readInt32() + var _8: [Api.PhotoSize]? + if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { + _8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PhotoSize.self) + } } + var _9: [Api.VideoSize]? + if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { + _9 = Api.parseVector(reader, elementSignature: 0, elementType: Api.VideoSize.self) + } } + var _10: Int32? + _10 = reader.readInt32() + var _11: [Api.DocumentAttribute]? + if let _ = reader.readInt32() { + _11 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DocumentAttribute.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = (Int(_1!) & Int(1 << 0) == 0) || _8 != nil + let _c9 = (Int(_1!) & Int(1 << 1) == 0) || _9 != nil + let _c10 = _10 != nil + let _c11 = _11 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { + return Api.Document.document(flags: _1!, id: _2!, accessHash: _3!, fileReference: _4!, date: _5!, mimeType: _6!, size: _7!, thumbs: _8, videoThumbs: _9, dcId: _10!, attributes: _11!) + } + else { + return nil + } + } + + } + public enum WebAuthorization: TypeConstructorDescription { + case webAuthorization(hash: Int64, botId: Int32, domain: String, browser: String, platform: String, dateCreated: Int32, dateActive: Int32, ip: String, region: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .webAuthorization(let hash, let botId, let domain, let browser, let platform, let dateCreated, let dateActive, let ip, let region): + if boxed { + buffer.appendInt32(-892779534) + } + serializeInt64(hash, buffer: buffer, boxed: false) + serializeInt32(botId, buffer: buffer, boxed: false) + serializeString(domain, buffer: buffer, boxed: false) + serializeString(browser, buffer: buffer, boxed: false) + serializeString(platform, buffer: buffer, boxed: false) + serializeInt32(dateCreated, buffer: buffer, boxed: false) + serializeInt32(dateActive, buffer: buffer, boxed: false) + serializeString(ip, buffer: buffer, boxed: false) + serializeString(region, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .webAuthorization(let hash, let botId, let domain, let browser, let platform, let dateCreated, let dateActive, let ip, let region): + return ("webAuthorization", [("hash", hash), ("botId", botId), ("domain", domain), ("browser", browser), ("platform", platform), ("dateCreated", dateCreated), ("dateActive", dateActive), ("ip", ip), ("region", region)]) + } + } + + public static func parse_webAuthorization(_ reader: BufferReader) -> WebAuthorization? { + var _1: Int64? + _1 = reader.readInt64() + var _2: Int32? + _2 = reader.readInt32() + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + var _5: String? + _5 = parseString(reader) + var _6: Int32? + _6 = reader.readInt32() + var _7: Int32? + _7 = reader.readInt32() + var _8: String? + _8 = parseString(reader) + var _9: String? + _9 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = _8 != nil + let _c9 = _9 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { + return Api.WebAuthorization.webAuthorization(hash: _1!, botId: _2!, domain: _3!, browser: _4!, platform: _5!, dateCreated: _6!, dateActive: _7!, ip: _8!, region: _9!) + } + else { + return nil + } + } + + } + public enum ImportedContact: TypeConstructorDescription { + case importedContact(userId: Int32, clientId: Int64) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .importedContact(let userId, let clientId): + if boxed { + buffer.appendInt32(-805141448) + } + serializeInt32(userId, buffer: buffer, boxed: false) + serializeInt64(clientId, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .importedContact(let userId, let clientId): + return ("importedContact", [("userId", userId), ("clientId", clientId)]) + } + } + + public static func parse_importedContact(_ reader: BufferReader) -> ImportedContact? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int64? + _2 = reader.readInt64() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.ImportedContact.importedContact(userId: _1!, clientId: _2!) } else { return nil @@ -2541,4 +22860,3 @@ public struct help { } } -} diff --git a/submodules/TelegramApi/Sources/Api3.swift b/submodules/TelegramApi/Sources/Api3.swift index a6344c4507..2dda6d04f6 100644 --- a/submodules/TelegramApi/Sources/Api3.swift +++ b/submodules/TelegramApi/Sources/Api3.swift @@ -1,287 +1,19 @@ public extension Api { -public struct updates { - public enum Difference: TypeConstructorDescription { - case differenceEmpty(date: Int32, seq: Int32) - case difference(newMessages: [Api.Message], newEncryptedMessages: [Api.EncryptedMessage], otherUpdates: [Api.Update], chats: [Api.Chat], users: [Api.User], state: Api.updates.State) - case differenceSlice(newMessages: [Api.Message], newEncryptedMessages: [Api.EncryptedMessage], otherUpdates: [Api.Update], chats: [Api.Chat], users: [Api.User], intermediateState: Api.updates.State) - case differenceTooLong(pts: Int32) +public struct channels { + public enum ChannelParticipants: TypeConstructorDescription { + case channelParticipants(count: Int32, participants: [Api.ChannelParticipant], users: [Api.User]) + case channelParticipantsNotModified public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .differenceEmpty(let date, let seq): + case .channelParticipants(let count, let participants, let users): if boxed { - buffer.appendInt32(1567990072) - } - serializeInt32(date, buffer: buffer, boxed: false) - serializeInt32(seq, buffer: buffer, boxed: false) - break - case .difference(let newMessages, let newEncryptedMessages, let otherUpdates, let chats, let users, let state): - if boxed { - buffer.appendInt32(16030880) + buffer.appendInt32(-177282392) } + serializeInt32(count, buffer: buffer, boxed: false) buffer.appendInt32(481674261) - buffer.appendInt32(Int32(newMessages.count)) - for item in newMessages { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(newEncryptedMessages.count)) - for item in newEncryptedMessages { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(otherUpdates.count)) - for item in otherUpdates { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(chats.count)) - for item in chats { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - state.serialize(buffer, true) - break - case .differenceSlice(let newMessages, let newEncryptedMessages, let otherUpdates, let chats, let users, let intermediateState): - if boxed { - buffer.appendInt32(-1459938943) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(newMessages.count)) - for item in newMessages { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(newEncryptedMessages.count)) - for item in newEncryptedMessages { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(otherUpdates.count)) - for item in otherUpdates { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(chats.count)) - for item in chats { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - intermediateState.serialize(buffer, true) - break - case .differenceTooLong(let pts): - if boxed { - buffer.appendInt32(1258196845) - } - serializeInt32(pts, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .differenceEmpty(let date, let seq): - return ("differenceEmpty", [("date", date), ("seq", seq)]) - case .difference(let newMessages, let newEncryptedMessages, let otherUpdates, let chats, let users, let state): - return ("difference", [("newMessages", newMessages), ("newEncryptedMessages", newEncryptedMessages), ("otherUpdates", otherUpdates), ("chats", chats), ("users", users), ("state", state)]) - case .differenceSlice(let newMessages, let newEncryptedMessages, let otherUpdates, let chats, let users, let intermediateState): - return ("differenceSlice", [("newMessages", newMessages), ("newEncryptedMessages", newEncryptedMessages), ("otherUpdates", otherUpdates), ("chats", chats), ("users", users), ("intermediateState", intermediateState)]) - case .differenceTooLong(let pts): - return ("differenceTooLong", [("pts", pts)]) - } - } - - public static func parse_differenceEmpty(_ reader: BufferReader) -> Difference? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.updates.Difference.differenceEmpty(date: _1!, seq: _2!) - } - else { - return nil - } - } - public static func parse_difference(_ reader: BufferReader) -> Difference? { - var _1: [Api.Message]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Message.self) - } - var _2: [Api.EncryptedMessage]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.EncryptedMessage.self) - } - var _3: [Api.Update]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Update.self) - } - var _4: [Api.Chat]? - if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) - } - var _5: [Api.User]? - if let _ = reader.readInt32() { - _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } - var _6: Api.updates.State? - if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.updates.State - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.updates.Difference.difference(newMessages: _1!, newEncryptedMessages: _2!, otherUpdates: _3!, chats: _4!, users: _5!, state: _6!) - } - else { - return nil - } - } - public static func parse_differenceSlice(_ reader: BufferReader) -> Difference? { - var _1: [Api.Message]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Message.self) - } - var _2: [Api.EncryptedMessage]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.EncryptedMessage.self) - } - var _3: [Api.Update]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Update.self) - } - var _4: [Api.Chat]? - if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) - } - var _5: [Api.User]? - if let _ = reader.readInt32() { - _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } - var _6: Api.updates.State? - if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.updates.State - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.updates.Difference.differenceSlice(newMessages: _1!, newEncryptedMessages: _2!, otherUpdates: _3!, chats: _4!, users: _5!, intermediateState: _6!) - } - else { - return nil - } - } - public static func parse_differenceTooLong(_ reader: BufferReader) -> Difference? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.updates.Difference.differenceTooLong(pts: _1!) - } - else { - return nil - } - } - - } - public enum State: TypeConstructorDescription { - case state(pts: Int32, qts: Int32, date: Int32, seq: Int32, unreadCount: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .state(let pts, let qts, let date, let seq, let unreadCount): - if boxed { - buffer.appendInt32(-1519637954) - } - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(qts, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - serializeInt32(seq, buffer: buffer, boxed: false) - serializeInt32(unreadCount, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .state(let pts, let qts, let date, let seq, let unreadCount): - return ("state", [("pts", pts), ("qts", qts), ("date", date), ("seq", seq), ("unreadCount", unreadCount)]) - } - } - - public static func parse_state(_ reader: BufferReader) -> State? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.updates.State.state(pts: _1!, qts: _2!, date: _3!, seq: _4!, unreadCount: _5!) - } - else { - return nil - } - } - - } - public enum ChannelDifference: TypeConstructorDescription { - case channelDifferenceEmpty(flags: Int32, pts: Int32, timeout: Int32?) - case channelDifferenceTooLong(flags: Int32, timeout: Int32?, dialog: Api.Dialog, messages: [Api.Message], chats: [Api.Chat], users: [Api.User]) - case channelDifference(flags: Int32, pts: Int32, timeout: Int32?, newMessages: [Api.Message], otherUpdates: [Api.Update], chats: [Api.Chat], users: [Api.User]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .channelDifferenceEmpty(let flags, let pts, let timeout): - if boxed { - buffer.appendInt32(1041346555) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(pts, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(timeout!, buffer: buffer, boxed: false)} - break - case .channelDifferenceTooLong(let flags, let timeout, let dialog, let messages, let chats, let users): - if boxed { - buffer.appendInt32(-1531132162) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(timeout!, buffer: buffer, boxed: false)} - dialog.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(messages.count)) - for item in messages { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(chats.count)) - for item in chats { + buffer.appendInt32(Int32(participants.count)) + for item in participants { item.serialize(buffer, true) } buffer.appendInt32(481674261) @@ -290,776 +22,60 @@ public struct updates { item.serialize(buffer, true) } break - case .channelDifference(let flags, let pts, let timeout, let newMessages, let otherUpdates, let chats, let users): + case .channelParticipantsNotModified: if boxed { - buffer.appendInt32(543450958) - } - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(pts, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(timeout!, buffer: buffer, boxed: false)} - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(newMessages.count)) - for item in newMessages { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(otherUpdates.count)) - for item in otherUpdates { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(chats.count)) - for item in chats { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) + buffer.appendInt32(-266911767) } + break } } public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .channelDifferenceEmpty(let flags, let pts, let timeout): - return ("channelDifferenceEmpty", [("flags", flags), ("pts", pts), ("timeout", timeout)]) - case .channelDifferenceTooLong(let flags, let timeout, let dialog, let messages, let chats, let users): - return ("channelDifferenceTooLong", [("flags", flags), ("timeout", timeout), ("dialog", dialog), ("messages", messages), ("chats", chats), ("users", users)]) - case .channelDifference(let flags, let pts, let timeout, let newMessages, let otherUpdates, let chats, let users): - return ("channelDifference", [("flags", flags), ("pts", pts), ("timeout", timeout), ("newMessages", newMessages), ("otherUpdates", otherUpdates), ("chats", chats), ("users", users)]) + case .channelParticipants(let count, let participants, let users): + return ("channelParticipants", [("count", count), ("participants", participants), ("users", users)]) + case .channelParticipantsNotModified: + return ("channelParticipantsNotModified", []) } } - public static func parse_channelDifferenceEmpty(_ reader: BufferReader) -> ChannelDifference? { + public static func parse_channelParticipants(_ reader: BufferReader) -> ChannelParticipants? { var _1: Int32? _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_3 = reader.readInt32() } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.updates.ChannelDifference.channelDifferenceEmpty(flags: _1!, pts: _2!, timeout: _3) - } - else { - return nil - } - } - public static func parse_channelDifferenceTooLong(_ reader: BufferReader) -> ChannelDifference? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_2 = reader.readInt32() } - var _3: Api.Dialog? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.Dialog - } - var _4: [Api.Message]? + var _2: [Api.ChannelParticipant]? if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Message.self) + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ChannelParticipant.self) } - var _5: [Api.Chat]? + var _3: [Api.User]? if let _ = reader.readInt32() { - _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) } - var _6: [Api.User]? - if let _ = reader.readInt32() { - _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.updates.ChannelDifference.channelDifferenceTooLong(flags: _1!, timeout: _2, dialog: _3!, messages: _4!, chats: _5!, users: _6!) - } - else { - return nil - } - } - public static func parse_channelDifference(_ reader: BufferReader) -> ChannelDifference? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - if Int(_1!) & Int(1 << 1) != 0 {_3 = reader.readInt32() } - var _4: [Api.Message]? - if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Message.self) - } - var _5: [Api.Update]? - if let _ = reader.readInt32() { - _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Update.self) - } - var _6: [Api.Chat]? - if let _ = reader.readInt32() { - _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) - } - var _7: [Api.User]? - if let _ = reader.readInt32() { - _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = _6 != nil - let _c7 = _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.updates.ChannelDifference.channelDifference(flags: _1!, pts: _2!, timeout: _3, newMessages: _4!, otherUpdates: _5!, chats: _6!, users: _7!) - } - else { - return nil - } - } - - } -} -} -public extension Api { -public struct upload { - public enum WebFile: TypeConstructorDescription { - case webFile(size: Int32, mimeType: String, fileType: Api.storage.FileType, mtime: Int32, bytes: Buffer) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .webFile(let size, let mimeType, let fileType, let mtime, let bytes): - if boxed { - buffer.appendInt32(568808380) - } - serializeInt32(size, buffer: buffer, boxed: false) - serializeString(mimeType, buffer: buffer, boxed: false) - fileType.serialize(buffer, true) - serializeInt32(mtime, buffer: buffer, boxed: false) - serializeBytes(bytes, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .webFile(let size, let mimeType, let fileType, let mtime, let bytes): - return ("webFile", [("size", size), ("mimeType", mimeType), ("fileType", fileType), ("mtime", mtime), ("bytes", bytes)]) - } - } - - public static func parse_webFile(_ reader: BufferReader) -> WebFile? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - _2 = parseString(reader) - var _3: Api.storage.FileType? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.storage.FileType - } - var _4: Int32? - _4 = reader.readInt32() - var _5: Buffer? - _5 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.upload.WebFile.webFile(size: _1!, mimeType: _2!, fileType: _3!, mtime: _4!, bytes: _5!) - } - else { - return nil - } - } - - } - public enum File: TypeConstructorDescription { - case file(type: Api.storage.FileType, mtime: Int32, bytes: Buffer) - case fileCdnRedirect(dcId: Int32, fileToken: Buffer, encryptionKey: Buffer, encryptionIv: Buffer, fileHashes: [Api.FileHash]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .file(let type, let mtime, let bytes): - if boxed { - buffer.appendInt32(157948117) - } - type.serialize(buffer, true) - serializeInt32(mtime, buffer: buffer, boxed: false) - serializeBytes(bytes, buffer: buffer, boxed: false) - break - case .fileCdnRedirect(let dcId, let fileToken, let encryptionKey, let encryptionIv, let fileHashes): - if boxed { - buffer.appendInt32(-242427324) - } - serializeInt32(dcId, buffer: buffer, boxed: false) - serializeBytes(fileToken, buffer: buffer, boxed: false) - serializeBytes(encryptionKey, buffer: buffer, boxed: false) - serializeBytes(encryptionIv, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(fileHashes.count)) - for item in fileHashes { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .file(let type, let mtime, let bytes): - return ("file", [("type", type), ("mtime", mtime), ("bytes", bytes)]) - case .fileCdnRedirect(let dcId, let fileToken, let encryptionKey, let encryptionIv, let fileHashes): - return ("fileCdnRedirect", [("dcId", dcId), ("fileToken", fileToken), ("encryptionKey", encryptionKey), ("encryptionIv", encryptionIv), ("fileHashes", fileHashes)]) - } - } - - public static func parse_file(_ reader: BufferReader) -> File? { - var _1: Api.storage.FileType? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.storage.FileType - } - var _2: Int32? - _2 = reader.readInt32() - var _3: Buffer? - _3 = parseBytes(reader) let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil if _c1 && _c2 && _c3 { - return Api.upload.File.file(type: _1!, mtime: _2!, bytes: _3!) + return Api.channels.ChannelParticipants.channelParticipants(count: _1!, participants: _2!, users: _3!) } else { return nil } } - public static func parse_fileCdnRedirect(_ reader: BufferReader) -> File? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Buffer? - _2 = parseBytes(reader) - var _3: Buffer? - _3 = parseBytes(reader) - var _4: Buffer? - _4 = parseBytes(reader) - var _5: [Api.FileHash]? - if let _ = reader.readInt32() { - _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.FileHash.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.upload.File.fileCdnRedirect(dcId: _1!, fileToken: _2!, encryptionKey: _3!, encryptionIv: _4!, fileHashes: _5!) - } - else { - return nil - } + public static func parse_channelParticipantsNotModified(_ reader: BufferReader) -> ChannelParticipants? { + return Api.channels.ChannelParticipants.channelParticipantsNotModified } } - public enum CdnFile: TypeConstructorDescription { - case cdnFileReuploadNeeded(requestToken: Buffer) - case cdnFile(bytes: Buffer) + public enum ChannelParticipant: TypeConstructorDescription { + case channelParticipant(participant: Api.ChannelParticipant, users: [Api.User]) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .cdnFileReuploadNeeded(let requestToken): + case .channelParticipant(let participant, let users): if boxed { - buffer.appendInt32(-290921362) - } - serializeBytes(requestToken, buffer: buffer, boxed: false) - break - case .cdnFile(let bytes): - if boxed { - buffer.appendInt32(-1449145777) - } - serializeBytes(bytes, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .cdnFileReuploadNeeded(let requestToken): - return ("cdnFileReuploadNeeded", [("requestToken", requestToken)]) - case .cdnFile(let bytes): - return ("cdnFile", [("bytes", bytes)]) - } - } - - public static func parse_cdnFileReuploadNeeded(_ reader: BufferReader) -> CdnFile? { - var _1: Buffer? - _1 = parseBytes(reader) - let _c1 = _1 != nil - if _c1 { - return Api.upload.CdnFile.cdnFileReuploadNeeded(requestToken: _1!) - } - else { - return nil - } - } - public static func parse_cdnFile(_ reader: BufferReader) -> CdnFile? { - var _1: Buffer? - _1 = parseBytes(reader) - let _c1 = _1 != nil - if _c1 { - return Api.upload.CdnFile.cdnFile(bytes: _1!) - } - else { - return nil - } - } - - } -} -} -public extension Api { -public struct storage { - public enum FileType: TypeConstructorDescription { - case fileUnknown - case filePartial - case fileJpeg - case fileGif - case filePng - case filePdf - case fileMp3 - case fileMov - case fileMp4 - case fileWebp - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .fileUnknown: - if boxed { - buffer.appendInt32(-1432995067) - } - - break - case .filePartial: - if boxed { - buffer.appendInt32(1086091090) - } - - break - case .fileJpeg: - if boxed { - buffer.appendInt32(8322574) - } - - break - case .fileGif: - if boxed { - buffer.appendInt32(-891180321) - } - - break - case .filePng: - if boxed { - buffer.appendInt32(172975040) - } - - break - case .filePdf: - if boxed { - buffer.appendInt32(-1373745011) - } - - break - case .fileMp3: - if boxed { - buffer.appendInt32(1384777335) - } - - break - case .fileMov: - if boxed { - buffer.appendInt32(1258941372) - } - - break - case .fileMp4: - if boxed { - buffer.appendInt32(-1278304028) - } - - break - case .fileWebp: - if boxed { - buffer.appendInt32(276907596) - } - - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .fileUnknown: - return ("fileUnknown", []) - case .filePartial: - return ("filePartial", []) - case .fileJpeg: - return ("fileJpeg", []) - case .fileGif: - return ("fileGif", []) - case .filePng: - return ("filePng", []) - case .filePdf: - return ("filePdf", []) - case .fileMp3: - return ("fileMp3", []) - case .fileMov: - return ("fileMov", []) - case .fileMp4: - return ("fileMp4", []) - case .fileWebp: - return ("fileWebp", []) - } - } - - public static func parse_fileUnknown(_ reader: BufferReader) -> FileType? { - return Api.storage.FileType.fileUnknown - } - public static func parse_filePartial(_ reader: BufferReader) -> FileType? { - return Api.storage.FileType.filePartial - } - public static func parse_fileJpeg(_ reader: BufferReader) -> FileType? { - return Api.storage.FileType.fileJpeg - } - public static func parse_fileGif(_ reader: BufferReader) -> FileType? { - return Api.storage.FileType.fileGif - } - public static func parse_filePng(_ reader: BufferReader) -> FileType? { - return Api.storage.FileType.filePng - } - public static func parse_filePdf(_ reader: BufferReader) -> FileType? { - return Api.storage.FileType.filePdf - } - public static func parse_fileMp3(_ reader: BufferReader) -> FileType? { - return Api.storage.FileType.fileMp3 - } - public static func parse_fileMov(_ reader: BufferReader) -> FileType? { - return Api.storage.FileType.fileMov - } - public static func parse_fileMp4(_ reader: BufferReader) -> FileType? { - return Api.storage.FileType.fileMp4 - } - public static func parse_fileWebp(_ reader: BufferReader) -> FileType? { - return Api.storage.FileType.fileWebp - } - - } -} -} -public extension Api { -public struct account { - public enum TmpPassword: TypeConstructorDescription { - case tmpPassword(tmpPassword: Buffer, validUntil: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .tmpPassword(let tmpPassword, let validUntil): - if boxed { - buffer.appendInt32(-614138572) - } - serializeBytes(tmpPassword, buffer: buffer, boxed: false) - serializeInt32(validUntil, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .tmpPassword(let tmpPassword, let validUntil): - return ("tmpPassword", [("tmpPassword", tmpPassword), ("validUntil", validUntil)]) - } - } - - public static func parse_tmpPassword(_ reader: BufferReader) -> TmpPassword? { - var _1: Buffer? - _1 = parseBytes(reader) - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.account.TmpPassword.tmpPassword(tmpPassword: _1!, validUntil: _2!) - } - else { - return nil - } - } - - } - public enum PasswordSettings: TypeConstructorDescription { - case passwordSettings(flags: Int32, email: String?, secureSettings: Api.SecureSecretSettings?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .passwordSettings(let flags, let email, let secureSettings): - if boxed { - buffer.appendInt32(-1705233435) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeString(email!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {secureSettings!.serialize(buffer, true)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .passwordSettings(let flags, let email, let secureSettings): - return ("passwordSettings", [("flags", flags), ("email", email), ("secureSettings", secureSettings)]) - } - } - - public static func parse_passwordSettings(_ reader: BufferReader) -> PasswordSettings? { - var _1: Int32? - _1 = reader.readInt32() - var _2: String? - if Int(_1!) & Int(1 << 0) != 0 {_2 = parseString(reader) } - var _3: Api.SecureSecretSettings? - if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.SecureSecretSettings - } } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - if _c1 && _c2 && _c3 { - return Api.account.PasswordSettings.passwordSettings(flags: _1!, email: _2, secureSettings: _3) - } - else { - return nil - } - } - - } - public enum Takeout: TypeConstructorDescription { - case takeout(id: Int64) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .takeout(let id): - if boxed { - buffer.appendInt32(1304052993) - } - serializeInt64(id, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .takeout(let id): - return ("takeout", [("id", id)]) - } - } - - public static func parse_takeout(_ reader: BufferReader) -> Takeout? { - var _1: Int64? - _1 = reader.readInt64() - let _c1 = _1 != nil - if _c1 { - return Api.account.Takeout.takeout(id: _1!) - } - else { - return nil - } - } - - } - public enum Themes: TypeConstructorDescription { - case themesNotModified - case themes(hash: Int32, themes: [Api.Theme]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .themesNotModified: - if boxed { - buffer.appendInt32(-199313886) - } - - break - case .themes(let hash, let themes): - if boxed { - buffer.appendInt32(2137482273) - } - serializeInt32(hash, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(themes.count)) - for item in themes { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .themesNotModified: - return ("themesNotModified", []) - case .themes(let hash, let themes): - return ("themes", [("hash", hash), ("themes", themes)]) - } - } - - public static func parse_themesNotModified(_ reader: BufferReader) -> Themes? { - return Api.account.Themes.themesNotModified - } - public static func parse_themes(_ reader: BufferReader) -> Themes? { - var _1: Int32? - _1 = reader.readInt32() - var _2: [Api.Theme]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Theme.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.account.Themes.themes(hash: _1!, themes: _2!) - } - else { - return nil - } - } - - } - public enum WallPapers: TypeConstructorDescription { - case wallPapersNotModified - case wallPapers(hash: Int32, wallpapers: [Api.WallPaper]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .wallPapersNotModified: - if boxed { - buffer.appendInt32(471437699) - } - - break - case .wallPapers(let hash, let wallpapers): - if boxed { - buffer.appendInt32(1881892265) - } - serializeInt32(hash, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(wallpapers.count)) - for item in wallpapers { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .wallPapersNotModified: - return ("wallPapersNotModified", []) - case .wallPapers(let hash, let wallpapers): - return ("wallPapers", [("hash", hash), ("wallpapers", wallpapers)]) - } - } - - public static func parse_wallPapersNotModified(_ reader: BufferReader) -> WallPapers? { - return Api.account.WallPapers.wallPapersNotModified - } - public static func parse_wallPapers(_ reader: BufferReader) -> WallPapers? { - var _1: Int32? - _1 = reader.readInt32() - var _2: [Api.WallPaper]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.WallPaper.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.account.WallPapers.wallPapers(hash: _1!, wallpapers: _2!) - } - else { - return nil - } - } - - } - public enum PasswordInputSettings: TypeConstructorDescription { - case passwordInputSettings(flags: Int32, newAlgo: Api.PasswordKdfAlgo?, newPasswordHash: Buffer?, hint: String?, email: String?, newSecureSettings: Api.SecureSecretSettings?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .passwordInputSettings(let flags, let newAlgo, let newPasswordHash, let hint, let email, let newSecureSettings): - if boxed { - buffer.appendInt32(-1036572727) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {newAlgo!.serialize(buffer, true)} - if Int(flags) & Int(1 << 0) != 0 {serializeBytes(newPasswordHash!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 0) != 0 {serializeString(hint!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeString(email!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {newSecureSettings!.serialize(buffer, true)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .passwordInputSettings(let flags, let newAlgo, let newPasswordHash, let hint, let email, let newSecureSettings): - return ("passwordInputSettings", [("flags", flags), ("newAlgo", newAlgo), ("newPasswordHash", newPasswordHash), ("hint", hint), ("email", email), ("newSecureSettings", newSecureSettings)]) - } - } - - public static func parse_passwordInputSettings(_ reader: BufferReader) -> PasswordInputSettings? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.PasswordKdfAlgo? - if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.PasswordKdfAlgo - } } - var _3: Buffer? - if Int(_1!) & Int(1 << 0) != 0 {_3 = parseBytes(reader) } - var _4: String? - if Int(_1!) & Int(1 << 0) != 0 {_4 = parseString(reader) } - var _5: String? - if Int(_1!) & Int(1 << 1) != 0 {_5 = parseString(reader) } - var _6: Api.SecureSecretSettings? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _6 = Api.parse(reader, signature: signature) as? Api.SecureSecretSettings - } } - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.account.PasswordInputSettings.passwordInputSettings(flags: _1!, newAlgo: _2, newPasswordHash: _3, hint: _4, email: _5, newSecureSettings: _6) - } - else { - return nil - } - } - - } - public enum WebAuthorizations: TypeConstructorDescription { - case webAuthorizations(authorizations: [Api.WebAuthorization], users: [Api.User]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .webAuthorizations(let authorizations, let users): - if boxed { - buffer.appendInt32(-313079300) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(authorizations.count)) - for item in authorizations { - item.serialize(buffer, true) + buffer.appendInt32(-791039645) } + participant.serialize(buffer, true) buffer.appendInt32(481674261) buffer.appendInt32(Int32(users.count)) for item in users { @@ -1071,15 +87,15 @@ public struct account { public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .webAuthorizations(let authorizations, let users): - return ("webAuthorizations", [("authorizations", authorizations), ("users", users)]) + case .channelParticipant(let participant, let users): + return ("channelParticipant", [("participant", participant), ("users", users)]) } } - public static func parse_webAuthorizations(_ reader: BufferReader) -> WebAuthorizations? { - var _1: [Api.WebAuthorization]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.WebAuthorization.self) + public static func parse_channelParticipant(_ reader: BufferReader) -> ChannelParticipant? { + var _1: Api.ChannelParticipant? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.ChannelParticipant } var _2: [Api.User]? if let _ = reader.readInt32() { @@ -1088,7 +104,7 @@ public struct account { let _c1 = _1 != nil let _c2 = _2 != nil if _c1 && _c2 { - return Api.account.WebAuthorizations.webAuthorizations(authorizations: _1!, users: _2!) + return Api.channels.ChannelParticipant.channelParticipant(participant: _1!, users: _2!) } else { return nil @@ -1096,280 +112,18 @@ public struct account { } } - public enum SentEmailCode: TypeConstructorDescription { - case sentEmailCode(emailPattern: String, length: Int32) + public enum AdminLogResults: TypeConstructorDescription { + case adminLogResults(events: [Api.ChannelAdminLogEvent], chats: [Api.Chat], users: [Api.User]) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .sentEmailCode(let emailPattern, let length): + case .adminLogResults(let events, let chats, let users): if boxed { - buffer.appendInt32(-2128640689) - } - serializeString(emailPattern, buffer: buffer, boxed: false) - serializeInt32(length, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .sentEmailCode(let emailPattern, let length): - return ("sentEmailCode", [("emailPattern", emailPattern), ("length", length)]) - } - } - - public static func parse_sentEmailCode(_ reader: BufferReader) -> SentEmailCode? { - var _1: String? - _1 = parseString(reader) - var _2: Int32? - _2 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.account.SentEmailCode.sentEmailCode(emailPattern: _1!, length: _2!) - } - else { - return nil - } - } - - } - public enum ContentSettings: TypeConstructorDescription { - case contentSettings(flags: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .contentSettings(let flags): - if boxed { - buffer.appendInt32(1474462241) - } - serializeInt32(flags, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .contentSettings(let flags): - return ("contentSettings", [("flags", flags)]) - } - } - - public static func parse_contentSettings(_ reader: BufferReader) -> ContentSettings? { - var _1: Int32? - _1 = reader.readInt32() - let _c1 = _1 != nil - if _c1 { - return Api.account.ContentSettings.contentSettings(flags: _1!) - } - else { - return nil - } - } - - } - public enum Authorizations: TypeConstructorDescription { - case authorizations(authorizations: [Api.Authorization]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .authorizations(let authorizations): - if boxed { - buffer.appendInt32(307276766) + buffer.appendInt32(-309659827) } buffer.appendInt32(481674261) - buffer.appendInt32(Int32(authorizations.count)) - for item in authorizations { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .authorizations(let authorizations): - return ("authorizations", [("authorizations", authorizations)]) - } - } - - public static func parse_authorizations(_ reader: BufferReader) -> Authorizations? { - var _1: [Api.Authorization]? - if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Authorization.self) - } - let _c1 = _1 != nil - if _c1 { - return Api.account.Authorizations.authorizations(authorizations: _1!) - } - else { - return nil - } - } - - } - public enum AuthorizationForm: TypeConstructorDescription { - case authorizationForm(flags: Int32, requiredTypes: [Api.SecureRequiredType], values: [Api.SecureValue], errors: [Api.SecureValueError], users: [Api.User], privacyPolicyUrl: String?) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .authorizationForm(let flags, let requiredTypes, let values, let errors, let users, let privacyPolicyUrl): - if boxed { - buffer.appendInt32(-1389486888) - } - serializeInt32(flags, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(requiredTypes.count)) - for item in requiredTypes { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(values.count)) - for item in values { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(errors.count)) - for item in errors { - item.serialize(buffer, true) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - if Int(flags) & Int(1 << 0) != 0 {serializeString(privacyPolicyUrl!, buffer: buffer, boxed: false)} - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .authorizationForm(let flags, let requiredTypes, let values, let errors, let users, let privacyPolicyUrl): - return ("authorizationForm", [("flags", flags), ("requiredTypes", requiredTypes), ("values", values), ("errors", errors), ("users", users), ("privacyPolicyUrl", privacyPolicyUrl)]) - } - } - - public static func parse_authorizationForm(_ reader: BufferReader) -> AuthorizationForm? { - var _1: Int32? - _1 = reader.readInt32() - var _2: [Api.SecureRequiredType]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureRequiredType.self) - } - var _3: [Api.SecureValue]? - if let _ = reader.readInt32() { - _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureValue.self) - } - var _4: [Api.SecureValueError]? - if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureValueError.self) - } - var _5: [Api.User]? - if let _ = reader.readInt32() { - _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } - var _6: String? - if Int(_1!) & Int(1 << 0) != 0 {_6 = parseString(reader) } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { - return Api.account.AuthorizationForm.authorizationForm(flags: _1!, requiredTypes: _2!, values: _3!, errors: _4!, users: _5!, privacyPolicyUrl: _6) - } - else { - return nil - } - } - - } - public enum Password: TypeConstructorDescription { - case password(flags: Int32, currentAlgo: Api.PasswordKdfAlgo?, srpB: Buffer?, srpId: Int64?, hint: String?, emailUnconfirmedPattern: String?, newAlgo: Api.PasswordKdfAlgo, newSecureAlgo: Api.SecurePasswordKdfAlgo, secureRandom: Buffer) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .password(let flags, let currentAlgo, let srpB, let srpId, let hint, let emailUnconfirmedPattern, let newAlgo, let newSecureAlgo, let secureRandom): - if boxed { - buffer.appendInt32(-1390001672) - } - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {currentAlgo!.serialize(buffer, true)} - if Int(flags) & Int(1 << 2) != 0 {serializeBytes(srpB!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeInt64(srpId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {serializeString(hint!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 4) != 0 {serializeString(emailUnconfirmedPattern!, buffer: buffer, boxed: false)} - newAlgo.serialize(buffer, true) - newSecureAlgo.serialize(buffer, true) - serializeBytes(secureRandom, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .password(let flags, let currentAlgo, let srpB, let srpId, let hint, let emailUnconfirmedPattern, let newAlgo, let newSecureAlgo, let secureRandom): - return ("password", [("flags", flags), ("currentAlgo", currentAlgo), ("srpB", srpB), ("srpId", srpId), ("hint", hint), ("emailUnconfirmedPattern", emailUnconfirmedPattern), ("newAlgo", newAlgo), ("newSecureAlgo", newSecureAlgo), ("secureRandom", secureRandom)]) - } - } - - public static func parse_password(_ reader: BufferReader) -> Password? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Api.PasswordKdfAlgo? - if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.PasswordKdfAlgo - } } - var _3: Buffer? - if Int(_1!) & Int(1 << 2) != 0 {_3 = parseBytes(reader) } - var _4: Int64? - if Int(_1!) & Int(1 << 2) != 0 {_4 = reader.readInt64() } - var _5: String? - if Int(_1!) & Int(1 << 3) != 0 {_5 = parseString(reader) } - var _6: String? - if Int(_1!) & Int(1 << 4) != 0 {_6 = parseString(reader) } - var _7: Api.PasswordKdfAlgo? - if let signature = reader.readInt32() { - _7 = Api.parse(reader, signature: signature) as? Api.PasswordKdfAlgo - } - var _8: Api.SecurePasswordKdfAlgo? - if let signature = reader.readInt32() { - _8 = Api.parse(reader, signature: signature) as? Api.SecurePasswordKdfAlgo - } - var _9: Buffer? - _9 = parseBytes(reader) - let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 2) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 4) == 0) || _6 != nil - let _c7 = _7 != nil - let _c8 = _8 != nil - let _c9 = _9 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { - return Api.account.Password.password(flags: _1!, currentAlgo: _2, srpB: _3, srpId: _4, hint: _5, emailUnconfirmedPattern: _6, newAlgo: _7!, newSecureAlgo: _8!, secureRandom: _9!) - } - else { - return nil - } - } - - } - public enum PrivacyRules: TypeConstructorDescription { - case privacyRules(rules: [Api.PrivacyRule], chats: [Api.Chat], users: [Api.User]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .privacyRules(let rules, let chats, let users): - if boxed { - buffer.appendInt32(1352683077) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(rules.count)) - for item in rules { + buffer.appendInt32(Int32(events.count)) + for item in events { item.serialize(buffer, true) } buffer.appendInt32(481674261) @@ -1388,15 +142,15 @@ public struct account { public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .privacyRules(let rules, let chats, let users): - return ("privacyRules", [("rules", rules), ("chats", chats), ("users", users)]) + case .adminLogResults(let events, let chats, let users): + return ("adminLogResults", [("events", events), ("chats", chats), ("users", users)]) } } - public static func parse_privacyRules(_ reader: BufferReader) -> PrivacyRules? { - var _1: [Api.PrivacyRule]? + public static func parse_adminLogResults(_ reader: BufferReader) -> AdminLogResults? { + var _1: [Api.ChannelAdminLogEvent]? if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PrivacyRule.self) + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ChannelAdminLogEvent.self) } var _2: [Api.Chat]? if let _ = reader.readInt32() { @@ -1410,55 +164,7 @@ public struct account { let _c2 = _2 != nil let _c3 = _3 != nil if _c1 && _c2 && _c3 { - return Api.account.PrivacyRules.privacyRules(rules: _1!, chats: _2!, users: _3!) - } - else { - return nil - } - } - - } - public enum AutoDownloadSettings: TypeConstructorDescription { - case autoDownloadSettings(low: Api.AutoDownloadSettings, medium: Api.AutoDownloadSettings, high: Api.AutoDownloadSettings) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .autoDownloadSettings(let low, let medium, let high): - if boxed { - buffer.appendInt32(1674235686) - } - low.serialize(buffer, true) - medium.serialize(buffer, true) - high.serialize(buffer, true) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .autoDownloadSettings(let low, let medium, let high): - return ("autoDownloadSettings", [("low", low), ("medium", medium), ("high", high)]) - } - } - - public static func parse_autoDownloadSettings(_ reader: BufferReader) -> AutoDownloadSettings? { - var _1: Api.AutoDownloadSettings? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.AutoDownloadSettings - } - var _2: Api.AutoDownloadSettings? - if let signature = reader.readInt32() { - _2 = Api.parse(reader, signature: signature) as? Api.AutoDownloadSettings - } - var _3: Api.AutoDownloadSettings? - if let signature = reader.readInt32() { - _3 = Api.parse(reader, signature: signature) as? Api.AutoDownloadSettings - } - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - if _c1 && _c2 && _c3 { - return Api.account.AutoDownloadSettings.autoDownloadSettings(low: _1!, medium: _2!, high: _3!) + return Api.channels.AdminLogResults.adminLogResults(events: _1!, chats: _2!, users: _3!) } else { return nil @@ -1469,17 +175,129 @@ public struct account { } } public extension Api { -public struct photos { - public enum Photo: TypeConstructorDescription { - case photo(photo: Api.Photo, users: [Api.User]) +public struct payments { + public enum ValidatedRequestedInfo: TypeConstructorDescription { + case validatedRequestedInfo(flags: Int32, id: String?, shippingOptions: [Api.ShippingOption]?) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .photo(let photo, let users): + case .validatedRequestedInfo(let flags, let id, let shippingOptions): if boxed { - buffer.appendInt32(539045032) + buffer.appendInt32(-784000893) } - photo.serialize(buffer, true) + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeString(id!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(shippingOptions!.count)) + for item in shippingOptions! { + item.serialize(buffer, true) + }} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .validatedRequestedInfo(let flags, let id, let shippingOptions): + return ("validatedRequestedInfo", [("flags", flags), ("id", id), ("shippingOptions", shippingOptions)]) + } + } + + public static func parse_validatedRequestedInfo(_ reader: BufferReader) -> ValidatedRequestedInfo? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + if Int(_1!) & Int(1 << 0) != 0 {_2 = parseString(reader) } + var _3: [Api.ShippingOption]? + if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ShippingOption.self) + } } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.payments.ValidatedRequestedInfo.validatedRequestedInfo(flags: _1!, id: _2, shippingOptions: _3) + } + else { + return nil + } + } + + } + public enum PaymentResult: TypeConstructorDescription { + case paymentResult(updates: Api.Updates) + case paymentVerificationNeeded(url: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .paymentResult(let updates): + if boxed { + buffer.appendInt32(1314881805) + } + updates.serialize(buffer, true) + break + case .paymentVerificationNeeded(let url): + if boxed { + buffer.appendInt32(-666824391) + } + serializeString(url, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .paymentResult(let updates): + return ("paymentResult", [("updates", updates)]) + case .paymentVerificationNeeded(let url): + return ("paymentVerificationNeeded", [("url", url)]) + } + } + + public static func parse_paymentResult(_ reader: BufferReader) -> PaymentResult? { + var _1: Api.Updates? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Updates + } + let _c1 = _1 != nil + if _c1 { + return Api.payments.PaymentResult.paymentResult(updates: _1!) + } + else { + return nil + } + } + public static func parse_paymentVerificationNeeded(_ reader: BufferReader) -> PaymentResult? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.payments.PaymentResult.paymentVerificationNeeded(url: _1!) + } + else { + return nil + } + } + + } + public enum PaymentForm: TypeConstructorDescription { + case paymentForm(flags: Int32, botId: Int32, invoice: Api.Invoice, providerId: Int32, url: String, nativeProvider: String?, nativeParams: Api.DataJSON?, savedInfo: Api.PaymentRequestedInfo?, savedCredentials: Api.PaymentSavedCredentials?, users: [Api.User]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .paymentForm(let flags, let botId, let invoice, let providerId, let url, let nativeProvider, let nativeParams, let savedInfo, let savedCredentials, let users): + if boxed { + buffer.appendInt32(1062645411) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(botId, buffer: buffer, boxed: false) + invoice.serialize(buffer, true) + serializeInt32(providerId, buffer: buffer, boxed: false) + serializeString(url, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 4) != 0 {serializeString(nativeProvider!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 4) != 0 {nativeParams!.serialize(buffer, true)} + if Int(flags) & Int(1 << 0) != 0 {savedInfo!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {savedCredentials!.serialize(buffer, true)} buffer.appendInt32(481674261) buffer.appendInt32(Int32(users.count)) for item in users { @@ -1491,24 +309,54 @@ public struct photos { public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .photo(let photo, let users): - return ("photo", [("photo", photo), ("users", users)]) + case .paymentForm(let flags, let botId, let invoice, let providerId, let url, let nativeProvider, let nativeParams, let savedInfo, let savedCredentials, let users): + return ("paymentForm", [("flags", flags), ("botId", botId), ("invoice", invoice), ("providerId", providerId), ("url", url), ("nativeProvider", nativeProvider), ("nativeParams", nativeParams), ("savedInfo", savedInfo), ("savedCredentials", savedCredentials), ("users", users)]) } } - public static func parse_photo(_ reader: BufferReader) -> Photo? { - var _1: Api.Photo? + public static func parse_paymentForm(_ reader: BufferReader) -> PaymentForm? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Api.Invoice? if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.Photo + _3 = Api.parse(reader, signature: signature) as? Api.Invoice } - var _2: [Api.User]? + var _4: Int32? + _4 = reader.readInt32() + var _5: String? + _5 = parseString(reader) + var _6: String? + if Int(_1!) & Int(1 << 4) != 0 {_6 = parseString(reader) } + var _7: Api.DataJSON? + if Int(_1!) & Int(1 << 4) != 0 {if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.DataJSON + } } + var _8: Api.PaymentRequestedInfo? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _8 = Api.parse(reader, signature: signature) as? Api.PaymentRequestedInfo + } } + var _9: Api.PaymentSavedCredentials? + if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { + _9 = Api.parse(reader, signature: signature) as? Api.PaymentSavedCredentials + } } + var _10: [Api.User]? if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + _10 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) } let _c1 = _1 != nil let _c2 = _2 != nil - if _c1 && _c2 { - return Api.photos.Photo.photo(photo: _1!, users: _2!) + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = (Int(_1!) & Int(1 << 4) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil + let _c8 = (Int(_1!) & Int(1 << 0) == 0) || _8 != nil + let _c9 = (Int(_1!) & Int(1 << 1) == 0) || _9 != nil + let _c10 = _10 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 { + return Api.payments.PaymentForm.paymentForm(flags: _1!, botId: _2!, invoice: _3!, providerId: _4!, url: _5!, nativeProvider: _6, nativeParams: _7, savedInfo: _8, savedCredentials: _9, users: _10!) } else { return nil @@ -1516,19 +364,339 @@ public struct photos { } } - public enum Photos: TypeConstructorDescription { - case photos(photos: [Api.Photo], users: [Api.User]) - case photosSlice(count: Int32, photos: [Api.Photo], users: [Api.User]) + public enum PaymentReceipt: TypeConstructorDescription { + case paymentReceipt(flags: Int32, date: Int32, botId: Int32, invoice: Api.Invoice, providerId: Int32, info: Api.PaymentRequestedInfo?, shipping: Api.ShippingOption?, currency: String, totalAmount: Int64, credentialsTitle: String, users: [Api.User]) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .photos(let photos, let users): + case .paymentReceipt(let flags, let date, let botId, let invoice, let providerId, let info, let shipping, let currency, let totalAmount, let credentialsTitle, let users): if boxed { - buffer.appendInt32(-1916114267) + buffer.appendInt32(1342771681) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + serializeInt32(botId, buffer: buffer, boxed: false) + invoice.serialize(buffer, true) + serializeInt32(providerId, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {info!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {shipping!.serialize(buffer, true)} + serializeString(currency, buffer: buffer, boxed: false) + serializeInt64(totalAmount, buffer: buffer, boxed: false) + serializeString(credentialsTitle, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .paymentReceipt(let flags, let date, let botId, let invoice, let providerId, let info, let shipping, let currency, let totalAmount, let credentialsTitle, let users): + return ("paymentReceipt", [("flags", flags), ("date", date), ("botId", botId), ("invoice", invoice), ("providerId", providerId), ("info", info), ("shipping", shipping), ("currency", currency), ("totalAmount", totalAmount), ("credentialsTitle", credentialsTitle), ("users", users)]) + } + } + + public static func parse_paymentReceipt(_ reader: BufferReader) -> PaymentReceipt? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: Api.Invoice? + if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.Invoice + } + var _5: Int32? + _5 = reader.readInt32() + var _6: Api.PaymentRequestedInfo? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.PaymentRequestedInfo + } } + var _7: Api.ShippingOption? + if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.ShippingOption + } } + var _8: String? + _8 = parseString(reader) + var _9: Int64? + _9 = reader.readInt64() + var _10: String? + _10 = parseString(reader) + var _11: [Api.User]? + if let _ = reader.readInt32() { + _11 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil + let _c8 = _8 != nil + let _c9 = _9 != nil + let _c10 = _10 != nil + let _c11 = _11 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { + return Api.payments.PaymentReceipt.paymentReceipt(flags: _1!, date: _2!, botId: _3!, invoice: _4!, providerId: _5!, info: _6, shipping: _7, currency: _8!, totalAmount: _9!, credentialsTitle: _10!, users: _11!) + } + else { + return nil + } + } + + } + public enum SavedInfo: TypeConstructorDescription { + case savedInfo(flags: Int32, savedInfo: Api.PaymentRequestedInfo?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .savedInfo(let flags, let savedInfo): + if boxed { + buffer.appendInt32(-74456004) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {savedInfo!.serialize(buffer, true)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .savedInfo(let flags, let savedInfo): + return ("savedInfo", [("flags", flags), ("savedInfo", savedInfo)]) + } + } + + public static func parse_savedInfo(_ reader: BufferReader) -> SavedInfo? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.PaymentRequestedInfo? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.PaymentRequestedInfo + } } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + if _c1 && _c2 { + return Api.payments.SavedInfo.savedInfo(flags: _1!, savedInfo: _2) + } + else { + return nil + } + } + + } + public enum BankCardData: TypeConstructorDescription { + case bankCardData(title: String, openUrls: [Api.BankCardOpenUrl]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .bankCardData(let title, let openUrls): + if boxed { + buffer.appendInt32(1042605427) + } + serializeString(title, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(openUrls.count)) + for item in openUrls { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .bankCardData(let title, let openUrls): + return ("bankCardData", [("title", title), ("openUrls", openUrls)]) + } + } + + public static func parse_bankCardData(_ reader: BufferReader) -> BankCardData? { + var _1: String? + _1 = parseString(reader) + var _2: [Api.BankCardOpenUrl]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.BankCardOpenUrl.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.payments.BankCardData.bankCardData(title: _1!, openUrls: _2!) + } + else { + return nil + } + } + + } +} +} +public extension Api { +public struct stats { + public enum BroadcastStats: TypeConstructorDescription { + case broadcastStats(period: Api.StatsDateRangeDays, followers: Api.StatsAbsValueAndPrev, viewsPerPost: Api.StatsAbsValueAndPrev, sharesPerPost: Api.StatsAbsValueAndPrev, enabledNotifications: Api.StatsPercentValue, growthGraph: Api.StatsGraph, followersGraph: Api.StatsGraph, muteGraph: Api.StatsGraph, topHoursGraph: Api.StatsGraph, interactionsGraph: Api.StatsGraph, ivInteractionsGraph: Api.StatsGraph, viewsBySourceGraph: Api.StatsGraph, newFollowersBySourceGraph: Api.StatsGraph, languagesGraph: Api.StatsGraph, recentMessageInteractions: [Api.MessageInteractionCounters]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .broadcastStats(let period, let followers, let viewsPerPost, let sharesPerPost, let enabledNotifications, let growthGraph, let followersGraph, let muteGraph, let topHoursGraph, let interactionsGraph, let ivInteractionsGraph, let viewsBySourceGraph, let newFollowersBySourceGraph, let languagesGraph, let recentMessageInteractions): + if boxed { + buffer.appendInt32(-1107852396) + } + period.serialize(buffer, true) + followers.serialize(buffer, true) + viewsPerPost.serialize(buffer, true) + sharesPerPost.serialize(buffer, true) + enabledNotifications.serialize(buffer, true) + growthGraph.serialize(buffer, true) + followersGraph.serialize(buffer, true) + muteGraph.serialize(buffer, true) + topHoursGraph.serialize(buffer, true) + interactionsGraph.serialize(buffer, true) + ivInteractionsGraph.serialize(buffer, true) + viewsBySourceGraph.serialize(buffer, true) + newFollowersBySourceGraph.serialize(buffer, true) + languagesGraph.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(recentMessageInteractions.count)) + for item in recentMessageInteractions { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .broadcastStats(let period, let followers, let viewsPerPost, let sharesPerPost, let enabledNotifications, let growthGraph, let followersGraph, let muteGraph, let topHoursGraph, let interactionsGraph, let ivInteractionsGraph, let viewsBySourceGraph, let newFollowersBySourceGraph, let languagesGraph, let recentMessageInteractions): + return ("broadcastStats", [("period", period), ("followers", followers), ("viewsPerPost", viewsPerPost), ("sharesPerPost", sharesPerPost), ("enabledNotifications", enabledNotifications), ("growthGraph", growthGraph), ("followersGraph", followersGraph), ("muteGraph", muteGraph), ("topHoursGraph", topHoursGraph), ("interactionsGraph", interactionsGraph), ("ivInteractionsGraph", ivInteractionsGraph), ("viewsBySourceGraph", viewsBySourceGraph), ("newFollowersBySourceGraph", newFollowersBySourceGraph), ("languagesGraph", languagesGraph), ("recentMessageInteractions", recentMessageInteractions)]) + } + } + + public static func parse_broadcastStats(_ reader: BufferReader) -> BroadcastStats? { + var _1: Api.StatsDateRangeDays? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.StatsDateRangeDays + } + var _2: Api.StatsAbsValueAndPrev? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.StatsAbsValueAndPrev + } + var _3: Api.StatsAbsValueAndPrev? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.StatsAbsValueAndPrev + } + var _4: Api.StatsAbsValueAndPrev? + if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.StatsAbsValueAndPrev + } + var _5: Api.StatsPercentValue? + if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.StatsPercentValue + } + var _6: Api.StatsGraph? + if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.StatsGraph + } + var _7: Api.StatsGraph? + if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.StatsGraph + } + var _8: Api.StatsGraph? + if let signature = reader.readInt32() { + _8 = Api.parse(reader, signature: signature) as? Api.StatsGraph + } + var _9: Api.StatsGraph? + if let signature = reader.readInt32() { + _9 = Api.parse(reader, signature: signature) as? Api.StatsGraph + } + var _10: Api.StatsGraph? + if let signature = reader.readInt32() { + _10 = Api.parse(reader, signature: signature) as? Api.StatsGraph + } + var _11: Api.StatsGraph? + if let signature = reader.readInt32() { + _11 = Api.parse(reader, signature: signature) as? Api.StatsGraph + } + var _12: Api.StatsGraph? + if let signature = reader.readInt32() { + _12 = Api.parse(reader, signature: signature) as? Api.StatsGraph + } + var _13: Api.StatsGraph? + if let signature = reader.readInt32() { + _13 = Api.parse(reader, signature: signature) as? Api.StatsGraph + } + var _14: Api.StatsGraph? + if let signature = reader.readInt32() { + _14 = Api.parse(reader, signature: signature) as? Api.StatsGraph + } + var _15: [Api.MessageInteractionCounters]? + if let _ = reader.readInt32() { + _15 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageInteractionCounters.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = _8 != nil + let _c9 = _9 != nil + let _c10 = _10 != nil + let _c11 = _11 != nil + let _c12 = _12 != nil + let _c13 = _13 != nil + let _c14 = _14 != nil + let _c15 = _15 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 { + return Api.stats.BroadcastStats.broadcastStats(period: _1!, followers: _2!, viewsPerPost: _3!, sharesPerPost: _4!, enabledNotifications: _5!, growthGraph: _6!, followersGraph: _7!, muteGraph: _8!, topHoursGraph: _9!, interactionsGraph: _10!, ivInteractionsGraph: _11!, viewsBySourceGraph: _12!, newFollowersBySourceGraph: _13!, languagesGraph: _14!, recentMessageInteractions: _15!) + } + else { + return nil + } + } + + } + public enum MegagroupStats: TypeConstructorDescription { + case megagroupStats(period: Api.StatsDateRangeDays, members: Api.StatsAbsValueAndPrev, messages: Api.StatsAbsValueAndPrev, viewers: Api.StatsAbsValueAndPrev, posters: Api.StatsAbsValueAndPrev, growthGraph: Api.StatsGraph, membersGraph: Api.StatsGraph, newMembersBySourceGraph: Api.StatsGraph, languagesGraph: Api.StatsGraph, messagesGraph: Api.StatsGraph, actionsGraph: Api.StatsGraph, topHoursGraph: Api.StatsGraph, weekdaysGraph: Api.StatsGraph, topPosters: [Api.StatsGroupTopPoster], topAdmins: [Api.StatsGroupTopAdmin], topInviters: [Api.StatsGroupTopInviter], users: [Api.User]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .megagroupStats(let period, let members, let messages, let viewers, let posters, let growthGraph, let membersGraph, let newMembersBySourceGraph, let languagesGraph, let messagesGraph, let actionsGraph, let topHoursGraph, let weekdaysGraph, let topPosters, let topAdmins, let topInviters, let users): + if boxed { + buffer.appendInt32(-276825834) + } + period.serialize(buffer, true) + members.serialize(buffer, true) + messages.serialize(buffer, true) + viewers.serialize(buffer, true) + posters.serialize(buffer, true) + growthGraph.serialize(buffer, true) + membersGraph.serialize(buffer, true) + newMembersBySourceGraph.serialize(buffer, true) + languagesGraph.serialize(buffer, true) + messagesGraph.serialize(buffer, true) + actionsGraph.serialize(buffer, true) + topHoursGraph.serialize(buffer, true) + weekdaysGraph.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(topPosters.count)) + for item in topPosters { + item.serialize(buffer, true) } buffer.appendInt32(481674261) - buffer.appendInt32(Int32(photos.count)) - for item in photos { + buffer.appendInt32(Int32(topAdmins.count)) + for item in topAdmins { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(topInviters.count)) + for item in topInviters { item.serialize(buffer, true) } buffer.appendInt32(481674261) @@ -1537,14 +705,654 @@ public struct photos { item.serialize(buffer, true) } break - case .photosSlice(let count, let photos, let users): + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .megagroupStats(let period, let members, let messages, let viewers, let posters, let growthGraph, let membersGraph, let newMembersBySourceGraph, let languagesGraph, let messagesGraph, let actionsGraph, let topHoursGraph, let weekdaysGraph, let topPosters, let topAdmins, let topInviters, let users): + return ("megagroupStats", [("period", period), ("members", members), ("messages", messages), ("viewers", viewers), ("posters", posters), ("growthGraph", growthGraph), ("membersGraph", membersGraph), ("newMembersBySourceGraph", newMembersBySourceGraph), ("languagesGraph", languagesGraph), ("messagesGraph", messagesGraph), ("actionsGraph", actionsGraph), ("topHoursGraph", topHoursGraph), ("weekdaysGraph", weekdaysGraph), ("topPosters", topPosters), ("topAdmins", topAdmins), ("topInviters", topInviters), ("users", users)]) + } + } + + public static func parse_megagroupStats(_ reader: BufferReader) -> MegagroupStats? { + var _1: Api.StatsDateRangeDays? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.StatsDateRangeDays + } + var _2: Api.StatsAbsValueAndPrev? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.StatsAbsValueAndPrev + } + var _3: Api.StatsAbsValueAndPrev? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.StatsAbsValueAndPrev + } + var _4: Api.StatsAbsValueAndPrev? + if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.StatsAbsValueAndPrev + } + var _5: Api.StatsAbsValueAndPrev? + if let signature = reader.readInt32() { + _5 = Api.parse(reader, signature: signature) as? Api.StatsAbsValueAndPrev + } + var _6: Api.StatsGraph? + if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.StatsGraph + } + var _7: Api.StatsGraph? + if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.StatsGraph + } + var _8: Api.StatsGraph? + if let signature = reader.readInt32() { + _8 = Api.parse(reader, signature: signature) as? Api.StatsGraph + } + var _9: Api.StatsGraph? + if let signature = reader.readInt32() { + _9 = Api.parse(reader, signature: signature) as? Api.StatsGraph + } + var _10: Api.StatsGraph? + if let signature = reader.readInt32() { + _10 = Api.parse(reader, signature: signature) as? Api.StatsGraph + } + var _11: Api.StatsGraph? + if let signature = reader.readInt32() { + _11 = Api.parse(reader, signature: signature) as? Api.StatsGraph + } + var _12: Api.StatsGraph? + if let signature = reader.readInt32() { + _12 = Api.parse(reader, signature: signature) as? Api.StatsGraph + } + var _13: Api.StatsGraph? + if let signature = reader.readInt32() { + _13 = Api.parse(reader, signature: signature) as? Api.StatsGraph + } + var _14: [Api.StatsGroupTopPoster]? + if let _ = reader.readInt32() { + _14 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StatsGroupTopPoster.self) + } + var _15: [Api.StatsGroupTopAdmin]? + if let _ = reader.readInt32() { + _15 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StatsGroupTopAdmin.self) + } + var _16: [Api.StatsGroupTopInviter]? + if let _ = reader.readInt32() { + _16 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StatsGroupTopInviter.self) + } + var _17: [Api.User]? + if let _ = reader.readInt32() { + _17 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = _8 != nil + let _c9 = _9 != nil + let _c10 = _10 != nil + let _c11 = _11 != nil + let _c12 = _12 != nil + let _c13 = _13 != nil + let _c14 = _14 != nil + let _c15 = _15 != nil + let _c16 = _16 != nil + let _c17 = _17 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 { + return Api.stats.MegagroupStats.megagroupStats(period: _1!, members: _2!, messages: _3!, viewers: _4!, posters: _5!, growthGraph: _6!, membersGraph: _7!, newMembersBySourceGraph: _8!, languagesGraph: _9!, messagesGraph: _10!, actionsGraph: _11!, topHoursGraph: _12!, weekdaysGraph: _13!, topPosters: _14!, topAdmins: _15!, topInviters: _16!, users: _17!) + } + else { + return nil + } + } + + } + public enum MessageStats: TypeConstructorDescription { + case messageStats(viewsGraph: Api.StatsGraph) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .messageStats(let viewsGraph): if boxed { - buffer.appendInt32(352657236) + buffer.appendInt32(-1986399595) + } + viewsGraph.serialize(buffer, true) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .messageStats(let viewsGraph): + return ("messageStats", [("viewsGraph", viewsGraph)]) + } + } + + public static func parse_messageStats(_ reader: BufferReader) -> MessageStats? { + var _1: Api.StatsGraph? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.StatsGraph + } + let _c1 = _1 != nil + if _c1 { + return Api.stats.MessageStats.messageStats(viewsGraph: _1!) + } + else { + return nil + } + } + + } +} +} +public extension Api { +public struct auth { + public enum LoginToken: TypeConstructorDescription { + case loginToken(expires: Int32, token: Buffer) + case loginTokenMigrateTo(dcId: Int32, token: Buffer) + case loginTokenSuccess(authorization: Api.auth.Authorization) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .loginToken(let expires, let token): + if boxed { + buffer.appendInt32(1654593920) + } + serializeInt32(expires, buffer: buffer, boxed: false) + serializeBytes(token, buffer: buffer, boxed: false) + break + case .loginTokenMigrateTo(let dcId, let token): + if boxed { + buffer.appendInt32(110008598) + } + serializeInt32(dcId, buffer: buffer, boxed: false) + serializeBytes(token, buffer: buffer, boxed: false) + break + case .loginTokenSuccess(let authorization): + if boxed { + buffer.appendInt32(957176926) + } + authorization.serialize(buffer, true) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .loginToken(let expires, let token): + return ("loginToken", [("expires", expires), ("token", token)]) + case .loginTokenMigrateTo(let dcId, let token): + return ("loginTokenMigrateTo", [("dcId", dcId), ("token", token)]) + case .loginTokenSuccess(let authorization): + return ("loginTokenSuccess", [("authorization", authorization)]) + } + } + + public static func parse_loginToken(_ reader: BufferReader) -> LoginToken? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Buffer? + _2 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.auth.LoginToken.loginToken(expires: _1!, token: _2!) + } + else { + return nil + } + } + public static func parse_loginTokenMigrateTo(_ reader: BufferReader) -> LoginToken? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Buffer? + _2 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.auth.LoginToken.loginTokenMigrateTo(dcId: _1!, token: _2!) + } + else { + return nil + } + } + public static func parse_loginTokenSuccess(_ reader: BufferReader) -> LoginToken? { + var _1: Api.auth.Authorization? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.auth.Authorization + } + let _c1 = _1 != nil + if _c1 { + return Api.auth.LoginToken.loginTokenSuccess(authorization: _1!) + } + else { + return nil + } + } + + } + public enum Authorization: TypeConstructorDescription { + case authorization(flags: Int32, tmpSessions: Int32?, user: Api.User) + case authorizationSignUpRequired(flags: Int32, termsOfService: Api.help.TermsOfService?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .authorization(let flags, let tmpSessions, let user): + if boxed { + buffer.appendInt32(-855308010) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(tmpSessions!, buffer: buffer, boxed: false)} + user.serialize(buffer, true) + break + case .authorizationSignUpRequired(let flags, let termsOfService): + if boxed { + buffer.appendInt32(1148485274) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {termsOfService!.serialize(buffer, true)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .authorization(let flags, let tmpSessions, let user): + return ("authorization", [("flags", flags), ("tmpSessions", tmpSessions), ("user", user)]) + case .authorizationSignUpRequired(let flags, let termsOfService): + return ("authorizationSignUpRequired", [("flags", flags), ("termsOfService", termsOfService)]) + } + } + + public static func parse_authorization(_ reader: BufferReader) -> Authorization? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + if Int(_1!) & Int(1 << 0) != 0 {_2 = reader.readInt32() } + var _3: Api.User? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.User + } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.auth.Authorization.authorization(flags: _1!, tmpSessions: _2, user: _3!) + } + else { + return nil + } + } + public static func parse_authorizationSignUpRequired(_ reader: BufferReader) -> Authorization? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.help.TermsOfService? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.help.TermsOfService + } } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + if _c1 && _c2 { + return Api.auth.Authorization.authorizationSignUpRequired(flags: _1!, termsOfService: _2) + } + else { + return nil + } + } + + } + public enum PasswordRecovery: TypeConstructorDescription { + case passwordRecovery(emailPattern: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .passwordRecovery(let emailPattern): + if boxed { + buffer.appendInt32(326715557) + } + serializeString(emailPattern, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .passwordRecovery(let emailPattern): + return ("passwordRecovery", [("emailPattern", emailPattern)]) + } + } + + public static func parse_passwordRecovery(_ reader: BufferReader) -> PasswordRecovery? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.auth.PasswordRecovery.passwordRecovery(emailPattern: _1!) + } + else { + return nil + } + } + + } + public enum ExportedAuthorization: TypeConstructorDescription { + case exportedAuthorization(id: Int32, bytes: Buffer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .exportedAuthorization(let id, let bytes): + if boxed { + buffer.appendInt32(-543777747) + } + serializeInt32(id, buffer: buffer, boxed: false) + serializeBytes(bytes, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .exportedAuthorization(let id, let bytes): + return ("exportedAuthorization", [("id", id), ("bytes", bytes)]) + } + } + + public static func parse_exportedAuthorization(_ reader: BufferReader) -> ExportedAuthorization? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Buffer? + _2 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.auth.ExportedAuthorization.exportedAuthorization(id: _1!, bytes: _2!) + } + else { + return nil + } + } + + } + public enum CheckedPhone: TypeConstructorDescription { + case checkedPhone(phoneRegistered: Api.Bool) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .checkedPhone(let phoneRegistered): + if boxed { + buffer.appendInt32(-2128698738) + } + phoneRegistered.serialize(buffer, true) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .checkedPhone(let phoneRegistered): + return ("checkedPhone", [("phoneRegistered", phoneRegistered)]) + } + } + + public static func parse_checkedPhone(_ reader: BufferReader) -> CheckedPhone? { + var _1: Api.Bool? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Bool + } + let _c1 = _1 != nil + if _c1 { + return Api.auth.CheckedPhone.checkedPhone(phoneRegistered: _1!) + } + else { + return nil + } + } + + } + public enum SentCode: TypeConstructorDescription { + case sentCode(flags: Int32, type: Api.auth.SentCodeType, phoneCodeHash: String, nextType: Api.auth.CodeType?, timeout: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .sentCode(let flags, let type, let phoneCodeHash, let nextType, let timeout): + if boxed { + buffer.appendInt32(1577067778) + } + serializeInt32(flags, buffer: buffer, boxed: false) + type.serialize(buffer, true) + serializeString(phoneCodeHash, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {nextType!.serialize(buffer, true)} + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(timeout!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .sentCode(let flags, let type, let phoneCodeHash, let nextType, let timeout): + return ("sentCode", [("flags", flags), ("type", type), ("phoneCodeHash", phoneCodeHash), ("nextType", nextType), ("timeout", timeout)]) + } + } + + public static func parse_sentCode(_ reader: BufferReader) -> SentCode? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.auth.SentCodeType? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.auth.SentCodeType + } + var _3: String? + _3 = parseString(reader) + var _4: Api.auth.CodeType? + if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { + _4 = Api.parse(reader, signature: signature) as? Api.auth.CodeType + } } + var _5: Int32? + if Int(_1!) & Int(1 << 2) != 0 {_5 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.auth.SentCode.sentCode(flags: _1!, type: _2!, phoneCodeHash: _3!, nextType: _4, timeout: _5) + } + else { + return nil + } + } + + } + public enum CodeType: TypeConstructorDescription { + case codeTypeSms + case codeTypeCall + case codeTypeFlashCall + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .codeTypeSms: + if boxed { + buffer.appendInt32(1923290508) + } + + break + case .codeTypeCall: + if boxed { + buffer.appendInt32(1948046307) + } + + break + case .codeTypeFlashCall: + if boxed { + buffer.appendInt32(577556219) + } + + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .codeTypeSms: + return ("codeTypeSms", []) + case .codeTypeCall: + return ("codeTypeCall", []) + case .codeTypeFlashCall: + return ("codeTypeFlashCall", []) + } + } + + public static func parse_codeTypeSms(_ reader: BufferReader) -> CodeType? { + return Api.auth.CodeType.codeTypeSms + } + public static func parse_codeTypeCall(_ reader: BufferReader) -> CodeType? { + return Api.auth.CodeType.codeTypeCall + } + public static func parse_codeTypeFlashCall(_ reader: BufferReader) -> CodeType? { + return Api.auth.CodeType.codeTypeFlashCall + } + + } + public enum SentCodeType: TypeConstructorDescription { + case sentCodeTypeApp(length: Int32) + case sentCodeTypeSms(length: Int32) + case sentCodeTypeCall(length: Int32) + case sentCodeTypeFlashCall(pattern: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .sentCodeTypeApp(let length): + if boxed { + buffer.appendInt32(1035688326) + } + serializeInt32(length, buffer: buffer, boxed: false) + break + case .sentCodeTypeSms(let length): + if boxed { + buffer.appendInt32(-1073693790) + } + serializeInt32(length, buffer: buffer, boxed: false) + break + case .sentCodeTypeCall(let length): + if boxed { + buffer.appendInt32(1398007207) + } + serializeInt32(length, buffer: buffer, boxed: false) + break + case .sentCodeTypeFlashCall(let pattern): + if boxed { + buffer.appendInt32(-1425815847) + } + serializeString(pattern, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .sentCodeTypeApp(let length): + return ("sentCodeTypeApp", [("length", length)]) + case .sentCodeTypeSms(let length): + return ("sentCodeTypeSms", [("length", length)]) + case .sentCodeTypeCall(let length): + return ("sentCodeTypeCall", [("length", length)]) + case .sentCodeTypeFlashCall(let pattern): + return ("sentCodeTypeFlashCall", [("pattern", pattern)]) + } + } + + public static func parse_sentCodeTypeApp(_ reader: BufferReader) -> SentCodeType? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.auth.SentCodeType.sentCodeTypeApp(length: _1!) + } + else { + return nil + } + } + public static func parse_sentCodeTypeSms(_ reader: BufferReader) -> SentCodeType? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.auth.SentCodeType.sentCodeTypeSms(length: _1!) + } + else { + return nil + } + } + public static func parse_sentCodeTypeCall(_ reader: BufferReader) -> SentCodeType? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.auth.SentCodeType.sentCodeTypeCall(length: _1!) + } + else { + return nil + } + } + public static func parse_sentCodeTypeFlashCall(_ reader: BufferReader) -> SentCodeType? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.auth.SentCodeType.sentCodeTypeFlashCall(pattern: _1!) + } + else { + return nil + } + } + + } +} +} +public extension Api { +public struct contacts { + public enum Blocked: TypeConstructorDescription { + case blocked(blocked: [Api.PeerBlocked], chats: [Api.Chat], users: [Api.User]) + case blockedSlice(count: Int32, blocked: [Api.PeerBlocked], chats: [Api.Chat], users: [Api.User]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .blocked(let blocked, let chats, let users): + if boxed { + buffer.appendInt32(182326673) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(blocked.count)) + for item in blocked { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(chats.count)) + for item in chats { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + break + case .blockedSlice(let count, let blocked, let chats, let users): + if boxed { + buffer.appendInt32(-513392236) } serializeInt32(count, buffer: buffer, boxed: false) buffer.appendInt32(481674261) - buffer.appendInt32(Int32(photos.count)) - for item in photos { + buffer.appendInt32(Int32(blocked.count)) + for item in blocked { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(chats.count)) + for item in chats { item.serialize(buffer, true) } buffer.appendInt32(481674261) @@ -1558,37 +1366,21 @@ public struct photos { public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .photos(let photos, let users): - return ("photos", [("photos", photos), ("users", users)]) - case .photosSlice(let count, let photos, let users): - return ("photosSlice", [("count", count), ("photos", photos), ("users", users)]) + case .blocked(let blocked, let chats, let users): + return ("blocked", [("blocked", blocked), ("chats", chats), ("users", users)]) + case .blockedSlice(let count, let blocked, let chats, let users): + return ("blockedSlice", [("count", count), ("blocked", blocked), ("chats", chats), ("users", users)]) } } - public static func parse_photos(_ reader: BufferReader) -> Photos? { - var _1: [Api.Photo]? + public static func parse_blocked(_ reader: BufferReader) -> Blocked? { + var _1: [Api.PeerBlocked]? if let _ = reader.readInt32() { - _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Photo.self) + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PeerBlocked.self) } - var _2: [Api.User]? + var _2: [Api.Chat]? if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } - let _c1 = _1 != nil - let _c2 = _2 != nil - if _c1 && _c2 { - return Api.photos.Photos.photos(photos: _1!, users: _2!) - } - else { - return nil - } - } - public static func parse_photosSlice(_ reader: BufferReader) -> Photos? { - var _1: Int32? - _1 = reader.readInt32() - var _2: [Api.Photo]? - if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Photo.self) + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) } var _3: [Api.User]? if let _ = reader.readInt32() { @@ -1598,61 +1390,23 @@ public struct photos { let _c2 = _2 != nil let _c3 = _3 != nil if _c1 && _c2 && _c3 { - return Api.photos.Photos.photosSlice(count: _1!, photos: _2!, users: _3!) + return Api.contacts.Blocked.blocked(blocked: _1!, chats: _2!, users: _3!) } else { return nil } } - - } -} -} -public extension Api { -public struct phone { - public enum GroupCall: TypeConstructorDescription { - case groupCall(call: Api.GroupCall, participants: [Api.GroupCallParticipant], participantsNextOffset: String, users: [Api.User]) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .groupCall(let call, let participants, let participantsNextOffset, let users): - if boxed { - buffer.appendInt32(1722485756) - } - call.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(participants.count)) - for item in participants { - item.serialize(buffer, true) - } - serializeString(participantsNextOffset, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .groupCall(let call, let participants, let participantsNextOffset, let users): - return ("groupCall", [("call", call), ("participants", participants), ("participantsNextOffset", participantsNextOffset), ("users", users)]) - } - } - - public static func parse_groupCall(_ reader: BufferReader) -> GroupCall? { - var _1: Api.GroupCall? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.GroupCall - } - var _2: [Api.GroupCallParticipant]? + public static func parse_blockedSlice(_ reader: BufferReader) -> Blocked? { + var _1: Int32? + _1 = reader.readInt32() + var _2: [Api.PeerBlocked]? if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.GroupCallParticipant.self) + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PeerBlocked.self) + } + var _3: [Api.Chat]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) } - var _3: String? - _3 = parseString(reader) var _4: [Api.User]? if let _ = reader.readInt32() { _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) @@ -1662,7 +1416,7 @@ public struct phone { let _c3 = _3 != nil let _c4 = _4 != nil if _c1 && _c2 && _c3 && _c4 { - return Api.phone.GroupCall.groupCall(call: _1!, participants: _2!, participantsNextOffset: _3!, users: _4!) + return Api.contacts.Blocked.blockedSlice(count: _1!, blocked: _2!, chats: _3!, users: _4!) } else { return nil @@ -1670,61 +1424,191 @@ public struct phone { } } - public enum GroupParticipants: TypeConstructorDescription { - case groupParticipants(count: Int32, participants: [Api.GroupCallParticipant], nextOffset: String, users: [Api.User], version: Int32) + public enum Contacts: TypeConstructorDescription { + case contactsNotModified + case contacts(contacts: [Api.Contact], savedCount: Int32, users: [Api.User]) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .groupParticipants(let count, let participants, let nextOffset, let users, let version): + case .contactsNotModified: if boxed { - buffer.appendInt32(-1661028051) + buffer.appendInt32(-1219778094) + } + + break + case .contacts(let contacts, let savedCount, let users): + if boxed { + buffer.appendInt32(-353862078) } - serializeInt32(count, buffer: buffer, boxed: false) buffer.appendInt32(481674261) - buffer.appendInt32(Int32(participants.count)) - for item in participants { + buffer.appendInt32(Int32(contacts.count)) + for item in contacts { item.serialize(buffer, true) } - serializeString(nextOffset, buffer: buffer, boxed: false) + serializeInt32(savedCount, buffer: buffer, boxed: false) buffer.appendInt32(481674261) buffer.appendInt32(Int32(users.count)) for item in users { item.serialize(buffer, true) } - serializeInt32(version, buffer: buffer, boxed: false) break } } public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .groupParticipants(let count, let participants, let nextOffset, let users, let version): - return ("groupParticipants", [("count", count), ("participants", participants), ("nextOffset", nextOffset), ("users", users), ("version", version)]) + case .contactsNotModified: + return ("contactsNotModified", []) + case .contacts(let contacts, let savedCount, let users): + return ("contacts", [("contacts", contacts), ("savedCount", savedCount), ("users", users)]) } } - public static func parse_groupParticipants(_ reader: BufferReader) -> GroupParticipants? { - var _1: Int32? - _1 = reader.readInt32() - var _2: [Api.GroupCallParticipant]? + public static func parse_contactsNotModified(_ reader: BufferReader) -> Contacts? { + return Api.contacts.Contacts.contactsNotModified + } + public static func parse_contacts(_ reader: BufferReader) -> Contacts? { + var _1: [Api.Contact]? if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.GroupCallParticipant.self) + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Contact.self) + } + var _2: Int32? + _2 = reader.readInt32() + var _3: [Api.User]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.contacts.Contacts.contacts(contacts: _1!, savedCount: _2!, users: _3!) + } + else { + return nil + } + } + + } + public enum ResolvedPeer: TypeConstructorDescription { + case resolvedPeer(peer: Api.Peer, chats: [Api.Chat], users: [Api.User]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .resolvedPeer(let peer, let chats, let users): + if boxed { + buffer.appendInt32(2131196633) + } + peer.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(chats.count)) + for item in chats { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .resolvedPeer(let peer, let chats, let users): + return ("resolvedPeer", [("peer", peer), ("chats", chats), ("users", users)]) + } + } + + public static func parse_resolvedPeer(_ reader: BufferReader) -> ResolvedPeer? { + var _1: Api.Peer? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _2: [Api.Chat]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) + } + var _3: [Api.User]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.contacts.ResolvedPeer.resolvedPeer(peer: _1!, chats: _2!, users: _3!) + } + else { + return nil + } + } + + } + public enum ImportedContacts: TypeConstructorDescription { + case importedContacts(imported: [Api.ImportedContact], popularInvites: [Api.PopularContact], retryContacts: [Int64], users: [Api.User]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .importedContacts(let imported, let popularInvites, let retryContacts, let users): + if boxed { + buffer.appendInt32(2010127419) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(imported.count)) + for item in imported { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(popularInvites.count)) + for item in popularInvites { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(retryContacts.count)) + for item in retryContacts { + serializeInt64(item, buffer: buffer, boxed: false) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .importedContacts(let imported, let popularInvites, let retryContacts, let users): + return ("importedContacts", [("imported", imported), ("popularInvites", popularInvites), ("retryContacts", retryContacts), ("users", users)]) + } + } + + public static func parse_importedContacts(_ reader: BufferReader) -> ImportedContacts? { + var _1: [Api.ImportedContact]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ImportedContact.self) + } + var _2: [Api.PopularContact]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PopularContact.self) + } + var _3: [Int64]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self) } - var _3: String? - _3 = parseString(reader) var _4: [Api.User]? if let _ = reader.readInt32() { _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) } - var _5: Int32? - _5 = reader.readInt32() let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.phone.GroupParticipants.groupParticipants(count: _1!, participants: _2!, nextOffset: _3!, users: _4!, version: _5!) + if _c1 && _c2 && _c3 && _c4 { + return Api.contacts.ImportedContacts.importedContacts(imported: _1!, popularInvites: _2!, retryContacts: _3!, users: _4!) } else { return nil @@ -1732,16 +1616,30 @@ public struct phone { } } - public enum PhoneCall: TypeConstructorDescription { - case phoneCall(phoneCall: Api.PhoneCall, users: [Api.User]) + public enum Found: TypeConstructorDescription { + case found(myResults: [Api.Peer], results: [Api.Peer], chats: [Api.Chat], users: [Api.User]) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .phoneCall(let phoneCall, let users): + case .found(let myResults, let results, let chats, let users): if boxed { - buffer.appendInt32(-326966976) + buffer.appendInt32(-1290580579) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(myResults.count)) + for item in myResults { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(results.count)) + for item in results { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(chats.count)) + for item in chats { + item.serialize(buffer, true) } - phoneCall.serialize(buffer, true) buffer.appendInt32(481674261) buffer.appendInt32(Int32(users.count)) for item in users { @@ -1753,24 +1651,34 @@ public struct phone { public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .phoneCall(let phoneCall, let users): - return ("phoneCall", [("phoneCall", phoneCall), ("users", users)]) + case .found(let myResults, let results, let chats, let users): + return ("found", [("myResults", myResults), ("results", results), ("chats", chats), ("users", users)]) } } - public static func parse_phoneCall(_ reader: BufferReader) -> PhoneCall? { - var _1: Api.PhoneCall? - if let signature = reader.readInt32() { - _1 = Api.parse(reader, signature: signature) as? Api.PhoneCall - } - var _2: [Api.User]? + public static func parse_found(_ reader: BufferReader) -> Found? { + var _1: [Api.Peer]? if let _ = reader.readInt32() { - _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Peer.self) + } + var _2: [Api.Peer]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Peer.self) + } + var _3: [Api.Chat]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) + } + var _4: [Api.User]? + if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) } let _c1 = _1 != nil let _c2 = _2 != nil - if _c1 && _c2 { - return Api.phone.PhoneCall.phoneCall(phoneCall: _1!, users: _2!) + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.contacts.Found.found(myResults: _1!, results: _2!, chats: _3!, users: _4!) } else { return nil @@ -1778,5937 +1686,861 @@ public struct phone { } } + public enum TopPeers: TypeConstructorDescription { + case topPeersNotModified + case topPeers(categories: [Api.TopPeerCategoryPeers], chats: [Api.Chat], users: [Api.User]) + case topPeersDisabled + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .topPeersNotModified: + if boxed { + buffer.appendInt32(-567906571) + } + + break + case .topPeers(let categories, let chats, let users): + if boxed { + buffer.appendInt32(1891070632) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(categories.count)) + for item in categories { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(chats.count)) + for item in chats { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + break + case .topPeersDisabled: + if boxed { + buffer.appendInt32(-1255369827) + } + + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .topPeersNotModified: + return ("topPeersNotModified", []) + case .topPeers(let categories, let chats, let users): + return ("topPeers", [("categories", categories), ("chats", chats), ("users", users)]) + case .topPeersDisabled: + return ("topPeersDisabled", []) + } + } + + public static func parse_topPeersNotModified(_ reader: BufferReader) -> TopPeers? { + return Api.contacts.TopPeers.topPeersNotModified + } + public static func parse_topPeers(_ reader: BufferReader) -> TopPeers? { + var _1: [Api.TopPeerCategoryPeers]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.TopPeerCategoryPeers.self) + } + var _2: [Api.Chat]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) + } + var _3: [Api.User]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.contacts.TopPeers.topPeers(categories: _1!, chats: _2!, users: _3!) + } + else { + return nil + } + } + public static func parse_topPeersDisabled(_ reader: BufferReader) -> TopPeers? { + return Api.contacts.TopPeers.topPeersDisabled + } + + } } } public extension Api { - public struct functions { - public struct messages { - public static func getMessages(id: [Api.InputMessage]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1673946374) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(id.count)) - for item in id { - item.serialize(buffer, true) +public struct help { + public enum AppUpdate: TypeConstructorDescription { + case noAppUpdate + case appUpdate(flags: Int32, id: Int32, version: String, text: String, entities: [Api.MessageEntity], document: Api.Document?, url: String?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .noAppUpdate: + if boxed { + buffer.appendInt32(-1000708810) } - return (FunctionDescription(name: "messages.getMessages", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in - let reader = BufferReader(buffer) - var result: Api.messages.Messages? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.Messages - } - return result - }) - } - - public static func getDialogs(flags: Int32, folderId: Int32?, offsetDate: Int32, offsetId: Int32, offsetPeer: Api.InputPeer, limit: Int32, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1594999949) - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} - serializeInt32(offsetDate, buffer: buffer, boxed: false) - serializeInt32(offsetId, buffer: buffer, boxed: false) - offsetPeer.serialize(buffer, true) - serializeInt32(limit, buffer: buffer, boxed: false) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getDialogs", parameters: [("flags", flags), ("folderId", folderId), ("offsetDate", offsetDate), ("offsetId", offsetId), ("offsetPeer", offsetPeer), ("limit", limit), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Dialogs? in - let reader = BufferReader(buffer) - var result: Api.messages.Dialogs? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.Dialogs - } - return result - }) - } - - public static func getHistory(peer: Api.InputPeer, offsetId: Int32, offsetDate: Int32, addOffset: Int32, limit: Int32, maxId: Int32, minId: Int32, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-591691168) - peer.serialize(buffer, true) - serializeInt32(offsetId, buffer: buffer, boxed: false) - serializeInt32(offsetDate, buffer: buffer, boxed: false) - serializeInt32(addOffset, buffer: buffer, boxed: false) - serializeInt32(limit, buffer: buffer, boxed: false) - serializeInt32(maxId, buffer: buffer, boxed: false) - serializeInt32(minId, buffer: buffer, boxed: false) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getHistory", parameters: [("peer", peer), ("offsetId", offsetId), ("offsetDate", offsetDate), ("addOffset", addOffset), ("limit", limit), ("maxId", maxId), ("minId", minId), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in - let reader = BufferReader(buffer) - var result: Api.messages.Messages? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.Messages - } - return result - }) - } - - public static func search(flags: Int32, peer: Api.InputPeer, q: String, fromId: Api.InputPeer?, topMsgId: Int32?, filter: Api.MessagesFilter, minDate: Int32, maxDate: Int32, offsetId: Int32, addOffset: Int32, limit: Int32, maxId: Int32, minId: Int32, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(204812012) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - serializeString(q, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {fromId!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(topMsgId!, buffer: buffer, boxed: false)} - filter.serialize(buffer, true) - serializeInt32(minDate, buffer: buffer, boxed: false) - serializeInt32(maxDate, buffer: buffer, boxed: false) - serializeInt32(offsetId, buffer: buffer, boxed: false) - serializeInt32(addOffset, buffer: buffer, boxed: false) - serializeInt32(limit, buffer: buffer, boxed: false) - serializeInt32(maxId, buffer: buffer, boxed: false) - serializeInt32(minId, buffer: buffer, boxed: false) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.search", parameters: [("flags", flags), ("peer", peer), ("q", q), ("fromId", fromId), ("topMsgId", topMsgId), ("filter", filter), ("minDate", minDate), ("maxDate", maxDate), ("offsetId", offsetId), ("addOffset", addOffset), ("limit", limit), ("maxId", maxId), ("minId", minId), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in - let reader = BufferReader(buffer) - var result: Api.messages.Messages? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.Messages - } - return result - }) - } - - public static func readHistory(peer: Api.InputPeer, maxId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(238054714) - peer.serialize(buffer, true) - serializeInt32(maxId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.readHistory", parameters: [("peer", peer), ("maxId", maxId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AffectedMessages? in - let reader = BufferReader(buffer) - var result: Api.messages.AffectedMessages? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.AffectedMessages - } - return result - }) - } - - public static func deleteHistory(flags: Int32, peer: Api.InputPeer, maxId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(469850889) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - serializeInt32(maxId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.deleteHistory", parameters: [("flags", flags), ("peer", peer), ("maxId", maxId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AffectedHistory? in - let reader = BufferReader(buffer) - var result: Api.messages.AffectedHistory? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.AffectedHistory - } - return result - }) - } - - public static func deleteMessages(flags: Int32, id: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-443640366) - serializeInt32(flags, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(id.count)) - for item in id { - serializeInt32(item, buffer: buffer, boxed: false) + + break + case .appUpdate(let flags, let id, let version, let text, let entities, let document, let url): + if boxed { + buffer.appendInt32(497489295) } - return (FunctionDescription(name: "messages.deleteMessages", parameters: [("flags", flags), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AffectedMessages? in - let reader = BufferReader(buffer) - var result: Api.messages.AffectedMessages? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.AffectedMessages - } - return result - }) - } - - public static func receivedMessages(maxId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.ReceivedNotifyMessage]>) { - let buffer = Buffer() - buffer.appendInt32(94983360) - serializeInt32(maxId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.receivedMessages", parameters: [("maxId", maxId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.ReceivedNotifyMessage]? in - let reader = BufferReader(buffer) - var result: [Api.ReceivedNotifyMessage]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: 0, elementType: Api.ReceivedNotifyMessage.self) - } - return result - }) - } - - public static func setTyping(flags: Int32, peer: Api.InputPeer, topMsgId: Int32?, action: Api.SendMessageAction) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1486110434) serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(topMsgId!, buffer: buffer, boxed: false)} - action.serialize(buffer, true) - return (FunctionDescription(name: "messages.setTyping", parameters: [("flags", flags), ("peer", peer), ("topMsgId", topMsgId), ("action", action)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func sendMessage(flags: Int32, peer: Api.InputPeer, replyToMsgId: Int32?, message: String, randomId: Int64, replyMarkup: Api.ReplyMarkup?, entities: [Api.MessageEntity]?, scheduleDate: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1376532592) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(replyToMsgId!, buffer: buffer, boxed: false)} - serializeString(message, buffer: buffer, boxed: false) - serializeInt64(randomId, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} - if Int(flags) & Int(1 << 3) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities!.count)) - for item in entities! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 10) != 0 {serializeInt32(scheduleDate!, buffer: buffer, boxed: false)} - return (FunctionDescription(name: "messages.sendMessage", parameters: [("flags", flags), ("peer", peer), ("replyToMsgId", replyToMsgId), ("message", message), ("randomId", randomId), ("replyMarkup", replyMarkup), ("entities", entities), ("scheduleDate", scheduleDate)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func sendMedia(flags: Int32, peer: Api.InputPeer, replyToMsgId: Int32?, media: Api.InputMedia, message: String, randomId: Int64, replyMarkup: Api.ReplyMarkup?, entities: [Api.MessageEntity]?, scheduleDate: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(881978281) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(replyToMsgId!, buffer: buffer, boxed: false)} - media.serialize(buffer, true) - serializeString(message, buffer: buffer, boxed: false) - serializeInt64(randomId, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} - if Int(flags) & Int(1 << 3) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities!.count)) - for item in entities! { - item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 10) != 0 {serializeInt32(scheduleDate!, buffer: buffer, boxed: false)} - return (FunctionDescription(name: "messages.sendMedia", parameters: [("flags", flags), ("peer", peer), ("replyToMsgId", replyToMsgId), ("media", media), ("message", message), ("randomId", randomId), ("replyMarkup", replyMarkup), ("entities", entities), ("scheduleDate", scheduleDate)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func forwardMessages(flags: Int32, fromPeer: Api.InputPeer, id: [Int32], randomId: [Int64], toPeer: Api.InputPeer, scheduleDate: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-637606386) - serializeInt32(flags, buffer: buffer, boxed: false) - fromPeer.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(id.count)) - for item in id { - serializeInt32(item, buffer: buffer, boxed: false) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(randomId.count)) - for item in randomId { - serializeInt64(item, buffer: buffer, boxed: false) - } - toPeer.serialize(buffer, true) - if Int(flags) & Int(1 << 10) != 0 {serializeInt32(scheduleDate!, buffer: buffer, boxed: false)} - return (FunctionDescription(name: "messages.forwardMessages", parameters: [("flags", flags), ("fromPeer", fromPeer), ("id", id), ("randomId", randomId), ("toPeer", toPeer), ("scheduleDate", scheduleDate)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func reportSpam(peer: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-820669733) - peer.serialize(buffer, true) - return (FunctionDescription(name: "messages.reportSpam", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getPeerSettings(peer: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(913498268) - peer.serialize(buffer, true) - return (FunctionDescription(name: "messages.getPeerSettings", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.PeerSettings? in - let reader = BufferReader(buffer) - var result: Api.PeerSettings? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.PeerSettings - } - return result - }) - } - - public static func report(peer: Api.InputPeer, id: [Int32], reason: Api.ReportReason, message: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1991005362) - peer.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(id.count)) - for item in id { - serializeInt32(item, buffer: buffer, boxed: false) - } - reason.serialize(buffer, true) - serializeString(message, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.report", parameters: [("peer", peer), ("id", id), ("reason", reason), ("message", message)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getChats(id: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1013621127) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(id.count)) - for item in id { - serializeInt32(item, buffer: buffer, boxed: false) - } - return (FunctionDescription(name: "messages.getChats", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Chats? in - let reader = BufferReader(buffer) - var result: Api.messages.Chats? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.Chats - } - return result - }) - } - - public static func getFullChat(chatId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(998448230) - serializeInt32(chatId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getFullChat", parameters: [("chatId", chatId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.ChatFull? in - let reader = BufferReader(buffer) - var result: Api.messages.ChatFull? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.ChatFull - } - return result - }) - } - - public static func editChatTitle(chatId: Int32, title: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-599447467) - serializeInt32(chatId, buffer: buffer, boxed: false) - serializeString(title, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.editChatTitle", parameters: [("chatId", chatId), ("title", title)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func editChatPhoto(chatId: Int32, photo: Api.InputChatPhoto) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-900957736) - serializeInt32(chatId, buffer: buffer, boxed: false) - photo.serialize(buffer, true) - return (FunctionDescription(name: "messages.editChatPhoto", parameters: [("chatId", chatId), ("photo", photo)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func addChatUser(chatId: Int32, userId: Api.InputUser, fwdLimit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-106911223) - serializeInt32(chatId, buffer: buffer, boxed: false) - userId.serialize(buffer, true) - serializeInt32(fwdLimit, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.addChatUser", parameters: [("chatId", chatId), ("userId", userId), ("fwdLimit", fwdLimit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func deleteChatUser(flags: Int32, chatId: Int32, userId: Api.InputUser) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-986430054) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(chatId, buffer: buffer, boxed: false) - userId.serialize(buffer, true) - return (FunctionDescription(name: "messages.deleteChatUser", parameters: [("flags", flags), ("chatId", chatId), ("userId", userId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func createChat(users: [Api.InputUser], title: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(164303470) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - serializeString(title, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.createChat", parameters: [("users", users), ("title", title)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func getDhConfig(version: Int32, randomLength: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(651135312) - serializeInt32(version, buffer: buffer, boxed: false) - serializeInt32(randomLength, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getDhConfig", parameters: [("version", version), ("randomLength", randomLength)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.DhConfig? in - let reader = BufferReader(buffer) - var result: Api.messages.DhConfig? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.DhConfig - } - return result - }) - } - - public static func requestEncryption(userId: Api.InputUser, randomId: Int32, gA: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-162681021) - userId.serialize(buffer, true) - serializeInt32(randomId, buffer: buffer, boxed: false) - serializeBytes(gA, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.requestEncryption", parameters: [("userId", userId), ("randomId", randomId), ("gA", gA)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.EncryptedChat? in - let reader = BufferReader(buffer) - var result: Api.EncryptedChat? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.EncryptedChat - } - return result - }) - } - - public static func acceptEncryption(peer: Api.InputEncryptedChat, gB: Buffer, keyFingerprint: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1035731989) - peer.serialize(buffer, true) - serializeBytes(gB, buffer: buffer, boxed: false) - serializeInt64(keyFingerprint, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.acceptEncryption", parameters: [("peer", peer), ("gB", gB), ("keyFingerprint", keyFingerprint)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.EncryptedChat? in - let reader = BufferReader(buffer) - var result: Api.EncryptedChat? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.EncryptedChat - } - return result - }) - } - - public static func discardEncryption(flags: Int32, chatId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-208425312) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(chatId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.discardEncryption", parameters: [("flags", flags), ("chatId", chatId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func setEncryptedTyping(peer: Api.InputEncryptedChat, typing: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(2031374829) - peer.serialize(buffer, true) - typing.serialize(buffer, true) - return (FunctionDescription(name: "messages.setEncryptedTyping", parameters: [("peer", peer), ("typing", typing)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func readEncryptedHistory(peer: Api.InputEncryptedChat, maxDate: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(2135648522) - peer.serialize(buffer, true) - serializeInt32(maxDate, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.readEncryptedHistory", parameters: [("peer", peer), ("maxDate", maxDate)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func sendEncrypted(flags: Int32, peer: Api.InputEncryptedChat, randomId: Int64, data: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1157265941) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - serializeInt64(randomId, buffer: buffer, boxed: false) - serializeBytes(data, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.sendEncrypted", parameters: [("flags", flags), ("peer", peer), ("randomId", randomId), ("data", data)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.SentEncryptedMessage? in - let reader = BufferReader(buffer) - var result: Api.messages.SentEncryptedMessage? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.SentEncryptedMessage - } - return result - }) - } - - public static func sendEncryptedFile(flags: Int32, peer: Api.InputEncryptedChat, randomId: Int64, data: Buffer, file: Api.InputEncryptedFile) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1431914525) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - serializeInt64(randomId, buffer: buffer, boxed: false) - serializeBytes(data, buffer: buffer, boxed: false) - file.serialize(buffer, true) - return (FunctionDescription(name: "messages.sendEncryptedFile", parameters: [("flags", flags), ("peer", peer), ("randomId", randomId), ("data", data), ("file", file)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.SentEncryptedMessage? in - let reader = BufferReader(buffer) - var result: Api.messages.SentEncryptedMessage? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.SentEncryptedMessage - } - return result - }) - } - - public static func sendEncryptedService(peer: Api.InputEncryptedChat, randomId: Int64, data: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(852769188) - peer.serialize(buffer, true) - serializeInt64(randomId, buffer: buffer, boxed: false) - serializeBytes(data, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.sendEncryptedService", parameters: [("peer", peer), ("randomId", randomId), ("data", data)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.SentEncryptedMessage? in - let reader = BufferReader(buffer) - var result: Api.messages.SentEncryptedMessage? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.SentEncryptedMessage - } - return result - }) - } - - public static func receivedQueue(maxQts: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Int64]>) { - let buffer = Buffer() - buffer.appendInt32(1436924774) - serializeInt32(maxQts, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.receivedQueue", parameters: [("maxQts", maxQts)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Int64]? in - let reader = BufferReader(buffer) - var result: [Int64]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self) - } - return result - }) - } - - public static func reportEncryptedSpam(peer: Api.InputEncryptedChat) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1259113487) - peer.serialize(buffer, true) - return (FunctionDescription(name: "messages.reportEncryptedSpam", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func readMessageContents(id: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(916930423) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(id.count)) - for item in id { - serializeInt32(item, buffer: buffer, boxed: false) - } - return (FunctionDescription(name: "messages.readMessageContents", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AffectedMessages? in - let reader = BufferReader(buffer) - var result: Api.messages.AffectedMessages? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.AffectedMessages - } - return result - }) - } - - public static func getStickers(emoticon: String, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(71126828) - serializeString(emoticon, buffer: buffer, boxed: false) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getStickers", parameters: [("emoticon", emoticon), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Stickers? in - let reader = BufferReader(buffer) - var result: Api.messages.Stickers? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.Stickers - } - return result - }) - } - - public static func getAllStickers(hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(479598769) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getAllStickers", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AllStickers? in - let reader = BufferReader(buffer) - var result: Api.messages.AllStickers? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.AllStickers - } - return result - }) - } - - public static func getWebPagePreview(flags: Int32, message: String, entities: [Api.MessageEntity]?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1956073268) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(message, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 3) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities!.count)) - for item in entities! { - item.serialize(buffer, true) - }} - return (FunctionDescription(name: "messages.getWebPagePreview", parameters: [("flags", flags), ("message", message), ("entities", entities)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.MessageMedia? in - let reader = BufferReader(buffer) - var result: Api.MessageMedia? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.MessageMedia - } - return result - }) - } - - public static func exportChatInvite(flags: Int32, peer: Api.InputPeer, expireDate: Int32?, usageLimit: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(347716823) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(expireDate!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(usageLimit!, buffer: buffer, boxed: false)} - return (FunctionDescription(name: "messages.exportChatInvite", parameters: [("flags", flags), ("peer", peer), ("expireDate", expireDate), ("usageLimit", usageLimit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.ExportedChatInvite? in - let reader = BufferReader(buffer) - var result: Api.ExportedChatInvite? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite - } - return result - }) - } - - public static func checkChatInvite(hash: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1051570619) - serializeString(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.checkChatInvite", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.ChatInvite? in - let reader = BufferReader(buffer) - var result: Api.ChatInvite? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.ChatInvite - } - return result - }) - } - - public static func importChatInvite(hash: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1817183516) - serializeString(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.importChatInvite", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func getStickerSet(stickerset: Api.InputStickerSet) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(639215886) - stickerset.serialize(buffer, true) - return (FunctionDescription(name: "messages.getStickerSet", parameters: [("stickerset", stickerset)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.StickerSet? in - let reader = BufferReader(buffer) - var result: Api.messages.StickerSet? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.StickerSet - } - return result - }) - } - - public static func installStickerSet(stickerset: Api.InputStickerSet, archived: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-946871200) - stickerset.serialize(buffer, true) - archived.serialize(buffer, true) - return (FunctionDescription(name: "messages.installStickerSet", parameters: [("stickerset", stickerset), ("archived", archived)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.StickerSetInstallResult? in - let reader = BufferReader(buffer) - var result: Api.messages.StickerSetInstallResult? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.StickerSetInstallResult - } - return result - }) - } - - public static func uninstallStickerSet(stickerset: Api.InputStickerSet) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-110209570) - stickerset.serialize(buffer, true) - return (FunctionDescription(name: "messages.uninstallStickerSet", parameters: [("stickerset", stickerset)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func startBot(bot: Api.InputUser, peer: Api.InputPeer, randomId: Int64, startParam: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-421563528) - bot.serialize(buffer, true) - peer.serialize(buffer, true) - serializeInt64(randomId, buffer: buffer, boxed: false) - serializeString(startParam, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.startBot", parameters: [("bot", bot), ("peer", peer), ("randomId", randomId), ("startParam", startParam)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func getMessagesViews(peer: Api.InputPeer, id: [Int32], increment: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1468322785) - peer.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(id.count)) - for item in id { - serializeInt32(item, buffer: buffer, boxed: false) - } - increment.serialize(buffer, true) - return (FunctionDescription(name: "messages.getMessagesViews", parameters: [("peer", peer), ("id", id), ("increment", increment)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.MessageViews? in - let reader = BufferReader(buffer) - var result: Api.messages.MessageViews? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.MessageViews - } - return result - }) - } - - public static func editChatAdmin(chatId: Int32, userId: Api.InputUser, isAdmin: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1444503762) - serializeInt32(chatId, buffer: buffer, boxed: false) - userId.serialize(buffer, true) - isAdmin.serialize(buffer, true) - return (FunctionDescription(name: "messages.editChatAdmin", parameters: [("chatId", chatId), ("userId", userId), ("isAdmin", isAdmin)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func migrateChat(chatId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(363051235) - serializeInt32(chatId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.migrateChat", parameters: [("chatId", chatId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func searchGlobal(flags: Int32, folderId: Int32?, q: String, filter: Api.MessagesFilter, minDate: Int32, maxDate: Int32, offsetRate: Int32, offsetPeer: Api.InputPeer, offsetId: Int32, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1271290010) - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} - serializeString(q, buffer: buffer, boxed: false) - filter.serialize(buffer, true) - serializeInt32(minDate, buffer: buffer, boxed: false) - serializeInt32(maxDate, buffer: buffer, boxed: false) - serializeInt32(offsetRate, buffer: buffer, boxed: false) - offsetPeer.serialize(buffer, true) - serializeInt32(offsetId, buffer: buffer, boxed: false) - serializeInt32(limit, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.searchGlobal", parameters: [("flags", flags), ("folderId", folderId), ("q", q), ("filter", filter), ("minDate", minDate), ("maxDate", maxDate), ("offsetRate", offsetRate), ("offsetPeer", offsetPeer), ("offsetId", offsetId), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in - let reader = BufferReader(buffer) - var result: Api.messages.Messages? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.Messages - } - return result - }) - } - - public static func reorderStickerSets(flags: Int32, order: [Int64]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(2016638777) - serializeInt32(flags, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(order.count)) - for item in order { - serializeInt64(item, buffer: buffer, boxed: false) - } - return (FunctionDescription(name: "messages.reorderStickerSets", parameters: [("flags", flags), ("order", order)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getDocumentByHash(sha256: Buffer, size: Int32, mimeType: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(864953444) - serializeBytes(sha256, buffer: buffer, boxed: false) - serializeInt32(size, buffer: buffer, boxed: false) - serializeString(mimeType, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getDocumentByHash", parameters: [("sha256", sha256), ("size", size), ("mimeType", mimeType)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Document? in - let reader = BufferReader(buffer) - var result: Api.Document? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Document - } - return result - }) - } - - public static func getSavedGifs(hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-2084618926) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getSavedGifs", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.SavedGifs? in - let reader = BufferReader(buffer) - var result: Api.messages.SavedGifs? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.SavedGifs - } - return result - }) - } - - public static func saveGif(id: Api.InputDocument, unsave: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(846868683) - id.serialize(buffer, true) - unsave.serialize(buffer, true) - return (FunctionDescription(name: "messages.saveGif", parameters: [("id", id), ("unsave", unsave)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getInlineBotResults(flags: Int32, bot: Api.InputUser, peer: Api.InputPeer, geoPoint: Api.InputGeoPoint?, query: String, offset: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1364105629) - serializeInt32(flags, buffer: buffer, boxed: false) - bot.serialize(buffer, true) - peer.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {geoPoint!.serialize(buffer, true)} - serializeString(query, buffer: buffer, boxed: false) - serializeString(offset, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getInlineBotResults", parameters: [("flags", flags), ("bot", bot), ("peer", peer), ("geoPoint", geoPoint), ("query", query), ("offset", offset)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.BotResults? in - let reader = BufferReader(buffer) - var result: Api.messages.BotResults? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.BotResults - } - return result - }) - } - - public static func setInlineBotResults(flags: Int32, queryId: Int64, results: [Api.InputBotInlineResult], cacheTime: Int32, nextOffset: String?, switchPm: Api.InlineBotSwitchPM?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-346119674) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(queryId, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(results.count)) - for item in results { - item.serialize(buffer, true) - } - serializeInt32(cacheTime, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {serializeString(nextOffset!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 3) != 0 {switchPm!.serialize(buffer, true)} - return (FunctionDescription(name: "messages.setInlineBotResults", parameters: [("flags", flags), ("queryId", queryId), ("results", results), ("cacheTime", cacheTime), ("nextOffset", nextOffset), ("switchPm", switchPm)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func sendInlineBotResult(flags: Int32, peer: Api.InputPeer, replyToMsgId: Int32?, randomId: Int64, queryId: Int64, id: String, scheduleDate: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(570955184) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(replyToMsgId!, buffer: buffer, boxed: false)} - serializeInt64(randomId, buffer: buffer, boxed: false) - serializeInt64(queryId, buffer: buffer, boxed: false) - serializeString(id, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 10) != 0 {serializeInt32(scheduleDate!, buffer: buffer, boxed: false)} - return (FunctionDescription(name: "messages.sendInlineBotResult", parameters: [("flags", flags), ("peer", peer), ("replyToMsgId", replyToMsgId), ("randomId", randomId), ("queryId", queryId), ("id", id), ("scheduleDate", scheduleDate)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func getMessageEditData(peer: Api.InputPeer, id: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-39416522) - peer.serialize(buffer, true) serializeInt32(id, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getMessageEditData", parameters: [("peer", peer), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.MessageEditData? in - let reader = BufferReader(buffer) - var result: Api.messages.MessageEditData? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.MessageEditData - } - return result - }) - } - - public static func editMessage(flags: Int32, peer: Api.InputPeer, id: Int32, message: String?, media: Api.InputMedia?, replyMarkup: Api.ReplyMarkup?, entities: [Api.MessageEntity]?, scheduleDate: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1224152952) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - serializeInt32(id, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 11) != 0 {serializeString(message!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 14) != 0 {media!.serialize(buffer, true)} - if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} - if Int(flags) & Int(1 << 3) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities!.count)) - for item in entities! { + serializeString(version, buffer: buffer, boxed: false) + serializeString(text, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities.count)) + for item in entities { item.serialize(buffer, true) - }} - if Int(flags) & Int(1 << 15) != 0 {serializeInt32(scheduleDate!, buffer: buffer, boxed: false)} - return (FunctionDescription(name: "messages.editMessage", parameters: [("flags", flags), ("peer", peer), ("id", id), ("message", message), ("media", media), ("replyMarkup", replyMarkup), ("entities", entities), ("scheduleDate", scheduleDate)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func editInlineBotMessage(flags: Int32, id: Api.InputBotInlineMessageID, message: String?, media: Api.InputMedia?, replyMarkup: Api.ReplyMarkup?, entities: [Api.MessageEntity]?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-2091549254) - serializeInt32(flags, buffer: buffer, boxed: false) - id.serialize(buffer, true) - if Int(flags) & Int(1 << 11) != 0 {serializeString(message!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 14) != 0 {media!.serialize(buffer, true)} - if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} - if Int(flags) & Int(1 << 3) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(entities!.count)) - for item in entities! { - item.serialize(buffer, true) - }} - return (FunctionDescription(name: "messages.editInlineBotMessage", parameters: [("flags", flags), ("id", id), ("message", message), ("media", media), ("replyMarkup", replyMarkup), ("entities", entities)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getBotCallbackAnswer(flags: Int32, peer: Api.InputPeer, msgId: Int32, data: Buffer?, password: Api.InputCheckPasswordSRP?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1824339449) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - serializeInt32(msgId, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeBytes(data!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {password!.serialize(buffer, true)} - return (FunctionDescription(name: "messages.getBotCallbackAnswer", parameters: [("flags", flags), ("peer", peer), ("msgId", msgId), ("data", data), ("password", password)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.BotCallbackAnswer? in - let reader = BufferReader(buffer) - var result: Api.messages.BotCallbackAnswer? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.BotCallbackAnswer - } - return result - }) - } - - public static func setBotCallbackAnswer(flags: Int32, queryId: Int64, message: String?, url: String?, cacheTime: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-712043766) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(queryId, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeString(message!, buffer: buffer, boxed: false)} + } + if Int(flags) & Int(1 << 1) != 0 {document!.serialize(buffer, true)} if Int(flags) & Int(1 << 2) != 0 {serializeString(url!, buffer: buffer, boxed: false)} - serializeInt32(cacheTime, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.setBotCallbackAnswer", parameters: [("flags", flags), ("queryId", queryId), ("message", message), ("url", url), ("cacheTime", cacheTime)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getPeerDialogs(peers: [Api.InputDialogPeer]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-462373635) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(peers.count)) - for item in peers { - item.serialize(buffer, true) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .noAppUpdate: + return ("noAppUpdate", []) + case .appUpdate(let flags, let id, let version, let text, let entities, let document, let url): + return ("appUpdate", [("flags", flags), ("id", id), ("version", version), ("text", text), ("entities", entities), ("document", document), ("url", url)]) + } + } + + public static func parse_noAppUpdate(_ reader: BufferReader) -> AppUpdate? { + return Api.help.AppUpdate.noAppUpdate + } + public static func parse_appUpdate(_ reader: BufferReader) -> AppUpdate? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: String? + _3 = parseString(reader) + var _4: String? + _4 = parseString(reader) + var _5: [Api.MessageEntity]? + if let _ = reader.readInt32() { + _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) + } + var _6: Api.Document? + if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.Document + } } + var _7: String? + if Int(_1!) & Int(1 << 2) != 0 {_7 = parseString(reader) } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 2) == 0) || _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.help.AppUpdate.appUpdate(flags: _1!, id: _2!, version: _3!, text: _4!, entities: _5!, document: _6, url: _7) + } + else { + return nil + } + } + + } + public enum PassportConfig: TypeConstructorDescription { + case passportConfigNotModified + case passportConfig(hash: Int32, countriesLangs: Api.DataJSON) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .passportConfigNotModified: + if boxed { + buffer.appendInt32(-1078332329) + } + + break + case .passportConfig(let hash, let countriesLangs): + if boxed { + buffer.appendInt32(-1600596305) + } + serializeInt32(hash, buffer: buffer, boxed: false) + countriesLangs.serialize(buffer, true) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .passportConfigNotModified: + return ("passportConfigNotModified", []) + case .passportConfig(let hash, let countriesLangs): + return ("passportConfig", [("hash", hash), ("countriesLangs", countriesLangs)]) + } + } + + public static func parse_passportConfigNotModified(_ reader: BufferReader) -> PassportConfig? { + return Api.help.PassportConfig.passportConfigNotModified + } + public static func parse_passportConfig(_ reader: BufferReader) -> PassportConfig? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.DataJSON? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.DataJSON + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.help.PassportConfig.passportConfig(hash: _1!, countriesLangs: _2!) + } + else { + return nil + } + } + + } + public enum DeepLinkInfo: TypeConstructorDescription { + case deepLinkInfoEmpty + case deepLinkInfo(flags: Int32, message: String, entities: [Api.MessageEntity]?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .deepLinkInfoEmpty: + if boxed { + buffer.appendInt32(1722786150) + } + + break + case .deepLinkInfo(let flags, let message, let entities): + if boxed { + buffer.appendInt32(1783556146) } - return (FunctionDescription(name: "messages.getPeerDialogs", parameters: [("peers", peers)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.PeerDialogs? in - let reader = BufferReader(buffer) - var result: Api.messages.PeerDialogs? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.PeerDialogs - } - return result - }) - } - - public static func saveDraft(flags: Int32, replyToMsgId: Int32?, peer: Api.InputPeer, message: String, entities: [Api.MessageEntity]?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1137057461) serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(replyToMsgId!, buffer: buffer, boxed: false)} - peer.serialize(buffer, true) serializeString(message, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 3) != 0 {buffer.appendInt32(481674261) + if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) buffer.appendInt32(Int32(entities!.count)) for item in entities! { item.serialize(buffer, true) }} - return (FunctionDescription(name: "messages.saveDraft", parameters: [("flags", flags), ("replyToMsgId", replyToMsgId), ("peer", peer), ("message", message), ("entities", entities)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getAllDrafts() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1782549861) - - return (FunctionDescription(name: "messages.getAllDrafts", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func getFeaturedStickers(hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(766298703) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getFeaturedStickers", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.FeaturedStickers? in - let reader = BufferReader(buffer) - var result: Api.messages.FeaturedStickers? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.FeaturedStickers - } - return result - }) - } - - public static func readFeaturedStickers(id: [Int64]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1527873830) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(id.count)) - for item in id { - serializeInt64(item, buffer: buffer, boxed: false) - } - return (FunctionDescription(name: "messages.readFeaturedStickers", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getRecentStickers(flags: Int32, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1587647177) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getRecentStickers", parameters: [("flags", flags), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.RecentStickers? in - let reader = BufferReader(buffer) - var result: Api.messages.RecentStickers? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.RecentStickers - } - return result - }) - } - - public static func saveRecentSticker(flags: Int32, id: Api.InputDocument, unsave: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(958863608) - serializeInt32(flags, buffer: buffer, boxed: false) - id.serialize(buffer, true) - unsave.serialize(buffer, true) - return (FunctionDescription(name: "messages.saveRecentSticker", parameters: [("flags", flags), ("id", id), ("unsave", unsave)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func clearRecentStickers(flags: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1986437075) - serializeInt32(flags, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.clearRecentStickers", parameters: [("flags", flags)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getArchivedStickers(flags: Int32, offsetId: Int64, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1475442322) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(offsetId, buffer: buffer, boxed: false) - serializeInt32(limit, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getArchivedStickers", parameters: [("flags", flags), ("offsetId", offsetId), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.ArchivedStickers? in - let reader = BufferReader(buffer) - var result: Api.messages.ArchivedStickers? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.ArchivedStickers - } - return result - }) - } - - public static func getMaskStickers(hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1706608543) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getMaskStickers", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AllStickers? in - let reader = BufferReader(buffer) - var result: Api.messages.AllStickers? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.AllStickers - } - return result - }) - } - - public static func getAttachedStickers(media: Api.InputStickeredMedia) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.StickerSetCovered]>) { - let buffer = Buffer() - buffer.appendInt32(-866424884) - media.serialize(buffer, true) - return (FunctionDescription(name: "messages.getAttachedStickers", parameters: [("media", media)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.StickerSetCovered]? in - let reader = BufferReader(buffer) - var result: [Api.StickerSetCovered]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: 0, elementType: Api.StickerSetCovered.self) - } - return result - }) - } - - public static func setGameScore(flags: Int32, peer: Api.InputPeer, id: Int32, userId: Api.InputUser, score: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1896289088) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - serializeInt32(id, buffer: buffer, boxed: false) - userId.serialize(buffer, true) - serializeInt32(score, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.setGameScore", parameters: [("flags", flags), ("peer", peer), ("id", id), ("userId", userId), ("score", score)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func setInlineGameScore(flags: Int32, id: Api.InputBotInlineMessageID, userId: Api.InputUser, score: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(363700068) - serializeInt32(flags, buffer: buffer, boxed: false) - id.serialize(buffer, true) - userId.serialize(buffer, true) - serializeInt32(score, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.setInlineGameScore", parameters: [("flags", flags), ("id", id), ("userId", userId), ("score", score)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getGameHighScores(peer: Api.InputPeer, id: Int32, userId: Api.InputUser) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-400399203) - peer.serialize(buffer, true) - serializeInt32(id, buffer: buffer, boxed: false) - userId.serialize(buffer, true) - return (FunctionDescription(name: "messages.getGameHighScores", parameters: [("peer", peer), ("id", id), ("userId", userId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.HighScores? in - let reader = BufferReader(buffer) - var result: Api.messages.HighScores? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.HighScores - } - return result - }) - } - - public static func getInlineGameHighScores(id: Api.InputBotInlineMessageID, userId: Api.InputUser) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(258170395) - id.serialize(buffer, true) - userId.serialize(buffer, true) - return (FunctionDescription(name: "messages.getInlineGameHighScores", parameters: [("id", id), ("userId", userId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.HighScores? in - let reader = BufferReader(buffer) - var result: Api.messages.HighScores? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.HighScores - } - return result - }) - } - - public static func getCommonChats(userId: Api.InputUser, maxId: Int32, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(218777796) - userId.serialize(buffer, true) - serializeInt32(maxId, buffer: buffer, boxed: false) - serializeInt32(limit, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getCommonChats", parameters: [("userId", userId), ("maxId", maxId), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Chats? in - let reader = BufferReader(buffer) - var result: Api.messages.Chats? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.Chats - } - return result - }) - } - - public static func getAllChats(exceptIds: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-341307408) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(exceptIds.count)) - for item in exceptIds { - serializeInt32(item, buffer: buffer, boxed: false) - } - return (FunctionDescription(name: "messages.getAllChats", parameters: [("exceptIds", exceptIds)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Chats? in - let reader = BufferReader(buffer) - var result: Api.messages.Chats? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.Chats - } - return result - }) - } - - public static func getWebPage(url: String, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(852135825) - serializeString(url, buffer: buffer, boxed: false) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getWebPage", parameters: [("url", url), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.WebPage? in - let reader = BufferReader(buffer) - var result: Api.WebPage? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.WebPage - } - return result - }) - } - - public static func toggleDialogPin(flags: Int32, peer: Api.InputDialogPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1489903017) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - return (FunctionDescription(name: "messages.toggleDialogPin", parameters: [("flags", flags), ("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func reorderPinnedDialogs(flags: Int32, folderId: Int32, order: [Api.InputDialogPeer]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(991616823) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(folderId, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(order.count)) - for item in order { - item.serialize(buffer, true) - } - return (FunctionDescription(name: "messages.reorderPinnedDialogs", parameters: [("flags", flags), ("folderId", folderId), ("order", order)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getPinnedDialogs(folderId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-692498958) - serializeInt32(folderId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getPinnedDialogs", parameters: [("folderId", folderId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.PeerDialogs? in - let reader = BufferReader(buffer) - var result: Api.messages.PeerDialogs? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.PeerDialogs - } - return result - }) - } - - public static func setBotShippingResults(flags: Int32, queryId: Int64, error: String?, shippingOptions: [Api.ShippingOption]?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-436833542) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(queryId, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeString(error!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(shippingOptions!.count)) - for item in shippingOptions! { - item.serialize(buffer, true) - }} - return (FunctionDescription(name: "messages.setBotShippingResults", parameters: [("flags", flags), ("queryId", queryId), ("error", error), ("shippingOptions", shippingOptions)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func setBotPrecheckoutResults(flags: Int32, queryId: Int64, error: String?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(163765653) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt64(queryId, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeString(error!, buffer: buffer, boxed: false)} - return (FunctionDescription(name: "messages.setBotPrecheckoutResults", parameters: [("flags", flags), ("queryId", queryId), ("error", error)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func uploadMedia(peer: Api.InputPeer, media: Api.InputMedia) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1369162417) - peer.serialize(buffer, true) - media.serialize(buffer, true) - return (FunctionDescription(name: "messages.uploadMedia", parameters: [("peer", peer), ("media", media)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.MessageMedia? in - let reader = BufferReader(buffer) - var result: Api.MessageMedia? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.MessageMedia - } - return result - }) - } - - public static func sendScreenshotNotification(peer: Api.InputPeer, replyToMsgId: Int32, randomId: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-914493408) - peer.serialize(buffer, true) - serializeInt32(replyToMsgId, buffer: buffer, boxed: false) - serializeInt64(randomId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.sendScreenshotNotification", parameters: [("peer", peer), ("replyToMsgId", replyToMsgId), ("randomId", randomId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func getFavedStickers(hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(567151374) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getFavedStickers", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.FavedStickers? in - let reader = BufferReader(buffer) - var result: Api.messages.FavedStickers? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.FavedStickers - } - return result - }) - } - - public static func faveSticker(id: Api.InputDocument, unfave: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1174420133) - id.serialize(buffer, true) - unfave.serialize(buffer, true) - return (FunctionDescription(name: "messages.faveSticker", parameters: [("id", id), ("unfave", unfave)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getUnreadMentions(peer: Api.InputPeer, offsetId: Int32, addOffset: Int32, limit: Int32, maxId: Int32, minId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1180140658) - peer.serialize(buffer, true) - serializeInt32(offsetId, buffer: buffer, boxed: false) - serializeInt32(addOffset, buffer: buffer, boxed: false) - serializeInt32(limit, buffer: buffer, boxed: false) - serializeInt32(maxId, buffer: buffer, boxed: false) - serializeInt32(minId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getUnreadMentions", parameters: [("peer", peer), ("offsetId", offsetId), ("addOffset", addOffset), ("limit", limit), ("maxId", maxId), ("minId", minId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in - let reader = BufferReader(buffer) - var result: Api.messages.Messages? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.Messages - } - return result - }) - } - - public static func readMentions(peer: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(251759059) - peer.serialize(buffer, true) - return (FunctionDescription(name: "messages.readMentions", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AffectedHistory? in - let reader = BufferReader(buffer) - var result: Api.messages.AffectedHistory? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.AffectedHistory - } - return result - }) - } - - public static func getRecentLocations(peer: Api.InputPeer, limit: Int32, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1144759543) - peer.serialize(buffer, true) - serializeInt32(limit, buffer: buffer, boxed: false) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getRecentLocations", parameters: [("peer", peer), ("limit", limit), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in - let reader = BufferReader(buffer) - var result: Api.messages.Messages? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.Messages - } - return result - }) - } - - public static func sendMultiMedia(flags: Int32, peer: Api.InputPeer, replyToMsgId: Int32?, multiMedia: [Api.InputSingleMedia], scheduleDate: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-872345397) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(replyToMsgId!, buffer: buffer, boxed: false)} - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(multiMedia.count)) - for item in multiMedia { - item.serialize(buffer, true) - } - if Int(flags) & Int(1 << 10) != 0 {serializeInt32(scheduleDate!, buffer: buffer, boxed: false)} - return (FunctionDescription(name: "messages.sendMultiMedia", parameters: [("flags", flags), ("peer", peer), ("replyToMsgId", replyToMsgId), ("multiMedia", multiMedia), ("scheduleDate", scheduleDate)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func uploadEncryptedFile(peer: Api.InputEncryptedChat, file: Api.InputEncryptedFile) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1347929239) - peer.serialize(buffer, true) - file.serialize(buffer, true) - return (FunctionDescription(name: "messages.uploadEncryptedFile", parameters: [("peer", peer), ("file", file)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.EncryptedFile? in - let reader = BufferReader(buffer) - var result: Api.EncryptedFile? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.EncryptedFile - } - return result - }) - } - - public static func searchStickerSets(flags: Int32, q: String, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1028140917) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(q, buffer: buffer, boxed: false) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.searchStickerSets", parameters: [("flags", flags), ("q", q), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.FoundStickerSets? in - let reader = BufferReader(buffer) - var result: Api.messages.FoundStickerSets? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.FoundStickerSets - } - return result - }) - } - - public static func getSplitRanges() -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.MessageRange]>) { - let buffer = Buffer() - buffer.appendInt32(486505992) - - return (FunctionDescription(name: "messages.getSplitRanges", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.MessageRange]? in - let reader = BufferReader(buffer) - var result: [Api.MessageRange]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageRange.self) - } - return result - }) - } - - public static func markDialogUnread(flags: Int32, peer: Api.InputDialogPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1031349873) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - return (FunctionDescription(name: "messages.markDialogUnread", parameters: [("flags", flags), ("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getDialogUnreadMarks() -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.DialogPeer]>) { - let buffer = Buffer() - buffer.appendInt32(585256482) - - return (FunctionDescription(name: "messages.getDialogUnreadMarks", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.DialogPeer]? in - let reader = BufferReader(buffer) - var result: [Api.DialogPeer]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: 0, elementType: Api.DialogPeer.self) - } - return result - }) - } - - public static func clearAllDrafts() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(2119757468) - - return (FunctionDescription(name: "messages.clearAllDrafts", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func updatePinnedMessage(flags: Int32, peer: Api.InputPeer, id: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-760547348) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - serializeInt32(id, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.updatePinnedMessage", parameters: [("flags", flags), ("peer", peer), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func sendVote(peer: Api.InputPeer, msgId: Int32, options: [Buffer]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(283795844) - peer.serialize(buffer, true) - serializeInt32(msgId, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(options.count)) - for item in options { - serializeBytes(item, buffer: buffer, boxed: false) - } - return (FunctionDescription(name: "messages.sendVote", parameters: [("peer", peer), ("msgId", msgId), ("options", options)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func getPollResults(peer: Api.InputPeer, msgId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1941660731) - peer.serialize(buffer, true) - serializeInt32(msgId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getPollResults", parameters: [("peer", peer), ("msgId", msgId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func getOnlines(peer: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1848369232) - peer.serialize(buffer, true) - return (FunctionDescription(name: "messages.getOnlines", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.ChatOnlines? in - let reader = BufferReader(buffer) - var result: Api.ChatOnlines? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.ChatOnlines - } - return result - }) - } - - public static func getStatsURL(flags: Int32, peer: Api.InputPeer, params: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-2127811866) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - serializeString(params, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getStatsURL", parameters: [("flags", flags), ("peer", peer), ("params", params)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.StatsURL? in - let reader = BufferReader(buffer) - var result: Api.StatsURL? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.StatsURL - } - return result - }) - } - - public static func editChatAbout(peer: Api.InputPeer, about: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-554301545) - peer.serialize(buffer, true) - serializeString(about, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.editChatAbout", parameters: [("peer", peer), ("about", about)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func editChatDefaultBannedRights(peer: Api.InputPeer, bannedRights: Api.ChatBannedRights) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1517917375) - peer.serialize(buffer, true) - bannedRights.serialize(buffer, true) - return (FunctionDescription(name: "messages.editChatDefaultBannedRights", parameters: [("peer", peer), ("bannedRights", bannedRights)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func getEmojiKeywords(langCode: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(899735650) - serializeString(langCode, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getEmojiKeywords", parameters: [("langCode", langCode)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.EmojiKeywordsDifference? in - let reader = BufferReader(buffer) - var result: Api.EmojiKeywordsDifference? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.EmojiKeywordsDifference - } - return result - }) - } - - public static func getEmojiKeywordsDifference(langCode: String, fromVersion: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(352892591) - serializeString(langCode, buffer: buffer, boxed: false) - serializeInt32(fromVersion, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getEmojiKeywordsDifference", parameters: [("langCode", langCode), ("fromVersion", fromVersion)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.EmojiKeywordsDifference? in - let reader = BufferReader(buffer) - var result: Api.EmojiKeywordsDifference? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.EmojiKeywordsDifference - } - return result - }) - } - - public static func getEmojiKeywordsLanguages(langCodes: [String]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.EmojiLanguage]>) { - let buffer = Buffer() - buffer.appendInt32(1318675378) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(langCodes.count)) - for item in langCodes { - serializeString(item, buffer: buffer, boxed: false) - } - return (FunctionDescription(name: "messages.getEmojiKeywordsLanguages", parameters: [("langCodes", langCodes)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.EmojiLanguage]? in - let reader = BufferReader(buffer) - var result: [Api.EmojiLanguage]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: 0, elementType: Api.EmojiLanguage.self) - } - return result - }) - } - - public static func getEmojiURL(langCode: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-709817306) - serializeString(langCode, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getEmojiURL", parameters: [("langCode", langCode)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.EmojiURL? in - let reader = BufferReader(buffer) - var result: Api.EmojiURL? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.EmojiURL - } - return result - }) - } - - public static func getSearchCounters(peer: Api.InputPeer, filters: [Api.MessagesFilter]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.messages.SearchCounter]>) { - let buffer = Buffer() - buffer.appendInt32(1932455680) - peer.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(filters.count)) - for item in filters { - item.serialize(buffer, true) - } - return (FunctionDescription(name: "messages.getSearchCounters", parameters: [("peer", peer), ("filters", filters)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.messages.SearchCounter]? in - let reader = BufferReader(buffer) - var result: [Api.messages.SearchCounter]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: 0, elementType: Api.messages.SearchCounter.self) - } - return result - }) - } - - public static func requestUrlAuth(peer: Api.InputPeer, msgId: Int32, buttonId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-482388461) - peer.serialize(buffer, true) - serializeInt32(msgId, buffer: buffer, boxed: false) - serializeInt32(buttonId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.requestUrlAuth", parameters: [("peer", peer), ("msgId", msgId), ("buttonId", buttonId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.UrlAuthResult? in - let reader = BufferReader(buffer) - var result: Api.UrlAuthResult? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.UrlAuthResult - } - return result - }) - } - - public static func acceptUrlAuth(flags: Int32, peer: Api.InputPeer, msgId: Int32, buttonId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-148247912) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - serializeInt32(msgId, buffer: buffer, boxed: false) - serializeInt32(buttonId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.acceptUrlAuth", parameters: [("flags", flags), ("peer", peer), ("msgId", msgId), ("buttonId", buttonId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.UrlAuthResult? in - let reader = BufferReader(buffer) - var result: Api.UrlAuthResult? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.UrlAuthResult - } - return result - }) - } - - public static func hidePeerSettingsBar(peer: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1336717624) - peer.serialize(buffer, true) - return (FunctionDescription(name: "messages.hidePeerSettingsBar", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getScheduledHistory(peer: Api.InputPeer, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-490575781) - peer.serialize(buffer, true) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getScheduledHistory", parameters: [("peer", peer), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in - let reader = BufferReader(buffer) - var result: Api.messages.Messages? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.Messages - } - return result - }) - } - - public static func getScheduledMessages(peer: Api.InputPeer, id: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1111817116) - peer.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(id.count)) - for item in id { - serializeInt32(item, buffer: buffer, boxed: false) - } - return (FunctionDescription(name: "messages.getScheduledMessages", parameters: [("peer", peer), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in - let reader = BufferReader(buffer) - var result: Api.messages.Messages? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.Messages - } - return result - }) - } - - public static func sendScheduledMessages(peer: Api.InputPeer, id: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1120369398) - peer.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(id.count)) - for item in id { - serializeInt32(item, buffer: buffer, boxed: false) - } - return (FunctionDescription(name: "messages.sendScheduledMessages", parameters: [("peer", peer), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func deleteScheduledMessages(peer: Api.InputPeer, id: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1504586518) - peer.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(id.count)) - for item in id { - serializeInt32(item, buffer: buffer, boxed: false) - } - return (FunctionDescription(name: "messages.deleteScheduledMessages", parameters: [("peer", peer), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func getPollVotes(flags: Int32, peer: Api.InputPeer, id: Int32, option: Buffer?, offset: String?, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1200736242) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - serializeInt32(id, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeBytes(option!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeString(offset!, buffer: buffer, boxed: false)} - serializeInt32(limit, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getPollVotes", parameters: [("flags", flags), ("peer", peer), ("id", id), ("option", option), ("offset", offset), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.VotesList? in - let reader = BufferReader(buffer) - var result: Api.messages.VotesList? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.VotesList - } - return result - }) - } - - public static func toggleStickerSets(flags: Int32, stickersets: [Api.InputStickerSet]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1257951254) - serializeInt32(flags, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(stickersets.count)) - for item in stickersets { - item.serialize(buffer, true) - } - return (FunctionDescription(name: "messages.toggleStickerSets", parameters: [("flags", flags), ("stickersets", stickersets)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getDialogFilters() -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.DialogFilter]>) { - let buffer = Buffer() - buffer.appendInt32(-241247891) - - return (FunctionDescription(name: "messages.getDialogFilters", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.DialogFilter]? in - let reader = BufferReader(buffer) - var result: [Api.DialogFilter]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: 0, elementType: Api.DialogFilter.self) - } - return result - }) - } - - public static func getSuggestedDialogFilters() -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.DialogFilterSuggested]>) { - let buffer = Buffer() - buffer.appendInt32(-1566780372) - - return (FunctionDescription(name: "messages.getSuggestedDialogFilters", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.DialogFilterSuggested]? in - let reader = BufferReader(buffer) - var result: [Api.DialogFilterSuggested]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: 0, elementType: Api.DialogFilterSuggested.self) - } - return result - }) - } - - public static func updateDialogFilter(flags: Int32, id: Int32, filter: Api.DialogFilter?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(450142282) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(id, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {filter!.serialize(buffer, true)} - return (FunctionDescription(name: "messages.updateDialogFilter", parameters: [("flags", flags), ("id", id), ("filter", filter)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func updateDialogFiltersOrder(order: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-983318044) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(order.count)) - for item in order { - serializeInt32(item, buffer: buffer, boxed: false) - } - return (FunctionDescription(name: "messages.updateDialogFiltersOrder", parameters: [("order", order)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getOldFeaturedStickers(offset: Int32, limit: Int32, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1608974939) - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(limit, buffer: buffer, boxed: false) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getOldFeaturedStickers", parameters: [("offset", offset), ("limit", limit), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.FeaturedStickers? in - let reader = BufferReader(buffer) - var result: Api.messages.FeaturedStickers? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.FeaturedStickers - } - return result - }) - } - - public static func getReplies(peer: Api.InputPeer, msgId: Int32, offsetId: Int32, offsetDate: Int32, addOffset: Int32, limit: Int32, maxId: Int32, minId: Int32, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(615875002) - peer.serialize(buffer, true) - serializeInt32(msgId, buffer: buffer, boxed: false) - serializeInt32(offsetId, buffer: buffer, boxed: false) - serializeInt32(offsetDate, buffer: buffer, boxed: false) - serializeInt32(addOffset, buffer: buffer, boxed: false) - serializeInt32(limit, buffer: buffer, boxed: false) - serializeInt32(maxId, buffer: buffer, boxed: false) - serializeInt32(minId, buffer: buffer, boxed: false) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getReplies", parameters: [("peer", peer), ("msgId", msgId), ("offsetId", offsetId), ("offsetDate", offsetDate), ("addOffset", addOffset), ("limit", limit), ("maxId", maxId), ("minId", minId), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in - let reader = BufferReader(buffer) - var result: Api.messages.Messages? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.Messages - } - return result - }) - } - - public static func getDiscussionMessage(peer: Api.InputPeer, msgId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1147761405) - peer.serialize(buffer, true) - serializeInt32(msgId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getDiscussionMessage", parameters: [("peer", peer), ("msgId", msgId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.DiscussionMessage? in - let reader = BufferReader(buffer) - var result: Api.messages.DiscussionMessage? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.DiscussionMessage - } - return result - }) - } - - public static func readDiscussion(peer: Api.InputPeer, msgId: Int32, readMaxId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-147740172) - peer.serialize(buffer, true) - serializeInt32(msgId, buffer: buffer, boxed: false) - serializeInt32(readMaxId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.readDiscussion", parameters: [("peer", peer), ("msgId", msgId), ("readMaxId", readMaxId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func unpinAllMessages(peer: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-265962357) - peer.serialize(buffer, true) - return (FunctionDescription(name: "messages.unpinAllMessages", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AffectedHistory? in - let reader = BufferReader(buffer) - var result: Api.messages.AffectedHistory? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.AffectedHistory - } - return result - }) - } - - public static func deleteChat(chatId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-2094760687) - serializeInt32(chatId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.deleteChat", parameters: [("chatId", chatId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func deletePhoneCallHistory(flags: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-104078327) - serializeInt32(flags, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.deletePhoneCallHistory", parameters: [("flags", flags)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AffectedFoundMessages? in - let reader = BufferReader(buffer) - var result: Api.messages.AffectedFoundMessages? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.AffectedFoundMessages - } - return result - }) - } - - public static func checkHistoryImport(importHead: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1140726259) - serializeString(importHead, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.checkHistoryImport", parameters: [("importHead", importHead)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.HistoryImportParsed? in - let reader = BufferReader(buffer) - var result: Api.messages.HistoryImportParsed? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.HistoryImportParsed - } - return result - }) - } - - public static func initHistoryImport(peer: Api.InputPeer, file: Api.InputFile, mediaCount: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(873008187) - peer.serialize(buffer, true) - file.serialize(buffer, true) - serializeInt32(mediaCount, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.initHistoryImport", parameters: [("peer", peer), ("file", file), ("mediaCount", mediaCount)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.HistoryImport? in - let reader = BufferReader(buffer) - var result: Api.messages.HistoryImport? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.HistoryImport - } - return result - }) - } - - public static func uploadImportedMedia(peer: Api.InputPeer, importId: Int64, fileName: String, media: Api.InputMedia) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(713433234) - peer.serialize(buffer, true) - serializeInt64(importId, buffer: buffer, boxed: false) - serializeString(fileName, buffer: buffer, boxed: false) - media.serialize(buffer, true) - return (FunctionDescription(name: "messages.uploadImportedMedia", parameters: [("peer", peer), ("importId", importId), ("fileName", fileName), ("media", media)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.MessageMedia? in - let reader = BufferReader(buffer) - var result: Api.MessageMedia? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.MessageMedia - } - return result - }) - } - - public static func startHistoryImport(peer: Api.InputPeer, importId: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1271008444) - peer.serialize(buffer, true) - serializeInt64(importId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.startHistoryImport", parameters: [("peer", peer), ("importId", importId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getExportedChatInvites(flags: Int32, peer: Api.InputPeer, adminId: Api.InputUser, offsetDate: Int32?, offsetLink: String?, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1565154314) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - adminId.serialize(buffer, true) - if Int(flags) & Int(1 << 2) != 0 {serializeInt32(offsetDate!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeString(offsetLink!, buffer: buffer, boxed: false)} - serializeInt32(limit, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getExportedChatInvites", parameters: [("flags", flags), ("peer", peer), ("adminId", adminId), ("offsetDate", offsetDate), ("offsetLink", offsetLink), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.ExportedChatInvites? in - let reader = BufferReader(buffer) - var result: Api.messages.ExportedChatInvites? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.ExportedChatInvites - } - return result - }) - } - - public static func editExportedChatInvite(flags: Int32, peer: Api.InputPeer, link: String, expireDate: Int32?, usageLimit: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(48562110) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - serializeString(link, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(expireDate!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(usageLimit!, buffer: buffer, boxed: false)} - return (FunctionDescription(name: "messages.editExportedChatInvite", parameters: [("flags", flags), ("peer", peer), ("link", link), ("expireDate", expireDate), ("usageLimit", usageLimit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.ExportedChatInvite? in - let reader = BufferReader(buffer) - var result: Api.messages.ExportedChatInvite? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.ExportedChatInvite - } - return result - }) - } - - public static func deleteRevokedExportedChatInvites(peer: Api.InputPeer, adminId: Api.InputUser) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1452833749) - peer.serialize(buffer, true) - adminId.serialize(buffer, true) - return (FunctionDescription(name: "messages.deleteRevokedExportedChatInvites", parameters: [("peer", peer), ("adminId", adminId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func deleteExportedChatInvite(peer: Api.InputPeer, link: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-731601877) - peer.serialize(buffer, true) - serializeString(link, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.deleteExportedChatInvite", parameters: [("peer", peer), ("link", link)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getAdminsWithInvites(peer: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(958457583) - peer.serialize(buffer, true) - return (FunctionDescription(name: "messages.getAdminsWithInvites", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.ChatAdminsWithInvites? in - let reader = BufferReader(buffer) - var result: Api.messages.ChatAdminsWithInvites? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.ChatAdminsWithInvites - } - return result - }) - } - - public static func getChatInviteImporters(peer: Api.InputPeer, link: String, offsetDate: Int32, offsetUser: Api.InputUser, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(654013065) - peer.serialize(buffer, true) - serializeString(link, buffer: buffer, boxed: false) - serializeInt32(offsetDate, buffer: buffer, boxed: false) - offsetUser.serialize(buffer, true) - serializeInt32(limit, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.getChatInviteImporters", parameters: [("peer", peer), ("link", link), ("offsetDate", offsetDate), ("offsetUser", offsetUser), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.ChatInviteImporters? in - let reader = BufferReader(buffer) - var result: Api.messages.ChatInviteImporters? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.ChatInviteImporters - } - return result - }) - } - - public static func setHistoryTTL(flags: Int32, peer: Api.InputPeer, period: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-859093215) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - serializeInt32(period, buffer: buffer, boxed: false) - return (FunctionDescription(name: "messages.setHistoryTTL", parameters: [("flags", flags), ("peer", peer), ("period", period)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .deepLinkInfoEmpty: + return ("deepLinkInfoEmpty", []) + case .deepLinkInfo(let flags, let message, let entities): + return ("deepLinkInfo", [("flags", flags), ("message", message), ("entities", entities)]) + } + } + + public static func parse_deepLinkInfoEmpty(_ reader: BufferReader) -> DeepLinkInfo? { + return Api.help.DeepLinkInfo.deepLinkInfoEmpty + } + public static func parse_deepLinkInfo(_ reader: BufferReader) -> DeepLinkInfo? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: [Api.MessageEntity]? + if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.help.DeepLinkInfo.deepLinkInfo(flags: _1!, message: _2!, entities: _3) } - public struct channels { - public static func readHistory(channel: Api.InputChannel, maxId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-871347913) - channel.serialize(buffer, true) - serializeInt32(maxId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "channels.readHistory", parameters: [("channel", channel), ("maxId", maxId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func deleteMessages(channel: Api.InputChannel, id: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-2067661490) - channel.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(id.count)) - for item in id { - serializeInt32(item, buffer: buffer, boxed: false) + else { + return nil + } + } + + } + public enum TermsOfService: TypeConstructorDescription { + case termsOfService(flags: Int32, id: Api.DataJSON, text: String, entities: [Api.MessageEntity], minAgeConfirm: Int32?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .termsOfService(let flags, let id, let text, let entities, let minAgeConfirm): + if boxed { + buffer.appendInt32(2013922064) } - return (FunctionDescription(name: "channels.deleteMessages", parameters: [("channel", channel), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AffectedMessages? in - let reader = BufferReader(buffer) - var result: Api.messages.AffectedMessages? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.AffectedMessages - } - return result - }) - } - - public static func deleteUserHistory(channel: Api.InputChannel, userId: Api.InputUser) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-787622117) - channel.serialize(buffer, true) - userId.serialize(buffer, true) - return (FunctionDescription(name: "channels.deleteUserHistory", parameters: [("channel", channel), ("userId", userId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AffectedHistory? in - let reader = BufferReader(buffer) - var result: Api.messages.AffectedHistory? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.AffectedHistory - } - return result - }) - } - - public static func reportSpam(channel: Api.InputChannel, userId: Api.InputUser, id: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-32999408) - channel.serialize(buffer, true) - userId.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(id.count)) - for item in id { - serializeInt32(item, buffer: buffer, boxed: false) - } - return (FunctionDescription(name: "channels.reportSpam", parameters: [("channel", channel), ("userId", userId), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getMessages(channel: Api.InputChannel, id: [Api.InputMessage]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1383294429) - channel.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(id.count)) - for item in id { - item.serialize(buffer, true) - } - return (FunctionDescription(name: "channels.getMessages", parameters: [("channel", channel), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in - let reader = BufferReader(buffer) - var result: Api.messages.Messages? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.Messages - } - return result - }) - } - - public static func getParticipants(channel: Api.InputChannel, filter: Api.ChannelParticipantsFilter, offset: Int32, limit: Int32, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(306054633) - channel.serialize(buffer, true) - filter.serialize(buffer, true) - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(limit, buffer: buffer, boxed: false) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "channels.getParticipants", parameters: [("channel", channel), ("filter", filter), ("offset", offset), ("limit", limit), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.channels.ChannelParticipants? in - let reader = BufferReader(buffer) - var result: Api.channels.ChannelParticipants? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.channels.ChannelParticipants - } - return result - }) - } - - public static func getParticipant(channel: Api.InputChannel, userId: Api.InputUser) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1416484774) - channel.serialize(buffer, true) - userId.serialize(buffer, true) - return (FunctionDescription(name: "channels.getParticipant", parameters: [("channel", channel), ("userId", userId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.channels.ChannelParticipant? in - let reader = BufferReader(buffer) - var result: Api.channels.ChannelParticipant? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.channels.ChannelParticipant - } - return result - }) - } - - public static func getChannels(id: [Api.InputChannel]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(176122811) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(id.count)) - for item in id { - item.serialize(buffer, true) - } - return (FunctionDescription(name: "channels.getChannels", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Chats? in - let reader = BufferReader(buffer) - var result: Api.messages.Chats? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.Chats - } - return result - }) - } - - public static func getFullChannel(channel: Api.InputChannel) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(141781513) - channel.serialize(buffer, true) - return (FunctionDescription(name: "channels.getFullChannel", parameters: [("channel", channel)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.ChatFull? in - let reader = BufferReader(buffer) - var result: Api.messages.ChatFull? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.ChatFull - } - return result - }) - } - - public static func createChannel(flags: Int32, title: String, about: String, geoPoint: Api.InputGeoPoint?, address: String?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1029681423) serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(title, buffer: buffer, boxed: false) - serializeString(about, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {geoPoint!.serialize(buffer, true)} - if Int(flags) & Int(1 << 2) != 0 {serializeString(address!, buffer: buffer, boxed: false)} - return (FunctionDescription(name: "channels.createChannel", parameters: [("flags", flags), ("title", title), ("about", about), ("geoPoint", geoPoint), ("address", address)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func editAdmin(channel: Api.InputChannel, userId: Api.InputUser, adminRights: Api.ChatAdminRights, rank: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-751007486) - channel.serialize(buffer, true) - userId.serialize(buffer, true) - adminRights.serialize(buffer, true) - serializeString(rank, buffer: buffer, boxed: false) - return (FunctionDescription(name: "channels.editAdmin", parameters: [("channel", channel), ("userId", userId), ("adminRights", adminRights), ("rank", rank)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func editTitle(channel: Api.InputChannel, title: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1450044624) - channel.serialize(buffer, true) - serializeString(title, buffer: buffer, boxed: false) - return (FunctionDescription(name: "channels.editTitle", parameters: [("channel", channel), ("title", title)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func editPhoto(channel: Api.InputChannel, photo: Api.InputChatPhoto) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-248621111) - channel.serialize(buffer, true) - photo.serialize(buffer, true) - return (FunctionDescription(name: "channels.editPhoto", parameters: [("channel", channel), ("photo", photo)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func checkUsername(channel: Api.InputChannel, username: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(283557164) - channel.serialize(buffer, true) - serializeString(username, buffer: buffer, boxed: false) - return (FunctionDescription(name: "channels.checkUsername", parameters: [("channel", channel), ("username", username)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func updateUsername(channel: Api.InputChannel, username: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(890549214) - channel.serialize(buffer, true) - serializeString(username, buffer: buffer, boxed: false) - return (FunctionDescription(name: "channels.updateUsername", parameters: [("channel", channel), ("username", username)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func joinChannel(channel: Api.InputChannel) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(615851205) - channel.serialize(buffer, true) - return (FunctionDescription(name: "channels.joinChannel", parameters: [("channel", channel)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func leaveChannel(channel: Api.InputChannel) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-130635115) - channel.serialize(buffer, true) - return (FunctionDescription(name: "channels.leaveChannel", parameters: [("channel", channel)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func inviteToChannel(channel: Api.InputChannel, users: [Api.InputUser]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(429865580) - channel.serialize(buffer, true) + id.serialize(buffer, true) + serializeString(text, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities.count)) + for item in entities { + item.serialize(buffer, true) + } + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(minAgeConfirm!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .termsOfService(let flags, let id, let text, let entities, let minAgeConfirm): + return ("termsOfService", [("flags", flags), ("id", id), ("text", text), ("entities", entities), ("minAgeConfirm", minAgeConfirm)]) + } + } + + public static func parse_termsOfService(_ reader: BufferReader) -> TermsOfService? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.DataJSON? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.DataJSON + } + var _3: String? + _3 = parseString(reader) + var _4: [Api.MessageEntity]? + if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) + } + var _5: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_5 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.help.TermsOfService.termsOfService(flags: _1!, id: _2!, text: _3!, entities: _4!, minAgeConfirm: _5) + } + else { + return nil + } + } + + } + public enum Country: TypeConstructorDescription { + case country(flags: Int32, iso2: String, defaultName: String, name: String?, countryCodes: [Api.help.CountryCode]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .country(let flags, let iso2, let defaultName, let name, let countryCodes): + if boxed { + buffer.appendInt32(-1014526429) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(iso2, buffer: buffer, boxed: false) + serializeString(defaultName, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeString(name!, buffer: buffer, boxed: false)} + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(countryCodes.count)) + for item in countryCodes { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .country(let flags, let iso2, let defaultName, let name, let countryCodes): + return ("country", [("flags", flags), ("iso2", iso2), ("defaultName", defaultName), ("name", name), ("countryCodes", countryCodes)]) + } + } + + public static func parse_country(_ reader: BufferReader) -> Country? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: String? + _3 = parseString(reader) + var _4: String? + if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } + var _5: [Api.help.CountryCode]? + if let _ = reader.readInt32() { + _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.help.CountryCode.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.help.Country.country(flags: _1!, iso2: _2!, defaultName: _3!, name: _4, countryCodes: _5!) + } + else { + return nil + } + } + + } + public enum PromoData: TypeConstructorDescription { + case promoDataEmpty(expires: Int32) + case promoData(flags: Int32, expires: Int32, peer: Api.Peer, chats: [Api.Chat], users: [Api.User], psaType: String?, psaMessage: String?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .promoDataEmpty(let expires): + if boxed { + buffer.appendInt32(-1728664459) + } + serializeInt32(expires, buffer: buffer, boxed: false) + break + case .promoData(let flags, let expires, let peer, let chats, let users, let psaType, let psaMessage): + if boxed { + buffer.appendInt32(-1942390465) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(expires, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(chats.count)) + for item in chats { + item.serialize(buffer, true) + } buffer.appendInt32(481674261) buffer.appendInt32(Int32(users.count)) for item in users { item.serialize(buffer, true) } - return (FunctionDescription(name: "channels.inviteToChannel", parameters: [("channel", channel), ("users", users)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func deleteChannel(channel: Api.InputChannel) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1072619549) - channel.serialize(buffer, true) - return (FunctionDescription(name: "channels.deleteChannel", parameters: [("channel", channel)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func exportMessageLink(flags: Int32, channel: Api.InputChannel, id: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-432034325) - serializeInt32(flags, buffer: buffer, boxed: false) - channel.serialize(buffer, true) - serializeInt32(id, buffer: buffer, boxed: false) - return (FunctionDescription(name: "channels.exportMessageLink", parameters: [("flags", flags), ("channel", channel), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.ExportedMessageLink? in - let reader = BufferReader(buffer) - var result: Api.ExportedMessageLink? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.ExportedMessageLink - } - return result - }) - } - - public static func toggleSignatures(channel: Api.InputChannel, enabled: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(527021574) - channel.serialize(buffer, true) - enabled.serialize(buffer, true) - return (FunctionDescription(name: "channels.toggleSignatures", parameters: [("channel", channel), ("enabled", enabled)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func getAdminedPublicChannels(flags: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-122669393) - serializeInt32(flags, buffer: buffer, boxed: false) - return (FunctionDescription(name: "channels.getAdminedPublicChannels", parameters: [("flags", flags)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Chats? in - let reader = BufferReader(buffer) - var result: Api.messages.Chats? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.Chats - } - return result - }) - } - - public static func editBanned(channel: Api.InputChannel, userId: Api.InputUser, bannedRights: Api.ChatBannedRights) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1920559378) - channel.serialize(buffer, true) - userId.serialize(buffer, true) - bannedRights.serialize(buffer, true) - return (FunctionDescription(name: "channels.editBanned", parameters: [("channel", channel), ("userId", userId), ("bannedRights", bannedRights)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func getAdminLog(flags: Int32, channel: Api.InputChannel, q: String, eventsFilter: Api.ChannelAdminLogEventsFilter?, admins: [Api.InputUser]?, maxId: Int64, minId: Int64, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(870184064) - serializeInt32(flags, buffer: buffer, boxed: false) - channel.serialize(buffer, true) - serializeString(q, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {eventsFilter!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) - buffer.appendInt32(Int32(admins!.count)) - for item in admins! { - item.serialize(buffer, true) - }} - serializeInt64(maxId, buffer: buffer, boxed: false) - serializeInt64(minId, buffer: buffer, boxed: false) - serializeInt32(limit, buffer: buffer, boxed: false) - return (FunctionDescription(name: "channels.getAdminLog", parameters: [("flags", flags), ("channel", channel), ("q", q), ("eventsFilter", eventsFilter), ("admins", admins), ("maxId", maxId), ("minId", minId), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.channels.AdminLogResults? in - let reader = BufferReader(buffer) - var result: Api.channels.AdminLogResults? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.channels.AdminLogResults - } - return result - }) - } - - public static func setStickers(channel: Api.InputChannel, stickerset: Api.InputStickerSet) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-359881479) - channel.serialize(buffer, true) - stickerset.serialize(buffer, true) - return (FunctionDescription(name: "channels.setStickers", parameters: [("channel", channel), ("stickerset", stickerset)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func readMessageContents(channel: Api.InputChannel, id: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-357180360) - channel.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(id.count)) - for item in id { - serializeInt32(item, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeString(psaType!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeString(psaMessage!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .promoDataEmpty(let expires): + return ("promoDataEmpty", [("expires", expires)]) + case .promoData(let flags, let expires, let peer, let chats, let users, let psaType, let psaMessage): + return ("promoData", [("flags", flags), ("expires", expires), ("peer", peer), ("chats", chats), ("users", users), ("psaType", psaType), ("psaMessage", psaMessage)]) + } + } + + public static func parse_promoDataEmpty(_ reader: BufferReader) -> PromoData? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.help.PromoData.promoDataEmpty(expires: _1!) + } + else { + return nil + } + } + public static func parse_promoData(_ reader: BufferReader) -> PromoData? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Api.Peer? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.Peer + } + var _4: [Api.Chat]? + if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) + } + var _5: [Api.User]? + if let _ = reader.readInt32() { + _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + var _6: String? + if Int(_1!) & Int(1 << 1) != 0 {_6 = parseString(reader) } + var _7: String? + if Int(_1!) & Int(1 << 2) != 0 {_7 = parseString(reader) } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c7 = (Int(_1!) & Int(1 << 2) == 0) || _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.help.PromoData.promoData(flags: _1!, expires: _2!, peer: _3!, chats: _4!, users: _5!, psaType: _6, psaMessage: _7) + } + else { + return nil + } + } + + } + public enum RecentMeUrls: TypeConstructorDescription { + case recentMeUrls(urls: [Api.RecentMeUrl], chats: [Api.Chat], users: [Api.User]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .recentMeUrls(let urls, let chats, let users): + if boxed { + buffer.appendInt32(235081943) } - return (FunctionDescription(name: "channels.readMessageContents", parameters: [("channel", channel), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func deleteHistory(channel: Api.InputChannel, maxId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1355375294) - channel.serialize(buffer, true) - serializeInt32(maxId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "channels.deleteHistory", parameters: [("channel", channel), ("maxId", maxId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func togglePreHistoryHidden(channel: Api.InputChannel, enabled: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-356796084) - channel.serialize(buffer, true) - enabled.serialize(buffer, true) - return (FunctionDescription(name: "channels.togglePreHistoryHidden", parameters: [("channel", channel), ("enabled", enabled)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func getLeftChannels(offset: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-2092831552) - serializeInt32(offset, buffer: buffer, boxed: false) - return (FunctionDescription(name: "channels.getLeftChannels", parameters: [("offset", offset)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Chats? in - let reader = BufferReader(buffer) - var result: Api.messages.Chats? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.Chats - } - return result - }) - } - - public static func getGroupsForDiscussion() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-170208392) - - return (FunctionDescription(name: "channels.getGroupsForDiscussion", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Chats? in - let reader = BufferReader(buffer) - var result: Api.messages.Chats? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.Chats - } - return result - }) - } - - public static func setDiscussionGroup(broadcast: Api.InputChannel, group: Api.InputChannel) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1079520178) - broadcast.serialize(buffer, true) - group.serialize(buffer, true) - return (FunctionDescription(name: "channels.setDiscussionGroup", parameters: [("broadcast", broadcast), ("group", group)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func editCreator(channel: Api.InputChannel, userId: Api.InputUser, password: Api.InputCheckPasswordSRP) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1892102881) - channel.serialize(buffer, true) - userId.serialize(buffer, true) - password.serialize(buffer, true) - return (FunctionDescription(name: "channels.editCreator", parameters: [("channel", channel), ("userId", userId), ("password", password)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func editLocation(channel: Api.InputChannel, geoPoint: Api.InputGeoPoint, address: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1491484525) - channel.serialize(buffer, true) - geoPoint.serialize(buffer, true) - serializeString(address, buffer: buffer, boxed: false) - return (FunctionDescription(name: "channels.editLocation", parameters: [("channel", channel), ("geoPoint", geoPoint), ("address", address)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func toggleSlowMode(channel: Api.InputChannel, seconds: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-304832784) - channel.serialize(buffer, true) - serializeInt32(seconds, buffer: buffer, boxed: false) - return (FunctionDescription(name: "channels.toggleSlowMode", parameters: [("channel", channel), ("seconds", seconds)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func getInactiveChannels() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(300429806) - - return (FunctionDescription(name: "channels.getInactiveChannels", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.InactiveChats? in - let reader = BufferReader(buffer) - var result: Api.messages.InactiveChats? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.InactiveChats - } - return result - }) - } - - public static func convertToGigagroup(channel: Api.InputChannel) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(187239529) - channel.serialize(buffer, true) - return (FunctionDescription(name: "channels.convertToGigagroup", parameters: [("channel", channel)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - } - public struct payments { - public static func getPaymentForm(msgId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1712285883) - serializeInt32(msgId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "payments.getPaymentForm", parameters: [("msgId", msgId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.payments.PaymentForm? in - let reader = BufferReader(buffer) - var result: Api.payments.PaymentForm? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.payments.PaymentForm - } - return result - }) - } - - public static func getPaymentReceipt(msgId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1601001088) - serializeInt32(msgId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "payments.getPaymentReceipt", parameters: [("msgId", msgId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.payments.PaymentReceipt? in - let reader = BufferReader(buffer) - var result: Api.payments.PaymentReceipt? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.payments.PaymentReceipt - } - return result - }) - } - - public static func validateRequestedInfo(flags: Int32, msgId: Int32, info: Api.PaymentRequestedInfo) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1997180532) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(msgId, buffer: buffer, boxed: false) - info.serialize(buffer, true) - return (FunctionDescription(name: "payments.validateRequestedInfo", parameters: [("flags", flags), ("msgId", msgId), ("info", info)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.payments.ValidatedRequestedInfo? in - let reader = BufferReader(buffer) - var result: Api.payments.ValidatedRequestedInfo? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.payments.ValidatedRequestedInfo - } - return result - }) - } - - public static func sendPaymentForm(flags: Int32, msgId: Int32, requestedInfoId: String?, shippingOptionId: String?, credentials: Api.InputPaymentCredentials) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(730364339) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(msgId, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeString(requestedInfoId!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeString(shippingOptionId!, buffer: buffer, boxed: false)} - credentials.serialize(buffer, true) - return (FunctionDescription(name: "payments.sendPaymentForm", parameters: [("flags", flags), ("msgId", msgId), ("requestedInfoId", requestedInfoId), ("shippingOptionId", shippingOptionId), ("credentials", credentials)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.payments.PaymentResult? in - let reader = BufferReader(buffer) - var result: Api.payments.PaymentResult? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.payments.PaymentResult - } - return result - }) - } - - public static func getSavedInfo() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(578650699) - - return (FunctionDescription(name: "payments.getSavedInfo", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.payments.SavedInfo? in - let reader = BufferReader(buffer) - var result: Api.payments.SavedInfo? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.payments.SavedInfo - } - return result - }) - } - - public static func clearSavedInfo(flags: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-667062079) - serializeInt32(flags, buffer: buffer, boxed: false) - return (FunctionDescription(name: "payments.clearSavedInfo", parameters: [("flags", flags)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getBankCardData(number: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(779736953) - serializeString(number, buffer: buffer, boxed: false) - return (FunctionDescription(name: "payments.getBankCardData", parameters: [("number", number)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.payments.BankCardData? in - let reader = BufferReader(buffer) - var result: Api.payments.BankCardData? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.payments.BankCardData - } - return result - }) - } - } - public struct stats { - public static func getBroadcastStats(flags: Int32, channel: Api.InputChannel) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1421720550) - serializeInt32(flags, buffer: buffer, boxed: false) - channel.serialize(buffer, true) - return (FunctionDescription(name: "stats.getBroadcastStats", parameters: [("flags", flags), ("channel", channel)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.stats.BroadcastStats? in - let reader = BufferReader(buffer) - var result: Api.stats.BroadcastStats? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.stats.BroadcastStats - } - return result - }) - } - - public static func loadAsyncGraph(flags: Int32, token: String, x: Int64?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1646092192) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(token, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt64(x!, buffer: buffer, boxed: false)} - return (FunctionDescription(name: "stats.loadAsyncGraph", parameters: [("flags", flags), ("token", token), ("x", x)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.StatsGraph? in - let reader = BufferReader(buffer) - var result: Api.StatsGraph? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.StatsGraph - } - return result - }) - } - - public static func getMegagroupStats(flags: Int32, channel: Api.InputChannel) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-589330937) - serializeInt32(flags, buffer: buffer, boxed: false) - channel.serialize(buffer, true) - return (FunctionDescription(name: "stats.getMegagroupStats", parameters: [("flags", flags), ("channel", channel)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.stats.MegagroupStats? in - let reader = BufferReader(buffer) - var result: Api.stats.MegagroupStats? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.stats.MegagroupStats - } - return result - }) - } - - public static func getMessagePublicForwards(channel: Api.InputChannel, msgId: Int32, offsetRate: Int32, offsetPeer: Api.InputPeer, offsetId: Int32, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1445996571) - channel.serialize(buffer, true) - serializeInt32(msgId, buffer: buffer, boxed: false) - serializeInt32(offsetRate, buffer: buffer, boxed: false) - offsetPeer.serialize(buffer, true) - serializeInt32(offsetId, buffer: buffer, boxed: false) - serializeInt32(limit, buffer: buffer, boxed: false) - return (FunctionDescription(name: "stats.getMessagePublicForwards", parameters: [("channel", channel), ("msgId", msgId), ("offsetRate", offsetRate), ("offsetPeer", offsetPeer), ("offsetId", offsetId), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in - let reader = BufferReader(buffer) - var result: Api.messages.Messages? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.Messages - } - return result - }) - } - - public static func getMessageStats(flags: Int32, channel: Api.InputChannel, msgId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1226791947) - serializeInt32(flags, buffer: buffer, boxed: false) - channel.serialize(buffer, true) - serializeInt32(msgId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "stats.getMessageStats", parameters: [("flags", flags), ("channel", channel), ("msgId", msgId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.stats.MessageStats? in - let reader = BufferReader(buffer) - var result: Api.stats.MessageStats? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.stats.MessageStats - } - return result - }) - } - } - public struct auth { - public static func sendCode(phoneNumber: String, apiId: Int32, apiHash: String, settings: Api.CodeSettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1502141361) - serializeString(phoneNumber, buffer: buffer, boxed: false) - serializeInt32(apiId, buffer: buffer, boxed: false) - serializeString(apiHash, buffer: buffer, boxed: false) - settings.serialize(buffer, true) - return (FunctionDescription(name: "auth.sendCode", parameters: [("phoneNumber", phoneNumber), ("apiId", apiId), ("apiHash", apiHash), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.SentCode? in - let reader = BufferReader(buffer) - var result: Api.auth.SentCode? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.auth.SentCode - } - return result - }) - } - - public static func signUp(phoneNumber: String, phoneCodeHash: String, firstName: String, lastName: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-2131827673) - serializeString(phoneNumber, buffer: buffer, boxed: false) - serializeString(phoneCodeHash, buffer: buffer, boxed: false) - serializeString(firstName, buffer: buffer, boxed: false) - serializeString(lastName, buffer: buffer, boxed: false) - return (FunctionDescription(name: "auth.signUp", parameters: [("phoneNumber", phoneNumber), ("phoneCodeHash", phoneCodeHash), ("firstName", firstName), ("lastName", lastName)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.Authorization? in - let reader = BufferReader(buffer) - var result: Api.auth.Authorization? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.auth.Authorization - } - return result - }) - } - - public static func signIn(phoneNumber: String, phoneCodeHash: String, phoneCode: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1126886015) - serializeString(phoneNumber, buffer: buffer, boxed: false) - serializeString(phoneCodeHash, buffer: buffer, boxed: false) - serializeString(phoneCode, buffer: buffer, boxed: false) - return (FunctionDescription(name: "auth.signIn", parameters: [("phoneNumber", phoneNumber), ("phoneCodeHash", phoneCodeHash), ("phoneCode", phoneCode)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.Authorization? in - let reader = BufferReader(buffer) - var result: Api.auth.Authorization? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.auth.Authorization - } - return result - }) - } - - public static func logOut() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1461180992) - - return (FunctionDescription(name: "auth.logOut", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func resetAuthorizations() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1616179942) - - return (FunctionDescription(name: "auth.resetAuthorizations", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func exportAuthorization(dcId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-440401971) - serializeInt32(dcId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "auth.exportAuthorization", parameters: [("dcId", dcId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.ExportedAuthorization? in - let reader = BufferReader(buffer) - var result: Api.auth.ExportedAuthorization? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.auth.ExportedAuthorization - } - return result - }) - } - - public static func importAuthorization(id: Int32, bytes: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-470837741) - serializeInt32(id, buffer: buffer, boxed: false) - serializeBytes(bytes, buffer: buffer, boxed: false) - return (FunctionDescription(name: "auth.importAuthorization", parameters: [("id", id), ("bytes", bytes)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.Authorization? in - let reader = BufferReader(buffer) - var result: Api.auth.Authorization? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.auth.Authorization - } - return result - }) - } - - public static func bindTempAuthKey(permAuthKeyId: Int64, nonce: Int64, expiresAt: Int32, encryptedMessage: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-841733627) - serializeInt64(permAuthKeyId, buffer: buffer, boxed: false) - serializeInt64(nonce, buffer: buffer, boxed: false) - serializeInt32(expiresAt, buffer: buffer, boxed: false) - serializeBytes(encryptedMessage, buffer: buffer, boxed: false) - return (FunctionDescription(name: "auth.bindTempAuthKey", parameters: [("permAuthKeyId", permAuthKeyId), ("nonce", nonce), ("expiresAt", expiresAt), ("encryptedMessage", encryptedMessage)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func importBotAuthorization(flags: Int32, apiId: Int32, apiHash: String, botAuthToken: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1738800940) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(apiId, buffer: buffer, boxed: false) - serializeString(apiHash, buffer: buffer, boxed: false) - serializeString(botAuthToken, buffer: buffer, boxed: false) - return (FunctionDescription(name: "auth.importBotAuthorization", parameters: [("flags", flags), ("apiId", apiId), ("apiHash", apiHash), ("botAuthToken", botAuthToken)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.Authorization? in - let reader = BufferReader(buffer) - var result: Api.auth.Authorization? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.auth.Authorization - } - return result - }) - } - - public static func checkPassword(password: Api.InputCheckPasswordSRP) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-779399914) - password.serialize(buffer, true) - return (FunctionDescription(name: "auth.checkPassword", parameters: [("password", password)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.Authorization? in - let reader = BufferReader(buffer) - var result: Api.auth.Authorization? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.auth.Authorization - } - return result - }) - } - - public static func requestPasswordRecovery() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-661144474) - - return (FunctionDescription(name: "auth.requestPasswordRecovery", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.PasswordRecovery? in - let reader = BufferReader(buffer) - var result: Api.auth.PasswordRecovery? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.auth.PasswordRecovery - } - return result - }) - } - - public static func recoverPassword(code: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1319464594) - serializeString(code, buffer: buffer, boxed: false) - return (FunctionDescription(name: "auth.recoverPassword", parameters: [("code", code)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.Authorization? in - let reader = BufferReader(buffer) - var result: Api.auth.Authorization? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.auth.Authorization - } - return result - }) - } - - public static func resendCode(phoneNumber: String, phoneCodeHash: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1056025023) - serializeString(phoneNumber, buffer: buffer, boxed: false) - serializeString(phoneCodeHash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "auth.resendCode", parameters: [("phoneNumber", phoneNumber), ("phoneCodeHash", phoneCodeHash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.SentCode? in - let reader = BufferReader(buffer) - var result: Api.auth.SentCode? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.auth.SentCode - } - return result - }) - } - - public static func cancelCode(phoneNumber: String, phoneCodeHash: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(520357240) - serializeString(phoneNumber, buffer: buffer, boxed: false) - serializeString(phoneCodeHash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "auth.cancelCode", parameters: [("phoneNumber", phoneNumber), ("phoneCodeHash", phoneCodeHash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func dropTempAuthKeys(exceptAuthKeys: [Int64]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1907842680) buffer.appendInt32(481674261) - buffer.appendInt32(Int32(exceptAuthKeys.count)) - for item in exceptAuthKeys { - serializeInt64(item, buffer: buffer, boxed: false) - } - return (FunctionDescription(name: "auth.dropTempAuthKeys", parameters: [("exceptAuthKeys", exceptAuthKeys)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func exportLoginToken(apiId: Int32, apiHash: String, exceptIds: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1313598185) - serializeInt32(apiId, buffer: buffer, boxed: false) - serializeString(apiHash, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(exceptIds.count)) - for item in exceptIds { - serializeInt32(item, buffer: buffer, boxed: false) - } - return (FunctionDescription(name: "auth.exportLoginToken", parameters: [("apiId", apiId), ("apiHash", apiHash), ("exceptIds", exceptIds)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.LoginToken? in - let reader = BufferReader(buffer) - var result: Api.auth.LoginToken? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.auth.LoginToken - } - return result - }) - } - - public static func importLoginToken(token: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1783866140) - serializeBytes(token, buffer: buffer, boxed: false) - return (FunctionDescription(name: "auth.importLoginToken", parameters: [("token", token)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.LoginToken? in - let reader = BufferReader(buffer) - var result: Api.auth.LoginToken? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.auth.LoginToken - } - return result - }) - } - - public static func acceptLoginToken(token: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-392909491) - serializeBytes(token, buffer: buffer, boxed: false) - return (FunctionDescription(name: "auth.acceptLoginToken", parameters: [("token", token)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Authorization? in - let reader = BufferReader(buffer) - var result: Api.Authorization? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Authorization - } - return result - }) - } - } - public struct bots { - public static func sendCustomRequest(customMethod: String, params: Api.DataJSON) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1440257555) - serializeString(customMethod, buffer: buffer, boxed: false) - params.serialize(buffer, true) - return (FunctionDescription(name: "bots.sendCustomRequest", parameters: [("customMethod", customMethod), ("params", params)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.DataJSON? in - let reader = BufferReader(buffer) - var result: Api.DataJSON? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.DataJSON - } - return result - }) - } - - public static func answerWebhookJSONQuery(queryId: Int64, data: Api.DataJSON) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-434028723) - serializeInt64(queryId, buffer: buffer, boxed: false) - data.serialize(buffer, true) - return (FunctionDescription(name: "bots.answerWebhookJSONQuery", parameters: [("queryId", queryId), ("data", data)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func setBotCommands(commands: [Api.BotCommand]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-2141370634) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(commands.count)) - for item in commands { + buffer.appendInt32(Int32(urls.count)) + for item in urls { item.serialize(buffer, true) } - return (FunctionDescription(name: "bots.setBotCommands", parameters: [("commands", commands)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(chats.count)) + for item in chats { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .recentMeUrls(let urls, let chats, let users): + return ("recentMeUrls", [("urls", urls), ("chats", chats), ("users", users)]) + } + } + + public static func parse_recentMeUrls(_ reader: BufferReader) -> RecentMeUrls? { + var _1: [Api.RecentMeUrl]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.RecentMeUrl.self) } - public struct users { - public static func getUsers(id: [Api.InputUser]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.User]>) { - let buffer = Buffer() - buffer.appendInt32(227648840) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(id.count)) - for item in id { - item.serialize(buffer, true) - } - return (FunctionDescription(name: "users.getUsers", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.User]? in - let reader = BufferReader(buffer) - var result: [Api.User]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) - } - return result - }) - } - - public static func getFullUser(id: Api.InputUser) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-902781519) - id.serialize(buffer, true) - return (FunctionDescription(name: "users.getFullUser", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.UserFull? in - let reader = BufferReader(buffer) - var result: Api.UserFull? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.UserFull - } - return result - }) - } - - public static func setSecureValueErrors(id: Api.InputUser, errors: [Api.SecureValueError]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1865902923) - id.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(errors.count)) - for item in errors { - item.serialize(buffer, true) - } - return (FunctionDescription(name: "users.setSecureValueErrors", parameters: [("id", id), ("errors", errors)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } + var _2: [Api.Chat]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) } - public struct contacts { - public static func getContactIDs(hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Int32]>) { - let buffer = Buffer() - buffer.appendInt32(749357634) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "contacts.getContactIDs", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Int32]? in - let reader = BufferReader(buffer) - var result: [Int32]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) - } - return result - }) - } - - public static func getStatuses() -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.ContactStatus]>) { - let buffer = Buffer() - buffer.appendInt32(-995929106) - - return (FunctionDescription(name: "contacts.getStatuses", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.ContactStatus]? in - let reader = BufferReader(buffer) - var result: [Api.ContactStatus]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: 0, elementType: Api.ContactStatus.self) - } - return result - }) - } - - public static func getContacts(hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1071414113) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "contacts.getContacts", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.contacts.Contacts? in - let reader = BufferReader(buffer) - var result: Api.contacts.Contacts? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.contacts.Contacts - } - return result - }) - } - - public static func importContacts(contacts: [Api.InputContact]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(746589157) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(contacts.count)) - for item in contacts { - item.serialize(buffer, true) + var _3: [Api.User]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.help.RecentMeUrls.recentMeUrls(urls: _1!, chats: _2!, users: _3!) + } + else { + return nil + } + } + + } + public enum CountryCode: TypeConstructorDescription { + case countryCode(flags: Int32, countryCode: String, prefixes: [String]?, patterns: [String]?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .countryCode(let flags, let countryCode, let prefixes, let patterns): + if boxed { + buffer.appendInt32(1107543535) } - return (FunctionDescription(name: "contacts.importContacts", parameters: [("contacts", contacts)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.contacts.ImportedContacts? in - let reader = BufferReader(buffer) - var result: Api.contacts.ImportedContacts? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.contacts.ImportedContacts - } - return result - }) - } - - public static func deleteContacts(id: [Api.InputUser]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(157945344) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(id.count)) - for item in id { - item.serialize(buffer, true) - } - return (FunctionDescription(name: "contacts.deleteContacts", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func deleteByPhones(phones: [String]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(269745566) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(phones.count)) - for item in phones { + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(countryCode, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(prefixes!.count)) + for item in prefixes! { serializeString(item, buffer: buffer, boxed: false) - } - return (FunctionDescription(name: "contacts.deleteByPhones", parameters: [("phones", phones)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func block(id: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1758204945) - id.serialize(buffer, true) - return (FunctionDescription(name: "contacts.block", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func unblock(id: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1096393392) - id.serialize(buffer, true) - return (FunctionDescription(name: "contacts.unblock", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getBlocked(offset: Int32, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-176409329) - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(limit, buffer: buffer, boxed: false) - return (FunctionDescription(name: "contacts.getBlocked", parameters: [("offset", offset), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.contacts.Blocked? in - let reader = BufferReader(buffer) - var result: Api.contacts.Blocked? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.contacts.Blocked - } - return result - }) - } - - public static func search(q: String, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(301470424) - serializeString(q, buffer: buffer, boxed: false) - serializeInt32(limit, buffer: buffer, boxed: false) - return (FunctionDescription(name: "contacts.search", parameters: [("q", q), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.contacts.Found? in - let reader = BufferReader(buffer) - var result: Api.contacts.Found? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.contacts.Found - } - return result - }) - } - - public static func resolveUsername(username: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-113456221) - serializeString(username, buffer: buffer, boxed: false) - return (FunctionDescription(name: "contacts.resolveUsername", parameters: [("username", username)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.contacts.ResolvedPeer? in - let reader = BufferReader(buffer) - var result: Api.contacts.ResolvedPeer? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.contacts.ResolvedPeer - } - return result - }) - } - - public static func getTopPeers(flags: Int32, offset: Int32, limit: Int32, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-728224331) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(limit, buffer: buffer, boxed: false) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "contacts.getTopPeers", parameters: [("flags", flags), ("offset", offset), ("limit", limit), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.contacts.TopPeers? in - let reader = BufferReader(buffer) - var result: Api.contacts.TopPeers? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.contacts.TopPeers - } - return result - }) - } - - public static func resetTopPeerRating(category: Api.TopPeerCategory, peer: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(451113900) - category.serialize(buffer, true) - peer.serialize(buffer, true) - return (FunctionDescription(name: "contacts.resetTopPeerRating", parameters: [("category", category), ("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func resetSaved() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-2020263951) - - return (FunctionDescription(name: "contacts.resetSaved", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getSaved() -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.SavedContact]>) { - let buffer = Buffer() - buffer.appendInt32(-2098076769) - - return (FunctionDescription(name: "contacts.getSaved", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.SavedContact]? in - let reader = BufferReader(buffer) - var result: [Api.SavedContact]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: 0, elementType: Api.SavedContact.self) - } - return result - }) - } - - public static func toggleTopPeers(enabled: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-2062238246) - enabled.serialize(buffer, true) - return (FunctionDescription(name: "contacts.toggleTopPeers", parameters: [("enabled", enabled)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func addContact(flags: Int32, id: Api.InputUser, firstName: String, lastName: String, phone: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-386636848) - serializeInt32(flags, buffer: buffer, boxed: false) - id.serialize(buffer, true) - serializeString(firstName, buffer: buffer, boxed: false) - serializeString(lastName, buffer: buffer, boxed: false) - serializeString(phone, buffer: buffer, boxed: false) - return (FunctionDescription(name: "contacts.addContact", parameters: [("flags", flags), ("id", id), ("firstName", firstName), ("lastName", lastName), ("phone", phone)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func acceptContact(id: Api.InputUser) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-130964977) - id.serialize(buffer, true) - return (FunctionDescription(name: "contacts.acceptContact", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func getLocated(flags: Int32, geoPoint: Api.InputGeoPoint, selfExpires: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-750207932) - serializeInt32(flags, buffer: buffer, boxed: false) - geoPoint.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(selfExpires!, buffer: buffer, boxed: false)} - return (FunctionDescription(name: "contacts.getLocated", parameters: [("flags", flags), ("geoPoint", geoPoint), ("selfExpires", selfExpires)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func blockFromReplies(flags: Int32, msgId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(698914348) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(msgId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "contacts.blockFromReplies", parameters: [("flags", flags), ("msgId", msgId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } + }} + if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(patterns!.count)) + for item in patterns! { + serializeString(item, buffer: buffer, boxed: false) + }} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .countryCode(let flags, let countryCode, let prefixes, let patterns): + return ("countryCode", [("flags", flags), ("countryCode", countryCode), ("prefixes", prefixes), ("patterns", patterns)]) + } + } + + public static func parse_countryCode(_ reader: BufferReader) -> CountryCode? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: [String]? + if Int(_1!) & Int(1 << 0) != 0 {if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self) + } } + var _4: [String]? + if Int(_1!) & Int(1 << 1) != 0 {if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self) + } } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.help.CountryCode.countryCode(flags: _1!, countryCode: _2!, prefixes: _3, patterns: _4) } - public struct help { - public static func test() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1058929929) - - return (FunctionDescription(name: "help.test", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getConfig() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-990308245) - - return (FunctionDescription(name: "help.getConfig", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Config? in - let reader = BufferReader(buffer) - var result: Api.Config? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Config - } - return result - }) - } - - public static func getNearestDc() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(531836966) - - return (FunctionDescription(name: "help.getNearestDc", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.NearestDc? in - let reader = BufferReader(buffer) - var result: Api.NearestDc? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.NearestDc - } - return result - }) - } - - public static func getAppUpdate(source: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1378703997) - serializeString(source, buffer: buffer, boxed: false) - return (FunctionDescription(name: "help.getAppUpdate", parameters: [("source", source)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.AppUpdate? in - let reader = BufferReader(buffer) - var result: Api.help.AppUpdate? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.help.AppUpdate - } - return result - }) - } - - public static func getInviteText() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1295590211) - - return (FunctionDescription(name: "help.getInviteText", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.InviteText? in - let reader = BufferReader(buffer) - var result: Api.help.InviteText? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.help.InviteText - } - return result - }) - } - - public static func getSupport() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1663104819) - - return (FunctionDescription(name: "help.getSupport", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.Support? in - let reader = BufferReader(buffer) - var result: Api.help.Support? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.help.Support - } - return result - }) - } - - public static func getAppChangelog(prevAppVersion: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1877938321) - serializeString(prevAppVersion, buffer: buffer, boxed: false) - return (FunctionDescription(name: "help.getAppChangelog", parameters: [("prevAppVersion", prevAppVersion)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func setBotUpdatesStatus(pendingUpdatesCount: Int32, message: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-333262899) - serializeInt32(pendingUpdatesCount, buffer: buffer, boxed: false) - serializeString(message, buffer: buffer, boxed: false) - return (FunctionDescription(name: "help.setBotUpdatesStatus", parameters: [("pendingUpdatesCount", pendingUpdatesCount), ("message", message)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getCdnConfig() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1375900482) - - return (FunctionDescription(name: "help.getCdnConfig", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.CdnConfig? in - let reader = BufferReader(buffer) - var result: Api.CdnConfig? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.CdnConfig - } - return result - }) - } - - public static func getRecentMeUrls(referer: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1036054804) - serializeString(referer, buffer: buffer, boxed: false) - return (FunctionDescription(name: "help.getRecentMeUrls", parameters: [("referer", referer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.RecentMeUrls? in - let reader = BufferReader(buffer) - var result: Api.help.RecentMeUrls? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.help.RecentMeUrls - } - return result - }) - } - - public static func getTermsOfServiceUpdate() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(749019089) - - return (FunctionDescription(name: "help.getTermsOfServiceUpdate", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.TermsOfServiceUpdate? in - let reader = BufferReader(buffer) - var result: Api.help.TermsOfServiceUpdate? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.help.TermsOfServiceUpdate - } - return result - }) - } - - public static func acceptTermsOfService(id: Api.DataJSON) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-294455398) - id.serialize(buffer, true) - return (FunctionDescription(name: "help.acceptTermsOfService", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getDeepLinkInfo(path: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1072547679) - serializeString(path, buffer: buffer, boxed: false) - return (FunctionDescription(name: "help.getDeepLinkInfo", parameters: [("path", path)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.DeepLinkInfo? in - let reader = BufferReader(buffer) - var result: Api.help.DeepLinkInfo? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.help.DeepLinkInfo - } - return result - }) - } - - public static func getAppConfig() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1735311088) - - return (FunctionDescription(name: "help.getAppConfig", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.JSONValue? in - let reader = BufferReader(buffer) - var result: Api.JSONValue? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.JSONValue - } - return result - }) - } - - public static func saveAppLog(events: [Api.InputAppEvent]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1862465352) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(events.count)) - for item in events { - item.serialize(buffer, true) + else { + return nil + } + } + + } + public enum Support: TypeConstructorDescription { + case support(phoneNumber: String, user: Api.User) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .support(let phoneNumber, let user): + if boxed { + buffer.appendInt32(398898678) + } + serializeString(phoneNumber, buffer: buffer, boxed: false) + user.serialize(buffer, true) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .support(let phoneNumber, let user): + return ("support", [("phoneNumber", phoneNumber), ("user", user)]) + } + } + + public static func parse_support(_ reader: BufferReader) -> Support? { + var _1: String? + _1 = parseString(reader) + var _2: Api.User? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.User + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.help.Support.support(phoneNumber: _1!, user: _2!) + } + else { + return nil + } + } + + } + public enum InviteText: TypeConstructorDescription { + case inviteText(message: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .inviteText(let message): + if boxed { + buffer.appendInt32(415997816) + } + serializeString(message, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .inviteText(let message): + return ("inviteText", [("message", message)]) + } + } + + public static func parse_inviteText(_ reader: BufferReader) -> InviteText? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.help.InviteText.inviteText(message: _1!) + } + else { + return nil + } + } + + } + public enum UserInfo: TypeConstructorDescription { + case userInfoEmpty + case userInfo(message: String, entities: [Api.MessageEntity], author: String, date: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .userInfoEmpty: + if boxed { + buffer.appendInt32(-206688531) } - return (FunctionDescription(name: "help.saveAppLog", parameters: [("events", events)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getPassportConfig(hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-966677240) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "help.getPassportConfig", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.PassportConfig? in - let reader = BufferReader(buffer) - var result: Api.help.PassportConfig? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.help.PassportConfig - } - return result - }) - } - - public static func getSupportName() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-748624084) - return (FunctionDescription(name: "help.getSupportName", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.SupportName? in - let reader = BufferReader(buffer) - var result: Api.help.SupportName? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.help.SupportName - } - return result - }) - } - - public static func getUserInfo(userId: Api.InputUser) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(59377875) - userId.serialize(buffer, true) - return (FunctionDescription(name: "help.getUserInfo", parameters: [("userId", userId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.UserInfo? in - let reader = BufferReader(buffer) - var result: Api.help.UserInfo? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.help.UserInfo - } - return result - }) - } - - public static func editUserInfo(userId: Api.InputUser, message: String, entities: [Api.MessageEntity]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1723407216) - userId.serialize(buffer, true) + break + case .userInfo(let message, let entities, let author, let date): + if boxed { + buffer.appendInt32(32192344) + } serializeString(message, buffer: buffer, boxed: false) buffer.appendInt32(481674261) buffer.appendInt32(Int32(entities.count)) for item in entities { item.serialize(buffer, true) } - return (FunctionDescription(name: "help.editUserInfo", parameters: [("userId", userId), ("message", message), ("entities", entities)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.UserInfo? in - let reader = BufferReader(buffer) - var result: Api.help.UserInfo? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.help.UserInfo - } - return result - }) - } - - public static func getPromoData() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1063816159) - - return (FunctionDescription(name: "help.getPromoData", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.PromoData? in - let reader = BufferReader(buffer) - var result: Api.help.PromoData? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.help.PromoData - } - return result - }) - } - - public static func hidePromoData(peer: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(505748629) - peer.serialize(buffer, true) - return (FunctionDescription(name: "help.hidePromoData", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func dismissSuggestion(suggestion: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(125807007) - serializeString(suggestion, buffer: buffer, boxed: false) - return (FunctionDescription(name: "help.dismissSuggestion", parameters: [("suggestion", suggestion)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getCountriesList(langCode: String, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1935116200) - serializeString(langCode, buffer: buffer, boxed: false) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "help.getCountriesList", parameters: [("langCode", langCode), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.CountriesList? in - let reader = BufferReader(buffer) - var result: Api.help.CountriesList? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.help.CountriesList - } - return result - }) - } - } - public struct updates { - public static func getState() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-304838614) - - return (FunctionDescription(name: "updates.getState", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.updates.State? in - let reader = BufferReader(buffer) - var result: Api.updates.State? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.updates.State - } - return result - }) - } - - public static func getDifference(flags: Int32, pts: Int32, ptsTotalLimit: Int32?, date: Int32, qts: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(630429265) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(pts, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeInt32(ptsTotalLimit!, buffer: buffer, boxed: false)} + serializeString(author, buffer: buffer, boxed: false) serializeInt32(date, buffer: buffer, boxed: false) - serializeInt32(qts, buffer: buffer, boxed: false) - return (FunctionDescription(name: "updates.getDifference", parameters: [("flags", flags), ("pts", pts), ("ptsTotalLimit", ptsTotalLimit), ("date", date), ("qts", qts)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.updates.Difference? in - let reader = BufferReader(buffer) - var result: Api.updates.Difference? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.updates.Difference - } - return result - }) - } - - public static func getChannelDifference(flags: Int32, channel: Api.InputChannel, filter: Api.ChannelMessagesFilter, pts: Int32, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(51854712) - serializeInt32(flags, buffer: buffer, boxed: false) - channel.serialize(buffer, true) - filter.serialize(buffer, true) - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(limit, buffer: buffer, boxed: false) - return (FunctionDescription(name: "updates.getChannelDifference", parameters: [("flags", flags), ("channel", channel), ("filter", filter), ("pts", pts), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.updates.ChannelDifference? in - let reader = BufferReader(buffer) - var result: Api.updates.ChannelDifference? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.updates.ChannelDifference - } - return result - }) - } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .userInfoEmpty: + return ("userInfoEmpty", []) + case .userInfo(let message, let entities, let author, let date): + return ("userInfo", [("message", message), ("entities", entities), ("author", author), ("date", date)]) + } + } + + public static func parse_userInfoEmpty(_ reader: BufferReader) -> UserInfo? { + return Api.help.UserInfo.userInfoEmpty + } + public static func parse_userInfo(_ reader: BufferReader) -> UserInfo? { + var _1: String? + _1 = parseString(reader) + var _2: [Api.MessageEntity]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } - public struct folders { - public static func editPeerFolders(folderPeers: [Api.InputFolderPeer]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1749536939) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(folderPeers.count)) - for item in folderPeers { - item.serialize(buffer, true) - } - return (FunctionDescription(name: "folders.editPeerFolders", parameters: [("folderPeers", folderPeers)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func deleteFolder(folderId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(472471681) - serializeInt32(folderId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "folders.deleteFolder", parameters: [("folderId", folderId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } + var _3: String? + _3 = parseString(reader) + var _4: Int32? + _4 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.help.UserInfo.userInfo(message: _1!, entities: _2!, author: _3!, date: _4!) } - public struct upload { - public static func saveFilePart(fileId: Int64, filePart: Int32, bytes: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1291540959) - serializeInt64(fileId, buffer: buffer, boxed: false) - serializeInt32(filePart, buffer: buffer, boxed: false) - serializeBytes(bytes, buffer: buffer, boxed: false) - return (FunctionDescription(name: "upload.saveFilePart", parameters: [("fileId", fileId), ("filePart", filePart), ("bytes", bytes)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getFile(flags: Int32, location: Api.InputFileLocation, offset: Int32, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1319462148) - serializeInt32(flags, buffer: buffer, boxed: false) - location.serialize(buffer, true) - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(limit, buffer: buffer, boxed: false) - return (FunctionDescription(name: "upload.getFile", parameters: [("flags", flags), ("location", location), ("offset", offset), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.upload.File? in - let reader = BufferReader(buffer) - var result: Api.upload.File? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.upload.File - } - return result - }) - } - - public static func saveBigFilePart(fileId: Int64, filePart: Int32, fileTotalParts: Int32, bytes: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-562337987) - serializeInt64(fileId, buffer: buffer, boxed: false) - serializeInt32(filePart, buffer: buffer, boxed: false) - serializeInt32(fileTotalParts, buffer: buffer, boxed: false) - serializeBytes(bytes, buffer: buffer, boxed: false) - return (FunctionDescription(name: "upload.saveBigFilePart", parameters: [("fileId", fileId), ("filePart", filePart), ("fileTotalParts", fileTotalParts), ("bytes", bytes)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getWebFile(location: Api.InputWebFileLocation, offset: Int32, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(619086221) - location.serialize(buffer, true) - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(limit, buffer: buffer, boxed: false) - return (FunctionDescription(name: "upload.getWebFile", parameters: [("location", location), ("offset", offset), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.upload.WebFile? in - let reader = BufferReader(buffer) - var result: Api.upload.WebFile? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.upload.WebFile - } - return result - }) - } - - public static func getCdnFile(fileToken: Buffer, offset: Int32, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(536919235) - serializeBytes(fileToken, buffer: buffer, boxed: false) - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt32(limit, buffer: buffer, boxed: false) - return (FunctionDescription(name: "upload.getCdnFile", parameters: [("fileToken", fileToken), ("offset", offset), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.upload.CdnFile? in - let reader = BufferReader(buffer) - var result: Api.upload.CdnFile? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.upload.CdnFile - } - return result - }) - } - - public static func reuploadCdnFile(fileToken: Buffer, requestToken: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.FileHash]>) { - let buffer = Buffer() - buffer.appendInt32(-1691921240) - serializeBytes(fileToken, buffer: buffer, boxed: false) - serializeBytes(requestToken, buffer: buffer, boxed: false) - return (FunctionDescription(name: "upload.reuploadCdnFile", parameters: [("fileToken", fileToken), ("requestToken", requestToken)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.FileHash]? in - let reader = BufferReader(buffer) - var result: [Api.FileHash]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: 0, elementType: Api.FileHash.self) - } - return result - }) - } - - public static func getCdnFileHashes(fileToken: Buffer, offset: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.FileHash]>) { - let buffer = Buffer() - buffer.appendInt32(1302676017) - serializeBytes(fileToken, buffer: buffer, boxed: false) - serializeInt32(offset, buffer: buffer, boxed: false) - return (FunctionDescription(name: "upload.getCdnFileHashes", parameters: [("fileToken", fileToken), ("offset", offset)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.FileHash]? in - let reader = BufferReader(buffer) - var result: [Api.FileHash]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: 0, elementType: Api.FileHash.self) - } - return result - }) - } - - public static func getFileHashes(location: Api.InputFileLocation, offset: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.FileHash]>) { - let buffer = Buffer() - buffer.appendInt32(-956147407) - location.serialize(buffer, true) - serializeInt32(offset, buffer: buffer, boxed: false) - return (FunctionDescription(name: "upload.getFileHashes", parameters: [("location", location), ("offset", offset)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.FileHash]? in - let reader = BufferReader(buffer) - var result: [Api.FileHash]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: 0, elementType: Api.FileHash.self) - } - return result - }) - } + else { + return nil } - public struct stickers { - public static func createStickerSet(flags: Int32, userId: Api.InputUser, title: String, shortName: String, thumb: Api.InputDocument?, stickers: [Api.InputStickerSetItem]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-251435136) - serializeInt32(flags, buffer: buffer, boxed: false) - userId.serialize(buffer, true) - serializeString(title, buffer: buffer, boxed: false) - serializeString(shortName, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {thumb!.serialize(buffer, true)} - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(stickers.count)) - for item in stickers { - item.serialize(buffer, true) + } + + } + public enum TermsOfServiceUpdate: TypeConstructorDescription { + case termsOfServiceUpdateEmpty(expires: Int32) + case termsOfServiceUpdate(expires: Int32, termsOfService: Api.help.TermsOfService) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .termsOfServiceUpdateEmpty(let expires): + if boxed { + buffer.appendInt32(-483352705) } - return (FunctionDescription(name: "stickers.createStickerSet", parameters: [("flags", flags), ("userId", userId), ("title", title), ("shortName", shortName), ("thumb", thumb), ("stickers", stickers)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.StickerSet? in - let reader = BufferReader(buffer) - var result: Api.messages.StickerSet? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.StickerSet - } - return result - }) - } - - public static func removeStickerFromSet(sticker: Api.InputDocument) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-143257775) - sticker.serialize(buffer, true) - return (FunctionDescription(name: "stickers.removeStickerFromSet", parameters: [("sticker", sticker)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.StickerSet? in - let reader = BufferReader(buffer) - var result: Api.messages.StickerSet? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.StickerSet - } - return result - }) - } - - public static func changeStickerPosition(sticker: Api.InputDocument, position: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-4795190) - sticker.serialize(buffer, true) - serializeInt32(position, buffer: buffer, boxed: false) - return (FunctionDescription(name: "stickers.changeStickerPosition", parameters: [("sticker", sticker), ("position", position)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.StickerSet? in - let reader = BufferReader(buffer) - var result: Api.messages.StickerSet? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.StickerSet - } - return result - }) - } - - public static func addStickerToSet(stickerset: Api.InputStickerSet, sticker: Api.InputStickerSetItem) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-2041315650) - stickerset.serialize(buffer, true) - sticker.serialize(buffer, true) - return (FunctionDescription(name: "stickers.addStickerToSet", parameters: [("stickerset", stickerset), ("sticker", sticker)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.StickerSet? in - let reader = BufferReader(buffer) - var result: Api.messages.StickerSet? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.StickerSet - } - return result - }) - } - - public static func setStickerSetThumb(stickerset: Api.InputStickerSet, thumb: Api.InputDocument) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1707717072) - stickerset.serialize(buffer, true) - thumb.serialize(buffer, true) - return (FunctionDescription(name: "stickers.setStickerSetThumb", parameters: [("stickerset", stickerset), ("thumb", thumb)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.StickerSet? in - let reader = BufferReader(buffer) - var result: Api.messages.StickerSet? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.messages.StickerSet - } - return result - }) - } + serializeInt32(expires, buffer: buffer, boxed: false) + break + case .termsOfServiceUpdate(let expires, let termsOfService): + if boxed { + buffer.appendInt32(686618977) + } + serializeInt32(expires, buffer: buffer, boxed: false) + termsOfService.serialize(buffer, true) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .termsOfServiceUpdateEmpty(let expires): + return ("termsOfServiceUpdateEmpty", [("expires", expires)]) + case .termsOfServiceUpdate(let expires, let termsOfService): + return ("termsOfServiceUpdate", [("expires", expires), ("termsOfService", termsOfService)]) + } + } + + public static func parse_termsOfServiceUpdateEmpty(_ reader: BufferReader) -> TermsOfServiceUpdate? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.help.TermsOfServiceUpdate.termsOfServiceUpdateEmpty(expires: _1!) } - public struct account { - public static func registerDevice(flags: Int32, tokenType: Int32, token: String, appSandbox: Api.Bool, secret: Buffer, otherUids: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1754754159) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeInt32(tokenType, buffer: buffer, boxed: false) - serializeString(token, buffer: buffer, boxed: false) - appSandbox.serialize(buffer, true) - serializeBytes(secret, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(otherUids.count)) - for item in otherUids { - serializeInt32(item, buffer: buffer, boxed: false) + else { + return nil + } + } + public static func parse_termsOfServiceUpdate(_ reader: BufferReader) -> TermsOfServiceUpdate? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.help.TermsOfService? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.help.TermsOfService + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.help.TermsOfServiceUpdate.termsOfServiceUpdate(expires: _1!, termsOfService: _2!) + } + else { + return nil + } + } + + } + public enum CountriesList: TypeConstructorDescription { + case countriesListNotModified + case countriesList(countries: [Api.help.Country], hash: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .countriesListNotModified: + if boxed { + buffer.appendInt32(-1815339214) } - return (FunctionDescription(name: "account.registerDevice", parameters: [("flags", flags), ("tokenType", tokenType), ("token", token), ("appSandbox", appSandbox), ("secret", secret), ("otherUids", otherUids)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func unregisterDevice(tokenType: Int32, token: String, otherUids: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(813089983) - serializeInt32(tokenType, buffer: buffer, boxed: false) - serializeString(token, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(otherUids.count)) - for item in otherUids { - serializeInt32(item, buffer: buffer, boxed: false) - } - return (FunctionDescription(name: "account.unregisterDevice", parameters: [("tokenType", tokenType), ("token", token), ("otherUids", otherUids)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func updateNotifySettings(peer: Api.InputNotifyPeer, settings: Api.InputPeerNotifySettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-2067899501) - peer.serialize(buffer, true) - settings.serialize(buffer, true) - return (FunctionDescription(name: "account.updateNotifySettings", parameters: [("peer", peer), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getNotifySettings(peer: Api.InputNotifyPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(313765169) - peer.serialize(buffer, true) - return (FunctionDescription(name: "account.getNotifySettings", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.PeerNotifySettings? in - let reader = BufferReader(buffer) - var result: Api.PeerNotifySettings? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.PeerNotifySettings - } - return result - }) - } - - public static func resetNotifySettings() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-612493497) - return (FunctionDescription(name: "account.resetNotifySettings", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func updateProfile(flags: Int32, firstName: String?, lastName: String?, about: String?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(2018596725) - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {serializeString(firstName!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeString(lastName!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeString(about!, buffer: buffer, boxed: false)} - return (FunctionDescription(name: "account.updateProfile", parameters: [("flags", flags), ("firstName", firstName), ("lastName", lastName), ("about", about)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.User? in - let reader = BufferReader(buffer) - var result: Api.User? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.User - } - return result - }) - } - - public static func updateStatus(offline: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1713919532) - offline.serialize(buffer, true) - return (FunctionDescription(name: "account.updateStatus", parameters: [("offline", offline)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getWallPapers(hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1430579357) + break + case .countriesList(let countries, let hash): + if boxed { + buffer.appendInt32(-2016381538) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(countries.count)) + for item in countries { + item.serialize(buffer, true) + } serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.getWallPapers", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.WallPapers? in - let reader = BufferReader(buffer) - var result: Api.account.WallPapers? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.account.WallPapers - } - return result - }) - } - - public static func reportPeer(peer: Api.InputPeer, reason: Api.ReportReason, message: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-977650298) - peer.serialize(buffer, true) - reason.serialize(buffer, true) - serializeString(message, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.reportPeer", parameters: [("peer", peer), ("reason", reason), ("message", message)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func checkUsername(username: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(655677548) - serializeString(username, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.checkUsername", parameters: [("username", username)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func updateUsername(username: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1040964988) - serializeString(username, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.updateUsername", parameters: [("username", username)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.User? in - let reader = BufferReader(buffer) - var result: Api.User? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.User - } - return result - }) - } - - public static func getPrivacy(key: Api.InputPrivacyKey) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-623130288) - key.serialize(buffer, true) - return (FunctionDescription(name: "account.getPrivacy", parameters: [("key", key)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.PrivacyRules? in - let reader = BufferReader(buffer) - var result: Api.account.PrivacyRules? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.account.PrivacyRules - } - return result - }) - } - - public static func setPrivacy(key: Api.InputPrivacyKey, rules: [Api.InputPrivacyRule]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-906486552) - key.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(rules.count)) - for item in rules { - item.serialize(buffer, true) - } - return (FunctionDescription(name: "account.setPrivacy", parameters: [("key", key), ("rules", rules)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.PrivacyRules? in - let reader = BufferReader(buffer) - var result: Api.account.PrivacyRules? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.account.PrivacyRules - } - return result - }) - } - - public static func deleteAccount(reason: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1099779595) - serializeString(reason, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.deleteAccount", parameters: [("reason", reason)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getAccountTTL() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(150761757) - - return (FunctionDescription(name: "account.getAccountTTL", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.AccountDaysTTL? in - let reader = BufferReader(buffer) - var result: Api.AccountDaysTTL? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.AccountDaysTTL - } - return result - }) - } - - public static func setAccountTTL(ttl: Api.AccountDaysTTL) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(608323678) - ttl.serialize(buffer, true) - return (FunctionDescription(name: "account.setAccountTTL", parameters: [("ttl", ttl)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func sendChangePhoneCode(phoneNumber: String, settings: Api.CodeSettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-2108208411) - serializeString(phoneNumber, buffer: buffer, boxed: false) - settings.serialize(buffer, true) - return (FunctionDescription(name: "account.sendChangePhoneCode", parameters: [("phoneNumber", phoneNumber), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.SentCode? in - let reader = BufferReader(buffer) - var result: Api.auth.SentCode? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.auth.SentCode - } - return result - }) - } - - public static func changePhone(phoneNumber: String, phoneCodeHash: String, phoneCode: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1891839707) - serializeString(phoneNumber, buffer: buffer, boxed: false) - serializeString(phoneCodeHash, buffer: buffer, boxed: false) - serializeString(phoneCode, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.changePhone", parameters: [("phoneNumber", phoneNumber), ("phoneCodeHash", phoneCodeHash), ("phoneCode", phoneCode)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.User? in - let reader = BufferReader(buffer) - var result: Api.User? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.User - } - return result - }) - } - - public static func updateDeviceLocked(period: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(954152242) - serializeInt32(period, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.updateDeviceLocked", parameters: [("period", period)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getAuthorizations() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-484392616) - - return (FunctionDescription(name: "account.getAuthorizations", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.Authorizations? in - let reader = BufferReader(buffer) - var result: Api.account.Authorizations? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.account.Authorizations - } - return result - }) - } - - public static func resetAuthorization(hash: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-545786948) - serializeInt64(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.resetAuthorization", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getPassword() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1418342645) - - return (FunctionDescription(name: "account.getPassword", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.Password? in - let reader = BufferReader(buffer) - var result: Api.account.Password? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.account.Password - } - return result - }) - } - - public static func getPasswordSettings(password: Api.InputCheckPasswordSRP) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1663767815) - password.serialize(buffer, true) - return (FunctionDescription(name: "account.getPasswordSettings", parameters: [("password", password)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.PasswordSettings? in - let reader = BufferReader(buffer) - var result: Api.account.PasswordSettings? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.account.PasswordSettings - } - return result - }) - } - - public static func updatePasswordSettings(password: Api.InputCheckPasswordSRP, newSettings: Api.account.PasswordInputSettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1516564433) - password.serialize(buffer, true) - newSettings.serialize(buffer, true) - return (FunctionDescription(name: "account.updatePasswordSettings", parameters: [("password", password), ("newSettings", newSettings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func sendConfirmPhoneCode(hash: String, settings: Api.CodeSettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(457157256) - serializeString(hash, buffer: buffer, boxed: false) - settings.serialize(buffer, true) - return (FunctionDescription(name: "account.sendConfirmPhoneCode", parameters: [("hash", hash), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.SentCode? in - let reader = BufferReader(buffer) - var result: Api.auth.SentCode? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.auth.SentCode - } - return result - }) - } - - public static func confirmPhone(phoneCodeHash: String, phoneCode: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1596029123) - serializeString(phoneCodeHash, buffer: buffer, boxed: false) - serializeString(phoneCode, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.confirmPhone", parameters: [("phoneCodeHash", phoneCodeHash), ("phoneCode", phoneCode)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getTmpPassword(password: Api.InputCheckPasswordSRP, period: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1151208273) - password.serialize(buffer, true) - serializeInt32(period, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.getTmpPassword", parameters: [("password", password), ("period", period)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.TmpPassword? in - let reader = BufferReader(buffer) - var result: Api.account.TmpPassword? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.account.TmpPassword - } - return result - }) - } - - public static func getWebAuthorizations() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(405695855) - - return (FunctionDescription(name: "account.getWebAuthorizations", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.WebAuthorizations? in - let reader = BufferReader(buffer) - var result: Api.account.WebAuthorizations? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.account.WebAuthorizations - } - return result - }) - } - - public static func resetWebAuthorization(hash: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(755087855) - serializeInt64(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.resetWebAuthorization", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func resetWebAuthorizations() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1747789204) - - return (FunctionDescription(name: "account.resetWebAuthorizations", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getAllSecureValues() -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.SecureValue]>) { - let buffer = Buffer() - buffer.appendInt32(-1299661699) - - return (FunctionDescription(name: "account.getAllSecureValues", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.SecureValue]? in - let reader = BufferReader(buffer) - var result: [Api.SecureValue]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureValue.self) - } - return result - }) - } - - public static func getSecureValue(types: [Api.SecureValueType]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.SecureValue]>) { - let buffer = Buffer() - buffer.appendInt32(1936088002) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(types.count)) - for item in types { - item.serialize(buffer, true) - } - return (FunctionDescription(name: "account.getSecureValue", parameters: [("types", types)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.SecureValue]? in - let reader = BufferReader(buffer) - var result: [Api.SecureValue]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureValue.self) - } - return result - }) - } - - public static func saveSecureValue(value: Api.InputSecureValue, secureSecretId: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1986010339) - value.serialize(buffer, true) - serializeInt64(secureSecretId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.saveSecureValue", parameters: [("value", value), ("secureSecretId", secureSecretId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.SecureValue? in - let reader = BufferReader(buffer) - var result: Api.SecureValue? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.SecureValue - } - return result - }) - } - - public static func deleteSecureValue(types: [Api.SecureValueType]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1199522741) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(types.count)) - for item in types { - item.serialize(buffer, true) - } - return (FunctionDescription(name: "account.deleteSecureValue", parameters: [("types", types)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getAuthorizationForm(botId: Int32, scope: String, publicKey: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1200903967) - serializeInt32(botId, buffer: buffer, boxed: false) - serializeString(scope, buffer: buffer, boxed: false) - serializeString(publicKey, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.getAuthorizationForm", parameters: [("botId", botId), ("scope", scope), ("publicKey", publicKey)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.AuthorizationForm? in - let reader = BufferReader(buffer) - var result: Api.account.AuthorizationForm? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.account.AuthorizationForm - } - return result - }) - } - - public static func acceptAuthorization(botId: Int32, scope: String, publicKey: String, valueHashes: [Api.SecureValueHash], credentials: Api.SecureCredentialsEncrypted) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-419267436) - serializeInt32(botId, buffer: buffer, boxed: false) - serializeString(scope, buffer: buffer, boxed: false) - serializeString(publicKey, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(valueHashes.count)) - for item in valueHashes { - item.serialize(buffer, true) - } - credentials.serialize(buffer, true) - return (FunctionDescription(name: "account.acceptAuthorization", parameters: [("botId", botId), ("scope", scope), ("publicKey", publicKey), ("valueHashes", valueHashes), ("credentials", credentials)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func sendVerifyPhoneCode(phoneNumber: String, settings: Api.CodeSettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1516022023) - serializeString(phoneNumber, buffer: buffer, boxed: false) - settings.serialize(buffer, true) - return (FunctionDescription(name: "account.sendVerifyPhoneCode", parameters: [("phoneNumber", phoneNumber), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.SentCode? in - let reader = BufferReader(buffer) - var result: Api.auth.SentCode? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.auth.SentCode - } - return result - }) - } - - public static func verifyPhone(phoneNumber: String, phoneCodeHash: String, phoneCode: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1305716726) - serializeString(phoneNumber, buffer: buffer, boxed: false) - serializeString(phoneCodeHash, buffer: buffer, boxed: false) - serializeString(phoneCode, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.verifyPhone", parameters: [("phoneNumber", phoneNumber), ("phoneCodeHash", phoneCodeHash), ("phoneCode", phoneCode)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func sendVerifyEmailCode(email: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1880182943) - serializeString(email, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.sendVerifyEmailCode", parameters: [("email", email)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.SentEmailCode? in - let reader = BufferReader(buffer) - var result: Api.account.SentEmailCode? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.account.SentEmailCode - } - return result - }) - } - - public static func verifyEmail(email: String, code: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-323339813) - serializeString(email, buffer: buffer, boxed: false) - serializeString(code, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.verifyEmail", parameters: [("email", email), ("code", code)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func initTakeoutSession(flags: Int32, fileMaxSize: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-262453244) - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 5) != 0 {serializeInt32(fileMaxSize!, buffer: buffer, boxed: false)} - return (FunctionDescription(name: "account.initTakeoutSession", parameters: [("flags", flags), ("fileMaxSize", fileMaxSize)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.Takeout? in - let reader = BufferReader(buffer) - var result: Api.account.Takeout? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.account.Takeout - } - return result - }) - } - - public static func finishTakeoutSession(flags: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(489050862) - serializeInt32(flags, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.finishTakeoutSession", parameters: [("flags", flags)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func confirmPasswordEmail(code: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1881204448) - serializeString(code, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.confirmPasswordEmail", parameters: [("code", code)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func resendPasswordEmail() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(2055154197) - - return (FunctionDescription(name: "account.resendPasswordEmail", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func cancelPasswordEmail() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1043606090) - - return (FunctionDescription(name: "account.cancelPasswordEmail", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getContactSignUpNotification() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1626880216) - - return (FunctionDescription(name: "account.getContactSignUpNotification", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func setContactSignUpNotification(silent: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-806076575) - silent.serialize(buffer, true) - return (FunctionDescription(name: "account.setContactSignUpNotification", parameters: [("silent", silent)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getNotifyExceptions(flags: Int32, peer: Api.InputNotifyPeer?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1398240377) - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {peer!.serialize(buffer, true)} - return (FunctionDescription(name: "account.getNotifyExceptions", parameters: [("flags", flags), ("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func getWallPaper(wallpaper: Api.InputWallPaper) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-57811990) - wallpaper.serialize(buffer, true) - return (FunctionDescription(name: "account.getWallPaper", parameters: [("wallpaper", wallpaper)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.WallPaper? in - let reader = BufferReader(buffer) - var result: Api.WallPaper? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.WallPaper - } - return result - }) - } - - public static func uploadWallPaper(file: Api.InputFile, mimeType: String, settings: Api.WallPaperSettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-578472351) - file.serialize(buffer, true) - serializeString(mimeType, buffer: buffer, boxed: false) - settings.serialize(buffer, true) - return (FunctionDescription(name: "account.uploadWallPaper", parameters: [("file", file), ("mimeType", mimeType), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.WallPaper? in - let reader = BufferReader(buffer) - var result: Api.WallPaper? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.WallPaper - } - return result - }) - } - - public static func saveWallPaper(wallpaper: Api.InputWallPaper, unsave: Api.Bool, settings: Api.WallPaperSettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1817860919) - wallpaper.serialize(buffer, true) - unsave.serialize(buffer, true) - settings.serialize(buffer, true) - return (FunctionDescription(name: "account.saveWallPaper", parameters: [("wallpaper", wallpaper), ("unsave", unsave), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func installWallPaper(wallpaper: Api.InputWallPaper, settings: Api.WallPaperSettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-18000023) - wallpaper.serialize(buffer, true) - settings.serialize(buffer, true) - return (FunctionDescription(name: "account.installWallPaper", parameters: [("wallpaper", wallpaper), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func resetWallPapers() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1153722364) - - return (FunctionDescription(name: "account.resetWallPapers", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getAutoDownloadSettings() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1457130303) - - return (FunctionDescription(name: "account.getAutoDownloadSettings", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.AutoDownloadSettings? in - let reader = BufferReader(buffer) - var result: Api.account.AutoDownloadSettings? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.account.AutoDownloadSettings - } - return result - }) - } - - public static func saveAutoDownloadSettings(flags: Int32, settings: Api.AutoDownloadSettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1995661875) - serializeInt32(flags, buffer: buffer, boxed: false) - settings.serialize(buffer, true) - return (FunctionDescription(name: "account.saveAutoDownloadSettings", parameters: [("flags", flags), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func uploadTheme(flags: Int32, file: Api.InputFile, thumb: Api.InputFile?, fileName: String, mimeType: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(473805619) - serializeInt32(flags, buffer: buffer, boxed: false) - file.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {thumb!.serialize(buffer, true)} - serializeString(fileName, buffer: buffer, boxed: false) - serializeString(mimeType, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.uploadTheme", parameters: [("flags", flags), ("file", file), ("thumb", thumb), ("fileName", fileName), ("mimeType", mimeType)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Document? in - let reader = BufferReader(buffer) - var result: Api.Document? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Document - } - return result - }) - } - - public static func createTheme(flags: Int32, slug: String, title: String, document: Api.InputDocument?, settings: Api.InputThemeSettings?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-2077048289) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(slug, buffer: buffer, boxed: false) - serializeString(title, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 2) != 0 {document!.serialize(buffer, true)} - if Int(flags) & Int(1 << 3) != 0 {settings!.serialize(buffer, true)} - return (FunctionDescription(name: "account.createTheme", parameters: [("flags", flags), ("slug", slug), ("title", title), ("document", document), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Theme? in - let reader = BufferReader(buffer) - var result: Api.Theme? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Theme - } - return result - }) - } - - public static func updateTheme(flags: Int32, format: String, theme: Api.InputTheme, slug: String?, title: String?, document: Api.InputDocument?, settings: Api.InputThemeSettings?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1555261397) - serializeInt32(flags, buffer: buffer, boxed: false) - serializeString(format, buffer: buffer, boxed: false) - theme.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {serializeString(slug!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {serializeString(title!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {document!.serialize(buffer, true)} - if Int(flags) & Int(1 << 3) != 0 {settings!.serialize(buffer, true)} - return (FunctionDescription(name: "account.updateTheme", parameters: [("flags", flags), ("format", format), ("theme", theme), ("slug", slug), ("title", title), ("document", document), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Theme? in - let reader = BufferReader(buffer) - var result: Api.Theme? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Theme - } - return result - }) - } - - public static func saveTheme(theme: Api.InputTheme, unsave: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-229175188) - theme.serialize(buffer, true) - unsave.serialize(buffer, true) - return (FunctionDescription(name: "account.saveTheme", parameters: [("theme", theme), ("unsave", unsave)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func installTheme(flags: Int32, format: String?, theme: Api.InputTheme?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(2061776695) - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 1) != 0 {serializeString(format!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 1) != 0 {theme!.serialize(buffer, true)} - return (FunctionDescription(name: "account.installTheme", parameters: [("flags", flags), ("format", format), ("theme", theme)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getTheme(format: String, theme: Api.InputTheme, documentId: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1919060949) - serializeString(format, buffer: buffer, boxed: false) - theme.serialize(buffer, true) - serializeInt64(documentId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.getTheme", parameters: [("format", format), ("theme", theme), ("documentId", documentId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Theme? in - let reader = BufferReader(buffer) - var result: Api.Theme? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Theme - } - return result - }) - } - - public static func getThemes(format: String, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(676939512) - serializeString(format, buffer: buffer, boxed: false) - serializeInt32(hash, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.getThemes", parameters: [("format", format), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.Themes? in - let reader = BufferReader(buffer) - var result: Api.account.Themes? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.account.Themes - } - return result - }) - } - - public static func setContentSettings(flags: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1250643605) - serializeInt32(flags, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.setContentSettings", parameters: [("flags", flags)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func getContentSettings() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1952756306) - - return (FunctionDescription(name: "account.getContentSettings", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.ContentSettings? in - let reader = BufferReader(buffer) - var result: Api.account.ContentSettings? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.account.ContentSettings - } - return result - }) - } - - public static func getMultiWallPapers(wallpapers: [Api.InputWallPaper]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.WallPaper]>) { - let buffer = Buffer() - buffer.appendInt32(1705865692) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(wallpapers.count)) - for item in wallpapers { - item.serialize(buffer, true) - } - return (FunctionDescription(name: "account.getMultiWallPapers", parameters: [("wallpapers", wallpapers)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.WallPaper]? in - let reader = BufferReader(buffer) - var result: [Api.WallPaper]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: 0, elementType: Api.WallPaper.self) - } - return result - }) - } - - public static func getGlobalPrivacySettings() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-349483786) - - return (FunctionDescription(name: "account.getGlobalPrivacySettings", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.GlobalPrivacySettings? in - let reader = BufferReader(buffer) - var result: Api.GlobalPrivacySettings? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.GlobalPrivacySettings - } - return result - }) - } - - public static func setGlobalPrivacySettings(settings: Api.GlobalPrivacySettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(517647042) - settings.serialize(buffer, true) - return (FunctionDescription(name: "account.setGlobalPrivacySettings", parameters: [("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.GlobalPrivacySettings? in - let reader = BufferReader(buffer) - var result: Api.GlobalPrivacySettings? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.GlobalPrivacySettings - } - return result - }) - } - - public static func reportProfilePhoto(peer: Api.InputPeer, photoId: Api.InputPhoto, reason: Api.ReportReason, message: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-91437323) - peer.serialize(buffer, true) - photoId.serialize(buffer, true) - reason.serialize(buffer, true) - serializeString(message, buffer: buffer, boxed: false) - return (FunctionDescription(name: "account.reportProfilePhoto", parameters: [("peer", peer), ("photoId", photoId), ("reason", reason), ("message", message)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .countriesListNotModified: + return ("countriesListNotModified", []) + case .countriesList(let countries, let hash): + return ("countriesList", [("countries", countries), ("hash", hash)]) + } + } + + public static func parse_countriesListNotModified(_ reader: BufferReader) -> CountriesList? { + return Api.help.CountriesList.countriesListNotModified + } + public static func parse_countriesList(_ reader: BufferReader) -> CountriesList? { + var _1: [Api.help.Country]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.help.Country.self) } - public struct langpack { - public static func getLangPack(langPack: String, langCode: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-219008246) - serializeString(langPack, buffer: buffer, boxed: false) - serializeString(langCode, buffer: buffer, boxed: false) - return (FunctionDescription(name: "langpack.getLangPack", parameters: [("langPack", langPack), ("langCode", langCode)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.LangPackDifference? in - let reader = BufferReader(buffer) - var result: Api.LangPackDifference? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.LangPackDifference - } - return result - }) - } - - public static func getStrings(langPack: String, langCode: String, keys: [String]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.LangPackString]>) { - let buffer = Buffer() - buffer.appendInt32(-269862909) - serializeString(langPack, buffer: buffer, boxed: false) - serializeString(langCode, buffer: buffer, boxed: false) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(keys.count)) - for item in keys { - serializeString(item, buffer: buffer, boxed: false) - } - return (FunctionDescription(name: "langpack.getStrings", parameters: [("langPack", langPack), ("langCode", langCode), ("keys", keys)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.LangPackString]? in - let reader = BufferReader(buffer) - var result: [Api.LangPackString]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: 0, elementType: Api.LangPackString.self) - } - return result - }) - } - - public static func getDifference(langPack: String, langCode: String, fromVersion: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-845657435) - serializeString(langPack, buffer: buffer, boxed: false) - serializeString(langCode, buffer: buffer, boxed: false) - serializeInt32(fromVersion, buffer: buffer, boxed: false) - return (FunctionDescription(name: "langpack.getDifference", parameters: [("langPack", langPack), ("langCode", langCode), ("fromVersion", fromVersion)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.LangPackDifference? in - let reader = BufferReader(buffer) - var result: Api.LangPackDifference? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.LangPackDifference - } - return result - }) - } - - public static func getLanguages(langPack: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.LangPackLanguage]>) { - let buffer = Buffer() - buffer.appendInt32(1120311183) - serializeString(langPack, buffer: buffer, boxed: false) - return (FunctionDescription(name: "langpack.getLanguages", parameters: [("langPack", langPack)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.LangPackLanguage]? in - let reader = BufferReader(buffer) - var result: [Api.LangPackLanguage]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: 0, elementType: Api.LangPackLanguage.self) - } - return result - }) - } - - public static func getLanguage(langPack: String, langCode: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1784243458) - serializeString(langPack, buffer: buffer, boxed: false) - serializeString(langCode, buffer: buffer, boxed: false) - return (FunctionDescription(name: "langpack.getLanguage", parameters: [("langPack", langPack), ("langCode", langCode)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.LangPackLanguage? in - let reader = BufferReader(buffer) - var result: Api.LangPackLanguage? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.LangPackLanguage - } - return result - }) - } + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.help.CountriesList.countriesList(countries: _1!, hash: _2!) } - public struct photos { - public static func updateProfilePhoto(id: Api.InputPhoto) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1926525996) - id.serialize(buffer, true) - return (FunctionDescription(name: "photos.updateProfilePhoto", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.photos.Photo? in - let reader = BufferReader(buffer) - var result: Api.photos.Photo? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.photos.Photo - } - return result - }) - } - - public static func uploadProfilePhoto(flags: Int32, file: Api.InputFile?, video: Api.InputFile?, videoStartTs: Double?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1980559511) - serializeInt32(flags, buffer: buffer, boxed: false) - if Int(flags) & Int(1 << 0) != 0 {file!.serialize(buffer, true)} - if Int(flags) & Int(1 << 1) != 0 {video!.serialize(buffer, true)} - if Int(flags) & Int(1 << 2) != 0 {serializeDouble(videoStartTs!, buffer: buffer, boxed: false)} - return (FunctionDescription(name: "photos.uploadProfilePhoto", parameters: [("flags", flags), ("file", file), ("video", video), ("videoStartTs", videoStartTs)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.photos.Photo? in - let reader = BufferReader(buffer) - var result: Api.photos.Photo? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.photos.Photo - } - return result - }) - } - - public static func deletePhotos(id: [Api.InputPhoto]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Int64]>) { - let buffer = Buffer() - buffer.appendInt32(-2016444625) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(id.count)) - for item in id { - item.serialize(buffer, true) - } - return (FunctionDescription(name: "photos.deletePhotos", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Int64]? in - let reader = BufferReader(buffer) - var result: [Int64]? - if let _ = reader.readInt32() { - result = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self) - } - return result - }) - } - - public static func getUserPhotos(userId: Api.InputUser, offset: Int32, maxId: Int64, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1848823128) - userId.serialize(buffer, true) - serializeInt32(offset, buffer: buffer, boxed: false) - serializeInt64(maxId, buffer: buffer, boxed: false) - serializeInt32(limit, buffer: buffer, boxed: false) - return (FunctionDescription(name: "photos.getUserPhotos", parameters: [("userId", userId), ("offset", offset), ("maxId", maxId), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.photos.Photos? in - let reader = BufferReader(buffer) - var result: Api.photos.Photos? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.photos.Photos - } - return result - }) - } - } - public struct phone { - public static func getCallConfig() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1430593449) - - return (FunctionDescription(name: "phone.getCallConfig", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.DataJSON? in - let reader = BufferReader(buffer) - var result: Api.DataJSON? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.DataJSON - } - return result - }) - } - - public static func requestCall(flags: Int32, userId: Api.InputUser, randomId: Int32, gAHash: Buffer, `protocol`: Api.PhoneCallProtocol) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1124046573) - serializeInt32(flags, buffer: buffer, boxed: false) - userId.serialize(buffer, true) - serializeInt32(randomId, buffer: buffer, boxed: false) - serializeBytes(gAHash, buffer: buffer, boxed: false) - `protocol`.serialize(buffer, true) - return (FunctionDescription(name: "phone.requestCall", parameters: [("flags", flags), ("userId", userId), ("randomId", randomId), ("gAHash", gAHash), ("`protocol`", `protocol`)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.phone.PhoneCall? in - let reader = BufferReader(buffer) - var result: Api.phone.PhoneCall? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.phone.PhoneCall - } - return result - }) - } - - public static func acceptCall(peer: Api.InputPhoneCall, gB: Buffer, `protocol`: Api.PhoneCallProtocol) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1003664544) - peer.serialize(buffer, true) - serializeBytes(gB, buffer: buffer, boxed: false) - `protocol`.serialize(buffer, true) - return (FunctionDescription(name: "phone.acceptCall", parameters: [("peer", peer), ("gB", gB), ("`protocol`", `protocol`)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.phone.PhoneCall? in - let reader = BufferReader(buffer) - var result: Api.phone.PhoneCall? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.phone.PhoneCall - } - return result - }) - } - - public static func confirmCall(peer: Api.InputPhoneCall, gA: Buffer, keyFingerprint: Int64, `protocol`: Api.PhoneCallProtocol) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(788404002) - peer.serialize(buffer, true) - serializeBytes(gA, buffer: buffer, boxed: false) - serializeInt64(keyFingerprint, buffer: buffer, boxed: false) - `protocol`.serialize(buffer, true) - return (FunctionDescription(name: "phone.confirmCall", parameters: [("peer", peer), ("gA", gA), ("keyFingerprint", keyFingerprint), ("`protocol`", `protocol`)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.phone.PhoneCall? in - let reader = BufferReader(buffer) - var result: Api.phone.PhoneCall? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.phone.PhoneCall - } - return result - }) - } - - public static func receivedCall(peer: Api.InputPhoneCall) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(399855457) - peer.serialize(buffer, true) - return (FunctionDescription(name: "phone.receivedCall", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func discardCall(flags: Int32, peer: Api.InputPhoneCall, duration: Int32, reason: Api.PhoneCallDiscardReason, connectionId: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1295269440) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - serializeInt32(duration, buffer: buffer, boxed: false) - reason.serialize(buffer, true) - serializeInt64(connectionId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "phone.discardCall", parameters: [("flags", flags), ("peer", peer), ("duration", duration), ("reason", reason), ("connectionId", connectionId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func setCallRating(flags: Int32, peer: Api.InputPhoneCall, rating: Int32, comment: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1508562471) - serializeInt32(flags, buffer: buffer, boxed: false) - peer.serialize(buffer, true) - serializeInt32(rating, buffer: buffer, boxed: false) - serializeString(comment, buffer: buffer, boxed: false) - return (FunctionDescription(name: "phone.setCallRating", parameters: [("flags", flags), ("peer", peer), ("rating", rating), ("comment", comment)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func saveCallDebug(peer: Api.InputPhoneCall, debug: Api.DataJSON) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(662363518) - peer.serialize(buffer, true) - debug.serialize(buffer, true) - return (FunctionDescription(name: "phone.saveCallDebug", parameters: [("peer", peer), ("debug", debug)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func sendSignalingData(peer: Api.InputPhoneCall, data: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-8744061) - peer.serialize(buffer, true) - serializeBytes(data, buffer: buffer, boxed: false) - return (FunctionDescription(name: "phone.sendSignalingData", parameters: [("peer", peer), ("data", data)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } - - public static func createGroupCall(peer: Api.InputPeer, randomId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1120031776) - peer.serialize(buffer, true) - serializeInt32(randomId, buffer: buffer, boxed: false) - return (FunctionDescription(name: "phone.createGroupCall", parameters: [("peer", peer), ("randomId", randomId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func joinGroupCall(flags: Int32, call: Api.InputGroupCall, params: Api.DataJSON) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1604095586) - serializeInt32(flags, buffer: buffer, boxed: false) - call.serialize(buffer, true) - params.serialize(buffer, true) - return (FunctionDescription(name: "phone.joinGroupCall", parameters: [("flags", flags), ("call", call), ("params", params)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func leaveGroupCall(call: Api.InputGroupCall, source: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1342404601) - call.serialize(buffer, true) - serializeInt32(source, buffer: buffer, boxed: false) - return (FunctionDescription(name: "phone.leaveGroupCall", parameters: [("call", call), ("source", source)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func editGroupCallMember(flags: Int32, call: Api.InputGroupCall, userId: Api.InputUser, volume: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1511559976) - serializeInt32(flags, buffer: buffer, boxed: false) - call.serialize(buffer, true) - userId.serialize(buffer, true) - if Int(flags) & Int(1 << 1) != 0 {serializeInt32(volume!, buffer: buffer, boxed: false)} - return (FunctionDescription(name: "phone.editGroupCallMember", parameters: [("flags", flags), ("call", call), ("userId", userId), ("volume", volume)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func inviteToGroupCall(call: Api.InputGroupCall, users: [Api.InputUser]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(2067345760) - call.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(users.count)) - for item in users { - item.serialize(buffer, true) - } - return (FunctionDescription(name: "phone.inviteToGroupCall", parameters: [("call", call), ("users", users)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func discardGroupCall(call: Api.InputGroupCall) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(2054648117) - call.serialize(buffer, true) - return (FunctionDescription(name: "phone.discardGroupCall", parameters: [("call", call)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func toggleGroupCallSettings(flags: Int32, call: Api.InputGroupCall, joinMuted: Api.Bool?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(1958458429) - serializeInt32(flags, buffer: buffer, boxed: false) - call.serialize(buffer, true) - if Int(flags) & Int(1 << 0) != 0 {joinMuted!.serialize(buffer, true)} - return (FunctionDescription(name: "phone.toggleGroupCallSettings", parameters: [("flags", flags), ("call", call), ("joinMuted", joinMuted)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in - let reader = BufferReader(buffer) - var result: Api.Updates? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Updates - } - return result - }) - } - - public static func getGroupCall(call: Api.InputGroupCall) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(209498135) - call.serialize(buffer, true) - return (FunctionDescription(name: "phone.getGroupCall", parameters: [("call", call)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.phone.GroupCall? in - let reader = BufferReader(buffer) - var result: Api.phone.GroupCall? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.phone.GroupCall - } - return result - }) - } - - public static func getGroupParticipants(call: Api.InputGroupCall, ids: [Int32], sources: [Int32], offset: String, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-906898811) - call.serialize(buffer, true) - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(ids.count)) - for item in ids { - serializeInt32(item, buffer: buffer, boxed: false) - } - buffer.appendInt32(481674261) - buffer.appendInt32(Int32(sources.count)) - for item in sources { - serializeInt32(item, buffer: buffer, boxed: false) - } - serializeString(offset, buffer: buffer, boxed: false) - serializeInt32(limit, buffer: buffer, boxed: false) - return (FunctionDescription(name: "phone.getGroupParticipants", parameters: [("call", call), ("ids", ids), ("sources", sources), ("offset", offset), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.phone.GroupParticipants? in - let reader = BufferReader(buffer) - var result: Api.phone.GroupParticipants? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.phone.GroupParticipants - } - return result - }) - } - - public static func checkGroupCall(call: Api.InputGroupCall, source: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { - let buffer = Buffer() - buffer.appendInt32(-1219855382) - call.serialize(buffer, true) - serializeInt32(source, buffer: buffer, boxed: false) - return (FunctionDescription(name: "phone.checkGroupCall", parameters: [("call", call), ("source", source)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in - let reader = BufferReader(buffer) - var result: Api.Bool? - if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool - } - return result - }) - } + else { + return nil } + } + } } +} diff --git a/submodules/TelegramApi/Sources/Api4.swift b/submodules/TelegramApi/Sources/Api4.swift index e69de29bb2..0815918b9a 100644 --- a/submodules/TelegramApi/Sources/Api4.swift +++ b/submodules/TelegramApi/Sources/Api4.swift @@ -0,0 +1,7652 @@ +public extension Api { +public struct updates { + public enum Difference: TypeConstructorDescription { + case differenceEmpty(date: Int32, seq: Int32) + case difference(newMessages: [Api.Message], newEncryptedMessages: [Api.EncryptedMessage], otherUpdates: [Api.Update], chats: [Api.Chat], users: [Api.User], state: Api.updates.State) + case differenceSlice(newMessages: [Api.Message], newEncryptedMessages: [Api.EncryptedMessage], otherUpdates: [Api.Update], chats: [Api.Chat], users: [Api.User], intermediateState: Api.updates.State) + case differenceTooLong(pts: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .differenceEmpty(let date, let seq): + if boxed { + buffer.appendInt32(1567990072) + } + serializeInt32(date, buffer: buffer, boxed: false) + serializeInt32(seq, buffer: buffer, boxed: false) + break + case .difference(let newMessages, let newEncryptedMessages, let otherUpdates, let chats, let users, let state): + if boxed { + buffer.appendInt32(16030880) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(newMessages.count)) + for item in newMessages { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(newEncryptedMessages.count)) + for item in newEncryptedMessages { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(otherUpdates.count)) + for item in otherUpdates { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(chats.count)) + for item in chats { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + state.serialize(buffer, true) + break + case .differenceSlice(let newMessages, let newEncryptedMessages, let otherUpdates, let chats, let users, let intermediateState): + if boxed { + buffer.appendInt32(-1459938943) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(newMessages.count)) + for item in newMessages { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(newEncryptedMessages.count)) + for item in newEncryptedMessages { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(otherUpdates.count)) + for item in otherUpdates { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(chats.count)) + for item in chats { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + intermediateState.serialize(buffer, true) + break + case .differenceTooLong(let pts): + if boxed { + buffer.appendInt32(1258196845) + } + serializeInt32(pts, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .differenceEmpty(let date, let seq): + return ("differenceEmpty", [("date", date), ("seq", seq)]) + case .difference(let newMessages, let newEncryptedMessages, let otherUpdates, let chats, let users, let state): + return ("difference", [("newMessages", newMessages), ("newEncryptedMessages", newEncryptedMessages), ("otherUpdates", otherUpdates), ("chats", chats), ("users", users), ("state", state)]) + case .differenceSlice(let newMessages, let newEncryptedMessages, let otherUpdates, let chats, let users, let intermediateState): + return ("differenceSlice", [("newMessages", newMessages), ("newEncryptedMessages", newEncryptedMessages), ("otherUpdates", otherUpdates), ("chats", chats), ("users", users), ("intermediateState", intermediateState)]) + case .differenceTooLong(let pts): + return ("differenceTooLong", [("pts", pts)]) + } + } + + public static func parse_differenceEmpty(_ reader: BufferReader) -> Difference? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.updates.Difference.differenceEmpty(date: _1!, seq: _2!) + } + else { + return nil + } + } + public static func parse_difference(_ reader: BufferReader) -> Difference? { + var _1: [Api.Message]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Message.self) + } + var _2: [Api.EncryptedMessage]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.EncryptedMessage.self) + } + var _3: [Api.Update]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Update.self) + } + var _4: [Api.Chat]? + if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) + } + var _5: [Api.User]? + if let _ = reader.readInt32() { + _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + var _6: Api.updates.State? + if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.updates.State + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.updates.Difference.difference(newMessages: _1!, newEncryptedMessages: _2!, otherUpdates: _3!, chats: _4!, users: _5!, state: _6!) + } + else { + return nil + } + } + public static func parse_differenceSlice(_ reader: BufferReader) -> Difference? { + var _1: [Api.Message]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Message.self) + } + var _2: [Api.EncryptedMessage]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.EncryptedMessage.self) + } + var _3: [Api.Update]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Update.self) + } + var _4: [Api.Chat]? + if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) + } + var _5: [Api.User]? + if let _ = reader.readInt32() { + _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + var _6: Api.updates.State? + if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.updates.State + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.updates.Difference.differenceSlice(newMessages: _1!, newEncryptedMessages: _2!, otherUpdates: _3!, chats: _4!, users: _5!, intermediateState: _6!) + } + else { + return nil + } + } + public static func parse_differenceTooLong(_ reader: BufferReader) -> Difference? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.updates.Difference.differenceTooLong(pts: _1!) + } + else { + return nil + } + } + + } + public enum State: TypeConstructorDescription { + case state(pts: Int32, qts: Int32, date: Int32, seq: Int32, unreadCount: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .state(let pts, let qts, let date, let seq, let unreadCount): + if boxed { + buffer.appendInt32(-1519637954) + } + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(qts, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + serializeInt32(seq, buffer: buffer, boxed: false) + serializeInt32(unreadCount, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .state(let pts, let qts, let date, let seq, let unreadCount): + return ("state", [("pts", pts), ("qts", qts), ("date", date), ("seq", seq), ("unreadCount", unreadCount)]) + } + } + + public static func parse_state(_ reader: BufferReader) -> State? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.updates.State.state(pts: _1!, qts: _2!, date: _3!, seq: _4!, unreadCount: _5!) + } + else { + return nil + } + } + + } + public enum ChannelDifference: TypeConstructorDescription { + case channelDifferenceEmpty(flags: Int32, pts: Int32, timeout: Int32?) + case channelDifference(flags: Int32, pts: Int32, timeout: Int32?, newMessages: [Api.Message], otherUpdates: [Api.Update], chats: [Api.Chat], users: [Api.User]) + case channelDifferenceTooLong(flags: Int32, timeout: Int32?, dialog: Api.Dialog, messages: [Api.Message], chats: [Api.Chat], users: [Api.User]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .channelDifferenceEmpty(let flags, let pts, let timeout): + if boxed { + buffer.appendInt32(1041346555) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(pts, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(timeout!, buffer: buffer, boxed: false)} + break + case .channelDifference(let flags, let pts, let timeout, let newMessages, let otherUpdates, let chats, let users): + if boxed { + buffer.appendInt32(543450958) + } + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(pts, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(timeout!, buffer: buffer, boxed: false)} + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(newMessages.count)) + for item in newMessages { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(otherUpdates.count)) + for item in otherUpdates { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(chats.count)) + for item in chats { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + break + case .channelDifferenceTooLong(let flags, let timeout, let dialog, let messages, let chats, let users): + if boxed { + buffer.appendInt32(-1531132162) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(timeout!, buffer: buffer, boxed: false)} + dialog.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(messages.count)) + for item in messages { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(chats.count)) + for item in chats { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .channelDifferenceEmpty(let flags, let pts, let timeout): + return ("channelDifferenceEmpty", [("flags", flags), ("pts", pts), ("timeout", timeout)]) + case .channelDifference(let flags, let pts, let timeout, let newMessages, let otherUpdates, let chats, let users): + return ("channelDifference", [("flags", flags), ("pts", pts), ("timeout", timeout), ("newMessages", newMessages), ("otherUpdates", otherUpdates), ("chats", chats), ("users", users)]) + case .channelDifferenceTooLong(let flags, let timeout, let dialog, let messages, let chats, let users): + return ("channelDifferenceTooLong", [("flags", flags), ("timeout", timeout), ("dialog", dialog), ("messages", messages), ("chats", chats), ("users", users)]) + } + } + + public static func parse_channelDifferenceEmpty(_ reader: BufferReader) -> ChannelDifference? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_3 = reader.readInt32() } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.updates.ChannelDifference.channelDifferenceEmpty(flags: _1!, pts: _2!, timeout: _3) + } + else { + return nil + } + } + public static func parse_channelDifference(_ reader: BufferReader) -> ChannelDifference? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_3 = reader.readInt32() } + var _4: [Api.Message]? + if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Message.self) + } + var _5: [Api.Update]? + if let _ = reader.readInt32() { + _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Update.self) + } + var _6: [Api.Chat]? + if let _ = reader.readInt32() { + _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) + } + var _7: [Api.User]? + if let _ = reader.readInt32() { + _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { + return Api.updates.ChannelDifference.channelDifference(flags: _1!, pts: _2!, timeout: _3, newMessages: _4!, otherUpdates: _5!, chats: _6!, users: _7!) + } + else { + return nil + } + } + public static func parse_channelDifferenceTooLong(_ reader: BufferReader) -> ChannelDifference? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + if Int(_1!) & Int(1 << 1) != 0 {_2 = reader.readInt32() } + var _3: Api.Dialog? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.Dialog + } + var _4: [Api.Message]? + if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Message.self) + } + var _5: [Api.Chat]? + if let _ = reader.readInt32() { + _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) + } + var _6: [Api.User]? + if let _ = reader.readInt32() { + _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.updates.ChannelDifference.channelDifferenceTooLong(flags: _1!, timeout: _2, dialog: _3!, messages: _4!, chats: _5!, users: _6!) + } + else { + return nil + } + } + + } +} +} +public extension Api { +public struct upload { + public enum WebFile: TypeConstructorDescription { + case webFile(size: Int32, mimeType: String, fileType: Api.storage.FileType, mtime: Int32, bytes: Buffer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .webFile(let size, let mimeType, let fileType, let mtime, let bytes): + if boxed { + buffer.appendInt32(568808380) + } + serializeInt32(size, buffer: buffer, boxed: false) + serializeString(mimeType, buffer: buffer, boxed: false) + fileType.serialize(buffer, true) + serializeInt32(mtime, buffer: buffer, boxed: false) + serializeBytes(bytes, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .webFile(let size, let mimeType, let fileType, let mtime, let bytes): + return ("webFile", [("size", size), ("mimeType", mimeType), ("fileType", fileType), ("mtime", mtime), ("bytes", bytes)]) + } + } + + public static func parse_webFile(_ reader: BufferReader) -> WebFile? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + _2 = parseString(reader) + var _3: Api.storage.FileType? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.storage.FileType + } + var _4: Int32? + _4 = reader.readInt32() + var _5: Buffer? + _5 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.upload.WebFile.webFile(size: _1!, mimeType: _2!, fileType: _3!, mtime: _4!, bytes: _5!) + } + else { + return nil + } + } + + } + public enum File: TypeConstructorDescription { + case file(type: Api.storage.FileType, mtime: Int32, bytes: Buffer) + case fileCdnRedirect(dcId: Int32, fileToken: Buffer, encryptionKey: Buffer, encryptionIv: Buffer, fileHashes: [Api.FileHash]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .file(let type, let mtime, let bytes): + if boxed { + buffer.appendInt32(157948117) + } + type.serialize(buffer, true) + serializeInt32(mtime, buffer: buffer, boxed: false) + serializeBytes(bytes, buffer: buffer, boxed: false) + break + case .fileCdnRedirect(let dcId, let fileToken, let encryptionKey, let encryptionIv, let fileHashes): + if boxed { + buffer.appendInt32(-242427324) + } + serializeInt32(dcId, buffer: buffer, boxed: false) + serializeBytes(fileToken, buffer: buffer, boxed: false) + serializeBytes(encryptionKey, buffer: buffer, boxed: false) + serializeBytes(encryptionIv, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(fileHashes.count)) + for item in fileHashes { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .file(let type, let mtime, let bytes): + return ("file", [("type", type), ("mtime", mtime), ("bytes", bytes)]) + case .fileCdnRedirect(let dcId, let fileToken, let encryptionKey, let encryptionIv, let fileHashes): + return ("fileCdnRedirect", [("dcId", dcId), ("fileToken", fileToken), ("encryptionKey", encryptionKey), ("encryptionIv", encryptionIv), ("fileHashes", fileHashes)]) + } + } + + public static func parse_file(_ reader: BufferReader) -> File? { + var _1: Api.storage.FileType? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.storage.FileType + } + var _2: Int32? + _2 = reader.readInt32() + var _3: Buffer? + _3 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.upload.File.file(type: _1!, mtime: _2!, bytes: _3!) + } + else { + return nil + } + } + public static func parse_fileCdnRedirect(_ reader: BufferReader) -> File? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Buffer? + _2 = parseBytes(reader) + var _3: Buffer? + _3 = parseBytes(reader) + var _4: Buffer? + _4 = parseBytes(reader) + var _5: [Api.FileHash]? + if let _ = reader.readInt32() { + _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.FileHash.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.upload.File.fileCdnRedirect(dcId: _1!, fileToken: _2!, encryptionKey: _3!, encryptionIv: _4!, fileHashes: _5!) + } + else { + return nil + } + } + + } + public enum CdnFile: TypeConstructorDescription { + case cdnFileReuploadNeeded(requestToken: Buffer) + case cdnFile(bytes: Buffer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .cdnFileReuploadNeeded(let requestToken): + if boxed { + buffer.appendInt32(-290921362) + } + serializeBytes(requestToken, buffer: buffer, boxed: false) + break + case .cdnFile(let bytes): + if boxed { + buffer.appendInt32(-1449145777) + } + serializeBytes(bytes, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .cdnFileReuploadNeeded(let requestToken): + return ("cdnFileReuploadNeeded", [("requestToken", requestToken)]) + case .cdnFile(let bytes): + return ("cdnFile", [("bytes", bytes)]) + } + } + + public static func parse_cdnFileReuploadNeeded(_ reader: BufferReader) -> CdnFile? { + var _1: Buffer? + _1 = parseBytes(reader) + let _c1 = _1 != nil + if _c1 { + return Api.upload.CdnFile.cdnFileReuploadNeeded(requestToken: _1!) + } + else { + return nil + } + } + public static func parse_cdnFile(_ reader: BufferReader) -> CdnFile? { + var _1: Buffer? + _1 = parseBytes(reader) + let _c1 = _1 != nil + if _c1 { + return Api.upload.CdnFile.cdnFile(bytes: _1!) + } + else { + return nil + } + } + + } +} +} +public extension Api { +public struct storage { + public enum FileType: TypeConstructorDescription { + case fileUnknown + case filePartial + case fileJpeg + case fileGif + case filePng + case filePdf + case fileMp3 + case fileMov + case fileMp4 + case fileWebp + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .fileUnknown: + if boxed { + buffer.appendInt32(-1432995067) + } + + break + case .filePartial: + if boxed { + buffer.appendInt32(1086091090) + } + + break + case .fileJpeg: + if boxed { + buffer.appendInt32(8322574) + } + + break + case .fileGif: + if boxed { + buffer.appendInt32(-891180321) + } + + break + case .filePng: + if boxed { + buffer.appendInt32(172975040) + } + + break + case .filePdf: + if boxed { + buffer.appendInt32(-1373745011) + } + + break + case .fileMp3: + if boxed { + buffer.appendInt32(1384777335) + } + + break + case .fileMov: + if boxed { + buffer.appendInt32(1258941372) + } + + break + case .fileMp4: + if boxed { + buffer.appendInt32(-1278304028) + } + + break + case .fileWebp: + if boxed { + buffer.appendInt32(276907596) + } + + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .fileUnknown: + return ("fileUnknown", []) + case .filePartial: + return ("filePartial", []) + case .fileJpeg: + return ("fileJpeg", []) + case .fileGif: + return ("fileGif", []) + case .filePng: + return ("filePng", []) + case .filePdf: + return ("filePdf", []) + case .fileMp3: + return ("fileMp3", []) + case .fileMov: + return ("fileMov", []) + case .fileMp4: + return ("fileMp4", []) + case .fileWebp: + return ("fileWebp", []) + } + } + + public static func parse_fileUnknown(_ reader: BufferReader) -> FileType? { + return Api.storage.FileType.fileUnknown + } + public static func parse_filePartial(_ reader: BufferReader) -> FileType? { + return Api.storage.FileType.filePartial + } + public static func parse_fileJpeg(_ reader: BufferReader) -> FileType? { + return Api.storage.FileType.fileJpeg + } + public static func parse_fileGif(_ reader: BufferReader) -> FileType? { + return Api.storage.FileType.fileGif + } + public static func parse_filePng(_ reader: BufferReader) -> FileType? { + return Api.storage.FileType.filePng + } + public static func parse_filePdf(_ reader: BufferReader) -> FileType? { + return Api.storage.FileType.filePdf + } + public static func parse_fileMp3(_ reader: BufferReader) -> FileType? { + return Api.storage.FileType.fileMp3 + } + public static func parse_fileMov(_ reader: BufferReader) -> FileType? { + return Api.storage.FileType.fileMov + } + public static func parse_fileMp4(_ reader: BufferReader) -> FileType? { + return Api.storage.FileType.fileMp4 + } + public static func parse_fileWebp(_ reader: BufferReader) -> FileType? { + return Api.storage.FileType.fileWebp + } + + } +} +} +public extension Api { +public struct account { + public enum TmpPassword: TypeConstructorDescription { + case tmpPassword(tmpPassword: Buffer, validUntil: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .tmpPassword(let tmpPassword, let validUntil): + if boxed { + buffer.appendInt32(-614138572) + } + serializeBytes(tmpPassword, buffer: buffer, boxed: false) + serializeInt32(validUntil, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .tmpPassword(let tmpPassword, let validUntil): + return ("tmpPassword", [("tmpPassword", tmpPassword), ("validUntil", validUntil)]) + } + } + + public static func parse_tmpPassword(_ reader: BufferReader) -> TmpPassword? { + var _1: Buffer? + _1 = parseBytes(reader) + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.account.TmpPassword.tmpPassword(tmpPassword: _1!, validUntil: _2!) + } + else { + return nil + } + } + + } + public enum PasswordSettings: TypeConstructorDescription { + case passwordSettings(flags: Int32, email: String?, secureSettings: Api.SecureSecretSettings?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .passwordSettings(let flags, let email, let secureSettings): + if boxed { + buffer.appendInt32(-1705233435) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeString(email!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {secureSettings!.serialize(buffer, true)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .passwordSettings(let flags, let email, let secureSettings): + return ("passwordSettings", [("flags", flags), ("email", email), ("secureSettings", secureSettings)]) + } + } + + public static func parse_passwordSettings(_ reader: BufferReader) -> PasswordSettings? { + var _1: Int32? + _1 = reader.readInt32() + var _2: String? + if Int(_1!) & Int(1 << 0) != 0 {_2 = parseString(reader) } + var _3: Api.SecureSecretSettings? + if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.SecureSecretSettings + } } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + if _c1 && _c2 && _c3 { + return Api.account.PasswordSettings.passwordSettings(flags: _1!, email: _2, secureSettings: _3) + } + else { + return nil + } + } + + } + public enum Themes: TypeConstructorDescription { + case themesNotModified + case themes(hash: Int32, themes: [Api.Theme]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .themesNotModified: + if boxed { + buffer.appendInt32(-199313886) + } + + break + case .themes(let hash, let themes): + if boxed { + buffer.appendInt32(2137482273) + } + serializeInt32(hash, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(themes.count)) + for item in themes { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .themesNotModified: + return ("themesNotModified", []) + case .themes(let hash, let themes): + return ("themes", [("hash", hash), ("themes", themes)]) + } + } + + public static func parse_themesNotModified(_ reader: BufferReader) -> Themes? { + return Api.account.Themes.themesNotModified + } + public static func parse_themes(_ reader: BufferReader) -> Themes? { + var _1: Int32? + _1 = reader.readInt32() + var _2: [Api.Theme]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Theme.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.account.Themes.themes(hash: _1!, themes: _2!) + } + else { + return nil + } + } + + } + public enum WallPapers: TypeConstructorDescription { + case wallPapersNotModified + case wallPapers(hash: Int32, wallpapers: [Api.WallPaper]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .wallPapersNotModified: + if boxed { + buffer.appendInt32(471437699) + } + + break + case .wallPapers(let hash, let wallpapers): + if boxed { + buffer.appendInt32(1881892265) + } + serializeInt32(hash, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(wallpapers.count)) + for item in wallpapers { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .wallPapersNotModified: + return ("wallPapersNotModified", []) + case .wallPapers(let hash, let wallpapers): + return ("wallPapers", [("hash", hash), ("wallpapers", wallpapers)]) + } + } + + public static func parse_wallPapersNotModified(_ reader: BufferReader) -> WallPapers? { + return Api.account.WallPapers.wallPapersNotModified + } + public static func parse_wallPapers(_ reader: BufferReader) -> WallPapers? { + var _1: Int32? + _1 = reader.readInt32() + var _2: [Api.WallPaper]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.WallPaper.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.account.WallPapers.wallPapers(hash: _1!, wallpapers: _2!) + } + else { + return nil + } + } + + } + public enum PasswordInputSettings: TypeConstructorDescription { + case passwordInputSettings(flags: Int32, newAlgo: Api.PasswordKdfAlgo?, newPasswordHash: Buffer?, hint: String?, email: String?, newSecureSettings: Api.SecureSecretSettings?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .passwordInputSettings(let flags, let newAlgo, let newPasswordHash, let hint, let email, let newSecureSettings): + if boxed { + buffer.appendInt32(-1036572727) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {newAlgo!.serialize(buffer, true)} + if Int(flags) & Int(1 << 0) != 0 {serializeBytes(newPasswordHash!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 0) != 0 {serializeString(hint!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeString(email!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {newSecureSettings!.serialize(buffer, true)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .passwordInputSettings(let flags, let newAlgo, let newPasswordHash, let hint, let email, let newSecureSettings): + return ("passwordInputSettings", [("flags", flags), ("newAlgo", newAlgo), ("newPasswordHash", newPasswordHash), ("hint", hint), ("email", email), ("newSecureSettings", newSecureSettings)]) + } + } + + public static func parse_passwordInputSettings(_ reader: BufferReader) -> PasswordInputSettings? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.PasswordKdfAlgo? + if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.PasswordKdfAlgo + } } + var _3: Buffer? + if Int(_1!) & Int(1 << 0) != 0 {_3 = parseBytes(reader) } + var _4: String? + if Int(_1!) & Int(1 << 0) != 0 {_4 = parseString(reader) } + var _5: String? + if Int(_1!) & Int(1 << 1) != 0 {_5 = parseString(reader) } + var _6: Api.SecureSecretSettings? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _6 = Api.parse(reader, signature: signature) as? Api.SecureSecretSettings + } } + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.account.PasswordInputSettings.passwordInputSettings(flags: _1!, newAlgo: _2, newPasswordHash: _3, hint: _4, email: _5, newSecureSettings: _6) + } + else { + return nil + } + } + + } + public enum WebAuthorizations: TypeConstructorDescription { + case webAuthorizations(authorizations: [Api.WebAuthorization], users: [Api.User]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .webAuthorizations(let authorizations, let users): + if boxed { + buffer.appendInt32(-313079300) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(authorizations.count)) + for item in authorizations { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .webAuthorizations(let authorizations, let users): + return ("webAuthorizations", [("authorizations", authorizations), ("users", users)]) + } + } + + public static func parse_webAuthorizations(_ reader: BufferReader) -> WebAuthorizations? { + var _1: [Api.WebAuthorization]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.WebAuthorization.self) + } + var _2: [Api.User]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.account.WebAuthorizations.webAuthorizations(authorizations: _1!, users: _2!) + } + else { + return nil + } + } + + } + public enum SentEmailCode: TypeConstructorDescription { + case sentEmailCode(emailPattern: String, length: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .sentEmailCode(let emailPattern, let length): + if boxed { + buffer.appendInt32(-2128640689) + } + serializeString(emailPattern, buffer: buffer, boxed: false) + serializeInt32(length, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .sentEmailCode(let emailPattern, let length): + return ("sentEmailCode", [("emailPattern", emailPattern), ("length", length)]) + } + } + + public static func parse_sentEmailCode(_ reader: BufferReader) -> SentEmailCode? { + var _1: String? + _1 = parseString(reader) + var _2: Int32? + _2 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.account.SentEmailCode.sentEmailCode(emailPattern: _1!, length: _2!) + } + else { + return nil + } + } + + } + public enum ContentSettings: TypeConstructorDescription { + case contentSettings(flags: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .contentSettings(let flags): + if boxed { + buffer.appendInt32(1474462241) + } + serializeInt32(flags, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .contentSettings(let flags): + return ("contentSettings", [("flags", flags)]) + } + } + + public static func parse_contentSettings(_ reader: BufferReader) -> ContentSettings? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.account.ContentSettings.contentSettings(flags: _1!) + } + else { + return nil + } + } + + } + public enum Authorizations: TypeConstructorDescription { + case authorizations(authorizations: [Api.Authorization]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .authorizations(let authorizations): + if boxed { + buffer.appendInt32(307276766) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(authorizations.count)) + for item in authorizations { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .authorizations(let authorizations): + return ("authorizations", [("authorizations", authorizations)]) + } + } + + public static func parse_authorizations(_ reader: BufferReader) -> Authorizations? { + var _1: [Api.Authorization]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Authorization.self) + } + let _c1 = _1 != nil + if _c1 { + return Api.account.Authorizations.authorizations(authorizations: _1!) + } + else { + return nil + } + } + + } + public enum AuthorizationForm: TypeConstructorDescription { + case authorizationForm(flags: Int32, requiredTypes: [Api.SecureRequiredType], values: [Api.SecureValue], errors: [Api.SecureValueError], users: [Api.User], privacyPolicyUrl: String?) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .authorizationForm(let flags, let requiredTypes, let values, let errors, let users, let privacyPolicyUrl): + if boxed { + buffer.appendInt32(-1389486888) + } + serializeInt32(flags, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(requiredTypes.count)) + for item in requiredTypes { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(values.count)) + for item in values { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(errors.count)) + for item in errors { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + if Int(flags) & Int(1 << 0) != 0 {serializeString(privacyPolicyUrl!, buffer: buffer, boxed: false)} + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .authorizationForm(let flags, let requiredTypes, let values, let errors, let users, let privacyPolicyUrl): + return ("authorizationForm", [("flags", flags), ("requiredTypes", requiredTypes), ("values", values), ("errors", errors), ("users", users), ("privacyPolicyUrl", privacyPolicyUrl)]) + } + } + + public static func parse_authorizationForm(_ reader: BufferReader) -> AuthorizationForm? { + var _1: Int32? + _1 = reader.readInt32() + var _2: [Api.SecureRequiredType]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureRequiredType.self) + } + var _3: [Api.SecureValue]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureValue.self) + } + var _4: [Api.SecureValueError]? + if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureValueError.self) + } + var _5: [Api.User]? + if let _ = reader.readInt32() { + _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + var _6: String? + if Int(_1!) & Int(1 << 0) != 0 {_6 = parseString(reader) } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { + return Api.account.AuthorizationForm.authorizationForm(flags: _1!, requiredTypes: _2!, values: _3!, errors: _4!, users: _5!, privacyPolicyUrl: _6) + } + else { + return nil + } + } + + } + public enum Password: TypeConstructorDescription { + case password(flags: Int32, currentAlgo: Api.PasswordKdfAlgo?, srpB: Buffer?, srpId: Int64?, hint: String?, emailUnconfirmedPattern: String?, newAlgo: Api.PasswordKdfAlgo, newSecureAlgo: Api.SecurePasswordKdfAlgo, secureRandom: Buffer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .password(let flags, let currentAlgo, let srpB, let srpId, let hint, let emailUnconfirmedPattern, let newAlgo, let newSecureAlgo, let secureRandom): + if boxed { + buffer.appendInt32(-1390001672) + } + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 2) != 0 {currentAlgo!.serialize(buffer, true)} + if Int(flags) & Int(1 << 2) != 0 {serializeBytes(srpB!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeInt64(srpId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {serializeString(hint!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 4) != 0 {serializeString(emailUnconfirmedPattern!, buffer: buffer, boxed: false)} + newAlgo.serialize(buffer, true) + newSecureAlgo.serialize(buffer, true) + serializeBytes(secureRandom, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .password(let flags, let currentAlgo, let srpB, let srpId, let hint, let emailUnconfirmedPattern, let newAlgo, let newSecureAlgo, let secureRandom): + return ("password", [("flags", flags), ("currentAlgo", currentAlgo), ("srpB", srpB), ("srpId", srpId), ("hint", hint), ("emailUnconfirmedPattern", emailUnconfirmedPattern), ("newAlgo", newAlgo), ("newSecureAlgo", newSecureAlgo), ("secureRandom", secureRandom)]) + } + } + + public static func parse_password(_ reader: BufferReader) -> Password? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Api.PasswordKdfAlgo? + if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.PasswordKdfAlgo + } } + var _3: Buffer? + if Int(_1!) & Int(1 << 2) != 0 {_3 = parseBytes(reader) } + var _4: Int64? + if Int(_1!) & Int(1 << 2) != 0 {_4 = reader.readInt64() } + var _5: String? + if Int(_1!) & Int(1 << 3) != 0 {_5 = parseString(reader) } + var _6: String? + if Int(_1!) & Int(1 << 4) != 0 {_6 = parseString(reader) } + var _7: Api.PasswordKdfAlgo? + if let signature = reader.readInt32() { + _7 = Api.parse(reader, signature: signature) as? Api.PasswordKdfAlgo + } + var _8: Api.SecurePasswordKdfAlgo? + if let signature = reader.readInt32() { + _8 = Api.parse(reader, signature: signature) as? Api.SecurePasswordKdfAlgo + } + var _9: Buffer? + _9 = parseBytes(reader) + let _c1 = _1 != nil + let _c2 = (Int(_1!) & Int(1 << 2) == 0) || _2 != nil + let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil + let _c6 = (Int(_1!) & Int(1 << 4) == 0) || _6 != nil + let _c7 = _7 != nil + let _c8 = _8 != nil + let _c9 = _9 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { + return Api.account.Password.password(flags: _1!, currentAlgo: _2, srpB: _3, srpId: _4, hint: _5, emailUnconfirmedPattern: _6, newAlgo: _7!, newSecureAlgo: _8!, secureRandom: _9!) + } + else { + return nil + } + } + + } + public enum PrivacyRules: TypeConstructorDescription { + case privacyRules(rules: [Api.PrivacyRule], chats: [Api.Chat], users: [Api.User]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .privacyRules(let rules, let chats, let users): + if boxed { + buffer.appendInt32(1352683077) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(rules.count)) + for item in rules { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(chats.count)) + for item in chats { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .privacyRules(let rules, let chats, let users): + return ("privacyRules", [("rules", rules), ("chats", chats), ("users", users)]) + } + } + + public static func parse_privacyRules(_ reader: BufferReader) -> PrivacyRules? { + var _1: [Api.PrivacyRule]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PrivacyRule.self) + } + var _2: [Api.Chat]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) + } + var _3: [Api.User]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.account.PrivacyRules.privacyRules(rules: _1!, chats: _2!, users: _3!) + } + else { + return nil + } + } + + } + public enum AutoDownloadSettings: TypeConstructorDescription { + case autoDownloadSettings(low: Api.AutoDownloadSettings, medium: Api.AutoDownloadSettings, high: Api.AutoDownloadSettings) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .autoDownloadSettings(let low, let medium, let high): + if boxed { + buffer.appendInt32(1674235686) + } + low.serialize(buffer, true) + medium.serialize(buffer, true) + high.serialize(buffer, true) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .autoDownloadSettings(let low, let medium, let high): + return ("autoDownloadSettings", [("low", low), ("medium", medium), ("high", high)]) + } + } + + public static func parse_autoDownloadSettings(_ reader: BufferReader) -> AutoDownloadSettings? { + var _1: Api.AutoDownloadSettings? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.AutoDownloadSettings + } + var _2: Api.AutoDownloadSettings? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.AutoDownloadSettings + } + var _3: Api.AutoDownloadSettings? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.AutoDownloadSettings + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.account.AutoDownloadSettings.autoDownloadSettings(low: _1!, medium: _2!, high: _3!) + } + else { + return nil + } + } + + } +} +} +public extension Api { +public struct wallet { + public enum KeySecretSalt: TypeConstructorDescription { + case secretSalt(salt: Buffer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .secretSalt(let salt): + if boxed { + buffer.appendInt32(-582464156) + } + serializeBytes(salt, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .secretSalt(let salt): + return ("secretSalt", [("salt", salt)]) + } + } + + public static func parse_secretSalt(_ reader: BufferReader) -> KeySecretSalt? { + var _1: Buffer? + _1 = parseBytes(reader) + let _c1 = _1 != nil + if _c1 { + return Api.wallet.KeySecretSalt.secretSalt(salt: _1!) + } + else { + return nil + } + } + + } + public enum LiteResponse: TypeConstructorDescription { + case liteResponse(response: Buffer) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .liteResponse(let response): + if boxed { + buffer.appendInt32(1984136919) + } + serializeBytes(response, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .liteResponse(let response): + return ("liteResponse", [("response", response)]) + } + } + + public static func parse_liteResponse(_ reader: BufferReader) -> LiteResponse? { + var _1: Buffer? + _1 = parseBytes(reader) + let _c1 = _1 != nil + if _c1 { + return Api.wallet.LiteResponse.liteResponse(response: _1!) + } + else { + return nil + } + } + + } +} +} +public extension Api { +public struct photos { + public enum Photo: TypeConstructorDescription { + case photo(photo: Api.Photo, users: [Api.User]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .photo(let photo, let users): + if boxed { + buffer.appendInt32(539045032) + } + photo.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .photo(let photo, let users): + return ("photo", [("photo", photo), ("users", users)]) + } + } + + public static func parse_photo(_ reader: BufferReader) -> Photo? { + var _1: Api.Photo? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Photo + } + var _2: [Api.User]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.photos.Photo.photo(photo: _1!, users: _2!) + } + else { + return nil + } + } + + } + public enum Photos: TypeConstructorDescription { + case photos(photos: [Api.Photo], users: [Api.User]) + case photosSlice(count: Int32, photos: [Api.Photo], users: [Api.User]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .photos(let photos, let users): + if boxed { + buffer.appendInt32(-1916114267) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(photos.count)) + for item in photos { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + break + case .photosSlice(let count, let photos, let users): + if boxed { + buffer.appendInt32(352657236) + } + serializeInt32(count, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(photos.count)) + for item in photos { + item.serialize(buffer, true) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .photos(let photos, let users): + return ("photos", [("photos", photos), ("users", users)]) + case .photosSlice(let count, let photos, let users): + return ("photosSlice", [("count", count), ("photos", photos), ("users", users)]) + } + } + + public static func parse_photos(_ reader: BufferReader) -> Photos? { + var _1: [Api.Photo]? + if let _ = reader.readInt32() { + _1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Photo.self) + } + var _2: [Api.User]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.photos.Photos.photos(photos: _1!, users: _2!) + } + else { + return nil + } + } + public static func parse_photosSlice(_ reader: BufferReader) -> Photos? { + var _1: Int32? + _1 = reader.readInt32() + var _2: [Api.Photo]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Photo.self) + } + var _3: [Api.User]? + if let _ = reader.readInt32() { + _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + if _c1 && _c2 && _c3 { + return Api.photos.Photos.photosSlice(count: _1!, photos: _2!, users: _3!) + } + else { + return nil + } + } + + } +} +} +public extension Api { +public struct phone { + public enum GroupCall: TypeConstructorDescription { + case groupCall(call: Api.GroupCall, participants: [Api.GroupCallParticipant], participantsNextOffset: String, users: [Api.User]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .groupCall(let call, let participants, let participantsNextOffset, let users): + if boxed { + buffer.appendInt32(1722485756) + } + call.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(participants.count)) + for item in participants { + item.serialize(buffer, true) + } + serializeString(participantsNextOffset, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .groupCall(let call, let participants, let participantsNextOffset, let users): + return ("groupCall", [("call", call), ("participants", participants), ("participantsNextOffset", participantsNextOffset), ("users", users)]) + } + } + + public static func parse_groupCall(_ reader: BufferReader) -> GroupCall? { + var _1: Api.GroupCall? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.GroupCall + } + var _2: [Api.GroupCallParticipant]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.GroupCallParticipant.self) + } + var _3: String? + _3 = parseString(reader) + var _4: [Api.User]? + if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.phone.GroupCall.groupCall(call: _1!, participants: _2!, participantsNextOffset: _3!, users: _4!) + } + else { + return nil + } + } + + } + public enum GroupParticipants: TypeConstructorDescription { + case groupParticipants(count: Int32, participants: [Api.GroupCallParticipant], nextOffset: String, users: [Api.User], version: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .groupParticipants(let count, let participants, let nextOffset, let users, let version): + if boxed { + buffer.appendInt32(-1661028051) + } + serializeInt32(count, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(participants.count)) + for item in participants { + item.serialize(buffer, true) + } + serializeString(nextOffset, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + serializeInt32(version, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .groupParticipants(let count, let participants, let nextOffset, let users, let version): + return ("groupParticipants", [("count", count), ("participants", participants), ("nextOffset", nextOffset), ("users", users), ("version", version)]) + } + } + + public static func parse_groupParticipants(_ reader: BufferReader) -> GroupParticipants? { + var _1: Int32? + _1 = reader.readInt32() + var _2: [Api.GroupCallParticipant]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.GroupCallParticipant.self) + } + var _3: String? + _3 = parseString(reader) + var _4: [Api.User]? + if let _ = reader.readInt32() { + _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + var _5: Int32? + _5 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.phone.GroupParticipants.groupParticipants(count: _1!, participants: _2!, nextOffset: _3!, users: _4!, version: _5!) + } + else { + return nil + } + } + + } + public enum PhoneCall: TypeConstructorDescription { + case phoneCall(phoneCall: Api.PhoneCall, users: [Api.User]) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .phoneCall(let phoneCall, let users): + if boxed { + buffer.appendInt32(-326966976) + } + phoneCall.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .phoneCall(let phoneCall, let users): + return ("phoneCall", [("phoneCall", phoneCall), ("users", users)]) + } + } + + public static func parse_phoneCall(_ reader: BufferReader) -> PhoneCall? { + var _1: Api.PhoneCall? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.PhoneCall + } + var _2: [Api.User]? + if let _ = reader.readInt32() { + _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + let _c1 = _1 != nil + let _c2 = _2 != nil + if _c1 && _c2 { + return Api.phone.PhoneCall.phoneCall(phoneCall: _1!, users: _2!) + } + else { + return nil + } + } + + } +} +} +public extension Api { + public struct functions { + public struct messages { + public static func getHistory(peer: Api.InputPeer, offsetId: Int32, offsetDate: Int32, addOffset: Int32, limit: Int32, maxId: Int32, minId: Int32, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-591691168) + peer.serialize(buffer, true) + serializeInt32(offsetId, buffer: buffer, boxed: false) + serializeInt32(offsetDate, buffer: buffer, boxed: false) + serializeInt32(addOffset, buffer: buffer, boxed: false) + serializeInt32(limit, buffer: buffer, boxed: false) + serializeInt32(maxId, buffer: buffer, boxed: false) + serializeInt32(minId, buffer: buffer, boxed: false) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getHistory", parameters: [("peer", peer), ("offsetId", offsetId), ("offsetDate", offsetDate), ("addOffset", addOffset), ("limit", limit), ("maxId", maxId), ("minId", minId), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in + let reader = BufferReader(buffer) + var result: Api.messages.Messages? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.Messages + } + return result + }) + } + + public static func readHistory(peer: Api.InputPeer, maxId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(238054714) + peer.serialize(buffer, true) + serializeInt32(maxId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.readHistory", parameters: [("peer", peer), ("maxId", maxId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AffectedMessages? in + let reader = BufferReader(buffer) + var result: Api.messages.AffectedMessages? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.AffectedMessages + } + return result + }) + } + + public static func deleteHistory(flags: Int32, peer: Api.InputPeer, maxId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(469850889) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + serializeInt32(maxId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.deleteHistory", parameters: [("flags", flags), ("peer", peer), ("maxId", maxId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AffectedHistory? in + let reader = BufferReader(buffer) + var result: Api.messages.AffectedHistory? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.AffectedHistory + } + return result + }) + } + + public static func deleteMessages(flags: Int32, id: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-443640366) + serializeInt32(flags, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(id.count)) + for item in id { + serializeInt32(item, buffer: buffer, boxed: false) + } + return (FunctionDescription(name: "messages.deleteMessages", parameters: [("flags", flags), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AffectedMessages? in + let reader = BufferReader(buffer) + var result: Api.messages.AffectedMessages? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.AffectedMessages + } + return result + }) + } + + public static func receivedMessages(maxId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.ReceivedNotifyMessage]>) { + let buffer = Buffer() + buffer.appendInt32(94983360) + serializeInt32(maxId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.receivedMessages", parameters: [("maxId", maxId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.ReceivedNotifyMessage]? in + let reader = BufferReader(buffer) + var result: [Api.ReceivedNotifyMessage]? + if let _ = reader.readInt32() { + result = Api.parseVector(reader, elementSignature: 0, elementType: Api.ReceivedNotifyMessage.self) + } + return result + }) + } + + public static func reportSpam(peer: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-820669733) + peer.serialize(buffer, true) + return (FunctionDescription(name: "messages.reportSpam", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getPeerSettings(peer: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(913498268) + peer.serialize(buffer, true) + return (FunctionDescription(name: "messages.getPeerSettings", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.PeerSettings? in + let reader = BufferReader(buffer) + var result: Api.PeerSettings? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.PeerSettings + } + return result + }) + } + + public static func getChats(id: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1013621127) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(id.count)) + for item in id { + serializeInt32(item, buffer: buffer, boxed: false) + } + return (FunctionDescription(name: "messages.getChats", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Chats? in + let reader = BufferReader(buffer) + var result: Api.messages.Chats? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.Chats + } + return result + }) + } + + public static func getFullChat(chatId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(998448230) + serializeInt32(chatId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getFullChat", parameters: [("chatId", chatId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.ChatFull? in + let reader = BufferReader(buffer) + var result: Api.messages.ChatFull? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.ChatFull + } + return result + }) + } + + public static func editChatTitle(chatId: Int32, title: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-599447467) + serializeInt32(chatId, buffer: buffer, boxed: false) + serializeString(title, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.editChatTitle", parameters: [("chatId", chatId), ("title", title)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func editChatPhoto(chatId: Int32, photo: Api.InputChatPhoto) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-900957736) + serializeInt32(chatId, buffer: buffer, boxed: false) + photo.serialize(buffer, true) + return (FunctionDescription(name: "messages.editChatPhoto", parameters: [("chatId", chatId), ("photo", photo)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func addChatUser(chatId: Int32, userId: Api.InputUser, fwdLimit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-106911223) + serializeInt32(chatId, buffer: buffer, boxed: false) + userId.serialize(buffer, true) + serializeInt32(fwdLimit, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.addChatUser", parameters: [("chatId", chatId), ("userId", userId), ("fwdLimit", fwdLimit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func createChat(users: [Api.InputUser], title: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(164303470) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + serializeString(title, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.createChat", parameters: [("users", users), ("title", title)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func forwardMessage(peer: Api.InputPeer, id: Int32, randomId: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(865483769) + peer.serialize(buffer, true) + serializeInt32(id, buffer: buffer, boxed: false) + serializeInt64(randomId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.forwardMessage", parameters: [("peer", peer), ("id", id), ("randomId", randomId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func getDhConfig(version: Int32, randomLength: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(651135312) + serializeInt32(version, buffer: buffer, boxed: false) + serializeInt32(randomLength, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getDhConfig", parameters: [("version", version), ("randomLength", randomLength)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.DhConfig? in + let reader = BufferReader(buffer) + var result: Api.messages.DhConfig? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.DhConfig + } + return result + }) + } + + public static func requestEncryption(userId: Api.InputUser, randomId: Int32, gA: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-162681021) + userId.serialize(buffer, true) + serializeInt32(randomId, buffer: buffer, boxed: false) + serializeBytes(gA, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.requestEncryption", parameters: [("userId", userId), ("randomId", randomId), ("gA", gA)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.EncryptedChat? in + let reader = BufferReader(buffer) + var result: Api.EncryptedChat? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.EncryptedChat + } + return result + }) + } + + public static func acceptEncryption(peer: Api.InputEncryptedChat, gB: Buffer, keyFingerprint: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1035731989) + peer.serialize(buffer, true) + serializeBytes(gB, buffer: buffer, boxed: false) + serializeInt64(keyFingerprint, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.acceptEncryption", parameters: [("peer", peer), ("gB", gB), ("keyFingerprint", keyFingerprint)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.EncryptedChat? in + let reader = BufferReader(buffer) + var result: Api.EncryptedChat? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.EncryptedChat + } + return result + }) + } + + public static func setEncryptedTyping(peer: Api.InputEncryptedChat, typing: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(2031374829) + peer.serialize(buffer, true) + typing.serialize(buffer, true) + return (FunctionDescription(name: "messages.setEncryptedTyping", parameters: [("peer", peer), ("typing", typing)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func readEncryptedHistory(peer: Api.InputEncryptedChat, maxDate: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(2135648522) + peer.serialize(buffer, true) + serializeInt32(maxDate, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.readEncryptedHistory", parameters: [("peer", peer), ("maxDate", maxDate)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func sendEncryptedService(peer: Api.InputEncryptedChat, randomId: Int64, data: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(852769188) + peer.serialize(buffer, true) + serializeInt64(randomId, buffer: buffer, boxed: false) + serializeBytes(data, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.sendEncryptedService", parameters: [("peer", peer), ("randomId", randomId), ("data", data)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.SentEncryptedMessage? in + let reader = BufferReader(buffer) + var result: Api.messages.SentEncryptedMessage? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.SentEncryptedMessage + } + return result + }) + } + + public static func receivedQueue(maxQts: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Int64]>) { + let buffer = Buffer() + buffer.appendInt32(1436924774) + serializeInt32(maxQts, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.receivedQueue", parameters: [("maxQts", maxQts)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Int64]? in + let reader = BufferReader(buffer) + var result: [Int64]? + if let _ = reader.readInt32() { + result = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self) + } + return result + }) + } + + public static func reportEncryptedSpam(peer: Api.InputEncryptedChat) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1259113487) + peer.serialize(buffer, true) + return (FunctionDescription(name: "messages.reportEncryptedSpam", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func readMessageContents(id: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(916930423) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(id.count)) + for item in id { + serializeInt32(item, buffer: buffer, boxed: false) + } + return (FunctionDescription(name: "messages.readMessageContents", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AffectedMessages? in + let reader = BufferReader(buffer) + var result: Api.messages.AffectedMessages? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.AffectedMessages + } + return result + }) + } + + public static func getAllStickers(hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(479598769) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getAllStickers", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AllStickers? in + let reader = BufferReader(buffer) + var result: Api.messages.AllStickers? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.AllStickers + } + return result + }) + } + + public static func checkChatInvite(hash: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1051570619) + serializeString(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.checkChatInvite", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.ChatInvite? in + let reader = BufferReader(buffer) + var result: Api.ChatInvite? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.ChatInvite + } + return result + }) + } + + public static func importChatInvite(hash: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1817183516) + serializeString(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.importChatInvite", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func getStickerSet(stickerset: Api.InputStickerSet) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(639215886) + stickerset.serialize(buffer, true) + return (FunctionDescription(name: "messages.getStickerSet", parameters: [("stickerset", stickerset)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.StickerSet? in + let reader = BufferReader(buffer) + var result: Api.messages.StickerSet? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.StickerSet + } + return result + }) + } + + public static func installStickerSet(stickerset: Api.InputStickerSet, archived: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-946871200) + stickerset.serialize(buffer, true) + archived.serialize(buffer, true) + return (FunctionDescription(name: "messages.installStickerSet", parameters: [("stickerset", stickerset), ("archived", archived)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.StickerSetInstallResult? in + let reader = BufferReader(buffer) + var result: Api.messages.StickerSetInstallResult? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.StickerSetInstallResult + } + return result + }) + } + + public static func uninstallStickerSet(stickerset: Api.InputStickerSet) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-110209570) + stickerset.serialize(buffer, true) + return (FunctionDescription(name: "messages.uninstallStickerSet", parameters: [("stickerset", stickerset)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func startBot(bot: Api.InputUser, peer: Api.InputPeer, randomId: Int64, startParam: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-421563528) + bot.serialize(buffer, true) + peer.serialize(buffer, true) + serializeInt64(randomId, buffer: buffer, boxed: false) + serializeString(startParam, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.startBot", parameters: [("bot", bot), ("peer", peer), ("randomId", randomId), ("startParam", startParam)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func editChatAdmin(chatId: Int32, userId: Api.InputUser, isAdmin: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1444503762) + serializeInt32(chatId, buffer: buffer, boxed: false) + userId.serialize(buffer, true) + isAdmin.serialize(buffer, true) + return (FunctionDescription(name: "messages.editChatAdmin", parameters: [("chatId", chatId), ("userId", userId), ("isAdmin", isAdmin)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func migrateChat(chatId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(363051235) + serializeInt32(chatId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.migrateChat", parameters: [("chatId", chatId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func reorderStickerSets(flags: Int32, order: [Int64]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(2016638777) + serializeInt32(flags, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(order.count)) + for item in order { + serializeInt64(item, buffer: buffer, boxed: false) + } + return (FunctionDescription(name: "messages.reorderStickerSets", parameters: [("flags", flags), ("order", order)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getDocumentByHash(sha256: Buffer, size: Int32, mimeType: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(864953444) + serializeBytes(sha256, buffer: buffer, boxed: false) + serializeInt32(size, buffer: buffer, boxed: false) + serializeString(mimeType, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getDocumentByHash", parameters: [("sha256", sha256), ("size", size), ("mimeType", mimeType)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Document? in + let reader = BufferReader(buffer) + var result: Api.Document? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Document + } + return result + }) + } + + public static func searchGifs(q: String, offset: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1080395925) + serializeString(q, buffer: buffer, boxed: false) + serializeInt32(offset, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.searchGifs", parameters: [("q", q), ("offset", offset)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.FoundGifs? in + let reader = BufferReader(buffer) + var result: Api.messages.FoundGifs? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.FoundGifs + } + return result + }) + } + + public static func getSavedGifs(hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-2084618926) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getSavedGifs", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.SavedGifs? in + let reader = BufferReader(buffer) + var result: Api.messages.SavedGifs? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.SavedGifs + } + return result + }) + } + + public static func saveGif(id: Api.InputDocument, unsave: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(846868683) + id.serialize(buffer, true) + unsave.serialize(buffer, true) + return (FunctionDescription(name: "messages.saveGif", parameters: [("id", id), ("unsave", unsave)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getInlineBotResults(flags: Int32, bot: Api.InputUser, peer: Api.InputPeer, geoPoint: Api.InputGeoPoint?, query: String, offset: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1364105629) + serializeInt32(flags, buffer: buffer, boxed: false) + bot.serialize(buffer, true) + peer.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {geoPoint!.serialize(buffer, true)} + serializeString(query, buffer: buffer, boxed: false) + serializeString(offset, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getInlineBotResults", parameters: [("flags", flags), ("bot", bot), ("peer", peer), ("geoPoint", geoPoint), ("query", query), ("offset", offset)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.BotResults? in + let reader = BufferReader(buffer) + var result: Api.messages.BotResults? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.BotResults + } + return result + }) + } + + public static func setInlineBotResults(flags: Int32, queryId: Int64, results: [Api.InputBotInlineResult], cacheTime: Int32, nextOffset: String?, switchPm: Api.InlineBotSwitchPM?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-346119674) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(queryId, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(results.count)) + for item in results { + item.serialize(buffer, true) + } + serializeInt32(cacheTime, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 2) != 0 {serializeString(nextOffset!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 3) != 0 {switchPm!.serialize(buffer, true)} + return (FunctionDescription(name: "messages.setInlineBotResults", parameters: [("flags", flags), ("queryId", queryId), ("results", results), ("cacheTime", cacheTime), ("nextOffset", nextOffset), ("switchPm", switchPm)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getMessageEditData(peer: Api.InputPeer, id: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-39416522) + peer.serialize(buffer, true) + serializeInt32(id, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getMessageEditData", parameters: [("peer", peer), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.MessageEditData? in + let reader = BufferReader(buffer) + var result: Api.messages.MessageEditData? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.MessageEditData + } + return result + }) + } + + public static func setBotCallbackAnswer(flags: Int32, queryId: Int64, message: String?, url: String?, cacheTime: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-712043766) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(queryId, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeString(message!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeString(url!, buffer: buffer, boxed: false)} + serializeInt32(cacheTime, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.setBotCallbackAnswer", parameters: [("flags", flags), ("queryId", queryId), ("message", message), ("url", url), ("cacheTime", cacheTime)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func saveDraft(flags: Int32, replyToMsgId: Int32?, peer: Api.InputPeer, message: String, entities: [Api.MessageEntity]?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1137057461) + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(replyToMsgId!, buffer: buffer, boxed: false)} + peer.serialize(buffer, true) + serializeString(message, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 3) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities!.count)) + for item in entities! { + item.serialize(buffer, true) + }} + return (FunctionDescription(name: "messages.saveDraft", parameters: [("flags", flags), ("replyToMsgId", replyToMsgId), ("peer", peer), ("message", message), ("entities", entities)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getAllDrafts() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1782549861) + + return (FunctionDescription(name: "messages.getAllDrafts", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func getFeaturedStickers(hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(766298703) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getFeaturedStickers", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.FeaturedStickers? in + let reader = BufferReader(buffer) + var result: Api.messages.FeaturedStickers? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.FeaturedStickers + } + return result + }) + } + + public static func readFeaturedStickers(id: [Int64]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1527873830) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(id.count)) + for item in id { + serializeInt64(item, buffer: buffer, boxed: false) + } + return (FunctionDescription(name: "messages.readFeaturedStickers", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getRecentStickers(flags: Int32, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1587647177) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getRecentStickers", parameters: [("flags", flags), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.RecentStickers? in + let reader = BufferReader(buffer) + var result: Api.messages.RecentStickers? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.RecentStickers + } + return result + }) + } + + public static func saveRecentSticker(flags: Int32, id: Api.InputDocument, unsave: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(958863608) + serializeInt32(flags, buffer: buffer, boxed: false) + id.serialize(buffer, true) + unsave.serialize(buffer, true) + return (FunctionDescription(name: "messages.saveRecentSticker", parameters: [("flags", flags), ("id", id), ("unsave", unsave)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func clearRecentStickers(flags: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1986437075) + serializeInt32(flags, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.clearRecentStickers", parameters: [("flags", flags)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getArchivedStickers(flags: Int32, offsetId: Int64, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1475442322) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(offsetId, buffer: buffer, boxed: false) + serializeInt32(limit, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getArchivedStickers", parameters: [("flags", flags), ("offsetId", offsetId), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.ArchivedStickers? in + let reader = BufferReader(buffer) + var result: Api.messages.ArchivedStickers? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.ArchivedStickers + } + return result + }) + } + + public static func getMaskStickers(hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1706608543) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getMaskStickers", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AllStickers? in + let reader = BufferReader(buffer) + var result: Api.messages.AllStickers? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.AllStickers + } + return result + }) + } + + public static func getAttachedStickers(media: Api.InputStickeredMedia) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.StickerSetCovered]>) { + let buffer = Buffer() + buffer.appendInt32(-866424884) + media.serialize(buffer, true) + return (FunctionDescription(name: "messages.getAttachedStickers", parameters: [("media", media)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.StickerSetCovered]? in + let reader = BufferReader(buffer) + var result: [Api.StickerSetCovered]? + if let _ = reader.readInt32() { + result = Api.parseVector(reader, elementSignature: 0, elementType: Api.StickerSetCovered.self) + } + return result + }) + } + + public static func setGameScore(flags: Int32, peer: Api.InputPeer, id: Int32, userId: Api.InputUser, score: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1896289088) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + serializeInt32(id, buffer: buffer, boxed: false) + userId.serialize(buffer, true) + serializeInt32(score, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.setGameScore", parameters: [("flags", flags), ("peer", peer), ("id", id), ("userId", userId), ("score", score)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func setInlineGameScore(flags: Int32, id: Api.InputBotInlineMessageID, userId: Api.InputUser, score: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(363700068) + serializeInt32(flags, buffer: buffer, boxed: false) + id.serialize(buffer, true) + userId.serialize(buffer, true) + serializeInt32(score, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.setInlineGameScore", parameters: [("flags", flags), ("id", id), ("userId", userId), ("score", score)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getGameHighScores(peer: Api.InputPeer, id: Int32, userId: Api.InputUser) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-400399203) + peer.serialize(buffer, true) + serializeInt32(id, buffer: buffer, boxed: false) + userId.serialize(buffer, true) + return (FunctionDescription(name: "messages.getGameHighScores", parameters: [("peer", peer), ("id", id), ("userId", userId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.HighScores? in + let reader = BufferReader(buffer) + var result: Api.messages.HighScores? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.HighScores + } + return result + }) + } + + public static func getInlineGameHighScores(id: Api.InputBotInlineMessageID, userId: Api.InputUser) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(258170395) + id.serialize(buffer, true) + userId.serialize(buffer, true) + return (FunctionDescription(name: "messages.getInlineGameHighScores", parameters: [("id", id), ("userId", userId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.HighScores? in + let reader = BufferReader(buffer) + var result: Api.messages.HighScores? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.HighScores + } + return result + }) + } + + public static func getCommonChats(userId: Api.InputUser, maxId: Int32, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(218777796) + userId.serialize(buffer, true) + serializeInt32(maxId, buffer: buffer, boxed: false) + serializeInt32(limit, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getCommonChats", parameters: [("userId", userId), ("maxId", maxId), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Chats? in + let reader = BufferReader(buffer) + var result: Api.messages.Chats? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.Chats + } + return result + }) + } + + public static func getAllChats(exceptIds: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-341307408) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(exceptIds.count)) + for item in exceptIds { + serializeInt32(item, buffer: buffer, boxed: false) + } + return (FunctionDescription(name: "messages.getAllChats", parameters: [("exceptIds", exceptIds)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Chats? in + let reader = BufferReader(buffer) + var result: Api.messages.Chats? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.Chats + } + return result + }) + } + + public static func getWebPage(url: String, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(852135825) + serializeString(url, buffer: buffer, boxed: false) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getWebPage", parameters: [("url", url), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.WebPage? in + let reader = BufferReader(buffer) + var result: Api.WebPage? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.WebPage + } + return result + }) + } + + public static func setBotShippingResults(flags: Int32, queryId: Int64, error: String?, shippingOptions: [Api.ShippingOption]?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-436833542) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(queryId, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeString(error!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(shippingOptions!.count)) + for item in shippingOptions! { + item.serialize(buffer, true) + }} + return (FunctionDescription(name: "messages.setBotShippingResults", parameters: [("flags", flags), ("queryId", queryId), ("error", error), ("shippingOptions", shippingOptions)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func setBotPrecheckoutResults(flags: Int32, queryId: Int64, error: String?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(163765653) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt64(queryId, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeString(error!, buffer: buffer, boxed: false)} + return (FunctionDescription(name: "messages.setBotPrecheckoutResults", parameters: [("flags", flags), ("queryId", queryId), ("error", error)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func sendScreenshotNotification(peer: Api.InputPeer, replyToMsgId: Int32, randomId: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-914493408) + peer.serialize(buffer, true) + serializeInt32(replyToMsgId, buffer: buffer, boxed: false) + serializeInt64(randomId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.sendScreenshotNotification", parameters: [("peer", peer), ("replyToMsgId", replyToMsgId), ("randomId", randomId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func getFavedStickers(hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(567151374) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getFavedStickers", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.FavedStickers? in + let reader = BufferReader(buffer) + var result: Api.messages.FavedStickers? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.FavedStickers + } + return result + }) + } + + public static func faveSticker(id: Api.InputDocument, unfave: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1174420133) + id.serialize(buffer, true) + unfave.serialize(buffer, true) + return (FunctionDescription(name: "messages.faveSticker", parameters: [("id", id), ("unfave", unfave)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getUnreadMentions(peer: Api.InputPeer, offsetId: Int32, addOffset: Int32, limit: Int32, maxId: Int32, minId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1180140658) + peer.serialize(buffer, true) + serializeInt32(offsetId, buffer: buffer, boxed: false) + serializeInt32(addOffset, buffer: buffer, boxed: false) + serializeInt32(limit, buffer: buffer, boxed: false) + serializeInt32(maxId, buffer: buffer, boxed: false) + serializeInt32(minId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getUnreadMentions", parameters: [("peer", peer), ("offsetId", offsetId), ("addOffset", addOffset), ("limit", limit), ("maxId", maxId), ("minId", minId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in + let reader = BufferReader(buffer) + var result: Api.messages.Messages? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.Messages + } + return result + }) + } + + public static func readMentions(peer: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(251759059) + peer.serialize(buffer, true) + return (FunctionDescription(name: "messages.readMentions", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AffectedHistory? in + let reader = BufferReader(buffer) + var result: Api.messages.AffectedHistory? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.AffectedHistory + } + return result + }) + } + + public static func uploadMedia(peer: Api.InputPeer, media: Api.InputMedia) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1369162417) + peer.serialize(buffer, true) + media.serialize(buffer, true) + return (FunctionDescription(name: "messages.uploadMedia", parameters: [("peer", peer), ("media", media)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.MessageMedia? in + let reader = BufferReader(buffer) + var result: Api.MessageMedia? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.MessageMedia + } + return result + }) + } + + public static func uploadEncryptedFile(peer: Api.InputEncryptedChat, file: Api.InputEncryptedFile) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1347929239) + peer.serialize(buffer, true) + file.serialize(buffer, true) + return (FunctionDescription(name: "messages.uploadEncryptedFile", parameters: [("peer", peer), ("file", file)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.EncryptedFile? in + let reader = BufferReader(buffer) + var result: Api.EncryptedFile? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.EncryptedFile + } + return result + }) + } + + public static func getWebPagePreview(flags: Int32, message: String, entities: [Api.MessageEntity]?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1956073268) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(message, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 3) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities!.count)) + for item in entities! { + item.serialize(buffer, true) + }} + return (FunctionDescription(name: "messages.getWebPagePreview", parameters: [("flags", flags), ("message", message), ("entities", entities)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.MessageMedia? in + let reader = BufferReader(buffer) + var result: Api.MessageMedia? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.MessageMedia + } + return result + }) + } + + public static func getMessages(id: [Api.InputMessage]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1673946374) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(id.count)) + for item in id { + item.serialize(buffer, true) + } + return (FunctionDescription(name: "messages.getMessages", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in + let reader = BufferReader(buffer) + var result: Api.messages.Messages? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.Messages + } + return result + }) + } + + public static func getRecentLocations(peer: Api.InputPeer, limit: Int32, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1144759543) + peer.serialize(buffer, true) + serializeInt32(limit, buffer: buffer, boxed: false) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getRecentLocations", parameters: [("peer", peer), ("limit", limit), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in + let reader = BufferReader(buffer) + var result: Api.messages.Messages? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.Messages + } + return result + }) + } + + public static func toggleDialogPin(flags: Int32, peer: Api.InputDialogPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1489903017) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + return (FunctionDescription(name: "messages.toggleDialogPin", parameters: [("flags", flags), ("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getPeerDialogs(peers: [Api.InputDialogPeer]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-462373635) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(peers.count)) + for item in peers { + item.serialize(buffer, true) + } + return (FunctionDescription(name: "messages.getPeerDialogs", parameters: [("peers", peers)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.PeerDialogs? in + let reader = BufferReader(buffer) + var result: Api.messages.PeerDialogs? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.PeerDialogs + } + return result + }) + } + + public static func searchStickerSets(flags: Int32, q: String, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1028140917) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(q, buffer: buffer, boxed: false) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.searchStickerSets", parameters: [("flags", flags), ("q", q), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.FoundStickerSets? in + let reader = BufferReader(buffer) + var result: Api.messages.FoundStickerSets? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.FoundStickerSets + } + return result + }) + } + + public static func getStickers(emoticon: String, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(71126828) + serializeString(emoticon, buffer: buffer, boxed: false) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getStickers", parameters: [("emoticon", emoticon), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Stickers? in + let reader = BufferReader(buffer) + var result: Api.messages.Stickers? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.Stickers + } + return result + }) + } + + public static func markDialogUnread(flags: Int32, peer: Api.InputDialogPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1031349873) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + return (FunctionDescription(name: "messages.markDialogUnread", parameters: [("flags", flags), ("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getDialogUnreadMarks() -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.DialogPeer]>) { + let buffer = Buffer() + buffer.appendInt32(585256482) + + return (FunctionDescription(name: "messages.getDialogUnreadMarks", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.DialogPeer]? in + let reader = BufferReader(buffer) + var result: [Api.DialogPeer]? + if let _ = reader.readInt32() { + result = Api.parseVector(reader, elementSignature: 0, elementType: Api.DialogPeer.self) + } + return result + }) + } + + public static func updatePinnedMessage(flags: Int32, peer: Api.InputPeer, id: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-760547348) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + serializeInt32(id, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.updatePinnedMessage", parameters: [("flags", flags), ("peer", peer), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func sendVote(peer: Api.InputPeer, msgId: Int32, options: [Buffer]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(283795844) + peer.serialize(buffer, true) + serializeInt32(msgId, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(options.count)) + for item in options { + serializeBytes(item, buffer: buffer, boxed: false) + } + return (FunctionDescription(name: "messages.sendVote", parameters: [("peer", peer), ("msgId", msgId), ("options", options)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func getPollResults(peer: Api.InputPeer, msgId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1941660731) + peer.serialize(buffer, true) + serializeInt32(msgId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getPollResults", parameters: [("peer", peer), ("msgId", msgId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func getOnlines(peer: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1848369232) + peer.serialize(buffer, true) + return (FunctionDescription(name: "messages.getOnlines", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.ChatOnlines? in + let reader = BufferReader(buffer) + var result: Api.ChatOnlines? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.ChatOnlines + } + return result + }) + } + + public static func getStatsURL(flags: Int32, peer: Api.InputPeer, params: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-2127811866) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + serializeString(params, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getStatsURL", parameters: [("flags", flags), ("peer", peer), ("params", params)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.StatsURL? in + let reader = BufferReader(buffer) + var result: Api.StatsURL? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.StatsURL + } + return result + }) + } + + public static func editInlineBotMessage(flags: Int32, id: Api.InputBotInlineMessageID, message: String?, media: Api.InputMedia?, replyMarkup: Api.ReplyMarkup?, entities: [Api.MessageEntity]?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-2091549254) + serializeInt32(flags, buffer: buffer, boxed: false) + id.serialize(buffer, true) + if Int(flags) & Int(1 << 11) != 0 {serializeString(message!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 14) != 0 {media!.serialize(buffer, true)} + if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} + if Int(flags) & Int(1 << 3) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities!.count)) + for item in entities! { + item.serialize(buffer, true) + }} + return (FunctionDescription(name: "messages.editInlineBotMessage", parameters: [("flags", flags), ("id", id), ("message", message), ("media", media), ("replyMarkup", replyMarkup), ("entities", entities)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func editChatAbout(peer: Api.InputPeer, about: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-554301545) + peer.serialize(buffer, true) + serializeString(about, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.editChatAbout", parameters: [("peer", peer), ("about", about)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func editChatDefaultBannedRights(peer: Api.InputPeer, bannedRights: Api.ChatBannedRights) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1517917375) + peer.serialize(buffer, true) + bannedRights.serialize(buffer, true) + return (FunctionDescription(name: "messages.editChatDefaultBannedRights", parameters: [("peer", peer), ("bannedRights", bannedRights)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func getEmojiKeywords(langCode: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(899735650) + serializeString(langCode, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getEmojiKeywords", parameters: [("langCode", langCode)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.EmojiKeywordsDifference? in + let reader = BufferReader(buffer) + var result: Api.EmojiKeywordsDifference? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.EmojiKeywordsDifference + } + return result + }) + } + + public static func getEmojiKeywordsDifference(langCode: String, fromVersion: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(352892591) + serializeString(langCode, buffer: buffer, boxed: false) + serializeInt32(fromVersion, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getEmojiKeywordsDifference", parameters: [("langCode", langCode), ("fromVersion", fromVersion)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.EmojiKeywordsDifference? in + let reader = BufferReader(buffer) + var result: Api.EmojiKeywordsDifference? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.EmojiKeywordsDifference + } + return result + }) + } + + public static func getEmojiURL(langCode: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-709817306) + serializeString(langCode, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getEmojiURL", parameters: [("langCode", langCode)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.EmojiURL? in + let reader = BufferReader(buffer) + var result: Api.EmojiURL? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.EmojiURL + } + return result + }) + } + + public static func reorderPinnedDialogs(flags: Int32, folderId: Int32, order: [Api.InputDialogPeer]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(991616823) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(folderId, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(order.count)) + for item in order { + item.serialize(buffer, true) + } + return (FunctionDescription(name: "messages.reorderPinnedDialogs", parameters: [("flags", flags), ("folderId", folderId), ("order", order)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getPinnedDialogs(folderId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-692498958) + serializeInt32(folderId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getPinnedDialogs", parameters: [("folderId", folderId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.PeerDialogs? in + let reader = BufferReader(buffer) + var result: Api.messages.PeerDialogs? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.PeerDialogs + } + return result + }) + } + + public static func getDialogs(flags: Int32, folderId: Int32?, offsetDate: Int32, offsetId: Int32, offsetPeer: Api.InputPeer, limit: Int32, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1594999949) + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} + serializeInt32(offsetDate, buffer: buffer, boxed: false) + serializeInt32(offsetId, buffer: buffer, boxed: false) + offsetPeer.serialize(buffer, true) + serializeInt32(limit, buffer: buffer, boxed: false) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getDialogs", parameters: [("flags", flags), ("folderId", folderId), ("offsetDate", offsetDate), ("offsetId", offsetId), ("offsetPeer", offsetPeer), ("limit", limit), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Dialogs? in + let reader = BufferReader(buffer) + var result: Api.messages.Dialogs? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.Dialogs + } + return result + }) + } + + public static func getSearchCounters(peer: Api.InputPeer, filters: [Api.MessagesFilter]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.messages.SearchCounter]>) { + let buffer = Buffer() + buffer.appendInt32(1932455680) + peer.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(filters.count)) + for item in filters { + item.serialize(buffer, true) + } + return (FunctionDescription(name: "messages.getSearchCounters", parameters: [("peer", peer), ("filters", filters)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.messages.SearchCounter]? in + let reader = BufferReader(buffer) + var result: [Api.messages.SearchCounter]? + if let _ = reader.readInt32() { + result = Api.parseVector(reader, elementSignature: 0, elementType: Api.messages.SearchCounter.self) + } + return result + }) + } + + public static func requestUrlAuth(peer: Api.InputPeer, msgId: Int32, buttonId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-482388461) + peer.serialize(buffer, true) + serializeInt32(msgId, buffer: buffer, boxed: false) + serializeInt32(buttonId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.requestUrlAuth", parameters: [("peer", peer), ("msgId", msgId), ("buttonId", buttonId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.UrlAuthResult? in + let reader = BufferReader(buffer) + var result: Api.UrlAuthResult? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.UrlAuthResult + } + return result + }) + } + + public static func acceptUrlAuth(flags: Int32, peer: Api.InputPeer, msgId: Int32, buttonId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-148247912) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + serializeInt32(msgId, buffer: buffer, boxed: false) + serializeInt32(buttonId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.acceptUrlAuth", parameters: [("flags", flags), ("peer", peer), ("msgId", msgId), ("buttonId", buttonId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.UrlAuthResult? in + let reader = BufferReader(buffer) + var result: Api.UrlAuthResult? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.UrlAuthResult + } + return result + }) + } + + public static func hidePeerSettingsBar(peer: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1336717624) + peer.serialize(buffer, true) + return (FunctionDescription(name: "messages.hidePeerSettingsBar", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func sendMessage(flags: Int32, peer: Api.InputPeer, replyToMsgId: Int32?, message: String, randomId: Int64, replyMarkup: Api.ReplyMarkup?, entities: [Api.MessageEntity]?, scheduleDate: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1376532592) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(replyToMsgId!, buffer: buffer, boxed: false)} + serializeString(message, buffer: buffer, boxed: false) + serializeInt64(randomId, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} + if Int(flags) & Int(1 << 3) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities!.count)) + for item in entities! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 10) != 0 {serializeInt32(scheduleDate!, buffer: buffer, boxed: false)} + return (FunctionDescription(name: "messages.sendMessage", parameters: [("flags", flags), ("peer", peer), ("replyToMsgId", replyToMsgId), ("message", message), ("randomId", randomId), ("replyMarkup", replyMarkup), ("entities", entities), ("scheduleDate", scheduleDate)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func sendMedia(flags: Int32, peer: Api.InputPeer, replyToMsgId: Int32?, media: Api.InputMedia, message: String, randomId: Int64, replyMarkup: Api.ReplyMarkup?, entities: [Api.MessageEntity]?, scheduleDate: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(881978281) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(replyToMsgId!, buffer: buffer, boxed: false)} + media.serialize(buffer, true) + serializeString(message, buffer: buffer, boxed: false) + serializeInt64(randomId, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} + if Int(flags) & Int(1 << 3) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities!.count)) + for item in entities! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 10) != 0 {serializeInt32(scheduleDate!, buffer: buffer, boxed: false)} + return (FunctionDescription(name: "messages.sendMedia", parameters: [("flags", flags), ("peer", peer), ("replyToMsgId", replyToMsgId), ("media", media), ("message", message), ("randomId", randomId), ("replyMarkup", replyMarkup), ("entities", entities), ("scheduleDate", scheduleDate)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func sendInlineBotResult(flags: Int32, peer: Api.InputPeer, replyToMsgId: Int32?, randomId: Int64, queryId: Int64, id: String, scheduleDate: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(570955184) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(replyToMsgId!, buffer: buffer, boxed: false)} + serializeInt64(randomId, buffer: buffer, boxed: false) + serializeInt64(queryId, buffer: buffer, boxed: false) + serializeString(id, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 10) != 0 {serializeInt32(scheduleDate!, buffer: buffer, boxed: false)} + return (FunctionDescription(name: "messages.sendInlineBotResult", parameters: [("flags", flags), ("peer", peer), ("replyToMsgId", replyToMsgId), ("randomId", randomId), ("queryId", queryId), ("id", id), ("scheduleDate", scheduleDate)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func sendMultiMedia(flags: Int32, peer: Api.InputPeer, replyToMsgId: Int32?, multiMedia: [Api.InputSingleMedia], scheduleDate: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-872345397) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(replyToMsgId!, buffer: buffer, boxed: false)} + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(multiMedia.count)) + for item in multiMedia { + item.serialize(buffer, true) + } + if Int(flags) & Int(1 << 10) != 0 {serializeInt32(scheduleDate!, buffer: buffer, boxed: false)} + return (FunctionDescription(name: "messages.sendMultiMedia", parameters: [("flags", flags), ("peer", peer), ("replyToMsgId", replyToMsgId), ("multiMedia", multiMedia), ("scheduleDate", scheduleDate)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func forwardMessages(flags: Int32, fromPeer: Api.InputPeer, id: [Int32], randomId: [Int64], toPeer: Api.InputPeer, scheduleDate: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-637606386) + serializeInt32(flags, buffer: buffer, boxed: false) + fromPeer.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(id.count)) + for item in id { + serializeInt32(item, buffer: buffer, boxed: false) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(randomId.count)) + for item in randomId { + serializeInt64(item, buffer: buffer, boxed: false) + } + toPeer.serialize(buffer, true) + if Int(flags) & Int(1 << 10) != 0 {serializeInt32(scheduleDate!, buffer: buffer, boxed: false)} + return (FunctionDescription(name: "messages.forwardMessages", parameters: [("flags", flags), ("fromPeer", fromPeer), ("id", id), ("randomId", randomId), ("toPeer", toPeer), ("scheduleDate", scheduleDate)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func getScheduledHistory(peer: Api.InputPeer, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-490575781) + peer.serialize(buffer, true) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getScheduledHistory", parameters: [("peer", peer), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in + let reader = BufferReader(buffer) + var result: Api.messages.Messages? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.Messages + } + return result + }) + } + + public static func getScheduledMessages(peer: Api.InputPeer, id: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1111817116) + peer.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(id.count)) + for item in id { + serializeInt32(item, buffer: buffer, boxed: false) + } + return (FunctionDescription(name: "messages.getScheduledMessages", parameters: [("peer", peer), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in + let reader = BufferReader(buffer) + var result: Api.messages.Messages? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.Messages + } + return result + }) + } + + public static func sendScheduledMessages(peer: Api.InputPeer, id: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1120369398) + peer.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(id.count)) + for item in id { + serializeInt32(item, buffer: buffer, boxed: false) + } + return (FunctionDescription(name: "messages.sendScheduledMessages", parameters: [("peer", peer), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func deleteScheduledMessages(peer: Api.InputPeer, id: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1504586518) + peer.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(id.count)) + for item in id { + serializeInt32(item, buffer: buffer, boxed: false) + } + return (FunctionDescription(name: "messages.deleteScheduledMessages", parameters: [("peer", peer), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func editMessage(flags: Int32, peer: Api.InputPeer, id: Int32, message: String?, media: Api.InputMedia?, replyMarkup: Api.ReplyMarkup?, entities: [Api.MessageEntity]?, scheduleDate: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1224152952) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + serializeInt32(id, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 11) != 0 {serializeString(message!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 14) != 0 {media!.serialize(buffer, true)} + if Int(flags) & Int(1 << 2) != 0 {replyMarkup!.serialize(buffer, true)} + if Int(flags) & Int(1 << 3) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities!.count)) + for item in entities! { + item.serialize(buffer, true) + }} + if Int(flags) & Int(1 << 15) != 0 {serializeInt32(scheduleDate!, buffer: buffer, boxed: false)} + return (FunctionDescription(name: "messages.editMessage", parameters: [("flags", flags), ("peer", peer), ("id", id), ("message", message), ("media", media), ("replyMarkup", replyMarkup), ("entities", entities), ("scheduleDate", scheduleDate)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func getPollVotes(flags: Int32, peer: Api.InputPeer, id: Int32, option: Buffer?, offset: String?, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1200736242) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + serializeInt32(id, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeBytes(option!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeString(offset!, buffer: buffer, boxed: false)} + serializeInt32(limit, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getPollVotes", parameters: [("flags", flags), ("peer", peer), ("id", id), ("option", option), ("offset", offset), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.VotesList? in + let reader = BufferReader(buffer) + var result: Api.messages.VotesList? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.VotesList + } + return result + }) + } + + public static func getDialogFilters() -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.DialogFilter]>) { + let buffer = Buffer() + buffer.appendInt32(-241247891) + + return (FunctionDescription(name: "messages.getDialogFilters", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.DialogFilter]? in + let reader = BufferReader(buffer) + var result: [Api.DialogFilter]? + if let _ = reader.readInt32() { + result = Api.parseVector(reader, elementSignature: 0, elementType: Api.DialogFilter.self) + } + return result + }) + } + + public static func getSuggestedDialogFilters() -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.DialogFilterSuggested]>) { + let buffer = Buffer() + buffer.appendInt32(-1566780372) + + return (FunctionDescription(name: "messages.getSuggestedDialogFilters", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.DialogFilterSuggested]? in + let reader = BufferReader(buffer) + var result: [Api.DialogFilterSuggested]? + if let _ = reader.readInt32() { + result = Api.parseVector(reader, elementSignature: 0, elementType: Api.DialogFilterSuggested.self) + } + return result + }) + } + + public static func updateDialogFilter(flags: Int32, id: Int32, filter: Api.DialogFilter?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(450142282) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(id, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {filter!.serialize(buffer, true)} + return (FunctionDescription(name: "messages.updateDialogFilter", parameters: [("flags", flags), ("id", id), ("filter", filter)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func updateDialogFiltersOrder(order: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-983318044) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(order.count)) + for item in order { + serializeInt32(item, buffer: buffer, boxed: false) + } + return (FunctionDescription(name: "messages.updateDialogFiltersOrder", parameters: [("order", order)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getOldFeaturedStickers(offset: Int32, limit: Int32, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1608974939) + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(limit, buffer: buffer, boxed: false) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getOldFeaturedStickers", parameters: [("offset", offset), ("limit", limit), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.FeaturedStickers? in + let reader = BufferReader(buffer) + var result: Api.messages.FeaturedStickers? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.FeaturedStickers + } + return result + }) + } + + public static func getBotCallbackAnswer(flags: Int32, peer: Api.InputPeer, msgId: Int32, data: Buffer?, password: Api.InputCheckPasswordSRP?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1824339449) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + serializeInt32(msgId, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeBytes(data!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {password!.serialize(buffer, true)} + return (FunctionDescription(name: "messages.getBotCallbackAnswer", parameters: [("flags", flags), ("peer", peer), ("msgId", msgId), ("data", data), ("password", password)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.BotCallbackAnswer? in + let reader = BufferReader(buffer) + var result: Api.messages.BotCallbackAnswer? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.BotCallbackAnswer + } + return result + }) + } + + public static func sendEncrypted(flags: Int32, peer: Api.InputEncryptedChat, randomId: Int64, data: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1157265941) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + serializeInt64(randomId, buffer: buffer, boxed: false) + serializeBytes(data, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.sendEncrypted", parameters: [("flags", flags), ("peer", peer), ("randomId", randomId), ("data", data)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.SentEncryptedMessage? in + let reader = BufferReader(buffer) + var result: Api.messages.SentEncryptedMessage? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.SentEncryptedMessage + } + return result + }) + } + + public static func sendEncryptedFile(flags: Int32, peer: Api.InputEncryptedChat, randomId: Int64, data: Buffer, file: Api.InputEncryptedFile) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1431914525) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + serializeInt64(randomId, buffer: buffer, boxed: false) + serializeBytes(data, buffer: buffer, boxed: false) + file.serialize(buffer, true) + return (FunctionDescription(name: "messages.sendEncryptedFile", parameters: [("flags", flags), ("peer", peer), ("randomId", randomId), ("data", data), ("file", file)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.SentEncryptedMessage? in + let reader = BufferReader(buffer) + var result: Api.messages.SentEncryptedMessage? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.SentEncryptedMessage + } + return result + }) + } + + public static func getReplies(peer: Api.InputPeer, msgId: Int32, offsetId: Int32, offsetDate: Int32, addOffset: Int32, limit: Int32, maxId: Int32, minId: Int32, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(615875002) + peer.serialize(buffer, true) + serializeInt32(msgId, buffer: buffer, boxed: false) + serializeInt32(offsetId, buffer: buffer, boxed: false) + serializeInt32(offsetDate, buffer: buffer, boxed: false) + serializeInt32(addOffset, buffer: buffer, boxed: false) + serializeInt32(limit, buffer: buffer, boxed: false) + serializeInt32(maxId, buffer: buffer, boxed: false) + serializeInt32(minId, buffer: buffer, boxed: false) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getReplies", parameters: [("peer", peer), ("msgId", msgId), ("offsetId", offsetId), ("offsetDate", offsetDate), ("addOffset", addOffset), ("limit", limit), ("maxId", maxId), ("minId", minId), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in + let reader = BufferReader(buffer) + var result: Api.messages.Messages? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.Messages + } + return result + }) + } + + public static func getDiscussionMessage(peer: Api.InputPeer, msgId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1147761405) + peer.serialize(buffer, true) + serializeInt32(msgId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getDiscussionMessage", parameters: [("peer", peer), ("msgId", msgId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.DiscussionMessage? in + let reader = BufferReader(buffer) + var result: Api.messages.DiscussionMessage? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.DiscussionMessage + } + return result + }) + } + + public static func readDiscussion(peer: Api.InputPeer, msgId: Int32, readMaxId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-147740172) + peer.serialize(buffer, true) + serializeInt32(msgId, buffer: buffer, boxed: false) + serializeInt32(readMaxId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.readDiscussion", parameters: [("peer", peer), ("msgId", msgId), ("readMaxId", readMaxId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getMessagesViews(peer: Api.InputPeer, id: [Int32], increment: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1468322785) + peer.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(id.count)) + for item in id { + serializeInt32(item, buffer: buffer, boxed: false) + } + increment.serialize(buffer, true) + return (FunctionDescription(name: "messages.getMessagesViews", parameters: [("peer", peer), ("id", id), ("increment", increment)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.MessageViews? in + let reader = BufferReader(buffer) + var result: Api.messages.MessageViews? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.MessageViews + } + return result + }) + } + + public static func searchGlobal(flags: Int32, folderId: Int32?, q: String, filter: Api.MessagesFilter, minDate: Int32, maxDate: Int32, offsetRate: Int32, offsetPeer: Api.InputPeer, offsetId: Int32, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1271290010) + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(folderId!, buffer: buffer, boxed: false)} + serializeString(q, buffer: buffer, boxed: false) + filter.serialize(buffer, true) + serializeInt32(minDate, buffer: buffer, boxed: false) + serializeInt32(maxDate, buffer: buffer, boxed: false) + serializeInt32(offsetRate, buffer: buffer, boxed: false) + offsetPeer.serialize(buffer, true) + serializeInt32(offsetId, buffer: buffer, boxed: false) + serializeInt32(limit, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.searchGlobal", parameters: [("flags", flags), ("folderId", folderId), ("q", q), ("filter", filter), ("minDate", minDate), ("maxDate", maxDate), ("offsetRate", offsetRate), ("offsetPeer", offsetPeer), ("offsetId", offsetId), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in + let reader = BufferReader(buffer) + var result: Api.messages.Messages? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.Messages + } + return result + }) + } + + public static func setTyping(flags: Int32, peer: Api.InputPeer, topMsgId: Int32?, action: Api.SendMessageAction) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1486110434) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(topMsgId!, buffer: buffer, boxed: false)} + action.serialize(buffer, true) + return (FunctionDescription(name: "messages.setTyping", parameters: [("flags", flags), ("peer", peer), ("topMsgId", topMsgId), ("action", action)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func search(flags: Int32, peer: Api.InputPeer, q: String, fromId: Api.InputPeer?, topMsgId: Int32?, filter: Api.MessagesFilter, minDate: Int32, maxDate: Int32, offsetId: Int32, addOffset: Int32, limit: Int32, maxId: Int32, minId: Int32, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(204812012) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + serializeString(q, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {fromId!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(topMsgId!, buffer: buffer, boxed: false)} + filter.serialize(buffer, true) + serializeInt32(minDate, buffer: buffer, boxed: false) + serializeInt32(maxDate, buffer: buffer, boxed: false) + serializeInt32(offsetId, buffer: buffer, boxed: false) + serializeInt32(addOffset, buffer: buffer, boxed: false) + serializeInt32(limit, buffer: buffer, boxed: false) + serializeInt32(maxId, buffer: buffer, boxed: false) + serializeInt32(minId, buffer: buffer, boxed: false) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.search", parameters: [("flags", flags), ("peer", peer), ("q", q), ("fromId", fromId), ("topMsgId", topMsgId), ("filter", filter), ("minDate", minDate), ("maxDate", maxDate), ("offsetId", offsetId), ("addOffset", addOffset), ("limit", limit), ("maxId", maxId), ("minId", minId), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in + let reader = BufferReader(buffer) + var result: Api.messages.Messages? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.Messages + } + return result + }) + } + + public static func unpinAllMessages(peer: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-265962357) + peer.serialize(buffer, true) + return (FunctionDescription(name: "messages.unpinAllMessages", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AffectedHistory? in + let reader = BufferReader(buffer) + var result: Api.messages.AffectedHistory? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.AffectedHistory + } + return result + }) + } + + public static func discardEncryption(flags: Int32, chatId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-208425312) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(chatId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.discardEncryption", parameters: [("flags", flags), ("chatId", chatId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func deleteChat(chatId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-2094760687) + serializeInt32(chatId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.deleteChat", parameters: [("chatId", chatId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func deletePhoneCallHistory(flags: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-104078327) + serializeInt32(flags, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.deletePhoneCallHistory", parameters: [("flags", flags)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AffectedFoundMessages? in + let reader = BufferReader(buffer) + var result: Api.messages.AffectedFoundMessages? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.AffectedFoundMessages + } + return result + }) + } + + public static func checkHistoryImport(importHead: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1140726259) + serializeString(importHead, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.checkHistoryImport", parameters: [("importHead", importHead)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.HistoryImportParsed? in + let reader = BufferReader(buffer) + var result: Api.messages.HistoryImportParsed? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.HistoryImportParsed + } + return result + }) + } + + public static func initHistoryImport(peer: Api.InputPeer, file: Api.InputFile, mediaCount: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(873008187) + peer.serialize(buffer, true) + file.serialize(buffer, true) + serializeInt32(mediaCount, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.initHistoryImport", parameters: [("peer", peer), ("file", file), ("mediaCount", mediaCount)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.HistoryImport? in + let reader = BufferReader(buffer) + var result: Api.messages.HistoryImport? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.HistoryImport + } + return result + }) + } + + public static func uploadImportedMedia(peer: Api.InputPeer, importId: Int64, fileName: String, media: Api.InputMedia) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(713433234) + peer.serialize(buffer, true) + serializeInt64(importId, buffer: buffer, boxed: false) + serializeString(fileName, buffer: buffer, boxed: false) + media.serialize(buffer, true) + return (FunctionDescription(name: "messages.uploadImportedMedia", parameters: [("peer", peer), ("importId", importId), ("fileName", fileName), ("media", media)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.MessageMedia? in + let reader = BufferReader(buffer) + var result: Api.MessageMedia? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.MessageMedia + } + return result + }) + } + + public static func startHistoryImport(peer: Api.InputPeer, importId: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1271008444) + peer.serialize(buffer, true) + serializeInt64(importId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.startHistoryImport", parameters: [("peer", peer), ("importId", importId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func deleteChatUser(flags: Int32, chatId: Int32, userId: Api.InputUser) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-986430054) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(chatId, buffer: buffer, boxed: false) + userId.serialize(buffer, true) + return (FunctionDescription(name: "messages.deleteChatUser", parameters: [("flags", flags), ("chatId", chatId), ("userId", userId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func exportChatInvite(flags: Int32, peer: Api.InputPeer, expireDate: Int32?, usageLimit: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(347716823) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(expireDate!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(usageLimit!, buffer: buffer, boxed: false)} + return (FunctionDescription(name: "messages.exportChatInvite", parameters: [("flags", flags), ("peer", peer), ("expireDate", expireDate), ("usageLimit", usageLimit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.ExportedChatInvite? in + let reader = BufferReader(buffer) + var result: Api.ExportedChatInvite? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite + } + return result + }) + } + + public static func getExportedChatInvites(flags: Int32, peer: Api.InputPeer, adminId: Api.InputUser, offsetDate: Int32?, offsetLink: String?, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1565154314) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + adminId.serialize(buffer, true) + if Int(flags) & Int(1 << 2) != 0 {serializeInt32(offsetDate!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeString(offsetLink!, buffer: buffer, boxed: false)} + serializeInt32(limit, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getExportedChatInvites", parameters: [("flags", flags), ("peer", peer), ("adminId", adminId), ("offsetDate", offsetDate), ("offsetLink", offsetLink), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.ExportedChatInvites? in + let reader = BufferReader(buffer) + var result: Api.messages.ExportedChatInvites? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.ExportedChatInvites + } + return result + }) + } + + public static func editExportedChatInvite(flags: Int32, peer: Api.InputPeer, link: String, expireDate: Int32?, usageLimit: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(48562110) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + serializeString(link, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(expireDate!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(usageLimit!, buffer: buffer, boxed: false)} + return (FunctionDescription(name: "messages.editExportedChatInvite", parameters: [("flags", flags), ("peer", peer), ("link", link), ("expireDate", expireDate), ("usageLimit", usageLimit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.ExportedChatInvite? in + let reader = BufferReader(buffer) + var result: Api.messages.ExportedChatInvite? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.ExportedChatInvite + } + return result + }) + } + + public static func deleteExportedChatInvite(peer: Api.InputPeer, link: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-731601877) + peer.serialize(buffer, true) + serializeString(link, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.deleteExportedChatInvite", parameters: [("peer", peer), ("link", link)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getChatInviteImporters(peer: Api.InputPeer, link: String, offsetDate: Int32, offsetUser: Api.InputUser, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(654013065) + peer.serialize(buffer, true) + serializeString(link, buffer: buffer, boxed: false) + serializeInt32(offsetDate, buffer: buffer, boxed: false) + offsetUser.serialize(buffer, true) + serializeInt32(limit, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.getChatInviteImporters", parameters: [("peer", peer), ("link", link), ("offsetDate", offsetDate), ("offsetUser", offsetUser), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.ChatInviteImporters? in + let reader = BufferReader(buffer) + var result: Api.messages.ChatInviteImporters? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.ChatInviteImporters + } + return result + }) + } + + public static func getAdminsWithInvites(peer: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(958457583) + peer.serialize(buffer, true) + return (FunctionDescription(name: "messages.getAdminsWithInvites", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.ChatAdminsWithInvites? in + let reader = BufferReader(buffer) + var result: Api.messages.ChatAdminsWithInvites? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.ChatAdminsWithInvites + } + return result + }) + } + + public static func deleteRevokedExportedChatInvites(peer: Api.InputPeer, adminId: Api.InputUser) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1452833749) + peer.serialize(buffer, true) + adminId.serialize(buffer, true) + return (FunctionDescription(name: "messages.deleteRevokedExportedChatInvites", parameters: [("peer", peer), ("adminId", adminId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func setHistoryTTL(flags: Int32, peer: Api.InputPeer, period: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-859093215) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + serializeInt32(period, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.setHistoryTTL", parameters: [("flags", flags), ("peer", peer), ("period", period)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func report(peer: Api.InputPeer, id: [Int32], reason: Api.ReportReason, message: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1991005362) + peer.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(id.count)) + for item in id { + serializeInt32(item, buffer: buffer, boxed: false) + } + reason.serialize(buffer, true) + serializeString(message, buffer: buffer, boxed: false) + return (FunctionDescription(name: "messages.report", parameters: [("peer", peer), ("id", id), ("reason", reason), ("message", message)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + } + public struct channels { + public static func readHistory(channel: Api.InputChannel, maxId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-871347913) + channel.serialize(buffer, true) + serializeInt32(maxId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "channels.readHistory", parameters: [("channel", channel), ("maxId", maxId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func deleteMessages(channel: Api.InputChannel, id: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-2067661490) + channel.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(id.count)) + for item in id { + serializeInt32(item, buffer: buffer, boxed: false) + } + return (FunctionDescription(name: "channels.deleteMessages", parameters: [("channel", channel), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AffectedMessages? in + let reader = BufferReader(buffer) + var result: Api.messages.AffectedMessages? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.AffectedMessages + } + return result + }) + } + + public static func deleteUserHistory(channel: Api.InputChannel, userId: Api.InputUser) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-787622117) + channel.serialize(buffer, true) + userId.serialize(buffer, true) + return (FunctionDescription(name: "channels.deleteUserHistory", parameters: [("channel", channel), ("userId", userId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.AffectedHistory? in + let reader = BufferReader(buffer) + var result: Api.messages.AffectedHistory? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.AffectedHistory + } + return result + }) + } + + public static func reportSpam(channel: Api.InputChannel, userId: Api.InputUser, id: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-32999408) + channel.serialize(buffer, true) + userId.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(id.count)) + for item in id { + serializeInt32(item, buffer: buffer, boxed: false) + } + return (FunctionDescription(name: "channels.reportSpam", parameters: [("channel", channel), ("userId", userId), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getParticipant(channel: Api.InputChannel, userId: Api.InputUser) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1416484774) + channel.serialize(buffer, true) + userId.serialize(buffer, true) + return (FunctionDescription(name: "channels.getParticipant", parameters: [("channel", channel), ("userId", userId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.channels.ChannelParticipant? in + let reader = BufferReader(buffer) + var result: Api.channels.ChannelParticipant? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.channels.ChannelParticipant + } + return result + }) + } + + public static func getChannels(id: [Api.InputChannel]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(176122811) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(id.count)) + for item in id { + item.serialize(buffer, true) + } + return (FunctionDescription(name: "channels.getChannels", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Chats? in + let reader = BufferReader(buffer) + var result: Api.messages.Chats? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.Chats + } + return result + }) + } + + public static func getFullChannel(channel: Api.InputChannel) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(141781513) + channel.serialize(buffer, true) + return (FunctionDescription(name: "channels.getFullChannel", parameters: [("channel", channel)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.ChatFull? in + let reader = BufferReader(buffer) + var result: Api.messages.ChatFull? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.ChatFull + } + return result + }) + } + + public static func editTitle(channel: Api.InputChannel, title: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1450044624) + channel.serialize(buffer, true) + serializeString(title, buffer: buffer, boxed: false) + return (FunctionDescription(name: "channels.editTitle", parameters: [("channel", channel), ("title", title)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func editPhoto(channel: Api.InputChannel, photo: Api.InputChatPhoto) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-248621111) + channel.serialize(buffer, true) + photo.serialize(buffer, true) + return (FunctionDescription(name: "channels.editPhoto", parameters: [("channel", channel), ("photo", photo)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func checkUsername(channel: Api.InputChannel, username: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(283557164) + channel.serialize(buffer, true) + serializeString(username, buffer: buffer, boxed: false) + return (FunctionDescription(name: "channels.checkUsername", parameters: [("channel", channel), ("username", username)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func updateUsername(channel: Api.InputChannel, username: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(890549214) + channel.serialize(buffer, true) + serializeString(username, buffer: buffer, boxed: false) + return (FunctionDescription(name: "channels.updateUsername", parameters: [("channel", channel), ("username", username)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func joinChannel(channel: Api.InputChannel) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(615851205) + channel.serialize(buffer, true) + return (FunctionDescription(name: "channels.joinChannel", parameters: [("channel", channel)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func leaveChannel(channel: Api.InputChannel) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-130635115) + channel.serialize(buffer, true) + return (FunctionDescription(name: "channels.leaveChannel", parameters: [("channel", channel)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func inviteToChannel(channel: Api.InputChannel, users: [Api.InputUser]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(429865580) + channel.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + return (FunctionDescription(name: "channels.inviteToChannel", parameters: [("channel", channel), ("users", users)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func kickFromChannel(channel: Api.InputChannel, userId: Api.InputUser, kicked: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1502421484) + channel.serialize(buffer, true) + userId.serialize(buffer, true) + kicked.serialize(buffer, true) + return (FunctionDescription(name: "channels.kickFromChannel", parameters: [("channel", channel), ("userId", userId), ("kicked", kicked)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func deleteChannel(channel: Api.InputChannel) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1072619549) + channel.serialize(buffer, true) + return (FunctionDescription(name: "channels.deleteChannel", parameters: [("channel", channel)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func toggleSignatures(channel: Api.InputChannel, enabled: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(527021574) + channel.serialize(buffer, true) + enabled.serialize(buffer, true) + return (FunctionDescription(name: "channels.toggleSignatures", parameters: [("channel", channel), ("enabled", enabled)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func getAdminLog(flags: Int32, channel: Api.InputChannel, q: String, eventsFilter: Api.ChannelAdminLogEventsFilter?, admins: [Api.InputUser]?, maxId: Int64, minId: Int64, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(870184064) + serializeInt32(flags, buffer: buffer, boxed: false) + channel.serialize(buffer, true) + serializeString(q, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {eventsFilter!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {buffer.appendInt32(481674261) + buffer.appendInt32(Int32(admins!.count)) + for item in admins! { + item.serialize(buffer, true) + }} + serializeInt64(maxId, buffer: buffer, boxed: false) + serializeInt64(minId, buffer: buffer, boxed: false) + serializeInt32(limit, buffer: buffer, boxed: false) + return (FunctionDescription(name: "channels.getAdminLog", parameters: [("flags", flags), ("channel", channel), ("q", q), ("eventsFilter", eventsFilter), ("admins", admins), ("maxId", maxId), ("minId", minId), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.channels.AdminLogResults? in + let reader = BufferReader(buffer) + var result: Api.channels.AdminLogResults? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.channels.AdminLogResults + } + return result + }) + } + + public static func setStickers(channel: Api.InputChannel, stickerset: Api.InputStickerSet) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-359881479) + channel.serialize(buffer, true) + stickerset.serialize(buffer, true) + return (FunctionDescription(name: "channels.setStickers", parameters: [("channel", channel), ("stickerset", stickerset)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func readMessageContents(channel: Api.InputChannel, id: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-357180360) + channel.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(id.count)) + for item in id { + serializeInt32(item, buffer: buffer, boxed: false) + } + return (FunctionDescription(name: "channels.readMessageContents", parameters: [("channel", channel), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func deleteHistory(channel: Api.InputChannel, maxId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1355375294) + channel.serialize(buffer, true) + serializeInt32(maxId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "channels.deleteHistory", parameters: [("channel", channel), ("maxId", maxId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func togglePreHistoryHidden(channel: Api.InputChannel, enabled: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-356796084) + channel.serialize(buffer, true) + enabled.serialize(buffer, true) + return (FunctionDescription(name: "channels.togglePreHistoryHidden", parameters: [("channel", channel), ("enabled", enabled)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func getParticipants(channel: Api.InputChannel, filter: Api.ChannelParticipantsFilter, offset: Int32, limit: Int32, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(306054633) + channel.serialize(buffer, true) + filter.serialize(buffer, true) + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(limit, buffer: buffer, boxed: false) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "channels.getParticipants", parameters: [("channel", channel), ("filter", filter), ("offset", offset), ("limit", limit), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.channels.ChannelParticipants? in + let reader = BufferReader(buffer) + var result: Api.channels.ChannelParticipants? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.channels.ChannelParticipants + } + return result + }) + } + + public static func getMessages(channel: Api.InputChannel, id: [Api.InputMessage]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1383294429) + channel.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(id.count)) + for item in id { + item.serialize(buffer, true) + } + return (FunctionDescription(name: "channels.getMessages", parameters: [("channel", channel), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in + let reader = BufferReader(buffer) + var result: Api.messages.Messages? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.Messages + } + return result + }) + } + + public static func editBanned(channel: Api.InputChannel, userId: Api.InputUser, bannedRights: Api.ChatBannedRights) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1920559378) + channel.serialize(buffer, true) + userId.serialize(buffer, true) + bannedRights.serialize(buffer, true) + return (FunctionDescription(name: "channels.editBanned", parameters: [("channel", channel), ("userId", userId), ("bannedRights", bannedRights)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func getGroupsForDiscussion() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-170208392) + + return (FunctionDescription(name: "channels.getGroupsForDiscussion", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Chats? in + let reader = BufferReader(buffer) + var result: Api.messages.Chats? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.Chats + } + return result + }) + } + + public static func getBroadcastsForDiscussion() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(445117188) + + return (FunctionDescription(name: "channels.getBroadcastsForDiscussion", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Chats? in + let reader = BufferReader(buffer) + var result: Api.messages.Chats? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.Chats + } + return result + }) + } + + public static func setDiscussionGroup(broadcast: Api.InputChannel, group: Api.InputChannel) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1079520178) + broadcast.serialize(buffer, true) + group.serialize(buffer, true) + return (FunctionDescription(name: "channels.setDiscussionGroup", parameters: [("broadcast", broadcast), ("group", group)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func editCreator(channel: Api.InputChannel, userId: Api.InputUser, password: Api.InputCheckPasswordSRP) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1892102881) + channel.serialize(buffer, true) + userId.serialize(buffer, true) + password.serialize(buffer, true) + return (FunctionDescription(name: "channels.editCreator", parameters: [("channel", channel), ("userId", userId), ("password", password)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func editLocation(channel: Api.InputChannel, geoPoint: Api.InputGeoPoint, address: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1491484525) + channel.serialize(buffer, true) + geoPoint.serialize(buffer, true) + serializeString(address, buffer: buffer, boxed: false) + return (FunctionDescription(name: "channels.editLocation", parameters: [("channel", channel), ("geoPoint", geoPoint), ("address", address)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func createChannel(flags: Int32, title: String, about: String, geoPoint: Api.InputGeoPoint?, address: String?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1029681423) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(title, buffer: buffer, boxed: false) + serializeString(about, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 2) != 0 {geoPoint!.serialize(buffer, true)} + if Int(flags) & Int(1 << 2) != 0 {serializeString(address!, buffer: buffer, boxed: false)} + return (FunctionDescription(name: "channels.createChannel", parameters: [("flags", flags), ("title", title), ("about", about), ("geoPoint", geoPoint), ("address", address)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func getAdminedPublicChannels(flags: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-122669393) + serializeInt32(flags, buffer: buffer, boxed: false) + return (FunctionDescription(name: "channels.getAdminedPublicChannels", parameters: [("flags", flags)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Chats? in + let reader = BufferReader(buffer) + var result: Api.messages.Chats? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.Chats + } + return result + }) + } + + public static func toggleSlowMode(channel: Api.InputChannel, seconds: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-304832784) + channel.serialize(buffer, true) + serializeInt32(seconds, buffer: buffer, boxed: false) + return (FunctionDescription(name: "channels.toggleSlowMode", parameters: [("channel", channel), ("seconds", seconds)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func editAdmin(channel: Api.InputChannel, userId: Api.InputUser, adminRights: Api.ChatAdminRights, rank: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-751007486) + channel.serialize(buffer, true) + userId.serialize(buffer, true) + adminRights.serialize(buffer, true) + serializeString(rank, buffer: buffer, boxed: false) + return (FunctionDescription(name: "channels.editAdmin", parameters: [("channel", channel), ("userId", userId), ("adminRights", adminRights), ("rank", rank)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func getInactiveChannels() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(300429806) + + return (FunctionDescription(name: "channels.getInactiveChannels", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.InactiveChats? in + let reader = BufferReader(buffer) + var result: Api.messages.InactiveChats? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.InactiveChats + } + return result + }) + } + + public static func exportMessageLink(flags: Int32, channel: Api.InputChannel, id: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-432034325) + serializeInt32(flags, buffer: buffer, boxed: false) + channel.serialize(buffer, true) + serializeInt32(id, buffer: buffer, boxed: false) + return (FunctionDescription(name: "channels.exportMessageLink", parameters: [("flags", flags), ("channel", channel), ("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.ExportedMessageLink? in + let reader = BufferReader(buffer) + var result: Api.ExportedMessageLink? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.ExportedMessageLink + } + return result + }) + } + + public static func convertToGigagroup(channel: Api.InputChannel) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(187239529) + channel.serialize(buffer, true) + return (FunctionDescription(name: "channels.convertToGigagroup", parameters: [("channel", channel)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + } + public struct payments { + public static func getPaymentForm(msgId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1712285883) + serializeInt32(msgId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "payments.getPaymentForm", parameters: [("msgId", msgId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.payments.PaymentForm? in + let reader = BufferReader(buffer) + var result: Api.payments.PaymentForm? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.payments.PaymentForm + } + return result + }) + } + + public static func getPaymentReceipt(msgId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1601001088) + serializeInt32(msgId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "payments.getPaymentReceipt", parameters: [("msgId", msgId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.payments.PaymentReceipt? in + let reader = BufferReader(buffer) + var result: Api.payments.PaymentReceipt? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.payments.PaymentReceipt + } + return result + }) + } + + public static func validateRequestedInfo(flags: Int32, msgId: Int32, info: Api.PaymentRequestedInfo) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1997180532) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(msgId, buffer: buffer, boxed: false) + info.serialize(buffer, true) + return (FunctionDescription(name: "payments.validateRequestedInfo", parameters: [("flags", flags), ("msgId", msgId), ("info", info)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.payments.ValidatedRequestedInfo? in + let reader = BufferReader(buffer) + var result: Api.payments.ValidatedRequestedInfo? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.payments.ValidatedRequestedInfo + } + return result + }) + } + + public static func sendPaymentForm(flags: Int32, msgId: Int32, requestedInfoId: String?, shippingOptionId: String?, credentials: Api.InputPaymentCredentials) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(730364339) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(msgId, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeString(requestedInfoId!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeString(shippingOptionId!, buffer: buffer, boxed: false)} + credentials.serialize(buffer, true) + return (FunctionDescription(name: "payments.sendPaymentForm", parameters: [("flags", flags), ("msgId", msgId), ("requestedInfoId", requestedInfoId), ("shippingOptionId", shippingOptionId), ("credentials", credentials)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.payments.PaymentResult? in + let reader = BufferReader(buffer) + var result: Api.payments.PaymentResult? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.payments.PaymentResult + } + return result + }) + } + + public static func getSavedInfo() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(578650699) + + return (FunctionDescription(name: "payments.getSavedInfo", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.payments.SavedInfo? in + let reader = BufferReader(buffer) + var result: Api.payments.SavedInfo? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.payments.SavedInfo + } + return result + }) + } + + public static func clearSavedInfo(flags: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-667062079) + serializeInt32(flags, buffer: buffer, boxed: false) + return (FunctionDescription(name: "payments.clearSavedInfo", parameters: [("flags", flags)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getBankCardData(number: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(779736953) + serializeString(number, buffer: buffer, boxed: false) + return (FunctionDescription(name: "payments.getBankCardData", parameters: [("number", number)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.payments.BankCardData? in + let reader = BufferReader(buffer) + var result: Api.payments.BankCardData? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.payments.BankCardData + } + return result + }) + } + } + public struct stats { + public static func loadAsyncGraph(flags: Int32, token: String, x: Int64?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1646092192) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(token, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt64(x!, buffer: buffer, boxed: false)} + return (FunctionDescription(name: "stats.loadAsyncGraph", parameters: [("flags", flags), ("token", token), ("x", x)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.StatsGraph? in + let reader = BufferReader(buffer) + var result: Api.StatsGraph? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.StatsGraph + } + return result + }) + } + + public static func getBroadcastStats(flags: Int32, channel: Api.InputChannel) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1421720550) + serializeInt32(flags, buffer: buffer, boxed: false) + channel.serialize(buffer, true) + return (FunctionDescription(name: "stats.getBroadcastStats", parameters: [("flags", flags), ("channel", channel)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.stats.BroadcastStats? in + let reader = BufferReader(buffer) + var result: Api.stats.BroadcastStats? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.stats.BroadcastStats + } + return result + }) + } + + public static func getMegagroupStats(flags: Int32, channel: Api.InputChannel) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-589330937) + serializeInt32(flags, buffer: buffer, boxed: false) + channel.serialize(buffer, true) + return (FunctionDescription(name: "stats.getMegagroupStats", parameters: [("flags", flags), ("channel", channel)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.stats.MegagroupStats? in + let reader = BufferReader(buffer) + var result: Api.stats.MegagroupStats? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.stats.MegagroupStats + } + return result + }) + } + + public static func getMessagePublicForwards(channel: Api.InputChannel, msgId: Int32, offsetRate: Int32, offsetPeer: Api.InputPeer, offsetId: Int32, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1445996571) + channel.serialize(buffer, true) + serializeInt32(msgId, buffer: buffer, boxed: false) + serializeInt32(offsetRate, buffer: buffer, boxed: false) + offsetPeer.serialize(buffer, true) + serializeInt32(offsetId, buffer: buffer, boxed: false) + serializeInt32(limit, buffer: buffer, boxed: false) + return (FunctionDescription(name: "stats.getMessagePublicForwards", parameters: [("channel", channel), ("msgId", msgId), ("offsetRate", offsetRate), ("offsetPeer", offsetPeer), ("offsetId", offsetId), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Messages? in + let reader = BufferReader(buffer) + var result: Api.messages.Messages? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.messages.Messages + } + return result + }) + } + + public static func getMessageStats(flags: Int32, channel: Api.InputChannel, msgId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1226791947) + serializeInt32(flags, buffer: buffer, boxed: false) + channel.serialize(buffer, true) + serializeInt32(msgId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "stats.getMessageStats", parameters: [("flags", flags), ("channel", channel), ("msgId", msgId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.stats.MessageStats? in + let reader = BufferReader(buffer) + var result: Api.stats.MessageStats? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.stats.MessageStats + } + return result + }) + } + } + public struct auth { + public static func checkPhone(phoneNumber: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1877286395) + serializeString(phoneNumber, buffer: buffer, boxed: false) + return (FunctionDescription(name: "auth.checkPhone", parameters: [("phoneNumber", phoneNumber)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.CheckedPhone? in + let reader = BufferReader(buffer) + var result: Api.auth.CheckedPhone? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.auth.CheckedPhone + } + return result + }) + } + + public static func signIn(phoneNumber: String, phoneCodeHash: String, phoneCode: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1126886015) + serializeString(phoneNumber, buffer: buffer, boxed: false) + serializeString(phoneCodeHash, buffer: buffer, boxed: false) + serializeString(phoneCode, buffer: buffer, boxed: false) + return (FunctionDescription(name: "auth.signIn", parameters: [("phoneNumber", phoneNumber), ("phoneCodeHash", phoneCodeHash), ("phoneCode", phoneCode)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.Authorization? in + let reader = BufferReader(buffer) + var result: Api.auth.Authorization? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.auth.Authorization + } + return result + }) + } + + public static func logOut() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1461180992) + + return (FunctionDescription(name: "auth.logOut", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func resetAuthorizations() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1616179942) + + return (FunctionDescription(name: "auth.resetAuthorizations", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func sendInvites(phoneNumbers: [String], message: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1998331287) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(phoneNumbers.count)) + for item in phoneNumbers { + serializeString(item, buffer: buffer, boxed: false) + } + serializeString(message, buffer: buffer, boxed: false) + return (FunctionDescription(name: "auth.sendInvites", parameters: [("phoneNumbers", phoneNumbers), ("message", message)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func exportAuthorization(dcId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-440401971) + serializeInt32(dcId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "auth.exportAuthorization", parameters: [("dcId", dcId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.ExportedAuthorization? in + let reader = BufferReader(buffer) + var result: Api.auth.ExportedAuthorization? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.auth.ExportedAuthorization + } + return result + }) + } + + public static func importAuthorization(id: Int32, bytes: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-470837741) + serializeInt32(id, buffer: buffer, boxed: false) + serializeBytes(bytes, buffer: buffer, boxed: false) + return (FunctionDescription(name: "auth.importAuthorization", parameters: [("id", id), ("bytes", bytes)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.Authorization? in + let reader = BufferReader(buffer) + var result: Api.auth.Authorization? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.auth.Authorization + } + return result + }) + } + + public static func bindTempAuthKey(permAuthKeyId: Int64, nonce: Int64, expiresAt: Int32, encryptedMessage: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-841733627) + serializeInt64(permAuthKeyId, buffer: buffer, boxed: false) + serializeInt64(nonce, buffer: buffer, boxed: false) + serializeInt32(expiresAt, buffer: buffer, boxed: false) + serializeBytes(encryptedMessage, buffer: buffer, boxed: false) + return (FunctionDescription(name: "auth.bindTempAuthKey", parameters: [("permAuthKeyId", permAuthKeyId), ("nonce", nonce), ("expiresAt", expiresAt), ("encryptedMessage", encryptedMessage)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func importBotAuthorization(flags: Int32, apiId: Int32, apiHash: String, botAuthToken: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1738800940) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(apiId, buffer: buffer, boxed: false) + serializeString(apiHash, buffer: buffer, boxed: false) + serializeString(botAuthToken, buffer: buffer, boxed: false) + return (FunctionDescription(name: "auth.importBotAuthorization", parameters: [("flags", flags), ("apiId", apiId), ("apiHash", apiHash), ("botAuthToken", botAuthToken)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.Authorization? in + let reader = BufferReader(buffer) + var result: Api.auth.Authorization? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.auth.Authorization + } + return result + }) + } + + public static func requestPasswordRecovery() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-661144474) + + return (FunctionDescription(name: "auth.requestPasswordRecovery", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.PasswordRecovery? in + let reader = BufferReader(buffer) + var result: Api.auth.PasswordRecovery? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.auth.PasswordRecovery + } + return result + }) + } + + public static func recoverPassword(code: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1319464594) + serializeString(code, buffer: buffer, boxed: false) + return (FunctionDescription(name: "auth.recoverPassword", parameters: [("code", code)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.Authorization? in + let reader = BufferReader(buffer) + var result: Api.auth.Authorization? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.auth.Authorization + } + return result + }) + } + + public static func resendCode(phoneNumber: String, phoneCodeHash: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1056025023) + serializeString(phoneNumber, buffer: buffer, boxed: false) + serializeString(phoneCodeHash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "auth.resendCode", parameters: [("phoneNumber", phoneNumber), ("phoneCodeHash", phoneCodeHash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.SentCode? in + let reader = BufferReader(buffer) + var result: Api.auth.SentCode? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.auth.SentCode + } + return result + }) + } + + public static func cancelCode(phoneNumber: String, phoneCodeHash: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(520357240) + serializeString(phoneNumber, buffer: buffer, boxed: false) + serializeString(phoneCodeHash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "auth.cancelCode", parameters: [("phoneNumber", phoneNumber), ("phoneCodeHash", phoneCodeHash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func dropTempAuthKeys(exceptAuthKeys: [Int64]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1907842680) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(exceptAuthKeys.count)) + for item in exceptAuthKeys { + serializeInt64(item, buffer: buffer, boxed: false) + } + return (FunctionDescription(name: "auth.dropTempAuthKeys", parameters: [("exceptAuthKeys", exceptAuthKeys)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func checkPassword(password: Api.InputCheckPasswordSRP) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-779399914) + password.serialize(buffer, true) + return (FunctionDescription(name: "auth.checkPassword", parameters: [("password", password)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.Authorization? in + let reader = BufferReader(buffer) + var result: Api.auth.Authorization? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.auth.Authorization + } + return result + }) + } + + public static func signUp(phoneNumber: String, phoneCodeHash: String, firstName: String, lastName: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-2131827673) + serializeString(phoneNumber, buffer: buffer, boxed: false) + serializeString(phoneCodeHash, buffer: buffer, boxed: false) + serializeString(firstName, buffer: buffer, boxed: false) + serializeString(lastName, buffer: buffer, boxed: false) + return (FunctionDescription(name: "auth.signUp", parameters: [("phoneNumber", phoneNumber), ("phoneCodeHash", phoneCodeHash), ("firstName", firstName), ("lastName", lastName)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.Authorization? in + let reader = BufferReader(buffer) + var result: Api.auth.Authorization? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.auth.Authorization + } + return result + }) + } + + public static func exportLoginToken(apiId: Int32, apiHash: String, exceptIds: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1313598185) + serializeInt32(apiId, buffer: buffer, boxed: false) + serializeString(apiHash, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(exceptIds.count)) + for item in exceptIds { + serializeInt32(item, buffer: buffer, boxed: false) + } + return (FunctionDescription(name: "auth.exportLoginToken", parameters: [("apiId", apiId), ("apiHash", apiHash), ("exceptIds", exceptIds)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.LoginToken? in + let reader = BufferReader(buffer) + var result: Api.auth.LoginToken? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.auth.LoginToken + } + return result + }) + } + + public static func importLoginToken(token: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1783866140) + serializeBytes(token, buffer: buffer, boxed: false) + return (FunctionDescription(name: "auth.importLoginToken", parameters: [("token", token)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.LoginToken? in + let reader = BufferReader(buffer) + var result: Api.auth.LoginToken? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.auth.LoginToken + } + return result + }) + } + + public static func acceptLoginToken(token: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-392909491) + serializeBytes(token, buffer: buffer, boxed: false) + return (FunctionDescription(name: "auth.acceptLoginToken", parameters: [("token", token)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Authorization? in + let reader = BufferReader(buffer) + var result: Api.Authorization? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Authorization + } + return result + }) + } + + public static func sendCode(phoneNumber: String, apiId: Int32, apiHash: String, settings: Api.CodeSettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1502141361) + serializeString(phoneNumber, buffer: buffer, boxed: false) + serializeInt32(apiId, buffer: buffer, boxed: false) + serializeString(apiHash, buffer: buffer, boxed: false) + settings.serialize(buffer, true) + return (FunctionDescription(name: "auth.sendCode", parameters: [("phoneNumber", phoneNumber), ("apiId", apiId), ("apiHash", apiHash), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.SentCode? in + let reader = BufferReader(buffer) + var result: Api.auth.SentCode? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.auth.SentCode + } + return result + }) + } + } + public struct bots { + public static func sendCustomRequest(customMethod: String, params: Api.DataJSON) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1440257555) + serializeString(customMethod, buffer: buffer, boxed: false) + params.serialize(buffer, true) + return (FunctionDescription(name: "bots.sendCustomRequest", parameters: [("customMethod", customMethod), ("params", params)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.DataJSON? in + let reader = BufferReader(buffer) + var result: Api.DataJSON? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.DataJSON + } + return result + }) + } + + public static func answerWebhookJSONQuery(queryId: Int64, data: Api.DataJSON) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-434028723) + serializeInt64(queryId, buffer: buffer, boxed: false) + data.serialize(buffer, true) + return (FunctionDescription(name: "bots.answerWebhookJSONQuery", parameters: [("queryId", queryId), ("data", data)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + } + public struct users { + public static func getUsers(id: [Api.InputUser]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.User]>) { + let buffer = Buffer() + buffer.appendInt32(227648840) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(id.count)) + for item in id { + item.serialize(buffer, true) + } + return (FunctionDescription(name: "users.getUsers", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.User]? in + let reader = BufferReader(buffer) + var result: [Api.User]? + if let _ = reader.readInt32() { + result = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + } + return result + }) + } + + public static func setSecureValueErrors(id: Api.InputUser, errors: [Api.SecureValueError]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1865902923) + id.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(errors.count)) + for item in errors { + item.serialize(buffer, true) + } + return (FunctionDescription(name: "users.setSecureValueErrors", parameters: [("id", id), ("errors", errors)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getFullUser(id: Api.InputUser) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-902781519) + id.serialize(buffer, true) + return (FunctionDescription(name: "users.getFullUser", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.UserFull? in + let reader = BufferReader(buffer) + var result: Api.UserFull? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.UserFull + } + return result + }) + } + } + public struct contacts { + public static func getStatuses() -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.ContactStatus]>) { + let buffer = Buffer() + buffer.appendInt32(-995929106) + + return (FunctionDescription(name: "contacts.getStatuses", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.ContactStatus]? in + let reader = BufferReader(buffer) + var result: [Api.ContactStatus]? + if let _ = reader.readInt32() { + result = Api.parseVector(reader, elementSignature: 0, elementType: Api.ContactStatus.self) + } + return result + }) + } + + public static func getBlocked(offset: Int32, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-176409329) + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(limit, buffer: buffer, boxed: false) + return (FunctionDescription(name: "contacts.getBlocked", parameters: [("offset", offset), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.contacts.Blocked? in + let reader = BufferReader(buffer) + var result: Api.contacts.Blocked? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.contacts.Blocked + } + return result + }) + } + + public static func exportCard() -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Int32]>) { + let buffer = Buffer() + buffer.appendInt32(-2065352905) + + return (FunctionDescription(name: "contacts.exportCard", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Int32]? in + let reader = BufferReader(buffer) + var result: [Int32]? + if let _ = reader.readInt32() { + result = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) + } + return result + }) + } + + public static func importCard(exportCard: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1340184318) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(exportCard.count)) + for item in exportCard { + serializeInt32(item, buffer: buffer, boxed: false) + } + return (FunctionDescription(name: "contacts.importCard", parameters: [("exportCard", exportCard)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.User? in + let reader = BufferReader(buffer) + var result: Api.User? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.User + } + return result + }) + } + + public static func search(q: String, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(301470424) + serializeString(q, buffer: buffer, boxed: false) + serializeInt32(limit, buffer: buffer, boxed: false) + return (FunctionDescription(name: "contacts.search", parameters: [("q", q), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.contacts.Found? in + let reader = BufferReader(buffer) + var result: Api.contacts.Found? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.contacts.Found + } + return result + }) + } + + public static func resolveUsername(username: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-113456221) + serializeString(username, buffer: buffer, boxed: false) + return (FunctionDescription(name: "contacts.resolveUsername", parameters: [("username", username)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.contacts.ResolvedPeer? in + let reader = BufferReader(buffer) + var result: Api.contacts.ResolvedPeer? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.contacts.ResolvedPeer + } + return result + }) + } + + public static func getTopPeers(flags: Int32, offset: Int32, limit: Int32, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-728224331) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(limit, buffer: buffer, boxed: false) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "contacts.getTopPeers", parameters: [("flags", flags), ("offset", offset), ("limit", limit), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.contacts.TopPeers? in + let reader = BufferReader(buffer) + var result: Api.contacts.TopPeers? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.contacts.TopPeers + } + return result + }) + } + + public static func resetTopPeerRating(category: Api.TopPeerCategory, peer: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(451113900) + category.serialize(buffer, true) + peer.serialize(buffer, true) + return (FunctionDescription(name: "contacts.resetTopPeerRating", parameters: [("category", category), ("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func importContacts(contacts: [Api.InputContact]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(746589157) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(contacts.count)) + for item in contacts { + item.serialize(buffer, true) + } + return (FunctionDescription(name: "contacts.importContacts", parameters: [("contacts", contacts)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.contacts.ImportedContacts? in + let reader = BufferReader(buffer) + var result: Api.contacts.ImportedContacts? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.contacts.ImportedContacts + } + return result + }) + } + + public static func resetSaved() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-2020263951) + + return (FunctionDescription(name: "contacts.resetSaved", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getContacts(hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1071414113) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "contacts.getContacts", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.contacts.Contacts? in + let reader = BufferReader(buffer) + var result: Api.contacts.Contacts? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.contacts.Contacts + } + return result + }) + } + + public static func toggleTopPeers(enabled: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-2062238246) + enabled.serialize(buffer, true) + return (FunctionDescription(name: "contacts.toggleTopPeers", parameters: [("enabled", enabled)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getContactIDs(hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Int32]>) { + let buffer = Buffer() + buffer.appendInt32(749357634) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "contacts.getContactIDs", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Int32]? in + let reader = BufferReader(buffer) + var result: [Int32]? + if let _ = reader.readInt32() { + result = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) + } + return result + }) + } + + public static func addContact(flags: Int32, id: Api.InputUser, firstName: String, lastName: String, phone: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-386636848) + serializeInt32(flags, buffer: buffer, boxed: false) + id.serialize(buffer, true) + serializeString(firstName, buffer: buffer, boxed: false) + serializeString(lastName, buffer: buffer, boxed: false) + serializeString(phone, buffer: buffer, boxed: false) + return (FunctionDescription(name: "contacts.addContact", parameters: [("flags", flags), ("id", id), ("firstName", firstName), ("lastName", lastName), ("phone", phone)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func acceptContact(id: Api.InputUser) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-130964977) + id.serialize(buffer, true) + return (FunctionDescription(name: "contacts.acceptContact", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func deleteContacts(id: [Api.InputUser]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(157945344) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(id.count)) + for item in id { + item.serialize(buffer, true) + } + return (FunctionDescription(name: "contacts.deleteContacts", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func getLocated(flags: Int32, geoPoint: Api.InputGeoPoint, selfExpires: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-750207932) + serializeInt32(flags, buffer: buffer, boxed: false) + geoPoint.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(selfExpires!, buffer: buffer, boxed: false)} + return (FunctionDescription(name: "contacts.getLocated", parameters: [("flags", flags), ("geoPoint", geoPoint), ("selfExpires", selfExpires)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func block(id: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1758204945) + id.serialize(buffer, true) + return (FunctionDescription(name: "contacts.block", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func unblock(id: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1096393392) + id.serialize(buffer, true) + return (FunctionDescription(name: "contacts.unblock", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func blockFromReplies(flags: Int32, msgId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(698914348) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(msgId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "contacts.blockFromReplies", parameters: [("flags", flags), ("msgId", msgId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + } + public struct help { + public static func getConfig() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-990308245) + + return (FunctionDescription(name: "help.getConfig", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Config? in + let reader = BufferReader(buffer) + var result: Api.Config? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Config + } + return result + }) + } + + public static func getNearestDc() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(531836966) + + return (FunctionDescription(name: "help.getNearestDc", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.NearestDc? in + let reader = BufferReader(buffer) + var result: Api.NearestDc? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.NearestDc + } + return result + }) + } + + public static func getInviteText() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1295590211) + + return (FunctionDescription(name: "help.getInviteText", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.InviteText? in + let reader = BufferReader(buffer) + var result: Api.help.InviteText? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.help.InviteText + } + return result + }) + } + + public static func getSupport() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1663104819) + + return (FunctionDescription(name: "help.getSupport", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.Support? in + let reader = BufferReader(buffer) + var result: Api.help.Support? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.help.Support + } + return result + }) + } + + public static func getAppChangelog(prevAppVersion: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1877938321) + serializeString(prevAppVersion, buffer: buffer, boxed: false) + return (FunctionDescription(name: "help.getAppChangelog", parameters: [("prevAppVersion", prevAppVersion)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func setBotUpdatesStatus(pendingUpdatesCount: Int32, message: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-333262899) + serializeInt32(pendingUpdatesCount, buffer: buffer, boxed: false) + serializeString(message, buffer: buffer, boxed: false) + return (FunctionDescription(name: "help.setBotUpdatesStatus", parameters: [("pendingUpdatesCount", pendingUpdatesCount), ("message", message)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getCdnConfig() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1375900482) + + return (FunctionDescription(name: "help.getCdnConfig", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.CdnConfig? in + let reader = BufferReader(buffer) + var result: Api.CdnConfig? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.CdnConfig + } + return result + }) + } + + public static func test() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1058929929) + + return (FunctionDescription(name: "help.test", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getRecentMeUrls(referer: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1036054804) + serializeString(referer, buffer: buffer, boxed: false) + return (FunctionDescription(name: "help.getRecentMeUrls", parameters: [("referer", referer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.RecentMeUrls? in + let reader = BufferReader(buffer) + var result: Api.help.RecentMeUrls? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.help.RecentMeUrls + } + return result + }) + } + + public static func getTermsOfServiceUpdate() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(749019089) + + return (FunctionDescription(name: "help.getTermsOfServiceUpdate", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.TermsOfServiceUpdate? in + let reader = BufferReader(buffer) + var result: Api.help.TermsOfServiceUpdate? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.help.TermsOfServiceUpdate + } + return result + }) + } + + public static func acceptTermsOfService(id: Api.DataJSON) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-294455398) + id.serialize(buffer, true) + return (FunctionDescription(name: "help.acceptTermsOfService", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getDeepLinkInfo(path: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1072547679) + serializeString(path, buffer: buffer, boxed: false) + return (FunctionDescription(name: "help.getDeepLinkInfo", parameters: [("path", path)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.DeepLinkInfo? in + let reader = BufferReader(buffer) + var result: Api.help.DeepLinkInfo? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.help.DeepLinkInfo + } + return result + }) + } + + public static func getPassportConfig(hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-966677240) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "help.getPassportConfig", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.PassportConfig? in + let reader = BufferReader(buffer) + var result: Api.help.PassportConfig? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.help.PassportConfig + } + return result + }) + } + + public static func getAppConfig() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1735311088) + + return (FunctionDescription(name: "help.getAppConfig", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.JSONValue? in + let reader = BufferReader(buffer) + var result: Api.JSONValue? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.JSONValue + } + return result + }) + } + + public static func saveAppLog(events: [Api.InputAppEvent]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1862465352) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(events.count)) + for item in events { + item.serialize(buffer, true) + } + return (FunctionDescription(name: "help.saveAppLog", parameters: [("events", events)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getAppUpdate(source: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1378703997) + serializeString(source, buffer: buffer, boxed: false) + return (FunctionDescription(name: "help.getAppUpdate", parameters: [("source", source)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.AppUpdate? in + let reader = BufferReader(buffer) + var result: Api.help.AppUpdate? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.help.AppUpdate + } + return result + }) + } + + public static func getPromoData() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1063816159) + + return (FunctionDescription(name: "help.getPromoData", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.PromoData? in + let reader = BufferReader(buffer) + var result: Api.help.PromoData? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.help.PromoData + } + return result + }) + } + + public static func hidePromoData(peer: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(505748629) + peer.serialize(buffer, true) + return (FunctionDescription(name: "help.hidePromoData", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func editUserInfo(userId: Api.InputUser, message: String, entities: [Api.MessageEntity]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1723407216) + userId.serialize(buffer, true) + serializeString(message, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(entities.count)) + for item in entities { + item.serialize(buffer, true) + } + return (FunctionDescription(name: "help.editUserInfo", parameters: [("userId", userId), ("message", message), ("entities", entities)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.UserInfo? in + let reader = BufferReader(buffer) + var result: Api.help.UserInfo? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.help.UserInfo + } + return result + }) + } + + public static func getUserInfo(userId: Api.InputUser) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(59377875) + userId.serialize(buffer, true) + return (FunctionDescription(name: "help.getUserInfo", parameters: [("userId", userId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.UserInfo? in + let reader = BufferReader(buffer) + var result: Api.help.UserInfo? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.help.UserInfo + } + return result + }) + } + + public static func dismissSuggestion(suggestion: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(125807007) + serializeString(suggestion, buffer: buffer, boxed: false) + return (FunctionDescription(name: "help.dismissSuggestion", parameters: [("suggestion", suggestion)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getCountriesList(langCode: String, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1935116200) + serializeString(langCode, buffer: buffer, boxed: false) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "help.getCountriesList", parameters: [("langCode", langCode), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.help.CountriesList? in + let reader = BufferReader(buffer) + var result: Api.help.CountriesList? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.help.CountriesList + } + return result + }) + } + } + public struct updates { + public static func getState() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-304838614) + + return (FunctionDescription(name: "updates.getState", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.updates.State? in + let reader = BufferReader(buffer) + var result: Api.updates.State? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.updates.State + } + return result + }) + } + + public static func getDifference(flags: Int32, pts: Int32, ptsTotalLimit: Int32?, date: Int32, qts: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(630429265) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(pts, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeInt32(ptsTotalLimit!, buffer: buffer, boxed: false)} + serializeInt32(date, buffer: buffer, boxed: false) + serializeInt32(qts, buffer: buffer, boxed: false) + return (FunctionDescription(name: "updates.getDifference", parameters: [("flags", flags), ("pts", pts), ("ptsTotalLimit", ptsTotalLimit), ("date", date), ("qts", qts)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.updates.Difference? in + let reader = BufferReader(buffer) + var result: Api.updates.Difference? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.updates.Difference + } + return result + }) + } + + public static func getChannelDifference(flags: Int32, channel: Api.InputChannel, filter: Api.ChannelMessagesFilter, pts: Int32, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(51854712) + serializeInt32(flags, buffer: buffer, boxed: false) + channel.serialize(buffer, true) + filter.serialize(buffer, true) + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(limit, buffer: buffer, boxed: false) + return (FunctionDescription(name: "updates.getChannelDifference", parameters: [("flags", flags), ("channel", channel), ("filter", filter), ("pts", pts), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.updates.ChannelDifference? in + let reader = BufferReader(buffer) + var result: Api.updates.ChannelDifference? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.updates.ChannelDifference + } + return result + }) + } + } + public struct folders { + public static func editPeerFolders(folderPeers: [Api.InputFolderPeer]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1749536939) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(folderPeers.count)) + for item in folderPeers { + item.serialize(buffer, true) + } + return (FunctionDescription(name: "folders.editPeerFolders", parameters: [("folderPeers", folderPeers)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func deleteFolder(folderId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(472471681) + serializeInt32(folderId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "folders.deleteFolder", parameters: [("folderId", folderId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + } + public struct upload { + public static func saveFilePart(fileId: Int64, filePart: Int32, bytes: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1291540959) + serializeInt64(fileId, buffer: buffer, boxed: false) + serializeInt32(filePart, buffer: buffer, boxed: false) + serializeBytes(bytes, buffer: buffer, boxed: false) + return (FunctionDescription(name: "upload.saveFilePart", parameters: [("fileId", fileId), ("filePart", filePart), ("bytes", bytes)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func saveBigFilePart(fileId: Int64, filePart: Int32, fileTotalParts: Int32, bytes: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-562337987) + serializeInt64(fileId, buffer: buffer, boxed: false) + serializeInt32(filePart, buffer: buffer, boxed: false) + serializeInt32(fileTotalParts, buffer: buffer, boxed: false) + serializeBytes(bytes, buffer: buffer, boxed: false) + return (FunctionDescription(name: "upload.saveBigFilePart", parameters: [("fileId", fileId), ("filePart", filePart), ("fileTotalParts", fileTotalParts), ("bytes", bytes)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getWebFile(location: Api.InputWebFileLocation, offset: Int32, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(619086221) + location.serialize(buffer, true) + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(limit, buffer: buffer, boxed: false) + return (FunctionDescription(name: "upload.getWebFile", parameters: [("location", location), ("offset", offset), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.upload.WebFile? in + let reader = BufferReader(buffer) + var result: Api.upload.WebFile? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.upload.WebFile + } + return result + }) + } + + public static func getCdnFile(fileToken: Buffer, offset: Int32, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(536919235) + serializeBytes(fileToken, buffer: buffer, boxed: false) + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(limit, buffer: buffer, boxed: false) + return (FunctionDescription(name: "upload.getCdnFile", parameters: [("fileToken", fileToken), ("offset", offset), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.upload.CdnFile? in + let reader = BufferReader(buffer) + var result: Api.upload.CdnFile? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.upload.CdnFile + } + return result + }) + } + + public static func reuploadCdnFile(fileToken: Buffer, requestToken: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.FileHash]>) { + let buffer = Buffer() + buffer.appendInt32(-1691921240) + serializeBytes(fileToken, buffer: buffer, boxed: false) + serializeBytes(requestToken, buffer: buffer, boxed: false) + return (FunctionDescription(name: "upload.reuploadCdnFile", parameters: [("fileToken", fileToken), ("requestToken", requestToken)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.FileHash]? in + let reader = BufferReader(buffer) + var result: [Api.FileHash]? + if let _ = reader.readInt32() { + result = Api.parseVector(reader, elementSignature: 0, elementType: Api.FileHash.self) + } + return result + }) + } + + public static func getCdnFileHashes(fileToken: Buffer, offset: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.FileHash]>) { + let buffer = Buffer() + buffer.appendInt32(1302676017) + serializeBytes(fileToken, buffer: buffer, boxed: false) + serializeInt32(offset, buffer: buffer, boxed: false) + return (FunctionDescription(name: "upload.getCdnFileHashes", parameters: [("fileToken", fileToken), ("offset", offset)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.FileHash]? in + let reader = BufferReader(buffer) + var result: [Api.FileHash]? + if let _ = reader.readInt32() { + result = Api.parseVector(reader, elementSignature: 0, elementType: Api.FileHash.self) + } + return result + }) + } + + public static func getFileHashes(location: Api.InputFileLocation, offset: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.FileHash]>) { + let buffer = Buffer() + buffer.appendInt32(-956147407) + location.serialize(buffer, true) + serializeInt32(offset, buffer: buffer, boxed: false) + return (FunctionDescription(name: "upload.getFileHashes", parameters: [("location", location), ("offset", offset)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.FileHash]? in + let reader = BufferReader(buffer) + var result: [Api.FileHash]? + if let _ = reader.readInt32() { + result = Api.parseVector(reader, elementSignature: 0, elementType: Api.FileHash.self) + } + return result + }) + } + + public static func getFile(flags: Int32, location: Api.InputFileLocation, offset: Int32, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1319462148) + serializeInt32(flags, buffer: buffer, boxed: false) + location.serialize(buffer, true) + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt32(limit, buffer: buffer, boxed: false) + return (FunctionDescription(name: "upload.getFile", parameters: [("flags", flags), ("location", location), ("offset", offset), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.upload.File? in + let reader = BufferReader(buffer) + var result: Api.upload.File? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.upload.File + } + return result + }) + } + } + public struct account { + public static func updateNotifySettings(peer: Api.InputNotifyPeer, settings: Api.InputPeerNotifySettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-2067899501) + peer.serialize(buffer, true) + settings.serialize(buffer, true) + return (FunctionDescription(name: "account.updateNotifySettings", parameters: [("peer", peer), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getNotifySettings(peer: Api.InputNotifyPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(313765169) + peer.serialize(buffer, true) + return (FunctionDescription(name: "account.getNotifySettings", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.PeerNotifySettings? in + let reader = BufferReader(buffer) + var result: Api.PeerNotifySettings? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.PeerNotifySettings + } + return result + }) + } + + public static func resetNotifySettings() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-612493497) + + return (FunctionDescription(name: "account.resetNotifySettings", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func updateProfile(flags: Int32, firstName: String?, lastName: String?, about: String?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(2018596725) + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {serializeString(firstName!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeString(lastName!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeString(about!, buffer: buffer, boxed: false)} + return (FunctionDescription(name: "account.updateProfile", parameters: [("flags", flags), ("firstName", firstName), ("lastName", lastName), ("about", about)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.User? in + let reader = BufferReader(buffer) + var result: Api.User? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.User + } + return result + }) + } + + public static func updateStatus(offline: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1713919532) + offline.serialize(buffer, true) + return (FunctionDescription(name: "account.updateStatus", parameters: [("offline", offline)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func checkUsername(username: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(655677548) + serializeString(username, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.checkUsername", parameters: [("username", username)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func updateUsername(username: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1040964988) + serializeString(username, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.updateUsername", parameters: [("username", username)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.User? in + let reader = BufferReader(buffer) + var result: Api.User? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.User + } + return result + }) + } + + public static func getPrivacy(key: Api.InputPrivacyKey) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-623130288) + key.serialize(buffer, true) + return (FunctionDescription(name: "account.getPrivacy", parameters: [("key", key)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.PrivacyRules? in + let reader = BufferReader(buffer) + var result: Api.account.PrivacyRules? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.account.PrivacyRules + } + return result + }) + } + + public static func setPrivacy(key: Api.InputPrivacyKey, rules: [Api.InputPrivacyRule]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-906486552) + key.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(rules.count)) + for item in rules { + item.serialize(buffer, true) + } + return (FunctionDescription(name: "account.setPrivacy", parameters: [("key", key), ("rules", rules)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.PrivacyRules? in + let reader = BufferReader(buffer) + var result: Api.account.PrivacyRules? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.account.PrivacyRules + } + return result + }) + } + + public static func deleteAccount(reason: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1099779595) + serializeString(reason, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.deleteAccount", parameters: [("reason", reason)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getAccountTTL() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(150761757) + + return (FunctionDescription(name: "account.getAccountTTL", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.AccountDaysTTL? in + let reader = BufferReader(buffer) + var result: Api.AccountDaysTTL? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.AccountDaysTTL + } + return result + }) + } + + public static func setAccountTTL(ttl: Api.AccountDaysTTL) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(608323678) + ttl.serialize(buffer, true) + return (FunctionDescription(name: "account.setAccountTTL", parameters: [("ttl", ttl)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func changePhone(phoneNumber: String, phoneCodeHash: String, phoneCode: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1891839707) + serializeString(phoneNumber, buffer: buffer, boxed: false) + serializeString(phoneCodeHash, buffer: buffer, boxed: false) + serializeString(phoneCode, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.changePhone", parameters: [("phoneNumber", phoneNumber), ("phoneCodeHash", phoneCodeHash), ("phoneCode", phoneCode)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.User? in + let reader = BufferReader(buffer) + var result: Api.User? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.User + } + return result + }) + } + + public static func updateDeviceLocked(period: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(954152242) + serializeInt32(period, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.updateDeviceLocked", parameters: [("period", period)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getAuthorizations() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-484392616) + + return (FunctionDescription(name: "account.getAuthorizations", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.Authorizations? in + let reader = BufferReader(buffer) + var result: Api.account.Authorizations? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.account.Authorizations + } + return result + }) + } + + public static func resetAuthorization(hash: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-545786948) + serializeInt64(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.resetAuthorization", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getPassword() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1418342645) + + return (FunctionDescription(name: "account.getPassword", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.Password? in + let reader = BufferReader(buffer) + var result: Api.account.Password? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.account.Password + } + return result + }) + } + + public static func confirmPhone(phoneCodeHash: String, phoneCode: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1596029123) + serializeString(phoneCodeHash, buffer: buffer, boxed: false) + serializeString(phoneCode, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.confirmPhone", parameters: [("phoneCodeHash", phoneCodeHash), ("phoneCode", phoneCode)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func unregisterDevice(tokenType: Int32, token: String, otherUids: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(813089983) + serializeInt32(tokenType, buffer: buffer, boxed: false) + serializeString(token, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(otherUids.count)) + for item in otherUids { + serializeInt32(item, buffer: buffer, boxed: false) + } + return (FunctionDescription(name: "account.unregisterDevice", parameters: [("tokenType", tokenType), ("token", token), ("otherUids", otherUids)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getWebAuthorizations() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(405695855) + + return (FunctionDescription(name: "account.getWebAuthorizations", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.WebAuthorizations? in + let reader = BufferReader(buffer) + var result: Api.account.WebAuthorizations? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.account.WebAuthorizations + } + return result + }) + } + + public static func resetWebAuthorization(hash: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(755087855) + serializeInt64(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.resetWebAuthorization", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func resetWebAuthorizations() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1747789204) + + return (FunctionDescription(name: "account.resetWebAuthorizations", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getAllSecureValues() -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.SecureValue]>) { + let buffer = Buffer() + buffer.appendInt32(-1299661699) + + return (FunctionDescription(name: "account.getAllSecureValues", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.SecureValue]? in + let reader = BufferReader(buffer) + var result: [Api.SecureValue]? + if let _ = reader.readInt32() { + result = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureValue.self) + } + return result + }) + } + + public static func getSecureValue(types: [Api.SecureValueType]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.SecureValue]>) { + let buffer = Buffer() + buffer.appendInt32(1936088002) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(types.count)) + for item in types { + item.serialize(buffer, true) + } + return (FunctionDescription(name: "account.getSecureValue", parameters: [("types", types)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.SecureValue]? in + let reader = BufferReader(buffer) + var result: [Api.SecureValue]? + if let _ = reader.readInt32() { + result = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureValue.self) + } + return result + }) + } + + public static func saveSecureValue(value: Api.InputSecureValue, secureSecretId: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1986010339) + value.serialize(buffer, true) + serializeInt64(secureSecretId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.saveSecureValue", parameters: [("value", value), ("secureSecretId", secureSecretId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.SecureValue? in + let reader = BufferReader(buffer) + var result: Api.SecureValue? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.SecureValue + } + return result + }) + } + + public static func deleteSecureValue(types: [Api.SecureValueType]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1199522741) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(types.count)) + for item in types { + item.serialize(buffer, true) + } + return (FunctionDescription(name: "account.deleteSecureValue", parameters: [("types", types)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getAuthorizationForm(botId: Int32, scope: String, publicKey: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1200903967) + serializeInt32(botId, buffer: buffer, boxed: false) + serializeString(scope, buffer: buffer, boxed: false) + serializeString(publicKey, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.getAuthorizationForm", parameters: [("botId", botId), ("scope", scope), ("publicKey", publicKey)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.AuthorizationForm? in + let reader = BufferReader(buffer) + var result: Api.account.AuthorizationForm? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.account.AuthorizationForm + } + return result + }) + } + + public static func acceptAuthorization(botId: Int32, scope: String, publicKey: String, valueHashes: [Api.SecureValueHash], credentials: Api.SecureCredentialsEncrypted) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-419267436) + serializeInt32(botId, buffer: buffer, boxed: false) + serializeString(scope, buffer: buffer, boxed: false) + serializeString(publicKey, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(valueHashes.count)) + for item in valueHashes { + item.serialize(buffer, true) + } + credentials.serialize(buffer, true) + return (FunctionDescription(name: "account.acceptAuthorization", parameters: [("botId", botId), ("scope", scope), ("publicKey", publicKey), ("valueHashes", valueHashes), ("credentials", credentials)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func verifyPhone(phoneNumber: String, phoneCodeHash: String, phoneCode: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1305716726) + serializeString(phoneNumber, buffer: buffer, boxed: false) + serializeString(phoneCodeHash, buffer: buffer, boxed: false) + serializeString(phoneCode, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.verifyPhone", parameters: [("phoneNumber", phoneNumber), ("phoneCodeHash", phoneCodeHash), ("phoneCode", phoneCode)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func sendVerifyEmailCode(email: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1880182943) + serializeString(email, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.sendVerifyEmailCode", parameters: [("email", email)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.SentEmailCode? in + let reader = BufferReader(buffer) + var result: Api.account.SentEmailCode? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.account.SentEmailCode + } + return result + }) + } + + public static func verifyEmail(email: String, code: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-323339813) + serializeString(email, buffer: buffer, boxed: false) + serializeString(code, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.verifyEmail", parameters: [("email", email), ("code", code)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getTmpPassword(password: Api.InputCheckPasswordSRP, period: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1151208273) + password.serialize(buffer, true) + serializeInt32(period, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.getTmpPassword", parameters: [("password", password), ("period", period)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.TmpPassword? in + let reader = BufferReader(buffer) + var result: Api.account.TmpPassword? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.account.TmpPassword + } + return result + }) + } + + public static func updatePasswordSettings(password: Api.InputCheckPasswordSRP, newSettings: Api.account.PasswordInputSettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1516564433) + password.serialize(buffer, true) + newSettings.serialize(buffer, true) + return (FunctionDescription(name: "account.updatePasswordSettings", parameters: [("password", password), ("newSettings", newSettings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getPasswordSettings(password: Api.InputCheckPasswordSRP) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1663767815) + password.serialize(buffer, true) + return (FunctionDescription(name: "account.getPasswordSettings", parameters: [("password", password)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.PasswordSettings? in + let reader = BufferReader(buffer) + var result: Api.account.PasswordSettings? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.account.PasswordSettings + } + return result + }) + } + + public static func confirmPasswordEmail(code: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1881204448) + serializeString(code, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.confirmPasswordEmail", parameters: [("code", code)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func resendPasswordEmail() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(2055154197) + + return (FunctionDescription(name: "account.resendPasswordEmail", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func cancelPasswordEmail() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1043606090) + + return (FunctionDescription(name: "account.cancelPasswordEmail", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getContactSignUpNotification() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1626880216) + + return (FunctionDescription(name: "account.getContactSignUpNotification", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func setContactSignUpNotification(silent: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-806076575) + silent.serialize(buffer, true) + return (FunctionDescription(name: "account.setContactSignUpNotification", parameters: [("silent", silent)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getNotifyExceptions(flags: Int32, peer: Api.InputNotifyPeer?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1398240377) + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {peer!.serialize(buffer, true)} + return (FunctionDescription(name: "account.getNotifyExceptions", parameters: [("flags", flags), ("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func getWallPapers(hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1430579357) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.getWallPapers", parameters: [("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.WallPapers? in + let reader = BufferReader(buffer) + var result: Api.account.WallPapers? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.account.WallPapers + } + return result + }) + } + + public static func uploadWallPaper(file: Api.InputFile, mimeType: String, settings: Api.WallPaperSettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-578472351) + file.serialize(buffer, true) + serializeString(mimeType, buffer: buffer, boxed: false) + settings.serialize(buffer, true) + return (FunctionDescription(name: "account.uploadWallPaper", parameters: [("file", file), ("mimeType", mimeType), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.WallPaper? in + let reader = BufferReader(buffer) + var result: Api.WallPaper? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.WallPaper + } + return result + }) + } + + public static func getWallPaper(wallpaper: Api.InputWallPaper) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-57811990) + wallpaper.serialize(buffer, true) + return (FunctionDescription(name: "account.getWallPaper", parameters: [("wallpaper", wallpaper)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.WallPaper? in + let reader = BufferReader(buffer) + var result: Api.WallPaper? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.WallPaper + } + return result + }) + } + + public static func saveWallPaper(wallpaper: Api.InputWallPaper, unsave: Api.Bool, settings: Api.WallPaperSettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1817860919) + wallpaper.serialize(buffer, true) + unsave.serialize(buffer, true) + settings.serialize(buffer, true) + return (FunctionDescription(name: "account.saveWallPaper", parameters: [("wallpaper", wallpaper), ("unsave", unsave), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func installWallPaper(wallpaper: Api.InputWallPaper, settings: Api.WallPaperSettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-18000023) + wallpaper.serialize(buffer, true) + settings.serialize(buffer, true) + return (FunctionDescription(name: "account.installWallPaper", parameters: [("wallpaper", wallpaper), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func resetWallPapers() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1153722364) + + return (FunctionDescription(name: "account.resetWallPapers", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getAutoDownloadSettings() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1457130303) + + return (FunctionDescription(name: "account.getAutoDownloadSettings", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.AutoDownloadSettings? in + let reader = BufferReader(buffer) + var result: Api.account.AutoDownloadSettings? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.account.AutoDownloadSettings + } + return result + }) + } + + public static func saveAutoDownloadSettings(flags: Int32, settings: Api.AutoDownloadSettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1995661875) + serializeInt32(flags, buffer: buffer, boxed: false) + settings.serialize(buffer, true) + return (FunctionDescription(name: "account.saveAutoDownloadSettings", parameters: [("flags", flags), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func registerDevice(flags: Int32, tokenType: Int32, token: String, appSandbox: Api.Bool, secret: Buffer, otherUids: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1754754159) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeInt32(tokenType, buffer: buffer, boxed: false) + serializeString(token, buffer: buffer, boxed: false) + appSandbox.serialize(buffer, true) + serializeBytes(secret, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(otherUids.count)) + for item in otherUids { + serializeInt32(item, buffer: buffer, boxed: false) + } + return (FunctionDescription(name: "account.registerDevice", parameters: [("flags", flags), ("tokenType", tokenType), ("token", token), ("appSandbox", appSandbox), ("secret", secret), ("otherUids", otherUids)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func uploadTheme(flags: Int32, file: Api.InputFile, thumb: Api.InputFile?, fileName: String, mimeType: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(473805619) + serializeInt32(flags, buffer: buffer, boxed: false) + file.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {thumb!.serialize(buffer, true)} + serializeString(fileName, buffer: buffer, boxed: false) + serializeString(mimeType, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.uploadTheme", parameters: [("flags", flags), ("file", file), ("thumb", thumb), ("fileName", fileName), ("mimeType", mimeType)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Document? in + let reader = BufferReader(buffer) + var result: Api.Document? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Document + } + return result + }) + } + + public static func saveTheme(theme: Api.InputTheme, unsave: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-229175188) + theme.serialize(buffer, true) + unsave.serialize(buffer, true) + return (FunctionDescription(name: "account.saveTheme", parameters: [("theme", theme), ("unsave", unsave)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func installTheme(flags: Int32, format: String?, theme: Api.InputTheme?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(2061776695) + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 1) != 0 {serializeString(format!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {theme!.serialize(buffer, true)} + return (FunctionDescription(name: "account.installTheme", parameters: [("flags", flags), ("format", format), ("theme", theme)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getTheme(format: String, theme: Api.InputTheme, documentId: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1919060949) + serializeString(format, buffer: buffer, boxed: false) + theme.serialize(buffer, true) + serializeInt64(documentId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.getTheme", parameters: [("format", format), ("theme", theme), ("documentId", documentId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Theme? in + let reader = BufferReader(buffer) + var result: Api.Theme? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Theme + } + return result + }) + } + + public static func getThemes(format: String, hash: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(676939512) + serializeString(format, buffer: buffer, boxed: false) + serializeInt32(hash, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.getThemes", parameters: [("format", format), ("hash", hash)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.Themes? in + let reader = BufferReader(buffer) + var result: Api.account.Themes? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.account.Themes + } + return result + }) + } + + public static func setContentSettings(flags: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1250643605) + serializeInt32(flags, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.setContentSettings", parameters: [("flags", flags)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func getContentSettings() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1952756306) + + return (FunctionDescription(name: "account.getContentSettings", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.account.ContentSettings? in + let reader = BufferReader(buffer) + var result: Api.account.ContentSettings? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.account.ContentSettings + } + return result + }) + } + + public static func createTheme(flags: Int32, slug: String, title: String, document: Api.InputDocument?, settings: Api.InputThemeSettings?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-2077048289) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(slug, buffer: buffer, boxed: false) + serializeString(title, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 2) != 0 {document!.serialize(buffer, true)} + if Int(flags) & Int(1 << 3) != 0 {settings!.serialize(buffer, true)} + return (FunctionDescription(name: "account.createTheme", parameters: [("flags", flags), ("slug", slug), ("title", title), ("document", document), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Theme? in + let reader = BufferReader(buffer) + var result: Api.Theme? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Theme + } + return result + }) + } + + public static func updateTheme(flags: Int32, format: String, theme: Api.InputTheme, slug: String?, title: String?, document: Api.InputDocument?, settings: Api.InputThemeSettings?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1555261397) + serializeInt32(flags, buffer: buffer, boxed: false) + serializeString(format, buffer: buffer, boxed: false) + theme.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {serializeString(slug!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 1) != 0 {serializeString(title!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {document!.serialize(buffer, true)} + if Int(flags) & Int(1 << 3) != 0 {settings!.serialize(buffer, true)} + return (FunctionDescription(name: "account.updateTheme", parameters: [("flags", flags), ("format", format), ("theme", theme), ("slug", slug), ("title", title), ("document", document), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Theme? in + let reader = BufferReader(buffer) + var result: Api.Theme? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Theme + } + return result + }) + } + + public static func getMultiWallPapers(wallpapers: [Api.InputWallPaper]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.WallPaper]>) { + let buffer = Buffer() + buffer.appendInt32(1705865692) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(wallpapers.count)) + for item in wallpapers { + item.serialize(buffer, true) + } + return (FunctionDescription(name: "account.getMultiWallPapers", parameters: [("wallpapers", wallpapers)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.WallPaper]? in + let reader = BufferReader(buffer) + var result: [Api.WallPaper]? + if let _ = reader.readInt32() { + result = Api.parseVector(reader, elementSignature: 0, elementType: Api.WallPaper.self) + } + return result + }) + } + + public static func getGlobalPrivacySettings() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-349483786) + + return (FunctionDescription(name: "account.getGlobalPrivacySettings", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.GlobalPrivacySettings? in + let reader = BufferReader(buffer) + var result: Api.GlobalPrivacySettings? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.GlobalPrivacySettings + } + return result + }) + } + + public static func setGlobalPrivacySettings(settings: Api.GlobalPrivacySettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(517647042) + settings.serialize(buffer, true) + return (FunctionDescription(name: "account.setGlobalPrivacySettings", parameters: [("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.GlobalPrivacySettings? in + let reader = BufferReader(buffer) + var result: Api.GlobalPrivacySettings? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.GlobalPrivacySettings + } + return result + }) + } + + public static func sendChangePhoneCode(phoneNumber: String, settings: Api.CodeSettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-2108208411) + serializeString(phoneNumber, buffer: buffer, boxed: false) + settings.serialize(buffer, true) + return (FunctionDescription(name: "account.sendChangePhoneCode", parameters: [("phoneNumber", phoneNumber), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.SentCode? in + let reader = BufferReader(buffer) + var result: Api.auth.SentCode? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.auth.SentCode + } + return result + }) + } + + public static func sendConfirmPhoneCode(hash: String, settings: Api.CodeSettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(457157256) + serializeString(hash, buffer: buffer, boxed: false) + settings.serialize(buffer, true) + return (FunctionDescription(name: "account.sendConfirmPhoneCode", parameters: [("hash", hash), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.SentCode? in + let reader = BufferReader(buffer) + var result: Api.auth.SentCode? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.auth.SentCode + } + return result + }) + } + + public static func sendVerifyPhoneCode(phoneNumber: String, settings: Api.CodeSettings) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1516022023) + serializeString(phoneNumber, buffer: buffer, boxed: false) + settings.serialize(buffer, true) + return (FunctionDescription(name: "account.sendVerifyPhoneCode", parameters: [("phoneNumber", phoneNumber), ("settings", settings)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.auth.SentCode? in + let reader = BufferReader(buffer) + var result: Api.auth.SentCode? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.auth.SentCode + } + return result + }) + } + + public static func reportPeer(peer: Api.InputPeer, reason: Api.ReportReason, message: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-977650298) + peer.serialize(buffer, true) + reason.serialize(buffer, true) + serializeString(message, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.reportPeer", parameters: [("peer", peer), ("reason", reason), ("message", message)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func reportProfilePhoto(peer: Api.InputPeer, photoId: Api.InputPhoto, reason: Api.ReportReason, message: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-91437323) + peer.serialize(buffer, true) + photoId.serialize(buffer, true) + reason.serialize(buffer, true) + serializeString(message, buffer: buffer, boxed: false) + return (FunctionDescription(name: "account.reportProfilePhoto", parameters: [("peer", peer), ("photoId", photoId), ("reason", reason), ("message", message)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + } + public struct wallet { + public static func sendLiteRequest(body: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-490089666) + serializeBytes(body, buffer: buffer, boxed: false) + return (FunctionDescription(name: "wallet.sendLiteRequest", parameters: [("body", body)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.wallet.LiteResponse? in + let reader = BufferReader(buffer) + var result: Api.wallet.LiteResponse? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.wallet.LiteResponse + } + return result + }) + } + + public static func getKeySecretSalt(revoke: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(190313286) + revoke.serialize(buffer, true) + return (FunctionDescription(name: "wallet.getKeySecretSalt", parameters: [("revoke", revoke)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.wallet.KeySecretSalt? in + let reader = BufferReader(buffer) + var result: Api.wallet.KeySecretSalt? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.wallet.KeySecretSalt + } + return result + }) + } + } + public struct langpack { + public static func getLangPack(langPack: String, langCode: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-219008246) + serializeString(langPack, buffer: buffer, boxed: false) + serializeString(langCode, buffer: buffer, boxed: false) + return (FunctionDescription(name: "langpack.getLangPack", parameters: [("langPack", langPack), ("langCode", langCode)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.LangPackDifference? in + let reader = BufferReader(buffer) + var result: Api.LangPackDifference? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.LangPackDifference + } + return result + }) + } + + public static func getStrings(langPack: String, langCode: String, keys: [String]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.LangPackString]>) { + let buffer = Buffer() + buffer.appendInt32(-269862909) + serializeString(langPack, buffer: buffer, boxed: false) + serializeString(langCode, buffer: buffer, boxed: false) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(keys.count)) + for item in keys { + serializeString(item, buffer: buffer, boxed: false) + } + return (FunctionDescription(name: "langpack.getStrings", parameters: [("langPack", langPack), ("langCode", langCode), ("keys", keys)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.LangPackString]? in + let reader = BufferReader(buffer) + var result: [Api.LangPackString]? + if let _ = reader.readInt32() { + result = Api.parseVector(reader, elementSignature: 0, elementType: Api.LangPackString.self) + } + return result + }) + } + + public static func getLanguages(langPack: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.LangPackLanguage]>) { + let buffer = Buffer() + buffer.appendInt32(1120311183) + serializeString(langPack, buffer: buffer, boxed: false) + return (FunctionDescription(name: "langpack.getLanguages", parameters: [("langPack", langPack)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Api.LangPackLanguage]? in + let reader = BufferReader(buffer) + var result: [Api.LangPackLanguage]? + if let _ = reader.readInt32() { + result = Api.parseVector(reader, elementSignature: 0, elementType: Api.LangPackLanguage.self) + } + return result + }) + } + + public static func getLanguage(langPack: String, langCode: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1784243458) + serializeString(langPack, buffer: buffer, boxed: false) + serializeString(langCode, buffer: buffer, boxed: false) + return (FunctionDescription(name: "langpack.getLanguage", parameters: [("langPack", langPack), ("langCode", langCode)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.LangPackLanguage? in + let reader = BufferReader(buffer) + var result: Api.LangPackLanguage? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.LangPackLanguage + } + return result + }) + } + + public static func getDifference(langPack: String, langCode: String, fromVersion: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-845657435) + serializeString(langPack, buffer: buffer, boxed: false) + serializeString(langCode, buffer: buffer, boxed: false) + serializeInt32(fromVersion, buffer: buffer, boxed: false) + return (FunctionDescription(name: "langpack.getDifference", parameters: [("langPack", langPack), ("langCode", langCode), ("fromVersion", fromVersion)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.LangPackDifference? in + let reader = BufferReader(buffer) + var result: Api.LangPackDifference? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.LangPackDifference + } + return result + }) + } + } + public struct photos { + public static func deletePhotos(id: [Api.InputPhoto]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Int64]>) { + let buffer = Buffer() + buffer.appendInt32(-2016444625) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(id.count)) + for item in id { + item.serialize(buffer, true) + } + return (FunctionDescription(name: "photos.deletePhotos", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> [Int64]? in + let reader = BufferReader(buffer) + var result: [Int64]? + if let _ = reader.readInt32() { + result = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self) + } + return result + }) + } + + public static func getUserPhotos(userId: Api.InputUser, offset: Int32, maxId: Int64, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1848823128) + userId.serialize(buffer, true) + serializeInt32(offset, buffer: buffer, boxed: false) + serializeInt64(maxId, buffer: buffer, boxed: false) + serializeInt32(limit, buffer: buffer, boxed: false) + return (FunctionDescription(name: "photos.getUserPhotos", parameters: [("userId", userId), ("offset", offset), ("maxId", maxId), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.photos.Photos? in + let reader = BufferReader(buffer) + var result: Api.photos.Photos? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.photos.Photos + } + return result + }) + } + + public static func updateProfilePhoto(id: Api.InputPhoto) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1926525996) + id.serialize(buffer, true) + return (FunctionDescription(name: "photos.updateProfilePhoto", parameters: [("id", id)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.photos.Photo? in + let reader = BufferReader(buffer) + var result: Api.photos.Photo? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.photos.Photo + } + return result + }) + } + + public static func uploadProfilePhoto(flags: Int32, file: Api.InputFile?, video: Api.InputFile?, videoStartTs: Double?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1980559511) + serializeInt32(flags, buffer: buffer, boxed: false) + if Int(flags) & Int(1 << 0) != 0 {file!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {video!.serialize(buffer, true)} + if Int(flags) & Int(1 << 2) != 0 {serializeDouble(videoStartTs!, buffer: buffer, boxed: false)} + return (FunctionDescription(name: "photos.uploadProfilePhoto", parameters: [("flags", flags), ("file", file), ("video", video), ("videoStartTs", videoStartTs)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.photos.Photo? in + let reader = BufferReader(buffer) + var result: Api.photos.Photo? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.photos.Photo + } + return result + }) + } + } + public struct phone { + public static func getCallConfig() -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1430593449) + + return (FunctionDescription(name: "phone.getCallConfig", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.DataJSON? in + let reader = BufferReader(buffer) + var result: Api.DataJSON? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.DataJSON + } + return result + }) + } + + public static func acceptCall(peer: Api.InputPhoneCall, gB: Buffer, `protocol`: Api.PhoneCallProtocol) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1003664544) + peer.serialize(buffer, true) + serializeBytes(gB, buffer: buffer, boxed: false) + `protocol`.serialize(buffer, true) + return (FunctionDescription(name: "phone.acceptCall", parameters: [("peer", peer), ("gB", gB), ("`protocol`", `protocol`)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.phone.PhoneCall? in + let reader = BufferReader(buffer) + var result: Api.phone.PhoneCall? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.phone.PhoneCall + } + return result + }) + } + + public static func confirmCall(peer: Api.InputPhoneCall, gA: Buffer, keyFingerprint: Int64, `protocol`: Api.PhoneCallProtocol) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(788404002) + peer.serialize(buffer, true) + serializeBytes(gA, buffer: buffer, boxed: false) + serializeInt64(keyFingerprint, buffer: buffer, boxed: false) + `protocol`.serialize(buffer, true) + return (FunctionDescription(name: "phone.confirmCall", parameters: [("peer", peer), ("gA", gA), ("keyFingerprint", keyFingerprint), ("`protocol`", `protocol`)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.phone.PhoneCall? in + let reader = BufferReader(buffer) + var result: Api.phone.PhoneCall? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.phone.PhoneCall + } + return result + }) + } + + public static func receivedCall(peer: Api.InputPhoneCall) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(399855457) + peer.serialize(buffer, true) + return (FunctionDescription(name: "phone.receivedCall", parameters: [("peer", peer)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func saveCallDebug(peer: Api.InputPhoneCall, debug: Api.DataJSON) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(662363518) + peer.serialize(buffer, true) + debug.serialize(buffer, true) + return (FunctionDescription(name: "phone.saveCallDebug", parameters: [("peer", peer), ("debug", debug)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func setCallRating(flags: Int32, peer: Api.InputPhoneCall, rating: Int32, comment: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1508562471) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + serializeInt32(rating, buffer: buffer, boxed: false) + serializeString(comment, buffer: buffer, boxed: false) + return (FunctionDescription(name: "phone.setCallRating", parameters: [("flags", flags), ("peer", peer), ("rating", rating), ("comment", comment)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func requestCall(flags: Int32, userId: Api.InputUser, randomId: Int32, gAHash: Buffer, `protocol`: Api.PhoneCallProtocol) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1124046573) + serializeInt32(flags, buffer: buffer, boxed: false) + userId.serialize(buffer, true) + serializeInt32(randomId, buffer: buffer, boxed: false) + serializeBytes(gAHash, buffer: buffer, boxed: false) + `protocol`.serialize(buffer, true) + return (FunctionDescription(name: "phone.requestCall", parameters: [("flags", flags), ("userId", userId), ("randomId", randomId), ("gAHash", gAHash), ("`protocol`", `protocol`)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.phone.PhoneCall? in + let reader = BufferReader(buffer) + var result: Api.phone.PhoneCall? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.phone.PhoneCall + } + return result + }) + } + + public static func discardCall(flags: Int32, peer: Api.InputPhoneCall, duration: Int32, reason: Api.PhoneCallDiscardReason, connectionId: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1295269440) + serializeInt32(flags, buffer: buffer, boxed: false) + peer.serialize(buffer, true) + serializeInt32(duration, buffer: buffer, boxed: false) + reason.serialize(buffer, true) + serializeInt64(connectionId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "phone.discardCall", parameters: [("flags", flags), ("peer", peer), ("duration", duration), ("reason", reason), ("connectionId", connectionId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func sendSignalingData(peer: Api.InputPhoneCall, data: Buffer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-8744061) + peer.serialize(buffer, true) + serializeBytes(data, buffer: buffer, boxed: false) + return (FunctionDescription(name: "phone.sendSignalingData", parameters: [("peer", peer), ("data", data)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func createGroupCall(peer: Api.InputPeer, randomId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1120031776) + peer.serialize(buffer, true) + serializeInt32(randomId, buffer: buffer, boxed: false) + return (FunctionDescription(name: "phone.createGroupCall", parameters: [("peer", peer), ("randomId", randomId)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func joinGroupCall(flags: Int32, call: Api.InputGroupCall, params: Api.DataJSON) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1604095586) + serializeInt32(flags, buffer: buffer, boxed: false) + call.serialize(buffer, true) + params.serialize(buffer, true) + return (FunctionDescription(name: "phone.joinGroupCall", parameters: [("flags", flags), ("call", call), ("params", params)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func leaveGroupCall(call: Api.InputGroupCall, source: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1342404601) + call.serialize(buffer, true) + serializeInt32(source, buffer: buffer, boxed: false) + return (FunctionDescription(name: "phone.leaveGroupCall", parameters: [("call", call), ("source", source)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func inviteToGroupCall(call: Api.InputGroupCall, users: [Api.InputUser]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(2067345760) + call.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(users.count)) + for item in users { + item.serialize(buffer, true) + } + return (FunctionDescription(name: "phone.inviteToGroupCall", parameters: [("call", call), ("users", users)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func discardGroupCall(call: Api.InputGroupCall) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(2054648117) + call.serialize(buffer, true) + return (FunctionDescription(name: "phone.discardGroupCall", parameters: [("call", call)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func toggleGroupCallSettings(flags: Int32, call: Api.InputGroupCall, joinMuted: Api.Bool?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(1958458429) + serializeInt32(flags, buffer: buffer, boxed: false) + call.serialize(buffer, true) + if Int(flags) & Int(1 << 0) != 0 {joinMuted!.serialize(buffer, true)} + return (FunctionDescription(name: "phone.toggleGroupCallSettings", parameters: [("flags", flags), ("call", call), ("joinMuted", joinMuted)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + + public static func getGroupCall(call: Api.InputGroupCall) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(209498135) + call.serialize(buffer, true) + return (FunctionDescription(name: "phone.getGroupCall", parameters: [("call", call)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.phone.GroupCall? in + let reader = BufferReader(buffer) + var result: Api.phone.GroupCall? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.phone.GroupCall + } + return result + }) + } + + public static func getGroupParticipants(call: Api.InputGroupCall, ids: [Int32], sources: [Int32], offset: String, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-906898811) + call.serialize(buffer, true) + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(ids.count)) + for item in ids { + serializeInt32(item, buffer: buffer, boxed: false) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(sources.count)) + for item in sources { + serializeInt32(item, buffer: buffer, boxed: false) + } + serializeString(offset, buffer: buffer, boxed: false) + serializeInt32(limit, buffer: buffer, boxed: false) + return (FunctionDescription(name: "phone.getGroupParticipants", parameters: [("call", call), ("ids", ids), ("sources", sources), ("offset", offset), ("limit", limit)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.phone.GroupParticipants? in + let reader = BufferReader(buffer) + var result: Api.phone.GroupParticipants? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.phone.GroupParticipants + } + return result + }) + } + + public static func checkGroupCall(call: Api.InputGroupCall, source: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1219855382) + call.serialize(buffer, true) + serializeInt32(source, buffer: buffer, boxed: false) + return (FunctionDescription(name: "phone.checkGroupCall", parameters: [("call", call), ("source", source)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + let reader = BufferReader(buffer) + var result: Api.Bool? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Bool + } + return result + }) + } + + public static func editGroupCallMember(flags: Int32, call: Api.InputGroupCall, userId: Api.InputUser, volume: Int32?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(-1511559976) + serializeInt32(flags, buffer: buffer, boxed: false) + call.serialize(buffer, true) + userId.serialize(buffer, true) + if Int(flags) & Int(1 << 1) != 0 {serializeInt32(volume!, buffer: buffer, boxed: false)} + return (FunctionDescription(name: "phone.editGroupCallMember", parameters: [("flags", flags), ("call", call), ("userId", userId), ("volume", volume)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } + } + } +} diff --git a/submodules/TelegramCore/Sources/ApiGroupOrChannel.swift b/submodules/TelegramCore/Sources/ApiGroupOrChannel.swift index 6097722597..19efeafd44 100644 --- a/submodules/TelegramCore/Sources/ApiGroupOrChannel.swift +++ b/submodules/TelegramCore/Sources/ApiGroupOrChannel.swift @@ -108,6 +108,9 @@ func parseTelegramGroupOrChannel(chat: Api.Chat) -> Peer? { if (flags & Int32(1 << 25)) != 0 { channelFlags.insert(.isFake) } + if (flags & Int32(1 << 25)) != 0 { + channelFlags.insert(.isGigagroup) + } let restrictionInfo: PeerAccessRestrictionInfo? if let restrictionReason = restrictionReason { diff --git a/submodules/TelegramCore/Sources/ChannelAdminEventLogs.swift b/submodules/TelegramCore/Sources/ChannelAdminEventLogs.swift index 6d085f3516..6edce82e14 100644 --- a/submodules/TelegramCore/Sources/ChannelAdminEventLogs.swift +++ b/submodules/TelegramCore/Sources/ChannelAdminEventLogs.swift @@ -62,6 +62,7 @@ public enum AdminLogEventAction { case deleteExportedInvitation(ExportedInvitation) case revokeExportedInvitation(ExportedInvitation) case editExportedInvitation(previous: ExportedInvitation, updated: ExportedInvitation) + case participantJoinedViaInvite(ExportedInvitation) } public enum ChannelAdminLogEventError { @@ -241,12 +242,12 @@ public func channelAdminLogEvents(postbox: Postbox, network: Network, peerId: Pe action = .revokeExportedInvitation(ExportedInvitation(apiExportedInvite: invite)) case let .channelAdminLogEventActionExportedInviteEdit(prevInvite, newInvite): action = .editExportedInvitation(previous: ExportedInvitation(apiExportedInvite: prevInvite), updated: ExportedInvitation(apiExportedInvite: newInvite)) + case let .channelAdminLogEventActionParticipantJoinByInvite(invite): + action = .participantJoinedViaInvite(ExportedInvitation(apiExportedInvite: invite)) case let .channelAdminLogEventActionParticipantVolume(participant): let parsedParticipant = GroupCallParticipantsContext.Update.StateUpdate.ParticipantUpdate(participant) action = .groupCallUpdateParticipantVolume(peerId: parsedParticipant.peerId, volume: parsedParticipant.volume ?? 10000) - case let .channelAdminLogEventActionParticipantJoinByInvite(invite): - action = nil - case .channelAdminLogEventActionChangeHistoryTTL(prevValue: let prevValue, newValue: let newValue): + case let .channelAdminLogEventActionChangeHistoryTTL(prevValue, newValue): action = nil } let peerId = PeerId(namespace: Namespaces.Peer.CloudUser, id: userId) diff --git a/submodules/TelegramCore/Sources/InvitationLinks.swift b/submodules/TelegramCore/Sources/InvitationLinks.swift index b1da325429..f24b0ceda1 100644 --- a/submodules/TelegramCore/Sources/InvitationLinks.swift +++ b/submodules/TelegramCore/Sources/InvitationLinks.swift @@ -856,6 +856,7 @@ public final class PeerInvitationImportersContext { public struct ExportedInvitationCreator : Equatable { public let peer: RenderedPeer public let count: Int32 + public let revokedCount: Int32 } public func peerExportedInvitationsCreators(account: Account, peerId: PeerId) -> Signal<[ExportedInvitationCreator], NoError> { @@ -892,7 +893,7 @@ public func peerExportedInvitationsCreators(account: Account, peerId: PeerId) -> case let .chatAdminWithInvites(adminId, invitesCount, revokedInvitesCount): let peerId = PeerId(namespace: Namespaces.Peer.CloudUser, id: adminId) if let peer = peersMap[peerId], peerId != account.peerId { - creators.append(ExportedInvitationCreator(peer: RenderedPeer(peer: peer), count: invitesCount)) + creators.append(ExportedInvitationCreator(peer: RenderedPeer(peer: peer), count: invitesCount, revokedCount: revokedInvitesCount)) } } } diff --git a/submodules/TelegramCore/Sources/ReportPeer.swift b/submodules/TelegramCore/Sources/ReportPeer.swift index 2d684ed138..42ea988090 100644 --- a/submodules/TelegramCore/Sources/ReportPeer.swift +++ b/submodules/TelegramCore/Sources/ReportPeer.swift @@ -84,7 +84,7 @@ public enum ReportReason: Equatable { case childAbuse case copyright case irrelevantLocation - case custom(String) + case custom } private extension ReportReason { @@ -110,16 +110,9 @@ private extension ReportReason { } } -public func reportPeer(account: Account, peerId: PeerId, reason: ReportReason) -> Signal { +public func reportPeer(account: Account, peerId: PeerId, reason: ReportReason, message: String) -> Signal { return account.postbox.transaction { transaction -> Signal in if let peer = transaction.getPeer(peerId), let inputPeer = apiInputPeer(peer) { - var message: String = "" - switch reason { - case let .custom(text): - message = text - default: - break - } return account.network.request(Api.functions.account.reportPeer(peer: inputPeer, reason: reason.apiReason, message: message)) |> `catch` { _ -> Signal in return .single(.boolFalse) @@ -133,20 +126,13 @@ public func reportPeer(account: Account, peerId: PeerId, reason: ReportReason) - } |> switchToLatest } -public func reportPeerMessages(account: Account, messageIds: [MessageId], reason: ReportReason) -> Signal { +public func reportPeerMessages(account: Account, messageIds: [MessageId], reason: ReportReason, message: String) -> Signal { return account.postbox.transaction { transaction -> Signal in let groupedIds = messagesIdsGroupedByPeerId(messageIds) let signals = groupedIds.values.compactMap { ids -> Signal? in guard let peerId = ids.first?.peerId, let peer = transaction.getPeer(peerId), let inputPeer = apiInputPeer(peer) else { return nil } - var message: String = "" - switch reason { - case let .custom(text): - message = text - default: - break - } return account.network.request(Api.functions.messages.report(peer: inputPeer, id: ids.map { $0.id }, reason: reason.apiReason, message: message)) |> `catch` { _ -> Signal in return .single(.boolFalse) diff --git a/submodules/TelegramPresentationData/Sources/DefaultDarkPresentationTheme.swift b/submodules/TelegramPresentationData/Sources/DefaultDarkPresentationTheme.swift index 38843bde4e..e9f16f1cd6 100644 --- a/submodules/TelegramPresentationData/Sources/DefaultDarkPresentationTheme.swift +++ b/submodules/TelegramPresentationData/Sources/DefaultDarkPresentationTheme.swift @@ -359,7 +359,7 @@ public func makeDefaultDarkPresentationTheme(extendingThemeReference: Presentati pageIndicatorInactiveColor: UIColor(white: 1.0, alpha: 0.3), inputClearButtonColor: UIColor(rgb: 0x8b9197), itemBarChart: PresentationThemeItemBarChart(color1: UIColor(rgb: 0xffffff), color2: UIColor(rgb: 0x929196), color3: UIColor(rgb: 0x333333)), - itemInputField: PresentationInputFieldTheme(backgroundColor: UIColor(rgb: 0x1c1c1d), strokeColor: UIColor(rgb: 0x1c1c1d), placeholderColor: UIColor(rgb: 0x8f8f8f), primaryColor: UIColor(rgb: 0xffffff), controlColor: UIColor(rgb: 0x8f8f8f)) + itemInputField: PresentationInputFieldTheme(backgroundColor: UIColor(rgb: 0x0f0f0f), strokeColor: UIColor(rgb: 0x0f0f0f), placeholderColor: UIColor(rgb: 0x8f8f8f), primaryColor: UIColor(rgb: 0xffffff), controlColor: UIColor(rgb: 0x8f8f8f)) ) let chatList = PresentationThemeChatList( diff --git a/submodules/TelegramPresentationData/Sources/DefaultDarkTintedPresentationTheme.swift b/submodules/TelegramPresentationData/Sources/DefaultDarkTintedPresentationTheme.swift index a89949e19d..10d413e424 100644 --- a/submodules/TelegramPresentationData/Sources/DefaultDarkTintedPresentationTheme.swift +++ b/submodules/TelegramPresentationData/Sources/DefaultDarkTintedPresentationTheme.swift @@ -612,7 +612,7 @@ public func makeDefaultDarkTintedPresentationTheme(extendingThemeReference: Pres pageIndicatorInactiveColor: mainSecondaryTextColor.withAlphaComponent(0.4), inputClearButtonColor: mainSecondaryColor, itemBarChart: PresentationThemeItemBarChart(color1: accentColor, color2: mainSecondaryTextColor.withAlphaComponent(0.5), color3: accentColor.withMultiplied(hue: 1.038, saturation: 0.329, brightness: 0.33)), - itemInputField: PresentationInputFieldTheme(backgroundColor: mainBackgroundColor, strokeColor: mainBackgroundColor, placeholderColor: mainSecondaryColor, primaryColor: UIColor(rgb: 0xffffff), controlColor: mainSecondaryColor) + itemInputField: PresentationInputFieldTheme(backgroundColor: mainInputColor, strokeColor: mainInputColor, placeholderColor: mainSecondaryColor, primaryColor: UIColor(rgb: 0xffffff), controlColor: mainSecondaryColor) ) let chatList = PresentationThemeChatList( diff --git a/submodules/TelegramPresentationData/Sources/PresentationStrings.swift b/submodules/TelegramPresentationData/Sources/PresentationStrings.swift index 9c0595dc9e..7453882edf 100644 --- a/submodules/TelegramPresentationData/Sources/PresentationStrings.swift +++ b/submodules/TelegramPresentationData/Sources/PresentationStrings.swift @@ -255,5777 +255,5788 @@ public final class PresentationStrings: Equatable { public var Passport_DiscardMessageAction: String { return self._s[56]! } public var Passport_FieldOneOf_FinalDelimeter: String { return self._s[57]! } public var Stickers_SuggestNone: String { return self._s[58]! } - public var Channel_AdminLog_CanPinMessages: String { return self._s[59]! } - public var Stickers_Search: String { return self._s[61]! } - public var Passport_Identity_EditPersonalDetails: String { return self._s[62]! } - public var NotificationSettings_ShowNotificationsAllAccounts: String { return self._s[63]! } - public var Login_ContinueWithLocalization: String { return self._s[64]! } - public var Privacy_ProfilePhoto_NeverShareWith_Title: String { return self._s[65]! } - public var TextFormat_Italic: String { return self._s[67]! } - public var ChatList_Search_NoResultsFitlerLinks: String { return self._s[69]! } - public var Stickers_GroupChooseStickerPack: String { return self._s[70]! } - public var Notification_MessageLifetime1w: String { return self._s[71]! } - public var Channel_Management_AddModerator: String { return self._s[72]! } - public var Conversation_UnsupportedMediaPlaceholder: String { return self._s[73]! } - public var Gif_Search: String { return self._s[74]! } - public var Checkout_ErrorGeneric: String { return self._s[75]! } - public var Conversation_ContextMenuSendMessage: String { return self._s[76]! } - public var Map_SetThisLocation: String { return self._s[77]! } - public var Notifications_ExceptionsDefaultSound: String { return self._s[78]! } - public var PrivacySettings_AutoArchiveInfo: String { return self._s[79]! } - public var Stats_NotificationsTitle: String { return self._s[80]! } - public var Conversation_ClearSecretHistory: String { return self._s[82]! } + public func Channel_AdminLog_JoinedViaInviteLink(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[59]!, self._r[59]!, [_1, _2]) + } + public var Channel_AdminLog_CanPinMessages: String { return self._s[60]! } + public var Stickers_Search: String { return self._s[62]! } + public var Passport_Identity_EditPersonalDetails: String { return self._s[63]! } + public var NotificationSettings_ShowNotificationsAllAccounts: String { return self._s[64]! } + public var Login_ContinueWithLocalization: String { return self._s[65]! } + public var Privacy_ProfilePhoto_NeverShareWith_Title: String { return self._s[66]! } + public var TextFormat_Italic: String { return self._s[68]! } + public var ChatList_Search_NoResultsFitlerLinks: String { return self._s[70]! } + public var Stickers_GroupChooseStickerPack: String { return self._s[71]! } + public var Notification_MessageLifetime1w: String { return self._s[72]! } + public var Channel_Management_AddModerator: String { return self._s[73]! } + public var Conversation_UnsupportedMediaPlaceholder: String { return self._s[74]! } + public var Gif_Search: String { return self._s[75]! } + public var Checkout_ErrorGeneric: String { return self._s[76]! } + public var Conversation_ContextMenuSendMessage: String { return self._s[77]! } + public var Map_SetThisLocation: String { return self._s[78]! } + public var Notifications_ExceptionsDefaultSound: String { return self._s[79]! } + public var PrivacySettings_AutoArchiveInfo: String { return self._s[80]! } + public var Stats_NotificationsTitle: String { return self._s[81]! } + public var Conversation_ClearSecretHistory: String { return self._s[83]! } public func Notification_CallFormat(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[83]!, self._r[83]!, [_1, _2]) + return formatWithArgumentRanges(self._s[84]!, self._r[84]!, [_1, _2]) } - public var ChatListFolder_DiscardDiscard: String { return self._s[84]! } - public var PrivacyLastSeenSettings_AlwaysShareWith: String { return self._s[85]! } - public var Contacts_InviteFriends: String { return self._s[86]! } - public var Group_LinkedChannel: String { return self._s[87]! } - public var ChatList_DeleteForAllMembers: String { return self._s[88]! } - public var Notification_PassportValuePhone: String { return self._s[90]! } + public var ChatListFolder_DiscardDiscard: String { return self._s[85]! } + public var PrivacyLastSeenSettings_AlwaysShareWith: String { return self._s[86]! } + public var Contacts_InviteFriends: String { return self._s[87]! } + public var Group_LinkedChannel: String { return self._s[88]! } + public var ChatList_DeleteForAllMembers: String { return self._s[89]! } + public var Notification_PassportValuePhone: String { return self._s[91]! } public func InviteText_SingleContact(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[91]!, self._r[91]!, [_0]) + return formatWithArgumentRanges(self._s[92]!, self._r[92]!, [_0]) } - public var UserInfo_BotHelp: String { return self._s[93]! } - public var Passport_Identity_MainPage: String { return self._s[95]! } - public var LogoutOptions_ContactSupportText: String { return self._s[96]! } + public var UserInfo_BotHelp: String { return self._s[94]! } + public var Passport_Identity_MainPage: String { return self._s[96]! } + public var LogoutOptions_ContactSupportText: String { return self._s[97]! } public func VoiceOver_Chat_Title(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[97]!, self._r[97]!, [_0]) + return formatWithArgumentRanges(self._s[98]!, self._r[98]!, [_0]) } - public var StickerPack_ShowStickers: String { return self._s[99]! } - public var AttachmentMenu_PhotoOrVideo: String { return self._s[100]! } - public var Map_Satellite: String { return self._s[101]! } - public var Passport_Identity_MainPageHelp: String { return self._s[102]! } - public var Profile_About: String { return self._s[104]! } - public var Group_Setup_TypePrivate: String { return self._s[105]! } - public var Notifications_ChannelNotifications: String { return self._s[106]! } - public var Call_VoiceOver_VoiceCallIncoming: String { return self._s[107]! } + public var StickerPack_ShowStickers: String { return self._s[100]! } + public var AttachmentMenu_PhotoOrVideo: String { return self._s[101]! } + public var Map_Satellite: String { return self._s[102]! } + public var Passport_Identity_MainPageHelp: String { return self._s[103]! } + public var Profile_About: String { return self._s[105]! } + public var Group_Setup_TypePrivate: String { return self._s[106]! } + public var Notifications_ChannelNotifications: String { return self._s[107]! } + public var Call_VoiceOver_VoiceCallIncoming: String { return self._s[108]! } public func Login_WillCallYou(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[108]!, self._r[108]!, [_0]) + return formatWithArgumentRanges(self._s[109]!, self._r[109]!, [_0]) } - public var WallpaperPreview_Motion: String { return self._s[109]! } - public var Message_VideoMessage: String { return self._s[110]! } - public var SharedMedia_CategoryOther: String { return self._s[111]! } - public var Passport_FieldIdentityUploadHelp: String { return self._s[112]! } - public var PUSH_REMINDER_TITLE: String { return self._s[113]! } - public var Appearance_ThemePreview_Chat_3_Text: String { return self._s[115]! } - public var Login_ResetAccountProtected_Reset: String { return self._s[117]! } - public var Passport_Identity_TypeInternalPassportUploadScan: String { return self._s[118]! } + public var WallpaperPreview_Motion: String { return self._s[110]! } + public var Message_VideoMessage: String { return self._s[111]! } + public var SharedMedia_CategoryOther: String { return self._s[112]! } + public var Passport_FieldIdentityUploadHelp: String { return self._s[113]! } + public var PUSH_REMINDER_TITLE: String { return self._s[114]! } + public var Appearance_ThemePreview_Chat_3_Text: String { return self._s[116]! } + public var Login_ResetAccountProtected_Reset: String { return self._s[118]! } + public var Passport_Identity_TypeInternalPassportUploadScan: String { return self._s[119]! } public func Location_ProximityNotification_Notify(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[119]!, self._r[119]!, [_0]) + return formatWithArgumentRanges(self._s[120]!, self._r[120]!, [_0]) } - public var ChatList_PeerTypeContact: String { return self._s[120]! } - public var Stickers_SuggestAll: String { return self._s[122]! } - public var EmptyGroupInfo_Line3: String { return self._s[123]! } - public var Login_InvalidPhoneError: String { return self._s[124]! } - public var MediaPicker_GroupDescription: String { return self._s[125]! } - public var NetworkUsageSettings_MediaDocumentDataSection: String { return self._s[126]! } - public var Conversation_PrivateChannelTimeLimitedAlertText: String { return self._s[127]! } - public var PrivateDataSettings_Title: String { return self._s[128]! } - public var SecretChat_Title: String { return self._s[129]! } - public var Privacy_ChatsTitle: String { return self._s[130]! } - public var EditProfile_NameAndPhotoHelp: String { return self._s[131]! } - public var Watch_MessageView_Forward: String { return self._s[133]! } - public var ChannelMembers_WhoCanAddMembers_AllMembers: String { return self._s[134]! } + public var ChatList_PeerTypeContact: String { return self._s[121]! } + public var Stickers_SuggestAll: String { return self._s[123]! } + public var EmptyGroupInfo_Line3: String { return self._s[124]! } + public var Login_InvalidPhoneError: String { return self._s[125]! } + public var MediaPicker_GroupDescription: String { return self._s[126]! } + public var NetworkUsageSettings_MediaDocumentDataSection: String { return self._s[127]! } + public var Conversation_PrivateChannelTimeLimitedAlertText: String { return self._s[128]! } + public var PrivateDataSettings_Title: String { return self._s[129]! } + public var SecretChat_Title: String { return self._s[130]! } + public var Privacy_ChatsTitle: String { return self._s[131]! } + public var EditProfile_NameAndPhotoHelp: String { return self._s[132]! } + public var Watch_MessageView_Forward: String { return self._s[134]! } + public var ChannelMembers_WhoCanAddMembers_AllMembers: String { return self._s[135]! } public func PUSH_PINNED_QUIZ(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[135]!, self._r[135]!, [_1, _2]) + return formatWithArgumentRanges(self._s[136]!, self._r[136]!, [_1, _2]) } public func Channel_AdminLog_EndedVoiceChat(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[136]!, self._r[136]!, [_1]) + return formatWithArgumentRanges(self._s[137]!, self._r[137]!, [_1]) } - public var InviteLink_ExpiredLink: String { return self._s[137]! } - public var PhotoEditor_DiscardChanges: String { return self._s[138]! } - public var SocksProxySetup_AdNoticeHelp: String { return self._s[139]! } - public var Date_DialogDateFormat: String { return self._s[140]! } - public var SettingsSearch_Synonyms_Proxy_Title: String { return self._s[141]! } - public var Notifications_AlertTones: String { return self._s[142]! } - public var Permissions_SiriAllow_v0: String { return self._s[143]! } - public var Tour_StartButton: String { return self._s[144]! } - public var Stats_InstantViewInteractionsTitle: String { return self._s[145]! } - public var UserInfo_ScamUserWarning: String { return self._s[148]! } - public var NotificationsSound_Chime: String { return self._s[149]! } - public var Update_Skip: String { return self._s[150]! } + public var InviteLink_ExpiredLink: String { return self._s[138]! } + public var PhotoEditor_DiscardChanges: String { return self._s[139]! } + public var SocksProxySetup_AdNoticeHelp: String { return self._s[140]! } + public var Date_DialogDateFormat: String { return self._s[141]! } + public var SettingsSearch_Synonyms_Proxy_Title: String { return self._s[142]! } + public var Notifications_AlertTones: String { return self._s[143]! } + public var Permissions_SiriAllow_v0: String { return self._s[144]! } + public var Tour_StartButton: String { return self._s[145]! } + public var Stats_InstantViewInteractionsTitle: String { return self._s[146]! } + public var UserInfo_ScamUserWarning: String { return self._s[149]! } + public var NotificationsSound_Chime: String { return self._s[150]! } + public var Update_Skip: String { return self._s[151]! } public func ChannelInfo_ChannelForbidden(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[151]!, self._r[151]!, [_0]) + return formatWithArgumentRanges(self._s[152]!, self._r[152]!, [_0]) } - public var SettingsSearch_Synonyms_EditProfile_PhoneNumber: String { return self._s[152]! } - public var Notifications_PermissionsTitle: String { return self._s[153]! } - public var Channel_AdminLog_BanSendMedia: String { return self._s[154]! } - public var Notifications_Badge_CountUnreadMessages: String { return self._s[155]! } - public var Appearance_AppIcon: String { return self._s[156]! } - public var Passport_Identity_FilesUploadNew: String { return self._s[157]! } + public var SettingsSearch_Synonyms_EditProfile_PhoneNumber: String { return self._s[153]! } + public var Notifications_PermissionsTitle: String { return self._s[154]! } + public var Channel_AdminLog_BanSendMedia: String { return self._s[155]! } + public var Notifications_Badge_CountUnreadMessages: String { return self._s[156]! } + public var Appearance_AppIcon: String { return self._s[157]! } + public var Passport_Identity_FilesUploadNew: String { return self._s[158]! } public func Passport_Email_UseTelegramEmail(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[158]!, self._r[158]!, [_0]) + return formatWithArgumentRanges(self._s[159]!, self._r[159]!, [_0]) } - public var CreatePoll_QuizTitle: String { return self._s[159]! } - public var DialogList_DeleteConversationConfirmation: String { return self._s[160]! } - public var NotificationsSound_Calypso: String { return self._s[161]! } - public var ChannelMembers_GroupAdminsTitle: String { return self._s[162]! } - public var Checkout_NewCard_PaymentCard: String { return self._s[163]! } - public var Wallpaper_SetCustomBackground: String { return self._s[165]! } - public var Conversation_ContextMenuOpenProfile: String { return self._s[166]! } + public var CreatePoll_QuizTitle: String { return self._s[160]! } + public var DialogList_DeleteConversationConfirmation: String { return self._s[161]! } + public var NotificationsSound_Calypso: String { return self._s[162]! } + public var ChannelMembers_GroupAdminsTitle: String { return self._s[163]! } + public var Checkout_NewCard_PaymentCard: String { return self._s[164]! } + public var Wallpaper_SetCustomBackground: String { return self._s[166]! } + public var Conversation_ContextMenuOpenProfile: String { return self._s[167]! } public func PUSH_MESSAGE_VIDEO_SECRET(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[168]!, self._r[168]!, [_1]) + return formatWithArgumentRanges(self._s[169]!, self._r[169]!, [_1]) } - public var AuthSessions_Terminate: String { return self._s[169]! } - public var ShareFileTip_CloseTip: String { return self._s[170]! } - public var ChatSettings_DownloadInBackgroundInfo: String { return self._s[171]! } - public var Channel_Moderator_AccessLevelRevoke: String { return self._s[172]! } - public var Channel_AdminLogFilter_EventsDeletedMessages: String { return self._s[173]! } - public var Passport_Language_fr: String { return self._s[174]! } + public var AuthSessions_Terminate: String { return self._s[170]! } + public var ShareFileTip_CloseTip: String { return self._s[171]! } + public var ChatSettings_DownloadInBackgroundInfo: String { return self._s[172]! } + public var Channel_Moderator_AccessLevelRevoke: String { return self._s[173]! } + public var Channel_AdminLogFilter_EventsDeletedMessages: String { return self._s[174]! } + public var Passport_Language_fr: String { return self._s[175]! } public func Watch_Time_ShortTodayAt(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[176]!, self._r[176]!, [_0]) + return formatWithArgumentRanges(self._s[177]!, self._r[177]!, [_0]) } - public var Passport_Identity_TypeIdentityCard: String { return self._s[177]! } - public var VoiceChat_MuteForMe: String { return self._s[178]! } + public var Passport_Identity_TypeIdentityCard: String { return self._s[178]! } + public var VoiceChat_MuteForMe: String { return self._s[179]! } public func Conversation_OpenBotLinkAllowMessages(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[179]!, self._r[179]!, [_0]) + return formatWithArgumentRanges(self._s[180]!, self._r[180]!, [_0]) } - public var ReportPeer_ReasonCopyright: String { return self._s[180]! } - public var Permissions_PeopleNearbyText_v0: String { return self._s[182]! } - public var Channel_Stickers_NotFoundHelp: String { return self._s[183]! } - public var Passport_Identity_AddDriversLicense: String { return self._s[184]! } - public var AutoDownloadSettings_AutodownloadFiles: String { return self._s[185]! } - public var Permissions_SiriAllowInSettings_v0: String { return self._s[186]! } + public var ReportPeer_ReasonCopyright: String { return self._s[181]! } + public var Permissions_PeopleNearbyText_v0: String { return self._s[183]! } + public var Channel_Stickers_NotFoundHelp: String { return self._s[184]! } + public var Passport_Identity_AddDriversLicense: String { return self._s[185]! } + public var AutoDownloadSettings_AutodownloadFiles: String { return self._s[186]! } + public var Permissions_SiriAllowInSettings_v0: String { return self._s[187]! } public func Conversation_ForwardTooltip_ManyChats_Many(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[187]!, self._r[187]!, [_0, _1]) + return formatWithArgumentRanges(self._s[188]!, self._r[188]!, [_0, _1]) } - public var ApplyLanguage_ChangeLanguageTitle: String { return self._s[188]! } - public var Map_LocatingError: String { return self._s[190]! } - public var ChatSettings_AutoDownloadSettings_TypePhoto: String { return self._s[191]! } + public var ApplyLanguage_ChangeLanguageTitle: String { return self._s[189]! } + public var Map_LocatingError: String { return self._s[191]! } + public var ChatSettings_AutoDownloadSettings_TypePhoto: String { return self._s[192]! } public func VoiceOver_Chat_MusicFrom(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[193]!, self._r[193]!, [_0]) - } - public func Contacts_AccessDeniedHelpLandscape(_ _0: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[194]!, self._r[194]!, [_0]) } - public var Channel_AdminLog_EmptyFilterText: String { return self._s[195]! } - public var Login_SmsRequestState2: String { return self._s[196]! } - public var Conversation_Unmute: String { return self._s[198]! } - public var TwoFactorSetup_Intro_Text: String { return self._s[199]! } - public var Channel_AdminLog_BanSendMessages: String { return self._s[200]! } + public func Contacts_AccessDeniedHelpLandscape(_ _0: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[195]!, self._r[195]!, [_0]) + } + public var Channel_AdminLog_EmptyFilterText: String { return self._s[196]! } + public var Login_SmsRequestState2: String { return self._s[197]! } + public var Conversation_Unmute: String { return self._s[199]! } + public var TwoFactorSetup_Intro_Text: String { return self._s[200]! } + public var Channel_AdminLog_BanSendMessages: String { return self._s[201]! } public func Channel_Management_RemovedBy(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[201]!, self._r[201]!, [_0]) + return formatWithArgumentRanges(self._s[202]!, self._r[202]!, [_0]) } - public var AccessDenied_LocationDenied: String { return self._s[202]! } - public var Share_AuthTitle: String { return self._s[203]! } - public var Month_ShortAugust: String { return self._s[204]! } + public var AccessDenied_LocationDenied: String { return self._s[203]! } + public var Share_AuthTitle: String { return self._s[204]! } + public var Month_ShortAugust: String { return self._s[205]! } public func Notification_PinnedDeletedMessage(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[205]!, self._r[205]!, [_0]) + return formatWithArgumentRanges(self._s[206]!, self._r[206]!, [_0]) } - public var Channel_BanUser_PermissionSendMedia: String { return self._s[206]! } - public var SettingsSearch_Synonyms_Data_DownloadInBackground: String { return self._s[207]! } + public var Channel_BanUser_PermissionSendMedia: String { return self._s[207]! } + public var SettingsSearch_Synonyms_Data_DownloadInBackground: String { return self._s[208]! } public func PUSH_CONTACT_JOINED(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[208]!, self._r[208]!, [_1]) + return formatWithArgumentRanges(self._s[209]!, self._r[209]!, [_1]) } - public var WallpaperSearch_ColorTitle: String { return self._s[210]! } - public var Wallpaper_Search: String { return self._s[211]! } - public var ClearCache_StorageUsage: String { return self._s[212]! } - public var CreatePoll_TextPlaceholder: String { return self._s[213]! } - public var Conversation_EditingMessagePanelTitle: String { return self._s[214]! } - public var Channel_EditAdmin_PermissionBanUsers: String { return self._s[215]! } - public var OldChannels_NoticeCreateText: String { return self._s[216]! } - public var ProfilePhoto_MainVideo: String { return self._s[217]! } - public var VoiceChat_StatusListening: String { return self._s[218]! } - public var InviteLink_DeleteLinkAlert_Text: String { return self._s[219]! } - public var UserInfo_NotificationsDisabled: String { return self._s[220]! } - public var Map_Unknown: String { return self._s[221]! } - public var Notifications_MessageNotificationsAlert: String { return self._s[222]! } - public var Conversation_StopQuiz: String { return self._s[223]! } - public var Checkout_LiabilityAlertTitle: String { return self._s[224]! } + public var WallpaperSearch_ColorTitle: String { return self._s[211]! } + public var Wallpaper_Search: String { return self._s[212]! } + public var ClearCache_StorageUsage: String { return self._s[213]! } + public var CreatePoll_TextPlaceholder: String { return self._s[214]! } + public var Conversation_EditingMessagePanelTitle: String { return self._s[215]! } + public var Channel_EditAdmin_PermissionBanUsers: String { return self._s[216]! } + public var OldChannels_NoticeCreateText: String { return self._s[217]! } + public var ProfilePhoto_MainVideo: String { return self._s[218]! } + public var VoiceChat_StatusListening: String { return self._s[219]! } + public var InviteLink_DeleteLinkAlert_Text: String { return self._s[220]! } + public var UserInfo_NotificationsDisabled: String { return self._s[221]! } + public var Map_Unknown: String { return self._s[222]! } + public var Notifications_MessageNotificationsAlert: String { return self._s[223]! } + public var Conversation_StopQuiz: String { return self._s[224]! } + public var Checkout_LiabilityAlertTitle: String { return self._s[225]! } public func Username_UsernameIsAvailable(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[225]!, self._r[225]!, [_0]) + return formatWithArgumentRanges(self._s[226]!, self._r[226]!, [_0]) } - public var CreatePoll_OptionPlaceholder: String { return self._s[226]! } - public var Conversation_RestrictedStickers: String { return self._s[227]! } - public var MemberSearch_BotSection: String { return self._s[229]! } - public var Channel_Management_AddModeratorHelp: String { return self._s[231]! } - public var MaskStickerSettings_Title: String { return self._s[232]! } - public var ShareMenu_Comment: String { return self._s[233]! } - public var GroupInfo_Notifications: String { return self._s[234]! } - public var CheckoutInfo_ReceiverInfoTitle: String { return self._s[235]! } + public var CreatePoll_OptionPlaceholder: String { return self._s[227]! } + public var Conversation_RestrictedStickers: String { return self._s[228]! } + public var MemberSearch_BotSection: String { return self._s[230]! } + public var Channel_Management_AddModeratorHelp: String { return self._s[232]! } + public var MaskStickerSettings_Title: String { return self._s[233]! } + public var ShareMenu_Comment: String { return self._s[234]! } + public var GroupInfo_Notifications: String { return self._s[235]! } + public var CheckoutInfo_ReceiverInfoTitle: String { return self._s[236]! } public func DialogList_EncryptedChatStartedOutgoing(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[236]!, self._r[236]!, [_0]) + return formatWithArgumentRanges(self._s[237]!, self._r[237]!, [_0]) } - public var Conversation_ContextMenuCopyLink: String { return self._s[237]! } - public var VoiceChat_MutedHelp: String { return self._s[240]! } - public var ChatListFolder_CategoryMuted: String { return self._s[241]! } - public var TwoStepAuth_AddHintDescription: String { return self._s[242]! } + public var Conversation_ContextMenuCopyLink: String { return self._s[238]! } + public var VoiceChat_MutedHelp: String { return self._s[241]! } + public var ChatListFolder_CategoryMuted: String { return self._s[242]! } + public var TwoStepAuth_AddHintDescription: String { return self._s[243]! } public func VoiceOver_Chat_Duration(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[243]!, self._r[243]!, [_0]) + return formatWithArgumentRanges(self._s[244]!, self._r[244]!, [_0]) } - public var Conversation_ClousStorageInfo_Description3: String { return self._s[244]! } - public var Contacts_SortByPresence: String { return self._s[245]! } - public var Watch_Location_Access: String { return self._s[246]! } - public var WallpaperPreview_CustomColorTopText: String { return self._s[247]! } - public var Passport_Address_TypeBankStatement: String { return self._s[248]! } - public var Group_Username_RevokeExistingUsernamesInfo: String { return self._s[249]! } - public var Conversation_ClearPrivateHistory: String { return self._s[250]! } - public var ChatList_Mute: String { return self._s[253]! } - public var Channel_AdminLog_CanDeleteMessagesOfOthers: String { return self._s[254]! } - public var Stats_PostsTitle: String { return self._s[255]! } - public var Paint_Masks: String { return self._s[257]! } - public var PasscodeSettings_TryAgainIn1Minute: String { return self._s[259]! } - public var Chat_AttachmentLimitReached: String { return self._s[260]! } - public var StickerPackActionInfo_ArchivedTitle: String { return self._s[261]! } - public var Watch_Stickers_StickerPacks: String { return self._s[263]! } - public var Channel_Setup_Title: String { return self._s[264]! } - public var GroupInfo_Administrators: String { return self._s[265]! } - public var InviteLink_PublicLink: String { return self._s[266]! } - public var InviteLink_DeleteLinkAlert_Action: String { return self._s[268]! } - public var NotificationSettings_ShowNotificationsAllAccountsInfoOff: String { return self._s[269]! } - public var Conversation_ContextMenuDiscuss: String { return self._s[270]! } - public var StickerPack_BuiltinPackName: String { return self._s[271]! } - public var Conversation_GreetingText: String { return self._s[273]! } - public var TwoStepAuth_RecoveryEmailChangeDescription: String { return self._s[275]! } - public var Checkout_ShippingMethod: String { return self._s[277]! } - public var ClearCache_FreeSpace: String { return self._s[278]! } - public var EditTheme_Expand_Preview_IncomingReplyText: String { return self._s[279]! } - public var SettingsSearch_Synonyms_Notifications_ChannelNotificationsSound: String { return self._s[282]! } + public var Conversation_ClousStorageInfo_Description3: String { return self._s[245]! } + public var Contacts_SortByPresence: String { return self._s[246]! } + public var Watch_Location_Access: String { return self._s[247]! } + public var WallpaperPreview_CustomColorTopText: String { return self._s[248]! } + public var Passport_Address_TypeBankStatement: String { return self._s[249]! } + public var Group_Username_RevokeExistingUsernamesInfo: String { return self._s[250]! } + public var Conversation_ClearPrivateHistory: String { return self._s[251]! } + public var ChatList_Mute: String { return self._s[254]! } + public var Channel_AdminLog_CanDeleteMessagesOfOthers: String { return self._s[255]! } + public var Stats_PostsTitle: String { return self._s[256]! } + public var Paint_Masks: String { return self._s[258]! } + public var PasscodeSettings_TryAgainIn1Minute: String { return self._s[260]! } + public var Chat_AttachmentLimitReached: String { return self._s[261]! } + public var StickerPackActionInfo_ArchivedTitle: String { return self._s[262]! } + public var Watch_Stickers_StickerPacks: String { return self._s[264]! } + public var Channel_Setup_Title: String { return self._s[265]! } + public var GroupInfo_Administrators: String { return self._s[266]! } + public var InviteLink_PublicLink: String { return self._s[267]! } + public var InviteLink_DeleteLinkAlert_Action: String { return self._s[269]! } + public var NotificationSettings_ShowNotificationsAllAccountsInfoOff: String { return self._s[270]! } + public var Conversation_ContextMenuDiscuss: String { return self._s[271]! } + public var StickerPack_BuiltinPackName: String { return self._s[272]! } + public var Conversation_GreetingText: String { return self._s[274]! } + public var TwoStepAuth_RecoveryEmailChangeDescription: String { return self._s[276]! } + public var Checkout_ShippingMethod: String { return self._s[278]! } + public var ClearCache_FreeSpace: String { return self._s[279]! } + public var EditTheme_Expand_Preview_IncomingReplyText: String { return self._s[280]! } + public var SettingsSearch_Synonyms_Notifications_ChannelNotificationsSound: String { return self._s[283]! } public func TwoStepAuth_ConfirmEmailDescription(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[283]!, self._r[283]!, [_1]) + return formatWithArgumentRanges(self._s[284]!, self._r[284]!, [_1]) } - public var Conversation_typing: String { return self._s[284]! } + public var Conversation_typing: String { return self._s[285]! } public func PrivacySettings_LastSeenContactsMinus(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[286]!, self._r[286]!, [_0]) + return formatWithArgumentRanges(self._s[287]!, self._r[287]!, [_0]) } - public var WebSearch_RecentSectionTitle: String { return self._s[287]! } - public var VoiceChat_EndConfirmationTitle: String { return self._s[288]! } - public var ChatList_UnhideAction: String { return self._s[290]! } - public var PasscodeSettings_6DigitCode: String { return self._s[291]! } - public var CallFeedback_AddComment: String { return self._s[292]! } - public var LoginPassword_PasswordHelp: String { return self._s[293]! } - public var Call_Flip: String { return self._s[294]! } - public var ChannelIntro_ChannelsText: String { return self._s[295]! } - public var Weekday_ShortWednesday: String { return self._s[297]! } - public var VoiceOver_Chat_PollFinalResults: String { return self._s[298]! } - public var PeerInfo_ButtonAddMember: String { return self._s[299]! } - public var Call_Decline: String { return self._s[301]! } - public var VoiceChat_InviteMemberToGroupFirstAdd: String { return self._s[302]! } - public var Join_ChannelsTooMuch: String { return self._s[304]! } + public var WebSearch_RecentSectionTitle: String { return self._s[288]! } + public var VoiceChat_EndConfirmationTitle: String { return self._s[289]! } + public var ChatList_UnhideAction: String { return self._s[291]! } + public var PasscodeSettings_6DigitCode: String { return self._s[292]! } + public var CallFeedback_AddComment: String { return self._s[293]! } + public var LoginPassword_PasswordHelp: String { return self._s[294]! } + public var Call_Flip: String { return self._s[295]! } + public var ChannelIntro_ChannelsText: String { return self._s[296]! } + public var Weekday_ShortWednesday: String { return self._s[298]! } + public var VoiceOver_Chat_PollFinalResults: String { return self._s[299]! } + public var PeerInfo_ButtonAddMember: String { return self._s[300]! } + public var Call_Decline: String { return self._s[302]! } + public var VoiceChat_InviteMemberToGroupFirstAdd: String { return self._s[303]! } + public var Join_ChannelsTooMuch: String { return self._s[305]! } public func PUSH_CHANNEL_MESSAGE_NOTEXT(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[305]!, self._r[305]!, [_1]) + return formatWithArgumentRanges(self._s[306]!, self._r[306]!, [_1]) } - public var Passport_Identity_Selfie: String { return self._s[306]! } - public var Privacy_ContactsTitle: String { return self._s[307]! } - public var GroupInfo_InviteLink_Title: String { return self._s[309]! } - public var TwoFactorSetup_Password_PlaceholderPassword: String { return self._s[310]! } + public var Passport_Identity_Selfie: String { return self._s[307]! } + public var Privacy_ContactsTitle: String { return self._s[308]! } + public var GroupInfo_InviteLink_Title: String { return self._s[310]! } + public var TwoFactorSetup_Password_PlaceholderPassword: String { return self._s[311]! } public func Channel_AdminLog_UpdatedParticipantVolume(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[311]!, self._r[311]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[312]!, self._r[312]!, [_1, _2, _3]) } - public var Conversation_OpenFile: String { return self._s[312]! } - public var Map_SetThisPlace: String { return self._s[313]! } - public var Channel_Info_Management: String { return self._s[314]! } - public var Passport_Language_hr: String { return self._s[315]! } - public var VoiceChat_Title: String { return self._s[316]! } - public var EditTheme_Edit_Preview_IncomingText: String { return self._s[319]! } - public var OpenFile_Proceed: String { return self._s[320]! } - public var Conversation_SecretChatContextBotAlert: String { return self._s[322]! } - public var GroupInfo_Permissions_SlowmodeValue_Off: String { return self._s[323]! } - public var Privacy_Calls_P2PContacts: String { return self._s[324]! } - public var Appearance_PickAccentColor: String { return self._s[325]! } - public var MediaPicker_TapToUngroupDescription: String { return self._s[326]! } - public var Localization_EnglishLanguageName: String { return self._s[327]! } - public var Stickers_SuggestStickers: String { return self._s[328]! } - public var Passport_Language_ko: String { return self._s[329]! } - public var Settings_ProxyDisabled: String { return self._s[330]! } - public var PrivacySettings_PasscodeOff: String { return self._s[331]! } - public var Undo_LeftChannel: String { return self._s[332]! } - public var Appearance_AutoNightThemeDisabled: String { return self._s[333]! } - public var TextFormat_Bold: String { return self._s[334]! } - public var Login_InfoTitle: String { return self._s[335]! } - public var Channel_BanUser_PermissionSendPolls: String { return self._s[336]! } - public var Settings_AddAnotherAccount: String { return self._s[337]! } - public var GroupPermission_NewTitle: String { return self._s[338]! } - public var Login_SelectCountry_Title: String { return self._s[339]! } - public var Cache_ServiceFiles: String { return self._s[340]! } - public var Passport_Language_nl: String { return self._s[341]! } - public var Contacts_TopSection: String { return self._s[342]! } - public var Passport_Identity_DateOfBirthPlaceholder: String { return self._s[343]! } - public var VoiceChat_StatusInvited: String { return self._s[345]! } - public var Conversation_ContextMenuReport: String { return self._s[346]! } + public var Conversation_OpenFile: String { return self._s[313]! } + public var Map_SetThisPlace: String { return self._s[314]! } + public var Channel_Info_Management: String { return self._s[315]! } + public var Passport_Language_hr: String { return self._s[316]! } + public var VoiceChat_Title: String { return self._s[317]! } + public var EditTheme_Edit_Preview_IncomingText: String { return self._s[320]! } + public var OpenFile_Proceed: String { return self._s[321]! } + public var Conversation_SecretChatContextBotAlert: String { return self._s[323]! } + public var GroupInfo_Permissions_SlowmodeValue_Off: String { return self._s[324]! } + public var Privacy_Calls_P2PContacts: String { return self._s[325]! } + public var Appearance_PickAccentColor: String { return self._s[326]! } + public var MediaPicker_TapToUngroupDescription: String { return self._s[327]! } + public var Localization_EnglishLanguageName: String { return self._s[328]! } + public var Stickers_SuggestStickers: String { return self._s[329]! } + public var Passport_Language_ko: String { return self._s[330]! } + public var Settings_ProxyDisabled: String { return self._s[331]! } + public var PrivacySettings_PasscodeOff: String { return self._s[332]! } + public var Undo_LeftChannel: String { return self._s[333]! } + public var Appearance_AutoNightThemeDisabled: String { return self._s[334]! } + public var TextFormat_Bold: String { return self._s[335]! } + public var Login_InfoTitle: String { return self._s[336]! } + public var Channel_BanUser_PermissionSendPolls: String { return self._s[337]! } + public var Settings_AddAnotherAccount: String { return self._s[338]! } + public var GroupPermission_NewTitle: String { return self._s[339]! } + public var Login_SelectCountry_Title: String { return self._s[340]! } + public var Cache_ServiceFiles: String { return self._s[341]! } + public var Passport_Language_nl: String { return self._s[342]! } + public var Contacts_TopSection: String { return self._s[343]! } + public var Passport_Identity_DateOfBirthPlaceholder: String { return self._s[344]! } + public var VoiceChat_StatusInvited: String { return self._s[346]! } + public var Conversation_ContextMenuReport: String { return self._s[347]! } public func Login_BannedPhoneBody(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[347]!, self._r[347]!, [_0]) + return formatWithArgumentRanges(self._s[348]!, self._r[348]!, [_0]) } - public var Conversation_Search: String { return self._s[348]! } - public var Group_Setup_HistoryVisibleHelp: String { return self._s[350]! } - public var ReportPeer_AlertSuccess: String { return self._s[352]! } - public var AutoNightTheme_Title: String { return self._s[354]! } + public var Conversation_Search: String { return self._s[349]! } + public var Group_Setup_HistoryVisibleHelp: String { return self._s[351]! } + public var ReportPeer_AlertSuccess: String { return self._s[353]! } + public var AutoNightTheme_Title: String { return self._s[355]! } public func Notification_PinnedTextMessage(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[356]!, self._r[356]!, [_0, _1]) + return formatWithArgumentRanges(self._s[357]!, self._r[357]!, [_0, _1]) } public func Conversation_OpenBotLinkText(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[357]!, self._r[357]!, [_0]) + return formatWithArgumentRanges(self._s[358]!, self._r[358]!, [_0]) } - public var Conversation_ShareBotContactConfirmation: String { return self._s[358]! } - public var TwoStepAuth_RecoveryCode: String { return self._s[359]! } - public var GroupInfo_Permissions_BroadcastTitle: String { return self._s[360]! } - public var SocksProxySetup_ConnectAndSave: String { return self._s[361]! } + public var Conversation_ShareBotContactConfirmation: String { return self._s[359]! } + public var TwoStepAuth_RecoveryCode: String { return self._s[360]! } + public var GroupInfo_Permissions_BroadcastTitle: String { return self._s[361]! } + public var SocksProxySetup_ConnectAndSave: String { return self._s[362]! } public func MESSAGE_INVOICE(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[362]!, self._r[362]!, [_1, _2]) + return formatWithArgumentRanges(self._s[363]!, self._r[363]!, [_1, _2]) } public func Channel_AdminLog_MessageChangedGroupUsername(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[363]!, self._r[363]!, [_0]) + return formatWithArgumentRanges(self._s[364]!, self._r[364]!, [_0]) } - public var Replies_BlockAndDeleteRepliesActionTitle: String { return self._s[364]! } + public var Replies_BlockAndDeleteRepliesActionTitle: String { return self._s[365]! } public func Notification_GroupInviter(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[365]!, self._r[365]!, [_0]) + return formatWithArgumentRanges(self._s[366]!, self._r[366]!, [_0]) } - public var VoiceChat_CopyInviteLink: String { return self._s[366]! } - public var Conversation_InfoGroup: String { return self._s[367]! } + public var VoiceChat_CopyInviteLink: String { return self._s[367]! } + public var Conversation_InfoGroup: String { return self._s[368]! } public func Map_AccurateTo(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[369]!, self._r[369]!, [_0]) + return formatWithArgumentRanges(self._s[370]!, self._r[370]!, [_0]) } - public var Conversation_ChatBackground: String { return self._s[370]! } - public var PhotoEditor_Set: String { return self._s[371]! } + public var Conversation_ChatBackground: String { return self._s[371]! } + public var PhotoEditor_Set: String { return self._s[372]! } public func Channel_Management_PromotedBy(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[373]!, self._r[373]!, [_0]) + return formatWithArgumentRanges(self._s[374]!, self._r[374]!, [_0]) } - public var IntentsSettings_SuggestedChatsContacts: String { return self._s[374]! } - public var Passport_Phone_Title: String { return self._s[376]! } - public var Conversation_EditingMessageMediaChange: String { return self._s[377]! } - public var Channel_LinkItem: String { return self._s[378]! } - public var VoiceChat_EndConfirmationText: String { return self._s[379]! } + public var IntentsSettings_SuggestedChatsContacts: String { return self._s[375]! } + public var Passport_Phone_Title: String { return self._s[377]! } + public var Conversation_EditingMessageMediaChange: String { return self._s[378]! } + public var Channel_LinkItem: String { return self._s[379]! } + public var VoiceChat_EndConfirmationText: String { return self._s[380]! } public func PUSH_CHAT_DELETE_MEMBER(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[380]!, self._r[380]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[381]!, self._r[381]!, [_1, _2, _3]) } - public var Conversation_DeleteManyMessages: String { return self._s[382]! } - public var Notifications_Badge_IncludeMutedChats: String { return self._s[383]! } - public var AuthSessions_AddedDeviceTitle: String { return self._s[386]! } - public var Privacy_Calls_NeverAllow_Placeholder: String { return self._s[387]! } - public var Settings_ProxyConnecting: String { return self._s[388]! } - public var Theme_Colors_Accent: String { return self._s[389]! } - public var Theme_Colors_ColorWallpaperWarning: String { return self._s[390]! } + public var Conversation_DeleteManyMessages: String { return self._s[383]! } + public var Notifications_Badge_IncludeMutedChats: String { return self._s[384]! } + public var AuthSessions_AddedDeviceTitle: String { return self._s[387]! } + public var Privacy_Calls_NeverAllow_Placeholder: String { return self._s[388]! } + public var Settings_ProxyConnecting: String { return self._s[389]! } + public var Theme_Colors_Accent: String { return self._s[390]! } + public var Theme_Colors_ColorWallpaperWarning: String { return self._s[391]! } public func PUSH_PHONE_CALL_MISSED(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[392]!, self._r[392]!, [_1]) + return formatWithArgumentRanges(self._s[393]!, self._r[393]!, [_1]) } - public var Passport_Language_lo: String { return self._s[393]! } + public var Passport_Language_lo: String { return self._s[394]! } public func Watch_Time_ShortWeekdayAt(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[395]!, self._r[395]!, [_1, _2]) + return formatWithArgumentRanges(self._s[396]!, self._r[396]!, [_1, _2]) } - public var Permissions_NotificationsText_v0: String { return self._s[396]! } - public var ChatList_Context_RemoveFromRecents: String { return self._s[397]! } - public var Watch_GroupInfo_Title: String { return self._s[398]! } - public var Settings_AddDevice: String { return self._s[400]! } - public var WallpaperPreview_SwipeColorsTopText: String { return self._s[401]! } + public var Permissions_NotificationsText_v0: String { return self._s[397]! } + public var ChatList_Context_RemoveFromRecents: String { return self._s[398]! } + public var Watch_GroupInfo_Title: String { return self._s[399]! } + public var Settings_AddDevice: String { return self._s[401]! } + public var WallpaperPreview_SwipeColorsTopText: String { return self._s[402]! } public func PUSH_CHANNEL_ALBUM(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[402]!, self._r[402]!, [_1]) + return formatWithArgumentRanges(self._s[403]!, self._r[403]!, [_1]) } - public var TwoStepAuth_Disable: String { return self._s[404]! } + public var TwoStepAuth_Disable: String { return self._s[405]! } public func Conversation_AddNameToContacts(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[405]!, self._r[405]!, [_0]) + return formatWithArgumentRanges(self._s[406]!, self._r[406]!, [_0]) } public func Time_PreciseDate_m10(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[406]!, self._r[406]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[407]!, self._r[407]!, [_1, _2, _3]) } public func Login_WillSendSms(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[407]!, self._r[407]!, [_0]) + return formatWithArgumentRanges(self._s[408]!, self._r[408]!, [_0]) } - public var Channel_AdminLog_BanReadMessages: String { return self._s[408]! } - public var Undo_ChatDeleted: String { return self._s[409]! } - public var ContactInfo_URLLabelHomepage: String { return self._s[410]! } + public var Channel_AdminLog_BanReadMessages: String { return self._s[409]! } + public var Undo_ChatDeleted: String { return self._s[410]! } + public var ContactInfo_URLLabelHomepage: String { return self._s[411]! } public func PUSH_CHAT_MESSAGE_STICKER(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[411]!, self._r[411]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[412]!, self._r[412]!, [_1, _2, _3]) } - public var FastTwoStepSetup_EmailHelp: String { return self._s[412]! } - public var Contacts_SelectAll: String { return self._s[413]! } - public var Privacy_ContactsReset: String { return self._s[414]! } - public var AttachmentMenu_File: String { return self._s[416]! } - public var PasscodeSettings_EncryptData: String { return self._s[417]! } - public var EditTheme_ThemeTemplateAlertText: String { return self._s[418]! } + public var FastTwoStepSetup_EmailHelp: String { return self._s[413]! } + public var Contacts_SelectAll: String { return self._s[414]! } + public var Privacy_ContactsReset: String { return self._s[415]! } + public var AttachmentMenu_File: String { return self._s[417]! } + public var PasscodeSettings_EncryptData: String { return self._s[418]! } + public var EditTheme_ThemeTemplateAlertText: String { return self._s[419]! } public func Privacy_GroupsAndChannels_InviteToChannelError(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[420]!, self._r[420]!, [_0, _1]) - } - public func Profile_CreateEncryptedChatOutdatedError(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[421]!, self._r[421]!, [_0, _1]) } - public var PhotoEditor_ShadowsTint: String { return self._s[423]! } - public var GroupInfo_ChatAdmins: String { return self._s[424]! } - public var ArchivedChats_IntroTitle2: String { return self._s[425]! } - public var Cache_LowDiskSpaceText: String { return self._s[426]! } - public var CreatePoll_Anonymous: String { return self._s[427]! } - public var Report_AdditionalDetailsText: String { return self._s[428]! } - public var Checkout_PaymentMethod_New: String { return self._s[429]! } - public var Invitation_JoinGroup: String { return self._s[430]! } + public func Profile_CreateEncryptedChatOutdatedError(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[422]!, self._r[422]!, [_0, _1]) + } + public var PhotoEditor_ShadowsTint: String { return self._s[424]! } + public var GroupInfo_ChatAdmins: String { return self._s[425]! } + public var ArchivedChats_IntroTitle2: String { return self._s[426]! } + public var Cache_LowDiskSpaceText: String { return self._s[427]! } + public var CreatePoll_Anonymous: String { return self._s[428]! } + public var Report_AdditionalDetailsText: String { return self._s[429]! } + public var Checkout_PaymentMethod_New: String { return self._s[430]! } + public var Invitation_JoinGroup: String { return self._s[431]! } public func Time_MonthOfYear_m4(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[433]!, self._r[433]!, [_0]) + return formatWithArgumentRanges(self._s[434]!, self._r[434]!, [_0]) } - public var CheckoutInfo_SaveInfoHelp: String { return self._s[434]! } - public var Notification_Reply: String { return self._s[436]! } + public var CheckoutInfo_SaveInfoHelp: String { return self._s[435]! } + public var Notification_Reply: String { return self._s[437]! } public func Login_PhoneBannedEmailSubject(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[437]!, self._r[437]!, [_0]) + return formatWithArgumentRanges(self._s[438]!, self._r[438]!, [_0]) } - public var Login_PhoneTitle: String { return self._s[438]! } - public var VoiceChat_UnmuteHelp: String { return self._s[439]! } - public var VoiceOver_Media_PlaybackRateNormal: String { return self._s[440]! } + public var Login_PhoneTitle: String { return self._s[439]! } + public var VoiceChat_UnmuteHelp: String { return self._s[440]! } + public var VoiceOver_Media_PlaybackRateNormal: String { return self._s[441]! } public func PUSH_CHAT_MESSAGE_INVOICE(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[441]!, self._r[441]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[442]!, self._r[442]!, [_1, _2, _3]) } - public var Appearance_TextSize_Title: String { return self._s[442]! } - public var NetworkUsageSettings_MediaImageDataSection: String { return self._s[444]! } - public var VoiceOver_Navigation_Compose: String { return self._s[445]! } - public var Passport_InfoText: String { return self._s[446]! } - public var ApplyLanguage_ApplyLanguageAction: String { return self._s[447]! } - public var MessagePoll_LabelClosed: String { return self._s[449]! } - public var AttachmentMenu_SendAsFiles: String { return self._s[450]! } - public var KeyCommand_FocusOnInputField: String { return self._s[451]! } - public var Conversation_ContextViewThread: String { return self._s[452]! } - public var ChatImport_SelectionErrorGroupGeneric: String { return self._s[453]! } - public var Privacy_SecretChatsLinkPreviews: String { return self._s[455]! } - public var Permissions_PeopleNearbyAllow_v0: String { return self._s[456]! } - public var Conversation_ContextMenuMention: String { return self._s[458]! } - public var CreatePoll_QuizInfo: String { return self._s[459]! } - public var Appearance_ThemePreview_ChatList_2_Name: String { return self._s[460]! } - public var Username_LinkCopied: String { return self._s[461]! } - public var IntentsSettings_SuggestedAndSpotlightChatsInfo: String { return self._s[462]! } - public var TwoStepAuth_ChangePassword: String { return self._s[463]! } - public var Watch_Suggestion_Thanks: String { return self._s[464]! } - public var Channel_TitleInfo: String { return self._s[465]! } - public var ChatList_ChatTypesSection: String { return self._s[466]! } + public var Appearance_TextSize_Title: String { return self._s[443]! } + public var NetworkUsageSettings_MediaImageDataSection: String { return self._s[445]! } + public var VoiceOver_Navigation_Compose: String { return self._s[446]! } + public var Passport_InfoText: String { return self._s[447]! } + public var ApplyLanguage_ApplyLanguageAction: String { return self._s[448]! } + public var MessagePoll_LabelClosed: String { return self._s[450]! } + public var AttachmentMenu_SendAsFiles: String { return self._s[451]! } + public var KeyCommand_FocusOnInputField: String { return self._s[452]! } + public var Conversation_ContextViewThread: String { return self._s[453]! } + public var ChatImport_SelectionErrorGroupGeneric: String { return self._s[454]! } + public var Privacy_SecretChatsLinkPreviews: String { return self._s[456]! } + public var Permissions_PeopleNearbyAllow_v0: String { return self._s[457]! } + public var Conversation_ContextMenuMention: String { return self._s[459]! } + public var CreatePoll_QuizInfo: String { return self._s[460]! } + public var Appearance_ThemePreview_ChatList_2_Name: String { return self._s[461]! } + public var Username_LinkCopied: String { return self._s[462]! } + public var IntentsSettings_SuggestedAndSpotlightChatsInfo: String { return self._s[463]! } + public var TwoStepAuth_ChangePassword: String { return self._s[464]! } + public var Watch_Suggestion_Thanks: String { return self._s[465]! } + public var Channel_TitleInfo: String { return self._s[466]! } + public var ChatList_ChatTypesSection: String { return self._s[467]! } public func Watch_LastSeen_AtDate(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[467]!, self._r[467]!, [_0]) - } - public func Channel_AdminLog_PollStopped(_ _0: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[468]!, self._r[468]!, [_0]) } - public var AuthSessions_AddDevice_InvalidQRCode: String { return self._s[469]! } + public func Channel_AdminLog_PollStopped(_ _0: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[469]!, self._r[469]!, [_0]) + } + public var AuthSessions_AddDevice_InvalidQRCode: String { return self._s[470]! } public func Call_MicrophoneOff(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[470]!, self._r[470]!, [_0]) + return formatWithArgumentRanges(self._s[471]!, self._r[471]!, [_0]) } - public var Channel_AdminLogFilter_ChannelEventsInfo: String { return self._s[471]! } - public var Profile_MessageLifetimeForever: String { return self._s[472]! } - public var ArchivedChats_IntroText1: String { return self._s[473]! } - public var Notifications_ChannelNotificationsPreview: String { return self._s[474]! } - public var Map_PullUpForPlaces: String { return self._s[476]! } - public var UserInfo_TelegramCall: String { return self._s[477]! } - public var Conversation_ShareMyContactInfo: String { return self._s[478]! } - public var ChatList_Tabs_All: String { return self._s[479]! } - public var Notification_PassportValueEmail: String { return self._s[480]! } - public var Notification_VideoCallIncoming: String { return self._s[481]! } - public var SettingsSearch_Synonyms_Appearance_AutoNightTheme: String { return self._s[482]! } - public var Channel_Username_InvalidTaken: String { return self._s[483]! } - public var GroupPermission_EditingDisabled: String { return self._s[484]! } - public var InviteLink_PeopleJoinedShortNone: String { return self._s[485]! } - public var ChatContextMenu_TextSelectionTip: String { return self._s[486]! } - public var Passport_Language_pl: String { return self._s[488]! } - public var Call_Accept: String { return self._s[489]! } - public var ChatListFolder_NameSectionHeader: String { return self._s[490]! } - public var InviteLink_ExpiredLinkStatus: String { return self._s[491]! } + public var Channel_AdminLogFilter_ChannelEventsInfo: String { return self._s[472]! } + public var Profile_MessageLifetimeForever: String { return self._s[473]! } + public var ArchivedChats_IntroText1: String { return self._s[474]! } + public var Notifications_ChannelNotificationsPreview: String { return self._s[475]! } + public var Map_PullUpForPlaces: String { return self._s[477]! } + public var UserInfo_TelegramCall: String { return self._s[478]! } + public var Conversation_ShareMyContactInfo: String { return self._s[479]! } + public var ChatList_Tabs_All: String { return self._s[480]! } + public var Notification_PassportValueEmail: String { return self._s[481]! } + public var Notification_VideoCallIncoming: String { return self._s[482]! } + public var SettingsSearch_Synonyms_Appearance_AutoNightTheme: String { return self._s[483]! } + public var Channel_Username_InvalidTaken: String { return self._s[484]! } + public var GroupPermission_EditingDisabled: String { return self._s[485]! } + public var InviteLink_PeopleJoinedShortNone: String { return self._s[486]! } + public var ChatContextMenu_TextSelectionTip: String { return self._s[487]! } + public var Passport_Language_pl: String { return self._s[489]! } + public var Call_Accept: String { return self._s[490]! } + public var ChatListFolder_NameSectionHeader: String { return self._s[491]! } + public var InviteLink_ExpiredLinkStatus: String { return self._s[492]! } public func Passport_Identity_NativeNameTitle(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[492]!, self._r[492]!, [_0]) + return formatWithArgumentRanges(self._s[493]!, self._r[493]!, [_0]) } - public var ClearCache_Forever: String { return self._s[493]! } + public var ClearCache_Forever: String { return self._s[494]! } public func ChannelInfo_AddParticipantConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[495]!, self._r[495]!, [_0]) + return formatWithArgumentRanges(self._s[496]!, self._r[496]!, [_0]) } - public var Group_EditAdmin_RankAdminPlaceholder: String { return self._s[496]! } - public var Calls_SubmitRating: String { return self._s[497]! } - public var Location_LiveLocationRequired_ShareLocation: String { return self._s[498]! } + public var Group_EditAdmin_RankAdminPlaceholder: String { return self._s[497]! } + public var Calls_SubmitRating: String { return self._s[498]! } + public var Location_LiveLocationRequired_ShareLocation: String { return self._s[499]! } public func ChatList_AddedToFolderTooltip(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[499]!, self._r[499]!, [_1, _2]) + return formatWithArgumentRanges(self._s[500]!, self._r[500]!, [_1, _2]) } - public var IntentsSettings_MainAccountInfo: String { return self._s[500]! } - public var Map_Hybrid: String { return self._s[502]! } - public var ChatList_Context_Archive: String { return self._s[503]! } - public var Message_PinnedDocumentMessage: String { return self._s[504]! } - public var State_ConnectingToProxyInfo: String { return self._s[505]! } - public var Passport_Identity_NativeNameGenericTitle: String { return self._s[507]! } - public var Settings_AppLanguage: String { return self._s[508]! } + public var IntentsSettings_MainAccountInfo: String { return self._s[501]! } + public var Map_Hybrid: String { return self._s[503]! } + public var ChatList_Context_Archive: String { return self._s[504]! } + public var Message_PinnedDocumentMessage: String { return self._s[505]! } + public var State_ConnectingToProxyInfo: String { return self._s[506]! } + public var Passport_Identity_NativeNameGenericTitle: String { return self._s[508]! } + public var Settings_AppLanguage: String { return self._s[509]! } public func Checkout_SavePasswordTimeoutAndFaceId(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[509]!, self._r[509]!, [_0]) + return formatWithArgumentRanges(self._s[510]!, self._r[510]!, [_0]) } - public var Notifications_PermissionsEnable: String { return self._s[511]! } - public var CheckoutInfo_ShippingInfoAddress1Placeholder: String { return self._s[512]! } + public var Notifications_PermissionsEnable: String { return self._s[512]! } + public var CheckoutInfo_ShippingInfoAddress1Placeholder: String { return self._s[513]! } public func UserInfo_BlockActionTitle(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[513]!, self._r[513]!, [_0]) - } - public func AuthSessions_Message(_ _0: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[514]!, self._r[514]!, [_0]) } - public var NotificationsSound_Aurora: String { return self._s[517]! } - public var ScheduledMessages_ClearAll: String { return self._s[520]! } + public func AuthSessions_Message(_ _0: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[515]!, self._r[515]!, [_0]) + } + public var NotificationsSound_Aurora: String { return self._s[518]! } + public var ScheduledMessages_ClearAll: String { return self._s[521]! } public func CancelResetAccount_TextSMS(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[521]!, self._r[521]!, [_0]) + return formatWithArgumentRanges(self._s[522]!, self._r[522]!, [_0]) } - public var Settings_BlockedUsers: String { return self._s[523]! } + public var Settings_BlockedUsers: String { return self._s[524]! } public func UserInfo_StartSecretChatConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[525]!, self._r[525]!, [_0]) + return formatWithArgumentRanges(self._s[526]!, self._r[526]!, [_0]) } - public var Passport_Language_hu: String { return self._s[526]! } + public var Passport_Language_hu: String { return self._s[527]! } public func Conversation_ScheduleMessage_SendTomorrow(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[527]!, self._r[527]!, [_0]) + return formatWithArgumentRanges(self._s[528]!, self._r[528]!, [_0]) } - public var StickerPack_Share: String { return self._s[528]! } - public var Checkout_NewCard_SaveInfoEnableHelp: String { return self._s[529]! } + public var StickerPack_Share: String { return self._s[529]! } + public var Checkout_NewCard_SaveInfoEnableHelp: String { return self._s[530]! } public func ForwardedAuthors2(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[530]!, self._r[530]!, [_0, _1]) + return formatWithArgumentRanges(self._s[531]!, self._r[531]!, [_0, _1]) } - public var Privacy_ContactsResetConfirmation: String { return self._s[531]! } - public var AppleWatch_ReplyPresets: String { return self._s[532]! } - public var Bot_GenericBotStatus: String { return self._s[533]! } - public var Appearance_ShareThemeColor: String { return self._s[534]! } - public var AuthSessions_AddDevice_UrlLoginHint: String { return self._s[535]! } - public var ReportGroupLocation_Title: String { return self._s[536]! } + public var Privacy_ContactsResetConfirmation: String { return self._s[532]! } + public var AppleWatch_ReplyPresets: String { return self._s[533]! } + public var Bot_GenericBotStatus: String { return self._s[534]! } + public var Appearance_ShareThemeColor: String { return self._s[535]! } + public var AuthSessions_AddDevice_UrlLoginHint: String { return self._s[536]! } + public var ReportGroupLocation_Title: String { return self._s[537]! } public func Activity_RemindAboutUser(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[537]!, self._r[537]!, [_0]) + return formatWithArgumentRanges(self._s[538]!, self._r[538]!, [_0]) } - public var Profile_CreateEncryptedChatError: String { return self._s[538]! } - public var Channel_EditAdmin_TransferOwnership: String { return self._s[539]! } - public var Wallpaper_ErrorNotFound: String { return self._s[540]! } - public var Bot_GenericSupportStatus: String { return self._s[541]! } - public var Activity_UploadingPhoto: String { return self._s[543]! } - public var Watch_UserInfo_Title: String { return self._s[545]! } - public var SocksProxySetup_ProxyTelegram: String { return self._s[546]! } - public var Appearance_ThemeDay: String { return self._s[547]! } + public var Profile_CreateEncryptedChatError: String { return self._s[539]! } + public var Channel_EditAdmin_TransferOwnership: String { return self._s[540]! } + public var Wallpaper_ErrorNotFound: String { return self._s[541]! } + public var Bot_GenericSupportStatus: String { return self._s[542]! } + public var Activity_UploadingPhoto: String { return self._s[544]! } + public var Watch_UserInfo_Title: String { return self._s[546]! } + public var SocksProxySetup_ProxyTelegram: String { return self._s[547]! } + public var Appearance_ThemeDay: String { return self._s[548]! } public func ApplyLanguage_ChangeLanguageOfficialText(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[548]!, self._r[548]!, [_1]) + return formatWithArgumentRanges(self._s[549]!, self._r[549]!, [_1]) } public func FileSize_B(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[549]!, self._r[549]!, [_0]) + return formatWithArgumentRanges(self._s[550]!, self._r[550]!, [_0]) } - public var InviteLink_AdditionalLinks: String { return self._s[550]! } - public var Passport_Title: String { return self._s[553]! } + public var InviteLink_AdditionalLinks: String { return self._s[551]! } + public var Passport_Title: String { return self._s[554]! } public func Time_PreciseDate_m3(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[555]!, self._r[555]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[556]!, self._r[556]!, [_1, _2, _3]) } - public var CheckoutInfo_ShippingInfoCountryPlaceholder: String { return self._s[556]! } - public var SocksProxySetup_ShareLink: String { return self._s[559]! } - public var AuthSessions_OtherDevices: String { return self._s[560]! } - public var IntentsSettings_SuggestedChatsGroups: String { return self._s[561]! } - public var Watch_MessageView_Reply: String { return self._s[562]! } - public var Camera_FlashOn: String { return self._s[564]! } + public var CheckoutInfo_ShippingInfoCountryPlaceholder: String { return self._s[557]! } + public var SocksProxySetup_ShareLink: String { return self._s[560]! } + public var AuthSessions_OtherDevices: String { return self._s[561]! } + public var IntentsSettings_SuggestedChatsGroups: String { return self._s[562]! } + public var Watch_MessageView_Reply: String { return self._s[563]! } + public var Camera_FlashOn: String { return self._s[565]! } public func PUSH_MESSAGE_STICKER(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[565]!, self._r[565]!, [_1, _2]) + return formatWithArgumentRanges(self._s[566]!, self._r[566]!, [_1, _2]) } - public var Conversation_ContextMenuBlock: String { return self._s[566]! } - public var Channel_EditAdmin_PermissionEditMessages: String { return self._s[568]! } - public var Privacy_Calls_NeverAllow: String { return self._s[569]! } - public var SharedMedia_CategoryLinks: String { return self._s[570]! } - public var Conversation_PinMessageAlertGroup: String { return self._s[573]! } - public var Passport_Identity_ScansHelp: String { return self._s[575]! } - public var ShareMenu_CopyShareLink: String { return self._s[576]! } - public var StickerSettings_MaskContextInfo: String { return self._s[577]! } - public var InviteLink_Create_EditTitle: String { return self._s[578]! } - public var SocksProxySetup_ProxyStatusChecking: String { return self._s[579]! } - public var AutoDownloadSettings_AutodownloadPhotos: String { return self._s[582]! } - public var ChatImportActivity_Success: String { return self._s[584]! } - public var Checkout_ErrorPrecheckoutFailed: String { return self._s[585]! } - public var NotificationsSound_Popcorn: String { return self._s[586]! } - public var FeatureDisabled_Oops: String { return self._s[587]! } + public var Conversation_ContextMenuBlock: String { return self._s[567]! } + public var Channel_EditAdmin_PermissionEditMessages: String { return self._s[569]! } + public var Privacy_Calls_NeverAllow: String { return self._s[570]! } + public var SharedMedia_CategoryLinks: String { return self._s[571]! } + public var Conversation_PinMessageAlertGroup: String { return self._s[574]! } + public var Passport_Identity_ScansHelp: String { return self._s[576]! } + public var ShareMenu_CopyShareLink: String { return self._s[577]! } + public var StickerSettings_MaskContextInfo: String { return self._s[578]! } + public var InviteLink_Create_EditTitle: String { return self._s[579]! } + public var SocksProxySetup_ProxyStatusChecking: String { return self._s[580]! } + public var AutoDownloadSettings_AutodownloadPhotos: String { return self._s[583]! } + public var ChatImportActivity_Success: String { return self._s[585]! } + public var Checkout_ErrorPrecheckoutFailed: String { return self._s[586]! } + public var NotificationsSound_Popcorn: String { return self._s[587]! } + public var FeatureDisabled_Oops: String { return self._s[588]! } public func Channel_AdminLog_MessageChangedChannelAbout(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[588]!, self._r[588]!, [_0]) + return formatWithArgumentRanges(self._s[589]!, self._r[589]!, [_0]) } - public var Notification_PinnedMessage: String { return self._s[589]! } - public var Tour_Title4: String { return self._s[590]! } + public var Notification_PinnedMessage: String { return self._s[590]! } + public var Tour_Title4: String { return self._s[591]! } public func Notification_VoiceChatInvitationForYou(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[591]!, self._r[591]!, [_1]) + return formatWithArgumentRanges(self._s[592]!, self._r[592]!, [_1]) } - public var Watch_Suggestion_OK: String { return self._s[592]! } - public var Compose_TokenListPlaceholder: String { return self._s[593]! } - public var InviteLink_PermanentLink: String { return self._s[594]! } - public var EditTheme_Edit_TopInfo: String { return self._s[595]! } - public var Gif_NoGifsFound: String { return self._s[596]! } - public var Login_InvalidCountryCode: String { return self._s[597]! } - public var SettingsSearch_Synonyms_Notifications_ChannelNotificationsExceptions: String { return self._s[598]! } - public var Call_VoiceOver_VideoCallMissed: String { return self._s[599]! } + public var Watch_Suggestion_OK: String { return self._s[593]! } + public var Compose_TokenListPlaceholder: String { return self._s[594]! } + public var InviteLink_PermanentLink: String { return self._s[595]! } + public var EditTheme_Edit_TopInfo: String { return self._s[596]! } + public var Gif_NoGifsFound: String { return self._s[597]! } + public var Login_InvalidCountryCode: String { return self._s[598]! } + public var SettingsSearch_Synonyms_Notifications_ChannelNotificationsExceptions: String { return self._s[599]! } + public var Call_VoiceOver_VideoCallMissed: String { return self._s[600]! } public func PUSH_LOCKED_MESSAGE(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[601]!, self._r[601]!, [_1]) + return formatWithArgumentRanges(self._s[602]!, self._r[602]!, [_1]) } - public var Profile_CreateNewContact: String { return self._s[602]! } - public var AutoDownloadSettings_DataUsageLow: String { return self._s[603]! } - public var SettingsSearch_Synonyms_Notifications_InAppNotificationsPreview: String { return self._s[604]! } - public var Group_Setup_TypePublic: String { return self._s[605]! } - public var Weekday_ShortSaturday: String { return self._s[606]! } + public var Profile_CreateNewContact: String { return self._s[603]! } + public var AutoDownloadSettings_DataUsageLow: String { return self._s[604]! } + public var SettingsSearch_Synonyms_Notifications_InAppNotificationsPreview: String { return self._s[605]! } + public var Group_Setup_TypePublic: String { return self._s[606]! } + public var Weekday_ShortSaturday: String { return self._s[607]! } public func Time_MonthOfYear_m12(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[607]!, self._r[607]!, [_0]) + return formatWithArgumentRanges(self._s[608]!, self._r[608]!, [_0]) } - public var LiveLocation_MenuStopAll: String { return self._s[608]! } + public var LiveLocation_MenuStopAll: String { return self._s[609]! } public func DialogList_EncryptedChatStartedIncoming(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[609]!, self._r[609]!, [_0]) + return formatWithArgumentRanges(self._s[610]!, self._r[610]!, [_0]) } - public var ChatListFolder_NamePlaceholder: String { return self._s[610]! } - public var Channel_OwnershipTransfer_ErrorPublicChannelsTooMuch: String { return self._s[611]! } + public var ChatListFolder_NamePlaceholder: String { return self._s[611]! } + public var Channel_OwnershipTransfer_ErrorPublicChannelsTooMuch: String { return self._s[612]! } public func PUSH_CHAT_MESSAGE_GAME(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[612]!, self._r[612]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[613]!, self._r[613]!, [_1, _2, _3]) } - public var VoiceChat_ChatFullAlertText: String { return self._s[613]! } - public var Chat_GenericPsaTooltip: String { return self._s[615]! } - public var ChannelInfo_CreateVoiceChat: String { return self._s[616]! } + public var VoiceChat_ChatFullAlertText: String { return self._s[614]! } + public var Chat_GenericPsaTooltip: String { return self._s[616]! } + public var ChannelInfo_CreateVoiceChat: String { return self._s[617]! } public func Message_ForwardedMessageShort(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[617]!, self._r[617]!, [_0]) + return formatWithArgumentRanges(self._s[618]!, self._r[618]!, [_0]) } - public var PrivacyLastSeenSettings_AlwaysShareWith_Placeholder: String { return self._s[618]! } - public var Login_PhoneAndCountryHelp: String { return self._s[619]! } - public var SaveIncomingPhotosSettings_From: String { return self._s[621]! } - public var Conversation_JumpToDate: String { return self._s[622]! } - public var AuthSessions_AddDevice: String { return self._s[623]! } - public var Settings_FAQ: String { return self._s[625]! } + public var PrivacyLastSeenSettings_AlwaysShareWith_Placeholder: String { return self._s[619]! } + public var Login_PhoneAndCountryHelp: String { return self._s[620]! } + public var SaveIncomingPhotosSettings_From: String { return self._s[622]! } + public var Conversation_JumpToDate: String { return self._s[623]! } + public var AuthSessions_AddDevice: String { return self._s[624]! } + public var Settings_FAQ: String { return self._s[626]! } public func ChatImport_CreateGroupAlertText(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[626]!, self._r[626]!, [_0]) + return formatWithArgumentRanges(self._s[627]!, self._r[627]!, [_0]) } - public var Username_Title: String { return self._s[627]! } - public var DialogList_Read: String { return self._s[628]! } - public var Conversation_InstantPagePreview: String { return self._s[629]! } - public var Report_Succeed: String { return self._s[631]! } - public var Login_ResetAccountProtected_Title: String { return self._s[632]! } - public var CallFeedback_ReasonDistortedSpeech: String { return self._s[633]! } - public var Channel_EditAdmin_PermissionChangeInfo: String { return self._s[634]! } + public var Username_Title: String { return self._s[628]! } + public var DialogList_Read: String { return self._s[629]! } + public var Conversation_InstantPagePreview: String { return self._s[630]! } + public var Report_Succeed: String { return self._s[632]! } + public var Login_ResetAccountProtected_Title: String { return self._s[633]! } + public var CallFeedback_ReasonDistortedSpeech: String { return self._s[634]! } + public var Channel_EditAdmin_PermissionChangeInfo: String { return self._s[635]! } public func Channel_AdminLog_MessageRankUsername(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[635]!, self._r[635]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[636]!, self._r[636]!, [_1, _2, _3]) } - public var WallpaperPreview_PreviewBottomText: String { return self._s[637]! } - public var Privacy_SecretChatsTitle: String { return self._s[640]! } + public var WallpaperPreview_PreviewBottomText: String { return self._s[638]! } + public var Privacy_SecretChatsTitle: String { return self._s[641]! } public func Notification_PassportValuesSentMessage(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[641]!, self._r[641]!, [_1, _2]) + return formatWithArgumentRanges(self._s[642]!, self._r[642]!, [_1, _2]) } - public var Checkout_NewCard_SaveInfoHelp: String { return self._s[642]! } - public var Conversation_ClousStorageInfo_Description4: String { return self._s[643]! } - public var PasscodeSettings_TurnPasscodeOn: String { return self._s[644]! } - public var Message_ReplyActionButtonShowReceipt: String { return self._s[645]! } + public var Checkout_NewCard_SaveInfoHelp: String { return self._s[643]! } + public var Conversation_ClousStorageInfo_Description4: String { return self._s[644]! } + public var PasscodeSettings_TurnPasscodeOn: String { return self._s[645]! } + public var Message_ReplyActionButtonShowReceipt: String { return self._s[646]! } public func PrivacyPolicy_AgeVerificationMessage(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[646]!, self._r[646]!, [_0]) + return formatWithArgumentRanges(self._s[647]!, self._r[647]!, [_0]) } - public var GroupInfo_DeleteAndExitConfirmation: String { return self._s[648]! } - public var TwoStepAuth_ConfirmationAbort: String { return self._s[649]! } - public var PrivacySettings_LastSeenEverybody: String { return self._s[650]! } - public var CallFeedback_ReasonDropped: String { return self._s[651]! } + public var GroupInfo_DeleteAndExitConfirmation: String { return self._s[649]! } + public var TwoStepAuth_ConfirmationAbort: String { return self._s[650]! } + public var PrivacySettings_LastSeenEverybody: String { return self._s[651]! } + public var CallFeedback_ReasonDropped: String { return self._s[652]! } public func ScheduledMessages_ScheduledDate(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[652]!, self._r[652]!, [_0]) + return formatWithArgumentRanges(self._s[653]!, self._r[653]!, [_0]) } - public var WebSearch_Images: String { return self._s[653]! } - public var Passport_Identity_Surname: String { return self._s[654]! } - public var Channel_Stickers_CreateYourOwn: String { return self._s[655]! } - public var TwoFactorSetup_Email_Title: String { return self._s[656]! } - public var Cache_ClearEmpty: String { return self._s[657]! } - public var AuthSessions_AddDeviceIntro_Action: String { return self._s[658]! } - public var Theme_Context_Apply: String { return self._s[659]! } - public var GroupInfo_Permissions_SearchPlaceholder: String { return self._s[660]! } - public var CallList_DeleteAllForEveryone: String { return self._s[661]! } - public var AutoDownloadSettings_DocumentsTitle: String { return self._s[662]! } + public var WebSearch_Images: String { return self._s[654]! } + public var Passport_Identity_Surname: String { return self._s[655]! } + public var Channel_Stickers_CreateYourOwn: String { return self._s[656]! } + public var TwoFactorSetup_Email_Title: String { return self._s[657]! } + public var Cache_ClearEmpty: String { return self._s[658]! } + public var AuthSessions_AddDeviceIntro_Action: String { return self._s[659]! } + public var Theme_Context_Apply: String { return self._s[660]! } + public var GroupInfo_Permissions_SearchPlaceholder: String { return self._s[661]! } + public var CallList_DeleteAllForEveryone: String { return self._s[662]! } + public var AutoDownloadSettings_DocumentsTitle: String { return self._s[663]! } public func NetworkUsageSettings_CellularUsageSince(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[663]!, self._r[663]!, [_0]) + return formatWithArgumentRanges(self._s[664]!, self._r[664]!, [_0]) } - public var Call_StatusRinging: String { return self._s[664]! } + public var Call_StatusRinging: String { return self._s[665]! } public func Map_DistanceAway(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[665]!, self._r[665]!, [_0]) - } - public func DialogList_SingleTypingSuffix(_ _0: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[666]!, self._r[666]!, [_0]) } - public var Cache_ClearNone: String { return self._s[667]! } - public var PrivacyPolicy_Accept: String { return self._s[668]! } - public var Contacts_PhoneNumber: String { return self._s[669]! } - public var Passport_Identity_OneOfTypePassport: String { return self._s[670]! } - public var PhotoEditor_HighlightsTint: String { return self._s[672]! } - public var AutoDownloadSettings_AutodownloadVideos: String { return self._s[673]! } - public var Checkout_PaymentMethod_Title: String { return self._s[676]! } - public var Month_GenAugust: String { return self._s[678]! } - public var DialogList_Draft: String { return self._s[679]! } - public var ChatList_EmptyChatListFilterText: String { return self._s[680]! } - public var PeopleNearby_Description: String { return self._s[681]! } - public var WallpaperPreview_SwipeColorsBottomText: String { return self._s[682]! } - public var SettingsSearch_Synonyms_Privacy_Data_TopPeers: String { return self._s[684]! } - public var Watch_Message_ForwardedFrom: String { return self._s[685]! } - public var Notification_Mute1h: String { return self._s[686]! } - public var Appearance_ThemePreview_Chat_3_TextWithLink: String { return self._s[687]! } - public var SettingsSearch_Synonyms_Privacy_AuthSessions: String { return self._s[689]! } - public var Channel_Edit_LinkItem: String { return self._s[690]! } - public var Presence_online: String { return self._s[691]! } - public var AutoDownloadSettings_Title: String { return self._s[692]! } - public var Conversation_MessageDialogRetry: String { return self._s[693]! } - public var SettingsSearch_Synonyms_ChatSettings_OpenLinksIn: String { return self._s[695]! } - public var Channel_About_Placeholder: String { return self._s[697]! } - public var Passport_Language_sl: String { return self._s[698]! } - public var AppleWatch_Title: String { return self._s[700]! } - public var RepliesChat_DescriptionText: String { return self._s[702]! } - public var Stats_Message_PrivateShares: String { return self._s[703]! } - public var Settings_ViewPhoto: String { return self._s[704]! } - public var Conversation_ForwardTooltip_SavedMessages_One: String { return self._s[705]! } - public var ChatList_DeleteSavedMessagesConfirmation: String { return self._s[706]! } - public var Cache_ClearProgress: String { return self._s[707]! } - public var Cache_Music: String { return self._s[708]! } - public var Conversation_ContextMenuShare: String { return self._s[710]! } - public var AutoDownloadSettings_Unlimited: String { return self._s[711]! } - public var Channel_OwnershipTransfer_ErrorPrivacyRestricted: String { return self._s[712]! } - public var Contacts_PermissionsAllow: String { return self._s[713]! } - public var Passport_Language_vi: String { return self._s[715]! } + public func DialogList_SingleTypingSuffix(_ _0: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[667]!, self._r[667]!, [_0]) + } + public var Cache_ClearNone: String { return self._s[668]! } + public var PrivacyPolicy_Accept: String { return self._s[669]! } + public var Contacts_PhoneNumber: String { return self._s[670]! } + public var Passport_Identity_OneOfTypePassport: String { return self._s[671]! } + public var PhotoEditor_HighlightsTint: String { return self._s[673]! } + public var AutoDownloadSettings_AutodownloadVideos: String { return self._s[674]! } + public var Checkout_PaymentMethod_Title: String { return self._s[677]! } + public var Month_GenAugust: String { return self._s[679]! } + public var DialogList_Draft: String { return self._s[680]! } + public var ChatList_EmptyChatListFilterText: String { return self._s[681]! } + public var PeopleNearby_Description: String { return self._s[682]! } + public var WallpaperPreview_SwipeColorsBottomText: String { return self._s[683]! } + public var SettingsSearch_Synonyms_Privacy_Data_TopPeers: String { return self._s[685]! } + public var Watch_Message_ForwardedFrom: String { return self._s[686]! } + public var Notification_Mute1h: String { return self._s[687]! } + public var Appearance_ThemePreview_Chat_3_TextWithLink: String { return self._s[688]! } + public var SettingsSearch_Synonyms_Privacy_AuthSessions: String { return self._s[690]! } + public var Channel_Edit_LinkItem: String { return self._s[691]! } + public var Presence_online: String { return self._s[692]! } + public var AutoDownloadSettings_Title: String { return self._s[693]! } + public var Conversation_MessageDialogRetry: String { return self._s[694]! } + public var SettingsSearch_Synonyms_ChatSettings_OpenLinksIn: String { return self._s[696]! } + public var Channel_About_Placeholder: String { return self._s[698]! } + public var Passport_Language_sl: String { return self._s[699]! } + public var AppleWatch_Title: String { return self._s[701]! } + public var RepliesChat_DescriptionText: String { return self._s[703]! } + public var Stats_Message_PrivateShares: String { return self._s[704]! } + public var Settings_ViewPhoto: String { return self._s[705]! } + public var Conversation_ForwardTooltip_SavedMessages_One: String { return self._s[706]! } + public var ChatList_DeleteSavedMessagesConfirmation: String { return self._s[707]! } + public var Cache_ClearProgress: String { return self._s[708]! } + public var Cache_Music: String { return self._s[709]! } + public var Conversation_ContextMenuShare: String { return self._s[711]! } + public var AutoDownloadSettings_Unlimited: String { return self._s[712]! } + public var Channel_OwnershipTransfer_ErrorPrivacyRestricted: String { return self._s[713]! } + public var Contacts_PermissionsAllow: String { return self._s[714]! } + public var Passport_Language_vi: String { return self._s[716]! } public func PUSH_MESSAGE_TEXT(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[718]!, self._r[718]!, [_1, _2]) + return formatWithArgumentRanges(self._s[719]!, self._r[719]!, [_1, _2]) } - public var Passport_Language_de: String { return self._s[719]! } - public var Notifications_PermissionsText: String { return self._s[721]! } - public var GroupRemoved_AddToGroup: String { return self._s[722]! } - public var Appearance_ThemePreview_ChatList_4_Text: String { return self._s[723]! } - public var ChangePhoneNumberCode_RequestingACall: String { return self._s[724]! } - public var Login_TermsOfServiceAgree: String { return self._s[725]! } - public var VoiceOver_Navigation_ProxySettings: String { return self._s[726]! } + public var Passport_Language_de: String { return self._s[720]! } + public var Notifications_PermissionsText: String { return self._s[722]! } + public var GroupRemoved_AddToGroup: String { return self._s[723]! } + public var Appearance_ThemePreview_ChatList_4_Text: String { return self._s[724]! } + public var ChangePhoneNumberCode_RequestingACall: String { return self._s[725]! } + public var Login_TermsOfServiceAgree: String { return self._s[726]! } + public var VoiceOver_Navigation_ProxySettings: String { return self._s[727]! } public func PUSH_CHAT_JOINED(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[727]!, self._r[727]!, [_1, _2]) + return formatWithArgumentRanges(self._s[728]!, self._r[728]!, [_1, _2]) } - public var SettingsSearch_Synonyms_Data_CallsUseLessData: String { return self._s[729]! } + public var SettingsSearch_Synonyms_Data_CallsUseLessData: String { return self._s[730]! } public func PUSH_CHAT_VOICECHAT_START(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[730]!, self._r[730]!, [_1, _2]) + return formatWithArgumentRanges(self._s[731]!, self._r[731]!, [_1, _2]) } - public var ChatListFolder_NameGroups: String { return self._s[731]! } - public var SocksProxySetup_ProxyDetailsTitle: String { return self._s[732]! } + public var ChatListFolder_NameGroups: String { return self._s[732]! } + public var SocksProxySetup_ProxyDetailsTitle: String { return self._s[733]! } public func Channel_AdminLog_MessageChangedLinkedGroup(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[733]!, self._r[733]!, [_1, _2]) + return formatWithArgumentRanges(self._s[734]!, self._r[734]!, [_1, _2]) } public func ConvertToChannel_LimitAlert_Text(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[734]!, self._r[734]!, [_0]) + return formatWithArgumentRanges(self._s[735]!, self._r[735]!, [_0]) } - public var Watch_Suggestion_TalkLater: String { return self._s[735]! } - public var Checkout_ShippingOption_Title: String { return self._s[736]! } - public var Conversation_TitleRepliesEmpty: String { return self._s[737]! } - public var CreatePoll_TextHeader: String { return self._s[738]! } - public var VoiceOver_Chat_Message: String { return self._s[740]! } - public var InfoPlist_NSLocationWhenInUseUsageDescription: String { return self._s[741]! } - public var ContactInfo_Note: String { return self._s[743]! } - public var Channel_AdminLog_InfoPanelAlertText: String { return self._s[744]! } - public var Checkout_NewCard_CardholderNameTitle: String { return self._s[745]! } - public var AutoDownloadSettings_Photos: String { return self._s[746]! } - public var UserInfo_NotificationsDefaultDisabled: String { return self._s[747]! } + public var Watch_Suggestion_TalkLater: String { return self._s[736]! } + public var Checkout_ShippingOption_Title: String { return self._s[737]! } + public var Conversation_TitleRepliesEmpty: String { return self._s[738]! } + public var CreatePoll_TextHeader: String { return self._s[739]! } + public var VoiceOver_Chat_Message: String { return self._s[741]! } + public var InfoPlist_NSLocationWhenInUseUsageDescription: String { return self._s[742]! } + public var ContactInfo_Note: String { return self._s[744]! } + public var Channel_AdminLog_InfoPanelAlertText: String { return self._s[745]! } + public var Checkout_NewCard_CardholderNameTitle: String { return self._s[746]! } + public var AutoDownloadSettings_Photos: String { return self._s[747]! } + public var UserInfo_NotificationsDefaultDisabled: String { return self._s[748]! } public func Conversation_ForwardTooltip_Chat_One(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[748]!, self._r[748]!, [_0]) + return formatWithArgumentRanges(self._s[749]!, self._r[749]!, [_0]) } - public var Channel_Info_Subscribers: String { return self._s[749]! } - public var ChatList_DeleteForCurrentUser: String { return self._s[750]! } - public var ChatListFolderSettings_FoldersSection: String { return self._s[751]! } - public var VoiceOver_ChatList_OutgoingMessage: String { return self._s[752]! } + public var Channel_Info_Subscribers: String { return self._s[750]! } + public var ChatList_DeleteForCurrentUser: String { return self._s[751]! } + public var ChatListFolderSettings_FoldersSection: String { return self._s[752]! } + public var VoiceOver_ChatList_OutgoingMessage: String { return self._s[753]! } public func Time_PreciseDate_m9(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[756]!, self._r[756]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[757]!, self._r[757]!, [_1, _2, _3]) } - public var AutoNightTheme_System: String { return self._s[757]! } - public var Call_StatusWaiting: String { return self._s[758]! } - public var GroupInfo_GroupHistoryHidden: String { return self._s[759]! } + public var AutoNightTheme_System: String { return self._s[758]! } + public var Call_StatusWaiting: String { return self._s[759]! } + public var GroupInfo_GroupHistoryHidden: String { return self._s[760]! } public func CHAT_MESSAGE_INVOICE(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[760]!, self._r[760]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[761]!, self._r[761]!, [_1, _2, _3]) } - public var Conversation_ContextMenuCopy: String { return self._s[762]! } - public var Notifications_MessageNotificationsPreview: String { return self._s[763]! } - public var Notifications_InAppNotificationsVibrate: String { return self._s[764]! } + public var Conversation_ContextMenuCopy: String { return self._s[763]! } + public var Notifications_MessageNotificationsPreview: String { return self._s[764]! } + public var Notifications_InAppNotificationsVibrate: String { return self._s[765]! } public func Conversation_RestrictedTextTimed(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[765]!, self._r[765]!, [_0]) + return formatWithArgumentRanges(self._s[766]!, self._r[766]!, [_0]) } - public var Group_Status: String { return self._s[767]! } - public var Group_Setup_HistoryVisible: String { return self._s[768]! } - public var Conversation_DiscardVoiceMessageAction: String { return self._s[769]! } - public var Paint_Edit: String { return self._s[770]! } - public var PeerInfo_AutoremoveMessages: String { return self._s[771]! } + public var Group_Status: String { return self._s[768]! } + public var Group_Setup_HistoryVisible: String { return self._s[769]! } + public var Conversation_DiscardVoiceMessageAction: String { return self._s[770]! } + public var Paint_Edit: String { return self._s[771]! } + public var PeerInfo_AutoremoveMessages: String { return self._s[772]! } public func ChatImport_SelectionConfirmationGroupWithoutTitle(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[773]!, self._r[773]!, [_0]) + return formatWithArgumentRanges(self._s[774]!, self._r[774]!, [_0]) } - public var Channel_EditAdmin_CannotEdit: String { return self._s[774]! } - public var Username_InvalidTooShort: String { return self._s[775]! } - public var ClearCache_StorageOtherApps: String { return self._s[776]! } - public var Conversation_ViewMessage: String { return self._s[777]! } - public var GroupInfo_PublicLinkAdd: String { return self._s[779]! } + public var Channel_EditAdmin_CannotEdit: String { return self._s[775]! } + public var Username_InvalidTooShort: String { return self._s[776]! } + public var ClearCache_StorageOtherApps: String { return self._s[777]! } + public var Conversation_ViewMessage: String { return self._s[778]! } + public var GroupInfo_PublicLinkAdd: String { return self._s[780]! } public func Notification_RemovedGroupPhoto(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[780]!, self._r[780]!, [_0]) + return formatWithArgumentRanges(self._s[781]!, self._r[781]!, [_0]) } - public var CallSettings_Title: String { return self._s[781]! } + public var CallSettings_Title: String { return self._s[782]! } public func Conversation_BotInteractiveUrlAlert(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[782]!, self._r[782]!, [_0]) + return formatWithArgumentRanges(self._s[783]!, self._r[783]!, [_0]) } public func VoiceOver_Chat_ContactFrom(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[785]!, self._r[785]!, [_0]) + return formatWithArgumentRanges(self._s[786]!, self._r[786]!, [_0]) } - public var PUSH_SENDER_YOU: String { return self._s[788]! } - public var ConvertToChannel_CommentsAlert_Title: String { return self._s[789]! } - public var Profile_ShareContactButton: String { return self._s[790]! } - public var GroupInfo_Permissions_SectionTitle: String { return self._s[791]! } - public var Map_ShareLiveLocation: String { return self._s[792]! } - public var ChatListFolder_TitleEdit: String { return self._s[793]! } - public var Passport_Address_Address: String { return self._s[795]! } - public var LastSeen_JustNow: String { return self._s[797]! } + public var PUSH_SENDER_YOU: String { return self._s[789]! } + public var ConvertToChannel_CommentsAlert_Title: String { return self._s[790]! } + public var Profile_ShareContactButton: String { return self._s[791]! } + public var GroupInfo_Permissions_SectionTitle: String { return self._s[792]! } + public var Map_ShareLiveLocation: String { return self._s[793]! } + public var ChatListFolder_TitleEdit: String { return self._s[794]! } + public var Passport_Address_Address: String { return self._s[796]! } + public var LastSeen_JustNow: String { return self._s[798]! } public func SecretImage_NotViewedYet(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[798]!, self._r[798]!, [_0]) + return formatWithArgumentRanges(self._s[799]!, self._r[799]!, [_0]) } - public var ContactInfo_PhoneLabelOther: String { return self._s[799]! } - public var PasscodeSettings_DoNotMatch: String { return self._s[800]! } - public var Weekday_Today: String { return self._s[803]! } - public var DialogList_Title: String { return self._s[804]! } - public var SettingsSearch_Synonyms_Notifications_MessageNotificationsPreview: String { return self._s[805]! } - public var Cache_ClearCache: String { return self._s[806]! } - public var CreatePoll_ExplanationInfo: String { return self._s[807]! } - public var Notifications_ResetAllNotificationsHelp: String { return self._s[809]! } - public var Stats_MessageTitle: String { return self._s[810]! } - public var Passport_Address_Street: String { return self._s[812]! } + public var ContactInfo_PhoneLabelOther: String { return self._s[800]! } + public var PasscodeSettings_DoNotMatch: String { return self._s[801]! } + public var Weekday_Today: String { return self._s[804]! } + public var DialogList_Title: String { return self._s[805]! } + public var SettingsSearch_Synonyms_Notifications_MessageNotificationsPreview: String { return self._s[806]! } + public var Cache_ClearCache: String { return self._s[807]! } + public var CreatePoll_ExplanationInfo: String { return self._s[808]! } + public var Notifications_ResetAllNotificationsHelp: String { return self._s[810]! } + public var Stats_MessageTitle: String { return self._s[811]! } + public var Passport_Address_Street: String { return self._s[813]! } public func Channel_AdminLog_MessageRemovedGroupUsername(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[813]!, self._r[813]!, [_0]) + return formatWithArgumentRanges(self._s[814]!, self._r[814]!, [_0]) } - public var Channel_AdminLog_ChannelEmptyText: String { return self._s[814]! } + public var Channel_AdminLog_ChannelEmptyText: String { return self._s[815]! } public func Login_PhoneGenericEmailSubject(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[815]!, self._r[815]!, [_0]) + return formatWithArgumentRanges(self._s[816]!, self._r[816]!, [_0]) } - public var TwoStepAuth_Email: String { return self._s[817]! } - public var Conversation_SecretLinkPreviewAlert: String { return self._s[818]! } - public var PrivacySettings_PasscodeOn: String { return self._s[819]! } - public var Camera_SquareMode: String { return self._s[821]! } - public var SocksProxySetup_Port: String { return self._s[822]! } - public var Watch_LastSeen_JustNow: String { return self._s[824]! } + public var TwoStepAuth_Email: String { return self._s[818]! } + public var Conversation_SecretLinkPreviewAlert: String { return self._s[819]! } + public var PrivacySettings_PasscodeOn: String { return self._s[820]! } + public var Camera_SquareMode: String { return self._s[822]! } + public var SocksProxySetup_Port: String { return self._s[823]! } + public var Watch_LastSeen_JustNow: String { return self._s[825]! } public func Location_ProximityAlertSetText(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[825]!, self._r[825]!, [_1, _2]) - } - public func PUSH_MESSAGE_GAME(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[826]!, self._r[826]!, [_1, _2]) } + public func PUSH_MESSAGE_GAME(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[827]!, self._r[827]!, [_1, _2]) + } public func Watch_LastSeen_YesterdayAt(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[827]!, self._r[827]!, [_0]) + return formatWithArgumentRanges(self._s[828]!, self._r[828]!, [_0]) } - public var EditTheme_Expand_Preview_OutgoingText: String { return self._s[828]! } - public var Channel_AdminLogFilter_EventsTitle: String { return self._s[829]! } - public var Watch_Suggestion_HoldOn: String { return self._s[832]! } + public var EditTheme_Expand_Preview_OutgoingText: String { return self._s[829]! } + public var Channel_AdminLogFilter_EventsTitle: String { return self._s[830]! } + public var Watch_Suggestion_HoldOn: String { return self._s[833]! } public func PUSH_CHANNEL_MESSAGE_GEOLIVE(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[833]!, self._r[833]!, [_1]) + return formatWithArgumentRanges(self._s[834]!, self._r[834]!, [_1]) } - public var CallSettings_TabIcon: String { return self._s[834]! } - public var ScheduledMessages_SendNow: String { return self._s[835]! } - public var Stats_GroupTopWeekdaysTitle: String { return self._s[836]! } - public var UserInfo_PhoneCall: String { return self._s[837]! } - public var Month_GenMarch: String { return self._s[838]! } - public var Camera_Discard: String { return self._s[839]! } - public var InfoPlist_NSFaceIDUsageDescription: String { return self._s[840]! } - public var Passport_RequestedInformation: String { return self._s[841]! } + public var CallSettings_TabIcon: String { return self._s[835]! } + public var ScheduledMessages_SendNow: String { return self._s[836]! } + public var Stats_GroupTopWeekdaysTitle: String { return self._s[837]! } + public var UserInfo_PhoneCall: String { return self._s[838]! } + public var Month_GenMarch: String { return self._s[839]! } + public var Camera_Discard: String { return self._s[840]! } + public var InfoPlist_NSFaceIDUsageDescription: String { return self._s[841]! } + public var Passport_RequestedInformation: String { return self._s[842]! } public func Notification_ProximityYouReached(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[843]!, self._r[843]!, [_1, _2]) + return formatWithArgumentRanges(self._s[844]!, self._r[844]!, [_1, _2]) } - public var Passport_Language_ro: String { return self._s[844]! } + public var Passport_Language_ro: String { return self._s[845]! } public func PUSH_CHAT_MESSAGE_DOC(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[845]!, self._r[845]!, [_1, _2]) + return formatWithArgumentRanges(self._s[846]!, self._r[846]!, [_1, _2]) } - public var AutoDownloadSettings_ResetHelp: String { return self._s[846]! } - public var Passport_Identity_DocumentDetails: String { return self._s[848]! } - public var Passport_Address_ScansHelp: String { return self._s[849]! } - public var Location_LiveLocationRequired_Title: String { return self._s[850]! } - public var ClearCache_StorageCache: String { return self._s[851]! } - public var Theme_Colors_ColorWallpaperWarningProceed: String { return self._s[852]! } - public var Conversation_RestrictedText: String { return self._s[853]! } - public var Notifications_MessageNotifications: String { return self._s[855]! } - public var Passport_Scans: String { return self._s[856]! } - public var TwoStepAuth_SetupHintTitle: String { return self._s[858]! } - public var LogoutOptions_ContactSupportTitle: String { return self._s[859]! } - public var Passport_Identity_SelfieHelp: String { return self._s[860]! } - public var Permissions_NotificationsUnreachableText_v0: String { return self._s[861]! } - public var Privacy_PaymentsClear_PaymentInfo: String { return self._s[862]! } - public var ShareMenu_CopyShareLinkGame: String { return self._s[863]! } - public var PeerInfo_ButtonSearch: String { return self._s[864]! } + public var AutoDownloadSettings_ResetHelp: String { return self._s[847]! } + public var Passport_Identity_DocumentDetails: String { return self._s[849]! } + public var Passport_Address_ScansHelp: String { return self._s[850]! } + public var Location_LiveLocationRequired_Title: String { return self._s[851]! } + public var ClearCache_StorageCache: String { return self._s[852]! } + public var Theme_Colors_ColorWallpaperWarningProceed: String { return self._s[853]! } + public var Conversation_RestrictedText: String { return self._s[854]! } + public var Notifications_MessageNotifications: String { return self._s[856]! } + public var Passport_Scans: String { return self._s[857]! } + public var TwoStepAuth_SetupHintTitle: String { return self._s[859]! } + public var LogoutOptions_ContactSupportTitle: String { return self._s[860]! } + public var Passport_Identity_SelfieHelp: String { return self._s[861]! } + public var Permissions_NotificationsUnreachableText_v0: String { return self._s[862]! } + public var Privacy_PaymentsClear_PaymentInfo: String { return self._s[863]! } + public var ShareMenu_CopyShareLinkGame: String { return self._s[864]! } + public var PeerInfo_ButtonSearch: String { return self._s[865]! } public func Notification_ProximityReachedYou(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[867]!, self._r[867]!, [_1, _2]) + return formatWithArgumentRanges(self._s[868]!, self._r[868]!, [_1, _2]) } - public var SettingsSearch_Synonyms_Privacy_Data_ClearPaymentsInfo: String { return self._s[868]! } - public var Passport_FieldIdentityTranslationHelp: String { return self._s[870]! } - public var Conversation_InputTextSilentBroadcastPlaceholder: String { return self._s[871]! } - public var Month_GenSeptember: String { return self._s[872]! } + public var SettingsSearch_Synonyms_Privacy_Data_ClearPaymentsInfo: String { return self._s[869]! } + public var Passport_FieldIdentityTranslationHelp: String { return self._s[871]! } + public var Conversation_InputTextSilentBroadcastPlaceholder: String { return self._s[872]! } + public var Month_GenSeptember: String { return self._s[873]! } public func Call_GroupFormat(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[874]!, self._r[874]!, [_1, _2]) + return formatWithArgumentRanges(self._s[875]!, self._r[875]!, [_1, _2]) } - public var StickerPacksSettings_ArchivedPacks: String { return self._s[875]! } + public var StickerPacksSettings_ArchivedPacks: String { return self._s[876]! } public func Notification_VoiceChatInvitation(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[877]!, self._r[877]!, [_1, _2]) + return formatWithArgumentRanges(self._s[878]!, self._r[878]!, [_1, _2]) } public func Channel_Username_LinkHint(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[878]!, self._r[878]!, [_0]) + return formatWithArgumentRanges(self._s[879]!, self._r[879]!, [_0]) } public func PUSH_PINNED_CONTACT(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[880]!, self._r[880]!, [_1, _2]) - } - public func PUSH_MESSAGE_VIDEOS(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[881]!, self._r[881]!, [_1, _2]) } - public var Calls_NotNow: String { return self._s[883]! } - public var Settings_ChatFolders: String { return self._s[887]! } - public var Login_PadPhoneHelpTitle: String { return self._s[888]! } - public var TwoStepAuth_EnterPasswordInvalid: String { return self._s[889]! } - public var Settings_ChatBackground: String { return self._s[890]! } - public func PUSH_CHAT_MESSAGE_CONTACT(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[892]!, self._r[892]!, [_1, _2]) + public func PUSH_MESSAGE_VIDEOS(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[882]!, self._r[882]!, [_1, _2]) } - public var ProxyServer_VoiceOver_Active: String { return self._s[893]! } - public var Call_StatusBusy: String { return self._s[894]! } - public var Conversation_MessageDeliveryFailed: String { return self._s[895]! } - public var Login_NetworkError: String { return self._s[897]! } - public var TwoStepAuth_SetupPasswordDescription: String { return self._s[898]! } - public var Privacy_Calls_Integration: String { return self._s[899]! } - public var DialogList_SearchSectionMessages: String { return self._s[900]! } - public var AutoDownloadSettings_VideosTitle: String { return self._s[901]! } - public var Preview_DeletePhoto: String { return self._s[902]! } - public var PrivacySettings_PhoneNumber: String { return self._s[904]! } - public var Forward_ErrorDisabledForChat: String { return self._s[905]! } - public var Watch_Compose_CurrentLocation: String { return self._s[906]! } - public var Settings_CallSettings: String { return self._s[907]! } - public var AutoDownloadSettings_TypePrivateChats: String { return self._s[908]! } - public var ChatList_Context_MarkAllAsRead: String { return self._s[909]! } - public var ChatSettings_AutoPlayAnimations: String { return self._s[910]! } - public var SaveIncomingPhotosSettings_Title: String { return self._s[911]! } - public var OwnershipTransfer_SecurityRequirements: String { return self._s[912]! } - public var Map_LiveLocationFor1Hour: String { return self._s[913]! } + public var Calls_NotNow: String { return self._s[884]! } + public var Settings_ChatFolders: String { return self._s[888]! } + public var Login_PadPhoneHelpTitle: String { return self._s[889]! } + public var TwoStepAuth_EnterPasswordInvalid: String { return self._s[890]! } + public var Settings_ChatBackground: String { return self._s[891]! } + public func PUSH_CHAT_MESSAGE_CONTACT(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[893]!, self._r[893]!, [_1, _2]) + } + public var ProxyServer_VoiceOver_Active: String { return self._s[894]! } + public var Call_StatusBusy: String { return self._s[895]! } + public var Conversation_MessageDeliveryFailed: String { return self._s[896]! } + public var Login_NetworkError: String { return self._s[898]! } + public var TwoStepAuth_SetupPasswordDescription: String { return self._s[899]! } + public var Privacy_Calls_Integration: String { return self._s[900]! } + public var DialogList_SearchSectionMessages: String { return self._s[901]! } + public var AutoDownloadSettings_VideosTitle: String { return self._s[902]! } + public var Preview_DeletePhoto: String { return self._s[903]! } + public var PrivacySettings_PhoneNumber: String { return self._s[905]! } + public var Forward_ErrorDisabledForChat: String { return self._s[906]! } + public var Watch_Compose_CurrentLocation: String { return self._s[907]! } + public var Settings_CallSettings: String { return self._s[908]! } + public var AutoDownloadSettings_TypePrivateChats: String { return self._s[909]! } + public var ChatList_Context_MarkAllAsRead: String { return self._s[910]! } + public var ChatSettings_AutoPlayAnimations: String { return self._s[911]! } + public var SaveIncomingPhotosSettings_Title: String { return self._s[912]! } + public var OwnershipTransfer_SecurityRequirements: String { return self._s[913]! } + public var Map_LiveLocationFor1Hour: String { return self._s[914]! } public func Privacy_GroupsAndChannels_InviteToGroupError(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[914]!, self._r[914]!, [_0, _1]) + return formatWithArgumentRanges(self._s[915]!, self._r[915]!, [_0, _1]) } public func Notification_PinnedLiveLocationMessage(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[915]!, self._r[915]!, [_0]) + return formatWithArgumentRanges(self._s[916]!, self._r[916]!, [_0]) } - public var Conversation_UnvotePoll: String { return self._s[916]! } - public var TwoStepAuth_EnterEmailCode: String { return self._s[917]! } + public var Conversation_UnvotePoll: String { return self._s[917]! } + public var TwoStepAuth_EnterEmailCode: String { return self._s[918]! } public func LOCAL_MESSAGE_FWDS(_ _1: String, _ _2: Int) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[918]!, self._r[918]!, [_1, "\(_2)"]) + return formatWithArgumentRanges(self._s[919]!, self._r[919]!, [_1, "\(_2)"]) } - public var Passport_InfoTitle: String { return self._s[919]! } + public var Passport_InfoTitle: String { return self._s[920]! } public func Conversation_Bytes(_ _0: Int) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[920]!, self._r[920]!, ["\(_0)"]) + return formatWithArgumentRanges(self._s[921]!, self._r[921]!, ["\(_0)"]) } - public var AccentColor_Title: String { return self._s[921]! } + public var AccentColor_Title: String { return self._s[922]! } public func PUSH_MESSAGE_INVOICE(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[922]!, self._r[922]!, [_1, _2]) + return formatWithArgumentRanges(self._s[923]!, self._r[923]!, [_1, _2]) } public func Notification_JoinedChannel(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[925]!, self._r[925]!, [_0]) + return formatWithArgumentRanges(self._s[926]!, self._r[926]!, [_0]) } - public var AutoDownloadSettings_DataUsageCustom: String { return self._s[926]! } - public var Conversation_ShareBotLocationConfirmation: String { return self._s[927]! } - public var PrivacyPhoneNumberSettings_WhoCanSeeMyPhoneNumber: String { return self._s[928]! } - public var VoiceOver_Editing_ClearText: String { return self._s[929]! } - public var Conversation_Unarchive: String { return self._s[930]! } - public var Notification_CallOutgoing: String { return self._s[931]! } - public var Channel_Setup_PublicNoLink: String { return self._s[932]! } - public var Passport_Identity_GenderPlaceholder: String { return self._s[933]! } - public var Message_Animation: String { return self._s[934]! } - public var SettingsSearch_Synonyms_Appearance_Animations: String { return self._s[935]! } - public var ChatSettings_ConnectionType_Title: String { return self._s[936]! } + public var AutoDownloadSettings_DataUsageCustom: String { return self._s[927]! } + public var Conversation_ShareBotLocationConfirmation: String { return self._s[928]! } + public var PrivacyPhoneNumberSettings_WhoCanSeeMyPhoneNumber: String { return self._s[929]! } + public var VoiceOver_Editing_ClearText: String { return self._s[930]! } + public var Conversation_Unarchive: String { return self._s[931]! } + public var Notification_CallOutgoing: String { return self._s[932]! } + public var Channel_Setup_PublicNoLink: String { return self._s[933]! } + public var Passport_Identity_GenderPlaceholder: String { return self._s[934]! } + public var Message_Animation: String { return self._s[935]! } + public var SettingsSearch_Synonyms_Appearance_Animations: String { return self._s[936]! } + public var ChatSettings_ConnectionType_Title: String { return self._s[937]! } public func Watch_Time_ShortFullAt(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[937]!, self._r[937]!, [_1, _2]) + return formatWithArgumentRanges(self._s[938]!, self._r[938]!, [_1, _2]) } - public var Notification_CallBack: String { return self._s[939]! } - public var Appearance_Title: String { return self._s[941]! } - public var NotificationsSound_Glass: String { return self._s[943]! } - public var AutoDownloadSettings_CellularTitle: String { return self._s[945]! } - public var Notifications_PermissionsSuppressWarningTitle: String { return self._s[947]! } - public var ChatSearch_SearchPlaceholder: String { return self._s[948]! } - public var Passport_Identity_AddPassport: String { return self._s[949]! } - public var GroupPermission_NoAddMembers: String { return self._s[951]! } - public var ContactList_Context_SendMessage: String { return self._s[952]! } - public var PhotoEditor_GrainTool: String { return self._s[953]! } - public var Settings_CopyPhoneNumber: String { return self._s[954]! } - public var Passport_Address_City: String { return self._s[955]! } - public var ChannelRemoved_RemoveInfo: String { return self._s[956]! } - public var SocksProxySetup_Password: String { return self._s[958]! } - public var Settings_Passport: String { return self._s[959]! } - public var Channel_MessagePhotoUpdated: String { return self._s[961]! } - public var Stats_LanguagesTitle: String { return self._s[962]! } - public var ChatList_PeerTypeGroup: String { return self._s[963]! } - public var Privacy_Calls_P2PHelp: String { return self._s[964]! } - public var VoiceOver_Chat_PollNoVotes: String { return self._s[965]! } - public var Embed_PlayingInPIP: String { return self._s[966]! } - public var BlockedUsers_BlockUser: String { return self._s[969]! } - public var Login_CancelPhoneVerificationContinue: String { return self._s[970]! } + public var Notification_CallBack: String { return self._s[940]! } + public var Appearance_Title: String { return self._s[942]! } + public var NotificationsSound_Glass: String { return self._s[944]! } + public var AutoDownloadSettings_CellularTitle: String { return self._s[946]! } + public var Notifications_PermissionsSuppressWarningTitle: String { return self._s[948]! } + public var ChatSearch_SearchPlaceholder: String { return self._s[949]! } + public var Passport_Identity_AddPassport: String { return self._s[950]! } + public var GroupPermission_NoAddMembers: String { return self._s[952]! } + public var ContactList_Context_SendMessage: String { return self._s[953]! } + public var PhotoEditor_GrainTool: String { return self._s[954]! } + public var Settings_CopyPhoneNumber: String { return self._s[955]! } + public var Passport_Address_City: String { return self._s[956]! } + public var ChannelRemoved_RemoveInfo: String { return self._s[957]! } + public var SocksProxySetup_Password: String { return self._s[959]! } + public var Settings_Passport: String { return self._s[960]! } + public var Channel_MessagePhotoUpdated: String { return self._s[962]! } + public var Stats_LanguagesTitle: String { return self._s[963]! } + public var ChatList_PeerTypeGroup: String { return self._s[964]! } + public var Privacy_Calls_P2PHelp: String { return self._s[965]! } + public var VoiceOver_Chat_PollNoVotes: String { return self._s[966]! } + public var Embed_PlayingInPIP: String { return self._s[967]! } + public var BlockedUsers_BlockUser: String { return self._s[970]! } + public var Login_CancelPhoneVerificationContinue: String { return self._s[971]! } public func PUSH_CHANNEL_MESSAGE(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[971]!, self._r[971]!, [_1]) + return formatWithArgumentRanges(self._s[972]!, self._r[972]!, [_1]) } - public var AuthSessions_LoggedIn: String { return self._s[972]! } - public var Channel_AdminLog_MessagePreviousCaption: String { return self._s[973]! } - public var Activity_UploadingDocument: String { return self._s[974]! } - public var PeopleNearby_NoMembers: String { return self._s[975]! } - public var SettingsSearch_Synonyms_Stickers_Masks: String { return self._s[978]! } - public var ChatSettings_AutoPlayVideos: String { return self._s[979]! } - public var VoiceOver_Chat_OpenLinkHint: String { return self._s[980]! } - public var Settings_ViewVideo: String { return self._s[981]! } - public var Map_ShowPlaces: String { return self._s[983]! } - public var Passport_Phone_UseTelegramNumberHelp: String { return self._s[984]! } - public var InviteLink_Create_Title: String { return self._s[985]! } - public var Notification_CreatedGroup: String { return self._s[986]! } - public var SettingsSearch_Synonyms_Appearance_ChatBackground_Custom: String { return self._s[987]! } + public var AuthSessions_LoggedIn: String { return self._s[973]! } + public var Channel_AdminLog_MessagePreviousCaption: String { return self._s[974]! } + public var Activity_UploadingDocument: String { return self._s[975]! } + public var PeopleNearby_NoMembers: String { return self._s[976]! } + public var SettingsSearch_Synonyms_Stickers_Masks: String { return self._s[979]! } + public var ChatSettings_AutoPlayVideos: String { return self._s[980]! } + public var VoiceOver_Chat_OpenLinkHint: String { return self._s[981]! } + public var Settings_ViewVideo: String { return self._s[982]! } + public var Map_ShowPlaces: String { return self._s[984]! } + public var Passport_Phone_UseTelegramNumberHelp: String { return self._s[985]! } + public var InviteLink_Create_Title: String { return self._s[986]! } + public var Notification_CreatedGroup: String { return self._s[987]! } + public var SettingsSearch_Synonyms_Appearance_ChatBackground_Custom: String { return self._s[988]! } public func PrivacySettings_LastSeenContactsPlus(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[988]!, self._r[988]!, [_0]) + return formatWithArgumentRanges(self._s[989]!, self._r[989]!, [_0]) } - public var Conversation_StatusLeftGroup: String { return self._s[989]! } - public var Theme_Colors_Messages: String { return self._s[990]! } - public var AuthSessions_EmptyText: String { return self._s[991]! } + public var Conversation_StatusLeftGroup: String { return self._s[990]! } + public var Theme_Colors_Messages: String { return self._s[991]! } + public var AuthSessions_EmptyText: String { return self._s[992]! } public func PUSH_MESSAGE_CONTACT(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[992]!, self._r[992]!, [_1]) + return formatWithArgumentRanges(self._s[993]!, self._r[993]!, [_1]) } - public var UserInfo_StartSecretChat: String { return self._s[993]! } - public var ChatListFolderSettings_EditFoldersInfo: String { return self._s[994]! } - public var Channel_Edit_PrivatePublicLinkAlert: String { return self._s[995]! } - public var Conversation_ReportSpamGroupConfirmation: String { return self._s[996]! } - public var Conversation_PrivateMessageLinkCopied: String { return self._s[998]! } - public var PeerInfo_PaneFiles: String { return self._s[999]! } - public var PrivacySettings_AutoArchive: String { return self._s[1000]! } - public var Camera_VideoMode: String { return self._s[1001]! } - public var NotificationsSound_Alert: String { return self._s[1002]! } - public var Privacy_Forwards_NeverAllow_Title: String { return self._s[1003]! } - public var Appearance_AutoNightTheme: String { return self._s[1004]! } - public var Passport_Language_he: String { return self._s[1005]! } - public var Passport_InvalidPasswordError: String { return self._s[1006]! } - public var Conversation_PinMessageAlert_OnlyPin: String { return self._s[1007]! } - public var UserInfo_InviteBotToGroup: String { return self._s[1008]! } - public var Conversation_SilentBroadcastTooltipOff: String { return self._s[1009]! } - public var Common_TakePhoto: String { return self._s[1010]! } + public var UserInfo_StartSecretChat: String { return self._s[994]! } + public var ChatListFolderSettings_EditFoldersInfo: String { return self._s[995]! } + public var Channel_Edit_PrivatePublicLinkAlert: String { return self._s[996]! } + public var Conversation_ReportSpamGroupConfirmation: String { return self._s[997]! } + public var Conversation_PrivateMessageLinkCopied: String { return self._s[999]! } + public var PeerInfo_PaneFiles: String { return self._s[1000]! } + public var PrivacySettings_AutoArchive: String { return self._s[1001]! } + public var Camera_VideoMode: String { return self._s[1002]! } + public var NotificationsSound_Alert: String { return self._s[1003]! } + public var Privacy_Forwards_NeverAllow_Title: String { return self._s[1004]! } + public var Appearance_AutoNightTheme: String { return self._s[1005]! } + public var Passport_Language_he: String { return self._s[1006]! } + public var Passport_InvalidPasswordError: String { return self._s[1007]! } + public var Conversation_PinMessageAlert_OnlyPin: String { return self._s[1008]! } + public var UserInfo_InviteBotToGroup: String { return self._s[1009]! } + public var Conversation_SilentBroadcastTooltipOff: String { return self._s[1010]! } + public var Common_TakePhoto: String { return self._s[1011]! } public func Channel_AdminLog_RevokedInviteLink(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1011]!, self._r[1011]!, [_1, _2]) + return formatWithArgumentRanges(self._s[1012]!, self._r[1012]!, [_1, _2]) } - public var Passport_Email_UseTelegramEmailHelp: String { return self._s[1012]! } - public var ChatList_Context_JoinChannel: String { return self._s[1013]! } - public var MediaPlayer_UnknownArtist: String { return self._s[1014]! } - public var KeyCommand_JumpToPreviousUnreadChat: String { return self._s[1017]! } - public var Channel_OwnershipTransfer_Title: String { return self._s[1018]! } - public var EditTheme_UploadEditedTheme: String { return self._s[1019]! } - public var Settings_SetProfilePhotoOrVideo: String { return self._s[1021]! } - public var Passport_FieldOneOf_Delimeter: String { return self._s[1022]! } - public var MessagePoll_ViewResults: String { return self._s[1023]! } - public var Group_Setup_TypePrivateHelp: String { return self._s[1024]! } - public var Passport_Address_OneOfTypeUtilityBill: String { return self._s[1025]! } - public var ChatList_Search_ShowLess: String { return self._s[1026]! } - public var InviteLink_Create_UsersLimitNoLimit: String { return self._s[1027]! } - public var UserInfo_ShareBot: String { return self._s[1028]! } - public var Privacy_Calls_P2P: String { return self._s[1030]! } - public var WebBrowser_InAppSafari: String { return self._s[1031]! } - public var SharedMedia_EmptyFilesText: String { return self._s[1034]! } - public var Channel_AdminLog_MessagePreviousMessage: String { return self._s[1035]! } - public var GroupInfo_SetSound: String { return self._s[1036]! } - public var Permissions_PeopleNearbyAllowInSettings_v0: String { return self._s[1037]! } + public var Passport_Email_UseTelegramEmailHelp: String { return self._s[1013]! } + public var ChatList_Context_JoinChannel: String { return self._s[1014]! } + public var MediaPlayer_UnknownArtist: String { return self._s[1015]! } + public var KeyCommand_JumpToPreviousUnreadChat: String { return self._s[1018]! } + public var Channel_OwnershipTransfer_Title: String { return self._s[1019]! } + public var EditTheme_UploadEditedTheme: String { return self._s[1020]! } + public var Settings_SetProfilePhotoOrVideo: String { return self._s[1022]! } + public var Passport_FieldOneOf_Delimeter: String { return self._s[1023]! } + public var MessagePoll_ViewResults: String { return self._s[1024]! } + public var Group_Setup_TypePrivateHelp: String { return self._s[1025]! } + public var Passport_Address_OneOfTypeUtilityBill: String { return self._s[1026]! } + public var ChatList_Search_ShowLess: String { return self._s[1027]! } + public var InviteLink_Create_UsersLimitNoLimit: String { return self._s[1028]! } + public var UserInfo_ShareBot: String { return self._s[1029]! } + public var Privacy_Calls_P2P: String { return self._s[1031]! } + public var WebBrowser_InAppSafari: String { return self._s[1032]! } + public var SharedMedia_EmptyFilesText: String { return self._s[1035]! } + public var Channel_AdminLog_MessagePreviousMessage: String { return self._s[1036]! } + public var GroupInfo_SetSound: String { return self._s[1037]! } + public var Permissions_PeopleNearbyAllowInSettings_v0: String { return self._s[1038]! } public func Conversation_AutoremoveRemainingTime(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1038]!, self._r[1038]!, [_0]) + return formatWithArgumentRanges(self._s[1039]!, self._r[1039]!, [_0]) } - public var Channel_AdminLog_MessagePreviousDescription: String { return self._s[1039]! } - public var Channel_AdminLogFilter_EventsAll: String { return self._s[1040]! } - public var CallSettings_UseLessData: String { return self._s[1041]! } - public var InfoPlist_NSCameraUsageDescription: String { return self._s[1042]! } - public var NotificationsSound_Chord: String { return self._s[1043]! } - public var PhotoEditor_CurvesTool: String { return self._s[1044]! } - public var Appearance_ThemePreview_Chat_2_Text: String { return self._s[1045]! } - public var Resolve_ErrorNotFound: String { return self._s[1046]! } - public var Activity_PlayingGame: String { return self._s[1047]! } - public var ChannelIntro_ChannelsTitle: String { return self._s[1050]! } + public var Channel_AdminLog_MessagePreviousDescription: String { return self._s[1040]! } + public var Channel_AdminLogFilter_EventsAll: String { return self._s[1041]! } + public var CallSettings_UseLessData: String { return self._s[1042]! } + public var InfoPlist_NSCameraUsageDescription: String { return self._s[1043]! } + public var NotificationsSound_Chord: String { return self._s[1044]! } + public var PhotoEditor_CurvesTool: String { return self._s[1045]! } + public var Appearance_ThemePreview_Chat_2_Text: String { return self._s[1046]! } + public var Resolve_ErrorNotFound: String { return self._s[1047]! } + public var Activity_PlayingGame: String { return self._s[1048]! } + public var ChannelIntro_ChannelsTitle: String { return self._s[1051]! } public func VoiceChat_InvitedPeerText(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1051]!, self._r[1051]!, [_0]) + return formatWithArgumentRanges(self._s[1052]!, self._r[1052]!, [_0]) } - public var StickerPacksSettings_AnimatedStickersInfo: String { return self._s[1052]! } + public var StickerPacksSettings_AnimatedStickersInfo: String { return self._s[1053]! } public func PUSH_CHANNEL_MESSAGE_GEO(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1053]!, self._r[1053]!, [_1]) + return formatWithArgumentRanges(self._s[1054]!, self._r[1054]!, [_1]) } - public var Conversation_ShareBotContactConfirmationTitle: String { return self._s[1054]! } - public var Notification_CallIncoming: String { return self._s[1055]! } - public var Stats_EnabledNotifications: String { return self._s[1056]! } - public var Notifications_PermissionsOpenSettings: String { return self._s[1057]! } - public var Checkout_ErrorProviderAccountTimeout: String { return self._s[1058]! } + public var Conversation_ShareBotContactConfirmationTitle: String { return self._s[1055]! } + public var Notification_CallIncoming: String { return self._s[1056]! } + public var Stats_EnabledNotifications: String { return self._s[1057]! } + public var Notifications_PermissionsOpenSettings: String { return self._s[1058]! } + public var Checkout_ErrorProviderAccountTimeout: String { return self._s[1059]! } public func Activity_RemindAboutChannel(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1059]!, self._r[1059]!, [_0]) + return formatWithArgumentRanges(self._s[1060]!, self._r[1060]!, [_0]) } - public var VoiceChat_StatusMutedYou: String { return self._s[1060]! } - public var VoiceOver_Chat_ReplyToYourMessage: String { return self._s[1061]! } - public var Channel_DiscussionGroup_MakeHistoryPublic: String { return self._s[1062]! } - public var StickerPacksSettings_Title: String { return self._s[1063]! } + public var VoiceChat_StatusMutedYou: String { return self._s[1061]! } + public var VoiceOver_Chat_ReplyToYourMessage: String { return self._s[1062]! } + public var Channel_DiscussionGroup_MakeHistoryPublic: String { return self._s[1063]! } + public var StickerPacksSettings_Title: String { return self._s[1064]! } public func Channel_AdminLog_MessageGroupPreHistoryVisible(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1064]!, self._r[1064]!, [_0]) + return formatWithArgumentRanges(self._s[1065]!, self._r[1065]!, [_0]) } - public var Watch_NoConnection: String { return self._s[1065]! } - public var EncryptionKey_Title: String { return self._s[1066]! } - public var Widget_AuthRequired: String { return self._s[1067]! } + public var Watch_NoConnection: String { return self._s[1066]! } + public var EncryptionKey_Title: String { return self._s[1067]! } + public var Widget_AuthRequired: String { return self._s[1068]! } public func PUSH_MESSAGE_ROUND(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1068]!, self._r[1068]!, [_1]) + return formatWithArgumentRanges(self._s[1069]!, self._r[1069]!, [_1]) } - public var Notifications_ExceptionsTitle: String { return self._s[1069]! } - public var EditTheme_Expand_TopInfo: String { return self._s[1070]! } + public var Notifications_ExceptionsTitle: String { return self._s[1070]! } + public var EditTheme_Expand_TopInfo: String { return self._s[1071]! } public func Contacts_AddPhoneNumber(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1071]!, self._r[1071]!, [_0]) + return formatWithArgumentRanges(self._s[1072]!, self._r[1072]!, [_0]) } - public var Channel_AdminLogFilter_EventsRestrictions: String { return self._s[1073]! } - public var Notifications_GroupNotificationsSound: String { return self._s[1074]! } - public var VoiceChat_SpeakPermissionAdmin: String { return self._s[1075]! } - public var Passport_Email_EnterOtherEmail: String { return self._s[1076]! } + public var Channel_AdminLogFilter_EventsRestrictions: String { return self._s[1074]! } + public var Notifications_GroupNotificationsSound: String { return self._s[1075]! } + public var VoiceChat_SpeakPermissionAdmin: String { return self._s[1076]! } + public var Passport_Email_EnterOtherEmail: String { return self._s[1077]! } public func VoiceChat_RemovePeerConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1079]!, self._r[1079]!, [_0]) + return formatWithArgumentRanges(self._s[1080]!, self._r[1080]!, [_0]) } - public var Conversation_AddToContacts: String { return self._s[1080]! } - public var AutoDownloadSettings_DataUsageMedium: String { return self._s[1081]! } - public var AuthSessions_LogOutApplications: String { return self._s[1083]! } - public var ChatList_Context_Unpin: String { return self._s[1084]! } - public var PeopleNearby_DiscoverDescription: String { return self._s[1085]! } - public var UserInfo_FakeBotWarning: String { return self._s[1086]! } - public var Notification_MessageLifetime1d: String { return self._s[1087]! } - public var PrivacyLastSeenSettings_NeverShareWith_Title: String { return self._s[1088]! } - public var ChatListFolder_CategoryChannels: String { return self._s[1089]! } - public var VoiceOver_Chat_SeenByRecipient: String { return self._s[1090]! } - public var Notifications_PermissionsAllow: String { return self._s[1091]! } - public var Undo_ScheduledMessagesCleared: String { return self._s[1092]! } - public var AutoDownloadSettings_PrivateChats: String { return self._s[1094]! } - public var ApplyLanguage_ChangeLanguageAction: String { return self._s[1095]! } - public var ChatImportActivity_ErrorInvalidChatType: String { return self._s[1096]! } + public var Conversation_AddToContacts: String { return self._s[1081]! } + public var AutoDownloadSettings_DataUsageMedium: String { return self._s[1082]! } + public var AuthSessions_LogOutApplications: String { return self._s[1084]! } + public var ChatList_Context_Unpin: String { return self._s[1085]! } + public var PeopleNearby_DiscoverDescription: String { return self._s[1086]! } + public var UserInfo_FakeBotWarning: String { return self._s[1087]! } + public var Notification_MessageLifetime1d: String { return self._s[1088]! } + public var PrivacyLastSeenSettings_NeverShareWith_Title: String { return self._s[1089]! } + public var ChatListFolder_CategoryChannels: String { return self._s[1090]! } + public var VoiceOver_Chat_SeenByRecipient: String { return self._s[1091]! } + public var Notifications_PermissionsAllow: String { return self._s[1092]! } + public var Undo_ScheduledMessagesCleared: String { return self._s[1093]! } + public var AutoDownloadSettings_PrivateChats: String { return self._s[1095]! } + public var ApplyLanguage_ChangeLanguageAction: String { return self._s[1096]! } + public var ChatImportActivity_ErrorInvalidChatType: String { return self._s[1097]! } public func PrivacySettings_LastSeenNobodyPlus(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1097]!, self._r[1097]!, [_0]) + return formatWithArgumentRanges(self._s[1098]!, self._r[1098]!, [_0]) } - public var Notifications_MessageNotificationsHelp: String { return self._s[1100]! } - public var WallpaperSearch_ColorPink: String { return self._s[1101]! } - public var ContactInfo_PhoneNumberHidden: String { return self._s[1102]! } - public var Passport_Identity_IssueDate: String { return self._s[1104]! } + public var Notifications_MessageNotificationsHelp: String { return self._s[1101]! } + public var WallpaperSearch_ColorPink: String { return self._s[1102]! } + public var ContactInfo_PhoneNumberHidden: String { return self._s[1103]! } + public var Passport_Identity_IssueDate: String { return self._s[1105]! } public func PUSH_CHAT_MESSAGE_GIF(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1105]!, self._r[1105]!, [_1, _2]) + return formatWithArgumentRanges(self._s[1106]!, self._r[1106]!, [_1, _2]) } - public var ChatList_DeleteForAllSubscribersConfirmationText: String { return self._s[1106]! } - public var Channel_Info_Description: String { return self._s[1107]! } - public var PrivacySettings_DeleteAccountIfAwayFor: String { return self._s[1108]! } - public var Weekday_ShortTuesday: String { return self._s[1109]! } - public var Common_Back: String { return self._s[1110]! } - public var Chat_PinnedMessagesHiddenTitle: String { return self._s[1112]! } - public var ChatListFolder_AddChats: String { return self._s[1113]! } - public var Common_Close: String { return self._s[1115]! } - public var Map_OpenIn: String { return self._s[1116]! } - public var Group_Setup_HistoryTitle: String { return self._s[1117]! } - public var SettingsSearch_Synonyms_Data_AutoDownloadUsingWifi: String { return self._s[1118]! } - public var Notification_MessageLifetime1h: String { return self._s[1119]! } + public var ChatList_DeleteForAllSubscribersConfirmationText: String { return self._s[1107]! } + public var Channel_Info_Description: String { return self._s[1108]! } + public var PrivacySettings_DeleteAccountIfAwayFor: String { return self._s[1109]! } + public var Weekday_ShortTuesday: String { return self._s[1110]! } + public var Common_Back: String { return self._s[1111]! } + public var Chat_PinnedMessagesHiddenTitle: String { return self._s[1113]! } + public var ChatListFolder_AddChats: String { return self._s[1114]! } + public var Common_Close: String { return self._s[1116]! } + public var Map_OpenIn: String { return self._s[1117]! } + public var Group_Setup_HistoryTitle: String { return self._s[1118]! } + public var SettingsSearch_Synonyms_Data_AutoDownloadUsingWifi: String { return self._s[1119]! } + public var Notification_MessageLifetime1h: String { return self._s[1120]! } public func CancelResetAccount_Success(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1120]!, self._r[1120]!, [_0]) + return formatWithArgumentRanges(self._s[1121]!, self._r[1121]!, [_0]) } - public var Watch_Contacts_NoResults: String { return self._s[1122]! } - public var TwoStepAuth_SetupResendEmailCode: String { return self._s[1123]! } - public var Checkout_Phone: String { return self._s[1124]! } - public var OwnershipTransfer_ComeBackLater: String { return self._s[1125]! } + public var Watch_Contacts_NoResults: String { return self._s[1123]! } + public var TwoStepAuth_SetupResendEmailCode: String { return self._s[1124]! } + public var Checkout_Phone: String { return self._s[1125]! } + public var OwnershipTransfer_ComeBackLater: String { return self._s[1126]! } public func Channel_CommentsGroup_HeaderGroupSet(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1126]!, self._r[1126]!, [_0]) + return formatWithArgumentRanges(self._s[1127]!, self._r[1127]!, [_0]) } public func DialogList_MultipleTypingSuffix(_ _0: Int) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1127]!, self._r[1127]!, ["\(_0)"]) + return formatWithArgumentRanges(self._s[1128]!, self._r[1128]!, ["\(_0)"]) } - public var Conversation_AudioRateTooltipSpeedUp: String { return self._s[1128]! } - public var ChatAdmins_Title: String { return self._s[1129]! } - public var Appearance_ThemePreview_Chat_7_Text: String { return self._s[1130]! } + public var Conversation_AudioRateTooltipSpeedUp: String { return self._s[1129]! } + public var ChatAdmins_Title: String { return self._s[1130]! } + public var Appearance_ThemePreview_Chat_7_Text: String { return self._s[1131]! } public func PUSH_CHANNEL_MESSAGE_POLL(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1131]!, self._r[1131]!, [_1]) + return formatWithArgumentRanges(self._s[1132]!, self._r[1132]!, [_1]) } - public var Common_Done: String { return self._s[1132]! } - public var ChatList_HeaderImportIntoAnExistingGroup: String { return self._s[1133]! } - public var Appearance_ThemeCarouselNight: String { return self._s[1136]! } + public var Common_Done: String { return self._s[1133]! } + public var ChatList_HeaderImportIntoAnExistingGroup: String { return self._s[1134]! } + public var Appearance_ThemeCarouselNight: String { return self._s[1137]! } public func PUSH_PINNED_VIDEO(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1138]!, self._r[1138]!, [_1]) + return formatWithArgumentRanges(self._s[1139]!, self._r[1139]!, [_1]) } - public var InviteLink_Expired: String { return self._s[1140]! } - public var Preview_OpenInInstagram: String { return self._s[1141]! } - public var VoiceChat_StartRecordingStop: String { return self._s[1145]! } - public var Wallpaper_SetColor: String { return self._s[1146]! } - public var VoiceOver_Media_PlaybackRate: String { return self._s[1147]! } - public var ChatSettings_Groups: String { return self._s[1148]! } + public var InviteLink_Expired: String { return self._s[1141]! } + public var Preview_OpenInInstagram: String { return self._s[1142]! } + public var VoiceChat_StartRecordingStop: String { return self._s[1146]! } + public var Wallpaper_SetColor: String { return self._s[1147]! } + public var VoiceOver_Media_PlaybackRate: String { return self._s[1148]! } + public var ChatSettings_Groups: String { return self._s[1149]! } public func VoiceOver_Chat_VoiceMessageFrom(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1149]!, self._r[1149]!, [_0]) + return formatWithArgumentRanges(self._s[1150]!, self._r[1150]!, [_0]) } - public var Contacts_SortedByName: String { return self._s[1150]! } - public var SettingsSearch_Synonyms_Notifications_ContactJoined: String { return self._s[1151]! } - public var Channel_Management_LabelCreator: String { return self._s[1152]! } - public var Contacts_PermissionsSuppressWarningTitle: String { return self._s[1153]! } + public var Contacts_SortedByName: String { return self._s[1151]! } + public var SettingsSearch_Synonyms_Notifications_ContactJoined: String { return self._s[1152]! } + public var Channel_Management_LabelCreator: String { return self._s[1153]! } + public var Contacts_PermissionsSuppressWarningTitle: String { return self._s[1154]! } public func PrivacySettings_LastSeenContactsMinusPlus(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1154]!, self._r[1154]!, [_0, _1]) + return formatWithArgumentRanges(self._s[1155]!, self._r[1155]!, [_0, _1]) } - public var Group_GroupMembersHeader: String { return self._s[1155]! } - public var Group_PublicLink_Title: String { return self._s[1156]! } - public var Channel_OwnershipTransfer_ErrorAdminsTooMuch: String { return self._s[1157]! } - public var VoiceOver_Chat_Photo: String { return self._s[1158]! } - public var TwoFactorSetup_EmailVerification_Placeholder: String { return self._s[1159]! } - public var IntentsSettings_SuggestBy: String { return self._s[1160]! } - public var Privacy_Calls_AlwaysAllow_Placeholder: String { return self._s[1161]! } - public var Appearance_ThemePreview_ChatList_1_Name: String { return self._s[1162]! } - public var PhoneNumberHelp_ChangeNumber: String { return self._s[1163]! } - public var LogoutOptions_SetPasscodeText: String { return self._s[1164]! } - public var Map_OpenInMaps: String { return self._s[1165]! } - public var ContactInfo_PhoneLabelWorkFax: String { return self._s[1166]! } - public var BlockedUsers_Unblock: String { return self._s[1167]! } + public var Group_GroupMembersHeader: String { return self._s[1156]! } + public var Group_PublicLink_Title: String { return self._s[1157]! } + public var Channel_OwnershipTransfer_ErrorAdminsTooMuch: String { return self._s[1158]! } + public var VoiceOver_Chat_Photo: String { return self._s[1159]! } + public var TwoFactorSetup_EmailVerification_Placeholder: String { return self._s[1160]! } + public var IntentsSettings_SuggestBy: String { return self._s[1161]! } + public var Privacy_Calls_AlwaysAllow_Placeholder: String { return self._s[1162]! } + public var Appearance_ThemePreview_ChatList_1_Name: String { return self._s[1163]! } + public var PhoneNumberHelp_ChangeNumber: String { return self._s[1164]! } + public var LogoutOptions_SetPasscodeText: String { return self._s[1165]! } + public var Map_OpenInMaps: String { return self._s[1166]! } + public var ContactInfo_PhoneLabelWorkFax: String { return self._s[1167]! } + public var BlockedUsers_Unblock: String { return self._s[1168]! } public func Settings_ApplyProxyAlert(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1168]!, self._r[1168]!, [_1, _2]) - } - public func Channel_AdminLog_MessageRestrictedNameUsername(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[1169]!, self._r[1169]!, [_1, _2]) } - public var ChatImport_CreateGroupAlertTitle: String { return self._s[1171]! } - public var Conversation_Block: String { return self._s[1172]! } - public var Passport_Scans_UploadNew: String { return self._s[1173]! } - public var Share_Title: String { return self._s[1174]! } - public var Conversation_ApplyLocalization: String { return self._s[1175]! } - public var SharedMedia_EmptyLinksText: String { return self._s[1176]! } - public var Settings_NotificationsAndSounds: String { return self._s[1177]! } - public var Stats_ViewsByHoursTitle: String { return self._s[1178]! } - public var PhotoEditor_QualityMedium: String { return self._s[1179]! } - public var Conversation_ContextMenuCancelSending: String { return self._s[1180]! } + public func Channel_AdminLog_MessageRestrictedNameUsername(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[1170]!, self._r[1170]!, [_1, _2]) + } + public var ChatImport_CreateGroupAlertTitle: String { return self._s[1172]! } + public var Conversation_Block: String { return self._s[1173]! } + public var Passport_Scans_UploadNew: String { return self._s[1174]! } + public var Share_Title: String { return self._s[1175]! } + public var Conversation_ApplyLocalization: String { return self._s[1176]! } + public var SharedMedia_EmptyLinksText: String { return self._s[1177]! } + public var Settings_NotificationsAndSounds: String { return self._s[1178]! } + public var Stats_ViewsByHoursTitle: String { return self._s[1179]! } + public var PhotoEditor_QualityMedium: String { return self._s[1180]! } + public var Conversation_ContextMenuCancelSending: String { return self._s[1181]! } public func PUSH_CHANNEL_MESSAGE_GAME(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1181]!, self._r[1181]!, [_1, _2]) + return formatWithArgumentRanges(self._s[1182]!, self._r[1182]!, [_1, _2]) } - public var Conversation_RestrictedInline: String { return self._s[1182]! } - public var Passport_Language_tr: String { return self._s[1183]! } - public var Call_Mute: String { return self._s[1184]! } + public var Conversation_RestrictedInline: String { return self._s[1183]! } + public var Passport_Language_tr: String { return self._s[1184]! } + public var Call_Mute: String { return self._s[1185]! } public func Conversation_NoticeInvitedByInGroup(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1185]!, self._r[1185]!, [_0]) + return formatWithArgumentRanges(self._s[1186]!, self._r[1186]!, [_0]) } - public var Passport_Language_bn: String { return self._s[1186]! } - public var Common_Save: String { return self._s[1188]! } - public var AccessDenied_LocationTracking: String { return self._s[1190]! } - public var Month_ShortOctober: String { return self._s[1191]! } - public var AutoDownloadSettings_WiFi: String { return self._s[1192]! } - public var ProfilePhoto_SetMainPhoto: String { return self._s[1194]! } - public var ChangePhoneNumberNumber_NewNumber: String { return self._s[1195]! } + public var Passport_Language_bn: String { return self._s[1187]! } + public var Common_Save: String { return self._s[1189]! } + public var AccessDenied_LocationTracking: String { return self._s[1191]! } + public var Month_ShortOctober: String { return self._s[1192]! } + public var AutoDownloadSettings_WiFi: String { return self._s[1193]! } + public var ProfilePhoto_SetMainPhoto: String { return self._s[1195]! } + public var ChangePhoneNumberNumber_NewNumber: String { return self._s[1196]! } public func Time_MonthOfYear_m3(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1196]!, self._r[1196]!, [_0]) + return formatWithArgumentRanges(self._s[1197]!, self._r[1197]!, [_0]) } - public var Watch_ChannelInfo_Title: String { return self._s[1197]! } - public var State_Updating: String { return self._s[1198]! } - public var Conversation_UnblockUser: String { return self._s[1199]! } - public var Notifications_ChannelNotificationsSound: String { return self._s[1200]! } - public var Map_GetDirections: String { return self._s[1201]! } - public var Watch_Compose_AddContact: String { return self._s[1203]! } - public var Conversation_Dice_u26BD: String { return self._s[1204]! } - public var AccessDenied_PhotosRestricted: String { return self._s[1205]! } + public var Watch_ChannelInfo_Title: String { return self._s[1198]! } + public var State_Updating: String { return self._s[1199]! } + public var Conversation_UnblockUser: String { return self._s[1200]! } + public var Notifications_ChannelNotificationsSound: String { return self._s[1201]! } + public var Map_GetDirections: String { return self._s[1202]! } + public var Watch_Compose_AddContact: String { return self._s[1204]! } + public var Conversation_Dice_u26BD: String { return self._s[1205]! } + public var AccessDenied_PhotosRestricted: String { return self._s[1206]! } public func Channel_AdminLog_MessageRank(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1206]!, self._r[1206]!, [_1]) + return formatWithArgumentRanges(self._s[1207]!, self._r[1207]!, [_1]) } - public var Map_LoadError: String { return self._s[1208]! } - public var SettingsSearch_Synonyms_Privacy_Calls: String { return self._s[1209]! } - public var PhotoEditor_CropAuto: String { return self._s[1210]! } + public var Map_LoadError: String { return self._s[1209]! } + public var SettingsSearch_Synonyms_Privacy_Calls: String { return self._s[1210]! } + public var PhotoEditor_CropAuto: String { return self._s[1211]! } public func Target_ShareGameConfirmationPrivate(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1213]!, self._r[1213]!, [_0]) + return formatWithArgumentRanges(self._s[1214]!, self._r[1214]!, [_0]) } - public var Username_TooManyPublicUsernamesError: String { return self._s[1215]! } + public var Username_TooManyPublicUsernamesError: String { return self._s[1216]! } public func PUSH_PINNED_GAME(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1216]!, self._r[1216]!, [_1]) + return formatWithArgumentRanges(self._s[1217]!, self._r[1217]!, [_1]) } - public var Settings_PhoneNumber: String { return self._s[1217]! } + public var Settings_PhoneNumber: String { return self._s[1218]! } public func Channel_AdminLog_MessageTransferedName(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1218]!, self._r[1218]!, [_1]) + return formatWithArgumentRanges(self._s[1219]!, self._r[1219]!, [_1]) } - public var Month_GenJune: String { return self._s[1220]! } - public var Notifications_ExceptionsGroupPlaceholder: String { return self._s[1221]! } - public var ChatListFolder_CategoryRead: String { return self._s[1222]! } - public var LoginPassword_ResetAccount: String { return self._s[1223]! } + public var Month_GenJune: String { return self._s[1221]! } + public var Notifications_ExceptionsGroupPlaceholder: String { return self._s[1222]! } + public var ChatListFolder_CategoryRead: String { return self._s[1223]! } + public var LoginPassword_ResetAccount: String { return self._s[1224]! } public func DialogList_SingleUploadingFileSuffix(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1224]!, self._r[1224]!, [_0]) + return formatWithArgumentRanges(self._s[1225]!, self._r[1225]!, [_0]) } - public var Call_CameraConfirmationConfirm: String { return self._s[1225]! } - public var Notification_RenamedChannel: String { return self._s[1226]! } + public var Call_CameraConfirmationConfirm: String { return self._s[1226]! } + public var Notification_RenamedChannel: String { return self._s[1227]! } public func Channel_AdminLog_MessageUnpinned(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1227]!, self._r[1227]!, [_0]) + return formatWithArgumentRanges(self._s[1228]!, self._r[1228]!, [_0]) } - public var Channel_AdminLogFilter_EventsAdmins: String { return self._s[1228]! } - public var IntentsSettings_Title: String { return self._s[1230]! } - public var CallList_DeleteAllForMe: String { return self._s[1231]! } - public var Settings_AppleWatch: String { return self._s[1232]! } - public var DialogList_NoMessagesText: String { return self._s[1233]! } - public var GroupPermission_NoChangeInfo: String { return self._s[1234]! } - public var Channel_ErrorAccessDenied: String { return self._s[1236]! } - public var ScheduledMessages_EmptyPlaceholder: String { return self._s[1237]! } + public var Channel_AdminLogFilter_EventsAdmins: String { return self._s[1229]! } + public var IntentsSettings_Title: String { return self._s[1231]! } + public var CallList_DeleteAllForMe: String { return self._s[1232]! } + public var Settings_AppleWatch: String { return self._s[1233]! } + public var DialogList_NoMessagesText: String { return self._s[1234]! } + public var GroupPermission_NoChangeInfo: String { return self._s[1235]! } + public var Channel_ErrorAccessDenied: String { return self._s[1237]! } + public var ScheduledMessages_EmptyPlaceholder: String { return self._s[1238]! } public func Message_StickerText(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1238]!, self._r[1238]!, [_0]) + return formatWithArgumentRanges(self._s[1239]!, self._r[1239]!, [_0]) } - public var AuthSessions_TerminateOtherSessionsHelp: String { return self._s[1239]! } - public var StickerPacksSettings_AnimatedStickers: String { return self._s[1240]! } - public var Month_ShortJanuary: String { return self._s[1241]! } - public var Conversation_UnreadMessages: String { return self._s[1242]! } - public var Conversation_PrivateChannelTooltip: String { return self._s[1244]! } - public var Call_VoiceOver_VideoCallCanceled: String { return self._s[1245]! } - public var PrivacySettings_DeleteAccountTitle: String { return self._s[1247]! } - public var Channel_Members_AddBannedErrorAdmin: String { return self._s[1248]! } + public var AuthSessions_TerminateOtherSessionsHelp: String { return self._s[1240]! } + public var StickerPacksSettings_AnimatedStickers: String { return self._s[1241]! } + public var Month_ShortJanuary: String { return self._s[1242]! } + public var Conversation_UnreadMessages: String { return self._s[1243]! } + public var Conversation_PrivateChannelTooltip: String { return self._s[1245]! } + public var Call_VoiceOver_VideoCallCanceled: String { return self._s[1246]! } + public var PrivacySettings_DeleteAccountTitle: String { return self._s[1248]! } + public var Channel_Members_AddBannedErrorAdmin: String { return self._s[1249]! } public func Conversation_ShareMyPhoneNumberConfirmation(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1252]!, self._r[1252]!, [_1, _2]) + return formatWithArgumentRanges(self._s[1253]!, self._r[1253]!, [_1, _2]) } - public var Widget_ApplicationLocked: String { return self._s[1253]! } + public var Widget_ApplicationLocked: String { return self._s[1254]! } public func TextFormat_AddLinkText(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1254]!, self._r[1254]!, [_0]) + return formatWithArgumentRanges(self._s[1255]!, self._r[1255]!, [_0]) } - public var Common_TakePhotoOrVideo: String { return self._s[1255]! } - public var Passport_Language_ru: String { return self._s[1256]! } - public var MediaPicker_VideoMuteDescription: String { return self._s[1257]! } - public var EditTheme_ErrorLinkTaken: String { return self._s[1258]! } + public var Common_TakePhotoOrVideo: String { return self._s[1256]! } + public var Passport_Language_ru: String { return self._s[1257]! } + public var MediaPicker_VideoMuteDescription: String { return self._s[1258]! } + public var EditTheme_ErrorLinkTaken: String { return self._s[1259]! } public func Group_EditAdmin_RankInfo(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1260]!, self._r[1260]!, [_0]) + return formatWithArgumentRanges(self._s[1261]!, self._r[1261]!, [_0]) } - public var Channel_Members_AddAdminErrorBlacklisted: String { return self._s[1261]! } - public var Conversation_Owner: String { return self._s[1263]! } - public var Settings_FAQ_Intro: String { return self._s[1264]! } - public var PhotoEditor_QualityLow: String { return self._s[1266]! } - public var Widget_GalleryTitle: String { return self._s[1267]! } - public var Call_End: String { return self._s[1268]! } - public var StickerPacksSettings_FeaturedPacks: String { return self._s[1270]! } - public var Privacy_ContactsSyncHelp: String { return self._s[1271]! } - public var OldChannels_NoticeUpgradeText: String { return self._s[1275]! } - public var Conversation_Call: String { return self._s[1277]! } - public var Watch_MessageView_Title: String { return self._s[1278]! } + public var Channel_Members_AddAdminErrorBlacklisted: String { return self._s[1262]! } + public var Conversation_Owner: String { return self._s[1264]! } + public var Settings_FAQ_Intro: String { return self._s[1265]! } + public var PhotoEditor_QualityLow: String { return self._s[1267]! } + public var Widget_GalleryTitle: String { return self._s[1268]! } + public var Call_End: String { return self._s[1269]! } + public var StickerPacksSettings_FeaturedPacks: String { return self._s[1271]! } + public var Privacy_ContactsSyncHelp: String { return self._s[1272]! } + public var OldChannels_NoticeUpgradeText: String { return self._s[1276]! } + public var Conversation_Call: String { return self._s[1278]! } + public var Watch_MessageView_Title: String { return self._s[1279]! } public func Notification_RenamedChat(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1279]!, self._r[1279]!, [_0]) + return formatWithArgumentRanges(self._s[1280]!, self._r[1280]!, [_0]) } - public var Passport_PasswordCompleteSetup: String { return self._s[1280]! } + public var Passport_PasswordCompleteSetup: String { return self._s[1281]! } public func Notification_ChangedGroupVideo(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1281]!, self._r[1281]!, [_0]) + return formatWithArgumentRanges(self._s[1282]!, self._r[1282]!, [_0]) } public func TwoFactorSetup_EmailVerification_Text(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1283]!, self._r[1283]!, [_0]) + return formatWithArgumentRanges(self._s[1284]!, self._r[1284]!, [_0]) } - public var Map_Location: String { return self._s[1284]! } - public var Watch_MessageView_ViewOnPhone: String { return self._s[1285]! } - public var Login_CountryCode: String { return self._s[1286]! } - public var Channel_DiscussionGroup_PrivateGroup: String { return self._s[1288]! } - public var ChatState_ConnectingToProxy: String { return self._s[1289]! } - public var Login_CallRequestState3: String { return self._s[1290]! } - public var NetworkUsageSettings_MediaAudioDataSection: String { return self._s[1293]! } - public var SocksProxySetup_ProxyStatusConnecting: String { return self._s[1294]! } - public var PrivacyLastSeenSettings_NeverShareWith_Placeholder: String { return self._s[1297]! } - public var Call_StatusEnded: String { return self._s[1298]! } - public var MusicPlayer_VoiceNote: String { return self._s[1301]! } - public var ChatImportActivity_ErrorUserBlocked: String { return self._s[1302]! } + public var Map_Location: String { return self._s[1285]! } + public var Watch_MessageView_ViewOnPhone: String { return self._s[1286]! } + public var Login_CountryCode: String { return self._s[1287]! } + public var Channel_DiscussionGroup_PrivateGroup: String { return self._s[1289]! } + public var ChatState_ConnectingToProxy: String { return self._s[1290]! } + public var Login_CallRequestState3: String { return self._s[1291]! } + public var NetworkUsageSettings_MediaAudioDataSection: String { return self._s[1294]! } + public var SocksProxySetup_ProxyStatusConnecting: String { return self._s[1295]! } + public var PrivacyLastSeenSettings_NeverShareWith_Placeholder: String { return self._s[1298]! } + public var Call_StatusEnded: String { return self._s[1299]! } + public var MusicPlayer_VoiceNote: String { return self._s[1302]! } + public var ChatImportActivity_ErrorUserBlocked: String { return self._s[1303]! } public func PUSH_CHANNEL_MESSAGE_TEXT(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1303]!, self._r[1303]!, [_1, _2]) + return formatWithArgumentRanges(self._s[1304]!, self._r[1304]!, [_1, _2]) } - public var VoiceOver_MessageContextShare: String { return self._s[1304]! } - public var ProfilePhoto_SearchWeb: String { return self._s[1305]! } - public var EditProfile_Title: String { return self._s[1306]! } + public var VoiceOver_MessageContextShare: String { return self._s[1305]! } + public var ProfilePhoto_SearchWeb: String { return self._s[1306]! } + public var EditProfile_Title: String { return self._s[1307]! } public func Notification_PinnedQuizMessage(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1307]!, self._r[1307]!, [_0]) + return formatWithArgumentRanges(self._s[1308]!, self._r[1308]!, [_0]) } - public var VoiceChat_Unmute: String { return self._s[1308]! } - public var ChangePhoneNumberCode_CodePlaceholder: String { return self._s[1309]! } - public var NetworkUsageSettings_ResetStats: String { return self._s[1311]! } - public var NetworkUsageSettings_GeneralDataSection: String { return self._s[1312]! } - public var StickerPackActionInfo_AddedTitle: String { return self._s[1313]! } - public var Channel_BanUser_PermissionSendStickersAndGifs: String { return self._s[1314]! } + public var VoiceChat_Unmute: String { return self._s[1309]! } + public var ChangePhoneNumberCode_CodePlaceholder: String { return self._s[1310]! } + public var NetworkUsageSettings_ResetStats: String { return self._s[1312]! } + public var NetworkUsageSettings_GeneralDataSection: String { return self._s[1313]! } + public var StickerPackActionInfo_AddedTitle: String { return self._s[1314]! } + public var Channel_BanUser_PermissionSendStickersAndGifs: String { return self._s[1315]! } public func Call_ParticipantVideoVersionOutdatedError(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1315]!, self._r[1315]!, [_0]) + return formatWithArgumentRanges(self._s[1316]!, self._r[1316]!, [_0]) } - public var Location_ProximityNotification_Title: String { return self._s[1316]! } - public var AuthSessions_AddDeviceIntro_Text1: String { return self._s[1317]! } - public var Passport_Identity_LatinNameHelp: String { return self._s[1320]! } - public var AuthSessions_AddDeviceIntro_Text2: String { return self._s[1321]! } - public var Stats_GroupMembersTitle: String { return self._s[1322]! } - public var AuthSessions_AddDeviceIntro_Text3: String { return self._s[1323]! } - public var Contacts_PermissionsSuppressWarningText: String { return self._s[1324]! } - public var OpenFile_PotentiallyDangerousContentAlert: String { return self._s[1325]! } - public var Settings_SetUsername: String { return self._s[1326]! } - public var GroupInfo_ActionRestrict: String { return self._s[1327]! } - public var SettingsSearch_Synonyms_SavedMessages: String { return self._s[1328]! } + public var Location_ProximityNotification_Title: String { return self._s[1317]! } + public var AuthSessions_AddDeviceIntro_Text1: String { return self._s[1318]! } + public var Passport_Identity_LatinNameHelp: String { return self._s[1321]! } + public var AuthSessions_AddDeviceIntro_Text2: String { return self._s[1322]! } + public var Stats_GroupMembersTitle: String { return self._s[1323]! } + public var AuthSessions_AddDeviceIntro_Text3: String { return self._s[1324]! } + public var Contacts_PermissionsSuppressWarningText: String { return self._s[1325]! } + public var OpenFile_PotentiallyDangerousContentAlert: String { return self._s[1326]! } + public var Settings_SetUsername: String { return self._s[1327]! } + public var GroupInfo_ActionRestrict: String { return self._s[1328]! } + public var SettingsSearch_Synonyms_SavedMessages: String { return self._s[1329]! } public func Time_PreciseDate_m2(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1329]!, self._r[1329]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[1330]!, self._r[1330]!, [_1, _2, _3]) } - public var Notifications_DisplayNamesOnLockScreenInfoWithLink: String { return self._s[1331]! } - public var Notification_Exceptions_AlwaysOff: String { return self._s[1332]! } - public var Conversation_ContextMenuDelete: String { return self._s[1333]! } - public var Privacy_Calls_WhoCanCallMe: String { return self._s[1334]! } - public var ChatList_PsaAlert_covid: String { return self._s[1337]! } - public var DialogList_Pin: String { return self._s[1338]! } - public var PrivacySettings_SecurityTitle: String { return self._s[1339]! } - public var GroupPermission_NotAvailableInPublicGroups: String { return self._s[1340]! } - public var PeopleNearby_Groups: String { return self._s[1341]! } - public var Message_File: String { return self._s[1342]! } - public var Calls_NoCallsPlaceholder: String { return self._s[1343]! } - public var ChatList_GenericPsaLabel: String { return self._s[1345]! } - public var UserInfo_LastNamePlaceholder: String { return self._s[1346]! } - public var IntentsSettings_Reset: String { return self._s[1348]! } - public var Call_ConnectionErrorTitle: String { return self._s[1349]! } - public var PhotoEditor_SaturationTool: String { return self._s[1350]! } - public var ChatSettings_AutomaticVideoMessageDownload: String { return self._s[1351]! } - public var SettingsSearch_Synonyms_Stickers_ArchivedPacks: String { return self._s[1352]! } - public var Conversation_SearchNoResults: String { return self._s[1353]! } - public var Channel_DiscussionGroup_PrivateChannel: String { return self._s[1354]! } - public var Map_OpenInWaze: String { return self._s[1355]! } - public var InviteLink_PeopleJoinedNone: String { return self._s[1356]! } - public var WallpaperPreview_Title: String { return self._s[1357]! } + public var Notifications_DisplayNamesOnLockScreenInfoWithLink: String { return self._s[1332]! } + public var Notification_Exceptions_AlwaysOff: String { return self._s[1333]! } + public var Conversation_ContextMenuDelete: String { return self._s[1334]! } + public var Privacy_Calls_WhoCanCallMe: String { return self._s[1335]! } + public var ChatList_PsaAlert_covid: String { return self._s[1338]! } + public var DialogList_Pin: String { return self._s[1339]! } + public var Channel_AdminLog_CanInviteUsersViaLink: String { return self._s[1340]! } + public var PrivacySettings_SecurityTitle: String { return self._s[1341]! } + public var GroupPermission_NotAvailableInPublicGroups: String { return self._s[1342]! } + public var PeopleNearby_Groups: String { return self._s[1343]! } + public var Message_File: String { return self._s[1344]! } + public var Calls_NoCallsPlaceholder: String { return self._s[1345]! } + public var ChatList_GenericPsaLabel: String { return self._s[1347]! } + public var UserInfo_LastNamePlaceholder: String { return self._s[1348]! } + public var IntentsSettings_Reset: String { return self._s[1350]! } + public var Call_ConnectionErrorTitle: String { return self._s[1351]! } + public var PhotoEditor_SaturationTool: String { return self._s[1352]! } + public var ChatSettings_AutomaticVideoMessageDownload: String { return self._s[1353]! } + public var SettingsSearch_Synonyms_Stickers_ArchivedPacks: String { return self._s[1354]! } + public var Conversation_SearchNoResults: String { return self._s[1355]! } + public var Channel_DiscussionGroup_PrivateChannel: String { return self._s[1356]! } + public var Map_OpenInWaze: String { return self._s[1357]! } + public var InviteLink_PeopleJoinedNone: String { return self._s[1358]! } + public var WallpaperPreview_Title: String { return self._s[1359]! } public func Passport_AcceptHelp(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1359]!, self._r[1359]!, [_1, _2]) + return formatWithArgumentRanges(self._s[1361]!, self._r[1361]!, [_1, _2]) } - public var AuthSessions_AddDeviceIntro_Title: String { return self._s[1360]! } - public var VoiceOver_Chat_RecordModeVideoMessageInfo: String { return self._s[1361]! } - public var VoiceOver_Chat_ChannelInfo: String { return self._s[1362]! } - public var Passport_Identity_OneOfTypeInternalPassport: String { return self._s[1363]! } - public var Notifications_PermissionsUnreachableTitle: String { return self._s[1365]! } - public var Stats_Total: String { return self._s[1368]! } - public var Stats_GroupMessages: String { return self._s[1369]! } - public var TwoFactorSetup_Email_SkipAction: String { return self._s[1370]! } - public var CheckoutInfo_ErrorPhoneInvalid: String { return self._s[1371]! } - public var Passport_Identity_Translation: String { return self._s[1372]! } - public var Notifications_TextTone: String { return self._s[1375]! } - public var Settings_RemoveConfirmation: String { return self._s[1377]! } - public var ScheduledMessages_Delete: String { return self._s[1378]! } - public var Channel_AdminLog_BanEmbedLinks: String { return self._s[1379]! } - public var Passport_PasswordNext: String { return self._s[1380]! } + public var AuthSessions_AddDeviceIntro_Title: String { return self._s[1362]! } + public var VoiceOver_Chat_RecordModeVideoMessageInfo: String { return self._s[1363]! } + public var VoiceOver_Chat_ChannelInfo: String { return self._s[1364]! } + public var Passport_Identity_OneOfTypeInternalPassport: String { return self._s[1365]! } + public var Notifications_PermissionsUnreachableTitle: String { return self._s[1367]! } + public var Stats_Total: String { return self._s[1370]! } + public var Stats_GroupMessages: String { return self._s[1371]! } + public var TwoFactorSetup_Email_SkipAction: String { return self._s[1372]! } + public var CheckoutInfo_ErrorPhoneInvalid: String { return self._s[1373]! } + public var Passport_Identity_Translation: String { return self._s[1374]! } + public var Notifications_TextTone: String { return self._s[1377]! } + public var Settings_RemoveConfirmation: String { return self._s[1379]! } + public var ScheduledMessages_Delete: String { return self._s[1380]! } + public var Channel_AdminLog_BanEmbedLinks: String { return self._s[1381]! } + public var Passport_PasswordNext: String { return self._s[1382]! } public func PUSH_ENCRYPTED_MESSAGE(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1381]!, self._r[1381]!, [_1]) + return formatWithArgumentRanges(self._s[1383]!, self._r[1383]!, [_1]) } - public var Passport_Address_EditBankStatement: String { return self._s[1382]! } - public var PhotoEditor_ShadowsTool: String { return self._s[1383]! } - public var Notification_VideoCallMissed: String { return self._s[1384]! } - public var AccessDenied_CameraDisabled: String { return self._s[1385]! } - public var AuthSessions_AddDevice_ScanInfo: String { return self._s[1386]! } - public var Notifications_ExceptionsMuted: String { return self._s[1387]! } - public var Conversation_ScheduleMessage_SendWhenOnline: String { return self._s[1388]! } - public var Channel_BlackList_Title: String { return self._s[1389]! } - public var PasscodeSettings_4DigitCode: String { return self._s[1390]! } - public var NotificationsSound_Bamboo: String { return self._s[1391]! } - public var PrivacySettings_LastSeenContacts: String { return self._s[1392]! } - public var Passport_Address_TypeUtilityBill: String { return self._s[1393]! } - public var Passport_Address_CountryPlaceholder: String { return self._s[1394]! } - public var GroupPermission_SectionTitle: String { return self._s[1395]! } - public var InviteLink_ContextRevoke: String { return self._s[1396]! } + public var Passport_Address_EditBankStatement: String { return self._s[1384]! } + public var PhotoEditor_ShadowsTool: String { return self._s[1385]! } + public var Notification_VideoCallMissed: String { return self._s[1386]! } + public var AccessDenied_CameraDisabled: String { return self._s[1387]! } + public var AuthSessions_AddDevice_ScanInfo: String { return self._s[1388]! } + public var Notifications_ExceptionsMuted: String { return self._s[1389]! } + public var Conversation_ScheduleMessage_SendWhenOnline: String { return self._s[1390]! } + public var Channel_BlackList_Title: String { return self._s[1391]! } + public var PasscodeSettings_4DigitCode: String { return self._s[1392]! } + public var NotificationsSound_Bamboo: String { return self._s[1393]! } + public var PrivacySettings_LastSeenContacts: String { return self._s[1394]! } + public var Passport_Address_TypeUtilityBill: String { return self._s[1395]! } + public var Passport_Address_CountryPlaceholder: String { return self._s[1396]! } + public var GroupPermission_SectionTitle: String { return self._s[1397]! } + public var InviteLink_ContextRevoke: String { return self._s[1398]! } public func Notification_InvitedMultiple(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1397]!, self._r[1397]!, [_0, _1]) + return formatWithArgumentRanges(self._s[1399]!, self._r[1399]!, [_0, _1]) } - public var CheckoutInfo_ShippingInfoStatePlaceholder: String { return self._s[1398]! } - public var Channel_LeaveChannel: String { return self._s[1399]! } - public var Watch_Notification_Joined: String { return self._s[1400]! } - public var PeerInfo_ButtonMore: String { return self._s[1401]! } - public var Passport_FieldEmailHelp: String { return self._s[1402]! } - public var ChatList_Context_Pin: String { return self._s[1403]! } + public var CheckoutInfo_ShippingInfoStatePlaceholder: String { return self._s[1400]! } + public var Channel_LeaveChannel: String { return self._s[1401]! } + public var Watch_Notification_Joined: String { return self._s[1402]! } + public var PeerInfo_ButtonMore: String { return self._s[1403]! } + public var Passport_FieldEmailHelp: String { return self._s[1404]! } + public var ChatList_Context_Pin: String { return self._s[1405]! } public func Time_MonthOfYear_m9(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1404]!, self._r[1404]!, [_0]) + return formatWithArgumentRanges(self._s[1406]!, self._r[1406]!, [_0]) } - public var Group_Location_CreateInThisPlace: String { return self._s[1405]! } - public var PhotoEditor_QualityVeryHigh: String { return self._s[1406]! } - public var Tour_Title5: String { return self._s[1407]! } + public var Group_Location_CreateInThisPlace: String { return self._s[1407]! } + public var PhotoEditor_QualityVeryHigh: String { return self._s[1408]! } + public var Tour_Title5: String { return self._s[1409]! } public func PUSH_CHAT_MESSAGE_FWD(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1408]!, self._r[1408]!, [_1, _2]) + return formatWithArgumentRanges(self._s[1410]!, self._r[1410]!, [_1, _2]) } - public var Passport_Language_en: String { return self._s[1409]! } - public var Checkout_Name: String { return self._s[1410]! } - public var ChatImport_Title: String { return self._s[1411]! } + public var Passport_Language_en: String { return self._s[1411]! } + public var Checkout_Name: String { return self._s[1412]! } + public var ChatImport_Title: String { return self._s[1413]! } public func NetworkUsageSettings_WifiUsageSince(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1412]!, self._r[1412]!, [_0]) + return formatWithArgumentRanges(self._s[1414]!, self._r[1414]!, [_0]) } - public var PhotoEditor_EnhanceTool: String { return self._s[1413]! } + public var PhotoEditor_EnhanceTool: String { return self._s[1415]! } public func PUSH_CHAT_DELETE_YOU(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1414]!, self._r[1414]!, [_1, _2]) + return formatWithArgumentRanges(self._s[1416]!, self._r[1416]!, [_1, _2]) } - public var PeerInfo_CustomizeNotifications: String { return self._s[1415]! } + public var PeerInfo_CustomizeNotifications: String { return self._s[1417]! } public func Login_TermsOfService_ProceedBot(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1416]!, self._r[1416]!, [_0]) - } - public var Group_ErrorSendRestrictedMedia: String { return self._s[1417]! } - public func UserInfo_NotificationsDefaultSound(_ _0: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[1418]!, self._r[1418]!, [_0]) } - public var Login_UnknownError: String { return self._s[1419]! } - public var Conversation_ImportedMessageHint: String { return self._s[1421]! } - public var Passport_Identity_TypeDriversLicense: String { return self._s[1423]! } - public var InviteLink_TapToCopy: String { return self._s[1424]! } - public var ChatList_AutoarchiveSuggestion_Title: String { return self._s[1425]! } - public var Watch_PhotoView_Title: String { return self._s[1426]! } - public var Appearance_ThemePreview_ChatList_3_Text: String { return self._s[1427]! } - public var Checkout_TotalAmount: String { return self._s[1428]! } - public var ChatList_RemoveFolderAction: String { return self._s[1429]! } - public var GroupInfo_Permissions_BroadcastConvertInfo: String { return self._s[1430]! } - public var GroupInfo_SetGroupPhoto: String { return self._s[1431]! } - public var Watch_AppName: String { return self._s[1432]! } + public var Group_ErrorSendRestrictedMedia: String { return self._s[1419]! } + public func UserInfo_NotificationsDefaultSound(_ _0: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[1420]!, self._r[1420]!, [_0]) + } + public var Login_UnknownError: String { return self._s[1421]! } + public var Conversation_ImportedMessageHint: String { return self._s[1423]! } + public var Passport_Identity_TypeDriversLicense: String { return self._s[1425]! } + public var InviteLink_TapToCopy: String { return self._s[1426]! } + public var ChatList_AutoarchiveSuggestion_Title: String { return self._s[1427]! } + public var Watch_PhotoView_Title: String { return self._s[1428]! } + public var Appearance_ThemePreview_ChatList_3_Text: String { return self._s[1429]! } + public var Checkout_TotalAmount: String { return self._s[1430]! } + public var ChatList_RemoveFolderAction: String { return self._s[1431]! } + public var GroupInfo_Permissions_BroadcastConvertInfo: String { return self._s[1432]! } + public var GroupInfo_SetGroupPhoto: String { return self._s[1433]! } + public var Watch_AppName: String { return self._s[1434]! } public func PUSH_PINNED_GAME_SCORE(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1433]!, self._r[1433]!, [_1]) + return formatWithArgumentRanges(self._s[1435]!, self._r[1435]!, [_1]) } - public var Channel_Username_CheckingUsername: String { return self._s[1434]! } - public var ContactList_Context_Call: String { return self._s[1435]! } - public var ChatList_ReorderTabs: String { return self._s[1436]! } - public var Watch_ChatList_Compose: String { return self._s[1437]! } + public var Channel_Username_CheckingUsername: String { return self._s[1436]! } + public var ContactList_Context_Call: String { return self._s[1437]! } + public var ChatList_ReorderTabs: String { return self._s[1438]! } + public var Watch_ChatList_Compose: String { return self._s[1439]! } public func Conversation_LiveLocationYouAnd(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1438]!, self._r[1438]!, [_0]) + return formatWithArgumentRanges(self._s[1440]!, self._r[1440]!, [_0]) } - public var Channel_AdminLog_EmptyFilterTitle: String { return self._s[1439]! } - public var ArchivedChats_IntroTitle1: String { return self._s[1440]! } + public var Channel_AdminLog_EmptyFilterTitle: String { return self._s[1441]! } + public var ArchivedChats_IntroTitle1: String { return self._s[1442]! } public func PUSH_ENCRYPTION_ACCEPT(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1441]!, self._r[1441]!, [_1]) + return formatWithArgumentRanges(self._s[1443]!, self._r[1443]!, [_1]) } - public var Call_StatusRequesting: String { return self._s[1443]! } - public var Checkout_TotalPaidAmount: String { return self._s[1444]! } - public var Weekday_Friday: String { return self._s[1446]! } - public var CreateGroup_ChannelsTooMuch: String { return self._s[1447]! } + public var Call_StatusRequesting: String { return self._s[1445]! } + public var Checkout_TotalPaidAmount: String { return self._s[1446]! } + public var Weekday_Friday: String { return self._s[1448]! } + public var CreateGroup_ChannelsTooMuch: String { return self._s[1449]! } public func ChatImport_SelectionConfirmationUserWithoutTitle(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1448]!, self._r[1448]!, [_0]) - } - public var Watch_ChatList_NoConversationsText: String { return self._s[1449]! } - public func Channel_AdminLog_MessageChangedGroupStickerPack(_ _0: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[1450]!, self._r[1450]!, [_0]) } - public var SecretVideo_Title: String { return self._s[1451]! } - public func Notification_PinnedStickerMessage(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1454]!, self._r[1454]!, [_0]) + public var Watch_ChatList_NoConversationsText: String { return self._s[1451]! } + public func Channel_AdminLog_MessageChangedGroupStickerPack(_ _0: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[1452]!, self._r[1452]!, [_0]) } - public var Undo_Undo: String { return self._s[1455]! } - public var Watch_Microphone_Access: String { return self._s[1456]! } + public var SecretVideo_Title: String { return self._s[1453]! } + public func Notification_PinnedStickerMessage(_ _0: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[1456]!, self._r[1456]!, [_0]) + } + public var Undo_Undo: String { return self._s[1457]! } + public var Watch_Microphone_Access: String { return self._s[1458]! } public func ChatImport_SelectionConfirmationGroupWithTitle(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1457]!, self._r[1457]!, [_1, _2]) + return formatWithArgumentRanges(self._s[1459]!, self._r[1459]!, [_1, _2]) } public func PUSH_CHAT_MESSAGE_PHOTO(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1458]!, self._r[1458]!, [_1, _2]) + return formatWithArgumentRanges(self._s[1460]!, self._r[1460]!, [_1, _2]) } public func ChatList_Search_NoResultsQueryDescription(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1459]!, self._r[1459]!, [_0]) + return formatWithArgumentRanges(self._s[1461]!, self._r[1461]!, [_0]) } - public var Checkout_NewCard_PostcodeTitle: String { return self._s[1461]! } - public var TwoFactorSetup_Intro_Action: String { return self._s[1462]! } - public var Passport_Language_ne: String { return self._s[1463]! } - public var TwoStepAuth_EmailHelp: String { return self._s[1465]! } - public var Profile_MessageLifetime2s: String { return self._s[1466]! } + public var Checkout_NewCard_PostcodeTitle: String { return self._s[1463]! } + public var TwoFactorSetup_Intro_Action: String { return self._s[1464]! } + public var Passport_Language_ne: String { return self._s[1465]! } + public var TwoStepAuth_EmailHelp: String { return self._s[1467]! } + public var Profile_MessageLifetime2s: String { return self._s[1468]! } public func Conversation_MessageDialogRetryAll(_ _1: Int) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1467]!, self._r[1467]!, ["\(_1)"]) + return formatWithArgumentRanges(self._s[1469]!, self._r[1469]!, ["\(_1)"]) } public func Items_NOfM(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1468]!, self._r[1468]!, [_1, _2]) - } - public var Media_LimitedAccessText: String { return self._s[1469]! } - public func PUSH_CHAT_TITLE_EDITED(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[1470]!, self._r[1470]!, [_1, _2]) } - public var GroupPermission_NoPinMessages: String { return self._s[1471]! } + public var Media_LimitedAccessText: String { return self._s[1471]! } + public func PUSH_CHAT_TITLE_EDITED(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[1472]!, self._r[1472]!, [_1, _2]) + } + public var GroupPermission_NoPinMessages: String { return self._s[1473]! } public func Notification_VoiceChatStarted(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1472]!, self._r[1472]!, [_1]) + return formatWithArgumentRanges(self._s[1474]!, self._r[1474]!, [_1]) } public func Notification_CreatedChat(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1473]!, self._r[1473]!, [_0]) + return formatWithArgumentRanges(self._s[1475]!, self._r[1475]!, [_0]) } - public var FastTwoStepSetup_HintHelp: String { return self._s[1474]! } - public var WallpaperSearch_ColorRed: String { return self._s[1475]! } - public var Watch_ConnectionDescription: String { return self._s[1476]! } - public var Notification_Exceptions_AddException: String { return self._s[1477]! } - public var LocalGroup_IrrelevantWarning: String { return self._s[1478]! } - public var VoiceOver_MessageContextDelete: String { return self._s[1479]! } - public var LogoutOptions_AlternativeOptionsSection: String { return self._s[1480]! } - public var Passport_PasswordPlaceholder: String { return self._s[1481]! } - public var TwoStepAuth_RecoveryEmailAddDescription: String { return self._s[1482]! } - public var Stats_MessageInteractionsTitle: String { return self._s[1483]! } - public var Appearance_ThemeCarouselClassic: String { return self._s[1484]! } - public var TwoFactorSetup_Email_SkipConfirmationText: String { return self._s[1486]! } - public var Channel_AdminLog_PinMessages: String { return self._s[1487]! } - public var Passport_Address_AddRentalAgreement: String { return self._s[1488]! } - public var Watch_Message_Game: String { return self._s[1489]! } - public var PrivacyLastSeenSettings_NeverShareWith: String { return self._s[1490]! } - public var PrivacyPolicy_DeclineLastWarning: String { return self._s[1491]! } - public var EditTheme_FileReadError: String { return self._s[1492]! } - public var Group_ErrorAddBlocked: String { return self._s[1493]! } - public var CallSettings_UseLessDataLongDescription: String { return self._s[1494]! } + public var FastTwoStepSetup_HintHelp: String { return self._s[1476]! } + public var WallpaperSearch_ColorRed: String { return self._s[1477]! } + public var Watch_ConnectionDescription: String { return self._s[1478]! } + public var Notification_Exceptions_AddException: String { return self._s[1479]! } + public var LocalGroup_IrrelevantWarning: String { return self._s[1480]! } + public var VoiceOver_MessageContextDelete: String { return self._s[1481]! } + public var LogoutOptions_AlternativeOptionsSection: String { return self._s[1482]! } + public var Passport_PasswordPlaceholder: String { return self._s[1483]! } + public var TwoStepAuth_RecoveryEmailAddDescription: String { return self._s[1484]! } + public var Stats_MessageInteractionsTitle: String { return self._s[1485]! } + public var Appearance_ThemeCarouselClassic: String { return self._s[1486]! } + public var TwoFactorSetup_Email_SkipConfirmationText: String { return self._s[1488]! } + public var Channel_AdminLog_PinMessages: String { return self._s[1489]! } + public var Passport_Address_AddRentalAgreement: String { return self._s[1490]! } + public var Watch_Message_Game: String { return self._s[1491]! } + public var PrivacyLastSeenSettings_NeverShareWith: String { return self._s[1492]! } + public var PrivacyPolicy_DeclineLastWarning: String { return self._s[1493]! } + public var EditTheme_FileReadError: String { return self._s[1494]! } + public var Group_ErrorAddBlocked: String { return self._s[1495]! } + public var CallSettings_UseLessDataLongDescription: String { return self._s[1496]! } public func PUSH_MESSAGE_PHOTO(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1496]!, self._r[1496]!, [_1]) + return formatWithArgumentRanges(self._s[1498]!, self._r[1498]!, [_1]) } public func UserInfo_BlockConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1497]!, self._r[1497]!, [_0]) + return formatWithArgumentRanges(self._s[1499]!, self._r[1499]!, [_0]) } - public var CheckoutInfo_ShippingInfoAddress2Placeholder: String { return self._s[1498]! } - public var TwoFactorSetup_EmailVerification_Action: String { return self._s[1499]! } + public var CheckoutInfo_ShippingInfoAddress2Placeholder: String { return self._s[1500]! } + public var TwoFactorSetup_EmailVerification_Action: String { return self._s[1501]! } public func Username_LinkHint(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1500]!, self._r[1500]!, [_0]) + return formatWithArgumentRanges(self._s[1502]!, self._r[1502]!, [_0]) } - public var ConversationProfile_ErrorCreatingConversation: String { return self._s[1501]! } - public var Bot_GroupStatusReadsHistory: String { return self._s[1502]! } - public var PhotoEditor_CurvesRed: String { return self._s[1503]! } - public var InstantPage_TapToOpenLink: String { return self._s[1504]! } - public var InviteLink_PeopleJoinedShortNoneExpired: String { return self._s[1505]! } - public var FastTwoStepSetup_PasswordHelp: String { return self._s[1506]! } - public var Conversation_DiscussionNotStarted: String { return self._s[1507]! } - public var Notification_CallMissedShort: String { return self._s[1508]! } + public var ConversationProfile_ErrorCreatingConversation: String { return self._s[1503]! } + public var Bot_GroupStatusReadsHistory: String { return self._s[1504]! } + public var PhotoEditor_CurvesRed: String { return self._s[1505]! } + public var InstantPage_TapToOpenLink: String { return self._s[1506]! } + public var InviteLink_PeopleJoinedShortNoneExpired: String { return self._s[1507]! } + public var FastTwoStepSetup_PasswordHelp: String { return self._s[1508]! } + public var Conversation_DiscussionNotStarted: String { return self._s[1509]! } + public var Notification_CallMissedShort: String { return self._s[1510]! } public func Notification_JoinedGroupByLink(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1509]!, self._r[1509]!, [_0]) + return formatWithArgumentRanges(self._s[1511]!, self._r[1511]!, [_0]) } - public var Conversation_DeleteMessagesForEveryone: String { return self._s[1510]! } - public var Permissions_SiriTitle_v0: String { return self._s[1511]! } - public var GroupInfo_AddUserLeftError: String { return self._s[1512]! } - public var Conversation_SendMessage_SendSilently: String { return self._s[1513]! } - public var Paint_Duplicate: String { return self._s[1514]! } - public var AttachmentMenu_WebSearch: String { return self._s[1515]! } - public var Bot_Stop: String { return self._s[1517]! } - public var Conversation_PrivateChannelTimeLimitedAlertTitle: String { return self._s[1518]! } - public var ReportGroupLocation_Report: String { return self._s[1519]! } - public var Compose_Create: String { return self._s[1520]! } - public var Stats_GroupViewers: String { return self._s[1521]! } - public var AutoDownloadSettings_Channels: String { return self._s[1522]! } - public var PhotoEditor_QualityHigh: String { return self._s[1523]! } - public var VoiceChat_Leave: String { return self._s[1524]! } - public var Call_Speaker: String { return self._s[1525]! } + public var Conversation_DeleteMessagesForEveryone: String { return self._s[1512]! } + public var Permissions_SiriTitle_v0: String { return self._s[1513]! } + public var GroupInfo_AddUserLeftError: String { return self._s[1514]! } + public var Conversation_SendMessage_SendSilently: String { return self._s[1515]! } + public var Paint_Duplicate: String { return self._s[1516]! } + public var AttachmentMenu_WebSearch: String { return self._s[1517]! } + public var Bot_Stop: String { return self._s[1519]! } + public var Conversation_PrivateChannelTimeLimitedAlertTitle: String { return self._s[1520]! } + public var ReportGroupLocation_Report: String { return self._s[1521]! } + public var Compose_Create: String { return self._s[1522]! } + public var Stats_GroupViewers: String { return self._s[1523]! } + public var AutoDownloadSettings_Channels: String { return self._s[1524]! } + public var PhotoEditor_QualityHigh: String { return self._s[1525]! } + public var VoiceChat_Leave: String { return self._s[1526]! } + public var Call_Speaker: String { return self._s[1527]! } public func ChatList_LeaveGroupConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1526]!, self._r[1526]!, [_0]) + return formatWithArgumentRanges(self._s[1528]!, self._r[1528]!, [_0]) } - public var Conversation_CloudStorage_ChatStatus: String { return self._s[1527]! } - public var Chat_AttachmentMultipleFilesDisabled: String { return self._s[1528]! } - public var ChatList_Context_AddToFolder: String { return self._s[1529]! } - public var InviteLink_QRCode_Info: String { return self._s[1530]! } - public var ChatList_DeleteForAllMembersConfirmationText: String { return self._s[1531]! } - public var Conversation_Unblock: String { return self._s[1532]! } - public var SettingsSearch_Synonyms_Proxy_UseForCalls: String { return self._s[1533]! } + public var Conversation_CloudStorage_ChatStatus: String { return self._s[1529]! } + public var Chat_AttachmentMultipleFilesDisabled: String { return self._s[1530]! } + public var ChatList_Context_AddToFolder: String { return self._s[1531]! } + public var InviteLink_QRCode_Info: String { return self._s[1532]! } + public var ChatList_DeleteForAllMembersConfirmationText: String { return self._s[1533]! } + public var Conversation_Unblock: String { return self._s[1534]! } + public var SettingsSearch_Synonyms_Proxy_UseForCalls: String { return self._s[1535]! } public func Time_PreciseDate_m8(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1534]!, self._r[1534]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[1536]!, self._r[1536]!, [_1, _2, _3]) } - public var Conversation_ContextMenuReply: String { return self._s[1535]! } - public var Contacts_SearchLabel: String { return self._s[1536]! } - public var Forward_ErrorPublicQuizDisabledInChannels: String { return self._s[1537]! } - public var Stats_GroupMessagesTitle: String { return self._s[1539]! } - public var Notification_CallCanceled: String { return self._s[1540]! } - public var VoiceOver_Chat_Selected: String { return self._s[1541]! } - public var NotificationsSound_Tremolo: String { return self._s[1543]! } - public var ChatList_Search_NoResultsDescription: String { return self._s[1544]! } - public var AccessDenied_PhotosAndVideos: String { return self._s[1545]! } - public var LogoutOptions_ClearCacheText: String { return self._s[1546]! } - public var ChatListFolder_NameUnread: String { return self._s[1548]! } - public var PeerInfo_ButtonMessage: String { return self._s[1550]! } - public var InfoPlist_NSPhotoLibraryAddUsageDescription: String { return self._s[1551]! } - public var BlockedUsers_SelectUserTitle: String { return self._s[1552]! } - public var ChatSettings_Other: String { return self._s[1553]! } - public var UserInfo_NotificationsEnabled: String { return self._s[1554]! } - public var CreatePoll_OptionsHeader: String { return self._s[1555]! } - public var Appearance_RemoveThemeColorConfirmation: String { return self._s[1558]! } - public var Channel_Moderator_Title: String { return self._s[1559]! } + public var Conversation_ContextMenuReply: String { return self._s[1537]! } + public var Contacts_SearchLabel: String { return self._s[1538]! } + public var Forward_ErrorPublicQuizDisabledInChannels: String { return self._s[1539]! } + public var Stats_GroupMessagesTitle: String { return self._s[1541]! } + public var Notification_CallCanceled: String { return self._s[1542]! } + public var VoiceOver_Chat_Selected: String { return self._s[1543]! } + public var NotificationsSound_Tremolo: String { return self._s[1545]! } + public var ChatList_Search_NoResultsDescription: String { return self._s[1546]! } + public var AccessDenied_PhotosAndVideos: String { return self._s[1547]! } + public var LogoutOptions_ClearCacheText: String { return self._s[1548]! } + public var ChatListFolder_NameUnread: String { return self._s[1550]! } + public var PeerInfo_ButtonMessage: String { return self._s[1552]! } + public var InfoPlist_NSPhotoLibraryAddUsageDescription: String { return self._s[1553]! } + public var BlockedUsers_SelectUserTitle: String { return self._s[1554]! } + public var ChatSettings_Other: String { return self._s[1555]! } + public var UserInfo_NotificationsEnabled: String { return self._s[1556]! } + public var CreatePoll_OptionsHeader: String { return self._s[1557]! } + public var Appearance_RemoveThemeColorConfirmation: String { return self._s[1560]! } + public var Channel_Moderator_Title: String { return self._s[1561]! } public func Conversation_ForwardTooltip_Chat_Many(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1560]!, self._r[1560]!, [_0]) + return formatWithArgumentRanges(self._s[1562]!, self._r[1562]!, [_0]) } - public var Channel_AdminLog_MessageRestrictedForever: String { return self._s[1561]! } - public var WallpaperColors_Title: String { return self._s[1562]! } - public var InviteLink_InviteLink: String { return self._s[1564]! } - public var PrivacyPolicy_DeclineMessage: String { return self._s[1565]! } - public var AutoDownloadSettings_VoiceMessagesTitle: String { return self._s[1566]! } - public var Your_card_was_declined: String { return self._s[1567]! } - public var SettingsSearch_FAQ: String { return self._s[1569]! } - public var EditTheme_Expand_Preview_IncomingReplyName: String { return self._s[1570]! } - public var Conversation_ReportSpamConfirmation: String { return self._s[1571]! } - public var OwnershipTransfer_SecurityCheck: String { return self._s[1573]! } - public var PrivacySettings_DataSettingsHelp: String { return self._s[1574]! } - public var Settings_About_Help: String { return self._s[1575]! } + public var Channel_AdminLog_MessageRestrictedForever: String { return self._s[1563]! } + public var WallpaperColors_Title: String { return self._s[1564]! } + public var InviteLink_InviteLink: String { return self._s[1566]! } + public var PrivacyPolicy_DeclineMessage: String { return self._s[1567]! } + public var AutoDownloadSettings_VoiceMessagesTitle: String { return self._s[1568]! } + public var Your_card_was_declined: String { return self._s[1569]! } + public var SettingsSearch_FAQ: String { return self._s[1571]! } + public var EditTheme_Expand_Preview_IncomingReplyName: String { return self._s[1572]! } + public var Conversation_ReportSpamConfirmation: String { return self._s[1573]! } + public var OwnershipTransfer_SecurityCheck: String { return self._s[1575]! } + public var PrivacySettings_DataSettingsHelp: String { return self._s[1576]! } + public var Settings_About_Help: String { return self._s[1577]! } public func Channel_DiscussionGroup_HeaderGroupSet(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1576]!, self._r[1576]!, [_0]) + return formatWithArgumentRanges(self._s[1578]!, self._r[1578]!, [_0]) } - public var Settings_Proxy: String { return self._s[1577]! } - public var TwoStepAuth_ResetAccountConfirmation: String { return self._s[1578]! } - public var Passport_Identity_TypePassportUploadScan: String { return self._s[1580]! } - public var NotificationsSound_Bell: String { return self._s[1581]! } - public var PrivacySettings_Title: String { return self._s[1583]! } - public var PrivacySettings_DataSettings: String { return self._s[1584]! } - public var ConversationMedia_Title: String { return self._s[1585]! } + public var Settings_Proxy: String { return self._s[1579]! } + public var TwoStepAuth_ResetAccountConfirmation: String { return self._s[1580]! } + public var Passport_Identity_TypePassportUploadScan: String { return self._s[1582]! } + public var NotificationsSound_Bell: String { return self._s[1583]! } + public var PrivacySettings_Title: String { return self._s[1585]! } + public var PrivacySettings_DataSettings: String { return self._s[1586]! } + public var ConversationMedia_Title: String { return self._s[1587]! } public func Conversation_EncryptedPlaceholderTitleIncoming(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1586]!, self._r[1586]!, [_0]) + return formatWithArgumentRanges(self._s[1588]!, self._r[1588]!, [_0]) } - public var PrivacySettings_BlockedPeersEmpty: String { return self._s[1587]! } - public var ReportPeer_ReasonPornography: String { return self._s[1589]! } - public var Privacy_Calls: String { return self._s[1590]! } - public var TwoFactorSetup_Email_Text: String { return self._s[1591]! } - public var Conversation_EncryptedDescriptionTitle: String { return self._s[1592]! } + public var PrivacySettings_BlockedPeersEmpty: String { return self._s[1589]! } + public var ReportPeer_ReasonPornography: String { return self._s[1591]! } + public var Privacy_Calls: String { return self._s[1592]! } + public var TwoFactorSetup_Email_Text: String { return self._s[1593]! } + public var Conversation_EncryptedDescriptionTitle: String { return self._s[1594]! } public func VoiceOver_Chat_MusicTitle(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1593]!, self._r[1593]!, [_1, _2]) + return formatWithArgumentRanges(self._s[1595]!, self._r[1595]!, [_1, _2]) } - public var Passport_Identity_FrontSideHelp: String { return self._s[1594]! } - public var GroupInfo_Permissions_SlowmodeHeader: String { return self._s[1596]! } - public var ContactList_Context_VideoCall: String { return self._s[1597]! } - public var Settings_SaveIncomingPhotos: String { return self._s[1598]! } - public var Passport_Identity_MiddleName: String { return self._s[1599]! } - public var MessagePoll_QuizNoUsers: String { return self._s[1600]! } + public var Passport_Identity_FrontSideHelp: String { return self._s[1596]! } + public var GroupInfo_Permissions_SlowmodeHeader: String { return self._s[1598]! } + public var ContactList_Context_VideoCall: String { return self._s[1599]! } + public var Settings_SaveIncomingPhotos: String { return self._s[1600]! } + public var Passport_Identity_MiddleName: String { return self._s[1601]! } + public var MessagePoll_QuizNoUsers: String { return self._s[1602]! } public func Channel_AdminLog_MutedParticipant(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1601]!, self._r[1601]!, [_1, _2]) + return formatWithArgumentRanges(self._s[1603]!, self._r[1603]!, [_1, _2]) } - public var OldChannels_ChannelFormat: String { return self._s[1602]! } - public var Watch_Message_Call: String { return self._s[1603]! } - public var Wallpaper_Title: String { return self._s[1604]! } - public var PasscodeSettings_TurnPasscodeOff: String { return self._s[1605]! } - public var IntentsSettings_SuggestedChatsSavedMessages: String { return self._s[1606]! } - public var ReportGroupLocation_Text: String { return self._s[1607]! } - public var InviteText_URL: String { return self._s[1608]! } - public var ClearCache_StorageServiceFiles: String { return self._s[1609]! } - public var MessageTimer_Custom: String { return self._s[1610]! } - public var Message_PinnedLocationMessage: String { return self._s[1611]! } + public var OldChannels_ChannelFormat: String { return self._s[1604]! } + public var Watch_Message_Call: String { return self._s[1605]! } + public var Wallpaper_Title: String { return self._s[1606]! } + public var PasscodeSettings_TurnPasscodeOff: String { return self._s[1607]! } + public var IntentsSettings_SuggestedChatsSavedMessages: String { return self._s[1608]! } + public var ReportGroupLocation_Text: String { return self._s[1609]! } + public var InviteText_URL: String { return self._s[1610]! } + public var ClearCache_StorageServiceFiles: String { return self._s[1611]! } + public var MessageTimer_Custom: String { return self._s[1612]! } + public var Message_PinnedLocationMessage: String { return self._s[1613]! } public func VoiceOver_Chat_ContactOrganization(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1612]!, self._r[1612]!, [_0]) + return formatWithArgumentRanges(self._s[1614]!, self._r[1614]!, [_0]) } - public var EditTheme_UploadNewTheme: String { return self._s[1613]! } - public var ChatImportActivity_ErrorLimitExceeded: String { return self._s[1616]! } + public var EditTheme_UploadNewTheme: String { return self._s[1615]! } + public var ChatImportActivity_ErrorLimitExceeded: String { return self._s[1618]! } public func AutoDownloadSettings_UpToForAll(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1617]!, self._r[1617]!, [_0]) + return formatWithArgumentRanges(self._s[1619]!, self._r[1619]!, [_0]) } - public var Login_CodeSentCall: String { return self._s[1619]! } - public var Conversation_Report: String { return self._s[1620]! } - public var NotificationSettings_ContactJoined: String { return self._s[1621]! } - public var ChannelIntro_ConvertToChannel: String { return self._s[1622]! } + public var Login_CodeSentCall: String { return self._s[1621]! } + public var Conversation_Report: String { return self._s[1622]! } + public var NotificationSettings_ContactJoined: String { return self._s[1623]! } + public var ChannelIntro_ConvertToChannel: String { return self._s[1624]! } public func PUSH_MESSAGE_SCREENSHOT(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1623]!, self._r[1623]!, [_1]) + return formatWithArgumentRanges(self._s[1625]!, self._r[1625]!, [_1]) } - public var StickerPacksSettings_ShowStickersButtonHelp: String { return self._s[1624]! } - public var IntentsSettings_SuggestByAll: String { return self._s[1625]! } - public var StickerPacksSettings_ShowStickersButton: String { return self._s[1626]! } - public var AuthSessions_Title: String { return self._s[1627]! } + public var StickerPacksSettings_ShowStickersButtonHelp: String { return self._s[1626]! } + public var IntentsSettings_SuggestByAll: String { return self._s[1627]! } + public var StickerPacksSettings_ShowStickersButton: String { return self._s[1628]! } + public var AuthSessions_Title: String { return self._s[1629]! } public func Notification_VoiceChatEnded(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1628]!, self._r[1628]!, [_0]) + return formatWithArgumentRanges(self._s[1630]!, self._r[1630]!, [_0]) } - public var Channel_AdminLog_TitleAllEvents: String { return self._s[1629]! } - public var KeyCommand_JumpToNextUnreadChat: String { return self._s[1630]! } - public var Passport_Address_AddPassportRegistration: String { return self._s[1634]! } - public var AutoDownloadSettings_MaxVideoSize: String { return self._s[1635]! } - public var ExplicitContent_AlertTitle: String { return self._s[1636]! } - public var Channel_UpdatePhotoItem: String { return self._s[1637]! } - public var ChatList_AutoarchiveSuggestion_Text: String { return self._s[1639]! } - public var Channel_DiscussionGroup_LinkGroup: String { return self._s[1640]! } + public var Channel_AdminLog_TitleAllEvents: String { return self._s[1631]! } + public var KeyCommand_JumpToNextUnreadChat: String { return self._s[1632]! } + public var Passport_Address_AddPassportRegistration: String { return self._s[1636]! } + public var AutoDownloadSettings_MaxVideoSize: String { return self._s[1637]! } + public var ExplicitContent_AlertTitle: String { return self._s[1638]! } + public var Channel_UpdatePhotoItem: String { return self._s[1639]! } + public var ChatList_AutoarchiveSuggestion_Text: String { return self._s[1641]! } + public var Channel_DiscussionGroup_LinkGroup: String { return self._s[1642]! } public func Call_BatteryLow(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1641]!, self._r[1641]!, [_0]) + return formatWithArgumentRanges(self._s[1643]!, self._r[1643]!, [_0]) } - public var Login_HaveNotReceivedCodeInternal: String { return self._s[1642]! } - public var WallpaperPreview_PatternPaternApply: String { return self._s[1643]! } - public var Notifications_MessageNotificationsSound: String { return self._s[1644]! } - public var CommentsGroup_ErrorAccessDenied: String { return self._s[1645]! } - public var Appearance_AccentColor: String { return self._s[1647]! } - public var GroupInfo_SharedMedia: String { return self._s[1648]! } - public var Login_PhonePlaceholder: String { return self._s[1649]! } - public var Appearance_TextSize_Automatic: String { return self._s[1650]! } - public var EmptyGroupInfo_Line2: String { return self._s[1651]! } + public var Login_HaveNotReceivedCodeInternal: String { return self._s[1644]! } + public var WallpaperPreview_PatternPaternApply: String { return self._s[1645]! } + public var Notifications_MessageNotificationsSound: String { return self._s[1646]! } + public var CommentsGroup_ErrorAccessDenied: String { return self._s[1647]! } + public var Appearance_AccentColor: String { return self._s[1649]! } + public var GroupInfo_SharedMedia: String { return self._s[1650]! } + public var Login_PhonePlaceholder: String { return self._s[1651]! } + public var Appearance_TextSize_Automatic: String { return self._s[1652]! } + public var EmptyGroupInfo_Line2: String { return self._s[1653]! } public func PUSH_CHAT_CREATED(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1652]!, self._r[1652]!, [_1, _2]) + return formatWithArgumentRanges(self._s[1654]!, self._r[1654]!, [_1, _2]) } - public var Appearance_AppIconDefaultX: String { return self._s[1654]! } - public var EditProfile_NameAndPhotoOrVideoHelp: String { return self._s[1655]! } - public var CheckoutInfo_ShippingInfoPostcodePlaceholder: String { return self._s[1656]! } - public var Notifications_GroupNotificationsHelp: String { return self._s[1657]! } + public var Appearance_AppIconDefaultX: String { return self._s[1656]! } + public var EditProfile_NameAndPhotoOrVideoHelp: String { return self._s[1657]! } + public var CheckoutInfo_ShippingInfoPostcodePlaceholder: String { return self._s[1658]! } + public var Notifications_GroupNotificationsHelp: String { return self._s[1659]! } public func PUSH_CHAT_MESSAGE_NOTEXT(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1658]!, self._r[1658]!, [_1, _2]) + return formatWithArgumentRanges(self._s[1660]!, self._r[1660]!, [_1, _2]) } - public var ChatList_EmptyChatListEditFilter: String { return self._s[1659]! } - public var ChatSettings_ConnectionType_UseProxy: String { return self._s[1662]! } - public var Chat_PinnedMessagesHiddenText: String { return self._s[1663]! } + public var ChatList_EmptyChatListEditFilter: String { return self._s[1661]! } + public var ChatSettings_ConnectionType_UseProxy: String { return self._s[1664]! } + public var Chat_PinnedMessagesHiddenText: String { return self._s[1665]! } public func Message_PinnedGenericMessage(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1664]!, self._r[1664]!, [_0]) + return formatWithArgumentRanges(self._s[1666]!, self._r[1666]!, [_0]) } public func Location_ProximityTip(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1665]!, self._r[1665]!, [_0]) + return formatWithArgumentRanges(self._s[1667]!, self._r[1667]!, [_0]) } - public var UserInfo_NotificationsEnable: String { return self._s[1666]! } - public var Checkout_PayWithTouchId: String { return self._s[1667]! } - public var SharedMedia_ViewInChat: String { return self._s[1668]! } + public var UserInfo_NotificationsEnable: String { return self._s[1668]! } + public var Checkout_PayWithTouchId: String { return self._s[1669]! } + public var SharedMedia_ViewInChat: String { return self._s[1670]! } public func Notification_CreatedChatWithTitle(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1669]!, self._r[1669]!, [_0, _1]) + return formatWithArgumentRanges(self._s[1671]!, self._r[1671]!, [_0, _1]) } - public var ChatSettings_AutoDownloadSettings_OffForAll: String { return self._s[1670]! } + public var ChatSettings_AutoDownloadSettings_OffForAll: String { return self._s[1672]! } public func Channel_DiscussionGroup_PublicChannelLink(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1671]!, self._r[1671]!, [_1, _2]) + return formatWithArgumentRanges(self._s[1673]!, self._r[1673]!, [_1, _2]) } public func Cache_Clear(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1673]!, self._r[1673]!, [_0]) + return formatWithArgumentRanges(self._s[1675]!, self._r[1675]!, [_0]) } - public var ConvertToChannel_ConfirmationAlert_Text: String { return self._s[1675]! } - public var Conversation_PeerNearbyText: String { return self._s[1676]! } - public var Conversation_StopPollConfirmationTitle: String { return self._s[1677]! } - public var PhotoEditor_Skip: String { return self._s[1678]! } - public var SettingsSearch_Synonyms_Appearance_ChatBackground_SetColor: String { return self._s[1679]! } - public var ChatList_EmptyChatList: String { return self._s[1680]! } - public var Channel_BanUser_Unban: String { return self._s[1681]! } + public var ConvertToChannel_ConfirmationAlert_Text: String { return self._s[1677]! } + public var Conversation_PeerNearbyText: String { return self._s[1678]! } + public var Conversation_StopPollConfirmationTitle: String { return self._s[1679]! } + public var PhotoEditor_Skip: String { return self._s[1680]! } + public var SettingsSearch_Synonyms_Appearance_ChatBackground_SetColor: String { return self._s[1681]! } + public var ChatList_EmptyChatList: String { return self._s[1682]! } + public var Channel_BanUser_Unban: String { return self._s[1683]! } public func Message_GenericForwardedPsa(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1682]!, self._r[1682]!, [_0]) + return formatWithArgumentRanges(self._s[1684]!, self._r[1684]!, [_0]) } - public var Appearance_TextSize_Apply: String { return self._s[1683]! } + public var Appearance_TextSize_Apply: String { return self._s[1685]! } public func Conversation_MessageViewCommentsFormat(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1684]!, self._r[1684]!, [_1, _2]) + return formatWithArgumentRanges(self._s[1686]!, self._r[1686]!, [_1, _2]) } - public var Login_InfoFirstNamePlaceholder: String { return self._s[1685]! } - public var TwoStepAuth_HintPlaceholder: String { return self._s[1686]! } - public var TwoStepAuth_EmailSkip: String { return self._s[1688]! } - public var ChatList_UndoArchiveMultipleTitle: String { return self._s[1689]! } - public var TwoFactorSetup_Email_SkipConfirmationTitle: String { return self._s[1690]! } + public var Login_InfoFirstNamePlaceholder: String { return self._s[1687]! } + public var TwoStepAuth_HintPlaceholder: String { return self._s[1688]! } + public var TwoStepAuth_EmailSkip: String { return self._s[1690]! } + public var ChatList_UndoArchiveMultipleTitle: String { return self._s[1691]! } + public var TwoFactorSetup_Email_SkipConfirmationTitle: String { return self._s[1692]! } public func PUSH_MESSAGE_QUIZ(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1691]!, self._r[1691]!, [_1]) + return formatWithArgumentRanges(self._s[1693]!, self._r[1693]!, [_1]) } - public var VoiceOver_Chat_GoToOriginalMessage: String { return self._s[1693]! } - public var State_WaitingForNetwork: String { return self._s[1694]! } - public var AccessDenied_CameraRestricted: String { return self._s[1695]! } - public var ChatSettings_Appearance: String { return self._s[1696]! } - public var ScheduledMessages_BotActionUnavailable: String { return self._s[1697]! } - public var GroupInfo_InviteLink_CopyAlert_Success: String { return self._s[1698]! } - public var Channel_DiscussionGroupAdd: String { return self._s[1699]! } - public var Conversation_SelectMessages: String { return self._s[1701]! } - public var Map_NoPlacesNearby: String { return self._s[1702]! } - public var AuthSessions_IncompleteAttemptsInfo: String { return self._s[1703]! } - public var GroupRemoved_Title: String { return self._s[1704]! } - public var TwoStepAuth_EnterPasswordHelp: String { return self._s[1706]! } - public var VoiceChat_Mute: String { return self._s[1707]! } - public var Paint_Marker: String { return self._s[1708]! } + public var VoiceOver_Chat_GoToOriginalMessage: String { return self._s[1695]! } + public var State_WaitingForNetwork: String { return self._s[1696]! } + public var AccessDenied_CameraRestricted: String { return self._s[1697]! } + public var ChatSettings_Appearance: String { return self._s[1698]! } + public var ScheduledMessages_BotActionUnavailable: String { return self._s[1699]! } + public var GroupInfo_InviteLink_CopyAlert_Success: String { return self._s[1700]! } + public var Channel_DiscussionGroupAdd: String { return self._s[1701]! } + public var Conversation_SelectMessages: String { return self._s[1703]! } + public var Map_NoPlacesNearby: String { return self._s[1704]! } + public var AuthSessions_IncompleteAttemptsInfo: String { return self._s[1705]! } + public var GroupRemoved_Title: String { return self._s[1706]! } + public var TwoStepAuth_EnterPasswordHelp: String { return self._s[1708]! } + public var VoiceChat_Mute: String { return self._s[1709]! } + public var Paint_Marker: String { return self._s[1710]! } public func AddContact_ContactWillBeSharedAfterMutual(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1709]!, self._r[1709]!, [_1]) + return formatWithArgumentRanges(self._s[1711]!, self._r[1711]!, [_1]) } - public var SocksProxySetup_ShareProxyList: String { return self._s[1710]! } - public var GroupInfo_InvitationLinkDoesNotExist: String { return self._s[1711]! } + public var SocksProxySetup_ShareProxyList: String { return self._s[1712]! } + public var GroupInfo_InvitationLinkDoesNotExist: String { return self._s[1713]! } public func VoiceOver_Chat_Size(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1712]!, self._r[1712]!, [_0]) + return formatWithArgumentRanges(self._s[1714]!, self._r[1714]!, [_0]) } - public var EditTheme_ErrorInvalidCharacters: String { return self._s[1713]! } - public var Appearance_ThemePreview_ChatList_7_Name: String { return self._s[1714]! } - public var Notifications_GroupNotificationsAlert: String { return self._s[1715]! } - public var SocksProxySetup_ShareQRCode: String { return self._s[1716]! } - public var Compose_NewGroup: String { return self._s[1717]! } + public var EditTheme_ErrorInvalidCharacters: String { return self._s[1715]! } + public var Appearance_ThemePreview_ChatList_7_Name: String { return self._s[1716]! } + public var Notifications_GroupNotificationsAlert: String { return self._s[1717]! } + public var SocksProxySetup_ShareQRCode: String { return self._s[1718]! } + public var Compose_NewGroup: String { return self._s[1719]! } public func Passport_Address_UploadOneOfScan(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1718]!, self._r[1718]!, [_0]) + return formatWithArgumentRanges(self._s[1720]!, self._r[1720]!, [_0]) } - public var Location_LiveLocationRequired_Description: String { return self._s[1720]! } - public var Conversation_ClearGroupHistory: String { return self._s[1721]! } - public var GroupInfo_InviteLink_Help: String { return self._s[1724]! } - public var Channel_BanUser_BlockFor: String { return self._s[1725]! } - public var Bot_Start: String { return self._s[1726]! } - public var Your_card_has_expired: String { return self._s[1727]! } - public var Channel_About_Title: String { return self._s[1728]! } - public var Passport_Identity_ExpiryDatePlaceholder: String { return self._s[1729]! } - public var SettingsSearch_Synonyms_Notifications_MessageNotificationsExceptions: String { return self._s[1731]! } - public var Conversation_FileDropbox: String { return self._s[1732]! } - public var ChatList_Search_NoResultsFitlerMusic: String { return self._s[1733]! } - public var Month_GenNovember: String { return self._s[1734]! } - public var IntentsSettings_SuggestByShare: String { return self._s[1735]! } + public var Location_LiveLocationRequired_Description: String { return self._s[1722]! } + public var Conversation_ClearGroupHistory: String { return self._s[1723]! } + public var GroupInfo_InviteLink_Help: String { return self._s[1726]! } + public var Channel_BanUser_BlockFor: String { return self._s[1727]! } + public var Bot_Start: String { return self._s[1728]! } + public var Your_card_has_expired: String { return self._s[1729]! } + public var Channel_About_Title: String { return self._s[1730]! } + public var Passport_Identity_ExpiryDatePlaceholder: String { return self._s[1731]! } + public var SettingsSearch_Synonyms_Notifications_MessageNotificationsExceptions: String { return self._s[1733]! } + public var Conversation_FileDropbox: String { return self._s[1734]! } + public var ChatList_Search_NoResultsFitlerMusic: String { return self._s[1735]! } + public var Month_GenNovember: String { return self._s[1736]! } + public var IntentsSettings_SuggestByShare: String { return self._s[1737]! } public func Call_PrivacyErrorMessage(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1736]!, self._r[1736]!, [_0]) + return formatWithArgumentRanges(self._s[1738]!, self._r[1738]!, [_0]) } - public var StickerPack_Add: String { return self._s[1737]! } - public var Theme_ErrorNotFound: String { return self._s[1738]! } - public var ConvertToChannel_ConfirmationAlert_Proceed: String { return self._s[1739]! } - public var Wallpaper_SearchShort: String { return self._s[1741]! } - public var Channel_BanUser_PermissionsHeader: String { return self._s[1742]! } - public var ConversationProfile_UsersTooMuchError: String { return self._s[1743]! } - public var ChatList_FolderAllChats: String { return self._s[1744]! } - public var VoiceChat_EndConfirmationEnd: String { return self._s[1745]! } - public var Passport_Authorize: String { return self._s[1746]! } + public var StickerPack_Add: String { return self._s[1739]! } + public var Theme_ErrorNotFound: String { return self._s[1740]! } + public var ConvertToChannel_ConfirmationAlert_Proceed: String { return self._s[1741]! } + public var Wallpaper_SearchShort: String { return self._s[1743]! } + public var Channel_BanUser_PermissionsHeader: String { return self._s[1744]! } + public var ConversationProfile_UsersTooMuchError: String { return self._s[1745]! } + public var ChatList_FolderAllChats: String { return self._s[1746]! } + public var VoiceChat_EndConfirmationEnd: String { return self._s[1747]! } + public var Passport_Authorize: String { return self._s[1748]! } public func Channel_AdminLog_MessageChangedLinkedChannel(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1747]!, self._r[1747]!, [_1, _2]) + return formatWithArgumentRanges(self._s[1749]!, self._r[1749]!, [_1, _2]) } - public var GroupInfo_GroupHistoryVisible: String { return self._s[1748]! } + public var GroupInfo_GroupHistoryVisible: String { return self._s[1750]! } public func PUSH_MESSAGE_VIDEO(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1749]!, self._r[1749]!, [_1]) + return formatWithArgumentRanges(self._s[1751]!, self._r[1751]!, [_1]) } - public var LocalGroup_ButtonTitle: String { return self._s[1750]! } - public var UserInfo_GroupsInCommon: String { return self._s[1752]! } - public var LoginPassword_Title: String { return self._s[1754]! } - public var Wallpaper_Set: String { return self._s[1755]! } - public var Stats_InteractionsTitle: String { return self._s[1756]! } + public var LocalGroup_ButtonTitle: String { return self._s[1752]! } + public var UserInfo_GroupsInCommon: String { return self._s[1754]! } + public var LoginPassword_Title: String { return self._s[1756]! } + public var Wallpaper_Set: String { return self._s[1757]! } + public var Stats_InteractionsTitle: String { return self._s[1758]! } public func SecretGIF_NotViewedYet(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1758]!, self._r[1758]!, [_0]) + return formatWithArgumentRanges(self._s[1760]!, self._r[1760]!, [_0]) } - public var Conversation_MessageDialogEdit: String { return self._s[1759]! } - public var Paint_Outlined: String { return self._s[1760]! } - public var VoiceChat_Rec: String { return self._s[1761]! } + public var Conversation_MessageDialogEdit: String { return self._s[1761]! } + public var Paint_Outlined: String { return self._s[1762]! } + public var VoiceChat_Rec: String { return self._s[1763]! } public func Login_ResetAccountProtected_Text(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1762]!, self._r[1762]!, [_0]) + return formatWithArgumentRanges(self._s[1764]!, self._r[1764]!, [_0]) } public func Conversation_SetReminder_RemindTomorrow(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1763]!, self._r[1763]!, [_0]) + return formatWithArgumentRanges(self._s[1765]!, self._r[1765]!, [_0]) } - public var Invite_LargeRecipientsCountWarning: String { return self._s[1764]! } - public var Passport_Address_Street1Placeholder: String { return self._s[1765]! } - public var Appearance_ColorThemeNight: String { return self._s[1766]! } - public var ChannelInfo_Stats: String { return self._s[1767]! } - public var TwoStepAuth_RecoveryTitle: String { return self._s[1768]! } - public var MediaPicker_TimerTooltip: String { return self._s[1769]! } - public var ChatImportActivity_ErrorNotAdmin: String { return self._s[1770]! } - public var Common_ChoosePhoto: String { return self._s[1771]! } - public var Media_LimitedAccessTitle: String { return self._s[1772]! } - public var ChatSettings_AutoDownloadVideos: String { return self._s[1773]! } - public var PeerInfo_PaneGroups: String { return self._s[1774]! } - public var SocksProxySetup_UsernamePlaceholder: String { return self._s[1776]! } - public var ChangePhoneNumberNumber_Title: String { return self._s[1777]! } - public var ContactInfo_PhoneLabelMobile: String { return self._s[1778]! } - public var OldChannels_ChannelsHeader: String { return self._s[1779]! } - public var MuteFor_Forever: String { return self._s[1780]! } - public var Passport_Address_PostcodePlaceholder: String { return self._s[1781]! } - public var SettingsSearch_Synonyms_Appearance_ChatBackground: String { return self._s[1782]! } - public var MessagePoll_LabelAnonymous: String { return self._s[1783]! } - public var ContactInfo_Job: String { return self._s[1784]! } - public var Passport_Language_mk: String { return self._s[1785]! } - public var EditTheme_ShortLink: String { return self._s[1786]! } - public var AutoDownloadSettings_PhotosTitle: String { return self._s[1788]! } - public var Month_GenApril: String { return self._s[1790]! } - public var Channel_DiscussionGroup_HeaderLabel: String { return self._s[1792]! } - public var NetworkUsageSettings_TotalSection: String { return self._s[1793]! } - public var EditTheme_Create_Preview_OutgoingText: String { return self._s[1794]! } - public var EditTheme_Title: String { return self._s[1795]! } - public var Conversation_LinkDialogCopy: String { return self._s[1796]! } + public var Invite_LargeRecipientsCountWarning: String { return self._s[1766]! } + public var Passport_Address_Street1Placeholder: String { return self._s[1767]! } + public var Appearance_ColorThemeNight: String { return self._s[1768]! } + public var ChannelInfo_Stats: String { return self._s[1769]! } + public var TwoStepAuth_RecoveryTitle: String { return self._s[1770]! } + public var MediaPicker_TimerTooltip: String { return self._s[1771]! } + public var ChatImportActivity_ErrorNotAdmin: String { return self._s[1772]! } + public var Common_ChoosePhoto: String { return self._s[1773]! } + public var Media_LimitedAccessTitle: String { return self._s[1774]! } + public var ChatSettings_AutoDownloadVideos: String { return self._s[1775]! } + public var PeerInfo_PaneGroups: String { return self._s[1776]! } + public var SocksProxySetup_UsernamePlaceholder: String { return self._s[1778]! } + public var ChangePhoneNumberNumber_Title: String { return self._s[1779]! } + public var ContactInfo_PhoneLabelMobile: String { return self._s[1780]! } + public var OldChannels_ChannelsHeader: String { return self._s[1781]! } + public var MuteFor_Forever: String { return self._s[1782]! } + public var Passport_Address_PostcodePlaceholder: String { return self._s[1783]! } + public var SettingsSearch_Synonyms_Appearance_ChatBackground: String { return self._s[1784]! } + public var MessagePoll_LabelAnonymous: String { return self._s[1785]! } + public var ContactInfo_Job: String { return self._s[1786]! } + public var Passport_Language_mk: String { return self._s[1787]! } + public var EditTheme_ShortLink: String { return self._s[1788]! } + public var AutoDownloadSettings_PhotosTitle: String { return self._s[1790]! } + public var Month_GenApril: String { return self._s[1792]! } + public var Channel_DiscussionGroup_HeaderLabel: String { return self._s[1794]! } + public var NetworkUsageSettings_TotalSection: String { return self._s[1795]! } + public var EditTheme_Create_Preview_OutgoingText: String { return self._s[1796]! } + public var EditTheme_Title: String { return self._s[1797]! } + public var Conversation_LinkDialogCopy: String { return self._s[1798]! } public func Channel_AdminLog_MessageInvitedNameUsername(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1797]!, self._r[1797]!, [_1, _2]) + return formatWithArgumentRanges(self._s[1799]!, self._r[1799]!, [_1, _2]) } - public var Passport_ForgottenPassword: String { return self._s[1798]! } - public var WallpaperSearch_Recent: String { return self._s[1799]! } - public var ChatSettings_Title: String { return self._s[1804]! } - public var Appearance_ReduceMotionInfo: String { return self._s[1805]! } + public var Passport_ForgottenPassword: String { return self._s[1800]! } + public var WallpaperSearch_Recent: String { return self._s[1801]! } + public var ChatSettings_Title: String { return self._s[1806]! } + public var Appearance_ReduceMotionInfo: String { return self._s[1807]! } public func StickerPackActionInfo_AddedText(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1806]!, self._r[1806]!, [_0]) + return formatWithArgumentRanges(self._s[1808]!, self._r[1808]!, [_0]) } - public var SocksProxySetup_UseForCallsHelp: String { return self._s[1807]! } - public var LastSeen_WithinAMonth: String { return self._s[1808]! } - public var VoiceChat_Live: String { return self._s[1809]! } - public var PeerInfo_ButtonCall: String { return self._s[1810]! } - public var SettingsSearch_Synonyms_Appearance_Title: String { return self._s[1811]! } - public var Group_Username_InvalidStartsWithNumber: String { return self._s[1812]! } - public var Call_AudioRouteHide: String { return self._s[1813]! } - public var DialogList_SavedMessages: String { return self._s[1814]! } - public var ChatList_Context_Mute: String { return self._s[1815]! } - public var Conversation_StatusKickedFromChannel: String { return self._s[1816]! } + public var SocksProxySetup_UseForCallsHelp: String { return self._s[1809]! } + public var LastSeen_WithinAMonth: String { return self._s[1810]! } + public var VoiceChat_Live: String { return self._s[1811]! } + public var PeerInfo_ButtonCall: String { return self._s[1812]! } + public var SettingsSearch_Synonyms_Appearance_Title: String { return self._s[1813]! } + public var Group_Username_InvalidStartsWithNumber: String { return self._s[1814]! } + public var Call_AudioRouteHide: String { return self._s[1815]! } + public var DialogList_SavedMessages: String { return self._s[1816]! } + public var ChatList_Context_Mute: String { return self._s[1817]! } + public var Conversation_StatusKickedFromChannel: String { return self._s[1818]! } public func Notification_Exceptions_MutedUntil(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1817]!, self._r[1817]!, [_0]) + return formatWithArgumentRanges(self._s[1819]!, self._r[1819]!, [_0]) } - public var VoiceChat_StatusMutedForYou: String { return self._s[1818]! } - public var Passport_Language_et: String { return self._s[1819]! } - public var Conversation_MessageLeaveCommentShort: String { return self._s[1820]! } - public var PhotoEditor_CropReset: String { return self._s[1821]! } - public var Privacy_GroupsAndChannels_AlwaysAllow: String { return self._s[1822]! } - public var SocksProxySetup_HostnamePlaceholder: String { return self._s[1823]! } - public var CreateGroup_ErrorLocatedGroupsTooMuch: String { return self._s[1824]! } - public var WallpaperSearch_ColorWhite: String { return self._s[1827]! } - public var Channel_AdminLog_CanEditMessages: String { return self._s[1829]! } - public var Privacy_PaymentsClearInfoDoneHelp: String { return self._s[1830]! } - public var Channel_Username_InvalidStartsWithNumber: String { return self._s[1832]! } - public var ConvertToChannel_LimitAlert_LearnMore: String { return self._s[1834]! } - public var CheckoutInfo_ReceiverInfoName: String { return self._s[1835]! } - public var Map_YouAreHere: String { return self._s[1837]! } - public var Core_ServiceUserStatus: String { return self._s[1838]! } - public var Channel_Setup_TypePrivateHelp: String { return self._s[1841]! } - public var VoiceChat_StartRecording: String { return self._s[1842]! } - public var SettingsSearch_Synonyms_Notifications_BadgeCountUnreadMessages: String { return self._s[1843]! } - public var MediaPicker_Videos: String { return self._s[1845]! } - public var Map_LiveLocationFor15Minutes: String { return self._s[1847]! } - public var Passport_Identity_TranslationsHelp: String { return self._s[1848]! } - public var SharedMedia_CategoryMedia: String { return self._s[1849]! } + public var VoiceChat_StatusMutedForYou: String { return self._s[1820]! } + public var Passport_Language_et: String { return self._s[1821]! } + public var Conversation_MessageLeaveCommentShort: String { return self._s[1822]! } + public var PhotoEditor_CropReset: String { return self._s[1823]! } + public var Privacy_GroupsAndChannels_AlwaysAllow: String { return self._s[1824]! } + public var SocksProxySetup_HostnamePlaceholder: String { return self._s[1825]! } + public var CreateGroup_ErrorLocatedGroupsTooMuch: String { return self._s[1826]! } + public var WallpaperSearch_ColorWhite: String { return self._s[1829]! } + public var Channel_AdminLog_CanEditMessages: String { return self._s[1831]! } + public var Privacy_PaymentsClearInfoDoneHelp: String { return self._s[1832]! } + public var Channel_Username_InvalidStartsWithNumber: String { return self._s[1834]! } + public var ConvertToChannel_LimitAlert_LearnMore: String { return self._s[1836]! } + public var CheckoutInfo_ReceiverInfoName: String { return self._s[1837]! } + public var Map_YouAreHere: String { return self._s[1839]! } + public var Core_ServiceUserStatus: String { return self._s[1840]! } + public var Channel_Setup_TypePrivateHelp: String { return self._s[1843]! } + public var VoiceChat_StartRecording: String { return self._s[1844]! } + public var SettingsSearch_Synonyms_Notifications_BadgeCountUnreadMessages: String { return self._s[1845]! } + public var MediaPicker_Videos: String { return self._s[1847]! } + public var Map_LiveLocationFor15Minutes: String { return self._s[1849]! } + public var Passport_Identity_TranslationsHelp: String { return self._s[1850]! } + public var SharedMedia_CategoryMedia: String { return self._s[1851]! } public func MediaPicker_Nof(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1850]!, self._r[1850]!, [_0]) + return formatWithArgumentRanges(self._s[1852]!, self._r[1852]!, [_0]) } - public var ChatSettings_AutoPlayGifs: String { return self._s[1851]! } - public var Passport_Identity_CountryPlaceholder: String { return self._s[1852]! } - public var Bot_GroupStatusDoesNotReadHistory: String { return self._s[1853]! } - public var Notification_Exceptions_RemoveFromExceptions: String { return self._s[1854]! } + public var ChatSettings_AutoPlayGifs: String { return self._s[1853]! } + public var Passport_Identity_CountryPlaceholder: String { return self._s[1854]! } + public var Bot_GroupStatusDoesNotReadHistory: String { return self._s[1855]! } + public var Notification_Exceptions_RemoveFromExceptions: String { return self._s[1856]! } public func Chat_SlowmodeTooltip(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1855]!, self._r[1855]!, [_0]) + return formatWithArgumentRanges(self._s[1857]!, self._r[1857]!, [_0]) } - public var Web_Error: String { return self._s[1856]! } - public var PhotoEditor_SkinTool: String { return self._s[1857]! } - public var ApplyLanguage_UnsufficientDataTitle: String { return self._s[1858]! } - public var ChatSettings_ConnectionType_UseSocks5: String { return self._s[1860]! } - public var PasscodeSettings_Help: String { return self._s[1861]! } - public var Appearance_ColorTheme: String { return self._s[1862]! } + public var Web_Error: String { return self._s[1858]! } + public var PhotoEditor_SkinTool: String { return self._s[1859]! } + public var ApplyLanguage_UnsufficientDataTitle: String { return self._s[1860]! } + public var ChatSettings_ConnectionType_UseSocks5: String { return self._s[1862]! } + public var PasscodeSettings_Help: String { return self._s[1863]! } + public var Appearance_ColorTheme: String { return self._s[1864]! } public func Channel_AdminLog_MessageRestrictedNewSetting(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1863]!, self._r[1863]!, [_0]) + return formatWithArgumentRanges(self._s[1865]!, self._r[1865]!, [_0]) } - public var InviteLink_DeleteAllRevokedLinks: String { return self._s[1864]! } + public var InviteLink_DeleteAllRevokedLinks: String { return self._s[1866]! } public func PUSH_PINNED_GEO(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1865]!, self._r[1865]!, [_1]) + return formatWithArgumentRanges(self._s[1867]!, self._r[1867]!, [_1]) } - public var InviteLink_QRCode_Title: String { return self._s[1866]! } - public var GroupInfo_LeftStatus: String { return self._s[1867]! } - public var EditTheme_Preview: String { return self._s[1868]! } - public var Watch_Suggestion_WhatsUp: String { return self._s[1869]! } + public var InviteLink_QRCode_Title: String { return self._s[1868]! } + public var GroupInfo_LeftStatus: String { return self._s[1869]! } + public var EditTheme_Preview: String { return self._s[1870]! } + public var Watch_Suggestion_WhatsUp: String { return self._s[1871]! } public func AutoDownloadSettings_PreloadVideoInfo(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1870]!, self._r[1870]!, [_0]) + return formatWithArgumentRanges(self._s[1872]!, self._r[1872]!, [_0]) } - public var NotificationsSound_Keys: String { return self._s[1871]! } - public var PasscodeSettings_UnlockWithTouchId: String { return self._s[1872]! } - public var ChatList_Context_MarkAsUnread: String { return self._s[1873]! } - public var DialogList_AdNoticeAlert: String { return self._s[1874]! } - public var UserInfo_Invite: String { return self._s[1875]! } - public var Checkout_Email: String { return self._s[1876]! } - public var Stats_GroupActionsTitle: String { return self._s[1877]! } - public var Coub_TapForSound: String { return self._s[1878]! } - public var Theme_ThemeChangedText: String { return self._s[1879]! } - public var Call_ExternalCallInProgressMessage: String { return self._s[1880]! } - public var Settings_ApplyProxyAlertEnable: String { return self._s[1881]! } - public var ScheduledMessages_ScheduledToday: String { return self._s[1882]! } - public var Channel_AdminLog_DefaultRestrictionsUpdated: String { return self._s[1883]! } - public var Call_ReportIncludeLogDescription: String { return self._s[1884]! } - public var Settings_FrequentlyAskedQuestions: String { return self._s[1886]! } - public var Call_VoiceOver_VoiceCallMissed: String { return self._s[1887]! } - public var Channel_MessagePhotoRemoved: String { return self._s[1888]! } - public var Passport_Email_Delete: String { return self._s[1889]! } + public var NotificationsSound_Keys: String { return self._s[1873]! } + public var PasscodeSettings_UnlockWithTouchId: String { return self._s[1874]! } + public var ChatList_Context_MarkAsUnread: String { return self._s[1875]! } + public var DialogList_AdNoticeAlert: String { return self._s[1876]! } + public var UserInfo_Invite: String { return self._s[1877]! } + public var Checkout_Email: String { return self._s[1878]! } + public var Stats_GroupActionsTitle: String { return self._s[1879]! } + public var Coub_TapForSound: String { return self._s[1880]! } + public var Theme_ThemeChangedText: String { return self._s[1881]! } + public var Call_ExternalCallInProgressMessage: String { return self._s[1882]! } + public var Settings_ApplyProxyAlertEnable: String { return self._s[1883]! } + public var ScheduledMessages_ScheduledToday: String { return self._s[1884]! } + public var Channel_AdminLog_DefaultRestrictionsUpdated: String { return self._s[1885]! } + public var Call_ReportIncludeLogDescription: String { return self._s[1886]! } + public var Settings_FrequentlyAskedQuestions: String { return self._s[1888]! } + public var Call_VoiceOver_VoiceCallMissed: String { return self._s[1889]! } + public var Channel_MessagePhotoRemoved: String { return self._s[1890]! } + public var Passport_Email_Delete: String { return self._s[1891]! } public func PUSH_PINNED_PHOTO(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1890]!, self._r[1890]!, [_1]) + return formatWithArgumentRanges(self._s[1892]!, self._r[1892]!, [_1]) } - public var NotificationSettings_ShowNotificationsAllAccountsInfoOn: String { return self._s[1891]! } - public var Channel_AdminLog_CanAddAdmins: String { return self._s[1892]! } - public var SocksProxySetup_FailedToConnect: String { return self._s[1894]! } - public var SettingsSearch_Synonyms_Data_NetworkUsage: String { return self._s[1895]! } - public var Common_of: String { return self._s[1896]! } - public var VoiceChat_StartRecordingStart: String { return self._s[1897]! } - public var VoiceChat_CreateNewVoiceChatText: String { return self._s[1898]! } - public var PeerInfo_ButtonUnmute: String { return self._s[1901]! } + public var NotificationSettings_ShowNotificationsAllAccountsInfoOn: String { return self._s[1893]! } + public var Channel_AdminLog_CanAddAdmins: String { return self._s[1894]! } + public var SocksProxySetup_FailedToConnect: String { return self._s[1896]! } + public var SettingsSearch_Synonyms_Data_NetworkUsage: String { return self._s[1897]! } + public var Common_of: String { return self._s[1898]! } + public var VoiceChat_StartRecordingStart: String { return self._s[1899]! } + public var VoiceChat_CreateNewVoiceChatText: String { return self._s[1900]! } + public var PeerInfo_ButtonUnmute: String { return self._s[1903]! } public func ChatSettings_AutoDownloadSettings_TypeFile(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1902]!, self._r[1902]!, [_0]) + return formatWithArgumentRanges(self._s[1904]!, self._r[1904]!, [_0]) } - public var ChatList_AddChatsToFolder: String { return self._s[1903]! } - public var Login_ResetAccountProtected_LimitExceeded: String { return self._s[1904]! } - public var Settings_Title: String { return self._s[1906]! } - public var AutoDownloadSettings_Contacts: String { return self._s[1908]! } - public var Appearance_BubbleCornersSetting: String { return self._s[1909]! } - public var InviteLink_OtherAdminsLinks: String { return self._s[1910]! } - public var Privacy_Calls_AlwaysAllow: String { return self._s[1911]! } - public var Privacy_Forwards_AlwaysAllow_Title: String { return self._s[1913]! } - public var WallpaperPreview_CropBottomText: String { return self._s[1914]! } - public var SecretTimer_VideoDescription: String { return self._s[1915]! } - public var WallpaperPreview_Blurred: String { return self._s[1916]! } - public var SettingsSearch_Synonyms_Notifications_GroupNotificationsExceptions: String { return self._s[1917]! } - public var ChatListFolder_ExcludedSectionHeader: String { return self._s[1919]! } - public var ChannelIntro_ConvertCancel: String { return self._s[1920]! } - public var DialogList_PasscodeLockHelp: String { return self._s[1921]! } - public var SocksProxySetup_SecretPlaceholder: String { return self._s[1922]! } - public var NetworkUsageSettings_CallDataSection: String { return self._s[1923]! } - public var TwoStepAuth_PasswordRemovePassportConfirmation: String { return self._s[1924]! } - public var Passport_FieldAddressTranslationHelp: String { return self._s[1925]! } - public var SocksProxySetup_Connection: String { return self._s[1926]! } - public var Passport_Address_TypePassportRegistration: String { return self._s[1927]! } - public var Contacts_PermissionsAllowInSettings: String { return self._s[1928]! } - public var Conversation_Unpin: String { return self._s[1929]! } - public var Notifications_MessageNotificationsExceptionsHelp: String { return self._s[1930]! } - public var TwoFactorSetup_Hint_Placeholder: String { return self._s[1931]! } - public var Call_ReportSkip: String { return self._s[1932]! } + public var ChatList_AddChatsToFolder: String { return self._s[1905]! } + public var Login_ResetAccountProtected_LimitExceeded: String { return self._s[1906]! } + public var Settings_Title: String { return self._s[1908]! } + public var AutoDownloadSettings_Contacts: String { return self._s[1910]! } + public var Appearance_BubbleCornersSetting: String { return self._s[1911]! } + public var InviteLink_OtherAdminsLinks: String { return self._s[1912]! } + public var Privacy_Calls_AlwaysAllow: String { return self._s[1913]! } + public var Privacy_Forwards_AlwaysAllow_Title: String { return self._s[1915]! } + public var WallpaperPreview_CropBottomText: String { return self._s[1916]! } + public var SecretTimer_VideoDescription: String { return self._s[1917]! } + public var WallpaperPreview_Blurred: String { return self._s[1918]! } + public var SettingsSearch_Synonyms_Notifications_GroupNotificationsExceptions: String { return self._s[1919]! } + public var ChatListFolder_ExcludedSectionHeader: String { return self._s[1921]! } + public var ChannelIntro_ConvertCancel: String { return self._s[1922]! } + public var DialogList_PasscodeLockHelp: String { return self._s[1923]! } + public var SocksProxySetup_SecretPlaceholder: String { return self._s[1924]! } + public var NetworkUsageSettings_CallDataSection: String { return self._s[1925]! } + public var TwoStepAuth_PasswordRemovePassportConfirmation: String { return self._s[1926]! } + public var Passport_FieldAddressTranslationHelp: String { return self._s[1927]! } + public var SocksProxySetup_Connection: String { return self._s[1928]! } + public var Passport_Address_TypePassportRegistration: String { return self._s[1929]! } + public var Contacts_PermissionsAllowInSettings: String { return self._s[1930]! } + public var Conversation_Unpin: String { return self._s[1931]! } + public var Notifications_MessageNotificationsExceptionsHelp: String { return self._s[1932]! } + public var TwoFactorSetup_Hint_Placeholder: String { return self._s[1933]! } + public var Call_ReportSkip: String { return self._s[1934]! } public func VoiceOver_Chat_PhotoFrom(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1933]!, self._r[1933]!, [_0]) - } - public func VoiceOver_Chat_Caption(_ _0: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[1935]!, self._r[1935]!, [_0]) } - public var AutoNightTheme_Automatic: String { return self._s[1936]! } - public var Passport_Language_az: String { return self._s[1938]! } + public func VoiceOver_Chat_Caption(_ _0: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[1937]!, self._r[1937]!, [_0]) + } + public var AutoNightTheme_Automatic: String { return self._s[1938]! } + public var Passport_Language_az: String { return self._s[1940]! } public func Conversation_AutoremoveChanged(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1939]!, self._r[1939]!, [_0]) + return formatWithArgumentRanges(self._s[1941]!, self._r[1941]!, [_0]) } - public var SettingsSearch_Synonyms_Data_Storage_ClearCache: String { return self._s[1940]! } - public var Watch_UserInfo_Unmute: String { return self._s[1941]! } - public var Channel_Stickers_YourStickers: String { return self._s[1942]! } - public var Channel_DiscussionGroup_UnlinkChannel: String { return self._s[1943]! } - public var PeerInfo_AutoremoveMessagesDisabled: String { return self._s[1944]! } - public var Tour_Text1: String { return self._s[1945]! } - public var Common_Delete: String { return self._s[1946]! } - public var Settings_EditPhoto: String { return self._s[1947]! } - public var Common_Edit: String { return self._s[1948]! } + public var SettingsSearch_Synonyms_Data_Storage_ClearCache: String { return self._s[1942]! } + public var Watch_UserInfo_Unmute: String { return self._s[1943]! } + public var Channel_Stickers_YourStickers: String { return self._s[1944]! } + public var Channel_DiscussionGroup_UnlinkChannel: String { return self._s[1945]! } + public var PeerInfo_AutoremoveMessagesDisabled: String { return self._s[1946]! } + public var Tour_Text1: String { return self._s[1947]! } + public var Common_Delete: String { return self._s[1948]! } + public var Settings_EditPhoto: String { return self._s[1949]! } + public var Common_Edit: String { return self._s[1950]! } public func Channel_AdminLog_MutedNewMembers(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1950]!, self._r[1950]!, [_1]) + return formatWithArgumentRanges(self._s[1952]!, self._r[1952]!, [_1]) } - public var Passport_Identity_ExpiryDate: String { return self._s[1951]! } - public var ShareMenu_ShareTo: String { return self._s[1952]! } - public var Preview_DeleteGif: String { return self._s[1953]! } - public var WallpaperPreview_PatternPaternDiscard: String { return self._s[1954]! } - public var ChatSettings_AutoDownloadUsingCellular: String { return self._s[1955]! } - public var Conversation_ViewReply: String { return self._s[1956]! } - public var Stats_LoadingText: String { return self._s[1957]! } - public var Channel_EditAdmin_PermissinAddAdminOn: String { return self._s[1958]! } - public var CheckoutInfo_ReceiverInfoEmailPlaceholder: String { return self._s[1959]! } - public var Channel_AdminLog_CanChangeInfo: String { return self._s[1960]! } + public var Passport_Identity_ExpiryDate: String { return self._s[1953]! } + public var ShareMenu_ShareTo: String { return self._s[1954]! } + public var Preview_DeleteGif: String { return self._s[1955]! } + public var WallpaperPreview_PatternPaternDiscard: String { return self._s[1956]! } + public var ChatSettings_AutoDownloadUsingCellular: String { return self._s[1957]! } + public var Conversation_ViewReply: String { return self._s[1958]! } + public var Stats_LoadingText: String { return self._s[1959]! } + public var Channel_EditAdmin_PermissinAddAdminOn: String { return self._s[1960]! } + public var CheckoutInfo_ReceiverInfoEmailPlaceholder: String { return self._s[1961]! } + public var Channel_AdminLog_CanChangeInfo: String { return self._s[1962]! } public func Passport_Phone_UseTelegramNumber(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1961]!, self._r[1961]!, [_0]) + return formatWithArgumentRanges(self._s[1963]!, self._r[1963]!, [_0]) } public func Time_MonthOfYear_m2(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1962]!, self._r[1962]!, [_0]) - } - public func VoiceOver_Chat_VideoMessageFrom(_ _0: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[1964]!, self._r[1964]!, [_0]) } - public var Passport_Address_OneOfTypeRentalAgreement: String { return self._s[1965]! } - public var InviteLink_Share: String { return self._s[1967]! } + public func VoiceOver_Chat_VideoMessageFrom(_ _0: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[1966]!, self._r[1966]!, [_0]) + } + public var Passport_Address_OneOfTypeRentalAgreement: String { return self._s[1967]! } + public var InviteLink_Share: String { return self._s[1969]! } public func Conversation_ImportProgress(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1969]!, self._r[1969]!, [_0]) + return formatWithArgumentRanges(self._s[1971]!, self._r[1971]!, [_0]) } - public var IntentsSettings_MainAccount: String { return self._s[1970]! } - public var Group_MessagePhotoRemoved: String { return self._s[1973]! } - public var Conversation_ContextMenuSelect: String { return self._s[1974]! } - public var GroupInfo_Permissions_Exceptions: String { return self._s[1976]! } - public var GroupRemoved_UsersSectionTitle: String { return self._s[1977]! } - public var Contacts_PermissionsEnable: String { return self._s[1978]! } - public var Channel_EditAdmin_PermissionDeleteMessagesOfOthers: String { return self._s[1979]! } - public var Common_NotNow: String { return self._s[1980]! } - public var Notification_CreatedChannel: String { return self._s[1981]! } - public var Stats_ViewsBySourceTitle: String { return self._s[1983]! } - public var InviteLink_ContextShare: String { return self._s[1984]! } - public var Appearance_AppIconClassic: String { return self._s[1985]! } - public var PhotoEditor_QualityTool: String { return self._s[1986]! } - public var ClearCache_ClearCache: String { return self._s[1987]! } - public var TwoFactorSetup_Password_PlaceholderConfirmPassword: String { return self._s[1988]! } - public var AutoDownloadSettings_Videos: String { return self._s[1989]! } - public var GroupPermission_Duration: String { return self._s[1990]! } - public var ChatList_Read: String { return self._s[1991]! } + public var IntentsSettings_MainAccount: String { return self._s[1972]! } + public var Group_MessagePhotoRemoved: String { return self._s[1975]! } + public var Conversation_ContextMenuSelect: String { return self._s[1976]! } + public var GroupInfo_Permissions_Exceptions: String { return self._s[1978]! } + public var GroupRemoved_UsersSectionTitle: String { return self._s[1979]! } + public var Contacts_PermissionsEnable: String { return self._s[1980]! } + public var Channel_EditAdmin_PermissionDeleteMessagesOfOthers: String { return self._s[1981]! } + public var Common_NotNow: String { return self._s[1982]! } + public var Notification_CreatedChannel: String { return self._s[1983]! } + public var Stats_ViewsBySourceTitle: String { return self._s[1985]! } + public var InviteLink_ContextShare: String { return self._s[1986]! } + public var Appearance_AppIconClassic: String { return self._s[1987]! } + public var PhotoEditor_QualityTool: String { return self._s[1988]! } + public var ClearCache_ClearCache: String { return self._s[1989]! } + public var TwoFactorSetup_Password_PlaceholderConfirmPassword: String { return self._s[1990]! } + public var AutoDownloadSettings_Videos: String { return self._s[1991]! } + public var GroupPermission_Duration: String { return self._s[1992]! } + public var ChatList_Read: String { return self._s[1993]! } public func Group_OwnershipTransfer_DescriptionInfo(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[1992]!, self._r[1992]!, [_1, _2]) + return formatWithArgumentRanges(self._s[1994]!, self._r[1994]!, [_1, _2]) } - public var CallFeedback_Send: String { return self._s[1993]! } - public var Channel_Stickers_Searching: String { return self._s[1994]! } - public var ScheduledMessages_ReminderNotification: String { return self._s[1995]! } - public var FastTwoStepSetup_HintSection: String { return self._s[1996]! } - public var ChatSettings_AutoDownloadVideoMessages: String { return self._s[1997]! } - public var EditTheme_CreateTitle: String { return self._s[1998]! } - public var Application_Name: String { return self._s[1999]! } - public var Paint_Stickers: String { return self._s[2000]! } - public var Appearance_ThemePreview_Chat_1_Text: String { return self._s[2001]! } - public var Call_StatusFailed: String { return self._s[2002]! } - public var Stickers_FavoriteStickers: String { return self._s[2003]! } - public var ClearCache_Clear: String { return self._s[2004]! } - public var Passport_Language_mn: String { return self._s[2005]! } - public var WallpaperPreview_PreviewTopText: String { return self._s[2006]! } - public var LogoutOptions_ClearCacheTitle: String { return self._s[2007]! } - public var Call_VoiceOver_VideoCallOutgoing: String { return self._s[2009]! } - public var TwoFactorSetup_Hint_Text: String { return self._s[2011]! } - public var WallpaperPreview_PatternIntensity: String { return self._s[2012]! } - public var CheckoutInfo_ErrorShippingNotAvailable: String { return self._s[2013]! } - public var Passport_Address_AddBankStatement: String { return self._s[2014]! } + public var CallFeedback_Send: String { return self._s[1995]! } + public var Channel_Stickers_Searching: String { return self._s[1996]! } + public var ScheduledMessages_ReminderNotification: String { return self._s[1997]! } + public var FastTwoStepSetup_HintSection: String { return self._s[1998]! } + public var ChatSettings_AutoDownloadVideoMessages: String { return self._s[1999]! } + public var EditTheme_CreateTitle: String { return self._s[2000]! } + public var Application_Name: String { return self._s[2001]! } + public var Paint_Stickers: String { return self._s[2002]! } + public var Appearance_ThemePreview_Chat_1_Text: String { return self._s[2003]! } + public var Call_StatusFailed: String { return self._s[2004]! } + public var Stickers_FavoriteStickers: String { return self._s[2005]! } + public var ClearCache_Clear: String { return self._s[2006]! } + public var Passport_Language_mn: String { return self._s[2007]! } + public var WallpaperPreview_PreviewTopText: String { return self._s[2008]! } + public var LogoutOptions_ClearCacheTitle: String { return self._s[2009]! } + public var Call_VoiceOver_VideoCallOutgoing: String { return self._s[2011]! } + public var TwoFactorSetup_Hint_Text: String { return self._s[2013]! } + public var WallpaperPreview_PatternIntensity: String { return self._s[2014]! } + public var CheckoutInfo_ErrorShippingNotAvailable: String { return self._s[2015]! } + public var Passport_Address_AddBankStatement: String { return self._s[2016]! } public func Conversation_TitleRepliesFormat(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2017]!, self._r[2017]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2019]!, self._r[2019]!, [_1, _2]) } - public var ChatListFolderSettings_RecommendedNewFolder: String { return self._s[2018]! } - public var UserInfo_ShareContact: String { return self._s[2019]! } - public var Passport_Identity_NamePlaceholder: String { return self._s[2020]! } - public var Channel_ErrorAdminsTooMuch: String { return self._s[2022]! } - public var Call_RateCall: String { return self._s[2023]! } - public var Contacts_AccessDeniedError: String { return self._s[2024]! } - public var Invite_ChannelsTooMuch: String { return self._s[2025]! } - public var CheckoutInfo_ShippingInfoPostcode: String { return self._s[2026]! } - public var Channel_BanUser_PermissionReadMessages: String { return self._s[2027]! } - public var InviteLink_Create_TimeLimitInfo: String { return self._s[2028]! } - public var Cache_NoLimit: String { return self._s[2030]! } - public var Conversation_EmptyPlaceholder: String { return self._s[2034]! } - public var Privacy_GroupsAndChannels_AlwaysAllow_Placeholder: String { return self._s[2035]! } - public var GroupRemoved_RemoveInfo: String { return self._s[2037]! } - public var Privacy_Calls_IntegrationHelp: String { return self._s[2038]! } + public var ChatListFolderSettings_RecommendedNewFolder: String { return self._s[2020]! } + public var UserInfo_ShareContact: String { return self._s[2021]! } + public var Passport_Identity_NamePlaceholder: String { return self._s[2022]! } + public var Channel_ErrorAdminsTooMuch: String { return self._s[2024]! } + public var Call_RateCall: String { return self._s[2025]! } + public var Contacts_AccessDeniedError: String { return self._s[2026]! } + public var Invite_ChannelsTooMuch: String { return self._s[2027]! } + public var CheckoutInfo_ShippingInfoPostcode: String { return self._s[2028]! } + public var Channel_BanUser_PermissionReadMessages: String { return self._s[2029]! } + public var InviteLink_Create_TimeLimitInfo: String { return self._s[2030]! } + public var Cache_NoLimit: String { return self._s[2032]! } + public var Conversation_EmptyPlaceholder: String { return self._s[2036]! } + public var Privacy_GroupsAndChannels_AlwaysAllow_Placeholder: String { return self._s[2037]! } + public var GroupRemoved_RemoveInfo: String { return self._s[2039]! } + public var Privacy_Calls_IntegrationHelp: String { return self._s[2040]! } public func PUSH_VIDEO_CALL_MISSED(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2039]!, self._r[2039]!, [_1]) + return formatWithArgumentRanges(self._s[2041]!, self._r[2041]!, [_1]) } - public var VoiceOver_Media_PlaybackRateFast: String { return self._s[2040]! } - public var Theme_ThemeChanged: String { return self._s[2041]! } - public var Privacy_GroupsAndChannels_NeverAllow: String { return self._s[2043]! } - public var AutoDownloadSettings_MediaTypes: String { return self._s[2044]! } + public var VoiceOver_Media_PlaybackRateFast: String { return self._s[2042]! } + public var Theme_ThemeChanged: String { return self._s[2043]! } + public var Privacy_GroupsAndChannels_NeverAllow: String { return self._s[2045]! } + public var AutoDownloadSettings_MediaTypes: String { return self._s[2046]! } public func Notification_PinnedDocumentMessage(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2045]!, self._r[2045]!, [_0]) + return formatWithArgumentRanges(self._s[2047]!, self._r[2047]!, [_0]) } - public var Channel_AdminLog_InfoPanelTitle: String { return self._s[2046]! } - public var Passport_Language_da: String { return self._s[2048]! } - public var Chat_SlowmodeSendError: String { return self._s[2049]! } - public var Application_Update: String { return self._s[2051]! } - public var SocksProxySetup_SaveProxy: String { return self._s[2052]! } + public var Channel_AdminLog_InfoPanelTitle: String { return self._s[2048]! } + public var Passport_Language_da: String { return self._s[2050]! } + public var Chat_SlowmodeSendError: String { return self._s[2051]! } + public var Application_Update: String { return self._s[2053]! } + public var SocksProxySetup_SaveProxy: String { return self._s[2054]! } public func PUSH_AUTH_REGION(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2053]!, self._r[2053]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2055]!, self._r[2055]!, [_1, _2]) } - public var Privacy_AddNewPeer: String { return self._s[2055]! } - public var Channel_DiscussionGroup_MakeHistoryPublicProceed: String { return self._s[2057]! } - public var Channel_Members_Title: String { return self._s[2058]! } - public var Settings_LogoutConfirmationText: String { return self._s[2059]! } - public var Chat_UnsendMyMessages: String { return self._s[2060]! } - public var Conversation_EditingMessageMediaEditCurrentVideo: String { return self._s[2062]! } - public var ChatListFilter_AddChatsTitle: String { return self._s[2063]! } - public var Passport_FloodError: String { return self._s[2064]! } - public var NotificationSettings_ContactJoinedInfo: String { return self._s[2065]! } - public var SettingsSearch_Synonyms_Privacy_Data_SecretChatLinkPreview: String { return self._s[2066]! } - public var CallSettings_TabIconDescription: String { return self._s[2067]! } - public var Group_Setup_HistoryHeader: String { return self._s[2069]! } + public var Privacy_AddNewPeer: String { return self._s[2057]! } + public var Channel_DiscussionGroup_MakeHistoryPublicProceed: String { return self._s[2059]! } + public var Channel_Members_Title: String { return self._s[2060]! } + public var Settings_LogoutConfirmationText: String { return self._s[2061]! } + public var Chat_UnsendMyMessages: String { return self._s[2062]! } + public var PeerInfo_ReportProfilePhoto: String { return self._s[2063]! } + public var Conversation_EditingMessageMediaEditCurrentVideo: String { return self._s[2065]! } + public var ChatListFilter_AddChatsTitle: String { return self._s[2066]! } + public var Passport_FloodError: String { return self._s[2067]! } + public var NotificationSettings_ContactJoinedInfo: String { return self._s[2068]! } + public var SettingsSearch_Synonyms_Privacy_Data_SecretChatLinkPreview: String { return self._s[2069]! } + public var CallSettings_TabIconDescription: String { return self._s[2070]! } + public var Group_Setup_HistoryHeader: String { return self._s[2072]! } public func Channel_AdminLog_AllowedNewMembersToSpeak(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2070]!, self._r[2070]!, [_1]) + return formatWithArgumentRanges(self._s[2073]!, self._r[2073]!, [_1]) } - public var TwoStepAuth_EmailTitle: String { return self._s[2071]! } - public var GroupInfo_Permissions_Removed: String { return self._s[2072]! } - public var DialogList_ClearHistoryConfirmation: String { return self._s[2073]! } - public var Contacts_Title: String { return self._s[2075]! } + public var TwoStepAuth_EmailTitle: String { return self._s[2074]! } + public var GroupInfo_Permissions_Removed: String { return self._s[2075]! } + public var DialogList_ClearHistoryConfirmation: String { return self._s[2076]! } + public var Contacts_Title: String { return self._s[2078]! } public func Notification_Invited(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2076]!, self._r[2076]!, [_0, _1]) + return formatWithArgumentRanges(self._s[2079]!, self._r[2079]!, [_0, _1]) } - public var ChatList_PeerTypeBot: String { return self._s[2079]! } + public var ChatList_PeerTypeBot: String { return self._s[2082]! } public func Channel_AdminLog_SetSlowmode(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2080]!, self._r[2080]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2083]!, self._r[2083]!, [_1, _2]) } - public var Appearance_ThemePreview_Chat_6_Text: String { return self._s[2081]! } + public var Appearance_ThemePreview_Chat_6_Text: String { return self._s[2084]! } public func Time_PreciseDate_m1(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2082]!, self._r[2082]!, [_1, _2, _3]) - } - public var Camera_PhotoMode: String { return self._s[2084]! } - public func PUSH_MESSAGE_GAME_SCORE(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[2085]!, self._r[2085]!, [_1, _2, _3]) } - public var ContactInfo_PhoneLabelPager: String { return self._s[2086]! } - public var SettingsSearch_Synonyms_FAQ: String { return self._s[2087]! } - public var Call_CallAgain: String { return self._s[2088]! } - public var TwoStepAuth_PasswordSet: String { return self._s[2089]! } + public var Camera_PhotoMode: String { return self._s[2087]! } + public func PUSH_MESSAGE_GAME_SCORE(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[2088]!, self._r[2088]!, [_1, _2, _3]) + } + public var ContactInfo_PhoneLabelPager: String { return self._s[2089]! } + public var SettingsSearch_Synonyms_FAQ: String { return self._s[2090]! } + public var Call_CallAgain: String { return self._s[2091]! } + public var TwoStepAuth_PasswordSet: String { return self._s[2092]! } public func Channel_Management_RestrictedBy(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2090]!, self._r[2090]!, [_0]) + return formatWithArgumentRanges(self._s[2093]!, self._r[2093]!, [_0]) } - public var GroupInfo_InviteLink_RevokeAlert_Success: String { return self._s[2091]! } - public var ClearCache_FreeSpaceDescription: String { return self._s[2092]! } - public var Permissions_ContactsAllowInSettings_v0: String { return self._s[2093]! } - public var Group_LeaveGroup: String { return self._s[2094]! } - public var GroupInfo_LabelAdmin: String { return self._s[2097]! } - public var CheckoutInfo_ErrorStateInvalid: String { return self._s[2099]! } - public var Notification_PassportValuePersonalDetails: String { return self._s[2100]! } + public var GroupInfo_InviteLink_RevokeAlert_Success: String { return self._s[2094]! } + public var ClearCache_FreeSpaceDescription: String { return self._s[2095]! } + public var Permissions_ContactsAllowInSettings_v0: String { return self._s[2096]! } + public var Group_LeaveGroup: String { return self._s[2097]! } + public var GroupInfo_LabelAdmin: String { return self._s[2100]! } + public var CheckoutInfo_ErrorStateInvalid: String { return self._s[2102]! } + public var Notification_PassportValuePersonalDetails: String { return self._s[2103]! } public func WebSearch_SearchNoResultsDescription(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2101]!, self._r[2101]!, [_0]) + return formatWithArgumentRanges(self._s[2104]!, self._r[2104]!, [_0]) } - public var Stats_GroupNewMembersBySourceTitle: String { return self._s[2102]! } - public var Appearance_Preview: String { return self._s[2103]! } - public var VoiceOver_Chat_Contact: String { return self._s[2104]! } - public var Passport_Language_th: String { return self._s[2105]! } - public var PhotoEditor_CropAspectRatioOriginal: String { return self._s[2107]! } - public var LastSeen_Offline: String { return self._s[2110]! } - public var Map_OpenInHereMaps: String { return self._s[2111]! } - public var SettingsSearch_Synonyms_Data_AutoplayVideos: String { return self._s[2112]! } - public var InviteLink_ContextEdit: String { return self._s[2114]! } - public var AutoDownloadSettings_Reset: String { return self._s[2115]! } - public var Conversation_SendMessage_SetReminder: String { return self._s[2116]! } - public var Channel_AdminLog_EmptyMessageText: String { return self._s[2117]! } + public var Stats_GroupNewMembersBySourceTitle: String { return self._s[2105]! } + public var Appearance_Preview: String { return self._s[2106]! } + public var VoiceOver_Chat_Contact: String { return self._s[2107]! } + public var Passport_Language_th: String { return self._s[2108]! } + public var PhotoEditor_CropAspectRatioOriginal: String { return self._s[2110]! } + public var LastSeen_Offline: String { return self._s[2113]! } + public var Map_OpenInHereMaps: String { return self._s[2114]! } + public var SettingsSearch_Synonyms_Data_AutoplayVideos: String { return self._s[2115]! } + public var InviteLink_ContextEdit: String { return self._s[2117]! } + public var AutoDownloadSettings_Reset: String { return self._s[2118]! } + public var Conversation_SendMessage_SetReminder: String { return self._s[2119]! } + public var Channel_AdminLog_EmptyMessageText: String { return self._s[2120]! } public func AddContact_StatusSuccess(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2118]!, self._r[2118]!, [_0]) + return formatWithArgumentRanges(self._s[2121]!, self._r[2121]!, [_0]) } public func AuthCode_Alert(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2119]!, self._r[2119]!, [_0]) + return formatWithArgumentRanges(self._s[2122]!, self._r[2122]!, [_0]) } - public var Passport_Identity_EditDriversLicense: String { return self._s[2120]! } - public var ChatListFolder_NameNonMuted: String { return self._s[2121]! } - public var Username_Placeholder: String { return self._s[2122]! } + public var Passport_Identity_EditDriversLicense: String { return self._s[2123]! } + public var ChatListFolder_NameNonMuted: String { return self._s[2124]! } + public var Username_Placeholder: String { return self._s[2125]! } public func PUSH_ALBUM(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2123]!, self._r[2123]!, [_1]) + return formatWithArgumentRanges(self._s[2126]!, self._r[2126]!, [_1]) } - public var Passport_Language_it: String { return self._s[2124]! } - public var Checkout_NewCard_SaveInfo: String { return self._s[2125]! } + public var Passport_Language_it: String { return self._s[2127]! } + public var Checkout_NewCard_SaveInfo: String { return self._s[2128]! } public func Channel_OwnershipTransfer_DescriptionInfo(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2126]!, self._r[2126]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2129]!, self._r[2129]!, [_1, _2]) } - public var NotificationsSound_Pulse: String { return self._s[2127]! } - public var VoiceOver_DismissContextMenu: String { return self._s[2129]! } - public var MessagePoll_NoVotes: String { return self._s[2132]! } - public var Message_Wallpaper: String { return self._s[2133]! } - public var Appearance_Other: String { return self._s[2134]! } - public var Passport_Identity_NativeNameHelp: String { return self._s[2136]! } - public var Group_PublicLink_Placeholder: String { return self._s[2139]! } - public var Appearance_ThemePreview_ChatList_2_Text: String { return self._s[2140]! } - public var VoiceOver_Recording_StopAndPreview: String { return self._s[2141]! } - public var ChatListFolder_NameBots: String { return self._s[2142]! } - public var Conversation_StopPollConfirmation: String { return self._s[2143]! } - public var UserInfo_DeleteContact: String { return self._s[2144]! } + public var NotificationsSound_Pulse: String { return self._s[2130]! } + public var VoiceOver_DismissContextMenu: String { return self._s[2132]! } + public var MessagePoll_NoVotes: String { return self._s[2135]! } + public var Message_Wallpaper: String { return self._s[2136]! } + public var Appearance_Other: String { return self._s[2137]! } + public var Passport_Identity_NativeNameHelp: String { return self._s[2139]! } + public var Group_PublicLink_Placeholder: String { return self._s[2142]! } + public var Appearance_ThemePreview_ChatList_2_Text: String { return self._s[2143]! } + public var VoiceOver_Recording_StopAndPreview: String { return self._s[2144]! } + public var ChatListFolder_NameBots: String { return self._s[2145]! } + public var Conversation_StopPollConfirmation: String { return self._s[2146]! } + public var UserInfo_DeleteContact: String { return self._s[2147]! } public func Time_MonthOfYear_m11(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2145]!, self._r[2145]!, [_0]) + return formatWithArgumentRanges(self._s[2148]!, self._r[2148]!, [_0]) } - public var Wallpaper_Wallpaper: String { return self._s[2147]! } + public var Wallpaper_Wallpaper: String { return self._s[2150]! } public func PUSH_MESSAGE_NOTEXT(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2148]!, self._r[2148]!, [_1]) + return formatWithArgumentRanges(self._s[2151]!, self._r[2151]!, [_1]) } - public var LoginPassword_ForgotPassword: String { return self._s[2149]! } - public var FeaturedStickerPacks_Title: String { return self._s[2150]! } - public var Paint_Pen: String { return self._s[2151]! } - public var Channel_AdminLogFilter_EventsInfo: String { return self._s[2152]! } - public var ChatListFolderSettings_Info: String { return self._s[2153]! } - public var FastTwoStepSetup_HintPlaceholder: String { return self._s[2154]! } - public var PhotoEditor_CurvesAll: String { return self._s[2156]! } + public var LoginPassword_ForgotPassword: String { return self._s[2152]! } + public var FeaturedStickerPacks_Title: String { return self._s[2153]! } + public var Paint_Pen: String { return self._s[2154]! } + public var Channel_AdminLogFilter_EventsInfo: String { return self._s[2155]! } + public var ChatListFolderSettings_Info: String { return self._s[2156]! } + public var FastTwoStepSetup_HintPlaceholder: String { return self._s[2157]! } + public var PhotoEditor_CurvesAll: String { return self._s[2159]! } public func Time_PreciseDate_m12(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2158]!, self._r[2158]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[2161]!, self._r[2161]!, [_1, _2, _3]) } - public var Passport_Address_TypeRentalAgreement: String { return self._s[2160]! } - public var Message_ImageExpired: String { return self._s[2161]! } - public var Call_ConnectionErrorMessage: String { return self._s[2162]! } - public var SearchImages_NoImagesFound: String { return self._s[2164]! } - public var PeerInfo_PaneGifs: String { return self._s[2165]! } - public var Passport_DeletePersonalDetailsConfirmation: String { return self._s[2166]! } - public var EnterPasscode_RepeatNewPasscode: String { return self._s[2167]! } - public var PhotoEditor_VignetteTool: String { return self._s[2168]! } - public var Passport_Language_dz: String { return self._s[2169]! } - public var Notifications_ChannelNotificationsHelp: String { return self._s[2170]! } - public var Conversation_BlockUser: String { return self._s[2171]! } - public var GroupPermission_PermissionDisabledByDefault: String { return self._s[2174]! } - public var Group_OwnershipTransfer_ErrorAdminsTooMuch: String { return self._s[2176]! } + public var Passport_Address_TypeRentalAgreement: String { return self._s[2163]! } + public var Message_ImageExpired: String { return self._s[2164]! } + public var Call_ConnectionErrorMessage: String { return self._s[2165]! } + public var SearchImages_NoImagesFound: String { return self._s[2167]! } + public var PeerInfo_PaneGifs: String { return self._s[2168]! } + public var Passport_DeletePersonalDetailsConfirmation: String { return self._s[2169]! } + public var EnterPasscode_RepeatNewPasscode: String { return self._s[2170]! } + public var PhotoEditor_VignetteTool: String { return self._s[2171]! } + public var Passport_Language_dz: String { return self._s[2172]! } + public var Notifications_ChannelNotificationsHelp: String { return self._s[2173]! } + public var Conversation_BlockUser: String { return self._s[2174]! } + public var GroupPermission_PermissionDisabledByDefault: String { return self._s[2177]! } + public var Group_OwnershipTransfer_ErrorAdminsTooMuch: String { return self._s[2179]! } public func Time_MonthOfYear_m8(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2177]!, self._r[2177]!, [_0]) + return formatWithArgumentRanges(self._s[2180]!, self._r[2180]!, [_0]) } - public var KeyCommand_NewMessage: String { return self._s[2178]! } - public var EditTheme_Edit_Preview_IncomingReplyText: String { return self._s[2181]! } + public var KeyCommand_NewMessage: String { return self._s[2181]! } + public var EditTheme_Edit_Preview_IncomingReplyText: String { return self._s[2184]! } public func PUSH_CHAT_MESSAGE_GEO(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2183]!, self._r[2183]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2186]!, self._r[2186]!, [_1, _2]) } - public var ContactList_Context_StartSecretChat: String { return self._s[2184]! } - public var VoiceOver_Chat_File: String { return self._s[2185]! } - public var ChatList_EditFolder: String { return self._s[2187]! } - public var Appearance_BubbleCorners_Title: String { return self._s[2188]! } - public var PeerInfo_PaneAudio: String { return self._s[2189]! } - public var ChatListFolder_CategoryContacts: String { return self._s[2191]! } + public var ContactList_Context_StartSecretChat: String { return self._s[2187]! } + public var VoiceOver_Chat_File: String { return self._s[2188]! } + public var ChatList_EditFolder: String { return self._s[2190]! } + public var Appearance_BubbleCorners_Title: String { return self._s[2191]! } + public var PeerInfo_PaneAudio: String { return self._s[2192]! } + public var ChatListFolder_CategoryContacts: String { return self._s[2194]! } public func Login_InvalidPhoneEmailBody(_ _1: String, _ _2: String, _ _3: String, _ _4: String, _ _5: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2192]!, self._r[2192]!, [_1, _2, _3, _4, _5]) + return formatWithArgumentRanges(self._s[2195]!, self._r[2195]!, [_1, _2, _3, _4, _5]) } - public var ChatList_PeerTypeChannel: String { return self._s[2193]! } - public var VoiceOver_Navigation_Search: String { return self._s[2194]! } - public var Settings_Search: String { return self._s[2195]! } - public var WallpaperSearch_ColorYellow: String { return self._s[2196]! } - public var Login_PhoneBannedError: String { return self._s[2197]! } - public var KeyCommand_JumpToNextChat: String { return self._s[2198]! } - public var Passport_Language_fa: String { return self._s[2199]! } - public var Settings_About: String { return self._s[2200]! } - public var AutoDownloadSettings_MaxFileSize: String { return self._s[2201]! } - public var Channel_AdminLog_InfoPanelChannelAlertText: String { return self._s[2202]! } - public var AutoDownloadSettings_DataUsageHigh: String { return self._s[2203]! } + public var ChatList_PeerTypeChannel: String { return self._s[2196]! } + public var VoiceOver_Navigation_Search: String { return self._s[2197]! } + public var Settings_Search: String { return self._s[2198]! } + public var WallpaperSearch_ColorYellow: String { return self._s[2199]! } + public var Login_PhoneBannedError: String { return self._s[2200]! } + public var KeyCommand_JumpToNextChat: String { return self._s[2201]! } + public var Passport_Language_fa: String { return self._s[2202]! } + public var Settings_About: String { return self._s[2203]! } + public var AutoDownloadSettings_MaxFileSize: String { return self._s[2204]! } + public var Channel_AdminLog_InfoPanelChannelAlertText: String { return self._s[2205]! } + public var AutoDownloadSettings_DataUsageHigh: String { return self._s[2206]! } public func PUSH_CHAT_MESSAGE_TEXT(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2204]!, self._r[2204]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[2207]!, self._r[2207]!, [_1, _2, _3]) } - public var Common_OK: String { return self._s[2205]! } - public var Contacts_SortBy: String { return self._s[2206]! } - public var AutoNightTheme_PreferredTheme: String { return self._s[2207]! } + public var Common_OK: String { return self._s[2208]! } + public var Contacts_SortBy: String { return self._s[2209]! } + public var AutoNightTheme_PreferredTheme: String { return self._s[2210]! } public func AutoDownloadSettings_OnFor(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2209]!, self._r[2209]!, [_0]) + return formatWithArgumentRanges(self._s[2212]!, self._r[2212]!, [_0]) } - public var CallFeedback_IncludeLogs: String { return self._s[2212]! } + public var CallFeedback_IncludeLogs: String { return self._s[2215]! } public func External_OpenIn(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2213]!, self._r[2213]!, [_0]) + return formatWithArgumentRanges(self._s[2216]!, self._r[2216]!, [_0]) } - public var Passcode_AppLockedAlert: String { return self._s[2215]! } - public var TwoStepAuth_SetupPasswordTitle: String { return self._s[2216]! } - public var Channel_NotificationLoading: String { return self._s[2218]! } - public var Passport_Identity_DocumentNumber: String { return self._s[2219]! } - public var VoiceOver_Chat_PagePreview: String { return self._s[2220]! } - public var VoiceOver_Chat_OpenHint: String { return self._s[2221]! } - public var Weekday_ShortFriday: String { return self._s[2222]! } - public var Conversation_TitleMute: String { return self._s[2223]! } - public var SettingsSearch_Synonyms_Notifications_GroupNotificationsSound: String { return self._s[2224]! } - public var ScheduledMessages_PollUnavailable: String { return self._s[2225]! } - public var DialogList_LanguageTooltip: String { return self._s[2227]! } - public var Channel_AdminLogFilter_EventsPinned: String { return self._s[2228]! } + public var Passcode_AppLockedAlert: String { return self._s[2218]! } + public var TwoStepAuth_SetupPasswordTitle: String { return self._s[2219]! } + public var Channel_NotificationLoading: String { return self._s[2221]! } + public var Passport_Identity_DocumentNumber: String { return self._s[2222]! } + public var VoiceOver_Chat_PagePreview: String { return self._s[2223]! } + public var VoiceOver_Chat_OpenHint: String { return self._s[2224]! } + public var Weekday_ShortFriday: String { return self._s[2225]! } + public var Conversation_TitleMute: String { return self._s[2226]! } + public var SettingsSearch_Synonyms_Notifications_GroupNotificationsSound: String { return self._s[2227]! } + public var ScheduledMessages_PollUnavailable: String { return self._s[2228]! } + public var DialogList_LanguageTooltip: String { return self._s[2230]! } + public var Channel_AdminLogFilter_EventsPinned: String { return self._s[2231]! } public func DialogList_SingleUploadingVideoSuffix(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2229]!, self._r[2229]!, [_0]) + return formatWithArgumentRanges(self._s[2232]!, self._r[2232]!, [_0]) } - public var TwoStepAuth_SetupResendEmailCodeAlert: String { return self._s[2231]! } - public var Privacy_Calls_AlwaysAllow_Title: String { return self._s[2232]! } - public var Settings_EditVideo: String { return self._s[2233]! } - public var VoiceOver_Common_Off: String { return self._s[2234]! } - public var Stickers_FrequentlyUsed: String { return self._s[2235]! } - public var GroupPermission_Title: String { return self._s[2236]! } - public var AccessDenied_VideoMessageCamera: String { return self._s[2237]! } - public var Appearance_ThemeCarouselDay: String { return self._s[2238]! } + public var TwoStepAuth_SetupResendEmailCodeAlert: String { return self._s[2234]! } + public var Privacy_Calls_AlwaysAllow_Title: String { return self._s[2235]! } + public var Settings_EditVideo: String { return self._s[2236]! } + public var VoiceOver_Common_Off: String { return self._s[2237]! } + public var Stickers_FrequentlyUsed: String { return self._s[2238]! } + public var GroupPermission_Title: String { return self._s[2239]! } + public var AccessDenied_VideoMessageCamera: String { return self._s[2240]! } + public var Appearance_ThemeCarouselDay: String { return self._s[2241]! } public func PUSH_CHAT_MESSAGE_AUDIO(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2239]!, self._r[2239]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2242]!, self._r[2242]!, [_1, _2]) } - public var Passport_Identity_DocumentNumberPlaceholder: String { return self._s[2240]! } - public var Tour_Title6: String { return self._s[2241]! } - public var EmptyGroupInfo_Title: String { return self._s[2242]! } + public var Passport_Identity_DocumentNumberPlaceholder: String { return self._s[2243]! } + public var Tour_Title6: String { return self._s[2244]! } + public var EmptyGroupInfo_Title: String { return self._s[2245]! } public func Channel_AdminLog_MessageToggleSignaturesOn(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2243]!, self._r[2243]!, [_0]) + return formatWithArgumentRanges(self._s[2246]!, self._r[2246]!, [_0]) } - public var Passport_Language_sk: String { return self._s[2244]! } - public var VoiceOver_Chat_YourAnonymousPoll: String { return self._s[2245]! } - public var Preview_SaveToCameraRoll: String { return self._s[2246]! } - public var LogoutOptions_SetPasscodeTitle: String { return self._s[2247]! } - public var Passport_Address_TypeUtilityBillUploadScan: String { return self._s[2248]! } - public var Conversation_ContextMenuMore: String { return self._s[2249]! } - public var Conversation_ForwardAuthorHiddenTooltip: String { return self._s[2250]! } - public var Channel_AdminLog_CanBeAnonymous: String { return self._s[2251]! } - public var CallFeedback_ReasonSilentLocal: String { return self._s[2253]! } + public var Passport_Language_sk: String { return self._s[2247]! } + public var VoiceOver_Chat_YourAnonymousPoll: String { return self._s[2248]! } + public var Preview_SaveToCameraRoll: String { return self._s[2249]! } + public var LogoutOptions_SetPasscodeTitle: String { return self._s[2250]! } + public var Passport_Address_TypeUtilityBillUploadScan: String { return self._s[2251]! } + public var Conversation_ContextMenuMore: String { return self._s[2252]! } + public var Conversation_ForwardAuthorHiddenTooltip: String { return self._s[2253]! } + public var Channel_AdminLog_CanBeAnonymous: String { return self._s[2254]! } + public var CallFeedback_ReasonSilentLocal: String { return self._s[2256]! } public func Channel_AdminLog_UnmutedMutedParticipant(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2254]!, self._r[2254]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2257]!, self._r[2257]!, [_1, _2]) } - public var UserInfo_NotificationsDisable: String { return self._s[2255]! } + public var UserInfo_NotificationsDisable: String { return self._s[2258]! } public func Channel_AdminLog_EmptyFilterQueryText(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2257]!, self._r[2257]!, [_0]) + return formatWithArgumentRanges(self._s[2260]!, self._r[2260]!, [_0]) } - public var SettingsSearch_Synonyms_EditProfile_Bio: String { return self._s[2258]! } + public var SettingsSearch_Synonyms_EditProfile_Bio: String { return self._s[2261]! } public func Date_ChatDateHeader(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2260]!, self._r[2260]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2263]!, self._r[2263]!, [_1, _2]) } - public var WallpaperSearch_ColorPrefix: String { return self._s[2261]! } + public var WallpaperSearch_ColorPrefix: String { return self._s[2264]! } public func Message_ForwardedPsa_covid(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2262]!, self._r[2262]!, [_0]) + return formatWithArgumentRanges(self._s[2265]!, self._r[2265]!, [_0]) } - public var Conversation_RestrictedMedia: String { return self._s[2264]! } - public var Group_MessageVideoUpdated: String { return self._s[2265]! } - public var NetworkUsageSettings_ResetStatsConfirmation: String { return self._s[2266]! } - public var GroupInfo_DeleteAndExit: String { return self._s[2267]! } - public var TwoFactorSetup_Email_Action: String { return self._s[2268]! } - public var Media_ShareThisVideo: String { return self._s[2270]! } - public var DialogList_Replies: String { return self._s[2272]! } + public var Conversation_RestrictedMedia: String { return self._s[2267]! } + public var Group_MessageVideoUpdated: String { return self._s[2268]! } + public var NetworkUsageSettings_ResetStatsConfirmation: String { return self._s[2269]! } + public var GroupInfo_DeleteAndExit: String { return self._s[2270]! } + public var TwoFactorSetup_Email_Action: String { return self._s[2271]! } + public var Media_ShareThisVideo: String { return self._s[2273]! } + public var DialogList_Replies: String { return self._s[2275]! } public func Conversation_Moderate_DeleteAllMessages(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2273]!, self._r[2273]!, [_0]) + return formatWithArgumentRanges(self._s[2276]!, self._r[2276]!, [_0]) } - public var CheckoutInfo_ShippingInfoAddress1: String { return self._s[2274]! } - public var Watch_Suggestion_OnMyWay: String { return self._s[2275]! } - public var CheckoutInfo_ShippingInfoAddress2: String { return self._s[2276]! } + public var CheckoutInfo_ShippingInfoAddress1: String { return self._s[2277]! } + public var Watch_Suggestion_OnMyWay: String { return self._s[2278]! } + public var CheckoutInfo_ShippingInfoAddress2: String { return self._s[2279]! } public func PUSH_PINNED_POLL(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2277]!, self._r[2277]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2280]!, self._r[2280]!, [_1, _2]) } public func GroupInfo_InvitationLinkAcceptChannel(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2278]!, self._r[2278]!, [_0]) + return formatWithArgumentRanges(self._s[2281]!, self._r[2281]!, [_0]) } - public var Channel_EditAdmin_PermissinAddAdminOff: String { return self._s[2279]! } - public var ChatAdmins_AllMembersAreAdminsOnHelp: String { return self._s[2280]! } - public var ChatList_Search_NoResultsFitlerMedia: String { return self._s[2281]! } - public var Channel_Members_InviteLink: String { return self._s[2282]! } - public var Conversation_TapAndHoldToRecord: String { return self._s[2283]! } - public var WatchRemote_AlertText: String { return self._s[2284]! } + public var Channel_EditAdmin_PermissinAddAdminOff: String { return self._s[2282]! } + public var ChatAdmins_AllMembersAreAdminsOnHelp: String { return self._s[2283]! } + public var ChatList_Search_NoResultsFitlerMedia: String { return self._s[2284]! } + public var Channel_Members_InviteLink: String { return self._s[2285]! } + public var Conversation_TapAndHoldToRecord: String { return self._s[2286]! } + public var WatchRemote_AlertText: String { return self._s[2287]! } public func Channel_DiscussionGroup_PrivateChannelLink(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2285]!, self._r[2285]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2288]!, self._r[2288]!, [_1, _2]) } - public var Conversation_Pin: String { return self._s[2286]! } - public var InfoPlist_NSMicrophoneUsageDescription: String { return self._s[2287]! } - public var Stickers_RemoveFromFavorites: String { return self._s[2288]! } + public var Conversation_Pin: String { return self._s[2289]! } + public var InfoPlist_NSMicrophoneUsageDescription: String { return self._s[2290]! } + public var Stickers_RemoveFromFavorites: String { return self._s[2291]! } public func Notification_PinnedPollMessage(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2289]!, self._r[2289]!, [_0]) + return formatWithArgumentRanges(self._s[2292]!, self._r[2292]!, [_0]) } - public var Appearance_AppIconFilled: String { return self._s[2290]! } - public var StickerPack_ErrorNotFound: String { return self._s[2291]! } + public var Appearance_AppIconFilled: String { return self._s[2293]! } + public var StickerPack_ErrorNotFound: String { return self._s[2294]! } public func Channel_AdminLog_MessageRestrictedName(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2292]!, self._r[2292]!, [_1]) - } - public var Passport_Identity_AddIdentityCard: String { return self._s[2293]! } - public func PUSH_CHANNEL_MESSAGE_DOC(_ _1: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[2295]!, self._r[2295]!, [_1]) } - public var Call_Camera: String { return self._s[2296]! } - public var GroupInfo_InviteLink_RevokeAlert_Text: String { return self._s[2297]! } - public var Group_Location_Info: String { return self._s[2298]! } - public var Watch_LastSeen_WithinAMonth: String { return self._s[2299]! } - public var UserInfo_NotificationsDefaultEnabled: String { return self._s[2300]! } + public var Passport_Identity_AddIdentityCard: String { return self._s[2296]! } + public func PUSH_CHANNEL_MESSAGE_DOC(_ _1: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[2298]!, self._r[2298]!, [_1]) + } + public var Call_Camera: String { return self._s[2299]! } + public var GroupInfo_InviteLink_RevokeAlert_Text: String { return self._s[2300]! } + public var Group_Location_Info: String { return self._s[2301]! } + public var Watch_LastSeen_WithinAMonth: String { return self._s[2302]! } + public var UserInfo_NotificationsDefaultEnabled: String { return self._s[2303]! } public func DialogList_PinLimitError(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2301]!, self._r[2301]!, [_0]) + return formatWithArgumentRanges(self._s[2304]!, self._r[2304]!, [_0]) } - public var Weekday_Yesterday: String { return self._s[2302]! } - public var TwoStepAuth_SetupPasswordEnterPasswordNew: String { return self._s[2303]! } - public var InviteLink_Create_UsersLimit: String { return self._s[2304]! } - public var ArchivedPacksAlert_Title: String { return self._s[2305]! } - public var PeerInfo_PaneMembers: String { return self._s[2306]! } - public var PhotoEditor_SelectCoverFrame: String { return self._s[2307]! } + public var Weekday_Yesterday: String { return self._s[2305]! } + public var TwoStepAuth_SetupPasswordEnterPasswordNew: String { return self._s[2306]! } + public var InviteLink_Create_UsersLimit: String { return self._s[2307]! } + public var ArchivedPacksAlert_Title: String { return self._s[2308]! } + public var PeerInfo_PaneMembers: String { return self._s[2309]! } + public var PhotoEditor_SelectCoverFrame: String { return self._s[2310]! } public func Location_ProximityAlertSetTextGroup(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2308]!, self._r[2308]!, [_0]) + return formatWithArgumentRanges(self._s[2311]!, self._r[2311]!, [_0]) } - public var ContactInfo_PhoneLabelMain: String { return self._s[2309]! } + public var ContactInfo_PhoneLabelMain: String { return self._s[2312]! } public func Time_PreciseDate_m7(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2310]!, self._r[2310]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[2313]!, self._r[2313]!, [_1, _2, _3]) } - public var TwoFactorSetup_EmailVerification_ChangeAction: String { return self._s[2311]! } - public var Channel_DiscussionGroup: String { return self._s[2312]! } - public var EditTheme_Edit_Preview_IncomingReplyName: String { return self._s[2313]! } - public var InviteLink_Create_TimeLimit: String { return self._s[2315]! } - public var Channel_EditAdmin_PermissionsHeader: String { return self._s[2316]! } - public var VoiceOver_MessageContextForward: String { return self._s[2317]! } - public var SocksProxySetup_TypeNone: String { return self._s[2318]! } - public var CreatePoll_MultipleChoiceQuizAlert: String { return self._s[2320]! } - public var ProfilePhoto_OpenInEditor: String { return self._s[2322]! } - public var WallpaperSearch_ColorPurple: String { return self._s[2323]! } - public var ChatListFolder_IncludeChatsTitle: String { return self._s[2324]! } - public var Group_Username_InvalidTooShort: String { return self._s[2325]! } - public var Location_ProximityNotification_DistanceM: String { return self._s[2326]! } + public var TwoFactorSetup_EmailVerification_ChangeAction: String { return self._s[2314]! } + public var Channel_DiscussionGroup: String { return self._s[2315]! } + public var EditTheme_Edit_Preview_IncomingReplyName: String { return self._s[2316]! } + public var InviteLink_Create_TimeLimit: String { return self._s[2318]! } + public var Channel_EditAdmin_PermissionsHeader: String { return self._s[2319]! } + public var VoiceOver_MessageContextForward: String { return self._s[2320]! } + public var SocksProxySetup_TypeNone: String { return self._s[2321]! } + public var CreatePoll_MultipleChoiceQuizAlert: String { return self._s[2323]! } + public var ProfilePhoto_OpenInEditor: String { return self._s[2325]! } + public var WallpaperSearch_ColorPurple: String { return self._s[2326]! } + public var ChatListFolder_IncludeChatsTitle: String { return self._s[2327]! } + public var Group_Username_InvalidTooShort: String { return self._s[2328]! } + public var Location_ProximityNotification_DistanceM: String { return self._s[2329]! } public func Login_EmailPhoneBody(_ _0: String, _ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2327]!, self._r[2327]!, [_0, _1, _2]) + return formatWithArgumentRanges(self._s[2330]!, self._r[2330]!, [_0, _1, _2]) } - public var Passport_Language_tk: String { return self._s[2328]! } - public var ConvertToSupergroup_Title: String { return self._s[2329]! } - public var Channel_BanUser_PermissionEmbedLinks: String { return self._s[2330]! } - public var Cache_KeepMediaHelp: String { return self._s[2331]! } - public var Channel_Management_Title: String { return self._s[2332]! } + public var Passport_Language_tk: String { return self._s[2331]! } + public var ConvertToSupergroup_Title: String { return self._s[2332]! } + public var Channel_BanUser_PermissionEmbedLinks: String { return self._s[2333]! } + public var Cache_KeepMediaHelp: String { return self._s[2334]! } + public var Channel_Management_Title: String { return self._s[2335]! } public func PUSH_MESSAGE_PHOTO_SECRET(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2333]!, self._r[2333]!, [_1]) + return formatWithArgumentRanges(self._s[2336]!, self._r[2336]!, [_1]) } - public var Conversation_ForwardChats: String { return self._s[2334]! } - public var Passport_Language_bg: String { return self._s[2335]! } - public var SocksProxySetup_TypeSocks: String { return self._s[2336]! } - public var Permissions_PrivacyPolicy: String { return self._s[2337]! } - public var VoiceOver_Chat_YourMusic: String { return self._s[2338]! } - public var SettingsSearch_Synonyms_Notifications_ResetAllNotifications: String { return self._s[2339]! } - public var Conversation_EmptyGifPanelPlaceholder: String { return self._s[2340]! } - public var Conversation_ContextMenuOpenChannel: String { return self._s[2341]! } - public var Report_AdditionalDetailsPlaceholder: String { return self._s[2342]! } - public var Activity_UploadingVideo: String { return self._s[2343]! } - public var PrivacyPolicy_AgeVerificationAgree: String { return self._s[2345]! } - public var SocksProxySetup_Credentials: String { return self._s[2347]! } - public var Preview_SaveGif: String { return self._s[2348]! } - public var Cache_Photos: String { return self._s[2349]! } - public var Channel_AdminLogFilter_EventsCalls: String { return self._s[2350]! } - public var Conversation_ContextMenuCancelEditing: String { return self._s[2351]! } - public var Contacts_FailedToSendInvitesMessage: String { return self._s[2352]! } - public var Passport_Language_lt: String { return self._s[2353]! } - public var Passport_DeleteDocument: String { return self._s[2355]! } - public var GroupInfo_SetGroupPhotoStop: String { return self._s[2356]! } + public var Conversation_ForwardChats: String { return self._s[2337]! } + public var Passport_Language_bg: String { return self._s[2338]! } + public var SocksProxySetup_TypeSocks: String { return self._s[2339]! } + public var Permissions_PrivacyPolicy: String { return self._s[2340]! } + public var VoiceOver_Chat_YourMusic: String { return self._s[2341]! } + public var SettingsSearch_Synonyms_Notifications_ResetAllNotifications: String { return self._s[2342]! } + public var Conversation_EmptyGifPanelPlaceholder: String { return self._s[2343]! } + public var Conversation_ContextMenuOpenChannel: String { return self._s[2344]! } + public var Report_AdditionalDetailsPlaceholder: String { return self._s[2345]! } + public var Activity_UploadingVideo: String { return self._s[2346]! } + public var PrivacyPolicy_AgeVerificationAgree: String { return self._s[2348]! } + public var SocksProxySetup_Credentials: String { return self._s[2350]! } + public var Preview_SaveGif: String { return self._s[2351]! } + public var Cache_Photos: String { return self._s[2352]! } + public var Channel_AdminLogFilter_EventsCalls: String { return self._s[2353]! } + public var Conversation_ContextMenuCancelEditing: String { return self._s[2354]! } + public var Contacts_FailedToSendInvitesMessage: String { return self._s[2355]! } + public var Passport_Language_lt: String { return self._s[2356]! } + public var Passport_DeleteDocument: String { return self._s[2358]! } + public var GroupInfo_SetGroupPhotoStop: String { return self._s[2359]! } public func Location_ProximityNotification_NotifyLong(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2357]!, self._r[2357]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2360]!, self._r[2360]!, [_1, _2]) } - public var AccessDenied_VideoMessageMicrophone: String { return self._s[2358]! } + public var AccessDenied_VideoMessageMicrophone: String { return self._s[2361]! } public func PeopleNearby_VisibleUntil(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2359]!, self._r[2359]!, [_0]) + return formatWithArgumentRanges(self._s[2362]!, self._r[2362]!, [_0]) } - public var AccessDenied_VideoCallCamera: String { return self._s[2360]! } + public var AccessDenied_VideoCallCamera: String { return self._s[2363]! } public func Channel_AdminLog_MessageDeleted(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2361]!, self._r[2361]!, [_0]) + return formatWithArgumentRanges(self._s[2364]!, self._r[2364]!, [_0]) } - public var PhotoEditor_SharpenTool: String { return self._s[2362]! } + public var PhotoEditor_SharpenTool: String { return self._s[2365]! } public func PUSH_CHANNEL_MESSAGE_AUDIO(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2363]!, self._r[2363]!, [_1]) + return formatWithArgumentRanges(self._s[2366]!, self._r[2366]!, [_1]) } - public var DialogList_Unpin: String { return self._s[2364]! } - public var Stickers_NoStickersFound: String { return self._s[2365]! } - public var UserInfo_AddContact: String { return self._s[2367]! } + public var DialogList_Unpin: String { return self._s[2367]! } + public var Stickers_NoStickersFound: String { return self._s[2368]! } + public var UserInfo_AddContact: String { return self._s[2370]! } public func AddContact_SharedContactExceptionInfo(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2369]!, self._r[2369]!, [_0]) + return formatWithArgumentRanges(self._s[2372]!, self._r[2372]!, [_0]) } public func Notification_PinnedLocationMessage(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2370]!, self._r[2370]!, [_0]) + return formatWithArgumentRanges(self._s[2373]!, self._r[2373]!, [_0]) } - public var CallFeedback_VideoReasonDistorted: String { return self._s[2371]! } - public var Tour_Text2: String { return self._s[2372]! } + public var CallFeedback_VideoReasonDistorted: String { return self._s[2374]! } + public var Tour_Text2: String { return self._s[2375]! } public func Conversation_TitleCommentsFormat(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2374]!, self._r[2374]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2377]!, self._r[2377]!, [_1, _2]) } - public var InviteLink_DeleteAllRevokedLinksAlert_Text: String { return self._s[2376]! } - public var Paint_Delete: String { return self._s[2377]! } + public var InviteLink_DeleteAllRevokedLinksAlert_Text: String { return self._s[2379]! } + public var Paint_Delete: String { return self._s[2380]! } public func Call_VoiceChatInProgressMessage(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2378]!, self._r[2378]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2381]!, self._r[2381]!, [_1, _2]) } - public var SettingsSearch_Synonyms_Notifications_InAppNotificationsVibrate: String { return self._s[2379]! } + public var SettingsSearch_Synonyms_Notifications_InAppNotificationsVibrate: String { return self._s[2382]! } public func PrivacySettings_LastSeenEverybodyMinus(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2381]!, self._r[2381]!, [_0]) + return formatWithArgumentRanges(self._s[2384]!, self._r[2384]!, [_0]) } - public var Privacy_Calls_NeverAllow_Title: String { return self._s[2382]! } - public var Notification_CallOutgoingShort: String { return self._s[2383]! } - public var Checkout_PasswordEntry_Title: String { return self._s[2384]! } - public var Channel_AdminLogFilter_AdminsAll: String { return self._s[2385]! } - public var Notification_MessageLifetime1m: String { return self._s[2386]! } - public var BlockedUsers_AddNew: String { return self._s[2388]! } - public var FastTwoStepSetup_EmailSection: String { return self._s[2389]! } - public var Settings_SaveEditedPhotos: String { return self._s[2390]! } - public var GroupInfo_GroupNamePlaceholder: String { return self._s[2391]! } - public var Channel_AboutItem: String { return self._s[2392]! } - public var GroupInfo_InviteLink_RevokeLink: String { return self._s[2393]! } - public var Privacy_Calls_P2PNever: String { return self._s[2395]! } - public var Passport_Language_uk: String { return self._s[2396]! } - public var NetworkUsageSettings_Wifi: String { return self._s[2397]! } - public var Conversation_Moderate_Report: String { return self._s[2398]! } - public var Wallpaper_ResetWallpapersConfirmation: String { return self._s[2399]! } - public var VoiceOver_Chat_SeenByRecipients: String { return self._s[2400]! } - public var Permissions_SiriText_v0: String { return self._s[2401]! } - public var Theme_Colors_Background: String { return self._s[2402]! } - public var Notification_CallMissed: String { return self._s[2403]! } - public var Stats_ZoomOut: String { return self._s[2404]! } - public var Profile_AddToExisting: String { return self._s[2405]! } - public var Passport_FieldAddressUploadHelp: String { return self._s[2408]! } - public var VoiceChat_RemovePeerRemove: String { return self._s[2409]! } - public var Undo_DeletedChannel: String { return self._s[2410]! } + public var Privacy_Calls_NeverAllow_Title: String { return self._s[2385]! } + public var Notification_CallOutgoingShort: String { return self._s[2386]! } + public var Checkout_PasswordEntry_Title: String { return self._s[2387]! } + public var Channel_AdminLogFilter_AdminsAll: String { return self._s[2388]! } + public var Notification_MessageLifetime1m: String { return self._s[2389]! } + public var BlockedUsers_AddNew: String { return self._s[2391]! } + public var FastTwoStepSetup_EmailSection: String { return self._s[2392]! } + public var Settings_SaveEditedPhotos: String { return self._s[2393]! } + public var GroupInfo_GroupNamePlaceholder: String { return self._s[2394]! } + public var Channel_AboutItem: String { return self._s[2395]! } + public var GroupInfo_InviteLink_RevokeLink: String { return self._s[2396]! } + public var Privacy_Calls_P2PNever: String { return self._s[2398]! } + public var Passport_Language_uk: String { return self._s[2399]! } + public var NetworkUsageSettings_Wifi: String { return self._s[2400]! } + public var Conversation_Moderate_Report: String { return self._s[2401]! } + public var Wallpaper_ResetWallpapersConfirmation: String { return self._s[2402]! } + public var VoiceOver_Chat_SeenByRecipients: String { return self._s[2403]! } + public var Permissions_SiriText_v0: String { return self._s[2404]! } + public var Theme_Colors_Background: String { return self._s[2405]! } + public var Notification_CallMissed: String { return self._s[2406]! } + public var Stats_ZoomOut: String { return self._s[2407]! } + public var Profile_AddToExisting: String { return self._s[2408]! } + public var Passport_FieldAddressUploadHelp: String { return self._s[2411]! } + public var VoiceChat_RemovePeerRemove: String { return self._s[2412]! } + public var Undo_DeletedChannel: String { return self._s[2413]! } public func Channel_AdminLog_MessagePinned(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2411]!, self._r[2411]!, [_0]) + return formatWithArgumentRanges(self._s[2414]!, self._r[2414]!, [_0]) } - public var Login_ResetAccountProtected_TimerTitle: String { return self._s[2412]! } - public var Map_LiveLocationGroupDescription: String { return self._s[2413]! } - public var Passport_InfoFAQ_URL: String { return self._s[2414]! } - public var IntentsSettings_SuggestedChats: String { return self._s[2416]! } + public var Login_ResetAccountProtected_TimerTitle: String { return self._s[2415]! } + public var Map_LiveLocationGroupDescription: String { return self._s[2416]! } + public var Passport_InfoFAQ_URL: String { return self._s[2417]! } + public var IntentsSettings_SuggestedChats: String { return self._s[2419]! } public func PUSH_MESSAGE_DOC(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2417]!, self._r[2417]!, [_1]) + return formatWithArgumentRanges(self._s[2420]!, self._r[2420]!, [_1]) } - public var State_connecting: String { return self._s[2418]! } - public var Passport_Identity_Country: String { return self._s[2419]! } - public var Passport_PasswordDescription: String { return self._s[2420]! } - public var ChatList_PsaLabel_covid: String { return self._s[2421]! } + public var State_connecting: String { return self._s[2421]! } + public var Passport_Identity_Country: String { return self._s[2422]! } + public var Passport_PasswordDescription: String { return self._s[2423]! } + public var ChatList_PsaLabel_covid: String { return self._s[2424]! } public func PUSH_MESSAGE(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2422]!, self._r[2422]!, [_1]) + return formatWithArgumentRanges(self._s[2425]!, self._r[2425]!, [_1]) } - public var Contacts_AddPeopleNearby: String { return self._s[2423]! } - public var OwnershipTransfer_SetupTwoStepAuth: String { return self._s[2424]! } - public var ClearCache_Description: String { return self._s[2425]! } - public var Localization_LanguageName: String { return self._s[2426]! } + public var Contacts_AddPeopleNearby: String { return self._s[2426]! } + public var OwnershipTransfer_SetupTwoStepAuth: String { return self._s[2427]! } + public var ClearCache_Description: String { return self._s[2428]! } + public var Localization_LanguageName: String { return self._s[2429]! } public func UserInfo_UnblockConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2427]!, self._r[2427]!, [_0]) + return formatWithArgumentRanges(self._s[2430]!, self._r[2430]!, [_0]) } - public var Conversation_AddMembers: String { return self._s[2428]! } - public var ChatList_TabIconFoldersTooltipEmptyFolders: String { return self._s[2429]! } - public var UserInfo_CreateNewContact: String { return self._s[2430]! } - public var Channel_Stickers_NotFound: String { return self._s[2432]! } - public var Watch_Message_Poll: String { return self._s[2433]! } - public var Privacy_Forwards_WhoCanForward: String { return self._s[2434]! } + public var Conversation_AddMembers: String { return self._s[2431]! } + public var ChatList_TabIconFoldersTooltipEmptyFolders: String { return self._s[2432]! } + public var UserInfo_CreateNewContact: String { return self._s[2433]! } + public var Channel_Stickers_NotFound: String { return self._s[2435]! } + public var Watch_Message_Poll: String { return self._s[2436]! } + public var Privacy_Forwards_WhoCanForward: String { return self._s[2437]! } public func Notification_Kicked(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2435]!, self._r[2435]!, [_0, _1]) + return formatWithArgumentRanges(self._s[2438]!, self._r[2438]!, [_0, _1]) } - public var Login_InfoDeletePhoto: String { return self._s[2436]! } - public var Appearance_ThemePreview_ChatList_6_Name: String { return self._s[2437]! } - public var InstantPage_FeedbackButton: String { return self._s[2438]! } - public var Appearance_PreviewReplyText: String { return self._s[2439]! } - public var Passport_FieldPhoneHelp: String { return self._s[2440]! } - public var Group_ErrorAddTooMuchBots: String { return self._s[2441]! } - public var Media_SendingOptionsTooltip: String { return self._s[2442]! } - public var ScheduledMessages_ScheduledOnline: String { return self._s[2443]! } - public var Notifications_Badge: String { return self._s[2444]! } - public var VoiceOver_Chat_VideoMessage: String { return self._s[2445]! } - public var TwoStepAuth_RecoveryCodeExpired: String { return self._s[2446]! } + public var Login_InfoDeletePhoto: String { return self._s[2439]! } + public var Appearance_ThemePreview_ChatList_6_Name: String { return self._s[2440]! } + public var InstantPage_FeedbackButton: String { return self._s[2441]! } + public var Appearance_PreviewReplyText: String { return self._s[2442]! } + public var Passport_FieldPhoneHelp: String { return self._s[2443]! } + public var Group_ErrorAddTooMuchBots: String { return self._s[2444]! } + public var Media_SendingOptionsTooltip: String { return self._s[2445]! } + public var ScheduledMessages_ScheduledOnline: String { return self._s[2446]! } + public var Notifications_Badge: String { return self._s[2447]! } + public var VoiceOver_Chat_VideoMessage: String { return self._s[2448]! } + public var TwoStepAuth_RecoveryCodeExpired: String { return self._s[2449]! } public func Notification_PinnedPhotoMessage(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2448]!, self._r[2448]!, [_0]) + return formatWithArgumentRanges(self._s[2451]!, self._r[2451]!, [_0]) } - public var Passport_InfoLearnMore: String { return self._s[2449]! } - public var EnterPasscode_EnterTitle: String { return self._s[2450]! } - public var Appearance_EditTheme: String { return self._s[2451]! } - public var EditTheme_Expand_BottomInfo: String { return self._s[2452]! } - public var Stats_FollowersTitle: String { return self._s[2453]! } - public var Passport_Identity_SurnamePlaceholder: String { return self._s[2454]! } - public var Channel_Subscribers_Title: String { return self._s[2455]! } - public var Group_ErrorSupergroupConversionNotPossible: String { return self._s[2456]! } - public var ChatImportActivity_ErrorGeneric: String { return self._s[2457]! } - public var EditTheme_ThemeTemplateAlertTitle: String { return self._s[2458]! } - public var EditTheme_Create_Preview_IncomingText: String { return self._s[2459]! } - public var Conversation_AddToReadingList: String { return self._s[2460]! } + public var Passport_InfoLearnMore: String { return self._s[2452]! } + public var EnterPasscode_EnterTitle: String { return self._s[2453]! } + public var Appearance_EditTheme: String { return self._s[2454]! } + public var EditTheme_Expand_BottomInfo: String { return self._s[2455]! } + public var Stats_FollowersTitle: String { return self._s[2456]! } + public var Passport_Identity_SurnamePlaceholder: String { return self._s[2457]! } + public var Channel_Subscribers_Title: String { return self._s[2458]! } + public var Group_ErrorSupergroupConversionNotPossible: String { return self._s[2459]! } + public var ChatImportActivity_ErrorGeneric: String { return self._s[2460]! } + public var EditTheme_ThemeTemplateAlertTitle: String { return self._s[2461]! } + public var EditTheme_Create_Preview_IncomingText: String { return self._s[2462]! } + public var Conversation_AddToReadingList: String { return self._s[2463]! } public func Notifications_ExceptionsChangeSound(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2461]!, self._r[2461]!, [_0]) + return formatWithArgumentRanges(self._s[2464]!, self._r[2464]!, [_0]) } - public var Group_AdminLog_EmptyText: String { return self._s[2462]! } - public var Passport_Identity_EditInternalPassport: String { return self._s[2463]! } - public var Watch_Location_Current: String { return self._s[2464]! } - public var PrivacyPolicy_Title: String { return self._s[2465]! } - public var Privacy_GroupsAndChannels_CustomHelp: String { return self._s[2472]! } - public var Channel_TypeSetup_Title: String { return self._s[2476]! } - public var Appearance_PreviewReplyAuthor: String { return self._s[2477]! } - public var Passport_Language_ja: String { return self._s[2478]! } - public var ReportPeer_ReasonSpam: String { return self._s[2479]! } - public var Widget_GalleryDescription: String { return self._s[2480]! } - public var Privacy_PaymentsClearInfoHelp: String { return self._s[2481]! } - public var Conversation_EditingMessageMediaEditCurrentPhoto: String { return self._s[2483]! } - public var Channel_AdminLog_ChangeInfo: String { return self._s[2484]! } - public var ChatListFolder_NameNonContacts: String { return self._s[2485]! } + public var Group_AdminLog_EmptyText: String { return self._s[2465]! } + public var Passport_Identity_EditInternalPassport: String { return self._s[2466]! } + public var Watch_Location_Current: String { return self._s[2467]! } + public var PrivacyPolicy_Title: String { return self._s[2468]! } + public var Privacy_GroupsAndChannels_CustomHelp: String { return self._s[2475]! } + public var Channel_TypeSetup_Title: String { return self._s[2479]! } + public var Appearance_PreviewReplyAuthor: String { return self._s[2480]! } + public var Passport_Language_ja: String { return self._s[2481]! } + public var ReportPeer_ReasonSpam: String { return self._s[2482]! } + public var Widget_GalleryDescription: String { return self._s[2483]! } + public var Privacy_PaymentsClearInfoHelp: String { return self._s[2484]! } + public var Conversation_EditingMessageMediaEditCurrentPhoto: String { return self._s[2486]! } + public var Channel_AdminLog_ChangeInfo: String { return self._s[2487]! } + public var ChatListFolder_NameNonContacts: String { return self._s[2488]! } public func InviteLink_ExpiresIn(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2486]!, self._r[2486]!, [_0]) + return formatWithArgumentRanges(self._s[2489]!, self._r[2489]!, [_0]) } - public var Call_Audio: String { return self._s[2487]! } - public var PhotoEditor_CurvesGreen: String { return self._s[2488]! } - public var ChatList_Search_NoResultsFitlerFiles: String { return self._s[2489]! } - public var Settings_PrivacySettings: String { return self._s[2490]! } - public var InviteLink_UsageLimitReached: String { return self._s[2491]! } - public var Stats_Followers: String { return self._s[2492]! } - public var Notifications_AddExceptionTitle: String { return self._s[2493]! } - public var TwoFactorSetup_Password_Title: String { return self._s[2494]! } - public var ChannelMembers_WhoCanAddMembersAllHelp: String { return self._s[2495]! } - public var OldChannels_NoticeText: String { return self._s[2496]! } - public var Conversation_SavedMessages: String { return self._s[2497]! } + public var Call_Audio: String { return self._s[2490]! } + public var PhotoEditor_CurvesGreen: String { return self._s[2491]! } + public var ChatList_Search_NoResultsFitlerFiles: String { return self._s[2492]! } + public var Settings_PrivacySettings: String { return self._s[2493]! } + public var InviteLink_UsageLimitReached: String { return self._s[2494]! } + public var Stats_Followers: String { return self._s[2495]! } + public var Notifications_AddExceptionTitle: String { return self._s[2496]! } + public var TwoFactorSetup_Password_Title: String { return self._s[2497]! } + public var ChannelMembers_WhoCanAddMembersAllHelp: String { return self._s[2498]! } + public var OldChannels_NoticeText: String { return self._s[2499]! } + public var Conversation_SavedMessages: String { return self._s[2500]! } public func Conversation_PeerNearbyTitle(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2499]!, self._r[2499]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2502]!, self._r[2502]!, [_1, _2]) } - public var Passport_Address_TypeResidentialAddress: String { return self._s[2500]! } - public var Appearance_ThemeNightBlue: String { return self._s[2501]! } - public var Notification_ChannelInviterSelf: String { return self._s[2502]! } - public var Conversation_ForwardTooltip_SavedMessages_Many: String { return self._s[2503]! } - public var InviteLink_Create_TimeLimitExpiryDateNever: String { return self._s[2505]! } - public var Watch_UserInfo_Service: String { return self._s[2506]! } - public var ChatList_Context_Back: String { return self._s[2507]! } - public var Passport_Email_Title: String { return self._s[2508]! } - public var Stats_GroupTopAdmin_Promote: String { return self._s[2509]! } + public var Passport_Address_TypeResidentialAddress: String { return self._s[2503]! } + public var Appearance_ThemeNightBlue: String { return self._s[2504]! } + public var Notification_ChannelInviterSelf: String { return self._s[2505]! } + public var Conversation_ForwardTooltip_SavedMessages_Many: String { return self._s[2506]! } + public var InviteLink_Create_TimeLimitExpiryDateNever: String { return self._s[2508]! } + public var Watch_UserInfo_Service: String { return self._s[2509]! } + public var ChatList_Context_Back: String { return self._s[2510]! } + public var Passport_Email_Title: String { return self._s[2511]! } + public var Stats_GroupTopAdmin_Promote: String { return self._s[2512]! } public func PUSH_PINNED_INVOICE(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2510]!, self._r[2510]!, [_1]) + return formatWithArgumentRanges(self._s[2513]!, self._r[2513]!, [_1]) } - public var Conversation_UnsupportedMedia: String { return self._s[2511]! } - public var Passport_Address_OneOfTypePassportRegistration: String { return self._s[2512]! } - public var Privacy_TopPeersHelp: String { return self._s[2514]! } - public var Privacy_Forwards_AlwaysLink: String { return self._s[2515]! } - public var Notifications_Badge_CountUnreadMessages_InfoOn: String { return self._s[2516]! } - public var Permissions_NotificationsTitle_v0: String { return self._s[2517]! } + public var Conversation_UnsupportedMedia: String { return self._s[2514]! } + public var Passport_Address_OneOfTypePassportRegistration: String { return self._s[2515]! } + public var Privacy_TopPeersHelp: String { return self._s[2517]! } + public var Privacy_Forwards_AlwaysLink: String { return self._s[2518]! } + public var Notifications_Badge_CountUnreadMessages_InfoOn: String { return self._s[2519]! } + public var Permissions_NotificationsTitle_v0: String { return self._s[2520]! } public func Location_ProximityNotification_AlreadyClose(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2518]!, self._r[2518]!, [_0]) + return formatWithArgumentRanges(self._s[2521]!, self._r[2521]!, [_0]) } - public var Notification_PassportValueProofOfAddress: String { return self._s[2519]! } - public var Map_Map: String { return self._s[2520]! } - public var WallpaperSearch_ColorBlue: String { return self._s[2521]! } - public var Privacy_Calls_CustomShareHelp: String { return self._s[2522]! } - public var PhotoEditor_BlurToolRadial: String { return self._s[2523]! } - public var ChatList_Search_FilterMusic: String { return self._s[2524]! } - public var SettingsSearch_Synonyms_Data_AutoplayGifs: String { return self._s[2525]! } - public var Privacy_PaymentsClear_ShippingInfo: String { return self._s[2526]! } - public var Settings_LogoutConfirmationTitle: String { return self._s[2528]! } + public var Notification_PassportValueProofOfAddress: String { return self._s[2522]! } + public var Map_Map: String { return self._s[2523]! } + public var WallpaperSearch_ColorBlue: String { return self._s[2524]! } + public var Privacy_Calls_CustomShareHelp: String { return self._s[2525]! } + public var PhotoEditor_BlurToolRadial: String { return self._s[2526]! } + public var ChatList_Search_FilterMusic: String { return self._s[2527]! } + public var SettingsSearch_Synonyms_Data_AutoplayGifs: String { return self._s[2528]! } + public var Privacy_PaymentsClear_ShippingInfo: String { return self._s[2529]! } + public var Settings_LogoutConfirmationTitle: String { return self._s[2531]! } public func PUSH_CHANNEL_MESSAGE_VIDEOS(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2529]!, self._r[2529]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2532]!, self._r[2532]!, [_1, _2]) } public func Notification_ChangedGroupPhoto(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2530]!, self._r[2530]!, [_0]) + return formatWithArgumentRanges(self._s[2533]!, self._r[2533]!, [_0]) } - public var Channel_Username_RevokeExistingUsernamesInfo: String { return self._s[2531]! } - public var Group_Username_CreatePublicLinkHelp: String { return self._s[2532]! } - public var VoiceOver_ChatList_MessageEmpty: String { return self._s[2535]! } - public var GroupInfo_Location: String { return self._s[2536]! } - public var Passport_Language_ka: String { return self._s[2537]! } + public var Channel_Username_RevokeExistingUsernamesInfo: String { return self._s[2534]! } + public var Group_Username_CreatePublicLinkHelp: String { return self._s[2535]! } + public var VoiceOver_ChatList_MessageEmpty: String { return self._s[2538]! } + public var GroupInfo_Location: String { return self._s[2539]! } + public var Passport_Language_ka: String { return self._s[2540]! } public func TwoStepAuth_SetupPendingEmail(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2538]!, self._r[2538]!, [_0]) + return formatWithArgumentRanges(self._s[2541]!, self._r[2541]!, [_0]) } - public var Conversation_ContextMenuOpenChannelProfile: String { return self._s[2539]! } - public var ChatImport_SelectionConfirmationAlertTitle: String { return self._s[2541]! } - public var ScheduledMessages_ClearAllConfirmation: String { return self._s[2543]! } - public var DialogList_SearchSectionRecent: String { return self._s[2544]! } - public var Passport_Address_OneOfTypeTemporaryRegistration: String { return self._s[2545]! } - public var Conversation_Timer_Send: String { return self._s[2546]! } - public var ChatState_Updating: String { return self._s[2548]! } - public var ChannelMembers_WhoCanAddMembers: String { return self._s[2549]! } - public var ChannelInfo_DeleteGroup: String { return self._s[2550]! } - public var TwoStepAuth_RecoveryFailed: String { return self._s[2551]! } - public var Channel_OwnershipTransfer_EnterPassword: String { return self._s[2552]! } - public var InviteLink_Create_TimeLimitExpiryTime: String { return self._s[2553]! } - public var ChatList_Search_NoResults: String { return self._s[2554]! } - public var ChatListFolderSettings_AddRecommended: String { return self._s[2556]! } - public var ChangePhoneNumberCode_Called: String { return self._s[2557]! } - public var PeerInfo_GroupAboutItem: String { return self._s[2558]! } + public var Conversation_ContextMenuOpenChannelProfile: String { return self._s[2542]! } + public var ChatImport_SelectionConfirmationAlertTitle: String { return self._s[2544]! } + public var ScheduledMessages_ClearAllConfirmation: String { return self._s[2546]! } + public var DialogList_SearchSectionRecent: String { return self._s[2547]! } + public var Passport_Address_OneOfTypeTemporaryRegistration: String { return self._s[2548]! } + public var Conversation_Timer_Send: String { return self._s[2549]! } + public var ChatState_Updating: String { return self._s[2551]! } + public var ChannelMembers_WhoCanAddMembers: String { return self._s[2552]! } + public var ChannelInfo_DeleteGroup: String { return self._s[2553]! } + public var TwoStepAuth_RecoveryFailed: String { return self._s[2554]! } + public var Channel_OwnershipTransfer_EnterPassword: String { return self._s[2555]! } + public var InviteLink_Create_TimeLimitExpiryTime: String { return self._s[2556]! } + public var ChatList_Search_NoResults: String { return self._s[2557]! } + public var ChatListFolderSettings_AddRecommended: String { return self._s[2559]! } + public var ChangePhoneNumberCode_Called: String { return self._s[2560]! } + public var PeerInfo_GroupAboutItem: String { return self._s[2561]! } public func Channel_AdminLog_DeletedInviteLink(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2560]!, self._r[2560]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2563]!, self._r[2563]!, [_1, _2]) } public func LiveLocationUpdated_YesterdayAt(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2561]!, self._r[2561]!, [_0]) + return formatWithArgumentRanges(self._s[2564]!, self._r[2564]!, [_0]) } - public var PrivacySettings_AuthSessions: String { return self._s[2562]! } - public var Passport_Address_Postcode: String { return self._s[2563]! } - public var VoiceOver_Chat_YourVideoMessage: String { return self._s[2564]! } - public var Passport_Address_Street2Placeholder: String { return self._s[2565]! } - public var Group_Location_Title: String { return self._s[2566]! } - public var SettingsSearch_Synonyms_Data_AutoDownloadReset: String { return self._s[2567]! } - public var PeopleNearby_UsersEmpty: String { return self._s[2568]! } - public var Conversation_ContextMenuSpeak: String { return self._s[2570]! } - public var SettingsSearch_Synonyms_Data_Title: String { return self._s[2571]! } + public var PrivacySettings_AuthSessions: String { return self._s[2565]! } + public var Passport_Address_Postcode: String { return self._s[2566]! } + public var VoiceOver_Chat_YourVideoMessage: String { return self._s[2567]! } + public var Passport_Address_Street2Placeholder: String { return self._s[2568]! } + public var Group_Location_Title: String { return self._s[2569]! } + public var SettingsSearch_Synonyms_Data_AutoDownloadReset: String { return self._s[2570]! } + public var PeopleNearby_UsersEmpty: String { return self._s[2571]! } + public var Conversation_ContextMenuSpeak: String { return self._s[2573]! } + public var SettingsSearch_Synonyms_Data_Title: String { return self._s[2574]! } public func Checkout_PasswordEntry_Text(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2573]!, self._r[2573]!, [_0]) + return formatWithArgumentRanges(self._s[2576]!, self._r[2576]!, [_0]) } - public var Proxy_TooltipUnavailable: String { return self._s[2574]! } - public var Map_Search: String { return self._s[2575]! } - public var AutoDownloadSettings_TypeContacts: String { return self._s[2576]! } - public var Conversation_SearchByName_Prefix: String { return self._s[2577]! } + public var Proxy_TooltipUnavailable: String { return self._s[2577]! } + public var Map_Search: String { return self._s[2578]! } + public var AutoDownloadSettings_TypeContacts: String { return self._s[2579]! } + public var Conversation_SearchByName_Prefix: String { return self._s[2580]! } public func Channel_AdminLog_MessageToggleSignaturesOff(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2578]!, self._r[2578]!, [_0]) + return formatWithArgumentRanges(self._s[2581]!, self._r[2581]!, [_0]) } - public var TwoStepAuth_EmailAddSuccess: String { return self._s[2579]! } - public var ProfilePhoto_MainPhoto: String { return self._s[2580]! } - public var SettingsSearch_Synonyms_Notifications_InAppNotificationsSound: String { return self._s[2581]! } - public var SharedMedia_EmptyMusicText: String { return self._s[2582]! } - public var ChatSettings_AutoDownloadPhotos: String { return self._s[2583]! } - public var NetworkUsageSettings_BytesReceived: String { return self._s[2584]! } - public var Channel_AdminLog_EmptyText: String { return self._s[2585]! } - public var Channel_BanUser_PermissionSendMessages: String { return self._s[2586]! } - public var Undo_ChatDeletedForBothSides: String { return self._s[2587]! } - public var Notifications_GroupNotifications: String { return self._s[2588]! } - public var AccessDenied_SaveMedia: String { return self._s[2589]! } - public var InviteLink_Create_Revoke: String { return self._s[2590]! } - public var GroupInfo_LabelOwner: String { return self._s[2591]! } - public var Passport_Language_id: String { return self._s[2592]! } - public var ChatSettings_AutoDownloadTitle: String { return self._s[2593]! } - public var Conversation_UnpinMessageAlert: String { return self._s[2594]! } + public var TwoStepAuth_EmailAddSuccess: String { return self._s[2582]! } + public var ProfilePhoto_MainPhoto: String { return self._s[2583]! } + public var SettingsSearch_Synonyms_Notifications_InAppNotificationsSound: String { return self._s[2584]! } + public var SharedMedia_EmptyMusicText: String { return self._s[2585]! } + public var ChatSettings_AutoDownloadPhotos: String { return self._s[2586]! } + public var NetworkUsageSettings_BytesReceived: String { return self._s[2587]! } + public var Channel_AdminLog_EmptyText: String { return self._s[2588]! } + public var Channel_BanUser_PermissionSendMessages: String { return self._s[2589]! } + public var Undo_ChatDeletedForBothSides: String { return self._s[2590]! } + public var Notifications_GroupNotifications: String { return self._s[2591]! } + public var AccessDenied_SaveMedia: String { return self._s[2592]! } + public var InviteLink_Create_Revoke: String { return self._s[2593]! } + public var GroupInfo_LabelOwner: String { return self._s[2594]! } + public var Passport_Language_id: String { return self._s[2595]! } + public var ChatSettings_AutoDownloadTitle: String { return self._s[2596]! } + public var Conversation_UnpinMessageAlert: String { return self._s[2597]! } public func LiveLocationUpdated_TodayAt(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2595]!, self._r[2595]!, [_0]) - } - public func Call_RemoteVideoPaused(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2596]!, self._r[2596]!, [_0]) - } - public var TwoFactorSetup_Done_Text: String { return self._s[2597]! } - public func LastSeen_AtDate(_ _0: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[2598]!, self._r[2598]!, [_0]) } - public var NetworkUsageSettings_BytesSent: String { return self._s[2599]! } - public var Conversation_AudioRateTooltipNormal: String { return self._s[2600]! } - public var OwnershipTransfer_Transfer: String { return self._s[2601]! } + public func Call_RemoteVideoPaused(_ _0: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[2599]!, self._r[2599]!, [_0]) + } + public var TwoFactorSetup_Done_Text: String { return self._s[2600]! } + public func LastSeen_AtDate(_ _0: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[2601]!, self._r[2601]!, [_0]) + } + public var NetworkUsageSettings_BytesSent: String { return self._s[2602]! } + public var Conversation_AudioRateTooltipNormal: String { return self._s[2603]! } + public var OwnershipTransfer_Transfer: String { return self._s[2604]! } public func Notification_Exceptions_Sound(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2602]!, self._r[2602]!, [_0]) + return formatWithArgumentRanges(self._s[2605]!, self._r[2605]!, [_0]) } - public var Passport_Language_pt: String { return self._s[2603]! } - public var PrivacySettings_WebSessions: String { return self._s[2604]! } - public var PrivacyPolicy_DeclineDeleteNow: String { return self._s[2606]! } - public var TwoFactorSetup_Hint_Title: String { return self._s[2607]! } + public var Passport_Language_pt: String { return self._s[2606]! } + public var PrivacySettings_WebSessions: String { return self._s[2607]! } + public var PrivacyPolicy_DeclineDeleteNow: String { return self._s[2609]! } + public var TwoFactorSetup_Hint_Title: String { return self._s[2610]! } public func Notification_Joined(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2608]!, self._r[2608]!, [_0]) + return formatWithArgumentRanges(self._s[2611]!, self._r[2611]!, [_0]) } - public var Group_Username_RemoveExistingUsernamesInfo: String { return self._s[2609]! } - public var PrivacyLastSeenSettings_CustomShareSettings_Delete: String { return self._s[2610]! } - public var AutoNightTheme_Scheduled: String { return self._s[2611]! } - public var CreatePoll_ExplanationHeader: String { return self._s[2612]! } - public var Calls_TabTitle: String { return self._s[2613]! } - public var VoiceChat_RecordingInProgress: String { return self._s[2614]! } - public var ChatList_UndoArchiveHiddenText: String { return self._s[2615]! } - public var Notification_VideoCallCanceled: String { return self._s[2616]! } - public var Login_CodeSentInternal: String { return self._s[2617]! } - public var SettingsSearch_Synonyms_Proxy_AddProxy: String { return self._s[2618]! } - public var Call_RecordingDisabledMessage: String { return self._s[2620]! } + public var Group_Username_RemoveExistingUsernamesInfo: String { return self._s[2612]! } + public var PrivacyLastSeenSettings_CustomShareSettings_Delete: String { return self._s[2613]! } + public var AutoNightTheme_Scheduled: String { return self._s[2614]! } + public var CreatePoll_ExplanationHeader: String { return self._s[2615]! } + public var Calls_TabTitle: String { return self._s[2616]! } + public var VoiceChat_RecordingInProgress: String { return self._s[2617]! } + public var ChatList_UndoArchiveHiddenText: String { return self._s[2618]! } + public var Notification_VideoCallCanceled: String { return self._s[2619]! } + public var Login_CodeSentInternal: String { return self._s[2620]! } + public var SettingsSearch_Synonyms_Proxy_AddProxy: String { return self._s[2621]! } + public var Call_RecordingDisabledMessage: String { return self._s[2623]! } public func VoiceChat_RemovedPeerText(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2621]!, self._r[2621]!, [_0]) + return formatWithArgumentRanges(self._s[2624]!, self._r[2624]!, [_0]) } - public var AutoDownloadSettings_TypeChannels: String { return self._s[2623]! } - public var Channel_Info_Stickers: String { return self._s[2624]! } - public var Passport_DeleteAddressConfirmation: String { return self._s[2625]! } + public var AutoDownloadSettings_TypeChannels: String { return self._s[2626]! } + public var Channel_Info_Stickers: String { return self._s[2627]! } + public var Passport_DeleteAddressConfirmation: String { return self._s[2628]! } public func Conversation_PeerNearbyDistance(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2626]!, self._r[2626]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2629]!, self._r[2629]!, [_1, _2]) } - public var ChannelMembers_WhoCanAddMembers_Admins: String { return self._s[2627]! } + public var ChannelMembers_WhoCanAddMembers_Admins: String { return self._s[2630]! } public func Call_StatusOngoing(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2628]!, self._r[2628]!, [_0]) + return formatWithArgumentRanges(self._s[2631]!, self._r[2631]!, [_0]) } - public var Passport_DiscardMessageTitle: String { return self._s[2629]! } - public var Call_VoiceOver_VideoCallIncoming: String { return self._s[2630]! } - public var Localization_LanguageOther: String { return self._s[2631]! } - public var Conversation_EncryptionCanceled: String { return self._s[2632]! } - public var ChatSettings_AutomaticPhotoDownload: String { return self._s[2633]! } - public var ReportPeer_ReasonFake: String { return self._s[2635]! } + public var Passport_DiscardMessageTitle: String { return self._s[2632]! } + public var Call_VoiceOver_VideoCallIncoming: String { return self._s[2633]! } + public var Localization_LanguageOther: String { return self._s[2634]! } + public var Conversation_EncryptionCanceled: String { return self._s[2635]! } + public var ChatSettings_AutomaticPhotoDownload: String { return self._s[2636]! } + public var ReportPeer_ReasonFake: String { return self._s[2638]! } public func Notification_SecretChatMessageScreenshot(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2636]!, self._r[2636]!, [_0]) + return formatWithArgumentRanges(self._s[2639]!, self._r[2639]!, [_0]) } - public var Target_InviteToGroupErrorAlreadyInvited: String { return self._s[2638]! } - public var SocksProxySetup_SavedProxies: String { return self._s[2639]! } - public var InviteLink_Create_UsersLimitNumberOfUsers: String { return self._s[2640]! } + public var Target_InviteToGroupErrorAlreadyInvited: String { return self._s[2641]! } + public var SocksProxySetup_SavedProxies: String { return self._s[2642]! } + public var InviteLink_Create_UsersLimitNumberOfUsers: String { return self._s[2643]! } public func ApplyLanguage_ChangeLanguageAlreadyActive(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2641]!, self._r[2641]!, [_1]) + return formatWithArgumentRanges(self._s[2644]!, self._r[2644]!, [_1]) } - public var Conversation_ScamWarning: String { return self._s[2643]! } - public var Channel_AdminLog_InfoPanelAlertTitle: String { return self._s[2644]! } - public var LocalGroup_Title: String { return self._s[2645]! } - public var SettingsSearch_Synonyms_Notifications_MessageNotificationsAlert: String { return self._s[2647]! } - public var SettingsSearch_Synonyms_Privacy_PasscodeAndFaceId: String { return self._s[2648]! } - public var Login_PhoneFloodError: String { return self._s[2649]! } - public var Conversation_PinMessageAlert_PinAndNotifyMembers: String { return self._s[2650]! } - public var Username_InvalidTaken: String { return self._s[2652]! } - public var SocksProxySetup_AddProxy: String { return self._s[2654]! } - public var PrivacyLastSeenSettings_WhoCanSeeMyTimestamp: String { return self._s[2655]! } - public var MediaPicker_UngroupDescription: String { return self._s[2656]! } - public var Login_CodeExpired: String { return self._s[2657]! } - public var Localization_ChooseLanguage: String { return self._s[2658]! } - public var Checkout_NewCard_PostcodePlaceholder: String { return self._s[2659]! } + public var Conversation_ScamWarning: String { return self._s[2646]! } + public var Channel_AdminLog_InfoPanelAlertTitle: String { return self._s[2647]! } + public var LocalGroup_Title: String { return self._s[2648]! } + public var SettingsSearch_Synonyms_Notifications_MessageNotificationsAlert: String { return self._s[2650]! } + public var SettingsSearch_Synonyms_Privacy_PasscodeAndFaceId: String { return self._s[2651]! } + public var Login_PhoneFloodError: String { return self._s[2652]! } + public var Conversation_PinMessageAlert_PinAndNotifyMembers: String { return self._s[2653]! } + public var Username_InvalidTaken: String { return self._s[2655]! } + public var SocksProxySetup_AddProxy: String { return self._s[2657]! } + public var PrivacyLastSeenSettings_WhoCanSeeMyTimestamp: String { return self._s[2658]! } + public var MediaPicker_UngroupDescription: String { return self._s[2659]! } + public var Login_CodeExpired: String { return self._s[2660]! } + public var Localization_ChooseLanguage: String { return self._s[2661]! } + public var Checkout_NewCard_PostcodePlaceholder: String { return self._s[2662]! } public func ChangePhone_ErrorOccupied(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2660]!, self._r[2660]!, [_0]) + return formatWithArgumentRanges(self._s[2663]!, self._r[2663]!, [_0]) } public func Channel_DiscussionGroup_HeaderSet(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2661]!, self._r[2661]!, [_0]) + return formatWithArgumentRanges(self._s[2664]!, self._r[2664]!, [_0]) } - public var ReportPeer_ReasonOther_Title: String { return self._s[2663]! } - public var Conversation_ScheduleMessage_Title: String { return self._s[2664]! } + public var ReportPeer_ReasonOther_Title: String { return self._s[2666]! } + public var Conversation_ScheduleMessage_Title: String { return self._s[2667]! } public func VoiceChat_UserInvited(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2665]!, self._r[2665]!, [_0]) + return formatWithArgumentRanges(self._s[2668]!, self._r[2668]!, [_0]) } - public var PeerInfo_ButtonDiscuss: String { return self._s[2666]! } - public var SettingsSearch_Synonyms_Notifications_BadgeIncludeMutedPublicGroups: String { return self._s[2667]! } - public var Call_StatusNoAnswer: String { return self._s[2668]! } - public var ScheduledMessages_DeleteMany: String { return self._s[2670]! } - public var Channel_DiscussionGroupInfo: String { return self._s[2671]! } - public var Conversation_UnarchiveDone: String { return self._s[2672]! } - public var LogoutOptions_AddAccountText: String { return self._s[2673]! } - public var Message_PinnedContactMessage: String { return self._s[2674]! } + public var PeerInfo_ButtonDiscuss: String { return self._s[2669]! } + public var SettingsSearch_Synonyms_Notifications_BadgeIncludeMutedPublicGroups: String { return self._s[2670]! } + public var Call_StatusNoAnswer: String { return self._s[2671]! } + public var ScheduledMessages_DeleteMany: String { return self._s[2673]! } + public var Channel_DiscussionGroupInfo: String { return self._s[2674]! } + public var Conversation_UnarchiveDone: String { return self._s[2675]! } + public var LogoutOptions_AddAccountText: String { return self._s[2676]! } + public var Message_PinnedContactMessage: String { return self._s[2677]! } public func ChatList_DeleteAndLeaveGroupConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2675]!, self._r[2675]!, [_0]) + return formatWithArgumentRanges(self._s[2678]!, self._r[2678]!, [_0]) } public func FileSize_GB(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2677]!, self._r[2677]!, [_0]) + return formatWithArgumentRanges(self._s[2680]!, self._r[2680]!, [_0]) } - public var Stats_GroupLanguagesTitle: String { return self._s[2678]! } - public var Passport_FieldAddressHelp: String { return self._s[2679]! } + public var Stats_GroupLanguagesTitle: String { return self._s[2681]! } + public var Passport_FieldAddressHelp: String { return self._s[2682]! } public func Passport_FieldOneOf_Or(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2680]!, self._r[2680]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2683]!, self._r[2683]!, [_1, _2]) } - public var ChatSettings_OpenLinksIn: String { return self._s[2682]! } - public var TwoFactorSetup_Hint_SkipAction: String { return self._s[2683]! } - public var Message_Photo: String { return self._s[2684]! } - public var Media_LimitedAccessManage: String { return self._s[2686]! } - public var MediaPicker_AddCaption: String { return self._s[2687]! } - public var LogoutOptions_Title: String { return self._s[2688]! } + public var ChatSettings_OpenLinksIn: String { return self._s[2685]! } + public var TwoFactorSetup_Hint_SkipAction: String { return self._s[2686]! } + public var Message_Photo: String { return self._s[2687]! } + public var Media_LimitedAccessManage: String { return self._s[2689]! } + public var MediaPicker_AddCaption: String { return self._s[2690]! } + public var LogoutOptions_Title: String { return self._s[2691]! } public func PUSH_PINNED_GIF(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2689]!, self._r[2689]!, [_1]) + return formatWithArgumentRanges(self._s[2692]!, self._r[2692]!, [_1]) } - public var Conversation_StatusKickedFromGroup: String { return self._s[2690]! } - public var Channel_AdminLogFilter_AdminsTitle: String { return self._s[2691]! } - public var ChatList_DeleteSavedMessagesConfirmationTitle: String { return self._s[2692]! } - public var Channel_AdminLogFilter_Title: String { return self._s[2693]! } - public var Passport_Address_TypeRentalAgreementUploadScan: String { return self._s[2694]! } - public var Compose_GroupTokenListPlaceholder: String { return self._s[2695]! } - public var Notifications_MessageNotificationsExceptions: String { return self._s[2696]! } - public var ChannelIntro_Title: String { return self._s[2697]! } - public var Stats_Message_Views: String { return self._s[2698]! } - public var Stickers_Install: String { return self._s[2699]! } + public var Conversation_StatusKickedFromGroup: String { return self._s[2693]! } + public var Channel_AdminLogFilter_AdminsTitle: String { return self._s[2694]! } + public var ChatList_DeleteSavedMessagesConfirmationTitle: String { return self._s[2695]! } + public var Channel_AdminLogFilter_Title: String { return self._s[2696]! } + public var Passport_Address_TypeRentalAgreementUploadScan: String { return self._s[2697]! } + public var Compose_GroupTokenListPlaceholder: String { return self._s[2698]! } + public var Notifications_MessageNotificationsExceptions: String { return self._s[2699]! } + public var ChannelIntro_Title: String { return self._s[2700]! } + public var Stats_Message_Views: String { return self._s[2701]! } + public var Stickers_Install: String { return self._s[2702]! } public func VoiceOver_Chat_FileFrom(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2700]!, self._r[2700]!, [_0]) + return formatWithArgumentRanges(self._s[2703]!, self._r[2703]!, [_0]) } - public var EditTheme_Create_Preview_IncomingReplyText: String { return self._s[2701]! } - public var Conversation_SwipeToReplyHintTitle: String { return self._s[2703]! } - public var Settings_Username: String { return self._s[2706]! } - public var FastTwoStepSetup_Title: String { return self._s[2707]! } - public var Notifications_Badge_CountUnreadMessages_InfoOff: String { return self._s[2708]! } - public var SettingsSearch_Synonyms_Privacy_Title: String { return self._s[2709]! } - public var Passport_Identity_IssueDatePlaceholder: String { return self._s[2711]! } - public var CallFeedback_ReasonEcho: String { return self._s[2712]! } + public var EditTheme_Create_Preview_IncomingReplyText: String { return self._s[2704]! } + public var Conversation_SwipeToReplyHintTitle: String { return self._s[2706]! } + public var Settings_Username: String { return self._s[2709]! } + public var FastTwoStepSetup_Title: String { return self._s[2710]! } + public var Notifications_Badge_CountUnreadMessages_InfoOff: String { return self._s[2711]! } + public var SettingsSearch_Synonyms_Privacy_Title: String { return self._s[2712]! } + public var Passport_Identity_IssueDatePlaceholder: String { return self._s[2714]! } + public var CallFeedback_ReasonEcho: String { return self._s[2715]! } public func Time_MonthOfYear_m1(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2713]!, self._r[2713]!, [_0]) + return formatWithArgumentRanges(self._s[2716]!, self._r[2716]!, [_0]) } - public var Conversation_OpenBotLinkTitle: String { return self._s[2714]! } - public var SocksProxySetup_Title: String { return self._s[2715]! } - public var CallFeedback_Success: String { return self._s[2716]! } - public var WallpaperPreview_SwipeTopText: String { return self._s[2718]! } - public var InstantPage_AutoNightTheme: String { return self._s[2720]! } - public var Watch_Conversation_Reply: String { return self._s[2721]! } - public var VoiceChat_Share: String { return self._s[2723]! } - public var Chat_PanelUnpinAllMessages: String { return self._s[2724]! } - public var WallpaperPreview_Pattern: String { return self._s[2725]! } - public var CheckoutInfo_ReceiverInfoEmail: String { return self._s[2726]! } + public var Conversation_OpenBotLinkTitle: String { return self._s[2717]! } + public var SocksProxySetup_Title: String { return self._s[2718]! } + public var CallFeedback_Success: String { return self._s[2719]! } + public var WallpaperPreview_SwipeTopText: String { return self._s[2721]! } + public var InstantPage_AutoNightTheme: String { return self._s[2723]! } + public var Watch_Conversation_Reply: String { return self._s[2724]! } + public var VoiceChat_Share: String { return self._s[2726]! } + public var Chat_PanelUnpinAllMessages: String { return self._s[2727]! } + public var WallpaperPreview_Pattern: String { return self._s[2728]! } + public var CheckoutInfo_ReceiverInfoEmail: String { return self._s[2729]! } public func Conversation_DeleteMessagesFor(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2727]!, self._r[2727]!, [_0]) + return formatWithArgumentRanges(self._s[2730]!, self._r[2730]!, [_0]) } - public var AutoDownloadSettings_TypeGroupChats: String { return self._s[2728]! } - public var VoiceOver_Chat_GroupInfo: String { return self._s[2729]! } - public var DialogList_SavedMessagesTooltip: String { return self._s[2731]! } - public var Update_Title: String { return self._s[2732]! } - public var Conversation_ShareMyPhoneNumber: String { return self._s[2733]! } - public var WallpaperPreview_CropTopText: String { return self._s[2736]! } - public var Channel_EditMessageErrorGeneric: String { return self._s[2737]! } - public var AccessDenied_LocationAlwaysDenied: String { return self._s[2738]! } - public var ChatListFolder_DiscardCancel: String { return self._s[2739]! } - public var Message_PinnedPhotoMessage: String { return self._s[2740]! } - public var Appearance_ThemeDayClassic: String { return self._s[2741]! } - public var SocksProxySetup_ProxySocks5: String { return self._s[2742]! } - public var AccessDenied_Wallpapers: String { return self._s[2748]! } + public var AutoDownloadSettings_TypeGroupChats: String { return self._s[2731]! } + public var VoiceOver_Chat_GroupInfo: String { return self._s[2732]! } + public var DialogList_SavedMessagesTooltip: String { return self._s[2734]! } + public var Update_Title: String { return self._s[2735]! } + public var Conversation_ShareMyPhoneNumber: String { return self._s[2736]! } + public var WallpaperPreview_CropTopText: String { return self._s[2739]! } + public var Channel_EditMessageErrorGeneric: String { return self._s[2740]! } + public var AccessDenied_LocationAlwaysDenied: String { return self._s[2741]! } + public var ChatListFolder_DiscardCancel: String { return self._s[2742]! } + public var Message_PinnedPhotoMessage: String { return self._s[2743]! } + public var Appearance_ThemeDayClassic: String { return self._s[2744]! } + public var SocksProxySetup_ProxySocks5: String { return self._s[2745]! } + public var AccessDenied_Wallpapers: String { return self._s[2751]! } public func Channel_AdminLog_MessageChangedGroupAbout(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2749]!, self._r[2749]!, [_0]) + return formatWithArgumentRanges(self._s[2752]!, self._r[2752]!, [_0]) } - public var Weekday_Sunday: String { return self._s[2750]! } - public var SettingsSearch_Synonyms_Privacy_GroupsAndChannels: String { return self._s[2752]! } - public var PeopleNearby_MakeVisibleDescription: String { return self._s[2753]! } - public var AccessDenied_LocationDisabled: String { return self._s[2754]! } - public var Tour_Text3: String { return self._s[2755]! } - public var AuthSessions_AddDevice_ScanTitle: String { return self._s[2756]! } + public var Weekday_Sunday: String { return self._s[2753]! } + public var SettingsSearch_Synonyms_Privacy_GroupsAndChannels: String { return self._s[2755]! } + public var PeopleNearby_MakeVisibleDescription: String { return self._s[2756]! } + public var AccessDenied_LocationDisabled: String { return self._s[2757]! } + public var Tour_Text3: String { return self._s[2758]! } + public var AuthSessions_AddDevice_ScanTitle: String { return self._s[2759]! } public func Time_TodayAt(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2757]!, self._r[2757]!, [_0]) + return formatWithArgumentRanges(self._s[2760]!, self._r[2760]!, [_0]) } - public var Privacy_SecretChatsLinkPreviewsHelp: String { return self._s[2758]! } - public var Conversation_ClearCache: String { return self._s[2759]! } - public var StickerPacksSettings_ArchivedMasks_Info: String { return self._s[2760]! } - public var ChatList_Tabs_AllChats: String { return self._s[2761]! } - public var DialogList_RecentTitlePeople: String { return self._s[2762]! } - public var Stickers_AddToFavorites: String { return self._s[2763]! } - public var ChatList_Context_RemoveFromFolder: String { return self._s[2764]! } - public var Settings_RemoveVideo: String { return self._s[2765]! } - public var PhotoEditor_CropAspectRatioSquare: String { return self._s[2766]! } - public var ConversationProfile_LeaveDeleteAndExit: String { return self._s[2767]! } - public var VoiceOver_Chat_YourFile: String { return self._s[2768]! } - public var SettingsSearch_Synonyms_Privacy_Forwards: String { return self._s[2770]! } - public var Group_OwnershipTransfer_ErrorPrivacyRestricted: String { return self._s[2771]! } - public var Channel_AdminLog_AddMembers: String { return self._s[2772]! } - public var Map_SendThisLocation: String { return self._s[2774]! } - public var TwoStepAuth_EmailSkipAlert: String { return self._s[2776]! } - public var IntentsSettings_SuggestedChatsPrivateChats: String { return self._s[2777]! } - public var CloudStorage_Title: String { return self._s[2778]! } - public var TwoFactorSetup_Password_Action: String { return self._s[2779]! } - public var TwoStepAuth_ConfirmationText: String { return self._s[2780]! } - public var Passport_Address_EditTemporaryRegistration: String { return self._s[2782]! } - public var Undo_LeftGroup: String { return self._s[2783]! } - public var Conversation_StopLiveLocation: String { return self._s[2784]! } - public var NotificationSettings_ShowNotificationsFromAccountsSection: String { return self._s[2785]! } - public var Message_PinnedInvoice: String { return self._s[2786]! } - public var ApplyLanguage_LanguageNotSupportedError: String { return self._s[2787]! } + public var Privacy_SecretChatsLinkPreviewsHelp: String { return self._s[2761]! } + public var Conversation_ClearCache: String { return self._s[2762]! } + public var StickerPacksSettings_ArchivedMasks_Info: String { return self._s[2763]! } + public var ChatList_Tabs_AllChats: String { return self._s[2764]! } + public var DialogList_RecentTitlePeople: String { return self._s[2765]! } + public var Stickers_AddToFavorites: String { return self._s[2766]! } + public var ChatList_Context_RemoveFromFolder: String { return self._s[2767]! } + public var Settings_RemoveVideo: String { return self._s[2768]! } + public var PhotoEditor_CropAspectRatioSquare: String { return self._s[2769]! } + public var ConversationProfile_LeaveDeleteAndExit: String { return self._s[2770]! } + public var VoiceOver_Chat_YourFile: String { return self._s[2771]! } + public var SettingsSearch_Synonyms_Privacy_Forwards: String { return self._s[2773]! } + public var Group_OwnershipTransfer_ErrorPrivacyRestricted: String { return self._s[2774]! } + public var Channel_AdminLog_AddMembers: String { return self._s[2775]! } + public var Map_SendThisLocation: String { return self._s[2777]! } + public var TwoStepAuth_EmailSkipAlert: String { return self._s[2779]! } + public var IntentsSettings_SuggestedChatsPrivateChats: String { return self._s[2780]! } + public var CloudStorage_Title: String { return self._s[2781]! } + public var TwoFactorSetup_Password_Action: String { return self._s[2782]! } + public var TwoStepAuth_ConfirmationText: String { return self._s[2783]! } + public var Passport_Address_EditTemporaryRegistration: String { return self._s[2785]! } + public var Undo_LeftGroup: String { return self._s[2786]! } + public var Conversation_StopLiveLocation: String { return self._s[2787]! } + public var NotificationSettings_ShowNotificationsFromAccountsSection: String { return self._s[2788]! } + public var Message_PinnedInvoice: String { return self._s[2789]! } + public var ApplyLanguage_LanguageNotSupportedError: String { return self._s[2790]! } public func PUSH_CHAT_MESSAGE(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2789]!, self._r[2789]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2792]!, self._r[2792]!, [_1, _2]) } public func Notification_PinnedAudioMessage(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2790]!, self._r[2790]!, [_0]) + return formatWithArgumentRanges(self._s[2793]!, self._r[2793]!, [_0]) } - public var Weekday_Tuesday: String { return self._s[2791]! } - public var ChangePhoneNumberCode_Code: String { return self._s[2792]! } - public var VoiceOver_Chat_YourMessage: String { return self._s[2793]! } - public var Calls_CallTabDescription: String { return self._s[2794]! } - public var ChatImport_SelectionErrorNotAdmin: String { return self._s[2795]! } - public var SocksProxySetup_UseProxy: String { return self._s[2797]! } - public var SettingsSearch_Synonyms_Stickers_Title: String { return self._s[2798]! } - public var PasscodeSettings_AlphanumericCode: String { return self._s[2799]! } - public var VoiceOver_Chat_YourVideo: String { return self._s[2800]! } - public var ChannelMembers_WhoCanAddMembersAdminsHelp: String { return self._s[2802]! } - public var SettingsSearch_Synonyms_Privacy_DeleteAccountIfAwayFor: String { return self._s[2803]! } - public var Exceptions_AddToExceptions: String { return self._s[2804]! } - public var UserInfo_Title: String { return self._s[2805]! } - public var Passport_DeleteDocumentConfirmation: String { return self._s[2807]! } - public var ChatList_Unmute: String { return self._s[2809]! } - public var SettingsSearch_Synonyms_Privacy_Data_ContactsSync: String { return self._s[2810]! } - public var Stats_GroupTopPostersTitle: String { return self._s[2811]! } - public var Username_CheckingUsername: String { return self._s[2812]! } - public var WallpaperColors_SetCustomColor: String { return self._s[2813]! } - public var PeerSelection_ImportIntoNewGroup: String { return self._s[2817]! } - public var Location_ProximityAlertSetTitle: String { return self._s[2818]! } - public var AuthSessions_AddedDeviceTerminate: String { return self._s[2819]! } - public var Privacy_ProfilePhoto_CustomHelp: String { return self._s[2820]! } - public var Settings_ChangePhoneNumber: String { return self._s[2821]! } - public var PeerInfo_PaneLinks: String { return self._s[2822]! } - public var Appearance_ThemePreview_ChatList_1_Text: String { return self._s[2825]! } - public var Channel_EditAdmin_PermissionInviteSubscribers: String { return self._s[2827]! } + public var Weekday_Tuesday: String { return self._s[2794]! } + public var ChangePhoneNumberCode_Code: String { return self._s[2795]! } + public var VoiceOver_Chat_YourMessage: String { return self._s[2796]! } + public var Calls_CallTabDescription: String { return self._s[2797]! } + public var ChatImport_SelectionErrorNotAdmin: String { return self._s[2798]! } + public var SocksProxySetup_UseProxy: String { return self._s[2800]! } + public var SettingsSearch_Synonyms_Stickers_Title: String { return self._s[2801]! } + public var PasscodeSettings_AlphanumericCode: String { return self._s[2802]! } + public var VoiceOver_Chat_YourVideo: String { return self._s[2803]! } + public var ChannelMembers_WhoCanAddMembersAdminsHelp: String { return self._s[2805]! } + public var SettingsSearch_Synonyms_Privacy_DeleteAccountIfAwayFor: String { return self._s[2806]! } + public var Exceptions_AddToExceptions: String { return self._s[2807]! } + public var UserInfo_Title: String { return self._s[2808]! } + public var Passport_DeleteDocumentConfirmation: String { return self._s[2810]! } + public var ChatList_Unmute: String { return self._s[2812]! } + public var SettingsSearch_Synonyms_Privacy_Data_ContactsSync: String { return self._s[2813]! } + public var Stats_GroupTopPostersTitle: String { return self._s[2814]! } + public var Username_CheckingUsername: String { return self._s[2815]! } + public var WallpaperColors_SetCustomColor: String { return self._s[2816]! } + public var PeerSelection_ImportIntoNewGroup: String { return self._s[2820]! } + public var Location_ProximityAlertSetTitle: String { return self._s[2821]! } + public var AuthSessions_AddedDeviceTerminate: String { return self._s[2822]! } + public var Privacy_ProfilePhoto_CustomHelp: String { return self._s[2823]! } + public var Settings_ChangePhoneNumber: String { return self._s[2824]! } + public var PeerInfo_PaneLinks: String { return self._s[2825]! } + public var Appearance_ThemePreview_ChatList_1_Text: String { return self._s[2828]! } + public var Channel_EditAdmin_PermissionInviteSubscribers: String { return self._s[2830]! } public func PUSH_CHAT_VOICECHAT_INVITE_YOU(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2828]!, self._r[2828]!, [_1]) + return formatWithArgumentRanges(self._s[2831]!, self._r[2831]!, [_1]) } - public var LogoutOptions_ChangePhoneNumberText: String { return self._s[2829]! } - public var VoiceOver_Media_PlaybackPause: String { return self._s[2830]! } - public var Stats_FollowersBySourceTitle: String { return self._s[2832]! } + public var LogoutOptions_ChangePhoneNumberText: String { return self._s[2832]! } + public var VoiceOver_Media_PlaybackPause: String { return self._s[2833]! } + public var Stats_FollowersBySourceTitle: String { return self._s[2835]! } public func Conversation_ScheduleMessage_SendOn(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2833]!, self._r[2833]!, [_0, _1]) + return formatWithArgumentRanges(self._s[2836]!, self._r[2836]!, [_0, _1]) } - public var Compose_NewEncryptedChatTitle: String { return self._s[2834]! } - public var Channel_CommentsGroup_Header: String { return self._s[2836]! } + public var Compose_NewEncryptedChatTitle: String { return self._s[2837]! } + public var Channel_CommentsGroup_Header: String { return self._s[2839]! } public func ShareFileTip_Text(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2840]!, self._r[2840]!, [_0]) + return formatWithArgumentRanges(self._s[2843]!, self._r[2843]!, [_0]) } public func PUSH_MESSAGE_AUDIO(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2841]!, self._r[2841]!, [_1]) + return formatWithArgumentRanges(self._s[2844]!, self._r[2844]!, [_1]) } - public var Group_Setup_BasicHistoryHiddenHelp: String { return self._s[2843]! } + public var Group_Setup_BasicHistoryHiddenHelp: String { return self._s[2846]! } public func TwoStepAuth_RecoveryEmailUnavailable(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2844]!, self._r[2844]!, [_0]) + return formatWithArgumentRanges(self._s[2847]!, self._r[2847]!, [_0]) } - public var Conversation_ReportMessages: String { return self._s[2845]! } - public var Conversation_OpenBotLinkOpen: String { return self._s[2846]! } - public var VoiceOver_Chat_RecordModeVoiceMessage: String { return self._s[2847]! } - public var PrivacySettings_LastSeen: String { return self._s[2849]! } - public var SettingsSearch_Synonyms_Privacy_Passcode: String { return self._s[2850]! } - public var Theme_Colors_Proceed: String { return self._s[2851]! } - public var UserInfo_ScamBotWarning: String { return self._s[2852]! } - public var LogoutOptions_LogOut: String { return self._s[2854]! } - public var Conversation_SendMessage: String { return self._s[2855]! } - public var Passport_Address_Region: String { return self._s[2857]! } - public var MediaPicker_CameraRoll: String { return self._s[2859]! } + public var Conversation_ReportMessages: String { return self._s[2848]! } + public var Conversation_OpenBotLinkOpen: String { return self._s[2849]! } + public var VoiceOver_Chat_RecordModeVoiceMessage: String { return self._s[2850]! } + public var PrivacySettings_LastSeen: String { return self._s[2852]! } + public var SettingsSearch_Synonyms_Privacy_Passcode: String { return self._s[2853]! } + public var Theme_Colors_Proceed: String { return self._s[2854]! } + public var UserInfo_ScamBotWarning: String { return self._s[2855]! } + public var LogoutOptions_LogOut: String { return self._s[2857]! } + public var Conversation_SendMessage: String { return self._s[2858]! } + public var Passport_Address_Region: String { return self._s[2860]! } + public var MediaPicker_CameraRoll: String { return self._s[2862]! } public func VoiceOver_Chat_ForwardedFrom(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2861]!, self._r[2861]!, [_0]) + return formatWithArgumentRanges(self._s[2864]!, self._r[2864]!, [_0]) } - public var Call_ReportSend: String { return self._s[2863]! } - public var VoiceOver_ChatList_Message: String { return self._s[2864]! } - public var Month_ShortJune: String { return self._s[2865]! } - public var AutoDownloadSettings_GroupChats: String { return self._s[2866]! } + public var Call_ReportSend: String { return self._s[2866]! } + public var VoiceOver_ChatList_Message: String { return self._s[2867]! } + public var Month_ShortJune: String { return self._s[2868]! } + public var AutoDownloadSettings_GroupChats: String { return self._s[2869]! } public func Channel_AdminLog_CaptionEdited(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2869]!, self._r[2869]!, [_0]) + return formatWithArgumentRanges(self._s[2872]!, self._r[2872]!, [_0]) } - public var TwoStepAuth_DisableSuccess: String { return self._s[2870]! } - public var Cache_KeepMedia: String { return self._s[2871]! } + public var TwoStepAuth_DisableSuccess: String { return self._s[2873]! } + public var Cache_KeepMedia: String { return self._s[2874]! } public func Date_ChatDateHeaderYear(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2872]!, self._r[2872]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[2875]!, self._r[2875]!, [_1, _2, _3]) } - public var Appearance_LargeEmoji: String { return self._s[2873]! } + public var Appearance_LargeEmoji: String { return self._s[2876]! } public func Notification_NewAuthDetected(_ _1: String, _ _2: String, _ _3: String, _ _4: String, _ _5: String, _ _6: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2874]!, self._r[2874]!, [_1, _2, _3, _4, _5, _6]) + return formatWithArgumentRanges(self._s[2877]!, self._r[2877]!, [_1, _2, _3, _4, _5, _6]) } - public var Chat_AttachmentMultipleForwardDisabled: String { return self._s[2875]! } - public var Call_CameraConfirmationText: String { return self._s[2876]! } + public var Chat_AttachmentMultipleForwardDisabled: String { return self._s[2878]! } + public var Call_CameraConfirmationText: String { return self._s[2879]! } public func AuthSessions_AppUnofficial(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2878]!, self._r[2878]!, [_0]) + return formatWithArgumentRanges(self._s[2881]!, self._r[2881]!, [_0]) } - public var DialogList_SearchSectionChats: String { return self._s[2879]! } - public var VoiceOver_MessageContextReport: String { return self._s[2881]! } - public var VoiceChat_RemovePeer: String { return self._s[2882]! } - public var ChatListFolder_ExcludeChatsTitle: String { return self._s[2883]! } - public var InviteLink_ContextCopy: String { return self._s[2884]! } - public var NotificationsSound_Tritone: String { return self._s[2886]! } - public var Notifications_InAppNotificationsPreview: String { return self._s[2889]! } - public var Stats_GroupTopAdmin_Actions: String { return self._s[2890]! } - public var PeerInfo_AddToContacts: String { return self._s[2891]! } - public var VoiceChat_OpenChat: String { return self._s[2892]! } - public var AccessDenied_Title: String { return self._s[2893]! } - public var Tour_Title1: String { return self._s[2894]! } - public var VoiceOver_AttachMedia: String { return self._s[2895]! } + public var DialogList_SearchSectionChats: String { return self._s[2882]! } + public var VoiceOver_MessageContextReport: String { return self._s[2884]! } + public var VoiceChat_RemovePeer: String { return self._s[2885]! } + public var ChatListFolder_ExcludeChatsTitle: String { return self._s[2886]! } + public var InviteLink_ContextCopy: String { return self._s[2887]! } + public var NotificationsSound_Tritone: String { return self._s[2889]! } + public var Notifications_InAppNotificationsPreview: String { return self._s[2892]! } + public var Stats_GroupTopAdmin_Actions: String { return self._s[2893]! } + public var PeerInfo_AddToContacts: String { return self._s[2894]! } + public var VoiceChat_OpenChat: String { return self._s[2895]! } + public var AccessDenied_Title: String { return self._s[2896]! } + public var InviteLink_QRCode_InfoChannel: String { return self._s[2897]! } + public var Tour_Title1: String { return self._s[2898]! } + public var VoiceOver_AttachMedia: String { return self._s[2899]! } public func SharedMedia_SearchNoResultsDescription(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2897]!, self._r[2897]!, [_0]) + return formatWithArgumentRanges(self._s[2901]!, self._r[2901]!, [_0]) } - public var Chat_Gifs_SavedSectionHeader: String { return self._s[2898]! } - public var LogoutOptions_ChangePhoneNumberTitle: String { return self._s[2899]! } + public var Chat_Gifs_SavedSectionHeader: String { return self._s[2902]! } + public var LogoutOptions_ChangePhoneNumberTitle: String { return self._s[2903]! } public func Passport_Scans_ScanIndex(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2900]!, self._r[2900]!, [_0]) + return formatWithArgumentRanges(self._s[2904]!, self._r[2904]!, [_0]) } - public var Channel_AdminLog_MessagePreviousLink: String { return self._s[2901]! } - public var OldChannels_Title: String { return self._s[2902]! } - public var LoginPassword_FloodError: String { return self._s[2903]! } - public var ChatImportActivity_InProgress: String { return self._s[2905]! } - public var Checkout_ErrorPaymentFailed: String { return self._s[2906]! } + public var Channel_AdminLog_MessagePreviousLink: String { return self._s[2905]! } + public var OldChannels_Title: String { return self._s[2906]! } + public var LoginPassword_FloodError: String { return self._s[2907]! } + public var ChatImportActivity_InProgress: String { return self._s[2909]! } + public var Checkout_ErrorPaymentFailed: String { return self._s[2910]! } public func Time_MonthOfYear_m7(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2907]!, self._r[2907]!, [_0]) + return formatWithArgumentRanges(self._s[2911]!, self._r[2911]!, [_0]) } - public var VoiceOver_Media_PlaybackPlay: String { return self._s[2910]! } - public var Passport_CorrectErrors: String { return self._s[2912]! } + public var VoiceOver_Media_PlaybackPlay: String { return self._s[2914]! } + public var Passport_CorrectErrors: String { return self._s[2916]! } public func PUSH_CHAT_PHOTO_EDITED(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2913]!, self._r[2913]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2917]!, self._r[2917]!, [_1, _2]) } - public var ChatListFolderSettings_Title: String { return self._s[2914]! } + public var ChatListFolderSettings_Title: String { return self._s[2918]! } public func AutoDownloadSettings_UpToFor(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2915]!, self._r[2915]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2919]!, self._r[2919]!, [_1, _2]) } - public var PhotoEditor_HighlightsTool: String { return self._s[2916]! } - public var Contacts_NotRegisteredSection: String { return self._s[2919]! } + public var PhotoEditor_HighlightsTool: String { return self._s[2920]! } + public var Contacts_NotRegisteredSection: String { return self._s[2923]! } public func Call_VoiceChatInProgressCallMessage(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2920]!, self._r[2920]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2924]!, self._r[2924]!, [_1, _2]) } public func PUSH_PINNED_DOC(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2921]!, self._r[2921]!, [_1]) + return formatWithArgumentRanges(self._s[2925]!, self._r[2925]!, [_1]) } - public var InviteLink_Create_UsersLimitInfo: String { return self._s[2922]! } - public var User_DeletedAccount: String { return self._s[2923]! } - public var Conversation_ViewContactDetails: String { return self._s[2924]! } - public var Conversation_Dice_u1F3B3: String { return self._s[2925]! } - public var WebSearch_GIFs: String { return self._s[2926]! } - public var ChatList_DeleteSavedMessagesConfirmationAction: String { return self._s[2927]! } - public var Appearance_PreviewOutgoingText: String { return self._s[2928]! } - public var Calls_CallTabTitle: String { return self._s[2929]! } - public var Call_VoiceChatInProgressTitle: String { return self._s[2930]! } + public var InviteLink_Create_UsersLimitInfo: String { return self._s[2926]! } + public var User_DeletedAccount: String { return self._s[2927]! } + public var Conversation_ViewContactDetails: String { return self._s[2928]! } + public var Conversation_Dice_u1F3B3: String { return self._s[2929]! } + public var WebSearch_GIFs: String { return self._s[2930]! } + public var ChatList_DeleteSavedMessagesConfirmationAction: String { return self._s[2931]! } + public var Appearance_PreviewOutgoingText: String { return self._s[2932]! } + public var Calls_CallTabTitle: String { return self._s[2933]! } + public var Call_VoiceChatInProgressTitle: String { return self._s[2934]! } public func LastSeen_YesterdayAt(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2931]!, self._r[2931]!, [_0]) + return formatWithArgumentRanges(self._s[2935]!, self._r[2935]!, [_0]) } - public var Channel_Status: String { return self._s[2932]! } - public var Conversation_SendMessageErrorGroupRestricted: String { return self._s[2934]! } - public var VoiceOver_Chat_OptionSelected: String { return self._s[2935]! } - public var SettingsSearch_Synonyms_Notifications_ChannelNotificationsAlert: String { return self._s[2936]! } + public var Channel_Status: String { return self._s[2936]! } + public var Conversation_SendMessageErrorGroupRestricted: String { return self._s[2938]! } + public var VoiceOver_Chat_OptionSelected: String { return self._s[2939]! } + public var SettingsSearch_Synonyms_Notifications_ChannelNotificationsAlert: String { return self._s[2940]! } public func ClearCache_Success(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2937]!, self._r[2937]!, [_0, _1]) + return formatWithArgumentRanges(self._s[2941]!, self._r[2941]!, [_0, _1]) } - public var Passport_Identity_ExpiryDateNone: String { return self._s[2939]! } - public var Your_cards_expiration_month_is_invalid: String { return self._s[2941]! } - public var Month_ShortDecember: String { return self._s[2942]! } - public var Username_Help: String { return self._s[2943]! } - public var Login_InfoAvatarAdd: String { return self._s[2944]! } - public var Month_ShortMay: String { return self._s[2945]! } - public var DialogList_UnknownPinLimitError: String { return self._s[2946]! } - public var PasscodeSettings_AutoLock_IfAwayFor_5hours: String { return self._s[2947]! } - public var TwoStepAuth_EnabledSuccess: String { return self._s[2948]! } - public var Weekday_ShortSunday: String { return self._s[2949]! } - public var Channel_Username_InvalidTooShort: String { return self._s[2950]! } - public var AuthSessions_TerminateSession: String { return self._s[2951]! } - public var Passport_Identity_FilesTitle: String { return self._s[2952]! } + public var Passport_Identity_ExpiryDateNone: String { return self._s[2943]! } + public var Your_cards_expiration_month_is_invalid: String { return self._s[2945]! } + public var Month_ShortDecember: String { return self._s[2946]! } + public var Username_Help: String { return self._s[2947]! } + public var Login_InfoAvatarAdd: String { return self._s[2948]! } + public var Month_ShortMay: String { return self._s[2949]! } + public var DialogList_UnknownPinLimitError: String { return self._s[2950]! } + public var PasscodeSettings_AutoLock_IfAwayFor_5hours: String { return self._s[2951]! } + public var TwoStepAuth_EnabledSuccess: String { return self._s[2952]! } + public var Weekday_ShortSunday: String { return self._s[2953]! } + public var Channel_Username_InvalidTooShort: String { return self._s[2954]! } + public var AuthSessions_TerminateSession: String { return self._s[2955]! } + public var Passport_Identity_FilesTitle: String { return self._s[2956]! } public func Notification_PinnedRoundMessage(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2953]!, self._r[2953]!, [_0]) + return formatWithArgumentRanges(self._s[2957]!, self._r[2957]!, [_0]) } - public var PeopleNearby_MakeVisible: String { return self._s[2955]! } + public var PeopleNearby_MakeVisible: String { return self._s[2959]! } public func Conversation_RestrictedMediaTimed(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2956]!, self._r[2956]!, [_0]) + return formatWithArgumentRanges(self._s[2960]!, self._r[2960]!, [_0]) } public func Notification_MessageLifetimeChanged(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2957]!, self._r[2957]!, [_1, _2]) + return formatWithArgumentRanges(self._s[2961]!, self._r[2961]!, [_1, _2]) } public func GroupInfo_AddParticipantConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2958]!, self._r[2958]!, [_0]) + return formatWithArgumentRanges(self._s[2962]!, self._r[2962]!, [_0]) } - public var PrivacyPolicy_DeclineDeclineAndDelete: String { return self._s[2959]! } - public var Conversation_ContextMenuForward: String { return self._s[2960]! } - public var Channel_AdminLog_CanManageCalls: String { return self._s[2961]! } + public var PrivacyPolicy_DeclineDeclineAndDelete: String { return self._s[2963]! } + public var Conversation_ContextMenuForward: String { return self._s[2964]! } + public var Channel_AdminLog_CanManageCalls: String { return self._s[2965]! } public func PUSH_CHAT_MESSAGE_QUIZ(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2963]!, self._r[2963]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[2967]!, self._r[2967]!, [_1, _2, _3]) } - public var Notification_GroupInviterSelf: String { return self._s[2965]! } - public var Privacy_Forwards_NeverLink: String { return self._s[2966]! } - public var AuthSessions_CurrentSession: String { return self._s[2967]! } - public var Passport_Address_EditPassportRegistration: String { return self._s[2968]! } - public var ChannelInfo_DeleteChannelConfirmation: String { return self._s[2969]! } - public var ChatSearch_ResultsTooltip: String { return self._s[2971]! } - public var CheckoutInfo_Pay: String { return self._s[2972]! } + public var Notification_GroupInviterSelf: String { return self._s[2969]! } + public var Privacy_Forwards_NeverLink: String { return self._s[2970]! } + public var AuthSessions_CurrentSession: String { return self._s[2971]! } + public var Passport_Address_EditPassportRegistration: String { return self._s[2972]! } + public var ChannelInfo_DeleteChannelConfirmation: String { return self._s[2973]! } + public var ChatSearch_ResultsTooltip: String { return self._s[2975]! } + public var CheckoutInfo_Pay: String { return self._s[2976]! } public func Conversation_PinMessagesFor(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2974]!, self._r[2974]!, [_0]) + return formatWithArgumentRanges(self._s[2978]!, self._r[2978]!, [_0]) } - public var GroupInfo_AddParticipant: String { return self._s[2975]! } - public var GroupPermission_ApplyAlertAction: String { return self._s[2976]! } + public var GroupInfo_AddParticipant: String { return self._s[2979]! } + public var GroupPermission_ApplyAlertAction: String { return self._s[2980]! } public func Channel_AdminLog_MessageChangedChannelUsername(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2977]!, self._r[2977]!, [_0]) + return formatWithArgumentRanges(self._s[2981]!, self._r[2981]!, [_0]) } - public var Localization_LanguageCustom: String { return self._s[2978]! } - public var SettingsSearch_Synonyms_Passport: String { return self._s[2979]! } - public var Settings_UsernameEmpty: String { return self._s[2980]! } - public var Settings_FAQ_URL: String { return self._s[2981]! } - public var ChatList_UndoArchiveText1: String { return self._s[2982]! } - public var Common_Select: String { return self._s[2984]! } - public var Notification_MessageLifetimeRemovedOutgoing: String { return self._s[2985]! } - public var Notification_PassportValueAddress: String { return self._s[2986]! } - public var Conversation_MessageDialogDelete: String { return self._s[2987]! } - public var Map_OpenInYandexNavigator: String { return self._s[2989]! } - public var DialogList_SearchSectionDialogs: String { return self._s[2990]! } - public var AccessDenied_Contacts: String { return self._s[2991]! } - public var SettingsSearch_Synonyms_Privacy_Data_DeleteDrafts: String { return self._s[2993]! } - public var Passport_ScanPassportHelp: String { return self._s[2994]! } - public var Chat_PinnedListPreview_HidePinnedMessages: String { return self._s[2995]! } - public var ChatListFolder_NameChannels: String { return self._s[2996]! } - public var Appearance_ThemePreview_Chat_5_Text: String { return self._s[2997]! } + public var Localization_LanguageCustom: String { return self._s[2982]! } + public var SettingsSearch_Synonyms_Passport: String { return self._s[2983]! } + public var Settings_UsernameEmpty: String { return self._s[2984]! } + public var Settings_FAQ_URL: String { return self._s[2985]! } + public var ChatList_UndoArchiveText1: String { return self._s[2986]! } + public var Common_Select: String { return self._s[2988]! } + public var Notification_MessageLifetimeRemovedOutgoing: String { return self._s[2989]! } + public var Notification_PassportValueAddress: String { return self._s[2990]! } + public var Conversation_MessageDialogDelete: String { return self._s[2991]! } + public var Map_OpenInYandexNavigator: String { return self._s[2993]! } + public var DialogList_SearchSectionDialogs: String { return self._s[2994]! } + public var AccessDenied_Contacts: String { return self._s[2995]! } + public var SettingsSearch_Synonyms_Privacy_Data_DeleteDrafts: String { return self._s[2997]! } + public var Passport_ScanPassportHelp: String { return self._s[2998]! } + public var Chat_PinnedListPreview_HidePinnedMessages: String { return self._s[2999]! } + public var ChatListFolder_NameChannels: String { return self._s[3000]! } + public var Appearance_ThemePreview_Chat_5_Text: String { return self._s[3001]! } public func Channel_OwnershipTransfer_TransferCompleted(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[2998]!, self._r[2998]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3002]!, self._r[3002]!, [_1, _2]) } - public var Checkout_ErrorInvoiceAlreadyPaid: String { return self._s[2999]! } + public var Checkout_ErrorInvoiceAlreadyPaid: String { return self._s[3003]! } public func VoiceChat_InviteMemberToGroupFirstText(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3000]!, self._r[3000]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3004]!, self._r[3004]!, [_1, _2]) } - public var Conversation_GifTooltip: String { return self._s[3001]! } - public var Passport_Identity_TypeDriversLicenseUploadScan: String { return self._s[3003]! } - public var VoiceChat_Connecting: String { return self._s[3004]! } - public var AutoDownloadSettings_OffForAll: String { return self._s[3005]! } - public var Privacy_GroupsAndChannels_InviteToChannelMultipleError: String { return self._s[3006]! } - public var AutoDownloadSettings_PreloadVideo: String { return self._s[3007]! } - public var CreatePoll_Quiz: String { return self._s[3008]! } - public var TwoFactorSetup_Email_Placeholder: String { return self._s[3010]! } - public var Watch_Message_Invoice: String { return self._s[3011]! } - public var Settings_AddAnotherAccount_Help: String { return self._s[3012]! } - public var Watch_Message_Unsupported: String { return self._s[3013]! } + public var Conversation_GifTooltip: String { return self._s[3005]! } + public var Passport_Identity_TypeDriversLicenseUploadScan: String { return self._s[3007]! } + public var VoiceChat_Connecting: String { return self._s[3008]! } + public var AutoDownloadSettings_OffForAll: String { return self._s[3009]! } + public func Channel_AdminLog_CreatedInviteLink(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[3010]!, self._r[3010]!, [_1, _2]) + } + public var Privacy_GroupsAndChannels_InviteToChannelMultipleError: String { return self._s[3011]! } + public var AutoDownloadSettings_PreloadVideo: String { return self._s[3012]! } + public var CreatePoll_Quiz: String { return self._s[3013]! } + public var TwoFactorSetup_Email_Placeholder: String { return self._s[3015]! } + public var Watch_Message_Invoice: String { return self._s[3016]! } + public var Settings_AddAnotherAccount_Help: String { return self._s[3017]! } + public var Watch_Message_Unsupported: String { return self._s[3018]! } public func Call_CameraOff(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3015]!, self._r[3015]!, [_0]) + return formatWithArgumentRanges(self._s[3020]!, self._r[3020]!, [_0]) } - public var AuthSessions_TerminateOtherSessions: String { return self._s[3016]! } - public var CreatePoll_AllOptionsAdded: String { return self._s[3018]! } - public var TwoStepAuth_RecoveryEmailTitle: String { return self._s[3019]! } - public var Call_IncomingVoiceCall: String { return self._s[3020]! } + public var AuthSessions_TerminateOtherSessions: String { return self._s[3021]! } + public var CreatePoll_AllOptionsAdded: String { return self._s[3023]! } + public var TwoStepAuth_RecoveryEmailTitle: String { return self._s[3024]! } + public var Call_IncomingVoiceCall: String { return self._s[3025]! } public func Channel_AdminLog_MessageTransferedNameUsername(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3021]!, self._r[3021]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3026]!, self._r[3026]!, [_1, _2]) } - public var PrivacySettings_DeleteAccountHelp: String { return self._s[3022]! } - public var Passport_Address_TypePassportRegistrationUploadScan: String { return self._s[3023]! } - public var Group_EditAdmin_RankOwnerPlaceholder: String { return self._s[3024]! } - public var Group_ErrorAccessDenied: String { return self._s[3025]! } - public var PasscodeSettings_HelpTop: String { return self._s[3026]! } - public var Watch_ChatList_NoConversationsTitle: String { return self._s[3027]! } - public var AddContact_SharedContactException: String { return self._s[3028]! } - public var AccessDenied_MicrophoneRestricted: String { return self._s[3029]! } - public var Privacy_TopPeers: String { return self._s[3030]! } - public var Web_OpenExternal: String { return self._s[3031]! } - public var Group_ErrorSendRestrictedStickers: String { return self._s[3032]! } - public var Channel_Management_LabelAdministrator: String { return self._s[3033]! } + public var PrivacySettings_DeleteAccountHelp: String { return self._s[3027]! } + public var Passport_Address_TypePassportRegistrationUploadScan: String { return self._s[3028]! } + public var Group_EditAdmin_RankOwnerPlaceholder: String { return self._s[3029]! } + public var Group_ErrorAccessDenied: String { return self._s[3030]! } + public var PasscodeSettings_HelpTop: String { return self._s[3031]! } + public var Watch_ChatList_NoConversationsTitle: String { return self._s[3032]! } + public var AddContact_SharedContactException: String { return self._s[3033]! } + public var AccessDenied_MicrophoneRestricted: String { return self._s[3034]! } + public var Privacy_TopPeers: String { return self._s[3035]! } + public var Web_OpenExternal: String { return self._s[3036]! } + public var Group_ErrorSendRestrictedStickers: String { return self._s[3037]! } + public var Channel_Management_LabelAdministrator: String { return self._s[3038]! } public func ChangePhoneNumberCode_CallTimer(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3034]!, self._r[3034]!, [_0]) + return formatWithArgumentRanges(self._s[3039]!, self._r[3039]!, [_0]) } - public var Permissions_Skip: String { return self._s[3035]! } - public var Notifications_GroupNotificationsExceptions: String { return self._s[3036]! } - public var PeopleNearby_Title: String { return self._s[3037]! } - public var GroupInfo_SharedMediaNone: String { return self._s[3038]! } + public var Permissions_Skip: String { return self._s[3040]! } + public var Notifications_GroupNotificationsExceptions: String { return self._s[3041]! } + public var PeopleNearby_Title: String { return self._s[3042]! } + public var GroupInfo_SharedMediaNone: String { return self._s[3043]! } public func PUSH_MESSAGE_GEOLIVE(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3040]!, self._r[3040]!, [_1]) + return formatWithArgumentRanges(self._s[3045]!, self._r[3045]!, [_1]) } - public var Profile_MessageLifetime1w: String { return self._s[3041]! } + public var Profile_MessageLifetime1w: String { return self._s[3046]! } public func Time_PreciseDate_m6(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3042]!, self._r[3042]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[3047]!, self._r[3047]!, [_1, _2, _3]) } - public var WebBrowser_DefaultBrowser: String { return self._s[3043]! } - public var Conversation_PinOlderMessageAlertTitle: String { return self._s[3045]! } - public var EditTheme_Edit_BottomInfo: String { return self._s[3046]! } - public var Privacy_Forwards_Preview: String { return self._s[3047]! } - public var Settings_EditAccount: String { return self._s[3048]! } + public var WebBrowser_DefaultBrowser: String { return self._s[3048]! } + public var Conversation_PinOlderMessageAlertTitle: String { return self._s[3050]! } + public var EditTheme_Edit_BottomInfo: String { return self._s[3051]! } + public var Privacy_Forwards_Preview: String { return self._s[3052]! } + public var Settings_EditAccount: String { return self._s[3053]! } public func Conversation_RestrictedInlineTimed(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3049]!, self._r[3049]!, [_0]) - } - public var TwoFactorSetup_Intro_Title: String { return self._s[3050]! } - public func Channel_AdminLog_MessagePromotedName(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3052]!, self._r[3052]!, [_1]) - } - public var PeerInfo_ButtonVideoCall: String { return self._s[3053]! } - public func DialogList_SingleUploadingPhotoSuffix(_ _0: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[3054]!, self._r[3054]!, [_0]) } - public var Login_InfoHelp: String { return self._s[3055]! } - public var Notification_SecretChatMessageScreenshotSelf: String { return self._s[3056]! } - public var VoiceChat_SpeakPermissionEveryone: String { return self._s[3057]! } - public var Profile_MessageLifetime1d: String { return self._s[3058]! } - public var Group_UpgradeConfirmation: String { return self._s[3059]! } + public var TwoFactorSetup_Intro_Title: String { return self._s[3055]! } + public func Channel_AdminLog_MessagePromotedName(_ _1: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[3057]!, self._r[3057]!, [_1]) + } + public var PeerInfo_ButtonVideoCall: String { return self._s[3058]! } + public func DialogList_SingleUploadingPhotoSuffix(_ _0: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[3059]!, self._r[3059]!, [_0]) + } + public var Login_InfoHelp: String { return self._s[3060]! } + public var Notification_SecretChatMessageScreenshotSelf: String { return self._s[3061]! } + public var VoiceChat_SpeakPermissionEveryone: String { return self._s[3062]! } + public var Profile_MessageLifetime1d: String { return self._s[3063]! } + public var Group_UpgradeConfirmation: String { return self._s[3064]! } public func PUSH_PINNED_STICKER(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3060]!, self._r[3060]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3065]!, self._r[3065]!, [_1, _2]) } - public var Appearance_RemoveThemeColor: String { return self._s[3061]! } - public var Channel_AdminLog_TitleSelectedEvents: String { return self._s[3062]! } + public var Appearance_RemoveThemeColor: String { return self._s[3066]! } + public var Channel_AdminLog_TitleSelectedEvents: String { return self._s[3067]! } public func Call_AnsweringWithAccount(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3063]!, self._r[3063]!, [_0]) + return formatWithArgumentRanges(self._s[3068]!, self._r[3068]!, [_0]) } - public var UserInfo_BotSettings: String { return self._s[3064]! } + public var UserInfo_BotSettings: String { return self._s[3069]! } public func Notification_ChannelInviter(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3066]!, self._r[3066]!, [_0]) + return formatWithArgumentRanges(self._s[3071]!, self._r[3071]!, [_0]) } - public var Permissions_ContactsText_v0: String { return self._s[3067]! } - public var Conversation_PinMessagesForMe: String { return self._s[3068]! } - public var VoiceChat_PanelJoin: String { return self._s[3069]! } - public var Conversation_DiscussionStarted: String { return self._s[3071]! } - public var SettingsSearch_Synonyms_Privacy_TwoStepAuth: String { return self._s[3072]! } - public var SharedMedia_SearchNoResults: String { return self._s[3074]! } + public var Permissions_ContactsText_v0: String { return self._s[3072]! } + public var Conversation_PinMessagesForMe: String { return self._s[3073]! } + public var VoiceChat_PanelJoin: String { return self._s[3074]! } + public var Conversation_DiscussionStarted: String { return self._s[3076]! } + public var SettingsSearch_Synonyms_Privacy_TwoStepAuth: String { return self._s[3077]! } + public var SharedMedia_SearchNoResults: String { return self._s[3079]! } public func Login_EmailPhoneSubject(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3076]!, self._r[3076]!, [_0]) + return formatWithArgumentRanges(self._s[3081]!, self._r[3081]!, [_0]) } public func Conversation_ShareMyPhoneNumber_StatusSuccess(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3078]!, self._r[3078]!, [_0]) + return formatWithArgumentRanges(self._s[3083]!, self._r[3083]!, [_0]) } - public var ReportPeer_ReasonOther_Placeholder: String { return self._s[3079]! } - public var ContactInfo_PhoneLabelHomeFax: String { return self._s[3080]! } - public var Call_AudioRouteHeadphones: String { return self._s[3081]! } + public var ReportPeer_ReasonOther_Placeholder: String { return self._s[3084]! } + public var ContactInfo_PhoneLabelHomeFax: String { return self._s[3085]! } + public var Call_AudioRouteHeadphones: String { return self._s[3086]! } public func PUSH_AUTH_UNKNOWN(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3083]!, self._r[3083]!, [_1]) + return formatWithArgumentRanges(self._s[3088]!, self._r[3088]!, [_1]) } - public var Passport_Identity_FilesView: String { return self._s[3084]! } - public var TwoStepAuth_SetupEmail: String { return self._s[3085]! } - public var Widget_ApplicationStartRequired: String { return self._s[3086]! } - public var PhotoEditor_Original: String { return self._s[3087]! } - public var Call_YourMicrophoneOff: String { return self._s[3088]! } - public var Permissions_ContactsAllow_v0: String { return self._s[3089]! } - public var Notification_Exceptions_PreviewAlwaysOn: String { return self._s[3090]! } - public var PrivacyPolicy_Decline: String { return self._s[3091]! } - public var SettingsSearch_Synonyms_ChatFolders: String { return self._s[3092]! } - public var TwoStepAuth_PasswordRemoveConfirmation: String { return self._s[3093]! } - public var ChatListFolder_IncludeSectionInfo: String { return self._s[3094]! } + public var Passport_Identity_FilesView: String { return self._s[3089]! } + public var TwoStepAuth_SetupEmail: String { return self._s[3090]! } + public var Widget_ApplicationStartRequired: String { return self._s[3091]! } + public var PhotoEditor_Original: String { return self._s[3092]! } + public var Call_YourMicrophoneOff: String { return self._s[3093]! } + public var Permissions_ContactsAllow_v0: String { return self._s[3094]! } + public var Notification_Exceptions_PreviewAlwaysOn: String { return self._s[3095]! } + public var PrivacyPolicy_Decline: String { return self._s[3096]! } + public var SettingsSearch_Synonyms_ChatFolders: String { return self._s[3097]! } + public var TwoStepAuth_PasswordRemoveConfirmation: String { return self._s[3098]! } + public var ChatListFolder_IncludeSectionInfo: String { return self._s[3099]! } public func Map_DirectionsDriveEta(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3095]!, self._r[3095]!, [_0]) + return formatWithArgumentRanges(self._s[3100]!, self._r[3100]!, [_0]) } - public var Passport_Identity_Name: String { return self._s[3096]! } - public var WallpaperPreview_PatternTitle: String { return self._s[3098]! } - public var VoiceOver_Chat_RecordModeVideoMessage: String { return self._s[3099]! } - public var WallpaperSearch_ColorOrange: String { return self._s[3101]! } - public var Appearance_ThemePreview_ChatList_5_Name: String { return self._s[3102]! } - public var GroupInfo_Permissions_SlowmodeInfo: String { return self._s[3103]! } - public var Your_cards_security_code_is_invalid: String { return self._s[3104]! } - public var IntentsSettings_ResetAll: String { return self._s[3105]! } - public var SettingsSearch_Synonyms_Calls_CallTab: String { return self._s[3107]! } - public var Group_EditAdmin_TransferOwnership: String { return self._s[3108]! } - public var ChatList_DeleteForAllSubscribers: String { return self._s[3109]! } - public var Notification_Exceptions_Add: String { return self._s[3110]! } - public var Group_DeleteGroup: String { return self._s[3111]! } - public var Cache_Help: String { return self._s[3112]! } - public var Call_AudioRouteMute: String { return self._s[3113]! } - public var VoiceOver_Chat_YourVoiceMessage: String { return self._s[3114]! } - public var SocksProxySetup_ProxyEnabled: String { return self._s[3115]! } + public var Passport_Identity_Name: String { return self._s[3101]! } + public var WallpaperPreview_PatternTitle: String { return self._s[3103]! } + public var VoiceOver_Chat_RecordModeVideoMessage: String { return self._s[3104]! } + public var WallpaperSearch_ColorOrange: String { return self._s[3106]! } + public var Appearance_ThemePreview_ChatList_5_Name: String { return self._s[3107]! } + public var GroupInfo_Permissions_SlowmodeInfo: String { return self._s[3108]! } + public var Your_cards_security_code_is_invalid: String { return self._s[3109]! } + public var IntentsSettings_ResetAll: String { return self._s[3110]! } + public var SettingsSearch_Synonyms_Calls_CallTab: String { return self._s[3112]! } + public var Group_EditAdmin_TransferOwnership: String { return self._s[3113]! } + public var ChatList_DeleteForAllSubscribers: String { return self._s[3114]! } + public var Notification_Exceptions_Add: String { return self._s[3115]! } + public var Group_DeleteGroup: String { return self._s[3116]! } + public var Cache_Help: String { return self._s[3117]! } + public var Call_AudioRouteMute: String { return self._s[3118]! } + public var VoiceOver_Chat_YourVoiceMessage: String { return self._s[3119]! } + public var SocksProxySetup_ProxyEnabled: String { return self._s[3120]! } public func VoiceChat_Status_MembersFormat(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3116]!, self._r[3116]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3121]!, self._r[3121]!, [_1, _2]) } public func ApplyLanguage_UnsufficientDataText(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3117]!, self._r[3117]!, [_1]) + return formatWithArgumentRanges(self._s[3122]!, self._r[3122]!, [_1]) } public func Call_CallInProgressMessage(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3118]!, self._r[3118]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3123]!, self._r[3123]!, [_1, _2]) } - public var AutoDownloadSettings_VideoMessagesTitle: String { return self._s[3119]! } - public var Channel_BanUser_PermissionAddMembers: String { return self._s[3120]! } + public var AutoDownloadSettings_VideoMessagesTitle: String { return self._s[3124]! } + public var Channel_BanUser_PermissionAddMembers: String { return self._s[3125]! } public func PUSH_CHAT_VOICECHAT_INVITE(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3121]!, self._r[3121]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[3126]!, self._r[3126]!, [_1, _2, _3]) } - public var Contacts_MemberSearchSectionTitleGroup: String { return self._s[3122]! } - public var TwoStepAuth_RecoveryCodeHelp: String { return self._s[3123]! } - public var ClearCache_StorageFree: String { return self._s[3124]! } + public var Contacts_MemberSearchSectionTitleGroup: String { return self._s[3127]! } + public var TwoStepAuth_RecoveryCodeHelp: String { return self._s[3128]! } + public var ClearCache_StorageFree: String { return self._s[3129]! } public func DialogList_SingleRecordingVideoMessageSuffix(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3125]!, self._r[3125]!, [_0]) + return formatWithArgumentRanges(self._s[3130]!, self._r[3130]!, [_0]) } - public var Privacy_Forwards_CustomHelp: String { return self._s[3126]! } + public var Privacy_Forwards_CustomHelp: String { return self._s[3131]! } public func Channel_AdminLog_EditedInviteLink(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3128]!, self._r[3128]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3133]!, self._r[3133]!, [_1, _2]) } - public var Group_ErrorAddTooMuchAdmins: String { return self._s[3129]! } - public var DialogList_Typing: String { return self._s[3130]! } + public var Group_ErrorAddTooMuchAdmins: String { return self._s[3134]! } + public var DialogList_Typing: String { return self._s[3135]! } public func Login_EmailCodeSubject(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3131]!, self._r[3131]!, [_0]) + return formatWithArgumentRanges(self._s[3136]!, self._r[3136]!, [_0]) } - public var Target_SelectGroup: String { return self._s[3132]! } - public var AuthSessions_IncompleteAttempts: String { return self._s[3133]! } + public var Target_SelectGroup: String { return self._s[3137]! } + public var AuthSessions_IncompleteAttempts: String { return self._s[3138]! } public func Notification_ProximityReached(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3134]!, self._r[3134]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[3139]!, self._r[3139]!, [_1, _2, _3]) } - public var Chat_PinnedListPreview_ShowAllMessages: String { return self._s[3135]! } - public var TwoStepAuth_EmailChangeSuccess: String { return self._s[3136]! } + public var Chat_PinnedListPreview_ShowAllMessages: String { return self._s[3140]! } + public var TwoStepAuth_EmailChangeSuccess: String { return self._s[3141]! } public func Settings_CheckPhoneNumberTitle(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3137]!, self._r[3137]!, [_0]) + return formatWithArgumentRanges(self._s[3142]!, self._r[3142]!, [_0]) } - public var Channel_AdminLog_CanSendMessages: String { return self._s[3138]! } - public var TwoFactorSetup_EmailVerification_Title: String { return self._s[3139]! } - public var ChatSettings_TextSize: String { return self._s[3140]! } - public var Channel_AdminLogFilter_EventsEditedMessages: String { return self._s[3142]! } - public var Map_SendThisPlace: String { return self._s[3143]! } - public var Conversation_TextCopied: String { return self._s[3144]! } - public var Login_PhoneNumberAlreadyAuthorized: String { return self._s[3145]! } - public var ContactInfo_BirthdayLabel: String { return self._s[3146]! } - public var Call_ShareStats: String { return self._s[3147]! } - public var ChatList_UndoArchiveRevealedText: String { return self._s[3149]! } - public var Notifications_GroupNotificationsPreview: String { return self._s[3150]! } - public var Settings_Support: String { return self._s[3151]! } - public var GroupInfo_ChannelListNamePlaceholder: String { return self._s[3152]! } + public var Channel_AdminLog_CanSendMessages: String { return self._s[3143]! } + public var TwoFactorSetup_EmailVerification_Title: String { return self._s[3144]! } + public var ChatSettings_TextSize: String { return self._s[3145]! } + public var Channel_AdminLogFilter_EventsEditedMessages: String { return self._s[3147]! } + public var Map_SendThisPlace: String { return self._s[3148]! } + public var Conversation_TextCopied: String { return self._s[3149]! } + public var Login_PhoneNumberAlreadyAuthorized: String { return self._s[3150]! } + public var ContactInfo_BirthdayLabel: String { return self._s[3151]! } + public var Call_ShareStats: String { return self._s[3152]! } + public var ChatList_UndoArchiveRevealedText: String { return self._s[3154]! } + public var Notifications_GroupNotificationsPreview: String { return self._s[3155]! } + public var Settings_Support: String { return self._s[3156]! } + public var GroupInfo_ChannelListNamePlaceholder: String { return self._s[3157]! } public func EmptyGroupInfo_Line1(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3154]!, self._r[3154]!, [_0]) + return formatWithArgumentRanges(self._s[3159]!, self._r[3159]!, [_0]) } - public var Watch_Conversation_GroupInfo: String { return self._s[3155]! } - public var Tour_Text4: String { return self._s[3156]! } - public var UserInfo_FakeUserWarning: String { return self._s[3158]! } - public var PasscodeSettings_AutoLock: String { return self._s[3159]! } - public var Channel_BanList_BlockedTitle: String { return self._s[3160]! } - public var Bot_DescriptionTitle: String { return self._s[3161]! } - public var Map_LocationTitle: String { return self._s[3162]! } - public var ChatListFolder_ExcludeSectionInfo: String { return self._s[3163]! } + public var Watch_Conversation_GroupInfo: String { return self._s[3160]! } + public var Tour_Text4: String { return self._s[3161]! } + public var UserInfo_FakeUserWarning: String { return self._s[3163]! } + public var PasscodeSettings_AutoLock: String { return self._s[3164]! } + public var Channel_BanList_BlockedTitle: String { return self._s[3165]! } + public var Bot_DescriptionTitle: String { return self._s[3166]! } + public var Map_LocationTitle: String { return self._s[3167]! } + public var ChatListFolder_ExcludeSectionInfo: String { return self._s[3168]! } public func Notification_MessageLifetimeChangedOutgoing(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3164]!, self._r[3164]!, [_1]) + return formatWithArgumentRanges(self._s[3169]!, self._r[3169]!, [_1]) } - public var Login_EmailNotConfiguredError: String { return self._s[3165]! } - public var AutoDownloadSettings_LimitBySize: String { return self._s[3166]! } - public var PrivacySettings_LastSeenNobody: String { return self._s[3167]! } - public var Permissions_CellularDataText_v0: String { return self._s[3168]! } - public var Conversation_EncryptionProcessing: String { return self._s[3169]! } - public var GroupPermission_Delete: String { return self._s[3170]! } - public var Contacts_SortByName: String { return self._s[3171]! } - public var TwoStepAuth_RecoveryUnavailable: String { return self._s[3172]! } - public var Compose_ChannelTokenListPlaceholder: String { return self._s[3173]! } - public var Group_Management_AddModeratorHelp: String { return self._s[3175]! } - public var SettingsSearch_Synonyms_EditProfile_Logout: String { return self._s[3176]! } - public var Forward_ErrorPublicPollDisabledInChannels: String { return self._s[3177]! } - public var CallFeedback_IncludeLogsInfo: String { return self._s[3179]! } + public var Login_EmailNotConfiguredError: String { return self._s[3170]! } + public var AutoDownloadSettings_LimitBySize: String { return self._s[3171]! } + public var PrivacySettings_LastSeenNobody: String { return self._s[3172]! } + public var Permissions_CellularDataText_v0: String { return self._s[3173]! } + public var Conversation_EncryptionProcessing: String { return self._s[3174]! } + public var GroupPermission_Delete: String { return self._s[3175]! } + public var Contacts_SortByName: String { return self._s[3176]! } + public var TwoStepAuth_RecoveryUnavailable: String { return self._s[3177]! } + public var Compose_ChannelTokenListPlaceholder: String { return self._s[3178]! } + public var Group_Management_AddModeratorHelp: String { return self._s[3180]! } + public var SettingsSearch_Synonyms_EditProfile_Logout: String { return self._s[3181]! } + public var Forward_ErrorPublicPollDisabledInChannels: String { return self._s[3182]! } + public var CallFeedback_IncludeLogsInfo: String { return self._s[3184]! } public func PUSH_CHANNEL_MESSAGE_QUIZ(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3180]!, self._r[3180]!, [_1]) + return formatWithArgumentRanges(self._s[3185]!, self._r[3185]!, [_1]) } public func SecretVideo_NotViewedYet(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3181]!, self._r[3181]!, [_0]) + return formatWithArgumentRanges(self._s[3186]!, self._r[3186]!, [_0]) } - public var ChatList_Context_Delete: String { return self._s[3182]! } - public var VoiceChat_InviteMember: String { return self._s[3183]! } - public var PrivacyPhoneNumberSettings_CustomDisabledHelp: String { return self._s[3184]! } - public var Conversation_Processing: String { return self._s[3185]! } - public var TwoStepAuth_EmailCodeExpired: String { return self._s[3186]! } - public var ChatSettings_Stickers: String { return self._s[3187]! } - public var AppleWatch_ReplyPresetsHelp: String { return self._s[3188]! } - public var Passport_Language_cs: String { return self._s[3189]! } - public var GroupInfo_InvitationLinkGroupFull: String { return self._s[3191]! } - public var Conversation_Contact: String { return self._s[3192]! } - public var Passport_Identity_ReverseSideHelp: String { return self._s[3193]! } - public var SocksProxySetup_PasteFromClipboard: String { return self._s[3194]! } - public var Theme_Unsupported: String { return self._s[3195]! } - public var Privacy_TopPeersWarning: String { return self._s[3196]! } - public var InviteLink_Title: String { return self._s[3198]! } + public var ChatList_Context_Delete: String { return self._s[3187]! } + public var VoiceChat_InviteMember: String { return self._s[3188]! } + public var PrivacyPhoneNumberSettings_CustomDisabledHelp: String { return self._s[3189]! } + public var Conversation_Processing: String { return self._s[3190]! } + public var TwoStepAuth_EmailCodeExpired: String { return self._s[3191]! } + public var ChatSettings_Stickers: String { return self._s[3192]! } + public var AppleWatch_ReplyPresetsHelp: String { return self._s[3193]! } + public var Passport_Language_cs: String { return self._s[3194]! } + public var GroupInfo_InvitationLinkGroupFull: String { return self._s[3196]! } + public var Conversation_Contact: String { return self._s[3197]! } + public var Passport_Identity_ReverseSideHelp: String { return self._s[3198]! } + public var SocksProxySetup_PasteFromClipboard: String { return self._s[3199]! } + public var Theme_Unsupported: String { return self._s[3200]! } + public var Privacy_TopPeersWarning: String { return self._s[3201]! } + public var InviteLink_Title: String { return self._s[3203]! } public func UserInfo_BlockConfirmationTitle(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3199]!, self._r[3199]!, [_0]) + return formatWithArgumentRanges(self._s[3204]!, self._r[3204]!, [_0]) } - public var Conversation_SilentBroadcastTooltipOn: String { return self._s[3200]! } - public var TwoStepAuth_RemovePassword: String { return self._s[3201]! } - public var Settings_CheckPhoneNumberText: String { return self._s[3202]! } - public var PeopleNearby_Users: String { return self._s[3203]! } - public var Appearance_TextSize_UseSystem: String { return self._s[3204]! } - public var Settings_SetProfilePhoto: String { return self._s[3205]! } - public var Conversation_ContextMenuBan: String { return self._s[3206]! } - public var KeyCommand_ScrollUp: String { return self._s[3207]! } - public var Settings_ChatSettings: String { return self._s[3209]! } - public var CallList_RecentCallsHeader: String { return self._s[3210]! } + public var Conversation_SilentBroadcastTooltipOn: String { return self._s[3205]! } + public var TwoStepAuth_RemovePassword: String { return self._s[3206]! } + public var Settings_CheckPhoneNumberText: String { return self._s[3207]! } + public var PeopleNearby_Users: String { return self._s[3208]! } + public var Appearance_TextSize_UseSystem: String { return self._s[3209]! } + public var Settings_SetProfilePhoto: String { return self._s[3210]! } + public var Conversation_ContextMenuBan: String { return self._s[3211]! } + public var KeyCommand_ScrollUp: String { return self._s[3212]! } + public var Settings_ChatSettings: String { return self._s[3214]! } + public var CallList_RecentCallsHeader: String { return self._s[3215]! } public func PUSH_CHAT_MESSAGE_VIDEO(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3211]!, self._r[3211]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3216]!, self._r[3216]!, [_1, _2]) } - public var Stats_GroupTopInvitersTitle: String { return self._s[3212]! } - public var Passport_Phone_EnterOtherNumber: String { return self._s[3213]! } - public var VoiceChat_StartRecordingTitle: String { return self._s[3214]! } - public var Passport_Identity_MiddleNamePlaceholder: String { return self._s[3216]! } - public var Passport_Address_OneOfTypeBankStatement: String { return self._s[3217]! } - public var VoiceOver_ChatList_MessageRead: String { return self._s[3218]! } - public var Stats_GroupTopPoster_Promote: String { return self._s[3219]! } - public var Cache_Title: String { return self._s[3220]! } - public var Clipboard_SendPhoto: String { return self._s[3221]! } - public var Notifications_ExceptionsMessagePlaceholder: String { return self._s[3223]! } - public var TwoStepAuth_EnterPasswordForgot: String { return self._s[3224]! } - public var WatchRemote_AlertTitle: String { return self._s[3226]! } - public var Appearance_ReduceMotion: String { return self._s[3227]! } + public var Stats_GroupTopInvitersTitle: String { return self._s[3217]! } + public var Passport_Phone_EnterOtherNumber: String { return self._s[3218]! } + public var VoiceChat_StartRecordingTitle: String { return self._s[3219]! } + public var Passport_Identity_MiddleNamePlaceholder: String { return self._s[3221]! } + public var Passport_Address_OneOfTypeBankStatement: String { return self._s[3222]! } + public var VoiceOver_ChatList_MessageRead: String { return self._s[3223]! } + public var Stats_GroupTopPoster_Promote: String { return self._s[3224]! } + public var Cache_Title: String { return self._s[3225]! } + public var Clipboard_SendPhoto: String { return self._s[3226]! } + public var Notifications_ExceptionsMessagePlaceholder: String { return self._s[3228]! } + public var TwoStepAuth_EnterPasswordForgot: String { return self._s[3229]! } + public var WatchRemote_AlertTitle: String { return self._s[3231]! } + public var Appearance_ReduceMotion: String { return self._s[3232]! } public func PUSH_CHAT_MESSAGE_ROUND(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3230]!, self._r[3230]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3235]!, self._r[3235]!, [_1, _2]) } - public var Notifications_PermissionsSuppressWarningText: String { return self._s[3231]! } - public var ChatList_UndoArchiveHiddenTitle: String { return self._s[3232]! } - public var Passport_Identity_TypePersonalDetails: String { return self._s[3233]! } + public var Notifications_PermissionsSuppressWarningText: String { return self._s[3236]! } + public var ChatList_UndoArchiveHiddenTitle: String { return self._s[3237]! } + public var Passport_Identity_TypePersonalDetails: String { return self._s[3238]! } public func Call_CallInProgressVoiceChatMessage(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3234]!, self._r[3234]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3239]!, self._r[3239]!, [_1, _2]) } public func Passport_Identity_UploadOneOfScan(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3236]!, self._r[3236]!, [_0]) + return formatWithArgumentRanges(self._s[3241]!, self._r[3241]!, [_0]) } - public var ChatListFolder_DiscardConfirmation: String { return self._s[3237]! } + public var ChatListFolder_DiscardConfirmation: String { return self._s[3242]! } public func Conversation_RestrictedStickersTimed(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3238]!, self._r[3238]!, [_0]) + return formatWithArgumentRanges(self._s[3243]!, self._r[3243]!, [_0]) } - public var ChatState_WaitingForNetwork: String { return self._s[3239]! } - public var GroupInfo_Sound: String { return self._s[3240]! } - public var NotificationsSound_Telegraph: String { return self._s[3241]! } - public var NotificationsSound_Hello: String { return self._s[3242]! } - public var Passport_FieldIdentityDetailsHelp: String { return self._s[3243]! } - public var Group_Members_AddMemberBotErrorNotAllowed: String { return self._s[3244]! } - public var Conversation_HoldForVideo: String { return self._s[3245]! } - public var Conversation_PinOlderMessageAlertText: String { return self._s[3246]! } - public var Appearance_ShareTheme: String { return self._s[3247]! } - public var TwoStepAuth_SetupHint: String { return self._s[3248]! } - public var Stats_GrowthTitle: String { return self._s[3251]! } - public var GroupInfo_InviteLink_ShareLink: String { return self._s[3252]! } - public var Conversation_DefaultRestrictedMedia: String { return self._s[3253]! } - public var Channel_EditAdmin_PermissionPostMessages: String { return self._s[3254]! } - public var ConvertToChannel_LimitAlert_Title: String { return self._s[3255]! } - public var GroupPermission_NoSendMessages: String { return self._s[3258]! } - public var Conversation_SetReminder_Title: String { return self._s[3259]! } - public var Privacy_Calls_CustomHelp: String { return self._s[3260]! } - public var CheckoutInfo_ErrorPostcodeInvalid: String { return self._s[3261]! } + public var ChatState_WaitingForNetwork: String { return self._s[3244]! } + public var GroupInfo_Sound: String { return self._s[3245]! } + public var NotificationsSound_Telegraph: String { return self._s[3246]! } + public var NotificationsSound_Hello: String { return self._s[3247]! } + public var Passport_FieldIdentityDetailsHelp: String { return self._s[3248]! } + public var Group_Members_AddMemberBotErrorNotAllowed: String { return self._s[3249]! } + public var Conversation_HoldForVideo: String { return self._s[3250]! } + public var Conversation_PinOlderMessageAlertText: String { return self._s[3251]! } + public var Appearance_ShareTheme: String { return self._s[3252]! } + public var TwoStepAuth_SetupHint: String { return self._s[3253]! } + public var Stats_GrowthTitle: String { return self._s[3256]! } + public var GroupInfo_InviteLink_ShareLink: String { return self._s[3257]! } + public var Conversation_DefaultRestrictedMedia: String { return self._s[3258]! } + public var Channel_EditAdmin_PermissionPostMessages: String { return self._s[3259]! } + public var ConvertToChannel_LimitAlert_Title: String { return self._s[3260]! } + public var GroupPermission_NoSendMessages: String { return self._s[3263]! } + public var Conversation_SetReminder_Title: String { return self._s[3264]! } + public var Privacy_Calls_CustomHelp: String { return self._s[3265]! } + public var CheckoutInfo_ErrorPostcodeInvalid: String { return self._s[3266]! } public func ClearCache_StorageTitle(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3262]!, self._r[3262]!, [_0]) + return formatWithArgumentRanges(self._s[3267]!, self._r[3267]!, [_0]) } - public var Undo_SecretChatDeleted: String { return self._s[3264]! } - public var PhotoEditor_ContrastTool: String { return self._s[3265]! } - public var Privacy_Forwards: String { return self._s[3266]! } - public var AuthSessions_LoggedInWithTelegram: String { return self._s[3267]! } - public var KeyCommand_SendMessage: String { return self._s[3269]! } + public var Undo_SecretChatDeleted: String { return self._s[3269]! } + public var PhotoEditor_ContrastTool: String { return self._s[3270]! } + public var Privacy_Forwards: String { return self._s[3271]! } + public var AuthSessions_LoggedInWithTelegram: String { return self._s[3272]! } + public var KeyCommand_SendMessage: String { return self._s[3274]! } public func InstantPage_RelatedArticleAuthorAndDateTitle(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3270]!, self._r[3270]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3275]!, self._r[3275]!, [_1, _2]) } - public var GroupPermission_NoSendGifs: String { return self._s[3271]! } - public var Notification_MessageLifetime2s: String { return self._s[3272]! } - public var Message_Theme: String { return self._s[3273]! } - public var Conversation_Dice_u1F3AF: String { return self._s[3276]! } + public var GroupPermission_NoSendGifs: String { return self._s[3276]! } + public var Notification_MessageLifetime2s: String { return self._s[3277]! } + public var Message_Theme: String { return self._s[3278]! } + public var Conversation_Dice_u1F3AF: String { return self._s[3281]! } public func DialogList_SinglePlayingGameSuffix(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3277]!, self._r[3277]!, [_0]) + return formatWithArgumentRanges(self._s[3282]!, self._r[3282]!, [_0]) } - public var Group_UpgradeNoticeHeader: String { return self._s[3279]! } - public var PeerInfo_BioExpand: String { return self._s[3280]! } - public var Passport_DeletePersonalDetails: String { return self._s[3281]! } - public var Widget_NoUsers: String { return self._s[3282]! } - public var TwoStepAuth_AddHintTitle: String { return self._s[3283]! } - public var Login_TermsOfServiceDecline: String { return self._s[3284]! } - public var CreatePoll_QuizTip: String { return self._s[3286]! } - public var Watch_LastSeen_WithinAWeek: String { return self._s[3287]! } - public var MessagePoll_SubmitVote: String { return self._s[3289]! } - public var ChatSettings_AutoDownloadEnabled: String { return self._s[3290]! } - public var Passport_Address_EditRentalAgreement: String { return self._s[3291]! } - public var Conversation_SearchByName_Placeholder: String { return self._s[3292]! } - public var Conversation_UpdateTelegram: String { return self._s[3293]! } + public var Group_UpgradeNoticeHeader: String { return self._s[3284]! } + public var PeerInfo_BioExpand: String { return self._s[3285]! } + public var Passport_DeletePersonalDetails: String { return self._s[3286]! } + public var Widget_NoUsers: String { return self._s[3287]! } + public var TwoStepAuth_AddHintTitle: String { return self._s[3288]! } + public var Login_TermsOfServiceDecline: String { return self._s[3289]! } + public var CreatePoll_QuizTip: String { return self._s[3291]! } + public var Watch_LastSeen_WithinAWeek: String { return self._s[3292]! } + public var MessagePoll_SubmitVote: String { return self._s[3294]! } + public var ChatSettings_AutoDownloadEnabled: String { return self._s[3295]! } + public var Passport_Address_EditRentalAgreement: String { return self._s[3296]! } + public var Conversation_SearchByName_Placeholder: String { return self._s[3297]! } + public var Conversation_UpdateTelegram: String { return self._s[3298]! } public func FileSize_KB(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3294]!, self._r[3294]!, [_0]) + return formatWithArgumentRanges(self._s[3299]!, self._r[3299]!, [_0]) } - public var UserInfo_About_Placeholder: String { return self._s[3295]! } - public var CallSettings_Always: String { return self._s[3296]! } - public var ChannelInfo_ScamChannelWarning: String { return self._s[3297]! } - public var Login_TermsOfServiceHeader: String { return self._s[3298]! } - public var KeyCommand_ChatInfo: String { return self._s[3299]! } - public var MessagePoll_LabelPoll: String { return self._s[3300]! } - public var Paint_Clear: String { return self._s[3301]! } - public var PeerInfo_ButtonMute: String { return self._s[3302]! } - public var LastSeen_WithinAWeek: String { return self._s[3303]! } - public var Passport_Identity_FrontSide: String { return self._s[3304]! } - public var Stickers_GroupStickers: String { return self._s[3305]! } - public var ChangePhoneNumberNumber_NumberPlaceholder: String { return self._s[3306]! } + public var UserInfo_About_Placeholder: String { return self._s[3300]! } + public var CallSettings_Always: String { return self._s[3301]! } + public var ChannelInfo_ScamChannelWarning: String { return self._s[3302]! } + public var Login_TermsOfServiceHeader: String { return self._s[3303]! } + public var KeyCommand_ChatInfo: String { return self._s[3304]! } + public var MessagePoll_LabelPoll: String { return self._s[3305]! } + public var Paint_Clear: String { return self._s[3306]! } + public var PeerInfo_ButtonMute: String { return self._s[3307]! } + public var LastSeen_WithinAWeek: String { return self._s[3308]! } + public var Passport_Identity_FrontSide: String { return self._s[3309]! } + public var Stickers_GroupStickers: String { return self._s[3310]! } + public var ChangePhoneNumberNumber_NumberPlaceholder: String { return self._s[3311]! } public func Map_SearchNoResultsDescription(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3307]!, self._r[3307]!, [_0]) + return formatWithArgumentRanges(self._s[3312]!, self._r[3312]!, [_0]) } public func PUSH_MESSAGE_GEO(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3310]!, self._r[3310]!, [_1]) + return formatWithArgumentRanges(self._s[3315]!, self._r[3315]!, [_1]) } - public var SocksProxySetup_ProxyStatusConnected: String { return self._s[3311]! } - public var Chat_MultipleTextMessagesDisabled: String { return self._s[3312]! } - public var InviteLink_ContextDelete: String { return self._s[3313]! } + public var SocksProxySetup_ProxyStatusConnected: String { return self._s[3316]! } + public var Chat_MultipleTextMessagesDisabled: String { return self._s[3317]! } + public var InviteLink_ContextDelete: String { return self._s[3318]! } public func Notification_LeftChat(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3314]!, self._r[3314]!, [_0]) + return formatWithArgumentRanges(self._s[3319]!, self._r[3319]!, [_0]) } - public var WebSearch_SearchNoResults: String { return self._s[3316]! } - public var Channel_DiscussionGroup_Create: String { return self._s[3317]! } - public var Passport_Language_es: String { return self._s[3318]! } - public var EnterPasscode_EnterCurrentPasscode: String { return self._s[3319]! } - public var Map_LiveLocationShowAll: String { return self._s[3320]! } - public var Cache_MaximumCacheSizeHelp: String { return self._s[3322]! } - public var Map_OpenInGoogleMaps: String { return self._s[3323]! } - public var CheckoutInfo_ErrorNameInvalid: String { return self._s[3325]! } - public var EditTheme_Create_BottomInfo: String { return self._s[3326]! } - public var PhotoEditor_BlurToolLinear: String { return self._s[3327]! } + public var WebSearch_SearchNoResults: String { return self._s[3321]! } + public var Channel_DiscussionGroup_Create: String { return self._s[3322]! } + public var Passport_Language_es: String { return self._s[3323]! } + public var EnterPasscode_EnterCurrentPasscode: String { return self._s[3324]! } + public var Map_LiveLocationShowAll: String { return self._s[3325]! } + public var Cache_MaximumCacheSizeHelp: String { return self._s[3327]! } + public var Map_OpenInGoogleMaps: String { return self._s[3328]! } + public var CheckoutInfo_ErrorNameInvalid: String { return self._s[3330]! } + public var EditTheme_Create_BottomInfo: String { return self._s[3331]! } + public var PhotoEditor_BlurToolLinear: String { return self._s[3332]! } public func Channel_AdminLog_MessageEdited(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3328]!, self._r[3328]!, [_0]) + return formatWithArgumentRanges(self._s[3333]!, self._r[3333]!, [_0]) } - public var Passport_Phone_Delete: String { return self._s[3329]! } - public var Channel_Username_CreatePrivateLinkHelp: String { return self._s[3330]! } - public var PrivacySettings_PrivacyTitle: String { return self._s[3331]! } - public var CheckoutInfo_ReceiverInfoNamePlaceholder: String { return self._s[3332]! } + public var Passport_Phone_Delete: String { return self._s[3334]! } + public var Channel_Username_CreatePrivateLinkHelp: String { return self._s[3335]! } + public var PrivacySettings_PrivacyTitle: String { return self._s[3336]! } + public var CheckoutInfo_ReceiverInfoNamePlaceholder: String { return self._s[3337]! } public func EncryptionKey_Description(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3333]!, self._r[3333]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3338]!, self._r[3338]!, [_1, _2]) } - public var LogoutOptions_LogOutInfo: String { return self._s[3334]! } - public var Cache_ByPeerHeader: String { return self._s[3336]! } - public var Username_InvalidCharacters: String { return self._s[3337]! } - public var Checkout_ShippingAddress: String { return self._s[3338]! } + public var LogoutOptions_LogOutInfo: String { return self._s[3339]! } + public var Cache_ByPeerHeader: String { return self._s[3341]! } + public var Username_InvalidCharacters: String { return self._s[3342]! } + public var Checkout_ShippingAddress: String { return self._s[3343]! } public func PUSH_CHAT_MESSAGE_GAME_SCORE(_ _1: String, _ _2: String, _ _3: String, _ _4: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3339]!, self._r[3339]!, [_1, _2, _3, _4]) + return formatWithArgumentRanges(self._s[3344]!, self._r[3344]!, [_1, _2, _3, _4]) } - public var Conversation_AddContact: String { return self._s[3341]! } - public var Passport_Address_EditUtilityBill: String { return self._s[3342]! } - public var InviteLink_ContextGetQRCode: String { return self._s[3343]! } - public var Conversation_ChecksTooltip_Delivered: String { return self._s[3344]! } - public var Message_Video: String { return self._s[3345]! } + public var Conversation_AddContact: String { return self._s[3346]! } + public var Passport_Address_EditUtilityBill: String { return self._s[3347]! } + public var InviteLink_ContextGetQRCode: String { return self._s[3348]! } + public var Conversation_ChecksTooltip_Delivered: String { return self._s[3349]! } + public var Message_Video: String { return self._s[3350]! } public func Watch_Time_ShortYesterdayAt(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3346]!, self._r[3346]!, [_0]) + return formatWithArgumentRanges(self._s[3351]!, self._r[3351]!, [_0]) } public func Conversation_Megabytes(_ _0: Float) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3347]!, self._r[3347]!, ["\(_0)"]) + return formatWithArgumentRanges(self._s[3352]!, self._r[3352]!, ["\(_0)"]) } - public var InviteLink_ReactivateLink: String { return self._s[3348]! } - public var Passport_Language_km: String { return self._s[3349]! } + public var InviteLink_ReactivateLink: String { return self._s[3353]! } + public var Passport_Language_km: String { return self._s[3354]! } public func PUSH_MESSAGE_CHANNEL_MESSAGE_GAME_SCORE(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3350]!, self._r[3350]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[3355]!, self._r[3355]!, [_1, _2, _3]) } - public var EmptyGroupInfo_Line4: String { return self._s[3351]! } - public var Conversation_SendMessageErrorTooMuchScheduled: String { return self._s[3353]! } - public var Notification_CallCanceledShort: String { return self._s[3354]! } - public var PhotoEditor_FadeTool: String { return self._s[3355]! } - public var Group_PublicLink_Info: String { return self._s[3356]! } - public var Contacts_DeselectAll: String { return self._s[3357]! } - public var Conversation_Moderate_Delete: String { return self._s[3358]! } - public var TwoStepAuth_RecoveryCodeInvalid: String { return self._s[3359]! } - public var NotificationsSound_Note: String { return self._s[3362]! } + public var EmptyGroupInfo_Line4: String { return self._s[3356]! } + public var Conversation_SendMessageErrorTooMuchScheduled: String { return self._s[3358]! } + public var Notification_CallCanceledShort: String { return self._s[3359]! } + public var PhotoEditor_FadeTool: String { return self._s[3360]! } + public var Group_PublicLink_Info: String { return self._s[3361]! } + public var Contacts_DeselectAll: String { return self._s[3362]! } + public var Conversation_Moderate_Delete: String { return self._s[3363]! } + public var TwoStepAuth_RecoveryCodeInvalid: String { return self._s[3364]! } + public var NotificationsSound_Note: String { return self._s[3367]! } public func Message_PaymentSent(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3363]!, self._r[3363]!, [_0]) + return formatWithArgumentRanges(self._s[3368]!, self._r[3368]!, [_0]) } - public var Appearance_ThemePreview_ChatList_7_Text: String { return self._s[3364]! } - public var Channel_EditAdmin_PermissionInviteViaLink: String { return self._s[3366]! } - public var DialogList_SearchSectionGlobal: String { return self._s[3367]! } - public var AccessDenied_Settings: String { return self._s[3368]! } - public var Passport_Identity_TypeIdentityCardUploadScan: String { return self._s[3369]! } - public var AuthSessions_EmptyTitle: String { return self._s[3370]! } - public var TwoStepAuth_PasswordChangeSuccess: String { return self._s[3371]! } - public var GroupInfo_GroupType: String { return self._s[3372]! } - public var Calls_Missed: String { return self._s[3373]! } - public var UserInfo_GenericPhoneLabel: String { return self._s[3375]! } - public var Passport_Language_uz: String { return self._s[3376]! } - public var Conversation_StopQuizConfirmationTitle: String { return self._s[3377]! } - public var PhotoEditor_BlurToolPortrait: String { return self._s[3378]! } - public var Map_ChooseLocationTitle: String { return self._s[3379]! } - public var Checkout_EnterPassword: String { return self._s[3380]! } - public var GroupInfo_ConvertToSupergroup: String { return self._s[3381]! } - public var AutoNightTheme_UpdateLocation: String { return self._s[3382]! } - public var NetworkUsageSettings_Title: String { return self._s[3383]! } - public var Location_ProximityAlertCancelled: String { return self._s[3384]! } - public var SettingsSearch_Synonyms_ChatSettings_IntentsSettings: String { return self._s[3385]! } - public var Message_PinnedLiveLocationMessage: String { return self._s[3386]! } - public var Compose_NewChannel: String { return self._s[3387]! } - public var Privacy_PaymentsClearInfo: String { return self._s[3389]! } + public var Appearance_ThemePreview_ChatList_7_Text: String { return self._s[3369]! } + public var Channel_EditAdmin_PermissionInviteViaLink: String { return self._s[3371]! } + public var DialogList_SearchSectionGlobal: String { return self._s[3372]! } + public var AccessDenied_Settings: String { return self._s[3373]! } + public var Passport_Identity_TypeIdentityCardUploadScan: String { return self._s[3374]! } + public var AuthSessions_EmptyTitle: String { return self._s[3375]! } + public var TwoStepAuth_PasswordChangeSuccess: String { return self._s[3376]! } + public var GroupInfo_GroupType: String { return self._s[3377]! } + public var Calls_Missed: String { return self._s[3378]! } + public var UserInfo_GenericPhoneLabel: String { return self._s[3380]! } + public var Passport_Language_uz: String { return self._s[3381]! } + public var Conversation_StopQuizConfirmationTitle: String { return self._s[3382]! } + public var PhotoEditor_BlurToolPortrait: String { return self._s[3383]! } + public var Map_ChooseLocationTitle: String { return self._s[3384]! } + public var Checkout_EnterPassword: String { return self._s[3385]! } + public var GroupInfo_ConvertToSupergroup: String { return self._s[3386]! } + public var AutoNightTheme_UpdateLocation: String { return self._s[3387]! } + public var NetworkUsageSettings_Title: String { return self._s[3388]! } + public var Location_ProximityAlertCancelled: String { return self._s[3389]! } + public var SettingsSearch_Synonyms_ChatSettings_IntentsSettings: String { return self._s[3390]! } + public var Message_PinnedLiveLocationMessage: String { return self._s[3391]! } + public var Compose_NewChannel: String { return self._s[3392]! } + public var Privacy_PaymentsClearInfo: String { return self._s[3394]! } public func PUSH_MESSAGE_POLL(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3390]!, self._r[3390]!, [_1]) + return formatWithArgumentRanges(self._s[3395]!, self._r[3395]!, [_1]) } - public var Notification_Exceptions_AlwaysOn: String { return self._s[3391]! } - public var Privacy_GroupsAndChannels_WhoCanAddMe: String { return self._s[3392]! } - public var AutoNightTheme_AutomaticSection: String { return self._s[3395]! } - public var WallpaperSearch_ColorBrown: String { return self._s[3396]! } - public var Appearance_AppIconDefault: String { return self._s[3397]! } - public var StickerSettings_ContextInfo: String { return self._s[3400]! } - public var Channel_AddBotErrorNoRights: String { return self._s[3401]! } - public var Passport_FieldPhone: String { return self._s[3403]! } - public var Contacts_PermissionsTitle: String { return self._s[3404]! } - public var TwoFactorSetup_Email_SkipConfirmationSkip: String { return self._s[3405]! } + public var Notification_Exceptions_AlwaysOn: String { return self._s[3396]! } + public var Privacy_GroupsAndChannels_WhoCanAddMe: String { return self._s[3397]! } + public var AutoNightTheme_AutomaticSection: String { return self._s[3400]! } + public var WallpaperSearch_ColorBrown: String { return self._s[3401]! } + public var Appearance_AppIconDefault: String { return self._s[3402]! } + public var StickerSettings_ContextInfo: String { return self._s[3405]! } + public var Channel_AddBotErrorNoRights: String { return self._s[3406]! } + public var Passport_FieldPhone: String { return self._s[3408]! } + public var Contacts_PermissionsTitle: String { return self._s[3409]! } + public var TwoFactorSetup_Email_SkipConfirmationSkip: String { return self._s[3410]! } public func Notification_JoinedChat(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3406]!, self._r[3406]!, [_0]) + return formatWithArgumentRanges(self._s[3411]!, self._r[3411]!, [_0]) } - public var ConvertToChannel_ConfirmationAlert_Title: String { return self._s[3407]! } - public var Bot_Unblock: String { return self._s[3408]! } - public var PasscodeSettings_SimplePasscode: String { return self._s[3409]! } - public var InviteLink_InviteLinkCopiedText: String { return self._s[3410]! } - public var Passport_PasswordHelp: String { return self._s[3411]! } - public var Watch_Conversation_UserInfo: String { return self._s[3412]! } + public var ConvertToChannel_ConfirmationAlert_Title: String { return self._s[3412]! } + public var Bot_Unblock: String { return self._s[3413]! } + public var PasscodeSettings_SimplePasscode: String { return self._s[3414]! } + public var InviteLink_InviteLinkCopiedText: String { return self._s[3415]! } + public var Passport_PasswordHelp: String { return self._s[3416]! } + public var Watch_Conversation_UserInfo: String { return self._s[3417]! } public func Channel_AdminLog_MessageChangedGroupGeoLocation(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3416]!, self._r[3416]!, [_0]) + return formatWithArgumentRanges(self._s[3421]!, self._r[3421]!, [_0]) } - public var State_Connecting: String { return self._s[3418]! } - public var Passport_Address_TypeTemporaryRegistration: String { return self._s[3419]! } - public var TextFormat_AddLinkPlaceholder: String { return self._s[3420]! } - public var Conversation_Dice_u1F3B2: String { return self._s[3421]! } + public var State_Connecting: String { return self._s[3423]! } + public var Passport_Address_TypeTemporaryRegistration: String { return self._s[3424]! } + public var TextFormat_AddLinkPlaceholder: String { return self._s[3425]! } + public var Conversation_Dice_u1F3B2: String { return self._s[3426]! } public func Call_StatusBar(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3422]!, self._r[3422]!, [_0]) + return formatWithArgumentRanges(self._s[3427]!, self._r[3427]!, [_0]) } - public var Conversation_SendingOptionsTooltip: String { return self._s[3423]! } - public var ChatList_UndoArchiveTitle: String { return self._s[3424]! } - public var ChatList_EmptyChatListNewMessage: String { return self._s[3425]! } - public var WallpaperSearch_ColorGreen: String { return self._s[3427]! } - public var PhotoEditor_BlurToolOff: String { return self._s[3428]! } - public var SocksProxySetup_PortPlaceholder: String { return self._s[3429]! } - public var Weekday_Saturday: String { return self._s[3430]! } - public var DialogList_Unread: String { return self._s[3431]! } - public var Watch_LastSeen_ALongTimeAgo: String { return self._s[3432]! } - public var Stats_GroupPosters: String { return self._s[3433]! } + public var Conversation_SendingOptionsTooltip: String { return self._s[3428]! } + public var ChatList_UndoArchiveTitle: String { return self._s[3429]! } + public var ChatList_EmptyChatListNewMessage: String { return self._s[3430]! } + public var WallpaperSearch_ColorGreen: String { return self._s[3432]! } + public var PhotoEditor_BlurToolOff: String { return self._s[3433]! } + public var SocksProxySetup_PortPlaceholder: String { return self._s[3434]! } + public var Weekday_Saturday: String { return self._s[3435]! } + public var DialogList_Unread: String { return self._s[3436]! } + public var Watch_LastSeen_ALongTimeAgo: String { return self._s[3437]! } + public var Stats_GroupPosters: String { return self._s[3438]! } public func PUSH_ENCRYPTION_REQUEST(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3434]!, self._r[3434]!, [_1]) + return formatWithArgumentRanges(self._s[3439]!, self._r[3439]!, [_1]) } public func Conversation_ForwardTooltip_TwoChats_One(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3435]!, self._r[3435]!, [_0, _1]) + return formatWithArgumentRanges(self._s[3440]!, self._r[3440]!, [_0, _1]) } public func Target_ShareGameConfirmationGroup(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3438]!, self._r[3438]!, [_0]) + return formatWithArgumentRanges(self._s[3443]!, self._r[3443]!, [_0]) } - public var ReportPeer_ReasonChildAbuse: String { return self._s[3439]! } + public var ReportPeer_ReasonChildAbuse: String { return self._s[3444]! } public func Channel_AdminLog_MessageUnkickedNameUsername(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3440]!, self._r[3440]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3445]!, self._r[3445]!, [_1, _2]) } - public var InfoPlist_NSContactsUsageDescription: String { return self._s[3441]! } - public var AutoNightTheme_UseSunsetSunrise: String { return self._s[3443]! } - public var Channel_OwnershipTransfer_ChangeOwner: String { return self._s[3444]! } - public var Call_VoiceOver_VoiceCallCanceled: String { return self._s[3445]! } - public var Passport_Language_dv: String { return self._s[3446]! } - public var GroupPermission_AddSuccess: String { return self._s[3448]! } - public var Passport_Email_Help: String { return self._s[3449]! } - public var Call_ReportPlaceholder: String { return self._s[3450]! } - public var CreatePoll_AddOption: String { return self._s[3451]! } - public var MessagePoll_LabelAnonymousQuiz: String { return self._s[3453]! } - public var PeerInfo_ButtonLeave: String { return self._s[3454]! } - public var PhotoEditor_TiltShift: String { return self._s[3457]! } - public var SecretGif_Title: String { return self._s[3459]! } - public var GroupInfo_InviteLinks: String { return self._s[3460]! } - public var PhotoEditor_QualityVeryLow: String { return self._s[3461]! } - public var SocksProxySetup_Connecting: String { return self._s[3462]! } - public var PrivacySettings_PasscodeAndFaceId: String { return self._s[3463]! } - public var ContactInfo_PhoneLabelWork: String { return self._s[3464]! } - public var Stats_GroupTopHoursTitle: String { return self._s[3465]! } - public var Compose_NewMessage: String { return self._s[3466]! } - public var VoiceOver_Common_SwitchHint: String { return self._s[3467]! } - public var NotificationsSound_Synth: String { return self._s[3468]! } - public var ChatImport_UserErrorNotMutual: String { return self._s[3469]! } - public var Conversation_FileOpenIn: String { return self._s[3470]! } - public var AutoDownloadSettings_WifiTitle: String { return self._s[3471]! } - public var UserInfo_SendMessage: String { return self._s[3472]! } - public var Checkout_PayWithFaceId: String { return self._s[3473]! } + public var InfoPlist_NSContactsUsageDescription: String { return self._s[3446]! } + public var AutoNightTheme_UseSunsetSunrise: String { return self._s[3448]! } + public var Channel_OwnershipTransfer_ChangeOwner: String { return self._s[3449]! } + public var Call_VoiceOver_VoiceCallCanceled: String { return self._s[3450]! } + public var Passport_Language_dv: String { return self._s[3451]! } + public var GroupPermission_AddSuccess: String { return self._s[3453]! } + public var Passport_Email_Help: String { return self._s[3454]! } + public var Call_ReportPlaceholder: String { return self._s[3455]! } + public var CreatePoll_AddOption: String { return self._s[3456]! } + public var MessagePoll_LabelAnonymousQuiz: String { return self._s[3458]! } + public var PeerInfo_ButtonLeave: String { return self._s[3459]! } + public var PhotoEditor_TiltShift: String { return self._s[3462]! } + public var SecretGif_Title: String { return self._s[3464]! } + public var GroupInfo_InviteLinks: String { return self._s[3465]! } + public var PhotoEditor_QualityVeryLow: String { return self._s[3466]! } + public var SocksProxySetup_Connecting: String { return self._s[3467]! } + public var PrivacySettings_PasscodeAndFaceId: String { return self._s[3468]! } + public var ContactInfo_PhoneLabelWork: String { return self._s[3469]! } + public var Stats_GroupTopHoursTitle: String { return self._s[3470]! } + public var Compose_NewMessage: String { return self._s[3471]! } + public var VoiceOver_Common_SwitchHint: String { return self._s[3472]! } + public var NotificationsSound_Synth: String { return self._s[3473]! } + public var ChatImport_UserErrorNotMutual: String { return self._s[3474]! } + public var Conversation_FileOpenIn: String { return self._s[3475]! } + public var AutoDownloadSettings_WifiTitle: String { return self._s[3476]! } + public var UserInfo_SendMessage: String { return self._s[3477]! } + public var Checkout_PayWithFaceId: String { return self._s[3478]! } public func Map_LiveLocationShortHour(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3474]!, self._r[3474]!, [_0]) + return formatWithArgumentRanges(self._s[3479]!, self._r[3479]!, [_0]) } - public var TextFormat_Strikethrough: String { return self._s[3475]! } - public var SettingsSearch_Synonyms_Notifications_DisplayNamesOnLockScreen: String { return self._s[3476]! } - public var Conversation_ViewChannel: String { return self._s[3477]! } + public var TextFormat_Strikethrough: String { return self._s[3480]! } + public var SettingsSearch_Synonyms_Notifications_DisplayNamesOnLockScreen: String { return self._s[3481]! } + public var Conversation_ViewChannel: String { return self._s[3482]! } public func Message_ForwardedMessage(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3478]!, self._r[3478]!, [_0]) + return formatWithArgumentRanges(self._s[3483]!, self._r[3483]!, [_0]) } - public var Channel_Stickers_Placeholder: String { return self._s[3479]! } - public var Channel_OwnershipTransfer_PasswordPlaceholder: String { return self._s[3480]! } - public var Camera_FlashAuto: String { return self._s[3481]! } - public var Conversation_EncryptedDescription1: String { return self._s[3482]! } - public var LocalGroup_Text: String { return self._s[3483]! } - public var SettingsSearch_Synonyms_Data_Storage_KeepMedia: String { return self._s[3484]! } - public var UserInfo_FirstNamePlaceholder: String { return self._s[3485]! } - public var Conversation_SendMessageErrorFlood: String { return self._s[3486]! } - public var Conversation_EncryptedDescription2: String { return self._s[3487]! } - public var Notification_GroupActivated: String { return self._s[3488]! } - public var LastSeen_Lately: String { return self._s[3489]! } - public var Conversation_EncryptedDescription3: String { return self._s[3490]! } - public var SettingsSearch_Synonyms_Privacy_ProfilePhoto: String { return self._s[3491]! } - public var Conversation_SwipeToReplyHintText: String { return self._s[3492]! } - public var Conversation_EncryptedDescription4: String { return self._s[3493]! } - public var SharedMedia_EmptyTitle: String { return self._s[3494]! } - public var Appearance_CreateTheme: String { return self._s[3495]! } - public var Stats_SharesPerPost: String { return self._s[3496]! } - public var Contacts_TabTitle: String { return self._s[3497]! } - public var Weekday_ShortThursday: String { return self._s[3498]! } - public var MessageTimer_Forever: String { return self._s[3499]! } - public var ChatListFolder_CategoryArchived: String { return self._s[3500]! } - public var Channel_EditAdmin_PermissionDeleteMessages: String { return self._s[3501]! } - public var EditTheme_Create_TopInfo: String { return self._s[3503]! } + public var Channel_Stickers_Placeholder: String { return self._s[3484]! } + public var Channel_OwnershipTransfer_PasswordPlaceholder: String { return self._s[3485]! } + public var Camera_FlashAuto: String { return self._s[3486]! } + public var Conversation_EncryptedDescription1: String { return self._s[3487]! } + public var LocalGroup_Text: String { return self._s[3488]! } + public var SettingsSearch_Synonyms_Data_Storage_KeepMedia: String { return self._s[3489]! } + public var UserInfo_FirstNamePlaceholder: String { return self._s[3490]! } + public var Conversation_SendMessageErrorFlood: String { return self._s[3491]! } + public var Conversation_EncryptedDescription2: String { return self._s[3492]! } + public var Notification_GroupActivated: String { return self._s[3493]! } + public var LastSeen_Lately: String { return self._s[3494]! } + public var Conversation_EncryptedDescription3: String { return self._s[3495]! } + public var SettingsSearch_Synonyms_Privacy_ProfilePhoto: String { return self._s[3496]! } + public var Conversation_SwipeToReplyHintText: String { return self._s[3497]! } + public var Conversation_EncryptedDescription4: String { return self._s[3498]! } + public var SharedMedia_EmptyTitle: String { return self._s[3499]! } + public var Appearance_CreateTheme: String { return self._s[3500]! } + public var Stats_SharesPerPost: String { return self._s[3501]! } + public var Contacts_TabTitle: String { return self._s[3502]! } + public var Weekday_ShortThursday: String { return self._s[3503]! } + public var MessageTimer_Forever: String { return self._s[3504]! } + public var ChatListFolder_CategoryArchived: String { return self._s[3505]! } + public var Channel_EditAdmin_PermissionDeleteMessages: String { return self._s[3506]! } + public var EditTheme_Create_TopInfo: String { return self._s[3508]! } public func VoiceOver_ChatList_MessageFrom(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3504]!, self._r[3504]!, [_0]) + return formatWithArgumentRanges(self._s[3509]!, self._r[3509]!, [_0]) } - public var Month_GenDecember: String { return self._s[3505]! } - public var EnterPasscode_EnterPasscode: String { return self._s[3506]! } - public var SettingsSearch_Synonyms_Appearance_LargeEmoji: String { return self._s[3507]! } - public var PeopleNearby_CreateGroup: String { return self._s[3509]! } - public var Group_EditAdmin_PermissionChangeInfo: String { return self._s[3510]! } - public var Paint_ClearConfirm: String { return self._s[3511]! } - public var ChatList_ReadAll: String { return self._s[3512]! } - public var ChatSettings_IntentsSettings: String { return self._s[3513]! } - public var Passport_PassportInformation: String { return self._s[3515]! } - public var Login_CheckOtherSessionMessages: String { return self._s[3517]! } - public var Location_ProximityNotification_DistanceMI: String { return self._s[3520]! } - public var PhotoEditor_ExposureTool: String { return self._s[3521]! } - public var Group_Username_CreatePrivateLinkHelp: String { return self._s[3522]! } - public var SettingsSearch_Synonyms_Watch: String { return self._s[3523]! } - public var Stats_GroupTopPoster_History: String { return self._s[3524]! } - public var UserInfo_AddPhone: String { return self._s[3525]! } - public var Media_SendWithTimer: String { return self._s[3527]! } - public var SettingsSearch_Synonyms_Notifications_Title: String { return self._s[3528]! } - public var Channel_EditAdmin_PermissionEnabledByDefault: String { return self._s[3529]! } - public var GroupInfo_GroupHistoryShort: String { return self._s[3530]! } - public var PasscodeSettings_AutoLock_Disabled: String { return self._s[3531]! } - public var ChatList_Context_Unarchive: String { return self._s[3533]! } + public var Month_GenDecember: String { return self._s[3510]! } + public var EnterPasscode_EnterPasscode: String { return self._s[3511]! } + public var SettingsSearch_Synonyms_Appearance_LargeEmoji: String { return self._s[3512]! } + public var PeopleNearby_CreateGroup: String { return self._s[3514]! } + public var Group_EditAdmin_PermissionChangeInfo: String { return self._s[3515]! } + public var Paint_ClearConfirm: String { return self._s[3516]! } + public var ChatList_ReadAll: String { return self._s[3517]! } + public var ChatSettings_IntentsSettings: String { return self._s[3518]! } + public var Passport_PassportInformation: String { return self._s[3520]! } + public var Login_CheckOtherSessionMessages: String { return self._s[3522]! } + public var Location_ProximityNotification_DistanceMI: String { return self._s[3525]! } + public var PhotoEditor_ExposureTool: String { return self._s[3526]! } + public var Group_Username_CreatePrivateLinkHelp: String { return self._s[3527]! } + public var SettingsSearch_Synonyms_Watch: String { return self._s[3528]! } + public var Stats_GroupTopPoster_History: String { return self._s[3529]! } + public var UserInfo_AddPhone: String { return self._s[3530]! } + public var Media_SendWithTimer: String { return self._s[3532]! } + public var SettingsSearch_Synonyms_Notifications_Title: String { return self._s[3533]! } + public var Channel_EditAdmin_PermissionEnabledByDefault: String { return self._s[3534]! } + public var GroupInfo_GroupHistoryShort: String { return self._s[3535]! } + public var PasscodeSettings_AutoLock_Disabled: String { return self._s[3536]! } + public var ChatList_Context_Unarchive: String { return self._s[3538]! } public func DialogList_LiveLocationSharingTo(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3534]!, self._r[3534]!, [_0]) + return formatWithArgumentRanges(self._s[3539]!, self._r[3539]!, [_0]) } - public var BlockedUsers_Title: String { return self._s[3536]! } - public var TwoStepAuth_EmailPlaceholder: String { return self._s[3537]! } - public var Media_ShareThisPhoto: String { return self._s[3538]! } - public var Notifications_DisplayNamesOnLockScreen: String { return self._s[3539]! } - public var Conversation_FilePhotoOrVideo: String { return self._s[3540]! } - public var Appearance_ThemePreview_Chat_2_ReplyName: String { return self._s[3544]! } - public var CallFeedback_ReasonNoise: String { return self._s[3546]! } - public var WebBrowser_Title: String { return self._s[3547]! } + public var BlockedUsers_Title: String { return self._s[3541]! } + public var TwoStepAuth_EmailPlaceholder: String { return self._s[3542]! } + public var Media_ShareThisPhoto: String { return self._s[3543]! } + public var Notifications_DisplayNamesOnLockScreen: String { return self._s[3544]! } + public var Conversation_FilePhotoOrVideo: String { return self._s[3545]! } + public var Appearance_ThemePreview_Chat_2_ReplyName: String { return self._s[3549]! } + public var CallFeedback_ReasonNoise: String { return self._s[3551]! } + public var WebBrowser_Title: String { return self._s[3552]! } public func Checkout_SavePasswordTimeoutAndTouchId(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3548]!, self._r[3548]!, [_0]) + return formatWithArgumentRanges(self._s[3553]!, self._r[3553]!, [_0]) } - public var Notification_MessageLifetime5s: String { return self._s[3550]! } - public var Passport_Address_AddResidentialAddress: String { return self._s[3551]! } - public var Profile_MessageLifetime1m: String { return self._s[3553]! } - public var Passport_ScanPassport: String { return self._s[3554]! } - public var Stats_LoadingTitle: String { return self._s[3555]! } - public var Passport_Address_AddTemporaryRegistration: String { return self._s[3557]! } - public var Permissions_NotificationsAllow_v0: String { return self._s[3558]! } - public var Login_InvalidFirstNameError: String { return self._s[3559]! } - public var Undo_ChatCleared: String { return self._s[3561]! } + public var Notification_MessageLifetime5s: String { return self._s[3555]! } + public var Passport_Address_AddResidentialAddress: String { return self._s[3556]! } + public var Profile_MessageLifetime1m: String { return self._s[3558]! } + public var Passport_ScanPassport: String { return self._s[3559]! } + public var Stats_LoadingTitle: String { return self._s[3560]! } + public var Passport_Address_AddTemporaryRegistration: String { return self._s[3562]! } + public var Permissions_NotificationsAllow_v0: String { return self._s[3563]! } + public var Login_InvalidFirstNameError: String { return self._s[3564]! } + public var Undo_ChatCleared: String { return self._s[3566]! } public func ApplyLanguage_ChangeLanguageUnofficialText(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3563]!, self._r[3563]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3568]!, self._r[3568]!, [_1, _2]) } - public var Conversation_PinMessageAlertPin: String { return self._s[3564]! } + public var Conversation_PinMessageAlertPin: String { return self._s[3569]! } public func Login_PhoneBannedEmailBody(_ _1: String, _ _2: String, _ _3: String, _ _4: String, _ _5: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3565]!, self._r[3565]!, [_1, _2, _3, _4, _5]) + return formatWithArgumentRanges(self._s[3570]!, self._r[3570]!, [_1, _2, _3, _4, _5]) } public func PUSH_MESSAGE_FWD(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3566]!, self._r[3566]!, [_1]) + return formatWithArgumentRanges(self._s[3571]!, self._r[3571]!, [_1]) } - public var Share_MultipleMessagesDisabled: String { return self._s[3567]! } - public var TwoStepAuth_EmailInvalid: String { return self._s[3568]! } - public var EnterPasscode_ChangeTitle: String { return self._s[3570]! } - public var CallSettings_RecentCalls: String { return self._s[3571]! } - public var GroupInfo_DeactivatedStatus: String { return self._s[3572]! } - public var AuthSessions_OtherSessions: String { return self._s[3573]! } - public var PrivacyLastSeenSettings_CustomHelp: String { return self._s[3574]! } - public var Tour_Text5: String { return self._s[3575]! } - public var Login_PadPhoneHelp: String { return self._s[3576]! } - public var Wallpaper_PhotoLibrary: String { return self._s[3578]! } - public var Conversation_ViewGroup: String { return self._s[3579]! } - public var PeopleNearby_MakeVisibleTitle: String { return self._s[3581]! } - public var VoiceOver_Chat_YourContact: String { return self._s[3582]! } - public var Watch_AuthRequired: String { return self._s[3583]! } - public var VoiceOver_Chat_ForwardedFromYou: String { return self._s[3585]! } - public var Conversation_ForwardContacts: String { return self._s[3586]! } - public var Conversation_InputTextPlaceholder: String { return self._s[3587]! } + public var Share_MultipleMessagesDisabled: String { return self._s[3572]! } + public var TwoStepAuth_EmailInvalid: String { return self._s[3573]! } + public var EnterPasscode_ChangeTitle: String { return self._s[3575]! } + public var CallSettings_RecentCalls: String { return self._s[3576]! } + public var GroupInfo_DeactivatedStatus: String { return self._s[3577]! } + public var AuthSessions_OtherSessions: String { return self._s[3578]! } + public var PrivacyLastSeenSettings_CustomHelp: String { return self._s[3579]! } + public var Tour_Text5: String { return self._s[3580]! } + public var Login_PadPhoneHelp: String { return self._s[3581]! } + public var Wallpaper_PhotoLibrary: String { return self._s[3583]! } + public var Conversation_ViewGroup: String { return self._s[3584]! } + public var PeopleNearby_MakeVisibleTitle: String { return self._s[3586]! } + public var VoiceOver_Chat_YourContact: String { return self._s[3587]! } + public var Watch_AuthRequired: String { return self._s[3588]! } + public var VoiceOver_Chat_ForwardedFromYou: String { return self._s[3590]! } + public var Conversation_ForwardContacts: String { return self._s[3591]! } + public var Conversation_InputTextPlaceholder: String { return self._s[3592]! } public func PUSH_CHANNEL_MESSAGE_PHOTO(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3588]!, self._r[3588]!, [_1]) + return formatWithArgumentRanges(self._s[3593]!, self._r[3593]!, [_1]) } public func Conversation_MessageViaUser(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3589]!, self._r[3589]!, [_0]) + return formatWithArgumentRanges(self._s[3594]!, self._r[3594]!, [_0]) } - public var Channel_Setup_TypePrivate: String { return self._s[3590]! } + public var Channel_Setup_TypePrivate: String { return self._s[3595]! } public func Conversation_NoticeInvitedByInChannel(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3591]!, self._r[3591]!, [_0]) + return formatWithArgumentRanges(self._s[3596]!, self._r[3596]!, [_0]) } - public var InviteLink_Create_TimeLimitExpiryDate: String { return self._s[3592]! } - public var InfoPlist_NSSiriUsageDescription: String { return self._s[3593]! } - public var AutoDownloadSettings_Delimeter: String { return self._s[3594]! } - public var EmptyGroupInfo_Subtitle: String { return self._s[3595]! } - public var UserInfo_StartSecretChatStart: String { return self._s[3596]! } + public var InviteLink_Create_TimeLimitExpiryDate: String { return self._s[3597]! } + public var InfoPlist_NSSiriUsageDescription: String { return self._s[3598]! } + public var AutoDownloadSettings_Delimeter: String { return self._s[3599]! } + public var EmptyGroupInfo_Subtitle: String { return self._s[3600]! } + public var UserInfo_StartSecretChatStart: String { return self._s[3601]! } public func GroupPermission_AddedInfo(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3597]!, self._r[3597]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3602]!, self._r[3602]!, [_1, _2]) } public func Channel_AdminLog_MessageRestricted(_ _0: String, _ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3598]!, self._r[3598]!, [_0, _1, _2]) + return formatWithArgumentRanges(self._s[3603]!, self._r[3603]!, [_0, _1, _2]) } public func Conversation_ForwardTooltip_TwoChats_Many(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3599]!, self._r[3599]!, [_0, _1]) + return formatWithArgumentRanges(self._s[3604]!, self._r[3604]!, [_0, _1]) } - public var PrivacySettings_AutoArchiveTitle: String { return self._s[3600]! } - public var GroupInfo_InviteLink_LinkSection: String { return self._s[3601]! } - public var FastTwoStepSetup_EmailPlaceholder: String { return self._s[3602]! } - public var StickerPacksSettings_ArchivedMasks: String { return self._s[3604]! } - public var NewContact_Title: String { return self._s[3607]! } - public var Appearance_ThemeCarouselTintedNight: String { return self._s[3608]! } - public var VoiceChat_StatusSpeaking: String { return self._s[3609]! } - public var Notifications_PermissionsKeepDisabled: String { return self._s[3610]! } + public var PrivacySettings_AutoArchiveTitle: String { return self._s[3605]! } + public var GroupInfo_InviteLink_LinkSection: String { return self._s[3606]! } + public var FastTwoStepSetup_EmailPlaceholder: String { return self._s[3607]! } + public var StickerPacksSettings_ArchivedMasks: String { return self._s[3609]! } + public var NewContact_Title: String { return self._s[3612]! } + public var Appearance_ThemeCarouselTintedNight: String { return self._s[3613]! } + public var VoiceChat_StatusSpeaking: String { return self._s[3614]! } + public var Notifications_PermissionsKeepDisabled: String { return self._s[3615]! } public func Time_YesterdayAt(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3611]!, self._r[3611]!, [_0]) + return formatWithArgumentRanges(self._s[3616]!, self._r[3616]!, [_0]) } public func AutoNightTheme_LocationHelp(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3612]!, self._r[3612]!, [_0, _1]) + return formatWithArgumentRanges(self._s[3617]!, self._r[3617]!, [_0, _1]) } - public var Chat_SlowmodeTooltipPending: String { return self._s[3613]! } - public var CallFeedback_ReasonInterruption: String { return self._s[3615]! } - public var ContactInfo_PhoneLabelHome: String { return self._s[3616]! } - public var Passport_Identity_OneOfTypeDriversLicense: String { return self._s[3617]! } + public var Chat_SlowmodeTooltipPending: String { return self._s[3618]! } + public var CallFeedback_ReasonInterruption: String { return self._s[3620]! } + public var ContactInfo_PhoneLabelHome: String { return self._s[3621]! } + public var Passport_Identity_OneOfTypeDriversLicense: String { return self._s[3622]! } public func PUSH_MESSAGE_DOCS(_ _1: String, _ _2: Int) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3619]!, self._r[3619]!, [_1, "\(_2)"]) + return formatWithArgumentRanges(self._s[3624]!, self._r[3624]!, [_1, "\(_2)"]) } - public var Conversation_MessageEditedLabel: String { return self._s[3620]! } - public var CallList_ActiveVoiceChatsHeader: String { return self._s[3621]! } - public var SocksProxySetup_PasswordPlaceholder: String { return self._s[3622]! } - public var ChatList_Context_AddToContacts: String { return self._s[3623]! } - public var Passport_Language_is: String { return self._s[3624]! } - public var Notification_PassportValueProofOfIdentity: String { return self._s[3625]! } - public var PhotoEditor_CurvesBlue: String { return self._s[3626]! } + public var Conversation_MessageEditedLabel: String { return self._s[3625]! } + public var CallList_ActiveVoiceChatsHeader: String { return self._s[3626]! } + public var SocksProxySetup_PasswordPlaceholder: String { return self._s[3627]! } + public var ChatList_Context_AddToContacts: String { return self._s[3628]! } + public var Passport_Language_is: String { return self._s[3629]! } + public var Notification_PassportValueProofOfIdentity: String { return self._s[3630]! } + public var PhotoEditor_CurvesBlue: String { return self._s[3631]! } public func FileSize_MB(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3627]!, self._r[3627]!, [_0]) + return formatWithArgumentRanges(self._s[3632]!, self._r[3632]!, [_0]) } - public var SocksProxySetup_Username: String { return self._s[3628]! } - public var Login_SmsRequestState3: String { return self._s[3629]! } - public var Message_PinnedVideoMessage: String { return self._s[3630]! } - public var SharedMedia_TitleLink: String { return self._s[3631]! } - public var Passport_FieldIdentity: String { return self._s[3632]! } - public var GroupInfo_Permissions_BroadcastConvert: String { return self._s[3634]! } + public var SocksProxySetup_Username: String { return self._s[3633]! } + public var Login_SmsRequestState3: String { return self._s[3634]! } + public var Message_PinnedVideoMessage: String { return self._s[3635]! } + public var SharedMedia_TitleLink: String { return self._s[3636]! } + public var Passport_FieldIdentity: String { return self._s[3637]! } + public var GroupInfo_Permissions_BroadcastConvert: String { return self._s[3639]! } public func Conversation_EncryptedPlaceholderTitleOutgoing(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3637]!, self._r[3637]!, [_0]) + return formatWithArgumentRanges(self._s[3642]!, self._r[3642]!, [_0]) } - public var DialogList_ProxyConnectionIssuesTooltip: String { return self._s[3640]! } - public var ReportSpam_DeleteThisChat: String { return self._s[3641]! } - public var Checkout_NewCard_CardholderNamePlaceholder: String { return self._s[3642]! } - public var Passport_Identity_DateOfBirth: String { return self._s[3643]! } - public var Call_StatusIncoming: String { return self._s[3644]! } - public var ChatAdmins_AdminLabel: String { return self._s[3645]! } + public var DialogList_ProxyConnectionIssuesTooltip: String { return self._s[3645]! } + public var ReportSpam_DeleteThisChat: String { return self._s[3646]! } + public var Checkout_NewCard_CardholderNamePlaceholder: String { return self._s[3647]! } + public var Passport_Identity_DateOfBirth: String { return self._s[3648]! } + public var Call_StatusIncoming: String { return self._s[3649]! } + public var ChatAdmins_AdminLabel: String { return self._s[3650]! } public func Time_MonthOfYear_m10(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3647]!, self._r[3647]!, [_0]) + return formatWithArgumentRanges(self._s[3652]!, self._r[3652]!, [_0]) } - public var Message_PinnedAnimationMessage: String { return self._s[3648]! } - public var Conversation_ReportSpamAndLeave: String { return self._s[3649]! } - public var Preview_CopyAddress: String { return self._s[3650]! } - public var MediaPlayer_UnknownTrack: String { return self._s[3652]! } - public var Login_CancelSignUpConfirmation: String { return self._s[3653]! } - public var Map_OpenInYandexMaps: String { return self._s[3655]! } + public var Message_PinnedAnimationMessage: String { return self._s[3653]! } + public var Conversation_ReportSpamAndLeave: String { return self._s[3654]! } + public var Preview_CopyAddress: String { return self._s[3655]! } + public var MediaPlayer_UnknownTrack: String { return self._s[3657]! } + public var Login_CancelSignUpConfirmation: String { return self._s[3658]! } + public var Map_OpenInYandexMaps: String { return self._s[3660]! } public func Time_PreciseDate_m11(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3658]!, self._r[3658]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[3663]!, self._r[3663]!, [_1, _2, _3]) } - public var GroupRemoved_Remove: String { return self._s[3659]! } - public var ChatListFolder_TitleCreate: String { return self._s[3660]! } + public var GroupRemoved_Remove: String { return self._s[3664]! } + public var ChatListFolder_TitleCreate: String { return self._s[3665]! } public func InstantPage_AuthorAndDateTitle(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3662]!, self._r[3662]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3667]!, self._r[3667]!, [_1, _2]) } - public var Watch_UserInfo_MuteTitle: String { return self._s[3663]! } - public var Group_UpgradeNoticeText2: String { return self._s[3665]! } - public var Stats_GroupGrowthTitle: String { return self._s[3666]! } - public var CreatePoll_CancelConfirmation: String { return self._s[3669]! } - public var Month_GenOctober: String { return self._s[3670]! } - public var Conversation_TitleCommentsEmpty: String { return self._s[3671]! } - public var Settings_Appearance: String { return self._s[3672]! } + public var Watch_UserInfo_MuteTitle: String { return self._s[3668]! } + public var Group_UpgradeNoticeText2: String { return self._s[3670]! } + public var Stats_GroupGrowthTitle: String { return self._s[3671]! } + public var CreatePoll_CancelConfirmation: String { return self._s[3674]! } + public var Month_GenOctober: String { return self._s[3675]! } + public var Conversation_TitleCommentsEmpty: String { return self._s[3676]! } + public var Settings_Appearance: String { return self._s[3677]! } public func Time_MonthOfYear_m6(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3673]!, self._r[3673]!, [_0]) + return formatWithArgumentRanges(self._s[3678]!, self._r[3678]!, [_0]) } - public var UserInfo_AddToExisting: String { return self._s[3674]! } - public var Call_PhoneCallInProgressMessage: String { return self._s[3676]! } - public var Map_HomeAndWorkInfo: String { return self._s[3677]! } - public var Paint_Arrow: String { return self._s[3678]! } - public var InviteLink_CreatePrivateLinkHelp: String { return self._s[3679]! } + public var UserInfo_AddToExisting: String { return self._s[3679]! } + public var Call_PhoneCallInProgressMessage: String { return self._s[3681]! } + public var Map_HomeAndWorkInfo: String { return self._s[3682]! } + public var Paint_Arrow: String { return self._s[3683]! } + public var InviteLink_CreatePrivateLinkHelp: String { return self._s[3684]! } public func DialogList_MultipleTypingPair(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3680]!, self._r[3680]!, [_0, _1]) + return formatWithArgumentRanges(self._s[3685]!, self._r[3685]!, [_0, _1]) } - public var CancelResetAccount_Title: String { return self._s[3681]! } - public var NotificationsSound_Circles: String { return self._s[3682]! } - public var Notifications_GroupNotificationsExceptionsHelp: String { return self._s[3683]! } - public var ChatState_Connecting: String { return self._s[3685]! } - public var Profile_MessageLifetime5s: String { return self._s[3686]! } + public var CancelResetAccount_Title: String { return self._s[3686]! } + public var NotificationsSound_Circles: String { return self._s[3687]! } + public var Notifications_GroupNotificationsExceptionsHelp: String { return self._s[3688]! } + public var ChatState_Connecting: String { return self._s[3690]! } + public var Profile_MessageLifetime5s: String { return self._s[3691]! } public func DialogList_AwaitingEncryption(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3687]!, self._r[3687]!, [_0]) + return formatWithArgumentRanges(self._s[3692]!, self._r[3692]!, [_0]) } - public var PrivacyPolicy_AgeVerificationTitle: String { return self._s[3688]! } - public var Channel_Username_CreatePublicLinkHelp: String { return self._s[3689]! } - public var AutoNightTheme_ScheduledTo: String { return self._s[3690]! } - public var Conversation_DefaultRestrictedStickers: String { return self._s[3691]! } - public var TwoStepAuth_ConfirmationTitle: String { return self._s[3692]! } + public var PrivacyPolicy_AgeVerificationTitle: String { return self._s[3693]! } + public var Channel_Username_CreatePublicLinkHelp: String { return self._s[3694]! } + public var AutoNightTheme_ScheduledTo: String { return self._s[3695]! } + public var Conversation_DefaultRestrictedStickers: String { return self._s[3696]! } + public var TwoStepAuth_ConfirmationTitle: String { return self._s[3697]! } public func Chat_UnsendMyMessagesAlertTitle(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3693]!, self._r[3693]!, [_0]) + return formatWithArgumentRanges(self._s[3698]!, self._r[3698]!, [_0]) } - public var Passport_Phone_Help: String { return self._s[3694]! } - public var Privacy_ContactsSync: String { return self._s[3695]! } - public var CheckoutInfo_ReceiverInfoPhone: String { return self._s[3696]! } - public var Channel_AdminLogFilter_EventsLeavingSubscribers: String { return self._s[3697]! } - public var Map_SendMyCurrentLocation: String { return self._s[3698]! } - public var Map_AddressOnMap: String { return self._s[3699]! } - public var DialogList_SearchLabel: String { return self._s[3701]! } - public var Notification_Exceptions_NewException_NotificationHeader: String { return self._s[3702]! } - public var GroupInfo_FakeGroupWarning: String { return self._s[3703]! } - public var Conversation_ChecksTooltip_Read: String { return self._s[3704]! } - public var ConversationProfile_UnknownAddMemberError: String { return self._s[3705]! } - public var ChatList_Search_ShowMore: String { return self._s[3706]! } - public var DialogList_EncryptionRejected: String { return self._s[3707]! } - public var VoiceChat_InviteLinkCopiedText: String { return self._s[3708]! } - public var DialogList_DeleteBotConfirmation: String { return self._s[3709]! } - public var VoiceChat_StartRecordingText: String { return self._s[3710]! } - public var Privacy_TopPeersDelete: String { return self._s[3711]! } - public var AttachmentMenu_SendAsFile: String { return self._s[3713]! } - public var ConvertToChannel_CommentsAlert_Text: String { return self._s[3715]! } - public var ChatList_GenericPsaAlert: String { return self._s[3716]! } - public var SecretTimer_ImageDescription: String { return self._s[3718]! } + public var Passport_Phone_Help: String { return self._s[3699]! } + public var Privacy_ContactsSync: String { return self._s[3700]! } + public var CheckoutInfo_ReceiverInfoPhone: String { return self._s[3701]! } + public var Channel_AdminLogFilter_EventsLeavingSubscribers: String { return self._s[3702]! } + public var Map_SendMyCurrentLocation: String { return self._s[3703]! } + public var Map_AddressOnMap: String { return self._s[3704]! } + public var DialogList_SearchLabel: String { return self._s[3706]! } + public var Notification_Exceptions_NewException_NotificationHeader: String { return self._s[3707]! } + public var GroupInfo_FakeGroupWarning: String { return self._s[3708]! } + public var Conversation_ChecksTooltip_Read: String { return self._s[3709]! } + public var ConversationProfile_UnknownAddMemberError: String { return self._s[3710]! } + public var ChatList_Search_ShowMore: String { return self._s[3711]! } + public var DialogList_EncryptionRejected: String { return self._s[3712]! } + public var VoiceChat_InviteLinkCopiedText: String { return self._s[3713]! } + public var DialogList_DeleteBotConfirmation: String { return self._s[3714]! } + public var VoiceChat_StartRecordingText: String { return self._s[3715]! } + public var Privacy_TopPeersDelete: String { return self._s[3716]! } + public var AttachmentMenu_SendAsFile: String { return self._s[3718]! } + public var ConvertToChannel_CommentsAlert_Text: String { return self._s[3720]! } + public var ChatList_GenericPsaAlert: String { return self._s[3721]! } + public var SecretTimer_ImageDescription: String { return self._s[3723]! } public func Conversation_SetReminder_RemindOn(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3719]!, self._r[3719]!, [_0, _1]) + return formatWithArgumentRanges(self._s[3724]!, self._r[3724]!, [_0, _1]) } - public var ChatSettings_TextSizeUnits: String { return self._s[3720]! } - public var Notification_RenamedGroup: String { return self._s[3721]! } - public var Tour_Title2: String { return self._s[3722]! } - public var Settings_CopyUsername: String { return self._s[3723]! } - public var Compose_NewEncryptedChat: String { return self._s[3724]! } - public var Conversation_CloudStorageInfo_Title: String { return self._s[3725]! } - public var Month_ShortSeptember: String { return self._s[3726]! } - public var AutoDownloadSettings_OnForAll: String { return self._s[3727]! } - public var ChatList_DeleteForEveryoneConfirmationText: String { return self._s[3728]! } - public var Call_StatusConnecting: String { return self._s[3730]! } - public var Privacy_GroupsAndChannels_NeverAllow_Placeholder: String { return self._s[3731]! } - public var Map_ShareLiveLocationHelp: String { return self._s[3732]! } - public var Cache_Files: String { return self._s[3733]! } - public var Notifications_Reset: String { return self._s[3734]! } + public var ChatSettings_TextSizeUnits: String { return self._s[3725]! } + public var Notification_RenamedGroup: String { return self._s[3726]! } + public var Tour_Title2: String { return self._s[3727]! } + public var Settings_CopyUsername: String { return self._s[3728]! } + public var Compose_NewEncryptedChat: String { return self._s[3729]! } + public var Conversation_CloudStorageInfo_Title: String { return self._s[3730]! } + public var Month_ShortSeptember: String { return self._s[3731]! } + public var AutoDownloadSettings_OnForAll: String { return self._s[3732]! } + public var ChatList_DeleteForEveryoneConfirmationText: String { return self._s[3733]! } + public var Call_StatusConnecting: String { return self._s[3735]! } + public var Privacy_GroupsAndChannels_NeverAllow_Placeholder: String { return self._s[3736]! } + public var Map_ShareLiveLocationHelp: String { return self._s[3737]! } + public var Cache_Files: String { return self._s[3738]! } + public var Notifications_Reset: String { return self._s[3739]! } public func Settings_KeepPhoneNumber(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3735]!, self._r[3735]!, [_0]) + return formatWithArgumentRanges(self._s[3740]!, self._r[3740]!, [_0]) } - public var Privacy_GroupsAndChannels_AlwaysAllow_Title: String { return self._s[3736]! } + public var Privacy_GroupsAndChannels_AlwaysAllow_Title: String { return self._s[3741]! } public func Conversation_OpenBotLinkLogin(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3737]!, self._r[3737]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3742]!, self._r[3742]!, [_1, _2]) } - public var Notification_CallIncomingShort: String { return self._s[3738]! } - public var UserInfo_BotPrivacy: String { return self._s[3740]! } - public var Appearance_BubbleCorners_Apply: String { return self._s[3741]! } - public var WebSearch_RecentClearConfirmation: String { return self._s[3742]! } - public var Conversation_ContextMenuLookUp: String { return self._s[3744]! } - public var Calls_RatingTitle: String { return self._s[3745]! } - public var SecretImage_Title: String { return self._s[3746]! } - public var Weekday_Monday: String { return self._s[3747]! } + public var Notification_CallIncomingShort: String { return self._s[3743]! } + public var UserInfo_BotPrivacy: String { return self._s[3745]! } + public var Appearance_BubbleCorners_Apply: String { return self._s[3746]! } + public var WebSearch_RecentClearConfirmation: String { return self._s[3747]! } + public var Conversation_ContextMenuLookUp: String { return self._s[3749]! } + public var Calls_RatingTitle: String { return self._s[3750]! } + public var SecretImage_Title: String { return self._s[3751]! } + public var Weekday_Monday: String { return self._s[3752]! } public func Passport_PrivacyPolicy(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3748]!, self._r[3748]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3753]!, self._r[3753]!, [_1, _2]) } - public var KeyCommand_JumpToPreviousChat: String { return self._s[3749]! } + public var KeyCommand_JumpToPreviousChat: String { return self._s[3754]! } public func DialogList_SearchSubtitleFormat(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3750]!, self._r[3750]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3755]!, self._r[3755]!, [_1, _2]) } - public var Stats_GroupMembers: String { return self._s[3751]! } - public var Camera_Retake: String { return self._s[3752]! } - public var Conversation_SearchPlaceholder: String { return self._s[3754]! } + public var Stats_GroupMembers: String { return self._s[3756]! } + public var Camera_Retake: String { return self._s[3757]! } + public var Conversation_SearchPlaceholder: String { return self._s[3759]! } public func Passport_Identity_NativeNameGenericHelp(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3755]!, self._r[3755]!, [_0]) + return formatWithArgumentRanges(self._s[3760]!, self._r[3760]!, [_0]) } - public var Channel_DiscussionGroup_Info: String { return self._s[3756]! } - public var SocksProxySetup_Hostname: String { return self._s[3757]! } - public var PrivacyLastSeenSettings_EmpryUsersPlaceholder: String { return self._s[3758]! } - public var Privacy_DeleteDrafts: String { return self._s[3760]! } + public var Channel_DiscussionGroup_Info: String { return self._s[3761]! } + public var SocksProxySetup_Hostname: String { return self._s[3762]! } + public var PrivacyLastSeenSettings_EmpryUsersPlaceholder: String { return self._s[3763]! } + public var Privacy_DeleteDrafts: String { return self._s[3765]! } public func Checkout_LiabilityAlert(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3761]!, self._r[3761]!, [_1, _1, _1, _2]) + return formatWithArgumentRanges(self._s[3766]!, self._r[3766]!, [_1, _1, _1, _2]) } - public var Login_CancelPhoneVerification: String { return self._s[3763]! } - public var TwoStepAuth_ResetAccountHelp: String { return self._s[3764]! } - public var VoiceOver_Chat_Profile: String { return self._s[3765]! } + public var Login_CancelPhoneVerification: String { return self._s[3768]! } + public var TwoStepAuth_ResetAccountHelp: String { return self._s[3769]! } + public var VoiceOver_Chat_Profile: String { return self._s[3770]! } public func SocksProxySetup_ProxyStatusPing(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3766]!, self._r[3766]!, [_0]) + return formatWithArgumentRanges(self._s[3771]!, self._r[3771]!, [_0]) } - public var TwoStepAuth_EmailSent: String { return self._s[3767]! } - public var Cache_Indexing: String { return self._s[3768]! } - public var Notifications_ExceptionsNone: String { return self._s[3769]! } - public var MessagePoll_LabelQuiz: String { return self._s[3770]! } - public var Call_EncryptionKey_Title: String { return self._s[3771]! } - public var Common_Yes: String { return self._s[3772]! } - public var Channel_ErrorAddBlocked: String { return self._s[3773]! } - public var Month_GenJanuary: String { return self._s[3774]! } - public var Checkout_NewCard_Title: String { return self._s[3775]! } + public var TwoStepAuth_EmailSent: String { return self._s[3772]! } + public var Cache_Indexing: String { return self._s[3773]! } + public var Notifications_ExceptionsNone: String { return self._s[3774]! } + public var MessagePoll_LabelQuiz: String { return self._s[3775]! } + public var Call_EncryptionKey_Title: String { return self._s[3776]! } + public var Common_Yes: String { return self._s[3777]! } + public var Channel_ErrorAddBlocked: String { return self._s[3778]! } + public var Month_GenJanuary: String { return self._s[3779]! } + public var Checkout_NewCard_Title: String { return self._s[3780]! } public func TwoStepAuth_EnterPasswordHint(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3776]!, self._r[3776]!, [_0]) - } - public var Conversation_InputTextPlaceholderReply: String { return self._s[3778]! } - public var PasscodeSettings_AutoLock_IfAwayFor_1hour: String { return self._s[3779]! } - public var Conversation_SendDice: String { return self._s[3780]! } - public func ChatSettings_AutoDownloadSettings_TypeVideo(_ _0: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[3781]!, self._r[3781]!, [_0]) } + public var Conversation_InputTextPlaceholderReply: String { return self._s[3783]! } + public var PasscodeSettings_AutoLock_IfAwayFor_1hour: String { return self._s[3784]! } + public var Conversation_SendDice: String { return self._s[3785]! } + public func ChatSettings_AutoDownloadSettings_TypeVideo(_ _0: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[3786]!, self._r[3786]!, [_0]) + } public func VoiceOver_Chat_VideoFrom(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3782]!, self._r[3782]!, [_0]) + return formatWithArgumentRanges(self._s[3787]!, self._r[3787]!, [_0]) } - public var Weekday_Wednesday: String { return self._s[3783]! } - public var ReportPeer_ReasonOther_Send: String { return self._s[3784]! } - public var PasscodeSettings_EncryptDataHelp: String { return self._s[3785]! } - public var PrivacyLastSeenSettings_CustomShareSettingsHelp: String { return self._s[3786]! } - public var OldChannels_NoticeTitle: String { return self._s[3787]! } - public var TwoStepAuth_ChangeEmail: String { return self._s[3788]! } - public var PasscodeSettings_PasscodeOptions: String { return self._s[3789]! } - public var InfoPlist_NSPhotoLibraryUsageDescription: String { return self._s[3790]! } - public var Passport_Address_AddUtilityBill: String { return self._s[3791]! } + public var Weekday_Wednesday: String { return self._s[3788]! } + public var ReportPeer_ReasonOther_Send: String { return self._s[3789]! } + public var PasscodeSettings_EncryptDataHelp: String { return self._s[3790]! } + public var PrivacyLastSeenSettings_CustomShareSettingsHelp: String { return self._s[3791]! } + public var OldChannels_NoticeTitle: String { return self._s[3792]! } + public var TwoStepAuth_ChangeEmail: String { return self._s[3793]! } + public var PasscodeSettings_PasscodeOptions: String { return self._s[3794]! } + public var InfoPlist_NSPhotoLibraryUsageDescription: String { return self._s[3795]! } + public var Passport_Address_AddUtilityBill: String { return self._s[3796]! } public func Time_PreciseDate_m5(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3793]!, self._r[3793]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[3798]!, self._r[3798]!, [_1, _2, _3]) } - public var TwoFactorSetup_EmailVerification_ResendAction: String { return self._s[3795]! } - public var Stats_GroupTopAdminsTitle: String { return self._s[3796]! } - public var Paint_Regular: String { return self._s[3797]! } - public var Message_Contact: String { return self._s[3798]! } - public var NetworkUsageSettings_MediaVideoDataSection: String { return self._s[3799]! } - public var VoiceOver_Chat_YourPhoto: String { return self._s[3800]! } - public var Notification_Mute1hMin: String { return self._s[3801]! } + public var TwoFactorSetup_EmailVerification_ResendAction: String { return self._s[3800]! } + public var Stats_GroupTopAdminsTitle: String { return self._s[3801]! } + public var Paint_Regular: String { return self._s[3802]! } + public var Message_Contact: String { return self._s[3803]! } + public var NetworkUsageSettings_MediaVideoDataSection: String { return self._s[3804]! } + public var VoiceOver_Chat_YourPhoto: String { return self._s[3805]! } + public var Notification_Mute1hMin: String { return self._s[3806]! } public func Login_BannedPhoneSubject(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3802]!, self._r[3802]!, [_0]) + return formatWithArgumentRanges(self._s[3807]!, self._r[3807]!, [_0]) } - public var Profile_MessageLifetime1h: String { return self._s[3803]! } - public var TwoStepAuth_GenericHelp: String { return self._s[3804]! } - public var TextFormat_Monospace: String { return self._s[3805]! } - public var VoiceOver_Media_PlaybackRateChange: String { return self._s[3807]! } - public var Conversation_DeleteMessagesForMe: String { return self._s[3808]! } - public var ChatList_DeleteChat: String { return self._s[3809]! } - public var Channel_OwnershipTransfer_EnterPasswordText: String { return self._s[3812]! } + public var Profile_MessageLifetime1h: String { return self._s[3808]! } + public var TwoStepAuth_GenericHelp: String { return self._s[3809]! } + public var TextFormat_Monospace: String { return self._s[3810]! } + public var VoiceOver_Media_PlaybackRateChange: String { return self._s[3812]! } + public var Conversation_DeleteMessagesForMe: String { return self._s[3813]! } + public var ChatList_DeleteChat: String { return self._s[3814]! } + public var Channel_OwnershipTransfer_EnterPasswordText: String { return self._s[3817]! } public func Settings_ApplyProxyAlertCredentials(_ _1: String, _ _2: String, _ _3: String, _ _4: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3813]!, self._r[3813]!, [_1, _2, _3, _4]) + return formatWithArgumentRanges(self._s[3818]!, self._r[3818]!, [_1, _2, _3, _4]) } - public var Login_CancelPhoneVerificationStop: String { return self._s[3814]! } - public var Appearance_ThemePreview_ChatList_4_Name: String { return self._s[3815]! } - public var MediaPicker_MomentsDateRangeSameMonthYearFormat: String { return self._s[3816]! } + public var Login_CancelPhoneVerificationStop: String { return self._s[3819]! } + public var Appearance_ThemePreview_ChatList_4_Name: String { return self._s[3820]! } + public var MediaPicker_MomentsDateRangeSameMonthYearFormat: String { return self._s[3821]! } public func Channel_AdminLog_MessageToggleInvitesOn(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3817]!, self._r[3817]!, [_0]) + return formatWithArgumentRanges(self._s[3822]!, self._r[3822]!, [_0]) } - public var Notifications_Badge_IncludeChannels: String { return self._s[3818]! } - public var StickerPack_ViewPack: String { return self._s[3821]! } - public var FastTwoStepSetup_PasswordConfirmationPlaceholder: String { return self._s[3823]! } - public var EditTheme_Expand_Preview_IncomingText: String { return self._s[3824]! } - public var Notifications_Title: String { return self._s[3825]! } - public var Conversation_InputTextPlaceholderComment: String { return self._s[3826]! } - public var GroupInfo_PublicLink: String { return self._s[3827]! } - public var VoiceOver_DiscardPreparedContent: String { return self._s[3828]! } - public var Conversation_Moderate_Ban: String { return self._s[3832]! } - public var InviteLink_Manage: String { return self._s[3833]! } + public var Notifications_Badge_IncludeChannels: String { return self._s[3823]! } + public var InviteLink_CreatePrivateLinkHelpChannel: String { return self._s[3824]! } + public var StickerPack_ViewPack: String { return self._s[3827]! } + public var FastTwoStepSetup_PasswordConfirmationPlaceholder: String { return self._s[3829]! } + public var EditTheme_Expand_Preview_IncomingText: String { return self._s[3830]! } + public var Notifications_Title: String { return self._s[3831]! } + public var Conversation_InputTextPlaceholderComment: String { return self._s[3832]! } + public var GroupInfo_PublicLink: String { return self._s[3833]! } + public var VoiceOver_DiscardPreparedContent: String { return self._s[3834]! } + public var Conversation_Moderate_Ban: String { return self._s[3838]! } + public var InviteLink_Manage: String { return self._s[3839]! } public func Activity_RemindAboutGroup(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3834]!, self._r[3834]!, [_0]) + return formatWithArgumentRanges(self._s[3840]!, self._r[3840]!, [_0]) } - public var TextFormat_Underline: String { return self._s[3835]! } + public var TextFormat_Underline: String { return self._s[3841]! } public func DownloadingStatus(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3836]!, self._r[3836]!, [_0, _1]) + return formatWithArgumentRanges(self._s[3842]!, self._r[3842]!, [_0, _1]) } public func PUSH_PINNED_ROUND(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3837]!, self._r[3837]!, [_1]) + return formatWithArgumentRanges(self._s[3843]!, self._r[3843]!, [_1]) } - public var PollResults_Collapse: String { return self._s[3839]! } - public var Contacts_GlobalSearch: String { return self._s[3840]! } + public var PollResults_Collapse: String { return self._s[3845]! } + public var Contacts_GlobalSearch: String { return self._s[3846]! } public func Conversation_EncryptionWaiting(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3842]!, self._r[3842]!, [_0]) + return formatWithArgumentRanges(self._s[3848]!, self._r[3848]!, [_0]) } - public var Channel_Management_LabelEditor: String { return self._s[3843]! } - public var Conversation_VoiceChatMediaRecordingRestricted: String { return self._s[3844]! } - public var SettingsSearch_Synonyms_Stickers_FeaturedPacks: String { return self._s[3845]! } - public var Conversation_Theme: String { return self._s[3846]! } + public var Channel_Management_LabelEditor: String { return self._s[3849]! } + public var Conversation_VoiceChatMediaRecordingRestricted: String { return self._s[3850]! } + public var SettingsSearch_Synonyms_Stickers_FeaturedPacks: String { return self._s[3851]! } + public var Conversation_Theme: String { return self._s[3852]! } public func PUSH_CHANNEL_MESSAGE_DOCS(_ _1: String, _ _2: Int) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3847]!, self._r[3847]!, [_1, "\(_2)"]) + return formatWithArgumentRanges(self._s[3853]!, self._r[3853]!, [_1, "\(_2)"]) } - public var Conversation_LinkDialogSave: String { return self._s[3848]! } - public var EnterPasscode_TouchId: String { return self._s[3849]! } - public var Group_ErrorAdminsTooMuch: String { return self._s[3851]! } - public var Stats_MessageOverview: String { return self._s[3852]! } - public var Privacy_Calls_P2PAlways: String { return self._s[3854]! } - public var Message_Sticker: String { return self._s[3855]! } - public var Conversation_Mute: String { return self._s[3858]! } - public var VoiceChat_AnonymousDisabledAlertText: String { return self._s[3859]! } - public var ContactInfo_Title: String { return self._s[3860]! } + public var Conversation_LinkDialogSave: String { return self._s[3854]! } + public var EnterPasscode_TouchId: String { return self._s[3855]! } + public var Group_ErrorAdminsTooMuch: String { return self._s[3857]! } + public var Stats_MessageOverview: String { return self._s[3858]! } + public var Privacy_Calls_P2PAlways: String { return self._s[3860]! } + public var Message_Sticker: String { return self._s[3861]! } + public var Conversation_Mute: String { return self._s[3864]! } + public var VoiceChat_AnonymousDisabledAlertText: String { return self._s[3865]! } + public var ContactInfo_Title: String { return self._s[3866]! } public func PUSH_CHANNEL_MESSAGE_CONTACT(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3861]!, self._r[3861]!, [_1]) + return formatWithArgumentRanges(self._s[3867]!, self._r[3867]!, [_1]) } - public var Channel_Setup_TypeHeader: String { return self._s[3862]! } - public var AuthSessions_LogOut: String { return self._s[3863]! } - public var ChatSettings_AutoDownloadReset: String { return self._s[3864]! } - public var ChatListFolderSettings_NewFolder: String { return self._s[3866]! } - public var Appearance_ThemePreview_ChatList_3_AuthorName: String { return self._s[3867]! } - public var CreatePoll_Title: String { return self._s[3868]! } - public var EditTheme_EditTitle: String { return self._s[3869]! } - public var ChatListFolderSettings_RecommendedFoldersSection: String { return self._s[3870]! } - public var TwoStepAuth_SetPassword: String { return self._s[3871]! } + public var Channel_Setup_TypeHeader: String { return self._s[3868]! } + public var AuthSessions_LogOut: String { return self._s[3869]! } + public var ChatSettings_AutoDownloadReset: String { return self._s[3870]! } + public var ChatListFolderSettings_NewFolder: String { return self._s[3872]! } + public var Appearance_ThemePreview_ChatList_3_AuthorName: String { return self._s[3873]! } + public var CreatePoll_Title: String { return self._s[3874]! } + public var EditTheme_EditTitle: String { return self._s[3875]! } + public var ChatListFolderSettings_RecommendedFoldersSection: String { return self._s[3876]! } + public var TwoStepAuth_SetPassword: String { return self._s[3877]! } public func Login_InvalidPhoneEmailSubject(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3872]!, self._r[3872]!, [_0]) + return formatWithArgumentRanges(self._s[3878]!, self._r[3878]!, [_0]) } - public var BlockedUsers_Info: String { return self._s[3873]! } - public var AuthSessions_Sessions: String { return self._s[3874]! } - public var Group_EditAdmin_RankTitle: String { return self._s[3875]! } - public var Common_ActionNotAllowedError: String { return self._s[3876]! } - public var WebPreview_GettingLinkInfo: String { return self._s[3877]! } - public var Appearance_AppIconFilledX: String { return self._s[3878]! } - public var Passport_Email_EmailPlaceholder: String { return self._s[3879]! } - public var FeaturedStickers_OtherSection: String { return self._s[3880]! } - public var VoiceChat_RecordingStarted: String { return self._s[3881]! } - public var EditTheme_Edit_Preview_OutgoingText: String { return self._s[3882]! } - public var Profile_Username: String { return self._s[3883]! } - public var Appearance_RemoveTheme: String { return self._s[3884]! } - public var TwoStepAuth_SetupPasswordConfirmPassword: String { return self._s[3885]! } - public var Message_PinnedStickerMessage: String { return self._s[3886]! } - public var AccessDenied_VideoMicrophone: String { return self._s[3887]! } - public var WallpaperPreview_CustomColorBottomText: String { return self._s[3888]! } - public var Passport_Address_RegionPlaceholder: String { return self._s[3889]! } - public var SettingsSearch_Synonyms_Data_Storage_Title: String { return self._s[3890]! } - public var TwoStepAuth_Title: String { return self._s[3891]! } - public var Checkout_WebConfirmation_Title: String { return self._s[3892]! } - public var AutoDownloadSettings_VoiceMessagesInfo: String { return self._s[3893]! } - public var ChatListFolder_CategoryGroups: String { return self._s[3895]! } - public var Stats_GroupTopInviter_Promote: String { return self._s[3896]! } - public var Conversation_EditingPhotoPanelTitle: String { return self._s[3897]! } - public var Month_GenJuly: String { return self._s[3898]! } - public var Passport_Identity_Gender: String { return self._s[3899]! } - public var Channel_DiscussionGroup_UnlinkGroup: String { return self._s[3900]! } - public var Notification_Exceptions_DeleteAll: String { return self._s[3901]! } - public var VoiceChat_StopRecording: String { return self._s[3902]! } + public var BlockedUsers_Info: String { return self._s[3879]! } + public var AuthSessions_Sessions: String { return self._s[3880]! } + public var Group_EditAdmin_RankTitle: String { return self._s[3881]! } + public var Common_ActionNotAllowedError: String { return self._s[3882]! } + public var WebPreview_GettingLinkInfo: String { return self._s[3883]! } + public var Appearance_AppIconFilledX: String { return self._s[3884]! } + public var Passport_Email_EmailPlaceholder: String { return self._s[3885]! } + public var FeaturedStickers_OtherSection: String { return self._s[3886]! } + public var VoiceChat_RecordingStarted: String { return self._s[3887]! } + public var EditTheme_Edit_Preview_OutgoingText: String { return self._s[3888]! } + public var Profile_Username: String { return self._s[3889]! } + public var Appearance_RemoveTheme: String { return self._s[3890]! } + public var TwoStepAuth_SetupPasswordConfirmPassword: String { return self._s[3891]! } + public var Message_PinnedStickerMessage: String { return self._s[3892]! } + public var AccessDenied_VideoMicrophone: String { return self._s[3893]! } + public var WallpaperPreview_CustomColorBottomText: String { return self._s[3894]! } + public var Passport_Address_RegionPlaceholder: String { return self._s[3895]! } + public var SettingsSearch_Synonyms_Data_Storage_Title: String { return self._s[3896]! } + public var TwoStepAuth_Title: String { return self._s[3897]! } + public var Checkout_WebConfirmation_Title: String { return self._s[3898]! } + public var AutoDownloadSettings_VoiceMessagesInfo: String { return self._s[3899]! } + public var ChatListFolder_CategoryGroups: String { return self._s[3901]! } + public var Stats_GroupTopInviter_Promote: String { return self._s[3902]! } + public var Conversation_EditingPhotoPanelTitle: String { return self._s[3903]! } + public var Month_GenJuly: String { return self._s[3904]! } + public var Passport_Identity_Gender: String { return self._s[3905]! } + public var Channel_DiscussionGroup_UnlinkGroup: String { return self._s[3906]! } + public var Notification_Exceptions_DeleteAll: String { return self._s[3907]! } + public var VoiceChat_StopRecording: String { return self._s[3908]! } public func Conversation_FileHowToText(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3903]!, self._r[3903]!, [_0]) - } - public func Channel_AdminLog_MessageAdmin(_ _0: String, _ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3904]!, self._r[3904]!, [_0, _1, _2]) - } - public var Login_CodeSentSms: String { return self._s[3905]! } - public func VoiceOver_Chat_ReplyFrom(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3906]!, self._r[3906]!, [_0]) - } - public var Login_CallRequestState2: String { return self._s[3907]! } - public var Channel_DiscussionGroup_Header: String { return self._s[3908]! } - public func Channel_AdminLog_MessageToggleInvitesOff(_ _0: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[3909]!, self._r[3909]!, [_0]) } - public var Passport_Language_ms: String { return self._s[3910]! } - public var PeopleNearby_MakeInvisible: String { return self._s[3912]! } - public var ChatList_Search_FilterVoice: String { return self._s[3914]! } - public var Camera_TapAndHoldForVideo: String { return self._s[3916]! } - public var Permissions_NotificationsAllowInSettings_v0: String { return self._s[3917]! } + public func Channel_AdminLog_MessageAdmin(_ _0: String, _ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[3910]!, self._r[3910]!, [_0, _1, _2]) + } + public var Login_CodeSentSms: String { return self._s[3911]! } + public func VoiceOver_Chat_ReplyFrom(_ _0: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[3912]!, self._r[3912]!, [_0]) + } + public var Login_CallRequestState2: String { return self._s[3913]! } + public var Channel_DiscussionGroup_Header: String { return self._s[3914]! } + public func Channel_AdminLog_MessageToggleInvitesOff(_ _0: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[3915]!, self._r[3915]!, [_0]) + } + public var Passport_Language_ms: String { return self._s[3916]! } + public var PeopleNearby_MakeInvisible: String { return self._s[3918]! } + public var ChatList_Search_FilterVoice: String { return self._s[3920]! } + public var Camera_TapAndHoldForVideo: String { return self._s[3922]! } + public var Permissions_NotificationsAllowInSettings_v0: String { return self._s[3923]! } public func Notification_LeftChannel(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3918]!, self._r[3918]!, [_0]) + return formatWithArgumentRanges(self._s[3924]!, self._r[3924]!, [_0]) } public func Call_VoiceChatInProgressMessageCall(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3919]!, self._r[3919]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3925]!, self._r[3925]!, [_1, _2]) } - public var Map_Locating: String { return self._s[3920]! } + public var Map_Locating: String { return self._s[3926]! } public func Checkout_SavePasswordTimeout(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3922]!, self._r[3922]!, [_0]) + return formatWithArgumentRanges(self._s[3928]!, self._r[3928]!, [_0]) } - public var Passport_Identity_TypeInternalPassport: String { return self._s[3924]! } - public var Appearance_ThemePreview_Chat_4_Text: String { return self._s[3925]! } - public var SettingsSearch_Synonyms_EditProfile_Username: String { return self._s[3926]! } - public var Stickers_Installed: String { return self._s[3927]! } - public var Notifications_PermissionsAllowInSettings: String { return self._s[3928]! } - public var StickerPackActionInfo_RemovedTitle: String { return self._s[3929]! } - public var CallSettings_Never: String { return self._s[3931]! } - public var Channel_Setup_TypePublicHelp: String { return self._s[3932]! } + public var Passport_Identity_TypeInternalPassport: String { return self._s[3930]! } + public var Appearance_ThemePreview_Chat_4_Text: String { return self._s[3931]! } + public var SettingsSearch_Synonyms_EditProfile_Username: String { return self._s[3932]! } + public var Stickers_Installed: String { return self._s[3933]! } + public var Notifications_PermissionsAllowInSettings: String { return self._s[3934]! } + public var StickerPackActionInfo_RemovedTitle: String { return self._s[3935]! } + public var CallSettings_Never: String { return self._s[3937]! } + public var Channel_Setup_TypePublicHelp: String { return self._s[3938]! } public func ChatList_DeleteForEveryone(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3934]!, self._r[3934]!, [_0]) + return formatWithArgumentRanges(self._s[3940]!, self._r[3940]!, [_0]) } - public var Message_Game: String { return self._s[3935]! } - public var Call_Message: String { return self._s[3936]! } + public var Message_Game: String { return self._s[3941]! } + public var Call_Message: String { return self._s[3942]! } public func PUSH_CHANNEL_MESSAGE_VIDEO(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3937]!, self._r[3937]!, [_1]) + return formatWithArgumentRanges(self._s[3943]!, self._r[3943]!, [_1]) } - public var ChannelIntro_Text: String { return self._s[3938]! } - public var StickerPack_Send: String { return self._s[3939]! } - public var Share_AuthDescription: String { return self._s[3940]! } - public var PasscodeSettings_AutoLock_IfAwayFor_5minutes: String { return self._s[3941]! } - public var CallFeedback_WhatWentWrong: String { return self._s[3942]! } - public var Common_Create: String { return self._s[3945]! } - public var Passport_Language_hy: String { return self._s[3946]! } - public var CreatePoll_Explanation: String { return self._s[3947]! } - public var GroupPermission_AddMembersNotAvailable: String { return self._s[3948]! } - public var ChatImport_CreateGroupAlertImportAction: String { return self._s[3949]! } - public var PeerInfo_ButtonVoiceChat: String { return self._s[3950]! } - public var Undo_ChatClearedForBothSides: String { return self._s[3951]! } - public var DialogList_NoMessagesTitle: String { return self._s[3952]! } - public var GroupInfo_Title: String { return self._s[3954]! } - public var Channel_AdminLog_CanBanUsers: String { return self._s[3955]! } - public var PhoneNumberHelp_Help: String { return self._s[3956]! } - public var TwoStepAuth_AdditionalPassword: String { return self._s[3957]! } - public var Settings_Logout: String { return self._s[3958]! } - public var Privacy_PaymentsTitle: String { return self._s[3959]! } - public var StickerPacksSettings_StickerPacksSection: String { return self._s[3960]! } - public var Tour_Text6: String { return self._s[3961]! } - public var ChatImportActivity_Title: String { return self._s[3963]! } - public var Channel_Username_Help: String { return self._s[3964]! } - public var VoiceOver_Chat_RecordModeVoiceMessageInfo: String { return self._s[3965]! } - public var AttachmentMenu_Poll: String { return self._s[3966]! } - public var EditTheme_Create_Preview_IncomingReplyName: String { return self._s[3967]! } - public var Conversation_ReportSpamChannelConfirmation: String { return self._s[3968]! } - public var Passport_DeletePassport: String { return self._s[3969]! } - public var Login_Code: String { return self._s[3970]! } - public var Notification_SecretChatScreenshot: String { return self._s[3971]! } - public var Login_CodeFloodError: String { return self._s[3972]! } + public var ChannelIntro_Text: String { return self._s[3944]! } + public var StickerPack_Send: String { return self._s[3945]! } + public var Share_AuthDescription: String { return self._s[3946]! } + public var PasscodeSettings_AutoLock_IfAwayFor_5minutes: String { return self._s[3947]! } + public var CallFeedback_WhatWentWrong: String { return self._s[3948]! } + public var Common_Create: String { return self._s[3951]! } + public var Passport_Language_hy: String { return self._s[3952]! } + public var CreatePoll_Explanation: String { return self._s[3953]! } + public var GroupPermission_AddMembersNotAvailable: String { return self._s[3954]! } + public var ChatImport_CreateGroupAlertImportAction: String { return self._s[3955]! } + public var PeerInfo_ButtonVoiceChat: String { return self._s[3956]! } + public var Undo_ChatClearedForBothSides: String { return self._s[3957]! } + public var DialogList_NoMessagesTitle: String { return self._s[3958]! } + public var GroupInfo_Title: String { return self._s[3960]! } + public var Channel_AdminLog_CanBanUsers: String { return self._s[3961]! } + public var PhoneNumberHelp_Help: String { return self._s[3962]! } + public var TwoStepAuth_AdditionalPassword: String { return self._s[3963]! } + public var Settings_Logout: String { return self._s[3964]! } + public var Privacy_PaymentsTitle: String { return self._s[3965]! } + public var StickerPacksSettings_StickerPacksSection: String { return self._s[3966]! } + public var Tour_Text6: String { return self._s[3967]! } + public var ChatImportActivity_Title: String { return self._s[3969]! } + public var Channel_Username_Help: String { return self._s[3970]! } + public var VoiceOver_Chat_RecordModeVoiceMessageInfo: String { return self._s[3971]! } + public var AttachmentMenu_Poll: String { return self._s[3972]! } + public var EditTheme_Create_Preview_IncomingReplyName: String { return self._s[3973]! } + public var Conversation_ReportSpamChannelConfirmation: String { return self._s[3974]! } + public var Passport_DeletePassport: String { return self._s[3975]! } + public var Login_Code: String { return self._s[3976]! } + public var Notification_SecretChatScreenshot: String { return self._s[3977]! } + public var Login_CodeFloodError: String { return self._s[3978]! } public func Notification_PinnedAnimationMessage(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3973]!, self._r[3973]!, [_0]) + return formatWithArgumentRanges(self._s[3979]!, self._r[3979]!, [_0]) } public func Channel_Username_UsernameIsAvailable(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3974]!, self._r[3974]!, [_0]) + return formatWithArgumentRanges(self._s[3980]!, self._r[3980]!, [_0]) } - public var Watch_Stickers_Recents: String { return self._s[3975]! } - public var Generic_ErrorMoreInfo: String { return self._s[3976]! } + public var Watch_Stickers_Recents: String { return self._s[3981]! } + public var Generic_ErrorMoreInfo: String { return self._s[3982]! } public func Call_AccountIsLoggedOnCurrentDevice(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3977]!, self._r[3977]!, [_0]) + return formatWithArgumentRanges(self._s[3983]!, self._r[3983]!, [_0]) } - public var AutoDownloadSettings_DataUsage: String { return self._s[3978]! } - public var Conversation_ViewTheme: String { return self._s[3979]! } - public var Contacts_InviteSearchLabel: String { return self._s[3980]! } - public var Settings_CancelUpload: String { return self._s[3982]! } - public var Settings_AppLanguage_Unofficial: String { return self._s[3983]! } + public var AutoDownloadSettings_DataUsage: String { return self._s[3984]! } + public var Conversation_ViewTheme: String { return self._s[3985]! } + public var Contacts_InviteSearchLabel: String { return self._s[3986]! } + public var Settings_CancelUpload: String { return self._s[3988]! } + public var Settings_AppLanguage_Unofficial: String { return self._s[3989]! } public func ChatList_ClearChatConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3984]!, self._r[3984]!, [_0]) + return formatWithArgumentRanges(self._s[3990]!, self._r[3990]!, [_0]) } - public var ChatList_AddFolder: String { return self._s[3985]! } - public var Conversation_Location: String { return self._s[3987]! } - public var Appearance_BubbleCorners_AdjustAdjacent: String { return self._s[3988]! } - public var DialogList_AdLabel: String { return self._s[3989]! } + public var ChatList_AddFolder: String { return self._s[3991]! } + public var Conversation_Location: String { return self._s[3993]! } + public var Appearance_BubbleCorners_AdjustAdjacent: String { return self._s[3994]! } + public var DialogList_AdLabel: String { return self._s[3995]! } public func Time_TomorrowAt(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3991]!, self._r[3991]!, [_0]) + return formatWithArgumentRanges(self._s[3997]!, self._r[3997]!, [_0]) } - public var Message_InvoiceLabel: String { return self._s[3992]! } - public var Channel_TooMuchBots: String { return self._s[3993]! } + public var Message_InvoiceLabel: String { return self._s[3998]! } + public var Channel_TooMuchBots: String { return self._s[3999]! } public func Channel_AdminLog_MessageRemovedChannelUsername(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3995]!, self._r[3995]!, [_0]) + return formatWithArgumentRanges(self._s[4001]!, self._r[4001]!, [_0]) } - public var Call_IncomingVideoCall: String { return self._s[3996]! } - public var Conversation_LiveLocation: String { return self._s[3997]! } - public var TwoStepAuth_SetupPasswordEnterPasswordChange: String { return self._s[3998]! } - public var Passport_Identity_EditPassport: String { return self._s[3999]! } - public var Permissions_CellularDataTitle_v0: String { return self._s[4001]! } - public var ChatList_Search_NoResultsFitlerVoice: String { return self._s[4002]! } - public var GroupInfo_Permissions_AddException: String { return self._s[4003]! } - public var Channel_AdminLog_CanInviteUsers: String { return self._s[4005]! } - public var Channel_MessageVideoUpdated: String { return self._s[4006]! } - public var GroupInfo_Permissions_EditingDisabled: String { return self._s[4007]! } - public var AccessDenied_Camera: String { return self._s[4010]! } + public var Call_IncomingVideoCall: String { return self._s[4002]! } + public var Conversation_LiveLocation: String { return self._s[4003]! } + public var TwoStepAuth_SetupPasswordEnterPasswordChange: String { return self._s[4004]! } + public var Passport_Identity_EditPassport: String { return self._s[4005]! } + public var Permissions_CellularDataTitle_v0: String { return self._s[4007]! } + public var ChatList_Search_NoResultsFitlerVoice: String { return self._s[4008]! } + public var GroupInfo_Permissions_AddException: String { return self._s[4009]! } + public var Channel_AdminLog_CanInviteUsers: String { return self._s[4011]! } + public var Channel_MessageVideoUpdated: String { return self._s[4012]! } + public var GroupInfo_Permissions_EditingDisabled: String { return self._s[4013]! } + public var AccessDenied_Camera: String { return self._s[4016]! } public func Target_InviteToGroupConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4011]!, self._r[4011]!, [_0]) + return formatWithArgumentRanges(self._s[4017]!, self._r[4017]!, [_0]) } - public var Theme_Context_ChangeColors: String { return self._s[4012]! } - public var PrivacySettings_TwoStepAuth: String { return self._s[4013]! } - public var Privacy_Forwards_PreviewMessageText: String { return self._s[4014]! } - public var Login_CodeExpiredError: String { return self._s[4015]! } - public var State_ConnectingToProxy: String { return self._s[4016]! } - public var TextFormat_Link: String { return self._s[4017]! } - public var Passport_Language_lv: String { return self._s[4019]! } - public var AccessDenied_VoiceMicrophone: String { return self._s[4020]! } - public var WallpaperPreview_SwipeBottomText: String { return self._s[4021]! } - public var ProfilePhoto_SetMainVideo: String { return self._s[4022]! } - public var AutoDownloadSettings_Cellular: String { return self._s[4024]! } - public var ChatSettings_AutoDownloadVoiceMessages: String { return self._s[4025]! } + public var Theme_Context_ChangeColors: String { return self._s[4018]! } + public var PrivacySettings_TwoStepAuth: String { return self._s[4019]! } + public var Privacy_Forwards_PreviewMessageText: String { return self._s[4020]! } + public var Login_CodeExpiredError: String { return self._s[4021]! } + public var State_ConnectingToProxy: String { return self._s[4022]! } + public var TextFormat_Link: String { return self._s[4023]! } + public var Passport_Language_lv: String { return self._s[4025]! } + public var AccessDenied_VoiceMicrophone: String { return self._s[4026]! } + public var WallpaperPreview_SwipeBottomText: String { return self._s[4027]! } + public var ProfilePhoto_SetMainVideo: String { return self._s[4028]! } + public var AutoDownloadSettings_Cellular: String { return self._s[4030]! } + public var ChatSettings_AutoDownloadVoiceMessages: String { return self._s[4031]! } public func Channel_AdminLog_MessageKickedNameUsername(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4026]!, self._r[4026]!, [_1, _2]) + return formatWithArgumentRanges(self._s[4032]!, self._r[4032]!, [_1, _2]) } - public var ChatList_EmptyChatListFilterTitle: String { return self._s[4027]! } - public var Checkout_PayNone: String { return self._s[4028]! } - public var NotificationsSound_Complete: String { return self._s[4030]! } - public var TwoStepAuth_ConfirmEmailCodePlaceholder: String { return self._s[4031]! } - public var InviteLink_CreateInfo: String { return self._s[4032]! } - public var AuthSessions_DevicesTitle: String { return self._s[4033]! } + public var ChatList_EmptyChatListFilterTitle: String { return self._s[4033]! } + public var Checkout_PayNone: String { return self._s[4034]! } + public var NotificationsSound_Complete: String { return self._s[4036]! } + public var TwoStepAuth_ConfirmEmailCodePlaceholder: String { return self._s[4037]! } + public var InviteLink_CreateInfo: String { return self._s[4038]! } + public var AuthSessions_DevicesTitle: String { return self._s[4039]! } public func DialogList_MultipleTyping(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4034]!, self._r[4034]!, [_0, _1]) + return formatWithArgumentRanges(self._s[4040]!, self._r[4040]!, [_0, _1]) } - public var Message_LiveLocation: String { return self._s[4035]! } - public var Watch_Suggestion_BRB: String { return self._s[4036]! } - public var Channel_BanUser_Title: String { return self._s[4037]! } - public var SettingsSearch_Synonyms_Privacy_Data_Title: String { return self._s[4038]! } - public var Conversation_Dice_u1F3C0: String { return self._s[4039]! } - public var Conversation_ClearSelfHistory: String { return self._s[4040]! } - public var ProfilePhoto_OpenGallery: String { return self._s[4041]! } - public var PrivacySettings_LastSeenTitle: String { return self._s[4042]! } - public var Weekday_Thursday: String { return self._s[4043]! } - public var BroadcastListInfo_AddRecipient: String { return self._s[4044]! } - public var Privacy_ProfilePhoto: String { return self._s[4046]! } - public var StickerPacksSettings_ArchivedPacks_Info: String { return self._s[4047]! } + public var Message_LiveLocation: String { return self._s[4041]! } + public var Watch_Suggestion_BRB: String { return self._s[4042]! } + public var Channel_BanUser_Title: String { return self._s[4043]! } + public var SettingsSearch_Synonyms_Privacy_Data_Title: String { return self._s[4044]! } + public var Conversation_Dice_u1F3C0: String { return self._s[4045]! } + public var Conversation_ClearSelfHistory: String { return self._s[4046]! } + public var ProfilePhoto_OpenGallery: String { return self._s[4047]! } + public var PrivacySettings_LastSeenTitle: String { return self._s[4048]! } + public var Weekday_Thursday: String { return self._s[4049]! } + public var BroadcastListInfo_AddRecipient: String { return self._s[4050]! } + public var Privacy_ProfilePhoto: String { return self._s[4052]! } + public var StickerPacksSettings_ArchivedPacks_Info: String { return self._s[4053]! } public func Channel_AdminLog_MessageChangedUnlinkedGroup(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4048]!, self._r[4048]!, [_1, _2]) + return formatWithArgumentRanges(self._s[4054]!, self._r[4054]!, [_1, _2]) } - public var Message_Audio: String { return self._s[4049]! } - public var Conversation_Info: String { return self._s[4050]! } - public var Cache_Videos: String { return self._s[4051]! } - public var Appearance_ThemePreview_ChatList_6_Text: String { return self._s[4052]! } - public var Channel_ErrorAddTooMuch: String { return self._s[4053]! } + public var Message_Audio: String { return self._s[4055]! } + public var Conversation_Info: String { return self._s[4056]! } + public var Cache_Videos: String { return self._s[4057]! } + public var Appearance_ThemePreview_ChatList_6_Text: String { return self._s[4058]! } + public var Channel_ErrorAddTooMuch: String { return self._s[4059]! } public func ChatList_DeleteSecretChatConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4054]!, self._r[4054]!, [_0]) + return formatWithArgumentRanges(self._s[4060]!, self._r[4060]!, [_0]) } - public var ChannelMembers_ChannelAdminsTitle: String { return self._s[4056]! } - public var ScheduledMessages_Title: String { return self._s[4058]! } - public var ShareFileTip_Title: String { return self._s[4061]! } - public var Chat_Gifs_TrendingSectionHeader: String { return self._s[4062]! } - public var ChatList_RemoveFolderConfirmation: String { return self._s[4063]! } + public var ChannelMembers_ChannelAdminsTitle: String { return self._s[4062]! } + public var ScheduledMessages_Title: String { return self._s[4064]! } + public var ShareFileTip_Title: String { return self._s[4067]! } + public var Chat_Gifs_TrendingSectionHeader: String { return self._s[4068]! } + public var ChatList_RemoveFolderConfirmation: String { return self._s[4069]! } public func PUSH_CHAT_MESSAGE_GEOLIVE(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4064]!, self._r[4064]!, [_1, _2]) + return formatWithArgumentRanges(self._s[4070]!, self._r[4070]!, [_1, _2]) } - public var Conversation_ContextViewStats: String { return self._s[4066]! } - public var Channel_DiscussionGroup_SearchPlaceholder: String { return self._s[4067]! } - public var PasscodeSettings_Title: String { return self._s[4068]! } - public var Channel_AdminLog_SendPolls: String { return self._s[4069]! } - public var LastSeen_ALongTimeAgo: String { return self._s[4070]! } + public var Conversation_ContextViewStats: String { return self._s[4072]! } + public var Channel_DiscussionGroup_SearchPlaceholder: String { return self._s[4073]! } + public var PasscodeSettings_Title: String { return self._s[4074]! } + public var Channel_AdminLog_SendPolls: String { return self._s[4075]! } + public var LastSeen_ALongTimeAgo: String { return self._s[4076]! } public func PUSH_CHANNEL_MESSAGE_GIF(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4071]!, self._r[4071]!, [_1]) + return formatWithArgumentRanges(self._s[4077]!, self._r[4077]!, [_1]) } - public var SettingsSearch_Synonyms_Notifications_BadgeIncludeMutedChannels: String { return self._s[4072]! } - public var ChannelInfo_FakeChannelWarning: String { return self._s[4073]! } - public var CallFeedback_VideoReasonLowQuality: String { return self._s[4074]! } - public var Conversation_PinnedPreviousMessage: String { return self._s[4075]! } - public var SocksProxySetup_AddProxyTitle: String { return self._s[4076]! } - public var Passport_Identity_AddInternalPassport: String { return self._s[4077]! } + public var SettingsSearch_Synonyms_Notifications_BadgeIncludeMutedChannels: String { return self._s[4078]! } + public var ChannelInfo_FakeChannelWarning: String { return self._s[4079]! } + public var CallFeedback_VideoReasonLowQuality: String { return self._s[4080]! } + public var Conversation_PinnedPreviousMessage: String { return self._s[4081]! } + public var SocksProxySetup_AddProxyTitle: String { return self._s[4082]! } + public var Passport_Identity_AddInternalPassport: String { return self._s[4083]! } public func ChatList_RemovedFromFolderTooltip(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4078]!, self._r[4078]!, [_1, _2]) + return formatWithArgumentRanges(self._s[4084]!, self._r[4084]!, [_1, _2]) } public func Conversation_SetReminder_RemindToday(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4079]!, self._r[4079]!, [_0]) + return formatWithArgumentRanges(self._s[4085]!, self._r[4085]!, [_0]) } - public var Passport_Identity_GenderFemale: String { return self._s[4080]! } - public var Location_ProximityNotification_DistanceKM: String { return self._s[4083]! } - public var ConvertToSupergroup_HelpTitle: String { return self._s[4084]! } + public var Passport_Identity_GenderFemale: String { return self._s[4086]! } + public var Location_ProximityNotification_DistanceKM: String { return self._s[4089]! } + public var ConvertToSupergroup_HelpTitle: String { return self._s[4090]! } public func Message_ImportedDateFormat(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4085]!, self._r[4085]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[4091]!, self._r[4091]!, [_1, _2, _3]) } - public var VoiceChat_Audio: String { return self._s[4086]! } - public var SharedMedia_TitleAll: String { return self._s[4087]! } - public var Settings_Context_Logout: String { return self._s[4088]! } - public var GroupInfo_SetGroupPhotoDelete: String { return self._s[4090]! } - public var Settings_About_Title: String { return self._s[4091]! } - public var StickerSettings_ContextHide: String { return self._s[4092]! } + public var VoiceChat_Audio: String { return self._s[4092]! } + public var SharedMedia_TitleAll: String { return self._s[4093]! } + public var Settings_Context_Logout: String { return self._s[4094]! } + public var GroupInfo_SetGroupPhotoDelete: String { return self._s[4096]! } + public var Settings_About_Title: String { return self._s[4097]! } + public var StickerSettings_ContextHide: String { return self._s[4098]! } public func AutoDownloadSettings_UpTo(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4093]!, self._r[4093]!, [_0]) + return formatWithArgumentRanges(self._s[4099]!, self._r[4099]!, [_0]) } public func Conversation_LiveLocationYouAndOther(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4094]!, self._r[4094]!, [_0]) - } - public var ChatImport_SelectionConfirmationAlertImportAction: String { return self._s[4096]! } - public var Common_Cancel: String { return self._s[4097]! } - public var CallFeedback_Title: String { return self._s[4099]! } - public func Notification_PinnedContactMessage(_ _0: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[4100]!, self._r[4100]!, [_0]) } - public var Activity_UploadingVideoMessage: String { return self._s[4101]! } - public var MediaPicker_Send: String { return self._s[4102]! } - public var PasscodeSettings_AutoLock_IfAwayFor_1minute: String { return self._s[4103]! } - public var Conversation_LiveLocationYou: String { return self._s[4104]! } - public var Notifications_ExceptionsUnmuted: String { return self._s[4105]! } + public var ChatImport_SelectionConfirmationAlertImportAction: String { return self._s[4102]! } + public var Common_Cancel: String { return self._s[4103]! } + public var CallFeedback_Title: String { return self._s[4105]! } + public func Notification_PinnedContactMessage(_ _0: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[4106]!, self._r[4106]!, [_0]) + } + public var Activity_UploadingVideoMessage: String { return self._s[4107]! } + public var MediaPicker_Send: String { return self._s[4108]! } + public var PasscodeSettings_AutoLock_IfAwayFor_1minute: String { return self._s[4109]! } + public var Conversation_LiveLocationYou: String { return self._s[4110]! } + public var Notifications_ExceptionsUnmuted: String { return self._s[4111]! } public func Channel_AdminLog_MessageGroupPreHistoryHidden(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4107]!, self._r[4107]!, [_0]) + return formatWithArgumentRanges(self._s[4113]!, self._r[4113]!, [_0]) } public func PUSH_CHAT_ADD_YOU(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4108]!, self._r[4108]!, [_1, _2]) + return formatWithArgumentRanges(self._s[4114]!, self._r[4114]!, [_1, _2]) } - public var Conversation_ViewBackground: String { return self._s[4109]! } - public var ChatSettings_PrivateChats: String { return self._s[4112]! } - public var Conversation_ErrorInaccessibleMessage: String { return self._s[4113]! } - public var Appearance_ThemeNight: String { return self._s[4114]! } - public var Common_Search: String { return self._s[4115]! } - public var TwoStepAuth_ReEnterPasswordTitle: String { return self._s[4116]! } - public var ChangePhoneNumberNumber_Help: String { return self._s[4118]! } - public var InviteLink_QRCode_Share: String { return self._s[4119]! } - public var Stickers_SuggestAdded: String { return self._s[4120]! } - public var Conversation_DiscardVoiceMessageDescription: String { return self._s[4123]! } - public var NetworkUsageSettings_Cellular: String { return self._s[4124]! } - public var CheckoutInfo_Title: String { return self._s[4125]! } - public var Conversation_ShareBotLocationConfirmationTitle: String { return self._s[4126]! } - public var Channel_BotDoesntSupportGroups: String { return self._s[4127]! } + public var Conversation_ViewBackground: String { return self._s[4115]! } + public var ChatSettings_PrivateChats: String { return self._s[4118]! } + public var Conversation_ErrorInaccessibleMessage: String { return self._s[4119]! } + public var Appearance_ThemeNight: String { return self._s[4120]! } + public var Common_Search: String { return self._s[4121]! } + public var TwoStepAuth_ReEnterPasswordTitle: String { return self._s[4122]! } + public var ChangePhoneNumberNumber_Help: String { return self._s[4124]! } + public var InviteLink_QRCode_Share: String { return self._s[4125]! } + public var Stickers_SuggestAdded: String { return self._s[4126]! } + public var Conversation_DiscardVoiceMessageDescription: String { return self._s[4129]! } + public var NetworkUsageSettings_Cellular: String { return self._s[4130]! } + public var CheckoutInfo_Title: String { return self._s[4131]! } + public var Conversation_ShareBotLocationConfirmationTitle: String { return self._s[4132]! } + public var Channel_BotDoesntSupportGroups: String { return self._s[4133]! } public func DialogList_SingleRecordingAudioSuffix(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4128]!, self._r[4128]!, [_0]) + return formatWithArgumentRanges(self._s[4134]!, self._r[4134]!, [_0]) } - public var MaskStickerSettings_Info: String { return self._s[4130]! } - public var GroupRemoved_DeleteUser: String { return self._s[4132]! } - public var Contacts_ShareTelegram: String { return self._s[4133]! } - public var Group_UpgradeNoticeText1: String { return self._s[4134]! } + public var MaskStickerSettings_Info: String { return self._s[4136]! } + public var GroupRemoved_DeleteUser: String { return self._s[4138]! } + public var Contacts_ShareTelegram: String { return self._s[4139]! } + public var Group_UpgradeNoticeText1: String { return self._s[4140]! } public func PUSH_PHONE_CALL_REQUEST(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4135]!, self._r[4135]!, [_1]) + return formatWithArgumentRanges(self._s[4141]!, self._r[4141]!, [_1]) } - public var PrivacyLastSeenSettings_Title: String { return self._s[4136]! } - public var SettingsSearch_Synonyms_Support: String { return self._s[4140]! } - public var PhotoEditor_TintTool: String { return self._s[4141]! } - public var ChatImportActivity_OpenApp: String { return self._s[4143]! } - public var GroupPermission_NoSendPolls: String { return self._s[4144]! } - public var NotificationsSound_None: String { return self._s[4145]! } + public var PrivacyLastSeenSettings_Title: String { return self._s[4142]! } + public var SettingsSearch_Synonyms_Support: String { return self._s[4146]! } + public var PhotoEditor_TintTool: String { return self._s[4147]! } + public var ChatImportActivity_OpenApp: String { return self._s[4149]! } + public var GroupPermission_NoSendPolls: String { return self._s[4150]! } + public var NotificationsSound_None: String { return self._s[4151]! } public func LOCAL_CHANNEL_MESSAGE_FWDS(_ _1: String, _ _2: Int) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4146]!, self._r[4146]!, [_1, "\(_2)"]) + return formatWithArgumentRanges(self._s[4152]!, self._r[4152]!, [_1, "\(_2)"]) } - public var CheckoutInfo_ShippingInfoCityPlaceholder: String { return self._s[4148]! } - public var ExplicitContent_AlertChannel: String { return self._s[4150]! } - public var Conversation_ClousStorageInfo_Description1: String { return self._s[4151]! } - public var Contacts_SortedByPresence: String { return self._s[4152]! } - public var WallpaperSearch_ColorGray: String { return self._s[4153]! } - public var Channel_AdminLogFilter_EventsNewSubscribers: String { return self._s[4154]! } - public var Conversation_ReportSpam: String { return self._s[4155]! } - public var ChatList_Search_NoResultsFilter: String { return self._s[4158]! } - public var WallpaperSearch_ColorBlack: String { return self._s[4159]! } - public var ArchivedChats_IntroTitle3: String { return self._s[4160]! } - public var InviteLink_DeleteAllRevokedLinksAlert_Action: String { return self._s[4161]! } + public var CheckoutInfo_ShippingInfoCityPlaceholder: String { return self._s[4154]! } + public var ExplicitContent_AlertChannel: String { return self._s[4156]! } + public var Conversation_ClousStorageInfo_Description1: String { return self._s[4157]! } + public var Contacts_SortedByPresence: String { return self._s[4158]! } + public var WallpaperSearch_ColorGray: String { return self._s[4159]! } + public var Channel_AdminLogFilter_EventsNewSubscribers: String { return self._s[4160]! } + public var Conversation_ReportSpam: String { return self._s[4161]! } + public var ChatList_Search_NoResultsFilter: String { return self._s[4164]! } + public var WallpaperSearch_ColorBlack: String { return self._s[4165]! } + public var ArchivedChats_IntroTitle3: String { return self._s[4166]! } + public var InviteLink_DeleteAllRevokedLinksAlert_Action: String { return self._s[4167]! } public func VoiceChat_PeerJoinedText(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4162]!, self._r[4162]!, [_0]) + return formatWithArgumentRanges(self._s[4168]!, self._r[4168]!, [_0]) } - public var Conversation_DefaultRestrictedText: String { return self._s[4163]! } - public var Settings_Devices: String { return self._s[4164]! } - public var Call_AudioRouteSpeaker: String { return self._s[4165]! } - public var GroupInfo_InviteLink_CopyLink: String { return self._s[4166]! } - public var Passport_Address_Country: String { return self._s[4168]! } - public var Cache_MaximumCacheSize: String { return self._s[4169]! } - public var Chat_PanelHidePinnedMessages: String { return self._s[4170]! } - public var Notifications_Badge_IncludePublicGroups: String { return self._s[4171]! } - public var ChatSettings_AutoDownloadUsingWiFi: String { return self._s[4173]! } - public var Login_TermsOfServiceLabel: String { return self._s[4174]! } - public var Calls_NoMissedCallsPlacehoder: String { return self._s[4175]! } - public var SocksProxySetup_RequiredCredentials: String { return self._s[4176]! } - public var VoiceOver_MessageContextOpenMessageMenu: String { return self._s[4177]! } - public var AutoNightTheme_ScheduledFrom: String { return self._s[4178]! } - public var ChatSettings_AutoDownloadDocuments: String { return self._s[4179]! } - public var ConvertToSupergroup_Note: String { return self._s[4181]! } - public var Settings_SetNewProfilePhotoOrVideo: String { return self._s[4182]! } - public var PrivacySettings_PasscodeAndTouchId: String { return self._s[4183]! } - public var Common_More: String { return self._s[4184]! } - public var ShareMenu_SelectChats: String { return self._s[4186]! } + public var Conversation_DefaultRestrictedText: String { return self._s[4169]! } + public var Settings_Devices: String { return self._s[4170]! } + public var Call_AudioRouteSpeaker: String { return self._s[4171]! } + public var GroupInfo_InviteLink_CopyLink: String { return self._s[4172]! } + public var Passport_Address_Country: String { return self._s[4174]! } + public var Cache_MaximumCacheSize: String { return self._s[4175]! } + public var Chat_PanelHidePinnedMessages: String { return self._s[4176]! } + public var Notifications_Badge_IncludePublicGroups: String { return self._s[4177]! } + public var ChatSettings_AutoDownloadUsingWiFi: String { return self._s[4179]! } + public var Login_TermsOfServiceLabel: String { return self._s[4180]! } + public var Calls_NoMissedCallsPlacehoder: String { return self._s[4181]! } + public var SocksProxySetup_RequiredCredentials: String { return self._s[4182]! } + public var VoiceOver_MessageContextOpenMessageMenu: String { return self._s[4183]! } + public var AutoNightTheme_ScheduledFrom: String { return self._s[4184]! } + public var ChatSettings_AutoDownloadDocuments: String { return self._s[4185]! } + public var ConvertToSupergroup_Note: String { return self._s[4187]! } + public var Settings_SetNewProfilePhotoOrVideo: String { return self._s[4188]! } + public var PrivacySettings_PasscodeAndTouchId: String { return self._s[4189]! } + public var Common_More: String { return self._s[4190]! } + public var ShareMenu_SelectChats: String { return self._s[4192]! } public func Conversation_ScheduleMessage_SendToday(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4187]!, self._r[4187]!, [_0]) + return formatWithArgumentRanges(self._s[4193]!, self._r[4193]!, [_0]) } public func Channel_AdminLog_MessageRemovedGroupStickerPack(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4188]!, self._r[4188]!, [_0]) + return formatWithArgumentRanges(self._s[4194]!, self._r[4194]!, [_0]) } - public var Contacts_PermissionsKeepDisabled: String { return self._s[4190]! } + public var Contacts_PermissionsKeepDisabled: String { return self._s[4196]! } public func Call_ParticipantVersionOutdatedError(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4191]!, self._r[4191]!, [_0]) - } - public var WatchRemote_AlertOpen: String { return self._s[4192]! } - public func PUSH_CHAT_ADD_MEMBER(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4193]!, self._r[4193]!, [_1, _2, _3]) - } - public var Channel_Members_AddMembersHelp: String { return self._s[4194]! } - public var Shortcut_SwitchAccount: String { return self._s[4195]! } - public var Map_LiveLocationFor8Hours: String { return self._s[4196]! } - public func AutoNightTheme_AutomaticHelp(_ _0: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[4197]!, self._r[4197]!, [_0]) } - public var Compose_NewGroupTitle: String { return self._s[4198]! } - public var Call_VoiceOver_VoiceCallOutgoing: String { return self._s[4199]! } - public var DialogList_You: String { return self._s[4200]! } - public var ReportPeer_ReasonViolence: String { return self._s[4201]! } + public var WatchRemote_AlertOpen: String { return self._s[4198]! } + public func PUSH_CHAT_ADD_MEMBER(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[4199]!, self._r[4199]!, [_1, _2, _3]) + } + public var Channel_Members_AddMembersHelp: String { return self._s[4200]! } + public var Shortcut_SwitchAccount: String { return self._s[4201]! } + public var Map_LiveLocationFor8Hours: String { return self._s[4202]! } + public func AutoNightTheme_AutomaticHelp(_ _0: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[4203]!, self._r[4203]!, [_0]) + } + public var Compose_NewGroupTitle: String { return self._s[4204]! } + public var Call_VoiceOver_VoiceCallOutgoing: String { return self._s[4205]! } + public var DialogList_You: String { return self._s[4206]! } + public var ReportPeer_ReasonViolence: String { return self._s[4207]! } public func PUSH_CHANNEL_MESSAGE_STICKER(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4202]!, self._r[4202]!, [_1, _2]) + return formatWithArgumentRanges(self._s[4208]!, self._r[4208]!, [_1, _2]) } - public var VoiceChat_Reconnecting: String { return self._s[4204]! } - public var KeyCommand_ScrollDown: String { return self._s[4207]! } - public var ChatSettings_DownloadInBackground: String { return self._s[4208]! } - public var Wallpaper_ResetWallpapers: String { return self._s[4209]! } - public var Channel_BanList_RestrictedTitle: String { return self._s[4210]! } - public var ArchivedChats_IntroText3: String { return self._s[4211]! } - public var HashtagSearch_AllChats: String { return self._s[4213]! } - public var VoiceChat_EndVoiceChat: String { return self._s[4214]! } - public var Channel_Info_BlackList: String { return self._s[4216]! } - public var Contacts_SearchUsersAndGroupsLabel: String { return self._s[4217]! } - public var PrivacyPhoneNumberSettings_DiscoveryHeader: String { return self._s[4218]! } - public var Paint_Neon: String { return self._s[4220]! } - public var SettingsSearch_Synonyms_AppLanguage: String { return self._s[4221]! } - public var AutoDownloadSettings_AutoDownload: String { return self._s[4222]! } + public var VoiceChat_Reconnecting: String { return self._s[4210]! } + public var KeyCommand_ScrollDown: String { return self._s[4213]! } + public var ChatSettings_DownloadInBackground: String { return self._s[4214]! } + public var Wallpaper_ResetWallpapers: String { return self._s[4215]! } + public var Channel_BanList_RestrictedTitle: String { return self._s[4216]! } + public var ArchivedChats_IntroText3: String { return self._s[4217]! } + public var HashtagSearch_AllChats: String { return self._s[4219]! } + public var VoiceChat_EndVoiceChat: String { return self._s[4220]! } + public var Channel_Info_BlackList: String { return self._s[4222]! } + public var Contacts_SearchUsersAndGroupsLabel: String { return self._s[4223]! } + public var PrivacyPhoneNumberSettings_DiscoveryHeader: String { return self._s[4224]! } + public var Paint_Neon: String { return self._s[4226]! } + public var SettingsSearch_Synonyms_AppLanguage: String { return self._s[4227]! } + public var AutoDownloadSettings_AutoDownload: String { return self._s[4228]! } public func Notification_PinnedVideoMessage(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4224]!, self._r[4224]!, [_0]) + return formatWithArgumentRanges(self._s[4230]!, self._r[4230]!, [_0]) } - public var Map_StopLiveLocation: String { return self._s[4225]! } - public var SettingsSearch_Synonyms_Data_SaveEditedPhotos: String { return self._s[4226]! } - public var Channel_Username_InvalidCharacters: String { return self._s[4227]! } - public var InstantPage_Reference: String { return self._s[4229]! } - public var ChatList_HideAction: String { return self._s[4231]! } - public var Conversation_FileICloudDrive: String { return self._s[4233]! } + public var Map_StopLiveLocation: String { return self._s[4231]! } + public var SettingsSearch_Synonyms_Data_SaveEditedPhotos: String { return self._s[4232]! } + public var Channel_Username_InvalidCharacters: String { return self._s[4233]! } + public var InstantPage_Reference: String { return self._s[4235]! } + public var ChatList_HideAction: String { return self._s[4237]! } + public var Conversation_FileICloudDrive: String { return self._s[4239]! } public func PUSH_PINNED_GEOLIVE(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4234]!, self._r[4234]!, [_1]) + return formatWithArgumentRanges(self._s[4240]!, self._r[4240]!, [_1]) } - public var Passport_PasswordReset: String { return self._s[4236]! } - public var ChatList_Context_UnhideArchive: String { return self._s[4238]! } - public var ConvertToSupergroup_HelpText: String { return self._s[4239]! } - public var Calls_AddTab: String { return self._s[4240]! } - public var TwoStepAuth_ConfirmEmailResendCode: String { return self._s[4241]! } - public var SettingsSearch_Synonyms_Stickers_SuggestStickers: String { return self._s[4242]! } - public var Privacy_GroupsAndChannels: String { return self._s[4245]! } - public var AutoNightTheme_Disabled: String { return self._s[4246]! } - public var CreatePoll_MultipleChoice: String { return self._s[4247]! } + public var Passport_PasswordReset: String { return self._s[4242]! } + public var ChatList_Context_UnhideArchive: String { return self._s[4244]! } + public var ConvertToSupergroup_HelpText: String { return self._s[4245]! } + public var Calls_AddTab: String { return self._s[4246]! } + public var TwoStepAuth_ConfirmEmailResendCode: String { return self._s[4247]! } + public var SettingsSearch_Synonyms_Stickers_SuggestStickers: String { return self._s[4248]! } + public var Privacy_GroupsAndChannels: String { return self._s[4251]! } + public var AutoNightTheme_Disabled: String { return self._s[4252]! } + public var CreatePoll_MultipleChoice: String { return self._s[4253]! } public func PINNED_INVOICE(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4248]!, self._r[4248]!, [_1]) + return formatWithArgumentRanges(self._s[4254]!, self._r[4254]!, [_1]) } - public var Watch_Bot_Restart: String { return self._s[4250]! } + public var Watch_Bot_Restart: String { return self._s[4256]! } public func Conversation_Kilobytes(_ _0: Int) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4251]!, self._r[4251]!, ["\(_0)"]) + return formatWithArgumentRanges(self._s[4257]!, self._r[4257]!, ["\(_0)"]) } - public var GroupInfo_ScamGroupWarning: String { return self._s[4253]! } - public var Conversation_EditingMessagePanelMedia: String { return self._s[4254]! } - public var Appearance_PreviewIncomingText: String { return self._s[4255]! } - public var ChatSettings_WidgetSettings: String { return self._s[4256]! } - public var Notifications_ChannelNotificationsExceptionsHelp: String { return self._s[4257]! } - public var ChatList_UndoArchiveRevealedTitle: String { return self._s[4259]! } - public var Stats_GroupOverview: String { return self._s[4261]! } - public var ScheduledMessages_EditTime: String { return self._s[4264]! } - public var Month_GenFebruary: String { return self._s[4265]! } - public var ChatList_AutoarchiveSuggestion_OpenSettings: String { return self._s[4266]! } - public var Stickers_ClearRecent: String { return self._s[4267]! } - public var InviteLink_Create_UsersLimitNumberOfUsersUnlimited: String { return self._s[4268]! } - public var TwoStepAuth_EnterPasswordPassword: String { return self._s[4269]! } - public var Stats_Message_PublicShares: String { return self._s[4270]! } + public var GroupInfo_ScamGroupWarning: String { return self._s[4259]! } + public var Conversation_EditingMessagePanelMedia: String { return self._s[4260]! } + public var Appearance_PreviewIncomingText: String { return self._s[4261]! } + public var ChatSettings_WidgetSettings: String { return self._s[4262]! } + public var Notifications_ChannelNotificationsExceptionsHelp: String { return self._s[4263]! } + public var ChatList_UndoArchiveRevealedTitle: String { return self._s[4265]! } + public var Stats_GroupOverview: String { return self._s[4267]! } + public var ScheduledMessages_EditTime: String { return self._s[4270]! } + public var Month_GenFebruary: String { return self._s[4271]! } + public var ChatList_AutoarchiveSuggestion_OpenSettings: String { return self._s[4272]! } + public var Stickers_ClearRecent: String { return self._s[4273]! } + public var InviteLink_Create_UsersLimitNumberOfUsersUnlimited: String { return self._s[4274]! } + public var TwoStepAuth_EnterPasswordPassword: String { return self._s[4275]! } + public var Stats_Message_PublicShares: String { return self._s[4276]! } public func Checkout_PayPrice(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4271]!, self._r[4271]!, [_0]) + return formatWithArgumentRanges(self._s[4277]!, self._r[4277]!, [_0]) } - public var Login_TermsOfServiceSignupDecline: String { return self._s[4272]! } - public var CheckoutInfo_ErrorCityInvalid: String { return self._s[4273]! } - public var VoiceOver_Chat_PlayHint: String { return self._s[4274]! } - public var ChatAdmins_AllMembersAreAdminsOffHelp: String { return self._s[4275]! } - public var CheckoutInfo_ShippingInfoTitle: String { return self._s[4277]! } - public var CreatePoll_Create: String { return self._s[4278]! } - public var ChatList_Search_FilterLinks: String { return self._s[4279]! } - public var Your_cards_number_is_invalid: String { return self._s[4280]! } - public var Month_ShortApril: String { return self._s[4281]! } - public var SocksProxySetup_UseForCalls: String { return self._s[4282]! } - public var Conversation_EditingCaptionPanelTitle: String { return self._s[4283]! } - public var SocksProxySetup_Status: String { return self._s[4284]! } - public var VoiceChat_UnmuteForMe: String { return self._s[4285]! } - public var ChannelInfo_DeleteGroupConfirmation: String { return self._s[4286]! } - public var ChatListFolder_CategoryBots: String { return self._s[4287]! } - public var Passport_FieldIdentitySelfieHelp: String { return self._s[4289]! } - public var GroupInfo_BroadcastListNamePlaceholder: String { return self._s[4290]! } - public var Chat_PinnedListPreview_UnpinAllMessages: String { return self._s[4291]! } - public var Wallpaper_ResetWallpapersInfo: String { return self._s[4292]! } - public var Conversation_TitleUnmute: String { return self._s[4293]! } - public var Group_Setup_TypeHeader: String { return self._s[4294]! } + public var Login_TermsOfServiceSignupDecline: String { return self._s[4278]! } + public var CheckoutInfo_ErrorCityInvalid: String { return self._s[4279]! } + public var VoiceOver_Chat_PlayHint: String { return self._s[4280]! } + public var ChatAdmins_AllMembersAreAdminsOffHelp: String { return self._s[4281]! } + public var CheckoutInfo_ShippingInfoTitle: String { return self._s[4283]! } + public var CreatePoll_Create: String { return self._s[4284]! } + public var ChatList_Search_FilterLinks: String { return self._s[4285]! } + public var Your_cards_number_is_invalid: String { return self._s[4286]! } + public var Month_ShortApril: String { return self._s[4287]! } + public var SocksProxySetup_UseForCalls: String { return self._s[4288]! } + public var Conversation_EditingCaptionPanelTitle: String { return self._s[4289]! } + public var SocksProxySetup_Status: String { return self._s[4290]! } + public var VoiceChat_UnmuteForMe: String { return self._s[4291]! } + public var ChannelInfo_DeleteGroupConfirmation: String { return self._s[4292]! } + public var ChatListFolder_CategoryBots: String { return self._s[4293]! } + public var Passport_FieldIdentitySelfieHelp: String { return self._s[4295]! } + public var GroupInfo_BroadcastListNamePlaceholder: String { return self._s[4296]! } + public var Chat_PinnedListPreview_UnpinAllMessages: String { return self._s[4297]! } + public var Wallpaper_ResetWallpapersInfo: String { return self._s[4298]! } + public var Conversation_TitleUnmute: String { return self._s[4299]! } + public var Group_Setup_TypeHeader: String { return self._s[4300]! } public func Conversation_ForwardTooltip_ManyChats_One(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4295]!, self._r[4295]!, [_0, _1]) + return formatWithArgumentRanges(self._s[4301]!, self._r[4301]!, [_0, _1]) } - public var Stats_ViewsPerPost: String { return self._s[4296]! } - public var CheckoutInfo_ShippingInfoCountry: String { return self._s[4297]! } - public var Passport_Identity_TranslationHelp: String { return self._s[4298]! } + public var Stats_ViewsPerPost: String { return self._s[4302]! } + public var CheckoutInfo_ShippingInfoCountry: String { return self._s[4303]! } + public var Passport_Identity_TranslationHelp: String { return self._s[4304]! } public func PUSH_CHANNEL_MESSAGE_FWD(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4299]!, self._r[4299]!, [_1]) + return formatWithArgumentRanges(self._s[4305]!, self._r[4305]!, [_1]) } - public var GroupInfo_Administrators_Title: String { return self._s[4300]! } + public var GroupInfo_Administrators_Title: String { return self._s[4306]! } public func Channel_AdminLog_MessageRankName(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4301]!, self._r[4301]!, [_1, _2]) + return formatWithArgumentRanges(self._s[4307]!, self._r[4307]!, [_1, _2]) } public func PUSH_CHAT_MESSAGE_POLL(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4302]!, self._r[4302]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[4308]!, self._r[4308]!, [_1, _2, _3]) } - public var CheckoutInfo_ShippingInfoState: String { return self._s[4303]! } - public var Passport_Language_my: String { return self._s[4305]! } - public var PrivacyLastSeenSettings_AlwaysShareWith_Title: String { return self._s[4306]! } - public var Map_PlacesNearby: String { return self._s[4307]! } - public var Channel_About_Help: String { return self._s[4308]! } - public var LogoutOptions_AddAccountTitle: String { return self._s[4309]! } - public var ChatSettings_AutomaticAudioDownload: String { return self._s[4310]! } - public var Channel_Username_Title: String { return self._s[4311]! } - public var Activity_RecordingVideoMessage: String { return self._s[4312]! } + public var CheckoutInfo_ShippingInfoState: String { return self._s[4309]! } + public var Passport_Language_my: String { return self._s[4311]! } + public var PrivacyLastSeenSettings_AlwaysShareWith_Title: String { return self._s[4312]! } + public var Map_PlacesNearby: String { return self._s[4313]! } + public var Channel_About_Help: String { return self._s[4314]! } + public var LogoutOptions_AddAccountTitle: String { return self._s[4315]! } + public var ChatSettings_AutomaticAudioDownload: String { return self._s[4316]! } + public var Channel_Username_Title: String { return self._s[4317]! } + public var Activity_RecordingVideoMessage: String { return self._s[4318]! } public func StickerPackActionInfo_RemovedText(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4313]!, self._r[4313]!, [_0]) + return formatWithArgumentRanges(self._s[4319]!, self._r[4319]!, [_0]) } - public var CheckoutInfo_ShippingInfoCity: String { return self._s[4314]! } - public var Passport_DiscardMessageDescription: String { return self._s[4315]! } - public var Conversation_LinkDialogOpen: String { return self._s[4316]! } - public var ChatList_Context_HideArchive: String { return self._s[4317]! } + public var CheckoutInfo_ShippingInfoCity: String { return self._s[4320]! } + public var Passport_DiscardMessageDescription: String { return self._s[4321]! } + public var Conversation_LinkDialogOpen: String { return self._s[4322]! } + public var ChatList_Context_HideArchive: String { return self._s[4323]! } public func Message_AuthorPinnedGame(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4318]!, self._r[4318]!, [_0]) + return formatWithArgumentRanges(self._s[4324]!, self._r[4324]!, [_0]) } - public var Privacy_GroupsAndChannels_CustomShareHelp: String { return self._s[4319]! } - public var Conversation_Admin: String { return self._s[4320]! } - public var DialogList_TabTitle: String { return self._s[4321]! } + public var Privacy_GroupsAndChannels_CustomShareHelp: String { return self._s[4325]! } + public var Conversation_Admin: String { return self._s[4326]! } + public var DialogList_TabTitle: String { return self._s[4327]! } public func PUSH_CHAT_ALBUM(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4322]!, self._r[4322]!, [_1, _2]) + return formatWithArgumentRanges(self._s[4328]!, self._r[4328]!, [_1, _2]) } - public var Notifications_PermissionsUnreachableText: String { return self._s[4323]! } - public var Passport_Identity_GenderMale: String { return self._s[4325]! } - public var SettingsSearch_Synonyms_Privacy_BlockedUsers: String { return self._s[4327]! } - public var PhoneNumberHelp_Alert: String { return self._s[4328]! } - public var EnterPasscode_EnterNewPasscodeChange: String { return self._s[4329]! } - public var Notifications_InAppNotifications: String { return self._s[4330]! } + public var Notifications_PermissionsUnreachableText: String { return self._s[4329]! } + public var Passport_Identity_GenderMale: String { return self._s[4331]! } + public var SettingsSearch_Synonyms_Privacy_BlockedUsers: String { return self._s[4333]! } + public var PhoneNumberHelp_Alert: String { return self._s[4334]! } + public var EnterPasscode_EnterNewPasscodeChange: String { return self._s[4335]! } + public var Notifications_InAppNotifications: String { return self._s[4336]! } public func Update_AppVersion(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4331]!, self._r[4331]!, [_0]) + return formatWithArgumentRanges(self._s[4337]!, self._r[4337]!, [_0]) } - public var Notification_VideoCallOutgoing: String { return self._s[4332]! } - public var Login_InvalidCodeError: String { return self._s[4333]! } - public var Conversation_PrivateChannelTimeLimitedAlertJoin: String { return self._s[4334]! } + public var Notification_VideoCallOutgoing: String { return self._s[4338]! } + public var Login_InvalidCodeError: String { return self._s[4339]! } + public var Conversation_PrivateChannelTimeLimitedAlertJoin: String { return self._s[4340]! } public func LastSeen_TodayAt(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4336]!, self._r[4336]!, [_0]) + return formatWithArgumentRanges(self._s[4342]!, self._r[4342]!, [_0]) } - public var Conversation_InputTextCaptionPlaceholder: String { return self._s[4337]! } - public var ReportPeer_Report: String { return self._s[4338]! } - public var Camera_FlashOff: String { return self._s[4341]! } - public var Conversation_InputTextBroadcastPlaceholder: String { return self._s[4344]! } - public var PrivacyPolicy_DeclineTitle: String { return self._s[4347]! } - public var SettingsSearch_Synonyms_Privacy_PasscodeAndTouchId: String { return self._s[4348]! } - public var Passport_FieldEmail: String { return self._s[4349]! } + public var Conversation_InputTextCaptionPlaceholder: String { return self._s[4343]! } + public var ReportPeer_Report: String { return self._s[4344]! } + public var Camera_FlashOff: String { return self._s[4347]! } + public var Conversation_InputTextBroadcastPlaceholder: String { return self._s[4350]! } + public var PrivacyPolicy_DeclineTitle: String { return self._s[4353]! } + public var SettingsSearch_Synonyms_Privacy_PasscodeAndTouchId: String { return self._s[4354]! } + public var Passport_FieldEmail: String { return self._s[4355]! } public func Channel_AdminLog_MessageKickedName(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4350]!, self._r[4350]!, [_1]) + return formatWithArgumentRanges(self._s[4356]!, self._r[4356]!, [_1]) } - public var Notifications_ExceptionsResetToDefaults: String { return self._s[4351]! } - public var PeerInfo_PaneVoiceAndVideo: String { return self._s[4352]! } - public var Group_OwnershipTransfer_Title: String { return self._s[4353]! } - public var Conversation_DefaultRestrictedInline: String { return self._s[4354]! } - public var Login_PhoneNumberHelp: String { return self._s[4356]! } - public var Channel_AdminLogFilter_EventsNewMembers: String { return self._s[4357]! } - public var Conversation_PinnedQuiz: String { return self._s[4358]! } - public var CreateGroup_SoftUserLimitAlert: String { return self._s[4359]! } - public var Login_PhoneNumberAlreadyAuthorizedSwitch: String { return self._s[4360]! } - public var Group_MessagePhotoUpdated: String { return self._s[4361]! } - public var LoginPassword_PasswordPlaceholder: String { return self._s[4362]! } - public var Passport_Identity_Translations: String { return self._s[4364]! } - public var ChatAdmins_AllMembersAreAdmins: String { return self._s[4365]! } - public var ChannelInfo_DeleteChannel: String { return self._s[4367]! } - public var PasscodeSettings_HelpBottom: String { return self._s[4368]! } - public var Channel_Members_AddMembers: String { return self._s[4369]! } - public var AutoDownloadSettings_LastDelimeter: String { return self._s[4370]! } - public var Notification_Exceptions_DeleteAllConfirmation: String { return self._s[4372]! } - public var Conversation_HoldForAudio: String { return self._s[4373]! } - public var Media_LimitedAccessChangeSettings: String { return self._s[4375]! } - public var Watch_LastSeen_Lately: String { return self._s[4376]! } - public var ChatList_Context_MarkAsRead: String { return self._s[4377]! } - public var Conversation_PinnedMessage: String { return self._s[4378]! } - public var SettingsSearch_Synonyms_Appearance_ColorTheme: String { return self._s[4379]! } - public var Passport_UpdateRequiredError: String { return self._s[4381]! } - public var PrivacySettings_Passcode: String { return self._s[4382]! } + public var Notifications_ExceptionsResetToDefaults: String { return self._s[4357]! } + public var PeerInfo_PaneVoiceAndVideo: String { return self._s[4358]! } + public var Group_OwnershipTransfer_Title: String { return self._s[4359]! } + public var Conversation_DefaultRestrictedInline: String { return self._s[4360]! } + public var Login_PhoneNumberHelp: String { return self._s[4362]! } + public var Channel_AdminLogFilter_EventsNewMembers: String { return self._s[4363]! } + public var Conversation_PinnedQuiz: String { return self._s[4364]! } + public var CreateGroup_SoftUserLimitAlert: String { return self._s[4365]! } + public var Login_PhoneNumberAlreadyAuthorizedSwitch: String { return self._s[4366]! } + public var Group_MessagePhotoUpdated: String { return self._s[4367]! } + public var LoginPassword_PasswordPlaceholder: String { return self._s[4368]! } + public var Passport_Identity_Translations: String { return self._s[4370]! } + public var ChatAdmins_AllMembersAreAdmins: String { return self._s[4371]! } + public var ChannelInfo_DeleteChannel: String { return self._s[4373]! } + public var PasscodeSettings_HelpBottom: String { return self._s[4374]! } + public var Channel_Members_AddMembers: String { return self._s[4375]! } + public var AutoDownloadSettings_LastDelimeter: String { return self._s[4376]! } + public var Notification_Exceptions_DeleteAllConfirmation: String { return self._s[4378]! } + public var Conversation_HoldForAudio: String { return self._s[4379]! } + public var Media_LimitedAccessChangeSettings: String { return self._s[4381]! } + public var Watch_LastSeen_Lately: String { return self._s[4382]! } + public var ChatList_Context_MarkAsRead: String { return self._s[4383]! } + public var Conversation_PinnedMessage: String { return self._s[4384]! } + public var SettingsSearch_Synonyms_Appearance_ColorTheme: String { return self._s[4385]! } + public var Passport_UpdateRequiredError: String { return self._s[4387]! } + public var PrivacySettings_Passcode: String { return self._s[4388]! } public func Call_EmojiDescription(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4383]!, self._r[4383]!, [_0]) + return formatWithArgumentRanges(self._s[4389]!, self._r[4389]!, [_0]) } - public var AutoNightTheme_NotAvailable: String { return self._s[4384]! } - public var Conversation_PressVolumeButtonForSound: String { return self._s[4385]! } - public var VoiceOver_Common_On: String { return self._s[4386]! } - public var LoginPassword_InvalidPasswordError: String { return self._s[4387]! } - public var ChatListFolder_IncludedSectionHeader: String { return self._s[4388]! } - public var Channel_SignMessages_Help: String { return self._s[4389]! } - public var ChatList_DeleteForEveryoneConfirmationTitle: String { return self._s[4390]! } - public var Conversation_TitleNoComments: String { return self._s[4391]! } - public var MediaPicker_LivePhotoDescription: String { return self._s[4392]! } - public var GroupInfo_Permissions: String { return self._s[4393]! } - public var GroupPermission_NoSendLinks: String { return self._s[4396]! } - public var Passport_Identity_ResidenceCountry: String { return self._s[4397]! } - public var Appearance_ThemeCarouselNightBlue: String { return self._s[4399]! } - public var ChatList_ArchiveAction: String { return self._s[4400]! } + public var AutoNightTheme_NotAvailable: String { return self._s[4390]! } + public var Conversation_PressVolumeButtonForSound: String { return self._s[4391]! } + public var VoiceOver_Common_On: String { return self._s[4392]! } + public var LoginPassword_InvalidPasswordError: String { return self._s[4393]! } + public var ChatListFolder_IncludedSectionHeader: String { return self._s[4394]! } + public var Channel_SignMessages_Help: String { return self._s[4395]! } + public var ChatList_DeleteForEveryoneConfirmationTitle: String { return self._s[4396]! } + public var Conversation_TitleNoComments: String { return self._s[4397]! } + public var MediaPicker_LivePhotoDescription: String { return self._s[4398]! } + public var GroupInfo_Permissions: String { return self._s[4399]! } + public var GroupPermission_NoSendLinks: String { return self._s[4402]! } + public var Passport_Identity_ResidenceCountry: String { return self._s[4403]! } + public var Appearance_ThemeCarouselNightBlue: String { return self._s[4405]! } + public var ChatList_ArchiveAction: String { return self._s[4406]! } public func Channel_AdminLog_DisabledSlowmode(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4401]!, self._r[4401]!, [_0]) + return formatWithArgumentRanges(self._s[4407]!, self._r[4407]!, [_0]) } - public var GroupInfo_GroupHistory: String { return self._s[4402]! } + public var GroupInfo_GroupHistory: String { return self._s[4408]! } public func Channel_Management_ErrorNotMember(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4404]!, self._r[4404]!, [_0]) + return formatWithArgumentRanges(self._s[4410]!, self._r[4410]!, [_0]) } - public var Privacy_Forwards_LinkIfAllowed: String { return self._s[4406]! } - public var Channel_Info_Banned: String { return self._s[4407]! } - public var Paint_RecentStickers: String { return self._s[4408]! } - public var VoiceOver_MessageContextSend: String { return self._s[4409]! } - public var Group_ErrorNotMutualContact: String { return self._s[4410]! } - public var ReportPeer_ReasonOther: String { return self._s[4412]! } - public var Channel_BanUser_PermissionChangeGroupInfo: String { return self._s[4413]! } - public var SocksProxySetup_ShareQRCodeInfo: String { return self._s[4415]! } - public var KeyCommand_Find: String { return self._s[4416]! } + public var Privacy_Forwards_LinkIfAllowed: String { return self._s[4412]! } + public var Channel_Info_Banned: String { return self._s[4413]! } + public var Paint_RecentStickers: String { return self._s[4414]! } + public var VoiceOver_MessageContextSend: String { return self._s[4415]! } + public var Group_ErrorNotMutualContact: String { return self._s[4416]! } + public var ReportPeer_ReasonOther: String { return self._s[4418]! } + public var Channel_BanUser_PermissionChangeGroupInfo: String { return self._s[4419]! } + public var SocksProxySetup_ShareQRCodeInfo: String { return self._s[4421]! } + public var KeyCommand_Find: String { return self._s[4422]! } public func Channel_MessageTitleUpdated(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4417]!, self._r[4417]!, [_0]) + return formatWithArgumentRanges(self._s[4423]!, self._r[4423]!, [_0]) } - public var ChatList_Context_Unmute: String { return self._s[4418]! } - public var Chat_SlowmodeAttachmentLimitReached: String { return self._s[4419]! } - public var Stickers_GroupStickersHelp: String { return self._s[4420]! } - public var Checkout_Title: String { return self._s[4421]! } - public var Activity_RecordingAudio: String { return self._s[4422]! } - public var SettingsSearch_Synonyms_Notifications_GroupNotificationsPreview: String { return self._s[4423]! } - public var BlockedUsers_BlockTitle: String { return self._s[4424]! } - public var DialogList_SavedMessagesHelp: String { return self._s[4426]! } - public var Calls_All: String { return self._s[4427]! } - public var Settings_FAQ_Button: String { return self._s[4429]! } - public var Conversation_Dice_u1F3B0: String { return self._s[4431]! } + public var ChatList_Context_Unmute: String { return self._s[4424]! } + public var Chat_SlowmodeAttachmentLimitReached: String { return self._s[4425]! } + public var Stickers_GroupStickersHelp: String { return self._s[4426]! } + public var Checkout_Title: String { return self._s[4427]! } + public var Activity_RecordingAudio: String { return self._s[4428]! } + public var SettingsSearch_Synonyms_Notifications_GroupNotificationsPreview: String { return self._s[4429]! } + public var BlockedUsers_BlockTitle: String { return self._s[4430]! } + public var DialogList_SavedMessagesHelp: String { return self._s[4432]! } + public var Calls_All: String { return self._s[4433]! } + public var Settings_FAQ_Button: String { return self._s[4435]! } + public var Conversation_Dice_u1F3B0: String { return self._s[4437]! } public func Time_MonthOfYear_m5(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4432]!, self._r[4432]!, [_0]) + return formatWithArgumentRanges(self._s[4438]!, self._r[4438]!, [_0]) } - public var Conversation_ReportGroupLocation: String { return self._s[4433]! } - public var Passport_Scans_Upload: String { return self._s[4434]! } - public var Channel_EditAdmin_PermissionPinMessages: String { return self._s[4436]! } - public var ChatList_UnarchiveAction: String { return self._s[4437]! } - public var Stats_GroupTopInviter_History: String { return self._s[4438]! } - public var GroupInfo_Permissions_Title: String { return self._s[4439]! } - public var VoiceChat_CreateNewVoiceChatStart: String { return self._s[4440]! } - public var Passport_Language_el: String { return self._s[4441]! } - public var Channel_DiscussionMessageUnavailable: String { return self._s[4442]! } - public var GroupInfo_ActionPromote: String { return self._s[4443]! } - public var Group_OwnershipTransfer_ErrorLocatedGroupsTooMuch: String { return self._s[4444]! } - public var Media_LimitedAccessSelectMore: String { return self._s[4445]! } + public var Conversation_ReportGroupLocation: String { return self._s[4439]! } + public var Passport_Scans_Upload: String { return self._s[4440]! } + public var Channel_EditAdmin_PermissionPinMessages: String { return self._s[4442]! } + public var ChatList_UnarchiveAction: String { return self._s[4443]! } + public var Stats_GroupTopInviter_History: String { return self._s[4444]! } + public var GroupInfo_Permissions_Title: String { return self._s[4445]! } + public var VoiceChat_CreateNewVoiceChatStart: String { return self._s[4446]! } + public var Passport_Language_el: String { return self._s[4447]! } + public var Channel_DiscussionMessageUnavailable: String { return self._s[4448]! } + public var GroupInfo_ActionPromote: String { return self._s[4449]! } + public var Group_OwnershipTransfer_ErrorLocatedGroupsTooMuch: String { return self._s[4450]! } + public var Media_LimitedAccessSelectMore: String { return self._s[4451]! } public func TwoStepAuth_PendingEmailHelp(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4446]!, self._r[4446]!, [_0]) + return formatWithArgumentRanges(self._s[4452]!, self._r[4452]!, [_0]) } - public var VoiceOver_Chat_Reply: String { return self._s[4447]! } - public var Month_GenMay: String { return self._s[4448]! } - public var DialogList_DeleteBotConversationConfirmation: String { return self._s[4449]! } - public var Chat_PsaTooltip_covid: String { return self._s[4450]! } - public var Watch_Suggestion_CantTalk: String { return self._s[4451]! } - public var Privacy_GroupsAndChannels_NeverAllow_Title: String { return self._s[4452]! } - public var AppUpgrade_Running: String { return self._s[4453]! } - public var PasscodeSettings_UnlockWithFaceId: String { return self._s[4456]! } - public var Notification_Exceptions_PreviewAlwaysOff: String { return self._s[4457]! } - public var SharedMedia_EmptyText: String { return self._s[4458]! } - public var Passport_Address_EditResidentialAddress: String { return self._s[4459]! } - public var SettingsSearch_Synonyms_Notifications_GroupNotificationsAlert: String { return self._s[4460]! } - public var Message_PinnedGame: String { return self._s[4461]! } - public var KeyCommand_SearchInChat: String { return self._s[4462]! } - public var Appearance_ThemeCarouselNewNight: String { return self._s[4463]! } - public var ChatList_Search_FilterMedia: String { return self._s[4464]! } - public var Message_PinnedAudioMessage: String { return self._s[4465]! } - public var ChannelInfo_ConfirmLeave: String { return self._s[4466]! } + public var VoiceOver_Chat_Reply: String { return self._s[4453]! } + public var Month_GenMay: String { return self._s[4454]! } + public var DialogList_DeleteBotConversationConfirmation: String { return self._s[4455]! } + public var Chat_PsaTooltip_covid: String { return self._s[4456]! } + public var Watch_Suggestion_CantTalk: String { return self._s[4457]! } + public var Privacy_GroupsAndChannels_NeverAllow_Title: String { return self._s[4458]! } + public var AppUpgrade_Running: String { return self._s[4459]! } + public var PasscodeSettings_UnlockWithFaceId: String { return self._s[4462]! } + public var Notification_Exceptions_PreviewAlwaysOff: String { return self._s[4463]! } + public var SharedMedia_EmptyText: String { return self._s[4464]! } + public var Passport_Address_EditResidentialAddress: String { return self._s[4465]! } + public var SettingsSearch_Synonyms_Notifications_GroupNotificationsAlert: String { return self._s[4466]! } + public var Message_PinnedGame: String { return self._s[4467]! } + public var KeyCommand_SearchInChat: String { return self._s[4468]! } + public var Appearance_ThemeCarouselNewNight: String { return self._s[4469]! } + public var ChatList_Search_FilterMedia: String { return self._s[4470]! } + public var Message_PinnedAudioMessage: String { return self._s[4471]! } + public var ChannelInfo_ConfirmLeave: String { return self._s[4472]! } public func Channel_AdminLog_MessagePromotedNameUsername(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4467]!, self._r[4467]!, [_1, _2]) + return formatWithArgumentRanges(self._s[4473]!, self._r[4473]!, [_1, _2]) } - public var SocksProxySetup_ProxyStatusUnavailable: String { return self._s[4468]! } - public var InviteLink_Create: String { return self._s[4469]! } + public var SocksProxySetup_ProxyStatusUnavailable: String { return self._s[4474]! } + public var InviteLink_Create: String { return self._s[4475]! } public func Passport_Email_CodeHelp(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4470]!, self._r[4470]!, [_0]) + return formatWithArgumentRanges(self._s[4476]!, self._r[4476]!, [_0]) } public func Message_PinnedTextMessage(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4471]!, self._r[4471]!, [_0]) + return formatWithArgumentRanges(self._s[4477]!, self._r[4477]!, [_0]) } - public var Settings_AddAccount: String { return self._s[4472]! } - public var Channel_AdminLog_CanDeleteMessages: String { return self._s[4473]! } - public var Conversation_DiscardVoiceMessageTitle: String { return self._s[4474]! } - public var Channel_JoinChannel: String { return self._s[4475]! } - public var Watch_UserInfo_Unblock: String { return self._s[4476]! } - public var PhoneLabel_Title: String { return self._s[4477]! } - public var Group_Setup_HistoryHiddenHelp: String { return self._s[4479]! } - public var Privacy_ProfilePhoto_AlwaysShareWith_Title: String { return self._s[4480]! } + public var Settings_AddAccount: String { return self._s[4478]! } + public var Channel_AdminLog_CanDeleteMessages: String { return self._s[4479]! } + public var Conversation_DiscardVoiceMessageTitle: String { return self._s[4480]! } + public var Channel_JoinChannel: String { return self._s[4481]! } + public var Watch_UserInfo_Unblock: String { return self._s[4482]! } + public var PhoneLabel_Title: String { return self._s[4483]! } + public var Group_Setup_HistoryHiddenHelp: String { return self._s[4485]! } + public var Privacy_ProfilePhoto_AlwaysShareWith_Title: String { return self._s[4486]! } public func Login_PhoneGenericEmailBody(_ _1: String, _ _2: String, _ _3: String, _ _4: String, _ _5: String, _ _6: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4481]!, self._r[4481]!, [_1, _2, _3, _4, _5, _6]) + return formatWithArgumentRanges(self._s[4487]!, self._r[4487]!, [_1, _2, _3, _4, _5, _6]) } - public var Channel_AddBotErrorHaveRights: String { return self._s[4482]! } - public var ChatList_TabIconFoldersTooltipNonEmptyFolders: String { return self._s[4483]! } - public var DialogList_EncryptionProcessing: String { return self._s[4484]! } - public var ChatList_Search_FilterChats: String { return self._s[4485]! } - public var WatchRemote_NotificationText: String { return self._s[4486]! } - public var EditTheme_ChangeColors: String { return self._s[4487]! } - public var GroupRemoved_ViewUserInfo: String { return self._s[4488]! } - public var CallSettings_OnMobile: String { return self._s[4490]! } - public var Month_ShortFebruary: String { return self._s[4492]! } - public var VoiceOver_MessageContextReply: String { return self._s[4493]! } - public var Group_Location_ChangeLocation: String { return self._s[4495]! } + public var Channel_AddBotErrorHaveRights: String { return self._s[4488]! } + public var ChatList_TabIconFoldersTooltipNonEmptyFolders: String { return self._s[4489]! } + public var DialogList_EncryptionProcessing: String { return self._s[4490]! } + public var ChatList_Search_FilterChats: String { return self._s[4491]! } + public var WatchRemote_NotificationText: String { return self._s[4492]! } + public var EditTheme_ChangeColors: String { return self._s[4493]! } + public var GroupRemoved_ViewUserInfo: String { return self._s[4494]! } + public var CallSettings_OnMobile: String { return self._s[4496]! } + public var Month_ShortFebruary: String { return self._s[4498]! } + public var VoiceOver_MessageContextReply: String { return self._s[4499]! } + public var Group_Location_ChangeLocation: String { return self._s[4501]! } public func PUSH_VIDEO_CALL_REQUEST(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4496]!, self._r[4496]!, [_1]) + return formatWithArgumentRanges(self._s[4502]!, self._r[4502]!, [_1]) } - public var Passport_Address_TypeBankStatementUploadScan: String { return self._s[4497]! } - public var VoiceOver_Media_PlaybackStop: String { return self._s[4498]! } - public var SettingsSearch_Synonyms_Data_SaveIncomingPhotos: String { return self._s[4499]! } + public var Passport_Address_TypeBankStatementUploadScan: String { return self._s[4503]! } + public var VoiceOver_Media_PlaybackStop: String { return self._s[4504]! } + public var SettingsSearch_Synonyms_Data_SaveIncomingPhotos: String { return self._s[4505]! } public func Channel_AdminLog_MessageRestrictedUntil(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4501]!, self._r[4501]!, [_0]) + return formatWithArgumentRanges(self._s[4507]!, self._r[4507]!, [_0]) } - public var PhotoEditor_WarmthTool: String { return self._s[4502]! } - public var Login_InfoAvatarPhoto: String { return self._s[4503]! } - public var Notification_Exceptions_NewException_MessagePreviewHeader: String { return self._s[4504]! } - public var Permissions_CellularDataAllowInSettings_v0: String { return self._s[4505]! } - public var Map_PlacesInThisArea: String { return self._s[4506]! } - public var VoiceOver_Chat_ContactEmail: String { return self._s[4507]! } - public var Notifications_InAppNotificationsSounds: String { return self._s[4508]! } + public var PhotoEditor_WarmthTool: String { return self._s[4508]! } + public var Login_InfoAvatarPhoto: String { return self._s[4509]! } + public var Notification_Exceptions_NewException_MessagePreviewHeader: String { return self._s[4510]! } + public var Permissions_CellularDataAllowInSettings_v0: String { return self._s[4511]! } + public var Map_PlacesInThisArea: String { return self._s[4512]! } + public var VoiceOver_Chat_ContactEmail: String { return self._s[4513]! } + public var Notifications_InAppNotificationsSounds: String { return self._s[4514]! } public func PUSH_PINNED_NOTEXT(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4509]!, self._r[4509]!, [_1]) - } - public var ShareMenu_Send: String { return self._s[4510]! } - public var Username_InvalidStartsWithNumber: String { return self._s[4511]! } - public func Channel_AdminLog_StartedVoiceChat(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4512]!, self._r[4512]!, [_1]) - } - public var Appearance_AppIconClassicX: String { return self._s[4513]! } - public var Report_Report: String { return self._s[4514]! } - public func PUSH_CHANNEL_MESSAGE_ROUND(_ _1: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[4515]!, self._r[4515]!, [_1]) } - public var Conversation_StopPoll: String { return self._s[4516]! } - public var InfoPlist_NSLocationAlwaysUsageDescription: String { return self._s[4518]! } - public var Passport_Identity_EditIdentityCard: String { return self._s[4519]! } - public var Appearance_ThemePreview_ChatList_3_Name: String { return self._s[4520]! } - public var Conversation_Timer_Title: String { return self._s[4521]! } - public var Common_Next: String { return self._s[4522]! } - public var Notification_Exceptions_NewException: String { return self._s[4523]! } + public var PeerInfo_ReportProfileVideo: String { return self._s[4516]! } + public var ShareMenu_Send: String { return self._s[4517]! } + public var Username_InvalidStartsWithNumber: String { return self._s[4518]! } + public func Channel_AdminLog_StartedVoiceChat(_ _1: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[4519]!, self._r[4519]!, [_1]) + } + public var Appearance_AppIconClassicX: String { return self._s[4520]! } + public var Report_Report: String { return self._s[4521]! } + public func PUSH_CHANNEL_MESSAGE_ROUND(_ _1: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[4522]!, self._r[4522]!, [_1]) + } + public var Conversation_StopPoll: String { return self._s[4523]! } + public var InfoPlist_NSLocationAlwaysUsageDescription: String { return self._s[4525]! } + public var Passport_Identity_EditIdentityCard: String { return self._s[4526]! } + public var Appearance_ThemePreview_ChatList_3_Name: String { return self._s[4527]! } + public var Conversation_Timer_Title: String { return self._s[4528]! } + public var Common_Next: String { return self._s[4529]! } + public var Notification_Exceptions_NewException: String { return self._s[4530]! } public func Generic_OpenHiddenLinkAlert(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4524]!, self._r[4524]!, [_0]) + return formatWithArgumentRanges(self._s[4531]!, self._r[4531]!, [_0]) } - public var AccessDenied_CallMicrophone: String { return self._s[4525]! } - public var VoiceChat_UnmutePeer: String { return self._s[4526]! } - public var ChatImportActivity_Retry: String { return self._s[4527]! } - public var SettingsSearch_Synonyms_Data_AutoDownloadUsingCellular: String { return self._s[4528]! } - public var ChangePhoneNumberCode_Help: String { return self._s[4529]! } - public var Passport_Identity_OneOfTypeIdentityCard: String { return self._s[4530]! } - public var Channel_AdminLogFilter_EventsLeaving: String { return self._s[4531]! } - public var BlockedUsers_LeavePrefix: String { return self._s[4532]! } + public var AccessDenied_CallMicrophone: String { return self._s[4532]! } + public var VoiceChat_UnmutePeer: String { return self._s[4533]! } + public var ChatImportActivity_Retry: String { return self._s[4534]! } + public var SettingsSearch_Synonyms_Data_AutoDownloadUsingCellular: String { return self._s[4535]! } + public var ChangePhoneNumberCode_Help: String { return self._s[4536]! } + public var Passport_Identity_OneOfTypeIdentityCard: String { return self._s[4537]! } + public var Channel_AdminLogFilter_EventsLeaving: String { return self._s[4538]! } + public var BlockedUsers_LeavePrefix: String { return self._s[4539]! } public func Passport_RequestHeader(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4533]!, self._r[4533]!, [_0]) + return formatWithArgumentRanges(self._s[4540]!, self._r[4540]!, [_0]) } - public var Group_About_Help: String { return self._s[4534]! } - public var TwoStepAuth_ChangePasswordDescription: String { return self._s[4535]! } - public var Tour_Title3: String { return self._s[4536]! } - public var Watch_Conversation_Unblock: String { return self._s[4537]! } - public var Watch_UserInfo_Block: String { return self._s[4538]! } - public var Notifications_ChannelNotificationsAlert: String { return self._s[4539]! } - public var TwoFactorSetup_Hint_Action: String { return self._s[4540]! } - public var IntentsSettings_SuggestedChatsInfo: String { return self._s[4541]! } - public var TextFormat_AddLinkTitle: String { return self._s[4542]! } - public var GroupInfo_InviteLink_RevokeAlert_Revoke: String { return self._s[4543]! } - public var TwoStepAuth_EnterPasswordTitle: String { return self._s[4544]! } - public var FastTwoStepSetup_PasswordSection: String { return self._s[4545]! } - public var Compose_ChannelMembers: String { return self._s[4546]! } - public var Conversation_ForwardTitle: String { return self._s[4547]! } - public var Conversation_PinnedPoll: String { return self._s[4549]! } + public var Group_About_Help: String { return self._s[4541]! } + public var TwoStepAuth_ChangePasswordDescription: String { return self._s[4542]! } + public var Tour_Title3: String { return self._s[4543]! } + public var Watch_Conversation_Unblock: String { return self._s[4544]! } + public var Watch_UserInfo_Block: String { return self._s[4545]! } + public var Notifications_ChannelNotificationsAlert: String { return self._s[4546]! } + public var TwoFactorSetup_Hint_Action: String { return self._s[4547]! } + public var IntentsSettings_SuggestedChatsInfo: String { return self._s[4548]! } + public var TextFormat_AddLinkTitle: String { return self._s[4549]! } + public var GroupInfo_InviteLink_RevokeAlert_Revoke: String { return self._s[4550]! } + public var TwoStepAuth_EnterPasswordTitle: String { return self._s[4551]! } + public var FastTwoStepSetup_PasswordSection: String { return self._s[4552]! } + public var Compose_ChannelMembers: String { return self._s[4553]! } + public var Conversation_ForwardTitle: String { return self._s[4554]! } + public var Conversation_PinnedPoll: String { return self._s[4556]! } public func VoiceOver_Chat_AnonymousPollFrom(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4550]!, self._r[4550]!, [_0]) + return formatWithArgumentRanges(self._s[4557]!, self._r[4557]!, [_0]) } - public var SettingsSearch_Synonyms_EditProfile_AddAccount: String { return self._s[4551]! } - public var Conversation_ContextMenuStickerPackAdd: String { return self._s[4552]! } - public var Stats_Overview: String { return self._s[4553]! } - public var Map_HomeAndWorkTitle: String { return self._s[4554]! } + public var SettingsSearch_Synonyms_EditProfile_AddAccount: String { return self._s[4558]! } + public var Conversation_ContextMenuStickerPackAdd: String { return self._s[4559]! } + public var Stats_Overview: String { return self._s[4560]! } + public var Map_HomeAndWorkTitle: String { return self._s[4561]! } public func Time_PreciseDate_m4(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4555]!, self._r[4555]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[4562]!, self._r[4562]!, [_1, _2, _3]) } - public var Passport_Address_CityPlaceholder: String { return self._s[4556]! } - public var InfoPlist_NSLocationAlwaysAndWhenInUseUsageDescription: String { return self._s[4557]! } - public var Privacy_PhoneNumber: String { return self._s[4558]! } - public var ChatList_Search_FilterFiles: String { return self._s[4559]! } - public var ChatList_DeleteForEveryoneConfirmationAction: String { return self._s[4560]! } - public var ChannelIntro_CreateChannel: String { return self._s[4561]! } - public var Conversation_InputTextAnonymousPlaceholder: String { return self._s[4562]! } + public var Passport_Address_CityPlaceholder: String { return self._s[4563]! } + public var InfoPlist_NSLocationAlwaysAndWhenInUseUsageDescription: String { return self._s[4564]! } + public var Privacy_PhoneNumber: String { return self._s[4565]! } + public var ChatList_Search_FilterFiles: String { return self._s[4566]! } + public var ChatList_DeleteForEveryoneConfirmationAction: String { return self._s[4567]! } + public var ChannelIntro_CreateChannel: String { return self._s[4568]! } + public var Conversation_InputTextAnonymousPlaceholder: String { return self._s[4569]! } public func Login_EmailCodeBody(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4563]!, self._r[4563]!, [_0]) + return formatWithArgumentRanges(self._s[4570]!, self._r[4570]!, [_0]) } - public var Weekday_ShortMonday: String { return self._s[4564]! } - public var Passport_Language_ar: String { return self._s[4566]! } - public var SettingsSearch_Synonyms_EditProfile_Title: String { return self._s[4567]! } - public var TwoFactorSetup_Done_Title: String { return self._s[4568]! } - public var Calls_RatingFeedback: String { return self._s[4569]! } - public var SettingsSearch_Synonyms_Notifications_ChannelNotificationsPreview: String { return self._s[4570]! } - public var AutoDownloadSettings_ResetSettings: String { return self._s[4573]! } - public var Watch_Compose_Send: String { return self._s[4574]! } - public var PasscodeSettings_ChangePasscode: String { return self._s[4575]! } - public var WebSearch_RecentSectionClear: String { return self._s[4576]! } + public var Weekday_ShortMonday: String { return self._s[4571]! } + public var Passport_Language_ar: String { return self._s[4573]! } + public var SettingsSearch_Synonyms_EditProfile_Title: String { return self._s[4574]! } + public var TwoFactorSetup_Done_Title: String { return self._s[4575]! } + public var Calls_RatingFeedback: String { return self._s[4576]! } + public var SettingsSearch_Synonyms_Notifications_ChannelNotificationsPreview: String { return self._s[4577]! } + public var AutoDownloadSettings_ResetSettings: String { return self._s[4580]! } + public var Watch_Compose_Send: String { return self._s[4581]! } + public var PasscodeSettings_ChangePasscode: String { return self._s[4582]! } + public var WebSearch_RecentSectionClear: String { return self._s[4583]! } public func Contacts_AccessDeniedHelpPortrait(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4577]!, self._r[4577]!, [_0]) + return formatWithArgumentRanges(self._s[4584]!, self._r[4584]!, [_0]) } - public var WallpaperSearch_ColorTeal: String { return self._s[4578]! } - public var Wallpaper_SetCustomBackgroundInfo: String { return self._s[4579]! } - public var Permissions_ContactsTitle_v0: String { return self._s[4580]! } - public var Checkout_PasswordEntry_Pay: String { return self._s[4582]! } - public var Settings_SavedMessages: String { return self._s[4583]! } - public var TwoStepAuth_ReEnterPasswordDescription: String { return self._s[4584]! } - public var Month_ShortMarch: String { return self._s[4585]! } - public var Message_Location: String { return self._s[4586]! } + public var WallpaperSearch_ColorTeal: String { return self._s[4585]! } + public var Wallpaper_SetCustomBackgroundInfo: String { return self._s[4586]! } + public var Permissions_ContactsTitle_v0: String { return self._s[4587]! } + public var Checkout_PasswordEntry_Pay: String { return self._s[4589]! } + public var Settings_SavedMessages: String { return self._s[4590]! } + public var TwoStepAuth_ReEnterPasswordDescription: String { return self._s[4591]! } + public var Month_ShortMarch: String { return self._s[4592]! } + public var Message_Location: String { return self._s[4593]! } public func PUSH_MESSAGE_GIF(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4587]!, self._r[4587]!, [_1]) + return formatWithArgumentRanges(self._s[4594]!, self._r[4594]!, [_1]) } public func Notification_CallTimeFormat(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4588]!, self._r[4588]!, [_1, _2]) + return formatWithArgumentRanges(self._s[4595]!, self._r[4595]!, [_1, _2]) } - public var VoiceOver_Chat_VoiceMessage: String { return self._s[4590]! } + public var VoiceOver_Chat_VoiceMessage: String { return self._s[4597]! } public func Channel_AdminLog_MessageChangedUnlinkedChannel(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4591]!, self._r[4591]!, [_1, _2]) + return formatWithArgumentRanges(self._s[4598]!, self._r[4598]!, [_1, _2]) } - public var GroupPermission_NoSendMedia: String { return self._s[4592]! } - public var Conversation_ClousStorageInfo_Description2: String { return self._s[4593]! } - public var SharedMedia_CategoryDocs: String { return self._s[4594]! } - public var Appearance_RemoveThemeConfirmation: String { return self._s[4595]! } - public var Paint_Framed: String { return self._s[4596]! } - public var Channel_EditAdmin_PermissionAddAdmins: String { return self._s[4597]! } - public var Passport_Identity_DoesNotExpire: String { return self._s[4598]! } + public var GroupPermission_NoSendMedia: String { return self._s[4599]! } + public var Conversation_ClousStorageInfo_Description2: String { return self._s[4600]! } + public var SharedMedia_CategoryDocs: String { return self._s[4601]! } + public var Appearance_RemoveThemeConfirmation: String { return self._s[4602]! } + public var Paint_Framed: String { return self._s[4603]! } + public var Channel_EditAdmin_PermissionAddAdmins: String { return self._s[4604]! } + public var Passport_Identity_DoesNotExpire: String { return self._s[4605]! } public func ChatImport_SelectionConfirmationUserWithTitle(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4599]!, self._r[4599]!, [_1, _2]) + return formatWithArgumentRanges(self._s[4606]!, self._r[4606]!, [_1, _2]) } - public var Channel_SignMessages: String { return self._s[4600]! } - public var Contacts_AccessDeniedHelpON: String { return self._s[4601]! } - public var Conversation_ContextMenuStickerPackInfo: String { return self._s[4602]! } + public var Channel_SignMessages: String { return self._s[4607]! } + public var Contacts_AccessDeniedHelpON: String { return self._s[4608]! } + public var Conversation_ContextMenuStickerPackInfo: String { return self._s[4609]! } public func PUSH_CHAT_LEFT(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4603]!, self._r[4603]!, [_1, _2]) + return formatWithArgumentRanges(self._s[4610]!, self._r[4610]!, [_1, _2]) } - public var InviteLink_Create_TimeLimitNoLimit: String { return self._s[4604]! } - public var GroupInfo_UpgradeButton: String { return self._s[4605]! } - public var Channel_EditAdmin_PermissionInviteMembers: String { return self._s[4606]! } - public var AutoDownloadSettings_Files: String { return self._s[4607]! } + public var InviteLink_Create_TimeLimitNoLimit: String { return self._s[4611]! } + public var GroupInfo_UpgradeButton: String { return self._s[4612]! } + public var Channel_EditAdmin_PermissionInviteMembers: String { return self._s[4613]! } + public var AutoDownloadSettings_Files: String { return self._s[4614]! } public func Notification_ChangedGroupName(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4608]!, self._r[4608]!, [_0, _1]) + return formatWithArgumentRanges(self._s[4615]!, self._r[4615]!, [_0, _1]) } - public var Login_SendCodeViaSms: String { return self._s[4610]! } - public var Update_UpdateApp: String { return self._s[4611]! } - public var Channel_Setup_TypePublic: String { return self._s[4612]! } - public var Watch_Compose_CreateMessage: String { return self._s[4613]! } + public var Login_SendCodeViaSms: String { return self._s[4617]! } + public var Update_UpdateApp: String { return self._s[4618]! } + public var Channel_Setup_TypePublic: String { return self._s[4619]! } + public var Watch_Compose_CreateMessage: String { return self._s[4620]! } public func PUSH_CHAT_MESSAGE_VIDEOS(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4614]!, self._r[4614]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[4621]!, self._r[4621]!, [_1, _2, _3]) } - public var StickerPacksSettings_ManagingHelp: String { return self._s[4615]! } - public var VoiceOver_Chat_Video: String { return self._s[4616]! } - public var Forward_ChannelReadOnly: String { return self._s[4617]! } - public var StickerPack_HideStickers: String { return self._s[4618]! } - public var ChatListFolder_NameContacts: String { return self._s[4619]! } - public var Profile_BotInfo: String { return self._s[4620]! } - public var Document_TargetConfirmationFormat: String { return self._s[4621]! } - public var GroupInfo_InviteByLink: String { return self._s[4622]! } - public var Channel_AdminLog_BanSendStickersAndGifs: String { return self._s[4623]! } - public var Watch_Stickers_RecentPlaceholder: String { return self._s[4624]! } - public var Broadcast_AdminLog_EmptyText: String { return self._s[4625]! } - public var Passport_NotLoggedInMessage: String { return self._s[4626]! } - public var Conversation_StopQuizConfirmation: String { return self._s[4627]! } - public var Checkout_PaymentMethod: String { return self._s[4628]! } - public var ChatList_ArchivedChatsTitle: String { return self._s[4632]! } - public var TwoStepAuth_SetupPasswordConfirmFailed: String { return self._s[4633]! } - public var VoiceOver_Chat_RecordPreviewVoiceMessage: String { return self._s[4634]! } - public var PrivacyLastSeenSettings_GroupsAndChannelsHelp: String { return self._s[4635]! } - public var SettingsSearch_Synonyms_Privacy_Data_ContactsReset: String { return self._s[4636]! } - public var Camera_Title: String { return self._s[4637]! } - public var Map_Directions: String { return self._s[4638]! } - public var Stats_MessagePublicForwardsTitle: String { return self._s[4640]! } - public var Privacy_ProfilePhoto_WhoCanSeeMyPhoto: String { return self._s[4641]! } - public var Profile_EncryptionKey: String { return self._s[4642]! } + public var StickerPacksSettings_ManagingHelp: String { return self._s[4622]! } + public var VoiceOver_Chat_Video: String { return self._s[4623]! } + public var Forward_ChannelReadOnly: String { return self._s[4624]! } + public var StickerPack_HideStickers: String { return self._s[4625]! } + public var ChatListFolder_NameContacts: String { return self._s[4626]! } + public var Profile_BotInfo: String { return self._s[4627]! } + public var Document_TargetConfirmationFormat: String { return self._s[4628]! } + public var GroupInfo_InviteByLink: String { return self._s[4629]! } + public var Channel_AdminLog_BanSendStickersAndGifs: String { return self._s[4630]! } + public var Watch_Stickers_RecentPlaceholder: String { return self._s[4631]! } + public var Broadcast_AdminLog_EmptyText: String { return self._s[4632]! } + public var Passport_NotLoggedInMessage: String { return self._s[4633]! } + public var Conversation_StopQuizConfirmation: String { return self._s[4634]! } + public var Checkout_PaymentMethod: String { return self._s[4635]! } + public var ChatList_ArchivedChatsTitle: String { return self._s[4639]! } + public var TwoStepAuth_SetupPasswordConfirmFailed: String { return self._s[4640]! } + public var VoiceOver_Chat_RecordPreviewVoiceMessage: String { return self._s[4641]! } + public var PrivacyLastSeenSettings_GroupsAndChannelsHelp: String { return self._s[4642]! } + public var SettingsSearch_Synonyms_Privacy_Data_ContactsReset: String { return self._s[4643]! } + public var Camera_Title: String { return self._s[4644]! } + public var Map_Directions: String { return self._s[4645]! } + public var Stats_MessagePublicForwardsTitle: String { return self._s[4647]! } + public var Privacy_ProfilePhoto_WhoCanSeeMyPhoto: String { return self._s[4648]! } + public var Profile_EncryptionKey: String { return self._s[4649]! } public func LOCAL_CHAT_MESSAGE_FWDS(_ _1: String, _ _2: Int) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4643]!, self._r[4643]!, [_1, "\(_2)"]) + return formatWithArgumentRanges(self._s[4650]!, self._r[4650]!, [_1, "\(_2)"]) } public func Compatibility_SecretMediaVersionTooLow(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4644]!, self._r[4644]!, [_0, _1]) + return formatWithArgumentRanges(self._s[4651]!, self._r[4651]!, [_0, _1]) } - public var Passport_Identity_TypePassport: String { return self._s[4645]! } - public var CreatePoll_QuizOptionsHeader: String { return self._s[4647]! } - public var Common_No: String { return self._s[4648]! } - public var Conversation_SendMessage_ScheduleMessage: String { return self._s[4649]! } - public var SettingsSearch_Synonyms_Privacy_LastSeen: String { return self._s[4650]! } - public var Settings_AboutEmpty: String { return self._s[4651]! } - public var TwoStepAuth_FloodError: String { return self._s[4653]! } - public var SettingsSearch_Synonyms_Appearance_TextSize: String { return self._s[4654]! } + public var Passport_Identity_TypePassport: String { return self._s[4652]! } + public var CreatePoll_QuizOptionsHeader: String { return self._s[4654]! } + public var Common_No: String { return self._s[4655]! } + public var Conversation_SendMessage_ScheduleMessage: String { return self._s[4656]! } + public var SettingsSearch_Synonyms_Privacy_LastSeen: String { return self._s[4657]! } + public var Settings_AboutEmpty: String { return self._s[4658]! } + public var TwoStepAuth_FloodError: String { return self._s[4660]! } + public var SettingsSearch_Synonyms_Appearance_TextSize: String { return self._s[4661]! } public func Channel_AdminLog_MessageUnkickedName(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4656]!, self._r[4656]!, [_1]) + return formatWithArgumentRanges(self._s[4663]!, self._r[4663]!, [_1]) } - public var Conversation_Edit: String { return self._s[4659]! } - public var CheckoutInfo_SaveInfo: String { return self._s[4660]! } - public var VoiceOver_Chat_AnonymousPoll: String { return self._s[4661]! } - public var Call_CameraTooltip: String { return self._s[4663]! } - public var InstantPage_FeedbackButtonShort: String { return self._s[4664]! } - public var Contacts_InviteToTelegram: String { return self._s[4665]! } - public var Notifications_ResetAllNotifications: String { return self._s[4666]! } - public var Calls_NewCall: String { return self._s[4667]! } - public var VoiceOver_Chat_Music: String { return self._s[4670]! } - public var Channel_Members_AddAdminErrorNotAMember: String { return self._s[4671]! } - public var Channel_Edit_AboutItem: String { return self._s[4672]! } - public var Message_VideoExpired: String { return self._s[4673]! } - public var Passport_Address_TypeTemporaryRegistrationUploadScan: String { return self._s[4674]! } + public var Conversation_Edit: String { return self._s[4666]! } + public var CheckoutInfo_SaveInfo: String { return self._s[4667]! } + public var VoiceOver_Chat_AnonymousPoll: String { return self._s[4668]! } + public var Call_CameraTooltip: String { return self._s[4670]! } + public var InstantPage_FeedbackButtonShort: String { return self._s[4671]! } + public var Contacts_InviteToTelegram: String { return self._s[4672]! } + public var Notifications_ResetAllNotifications: String { return self._s[4673]! } + public var Calls_NewCall: String { return self._s[4674]! } + public var VoiceOver_Chat_Music: String { return self._s[4677]! } + public var Channel_Members_AddAdminErrorNotAMember: String { return self._s[4678]! } + public var Channel_Edit_AboutItem: String { return self._s[4679]! } + public var Message_VideoExpired: String { return self._s[4680]! } + public var Passport_Address_TypeTemporaryRegistrationUploadScan: String { return self._s[4681]! } public func PUSH_CHAT_RETURNED(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4675]!, self._r[4675]!, [_1, _2]) + return formatWithArgumentRanges(self._s[4682]!, self._r[4682]!, [_1, _2]) } - public var NotificationsSound_Input: String { return self._s[4677]! } - public var Notifications_ClassicTones: String { return self._s[4678]! } - public var Conversation_StatusTyping: String { return self._s[4679]! } - public var Checkout_ErrorProviderAccountInvalid: String { return self._s[4680]! } - public var ChatSettings_AutoDownloadSettings_Delimeter: String { return self._s[4681]! } - public var SettingsSearch_Synonyms_Notifications_BadgeIncludeMutedChats: String { return self._s[4682]! } - public var Conversation_MessageLeaveComment: String { return self._s[4683]! } - public var UserInfo_TapToCall: String { return self._s[4684]! } - public var EnterPasscode_EnterNewPasscodeNew: String { return self._s[4685]! } - public var Conversation_ClearAll: String { return self._s[4687]! } - public var UserInfo_NotificationsDefault: String { return self._s[4688]! } - public var Location_ProximityGroupTip: String { return self._s[4689]! } - public var Map_ChooseAPlace: String { return self._s[4690]! } - public var GroupInfo_AddParticipantTitle: String { return self._s[4692]! } - public var ChatList_PeerTypeNonContact: String { return self._s[4693]! } - public var Conversation_SlideToCancel: String { return self._s[4694]! } - public var Month_ShortJuly: String { return self._s[4695]! } - public var SocksProxySetup_ProxyType: String { return self._s[4696]! } + public var NotificationsSound_Input: String { return self._s[4684]! } + public var Notifications_ClassicTones: String { return self._s[4685]! } + public var Conversation_StatusTyping: String { return self._s[4686]! } + public var Checkout_ErrorProviderAccountInvalid: String { return self._s[4687]! } + public var ChatSettings_AutoDownloadSettings_Delimeter: String { return self._s[4688]! } + public var SettingsSearch_Synonyms_Notifications_BadgeIncludeMutedChats: String { return self._s[4689]! } + public var Conversation_MessageLeaveComment: String { return self._s[4690]! } + public var UserInfo_TapToCall: String { return self._s[4691]! } + public var EnterPasscode_EnterNewPasscodeNew: String { return self._s[4692]! } + public var Conversation_ClearAll: String { return self._s[4694]! } + public var UserInfo_NotificationsDefault: String { return self._s[4695]! } + public var Location_ProximityGroupTip: String { return self._s[4696]! } + public var Map_ChooseAPlace: String { return self._s[4697]! } + public var GroupInfo_AddParticipantTitle: String { return self._s[4699]! } + public var ChatList_PeerTypeNonContact: String { return self._s[4700]! } + public var Conversation_SlideToCancel: String { return self._s[4701]! } + public var Month_ShortJuly: String { return self._s[4702]! } + public var SocksProxySetup_ProxyType: String { return self._s[4703]! } public func ChatList_DeleteChatConfirmation(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4697]!, self._r[4697]!, [_0]) + return formatWithArgumentRanges(self._s[4704]!, self._r[4704]!, [_0]) } - public var ChatList_EditFolders: String { return self._s[4698]! } - public var TwoStepAuth_SetPasswordHelp: String { return self._s[4699]! } - public var ScheduledMessages_RemindersTitle: String { return self._s[4701]! } + public var ChatList_EditFolders: String { return self._s[4705]! } + public var TwoStepAuth_SetPasswordHelp: String { return self._s[4706]! } + public var ScheduledMessages_RemindersTitle: String { return self._s[4708]! } public func GroupPermission_ApplyAlertText(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4702]!, self._r[4702]!, [_0]) + return formatWithArgumentRanges(self._s[4709]!, self._r[4709]!, [_0]) } - public var Permissions_PeopleNearbyTitle_v0: String { return self._s[4703]! } - public var Your_cards_expiration_year_is_invalid: String { return self._s[4704]! } - public var UserInfo_ShareMyContactInfo: String { return self._s[4706]! } - public var Passport_DeleteAddress: String { return self._s[4708]! } - public var Passport_DeletePassportConfirmation: String { return self._s[4709]! } - public var Passport_Identity_ReverseSide: String { return self._s[4710]! } - public var CheckoutInfo_ErrorEmailInvalid: String { return self._s[4711]! } - public var Login_InfoLastNamePlaceholder: String { return self._s[4712]! } - public var InviteLink_CreatedBy: String { return self._s[4713]! } - public var Passport_FieldAddress: String { return self._s[4714]! } - public var SettingsSearch_Synonyms_Calls_Title: String { return self._s[4715]! } - public var Passport_Identity_ResidenceCountryPlaceholder: String { return self._s[4718]! } - public var VoiceChat_Panel_TapToJoin: String { return self._s[4719]! } - public var Map_Home: String { return self._s[4720]! } - public var PollResults_Title: String { return self._s[4722]! } + public var Permissions_PeopleNearbyTitle_v0: String { return self._s[4710]! } + public var Your_cards_expiration_year_is_invalid: String { return self._s[4711]! } + public var UserInfo_ShareMyContactInfo: String { return self._s[4713]! } + public var Passport_DeleteAddress: String { return self._s[4715]! } + public var Passport_DeletePassportConfirmation: String { return self._s[4716]! } + public var Passport_Identity_ReverseSide: String { return self._s[4717]! } + public var CheckoutInfo_ErrorEmailInvalid: String { return self._s[4718]! } + public var Login_InfoLastNamePlaceholder: String { return self._s[4719]! } + public var InviteLink_CreatedBy: String { return self._s[4720]! } + public var Passport_FieldAddress: String { return self._s[4721]! } + public var SettingsSearch_Synonyms_Calls_Title: String { return self._s[4722]! } + public var Passport_Identity_ResidenceCountryPlaceholder: String { return self._s[4725]! } + public var VoiceChat_Panel_TapToJoin: String { return self._s[4726]! } + public var Map_Home: String { return self._s[4727]! } + public var PollResults_Title: String { return self._s[4729]! } public func InviteLink_OtherPermanentLinkInfo(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[4723]!, self._r[4723]!, [_1, _2]) + return formatWithArgumentRanges(self._s[4730]!, self._r[4730]!, [_1, _2]) } - public var ArchivedChats_IntroText2: String { return self._s[4725]! } - public var PasscodeSettings_SimplePasscodeHelp: String { return self._s[4726]! } - public var VoiceOver_Chat_ContactPhoneNumber: String { return self._s[4727]! } - public var VoiceChat_Muted: String { return self._s[4729]! } - public var CallFeedback_ReasonSilentRemote: String { return self._s[4730]! } - public var Passport_Identity_AddPersonalDetails: String { return self._s[4731]! } - public var Group_Info_AdminLog: String { return self._s[4733]! } - public var ChatSettings_AutoPlayTitle: String { return self._s[4734]! } - public var Appearance_Animations: String { return self._s[4735]! } - public var Appearance_TextSizeSetting: String { return self._s[4736]! } - public func MessageTimer_Years(_ value: Int32) -> String { + public var ArchivedChats_IntroText2: String { return self._s[4732]! } + public var PasscodeSettings_SimplePasscodeHelp: String { return self._s[4733]! } + public var VoiceOver_Chat_ContactPhoneNumber: String { return self._s[4734]! } + public var VoiceChat_Muted: String { return self._s[4736]! } + public var CallFeedback_ReasonSilentRemote: String { return self._s[4737]! } + public var Passport_Identity_AddPersonalDetails: String { return self._s[4738]! } + public var Group_Info_AdminLog: String { return self._s[4740]! } + public var ChatSettings_AutoPlayTitle: String { return self._s[4741]! } + public var Appearance_Animations: String { return self._s[4742]! } + public var Appearance_TextSizeSetting: String { return self._s[4743]! } + public func LastSeen_MinutesAgo(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) return String(format: self._ps[0 * 6 + Int(form.rawValue)]!, stringValue) } - public func PUSH_CHAT_MESSAGE_ROUNDS(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { - let form = getPluralizationForm(self.lc, selector) - return String(format: self._ps[1 * 6 + Int(form.rawValue)]!, _2, _1, _3) - } - public func Notifications_ExceptionMuteExpires_Days(_ value: Int32) -> String { + public func GroupInfo_ShowMoreMembers(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[2 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Conversation_ContextMenuSelectAll(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[3 * 6 + Int(form.rawValue)]!, stringValue) - } - public func GroupInfo_ParticipantCount(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[4 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PeopleNearby_ShowMorePeople(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[5 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MessageTimer_Months(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[6 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ServiceMessage_GameScoreSelfExtended(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[7 * 6 + Int(form.rawValue)]!, stringValue) - } - public func AttachmentMenu_SendVideo(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[8 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ChatList_MessagePhotos(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[9 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Call_ShortMinutes(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[10 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_CHANNEL_MESSAGE_PHOTOS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { - let form = getPluralizationForm(self.lc, selector) - return String(format: self._ps[11 * 6 + Int(form.rawValue)]!, _1, _2) + return String(format: self._ps[1 * 6 + Int(form.rawValue)]!, stringValue) } public func Conversation_StatusSubscribers(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[12 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ChatList_DeletedChats(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[13 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MessageTimer_ShortHours(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[14 * 6 + Int(form.rawValue)]!, stringValue) - } - public func OldChannels_InactiveMonth(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[15 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ChatList_MessageMusic(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[16 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ChatList_Search_Messages(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[17 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MessageTimer_Weeks(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[18 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ForwardedVideoMessages(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[19 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Stats_MessageViews(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[20 * 6 + Int(form.rawValue)]!, stringValue) - } - public func OldChannels_InactiveWeek(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[21 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_CHAT_MESSAGES(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { - let form = getPluralizationForm(self.lc, selector) - return String(format: self._ps[22 * 6 + Int(form.rawValue)]!, _2, _1, _3) - } - public func PasscodeSettings_FailedAttempts(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[23 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Map_ETAMinutes(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[24 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Stats_GroupTopAdminBans(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[25 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ForwardedAuthorsOthers(_ selector: Int32, _ _0: String, _ _1: String) -> String { - let form = getPluralizationForm(self.lc, selector) - return String(format: self._ps[26 * 6 + Int(form.rawValue)]!, _0, _1) - } - public func Notification_GameScoreExtended(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[27 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Stats_GroupTopAdminDeletions(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[28 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ServiceMessage_GameScoreSimple(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[29 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Contacts_InviteContacts(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[30 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PrivacyLastSeenSettings_AddUsers(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[31 * 6 + Int(form.rawValue)]!, stringValue) - } - public func VoiceOver_Chat_ContactPhoneNumberCount(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[32 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[2 * 6 + Int(form.rawValue)]!, stringValue) } public func InviteLink_PeopleCanJoin(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[33 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_CHANNEL_MESSAGE_DOCS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { - let form = getPluralizationForm(self.lc, selector) - return String(format: self._ps[34 * 6 + Int(form.rawValue)]!, _1, _2) - } - public func InviteLink_PeopleRemaining(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[35 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Media_ShareVideo(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[36 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Theme_UsersCount(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[37 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ForwardedVideos(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[38 * 6 + Int(form.rawValue)]!, stringValue) - } - public func DialogList_LiveLocationChatsCount(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[39 * 6 + Int(form.rawValue)]!, stringValue) - } - public func StickerPack_StickerCount(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[40 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Notification_GameScoreSelfSimple(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[41 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_MESSAGE_FWDS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { - let form = getPluralizationForm(self.lc, selector) - return String(format: self._ps[42 * 6 + Int(form.rawValue)]!, _1, _2) - } - public func PUSH_CHANNEL_MESSAGE_FWDS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { - let form = getPluralizationForm(self.lc, selector) - return String(format: self._ps[43 * 6 + Int(form.rawValue)]!, _1, _2) - } - public func Stats_GroupTopInviterInvites(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[44 * 6 + Int(form.rawValue)]!, stringValue) - } - public func CreatePoll_AddMoreOptions(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[45 * 6 + Int(form.rawValue)]!, stringValue) - } - public func VoiceChat_Panel_Members(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[46 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Stats_GroupShowMoreTopPosters(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[47 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Chat_TitlePinnedMessages(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[48 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Stats_GroupTopPosterChars(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[49 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Call_Days(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[50 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Stats_GroupShowMoreTopAdmins(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[51 * 6 + Int(form.rawValue)]!, stringValue) - } - public func SharedMedia_Video(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[52 * 6 + Int(form.rawValue)]!, stringValue) - } - public func VoiceOver_Chat_MessagesSelected(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[53 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Notification_GameScoreSelfExtended(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[54 * 6 + Int(form.rawValue)]!, stringValue) - } - public func InstantPage_Views(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[55 * 6 + Int(form.rawValue)]!, stringValue) - } - public func VoiceOver_Chat_UnreadMessages(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[56 * 6 + Int(form.rawValue)]!, stringValue) - } - public func AttachmentMenu_SendItem(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[57 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Conversation_LiveLocationMembersCount(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[58 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Call_Hours(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[59 * 6 + Int(form.rawValue)]!, stringValue) - } - public func LastSeen_MinutesAgo(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[60 * 6 + Int(form.rawValue)]!, stringValue) - } - public func OldChannels_GroupFormat(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[61 * 6 + Int(form.rawValue)]!, stringValue) - } - public func SharedMedia_Link(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[62 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Conversation_StatusOnline(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[63 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Forward_ConfirmMultipleFiles(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[64 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Stats_GroupShowMoreTopInviters(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[65 * 6 + Int(form.rawValue)]!, stringValue) - } - public func SharedMedia_DeleteItemsConfirmation(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[66 * 6 + Int(form.rawValue)]!, stringValue) - } - public func UserCount(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[67 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_CHAT_MESSAGE_VIDEOS(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { - let form = getPluralizationForm(self.lc, selector) - return String(format: self._ps[68 * 6 + Int(form.rawValue)]!, _2, _1, _3) - } - public func LiveLocationUpdated_MinutesAgo(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[69 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Call_Minutes(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[70 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_CHANNEL_MESSAGE_ROUNDS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { - let form = getPluralizationForm(self.lc, selector) - return String(format: self._ps[71 * 6 + Int(form.rawValue)]!, _1, _2) - } - public func Conversation_TitleReplies(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[72 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Passport_Scans(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[73 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MessageTimer_Seconds(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[74 * 6 + Int(form.rawValue)]!, stringValue) - } - public func OldChannels_InactiveYear(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[75 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Conversation_AutoremoveRemainingDays(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[76 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_CHAT_MESSAGE_DOCS_FIX1(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { - let form = getPluralizationForm(self.lc, selector) - return String(format: self._ps[77 * 6 + Int(form.rawValue)]!, _2, _1, _3) - } - public func MuteExpires_Hours(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[78 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Chat_MessagesUnpinned(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[79 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ForwardedMessages(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[80 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_CHAT_MESSAGE_FWDS(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { - let form = getPluralizationForm(self.lc, selector) - return String(format: self._ps[81 * 6 + Int(form.rawValue)]!, _2, _1, _3) - } - public func Media_SharePhoto(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[82 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_MESSAGE_ROUNDS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { - let form = getPluralizationForm(self.lc, selector) - return String(format: self._ps[83 * 6 + Int(form.rawValue)]!, _1, _2) - } - public func InviteLink_InviteLinks(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[84 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Watch_UserInfo_Mute(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[85 * 6 + Int(form.rawValue)]!, stringValue) - } - public func SharedMedia_File(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[86 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_CHANNEL_MESSAGE_VIDEOS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { - let form = getPluralizationForm(self.lc, selector) - return String(format: self._ps[87 * 6 + Int(form.rawValue)]!, _1, _2) - } - public func ForwardedGifs(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[88 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[3 * 6 + Int(form.rawValue)]!, stringValue) } public func Conversation_MessageViewComments(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[89 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[4 * 6 + Int(form.rawValue)]!, stringValue) } - public func MessageTimer_Hours(_ value: Int32) -> String { + public func Watch_UserInfo_Mute(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[90 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[5 * 6 + Int(form.rawValue)]!, stringValue) } - public func SharedMedia_Photo(_ value: Int32) -> String { + public func VoiceChat_Panel_Members(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[91 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[6 * 6 + Int(form.rawValue)]!, stringValue) } - public func Conversation_StatusMembers(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[92 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ChatList_SelectedChats(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[93 * 6 + Int(form.rawValue)]!, stringValue) - } - public func LastSeen_HoursAgo(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[94 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MessageTimer_Minutes(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[95 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MessageTimer_ShortDays(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[96 * 6 + Int(form.rawValue)]!, stringValue) + public func PUSH_CHANNEL_MESSAGE_PHOTOS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { + let form = getPluralizationForm(self.lc, selector) + return String(format: self._ps[7 * 6 + Int(form.rawValue)]!, _1, _2) } public func MessageTimer_ShortMinutes(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[97 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MessagePoll_QuizCount(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[98 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Chat_DeleteMessagesConfirmation(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[99 * 6 + Int(form.rawValue)]!, stringValue) - } - public func VoiceOver_Chat_PollOptionCount(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[100 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Notifications_ExceptionMuteExpires_Minutes(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[101 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Stats_GroupTopPosterMessages(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[102 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_MESSAGE_PHOTOS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { - let form = getPluralizationForm(self.lc, selector) - return String(format: self._ps[103 * 6 + Int(form.rawValue)]!, _1, _2) - } - public func Notifications_Exceptions(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[104 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Notification_GameScoreSimple(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[105 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Conversation_TitleComments(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[106 * 6 + Int(form.rawValue)]!, stringValue) - } - public func StickerPack_AddMaskCount(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[107 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Call_Seconds(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[108 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MessagePoll_VotedCount(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[109 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_MESSAGE_DOCS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { - let form = getPluralizationForm(self.lc, selector) - return String(format: self._ps[110 * 6 + Int(form.rawValue)]!, _1, _2) - } - public func MessageTimer_ShortWeeks(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[111 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Stats_MessageForwards(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[112 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ForwardedLocations(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[113 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Media_ShareItem(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[114 * 6 + Int(form.rawValue)]!, stringValue) - } - public func StickerPack_AddStickerCount(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[115 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Conversation_ContextViewReplies(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[116 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_MESSAGE_VIDEOS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { - let form = getPluralizationForm(self.lc, selector) - return String(format: self._ps[117 * 6 + Int(form.rawValue)]!, _1, _2) - } - public func LiveLocation_MenuChatsCount(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[118 * 6 + Int(form.rawValue)]!, stringValue) - } - public func InviteLink_PeopleJoined(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[119 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[8 * 6 + Int(form.rawValue)]!, stringValue) } public func StickerPack_RemoveMaskCount(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[120 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[9 * 6 + Int(form.rawValue)]!, stringValue) } - public func Stats_GroupTopAdminKicks(_ value: Int32) -> String { + public func Contacts_InviteContacts(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[121 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ForwardedPolls(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[122 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Contacts_ImportersCount(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[123 * 6 + Int(form.rawValue)]!, stringValue) - } - public func AttachmentMenu_SendGif(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[124 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Map_ETAHours(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[125 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ChatList_DeleteConfirmation(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[126 * 6 + Int(form.rawValue)]!, stringValue) - } - public func OldChannels_Leave(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[127 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Watch_LastSeen_MinutesAgo(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[128 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_CHAT_MESSAGE_PHOTOS(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { - let form = getPluralizationForm(self.lc, selector) - return String(format: self._ps[129 * 6 + Int(form.rawValue)]!, _2, _1, _3) - } - public func MuteFor_Hours(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[130 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ForwardedContacts(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[131 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MuteFor_Days(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[132 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MuteExpires_Days(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[133 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Watch_LastSeen_HoursAgo(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[134 * 6 + Int(form.rawValue)]!, stringValue) - } - public func QuickSend_Photos(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[135 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ForwardedAudios(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[136 * 6 + Int(form.rawValue)]!, stringValue) - } - public func StickerPack_RemoveStickerCount(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[137 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ForwardedFiles(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[138 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MessageTimer_ShortSeconds(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[139 * 6 + Int(form.rawValue)]!, stringValue) - } - public func GroupInfo_ShowMoreMembers(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[140 * 6 + Int(form.rawValue)]!, stringValue) - } - public func AttachmentMenu_SendPhoto(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[141 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Call_ShortSeconds(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[142 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[10 * 6 + Int(form.rawValue)]!, stringValue) } public func VoiceOver_Chat_PollVotes(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[143 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[11 * 6 + Int(form.rawValue)]!, stringValue) } - public func Notifications_ExceptionMuteExpires_Hours(_ value: Int32) -> String { + public func SharedMedia_DeleteItemsConfirmation(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[144 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[12 * 6 + Int(form.rawValue)]!, stringValue) } - public func Wallpaper_DeleteConfirmation(_ value: Int32) -> String { + public func MuteFor_Days(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[145 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ChatList_MessageFiles(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[146 * 6 + Int(form.rawValue)]!, stringValue) - } - public func VoiceOver_Chat_ContactEmailCount(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[147 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ChatList_MessageVideos(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[148 * 6 + Int(form.rawValue)]!, stringValue) - } - public func InviteLink_PeopleJoinedShort(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[149 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_MESSAGES(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { - let form = getPluralizationForm(self.lc, selector) - return String(format: self._ps[150 * 6 + Int(form.rawValue)]!, _1, _2) - } - public func ForwardedStickers(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[151 * 6 + Int(form.rawValue)]!, stringValue) - } - public func InviteText_ContactsCountText(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[152 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[13 * 6 + Int(form.rawValue)]!, stringValue) } public func ChatListFilter_ShowMoreChats(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[153 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[14 * 6 + Int(form.rawValue)]!, stringValue) } - public func Invitation_Members(_ value: Int32) -> String { - let form = getPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[154 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_CHANNEL_MESSAGES(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { + public func PUSH_MESSAGE_ROUNDS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { let form = getPluralizationForm(self.lc, selector) - return String(format: self._ps[155 * 6 + Int(form.rawValue)]!, _1, _2) + return String(format: self._ps[15 * 6 + Int(form.rawValue)]!, _1, _2) } - public func PollResults_ShowMore(_ value: Int32) -> String { + public func Stats_GroupTopPosterChars(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[156 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[16 * 6 + Int(form.rawValue)]!, stringValue) } - public func ForwardedPhotos(_ value: Int32) -> String { + public func PUSH_MESSAGES(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { + let form = getPluralizationForm(self.lc, selector) + return String(format: self._ps[17 * 6 + Int(form.rawValue)]!, _1, _2) + } + public func ChatList_DeleteConfirmation(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[157 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[18 * 6 + Int(form.rawValue)]!, stringValue) } - public func SharedMedia_Generic(_ value: Int32) -> String { + public func Stats_GroupTopAdminBans(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[158 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[19 * 6 + Int(form.rawValue)]!, stringValue) } - public func MuteExpires_Minutes(_ value: Int32) -> String { + public func Contacts_ImportersCount(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[159 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[20 * 6 + Int(form.rawValue)]!, stringValue) } - public func VoiceChat_Status_Members(_ value: Int32) -> String { + public func Call_Seconds(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[160 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[21 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Stats_GroupShowMoreTopPosters(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[22 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_CHANNEL_MESSAGE_ROUNDS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { + let form = getPluralizationForm(self.lc, selector) + return String(format: self._ps[23 * 6 + Int(form.rawValue)]!, _1, _2) + } + public func MessageTimer_ShortWeeks(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[24 * 6 + Int(form.rawValue)]!, stringValue) + } + public func VoiceOver_Chat_ContactEmailCount(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[25 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Conversation_AutoremoveRemainingDays(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[26 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Notification_GameScoreSelfExtended(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[27 * 6 + Int(form.rawValue)]!, stringValue) + } + public func VoiceOver_Chat_ContactPhoneNumberCount(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[28 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Stats_MessageViews(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[29 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_CHAT_MESSAGE_VIDEOS(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { + let form = getPluralizationForm(self.lc, selector) + return String(format: self._ps[30 * 6 + Int(form.rawValue)]!, _2, _1, _3) + } + public func Call_ShortMinutes(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[31 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Media_ShareItem(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[32 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_CHAT_MESSAGE_FWDS(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { + let form = getPluralizationForm(self.lc, selector) + return String(format: self._ps[33 * 6 + Int(form.rawValue)]!, _2, _1, _3) + } + public func ForwardedGifs(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[34 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PrivacyLastSeenSettings_AddUsers(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[35 * 6 + Int(form.rawValue)]!, stringValue) + } + public func LiveLocationUpdated_MinutesAgo(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[36 * 6 + Int(form.rawValue)]!, stringValue) + } + public func AttachmentMenu_SendItem(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[37 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MessagePoll_QuizCount(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[38 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_CHAT_MESSAGES(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { + let form = getPluralizationForm(self.lc, selector) + return String(format: self._ps[39 * 6 + Int(form.rawValue)]!, _2, _1, _3) + } + public func MessageTimer_ShortDays(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[40 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PeopleNearby_ShowMorePeople(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[41 * 6 + Int(form.rawValue)]!, stringValue) + } + public func VoiceOver_Chat_MessagesSelected(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[42 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ForwardedPolls(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[43 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Notifications_ExceptionMuteExpires_Days(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[44 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Conversation_LiveLocationMembersCount(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[45 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MessageTimer_Years(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[46 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ForwardedVideos(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[47 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MessageTimer_Minutes(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[48 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Stats_GroupTopInviterInvites(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[49 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Notifications_ExceptionMuteExpires_Hours(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[50 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ForwardedMessages(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[51 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ChatList_Search_Messages(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[52 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ChatList_MessageFiles(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[53 * 6 + Int(form.rawValue)]!, stringValue) + } + public func InviteText_ContactsCountText(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[54 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MessageTimer_ShortHours(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[55 * 6 + Int(form.rawValue)]!, stringValue) } public func MessageTimer_Days(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[161 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[56 * 6 + Int(form.rawValue)]!, stringValue) } - public func ServiceMessage_GameScoreExtended(_ value: Int32) -> String { + public func ForwardedVideoMessages(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[162 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[57 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Stats_MessageForwards(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[58 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PasscodeSettings_FailedAttempts(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[59 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Notifications_Exceptions(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[60 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Notification_GameScoreSimple(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[61 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MuteExpires_Minutes(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[62 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Conversation_TitleReplies(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[63 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ForwardedFiles(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[64 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Media_SharePhoto(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[65 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Conversation_StatusMembers(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[66 * 6 + Int(form.rawValue)]!, stringValue) } public func ServiceMessage_GameScoreSelfSimple(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[163 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[67 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Notifications_ExceptionMuteExpires_Minutes(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[68 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Conversation_ContextMenuSelectAll(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[69 * 6 + Int(form.rawValue)]!, stringValue) + } + public func LastSeen_HoursAgo(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[70 * 6 + Int(form.rawValue)]!, stringValue) + } + public func AttachmentMenu_SendPhoto(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[71 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MuteExpires_Hours(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[72 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Call_Hours(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[73 * 6 + Int(form.rawValue)]!, stringValue) + } + public func SharedMedia_Video(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[74 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Call_Minutes(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[75 * 6 + Int(form.rawValue)]!, stringValue) + } + public func CreatePoll_AddMoreOptions(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[76 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_CHAT_MESSAGE_ROUNDS(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { + let form = getPluralizationForm(self.lc, selector) + return String(format: self._ps[77 * 6 + Int(form.rawValue)]!, _2, _1, _3) + } + public func Chat_TitlePinnedMessages(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[78 * 6 + Int(form.rawValue)]!, stringValue) + } + public func StickerPack_StickerCount(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[79 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Conversation_TitleComments(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[80 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Watch_LastSeen_MinutesAgo(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[81 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_CHAT_MESSAGE_DOCS_FIX1(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { + let form = getPluralizationForm(self.lc, selector) + return String(format: self._ps[82 * 6 + Int(form.rawValue)]!, _2, _1, _3) + } + public func ServiceMessage_GameScoreSimple(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[83 * 6 + Int(form.rawValue)]!, stringValue) + } + public func VoiceChat_Status_Members(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[84 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Theme_UsersCount(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[85 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_CHAT_MESSAGE_PHOTOS(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { + let form = getPluralizationForm(self.lc, selector) + return String(format: self._ps[86 * 6 + Int(form.rawValue)]!, _2, _1, _3) + } + public func ChatList_MessagePhotos(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[87 * 6 + Int(form.rawValue)]!, stringValue) + } + public func OldChannels_InactiveYear(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[88 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Stats_GroupTopAdminKicks(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[89 * 6 + Int(form.rawValue)]!, stringValue) + } + public func SharedMedia_Generic(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[90 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MessageTimer_Hours(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[91 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ForwardedAudios(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[92 * 6 + Int(form.rawValue)]!, stringValue) + } + public func InviteLink_PeopleRemaining(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[93 * 6 + Int(form.rawValue)]!, stringValue) + } + public func InviteLink_PeopleJoined(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[94 * 6 + Int(form.rawValue)]!, stringValue) + } + public func VoiceOver_Chat_UnreadMessages(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[95 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Wallpaper_DeleteConfirmation(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[96 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ChatList_DeletedChats(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[97 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_CHANNEL_MESSAGE_DOCS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { + let form = getPluralizationForm(self.lc, selector) + return String(format: self._ps[98 * 6 + Int(form.rawValue)]!, _1, _2) + } + public func InstantPage_Views(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[99 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ForwardedPhotos(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[100 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Call_ShortSeconds(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[101 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ForwardedLocations(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[102 * 6 + Int(form.rawValue)]!, stringValue) + } + public func QuickSend_Photos(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[103 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Stats_GroupTopAdminDeletions(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[104 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Passport_Scans(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[105 * 6 + Int(form.rawValue)]!, stringValue) + } + public func SharedMedia_File(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[106 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ChatList_MessageMusic(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[107 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MessageTimer_Months(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[108 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Conversation_StatusOnline(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[109 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MuteFor_Hours(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[110 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Media_ShareVideo(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[111 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PollResults_ShowMore(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[112 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Call_Days(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[113 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_MESSAGE_PHOTOS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { + let form = getPluralizationForm(self.lc, selector) + return String(format: self._ps[114 * 6 + Int(form.rawValue)]!, _1, _2) + } + public func ServiceMessage_GameScoreExtended(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[115 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ForwardedAuthorsOthers(_ selector: Int32, _ _0: String, _ _1: String) -> String { + let form = getPluralizationForm(self.lc, selector) + return String(format: self._ps[116 * 6 + Int(form.rawValue)]!, _0, _1) + } + public func InviteLink_PeopleJoinedShort(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[117 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MuteExpires_Days(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[118 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Stats_GroupShowMoreTopAdmins(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[119 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MessagePoll_VotedCount(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[120 * 6 + Int(form.rawValue)]!, stringValue) + } + public func StickerPack_AddMaskCount(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[121 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_MESSAGE_DOCS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { + let form = getPluralizationForm(self.lc, selector) + return String(format: self._ps[122 * 6 + Int(form.rawValue)]!, _1, _2) + } + public func Watch_LastSeen_HoursAgo(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[123 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Conversation_ContextViewReplies(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[124 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MessageTimer_Weeks(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[125 * 6 + Int(form.rawValue)]!, stringValue) + } + public func VoiceOver_Chat_PollOptionCount(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[126 * 6 + Int(form.rawValue)]!, stringValue) } public func Conversation_SelectedMessages(_ value: Int32) -> String { let form = getPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[164 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[127 * 6 + Int(form.rawValue)]!, stringValue) + } + public func UserCount(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[128 * 6 + Int(form.rawValue)]!, stringValue) + } + public func OldChannels_InactiveMonth(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[129 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_CHANNEL_MESSAGE_FWDS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { + let form = getPluralizationForm(self.lc, selector) + return String(format: self._ps[130 * 6 + Int(form.rawValue)]!, _1, _2) + } + public func AttachmentMenu_SendVideo(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[131 * 6 + Int(form.rawValue)]!, stringValue) + } + public func LiveLocation_MenuChatsCount(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[132 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Map_ETAHours(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[133 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Stats_GroupShowMoreTopInviters(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[134 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_CHANNEL_MESSAGE_VIDEOS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { + let form = getPluralizationForm(self.lc, selector) + return String(format: self._ps[135 * 6 + Int(form.rawValue)]!, _1, _2) + } + public func MessageTimer_Seconds(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[136 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ChatList_SelectedChats(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[137 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ForwardedContacts(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[138 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Notification_GameScoreExtended(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[139 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Stats_GroupTopPosterMessages(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[140 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Chat_DeleteMessagesConfirmation(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[141 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Invitation_Members(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[142 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ChatList_MessageVideos(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[143 * 6 + Int(form.rawValue)]!, stringValue) + } + public func OldChannels_Leave(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[144 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Chat_MessagesUnpinned(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[145 * 6 + Int(form.rawValue)]!, stringValue) + } + public func StickerPack_RemoveStickerCount(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[146 * 6 + Int(form.rawValue)]!, stringValue) + } + public func InviteLink_InviteLinks(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[147 * 6 + Int(form.rawValue)]!, stringValue) + } + public func OldChannels_GroupFormat(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[148 * 6 + Int(form.rawValue)]!, stringValue) + } + public func SharedMedia_Photo(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[149 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Map_ETAMinutes(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[150 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_MESSAGE_FWDS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { + let form = getPluralizationForm(self.lc, selector) + return String(format: self._ps[151 * 6 + Int(form.rawValue)]!, _1, _2) + } + public func AttachmentMenu_SendGif(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[152 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Forward_ConfirmMultipleFiles(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[153 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ServiceMessage_GameScoreSelfExtended(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[154 * 6 + Int(form.rawValue)]!, stringValue) + } + public func DialogList_LiveLocationChatsCount(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[155 * 6 + Int(form.rawValue)]!, stringValue) + } + public func GroupInfo_ParticipantCount(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[156 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Notification_GameScoreSelfSimple(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[157 * 6 + Int(form.rawValue)]!, stringValue) + } + public func StickerPack_AddStickerCount(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[158 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_MESSAGE_VIDEOS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { + let form = getPluralizationForm(self.lc, selector) + return String(format: self._ps[159 * 6 + Int(form.rawValue)]!, _1, _2) + } + public func SharedMedia_Link(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[160 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MessageTimer_ShortSeconds(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[161 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ForwardedStickers(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[162 * 6 + Int(form.rawValue)]!, stringValue) + } + public func OldChannels_InactiveWeek(_ value: Int32) -> String { + let form = getPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[163 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_CHANNEL_MESSAGES(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { + let form = getPluralizationForm(self.lc, selector) + return String(format: self._ps[164 * 6 + Int(form.rawValue)]!, _1, _2) } public init(primaryComponent: PresentationStringsComponent, secondaryComponent: PresentationStringsComponent?, groupingSeparator: String) { diff --git a/submodules/TelegramUI/Resources/PresentationStrings.mapping b/submodules/TelegramUI/Resources/PresentationStrings.mapping index 91e7ab9c63..ab5a972fdc 100644 Binary files a/submodules/TelegramUI/Resources/PresentationStrings.mapping and b/submodules/TelegramUI/Resources/PresentationStrings.mapping differ diff --git a/submodules/TelegramUI/Sources/ChatController.swift b/submodules/TelegramUI/Sources/ChatController.swift index 0c09f92dbd..00cab4e8e7 100644 --- a/submodules/TelegramUI/Sources/ChatController.swift +++ b/submodules/TelegramUI/Sources/ChatController.swift @@ -2767,10 +2767,29 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G if let peer = peerViewMainPeer(peerView) { if let selectionState = presentationInterfaceState.interfaceState.selectionState { if selectionState.selectedIds.count > 0 { - strongSelf.chatTitleView?.titleContent = .custom(strongSelf.presentationData.strings.Conversation_SelectedMessages(Int32(selectionState.selectedIds.count ?? 1)), nil, false) + strongSelf.chatTitleView?.titleContent = .custom(strongSelf.presentationData.strings.Conversation_SelectedMessages(Int32(selectionState.selectedIds.count)), nil, false) } else { if let reportReason = presentationInterfaceState.reportReason { - strongSelf.chatTitleView?.titleContent = .custom("Report Smth", strongSelf.presentationInterfaceState.strings.Conversation_SelectMessages, false) + let title: String + switch reportReason { + case .spam: + title = strongSelf.presentationData.strings.ReportPeer_ReasonSpam + case .fake: + title = strongSelf.presentationData.strings.ReportPeer_ReasonFake + case .violence: + title = strongSelf.presentationData.strings.ReportPeer_ReasonViolence + case .porno: + title = strongSelf.presentationData.strings.ReportPeer_ReasonPornography + case .childAbuse: + title = strongSelf.presentationData.strings.ReportPeer_ReasonChildAbuse + case .copyright: + title = strongSelf.presentationData.strings.ReportPeer_ReasonCopyright + case .custom: + title = strongSelf.presentationData.strings.ReportPeer_ReasonOther + case .irrelevantLocation: + title = "" + } + strongSelf.chatTitleView?.titleContent = .custom(title, strongSelf.presentationInterfaceState.strings.Conversation_SelectMessages, false) } else { strongSelf.chatTitleView?.titleContent = .custom(strongSelf.presentationInterfaceState.strings.Conversation_SelectMessages, nil, false) } @@ -4753,13 +4772,16 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G self?.view.window?.endEditing(true) controller?.dismissAnimated() } + var message = "" var items: [ActionSheetItem] = [] items.append(ReportPeerHeaderActionSheetItem(context: strongSelf.context, text: presentationData.strings.Report_AdditionalDetailsText)) - items.append(ReportPeerDetailsActionSheetItem(context: strongSelf.context, placeholderText: presentationData.strings.Report_AdditionalDetailsPlaceholder)) + items.append(ReportPeerDetailsActionSheetItem(context: strongSelf.context, placeholderText: presentationData.strings.Report_AdditionalDetailsPlaceholder, textUpdated: { text in + message = text + })) items.append(ActionSheetButtonItem(title: presentationData.strings.Report_Report, color: .accent, font: .bold, enabled: true, action: { dismissAction() strongSelf.updateChatPresentationInterfaceState(animated: true, interactive: true, { $0.updatedInterfaceState { $0.withoutSelectionState() } }, completion: { _ in - let _ = (reportPeerMessages(account: strongSelf.context.account, messageIds: Array(messageIds), reason: reportReason) + let _ = (reportPeerMessages(account: strongSelf.context.account, messageIds: Array(messageIds), reason: reportReason, message: message) |> deliverOnMainQueue).start(completed: { [weak self] in if let strongSelf = self, let path = getAppBundle().path(forResource: "PoliceCar", ofType: "tgs") { strongSelf.present(UndoOverlayController(presentationData: presentationData, content: .emoji(path: path, text: presentationData.strings.Report_Succeed), elevatedLayout: false, action: { _ in return false }), in: .current) @@ -6207,7 +6229,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G guard let strongSelf = self else { return } - strongSelf.reportIrrelvantGeoDisposable = (TelegramCore.reportPeer(account: strongSelf.context.account, peerId: peerId, reason: .irrelevantLocation) + strongSelf.reportIrrelvantGeoDisposable = (TelegramCore.reportPeer(account: strongSelf.context.account, peerId: peerId, reason: .irrelevantLocation, message: "") |> deliverOnMainQueue).start(completed: { [weak self] in if let strongSelf = self { strongSelf.reportIrrelvantGeoNoticePromise.set(.single(true)) @@ -10667,7 +10689,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G let _ = removePeerChat(account: strongSelf.context.account, peerId: chatPeer.id, reportChatSpam: reportSpam).start() strongSelf.effectiveNavigationController?.filterController(strongSelf, animated: true) } else if reportSpam { - let _ = TelegramCore.reportPeer(account: strongSelf.context.account, peerId: peer.id, reason: .spam).start() + let _ = TelegramCore.reportPeer(account: strongSelf.context.account, peerId: peer.id, reason: .spam, message: "").start() } }) ] as [ActionSheetItem]) diff --git a/submodules/TelegramUI/Sources/ChatRecentActionsHistoryTransition.swift b/submodules/TelegramUI/Sources/ChatRecentActionsHistoryTransition.swift index 3abfabaaa3..6fff0fc450 100644 --- a/submodules/TelegramUI/Sources/ChatRecentActionsHistoryTransition.swift +++ b/submodules/TelegramUI/Sources/ChatRecentActionsHistoryTransition.swift @@ -716,7 +716,7 @@ struct ChatRecentActionsEntry: Comparable, Identifiable { (.canPostMessages, self.presentationData.strings.Channel_AdminLog_CanSendMessages), (.canDeleteMessages, self.presentationData.strings.Channel_AdminLog_CanDeleteMessagesOfOthers), (.canEditMessages, self.presentationData.strings.Channel_AdminLog_CanEditMessages), - (.canInviteUsers, self.presentationData.strings.Channel_AdminLog_CanInviteUsers), + (.canInviteUsers, self.presentationData.strings.Channel_AdminLog_CanInviteUsersViaLink), (.canPinMessages, self.presentationData.strings.Channel_AdminLog_CanPinMessages), (.canAddAdmins, self.presentationData.strings.Channel_AdminLog_CanAddAdmins), (.canManageCalls, self.presentationData.strings.Channel_AdminLog_CanManageCalls) @@ -726,7 +726,7 @@ struct ChatRecentActionsEntry: Comparable, Identifiable { (.canChangeInfo, self.presentationData.strings.Channel_AdminLog_CanChangeInfo), (.canDeleteMessages, self.presentationData.strings.Channel_AdminLog_CanDeleteMessages), (.canBanUsers, self.presentationData.strings.Channel_AdminLog_CanBanUsers), - (.canInviteUsers, self.presentationData.strings.Channel_AdminLog_CanInviteUsers), + (.canInviteUsers, self.presentationData.strings.Channel_AdminLog_CanInviteUsersViaLink), (.canPinMessages, self.presentationData.strings.Channel_AdminLog_CanPinMessages), (.canBeAnonymous, self.presentationData.strings.Channel_AdminLog_CanBeAnonymous), (.canAddAdmins, self.presentationData.strings.Channel_AdminLog_CanAddAdmins), @@ -1192,6 +1192,8 @@ struct ChatRecentActionsEntry: Comparable, Identifiable { appendAttributedText(text: rawText, generateEntities: { index in if index == 0, let author = author { return [.TextMention(peerId: author.id)] + } else if index == 1 { + return [.Bold] } return [] }, to: &text, entities: &entities) @@ -1211,11 +1213,13 @@ struct ChatRecentActionsEntry: Comparable, Identifiable { var text: String = "" var entities: [MessageTextEntity] = [] - let rawText: (String, [(Int, NSRange)]) = self.presentationData.strings.Channel_AdminLog_DeletedInviteLink(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "", invite.link) + let rawText: (String, [(Int, NSRange)]) = self.presentationData.strings.Channel_AdminLog_DeletedInviteLink(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "", invite.link.replacingOccurrences(of: "https://", with: "")) appendAttributedText(text: rawText, generateEntities: { index in if index == 0, let author = author { return [.TextMention(peerId: author.id)] + } else if index == 1 { + return [.Bold] } return [] }, to: &text, entities: &entities) @@ -1235,11 +1239,13 @@ struct ChatRecentActionsEntry: Comparable, Identifiable { var text: String = "" var entities: [MessageTextEntity] = [] - let rawText: (String, [(Int, NSRange)]) = self.presentationData.strings.Channel_AdminLog_RevokedInviteLink(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "", invite.link) + let rawText: (String, [(Int, NSRange)]) = self.presentationData.strings.Channel_AdminLog_RevokedInviteLink(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "", invite.link.replacingOccurrences(of: "https://", with: "")) appendAttributedText(text: rawText, generateEntities: { index in if index == 0, let author = author { return [.TextMention(peerId: author.id)] + } else if index == 1 { + return [.Bold] } return [] }, to: &text, entities: &entities) @@ -1259,11 +1265,39 @@ struct ChatRecentActionsEntry: Comparable, Identifiable { var text: String = "" var entities: [MessageTextEntity] = [] - let rawText: (String, [(Int, NSRange)]) = self.presentationData.strings.Channel_AdminLog_EditedInviteLink(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "", updatedInvite.link) + let rawText: (String, [(Int, NSRange)]) = self.presentationData.strings.Channel_AdminLog_EditedInviteLink(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "", updatedInvite.link.replacingOccurrences(of: "https://", with: "")) appendAttributedText(text: rawText, generateEntities: { index in if index == 0, let author = author { return [.TextMention(peerId: author.id)] + } else if index == 1 { + return [.Bold] + } + return [] + }, to: &text, entities: &entities) + + let action = TelegramMediaActionType.customText(text: text, entities: entities) + + let message = Message(stableId: self.entry.stableId, stableVersion: 0, id: MessageId(peerId: peer.id, namespace: Namespaces.Message.Cloud, id: Int32(bitPattern: self.entry.stableId)), globallyUniqueId: self.entry.event.id, groupingKey: nil, groupInfo: nil, threadId: nil, timestamp: self.entry.event.date, flags: [.Incoming], tags: [], globalTags: [], localTags: [], forwardInfo: nil, author: author, text: "", attributes: [], media: [TelegramMediaAction(action: action)], peers: peers, associatedMessages: SimpleDictionary(), associatedMessageIds: []) + return ChatMessageItem(presentationData: self.presentationData, context: context, chatLocation: .peer(peer.id), associatedData: ChatMessageItemAssociatedData(automaticDownloadPeerType: .channel, automaticDownloadNetworkType: .cellular, isRecentActions: true), controllerInteraction: controllerInteraction, content: .message(message: message, read: true, selection: .none, attributes: ChatMessageEntryAttributes())) + case let .participantJoinedViaInvite(invite): + var peers = SimpleDictionary() + var author: Peer? + if let peer = self.entry.peers[self.entry.event.peerId] { + author = peer + peers[peer.id] = peer + } + + var text: String = "" + var entities: [MessageTextEntity] = [] + + let rawText: (String, [(Int, NSRange)]) = self.presentationData.strings.Channel_AdminLog_JoinedViaInviteLink(author?.displayTitle(strings: self.presentationData.strings, displayOrder: self.presentationData.nameDisplayOrder) ?? "", invite.link.replacingOccurrences(of: "https://", with: "")) + + appendAttributedText(text: rawText, generateEntities: { index in + if index == 0, let author = author { + return [.TextMention(peerId: author.id)] + } else if index == 1 { + return [.Bold] } return [] }, to: &text, entities: &entities) diff --git a/submodules/TelegramUI/Sources/ChatReportPeerTitlePanelNode.swift b/submodules/TelegramUI/Sources/ChatReportPeerTitlePanelNode.swift index 1f5f51f5fe..38e200a72b 100644 --- a/submodules/TelegramUI/Sources/ChatReportPeerTitlePanelNode.swift +++ b/submodules/TelegramUI/Sources/ChatReportPeerTitlePanelNode.swift @@ -87,7 +87,7 @@ private func peerButtons(_ state: ChatPresentationInterfaceState) -> [ChatReport buttons.append(.shareMyPhoneNumber) } } - } else if let _ = state.renderedPeer?.chatMainPeer { + } else if let _ = state.renderedPeer?.chatMainPeer, case .peer = state.chatLocation { if let contactStatus = state.contactStatus, let peerStatusSettings = contactStatus.peerStatusSettings, peerStatusSettings.contains(.suggestAddMembers) { buttons.append(.addMembers) } else if let contactStatus = state.contactStatus, contactStatus.canReportIrrelevantLocation, let peerStatusSettings = contactStatus.peerStatusSettings, peerStatusSettings.contains(.canReportIrrelevantGeoLocation) { diff --git a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoData.swift b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoData.swift index 3c2501e343..1ae590ef5f 100644 --- a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoData.swift +++ b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoData.swift @@ -656,7 +656,7 @@ func peerInfoScreenData(context: AccountContext, peerId: PeerId, strings: Presen if currentInvitationsContext == nil { var canManageInvitations = false - if let channel = peerViewMainPeer(peerView) as? TelegramChannel, let cachedData = peerView.cachedData as? CachedChannelData, channel.flags.contains(.isCreator) || ((channel.adminRights != nil && channel.hasPermission(.pinMessages)) && cachedData.flags.contains(.canChangeUsername)) { + if let channel = peerViewMainPeer(peerView) as? TelegramChannel, let cachedData = peerView.cachedData as? CachedChannelData, channel.flags.contains(.isCreator) || channel.hasPermission(.inviteMembers) { canManageInvitations = true } if canManageInvitations { @@ -813,9 +813,13 @@ func peerInfoScreenData(context: AccountContext, peerId: PeerId, strings: Presen if currentInvitationsContext == nil { var canManageInvitations = false - if let group = peerViewMainPeer(peerView) as? TelegramGroup, case .creator = group.role { - canManageInvitations = true - } else if let channel = peerViewMainPeer(peerView) as? TelegramChannel, let cachedData = peerView.cachedData as? CachedChannelData, channel.flags.contains(.isCreator) || ((channel.adminRights != nil && channel.hasPermission(.pinMessages)) && cachedData.flags.contains(.canChangeUsername)) { + if let group = peerViewMainPeer(peerView) as? TelegramGroup { + if case .creator = group.role { + canManageInvitations = true + } else if case let .admin(rights, _) = group.role, rights.flags.contains(.canInviteUsers) { + canManageInvitations = true + } + } else if let channel = peerViewMainPeer(peerView) as? TelegramChannel, channel.flags.contains(.isCreator) || channel.hasPermission(.inviteMembers) { canManageInvitations = true } if canManageInvitations { @@ -1081,14 +1085,33 @@ func peerInfoHeaderButtons(peer: Peer?, cachedData: CachedPeerData?, isOpenedFro return result } -func peerInfoCanEdit(peer: Peer?, cachedData: CachedPeerData?) -> Bool { +func peerInfoCanEdit(peer: Peer?, cachedData: CachedPeerData?, isContact: Bool?) -> Bool { if let user = peer as? TelegramUser { if user.isDeleted { return false } + if let isContact = isContact, !isContact { + return false + } return true - } else if peer is TelegramChannel || peer is TelegramGroup { - return true + } else if let peer = peer as? TelegramChannel { + if peer.flags.contains(.isCreator) { + return true + } else if let adminRights = peer.adminRights, adminRights.flags.contains(.canAddAdmins) || adminRights.flags.contains(.canBanUsers) || adminRights.flags.contains(.canChangeInfo) || adminRights.flags.contains(.canInviteUsers) { + return true + } + return false + } else if let peer = peer as? TelegramGroup { + if case .creator = peer.role { + return true + } else if case let .admin(rights, _) = peer.role { + if rights.flags.contains(.canAddAdmins) || rights.flags.contains(.canBanUsers) || rights.flags.contains(.canChangeInfo) || rights.flags.contains(.canInviteUsers) { + return true + } + return false + } else { + return false + } } return false } diff --git a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift index ef7fc2a09f..f49970d985 100644 --- a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift +++ b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift @@ -1201,18 +1201,19 @@ private func editingItems(data: PeerInfoScreenData?, context: AccountContext, pr })) } - if channel.flags.contains(.isCreator) || (channel.adminRights != nil && channel.hasPermission(.pinMessages)) { + if channel.flags.contains(.isCreator) || (channel.adminRights?.flags.contains(.canInviteUsers) == true) { let invitesText: String if let count = data.invitations?.count, count > 0 { invitesText = "\(count)" } else { invitesText = "" } - items[.peerSettings]!.append(PeerInfoScreenDisclosureItem(id: ItemInviteLinks, label: .text(invitesText), text: presentationData.strings.GroupInfo_InviteLinks, icon: UIImage(bundleImageName: "Chat/Info/GroupLinksIcon"), action: { interaction.editingOpenInviteLinksSetup() })) - + } + + if channel.flags.contains(.isCreator) || (channel.adminRights != nil && channel.hasPermission(.pinMessages)) { let discussionGroupTitle: String if let _ = data.cachedData as? CachedChannelData { if let peer = data.linkedDiscussionPeer { @@ -1336,39 +1337,22 @@ private func editingItems(data: PeerInfoScreenData?, context: AccountContext, pr interaction.editingOpenPreHistorySetup() })) } - - if channel.hasPermission(.inviteMembers) { - let invitesText: String - if let count = data.invitations?.count, count > 0 { - invitesText = "\(count)" - } else { - invitesText = "" - } - - items[.peerSettings]!.append(PeerInfoScreenDisclosureItem(id: ItemInviteLinks, label: .text(invitesText), text: presentationData.strings.GroupInfo_InviteLinks, icon: UIImage(bundleImageName: "Chat/Info/GroupLinksIcon"), action: { - interaction.editingOpenInviteLinksSetup() - })) - } - - /*if channel.hasPermission(.changeInfo) { - let timeoutString: String - if case let .known(value) = cachedData.autoremoveTimeout { - if let value = value?.effectiveValue { - timeoutString = timeIntervalString(strings: presentationData.strings, value: value) - } else { - timeoutString = presentationData.strings.PeerInfo_AutoremoveMessagesDisabled - } - } else { - timeoutString = "" - } - - items[.peerPublicSettings]!.append(PeerInfoScreenDisclosureItem(id: ItemAutoremove, label: .text(timeoutString), text: presentationData.strings.PeerInfo_AutoremoveMessages, action: { - interaction.editingOpenAutoremoveMesages() - })) - }*/ } } + if isCreator || (channel.hasPermission(.inviteMembers)) { + let invitesText: String + if let count = data.invitations?.count, count > 0 { + invitesText = "\(count)" + } else { + invitesText = "" + } + + items[.peerSettings]!.append(PeerInfoScreenDisclosureItem(id: ItemInviteLinks, label: .text(invitesText), text: presentationData.strings.GroupInfo_InviteLinks, icon: UIImage(bundleImageName: "Chat/Info/GroupLinksIcon"), action: { + interaction.editingOpenInviteLinksSetup() + })) + } + if cachedData.flags.contains(.canSetStickerSet) && canEditPeerInfo(context: context, peer: channel) { items[.peerSettings]!.append(PeerInfoScreenDisclosureItem(id: ItemStickerPack, label: .text(cachedData.stickerPack?.title ?? presentationData.strings.GroupInfo_SharedMediaNone), text: presentationData.strings.Stickers_GroupStickers, icon: UIImage(bundleImageName: "Settings/MenuIcons/Stickers"), action: { interaction.editingOpenStickerPackSetup() @@ -1472,8 +1456,19 @@ private func editingItems(data: PeerInfoScreenData?, context: AccountContext, pr items[.peerSettings]!.append(PeerInfoScreenDisclosureItem(id: ItemAdmins, text: presentationData.strings.GroupInfo_Administrators, icon: UIImage(bundleImageName: "Chat/Info/GroupAdminsIcon"), action: { interaction.openParticipantsSection(.admins) })) - } else if case .admin = group.role { - + } else if case let .admin(rights, _) = group.role { + if rights.flags.contains(.canInviteUsers) { + let invitesText: String + if let count = data.invitations?.count, count > 0 { + invitesText = "\(count)" + } else { + invitesText = "" + } + + items[.peerSettings]!.append(PeerInfoScreenDisclosureItem(id: ItemInviteLinks, label: .text(invitesText), text: presentationData.strings.GroupInfo_InviteLinks, icon: UIImage(bundleImageName: "Chat/Info/GroupLinksIcon"), action: { + interaction.editingOpenInviteLinksSetup() + })) + } } } } @@ -3744,7 +3739,7 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD let _ = removePeerChat(account: strongSelf.context.account, peerId: strongSelf.peerId, reportChatSpam: reportSpam).start() (strongSelf.controller?.navigationController as? NavigationController)?.popToRoot(animated: true) } else if reportSpam { - let _ = reportPeer(account: strongSelf.context.account, peerId: strongSelf.peerId, reason: .spam).start() + let _ = reportPeer(account: strongSelf.context.account, peerId: strongSelf.peerId, reason: .spam, message: "").start() } deleteSendMessageIntents(peerId: strongSelf.peerId) @@ -3875,6 +3870,7 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD } private func editingOpenInviteLinksSetup() { + self.controller?.push(inviteLinkListController(context: self.context, peerId: self.peerId, admin: nil)) } @@ -5307,7 +5303,7 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD if self.isSettings { navigationButtons.append(PeerInfoHeaderNavigationButtonSpec(key: .edit, isForExpandedView: false)) navigationButtons.append(PeerInfoHeaderNavigationButtonSpec(key: .search, isForExpandedView: true)) - } else if peerInfoCanEdit(peer: self.data?.peer, cachedData: self.data?.cachedData) { + } else if peerInfoCanEdit(peer: self.data?.peer, cachedData: self.data?.cachedData, isContact: self.data?.isContact) { navigationButtons.append(PeerInfoHeaderNavigationButtonSpec(key: .edit, isForExpandedView: false)) } if self.state.selectedMessageIds == nil { @@ -6230,14 +6226,16 @@ func presentAddMembers(context: AccountContext, parentController: ViewController var canCreateInviteLink = false if let group = groupPeer as? TelegramGroup { switch group.role { - case .creator, .admin: + case .creator: canCreateInviteLink = true + case let .admin(rights, _): + canCreateInviteLink = rights.flags.contains(.canInviteUsers) default: break } } else if let channel = groupPeer as? TelegramChannel { if channel.hasPermission(.inviteMembers) { - if channel.flags.contains(.isCreator) || (channel.adminRights != nil && channel.username == nil) { + if channel.flags.contains(.isCreator) || (channel.hasPermission(.inviteMembers)) { canCreateInviteLink = true } } diff --git a/submodules/TelegramUI/Sources/ReportPeerDetailsActionSheetItem.swift b/submodules/TelegramUI/Sources/ReportPeerDetailsActionSheetItem.swift index a0a692a2fb..e5ae330ab4 100644 --- a/submodules/TelegramUI/Sources/ReportPeerDetailsActionSheetItem.swift +++ b/submodules/TelegramUI/Sources/ReportPeerDetailsActionSheetItem.swift @@ -13,14 +13,16 @@ import AppBundle public final class ReportPeerDetailsActionSheetItem: ActionSheetItem { let context: AccountContext let placeholderText: String + let textUpdated: (String) -> Void - public init(context: AccountContext, placeholderText: String) { + public init(context: AccountContext, placeholderText: String, textUpdated: @escaping (String) -> Void) { self.context = context self.placeholderText = placeholderText + self.textUpdated = textUpdated } public func node(theme: ActionSheetControllerTheme) -> ActionSheetItemNode { - return ReportPeerDetailsActionSheetItemNode(theme: theme, context: self.context, placeholderText: self.placeholderText) + return ReportPeerDetailsActionSheetItemNode(theme: theme, context: self.context, placeholderText: self.placeholderText, textUpdated: self.textUpdated) } public func updateNode(_ node: ActionSheetItemNode) { @@ -34,7 +36,7 @@ private final class ReportPeerDetailsActionSheetItemNode: ActionSheetItemNode { private let accessibilityArea: AccessibilityAreaNode - init(theme: ActionSheetControllerTheme, context: AccountContext, placeholderText: String) { + init(theme: ActionSheetControllerTheme, context: AccountContext, placeholderText: String, textUpdated: @escaping (String) -> Void) { self.theme = theme let presentationData = context.sharedContext.currentPresentationData.with { $0 } @@ -48,7 +50,12 @@ private final class ReportPeerDetailsActionSheetItemNode: ActionSheetItemNode { self.addSubnode(self.inputFieldNode) -// self.inputFieldNode. + self.inputFieldNode.updateText = { text in + textUpdated(text) + } + self.inputFieldNode.updateHeight = { + + } } override func calculateSizeThatFits(_ constrainedSize: CGSize) -> CGSize { diff --git a/submodules/UndoUI/Sources/UndoOverlayControllerNode.swift b/submodules/UndoUI/Sources/UndoOverlayControllerNode.swift index 86dc66cccb..7ce7123882 100644 --- a/submodules/UndoUI/Sources/UndoOverlayControllerNode.swift +++ b/submodules/UndoUI/Sources/UndoOverlayControllerNode.swift @@ -207,7 +207,7 @@ final class UndoOverlayControllerNode: ViewControllerTracingNode { self.textNode.attributedText = attributedText self.textNode.maximumNumberOfLines = 2 displayUndo = false - self.originalRemainingSeconds = 4 + self.originalRemainingSeconds = 3 case let .banned(text): self.avatarNode = nil self.iconNode = nil