Update API

This commit is contained in:
isaac 2026-04-21 15:09:07 +04:00
parent 9ed75ca048
commit 25ddc21780
23 changed files with 21986 additions and 22309 deletions

View file

@ -59,7 +59,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
dict[-1194283041] = { return Api.AccountDaysTTL.parse_accountDaysTTL($0) }
dict[-805945687] = { return Api.AiComposeTone.parse_aiComposeTone($0) }
dict[-1683135468] = { return Api.AiComposeTone.parse_aiComposeToneDefault($0) }
dict[-1461961831] = { return Api.AiComposeToneExample.parse_aiComposeToneExample($0) }
dict[-237623060] = { return Api.AiComposeToneExample.parse_aiComposeToneExample($0) }
dict[-653423106] = { return Api.AttachMenuBot.parse_attachMenuBot($0) }
dict[-1297663893] = { return Api.AttachMenuBotIcon.parse_attachMenuBotIcon($0) }
dict[1165423600] = { return Api.AttachMenuBotIconColor.parse_attachMenuBotIconColor($0) }
@ -203,7 +203,6 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
dict[-531931925] = { return Api.ChannelParticipantsFilter.parse_channelParticipantsMentions($0) }
dict[-566281095] = { return Api.ChannelParticipantsFilter.parse_channelParticipantsRecent($0) }
dict[106343499] = { return Api.ChannelParticipantsFilter.parse_channelParticipantsSearch($0) }
dict[-1817845901] = { return Api.ChannelTopic.parse_channelTopic($0) }
dict[473084188] = { return Api.Chat.parse_channel($0) }
dict[399807445] = { return Api.Chat.parse_channelForbidden($0) }
dict[1103884886] = { return Api.Chat.parse_chat($0) }
@ -807,7 +806,6 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
dict[-193510921] = { return Api.PeerSettings.parse_peerSettings($0) }
dict[-1707742823] = { return Api.PeerStories.parse_peerStories($0) }
dict[-404214254] = { return Api.PendingSuggestion.parse_pendingSuggestion($0) }
dict[431767677] = { return Api.PersonalChannel.parse_personalChannel($0) }
dict[810769141] = { return Api.PhoneCall.parse_phoneCall($0) }
dict[912311057] = { return Api.PhoneCall.parse_phoneCallAccepted($0) }
dict[1355435489] = { return Api.PhoneCall.parse_phoneCallDiscarded($0) }
@ -1382,8 +1380,6 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
dict[-541588713] = { return Api.channels.ChannelParticipant.parse_channelParticipant($0) }
dict[-1699676497] = { return Api.channels.ChannelParticipants.parse_channelParticipants($0) }
dict[-266911767] = { return Api.channels.ChannelParticipants.parse_channelParticipantsNotModified($0) }
dict[824755388] = { return Api.channels.Found.parse_found($0) }
dict[-694491059] = { return Api.channels.PersonalChannels.parse_personalChannels($0) }
dict[-191450938] = { return Api.channels.SendAsPeers.parse_sendAsPeers($0) }
dict[1044107055] = { return Api.channels.SponsoredMessageReportResult.parse_sponsoredMessageReportResultAdsHidden($0) }
dict[-2073059774] = { return Api.channels.SponsoredMessageReportResult.parse_sponsoredMessageReportResultChooseOption($0) }
@ -1791,8 +1787,6 @@ public extension Api {
_1.serialize(buffer, boxed)
case let _1 as Api.ChannelParticipantsFilter:
_1.serialize(buffer, boxed)
case let _1 as Api.ChannelTopic:
_1.serialize(buffer, boxed)
case let _1 as Api.Chat:
_1.serialize(buffer, boxed)
case let _1 as Api.ChatAdminRights:
@ -2173,8 +2167,6 @@ public extension Api {
_1.serialize(buffer, boxed)
case let _1 as Api.PendingSuggestion:
_1.serialize(buffer, boxed)
case let _1 as Api.PersonalChannel:
_1.serialize(buffer, boxed)
case let _1 as Api.PhoneCall:
_1.serialize(buffer, boxed)
case let _1 as Api.PhoneCallDiscardReason:
@ -2537,10 +2529,6 @@ public extension Api {
_1.serialize(buffer, boxed)
case let _1 as Api.channels.ChannelParticipants:
_1.serialize(buffer, boxed)
case let _1 as Api.channels.Found:
_1.serialize(buffer, boxed)
case let _1 as Api.channels.PersonalChannels:
_1.serialize(buffer, boxed)
case let _1 as Api.channels.SendAsPeers:
_1.serialize(buffer, boxed)
case let _1 as Api.channels.SponsoredMessageReportResult:

View file

@ -206,9 +206,9 @@ public extension Api {
public extension Api {
enum AiComposeToneExample: TypeConstructorDescription {
public class Cons_aiComposeToneExample: TypeConstructorDescription {
public var from: String
public var to: String
public init(from: String, to: String) {
public var from: Api.TextWithEntities
public var to: Api.TextWithEntities
public init(from: Api.TextWithEntities, to: Api.TextWithEntities) {
self.from = from
self.to = to
}
@ -222,10 +222,10 @@ public extension Api {
switch self {
case .aiComposeToneExample(let _data):
if boxed {
buffer.appendInt32(-1461961831)
buffer.appendInt32(-237623060)
}
serializeString(_data.from, buffer: buffer, boxed: false)
serializeString(_data.to, buffer: buffer, boxed: false)
_data.from.serialize(buffer, true)
_data.to.serialize(buffer, true)
break
}
}
@ -238,10 +238,14 @@ public extension Api {
}
public static func parse_aiComposeToneExample(_ reader: BufferReader) -> AiComposeToneExample? {
var _1: String?
_1 = parseString(reader)
var _2: String?
_2 = parseString(reader)
var _1: Api.TextWithEntities?
if let signature = reader.readInt32() {
_1 = Api.parse(reader, signature: signature) as? Api.TextWithEntities
}
var _2: Api.TextWithEntities?
if let signature = reader.readInt32() {
_2 = Api.parse(reader, signature: signature) as? Api.TextWithEntities
}
let _c1 = _1 != nil
let _c2 = _2 != nil
if _c1 && _c2 {

View file

@ -1801,48 +1801,431 @@ public extension Api {
}
}
public extension Api {
enum PersonalChannel: TypeConstructorDescription {
public class Cons_personalChannel: TypeConstructorDescription {
public var userId: Int64
public var channelId: Int64
public init(userId: Int64, channelId: Int64) {
self.userId = userId
self.channelId = channelId
enum PhoneCall: TypeConstructorDescription {
public class Cons_phoneCall: TypeConstructorDescription {
public var flags: Int32
public var id: Int64
public var accessHash: Int64
public var date: Int32
public var adminId: Int64
public var participantId: Int64
public var gAOrB: Buffer
public var keyFingerprint: Int64
public var `protocol`: Api.PhoneCallProtocol
public var connections: [Api.PhoneConnection]
public var startDate: Int32
public var customParameters: Api.DataJSON?
public init(flags: Int32, id: Int64, accessHash: Int64, date: Int32, adminId: Int64, participantId: Int64, gAOrB: Buffer, keyFingerprint: Int64, `protocol`: Api.PhoneCallProtocol, connections: [Api.PhoneConnection], startDate: Int32, customParameters: Api.DataJSON?) {
self.flags = flags
self.id = id
self.accessHash = accessHash
self.date = date
self.adminId = adminId
self.participantId = participantId
self.gAOrB = gAOrB
self.keyFingerprint = keyFingerprint
self.`protocol` = `protocol`
self.connections = connections
self.startDate = startDate
self.customParameters = customParameters
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("personalChannel", [("userId", ConstructorParameterDescription(self.userId)), ("channelId", ConstructorParameterDescription(self.channelId))])
return ("phoneCall", [("flags", ConstructorParameterDescription(self.flags)), ("id", ConstructorParameterDescription(self.id)), ("accessHash", ConstructorParameterDescription(self.accessHash)), ("date", ConstructorParameterDescription(self.date)), ("adminId", ConstructorParameterDescription(self.adminId)), ("participantId", ConstructorParameterDescription(self.participantId)), ("gAOrB", ConstructorParameterDescription(self.gAOrB)), ("keyFingerprint", ConstructorParameterDescription(self.keyFingerprint)), ("`protocol`", ConstructorParameterDescription(self.`protocol`)), ("connections", ConstructorParameterDescription(self.connections)), ("startDate", ConstructorParameterDescription(self.startDate)), ("customParameters", ConstructorParameterDescription(self.customParameters))])
}
}
case personalChannel(Cons_personalChannel)
public class Cons_phoneCallAccepted: TypeConstructorDescription {
public var flags: Int32
public var id: Int64
public var accessHash: Int64
public var date: Int32
public var adminId: Int64
public var participantId: Int64
public var gB: Buffer
public var `protocol`: Api.PhoneCallProtocol
public init(flags: Int32, id: Int64, accessHash: Int64, date: Int32, adminId: Int64, participantId: Int64, gB: Buffer, `protocol`: Api.PhoneCallProtocol) {
self.flags = flags
self.id = id
self.accessHash = accessHash
self.date = date
self.adminId = adminId
self.participantId = participantId
self.gB = gB
self.`protocol` = `protocol`
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("phoneCallAccepted", [("flags", ConstructorParameterDescription(self.flags)), ("id", ConstructorParameterDescription(self.id)), ("accessHash", ConstructorParameterDescription(self.accessHash)), ("date", ConstructorParameterDescription(self.date)), ("adminId", ConstructorParameterDescription(self.adminId)), ("participantId", ConstructorParameterDescription(self.participantId)), ("gB", ConstructorParameterDescription(self.gB)), ("`protocol`", ConstructorParameterDescription(self.`protocol`))])
}
}
public class Cons_phoneCallDiscarded: TypeConstructorDescription {
public var flags: Int32
public var id: Int64
public var reason: Api.PhoneCallDiscardReason?
public var duration: Int32?
public init(flags: Int32, id: Int64, reason: Api.PhoneCallDiscardReason?, duration: Int32?) {
self.flags = flags
self.id = id
self.reason = reason
self.duration = duration
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("phoneCallDiscarded", [("flags", ConstructorParameterDescription(self.flags)), ("id", ConstructorParameterDescription(self.id)), ("reason", ConstructorParameterDescription(self.reason)), ("duration", ConstructorParameterDescription(self.duration))])
}
}
public class Cons_phoneCallEmpty: TypeConstructorDescription {
public var id: Int64
public init(id: Int64) {
self.id = id
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("phoneCallEmpty", [("id", ConstructorParameterDescription(self.id))])
}
}
public class Cons_phoneCallRequested: TypeConstructorDescription {
public var flags: Int32
public var id: Int64
public var accessHash: Int64
public var date: Int32
public var adminId: Int64
public var participantId: Int64
public var gAHash: Buffer
public var `protocol`: Api.PhoneCallProtocol
public init(flags: Int32, id: Int64, accessHash: Int64, date: Int32, adminId: Int64, participantId: Int64, gAHash: Buffer, `protocol`: Api.PhoneCallProtocol) {
self.flags = flags
self.id = id
self.accessHash = accessHash
self.date = date
self.adminId = adminId
self.participantId = participantId
self.gAHash = gAHash
self.`protocol` = `protocol`
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("phoneCallRequested", [("flags", ConstructorParameterDescription(self.flags)), ("id", ConstructorParameterDescription(self.id)), ("accessHash", ConstructorParameterDescription(self.accessHash)), ("date", ConstructorParameterDescription(self.date)), ("adminId", ConstructorParameterDescription(self.adminId)), ("participantId", ConstructorParameterDescription(self.participantId)), ("gAHash", ConstructorParameterDescription(self.gAHash)), ("`protocol`", ConstructorParameterDescription(self.`protocol`))])
}
}
public class Cons_phoneCallWaiting: TypeConstructorDescription {
public var flags: Int32
public var id: Int64
public var accessHash: Int64
public var date: Int32
public var adminId: Int64
public var participantId: Int64
public var `protocol`: Api.PhoneCallProtocol
public var receiveDate: Int32?
public init(flags: Int32, id: Int64, accessHash: Int64, date: Int32, adminId: Int64, participantId: Int64, `protocol`: Api.PhoneCallProtocol, receiveDate: Int32?) {
self.flags = flags
self.id = id
self.accessHash = accessHash
self.date = date
self.adminId = adminId
self.participantId = participantId
self.`protocol` = `protocol`
self.receiveDate = receiveDate
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("phoneCallWaiting", [("flags", ConstructorParameterDescription(self.flags)), ("id", ConstructorParameterDescription(self.id)), ("accessHash", ConstructorParameterDescription(self.accessHash)), ("date", ConstructorParameterDescription(self.date)), ("adminId", ConstructorParameterDescription(self.adminId)), ("participantId", ConstructorParameterDescription(self.participantId)), ("`protocol`", ConstructorParameterDescription(self.`protocol`)), ("receiveDate", ConstructorParameterDescription(self.receiveDate))])
}
}
case phoneCall(Cons_phoneCall)
case phoneCallAccepted(Cons_phoneCallAccepted)
case phoneCallDiscarded(Cons_phoneCallDiscarded)
case phoneCallEmpty(Cons_phoneCallEmpty)
case phoneCallRequested(Cons_phoneCallRequested)
case phoneCallWaiting(Cons_phoneCallWaiting)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .personalChannel(let _data):
case .phoneCall(let _data):
if boxed {
buffer.appendInt32(431767677)
buffer.appendInt32(810769141)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt64(_data.id, buffer: buffer, boxed: false)
serializeInt64(_data.accessHash, buffer: buffer, boxed: false)
serializeInt32(_data.date, buffer: buffer, boxed: false)
serializeInt64(_data.adminId, buffer: buffer, boxed: false)
serializeInt64(_data.participantId, buffer: buffer, boxed: false)
serializeBytes(_data.gAOrB, buffer: buffer, boxed: false)
serializeInt64(_data.keyFingerprint, buffer: buffer, boxed: false)
_data.`protocol`.serialize(buffer, true)
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.connections.count))
for item in _data.connections {
item.serialize(buffer, true)
}
serializeInt32(_data.startDate, buffer: buffer, boxed: false)
if Int(_data.flags) & Int(1 << 7) != 0 {
_data.customParameters!.serialize(buffer, true)
}
break
case .phoneCallAccepted(let _data):
if boxed {
buffer.appendInt32(912311057)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt64(_data.id, buffer: buffer, boxed: false)
serializeInt64(_data.accessHash, buffer: buffer, boxed: false)
serializeInt32(_data.date, buffer: buffer, boxed: false)
serializeInt64(_data.adminId, buffer: buffer, boxed: false)
serializeInt64(_data.participantId, buffer: buffer, boxed: false)
serializeBytes(_data.gB, buffer: buffer, boxed: false)
_data.`protocol`.serialize(buffer, true)
break
case .phoneCallDiscarded(let _data):
if boxed {
buffer.appendInt32(1355435489)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt64(_data.id, buffer: buffer, boxed: false)
if Int(_data.flags) & Int(1 << 0) != 0 {
_data.reason!.serialize(buffer, true)
}
if Int(_data.flags) & Int(1 << 1) != 0 {
serializeInt32(_data.duration!, buffer: buffer, boxed: false)
}
break
case .phoneCallEmpty(let _data):
if boxed {
buffer.appendInt32(1399245077)
}
serializeInt64(_data.id, buffer: buffer, boxed: false)
break
case .phoneCallRequested(let _data):
if boxed {
buffer.appendInt32(347139340)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt64(_data.id, buffer: buffer, boxed: false)
serializeInt64(_data.accessHash, buffer: buffer, boxed: false)
serializeInt32(_data.date, buffer: buffer, boxed: false)
serializeInt64(_data.adminId, buffer: buffer, boxed: false)
serializeInt64(_data.participantId, buffer: buffer, boxed: false)
serializeBytes(_data.gAHash, buffer: buffer, boxed: false)
_data.`protocol`.serialize(buffer, true)
break
case .phoneCallWaiting(let _data):
if boxed {
buffer.appendInt32(-987599081)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt64(_data.id, buffer: buffer, boxed: false)
serializeInt64(_data.accessHash, buffer: buffer, boxed: false)
serializeInt32(_data.date, buffer: buffer, boxed: false)
serializeInt64(_data.adminId, buffer: buffer, boxed: false)
serializeInt64(_data.participantId, buffer: buffer, boxed: false)
_data.`protocol`.serialize(buffer, true)
if Int(_data.flags) & Int(1 << 0) != 0 {
serializeInt32(_data.receiveDate!, buffer: buffer, boxed: false)
}
serializeInt64(_data.userId, buffer: buffer, boxed: false)
serializeInt64(_data.channelId, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .personalChannel(let _data):
return ("personalChannel", [("userId", ConstructorParameterDescription(_data.userId)), ("channelId", ConstructorParameterDescription(_data.channelId))])
case .phoneCall(let _data):
return ("phoneCall", [("flags", ConstructorParameterDescription(_data.flags)), ("id", ConstructorParameterDescription(_data.id)), ("accessHash", ConstructorParameterDescription(_data.accessHash)), ("date", ConstructorParameterDescription(_data.date)), ("adminId", ConstructorParameterDescription(_data.adminId)), ("participantId", ConstructorParameterDescription(_data.participantId)), ("gAOrB", ConstructorParameterDescription(_data.gAOrB)), ("keyFingerprint", ConstructorParameterDescription(_data.keyFingerprint)), ("`protocol`", ConstructorParameterDescription(_data.`protocol`)), ("connections", ConstructorParameterDescription(_data.connections)), ("startDate", ConstructorParameterDescription(_data.startDate)), ("customParameters", ConstructorParameterDescription(_data.customParameters))])
case .phoneCallAccepted(let _data):
return ("phoneCallAccepted", [("flags", ConstructorParameterDescription(_data.flags)), ("id", ConstructorParameterDescription(_data.id)), ("accessHash", ConstructorParameterDescription(_data.accessHash)), ("date", ConstructorParameterDescription(_data.date)), ("adminId", ConstructorParameterDescription(_data.adminId)), ("participantId", ConstructorParameterDescription(_data.participantId)), ("gB", ConstructorParameterDescription(_data.gB)), ("`protocol`", ConstructorParameterDescription(_data.`protocol`))])
case .phoneCallDiscarded(let _data):
return ("phoneCallDiscarded", [("flags", ConstructorParameterDescription(_data.flags)), ("id", ConstructorParameterDescription(_data.id)), ("reason", ConstructorParameterDescription(_data.reason)), ("duration", ConstructorParameterDescription(_data.duration))])
case .phoneCallEmpty(let _data):
return ("phoneCallEmpty", [("id", ConstructorParameterDescription(_data.id))])
case .phoneCallRequested(let _data):
return ("phoneCallRequested", [("flags", ConstructorParameterDescription(_data.flags)), ("id", ConstructorParameterDescription(_data.id)), ("accessHash", ConstructorParameterDescription(_data.accessHash)), ("date", ConstructorParameterDescription(_data.date)), ("adminId", ConstructorParameterDescription(_data.adminId)), ("participantId", ConstructorParameterDescription(_data.participantId)), ("gAHash", ConstructorParameterDescription(_data.gAHash)), ("`protocol`", ConstructorParameterDescription(_data.`protocol`))])
case .phoneCallWaiting(let _data):
return ("phoneCallWaiting", [("flags", ConstructorParameterDescription(_data.flags)), ("id", ConstructorParameterDescription(_data.id)), ("accessHash", ConstructorParameterDescription(_data.accessHash)), ("date", ConstructorParameterDescription(_data.date)), ("adminId", ConstructorParameterDescription(_data.adminId)), ("participantId", ConstructorParameterDescription(_data.participantId)), ("`protocol`", ConstructorParameterDescription(_data.`protocol`)), ("receiveDate", ConstructorParameterDescription(_data.receiveDate))])
}
}
public static func parse_personalChannel(_ reader: BufferReader) -> PersonalChannel? {
var _1: Int64?
_1 = reader.readInt64()
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: Int64?
_5 = reader.readInt64()
var _6: Int64?
_6 = reader.readInt64()
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()
var _12: Api.DataJSON?
if Int(_1!) & Int(1 << 7) != 0 {
if let signature = reader.readInt32() {
_12 = Api.parse(reader, signature: signature) as? Api.DataJSON
}
}
let _c1 = _1 != nil
let _c2 = _2 != nil
if _c1 && _c2 {
return Api.PersonalChannel.personalChannel(Cons_personalChannel(userId: _1!, channelId: _2!))
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 = (Int(_1!) & Int(1 << 7) == 0) || _12 != nil
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 {
return Api.PhoneCall.phoneCall(Cons_phoneCall(flags: _1!, id: _2!, accessHash: _3!, date: _4!, adminId: _5!, participantId: _6!, gAOrB: _7!, keyFingerprint: _8!, protocol: _9!, connections: _10!, startDate: _11!, customParameters: _12))
}
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: Int64?
_5 = reader.readInt64()
var _6: Int64?
_6 = reader.readInt64()
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(Cons_phoneCallAccepted(flags: _1!, id: _2!, accessHash: _3!, date: _4!, adminId: _5!, participantId: _6!, gB: _7!, protocol: _8!))
}
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(Cons_phoneCallDiscarded(flags: _1!, id: _2!, reason: _3, duration: _4))
}
else {
return nil
}
}
public static func parse_phoneCallEmpty(_ reader: BufferReader) -> PhoneCall? {
var _1: Int64?
_1 = reader.readInt64()
let _c1 = _1 != nil
if _c1 {
return Api.PhoneCall.phoneCallEmpty(Cons_phoneCallEmpty(id: _1!))
}
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: Int64?
_5 = reader.readInt64()
var _6: Int64?
_6 = reader.readInt64()
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(Cons_phoneCallRequested(flags: _1!, id: _2!, accessHash: _3!, date: _4!, adminId: _5!, participantId: _6!, gAHash: _7!, protocol: _8!))
}
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: Int64?
_5 = reader.readInt64()
var _6: Int64?
_6 = reader.readInt64()
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(Cons_phoneCallWaiting(flags: _1!, id: _2!, accessHash: _3!, date: _4!, adminId: _5!, participantId: _6!, protocol: _7!, receiveDate: _8))
}
else {
return nil

View file

@ -1,436 +1,3 @@
public extension Api {
enum PhoneCall: TypeConstructorDescription {
public class Cons_phoneCall: TypeConstructorDescription {
public var flags: Int32
public var id: Int64
public var accessHash: Int64
public var date: Int32
public var adminId: Int64
public var participantId: Int64
public var gAOrB: Buffer
public var keyFingerprint: Int64
public var `protocol`: Api.PhoneCallProtocol
public var connections: [Api.PhoneConnection]
public var startDate: Int32
public var customParameters: Api.DataJSON?
public init(flags: Int32, id: Int64, accessHash: Int64, date: Int32, adminId: Int64, participantId: Int64, gAOrB: Buffer, keyFingerprint: Int64, `protocol`: Api.PhoneCallProtocol, connections: [Api.PhoneConnection], startDate: Int32, customParameters: Api.DataJSON?) {
self.flags = flags
self.id = id
self.accessHash = accessHash
self.date = date
self.adminId = adminId
self.participantId = participantId
self.gAOrB = gAOrB
self.keyFingerprint = keyFingerprint
self.`protocol` = `protocol`
self.connections = connections
self.startDate = startDate
self.customParameters = customParameters
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("phoneCall", [("flags", ConstructorParameterDescription(self.flags)), ("id", ConstructorParameterDescription(self.id)), ("accessHash", ConstructorParameterDescription(self.accessHash)), ("date", ConstructorParameterDescription(self.date)), ("adminId", ConstructorParameterDescription(self.adminId)), ("participantId", ConstructorParameterDescription(self.participantId)), ("gAOrB", ConstructorParameterDescription(self.gAOrB)), ("keyFingerprint", ConstructorParameterDescription(self.keyFingerprint)), ("`protocol`", ConstructorParameterDescription(self.`protocol`)), ("connections", ConstructorParameterDescription(self.connections)), ("startDate", ConstructorParameterDescription(self.startDate)), ("customParameters", ConstructorParameterDescription(self.customParameters))])
}
}
public class Cons_phoneCallAccepted: TypeConstructorDescription {
public var flags: Int32
public var id: Int64
public var accessHash: Int64
public var date: Int32
public var adminId: Int64
public var participantId: Int64
public var gB: Buffer
public var `protocol`: Api.PhoneCallProtocol
public init(flags: Int32, id: Int64, accessHash: Int64, date: Int32, adminId: Int64, participantId: Int64, gB: Buffer, `protocol`: Api.PhoneCallProtocol) {
self.flags = flags
self.id = id
self.accessHash = accessHash
self.date = date
self.adminId = adminId
self.participantId = participantId
self.gB = gB
self.`protocol` = `protocol`
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("phoneCallAccepted", [("flags", ConstructorParameterDescription(self.flags)), ("id", ConstructorParameterDescription(self.id)), ("accessHash", ConstructorParameterDescription(self.accessHash)), ("date", ConstructorParameterDescription(self.date)), ("adminId", ConstructorParameterDescription(self.adminId)), ("participantId", ConstructorParameterDescription(self.participantId)), ("gB", ConstructorParameterDescription(self.gB)), ("`protocol`", ConstructorParameterDescription(self.`protocol`))])
}
}
public class Cons_phoneCallDiscarded: TypeConstructorDescription {
public var flags: Int32
public var id: Int64
public var reason: Api.PhoneCallDiscardReason?
public var duration: Int32?
public init(flags: Int32, id: Int64, reason: Api.PhoneCallDiscardReason?, duration: Int32?) {
self.flags = flags
self.id = id
self.reason = reason
self.duration = duration
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("phoneCallDiscarded", [("flags", ConstructorParameterDescription(self.flags)), ("id", ConstructorParameterDescription(self.id)), ("reason", ConstructorParameterDescription(self.reason)), ("duration", ConstructorParameterDescription(self.duration))])
}
}
public class Cons_phoneCallEmpty: TypeConstructorDescription {
public var id: Int64
public init(id: Int64) {
self.id = id
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("phoneCallEmpty", [("id", ConstructorParameterDescription(self.id))])
}
}
public class Cons_phoneCallRequested: TypeConstructorDescription {
public var flags: Int32
public var id: Int64
public var accessHash: Int64
public var date: Int32
public var adminId: Int64
public var participantId: Int64
public var gAHash: Buffer
public var `protocol`: Api.PhoneCallProtocol
public init(flags: Int32, id: Int64, accessHash: Int64, date: Int32, adminId: Int64, participantId: Int64, gAHash: Buffer, `protocol`: Api.PhoneCallProtocol) {
self.flags = flags
self.id = id
self.accessHash = accessHash
self.date = date
self.adminId = adminId
self.participantId = participantId
self.gAHash = gAHash
self.`protocol` = `protocol`
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("phoneCallRequested", [("flags", ConstructorParameterDescription(self.flags)), ("id", ConstructorParameterDescription(self.id)), ("accessHash", ConstructorParameterDescription(self.accessHash)), ("date", ConstructorParameterDescription(self.date)), ("adminId", ConstructorParameterDescription(self.adminId)), ("participantId", ConstructorParameterDescription(self.participantId)), ("gAHash", ConstructorParameterDescription(self.gAHash)), ("`protocol`", ConstructorParameterDescription(self.`protocol`))])
}
}
public class Cons_phoneCallWaiting: TypeConstructorDescription {
public var flags: Int32
public var id: Int64
public var accessHash: Int64
public var date: Int32
public var adminId: Int64
public var participantId: Int64
public var `protocol`: Api.PhoneCallProtocol
public var receiveDate: Int32?
public init(flags: Int32, id: Int64, accessHash: Int64, date: Int32, adminId: Int64, participantId: Int64, `protocol`: Api.PhoneCallProtocol, receiveDate: Int32?) {
self.flags = flags
self.id = id
self.accessHash = accessHash
self.date = date
self.adminId = adminId
self.participantId = participantId
self.`protocol` = `protocol`
self.receiveDate = receiveDate
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("phoneCallWaiting", [("flags", ConstructorParameterDescription(self.flags)), ("id", ConstructorParameterDescription(self.id)), ("accessHash", ConstructorParameterDescription(self.accessHash)), ("date", ConstructorParameterDescription(self.date)), ("adminId", ConstructorParameterDescription(self.adminId)), ("participantId", ConstructorParameterDescription(self.participantId)), ("`protocol`", ConstructorParameterDescription(self.`protocol`)), ("receiveDate", ConstructorParameterDescription(self.receiveDate))])
}
}
case phoneCall(Cons_phoneCall)
case phoneCallAccepted(Cons_phoneCallAccepted)
case phoneCallDiscarded(Cons_phoneCallDiscarded)
case phoneCallEmpty(Cons_phoneCallEmpty)
case phoneCallRequested(Cons_phoneCallRequested)
case phoneCallWaiting(Cons_phoneCallWaiting)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .phoneCall(let _data):
if boxed {
buffer.appendInt32(810769141)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt64(_data.id, buffer: buffer, boxed: false)
serializeInt64(_data.accessHash, buffer: buffer, boxed: false)
serializeInt32(_data.date, buffer: buffer, boxed: false)
serializeInt64(_data.adminId, buffer: buffer, boxed: false)
serializeInt64(_data.participantId, buffer: buffer, boxed: false)
serializeBytes(_data.gAOrB, buffer: buffer, boxed: false)
serializeInt64(_data.keyFingerprint, buffer: buffer, boxed: false)
_data.`protocol`.serialize(buffer, true)
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.connections.count))
for item in _data.connections {
item.serialize(buffer, true)
}
serializeInt32(_data.startDate, buffer: buffer, boxed: false)
if Int(_data.flags) & Int(1 << 7) != 0 {
_data.customParameters!.serialize(buffer, true)
}
break
case .phoneCallAccepted(let _data):
if boxed {
buffer.appendInt32(912311057)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt64(_data.id, buffer: buffer, boxed: false)
serializeInt64(_data.accessHash, buffer: buffer, boxed: false)
serializeInt32(_data.date, buffer: buffer, boxed: false)
serializeInt64(_data.adminId, buffer: buffer, boxed: false)
serializeInt64(_data.participantId, buffer: buffer, boxed: false)
serializeBytes(_data.gB, buffer: buffer, boxed: false)
_data.`protocol`.serialize(buffer, true)
break
case .phoneCallDiscarded(let _data):
if boxed {
buffer.appendInt32(1355435489)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt64(_data.id, buffer: buffer, boxed: false)
if Int(_data.flags) & Int(1 << 0) != 0 {
_data.reason!.serialize(buffer, true)
}
if Int(_data.flags) & Int(1 << 1) != 0 {
serializeInt32(_data.duration!, buffer: buffer, boxed: false)
}
break
case .phoneCallEmpty(let _data):
if boxed {
buffer.appendInt32(1399245077)
}
serializeInt64(_data.id, buffer: buffer, boxed: false)
break
case .phoneCallRequested(let _data):
if boxed {
buffer.appendInt32(347139340)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt64(_data.id, buffer: buffer, boxed: false)
serializeInt64(_data.accessHash, buffer: buffer, boxed: false)
serializeInt32(_data.date, buffer: buffer, boxed: false)
serializeInt64(_data.adminId, buffer: buffer, boxed: false)
serializeInt64(_data.participantId, buffer: buffer, boxed: false)
serializeBytes(_data.gAHash, buffer: buffer, boxed: false)
_data.`protocol`.serialize(buffer, true)
break
case .phoneCallWaiting(let _data):
if boxed {
buffer.appendInt32(-987599081)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt64(_data.id, buffer: buffer, boxed: false)
serializeInt64(_data.accessHash, buffer: buffer, boxed: false)
serializeInt32(_data.date, buffer: buffer, boxed: false)
serializeInt64(_data.adminId, buffer: buffer, boxed: false)
serializeInt64(_data.participantId, buffer: buffer, boxed: false)
_data.`protocol`.serialize(buffer, true)
if Int(_data.flags) & Int(1 << 0) != 0 {
serializeInt32(_data.receiveDate!, buffer: buffer, boxed: false)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .phoneCall(let _data):
return ("phoneCall", [("flags", ConstructorParameterDescription(_data.flags)), ("id", ConstructorParameterDescription(_data.id)), ("accessHash", ConstructorParameterDescription(_data.accessHash)), ("date", ConstructorParameterDescription(_data.date)), ("adminId", ConstructorParameterDescription(_data.adminId)), ("participantId", ConstructorParameterDescription(_data.participantId)), ("gAOrB", ConstructorParameterDescription(_data.gAOrB)), ("keyFingerprint", ConstructorParameterDescription(_data.keyFingerprint)), ("`protocol`", ConstructorParameterDescription(_data.`protocol`)), ("connections", ConstructorParameterDescription(_data.connections)), ("startDate", ConstructorParameterDescription(_data.startDate)), ("customParameters", ConstructorParameterDescription(_data.customParameters))])
case .phoneCallAccepted(let _data):
return ("phoneCallAccepted", [("flags", ConstructorParameterDescription(_data.flags)), ("id", ConstructorParameterDescription(_data.id)), ("accessHash", ConstructorParameterDescription(_data.accessHash)), ("date", ConstructorParameterDescription(_data.date)), ("adminId", ConstructorParameterDescription(_data.adminId)), ("participantId", ConstructorParameterDescription(_data.participantId)), ("gB", ConstructorParameterDescription(_data.gB)), ("`protocol`", ConstructorParameterDescription(_data.`protocol`))])
case .phoneCallDiscarded(let _data):
return ("phoneCallDiscarded", [("flags", ConstructorParameterDescription(_data.flags)), ("id", ConstructorParameterDescription(_data.id)), ("reason", ConstructorParameterDescription(_data.reason)), ("duration", ConstructorParameterDescription(_data.duration))])
case .phoneCallEmpty(let _data):
return ("phoneCallEmpty", [("id", ConstructorParameterDescription(_data.id))])
case .phoneCallRequested(let _data):
return ("phoneCallRequested", [("flags", ConstructorParameterDescription(_data.flags)), ("id", ConstructorParameterDescription(_data.id)), ("accessHash", ConstructorParameterDescription(_data.accessHash)), ("date", ConstructorParameterDescription(_data.date)), ("adminId", ConstructorParameterDescription(_data.adminId)), ("participantId", ConstructorParameterDescription(_data.participantId)), ("gAHash", ConstructorParameterDescription(_data.gAHash)), ("`protocol`", ConstructorParameterDescription(_data.`protocol`))])
case .phoneCallWaiting(let _data):
return ("phoneCallWaiting", [("flags", ConstructorParameterDescription(_data.flags)), ("id", ConstructorParameterDescription(_data.id)), ("accessHash", ConstructorParameterDescription(_data.accessHash)), ("date", ConstructorParameterDescription(_data.date)), ("adminId", ConstructorParameterDescription(_data.adminId)), ("participantId", ConstructorParameterDescription(_data.participantId)), ("`protocol`", ConstructorParameterDescription(_data.`protocol`)), ("receiveDate", ConstructorParameterDescription(_data.receiveDate))])
}
}
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: Int64?
_5 = reader.readInt64()
var _6: Int64?
_6 = reader.readInt64()
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()
var _12: Api.DataJSON?
if Int(_1!) & Int(1 << 7) != 0 {
if let signature = reader.readInt32() {
_12 = Api.parse(reader, signature: signature) as? Api.DataJSON
}
}
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 = (Int(_1!) & Int(1 << 7) == 0) || _12 != nil
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 {
return Api.PhoneCall.phoneCall(Cons_phoneCall(flags: _1!, id: _2!, accessHash: _3!, date: _4!, adminId: _5!, participantId: _6!, gAOrB: _7!, keyFingerprint: _8!, protocol: _9!, connections: _10!, startDate: _11!, customParameters: _12))
}
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: Int64?
_5 = reader.readInt64()
var _6: Int64?
_6 = reader.readInt64()
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(Cons_phoneCallAccepted(flags: _1!, id: _2!, accessHash: _3!, date: _4!, adminId: _5!, participantId: _6!, gB: _7!, protocol: _8!))
}
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(Cons_phoneCallDiscarded(flags: _1!, id: _2!, reason: _3, duration: _4))
}
else {
return nil
}
}
public static func parse_phoneCallEmpty(_ reader: BufferReader) -> PhoneCall? {
var _1: Int64?
_1 = reader.readInt64()
let _c1 = _1 != nil
if _c1 {
return Api.PhoneCall.phoneCallEmpty(Cons_phoneCallEmpty(id: _1!))
}
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: Int64?
_5 = reader.readInt64()
var _6: Int64?
_6 = reader.readInt64()
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(Cons_phoneCallRequested(flags: _1!, id: _2!, accessHash: _3!, date: _4!, adminId: _5!, participantId: _6!, gAHash: _7!, protocol: _8!))
}
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: Int64?
_5 = reader.readInt64()
var _6: Int64?
_6 = reader.readInt64()
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(Cons_phoneCallWaiting(flags: _1!, id: _2!, accessHash: _3!, date: _4!, adminId: _5!, participantId: _6!, protocol: _7!, receiveDate: _8))
}
else {
return nil
}
}
}
}
public extension Api {
enum PhoneCallDiscardReason: TypeConstructorDescription {
public class Cons_phoneCallDiscardReasonMigrateConferenceCall: TypeConstructorDescription {
@ -1892,3 +1459,375 @@ public extension Api {
}
}
}
public extension Api {
enum PremiumSubscriptionOption: TypeConstructorDescription {
public class Cons_premiumSubscriptionOption: TypeConstructorDescription {
public var flags: Int32
public var transaction: String?
public var months: Int32
public var currency: String
public var amount: Int64
public var botUrl: String
public var storeProduct: String?
public init(flags: Int32, transaction: String?, months: Int32, currency: String, amount: Int64, botUrl: String, storeProduct: String?) {
self.flags = flags
self.transaction = transaction
self.months = months
self.currency = currency
self.amount = amount
self.botUrl = botUrl
self.storeProduct = storeProduct
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("premiumSubscriptionOption", [("flags", ConstructorParameterDescription(self.flags)), ("transaction", ConstructorParameterDescription(self.transaction)), ("months", ConstructorParameterDescription(self.months)), ("currency", ConstructorParameterDescription(self.currency)), ("amount", ConstructorParameterDescription(self.amount)), ("botUrl", ConstructorParameterDescription(self.botUrl)), ("storeProduct", ConstructorParameterDescription(self.storeProduct))])
}
}
case premiumSubscriptionOption(Cons_premiumSubscriptionOption)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .premiumSubscriptionOption(let _data):
if boxed {
buffer.appendInt32(1596792306)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
if Int(_data.flags) & Int(1 << 3) != 0 {
serializeString(_data.transaction!, buffer: buffer, boxed: false)
}
serializeInt32(_data.months, buffer: buffer, boxed: false)
serializeString(_data.currency, buffer: buffer, boxed: false)
serializeInt64(_data.amount, buffer: buffer, boxed: false)
serializeString(_data.botUrl, buffer: buffer, boxed: false)
if Int(_data.flags) & Int(1 << 0) != 0 {
serializeString(_data.storeProduct!, buffer: buffer, boxed: false)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .premiumSubscriptionOption(let _data):
return ("premiumSubscriptionOption", [("flags", ConstructorParameterDescription(_data.flags)), ("transaction", ConstructorParameterDescription(_data.transaction)), ("months", ConstructorParameterDescription(_data.months)), ("currency", ConstructorParameterDescription(_data.currency)), ("amount", ConstructorParameterDescription(_data.amount)), ("botUrl", ConstructorParameterDescription(_data.botUrl)), ("storeProduct", ConstructorParameterDescription(_data.storeProduct))])
}
}
public static func parse_premiumSubscriptionOption(_ reader: BufferReader) -> PremiumSubscriptionOption? {
var _1: Int32?
_1 = reader.readInt32()
var _2: String?
if Int(_1!) & Int(1 << 3) != 0 {
_2 = parseString(reader)
}
var _3: Int32?
_3 = reader.readInt32()
var _4: String?
_4 = parseString(reader)
var _5: Int64?
_5 = reader.readInt64()
var _6: String?
_6 = parseString(reader)
var _7: String?
if Int(_1!) & Int(1 << 0) != 0 {
_7 = parseString(reader)
}
let _c1 = _1 != nil
let _c2 = (Int(_1!) & Int(1 << 3) == 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 << 0) == 0) || _7 != nil
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 {
return Api.PremiumSubscriptionOption.premiumSubscriptionOption(Cons_premiumSubscriptionOption(flags: _1!, transaction: _2, months: _3!, currency: _4!, amount: _5!, botUrl: _6!, storeProduct: _7))
}
else {
return nil
}
}
}
}
public extension Api {
enum PrepaidGiveaway: TypeConstructorDescription {
public class Cons_prepaidGiveaway: TypeConstructorDescription {
public var id: Int64
public var months: Int32
public var quantity: Int32
public var date: Int32
public init(id: Int64, months: Int32, quantity: Int32, date: Int32) {
self.id = id
self.months = months
self.quantity = quantity
self.date = date
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("prepaidGiveaway", [("id", ConstructorParameterDescription(self.id)), ("months", ConstructorParameterDescription(self.months)), ("quantity", ConstructorParameterDescription(self.quantity)), ("date", ConstructorParameterDescription(self.date))])
}
}
public class Cons_prepaidStarsGiveaway: TypeConstructorDescription {
public var id: Int64
public var stars: Int64
public var quantity: Int32
public var boosts: Int32
public var date: Int32
public init(id: Int64, stars: Int64, quantity: Int32, boosts: Int32, date: Int32) {
self.id = id
self.stars = stars
self.quantity = quantity
self.boosts = boosts
self.date = date
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("prepaidStarsGiveaway", [("id", ConstructorParameterDescription(self.id)), ("stars", ConstructorParameterDescription(self.stars)), ("quantity", ConstructorParameterDescription(self.quantity)), ("boosts", ConstructorParameterDescription(self.boosts)), ("date", ConstructorParameterDescription(self.date))])
}
}
case prepaidGiveaway(Cons_prepaidGiveaway)
case prepaidStarsGiveaway(Cons_prepaidStarsGiveaway)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .prepaidGiveaway(let _data):
if boxed {
buffer.appendInt32(-1303143084)
}
serializeInt64(_data.id, buffer: buffer, boxed: false)
serializeInt32(_data.months, buffer: buffer, boxed: false)
serializeInt32(_data.quantity, buffer: buffer, boxed: false)
serializeInt32(_data.date, buffer: buffer, boxed: false)
break
case .prepaidStarsGiveaway(let _data):
if boxed {
buffer.appendInt32(-1700956192)
}
serializeInt64(_data.id, buffer: buffer, boxed: false)
serializeInt64(_data.stars, buffer: buffer, boxed: false)
serializeInt32(_data.quantity, buffer: buffer, boxed: false)
serializeInt32(_data.boosts, buffer: buffer, boxed: false)
serializeInt32(_data.date, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .prepaidGiveaway(let _data):
return ("prepaidGiveaway", [("id", ConstructorParameterDescription(_data.id)), ("months", ConstructorParameterDescription(_data.months)), ("quantity", ConstructorParameterDescription(_data.quantity)), ("date", ConstructorParameterDescription(_data.date))])
case .prepaidStarsGiveaway(let _data):
return ("prepaidStarsGiveaway", [("id", ConstructorParameterDescription(_data.id)), ("stars", ConstructorParameterDescription(_data.stars)), ("quantity", ConstructorParameterDescription(_data.quantity)), ("boosts", ConstructorParameterDescription(_data.boosts)), ("date", ConstructorParameterDescription(_data.date))])
}
}
public static func parse_prepaidGiveaway(_ reader: BufferReader) -> PrepaidGiveaway? {
var _1: Int64?
_1 = reader.readInt64()
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.PrepaidGiveaway.prepaidGiveaway(Cons_prepaidGiveaway(id: _1!, months: _2!, quantity: _3!, date: _4!))
}
else {
return nil
}
}
public static func parse_prepaidStarsGiveaway(_ reader: BufferReader) -> PrepaidGiveaway? {
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.PrepaidGiveaway.prepaidStarsGiveaway(Cons_prepaidStarsGiveaway(id: _1!, stars: _2!, quantity: _3!, boosts: _4!, date: _5!))
}
else {
return nil
}
}
}
}
public extension Api {
enum PrivacyKey: TypeConstructorDescription {
case privacyKeyAbout
case privacyKeyAddedByPhone
case privacyKeyBirthday
case privacyKeyChatInvite
case privacyKeyForwards
case privacyKeyNoPaidMessages
case privacyKeyPhoneCall
case privacyKeyPhoneNumber
case privacyKeyPhoneP2P
case privacyKeyProfilePhoto
case privacyKeySavedMusic
case privacyKeyStarGiftsAutoSave
case privacyKeyStatusTimestamp
case privacyKeyVoiceMessages
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .privacyKeyAbout:
if boxed {
buffer.appendInt32(-1534675103)
}
break
case .privacyKeyAddedByPhone:
if boxed {
buffer.appendInt32(1124062251)
}
break
case .privacyKeyBirthday:
if boxed {
buffer.appendInt32(536913176)
}
break
case .privacyKeyChatInvite:
if boxed {
buffer.appendInt32(1343122938)
}
break
case .privacyKeyForwards:
if boxed {
buffer.appendInt32(1777096355)
}
break
case .privacyKeyNoPaidMessages:
if boxed {
buffer.appendInt32(399722706)
}
break
case .privacyKeyPhoneCall:
if boxed {
buffer.appendInt32(1030105979)
}
break
case .privacyKeyPhoneNumber:
if boxed {
buffer.appendInt32(-778378131)
}
break
case .privacyKeyPhoneP2P:
if boxed {
buffer.appendInt32(961092808)
}
break
case .privacyKeyProfilePhoto:
if boxed {
buffer.appendInt32(-1777000467)
}
break
case .privacyKeySavedMusic:
if boxed {
buffer.appendInt32(-8759525)
}
break
case .privacyKeyStarGiftsAutoSave:
if boxed {
buffer.appendInt32(749010424)
}
break
case .privacyKeyStatusTimestamp:
if boxed {
buffer.appendInt32(-1137792208)
}
break
case .privacyKeyVoiceMessages:
if boxed {
buffer.appendInt32(110621716)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .privacyKeyAbout:
return ("privacyKeyAbout", [])
case .privacyKeyAddedByPhone:
return ("privacyKeyAddedByPhone", [])
case .privacyKeyBirthday:
return ("privacyKeyBirthday", [])
case .privacyKeyChatInvite:
return ("privacyKeyChatInvite", [])
case .privacyKeyForwards:
return ("privacyKeyForwards", [])
case .privacyKeyNoPaidMessages:
return ("privacyKeyNoPaidMessages", [])
case .privacyKeyPhoneCall:
return ("privacyKeyPhoneCall", [])
case .privacyKeyPhoneNumber:
return ("privacyKeyPhoneNumber", [])
case .privacyKeyPhoneP2P:
return ("privacyKeyPhoneP2P", [])
case .privacyKeyProfilePhoto:
return ("privacyKeyProfilePhoto", [])
case .privacyKeySavedMusic:
return ("privacyKeySavedMusic", [])
case .privacyKeyStarGiftsAutoSave:
return ("privacyKeyStarGiftsAutoSave", [])
case .privacyKeyStatusTimestamp:
return ("privacyKeyStatusTimestamp", [])
case .privacyKeyVoiceMessages:
return ("privacyKeyVoiceMessages", [])
}
}
public static func parse_privacyKeyAbout(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyAbout
}
public static func parse_privacyKeyAddedByPhone(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyAddedByPhone
}
public static func parse_privacyKeyBirthday(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyBirthday
}
public static func parse_privacyKeyChatInvite(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyChatInvite
}
public static func parse_privacyKeyForwards(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyForwards
}
public static func parse_privacyKeyNoPaidMessages(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyNoPaidMessages
}
public static func parse_privacyKeyPhoneCall(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyPhoneCall
}
public static func parse_privacyKeyPhoneNumber(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyPhoneNumber
}
public static func parse_privacyKeyPhoneP2P(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyPhoneP2P
}
public static func parse_privacyKeyProfilePhoto(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyProfilePhoto
}
public static func parse_privacyKeySavedMusic(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeySavedMusic
}
public static func parse_privacyKeyStarGiftsAutoSave(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyStarGiftsAutoSave
}
public static func parse_privacyKeyStatusTimestamp(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyStatusTimestamp
}
public static func parse_privacyKeyVoiceMessages(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyVoiceMessages
}
}
}

View file

@ -1,375 +1,3 @@
public extension Api {
enum PremiumSubscriptionOption: TypeConstructorDescription {
public class Cons_premiumSubscriptionOption: TypeConstructorDescription {
public var flags: Int32
public var transaction: String?
public var months: Int32
public var currency: String
public var amount: Int64
public var botUrl: String
public var storeProduct: String?
public init(flags: Int32, transaction: String?, months: Int32, currency: String, amount: Int64, botUrl: String, storeProduct: String?) {
self.flags = flags
self.transaction = transaction
self.months = months
self.currency = currency
self.amount = amount
self.botUrl = botUrl
self.storeProduct = storeProduct
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("premiumSubscriptionOption", [("flags", ConstructorParameterDescription(self.flags)), ("transaction", ConstructorParameterDescription(self.transaction)), ("months", ConstructorParameterDescription(self.months)), ("currency", ConstructorParameterDescription(self.currency)), ("amount", ConstructorParameterDescription(self.amount)), ("botUrl", ConstructorParameterDescription(self.botUrl)), ("storeProduct", ConstructorParameterDescription(self.storeProduct))])
}
}
case premiumSubscriptionOption(Cons_premiumSubscriptionOption)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .premiumSubscriptionOption(let _data):
if boxed {
buffer.appendInt32(1596792306)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
if Int(_data.flags) & Int(1 << 3) != 0 {
serializeString(_data.transaction!, buffer: buffer, boxed: false)
}
serializeInt32(_data.months, buffer: buffer, boxed: false)
serializeString(_data.currency, buffer: buffer, boxed: false)
serializeInt64(_data.amount, buffer: buffer, boxed: false)
serializeString(_data.botUrl, buffer: buffer, boxed: false)
if Int(_data.flags) & Int(1 << 0) != 0 {
serializeString(_data.storeProduct!, buffer: buffer, boxed: false)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .premiumSubscriptionOption(let _data):
return ("premiumSubscriptionOption", [("flags", ConstructorParameterDescription(_data.flags)), ("transaction", ConstructorParameterDescription(_data.transaction)), ("months", ConstructorParameterDescription(_data.months)), ("currency", ConstructorParameterDescription(_data.currency)), ("amount", ConstructorParameterDescription(_data.amount)), ("botUrl", ConstructorParameterDescription(_data.botUrl)), ("storeProduct", ConstructorParameterDescription(_data.storeProduct))])
}
}
public static func parse_premiumSubscriptionOption(_ reader: BufferReader) -> PremiumSubscriptionOption? {
var _1: Int32?
_1 = reader.readInt32()
var _2: String?
if Int(_1!) & Int(1 << 3) != 0 {
_2 = parseString(reader)
}
var _3: Int32?
_3 = reader.readInt32()
var _4: String?
_4 = parseString(reader)
var _5: Int64?
_5 = reader.readInt64()
var _6: String?
_6 = parseString(reader)
var _7: String?
if Int(_1!) & Int(1 << 0) != 0 {
_7 = parseString(reader)
}
let _c1 = _1 != nil
let _c2 = (Int(_1!) & Int(1 << 3) == 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 << 0) == 0) || _7 != nil
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 {
return Api.PremiumSubscriptionOption.premiumSubscriptionOption(Cons_premiumSubscriptionOption(flags: _1!, transaction: _2, months: _3!, currency: _4!, amount: _5!, botUrl: _6!, storeProduct: _7))
}
else {
return nil
}
}
}
}
public extension Api {
enum PrepaidGiveaway: TypeConstructorDescription {
public class Cons_prepaidGiveaway: TypeConstructorDescription {
public var id: Int64
public var months: Int32
public var quantity: Int32
public var date: Int32
public init(id: Int64, months: Int32, quantity: Int32, date: Int32) {
self.id = id
self.months = months
self.quantity = quantity
self.date = date
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("prepaidGiveaway", [("id", ConstructorParameterDescription(self.id)), ("months", ConstructorParameterDescription(self.months)), ("quantity", ConstructorParameterDescription(self.quantity)), ("date", ConstructorParameterDescription(self.date))])
}
}
public class Cons_prepaidStarsGiveaway: TypeConstructorDescription {
public var id: Int64
public var stars: Int64
public var quantity: Int32
public var boosts: Int32
public var date: Int32
public init(id: Int64, stars: Int64, quantity: Int32, boosts: Int32, date: Int32) {
self.id = id
self.stars = stars
self.quantity = quantity
self.boosts = boosts
self.date = date
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("prepaidStarsGiveaway", [("id", ConstructorParameterDescription(self.id)), ("stars", ConstructorParameterDescription(self.stars)), ("quantity", ConstructorParameterDescription(self.quantity)), ("boosts", ConstructorParameterDescription(self.boosts)), ("date", ConstructorParameterDescription(self.date))])
}
}
case prepaidGiveaway(Cons_prepaidGiveaway)
case prepaidStarsGiveaway(Cons_prepaidStarsGiveaway)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .prepaidGiveaway(let _data):
if boxed {
buffer.appendInt32(-1303143084)
}
serializeInt64(_data.id, buffer: buffer, boxed: false)
serializeInt32(_data.months, buffer: buffer, boxed: false)
serializeInt32(_data.quantity, buffer: buffer, boxed: false)
serializeInt32(_data.date, buffer: buffer, boxed: false)
break
case .prepaidStarsGiveaway(let _data):
if boxed {
buffer.appendInt32(-1700956192)
}
serializeInt64(_data.id, buffer: buffer, boxed: false)
serializeInt64(_data.stars, buffer: buffer, boxed: false)
serializeInt32(_data.quantity, buffer: buffer, boxed: false)
serializeInt32(_data.boosts, buffer: buffer, boxed: false)
serializeInt32(_data.date, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .prepaidGiveaway(let _data):
return ("prepaidGiveaway", [("id", ConstructorParameterDescription(_data.id)), ("months", ConstructorParameterDescription(_data.months)), ("quantity", ConstructorParameterDescription(_data.quantity)), ("date", ConstructorParameterDescription(_data.date))])
case .prepaidStarsGiveaway(let _data):
return ("prepaidStarsGiveaway", [("id", ConstructorParameterDescription(_data.id)), ("stars", ConstructorParameterDescription(_data.stars)), ("quantity", ConstructorParameterDescription(_data.quantity)), ("boosts", ConstructorParameterDescription(_data.boosts)), ("date", ConstructorParameterDescription(_data.date))])
}
}
public static func parse_prepaidGiveaway(_ reader: BufferReader) -> PrepaidGiveaway? {
var _1: Int64?
_1 = reader.readInt64()
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.PrepaidGiveaway.prepaidGiveaway(Cons_prepaidGiveaway(id: _1!, months: _2!, quantity: _3!, date: _4!))
}
else {
return nil
}
}
public static func parse_prepaidStarsGiveaway(_ reader: BufferReader) -> PrepaidGiveaway? {
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.PrepaidGiveaway.prepaidStarsGiveaway(Cons_prepaidStarsGiveaway(id: _1!, stars: _2!, quantity: _3!, boosts: _4!, date: _5!))
}
else {
return nil
}
}
}
}
public extension Api {
enum PrivacyKey: TypeConstructorDescription {
case privacyKeyAbout
case privacyKeyAddedByPhone
case privacyKeyBirthday
case privacyKeyChatInvite
case privacyKeyForwards
case privacyKeyNoPaidMessages
case privacyKeyPhoneCall
case privacyKeyPhoneNumber
case privacyKeyPhoneP2P
case privacyKeyProfilePhoto
case privacyKeySavedMusic
case privacyKeyStarGiftsAutoSave
case privacyKeyStatusTimestamp
case privacyKeyVoiceMessages
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .privacyKeyAbout:
if boxed {
buffer.appendInt32(-1534675103)
}
break
case .privacyKeyAddedByPhone:
if boxed {
buffer.appendInt32(1124062251)
}
break
case .privacyKeyBirthday:
if boxed {
buffer.appendInt32(536913176)
}
break
case .privacyKeyChatInvite:
if boxed {
buffer.appendInt32(1343122938)
}
break
case .privacyKeyForwards:
if boxed {
buffer.appendInt32(1777096355)
}
break
case .privacyKeyNoPaidMessages:
if boxed {
buffer.appendInt32(399722706)
}
break
case .privacyKeyPhoneCall:
if boxed {
buffer.appendInt32(1030105979)
}
break
case .privacyKeyPhoneNumber:
if boxed {
buffer.appendInt32(-778378131)
}
break
case .privacyKeyPhoneP2P:
if boxed {
buffer.appendInt32(961092808)
}
break
case .privacyKeyProfilePhoto:
if boxed {
buffer.appendInt32(-1777000467)
}
break
case .privacyKeySavedMusic:
if boxed {
buffer.appendInt32(-8759525)
}
break
case .privacyKeyStarGiftsAutoSave:
if boxed {
buffer.appendInt32(749010424)
}
break
case .privacyKeyStatusTimestamp:
if boxed {
buffer.appendInt32(-1137792208)
}
break
case .privacyKeyVoiceMessages:
if boxed {
buffer.appendInt32(110621716)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .privacyKeyAbout:
return ("privacyKeyAbout", [])
case .privacyKeyAddedByPhone:
return ("privacyKeyAddedByPhone", [])
case .privacyKeyBirthday:
return ("privacyKeyBirthday", [])
case .privacyKeyChatInvite:
return ("privacyKeyChatInvite", [])
case .privacyKeyForwards:
return ("privacyKeyForwards", [])
case .privacyKeyNoPaidMessages:
return ("privacyKeyNoPaidMessages", [])
case .privacyKeyPhoneCall:
return ("privacyKeyPhoneCall", [])
case .privacyKeyPhoneNumber:
return ("privacyKeyPhoneNumber", [])
case .privacyKeyPhoneP2P:
return ("privacyKeyPhoneP2P", [])
case .privacyKeyProfilePhoto:
return ("privacyKeyProfilePhoto", [])
case .privacyKeySavedMusic:
return ("privacyKeySavedMusic", [])
case .privacyKeyStarGiftsAutoSave:
return ("privacyKeyStarGiftsAutoSave", [])
case .privacyKeyStatusTimestamp:
return ("privacyKeyStatusTimestamp", [])
case .privacyKeyVoiceMessages:
return ("privacyKeyVoiceMessages", [])
}
}
public static func parse_privacyKeyAbout(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyAbout
}
public static func parse_privacyKeyAddedByPhone(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyAddedByPhone
}
public static func parse_privacyKeyBirthday(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyBirthday
}
public static func parse_privacyKeyChatInvite(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyChatInvite
}
public static func parse_privacyKeyForwards(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyForwards
}
public static func parse_privacyKeyNoPaidMessages(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyNoPaidMessages
}
public static func parse_privacyKeyPhoneCall(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyPhoneCall
}
public static func parse_privacyKeyPhoneNumber(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyPhoneNumber
}
public static func parse_privacyKeyPhoneP2P(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyPhoneP2P
}
public static func parse_privacyKeyProfilePhoto(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyProfilePhoto
}
public static func parse_privacyKeySavedMusic(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeySavedMusic
}
public static func parse_privacyKeyStarGiftsAutoSave(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyStarGiftsAutoSave
}
public static func parse_privacyKeyStatusTimestamp(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyStatusTimestamp
}
public static func parse_privacyKeyVoiceMessages(_ reader: BufferReader) -> PrivacyKey? {
return Api.PrivacyKey.privacyKeyVoiceMessages
}
}
}
public extension Api {
enum PrivacyRule: TypeConstructorDescription {
public class Cons_privacyValueAllowChatParticipants: TypeConstructorDescription {
@ -716,3 +344,496 @@ public extension Api {
}
}
}
public extension Api {
indirect enum PublicForward: TypeConstructorDescription {
public class Cons_publicForwardMessage: TypeConstructorDescription {
public var message: Api.Message
public init(message: Api.Message) {
self.message = message
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("publicForwardMessage", [("message", ConstructorParameterDescription(self.message))])
}
}
public class Cons_publicForwardStory: TypeConstructorDescription {
public var peer: Api.Peer
public var story: Api.StoryItem
public init(peer: Api.Peer, story: Api.StoryItem) {
self.peer = peer
self.story = story
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("publicForwardStory", [("peer", ConstructorParameterDescription(self.peer)), ("story", ConstructorParameterDescription(self.story))])
}
}
case publicForwardMessage(Cons_publicForwardMessage)
case publicForwardStory(Cons_publicForwardStory)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .publicForwardMessage(let _data):
if boxed {
buffer.appendInt32(32685898)
}
_data.message.serialize(buffer, true)
break
case .publicForwardStory(let _data):
if boxed {
buffer.appendInt32(-302797360)
}
_data.peer.serialize(buffer, true)
_data.story.serialize(buffer, true)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .publicForwardMessage(let _data):
return ("publicForwardMessage", [("message", ConstructorParameterDescription(_data.message))])
case .publicForwardStory(let _data):
return ("publicForwardStory", [("peer", ConstructorParameterDescription(_data.peer)), ("story", ConstructorParameterDescription(_data.story))])
}
}
public static func parse_publicForwardMessage(_ reader: BufferReader) -> PublicForward? {
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.PublicForward.publicForwardMessage(Cons_publicForwardMessage(message: _1!))
}
else {
return nil
}
}
public static func parse_publicForwardStory(_ reader: BufferReader) -> PublicForward? {
var _1: Api.Peer?
if let signature = reader.readInt32() {
_1 = Api.parse(reader, signature: signature) as? Api.Peer
}
var _2: Api.StoryItem?
if let signature = reader.readInt32() {
_2 = Api.parse(reader, signature: signature) as? Api.StoryItem
}
let _c1 = _1 != nil
let _c2 = _2 != nil
if _c1 && _c2 {
return Api.PublicForward.publicForwardStory(Cons_publicForwardStory(peer: _1!, story: _2!))
}
else {
return nil
}
}
}
}
public extension Api {
enum QuickReply: TypeConstructorDescription {
public class Cons_quickReply: TypeConstructorDescription {
public var shortcutId: Int32
public var shortcut: String
public var topMessage: Int32
public var count: Int32
public init(shortcutId: Int32, shortcut: String, topMessage: Int32, count: Int32) {
self.shortcutId = shortcutId
self.shortcut = shortcut
self.topMessage = topMessage
self.count = count
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("quickReply", [("shortcutId", ConstructorParameterDescription(self.shortcutId)), ("shortcut", ConstructorParameterDescription(self.shortcut)), ("topMessage", ConstructorParameterDescription(self.topMessage)), ("count", ConstructorParameterDescription(self.count))])
}
}
case quickReply(Cons_quickReply)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .quickReply(let _data):
if boxed {
buffer.appendInt32(110563371)
}
serializeInt32(_data.shortcutId, buffer: buffer, boxed: false)
serializeString(_data.shortcut, buffer: buffer, boxed: false)
serializeInt32(_data.topMessage, buffer: buffer, boxed: false)
serializeInt32(_data.count, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .quickReply(let _data):
return ("quickReply", [("shortcutId", ConstructorParameterDescription(_data.shortcutId)), ("shortcut", ConstructorParameterDescription(_data.shortcut)), ("topMessage", ConstructorParameterDescription(_data.topMessage)), ("count", ConstructorParameterDescription(_data.count))])
}
}
public static func parse_quickReply(_ reader: BufferReader) -> QuickReply? {
var _1: Int32?
_1 = reader.readInt32()
var _2: String?
_2 = parseString(reader)
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.QuickReply.quickReply(Cons_quickReply(shortcutId: _1!, shortcut: _2!, topMessage: _3!, count: _4!))
}
else {
return nil
}
}
}
}
public extension Api {
enum Reaction: TypeConstructorDescription {
public class Cons_reactionCustomEmoji: TypeConstructorDescription {
public var documentId: Int64
public init(documentId: Int64) {
self.documentId = documentId
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("reactionCustomEmoji", [("documentId", ConstructorParameterDescription(self.documentId))])
}
}
public class Cons_reactionEmoji: TypeConstructorDescription {
public var emoticon: String
public init(emoticon: String) {
self.emoticon = emoticon
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("reactionEmoji", [("emoticon", ConstructorParameterDescription(self.emoticon))])
}
}
case reactionCustomEmoji(Cons_reactionCustomEmoji)
case reactionEmoji(Cons_reactionEmoji)
case reactionEmpty
case reactionPaid
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .reactionCustomEmoji(let _data):
if boxed {
buffer.appendInt32(-1992950669)
}
serializeInt64(_data.documentId, buffer: buffer, boxed: false)
break
case .reactionEmoji(let _data):
if boxed {
buffer.appendInt32(455247544)
}
serializeString(_data.emoticon, buffer: buffer, boxed: false)
break
case .reactionEmpty:
if boxed {
buffer.appendInt32(2046153753)
}
break
case .reactionPaid:
if boxed {
buffer.appendInt32(1379771627)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .reactionCustomEmoji(let _data):
return ("reactionCustomEmoji", [("documentId", ConstructorParameterDescription(_data.documentId))])
case .reactionEmoji(let _data):
return ("reactionEmoji", [("emoticon", ConstructorParameterDescription(_data.emoticon))])
case .reactionEmpty:
return ("reactionEmpty", [])
case .reactionPaid:
return ("reactionPaid", [])
}
}
public static func parse_reactionCustomEmoji(_ reader: BufferReader) -> Reaction? {
var _1: Int64?
_1 = reader.readInt64()
let _c1 = _1 != nil
if _c1 {
return Api.Reaction.reactionCustomEmoji(Cons_reactionCustomEmoji(documentId: _1!))
}
else {
return nil
}
}
public static func parse_reactionEmoji(_ reader: BufferReader) -> Reaction? {
var _1: String?
_1 = parseString(reader)
let _c1 = _1 != nil
if _c1 {
return Api.Reaction.reactionEmoji(Cons_reactionEmoji(emoticon: _1!))
}
else {
return nil
}
}
public static func parse_reactionEmpty(_ reader: BufferReader) -> Reaction? {
return Api.Reaction.reactionEmpty
}
public static func parse_reactionPaid(_ reader: BufferReader) -> Reaction? {
return Api.Reaction.reactionPaid
}
}
}
public extension Api {
enum ReactionCount: TypeConstructorDescription {
public class Cons_reactionCount: TypeConstructorDescription {
public var flags: Int32
public var chosenOrder: Int32?
public var reaction: Api.Reaction
public var count: Int32
public init(flags: Int32, chosenOrder: Int32?, reaction: Api.Reaction, count: Int32) {
self.flags = flags
self.chosenOrder = chosenOrder
self.reaction = reaction
self.count = count
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("reactionCount", [("flags", ConstructorParameterDescription(self.flags)), ("chosenOrder", ConstructorParameterDescription(self.chosenOrder)), ("reaction", ConstructorParameterDescription(self.reaction)), ("count", ConstructorParameterDescription(self.count))])
}
}
case reactionCount(Cons_reactionCount)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .reactionCount(let _data):
if boxed {
buffer.appendInt32(-1546531968)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
if Int(_data.flags) & Int(1 << 0) != 0 {
serializeInt32(_data.chosenOrder!, buffer: buffer, boxed: false)
}
_data.reaction.serialize(buffer, true)
serializeInt32(_data.count, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .reactionCount(let _data):
return ("reactionCount", [("flags", ConstructorParameterDescription(_data.flags)), ("chosenOrder", ConstructorParameterDescription(_data.chosenOrder)), ("reaction", ConstructorParameterDescription(_data.reaction)), ("count", ConstructorParameterDescription(_data.count))])
}
}
public static func parse_reactionCount(_ reader: BufferReader) -> ReactionCount? {
var _1: Int32?
_1 = reader.readInt32()
var _2: Int32?
if Int(_1!) & Int(1 << 0) != 0 {
_2 = reader.readInt32()
}
var _3: Api.Reaction?
if let signature = reader.readInt32() {
_3 = Api.parse(reader, signature: signature) as? Api.Reaction
}
var _4: Int32?
_4 = reader.readInt32()
let _c1 = _1 != nil
let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil
let _c3 = _3 != nil
let _c4 = _4 != nil
if _c1 && _c2 && _c3 && _c4 {
return Api.ReactionCount.reactionCount(Cons_reactionCount(flags: _1!, chosenOrder: _2, reaction: _3!, count: _4!))
}
else {
return nil
}
}
}
}
public extension Api {
enum ReactionNotificationsFrom: TypeConstructorDescription {
case reactionNotificationsFromAll
case reactionNotificationsFromContacts
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .reactionNotificationsFromAll:
if boxed {
buffer.appendInt32(1268654752)
}
break
case .reactionNotificationsFromContacts:
if boxed {
buffer.appendInt32(-1161583078)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .reactionNotificationsFromAll:
return ("reactionNotificationsFromAll", [])
case .reactionNotificationsFromContacts:
return ("reactionNotificationsFromContacts", [])
}
}
public static func parse_reactionNotificationsFromAll(_ reader: BufferReader) -> ReactionNotificationsFrom? {
return Api.ReactionNotificationsFrom.reactionNotificationsFromAll
}
public static func parse_reactionNotificationsFromContacts(_ reader: BufferReader) -> ReactionNotificationsFrom? {
return Api.ReactionNotificationsFrom.reactionNotificationsFromContacts
}
}
}
public extension Api {
enum ReactionsNotifySettings: TypeConstructorDescription {
public class Cons_reactionsNotifySettings: TypeConstructorDescription {
public var flags: Int32
public var messagesNotifyFrom: Api.ReactionNotificationsFrom?
public var storiesNotifyFrom: Api.ReactionNotificationsFrom?
public var pollVotesNotifyFrom: Api.ReactionNotificationsFrom?
public var sound: Api.NotificationSound
public var showPreviews: Api.Bool
public init(flags: Int32, messagesNotifyFrom: Api.ReactionNotificationsFrom?, storiesNotifyFrom: Api.ReactionNotificationsFrom?, pollVotesNotifyFrom: Api.ReactionNotificationsFrom?, sound: Api.NotificationSound, showPreviews: Api.Bool) {
self.flags = flags
self.messagesNotifyFrom = messagesNotifyFrom
self.storiesNotifyFrom = storiesNotifyFrom
self.pollVotesNotifyFrom = pollVotesNotifyFrom
self.sound = sound
self.showPreviews = showPreviews
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("reactionsNotifySettings", [("flags", ConstructorParameterDescription(self.flags)), ("messagesNotifyFrom", ConstructorParameterDescription(self.messagesNotifyFrom)), ("storiesNotifyFrom", ConstructorParameterDescription(self.storiesNotifyFrom)), ("pollVotesNotifyFrom", ConstructorParameterDescription(self.pollVotesNotifyFrom)), ("sound", ConstructorParameterDescription(self.sound)), ("showPreviews", ConstructorParameterDescription(self.showPreviews))])
}
}
case reactionsNotifySettings(Cons_reactionsNotifySettings)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .reactionsNotifySettings(let _data):
if boxed {
buffer.appendInt32(1910827608)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
if Int(_data.flags) & Int(1 << 0) != 0 {
_data.messagesNotifyFrom!.serialize(buffer, true)
}
if Int(_data.flags) & Int(1 << 1) != 0 {
_data.storiesNotifyFrom!.serialize(buffer, true)
}
if Int(_data.flags) & Int(1 << 2) != 0 {
_data.pollVotesNotifyFrom!.serialize(buffer, true)
}
_data.sound.serialize(buffer, true)
_data.showPreviews.serialize(buffer, true)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .reactionsNotifySettings(let _data):
return ("reactionsNotifySettings", [("flags", ConstructorParameterDescription(_data.flags)), ("messagesNotifyFrom", ConstructorParameterDescription(_data.messagesNotifyFrom)), ("storiesNotifyFrom", ConstructorParameterDescription(_data.storiesNotifyFrom)), ("pollVotesNotifyFrom", ConstructorParameterDescription(_data.pollVotesNotifyFrom)), ("sound", ConstructorParameterDescription(_data.sound)), ("showPreviews", ConstructorParameterDescription(_data.showPreviews))])
}
}
public static func parse_reactionsNotifySettings(_ reader: BufferReader) -> ReactionsNotifySettings? {
var _1: Int32?
_1 = reader.readInt32()
var _2: Api.ReactionNotificationsFrom?
if Int(_1!) & Int(1 << 0) != 0 {
if let signature = reader.readInt32() {
_2 = Api.parse(reader, signature: signature) as? Api.ReactionNotificationsFrom
}
}
var _3: Api.ReactionNotificationsFrom?
if Int(_1!) & Int(1 << 1) != 0 {
if let signature = reader.readInt32() {
_3 = Api.parse(reader, signature: signature) as? Api.ReactionNotificationsFrom
}
}
var _4: Api.ReactionNotificationsFrom?
if Int(_1!) & Int(1 << 2) != 0 {
if let signature = reader.readInt32() {
_4 = Api.parse(reader, signature: signature) as? Api.ReactionNotificationsFrom
}
}
var _5: Api.NotificationSound?
if let signature = reader.readInt32() {
_5 = Api.parse(reader, signature: signature) as? Api.NotificationSound
}
var _6: Api.Bool?
if let signature = reader.readInt32() {
_6 = Api.parse(reader, signature: signature) as? Api.Bool
}
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 = _5 != nil
let _c6 = _6 != nil
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 {
return Api.ReactionsNotifySettings.reactionsNotifySettings(Cons_reactionsNotifySettings(flags: _1!, messagesNotifyFrom: _2, storiesNotifyFrom: _3, pollVotesNotifyFrom: _4, sound: _5!, showPreviews: _6!))
}
else {
return nil
}
}
}
}
public extension Api {
enum ReadParticipantDate: TypeConstructorDescription {
public class Cons_readParticipantDate: TypeConstructorDescription {
public var userId: Int64
public var date: Int32
public init(userId: Int64, date: Int32) {
self.userId = userId
self.date = date
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("readParticipantDate", [("userId", ConstructorParameterDescription(self.userId)), ("date", ConstructorParameterDescription(self.date))])
}
}
case readParticipantDate(Cons_readParticipantDate)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .readParticipantDate(let _data):
if boxed {
buffer.appendInt32(1246753138)
}
serializeInt64(_data.userId, buffer: buffer, boxed: false)
serializeInt32(_data.date, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .readParticipantDate(let _data):
return ("readParticipantDate", [("userId", ConstructorParameterDescription(_data.userId)), ("date", ConstructorParameterDescription(_data.date))])
}
}
public static func parse_readParticipantDate(_ reader: BufferReader) -> ReadParticipantDate? {
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.ReadParticipantDate.readParticipantDate(Cons_readParticipantDate(userId: _1!, date: _2!))
}
else {
return nil
}
}
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,611 +1,3 @@
public extension Api {
enum Theme: TypeConstructorDescription {
public class Cons_theme: TypeConstructorDescription {
public var flags: Int32
public var id: Int64
public var accessHash: Int64
public var slug: String
public var title: String
public var document: Api.Document?
public var settings: [Api.ThemeSettings]?
public var emoticon: String?
public var installsCount: Int32?
public init(flags: Int32, id: Int64, accessHash: Int64, slug: String, title: String, document: Api.Document?, settings: [Api.ThemeSettings]?, emoticon: String?, installsCount: Int32?) {
self.flags = flags
self.id = id
self.accessHash = accessHash
self.slug = slug
self.title = title
self.document = document
self.settings = settings
self.emoticon = emoticon
self.installsCount = installsCount
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("theme", [("flags", ConstructorParameterDescription(self.flags)), ("id", ConstructorParameterDescription(self.id)), ("accessHash", ConstructorParameterDescription(self.accessHash)), ("slug", ConstructorParameterDescription(self.slug)), ("title", ConstructorParameterDescription(self.title)), ("document", ConstructorParameterDescription(self.document)), ("settings", ConstructorParameterDescription(self.settings)), ("emoticon", ConstructorParameterDescription(self.emoticon)), ("installsCount", ConstructorParameterDescription(self.installsCount))])
}
}
case theme(Cons_theme)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .theme(let _data):
if boxed {
buffer.appendInt32(-1609668650)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt64(_data.id, buffer: buffer, boxed: false)
serializeInt64(_data.accessHash, buffer: buffer, boxed: false)
serializeString(_data.slug, buffer: buffer, boxed: false)
serializeString(_data.title, buffer: buffer, boxed: false)
if Int(_data.flags) & Int(1 << 2) != 0 {
_data.document!.serialize(buffer, true)
}
if Int(_data.flags) & Int(1 << 3) != 0 {
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.settings!.count))
for item in _data.settings! {
item.serialize(buffer, true)
}
}
if Int(_data.flags) & Int(1 << 6) != 0 {
serializeString(_data.emoticon!, buffer: buffer, boxed: false)
}
if Int(_data.flags) & Int(1 << 4) != 0 {
serializeInt32(_data.installsCount!, buffer: buffer, boxed: false)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .theme(let _data):
return ("theme", [("flags", ConstructorParameterDescription(_data.flags)), ("id", ConstructorParameterDescription(_data.id)), ("accessHash", ConstructorParameterDescription(_data.accessHash)), ("slug", ConstructorParameterDescription(_data.slug)), ("title", ConstructorParameterDescription(_data.title)), ("document", ConstructorParameterDescription(_data.document)), ("settings", ConstructorParameterDescription(_data.settings)), ("emoticon", ConstructorParameterDescription(_data.emoticon)), ("installsCount", ConstructorParameterDescription(_data.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 _ = reader.readInt32() {
_7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ThemeSettings.self)
}
}
var _8: String?
if Int(_1!) & Int(1 << 6) != 0 {
_8 = parseString(reader)
}
var _9: Int32?
if Int(_1!) & Int(1 << 4) != 0 {
_9 = 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 = (Int(_1!) & Int(1 << 6) == 0) || _8 != nil
let _c9 = (Int(_1!) & Int(1 << 4) == 0) || _9 != nil
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 {
return Api.Theme.theme(Cons_theme(flags: _1!, id: _2!, accessHash: _3!, slug: _4!, title: _5!, document: _6, settings: _7, emoticon: _8, installsCount: _9))
}
else {
return nil
}
}
}
}
public extension Api {
enum ThemeSettings: TypeConstructorDescription {
public class Cons_themeSettings: TypeConstructorDescription {
public var flags: Int32
public var baseTheme: Api.BaseTheme
public var accentColor: Int32
public var outboxAccentColor: Int32?
public var messageColors: [Int32]?
public var wallpaper: Api.WallPaper?
public init(flags: Int32, baseTheme: Api.BaseTheme, accentColor: Int32, outboxAccentColor: Int32?, messageColors: [Int32]?, wallpaper: Api.WallPaper?) {
self.flags = flags
self.baseTheme = baseTheme
self.accentColor = accentColor
self.outboxAccentColor = outboxAccentColor
self.messageColors = messageColors
self.wallpaper = wallpaper
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("themeSettings", [("flags", ConstructorParameterDescription(self.flags)), ("baseTheme", ConstructorParameterDescription(self.baseTheme)), ("accentColor", ConstructorParameterDescription(self.accentColor)), ("outboxAccentColor", ConstructorParameterDescription(self.outboxAccentColor)), ("messageColors", ConstructorParameterDescription(self.messageColors)), ("wallpaper", ConstructorParameterDescription(self.wallpaper))])
}
}
case themeSettings(Cons_themeSettings)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .themeSettings(let _data):
if boxed {
buffer.appendInt32(-94849324)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
_data.baseTheme.serialize(buffer, true)
serializeInt32(_data.accentColor, buffer: buffer, boxed: false)
if Int(_data.flags) & Int(1 << 3) != 0 {
serializeInt32(_data.outboxAccentColor!, buffer: buffer, boxed: false)
}
if Int(_data.flags) & Int(1 << 0) != 0 {
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.messageColors!.count))
for item in _data.messageColors! {
serializeInt32(item, buffer: buffer, boxed: false)
}
}
if Int(_data.flags) & Int(1 << 1) != 0 {
_data.wallpaper!.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .themeSettings(let _data):
return ("themeSettings", [("flags", ConstructorParameterDescription(_data.flags)), ("baseTheme", ConstructorParameterDescription(_data.baseTheme)), ("accentColor", ConstructorParameterDescription(_data.accentColor)), ("outboxAccentColor", ConstructorParameterDescription(_data.outboxAccentColor)), ("messageColors", ConstructorParameterDescription(_data.messageColors)), ("wallpaper", ConstructorParameterDescription(_data.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 << 3) != 0 {
_4 = reader.readInt32()
}
var _5: [Int32]?
if Int(_1!) & Int(1 << 0) != 0 {
if let _ = reader.readInt32() {
_5 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self)
}
}
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 << 3) == 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(Cons_themeSettings(flags: _1!, baseTheme: _2!, accentColor: _3!, outboxAccentColor: _4, messageColors: _5, wallpaper: _6))
}
else {
return nil
}
}
}
}
public extension Api {
enum Timezone: TypeConstructorDescription {
public class Cons_timezone: TypeConstructorDescription {
public var id: String
public var name: String
public var utcOffset: Int32
public init(id: String, name: String, utcOffset: Int32) {
self.id = id
self.name = name
self.utcOffset = utcOffset
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("timezone", [("id", ConstructorParameterDescription(self.id)), ("name", ConstructorParameterDescription(self.name)), ("utcOffset", ConstructorParameterDescription(self.utcOffset))])
}
}
case timezone(Cons_timezone)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .timezone(let _data):
if boxed {
buffer.appendInt32(-7173643)
}
serializeString(_data.id, buffer: buffer, boxed: false)
serializeString(_data.name, buffer: buffer, boxed: false)
serializeInt32(_data.utcOffset, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .timezone(let _data):
return ("timezone", [("id", ConstructorParameterDescription(_data.id)), ("name", ConstructorParameterDescription(_data.name)), ("utcOffset", ConstructorParameterDescription(_data.utcOffset))])
}
}
public static func parse_timezone(_ reader: BufferReader) -> Timezone? {
var _1: String?
_1 = parseString(reader)
var _2: String?
_2 = parseString(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.Timezone.timezone(Cons_timezone(id: _1!, name: _2!, utcOffset: _3!))
}
else {
return nil
}
}
}
}
public extension Api {
enum TodoCompletion: TypeConstructorDescription {
public class Cons_todoCompletion: TypeConstructorDescription {
public var id: Int32
public var completedBy: Api.Peer
public var date: Int32
public init(id: Int32, completedBy: Api.Peer, date: Int32) {
self.id = id
self.completedBy = completedBy
self.date = date
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("todoCompletion", [("id", ConstructorParameterDescription(self.id)), ("completedBy", ConstructorParameterDescription(self.completedBy)), ("date", ConstructorParameterDescription(self.date))])
}
}
case todoCompletion(Cons_todoCompletion)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .todoCompletion(let _data):
if boxed {
buffer.appendInt32(572241380)
}
serializeInt32(_data.id, buffer: buffer, boxed: false)
_data.completedBy.serialize(buffer, true)
serializeInt32(_data.date, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .todoCompletion(let _data):
return ("todoCompletion", [("id", ConstructorParameterDescription(_data.id)), ("completedBy", ConstructorParameterDescription(_data.completedBy)), ("date", ConstructorParameterDescription(_data.date))])
}
}
public static func parse_todoCompletion(_ reader: BufferReader) -> TodoCompletion? {
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()
let _c1 = _1 != nil
let _c2 = _2 != nil
let _c3 = _3 != nil
if _c1 && _c2 && _c3 {
return Api.TodoCompletion.todoCompletion(Cons_todoCompletion(id: _1!, completedBy: _2!, date: _3!))
}
else {
return nil
}
}
}
}
public extension Api {
enum TodoItem: TypeConstructorDescription {
public class Cons_todoItem: TypeConstructorDescription {
public var id: Int32
public var title: Api.TextWithEntities
public init(id: Int32, title: Api.TextWithEntities) {
self.id = id
self.title = title
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("todoItem", [("id", ConstructorParameterDescription(self.id)), ("title", ConstructorParameterDescription(self.title))])
}
}
case todoItem(Cons_todoItem)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .todoItem(let _data):
if boxed {
buffer.appendInt32(-878074577)
}
serializeInt32(_data.id, buffer: buffer, boxed: false)
_data.title.serialize(buffer, true)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .todoItem(let _data):
return ("todoItem", [("id", ConstructorParameterDescription(_data.id)), ("title", ConstructorParameterDescription(_data.title))])
}
}
public static func parse_todoItem(_ reader: BufferReader) -> TodoItem? {
var _1: Int32?
_1 = reader.readInt32()
var _2: Api.TextWithEntities?
if let signature = reader.readInt32() {
_2 = Api.parse(reader, signature: signature) as? Api.TextWithEntities
}
let _c1 = _1 != nil
let _c2 = _2 != nil
if _c1 && _c2 {
return Api.TodoItem.todoItem(Cons_todoItem(id: _1!, title: _2!))
}
else {
return nil
}
}
}
}
public extension Api {
enum TodoList: TypeConstructorDescription {
public class Cons_todoList: TypeConstructorDescription {
public var flags: Int32
public var title: Api.TextWithEntities
public var list: [Api.TodoItem]
public init(flags: Int32, title: Api.TextWithEntities, list: [Api.TodoItem]) {
self.flags = flags
self.title = title
self.list = list
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("todoList", [("flags", ConstructorParameterDescription(self.flags)), ("title", ConstructorParameterDescription(self.title)), ("list", ConstructorParameterDescription(self.list))])
}
}
case todoList(Cons_todoList)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .todoList(let _data):
if boxed {
buffer.appendInt32(1236871718)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
_data.title.serialize(buffer, true)
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.list.count))
for item in _data.list {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .todoList(let _data):
return ("todoList", [("flags", ConstructorParameterDescription(_data.flags)), ("title", ConstructorParameterDescription(_data.title)), ("list", ConstructorParameterDescription(_data.list))])
}
}
public static func parse_todoList(_ reader: BufferReader) -> TodoList? {
var _1: Int32?
_1 = reader.readInt32()
var _2: Api.TextWithEntities?
if let signature = reader.readInt32() {
_2 = Api.parse(reader, signature: signature) as? Api.TextWithEntities
}
var _3: [Api.TodoItem]?
if let _ = reader.readInt32() {
_3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.TodoItem.self)
}
let _c1 = _1 != nil
let _c2 = _2 != nil
let _c3 = _3 != nil
if _c1 && _c2 && _c3 {
return Api.TodoList.todoList(Cons_todoList(flags: _1!, title: _2!, list: _3!))
}
else {
return nil
}
}
}
}
public extension Api {
enum TopPeer: TypeConstructorDescription {
public class Cons_topPeer: TypeConstructorDescription {
public var peer: Api.Peer
public var rating: Double
public init(peer: Api.Peer, rating: Double) {
self.peer = peer
self.rating = rating
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("topPeer", [("peer", ConstructorParameterDescription(self.peer)), ("rating", ConstructorParameterDescription(self.rating))])
}
}
case topPeer(Cons_topPeer)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .topPeer(let _data):
if boxed {
buffer.appendInt32(-305282981)
}
_data.peer.serialize(buffer, true)
serializeDouble(_data.rating, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .topPeer(let _data):
return ("topPeer", [("peer", ConstructorParameterDescription(_data.peer)), ("rating", ConstructorParameterDescription(_data.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(Cons_topPeer(peer: _1!, rating: _2!))
}
else {
return nil
}
}
}
}
public extension Api {
enum TopPeerCategory: TypeConstructorDescription {
case topPeerCategoryBotsApp
case topPeerCategoryBotsInline
case topPeerCategoryBotsPM
case topPeerCategoryChannels
case topPeerCategoryCorrespondents
case topPeerCategoryForwardChats
case topPeerCategoryForwardUsers
case topPeerCategoryGroups
case topPeerCategoryPhoneCalls
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .topPeerCategoryBotsApp:
if boxed {
buffer.appendInt32(-39945236)
}
break
case .topPeerCategoryBotsInline:
if boxed {
buffer.appendInt32(344356834)
}
break
case .topPeerCategoryBotsPM:
if boxed {
buffer.appendInt32(-1419371685)
}
break
case .topPeerCategoryChannels:
if boxed {
buffer.appendInt32(371037736)
}
break
case .topPeerCategoryCorrespondents:
if boxed {
buffer.appendInt32(104314861)
}
break
case .topPeerCategoryForwardChats:
if boxed {
buffer.appendInt32(-68239120)
}
break
case .topPeerCategoryForwardUsers:
if boxed {
buffer.appendInt32(-1472172887)
}
break
case .topPeerCategoryGroups:
if boxed {
buffer.appendInt32(-1122524854)
}
break
case .topPeerCategoryPhoneCalls:
if boxed {
buffer.appendInt32(511092620)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .topPeerCategoryBotsApp:
return ("topPeerCategoryBotsApp", [])
case .topPeerCategoryBotsInline:
return ("topPeerCategoryBotsInline", [])
case .topPeerCategoryBotsPM:
return ("topPeerCategoryBotsPM", [])
case .topPeerCategoryChannels:
return ("topPeerCategoryChannels", [])
case .topPeerCategoryCorrespondents:
return ("topPeerCategoryCorrespondents", [])
case .topPeerCategoryForwardChats:
return ("topPeerCategoryForwardChats", [])
case .topPeerCategoryForwardUsers:
return ("topPeerCategoryForwardUsers", [])
case .topPeerCategoryGroups:
return ("topPeerCategoryGroups", [])
case .topPeerCategoryPhoneCalls:
return ("topPeerCategoryPhoneCalls", [])
}
}
public static func parse_topPeerCategoryBotsApp(_ reader: BufferReader) -> TopPeerCategory? {
return Api.TopPeerCategory.topPeerCategoryBotsApp
}
public static func parse_topPeerCategoryBotsInline(_ reader: BufferReader) -> TopPeerCategory? {
return Api.TopPeerCategory.topPeerCategoryBotsInline
}
public static func parse_topPeerCategoryBotsPM(_ reader: BufferReader) -> TopPeerCategory? {
return Api.TopPeerCategory.topPeerCategoryBotsPM
}
public static func parse_topPeerCategoryChannels(_ reader: BufferReader) -> TopPeerCategory? {
return Api.TopPeerCategory.topPeerCategoryChannels
}
public static func parse_topPeerCategoryCorrespondents(_ reader: BufferReader) -> TopPeerCategory? {
return Api.TopPeerCategory.topPeerCategoryCorrespondents
}
public static func parse_topPeerCategoryForwardChats(_ reader: BufferReader) -> TopPeerCategory? {
return Api.TopPeerCategory.topPeerCategoryForwardChats
}
public static func parse_topPeerCategoryForwardUsers(_ reader: BufferReader) -> TopPeerCategory? {
return Api.TopPeerCategory.topPeerCategoryForwardUsers
}
public static func parse_topPeerCategoryGroups(_ reader: BufferReader) -> TopPeerCategory? {
return Api.TopPeerCategory.topPeerCategoryGroups
}
public static func parse_topPeerCategoryPhoneCalls(_ reader: BufferReader) -> TopPeerCategory? {
return Api.TopPeerCategory.topPeerCategoryPhoneCalls
}
}
}
public extension Api {
enum TopPeerCategoryPeers: TypeConstructorDescription {
public class Cons_topPeerCategoryPeers: TypeConstructorDescription {

View file

@ -1019,170 +1019,6 @@ public extension Api.channels {
}
}
}
public extension Api.channels {
enum Found: TypeConstructorDescription {
public class Cons_found: TypeConstructorDescription {
public var flags: Int32
public var results: [Api.Peer]
public var chats: [Api.Chat]
public var users: [Api.User]
public var nextOffset: String?
public init(flags: Int32, results: [Api.Peer], chats: [Api.Chat], users: [Api.User], nextOffset: String?) {
self.flags = flags
self.results = results
self.chats = chats
self.users = users
self.nextOffset = nextOffset
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("found", [("flags", ConstructorParameterDescription(self.flags)), ("results", ConstructorParameterDescription(self.results)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users)), ("nextOffset", ConstructorParameterDescription(self.nextOffset))])
}
}
case found(Cons_found)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .found(let _data):
if boxed {
buffer.appendInt32(824755388)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.results.count))
for item in _data.results {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
if Int(_data.flags) & Int(1 << 0) != 0 {
serializeString(_data.nextOffset!, buffer: buffer, boxed: false)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .found(let _data):
return ("found", [("flags", ConstructorParameterDescription(_data.flags)), ("results", ConstructorParameterDescription(_data.results)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users)), ("nextOffset", ConstructorParameterDescription(_data.nextOffset))])
}
}
public static func parse_found(_ reader: BufferReader) -> Found? {
var _1: Int32?
_1 = reader.readInt32()
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)
}
var _5: String?
if Int(_1!) & Int(1 << 0) != 0 {
_5 = 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
if _c1 && _c2 && _c3 && _c4 && _c5 {
return Api.channels.Found.found(Cons_found(flags: _1!, results: _2!, chats: _3!, users: _4!, nextOffset: _5))
}
else {
return nil
}
}
}
}
public extension Api.channels {
enum PersonalChannels: TypeConstructorDescription {
public class Cons_personalChannels: TypeConstructorDescription {
public var channels: [Api.PersonalChannel]
public var chats: [Api.Chat]
public var users: [Api.User]
public init(channels: [Api.PersonalChannel], chats: [Api.Chat], users: [Api.User]) {
self.channels = channels
self.chats = chats
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("personalChannels", [("channels", ConstructorParameterDescription(self.channels)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
}
}
case personalChannels(Cons_personalChannels)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .personalChannels(let _data):
if boxed {
buffer.appendInt32(-694491059)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.channels.count))
for item in _data.channels {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .personalChannels(let _data):
return ("personalChannels", [("channels", ConstructorParameterDescription(_data.channels)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users))])
}
}
public static func parse_personalChannels(_ reader: BufferReader) -> PersonalChannels? {
var _1: [Api.PersonalChannel]?
if let _ = reader.readInt32() {
_1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PersonalChannel.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.PersonalChannels.personalChannels(Cons_personalChannels(channels: _1!, chats: _2!, users: _3!))
}
else {
return nil
}
}
}
}
public extension Api.channels {
enum SendAsPeers: TypeConstructorDescription {
public class Cons_sendAsPeers: TypeConstructorDescription {
@ -1712,3 +1548,142 @@ public extension Api.chatlists {
}
}
}
public extension Api.contacts {
enum Blocked: TypeConstructorDescription {
public class Cons_blocked: TypeConstructorDescription {
public var blocked: [Api.PeerBlocked]
public var chats: [Api.Chat]
public var users: [Api.User]
public init(blocked: [Api.PeerBlocked], chats: [Api.Chat], users: [Api.User]) {
self.blocked = blocked
self.chats = chats
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("blocked", [("blocked", ConstructorParameterDescription(self.blocked)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
}
}
public class Cons_blockedSlice: TypeConstructorDescription {
public var count: Int32
public var blocked: [Api.PeerBlocked]
public var chats: [Api.Chat]
public var users: [Api.User]
public init(count: Int32, blocked: [Api.PeerBlocked], chats: [Api.Chat], users: [Api.User]) {
self.count = count
self.blocked = blocked
self.chats = chats
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("blockedSlice", [("count", ConstructorParameterDescription(self.count)), ("blocked", ConstructorParameterDescription(self.blocked)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
}
}
case blocked(Cons_blocked)
case blockedSlice(Cons_blockedSlice)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .blocked(let _data):
if boxed {
buffer.appendInt32(182326673)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.blocked.count))
for item in _data.blocked {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
case .blockedSlice(let _data):
if boxed {
buffer.appendInt32(-513392236)
}
serializeInt32(_data.count, buffer: buffer, boxed: false)
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.blocked.count))
for item in _data.blocked {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .blocked(let _data):
return ("blocked", [("blocked", ConstructorParameterDescription(_data.blocked)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users))])
case .blockedSlice(let _data):
return ("blockedSlice", [("count", ConstructorParameterDescription(_data.count)), ("blocked", ConstructorParameterDescription(_data.blocked)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.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(Cons_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(Cons_blockedSlice(count: _1!, blocked: _2!, chats: _3!, users: _4!))
}
else {
return nil
}
}
}
}

View file

@ -1,142 +1,3 @@
public extension Api.contacts {
enum Blocked: TypeConstructorDescription {
public class Cons_blocked: TypeConstructorDescription {
public var blocked: [Api.PeerBlocked]
public var chats: [Api.Chat]
public var users: [Api.User]
public init(blocked: [Api.PeerBlocked], chats: [Api.Chat], users: [Api.User]) {
self.blocked = blocked
self.chats = chats
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("blocked", [("blocked", ConstructorParameterDescription(self.blocked)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
}
}
public class Cons_blockedSlice: TypeConstructorDescription {
public var count: Int32
public var blocked: [Api.PeerBlocked]
public var chats: [Api.Chat]
public var users: [Api.User]
public init(count: Int32, blocked: [Api.PeerBlocked], chats: [Api.Chat], users: [Api.User]) {
self.count = count
self.blocked = blocked
self.chats = chats
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("blockedSlice", [("count", ConstructorParameterDescription(self.count)), ("blocked", ConstructorParameterDescription(self.blocked)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
}
}
case blocked(Cons_blocked)
case blockedSlice(Cons_blockedSlice)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .blocked(let _data):
if boxed {
buffer.appendInt32(182326673)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.blocked.count))
for item in _data.blocked {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
case .blockedSlice(let _data):
if boxed {
buffer.appendInt32(-513392236)
}
serializeInt32(_data.count, buffer: buffer, boxed: false)
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.blocked.count))
for item in _data.blocked {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .blocked(let _data):
return ("blocked", [("blocked", ConstructorParameterDescription(_data.blocked)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users))])
case .blockedSlice(let _data):
return ("blockedSlice", [("count", ConstructorParameterDescription(_data.count)), ("blocked", ConstructorParameterDescription(_data.blocked)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.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(Cons_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(Cons_blockedSlice(count: _1!, blocked: _2!, chats: _3!, users: _4!))
}
else {
return nil
}
}
}
}
public extension Api.contacts {
enum ContactBirthdays: TypeConstructorDescription {
public class Cons_contactBirthdays: TypeConstructorDescription {
@ -1638,3 +1499,278 @@ public extension Api.help {
}
}
}
public extension Api.help {
enum PremiumPromo: TypeConstructorDescription {
public class Cons_premiumPromo: TypeConstructorDescription {
public var statusText: String
public var statusEntities: [Api.MessageEntity]
public var videoSections: [String]
public var videos: [Api.Document]
public var periodOptions: [Api.PremiumSubscriptionOption]
public var users: [Api.User]
public init(statusText: String, statusEntities: [Api.MessageEntity], videoSections: [String], videos: [Api.Document], periodOptions: [Api.PremiumSubscriptionOption], users: [Api.User]) {
self.statusText = statusText
self.statusEntities = statusEntities
self.videoSections = videoSections
self.videos = videos
self.periodOptions = periodOptions
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("premiumPromo", [("statusText", ConstructorParameterDescription(self.statusText)), ("statusEntities", ConstructorParameterDescription(self.statusEntities)), ("videoSections", ConstructorParameterDescription(self.videoSections)), ("videos", ConstructorParameterDescription(self.videos)), ("periodOptions", ConstructorParameterDescription(self.periodOptions)), ("users", ConstructorParameterDescription(self.users))])
}
}
case premiumPromo(Cons_premiumPromo)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .premiumPromo(let _data):
if boxed {
buffer.appendInt32(1395946908)
}
serializeString(_data.statusText, buffer: buffer, boxed: false)
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.statusEntities.count))
for item in _data.statusEntities {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.videoSections.count))
for item in _data.videoSections {
serializeString(item, buffer: buffer, boxed: false)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.videos.count))
for item in _data.videos {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.periodOptions.count))
for item in _data.periodOptions {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .premiumPromo(let _data):
return ("premiumPromo", [("statusText", ConstructorParameterDescription(_data.statusText)), ("statusEntities", ConstructorParameterDescription(_data.statusEntities)), ("videoSections", ConstructorParameterDescription(_data.videoSections)), ("videos", ConstructorParameterDescription(_data.videos)), ("periodOptions", ConstructorParameterDescription(_data.periodOptions)), ("users", ConstructorParameterDescription(_data.users))])
}
}
public static func parse_premiumPromo(_ reader: BufferReader) -> PremiumPromo? {
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]?
if let _ = reader.readInt32() {
_3 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self)
}
var _4: [Api.Document]?
if let _ = reader.readInt32() {
_4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Document.self)
}
var _5: [Api.PremiumSubscriptionOption]?
if let _ = reader.readInt32() {
_5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PremiumSubscriptionOption.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 = _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.help.PremiumPromo.premiumPromo(Cons_premiumPromo(statusText: _1!, statusEntities: _2!, videoSections: _3!, videos: _4!, periodOptions: _5!, users: _6!))
}
else {
return nil
}
}
}
}
public extension Api.help {
enum PromoData: TypeConstructorDescription {
public class Cons_promoData: TypeConstructorDescription {
public var flags: Int32
public var expires: Int32
public var peer: Api.Peer?
public var psaType: String?
public var psaMessage: String?
public var pendingSuggestions: [String]
public var dismissedSuggestions: [String]
public var customPendingSuggestion: Api.PendingSuggestion?
public var chats: [Api.Chat]
public var users: [Api.User]
public init(flags: Int32, expires: Int32, peer: Api.Peer?, psaType: String?, psaMessage: String?, pendingSuggestions: [String], dismissedSuggestions: [String], customPendingSuggestion: Api.PendingSuggestion?, chats: [Api.Chat], users: [Api.User]) {
self.flags = flags
self.expires = expires
self.peer = peer
self.psaType = psaType
self.psaMessage = psaMessage
self.pendingSuggestions = pendingSuggestions
self.dismissedSuggestions = dismissedSuggestions
self.customPendingSuggestion = customPendingSuggestion
self.chats = chats
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("promoData", [("flags", ConstructorParameterDescription(self.flags)), ("expires", ConstructorParameterDescription(self.expires)), ("peer", ConstructorParameterDescription(self.peer)), ("psaType", ConstructorParameterDescription(self.psaType)), ("psaMessage", ConstructorParameterDescription(self.psaMessage)), ("pendingSuggestions", ConstructorParameterDescription(self.pendingSuggestions)), ("dismissedSuggestions", ConstructorParameterDescription(self.dismissedSuggestions)), ("customPendingSuggestion", ConstructorParameterDescription(self.customPendingSuggestion)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
}
}
public class Cons_promoDataEmpty: TypeConstructorDescription {
public var expires: Int32
public init(expires: Int32) {
self.expires = expires
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("promoDataEmpty", [("expires", ConstructorParameterDescription(self.expires))])
}
}
case promoData(Cons_promoData)
case promoDataEmpty(Cons_promoDataEmpty)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .promoData(let _data):
if boxed {
buffer.appendInt32(145021050)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt32(_data.expires, buffer: buffer, boxed: false)
if Int(_data.flags) & Int(1 << 3) != 0 {
_data.peer!.serialize(buffer, true)
}
if Int(_data.flags) & Int(1 << 1) != 0 {
serializeString(_data.psaType!, buffer: buffer, boxed: false)
}
if Int(_data.flags) & Int(1 << 2) != 0 {
serializeString(_data.psaMessage!, buffer: buffer, boxed: false)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.pendingSuggestions.count))
for item in _data.pendingSuggestions {
serializeString(item, buffer: buffer, boxed: false)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.dismissedSuggestions.count))
for item in _data.dismissedSuggestions {
serializeString(item, buffer: buffer, boxed: false)
}
if Int(_data.flags) & Int(1 << 4) != 0 {
_data.customPendingSuggestion!.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
case .promoDataEmpty(let _data):
if boxed {
buffer.appendInt32(-1728664459)
}
serializeInt32(_data.expires, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .promoData(let _data):
return ("promoData", [("flags", ConstructorParameterDescription(_data.flags)), ("expires", ConstructorParameterDescription(_data.expires)), ("peer", ConstructorParameterDescription(_data.peer)), ("psaType", ConstructorParameterDescription(_data.psaType)), ("psaMessage", ConstructorParameterDescription(_data.psaMessage)), ("pendingSuggestions", ConstructorParameterDescription(_data.pendingSuggestions)), ("dismissedSuggestions", ConstructorParameterDescription(_data.dismissedSuggestions)), ("customPendingSuggestion", ConstructorParameterDescription(_data.customPendingSuggestion)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users))])
case .promoDataEmpty(let _data):
return ("promoDataEmpty", [("expires", ConstructorParameterDescription(_data.expires))])
}
}
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 Int(_1!) & Int(1 << 3) != 0 {
if let signature = reader.readInt32() {
_3 = Api.parse(reader, signature: signature) as? Api.Peer
}
}
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 let _ = reader.readInt32() {
_6 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self)
}
var _7: [String]?
if let _ = reader.readInt32() {
_7 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self)
}
var _8: Api.PendingSuggestion?
if Int(_1!) & Int(1 << 4) != 0 {
if let signature = reader.readInt32() {
_8 = Api.parse(reader, signature: signature) as? Api.PendingSuggestion
}
}
var _9: [Api.Chat]?
if let _ = reader.readInt32() {
_9 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self)
}
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 = (Int(_1!) & Int(1 << 3) == 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 = _6 != nil
let _c7 = _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.help.PromoData.promoData(Cons_promoData(flags: _1!, expires: _2!, peer: _3, psaType: _4, psaMessage: _5, pendingSuggestions: _6!, dismissedSuggestions: _7!, customPendingSuggestion: _8, chats: _9!, users: _10!))
}
else {
return nil
}
}
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(Cons_promoDataEmpty(expires: _1!))
}
else {
return nil
}
}
}
}

View file

@ -1,278 +1,3 @@
public extension Api.help {
enum PremiumPromo: TypeConstructorDescription {
public class Cons_premiumPromo: TypeConstructorDescription {
public var statusText: String
public var statusEntities: [Api.MessageEntity]
public var videoSections: [String]
public var videos: [Api.Document]
public var periodOptions: [Api.PremiumSubscriptionOption]
public var users: [Api.User]
public init(statusText: String, statusEntities: [Api.MessageEntity], videoSections: [String], videos: [Api.Document], periodOptions: [Api.PremiumSubscriptionOption], users: [Api.User]) {
self.statusText = statusText
self.statusEntities = statusEntities
self.videoSections = videoSections
self.videos = videos
self.periodOptions = periodOptions
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("premiumPromo", [("statusText", ConstructorParameterDescription(self.statusText)), ("statusEntities", ConstructorParameterDescription(self.statusEntities)), ("videoSections", ConstructorParameterDescription(self.videoSections)), ("videos", ConstructorParameterDescription(self.videos)), ("periodOptions", ConstructorParameterDescription(self.periodOptions)), ("users", ConstructorParameterDescription(self.users))])
}
}
case premiumPromo(Cons_premiumPromo)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .premiumPromo(let _data):
if boxed {
buffer.appendInt32(1395946908)
}
serializeString(_data.statusText, buffer: buffer, boxed: false)
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.statusEntities.count))
for item in _data.statusEntities {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.videoSections.count))
for item in _data.videoSections {
serializeString(item, buffer: buffer, boxed: false)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.videos.count))
for item in _data.videos {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.periodOptions.count))
for item in _data.periodOptions {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .premiumPromo(let _data):
return ("premiumPromo", [("statusText", ConstructorParameterDescription(_data.statusText)), ("statusEntities", ConstructorParameterDescription(_data.statusEntities)), ("videoSections", ConstructorParameterDescription(_data.videoSections)), ("videos", ConstructorParameterDescription(_data.videos)), ("periodOptions", ConstructorParameterDescription(_data.periodOptions)), ("users", ConstructorParameterDescription(_data.users))])
}
}
public static func parse_premiumPromo(_ reader: BufferReader) -> PremiumPromo? {
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]?
if let _ = reader.readInt32() {
_3 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self)
}
var _4: [Api.Document]?
if let _ = reader.readInt32() {
_4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Document.self)
}
var _5: [Api.PremiumSubscriptionOption]?
if let _ = reader.readInt32() {
_5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PremiumSubscriptionOption.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 = _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.help.PremiumPromo.premiumPromo(Cons_premiumPromo(statusText: _1!, statusEntities: _2!, videoSections: _3!, videos: _4!, periodOptions: _5!, users: _6!))
}
else {
return nil
}
}
}
}
public extension Api.help {
enum PromoData: TypeConstructorDescription {
public class Cons_promoData: TypeConstructorDescription {
public var flags: Int32
public var expires: Int32
public var peer: Api.Peer?
public var psaType: String?
public var psaMessage: String?
public var pendingSuggestions: [String]
public var dismissedSuggestions: [String]
public var customPendingSuggestion: Api.PendingSuggestion?
public var chats: [Api.Chat]
public var users: [Api.User]
public init(flags: Int32, expires: Int32, peer: Api.Peer?, psaType: String?, psaMessage: String?, pendingSuggestions: [String], dismissedSuggestions: [String], customPendingSuggestion: Api.PendingSuggestion?, chats: [Api.Chat], users: [Api.User]) {
self.flags = flags
self.expires = expires
self.peer = peer
self.psaType = psaType
self.psaMessage = psaMessage
self.pendingSuggestions = pendingSuggestions
self.dismissedSuggestions = dismissedSuggestions
self.customPendingSuggestion = customPendingSuggestion
self.chats = chats
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("promoData", [("flags", ConstructorParameterDescription(self.flags)), ("expires", ConstructorParameterDescription(self.expires)), ("peer", ConstructorParameterDescription(self.peer)), ("psaType", ConstructorParameterDescription(self.psaType)), ("psaMessage", ConstructorParameterDescription(self.psaMessage)), ("pendingSuggestions", ConstructorParameterDescription(self.pendingSuggestions)), ("dismissedSuggestions", ConstructorParameterDescription(self.dismissedSuggestions)), ("customPendingSuggestion", ConstructorParameterDescription(self.customPendingSuggestion)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
}
}
public class Cons_promoDataEmpty: TypeConstructorDescription {
public var expires: Int32
public init(expires: Int32) {
self.expires = expires
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("promoDataEmpty", [("expires", ConstructorParameterDescription(self.expires))])
}
}
case promoData(Cons_promoData)
case promoDataEmpty(Cons_promoDataEmpty)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .promoData(let _data):
if boxed {
buffer.appendInt32(145021050)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt32(_data.expires, buffer: buffer, boxed: false)
if Int(_data.flags) & Int(1 << 3) != 0 {
_data.peer!.serialize(buffer, true)
}
if Int(_data.flags) & Int(1 << 1) != 0 {
serializeString(_data.psaType!, buffer: buffer, boxed: false)
}
if Int(_data.flags) & Int(1 << 2) != 0 {
serializeString(_data.psaMessage!, buffer: buffer, boxed: false)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.pendingSuggestions.count))
for item in _data.pendingSuggestions {
serializeString(item, buffer: buffer, boxed: false)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.dismissedSuggestions.count))
for item in _data.dismissedSuggestions {
serializeString(item, buffer: buffer, boxed: false)
}
if Int(_data.flags) & Int(1 << 4) != 0 {
_data.customPendingSuggestion!.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
case .promoDataEmpty(let _data):
if boxed {
buffer.appendInt32(-1728664459)
}
serializeInt32(_data.expires, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .promoData(let _data):
return ("promoData", [("flags", ConstructorParameterDescription(_data.flags)), ("expires", ConstructorParameterDescription(_data.expires)), ("peer", ConstructorParameterDescription(_data.peer)), ("psaType", ConstructorParameterDescription(_data.psaType)), ("psaMessage", ConstructorParameterDescription(_data.psaMessage)), ("pendingSuggestions", ConstructorParameterDescription(_data.pendingSuggestions)), ("dismissedSuggestions", ConstructorParameterDescription(_data.dismissedSuggestions)), ("customPendingSuggestion", ConstructorParameterDescription(_data.customPendingSuggestion)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users))])
case .promoDataEmpty(let _data):
return ("promoDataEmpty", [("expires", ConstructorParameterDescription(_data.expires))])
}
}
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 Int(_1!) & Int(1 << 3) != 0 {
if let signature = reader.readInt32() {
_3 = Api.parse(reader, signature: signature) as? Api.Peer
}
}
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 let _ = reader.readInt32() {
_6 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self)
}
var _7: [String]?
if let _ = reader.readInt32() {
_7 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self)
}
var _8: Api.PendingSuggestion?
if Int(_1!) & Int(1 << 4) != 0 {
if let signature = reader.readInt32() {
_8 = Api.parse(reader, signature: signature) as? Api.PendingSuggestion
}
}
var _9: [Api.Chat]?
if let _ = reader.readInt32() {
_9 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self)
}
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 = (Int(_1!) & Int(1 << 3) == 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 = _6 != nil
let _c7 = _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.help.PromoData.promoData(Cons_promoData(flags: _1!, expires: _2!, peer: _3, psaType: _4, psaMessage: _5, pendingSuggestions: _6!, dismissedSuggestions: _7!, customPendingSuggestion: _8, chats: _9!, users: _10!))
}
else {
return nil
}
}
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(Cons_promoDataEmpty(expires: _1!))
}
else {
return nil
}
}
}
}
public extension Api.help {
enum RecentMeUrls: TypeConstructorDescription {
public class Cons_recentMeUrls: TypeConstructorDescription {
@ -1770,3 +1495,202 @@ public extension Api.messages {
}
}
}
public extension Api.messages {
enum CheckedHistoryImportPeer: TypeConstructorDescription {
public class Cons_checkedHistoryImportPeer: TypeConstructorDescription {
public var confirmText: String
public init(confirmText: String) {
self.confirmText = confirmText
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("checkedHistoryImportPeer", [("confirmText", ConstructorParameterDescription(self.confirmText))])
}
}
case checkedHistoryImportPeer(Cons_checkedHistoryImportPeer)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .checkedHistoryImportPeer(let _data):
if boxed {
buffer.appendInt32(-1571952873)
}
serializeString(_data.confirmText, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .checkedHistoryImportPeer(let _data):
return ("checkedHistoryImportPeer", [("confirmText", ConstructorParameterDescription(_data.confirmText))])
}
}
public static func parse_checkedHistoryImportPeer(_ reader: BufferReader) -> CheckedHistoryImportPeer? {
var _1: String?
_1 = parseString(reader)
let _c1 = _1 != nil
if _c1 {
return Api.messages.CheckedHistoryImportPeer.checkedHistoryImportPeer(Cons_checkedHistoryImportPeer(confirmText: _1!))
}
else {
return nil
}
}
}
}
public extension Api.messages {
enum ComposedMessageWithAI: TypeConstructorDescription {
public class Cons_composedMessageWithAI: TypeConstructorDescription {
public var flags: Int32
public var resultText: Api.TextWithEntities
public var diffText: Api.TextWithEntities?
public init(flags: Int32, resultText: Api.TextWithEntities, diffText: Api.TextWithEntities?) {
self.flags = flags
self.resultText = resultText
self.diffText = diffText
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("composedMessageWithAI", [("flags", ConstructorParameterDescription(self.flags)), ("resultText", ConstructorParameterDescription(self.resultText)), ("diffText", ConstructorParameterDescription(self.diffText))])
}
}
case composedMessageWithAI(Cons_composedMessageWithAI)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .composedMessageWithAI(let _data):
if boxed {
buffer.appendInt32(-1864913414)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
_data.resultText.serialize(buffer, true)
if Int(_data.flags) & Int(1 << 0) != 0 {
_data.diffText!.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .composedMessageWithAI(let _data):
return ("composedMessageWithAI", [("flags", ConstructorParameterDescription(_data.flags)), ("resultText", ConstructorParameterDescription(_data.resultText)), ("diffText", ConstructorParameterDescription(_data.diffText))])
}
}
public static func parse_composedMessageWithAI(_ reader: BufferReader) -> ComposedMessageWithAI? {
var _1: Int32?
_1 = reader.readInt32()
var _2: Api.TextWithEntities?
if let signature = reader.readInt32() {
_2 = Api.parse(reader, signature: signature) as? Api.TextWithEntities
}
var _3: Api.TextWithEntities?
if Int(_1!) & Int(1 << 0) != 0 {
if let signature = reader.readInt32() {
_3 = Api.parse(reader, signature: signature) as? Api.TextWithEntities
}
}
let _c1 = _1 != nil
let _c2 = _2 != nil
let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil
if _c1 && _c2 && _c3 {
return Api.messages.ComposedMessageWithAI.composedMessageWithAI(Cons_composedMessageWithAI(flags: _1!, resultText: _2!, diffText: _3))
}
else {
return nil
}
}
}
}
public extension Api.messages {
enum DhConfig: TypeConstructorDescription {
public class Cons_dhConfig: TypeConstructorDescription {
public var g: Int32
public var p: Buffer
public var version: Int32
public var random: Buffer
public init(g: Int32, p: Buffer, version: Int32, random: Buffer) {
self.g = g
self.p = p
self.version = version
self.random = random
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("dhConfig", [("g", ConstructorParameterDescription(self.g)), ("p", ConstructorParameterDescription(self.p)), ("version", ConstructorParameterDescription(self.version)), ("random", ConstructorParameterDescription(self.random))])
}
}
public class Cons_dhConfigNotModified: TypeConstructorDescription {
public var random: Buffer
public init(random: Buffer) {
self.random = random
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("dhConfigNotModified", [("random", ConstructorParameterDescription(self.random))])
}
}
case dhConfig(Cons_dhConfig)
case dhConfigNotModified(Cons_dhConfigNotModified)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .dhConfig(let _data):
if boxed {
buffer.appendInt32(740433629)
}
serializeInt32(_data.g, buffer: buffer, boxed: false)
serializeBytes(_data.p, buffer: buffer, boxed: false)
serializeInt32(_data.version, buffer: buffer, boxed: false)
serializeBytes(_data.random, buffer: buffer, boxed: false)
break
case .dhConfigNotModified(let _data):
if boxed {
buffer.appendInt32(-1058912715)
}
serializeBytes(_data.random, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .dhConfig(let _data):
return ("dhConfig", [("g", ConstructorParameterDescription(_data.g)), ("p", ConstructorParameterDescription(_data.p)), ("version", ConstructorParameterDescription(_data.version)), ("random", ConstructorParameterDescription(_data.random))])
case .dhConfigNotModified(let _data):
return ("dhConfigNotModified", [("random", ConstructorParameterDescription(_data.random))])
}
}
public static func parse_dhConfig(_ reader: BufferReader) -> DhConfig? {
var _1: Int32?
_1 = reader.readInt32()
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.messages.DhConfig.dhConfig(Cons_dhConfig(g: _1!, p: _2!, version: _3!, random: _4!))
}
else {
return nil
}
}
public static func parse_dhConfigNotModified(_ reader: BufferReader) -> DhConfig? {
var _1: Buffer?
_1 = parseBytes(reader)
let _c1 = _1 != nil
if _c1 {
return Api.messages.DhConfig.dhConfigNotModified(Cons_dhConfigNotModified(random: _1!))
}
else {
return nil
}
}
}
}

View file

@ -1,202 +1,3 @@
public extension Api.messages {
enum CheckedHistoryImportPeer: TypeConstructorDescription {
public class Cons_checkedHistoryImportPeer: TypeConstructorDescription {
public var confirmText: String
public init(confirmText: String) {
self.confirmText = confirmText
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("checkedHistoryImportPeer", [("confirmText", ConstructorParameterDescription(self.confirmText))])
}
}
case checkedHistoryImportPeer(Cons_checkedHistoryImportPeer)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .checkedHistoryImportPeer(let _data):
if boxed {
buffer.appendInt32(-1571952873)
}
serializeString(_data.confirmText, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .checkedHistoryImportPeer(let _data):
return ("checkedHistoryImportPeer", [("confirmText", ConstructorParameterDescription(_data.confirmText))])
}
}
public static func parse_checkedHistoryImportPeer(_ reader: BufferReader) -> CheckedHistoryImportPeer? {
var _1: String?
_1 = parseString(reader)
let _c1 = _1 != nil
if _c1 {
return Api.messages.CheckedHistoryImportPeer.checkedHistoryImportPeer(Cons_checkedHistoryImportPeer(confirmText: _1!))
}
else {
return nil
}
}
}
}
public extension Api.messages {
enum ComposedMessageWithAI: TypeConstructorDescription {
public class Cons_composedMessageWithAI: TypeConstructorDescription {
public var flags: Int32
public var resultText: Api.TextWithEntities
public var diffText: Api.TextWithEntities?
public init(flags: Int32, resultText: Api.TextWithEntities, diffText: Api.TextWithEntities?) {
self.flags = flags
self.resultText = resultText
self.diffText = diffText
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("composedMessageWithAI", [("flags", ConstructorParameterDescription(self.flags)), ("resultText", ConstructorParameterDescription(self.resultText)), ("diffText", ConstructorParameterDescription(self.diffText))])
}
}
case composedMessageWithAI(Cons_composedMessageWithAI)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .composedMessageWithAI(let _data):
if boxed {
buffer.appendInt32(-1864913414)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
_data.resultText.serialize(buffer, true)
if Int(_data.flags) & Int(1 << 0) != 0 {
_data.diffText!.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .composedMessageWithAI(let _data):
return ("composedMessageWithAI", [("flags", ConstructorParameterDescription(_data.flags)), ("resultText", ConstructorParameterDescription(_data.resultText)), ("diffText", ConstructorParameterDescription(_data.diffText))])
}
}
public static func parse_composedMessageWithAI(_ reader: BufferReader) -> ComposedMessageWithAI? {
var _1: Int32?
_1 = reader.readInt32()
var _2: Api.TextWithEntities?
if let signature = reader.readInt32() {
_2 = Api.parse(reader, signature: signature) as? Api.TextWithEntities
}
var _3: Api.TextWithEntities?
if Int(_1!) & Int(1 << 0) != 0 {
if let signature = reader.readInt32() {
_3 = Api.parse(reader, signature: signature) as? Api.TextWithEntities
}
}
let _c1 = _1 != nil
let _c2 = _2 != nil
let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil
if _c1 && _c2 && _c3 {
return Api.messages.ComposedMessageWithAI.composedMessageWithAI(Cons_composedMessageWithAI(flags: _1!, resultText: _2!, diffText: _3))
}
else {
return nil
}
}
}
}
public extension Api.messages {
enum DhConfig: TypeConstructorDescription {
public class Cons_dhConfig: TypeConstructorDescription {
public var g: Int32
public var p: Buffer
public var version: Int32
public var random: Buffer
public init(g: Int32, p: Buffer, version: Int32, random: Buffer) {
self.g = g
self.p = p
self.version = version
self.random = random
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("dhConfig", [("g", ConstructorParameterDescription(self.g)), ("p", ConstructorParameterDescription(self.p)), ("version", ConstructorParameterDescription(self.version)), ("random", ConstructorParameterDescription(self.random))])
}
}
public class Cons_dhConfigNotModified: TypeConstructorDescription {
public var random: Buffer
public init(random: Buffer) {
self.random = random
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("dhConfigNotModified", [("random", ConstructorParameterDescription(self.random))])
}
}
case dhConfig(Cons_dhConfig)
case dhConfigNotModified(Cons_dhConfigNotModified)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .dhConfig(let _data):
if boxed {
buffer.appendInt32(740433629)
}
serializeInt32(_data.g, buffer: buffer, boxed: false)
serializeBytes(_data.p, buffer: buffer, boxed: false)
serializeInt32(_data.version, buffer: buffer, boxed: false)
serializeBytes(_data.random, buffer: buffer, boxed: false)
break
case .dhConfigNotModified(let _data):
if boxed {
buffer.appendInt32(-1058912715)
}
serializeBytes(_data.random, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .dhConfig(let _data):
return ("dhConfig", [("g", ConstructorParameterDescription(_data.g)), ("p", ConstructorParameterDescription(_data.p)), ("version", ConstructorParameterDescription(_data.version)), ("random", ConstructorParameterDescription(_data.random))])
case .dhConfigNotModified(let _data):
return ("dhConfigNotModified", [("random", ConstructorParameterDescription(_data.random))])
}
}
public static func parse_dhConfig(_ reader: BufferReader) -> DhConfig? {
var _1: Int32?
_1 = reader.readInt32()
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.messages.DhConfig.dhConfig(Cons_dhConfig(g: _1!, p: _2!, version: _3!, random: _4!))
}
else {
return nil
}
}
public static func parse_dhConfigNotModified(_ reader: BufferReader) -> DhConfig? {
var _1: Buffer?
_1 = parseBytes(reader)
let _c1 = _1 != nil
if _c1 {
return Api.messages.DhConfig.dhConfigNotModified(Cons_dhConfigNotModified(random: _1!))
}
else {
return nil
}
}
}
}
public extension Api.messages {
enum DialogFilters: TypeConstructorDescription {
public class Cons_dialogFilters: TypeConstructorDescription {
@ -1762,3 +1563,502 @@ public extension Api.messages {
}
}
}
public extension Api.messages {
enum MessageReactionsList: TypeConstructorDescription {
public class Cons_messageReactionsList: TypeConstructorDescription {
public var flags: Int32
public var count: Int32
public var reactions: [Api.MessagePeerReaction]
public var chats: [Api.Chat]
public var users: [Api.User]
public var nextOffset: String?
public init(flags: Int32, count: Int32, reactions: [Api.MessagePeerReaction], chats: [Api.Chat], users: [Api.User], nextOffset: String?) {
self.flags = flags
self.count = count
self.reactions = reactions
self.chats = chats
self.users = users
self.nextOffset = nextOffset
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("messageReactionsList", [("flags", ConstructorParameterDescription(self.flags)), ("count", ConstructorParameterDescription(self.count)), ("reactions", ConstructorParameterDescription(self.reactions)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users)), ("nextOffset", ConstructorParameterDescription(self.nextOffset))])
}
}
case messageReactionsList(Cons_messageReactionsList)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .messageReactionsList(let _data):
if boxed {
buffer.appendInt32(834488621)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt32(_data.count, buffer: buffer, boxed: false)
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.reactions.count))
for item in _data.reactions {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
if Int(_data.flags) & Int(1 << 0) != 0 {
serializeString(_data.nextOffset!, buffer: buffer, boxed: false)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .messageReactionsList(let _data):
return ("messageReactionsList", [("flags", ConstructorParameterDescription(_data.flags)), ("count", ConstructorParameterDescription(_data.count)), ("reactions", ConstructorParameterDescription(_data.reactions)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users)), ("nextOffset", ConstructorParameterDescription(_data.nextOffset))])
}
}
public static func parse_messageReactionsList(_ reader: BufferReader) -> MessageReactionsList? {
var _1: Int32?
_1 = reader.readInt32()
var _2: Int32?
_2 = reader.readInt32()
var _3: [Api.MessagePeerReaction]?
if let _ = reader.readInt32() {
_3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessagePeerReaction.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: 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.messages.MessageReactionsList.messageReactionsList(Cons_messageReactionsList(flags: _1!, count: _2!, reactions: _3!, chats: _4!, users: _5!, nextOffset: _6))
}
else {
return nil
}
}
}
}
public extension Api.messages {
enum MessageViews: TypeConstructorDescription {
public class Cons_messageViews: TypeConstructorDescription {
public var views: [Api.MessageViews]
public var chats: [Api.Chat]
public var users: [Api.User]
public init(views: [Api.MessageViews], chats: [Api.Chat], users: [Api.User]) {
self.views = views
self.chats = chats
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("messageViews", [("views", ConstructorParameterDescription(self.views)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
}
}
case messageViews(Cons_messageViews)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .messageViews(let _data):
if boxed {
buffer.appendInt32(-1228606141)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.views.count))
for item in _data.views {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .messageViews(let _data):
return ("messageViews", [("views", ConstructorParameterDescription(_data.views)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users))])
}
}
public static func parse_messageViews(_ reader: BufferReader) -> MessageViews? {
var _1: [Api.MessageViews]?
if let _ = reader.readInt32() {
_1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageViews.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.messages.MessageViews.messageViews(Cons_messageViews(views: _1!, chats: _2!, users: _3!))
}
else {
return nil
}
}
}
}
public extension Api.messages {
enum Messages: TypeConstructorDescription {
public class Cons_channelMessages: TypeConstructorDescription {
public var flags: Int32
public var pts: Int32
public var count: Int32
public var offsetIdOffset: Int32?
public var messages: [Api.Message]
public var topics: [Api.ForumTopic]
public var chats: [Api.Chat]
public var users: [Api.User]
public init(flags: Int32, pts: Int32, count: Int32, offsetIdOffset: Int32?, messages: [Api.Message], topics: [Api.ForumTopic], chats: [Api.Chat], users: [Api.User]) {
self.flags = flags
self.pts = pts
self.count = count
self.offsetIdOffset = offsetIdOffset
self.messages = messages
self.topics = topics
self.chats = chats
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("channelMessages", [("flags", ConstructorParameterDescription(self.flags)), ("pts", ConstructorParameterDescription(self.pts)), ("count", ConstructorParameterDescription(self.count)), ("offsetIdOffset", ConstructorParameterDescription(self.offsetIdOffset)), ("messages", ConstructorParameterDescription(self.messages)), ("topics", ConstructorParameterDescription(self.topics)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
}
}
public class Cons_messages: TypeConstructorDescription {
public var messages: [Api.Message]
public var topics: [Api.ForumTopic]
public var chats: [Api.Chat]
public var users: [Api.User]
public init(messages: [Api.Message], topics: [Api.ForumTopic], chats: [Api.Chat], users: [Api.User]) {
self.messages = messages
self.topics = topics
self.chats = chats
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("messages", [("messages", ConstructorParameterDescription(self.messages)), ("topics", ConstructorParameterDescription(self.topics)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
}
}
public class Cons_messagesNotModified: TypeConstructorDescription {
public var count: Int32
public init(count: Int32) {
self.count = count
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("messagesNotModified", [("count", ConstructorParameterDescription(self.count))])
}
}
public class Cons_messagesSlice: TypeConstructorDescription {
public var flags: Int32
public var count: Int32
public var nextRate: Int32?
public var offsetIdOffset: Int32?
public var searchFlood: Api.SearchPostsFlood?
public var messages: [Api.Message]
public var topics: [Api.ForumTopic]
public var chats: [Api.Chat]
public var users: [Api.User]
public init(flags: Int32, count: Int32, nextRate: Int32?, offsetIdOffset: Int32?, searchFlood: Api.SearchPostsFlood?, messages: [Api.Message], topics: [Api.ForumTopic], chats: [Api.Chat], users: [Api.User]) {
self.flags = flags
self.count = count
self.nextRate = nextRate
self.offsetIdOffset = offsetIdOffset
self.searchFlood = searchFlood
self.messages = messages
self.topics = topics
self.chats = chats
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("messagesSlice", [("flags", ConstructorParameterDescription(self.flags)), ("count", ConstructorParameterDescription(self.count)), ("nextRate", ConstructorParameterDescription(self.nextRate)), ("offsetIdOffset", ConstructorParameterDescription(self.offsetIdOffset)), ("searchFlood", ConstructorParameterDescription(self.searchFlood)), ("messages", ConstructorParameterDescription(self.messages)), ("topics", ConstructorParameterDescription(self.topics)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
}
}
case channelMessages(Cons_channelMessages)
case messages(Cons_messages)
case messagesNotModified(Cons_messagesNotModified)
case messagesSlice(Cons_messagesSlice)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .channelMessages(let _data):
if boxed {
buffer.appendInt32(-948520370)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt32(_data.pts, buffer: buffer, boxed: false)
serializeInt32(_data.count, buffer: buffer, boxed: false)
if Int(_data.flags) & Int(1 << 2) != 0 {
serializeInt32(_data.offsetIdOffset!, buffer: buffer, boxed: false)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.messages.count))
for item in _data.messages {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.topics.count))
for item in _data.topics {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
case .messages(let _data):
if boxed {
buffer.appendInt32(494135274)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.messages.count))
for item in _data.messages {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.topics.count))
for item in _data.topics {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
case .messagesNotModified(let _data):
if boxed {
buffer.appendInt32(1951620897)
}
serializeInt32(_data.count, buffer: buffer, boxed: false)
break
case .messagesSlice(let _data):
if boxed {
buffer.appendInt32(1595959062)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt32(_data.count, buffer: buffer, boxed: false)
if Int(_data.flags) & Int(1 << 0) != 0 {
serializeInt32(_data.nextRate!, buffer: buffer, boxed: false)
}
if Int(_data.flags) & Int(1 << 2) != 0 {
serializeInt32(_data.offsetIdOffset!, buffer: buffer, boxed: false)
}
if Int(_data.flags) & Int(1 << 3) != 0 {
_data.searchFlood!.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.messages.count))
for item in _data.messages {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.topics.count))
for item in _data.topics {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .channelMessages(let _data):
return ("channelMessages", [("flags", ConstructorParameterDescription(_data.flags)), ("pts", ConstructorParameterDescription(_data.pts)), ("count", ConstructorParameterDescription(_data.count)), ("offsetIdOffset", ConstructorParameterDescription(_data.offsetIdOffset)), ("messages", ConstructorParameterDescription(_data.messages)), ("topics", ConstructorParameterDescription(_data.topics)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users))])
case .messages(let _data):
return ("messages", [("messages", ConstructorParameterDescription(_data.messages)), ("topics", ConstructorParameterDescription(_data.topics)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users))])
case .messagesNotModified(let _data):
return ("messagesNotModified", [("count", ConstructorParameterDescription(_data.count))])
case .messagesSlice(let _data):
return ("messagesSlice", [("flags", ConstructorParameterDescription(_data.flags)), ("count", ConstructorParameterDescription(_data.count)), ("nextRate", ConstructorParameterDescription(_data.nextRate)), ("offsetIdOffset", ConstructorParameterDescription(_data.offsetIdOffset)), ("searchFlood", ConstructorParameterDescription(_data.searchFlood)), ("messages", ConstructorParameterDescription(_data.messages)), ("topics", ConstructorParameterDescription(_data.topics)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users))])
}
}
public static func parse_channelMessages(_ reader: BufferReader) -> Messages? {
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 << 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.ForumTopic]?
if let _ = reader.readInt32() {
_6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ForumTopic.self)
}
var _7: [Api.Chat]?
if let _ = reader.readInt32() {
_7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self)
}
var _8: [Api.User]?
if let _ = reader.readInt32() {
_8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self)
}
let _c1 = _1 != nil
let _c2 = _2 != nil
let _c3 = _3 != nil
let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _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.messages.Messages.channelMessages(Cons_channelMessages(flags: _1!, pts: _2!, count: _3!, offsetIdOffset: _4, messages: _5!, topics: _6!, chats: _7!, users: _8!))
}
else {
return nil
}
}
public static func parse_messages(_ reader: BufferReader) -> Messages? {
var _1: [Api.Message]?
if let _ = reader.readInt32() {
_1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Message.self)
}
var _2: [Api.ForumTopic]?
if let _ = reader.readInt32() {
_2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ForumTopic.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.messages.Messages.messages(Cons_messages(messages: _1!, topics: _2!, chats: _3!, users: _4!))
}
else {
return nil
}
}
public static func parse_messagesNotModified(_ reader: BufferReader) -> Messages? {
var _1: Int32?
_1 = reader.readInt32()
let _c1 = _1 != nil
if _c1 {
return Api.messages.Messages.messagesNotModified(Cons_messagesNotModified(count: _1!))
}
else {
return nil
}
}
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.SearchPostsFlood?
if Int(_1!) & Int(1 << 3) != 0 {
if let signature = reader.readInt32() {
_5 = Api.parse(reader, signature: signature) as? Api.SearchPostsFlood
}
}
var _6: [Api.Message]?
if let _ = reader.readInt32() {
_6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Message.self)
}
var _7: [Api.ForumTopic]?
if let _ = reader.readInt32() {
_7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ForumTopic.self)
}
var _8: [Api.Chat]?
if let _ = reader.readInt32() {
_8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self)
}
var _9: [Api.User]?
if let _ = reader.readInt32() {
_9 = 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 = (Int(_1!) & Int(1 << 3) == 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.messages.Messages.messagesSlice(Cons_messagesSlice(flags: _1!, count: _2!, nextRate: _3, offsetIdOffset: _4, searchFlood: _5, messages: _6!, topics: _7!, chats: _8!, users: _9!))
}
else {
return nil
}
}
}
}

View file

@ -1,502 +1,3 @@
public extension Api.messages {
enum MessageReactionsList: TypeConstructorDescription {
public class Cons_messageReactionsList: TypeConstructorDescription {
public var flags: Int32
public var count: Int32
public var reactions: [Api.MessagePeerReaction]
public var chats: [Api.Chat]
public var users: [Api.User]
public var nextOffset: String?
public init(flags: Int32, count: Int32, reactions: [Api.MessagePeerReaction], chats: [Api.Chat], users: [Api.User], nextOffset: String?) {
self.flags = flags
self.count = count
self.reactions = reactions
self.chats = chats
self.users = users
self.nextOffset = nextOffset
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("messageReactionsList", [("flags", ConstructorParameterDescription(self.flags)), ("count", ConstructorParameterDescription(self.count)), ("reactions", ConstructorParameterDescription(self.reactions)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users)), ("nextOffset", ConstructorParameterDescription(self.nextOffset))])
}
}
case messageReactionsList(Cons_messageReactionsList)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .messageReactionsList(let _data):
if boxed {
buffer.appendInt32(834488621)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt32(_data.count, buffer: buffer, boxed: false)
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.reactions.count))
for item in _data.reactions {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
if Int(_data.flags) & Int(1 << 0) != 0 {
serializeString(_data.nextOffset!, buffer: buffer, boxed: false)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .messageReactionsList(let _data):
return ("messageReactionsList", [("flags", ConstructorParameterDescription(_data.flags)), ("count", ConstructorParameterDescription(_data.count)), ("reactions", ConstructorParameterDescription(_data.reactions)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users)), ("nextOffset", ConstructorParameterDescription(_data.nextOffset))])
}
}
public static func parse_messageReactionsList(_ reader: BufferReader) -> MessageReactionsList? {
var _1: Int32?
_1 = reader.readInt32()
var _2: Int32?
_2 = reader.readInt32()
var _3: [Api.MessagePeerReaction]?
if let _ = reader.readInt32() {
_3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessagePeerReaction.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: 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.messages.MessageReactionsList.messageReactionsList(Cons_messageReactionsList(flags: _1!, count: _2!, reactions: _3!, chats: _4!, users: _5!, nextOffset: _6))
}
else {
return nil
}
}
}
}
public extension Api.messages {
enum MessageViews: TypeConstructorDescription {
public class Cons_messageViews: TypeConstructorDescription {
public var views: [Api.MessageViews]
public var chats: [Api.Chat]
public var users: [Api.User]
public init(views: [Api.MessageViews], chats: [Api.Chat], users: [Api.User]) {
self.views = views
self.chats = chats
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("messageViews", [("views", ConstructorParameterDescription(self.views)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
}
}
case messageViews(Cons_messageViews)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .messageViews(let _data):
if boxed {
buffer.appendInt32(-1228606141)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.views.count))
for item in _data.views {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .messageViews(let _data):
return ("messageViews", [("views", ConstructorParameterDescription(_data.views)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users))])
}
}
public static func parse_messageViews(_ reader: BufferReader) -> MessageViews? {
var _1: [Api.MessageViews]?
if let _ = reader.readInt32() {
_1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageViews.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.messages.MessageViews.messageViews(Cons_messageViews(views: _1!, chats: _2!, users: _3!))
}
else {
return nil
}
}
}
}
public extension Api.messages {
enum Messages: TypeConstructorDescription {
public class Cons_channelMessages: TypeConstructorDescription {
public var flags: Int32
public var pts: Int32
public var count: Int32
public var offsetIdOffset: Int32?
public var messages: [Api.Message]
public var topics: [Api.ForumTopic]
public var chats: [Api.Chat]
public var users: [Api.User]
public init(flags: Int32, pts: Int32, count: Int32, offsetIdOffset: Int32?, messages: [Api.Message], topics: [Api.ForumTopic], chats: [Api.Chat], users: [Api.User]) {
self.flags = flags
self.pts = pts
self.count = count
self.offsetIdOffset = offsetIdOffset
self.messages = messages
self.topics = topics
self.chats = chats
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("channelMessages", [("flags", ConstructorParameterDescription(self.flags)), ("pts", ConstructorParameterDescription(self.pts)), ("count", ConstructorParameterDescription(self.count)), ("offsetIdOffset", ConstructorParameterDescription(self.offsetIdOffset)), ("messages", ConstructorParameterDescription(self.messages)), ("topics", ConstructorParameterDescription(self.topics)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
}
}
public class Cons_messages: TypeConstructorDescription {
public var messages: [Api.Message]
public var topics: [Api.ForumTopic]
public var chats: [Api.Chat]
public var users: [Api.User]
public init(messages: [Api.Message], topics: [Api.ForumTopic], chats: [Api.Chat], users: [Api.User]) {
self.messages = messages
self.topics = topics
self.chats = chats
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("messages", [("messages", ConstructorParameterDescription(self.messages)), ("topics", ConstructorParameterDescription(self.topics)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
}
}
public class Cons_messagesNotModified: TypeConstructorDescription {
public var count: Int32
public init(count: Int32) {
self.count = count
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("messagesNotModified", [("count", ConstructorParameterDescription(self.count))])
}
}
public class Cons_messagesSlice: TypeConstructorDescription {
public var flags: Int32
public var count: Int32
public var nextRate: Int32?
public var offsetIdOffset: Int32?
public var searchFlood: Api.SearchPostsFlood?
public var messages: [Api.Message]
public var topics: [Api.ForumTopic]
public var chats: [Api.Chat]
public var users: [Api.User]
public init(flags: Int32, count: Int32, nextRate: Int32?, offsetIdOffset: Int32?, searchFlood: Api.SearchPostsFlood?, messages: [Api.Message], topics: [Api.ForumTopic], chats: [Api.Chat], users: [Api.User]) {
self.flags = flags
self.count = count
self.nextRate = nextRate
self.offsetIdOffset = offsetIdOffset
self.searchFlood = searchFlood
self.messages = messages
self.topics = topics
self.chats = chats
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("messagesSlice", [("flags", ConstructorParameterDescription(self.flags)), ("count", ConstructorParameterDescription(self.count)), ("nextRate", ConstructorParameterDescription(self.nextRate)), ("offsetIdOffset", ConstructorParameterDescription(self.offsetIdOffset)), ("searchFlood", ConstructorParameterDescription(self.searchFlood)), ("messages", ConstructorParameterDescription(self.messages)), ("topics", ConstructorParameterDescription(self.topics)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
}
}
case channelMessages(Cons_channelMessages)
case messages(Cons_messages)
case messagesNotModified(Cons_messagesNotModified)
case messagesSlice(Cons_messagesSlice)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .channelMessages(let _data):
if boxed {
buffer.appendInt32(-948520370)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt32(_data.pts, buffer: buffer, boxed: false)
serializeInt32(_data.count, buffer: buffer, boxed: false)
if Int(_data.flags) & Int(1 << 2) != 0 {
serializeInt32(_data.offsetIdOffset!, buffer: buffer, boxed: false)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.messages.count))
for item in _data.messages {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.topics.count))
for item in _data.topics {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
case .messages(let _data):
if boxed {
buffer.appendInt32(494135274)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.messages.count))
for item in _data.messages {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.topics.count))
for item in _data.topics {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
case .messagesNotModified(let _data):
if boxed {
buffer.appendInt32(1951620897)
}
serializeInt32(_data.count, buffer: buffer, boxed: false)
break
case .messagesSlice(let _data):
if boxed {
buffer.appendInt32(1595959062)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt32(_data.count, buffer: buffer, boxed: false)
if Int(_data.flags) & Int(1 << 0) != 0 {
serializeInt32(_data.nextRate!, buffer: buffer, boxed: false)
}
if Int(_data.flags) & Int(1 << 2) != 0 {
serializeInt32(_data.offsetIdOffset!, buffer: buffer, boxed: false)
}
if Int(_data.flags) & Int(1 << 3) != 0 {
_data.searchFlood!.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.messages.count))
for item in _data.messages {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.topics.count))
for item in _data.topics {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .channelMessages(let _data):
return ("channelMessages", [("flags", ConstructorParameterDescription(_data.flags)), ("pts", ConstructorParameterDescription(_data.pts)), ("count", ConstructorParameterDescription(_data.count)), ("offsetIdOffset", ConstructorParameterDescription(_data.offsetIdOffset)), ("messages", ConstructorParameterDescription(_data.messages)), ("topics", ConstructorParameterDescription(_data.topics)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users))])
case .messages(let _data):
return ("messages", [("messages", ConstructorParameterDescription(_data.messages)), ("topics", ConstructorParameterDescription(_data.topics)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users))])
case .messagesNotModified(let _data):
return ("messagesNotModified", [("count", ConstructorParameterDescription(_data.count))])
case .messagesSlice(let _data):
return ("messagesSlice", [("flags", ConstructorParameterDescription(_data.flags)), ("count", ConstructorParameterDescription(_data.count)), ("nextRate", ConstructorParameterDescription(_data.nextRate)), ("offsetIdOffset", ConstructorParameterDescription(_data.offsetIdOffset)), ("searchFlood", ConstructorParameterDescription(_data.searchFlood)), ("messages", ConstructorParameterDescription(_data.messages)), ("topics", ConstructorParameterDescription(_data.topics)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users))])
}
}
public static func parse_channelMessages(_ reader: BufferReader) -> Messages? {
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 << 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.ForumTopic]?
if let _ = reader.readInt32() {
_6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ForumTopic.self)
}
var _7: [Api.Chat]?
if let _ = reader.readInt32() {
_7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self)
}
var _8: [Api.User]?
if let _ = reader.readInt32() {
_8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self)
}
let _c1 = _1 != nil
let _c2 = _2 != nil
let _c3 = _3 != nil
let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _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.messages.Messages.channelMessages(Cons_channelMessages(flags: _1!, pts: _2!, count: _3!, offsetIdOffset: _4, messages: _5!, topics: _6!, chats: _7!, users: _8!))
}
else {
return nil
}
}
public static func parse_messages(_ reader: BufferReader) -> Messages? {
var _1: [Api.Message]?
if let _ = reader.readInt32() {
_1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Message.self)
}
var _2: [Api.ForumTopic]?
if let _ = reader.readInt32() {
_2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ForumTopic.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.messages.Messages.messages(Cons_messages(messages: _1!, topics: _2!, chats: _3!, users: _4!))
}
else {
return nil
}
}
public static func parse_messagesNotModified(_ reader: BufferReader) -> Messages? {
var _1: Int32?
_1 = reader.readInt32()
let _c1 = _1 != nil
if _c1 {
return Api.messages.Messages.messagesNotModified(Cons_messagesNotModified(count: _1!))
}
else {
return nil
}
}
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.SearchPostsFlood?
if Int(_1!) & Int(1 << 3) != 0 {
if let signature = reader.readInt32() {
_5 = Api.parse(reader, signature: signature) as? Api.SearchPostsFlood
}
}
var _6: [Api.Message]?
if let _ = reader.readInt32() {
_6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Message.self)
}
var _7: [Api.ForumTopic]?
if let _ = reader.readInt32() {
_7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ForumTopic.self)
}
var _8: [Api.Chat]?
if let _ = reader.readInt32() {
_8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self)
}
var _9: [Api.User]?
if let _ = reader.readInt32() {
_9 = 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 = (Int(_1!) & Int(1 << 3) == 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.messages.Messages.messagesSlice(Cons_messagesSlice(flags: _1!, count: _2!, nextRate: _3, offsetIdOffset: _4, searchFlood: _5, messages: _6!, topics: _7!, chats: _8!, users: _9!))
}
else {
return nil
}
}
}
}
public extension Api.messages {
enum MyStickers: TypeConstructorDescription {
public class Cons_myStickers: TypeConstructorDescription {
@ -1909,3 +1410,257 @@ public extension Api.messages {
}
}
}
public extension Api.messages {
enum StickerSetInstallResult: TypeConstructorDescription {
public class Cons_stickerSetInstallResultArchive: TypeConstructorDescription {
public var sets: [Api.StickerSetCovered]
public init(sets: [Api.StickerSetCovered]) {
self.sets = sets
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("stickerSetInstallResultArchive", [("sets", ConstructorParameterDescription(self.sets))])
}
}
case stickerSetInstallResultArchive(Cons_stickerSetInstallResultArchive)
case stickerSetInstallResultSuccess
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .stickerSetInstallResultArchive(let _data):
if boxed {
buffer.appendInt32(904138920)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.sets.count))
for item in _data.sets {
item.serialize(buffer, true)
}
break
case .stickerSetInstallResultSuccess:
if boxed {
buffer.appendInt32(946083368)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .stickerSetInstallResultArchive(let _data):
return ("stickerSetInstallResultArchive", [("sets", ConstructorParameterDescription(_data.sets))])
case .stickerSetInstallResultSuccess:
return ("stickerSetInstallResultSuccess", [])
}
}
public static func parse_stickerSetInstallResultArchive(_ reader: BufferReader) -> StickerSetInstallResult? {
var _1: [Api.StickerSetCovered]?
if let _ = reader.readInt32() {
_1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StickerSetCovered.self)
}
let _c1 = _1 != nil
if _c1 {
return Api.messages.StickerSetInstallResult.stickerSetInstallResultArchive(Cons_stickerSetInstallResultArchive(sets: _1!))
}
else {
return nil
}
}
public static func parse_stickerSetInstallResultSuccess(_ reader: BufferReader) -> StickerSetInstallResult? {
return Api.messages.StickerSetInstallResult.stickerSetInstallResultSuccess
}
}
}
public extension Api.messages {
enum Stickers: TypeConstructorDescription {
public class Cons_stickers: TypeConstructorDescription {
public var hash: Int64
public var stickers: [Api.Document]
public init(hash: Int64, stickers: [Api.Document]) {
self.hash = hash
self.stickers = stickers
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("stickers", [("hash", ConstructorParameterDescription(self.hash)), ("stickers", ConstructorParameterDescription(self.stickers))])
}
}
case stickers(Cons_stickers)
case stickersNotModified
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .stickers(let _data):
if boxed {
buffer.appendInt32(816245886)
}
serializeInt64(_data.hash, buffer: buffer, boxed: false)
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.stickers.count))
for item in _data.stickers {
item.serialize(buffer, true)
}
break
case .stickersNotModified:
if boxed {
buffer.appendInt32(-244016606)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .stickers(let _data):
return ("stickers", [("hash", ConstructorParameterDescription(_data.hash)), ("stickers", ConstructorParameterDescription(_data.stickers))])
case .stickersNotModified:
return ("stickersNotModified", [])
}
}
public static func parse_stickers(_ reader: BufferReader) -> Stickers? {
var _1: Int64?
_1 = reader.readInt64()
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.messages.Stickers.stickers(Cons_stickers(hash: _1!, stickers: _2!))
}
else {
return nil
}
}
public static func parse_stickersNotModified(_ reader: BufferReader) -> Stickers? {
return Api.messages.Stickers.stickersNotModified
}
}
}
public extension Api.messages {
enum TranscribedAudio: TypeConstructorDescription {
public class Cons_transcribedAudio: TypeConstructorDescription {
public var flags: Int32
public var transcriptionId: Int64
public var text: String
public var trialRemainsNum: Int32?
public var trialRemainsUntilDate: Int32?
public init(flags: Int32, transcriptionId: Int64, text: String, trialRemainsNum: Int32?, trialRemainsUntilDate: Int32?) {
self.flags = flags
self.transcriptionId = transcriptionId
self.text = text
self.trialRemainsNum = trialRemainsNum
self.trialRemainsUntilDate = trialRemainsUntilDate
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("transcribedAudio", [("flags", ConstructorParameterDescription(self.flags)), ("transcriptionId", ConstructorParameterDescription(self.transcriptionId)), ("text", ConstructorParameterDescription(self.text)), ("trialRemainsNum", ConstructorParameterDescription(self.trialRemainsNum)), ("trialRemainsUntilDate", ConstructorParameterDescription(self.trialRemainsUntilDate))])
}
}
case transcribedAudio(Cons_transcribedAudio)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .transcribedAudio(let _data):
if boxed {
buffer.appendInt32(-809903785)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt64(_data.transcriptionId, buffer: buffer, boxed: false)
serializeString(_data.text, buffer: buffer, boxed: false)
if Int(_data.flags) & Int(1 << 1) != 0 {
serializeInt32(_data.trialRemainsNum!, buffer: buffer, boxed: false)
}
if Int(_data.flags) & Int(1 << 1) != 0 {
serializeInt32(_data.trialRemainsUntilDate!, buffer: buffer, boxed: false)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .transcribedAudio(let _data):
return ("transcribedAudio", [("flags", ConstructorParameterDescription(_data.flags)), ("transcriptionId", ConstructorParameterDescription(_data.transcriptionId)), ("text", ConstructorParameterDescription(_data.text)), ("trialRemainsNum", ConstructorParameterDescription(_data.trialRemainsNum)), ("trialRemainsUntilDate", ConstructorParameterDescription(_data.trialRemainsUntilDate))])
}
}
public static func parse_transcribedAudio(_ reader: BufferReader) -> TranscribedAudio? {
var _1: Int32?
_1 = reader.readInt32()
var _2: Int64?
_2 = reader.readInt64()
var _3: String?
_3 = parseString(reader)
var _4: Int32?
if Int(_1!) & Int(1 << 1) != 0 {
_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 = _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.messages.TranscribedAudio.transcribedAudio(Cons_transcribedAudio(flags: _1!, transcriptionId: _2!, text: _3!, trialRemainsNum: _4, trialRemainsUntilDate: _5))
}
else {
return nil
}
}
}
}
public extension Api.messages {
enum TranslatedText: TypeConstructorDescription {
public class Cons_translateResult: TypeConstructorDescription {
public var result: [Api.TextWithEntities]
public init(result: [Api.TextWithEntities]) {
self.result = result
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("translateResult", [("result", ConstructorParameterDescription(self.result))])
}
}
case translateResult(Cons_translateResult)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .translateResult(let _data):
if boxed {
buffer.appendInt32(870003448)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.result.count))
for item in _data.result {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .translateResult(let _data):
return ("translateResult", [("result", ConstructorParameterDescription(_data.result))])
}
}
public static func parse_translateResult(_ reader: BufferReader) -> TranslatedText? {
var _1: [Api.TextWithEntities]?
if let _ = reader.readInt32() {
_1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.TextWithEntities.self)
}
let _c1 = _1 != nil
if _c1 {
return Api.messages.TranslatedText.translateResult(Cons_translateResult(result: _1!))
}
else {
return nil
}
}
}
}

View file

@ -1,257 +1,3 @@
public extension Api.messages {
enum StickerSetInstallResult: TypeConstructorDescription {
public class Cons_stickerSetInstallResultArchive: TypeConstructorDescription {
public var sets: [Api.StickerSetCovered]
public init(sets: [Api.StickerSetCovered]) {
self.sets = sets
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("stickerSetInstallResultArchive", [("sets", ConstructorParameterDescription(self.sets))])
}
}
case stickerSetInstallResultArchive(Cons_stickerSetInstallResultArchive)
case stickerSetInstallResultSuccess
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .stickerSetInstallResultArchive(let _data):
if boxed {
buffer.appendInt32(904138920)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.sets.count))
for item in _data.sets {
item.serialize(buffer, true)
}
break
case .stickerSetInstallResultSuccess:
if boxed {
buffer.appendInt32(946083368)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .stickerSetInstallResultArchive(let _data):
return ("stickerSetInstallResultArchive", [("sets", ConstructorParameterDescription(_data.sets))])
case .stickerSetInstallResultSuccess:
return ("stickerSetInstallResultSuccess", [])
}
}
public static func parse_stickerSetInstallResultArchive(_ reader: BufferReader) -> StickerSetInstallResult? {
var _1: [Api.StickerSetCovered]?
if let _ = reader.readInt32() {
_1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StickerSetCovered.self)
}
let _c1 = _1 != nil
if _c1 {
return Api.messages.StickerSetInstallResult.stickerSetInstallResultArchive(Cons_stickerSetInstallResultArchive(sets: _1!))
}
else {
return nil
}
}
public static func parse_stickerSetInstallResultSuccess(_ reader: BufferReader) -> StickerSetInstallResult? {
return Api.messages.StickerSetInstallResult.stickerSetInstallResultSuccess
}
}
}
public extension Api.messages {
enum Stickers: TypeConstructorDescription {
public class Cons_stickers: TypeConstructorDescription {
public var hash: Int64
public var stickers: [Api.Document]
public init(hash: Int64, stickers: [Api.Document]) {
self.hash = hash
self.stickers = stickers
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("stickers", [("hash", ConstructorParameterDescription(self.hash)), ("stickers", ConstructorParameterDescription(self.stickers))])
}
}
case stickers(Cons_stickers)
case stickersNotModified
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .stickers(let _data):
if boxed {
buffer.appendInt32(816245886)
}
serializeInt64(_data.hash, buffer: buffer, boxed: false)
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.stickers.count))
for item in _data.stickers {
item.serialize(buffer, true)
}
break
case .stickersNotModified:
if boxed {
buffer.appendInt32(-244016606)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .stickers(let _data):
return ("stickers", [("hash", ConstructorParameterDescription(_data.hash)), ("stickers", ConstructorParameterDescription(_data.stickers))])
case .stickersNotModified:
return ("stickersNotModified", [])
}
}
public static func parse_stickers(_ reader: BufferReader) -> Stickers? {
var _1: Int64?
_1 = reader.readInt64()
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.messages.Stickers.stickers(Cons_stickers(hash: _1!, stickers: _2!))
}
else {
return nil
}
}
public static func parse_stickersNotModified(_ reader: BufferReader) -> Stickers? {
return Api.messages.Stickers.stickersNotModified
}
}
}
public extension Api.messages {
enum TranscribedAudio: TypeConstructorDescription {
public class Cons_transcribedAudio: TypeConstructorDescription {
public var flags: Int32
public var transcriptionId: Int64
public var text: String
public var trialRemainsNum: Int32?
public var trialRemainsUntilDate: Int32?
public init(flags: Int32, transcriptionId: Int64, text: String, trialRemainsNum: Int32?, trialRemainsUntilDate: Int32?) {
self.flags = flags
self.transcriptionId = transcriptionId
self.text = text
self.trialRemainsNum = trialRemainsNum
self.trialRemainsUntilDate = trialRemainsUntilDate
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("transcribedAudio", [("flags", ConstructorParameterDescription(self.flags)), ("transcriptionId", ConstructorParameterDescription(self.transcriptionId)), ("text", ConstructorParameterDescription(self.text)), ("trialRemainsNum", ConstructorParameterDescription(self.trialRemainsNum)), ("trialRemainsUntilDate", ConstructorParameterDescription(self.trialRemainsUntilDate))])
}
}
case transcribedAudio(Cons_transcribedAudio)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .transcribedAudio(let _data):
if boxed {
buffer.appendInt32(-809903785)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt64(_data.transcriptionId, buffer: buffer, boxed: false)
serializeString(_data.text, buffer: buffer, boxed: false)
if Int(_data.flags) & Int(1 << 1) != 0 {
serializeInt32(_data.trialRemainsNum!, buffer: buffer, boxed: false)
}
if Int(_data.flags) & Int(1 << 1) != 0 {
serializeInt32(_data.trialRemainsUntilDate!, buffer: buffer, boxed: false)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .transcribedAudio(let _data):
return ("transcribedAudio", [("flags", ConstructorParameterDescription(_data.flags)), ("transcriptionId", ConstructorParameterDescription(_data.transcriptionId)), ("text", ConstructorParameterDescription(_data.text)), ("trialRemainsNum", ConstructorParameterDescription(_data.trialRemainsNum)), ("trialRemainsUntilDate", ConstructorParameterDescription(_data.trialRemainsUntilDate))])
}
}
public static func parse_transcribedAudio(_ reader: BufferReader) -> TranscribedAudio? {
var _1: Int32?
_1 = reader.readInt32()
var _2: Int64?
_2 = reader.readInt64()
var _3: String?
_3 = parseString(reader)
var _4: Int32?
if Int(_1!) & Int(1 << 1) != 0 {
_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 = _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.messages.TranscribedAudio.transcribedAudio(Cons_transcribedAudio(flags: _1!, transcriptionId: _2!, text: _3!, trialRemainsNum: _4, trialRemainsUntilDate: _5))
}
else {
return nil
}
}
}
}
public extension Api.messages {
enum TranslatedText: TypeConstructorDescription {
public class Cons_translateResult: TypeConstructorDescription {
public var result: [Api.TextWithEntities]
public init(result: [Api.TextWithEntities]) {
self.result = result
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("translateResult", [("result", ConstructorParameterDescription(self.result))])
}
}
case translateResult(Cons_translateResult)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .translateResult(let _data):
if boxed {
buffer.appendInt32(870003448)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.result.count))
for item in _data.result {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .translateResult(let _data):
return ("translateResult", [("result", ConstructorParameterDescription(_data.result))])
}
}
public static func parse_translateResult(_ reader: BufferReader) -> TranslatedText? {
var _1: [Api.TextWithEntities]?
if let _ = reader.readInt32() {
_1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.TextWithEntities.self)
}
let _c1 = _1 != nil
if _c1 {
return Api.messages.TranslatedText.translateResult(Cons_translateResult(result: _1!))
}
else {
return nil
}
}
}
}
public extension Api.messages {
enum VotesList: TypeConstructorDescription {
public class Cons_votesList: TypeConstructorDescription {
@ -2242,3 +1988,262 @@ public extension Api.payments {
}
}
}
public extension Api.payments {
enum StarGiftUpgradeAttributes: TypeConstructorDescription {
public class Cons_starGiftUpgradeAttributes: TypeConstructorDescription {
public var attributes: [Api.StarGiftAttribute]
public init(attributes: [Api.StarGiftAttribute]) {
self.attributes = attributes
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("starGiftUpgradeAttributes", [("attributes", ConstructorParameterDescription(self.attributes))])
}
}
case starGiftUpgradeAttributes(Cons_starGiftUpgradeAttributes)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .starGiftUpgradeAttributes(let _data):
if boxed {
buffer.appendInt32(1187439471)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.attributes.count))
for item in _data.attributes {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .starGiftUpgradeAttributes(let _data):
return ("starGiftUpgradeAttributes", [("attributes", ConstructorParameterDescription(_data.attributes))])
}
}
public static func parse_starGiftUpgradeAttributes(_ reader: BufferReader) -> StarGiftUpgradeAttributes? {
var _1: [Api.StarGiftAttribute]?
if let _ = reader.readInt32() {
_1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StarGiftAttribute.self)
}
let _c1 = _1 != nil
if _c1 {
return Api.payments.StarGiftUpgradeAttributes.starGiftUpgradeAttributes(Cons_starGiftUpgradeAttributes(attributes: _1!))
}
else {
return nil
}
}
}
}
public extension Api.payments {
enum StarGiftUpgradePreview: TypeConstructorDescription {
public class Cons_starGiftUpgradePreview: TypeConstructorDescription {
public var sampleAttributes: [Api.StarGiftAttribute]
public var prices: [Api.StarGiftUpgradePrice]
public var nextPrices: [Api.StarGiftUpgradePrice]
public init(sampleAttributes: [Api.StarGiftAttribute], prices: [Api.StarGiftUpgradePrice], nextPrices: [Api.StarGiftUpgradePrice]) {
self.sampleAttributes = sampleAttributes
self.prices = prices
self.nextPrices = nextPrices
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("starGiftUpgradePreview", [("sampleAttributes", ConstructorParameterDescription(self.sampleAttributes)), ("prices", ConstructorParameterDescription(self.prices)), ("nextPrices", ConstructorParameterDescription(self.nextPrices))])
}
}
case starGiftUpgradePreview(Cons_starGiftUpgradePreview)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .starGiftUpgradePreview(let _data):
if boxed {
buffer.appendInt32(1038213101)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.sampleAttributes.count))
for item in _data.sampleAttributes {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.prices.count))
for item in _data.prices {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.nextPrices.count))
for item in _data.nextPrices {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .starGiftUpgradePreview(let _data):
return ("starGiftUpgradePreview", [("sampleAttributes", ConstructorParameterDescription(_data.sampleAttributes)), ("prices", ConstructorParameterDescription(_data.prices)), ("nextPrices", ConstructorParameterDescription(_data.nextPrices))])
}
}
public static func parse_starGiftUpgradePreview(_ reader: BufferReader) -> StarGiftUpgradePreview? {
var _1: [Api.StarGiftAttribute]?
if let _ = reader.readInt32() {
_1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StarGiftAttribute.self)
}
var _2: [Api.StarGiftUpgradePrice]?
if let _ = reader.readInt32() {
_2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StarGiftUpgradePrice.self)
}
var _3: [Api.StarGiftUpgradePrice]?
if let _ = reader.readInt32() {
_3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StarGiftUpgradePrice.self)
}
let _c1 = _1 != nil
let _c2 = _2 != nil
let _c3 = _3 != nil
if _c1 && _c2 && _c3 {
return Api.payments.StarGiftUpgradePreview.starGiftUpgradePreview(Cons_starGiftUpgradePreview(sampleAttributes: _1!, prices: _2!, nextPrices: _3!))
}
else {
return nil
}
}
}
}
public extension Api.payments {
enum StarGiftWithdrawalUrl: TypeConstructorDescription {
public class Cons_starGiftWithdrawalUrl: TypeConstructorDescription {
public var url: String
public init(url: String) {
self.url = url
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("starGiftWithdrawalUrl", [("url", ConstructorParameterDescription(self.url))])
}
}
case starGiftWithdrawalUrl(Cons_starGiftWithdrawalUrl)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .starGiftWithdrawalUrl(let _data):
if boxed {
buffer.appendInt32(-2069218660)
}
serializeString(_data.url, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .starGiftWithdrawalUrl(let _data):
return ("starGiftWithdrawalUrl", [("url", ConstructorParameterDescription(_data.url))])
}
}
public static func parse_starGiftWithdrawalUrl(_ reader: BufferReader) -> StarGiftWithdrawalUrl? {
var _1: String?
_1 = parseString(reader)
let _c1 = _1 != nil
if _c1 {
return Api.payments.StarGiftWithdrawalUrl.starGiftWithdrawalUrl(Cons_starGiftWithdrawalUrl(url: _1!))
}
else {
return nil
}
}
}
}
public extension Api.payments {
enum StarGifts: TypeConstructorDescription {
public class Cons_starGifts: TypeConstructorDescription {
public var hash: Int32
public var gifts: [Api.StarGift]
public var chats: [Api.Chat]
public var users: [Api.User]
public init(hash: Int32, gifts: [Api.StarGift], chats: [Api.Chat], users: [Api.User]) {
self.hash = hash
self.gifts = gifts
self.chats = chats
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("starGifts", [("hash", ConstructorParameterDescription(self.hash)), ("gifts", ConstructorParameterDescription(self.gifts)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
}
}
case starGifts(Cons_starGifts)
case starGiftsNotModified
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .starGifts(let _data):
if boxed {
buffer.appendInt32(785918357)
}
serializeInt32(_data.hash, buffer: buffer, boxed: false)
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.gifts.count))
for item in _data.gifts {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
case .starGiftsNotModified:
if boxed {
buffer.appendInt32(-1551326360)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .starGifts(let _data):
return ("starGifts", [("hash", ConstructorParameterDescription(_data.hash)), ("gifts", ConstructorParameterDescription(_data.gifts)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users))])
case .starGiftsNotModified:
return ("starGiftsNotModified", [])
}
}
public static func parse_starGifts(_ reader: BufferReader) -> StarGifts? {
var _1: Int32?
_1 = reader.readInt32()
var _2: [Api.StarGift]?
if let _ = reader.readInt32() {
_2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StarGift.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.payments.StarGifts.starGifts(Cons_starGifts(hash: _1!, gifts: _2!, chats: _3!, users: _4!))
}
else {
return nil
}
}
public static func parse_starGiftsNotModified(_ reader: BufferReader) -> StarGifts? {
return Api.payments.StarGifts.starGiftsNotModified
}
}
}

View file

@ -1,262 +1,3 @@
public extension Api.payments {
enum StarGiftUpgradeAttributes: TypeConstructorDescription {
public class Cons_starGiftUpgradeAttributes: TypeConstructorDescription {
public var attributes: [Api.StarGiftAttribute]
public init(attributes: [Api.StarGiftAttribute]) {
self.attributes = attributes
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("starGiftUpgradeAttributes", [("attributes", ConstructorParameterDescription(self.attributes))])
}
}
case starGiftUpgradeAttributes(Cons_starGiftUpgradeAttributes)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .starGiftUpgradeAttributes(let _data):
if boxed {
buffer.appendInt32(1187439471)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.attributes.count))
for item in _data.attributes {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .starGiftUpgradeAttributes(let _data):
return ("starGiftUpgradeAttributes", [("attributes", ConstructorParameterDescription(_data.attributes))])
}
}
public static func parse_starGiftUpgradeAttributes(_ reader: BufferReader) -> StarGiftUpgradeAttributes? {
var _1: [Api.StarGiftAttribute]?
if let _ = reader.readInt32() {
_1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StarGiftAttribute.self)
}
let _c1 = _1 != nil
if _c1 {
return Api.payments.StarGiftUpgradeAttributes.starGiftUpgradeAttributes(Cons_starGiftUpgradeAttributes(attributes: _1!))
}
else {
return nil
}
}
}
}
public extension Api.payments {
enum StarGiftUpgradePreview: TypeConstructorDescription {
public class Cons_starGiftUpgradePreview: TypeConstructorDescription {
public var sampleAttributes: [Api.StarGiftAttribute]
public var prices: [Api.StarGiftUpgradePrice]
public var nextPrices: [Api.StarGiftUpgradePrice]
public init(sampleAttributes: [Api.StarGiftAttribute], prices: [Api.StarGiftUpgradePrice], nextPrices: [Api.StarGiftUpgradePrice]) {
self.sampleAttributes = sampleAttributes
self.prices = prices
self.nextPrices = nextPrices
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("starGiftUpgradePreview", [("sampleAttributes", ConstructorParameterDescription(self.sampleAttributes)), ("prices", ConstructorParameterDescription(self.prices)), ("nextPrices", ConstructorParameterDescription(self.nextPrices))])
}
}
case starGiftUpgradePreview(Cons_starGiftUpgradePreview)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .starGiftUpgradePreview(let _data):
if boxed {
buffer.appendInt32(1038213101)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.sampleAttributes.count))
for item in _data.sampleAttributes {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.prices.count))
for item in _data.prices {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.nextPrices.count))
for item in _data.nextPrices {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .starGiftUpgradePreview(let _data):
return ("starGiftUpgradePreview", [("sampleAttributes", ConstructorParameterDescription(_data.sampleAttributes)), ("prices", ConstructorParameterDescription(_data.prices)), ("nextPrices", ConstructorParameterDescription(_data.nextPrices))])
}
}
public static func parse_starGiftUpgradePreview(_ reader: BufferReader) -> StarGiftUpgradePreview? {
var _1: [Api.StarGiftAttribute]?
if let _ = reader.readInt32() {
_1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StarGiftAttribute.self)
}
var _2: [Api.StarGiftUpgradePrice]?
if let _ = reader.readInt32() {
_2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StarGiftUpgradePrice.self)
}
var _3: [Api.StarGiftUpgradePrice]?
if let _ = reader.readInt32() {
_3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StarGiftUpgradePrice.self)
}
let _c1 = _1 != nil
let _c2 = _2 != nil
let _c3 = _3 != nil
if _c1 && _c2 && _c3 {
return Api.payments.StarGiftUpgradePreview.starGiftUpgradePreview(Cons_starGiftUpgradePreview(sampleAttributes: _1!, prices: _2!, nextPrices: _3!))
}
else {
return nil
}
}
}
}
public extension Api.payments {
enum StarGiftWithdrawalUrl: TypeConstructorDescription {
public class Cons_starGiftWithdrawalUrl: TypeConstructorDescription {
public var url: String
public init(url: String) {
self.url = url
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("starGiftWithdrawalUrl", [("url", ConstructorParameterDescription(self.url))])
}
}
case starGiftWithdrawalUrl(Cons_starGiftWithdrawalUrl)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .starGiftWithdrawalUrl(let _data):
if boxed {
buffer.appendInt32(-2069218660)
}
serializeString(_data.url, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .starGiftWithdrawalUrl(let _data):
return ("starGiftWithdrawalUrl", [("url", ConstructorParameterDescription(_data.url))])
}
}
public static func parse_starGiftWithdrawalUrl(_ reader: BufferReader) -> StarGiftWithdrawalUrl? {
var _1: String?
_1 = parseString(reader)
let _c1 = _1 != nil
if _c1 {
return Api.payments.StarGiftWithdrawalUrl.starGiftWithdrawalUrl(Cons_starGiftWithdrawalUrl(url: _1!))
}
else {
return nil
}
}
}
}
public extension Api.payments {
enum StarGifts: TypeConstructorDescription {
public class Cons_starGifts: TypeConstructorDescription {
public var hash: Int32
public var gifts: [Api.StarGift]
public var chats: [Api.Chat]
public var users: [Api.User]
public init(hash: Int32, gifts: [Api.StarGift], chats: [Api.Chat], users: [Api.User]) {
self.hash = hash
self.gifts = gifts
self.chats = chats
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("starGifts", [("hash", ConstructorParameterDescription(self.hash)), ("gifts", ConstructorParameterDescription(self.gifts)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
}
}
case starGifts(Cons_starGifts)
case starGiftsNotModified
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .starGifts(let _data):
if boxed {
buffer.appendInt32(785918357)
}
serializeInt32(_data.hash, buffer: buffer, boxed: false)
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.gifts.count))
for item in _data.gifts {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
case .starGiftsNotModified:
if boxed {
buffer.appendInt32(-1551326360)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .starGifts(let _data):
return ("starGifts", [("hash", ConstructorParameterDescription(_data.hash)), ("gifts", ConstructorParameterDescription(_data.gifts)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users))])
case .starGiftsNotModified:
return ("starGiftsNotModified", [])
}
}
public static func parse_starGifts(_ reader: BufferReader) -> StarGifts? {
var _1: Int32?
_1 = reader.readInt32()
var _2: [Api.StarGift]?
if let _ = reader.readInt32() {
_2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StarGift.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.payments.StarGifts.starGifts(Cons_starGifts(hash: _1!, gifts: _2!, chats: _3!, users: _4!))
}
else {
return nil
}
}
public static func parse_starGiftsNotModified(_ reader: BufferReader) -> StarGifts? {
return Api.payments.StarGifts.starGiftsNotModified
}
}
}
public extension Api.payments {
enum StarsRevenueAdsAccountUrl: TypeConstructorDescription {
public class Cons_starsRevenueAdsAccountUrl: TypeConstructorDescription {
@ -2530,3 +2271,368 @@ public extension Api.stats {
}
}
}
public extension Api.stats {
enum PollStats: TypeConstructorDescription {
public class Cons_pollStats: TypeConstructorDescription {
public var votesGraph: Api.StatsGraph
public init(votesGraph: Api.StatsGraph) {
self.votesGraph = votesGraph
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("pollStats", [("votesGraph", ConstructorParameterDescription(self.votesGraph))])
}
}
case pollStats(Cons_pollStats)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .pollStats(let _data):
if boxed {
buffer.appendInt32(697941741)
}
_data.votesGraph.serialize(buffer, true)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .pollStats(let _data):
return ("pollStats", [("votesGraph", ConstructorParameterDescription(_data.votesGraph))])
}
}
public static func parse_pollStats(_ reader: BufferReader) -> PollStats? {
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.PollStats.pollStats(Cons_pollStats(votesGraph: _1!))
}
else {
return nil
}
}
}
}
public extension Api.stats {
enum PublicForwards: TypeConstructorDescription {
public class Cons_publicForwards: TypeConstructorDescription {
public var flags: Int32
public var count: Int32
public var forwards: [Api.PublicForward]
public var nextOffset: String?
public var chats: [Api.Chat]
public var users: [Api.User]
public init(flags: Int32, count: Int32, forwards: [Api.PublicForward], nextOffset: String?, chats: [Api.Chat], users: [Api.User]) {
self.flags = flags
self.count = count
self.forwards = forwards
self.nextOffset = nextOffset
self.chats = chats
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("publicForwards", [("flags", ConstructorParameterDescription(self.flags)), ("count", ConstructorParameterDescription(self.count)), ("forwards", ConstructorParameterDescription(self.forwards)), ("nextOffset", ConstructorParameterDescription(self.nextOffset)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
}
}
case publicForwards(Cons_publicForwards)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .publicForwards(let _data):
if boxed {
buffer.appendInt32(-1828487648)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt32(_data.count, buffer: buffer, boxed: false)
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.forwards.count))
for item in _data.forwards {
item.serialize(buffer, true)
}
if Int(_data.flags) & Int(1 << 0) != 0 {
serializeString(_data.nextOffset!, buffer: buffer, boxed: false)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .publicForwards(let _data):
return ("publicForwards", [("flags", ConstructorParameterDescription(_data.flags)), ("count", ConstructorParameterDescription(_data.count)), ("forwards", ConstructorParameterDescription(_data.forwards)), ("nextOffset", ConstructorParameterDescription(_data.nextOffset)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users))])
}
}
public static func parse_publicForwards(_ reader: BufferReader) -> PublicForwards? {
var _1: Int32?
_1 = reader.readInt32()
var _2: Int32?
_2 = reader.readInt32()
var _3: [Api.PublicForward]?
if let _ = reader.readInt32() {
_3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PublicForward.self)
}
var _4: String?
if Int(_1!) & Int(1 << 0) != 0 {
_4 = parseString(reader)
}
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 = _2 != nil
let _c3 = _3 != nil
let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil
let _c5 = _5 != nil
let _c6 = _6 != nil
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 {
return Api.stats.PublicForwards.publicForwards(Cons_publicForwards(flags: _1!, count: _2!, forwards: _3!, nextOffset: _4, chats: _5!, users: _6!))
}
else {
return nil
}
}
}
}
public extension Api.stats {
enum StoryStats: TypeConstructorDescription {
public class Cons_storyStats: TypeConstructorDescription {
public var viewsGraph: Api.StatsGraph
public var reactionsByEmotionGraph: Api.StatsGraph
public init(viewsGraph: Api.StatsGraph, reactionsByEmotionGraph: Api.StatsGraph) {
self.viewsGraph = viewsGraph
self.reactionsByEmotionGraph = reactionsByEmotionGraph
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("storyStats", [("viewsGraph", ConstructorParameterDescription(self.viewsGraph)), ("reactionsByEmotionGraph", ConstructorParameterDescription(self.reactionsByEmotionGraph))])
}
}
case storyStats(Cons_storyStats)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .storyStats(let _data):
if boxed {
buffer.appendInt32(1355613820)
}
_data.viewsGraph.serialize(buffer, true)
_data.reactionsByEmotionGraph.serialize(buffer, true)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .storyStats(let _data):
return ("storyStats", [("viewsGraph", ConstructorParameterDescription(_data.viewsGraph)), ("reactionsByEmotionGraph", ConstructorParameterDescription(_data.reactionsByEmotionGraph))])
}
}
public static func parse_storyStats(_ reader: BufferReader) -> StoryStats? {
var _1: Api.StatsGraph?
if let signature = reader.readInt32() {
_1 = Api.parse(reader, signature: signature) as? Api.StatsGraph
}
var _2: Api.StatsGraph?
if let signature = reader.readInt32() {
_2 = Api.parse(reader, signature: signature) as? Api.StatsGraph
}
let _c1 = _1 != nil
let _c2 = _2 != nil
if _c1 && _c2 {
return Api.stats.StoryStats.storyStats(Cons_storyStats(viewsGraph: _1!, reactionsByEmotionGraph: _2!))
}
else {
return nil
}
}
}
}
public extension Api.stickers {
enum SuggestedShortName: TypeConstructorDescription {
public class Cons_suggestedShortName: TypeConstructorDescription {
public var shortName: String
public init(shortName: String) {
self.shortName = shortName
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("suggestedShortName", [("shortName", ConstructorParameterDescription(self.shortName))])
}
}
case suggestedShortName(Cons_suggestedShortName)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .suggestedShortName(let _data):
if boxed {
buffer.appendInt32(-2046910401)
}
serializeString(_data.shortName, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .suggestedShortName(let _data):
return ("suggestedShortName", [("shortName", ConstructorParameterDescription(_data.shortName))])
}
}
public static func parse_suggestedShortName(_ reader: BufferReader) -> SuggestedShortName? {
var _1: String?
_1 = parseString(reader)
let _c1 = _1 != nil
if _c1 {
return Api.stickers.SuggestedShortName.suggestedShortName(Cons_suggestedShortName(shortName: _1!))
}
else {
return nil
}
}
}
}
public extension Api.storage {
enum FileType: TypeConstructorDescription {
case fileGif
case fileJpeg
case fileMov
case fileMp3
case fileMp4
case filePartial
case filePdf
case filePng
case fileUnknown
case fileWebp
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .fileGif:
if boxed {
buffer.appendInt32(-891180321)
}
break
case .fileJpeg:
if boxed {
buffer.appendInt32(8322574)
}
break
case .fileMov:
if boxed {
buffer.appendInt32(1258941372)
}
break
case .fileMp3:
if boxed {
buffer.appendInt32(1384777335)
}
break
case .fileMp4:
if boxed {
buffer.appendInt32(-1278304028)
}
break
case .filePartial:
if boxed {
buffer.appendInt32(1086091090)
}
break
case .filePdf:
if boxed {
buffer.appendInt32(-1373745011)
}
break
case .filePng:
if boxed {
buffer.appendInt32(172975040)
}
break
case .fileUnknown:
if boxed {
buffer.appendInt32(-1432995067)
}
break
case .fileWebp:
if boxed {
buffer.appendInt32(276907596)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .fileGif:
return ("fileGif", [])
case .fileJpeg:
return ("fileJpeg", [])
case .fileMov:
return ("fileMov", [])
case .fileMp3:
return ("fileMp3", [])
case .fileMp4:
return ("fileMp4", [])
case .filePartial:
return ("filePartial", [])
case .filePdf:
return ("filePdf", [])
case .filePng:
return ("filePng", [])
case .fileUnknown:
return ("fileUnknown", [])
case .fileWebp:
return ("fileWebp", [])
}
}
public static func parse_fileGif(_ reader: BufferReader) -> FileType? {
return Api.storage.FileType.fileGif
}
public static func parse_fileJpeg(_ reader: BufferReader) -> FileType? {
return Api.storage.FileType.fileJpeg
}
public static func parse_fileMov(_ reader: BufferReader) -> FileType? {
return Api.storage.FileType.fileMov
}
public static func parse_fileMp3(_ reader: BufferReader) -> FileType? {
return Api.storage.FileType.fileMp3
}
public static func parse_fileMp4(_ reader: BufferReader) -> FileType? {
return Api.storage.FileType.fileMp4
}
public static func parse_filePartial(_ reader: BufferReader) -> FileType? {
return Api.storage.FileType.filePartial
}
public static func parse_filePdf(_ reader: BufferReader) -> FileType? {
return Api.storage.FileType.filePdf
}
public static func parse_filePng(_ reader: BufferReader) -> FileType? {
return Api.storage.FileType.filePng
}
public static func parse_fileUnknown(_ reader: BufferReader) -> FileType? {
return Api.storage.FileType.fileUnknown
}
public static func parse_fileWebp(_ reader: BufferReader) -> FileType? {
return Api.storage.FileType.fileWebp
}
}
}

View file

@ -1,368 +1,3 @@
public extension Api.stats {
enum PollStats: TypeConstructorDescription {
public class Cons_pollStats: TypeConstructorDescription {
public var votesGraph: Api.StatsGraph
public init(votesGraph: Api.StatsGraph) {
self.votesGraph = votesGraph
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("pollStats", [("votesGraph", ConstructorParameterDescription(self.votesGraph))])
}
}
case pollStats(Cons_pollStats)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .pollStats(let _data):
if boxed {
buffer.appendInt32(697941741)
}
_data.votesGraph.serialize(buffer, true)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .pollStats(let _data):
return ("pollStats", [("votesGraph", ConstructorParameterDescription(_data.votesGraph))])
}
}
public static func parse_pollStats(_ reader: BufferReader) -> PollStats? {
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.PollStats.pollStats(Cons_pollStats(votesGraph: _1!))
}
else {
return nil
}
}
}
}
public extension Api.stats {
enum PublicForwards: TypeConstructorDescription {
public class Cons_publicForwards: TypeConstructorDescription {
public var flags: Int32
public var count: Int32
public var forwards: [Api.PublicForward]
public var nextOffset: String?
public var chats: [Api.Chat]
public var users: [Api.User]
public init(flags: Int32, count: Int32, forwards: [Api.PublicForward], nextOffset: String?, chats: [Api.Chat], users: [Api.User]) {
self.flags = flags
self.count = count
self.forwards = forwards
self.nextOffset = nextOffset
self.chats = chats
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("publicForwards", [("flags", ConstructorParameterDescription(self.flags)), ("count", ConstructorParameterDescription(self.count)), ("forwards", ConstructorParameterDescription(self.forwards)), ("nextOffset", ConstructorParameterDescription(self.nextOffset)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
}
}
case publicForwards(Cons_publicForwards)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .publicForwards(let _data):
if boxed {
buffer.appendInt32(-1828487648)
}
serializeInt32(_data.flags, buffer: buffer, boxed: false)
serializeInt32(_data.count, buffer: buffer, boxed: false)
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.forwards.count))
for item in _data.forwards {
item.serialize(buffer, true)
}
if Int(_data.flags) & Int(1 << 0) != 0 {
serializeString(_data.nextOffset!, buffer: buffer, boxed: false)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .publicForwards(let _data):
return ("publicForwards", [("flags", ConstructorParameterDescription(_data.flags)), ("count", ConstructorParameterDescription(_data.count)), ("forwards", ConstructorParameterDescription(_data.forwards)), ("nextOffset", ConstructorParameterDescription(_data.nextOffset)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users))])
}
}
public static func parse_publicForwards(_ reader: BufferReader) -> PublicForwards? {
var _1: Int32?
_1 = reader.readInt32()
var _2: Int32?
_2 = reader.readInt32()
var _3: [Api.PublicForward]?
if let _ = reader.readInt32() {
_3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PublicForward.self)
}
var _4: String?
if Int(_1!) & Int(1 << 0) != 0 {
_4 = parseString(reader)
}
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 = _2 != nil
let _c3 = _3 != nil
let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil
let _c5 = _5 != nil
let _c6 = _6 != nil
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 {
return Api.stats.PublicForwards.publicForwards(Cons_publicForwards(flags: _1!, count: _2!, forwards: _3!, nextOffset: _4, chats: _5!, users: _6!))
}
else {
return nil
}
}
}
}
public extension Api.stats {
enum StoryStats: TypeConstructorDescription {
public class Cons_storyStats: TypeConstructorDescription {
public var viewsGraph: Api.StatsGraph
public var reactionsByEmotionGraph: Api.StatsGraph
public init(viewsGraph: Api.StatsGraph, reactionsByEmotionGraph: Api.StatsGraph) {
self.viewsGraph = viewsGraph
self.reactionsByEmotionGraph = reactionsByEmotionGraph
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("storyStats", [("viewsGraph", ConstructorParameterDescription(self.viewsGraph)), ("reactionsByEmotionGraph", ConstructorParameterDescription(self.reactionsByEmotionGraph))])
}
}
case storyStats(Cons_storyStats)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .storyStats(let _data):
if boxed {
buffer.appendInt32(1355613820)
}
_data.viewsGraph.serialize(buffer, true)
_data.reactionsByEmotionGraph.serialize(buffer, true)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .storyStats(let _data):
return ("storyStats", [("viewsGraph", ConstructorParameterDescription(_data.viewsGraph)), ("reactionsByEmotionGraph", ConstructorParameterDescription(_data.reactionsByEmotionGraph))])
}
}
public static func parse_storyStats(_ reader: BufferReader) -> StoryStats? {
var _1: Api.StatsGraph?
if let signature = reader.readInt32() {
_1 = Api.parse(reader, signature: signature) as? Api.StatsGraph
}
var _2: Api.StatsGraph?
if let signature = reader.readInt32() {
_2 = Api.parse(reader, signature: signature) as? Api.StatsGraph
}
let _c1 = _1 != nil
let _c2 = _2 != nil
if _c1 && _c2 {
return Api.stats.StoryStats.storyStats(Cons_storyStats(viewsGraph: _1!, reactionsByEmotionGraph: _2!))
}
else {
return nil
}
}
}
}
public extension Api.stickers {
enum SuggestedShortName: TypeConstructorDescription {
public class Cons_suggestedShortName: TypeConstructorDescription {
public var shortName: String
public init(shortName: String) {
self.shortName = shortName
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("suggestedShortName", [("shortName", ConstructorParameterDescription(self.shortName))])
}
}
case suggestedShortName(Cons_suggestedShortName)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .suggestedShortName(let _data):
if boxed {
buffer.appendInt32(-2046910401)
}
serializeString(_data.shortName, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .suggestedShortName(let _data):
return ("suggestedShortName", [("shortName", ConstructorParameterDescription(_data.shortName))])
}
}
public static func parse_suggestedShortName(_ reader: BufferReader) -> SuggestedShortName? {
var _1: String?
_1 = parseString(reader)
let _c1 = _1 != nil
if _c1 {
return Api.stickers.SuggestedShortName.suggestedShortName(Cons_suggestedShortName(shortName: _1!))
}
else {
return nil
}
}
}
}
public extension Api.storage {
enum FileType: TypeConstructorDescription {
case fileGif
case fileJpeg
case fileMov
case fileMp3
case fileMp4
case filePartial
case filePdf
case filePng
case fileUnknown
case fileWebp
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .fileGif:
if boxed {
buffer.appendInt32(-891180321)
}
break
case .fileJpeg:
if boxed {
buffer.appendInt32(8322574)
}
break
case .fileMov:
if boxed {
buffer.appendInt32(1258941372)
}
break
case .fileMp3:
if boxed {
buffer.appendInt32(1384777335)
}
break
case .fileMp4:
if boxed {
buffer.appendInt32(-1278304028)
}
break
case .filePartial:
if boxed {
buffer.appendInt32(1086091090)
}
break
case .filePdf:
if boxed {
buffer.appendInt32(-1373745011)
}
break
case .filePng:
if boxed {
buffer.appendInt32(172975040)
}
break
case .fileUnknown:
if boxed {
buffer.appendInt32(-1432995067)
}
break
case .fileWebp:
if boxed {
buffer.appendInt32(276907596)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .fileGif:
return ("fileGif", [])
case .fileJpeg:
return ("fileJpeg", [])
case .fileMov:
return ("fileMov", [])
case .fileMp3:
return ("fileMp3", [])
case .fileMp4:
return ("fileMp4", [])
case .filePartial:
return ("filePartial", [])
case .filePdf:
return ("filePdf", [])
case .filePng:
return ("filePng", [])
case .fileUnknown:
return ("fileUnknown", [])
case .fileWebp:
return ("fileWebp", [])
}
}
public static func parse_fileGif(_ reader: BufferReader) -> FileType? {
return Api.storage.FileType.fileGif
}
public static func parse_fileJpeg(_ reader: BufferReader) -> FileType? {
return Api.storage.FileType.fileJpeg
}
public static func parse_fileMov(_ reader: BufferReader) -> FileType? {
return Api.storage.FileType.fileMov
}
public static func parse_fileMp3(_ reader: BufferReader) -> FileType? {
return Api.storage.FileType.fileMp3
}
public static func parse_fileMp4(_ reader: BufferReader) -> FileType? {
return Api.storage.FileType.fileMp4
}
public static func parse_filePartial(_ reader: BufferReader) -> FileType? {
return Api.storage.FileType.filePartial
}
public static func parse_filePdf(_ reader: BufferReader) -> FileType? {
return Api.storage.FileType.filePdf
}
public static func parse_filePng(_ reader: BufferReader) -> FileType? {
return Api.storage.FileType.filePng
}
public static func parse_fileUnknown(_ reader: BufferReader) -> FileType? {
return Api.storage.FileType.fileUnknown
}
public static func parse_fileWebp(_ reader: BufferReader) -> FileType? {
return Api.storage.FileType.fileWebp
}
}
}
public extension Api.stories {
enum Albums: TypeConstructorDescription {
public class Cons_albums: TypeConstructorDescription {
@ -1654,3 +1289,577 @@ public extension Api.updates {
}
}
}
public extension Api.updates {
enum State: TypeConstructorDescription {
public class Cons_state: TypeConstructorDescription {
public var pts: Int32
public var qts: Int32
public var date: Int32
public var seq: Int32
public var unreadCount: Int32
public init(pts: Int32, qts: Int32, date: Int32, seq: Int32, unreadCount: Int32) {
self.pts = pts
self.qts = qts
self.date = date
self.seq = seq
self.unreadCount = unreadCount
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("state", [("pts", ConstructorParameterDescription(self.pts)), ("qts", ConstructorParameterDescription(self.qts)), ("date", ConstructorParameterDescription(self.date)), ("seq", ConstructorParameterDescription(self.seq)), ("unreadCount", ConstructorParameterDescription(self.unreadCount))])
}
}
case state(Cons_state)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .state(let _data):
if boxed {
buffer.appendInt32(-1519637954)
}
serializeInt32(_data.pts, buffer: buffer, boxed: false)
serializeInt32(_data.qts, buffer: buffer, boxed: false)
serializeInt32(_data.date, buffer: buffer, boxed: false)
serializeInt32(_data.seq, buffer: buffer, boxed: false)
serializeInt32(_data.unreadCount, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .state(let _data):
return ("state", [("pts", ConstructorParameterDescription(_data.pts)), ("qts", ConstructorParameterDescription(_data.qts)), ("date", ConstructorParameterDescription(_data.date)), ("seq", ConstructorParameterDescription(_data.seq)), ("unreadCount", ConstructorParameterDescription(_data.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(Cons_state(pts: _1!, qts: _2!, date: _3!, seq: _4!, unreadCount: _5!))
}
else {
return nil
}
}
}
}
public extension Api.upload {
enum CdnFile: TypeConstructorDescription {
public class Cons_cdnFile: TypeConstructorDescription {
public var bytes: Buffer
public init(bytes: Buffer) {
self.bytes = bytes
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("cdnFile", [("bytes", ConstructorParameterDescription(self.bytes))])
}
}
public class Cons_cdnFileReuploadNeeded: TypeConstructorDescription {
public var requestToken: Buffer
public init(requestToken: Buffer) {
self.requestToken = requestToken
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("cdnFileReuploadNeeded", [("requestToken", ConstructorParameterDescription(self.requestToken))])
}
}
case cdnFile(Cons_cdnFile)
case cdnFileReuploadNeeded(Cons_cdnFileReuploadNeeded)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .cdnFile(let _data):
if boxed {
buffer.appendInt32(-1449145777)
}
serializeBytes(_data.bytes, buffer: buffer, boxed: false)
break
case .cdnFileReuploadNeeded(let _data):
if boxed {
buffer.appendInt32(-290921362)
}
serializeBytes(_data.requestToken, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .cdnFile(let _data):
return ("cdnFile", [("bytes", ConstructorParameterDescription(_data.bytes))])
case .cdnFileReuploadNeeded(let _data):
return ("cdnFileReuploadNeeded", [("requestToken", ConstructorParameterDescription(_data.requestToken))])
}
}
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(Cons_cdnFile(bytes: _1!))
}
else {
return nil
}
}
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(Cons_cdnFileReuploadNeeded(requestToken: _1!))
}
else {
return nil
}
}
}
}
public extension Api.upload {
enum File: TypeConstructorDescription {
public class Cons_file: TypeConstructorDescription {
public var type: Api.storage.FileType
public var mtime: Int32
public var bytes: Buffer
public init(type: Api.storage.FileType, mtime: Int32, bytes: Buffer) {
self.type = type
self.mtime = mtime
self.bytes = bytes
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("file", [("type", ConstructorParameterDescription(self.type)), ("mtime", ConstructorParameterDescription(self.mtime)), ("bytes", ConstructorParameterDescription(self.bytes))])
}
}
public class Cons_fileCdnRedirect: TypeConstructorDescription {
public var dcId: Int32
public var fileToken: Buffer
public var encryptionKey: Buffer
public var encryptionIv: Buffer
public var fileHashes: [Api.FileHash]
public init(dcId: Int32, fileToken: Buffer, encryptionKey: Buffer, encryptionIv: Buffer, fileHashes: [Api.FileHash]) {
self.dcId = dcId
self.fileToken = fileToken
self.encryptionKey = encryptionKey
self.encryptionIv = encryptionIv
self.fileHashes = fileHashes
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("fileCdnRedirect", [("dcId", ConstructorParameterDescription(self.dcId)), ("fileToken", ConstructorParameterDescription(self.fileToken)), ("encryptionKey", ConstructorParameterDescription(self.encryptionKey)), ("encryptionIv", ConstructorParameterDescription(self.encryptionIv)), ("fileHashes", ConstructorParameterDescription(self.fileHashes))])
}
}
case file(Cons_file)
case fileCdnRedirect(Cons_fileCdnRedirect)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .file(let _data):
if boxed {
buffer.appendInt32(157948117)
}
_data.type.serialize(buffer, true)
serializeInt32(_data.mtime, buffer: buffer, boxed: false)
serializeBytes(_data.bytes, buffer: buffer, boxed: false)
break
case .fileCdnRedirect(let _data):
if boxed {
buffer.appendInt32(-242427324)
}
serializeInt32(_data.dcId, buffer: buffer, boxed: false)
serializeBytes(_data.fileToken, buffer: buffer, boxed: false)
serializeBytes(_data.encryptionKey, buffer: buffer, boxed: false)
serializeBytes(_data.encryptionIv, buffer: buffer, boxed: false)
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.fileHashes.count))
for item in _data.fileHashes {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .file(let _data):
return ("file", [("type", ConstructorParameterDescription(_data.type)), ("mtime", ConstructorParameterDescription(_data.mtime)), ("bytes", ConstructorParameterDescription(_data.bytes))])
case .fileCdnRedirect(let _data):
return ("fileCdnRedirect", [("dcId", ConstructorParameterDescription(_data.dcId)), ("fileToken", ConstructorParameterDescription(_data.fileToken)), ("encryptionKey", ConstructorParameterDescription(_data.encryptionKey)), ("encryptionIv", ConstructorParameterDescription(_data.encryptionIv)), ("fileHashes", ConstructorParameterDescription(_data.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(Cons_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(Cons_fileCdnRedirect(dcId: _1!, fileToken: _2!, encryptionKey: _3!, encryptionIv: _4!, fileHashes: _5!))
}
else {
return nil
}
}
}
}
public extension Api.upload {
enum WebFile: TypeConstructorDescription {
public class Cons_webFile: TypeConstructorDescription {
public var size: Int32
public var mimeType: String
public var fileType: Api.storage.FileType
public var mtime: Int32
public var bytes: Buffer
public init(size: Int32, mimeType: String, fileType: Api.storage.FileType, mtime: Int32, bytes: Buffer) {
self.size = size
self.mimeType = mimeType
self.fileType = fileType
self.mtime = mtime
self.bytes = bytes
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("webFile", [("size", ConstructorParameterDescription(self.size)), ("mimeType", ConstructorParameterDescription(self.mimeType)), ("fileType", ConstructorParameterDescription(self.fileType)), ("mtime", ConstructorParameterDescription(self.mtime)), ("bytes", ConstructorParameterDescription(self.bytes))])
}
}
case webFile(Cons_webFile)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .webFile(let _data):
if boxed {
buffer.appendInt32(568808380)
}
serializeInt32(_data.size, buffer: buffer, boxed: false)
serializeString(_data.mimeType, buffer: buffer, boxed: false)
_data.fileType.serialize(buffer, true)
serializeInt32(_data.mtime, buffer: buffer, boxed: false)
serializeBytes(_data.bytes, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .webFile(let _data):
return ("webFile", [("size", ConstructorParameterDescription(_data.size)), ("mimeType", ConstructorParameterDescription(_data.mimeType)), ("fileType", ConstructorParameterDescription(_data.fileType)), ("mtime", ConstructorParameterDescription(_data.mtime)), ("bytes", ConstructorParameterDescription(_data.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(Cons_webFile(size: _1!, mimeType: _2!, fileType: _3!, mtime: _4!, bytes: _5!))
}
else {
return nil
}
}
}
}
public extension Api.users {
enum SavedMusic: TypeConstructorDescription {
public class Cons_savedMusic: TypeConstructorDescription {
public var count: Int32
public var documents: [Api.Document]
public init(count: Int32, documents: [Api.Document]) {
self.count = count
self.documents = documents
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("savedMusic", [("count", ConstructorParameterDescription(self.count)), ("documents", ConstructorParameterDescription(self.documents))])
}
}
public class Cons_savedMusicNotModified: TypeConstructorDescription {
public var count: Int32
public init(count: Int32) {
self.count = count
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("savedMusicNotModified", [("count", ConstructorParameterDescription(self.count))])
}
}
case savedMusic(Cons_savedMusic)
case savedMusicNotModified(Cons_savedMusicNotModified)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .savedMusic(let _data):
if boxed {
buffer.appendInt32(883094167)
}
serializeInt32(_data.count, buffer: buffer, boxed: false)
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.documents.count))
for item in _data.documents {
item.serialize(buffer, true)
}
break
case .savedMusicNotModified(let _data):
if boxed {
buffer.appendInt32(-477656412)
}
serializeInt32(_data.count, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .savedMusic(let _data):
return ("savedMusic", [("count", ConstructorParameterDescription(_data.count)), ("documents", ConstructorParameterDescription(_data.documents))])
case .savedMusicNotModified(let _data):
return ("savedMusicNotModified", [("count", ConstructorParameterDescription(_data.count))])
}
}
public static func parse_savedMusic(_ reader: BufferReader) -> SavedMusic? {
var _1: Int32?
_1 = reader.readInt32()
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.users.SavedMusic.savedMusic(Cons_savedMusic(count: _1!, documents: _2!))
}
else {
return nil
}
}
public static func parse_savedMusicNotModified(_ reader: BufferReader) -> SavedMusic? {
var _1: Int32?
_1 = reader.readInt32()
let _c1 = _1 != nil
if _c1 {
return Api.users.SavedMusic.savedMusicNotModified(Cons_savedMusicNotModified(count: _1!))
}
else {
return nil
}
}
}
}
public extension Api.users {
enum UserFull: TypeConstructorDescription {
public class Cons_userFull: TypeConstructorDescription {
public var fullUser: Api.UserFull
public var chats: [Api.Chat]
public var users: [Api.User]
public init(fullUser: Api.UserFull, chats: [Api.Chat], users: [Api.User]) {
self.fullUser = fullUser
self.chats = chats
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("userFull", [("fullUser", ConstructorParameterDescription(self.fullUser)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
}
}
case userFull(Cons_userFull)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .userFull(let _data):
if boxed {
buffer.appendInt32(997004590)
}
_data.fullUser.serialize(buffer, true)
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.chats.count))
for item in _data.chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .userFull(let _data):
return ("userFull", [("fullUser", ConstructorParameterDescription(_data.fullUser)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users))])
}
}
public static func parse_userFull(_ reader: BufferReader) -> UserFull? {
var _1: Api.UserFull?
if let signature = reader.readInt32() {
_1 = Api.parse(reader, signature: signature) as? Api.UserFull
}
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.users.UserFull.userFull(Cons_userFull(fullUser: _1!, chats: _2!, users: _3!))
}
else {
return nil
}
}
}
}
public extension Api.users {
enum Users: TypeConstructorDescription {
public class Cons_users: TypeConstructorDescription {
public var users: [Api.User]
public init(users: [Api.User]) {
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("users", [("users", ConstructorParameterDescription(self.users))])
}
}
public class Cons_usersSlice: TypeConstructorDescription {
public var count: Int32
public var users: [Api.User]
public init(count: Int32, users: [Api.User]) {
self.count = count
self.users = users
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("usersSlice", [("count", ConstructorParameterDescription(self.count)), ("users", ConstructorParameterDescription(self.users))])
}
}
case users(Cons_users)
case usersSlice(Cons_usersSlice)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .users(let _data):
if boxed {
buffer.appendInt32(1658259128)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
case .usersSlice(let _data):
if boxed {
buffer.appendInt32(828000628)
}
serializeInt32(_data.count, buffer: buffer, boxed: false)
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(_data.users.count))
for item in _data.users {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .users(let _data):
return ("users", [("users", ConstructorParameterDescription(_data.users))])
case .usersSlice(let _data):
return ("usersSlice", [("count", ConstructorParameterDescription(_data.count)), ("users", ConstructorParameterDescription(_data.users))])
}
}
public static func parse_users(_ reader: BufferReader) -> Users? {
var _1: [Api.User]?
if let _ = reader.readInt32() {
_1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self)
}
let _c1 = _1 != nil
if _c1 {
return Api.users.Users.users(Cons_users(users: _1!))
}
else {
return nil
}
}
public static func parse_usersSlice(_ reader: BufferReader) -> Users? {
var _1: Int32?
_1 = reader.readInt32()
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.users.Users.usersSlice(Cons_usersSlice(count: _1!, users: _2!))
}
else {
return nil
}
}
}
}

View file

@ -754,56 +754,6 @@ public extension Api {
}
}
}
public extension Api {
enum ChannelTopic: TypeConstructorDescription {
public class Cons_channelTopic: TypeConstructorDescription {
public var id: Int32
public var title: String
public init(id: Int32, title: String) {
self.id = id
self.title = title
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
return ("channelTopic", [("id", ConstructorParameterDescription(self.id)), ("title", ConstructorParameterDescription(self.title))])
}
}
case channelTopic(Cons_channelTopic)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .channelTopic(let _data):
if boxed {
buffer.appendInt32(-1817845901)
}
serializeInt32(_data.id, buffer: buffer, boxed: false)
serializeString(_data.title, buffer: buffer, boxed: false)
break
}
}
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
switch self {
case .channelTopic(let _data):
return ("channelTopic", [("id", ConstructorParameterDescription(_data.id)), ("title", ConstructorParameterDescription(_data.title))])
}
}
public static func parse_channelTopic(_ reader: BufferReader) -> ChannelTopic? {
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.ChannelTopic.channelTopic(Cons_channelTopic(id: _1!, title: _2!))
}
else {
return nil
}
}
}
}
public extension Api {
indirect enum Chat: TypeConstructorDescription {
public class Cons_channel: TypeConstructorDescription {

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff