mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
TelegramApi: regenerate schema for AI-compose tone + webpage attribute
Adds aicompose.createTone/updateTone/deleteTone functions, InputAiComposeTone constructor, and webPageAttributeAiComposeTone. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4bd54b9771
commit
b8e985b939
16 changed files with 17022 additions and 16796 deletions
|
|
@ -57,8 +57,9 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
|
|||
dict[0x0929C32F] = { return parseInt256($0) }
|
||||
dict[-1255641564] = { return parseString($0) }
|
||||
dict[-1194283041] = { return Api.AccountDaysTTL.parse_accountDaysTTL($0) }
|
||||
dict[317330533] = { return Api.AiComposeTone.parse_aiComposeTone($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[-653423106] = { return Api.AttachMenuBot.parse_attachMenuBot($0) }
|
||||
dict[-1297663893] = { return Api.AttachMenuBotIcon.parse_attachMenuBotIcon($0) }
|
||||
dict[1165423600] = { return Api.AttachMenuBotIconColor.parse_attachMenuBotIconColor($0) }
|
||||
|
|
@ -1294,6 +1295,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
|
|||
dict[555358088] = { return Api.WebPage.parse_webPageEmpty($0) }
|
||||
dict[1930545681] = { return Api.WebPage.parse_webPageNotModified($0) }
|
||||
dict[-1328464313] = { return Api.WebPage.parse_webPagePending($0) }
|
||||
dict[2005007896] = { return Api.WebPageAttribute.parse_webPageAttributeAiComposeTone($0) }
|
||||
dict[29770178] = { return Api.WebPageAttribute.parse_webPageAttributeStarGiftAuction($0) }
|
||||
dict[835375875] = { return Api.WebPageAttribute.parse_webPageAttributeStarGiftCollection($0) }
|
||||
dict[1355547603] = { return Api.WebPageAttribute.parse_webPageAttributeStickerSet($0) }
|
||||
|
|
@ -1340,7 +1342,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
|
|||
dict[-842824308] = { return Api.account.WallPapers.parse_wallPapers($0) }
|
||||
dict[471437699] = { return Api.account.WallPapers.parse_wallPapersNotModified($0) }
|
||||
dict[-313079300] = { return Api.account.WebAuthorizations.parse_webAuthorizations($0) }
|
||||
dict[1696028994] = { return Api.aicompose.Tones.parse_tones($0) }
|
||||
dict[1822232318] = { return Api.aicompose.Tones.parse_tones($0) }
|
||||
dict[-1040948989] = { return Api.aicompose.Tones.parse_tonesNotModified($0) }
|
||||
dict[782418132] = { return Api.auth.Authorization.parse_authorization($0) }
|
||||
dict[1148485274] = { return Api.auth.Authorization.parse_authorizationSignUpRequired($0) }
|
||||
|
|
@ -1370,6 +1372,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
|
|||
dict[-1073693790] = { return Api.auth.SentCodeType.parse_sentCodeTypeSms($0) }
|
||||
dict[-1284008785] = { return Api.auth.SentCodeType.parse_sentCodeTypeSmsPhrase($0) }
|
||||
dict[-1542017919] = { return Api.auth.SentCodeType.parse_sentCodeTypeSmsWord($0) }
|
||||
dict[-585121901] = { return Api.bots.AccessSettings.parse_accessSettings($0) }
|
||||
dict[-391678544] = { return Api.bots.BotInfo.parse_botInfo($0) }
|
||||
dict[1012971041] = { return Api.bots.ExportedBotToken.parse_exportedBotToken($0) }
|
||||
dict[428978491] = { return Api.bots.PopularAppBots.parse_popularAppBots($0) }
|
||||
|
|
@ -1686,6 +1689,8 @@ public extension Api {
|
|||
_1.serialize(buffer, boxed)
|
||||
case let _1 as Api.AiComposeTone:
|
||||
_1.serialize(buffer, boxed)
|
||||
case let _1 as Api.AiComposeToneExample:
|
||||
_1.serialize(buffer, boxed)
|
||||
case let _1 as Api.AttachMenuBot:
|
||||
_1.serialize(buffer, boxed)
|
||||
case let _1 as Api.AttachMenuBotIcon:
|
||||
|
|
@ -2514,6 +2519,8 @@ public extension Api {
|
|||
_1.serialize(buffer, boxed)
|
||||
case let _1 as Api.auth.SentCodeType:
|
||||
_1.serialize(buffer, boxed)
|
||||
case let _1 as Api.bots.AccessSettings:
|
||||
_1.serialize(buffer, boxed)
|
||||
case let _1 as Api.bots.BotInfo:
|
||||
_1.serialize(buffer, boxed)
|
||||
case let _1 as Api.bots.ExportedBotToken:
|
||||
|
|
|
|||
|
|
@ -51,10 +51,11 @@ public extension Api {
|
|||
public var slug: String
|
||||
public var title: String
|
||||
public var emojiId: Int64?
|
||||
public var prompt: String
|
||||
public var prompt: String?
|
||||
public var installsCount: Int32?
|
||||
public var authorId: Int64?
|
||||
public init(flags: Int32, id: Int64, accessHash: Int64, slug: String, title: String, emojiId: Int64?, prompt: String, installsCount: Int32?, authorId: Int64?) {
|
||||
public var exampleEnglish: Api.AiComposeToneExample?
|
||||
public init(flags: Int32, id: Int64, accessHash: Int64, slug: String, title: String, emojiId: Int64?, prompt: String?, installsCount: Int32?, authorId: Int64?, exampleEnglish: Api.AiComposeToneExample?) {
|
||||
self.flags = flags
|
||||
self.id = id
|
||||
self.accessHash = accessHash
|
||||
|
|
@ -64,9 +65,10 @@ public extension Api {
|
|||
self.prompt = prompt
|
||||
self.installsCount = installsCount
|
||||
self.authorId = authorId
|
||||
self.exampleEnglish = exampleEnglish
|
||||
}
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
return ("aiComposeTone", [("flags", ConstructorParameterDescription(self.flags)), ("id", ConstructorParameterDescription(self.id)), ("accessHash", ConstructorParameterDescription(self.accessHash)), ("slug", ConstructorParameterDescription(self.slug)), ("title", ConstructorParameterDescription(self.title)), ("emojiId", ConstructorParameterDescription(self.emojiId)), ("prompt", ConstructorParameterDescription(self.prompt)), ("installsCount", ConstructorParameterDescription(self.installsCount)), ("authorId", ConstructorParameterDescription(self.authorId))])
|
||||
return ("aiComposeTone", [("flags", ConstructorParameterDescription(self.flags)), ("id", ConstructorParameterDescription(self.id)), ("accessHash", ConstructorParameterDescription(self.accessHash)), ("slug", ConstructorParameterDescription(self.slug)), ("title", ConstructorParameterDescription(self.title)), ("emojiId", ConstructorParameterDescription(self.emojiId)), ("prompt", ConstructorParameterDescription(self.prompt)), ("installsCount", ConstructorParameterDescription(self.installsCount)), ("authorId", ConstructorParameterDescription(self.authorId)), ("exampleEnglish", ConstructorParameterDescription(self.exampleEnglish))])
|
||||
}
|
||||
}
|
||||
public class Cons_aiComposeToneDefault: TypeConstructorDescription {
|
||||
|
|
@ -89,7 +91,7 @@ public extension Api {
|
|||
switch self {
|
||||
case .aiComposeTone(let _data):
|
||||
if boxed {
|
||||
buffer.appendInt32(317330533)
|
||||
buffer.appendInt32(-805945687)
|
||||
}
|
||||
serializeInt32(_data.flags, buffer: buffer, boxed: false)
|
||||
serializeInt64(_data.id, buffer: buffer, boxed: false)
|
||||
|
|
@ -99,13 +101,18 @@ public extension Api {
|
|||
if Int(_data.flags) & Int(1 << 1) != 0 {
|
||||
serializeInt64(_data.emojiId!, buffer: buffer, boxed: false)
|
||||
}
|
||||
serializeString(_data.prompt, buffer: buffer, boxed: false)
|
||||
if Int(_data.flags) & Int(1 << 4) != 0 {
|
||||
serializeString(_data.prompt!, buffer: buffer, boxed: false)
|
||||
}
|
||||
if Int(_data.flags) & Int(1 << 2) != 0 {
|
||||
serializeInt32(_data.installsCount!, buffer: buffer, boxed: false)
|
||||
}
|
||||
if Int(_data.flags) & Int(1 << 3) != 0 {
|
||||
serializeInt64(_data.authorId!, buffer: buffer, boxed: false)
|
||||
}
|
||||
if Int(_data.flags) & Int(1 << 5) != 0 {
|
||||
_data.exampleEnglish!.serialize(buffer, true)
|
||||
}
|
||||
break
|
||||
case .aiComposeToneDefault(let _data):
|
||||
if boxed {
|
||||
|
|
@ -121,7 +128,7 @@ public extension Api {
|
|||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
switch self {
|
||||
case .aiComposeTone(let _data):
|
||||
return ("aiComposeTone", [("flags", ConstructorParameterDescription(_data.flags)), ("id", ConstructorParameterDescription(_data.id)), ("accessHash", ConstructorParameterDescription(_data.accessHash)), ("slug", ConstructorParameterDescription(_data.slug)), ("title", ConstructorParameterDescription(_data.title)), ("emojiId", ConstructorParameterDescription(_data.emojiId)), ("prompt", ConstructorParameterDescription(_data.prompt)), ("installsCount", ConstructorParameterDescription(_data.installsCount)), ("authorId", ConstructorParameterDescription(_data.authorId))])
|
||||
return ("aiComposeTone", [("flags", ConstructorParameterDescription(_data.flags)), ("id", ConstructorParameterDescription(_data.id)), ("accessHash", ConstructorParameterDescription(_data.accessHash)), ("slug", ConstructorParameterDescription(_data.slug)), ("title", ConstructorParameterDescription(_data.title)), ("emojiId", ConstructorParameterDescription(_data.emojiId)), ("prompt", ConstructorParameterDescription(_data.prompt)), ("installsCount", ConstructorParameterDescription(_data.installsCount)), ("authorId", ConstructorParameterDescription(_data.authorId)), ("exampleEnglish", ConstructorParameterDescription(_data.exampleEnglish))])
|
||||
case .aiComposeToneDefault(let _data):
|
||||
return ("aiComposeToneDefault", [("tone", ConstructorParameterDescription(_data.tone)), ("emojiId", ConstructorParameterDescription(_data.emojiId)), ("title", ConstructorParameterDescription(_data.title))])
|
||||
}
|
||||
|
|
@ -143,7 +150,9 @@ public extension Api {
|
|||
_6 = reader.readInt64()
|
||||
}
|
||||
var _7: String?
|
||||
_7 = parseString(reader)
|
||||
if Int(_1!) & Int(1 << 4) != 0 {
|
||||
_7 = parseString(reader)
|
||||
}
|
||||
var _8: Int32?
|
||||
if Int(_1!) & Int(1 << 2) != 0 {
|
||||
_8 = reader.readInt32()
|
||||
|
|
@ -152,17 +161,24 @@ public extension Api {
|
|||
if Int(_1!) & Int(1 << 3) != 0 {
|
||||
_9 = reader.readInt64()
|
||||
}
|
||||
var _10: Api.AiComposeToneExample?
|
||||
if Int(_1!) & Int(1 << 5) != 0 {
|
||||
if let signature = reader.readInt32() {
|
||||
_10 = Api.parse(reader, signature: signature) as? Api.AiComposeToneExample
|
||||
}
|
||||
}
|
||||
let _c1 = _1 != nil
|
||||
let _c2 = _2 != nil
|
||||
let _c3 = _3 != nil
|
||||
let _c4 = _4 != nil
|
||||
let _c5 = _5 != nil
|
||||
let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil
|
||||
let _c7 = _7 != nil
|
||||
let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil
|
||||
let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil
|
||||
let _c9 = (Int(_1!) & Int(1 << 3) == 0) || _9 != nil
|
||||
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 {
|
||||
return Api.AiComposeTone.aiComposeTone(Cons_aiComposeTone(flags: _1!, id: _2!, accessHash: _3!, slug: _4!, title: _5!, emojiId: _6, prompt: _7!, installsCount: _8, authorId: _9))
|
||||
let _c10 = (Int(_1!) & Int(1 << 5) == 0) || _10 != nil
|
||||
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 {
|
||||
return Api.AiComposeTone.aiComposeTone(Cons_aiComposeTone(flags: _1!, id: _2!, accessHash: _3!, slug: _4!, title: _5!, emojiId: _6, prompt: _7, installsCount: _8, authorId: _9, exampleEnglish: _10))
|
||||
}
|
||||
else {
|
||||
return nil
|
||||
|
|
@ -187,6 +203,56 @@ 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) {
|
||||
self.from = from
|
||||
self.to = to
|
||||
}
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
return ("aiComposeToneExample", [("from", ConstructorParameterDescription(self.from)), ("to", ConstructorParameterDescription(self.to))])
|
||||
}
|
||||
}
|
||||
case aiComposeToneExample(Cons_aiComposeToneExample)
|
||||
|
||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||
switch self {
|
||||
case .aiComposeToneExample(let _data):
|
||||
if boxed {
|
||||
buffer.appendInt32(-1461961831)
|
||||
}
|
||||
serializeString(_data.from, buffer: buffer, boxed: false)
|
||||
serializeString(_data.to, buffer: buffer, boxed: false)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
switch self {
|
||||
case .aiComposeToneExample(let _data):
|
||||
return ("aiComposeToneExample", [("from", ConstructorParameterDescription(_data.from)), ("to", ConstructorParameterDescription(_data.to))])
|
||||
}
|
||||
}
|
||||
|
||||
public static func parse_aiComposeToneExample(_ reader: BufferReader) -> AiComposeToneExample? {
|
||||
var _1: String?
|
||||
_1 = parseString(reader)
|
||||
var _2: String?
|
||||
_2 = parseString(reader)
|
||||
let _c1 = _1 != nil
|
||||
let _c2 = _2 != nil
|
||||
if _c1 && _c2 {
|
||||
return Api.AiComposeToneExample.aiComposeToneExample(Cons_aiComposeToneExample(from: _1!, to: _2!))
|
||||
}
|
||||
else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public extension Api {
|
||||
enum AttachMenuBot: TypeConstructorDescription {
|
||||
public class Cons_attachMenuBot: TypeConstructorDescription {
|
||||
|
|
@ -1499,114 +1565,3 @@ public extension Api {
|
|||
}
|
||||
}
|
||||
}
|
||||
public extension Api {
|
||||
enum BotApp: TypeConstructorDescription {
|
||||
public class Cons_botApp: TypeConstructorDescription {
|
||||
public var flags: Int32
|
||||
public var id: Int64
|
||||
public var accessHash: Int64
|
||||
public var shortName: String
|
||||
public var title: String
|
||||
public var description: String
|
||||
public var photo: Api.Photo
|
||||
public var document: Api.Document?
|
||||
public var hash: Int64
|
||||
public init(flags: Int32, id: Int64, accessHash: Int64, shortName: String, title: String, description: String, photo: Api.Photo, document: Api.Document?, hash: Int64) {
|
||||
self.flags = flags
|
||||
self.id = id
|
||||
self.accessHash = accessHash
|
||||
self.shortName = shortName
|
||||
self.title = title
|
||||
self.description = description
|
||||
self.photo = photo
|
||||
self.document = document
|
||||
self.hash = hash
|
||||
}
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
return ("botApp", [("flags", ConstructorParameterDescription(self.flags)), ("id", ConstructorParameterDescription(self.id)), ("accessHash", ConstructorParameterDescription(self.accessHash)), ("shortName", ConstructorParameterDescription(self.shortName)), ("title", ConstructorParameterDescription(self.title)), ("description", ConstructorParameterDescription(self.description)), ("photo", ConstructorParameterDescription(self.photo)), ("document", ConstructorParameterDescription(self.document)), ("hash", ConstructorParameterDescription(self.hash))])
|
||||
}
|
||||
}
|
||||
case botApp(Cons_botApp)
|
||||
case botAppNotModified
|
||||
|
||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||
switch self {
|
||||
case .botApp(let _data):
|
||||
if boxed {
|
||||
buffer.appendInt32(-1778593322)
|
||||
}
|
||||
serializeInt32(_data.flags, buffer: buffer, boxed: false)
|
||||
serializeInt64(_data.id, buffer: buffer, boxed: false)
|
||||
serializeInt64(_data.accessHash, buffer: buffer, boxed: false)
|
||||
serializeString(_data.shortName, buffer: buffer, boxed: false)
|
||||
serializeString(_data.title, buffer: buffer, boxed: false)
|
||||
serializeString(_data.description, buffer: buffer, boxed: false)
|
||||
_data.photo.serialize(buffer, true)
|
||||
if Int(_data.flags) & Int(1 << 0) != 0 {
|
||||
_data.document!.serialize(buffer, true)
|
||||
}
|
||||
serializeInt64(_data.hash, buffer: buffer, boxed: false)
|
||||
break
|
||||
case .botAppNotModified:
|
||||
if boxed {
|
||||
buffer.appendInt32(1571189943)
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
switch self {
|
||||
case .botApp(let _data):
|
||||
return ("botApp", [("flags", ConstructorParameterDescription(_data.flags)), ("id", ConstructorParameterDescription(_data.id)), ("accessHash", ConstructorParameterDescription(_data.accessHash)), ("shortName", ConstructorParameterDescription(_data.shortName)), ("title", ConstructorParameterDescription(_data.title)), ("description", ConstructorParameterDescription(_data.description)), ("photo", ConstructorParameterDescription(_data.photo)), ("document", ConstructorParameterDescription(_data.document)), ("hash", ConstructorParameterDescription(_data.hash))])
|
||||
case .botAppNotModified:
|
||||
return ("botAppNotModified", [])
|
||||
}
|
||||
}
|
||||
|
||||
public static func parse_botApp(_ reader: BufferReader) -> BotApp? {
|
||||
var _1: Int32?
|
||||
_1 = reader.readInt32()
|
||||
var _2: Int64?
|
||||
_2 = reader.readInt64()
|
||||
var _3: Int64?
|
||||
_3 = reader.readInt64()
|
||||
var _4: String?
|
||||
_4 = parseString(reader)
|
||||
var _5: String?
|
||||
_5 = parseString(reader)
|
||||
var _6: String?
|
||||
_6 = parseString(reader)
|
||||
var _7: Api.Photo?
|
||||
if let signature = reader.readInt32() {
|
||||
_7 = Api.parse(reader, signature: signature) as? Api.Photo
|
||||
}
|
||||
var _8: Api.Document?
|
||||
if Int(_1!) & Int(1 << 0) != 0 {
|
||||
if let signature = reader.readInt32() {
|
||||
_8 = Api.parse(reader, signature: signature) as? Api.Document
|
||||
}
|
||||
}
|
||||
var _9: Int64?
|
||||
_9 = reader.readInt64()
|
||||
let _c1 = _1 != nil
|
||||
let _c2 = _2 != nil
|
||||
let _c3 = _3 != nil
|
||||
let _c4 = _4 != nil
|
||||
let _c5 = _5 != nil
|
||||
let _c6 = _6 != nil
|
||||
let _c7 = _7 != nil
|
||||
let _c8 = (Int(_1!) & Int(1 << 0) == 0) || _8 != nil
|
||||
let _c9 = _9 != nil
|
||||
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 {
|
||||
return Api.BotApp.botApp(Cons_botApp(flags: _1!, id: _2!, accessHash: _3!, shortName: _4!, title: _5!, description: _6!, photo: _7!, document: _8, hash: _9!))
|
||||
}
|
||||
else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
public static func parse_botAppNotModified(_ reader: BufferReader) -> BotApp? {
|
||||
return Api.BotApp.botAppNotModified
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,114 @@
|
|||
public extension Api {
|
||||
enum BotApp: TypeConstructorDescription {
|
||||
public class Cons_botApp: TypeConstructorDescription {
|
||||
public var flags: Int32
|
||||
public var id: Int64
|
||||
public var accessHash: Int64
|
||||
public var shortName: String
|
||||
public var title: String
|
||||
public var description: String
|
||||
public var photo: Api.Photo
|
||||
public var document: Api.Document?
|
||||
public var hash: Int64
|
||||
public init(flags: Int32, id: Int64, accessHash: Int64, shortName: String, title: String, description: String, photo: Api.Photo, document: Api.Document?, hash: Int64) {
|
||||
self.flags = flags
|
||||
self.id = id
|
||||
self.accessHash = accessHash
|
||||
self.shortName = shortName
|
||||
self.title = title
|
||||
self.description = description
|
||||
self.photo = photo
|
||||
self.document = document
|
||||
self.hash = hash
|
||||
}
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
return ("botApp", [("flags", ConstructorParameterDescription(self.flags)), ("id", ConstructorParameterDescription(self.id)), ("accessHash", ConstructorParameterDescription(self.accessHash)), ("shortName", ConstructorParameterDescription(self.shortName)), ("title", ConstructorParameterDescription(self.title)), ("description", ConstructorParameterDescription(self.description)), ("photo", ConstructorParameterDescription(self.photo)), ("document", ConstructorParameterDescription(self.document)), ("hash", ConstructorParameterDescription(self.hash))])
|
||||
}
|
||||
}
|
||||
case botApp(Cons_botApp)
|
||||
case botAppNotModified
|
||||
|
||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||
switch self {
|
||||
case .botApp(let _data):
|
||||
if boxed {
|
||||
buffer.appendInt32(-1778593322)
|
||||
}
|
||||
serializeInt32(_data.flags, buffer: buffer, boxed: false)
|
||||
serializeInt64(_data.id, buffer: buffer, boxed: false)
|
||||
serializeInt64(_data.accessHash, buffer: buffer, boxed: false)
|
||||
serializeString(_data.shortName, buffer: buffer, boxed: false)
|
||||
serializeString(_data.title, buffer: buffer, boxed: false)
|
||||
serializeString(_data.description, buffer: buffer, boxed: false)
|
||||
_data.photo.serialize(buffer, true)
|
||||
if Int(_data.flags) & Int(1 << 0) != 0 {
|
||||
_data.document!.serialize(buffer, true)
|
||||
}
|
||||
serializeInt64(_data.hash, buffer: buffer, boxed: false)
|
||||
break
|
||||
case .botAppNotModified:
|
||||
if boxed {
|
||||
buffer.appendInt32(1571189943)
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
switch self {
|
||||
case .botApp(let _data):
|
||||
return ("botApp", [("flags", ConstructorParameterDescription(_data.flags)), ("id", ConstructorParameterDescription(_data.id)), ("accessHash", ConstructorParameterDescription(_data.accessHash)), ("shortName", ConstructorParameterDescription(_data.shortName)), ("title", ConstructorParameterDescription(_data.title)), ("description", ConstructorParameterDescription(_data.description)), ("photo", ConstructorParameterDescription(_data.photo)), ("document", ConstructorParameterDescription(_data.document)), ("hash", ConstructorParameterDescription(_data.hash))])
|
||||
case .botAppNotModified:
|
||||
return ("botAppNotModified", [])
|
||||
}
|
||||
}
|
||||
|
||||
public static func parse_botApp(_ reader: BufferReader) -> BotApp? {
|
||||
var _1: Int32?
|
||||
_1 = reader.readInt32()
|
||||
var _2: Int64?
|
||||
_2 = reader.readInt64()
|
||||
var _3: Int64?
|
||||
_3 = reader.readInt64()
|
||||
var _4: String?
|
||||
_4 = parseString(reader)
|
||||
var _5: String?
|
||||
_5 = parseString(reader)
|
||||
var _6: String?
|
||||
_6 = parseString(reader)
|
||||
var _7: Api.Photo?
|
||||
if let signature = reader.readInt32() {
|
||||
_7 = Api.parse(reader, signature: signature) as? Api.Photo
|
||||
}
|
||||
var _8: Api.Document?
|
||||
if Int(_1!) & Int(1 << 0) != 0 {
|
||||
if let signature = reader.readInt32() {
|
||||
_8 = Api.parse(reader, signature: signature) as? Api.Document
|
||||
}
|
||||
}
|
||||
var _9: Int64?
|
||||
_9 = reader.readInt64()
|
||||
let _c1 = _1 != nil
|
||||
let _c2 = _2 != nil
|
||||
let _c3 = _3 != nil
|
||||
let _c4 = _4 != nil
|
||||
let _c5 = _5 != nil
|
||||
let _c6 = _6 != nil
|
||||
let _c7 = _7 != nil
|
||||
let _c8 = (Int(_1!) & Int(1 << 0) == 0) || _8 != nil
|
||||
let _c9 = _9 != nil
|
||||
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 {
|
||||
return Api.BotApp.botApp(Cons_botApp(flags: _1!, id: _2!, accessHash: _3!, shortName: _4!, title: _5!, description: _6!, photo: _7!, document: _8, hash: _9!))
|
||||
}
|
||||
else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
public static func parse_botAppNotModified(_ reader: BufferReader) -> BotApp? {
|
||||
return Api.BotApp.botAppNotModified
|
||||
}
|
||||
}
|
||||
}
|
||||
public extension Api {
|
||||
enum BotAppSettings: TypeConstructorDescription {
|
||||
public class Cons_botAppSettings: TypeConstructorDescription {
|
||||
|
|
@ -1637,123 +1748,3 @@ public extension Api {
|
|||
}
|
||||
}
|
||||
}
|
||||
public extension Api {
|
||||
enum BusinessBotRecipients: TypeConstructorDescription {
|
||||
public class Cons_businessBotRecipients: TypeConstructorDescription {
|
||||
public var flags: Int32
|
||||
public var users: [Int64]?
|
||||
public var excludeUsers: [Int64]?
|
||||
public init(flags: Int32, users: [Int64]?, excludeUsers: [Int64]?) {
|
||||
self.flags = flags
|
||||
self.users = users
|
||||
self.excludeUsers = excludeUsers
|
||||
}
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
return ("businessBotRecipients", [("flags", ConstructorParameterDescription(self.flags)), ("users", ConstructorParameterDescription(self.users)), ("excludeUsers", ConstructorParameterDescription(self.excludeUsers))])
|
||||
}
|
||||
}
|
||||
case businessBotRecipients(Cons_businessBotRecipients)
|
||||
|
||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||
switch self {
|
||||
case .businessBotRecipients(let _data):
|
||||
if boxed {
|
||||
buffer.appendInt32(-1198722189)
|
||||
}
|
||||
serializeInt32(_data.flags, buffer: buffer, boxed: false)
|
||||
if Int(_data.flags) & Int(1 << 4) != 0 {
|
||||
buffer.appendInt32(481674261)
|
||||
buffer.appendInt32(Int32(_data.users!.count))
|
||||
for item in _data.users! {
|
||||
serializeInt64(item, buffer: buffer, boxed: false)
|
||||
}
|
||||
}
|
||||
if Int(_data.flags) & Int(1 << 6) != 0 {
|
||||
buffer.appendInt32(481674261)
|
||||
buffer.appendInt32(Int32(_data.excludeUsers!.count))
|
||||
for item in _data.excludeUsers! {
|
||||
serializeInt64(item, buffer: buffer, boxed: false)
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
switch self {
|
||||
case .businessBotRecipients(let _data):
|
||||
return ("businessBotRecipients", [("flags", ConstructorParameterDescription(_data.flags)), ("users", ConstructorParameterDescription(_data.users)), ("excludeUsers", ConstructorParameterDescription(_data.excludeUsers))])
|
||||
}
|
||||
}
|
||||
|
||||
public static func parse_businessBotRecipients(_ reader: BufferReader) -> BusinessBotRecipients? {
|
||||
var _1: Int32?
|
||||
_1 = reader.readInt32()
|
||||
var _2: [Int64]?
|
||||
if Int(_1!) & Int(1 << 4) != 0 {
|
||||
if let _ = reader.readInt32() {
|
||||
_2 = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self)
|
||||
}
|
||||
}
|
||||
var _3: [Int64]?
|
||||
if Int(_1!) & Int(1 << 6) != 0 {
|
||||
if let _ = reader.readInt32() {
|
||||
_3 = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self)
|
||||
}
|
||||
}
|
||||
let _c1 = _1 != nil
|
||||
let _c2 = (Int(_1!) & Int(1 << 4) == 0) || _2 != nil
|
||||
let _c3 = (Int(_1!) & Int(1 << 6) == 0) || _3 != nil
|
||||
if _c1 && _c2 && _c3 {
|
||||
return Api.BusinessBotRecipients.businessBotRecipients(Cons_businessBotRecipients(flags: _1!, users: _2, excludeUsers: _3))
|
||||
}
|
||||
else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public extension Api {
|
||||
enum BusinessBotRights: TypeConstructorDescription {
|
||||
public class Cons_businessBotRights: TypeConstructorDescription {
|
||||
public var flags: Int32
|
||||
public init(flags: Int32) {
|
||||
self.flags = flags
|
||||
}
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
return ("businessBotRights", [("flags", ConstructorParameterDescription(self.flags))])
|
||||
}
|
||||
}
|
||||
case businessBotRights(Cons_businessBotRights)
|
||||
|
||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||
switch self {
|
||||
case .businessBotRights(let _data):
|
||||
if boxed {
|
||||
buffer.appendInt32(-1604170505)
|
||||
}
|
||||
serializeInt32(_data.flags, buffer: buffer, boxed: false)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
switch self {
|
||||
case .businessBotRights(let _data):
|
||||
return ("businessBotRights", [("flags", ConstructorParameterDescription(_data.flags))])
|
||||
}
|
||||
}
|
||||
|
||||
public static func parse_businessBotRights(_ reader: BufferReader) -> BusinessBotRights? {
|
||||
var _1: Int32?
|
||||
_1 = reader.readInt32()
|
||||
let _c1 = _1 != nil
|
||||
if _c1 {
|
||||
return Api.BusinessBotRights.businessBotRights(Cons_businessBotRights(flags: _1!))
|
||||
}
|
||||
else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,123 @@
|
|||
public extension Api {
|
||||
enum BusinessBotRecipients: TypeConstructorDescription {
|
||||
public class Cons_businessBotRecipients: TypeConstructorDescription {
|
||||
public var flags: Int32
|
||||
public var users: [Int64]?
|
||||
public var excludeUsers: [Int64]?
|
||||
public init(flags: Int32, users: [Int64]?, excludeUsers: [Int64]?) {
|
||||
self.flags = flags
|
||||
self.users = users
|
||||
self.excludeUsers = excludeUsers
|
||||
}
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
return ("businessBotRecipients", [("flags", ConstructorParameterDescription(self.flags)), ("users", ConstructorParameterDescription(self.users)), ("excludeUsers", ConstructorParameterDescription(self.excludeUsers))])
|
||||
}
|
||||
}
|
||||
case businessBotRecipients(Cons_businessBotRecipients)
|
||||
|
||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||
switch self {
|
||||
case .businessBotRecipients(let _data):
|
||||
if boxed {
|
||||
buffer.appendInt32(-1198722189)
|
||||
}
|
||||
serializeInt32(_data.flags, buffer: buffer, boxed: false)
|
||||
if Int(_data.flags) & Int(1 << 4) != 0 {
|
||||
buffer.appendInt32(481674261)
|
||||
buffer.appendInt32(Int32(_data.users!.count))
|
||||
for item in _data.users! {
|
||||
serializeInt64(item, buffer: buffer, boxed: false)
|
||||
}
|
||||
}
|
||||
if Int(_data.flags) & Int(1 << 6) != 0 {
|
||||
buffer.appendInt32(481674261)
|
||||
buffer.appendInt32(Int32(_data.excludeUsers!.count))
|
||||
for item in _data.excludeUsers! {
|
||||
serializeInt64(item, buffer: buffer, boxed: false)
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
switch self {
|
||||
case .businessBotRecipients(let _data):
|
||||
return ("businessBotRecipients", [("flags", ConstructorParameterDescription(_data.flags)), ("users", ConstructorParameterDescription(_data.users)), ("excludeUsers", ConstructorParameterDescription(_data.excludeUsers))])
|
||||
}
|
||||
}
|
||||
|
||||
public static func parse_businessBotRecipients(_ reader: BufferReader) -> BusinessBotRecipients? {
|
||||
var _1: Int32?
|
||||
_1 = reader.readInt32()
|
||||
var _2: [Int64]?
|
||||
if Int(_1!) & Int(1 << 4) != 0 {
|
||||
if let _ = reader.readInt32() {
|
||||
_2 = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self)
|
||||
}
|
||||
}
|
||||
var _3: [Int64]?
|
||||
if Int(_1!) & Int(1 << 6) != 0 {
|
||||
if let _ = reader.readInt32() {
|
||||
_3 = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self)
|
||||
}
|
||||
}
|
||||
let _c1 = _1 != nil
|
||||
let _c2 = (Int(_1!) & Int(1 << 4) == 0) || _2 != nil
|
||||
let _c3 = (Int(_1!) & Int(1 << 6) == 0) || _3 != nil
|
||||
if _c1 && _c2 && _c3 {
|
||||
return Api.BusinessBotRecipients.businessBotRecipients(Cons_businessBotRecipients(flags: _1!, users: _2, excludeUsers: _3))
|
||||
}
|
||||
else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public extension Api {
|
||||
enum BusinessBotRights: TypeConstructorDescription {
|
||||
public class Cons_businessBotRights: TypeConstructorDescription {
|
||||
public var flags: Int32
|
||||
public init(flags: Int32) {
|
||||
self.flags = flags
|
||||
}
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
return ("businessBotRights", [("flags", ConstructorParameterDescription(self.flags))])
|
||||
}
|
||||
}
|
||||
case businessBotRights(Cons_businessBotRights)
|
||||
|
||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||
switch self {
|
||||
case .businessBotRights(let _data):
|
||||
if boxed {
|
||||
buffer.appendInt32(-1604170505)
|
||||
}
|
||||
serializeInt32(_data.flags, buffer: buffer, boxed: false)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
switch self {
|
||||
case .businessBotRights(let _data):
|
||||
return ("businessBotRights", [("flags", ConstructorParameterDescription(_data.flags))])
|
||||
}
|
||||
}
|
||||
|
||||
public static func parse_businessBotRights(_ reader: BufferReader) -> BusinessBotRights? {
|
||||
var _1: Int32?
|
||||
_1 = reader.readInt32()
|
||||
let _c1 = _1 != nil
|
||||
if _c1 {
|
||||
return Api.BusinessBotRights.businessBotRights(Cons_businessBotRights(flags: _1!))
|
||||
}
|
||||
else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public extension Api {
|
||||
enum BusinessChatLink: TypeConstructorDescription {
|
||||
public class Cons_businessChatLink: TypeConstructorDescription {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,14 @@
|
|||
public extension Api {
|
||||
indirect enum WebPageAttribute: TypeConstructorDescription {
|
||||
public class Cons_webPageAttributeAiComposeTone: TypeConstructorDescription {
|
||||
public var emojiId: Int64
|
||||
public init(emojiId: Int64) {
|
||||
self.emojiId = emojiId
|
||||
}
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
return ("webPageAttributeAiComposeTone", [("emojiId", ConstructorParameterDescription(self.emojiId))])
|
||||
}
|
||||
}
|
||||
public class Cons_webPageAttributeStarGiftAuction: TypeConstructorDescription {
|
||||
public var gift: Api.StarGift
|
||||
public var endDate: Int32
|
||||
|
|
@ -68,6 +77,7 @@ public extension Api {
|
|||
return ("webPageAttributeUniqueStarGift", [("gift", ConstructorParameterDescription(self.gift))])
|
||||
}
|
||||
}
|
||||
case webPageAttributeAiComposeTone(Cons_webPageAttributeAiComposeTone)
|
||||
case webPageAttributeStarGiftAuction(Cons_webPageAttributeStarGiftAuction)
|
||||
case webPageAttributeStarGiftCollection(Cons_webPageAttributeStarGiftCollection)
|
||||
case webPageAttributeStickerSet(Cons_webPageAttributeStickerSet)
|
||||
|
|
@ -77,6 +87,12 @@ public extension Api {
|
|||
|
||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||
switch self {
|
||||
case .webPageAttributeAiComposeTone(let _data):
|
||||
if boxed {
|
||||
buffer.appendInt32(2005007896)
|
||||
}
|
||||
serializeInt64(_data.emojiId, buffer: buffer, boxed: false)
|
||||
break
|
||||
case .webPageAttributeStarGiftAuction(let _data):
|
||||
if boxed {
|
||||
buffer.appendInt32(29770178)
|
||||
|
|
@ -143,6 +159,8 @@ public extension Api {
|
|||
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
switch self {
|
||||
case .webPageAttributeAiComposeTone(let _data):
|
||||
return ("webPageAttributeAiComposeTone", [("emojiId", ConstructorParameterDescription(_data.emojiId))])
|
||||
case .webPageAttributeStarGiftAuction(let _data):
|
||||
return ("webPageAttributeStarGiftAuction", [("gift", ConstructorParameterDescription(_data.gift)), ("endDate", ConstructorParameterDescription(_data.endDate))])
|
||||
case .webPageAttributeStarGiftCollection(let _data):
|
||||
|
|
@ -158,6 +176,17 @@ public extension Api {
|
|||
}
|
||||
}
|
||||
|
||||
public static func parse_webPageAttributeAiComposeTone(_ reader: BufferReader) -> WebPageAttribute? {
|
||||
var _1: Int64?
|
||||
_1 = reader.readInt64()
|
||||
let _c1 = _1 != nil
|
||||
if _c1 {
|
||||
return Api.WebPageAttribute.webPageAttributeAiComposeTone(Cons_webPageAttributeAiComposeTone(emojiId: _1!))
|
||||
}
|
||||
else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
public static func parse_webPageAttributeStarGiftAuction(_ reader: BufferReader) -> WebPageAttribute? {
|
||||
var _1: Api.StarGift?
|
||||
if let signature = reader.readInt32() {
|
||||
|
|
@ -1738,101 +1767,3 @@ public extension Api.account {
|
|||
}
|
||||
}
|
||||
}
|
||||
public extension Api.account {
|
||||
enum ResolvedBusinessChatLinks: TypeConstructorDescription {
|
||||
public class Cons_resolvedBusinessChatLinks: TypeConstructorDescription {
|
||||
public var flags: Int32
|
||||
public var peer: Api.Peer
|
||||
public var message: String
|
||||
public var entities: [Api.MessageEntity]?
|
||||
public var chats: [Api.Chat]
|
||||
public var users: [Api.User]
|
||||
public init(flags: Int32, peer: Api.Peer, message: String, entities: [Api.MessageEntity]?, chats: [Api.Chat], users: [Api.User]) {
|
||||
self.flags = flags
|
||||
self.peer = peer
|
||||
self.message = message
|
||||
self.entities = entities
|
||||
self.chats = chats
|
||||
self.users = users
|
||||
}
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
return ("resolvedBusinessChatLinks", [("flags", ConstructorParameterDescription(self.flags)), ("peer", ConstructorParameterDescription(self.peer)), ("message", ConstructorParameterDescription(self.message)), ("entities", ConstructorParameterDescription(self.entities)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
|
||||
}
|
||||
}
|
||||
case resolvedBusinessChatLinks(Cons_resolvedBusinessChatLinks)
|
||||
|
||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||
switch self {
|
||||
case .resolvedBusinessChatLinks(let _data):
|
||||
if boxed {
|
||||
buffer.appendInt32(-1708937439)
|
||||
}
|
||||
serializeInt32(_data.flags, buffer: buffer, boxed: false)
|
||||
_data.peer.serialize(buffer, true)
|
||||
serializeString(_data.message, buffer: buffer, boxed: false)
|
||||
if Int(_data.flags) & Int(1 << 0) != 0 {
|
||||
buffer.appendInt32(481674261)
|
||||
buffer.appendInt32(Int32(_data.entities!.count))
|
||||
for item in _data.entities! {
|
||||
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 .resolvedBusinessChatLinks(let _data):
|
||||
return ("resolvedBusinessChatLinks", [("flags", ConstructorParameterDescription(_data.flags)), ("peer", ConstructorParameterDescription(_data.peer)), ("message", ConstructorParameterDescription(_data.message)), ("entities", ConstructorParameterDescription(_data.entities)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users))])
|
||||
}
|
||||
}
|
||||
|
||||
public static func parse_resolvedBusinessChatLinks(_ reader: BufferReader) -> ResolvedBusinessChatLinks? {
|
||||
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: String?
|
||||
_3 = parseString(reader)
|
||||
var _4: [Api.MessageEntity]?
|
||||
if Int(_1!) & Int(1 << 0) != 0 {
|
||||
if let _ = reader.readInt32() {
|
||||
_4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self)
|
||||
}
|
||||
}
|
||||
var _5: [Api.Chat]?
|
||||
if let _ = reader.readInt32() {
|
||||
_5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self)
|
||||
}
|
||||
var _6: [Api.User]?
|
||||
if let _ = reader.readInt32() {
|
||||
_6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self)
|
||||
}
|
||||
let _c1 = _1 != nil
|
||||
let _c2 = _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.account.ResolvedBusinessChatLinks.resolvedBusinessChatLinks(Cons_resolvedBusinessChatLinks(flags: _1!, peer: _2!, message: _3!, entities: _4, chats: _5!, users: _6!))
|
||||
}
|
||||
else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,101 @@
|
|||
public extension Api.account {
|
||||
enum ResolvedBusinessChatLinks: TypeConstructorDescription {
|
||||
public class Cons_resolvedBusinessChatLinks: TypeConstructorDescription {
|
||||
public var flags: Int32
|
||||
public var peer: Api.Peer
|
||||
public var message: String
|
||||
public var entities: [Api.MessageEntity]?
|
||||
public var chats: [Api.Chat]
|
||||
public var users: [Api.User]
|
||||
public init(flags: Int32, peer: Api.Peer, message: String, entities: [Api.MessageEntity]?, chats: [Api.Chat], users: [Api.User]) {
|
||||
self.flags = flags
|
||||
self.peer = peer
|
||||
self.message = message
|
||||
self.entities = entities
|
||||
self.chats = chats
|
||||
self.users = users
|
||||
}
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
return ("resolvedBusinessChatLinks", [("flags", ConstructorParameterDescription(self.flags)), ("peer", ConstructorParameterDescription(self.peer)), ("message", ConstructorParameterDescription(self.message)), ("entities", ConstructorParameterDescription(self.entities)), ("chats", ConstructorParameterDescription(self.chats)), ("users", ConstructorParameterDescription(self.users))])
|
||||
}
|
||||
}
|
||||
case resolvedBusinessChatLinks(Cons_resolvedBusinessChatLinks)
|
||||
|
||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||
switch self {
|
||||
case .resolvedBusinessChatLinks(let _data):
|
||||
if boxed {
|
||||
buffer.appendInt32(-1708937439)
|
||||
}
|
||||
serializeInt32(_data.flags, buffer: buffer, boxed: false)
|
||||
_data.peer.serialize(buffer, true)
|
||||
serializeString(_data.message, buffer: buffer, boxed: false)
|
||||
if Int(_data.flags) & Int(1 << 0) != 0 {
|
||||
buffer.appendInt32(481674261)
|
||||
buffer.appendInt32(Int32(_data.entities!.count))
|
||||
for item in _data.entities! {
|
||||
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 .resolvedBusinessChatLinks(let _data):
|
||||
return ("resolvedBusinessChatLinks", [("flags", ConstructorParameterDescription(_data.flags)), ("peer", ConstructorParameterDescription(_data.peer)), ("message", ConstructorParameterDescription(_data.message)), ("entities", ConstructorParameterDescription(_data.entities)), ("chats", ConstructorParameterDescription(_data.chats)), ("users", ConstructorParameterDescription(_data.users))])
|
||||
}
|
||||
}
|
||||
|
||||
public static func parse_resolvedBusinessChatLinks(_ reader: BufferReader) -> ResolvedBusinessChatLinks? {
|
||||
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: String?
|
||||
_3 = parseString(reader)
|
||||
var _4: [Api.MessageEntity]?
|
||||
if Int(_1!) & Int(1 << 0) != 0 {
|
||||
if let _ = reader.readInt32() {
|
||||
_4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self)
|
||||
}
|
||||
}
|
||||
var _5: [Api.Chat]?
|
||||
if let _ = reader.readInt32() {
|
||||
_5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self)
|
||||
}
|
||||
var _6: [Api.User]?
|
||||
if let _ = reader.readInt32() {
|
||||
_6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self)
|
||||
}
|
||||
let _c1 = _1 != nil
|
||||
let _c2 = _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.account.ResolvedBusinessChatLinks.resolvedBusinessChatLinks(Cons_resolvedBusinessChatLinks(flags: _1!, peer: _2!, message: _3!, entities: _4, chats: _5!, users: _6!))
|
||||
}
|
||||
else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public extension Api.account {
|
||||
enum SavedMusicIds: TypeConstructorDescription {
|
||||
public class Cons_savedMusicIds: TypeConstructorDescription {
|
||||
|
|
@ -528,12 +626,14 @@ public extension Api.aicompose {
|
|||
public class Cons_tones: TypeConstructorDescription {
|
||||
public var hash: Int64
|
||||
public var tones: [Api.AiComposeTone]
|
||||
public init(hash: Int64, tones: [Api.AiComposeTone]) {
|
||||
public var users: [Api.User]
|
||||
public init(hash: Int64, tones: [Api.AiComposeTone], users: [Api.User]) {
|
||||
self.hash = hash
|
||||
self.tones = tones
|
||||
self.users = users
|
||||
}
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
return ("tones", [("hash", ConstructorParameterDescription(self.hash)), ("tones", ConstructorParameterDescription(self.tones))])
|
||||
return ("tones", [("hash", ConstructorParameterDescription(self.hash)), ("tones", ConstructorParameterDescription(self.tones)), ("users", ConstructorParameterDescription(self.users))])
|
||||
}
|
||||
}
|
||||
case tones(Cons_tones)
|
||||
|
|
@ -543,7 +643,7 @@ public extension Api.aicompose {
|
|||
switch self {
|
||||
case .tones(let _data):
|
||||
if boxed {
|
||||
buffer.appendInt32(1696028994)
|
||||
buffer.appendInt32(1822232318)
|
||||
}
|
||||
serializeInt64(_data.hash, buffer: buffer, boxed: false)
|
||||
buffer.appendInt32(481674261)
|
||||
|
|
@ -551,6 +651,11 @@ public extension Api.aicompose {
|
|||
for item in _data.tones {
|
||||
item.serialize(buffer, true)
|
||||
}
|
||||
buffer.appendInt32(481674261)
|
||||
buffer.appendInt32(Int32(_data.users.count))
|
||||
for item in _data.users {
|
||||
item.serialize(buffer, true)
|
||||
}
|
||||
break
|
||||
case .tonesNotModified:
|
||||
if boxed {
|
||||
|
|
@ -563,7 +668,7 @@ public extension Api.aicompose {
|
|||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
switch self {
|
||||
case .tones(let _data):
|
||||
return ("tones", [("hash", ConstructorParameterDescription(_data.hash)), ("tones", ConstructorParameterDescription(_data.tones))])
|
||||
return ("tones", [("hash", ConstructorParameterDescription(_data.hash)), ("tones", ConstructorParameterDescription(_data.tones)), ("users", ConstructorParameterDescription(_data.users))])
|
||||
case .tonesNotModified:
|
||||
return ("tonesNotModified", [])
|
||||
}
|
||||
|
|
@ -576,10 +681,15 @@ public extension Api.aicompose {
|
|||
if let _ = reader.readInt32() {
|
||||
_2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.AiComposeTone.self)
|
||||
}
|
||||
var _3: [Api.User]?
|
||||
if let _ = reader.readInt32() {
|
||||
_3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self)
|
||||
}
|
||||
let _c1 = _1 != nil
|
||||
let _c2 = _2 != nil
|
||||
if _c1 && _c2 {
|
||||
return Api.aicompose.Tones.tones(Cons_tones(hash: _1!, tones: _2!))
|
||||
let _c3 = _3 != nil
|
||||
if _c1 && _c2 && _c3 {
|
||||
return Api.aicompose.Tones.tones(Cons_tones(hash: _1!, tones: _2!, users: _3!))
|
||||
}
|
||||
else {
|
||||
return nil
|
||||
|
|
|
|||
|
|
@ -452,6 +452,66 @@ public extension Api.auth {
|
|||
}
|
||||
}
|
||||
}
|
||||
public extension Api.bots {
|
||||
enum AccessSettings: TypeConstructorDescription {
|
||||
public class Cons_accessSettings: TypeConstructorDescription {
|
||||
public var flags: Int32
|
||||
public var addUsers: [Api.User]?
|
||||
public init(flags: Int32, addUsers: [Api.User]?) {
|
||||
self.flags = flags
|
||||
self.addUsers = addUsers
|
||||
}
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
return ("accessSettings", [("flags", ConstructorParameterDescription(self.flags)), ("addUsers", ConstructorParameterDescription(self.addUsers))])
|
||||
}
|
||||
}
|
||||
case accessSettings(Cons_accessSettings)
|
||||
|
||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||
switch self {
|
||||
case .accessSettings(let _data):
|
||||
if boxed {
|
||||
buffer.appendInt32(-585121901)
|
||||
}
|
||||
serializeInt32(_data.flags, buffer: buffer, boxed: false)
|
||||
if Int(_data.flags) & Int(1 << 1) != 0 {
|
||||
buffer.appendInt32(481674261)
|
||||
buffer.appendInt32(Int32(_data.addUsers!.count))
|
||||
for item in _data.addUsers! {
|
||||
item.serialize(buffer, true)
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
public func descriptionFields() -> (String, [(String, ConstructorParameterDescription)]) {
|
||||
switch self {
|
||||
case .accessSettings(let _data):
|
||||
return ("accessSettings", [("flags", ConstructorParameterDescription(_data.flags)), ("addUsers", ConstructorParameterDescription(_data.addUsers))])
|
||||
}
|
||||
}
|
||||
|
||||
public static func parse_accessSettings(_ reader: BufferReader) -> AccessSettings? {
|
||||
var _1: Int32?
|
||||
_1 = reader.readInt32()
|
||||
var _2: [Api.User]?
|
||||
if Int(_1!) & Int(1 << 1) != 0 {
|
||||
if let _ = reader.readInt32() {
|
||||
_2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self)
|
||||
}
|
||||
}
|
||||
let _c1 = _1 != nil
|
||||
let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil
|
||||
if _c1 && _c2 {
|
||||
return Api.bots.AccessSettings.accessSettings(Cons_accessSettings(flags: _1!, addUsers: _2))
|
||||
}
|
||||
else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public extension Api.bots {
|
||||
enum BotInfo: TypeConstructorDescription {
|
||||
public class Cons_botInfo: TypeConstructorDescription {
|
||||
|
|
@ -1652,142 +1712,3 @@ 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,142 @@
|
|||
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 {
|
||||
|
|
@ -1499,278 +1638,3 @@ 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,278 @@
|
|||
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 {
|
||||
|
|
@ -1495,202 +1770,3 @@ 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,202 @@
|
|||
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 {
|
||||
|
|
@ -1563,502 +1762,3 @@ 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,502 @@
|
|||
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 {
|
||||
|
|
@ -1410,257 +1909,3 @@ 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,257 @@
|
|||
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 {
|
||||
|
|
@ -1988,262 +2242,3 @@ 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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,262 @@
|
|||
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 {
|
||||
|
|
@ -2271,368 +2530,3 @@ 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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,368 @@
|
|||
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 {
|
||||
|
|
@ -1289,577 +1654,3 @@ 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
13985
submodules/TelegramApi/Sources/Api41.swift
Normal file
13985
submodules/TelegramApi/Sources/Api41.swift
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue