@@ -644,44 +644,54 @@ public extension Api {
644644}
645645public extension Api {
646646 enum StarRefProgram : TypeConstructorDescription {
647- case starRefProgram( flags: Int32 , commissionPermille: Int32 , durationMonths: Int32 ? , endDate: Int32 ? )
647+ case starRefProgram( flags: Int32 , botId : Int64 , commissionPermille: Int32 , durationMonths: Int32 ? , endDate: Int32 ? , dailyRevenuePerUser : Api . StarsAmount ? )
648648
649649 public func serialize( _ buffer: Buffer , _ boxed: Swift . Bool ) {
650650 switch self {
651- case . starRefProgram( let flags, let commissionPermille, let durationMonths, let endDate) :
651+ case . starRefProgram( let flags, let botId , let commissionPermille, let durationMonths, let endDate, let dailyRevenuePerUser ) :
652652 if boxed {
653- buffer. appendInt32 ( 708628759 )
653+ buffer. appendInt32 ( - 586389774 )
654654 }
655655 serializeInt32 ( flags, buffer: buffer, boxed: false )
656+ serializeInt64 ( botId, buffer: buffer, boxed: false )
656657 serializeInt32 ( commissionPermille, buffer: buffer, boxed: false )
657658 if Int ( flags) & Int ( 1 << 0 ) != 0 { serializeInt32 ( durationMonths!, buffer: buffer, boxed: false ) }
658659 if Int ( flags) & Int ( 1 << 1 ) != 0 { serializeInt32 ( endDate!, buffer: buffer, boxed: false ) }
660+ if Int ( flags) & Int ( 1 << 2 ) != 0 { dailyRevenuePerUser!. serialize ( buffer, true ) }
659661 break
660662 }
661663 }
662664
663665 public func descriptionFields( ) -> ( String , [ ( String , Any ) ] ) {
664666 switch self {
665- case . starRefProgram( let flags, let commissionPermille, let durationMonths, let endDate) :
666- return ( " starRefProgram " , [ ( " flags " , flags as Any ) , ( " commissionPermille " , commissionPermille as Any ) , ( " durationMonths " , durationMonths as Any ) , ( " endDate " , endDate as Any ) ] )
667+ case . starRefProgram( let flags, let botId , let commissionPermille, let durationMonths, let endDate, let dailyRevenuePerUser ) :
668+ return ( " starRefProgram " , [ ( " flags " , flags as Any ) , ( " botId " , botId as Any ) , ( " commissionPermille " , commissionPermille as Any ) , ( " durationMonths " , durationMonths as Any ) , ( " endDate " , endDate as Any ) , ( " dailyRevenuePerUser " , dailyRevenuePerUser as Any ) ] )
667669 }
668670 }
669671
670672 public static func parse_starRefProgram( _ reader: BufferReader ) -> StarRefProgram ? {
671673 var _1 : Int32 ?
672674 _1 = reader. readInt32 ( )
673- var _2 : Int32 ?
674- _2 = reader. readInt32 ( )
675+ var _2 : Int64 ?
676+ _2 = reader. readInt64 ( )
675677 var _3 : Int32 ?
676- if Int ( _1! ) & Int ( 1 << 0 ) != 0 { _3 = reader. readInt32 ( ) }
678+ _3 = reader. readInt32 ( )
677679 var _4 : Int32 ?
678- if Int ( _1!) & Int ( 1 << 1 ) != 0 { _4 = reader. readInt32 ( ) }
680+ if Int ( _1!) & Int ( 1 << 0 ) != 0 { _4 = reader. readInt32 ( ) }
681+ var _5 : Int32 ?
682+ if Int ( _1!) & Int ( 1 << 1 ) != 0 { _5 = reader. readInt32 ( ) }
683+ var _6 : Api . StarsAmount ?
684+ if Int ( _1!) & Int ( 1 << 2 ) != 0 { if let signature = reader. readInt32 ( ) {
685+ _6 = Api . parse ( reader, signature: signature) as? Api . StarsAmount
686+ } }
679687 let _c1 = _1 != nil
680688 let _c2 = _2 != nil
681- let _c3 = ( Int ( _1!) & Int ( 1 << 0 ) == 0 ) || _3 != nil
682- let _c4 = ( Int ( _1!) & Int ( 1 << 1 ) == 0 ) || _4 != nil
683- if _c1 && _c2 && _c3 && _c4 {
684- return Api . StarRefProgram. starRefProgram ( flags: _1!, commissionPermille: _2!, durationMonths: _3, endDate: _4)
689+ let _c3 = _3 != nil
690+ let _c4 = ( Int ( _1!) & Int ( 1 << 0 ) == 0 ) || _4 != nil
691+ let _c5 = ( Int ( _1!) & Int ( 1 << 1 ) == 0 ) || _5 != nil
692+ let _c6 = ( Int ( _1!) & Int ( 1 << 2 ) == 0 ) || _6 != nil
693+ if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 {
694+ return Api . StarRefProgram. starRefProgram ( flags: _1!, botId: _2!, commissionPermille: _3!, durationMonths: _4, endDate: _5, dailyRevenuePerUser: _6)
685695 }
686696 else {
687697 return nil
0 commit comments