@@ -1113,49 +1113,55 @@ public extension Api {
11131113 }
11141114}
11151115public extension Api {
1116- enum BotBusinessConnection : TypeConstructorDescription {
1117- case botBusinessConnection ( flags: Int32 , connectionId : String , userId : Int64 , dcId : Int32 , date : Int32 )
1116+ enum BotAppSettings : TypeConstructorDescription {
1117+ case botAppSettings ( flags: Int32 , placeholderDocument : Api . Document ? , backgroundColor : Int32 ? , backgroundDarkColor : Int32 ? , headerColor : Int32 ? , headerDarkColor : Int32 ? )
11181118
11191119 public func serialize( _ buffer: Buffer , _ boxed: Swift . Bool ) {
11201120 switch self {
1121- case . botBusinessConnection ( let flags, let connectionId , let userId , let dcId , let date ) :
1121+ case . botAppSettings ( let flags, let placeholderDocument , let backgroundColor , let backgroundDarkColor , let headerColor , let headerDarkColor ) :
11221122 if boxed {
1123- buffer. appendInt32 ( - 1989921868 )
1123+ buffer. appendInt32 ( - 2103898979 )
11241124 }
11251125 serializeInt32 ( flags, buffer: buffer, boxed: false )
1126- serializeString ( connectionId, buffer: buffer, boxed: false )
1127- serializeInt64 ( userId, buffer: buffer, boxed: false )
1128- serializeInt32 ( dcId, buffer: buffer, boxed: false )
1129- serializeInt32 ( date, buffer: buffer, boxed: false )
1126+ if Int ( flags) & Int ( 1 << 0 ) != 0 { placeholderDocument!. serialize ( buffer, true ) }
1127+ if Int ( flags) & Int ( 1 << 1 ) != 0 { serializeInt32 ( backgroundColor!, buffer: buffer, boxed: false ) }
1128+ if Int ( flags) & Int ( 1 << 2 ) != 0 { serializeInt32 ( backgroundDarkColor!, buffer: buffer, boxed: false ) }
1129+ if Int ( flags) & Int ( 1 << 3 ) != 0 { serializeInt32 ( headerColor!, buffer: buffer, boxed: false ) }
1130+ if Int ( flags) & Int ( 1 << 4 ) != 0 { serializeInt32 ( headerDarkColor!, buffer: buffer, boxed: false ) }
11301131 break
11311132 }
11321133 }
11331134
11341135 public func descriptionFields( ) -> ( String , [ ( String , Any ) ] ) {
11351136 switch self {
1136- case . botBusinessConnection ( let flags, let connectionId , let userId , let dcId , let date ) :
1137- return ( " botBusinessConnection " , [ ( " flags " , flags as Any ) , ( " connectionId " , connectionId as Any ) , ( " userId " , userId as Any ) , ( " dcId " , dcId as Any ) , ( " date " , date as Any ) ] )
1137+ case . botAppSettings ( let flags, let placeholderDocument , let backgroundColor , let backgroundDarkColor , let headerColor , let headerDarkColor ) :
1138+ return ( " botAppSettings " , [ ( " flags " , flags as Any ) , ( " placeholderDocument " , placeholderDocument as Any ) , ( " backgroundColor " , backgroundColor as Any ) , ( " backgroundDarkColor " , backgroundDarkColor as Any ) , ( " headerColor " , headerColor as Any ) , ( " headerDarkColor " , headerDarkColor as Any ) ] )
11381139 }
11391140 }
11401141
1141- public static func parse_botBusinessConnection ( _ reader: BufferReader ) -> BotBusinessConnection ? {
1142+ public static func parse_botAppSettings ( _ reader: BufferReader ) -> BotAppSettings ? {
11421143 var _1 : Int32 ?
11431144 _1 = reader. readInt32 ( )
1144- var _2 : String ?
1145- _2 = parseString ( reader)
1146- var _3 : Int64 ?
1147- _3 = reader. readInt64 ( )
1145+ var _2 : Api . Document ?
1146+ if Int ( _1!) & Int ( 1 << 0 ) != 0 { if let signature = reader. readInt32 ( ) {
1147+ _2 = Api . parse ( reader, signature: signature) as? Api . Document
1148+ } }
1149+ var _3 : Int32 ?
1150+ if Int ( _1!) & Int ( 1 << 1 ) != 0 { _3 = reader. readInt32 ( ) }
11481151 var _4 : Int32 ?
1149- _4 = reader. readInt32 ( )
1152+ if Int ( _1! ) & Int ( 1 << 2 ) != 0 { _4 = reader. readInt32 ( ) }
11501153 var _5 : Int32 ?
1151- _5 = reader. readInt32 ( )
1154+ if Int ( _1!) & Int ( 1 << 3 ) != 0 { _5 = reader. readInt32 ( ) }
1155+ var _6 : Int32 ?
1156+ if Int ( _1!) & Int ( 1 << 4 ) != 0 { _6 = reader. readInt32 ( ) }
11521157 let _c1 = _1 != nil
1153- let _c2 = _2 != nil
1154- let _c3 = _3 != nil
1155- let _c4 = _4 != nil
1156- let _c5 = _5 != nil
1157- if _c1 && _c2 && _c3 && _c4 && _c5 {
1158- return Api . BotBusinessConnection. botBusinessConnection ( flags: _1!, connectionId: _2!, userId: _3!, dcId: _4!, date: _5!)
1158+ let _c2 = ( Int ( _1!) & Int ( 1 << 0 ) == 0 ) || _2 != nil
1159+ let _c3 = ( Int ( _1!) & Int ( 1 << 1 ) == 0 ) || _3 != nil
1160+ let _c4 = ( Int ( _1!) & Int ( 1 << 2 ) == 0 ) || _4 != nil
1161+ let _c5 = ( Int ( _1!) & Int ( 1 << 3 ) == 0 ) || _5 != nil
1162+ let _c6 = ( Int ( _1!) & Int ( 1 << 4 ) == 0 ) || _6 != nil
1163+ if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 {
1164+ return Api . BotAppSettings. botAppSettings ( flags: _1!, placeholderDocument: _2, backgroundColor: _3, backgroundDarkColor: _4, headerColor: _5, headerDarkColor: _6)
11591165 }
11601166 else {
11611167 return nil
@@ -1165,37 +1171,49 @@ public extension Api {
11651171 }
11661172}
11671173public extension Api {
1168- enum BotCommand : TypeConstructorDescription {
1169- case botCommand ( command : String , description : String )
1174+ enum BotBusinessConnection : TypeConstructorDescription {
1175+ case botBusinessConnection ( flags : Int32 , connectionId : String , userId : Int64 , dcId : Int32 , date : Int32 )
11701176
11711177 public func serialize( _ buffer: Buffer , _ boxed: Swift . Bool ) {
11721178 switch self {
1173- case . botCommand ( let command , let description ) :
1179+ case . botBusinessConnection ( let flags , let connectionId , let userId , let dcId , let date ) :
11741180 if boxed {
1175- buffer. appendInt32 ( - 1032140601 )
1181+ buffer. appendInt32 ( - 1989921868 )
11761182 }
1177- serializeString ( command, buffer: buffer, boxed: false )
1178- serializeString ( description, buffer: buffer, boxed: false )
1183+ serializeInt32 ( flags, buffer: buffer, boxed: false )
1184+ serializeString ( connectionId, buffer: buffer, boxed: false )
1185+ serializeInt64 ( userId, buffer: buffer, boxed: false )
1186+ serializeInt32 ( dcId, buffer: buffer, boxed: false )
1187+ serializeInt32 ( date, buffer: buffer, boxed: false )
11791188 break
11801189 }
11811190 }
11821191
11831192 public func descriptionFields( ) -> ( String , [ ( String , Any ) ] ) {
11841193 switch self {
1185- case . botCommand ( let command , let description ) :
1186- return ( " botCommand " , [ ( " command " , command as Any ) , ( " description " , description as Any ) ] )
1194+ case . botBusinessConnection ( let flags , let connectionId , let userId , let dcId , let date ) :
1195+ return ( " botBusinessConnection " , [ ( " flags " , flags as Any ) , ( " connectionId " , connectionId as Any ) , ( " userId " , userId as Any ) , ( " dcId " , dcId as Any ) , ( " date " , date as Any ) ] )
11871196 }
11881197 }
11891198
1190- public static func parse_botCommand ( _ reader: BufferReader ) -> BotCommand ? {
1191- var _1 : String ?
1192- _1 = parseString ( reader)
1199+ public static func parse_botBusinessConnection ( _ reader: BufferReader ) -> BotBusinessConnection ? {
1200+ var _1 : Int32 ?
1201+ _1 = reader. readInt32 ( )
11931202 var _2 : String ?
11941203 _2 = parseString ( reader)
1204+ var _3 : Int64 ?
1205+ _3 = reader. readInt64 ( )
1206+ var _4 : Int32 ?
1207+ _4 = reader. readInt32 ( )
1208+ var _5 : Int32 ?
1209+ _5 = reader. readInt32 ( )
11951210 let _c1 = _1 != nil
11961211 let _c2 = _2 != nil
1197- if _c1 && _c2 {
1198- return Api . BotCommand. botCommand ( command: _1!, description: _2!)
1212+ let _c3 = _3 != nil
1213+ let _c4 = _4 != nil
1214+ let _c5 = _5 != nil
1215+ if _c1 && _c2 && _c3 && _c4 && _c5 {
1216+ return Api . BotBusinessConnection. botBusinessConnection ( flags: _1!, connectionId: _2!, userId: _3!, dcId: _4!, date: _5!)
11991217 }
12001218 else {
12011219 return nil
0 commit comments