package tg
import (
"context"
"errors"
"fmt"
"sort"
"strings"
"go.uber.org/multierr"
"github.com/gotd/td/bin"
"github.com/gotd/td/tdjson"
"github.com/gotd/td/tdp"
"github.com/gotd/td/tgerr"
)
var (
_ = bin .Buffer {}
_ = context .Background ()
_ = fmt .Stringer (nil )
_ = strings .Builder {}
_ = errors .Is
_ = multierr .AppendInto
_ = sort .Ints
_ = tdp .Format
_ = tgerr .Error {}
_ = tdjson .Encoder {}
)
type InputBotInlineMessageMediaAuto struct {
Flags bin .Fields
InvertMedia bool
Message string
Entities []MessageEntityClass
ReplyMarkup ReplyMarkupClass
}
const InputBotInlineMessageMediaAutoTypeID = 0x3380c786
func (i InputBotInlineMessageMediaAuto ) construct () InputBotInlineMessageClass { return &i }
var (
_ bin .Encoder = &InputBotInlineMessageMediaAuto {}
_ bin .Decoder = &InputBotInlineMessageMediaAuto {}
_ bin .BareEncoder = &InputBotInlineMessageMediaAuto {}
_ bin .BareDecoder = &InputBotInlineMessageMediaAuto {}
_ InputBotInlineMessageClass = &InputBotInlineMessageMediaAuto {}
)
func (i *InputBotInlineMessageMediaAuto ) Zero () bool {
if i == nil {
return true
}
if !(i .Flags .Zero ()) {
return false
}
if !(i .InvertMedia == false ) {
return false
}
if !(i .Message == "" ) {
return false
}
if !(i .Entities == nil ) {
return false
}
if !(i .ReplyMarkup == nil ) {
return false
}
return true
}
func (i *InputBotInlineMessageMediaAuto ) String () string {
if i == nil {
return "InputBotInlineMessageMediaAuto(nil)"
}
type Alias InputBotInlineMessageMediaAuto
return fmt .Sprintf ("InputBotInlineMessageMediaAuto%+v" , Alias (*i ))
}
func (i *InputBotInlineMessageMediaAuto ) FillFrom (from interface {
GetInvertMedia () (value bool )
GetMessage () (value string )
GetEntities () (value []MessageEntityClass , ok bool )
GetReplyMarkup () (value ReplyMarkupClass , ok bool )
}) {
i .InvertMedia = from .GetInvertMedia ()
i .Message = from .GetMessage ()
if val , ok := from .GetEntities (); ok {
i .Entities = val
}
if val , ok := from .GetReplyMarkup (); ok {
i .ReplyMarkup = val
}
}
func (*InputBotInlineMessageMediaAuto ) TypeID () uint32 {
return InputBotInlineMessageMediaAutoTypeID
}
func (*InputBotInlineMessageMediaAuto ) TypeName () string {
return "inputBotInlineMessageMediaAuto"
}
func (i *InputBotInlineMessageMediaAuto ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "inputBotInlineMessageMediaAuto" ,
ID : InputBotInlineMessageMediaAutoTypeID ,
}
if i == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "InvertMedia" ,
SchemaName : "invert_media" ,
Null : !i .Flags .Has (3 ),
},
{
Name : "Message" ,
SchemaName : "message" ,
},
{
Name : "Entities" ,
SchemaName : "entities" ,
Null : !i .Flags .Has (1 ),
},
{
Name : "ReplyMarkup" ,
SchemaName : "reply_markup" ,
Null : !i .Flags .Has (2 ),
},
}
return typ
}
func (i *InputBotInlineMessageMediaAuto ) SetFlags () {
if !(i .InvertMedia == false ) {
i .Flags .Set (3 )
}
if !(i .Entities == nil ) {
i .Flags .Set (1 )
}
if !(i .ReplyMarkup == nil ) {
i .Flags .Set (2 )
}
}
func (i *InputBotInlineMessageMediaAuto ) Encode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputBotInlineMessageMediaAuto#3380c786 as nil" )
}
b .PutID (InputBotInlineMessageMediaAutoTypeID )
return i .EncodeBare (b )
}
func (i *InputBotInlineMessageMediaAuto ) EncodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputBotInlineMessageMediaAuto#3380c786 as nil" )
}
i .SetFlags ()
if err := i .Flags .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaAuto#3380c786: field flags: %w" , err )
}
b .PutString (i .Message )
if i .Flags .Has (1 ) {
b .PutVectorHeader (len (i .Entities ))
for idx , v := range i .Entities {
if v == nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaAuto#3380c786: field entities element with index %d is nil" , idx )
}
if err := v .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaAuto#3380c786: field entities element with index %d: %w" , idx , err )
}
}
}
if i .Flags .Has (2 ) {
if i .ReplyMarkup == nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaAuto#3380c786: field reply_markup is nil" )
}
if err := i .ReplyMarkup .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaAuto#3380c786: field reply_markup: %w" , err )
}
}
return nil
}
func (i *InputBotInlineMessageMediaAuto ) Decode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputBotInlineMessageMediaAuto#3380c786 to nil" )
}
if err := b .ConsumeID (InputBotInlineMessageMediaAutoTypeID ); err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaAuto#3380c786: %w" , err )
}
return i .DecodeBare (b )
}
func (i *InputBotInlineMessageMediaAuto ) DecodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputBotInlineMessageMediaAuto#3380c786 to nil" )
}
{
if err := i .Flags .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaAuto#3380c786: field flags: %w" , err )
}
}
i .InvertMedia = i .Flags .Has (3 )
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaAuto#3380c786: field message: %w" , err )
}
i .Message = value
}
if i .Flags .Has (1 ) {
headerLen , err := b .VectorHeader ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaAuto#3380c786: field entities: %w" , err )
}
if headerLen > 0 {
i .Entities = make ([]MessageEntityClass , 0 , headerLen %bin .PreallocateLimit )
}
for idx := 0 ; idx < headerLen ; idx ++ {
value , err := DecodeMessageEntity (b )
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaAuto#3380c786: field entities: %w" , err )
}
i .Entities = append (i .Entities , value )
}
}
if i .Flags .Has (2 ) {
value , err := DecodeReplyMarkup (b )
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaAuto#3380c786: field reply_markup: %w" , err )
}
i .ReplyMarkup = value
}
return nil
}
func (i *InputBotInlineMessageMediaAuto ) SetInvertMedia (value bool ) {
if value {
i .Flags .Set (3 )
i .InvertMedia = true
} else {
i .Flags .Unset (3 )
i .InvertMedia = false
}
}
func (i *InputBotInlineMessageMediaAuto ) GetInvertMedia () (value bool ) {
if i == nil {
return
}
return i .Flags .Has (3 )
}
func (i *InputBotInlineMessageMediaAuto ) GetMessage () (value string ) {
if i == nil {
return
}
return i .Message
}
func (i *InputBotInlineMessageMediaAuto ) SetEntities (value []MessageEntityClass ) {
i .Flags .Set (1 )
i .Entities = value
}
func (i *InputBotInlineMessageMediaAuto ) GetEntities () (value []MessageEntityClass , ok bool ) {
if i == nil {
return
}
if !i .Flags .Has (1 ) {
return value , false
}
return i .Entities , true
}
func (i *InputBotInlineMessageMediaAuto ) SetReplyMarkup (value ReplyMarkupClass ) {
i .Flags .Set (2 )
i .ReplyMarkup = value
}
func (i *InputBotInlineMessageMediaAuto ) GetReplyMarkup () (value ReplyMarkupClass , ok bool ) {
if i == nil {
return
}
if !i .Flags .Has (2 ) {
return value , false
}
return i .ReplyMarkup , true
}
func (i *InputBotInlineMessageMediaAuto ) MapEntities () (value MessageEntityClassArray , ok bool ) {
if !i .Flags .Has (1 ) {
return value , false
}
return MessageEntityClassArray (i .Entities ), true
}
type InputBotInlineMessageText struct {
Flags bin .Fields
NoWebpage bool
InvertMedia bool
Message string
Entities []MessageEntityClass
ReplyMarkup ReplyMarkupClass
}
const InputBotInlineMessageTextTypeID = 0x3dcd7a87
func (i InputBotInlineMessageText ) construct () InputBotInlineMessageClass { return &i }
var (
_ bin .Encoder = &InputBotInlineMessageText {}
_ bin .Decoder = &InputBotInlineMessageText {}
_ bin .BareEncoder = &InputBotInlineMessageText {}
_ bin .BareDecoder = &InputBotInlineMessageText {}
_ InputBotInlineMessageClass = &InputBotInlineMessageText {}
)
func (i *InputBotInlineMessageText ) Zero () bool {
if i == nil {
return true
}
if !(i .Flags .Zero ()) {
return false
}
if !(i .NoWebpage == false ) {
return false
}
if !(i .InvertMedia == false ) {
return false
}
if !(i .Message == "" ) {
return false
}
if !(i .Entities == nil ) {
return false
}
if !(i .ReplyMarkup == nil ) {
return false
}
return true
}
func (i *InputBotInlineMessageText ) String () string {
if i == nil {
return "InputBotInlineMessageText(nil)"
}
type Alias InputBotInlineMessageText
return fmt .Sprintf ("InputBotInlineMessageText%+v" , Alias (*i ))
}
func (i *InputBotInlineMessageText ) FillFrom (from interface {
GetNoWebpage () (value bool )
GetInvertMedia () (value bool )
GetMessage () (value string )
GetEntities () (value []MessageEntityClass , ok bool )
GetReplyMarkup () (value ReplyMarkupClass , ok bool )
}) {
i .NoWebpage = from .GetNoWebpage ()
i .InvertMedia = from .GetInvertMedia ()
i .Message = from .GetMessage ()
if val , ok := from .GetEntities (); ok {
i .Entities = val
}
if val , ok := from .GetReplyMarkup (); ok {
i .ReplyMarkup = val
}
}
func (*InputBotInlineMessageText ) TypeID () uint32 {
return InputBotInlineMessageTextTypeID
}
func (*InputBotInlineMessageText ) TypeName () string {
return "inputBotInlineMessageText"
}
func (i *InputBotInlineMessageText ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "inputBotInlineMessageText" ,
ID : InputBotInlineMessageTextTypeID ,
}
if i == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "NoWebpage" ,
SchemaName : "no_webpage" ,
Null : !i .Flags .Has (0 ),
},
{
Name : "InvertMedia" ,
SchemaName : "invert_media" ,
Null : !i .Flags .Has (3 ),
},
{
Name : "Message" ,
SchemaName : "message" ,
},
{
Name : "Entities" ,
SchemaName : "entities" ,
Null : !i .Flags .Has (1 ),
},
{
Name : "ReplyMarkup" ,
SchemaName : "reply_markup" ,
Null : !i .Flags .Has (2 ),
},
}
return typ
}
func (i *InputBotInlineMessageText ) SetFlags () {
if !(i .NoWebpage == false ) {
i .Flags .Set (0 )
}
if !(i .InvertMedia == false ) {
i .Flags .Set (3 )
}
if !(i .Entities == nil ) {
i .Flags .Set (1 )
}
if !(i .ReplyMarkup == nil ) {
i .Flags .Set (2 )
}
}
func (i *InputBotInlineMessageText ) Encode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputBotInlineMessageText#3dcd7a87 as nil" )
}
b .PutID (InputBotInlineMessageTextTypeID )
return i .EncodeBare (b )
}
func (i *InputBotInlineMessageText ) EncodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputBotInlineMessageText#3dcd7a87 as nil" )
}
i .SetFlags ()
if err := i .Flags .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageText#3dcd7a87: field flags: %w" , err )
}
b .PutString (i .Message )
if i .Flags .Has (1 ) {
b .PutVectorHeader (len (i .Entities ))
for idx , v := range i .Entities {
if v == nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageText#3dcd7a87: field entities element with index %d is nil" , idx )
}
if err := v .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageText#3dcd7a87: field entities element with index %d: %w" , idx , err )
}
}
}
if i .Flags .Has (2 ) {
if i .ReplyMarkup == nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageText#3dcd7a87: field reply_markup is nil" )
}
if err := i .ReplyMarkup .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageText#3dcd7a87: field reply_markup: %w" , err )
}
}
return nil
}
func (i *InputBotInlineMessageText ) Decode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputBotInlineMessageText#3dcd7a87 to nil" )
}
if err := b .ConsumeID (InputBotInlineMessageTextTypeID ); err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageText#3dcd7a87: %w" , err )
}
return i .DecodeBare (b )
}
func (i *InputBotInlineMessageText ) DecodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputBotInlineMessageText#3dcd7a87 to nil" )
}
{
if err := i .Flags .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageText#3dcd7a87: field flags: %w" , err )
}
}
i .NoWebpage = i .Flags .Has (0 )
i .InvertMedia = i .Flags .Has (3 )
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageText#3dcd7a87: field message: %w" , err )
}
i .Message = value
}
if i .Flags .Has (1 ) {
headerLen , err := b .VectorHeader ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageText#3dcd7a87: field entities: %w" , err )
}
if headerLen > 0 {
i .Entities = make ([]MessageEntityClass , 0 , headerLen %bin .PreallocateLimit )
}
for idx := 0 ; idx < headerLen ; idx ++ {
value , err := DecodeMessageEntity (b )
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageText#3dcd7a87: field entities: %w" , err )
}
i .Entities = append (i .Entities , value )
}
}
if i .Flags .Has (2 ) {
value , err := DecodeReplyMarkup (b )
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageText#3dcd7a87: field reply_markup: %w" , err )
}
i .ReplyMarkup = value
}
return nil
}
func (i *InputBotInlineMessageText ) SetNoWebpage (value bool ) {
if value {
i .Flags .Set (0 )
i .NoWebpage = true
} else {
i .Flags .Unset (0 )
i .NoWebpage = false
}
}
func (i *InputBotInlineMessageText ) GetNoWebpage () (value bool ) {
if i == nil {
return
}
return i .Flags .Has (0 )
}
func (i *InputBotInlineMessageText ) SetInvertMedia (value bool ) {
if value {
i .Flags .Set (3 )
i .InvertMedia = true
} else {
i .Flags .Unset (3 )
i .InvertMedia = false
}
}
func (i *InputBotInlineMessageText ) GetInvertMedia () (value bool ) {
if i == nil {
return
}
return i .Flags .Has (3 )
}
func (i *InputBotInlineMessageText ) GetMessage () (value string ) {
if i == nil {
return
}
return i .Message
}
func (i *InputBotInlineMessageText ) SetEntities (value []MessageEntityClass ) {
i .Flags .Set (1 )
i .Entities = value
}
func (i *InputBotInlineMessageText ) GetEntities () (value []MessageEntityClass , ok bool ) {
if i == nil {
return
}
if !i .Flags .Has (1 ) {
return value , false
}
return i .Entities , true
}
func (i *InputBotInlineMessageText ) SetReplyMarkup (value ReplyMarkupClass ) {
i .Flags .Set (2 )
i .ReplyMarkup = value
}
func (i *InputBotInlineMessageText ) GetReplyMarkup () (value ReplyMarkupClass , ok bool ) {
if i == nil {
return
}
if !i .Flags .Has (2 ) {
return value , false
}
return i .ReplyMarkup , true
}
func (i *InputBotInlineMessageText ) MapEntities () (value MessageEntityClassArray , ok bool ) {
if !i .Flags .Has (1 ) {
return value , false
}
return MessageEntityClassArray (i .Entities ), true
}
type InputBotInlineMessageMediaGeo struct {
Flags bin .Fields
GeoPoint InputGeoPointClass
Heading int
Period int
ProximityNotificationRadius int
ReplyMarkup ReplyMarkupClass
}
const InputBotInlineMessageMediaGeoTypeID = 0x96929a85
func (i InputBotInlineMessageMediaGeo ) construct () InputBotInlineMessageClass { return &i }
var (
_ bin .Encoder = &InputBotInlineMessageMediaGeo {}
_ bin .Decoder = &InputBotInlineMessageMediaGeo {}
_ bin .BareEncoder = &InputBotInlineMessageMediaGeo {}
_ bin .BareDecoder = &InputBotInlineMessageMediaGeo {}
_ InputBotInlineMessageClass = &InputBotInlineMessageMediaGeo {}
)
func (i *InputBotInlineMessageMediaGeo ) Zero () bool {
if i == nil {
return true
}
if !(i .Flags .Zero ()) {
return false
}
if !(i .GeoPoint == nil ) {
return false
}
if !(i .Heading == 0 ) {
return false
}
if !(i .Period == 0 ) {
return false
}
if !(i .ProximityNotificationRadius == 0 ) {
return false
}
if !(i .ReplyMarkup == nil ) {
return false
}
return true
}
func (i *InputBotInlineMessageMediaGeo ) String () string {
if i == nil {
return "InputBotInlineMessageMediaGeo(nil)"
}
type Alias InputBotInlineMessageMediaGeo
return fmt .Sprintf ("InputBotInlineMessageMediaGeo%+v" , Alias (*i ))
}
func (i *InputBotInlineMessageMediaGeo ) FillFrom (from interface {
GetGeoPoint () (value InputGeoPointClass )
GetHeading () (value int , ok bool )
GetPeriod () (value int , ok bool )
GetProximityNotificationRadius () (value int , ok bool )
GetReplyMarkup () (value ReplyMarkupClass , ok bool )
}) {
i .GeoPoint = from .GetGeoPoint ()
if val , ok := from .GetHeading (); ok {
i .Heading = val
}
if val , ok := from .GetPeriod (); ok {
i .Period = val
}
if val , ok := from .GetProximityNotificationRadius (); ok {
i .ProximityNotificationRadius = val
}
if val , ok := from .GetReplyMarkup (); ok {
i .ReplyMarkup = val
}
}
func (*InputBotInlineMessageMediaGeo ) TypeID () uint32 {
return InputBotInlineMessageMediaGeoTypeID
}
func (*InputBotInlineMessageMediaGeo ) TypeName () string {
return "inputBotInlineMessageMediaGeo"
}
func (i *InputBotInlineMessageMediaGeo ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "inputBotInlineMessageMediaGeo" ,
ID : InputBotInlineMessageMediaGeoTypeID ,
}
if i == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "GeoPoint" ,
SchemaName : "geo_point" ,
},
{
Name : "Heading" ,
SchemaName : "heading" ,
Null : !i .Flags .Has (0 ),
},
{
Name : "Period" ,
SchemaName : "period" ,
Null : !i .Flags .Has (1 ),
},
{
Name : "ProximityNotificationRadius" ,
SchemaName : "proximity_notification_radius" ,
Null : !i .Flags .Has (3 ),
},
{
Name : "ReplyMarkup" ,
SchemaName : "reply_markup" ,
Null : !i .Flags .Has (2 ),
},
}
return typ
}
func (i *InputBotInlineMessageMediaGeo ) SetFlags () {
if !(i .Heading == 0 ) {
i .Flags .Set (0 )
}
if !(i .Period == 0 ) {
i .Flags .Set (1 )
}
if !(i .ProximityNotificationRadius == 0 ) {
i .Flags .Set (3 )
}
if !(i .ReplyMarkup == nil ) {
i .Flags .Set (2 )
}
}
func (i *InputBotInlineMessageMediaGeo ) Encode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputBotInlineMessageMediaGeo#96929a85 as nil" )
}
b .PutID (InputBotInlineMessageMediaGeoTypeID )
return i .EncodeBare (b )
}
func (i *InputBotInlineMessageMediaGeo ) EncodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputBotInlineMessageMediaGeo#96929a85 as nil" )
}
i .SetFlags ()
if err := i .Flags .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaGeo#96929a85: field flags: %w" , err )
}
if i .GeoPoint == nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaGeo#96929a85: field geo_point is nil" )
}
if err := i .GeoPoint .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaGeo#96929a85: field geo_point: %w" , err )
}
if i .Flags .Has (0 ) {
b .PutInt (i .Heading )
}
if i .Flags .Has (1 ) {
b .PutInt (i .Period )
}
if i .Flags .Has (3 ) {
b .PutInt (i .ProximityNotificationRadius )
}
if i .Flags .Has (2 ) {
if i .ReplyMarkup == nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaGeo#96929a85: field reply_markup is nil" )
}
if err := i .ReplyMarkup .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaGeo#96929a85: field reply_markup: %w" , err )
}
}
return nil
}
func (i *InputBotInlineMessageMediaGeo ) Decode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputBotInlineMessageMediaGeo#96929a85 to nil" )
}
if err := b .ConsumeID (InputBotInlineMessageMediaGeoTypeID ); err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaGeo#96929a85: %w" , err )
}
return i .DecodeBare (b )
}
func (i *InputBotInlineMessageMediaGeo ) DecodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputBotInlineMessageMediaGeo#96929a85 to nil" )
}
{
if err := i .Flags .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaGeo#96929a85: field flags: %w" , err )
}
}
{
value , err := DecodeInputGeoPoint (b )
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaGeo#96929a85: field geo_point: %w" , err )
}
i .GeoPoint = value
}
if i .Flags .Has (0 ) {
value , err := b .Int ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaGeo#96929a85: field heading: %w" , err )
}
i .Heading = value
}
if i .Flags .Has (1 ) {
value , err := b .Int ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaGeo#96929a85: field period: %w" , err )
}
i .Period = value
}
if i .Flags .Has (3 ) {
value , err := b .Int ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaGeo#96929a85: field proximity_notification_radius: %w" , err )
}
i .ProximityNotificationRadius = value
}
if i .Flags .Has (2 ) {
value , err := DecodeReplyMarkup (b )
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaGeo#96929a85: field reply_markup: %w" , err )
}
i .ReplyMarkup = value
}
return nil
}
func (i *InputBotInlineMessageMediaGeo ) GetGeoPoint () (value InputGeoPointClass ) {
if i == nil {
return
}
return i .GeoPoint
}
func (i *InputBotInlineMessageMediaGeo ) SetHeading (value int ) {
i .Flags .Set (0 )
i .Heading = value
}
func (i *InputBotInlineMessageMediaGeo ) GetHeading () (value int , ok bool ) {
if i == nil {
return
}
if !i .Flags .Has (0 ) {
return value , false
}
return i .Heading , true
}
func (i *InputBotInlineMessageMediaGeo ) SetPeriod (value int ) {
i .Flags .Set (1 )
i .Period = value
}
func (i *InputBotInlineMessageMediaGeo ) GetPeriod () (value int , ok bool ) {
if i == nil {
return
}
if !i .Flags .Has (1 ) {
return value , false
}
return i .Period , true
}
func (i *InputBotInlineMessageMediaGeo ) SetProximityNotificationRadius (value int ) {
i .Flags .Set (3 )
i .ProximityNotificationRadius = value
}
func (i *InputBotInlineMessageMediaGeo ) GetProximityNotificationRadius () (value int , ok bool ) {
if i == nil {
return
}
if !i .Flags .Has (3 ) {
return value , false
}
return i .ProximityNotificationRadius , true
}
func (i *InputBotInlineMessageMediaGeo ) SetReplyMarkup (value ReplyMarkupClass ) {
i .Flags .Set (2 )
i .ReplyMarkup = value
}
func (i *InputBotInlineMessageMediaGeo ) GetReplyMarkup () (value ReplyMarkupClass , ok bool ) {
if i == nil {
return
}
if !i .Flags .Has (2 ) {
return value , false
}
return i .ReplyMarkup , true
}
type InputBotInlineMessageMediaVenue struct {
Flags bin .Fields
GeoPoint InputGeoPointClass
Title string
Address string
Provider string
VenueID string
VenueType string
ReplyMarkup ReplyMarkupClass
}
const InputBotInlineMessageMediaVenueTypeID = 0x417bbf11
func (i InputBotInlineMessageMediaVenue ) construct () InputBotInlineMessageClass { return &i }
var (
_ bin .Encoder = &InputBotInlineMessageMediaVenue {}
_ bin .Decoder = &InputBotInlineMessageMediaVenue {}
_ bin .BareEncoder = &InputBotInlineMessageMediaVenue {}
_ bin .BareDecoder = &InputBotInlineMessageMediaVenue {}
_ InputBotInlineMessageClass = &InputBotInlineMessageMediaVenue {}
)
func (i *InputBotInlineMessageMediaVenue ) Zero () bool {
if i == nil {
return true
}
if !(i .Flags .Zero ()) {
return false
}
if !(i .GeoPoint == nil ) {
return false
}
if !(i .Title == "" ) {
return false
}
if !(i .Address == "" ) {
return false
}
if !(i .Provider == "" ) {
return false
}
if !(i .VenueID == "" ) {
return false
}
if !(i .VenueType == "" ) {
return false
}
if !(i .ReplyMarkup == nil ) {
return false
}
return true
}
func (i *InputBotInlineMessageMediaVenue ) String () string {
if i == nil {
return "InputBotInlineMessageMediaVenue(nil)"
}
type Alias InputBotInlineMessageMediaVenue
return fmt .Sprintf ("InputBotInlineMessageMediaVenue%+v" , Alias (*i ))
}
func (i *InputBotInlineMessageMediaVenue ) FillFrom (from interface {
GetGeoPoint () (value InputGeoPointClass )
GetTitle () (value string )
GetAddress () (value string )
GetProvider () (value string )
GetVenueID () (value string )
GetVenueType () (value string )
GetReplyMarkup () (value ReplyMarkupClass , ok bool )
}) {
i .GeoPoint = from .GetGeoPoint ()
i .Title = from .GetTitle ()
i .Address = from .GetAddress ()
i .Provider = from .GetProvider ()
i .VenueID = from .GetVenueID ()
i .VenueType = from .GetVenueType ()
if val , ok := from .GetReplyMarkup (); ok {
i .ReplyMarkup = val
}
}
func (*InputBotInlineMessageMediaVenue ) TypeID () uint32 {
return InputBotInlineMessageMediaVenueTypeID
}
func (*InputBotInlineMessageMediaVenue ) TypeName () string {
return "inputBotInlineMessageMediaVenue"
}
func (i *InputBotInlineMessageMediaVenue ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "inputBotInlineMessageMediaVenue" ,
ID : InputBotInlineMessageMediaVenueTypeID ,
}
if i == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "GeoPoint" ,
SchemaName : "geo_point" ,
},
{
Name : "Title" ,
SchemaName : "title" ,
},
{
Name : "Address" ,
SchemaName : "address" ,
},
{
Name : "Provider" ,
SchemaName : "provider" ,
},
{
Name : "VenueID" ,
SchemaName : "venue_id" ,
},
{
Name : "VenueType" ,
SchemaName : "venue_type" ,
},
{
Name : "ReplyMarkup" ,
SchemaName : "reply_markup" ,
Null : !i .Flags .Has (2 ),
},
}
return typ
}
func (i *InputBotInlineMessageMediaVenue ) SetFlags () {
if !(i .ReplyMarkup == nil ) {
i .Flags .Set (2 )
}
}
func (i *InputBotInlineMessageMediaVenue ) Encode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputBotInlineMessageMediaVenue#417bbf11 as nil" )
}
b .PutID (InputBotInlineMessageMediaVenueTypeID )
return i .EncodeBare (b )
}
func (i *InputBotInlineMessageMediaVenue ) EncodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputBotInlineMessageMediaVenue#417bbf11 as nil" )
}
i .SetFlags ()
if err := i .Flags .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaVenue#417bbf11: field flags: %w" , err )
}
if i .GeoPoint == nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaVenue#417bbf11: field geo_point is nil" )
}
if err := i .GeoPoint .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaVenue#417bbf11: field geo_point: %w" , err )
}
b .PutString (i .Title )
b .PutString (i .Address )
b .PutString (i .Provider )
b .PutString (i .VenueID )
b .PutString (i .VenueType )
if i .Flags .Has (2 ) {
if i .ReplyMarkup == nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaVenue#417bbf11: field reply_markup is nil" )
}
if err := i .ReplyMarkup .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaVenue#417bbf11: field reply_markup: %w" , err )
}
}
return nil
}
func (i *InputBotInlineMessageMediaVenue ) Decode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputBotInlineMessageMediaVenue#417bbf11 to nil" )
}
if err := b .ConsumeID (InputBotInlineMessageMediaVenueTypeID ); err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaVenue#417bbf11: %w" , err )
}
return i .DecodeBare (b )
}
func (i *InputBotInlineMessageMediaVenue ) DecodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputBotInlineMessageMediaVenue#417bbf11 to nil" )
}
{
if err := i .Flags .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaVenue#417bbf11: field flags: %w" , err )
}
}
{
value , err := DecodeInputGeoPoint (b )
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaVenue#417bbf11: field geo_point: %w" , err )
}
i .GeoPoint = value
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaVenue#417bbf11: field title: %w" , err )
}
i .Title = value
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaVenue#417bbf11: field address: %w" , err )
}
i .Address = value
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaVenue#417bbf11: field provider: %w" , err )
}
i .Provider = value
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaVenue#417bbf11: field venue_id: %w" , err )
}
i .VenueID = value
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaVenue#417bbf11: field venue_type: %w" , err )
}
i .VenueType = value
}
if i .Flags .Has (2 ) {
value , err := DecodeReplyMarkup (b )
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaVenue#417bbf11: field reply_markup: %w" , err )
}
i .ReplyMarkup = value
}
return nil
}
func (i *InputBotInlineMessageMediaVenue ) GetGeoPoint () (value InputGeoPointClass ) {
if i == nil {
return
}
return i .GeoPoint
}
func (i *InputBotInlineMessageMediaVenue ) GetTitle () (value string ) {
if i == nil {
return
}
return i .Title
}
func (i *InputBotInlineMessageMediaVenue ) GetAddress () (value string ) {
if i == nil {
return
}
return i .Address
}
func (i *InputBotInlineMessageMediaVenue ) GetProvider () (value string ) {
if i == nil {
return
}
return i .Provider
}
func (i *InputBotInlineMessageMediaVenue ) GetVenueID () (value string ) {
if i == nil {
return
}
return i .VenueID
}
func (i *InputBotInlineMessageMediaVenue ) GetVenueType () (value string ) {
if i == nil {
return
}
return i .VenueType
}
func (i *InputBotInlineMessageMediaVenue ) SetReplyMarkup (value ReplyMarkupClass ) {
i .Flags .Set (2 )
i .ReplyMarkup = value
}
func (i *InputBotInlineMessageMediaVenue ) GetReplyMarkup () (value ReplyMarkupClass , ok bool ) {
if i == nil {
return
}
if !i .Flags .Has (2 ) {
return value , false
}
return i .ReplyMarkup , true
}
type InputBotInlineMessageMediaContact struct {
Flags bin .Fields
PhoneNumber string
FirstName string
LastName string
Vcard string
ReplyMarkup ReplyMarkupClass
}
const InputBotInlineMessageMediaContactTypeID = 0xa6edbffd
func (i InputBotInlineMessageMediaContact ) construct () InputBotInlineMessageClass { return &i }
var (
_ bin .Encoder = &InputBotInlineMessageMediaContact {}
_ bin .Decoder = &InputBotInlineMessageMediaContact {}
_ bin .BareEncoder = &InputBotInlineMessageMediaContact {}
_ bin .BareDecoder = &InputBotInlineMessageMediaContact {}
_ InputBotInlineMessageClass = &InputBotInlineMessageMediaContact {}
)
func (i *InputBotInlineMessageMediaContact ) Zero () bool {
if i == nil {
return true
}
if !(i .Flags .Zero ()) {
return false
}
if !(i .PhoneNumber == "" ) {
return false
}
if !(i .FirstName == "" ) {
return false
}
if !(i .LastName == "" ) {
return false
}
if !(i .Vcard == "" ) {
return false
}
if !(i .ReplyMarkup == nil ) {
return false
}
return true
}
func (i *InputBotInlineMessageMediaContact ) String () string {
if i == nil {
return "InputBotInlineMessageMediaContact(nil)"
}
type Alias InputBotInlineMessageMediaContact
return fmt .Sprintf ("InputBotInlineMessageMediaContact%+v" , Alias (*i ))
}
func (i *InputBotInlineMessageMediaContact ) FillFrom (from interface {
GetPhoneNumber () (value string )
GetFirstName () (value string )
GetLastName () (value string )
GetVcard () (value string )
GetReplyMarkup () (value ReplyMarkupClass , ok bool )
}) {
i .PhoneNumber = from .GetPhoneNumber ()
i .FirstName = from .GetFirstName ()
i .LastName = from .GetLastName ()
i .Vcard = from .GetVcard ()
if val , ok := from .GetReplyMarkup (); ok {
i .ReplyMarkup = val
}
}
func (*InputBotInlineMessageMediaContact ) TypeID () uint32 {
return InputBotInlineMessageMediaContactTypeID
}
func (*InputBotInlineMessageMediaContact ) TypeName () string {
return "inputBotInlineMessageMediaContact"
}
func (i *InputBotInlineMessageMediaContact ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "inputBotInlineMessageMediaContact" ,
ID : InputBotInlineMessageMediaContactTypeID ,
}
if i == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PhoneNumber" ,
SchemaName : "phone_number" ,
},
{
Name : "FirstName" ,
SchemaName : "first_name" ,
},
{
Name : "LastName" ,
SchemaName : "last_name" ,
},
{
Name : "Vcard" ,
SchemaName : "vcard" ,
},
{
Name : "ReplyMarkup" ,
SchemaName : "reply_markup" ,
Null : !i .Flags .Has (2 ),
},
}
return typ
}
func (i *InputBotInlineMessageMediaContact ) SetFlags () {
if !(i .ReplyMarkup == nil ) {
i .Flags .Set (2 )
}
}
func (i *InputBotInlineMessageMediaContact ) Encode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputBotInlineMessageMediaContact#a6edbffd as nil" )
}
b .PutID (InputBotInlineMessageMediaContactTypeID )
return i .EncodeBare (b )
}
func (i *InputBotInlineMessageMediaContact ) EncodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputBotInlineMessageMediaContact#a6edbffd as nil" )
}
i .SetFlags ()
if err := i .Flags .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaContact#a6edbffd: field flags: %w" , err )
}
b .PutString (i .PhoneNumber )
b .PutString (i .FirstName )
b .PutString (i .LastName )
b .PutString (i .Vcard )
if i .Flags .Has (2 ) {
if i .ReplyMarkup == nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaContact#a6edbffd: field reply_markup is nil" )
}
if err := i .ReplyMarkup .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaContact#a6edbffd: field reply_markup: %w" , err )
}
}
return nil
}
func (i *InputBotInlineMessageMediaContact ) Decode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputBotInlineMessageMediaContact#a6edbffd to nil" )
}
if err := b .ConsumeID (InputBotInlineMessageMediaContactTypeID ); err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaContact#a6edbffd: %w" , err )
}
return i .DecodeBare (b )
}
func (i *InputBotInlineMessageMediaContact ) DecodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputBotInlineMessageMediaContact#a6edbffd to nil" )
}
{
if err := i .Flags .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaContact#a6edbffd: field flags: %w" , err )
}
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaContact#a6edbffd: field phone_number: %w" , err )
}
i .PhoneNumber = value
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaContact#a6edbffd: field first_name: %w" , err )
}
i .FirstName = value
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaContact#a6edbffd: field last_name: %w" , err )
}
i .LastName = value
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaContact#a6edbffd: field vcard: %w" , err )
}
i .Vcard = value
}
if i .Flags .Has (2 ) {
value , err := DecodeReplyMarkup (b )
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaContact#a6edbffd: field reply_markup: %w" , err )
}
i .ReplyMarkup = value
}
return nil
}
func (i *InputBotInlineMessageMediaContact ) GetPhoneNumber () (value string ) {
if i == nil {
return
}
return i .PhoneNumber
}
func (i *InputBotInlineMessageMediaContact ) GetFirstName () (value string ) {
if i == nil {
return
}
return i .FirstName
}
func (i *InputBotInlineMessageMediaContact ) GetLastName () (value string ) {
if i == nil {
return
}
return i .LastName
}
func (i *InputBotInlineMessageMediaContact ) GetVcard () (value string ) {
if i == nil {
return
}
return i .Vcard
}
func (i *InputBotInlineMessageMediaContact ) SetReplyMarkup (value ReplyMarkupClass ) {
i .Flags .Set (2 )
i .ReplyMarkup = value
}
func (i *InputBotInlineMessageMediaContact ) GetReplyMarkup () (value ReplyMarkupClass , ok bool ) {
if i == nil {
return
}
if !i .Flags .Has (2 ) {
return value , false
}
return i .ReplyMarkup , true
}
type InputBotInlineMessageGame struct {
Flags bin .Fields
ReplyMarkup ReplyMarkupClass
}
const InputBotInlineMessageGameTypeID = 0x4b425864
func (i InputBotInlineMessageGame ) construct () InputBotInlineMessageClass { return &i }
var (
_ bin .Encoder = &InputBotInlineMessageGame {}
_ bin .Decoder = &InputBotInlineMessageGame {}
_ bin .BareEncoder = &InputBotInlineMessageGame {}
_ bin .BareDecoder = &InputBotInlineMessageGame {}
_ InputBotInlineMessageClass = &InputBotInlineMessageGame {}
)
func (i *InputBotInlineMessageGame ) Zero () bool {
if i == nil {
return true
}
if !(i .Flags .Zero ()) {
return false
}
if !(i .ReplyMarkup == nil ) {
return false
}
return true
}
func (i *InputBotInlineMessageGame ) String () string {
if i == nil {
return "InputBotInlineMessageGame(nil)"
}
type Alias InputBotInlineMessageGame
return fmt .Sprintf ("InputBotInlineMessageGame%+v" , Alias (*i ))
}
func (i *InputBotInlineMessageGame ) FillFrom (from interface {
GetReplyMarkup () (value ReplyMarkupClass , ok bool )
}) {
if val , ok := from .GetReplyMarkup (); ok {
i .ReplyMarkup = val
}
}
func (*InputBotInlineMessageGame ) TypeID () uint32 {
return InputBotInlineMessageGameTypeID
}
func (*InputBotInlineMessageGame ) TypeName () string {
return "inputBotInlineMessageGame"
}
func (i *InputBotInlineMessageGame ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "inputBotInlineMessageGame" ,
ID : InputBotInlineMessageGameTypeID ,
}
if i == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "ReplyMarkup" ,
SchemaName : "reply_markup" ,
Null : !i .Flags .Has (2 ),
},
}
return typ
}
func (i *InputBotInlineMessageGame ) SetFlags () {
if !(i .ReplyMarkup == nil ) {
i .Flags .Set (2 )
}
}
func (i *InputBotInlineMessageGame ) Encode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputBotInlineMessageGame#4b425864 as nil" )
}
b .PutID (InputBotInlineMessageGameTypeID )
return i .EncodeBare (b )
}
func (i *InputBotInlineMessageGame ) EncodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputBotInlineMessageGame#4b425864 as nil" )
}
i .SetFlags ()
if err := i .Flags .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageGame#4b425864: field flags: %w" , err )
}
if i .Flags .Has (2 ) {
if i .ReplyMarkup == nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageGame#4b425864: field reply_markup is nil" )
}
if err := i .ReplyMarkup .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageGame#4b425864: field reply_markup: %w" , err )
}
}
return nil
}
func (i *InputBotInlineMessageGame ) Decode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputBotInlineMessageGame#4b425864 to nil" )
}
if err := b .ConsumeID (InputBotInlineMessageGameTypeID ); err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageGame#4b425864: %w" , err )
}
return i .DecodeBare (b )
}
func (i *InputBotInlineMessageGame ) DecodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputBotInlineMessageGame#4b425864 to nil" )
}
{
if err := i .Flags .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageGame#4b425864: field flags: %w" , err )
}
}
if i .Flags .Has (2 ) {
value , err := DecodeReplyMarkup (b )
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageGame#4b425864: field reply_markup: %w" , err )
}
i .ReplyMarkup = value
}
return nil
}
func (i *InputBotInlineMessageGame ) SetReplyMarkup (value ReplyMarkupClass ) {
i .Flags .Set (2 )
i .ReplyMarkup = value
}
func (i *InputBotInlineMessageGame ) GetReplyMarkup () (value ReplyMarkupClass , ok bool ) {
if i == nil {
return
}
if !i .Flags .Has (2 ) {
return value , false
}
return i .ReplyMarkup , true
}
type InputBotInlineMessageMediaInvoice struct {
Flags bin .Fields
Title string
Description string
Photo InputWebDocument
Invoice Invoice
Payload []byte
Provider string
ProviderData DataJSON
ReplyMarkup ReplyMarkupClass
}
const InputBotInlineMessageMediaInvoiceTypeID = 0xd7e78225
func (i InputBotInlineMessageMediaInvoice ) construct () InputBotInlineMessageClass { return &i }
var (
_ bin .Encoder = &InputBotInlineMessageMediaInvoice {}
_ bin .Decoder = &InputBotInlineMessageMediaInvoice {}
_ bin .BareEncoder = &InputBotInlineMessageMediaInvoice {}
_ bin .BareDecoder = &InputBotInlineMessageMediaInvoice {}
_ InputBotInlineMessageClass = &InputBotInlineMessageMediaInvoice {}
)
func (i *InputBotInlineMessageMediaInvoice ) Zero () bool {
if i == nil {
return true
}
if !(i .Flags .Zero ()) {
return false
}
if !(i .Title == "" ) {
return false
}
if !(i .Description == "" ) {
return false
}
if !(i .Photo .Zero ()) {
return false
}
if !(i .Invoice .Zero ()) {
return false
}
if !(i .Payload == nil ) {
return false
}
if !(i .Provider == "" ) {
return false
}
if !(i .ProviderData .Zero ()) {
return false
}
if !(i .ReplyMarkup == nil ) {
return false
}
return true
}
func (i *InputBotInlineMessageMediaInvoice ) String () string {
if i == nil {
return "InputBotInlineMessageMediaInvoice(nil)"
}
type Alias InputBotInlineMessageMediaInvoice
return fmt .Sprintf ("InputBotInlineMessageMediaInvoice%+v" , Alias (*i ))
}
func (i *InputBotInlineMessageMediaInvoice ) FillFrom (from interface {
GetTitle () (value string )
GetDescription () (value string )
GetPhoto () (value InputWebDocument , ok bool )
GetInvoice () (value Invoice )
GetPayload () (value []byte )
GetProvider () (value string )
GetProviderData () (value DataJSON )
GetReplyMarkup () (value ReplyMarkupClass , ok bool )
}) {
i .Title = from .GetTitle ()
i .Description = from .GetDescription ()
if val , ok := from .GetPhoto (); ok {
i .Photo = val
}
i .Invoice = from .GetInvoice ()
i .Payload = from .GetPayload ()
i .Provider = from .GetProvider ()
i .ProviderData = from .GetProviderData ()
if val , ok := from .GetReplyMarkup (); ok {
i .ReplyMarkup = val
}
}
func (*InputBotInlineMessageMediaInvoice ) TypeID () uint32 {
return InputBotInlineMessageMediaInvoiceTypeID
}
func (*InputBotInlineMessageMediaInvoice ) TypeName () string {
return "inputBotInlineMessageMediaInvoice"
}
func (i *InputBotInlineMessageMediaInvoice ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "inputBotInlineMessageMediaInvoice" ,
ID : InputBotInlineMessageMediaInvoiceTypeID ,
}
if i == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Title" ,
SchemaName : "title" ,
},
{
Name : "Description" ,
SchemaName : "description" ,
},
{
Name : "Photo" ,
SchemaName : "photo" ,
Null : !i .Flags .Has (0 ),
},
{
Name : "Invoice" ,
SchemaName : "invoice" ,
},
{
Name : "Payload" ,
SchemaName : "payload" ,
},
{
Name : "Provider" ,
SchemaName : "provider" ,
},
{
Name : "ProviderData" ,
SchemaName : "provider_data" ,
},
{
Name : "ReplyMarkup" ,
SchemaName : "reply_markup" ,
Null : !i .Flags .Has (2 ),
},
}
return typ
}
func (i *InputBotInlineMessageMediaInvoice ) SetFlags () {
if !(i .Photo .Zero ()) {
i .Flags .Set (0 )
}
if !(i .ReplyMarkup == nil ) {
i .Flags .Set (2 )
}
}
func (i *InputBotInlineMessageMediaInvoice ) Encode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputBotInlineMessageMediaInvoice#d7e78225 as nil" )
}
b .PutID (InputBotInlineMessageMediaInvoiceTypeID )
return i .EncodeBare (b )
}
func (i *InputBotInlineMessageMediaInvoice ) EncodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputBotInlineMessageMediaInvoice#d7e78225 as nil" )
}
i .SetFlags ()
if err := i .Flags .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaInvoice#d7e78225: field flags: %w" , err )
}
b .PutString (i .Title )
b .PutString (i .Description )
if i .Flags .Has (0 ) {
if err := i .Photo .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaInvoice#d7e78225: field photo: %w" , err )
}
}
if err := i .Invoice .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaInvoice#d7e78225: field invoice: %w" , err )
}
b .PutBytes (i .Payload )
b .PutString (i .Provider )
if err := i .ProviderData .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaInvoice#d7e78225: field provider_data: %w" , err )
}
if i .Flags .Has (2 ) {
if i .ReplyMarkup == nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaInvoice#d7e78225: field reply_markup is nil" )
}
if err := i .ReplyMarkup .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaInvoice#d7e78225: field reply_markup: %w" , err )
}
}
return nil
}
func (i *InputBotInlineMessageMediaInvoice ) Decode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputBotInlineMessageMediaInvoice#d7e78225 to nil" )
}
if err := b .ConsumeID (InputBotInlineMessageMediaInvoiceTypeID ); err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaInvoice#d7e78225: %w" , err )
}
return i .DecodeBare (b )
}
func (i *InputBotInlineMessageMediaInvoice ) DecodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputBotInlineMessageMediaInvoice#d7e78225 to nil" )
}
{
if err := i .Flags .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaInvoice#d7e78225: field flags: %w" , err )
}
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaInvoice#d7e78225: field title: %w" , err )
}
i .Title = value
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaInvoice#d7e78225: field description: %w" , err )
}
i .Description = value
}
if i .Flags .Has (0 ) {
if err := i .Photo .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaInvoice#d7e78225: field photo: %w" , err )
}
}
{
if err := i .Invoice .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaInvoice#d7e78225: field invoice: %w" , err )
}
}
{
value , err := b .Bytes ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaInvoice#d7e78225: field payload: %w" , err )
}
i .Payload = value
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaInvoice#d7e78225: field provider: %w" , err )
}
i .Provider = value
}
{
if err := i .ProviderData .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaInvoice#d7e78225: field provider_data: %w" , err )
}
}
if i .Flags .Has (2 ) {
value , err := DecodeReplyMarkup (b )
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaInvoice#d7e78225: field reply_markup: %w" , err )
}
i .ReplyMarkup = value
}
return nil
}
func (i *InputBotInlineMessageMediaInvoice ) GetTitle () (value string ) {
if i == nil {
return
}
return i .Title
}
func (i *InputBotInlineMessageMediaInvoice ) GetDescription () (value string ) {
if i == nil {
return
}
return i .Description
}
func (i *InputBotInlineMessageMediaInvoice ) SetPhoto (value InputWebDocument ) {
i .Flags .Set (0 )
i .Photo = value
}
func (i *InputBotInlineMessageMediaInvoice ) GetPhoto () (value InputWebDocument , ok bool ) {
if i == nil {
return
}
if !i .Flags .Has (0 ) {
return value , false
}
return i .Photo , true
}
func (i *InputBotInlineMessageMediaInvoice ) GetInvoice () (value Invoice ) {
if i == nil {
return
}
return i .Invoice
}
func (i *InputBotInlineMessageMediaInvoice ) GetPayload () (value []byte ) {
if i == nil {
return
}
return i .Payload
}
func (i *InputBotInlineMessageMediaInvoice ) GetProvider () (value string ) {
if i == nil {
return
}
return i .Provider
}
func (i *InputBotInlineMessageMediaInvoice ) GetProviderData () (value DataJSON ) {
if i == nil {
return
}
return i .ProviderData
}
func (i *InputBotInlineMessageMediaInvoice ) SetReplyMarkup (value ReplyMarkupClass ) {
i .Flags .Set (2 )
i .ReplyMarkup = value
}
func (i *InputBotInlineMessageMediaInvoice ) GetReplyMarkup () (value ReplyMarkupClass , ok bool ) {
if i == nil {
return
}
if !i .Flags .Has (2 ) {
return value , false
}
return i .ReplyMarkup , true
}
type InputBotInlineMessageMediaWebPage struct {
Flags bin .Fields
InvertMedia bool
ForceLargeMedia bool
ForceSmallMedia bool
Optional bool
Message string
Entities []MessageEntityClass
URL string
ReplyMarkup ReplyMarkupClass
}
const InputBotInlineMessageMediaWebPageTypeID = 0xbddcc510
func (i InputBotInlineMessageMediaWebPage ) construct () InputBotInlineMessageClass { return &i }
var (
_ bin .Encoder = &InputBotInlineMessageMediaWebPage {}
_ bin .Decoder = &InputBotInlineMessageMediaWebPage {}
_ bin .BareEncoder = &InputBotInlineMessageMediaWebPage {}
_ bin .BareDecoder = &InputBotInlineMessageMediaWebPage {}
_ InputBotInlineMessageClass = &InputBotInlineMessageMediaWebPage {}
)
func (i *InputBotInlineMessageMediaWebPage ) Zero () bool {
if i == nil {
return true
}
if !(i .Flags .Zero ()) {
return false
}
if !(i .InvertMedia == false ) {
return false
}
if !(i .ForceLargeMedia == false ) {
return false
}
if !(i .ForceSmallMedia == false ) {
return false
}
if !(i .Optional == false ) {
return false
}
if !(i .Message == "" ) {
return false
}
if !(i .Entities == nil ) {
return false
}
if !(i .URL == "" ) {
return false
}
if !(i .ReplyMarkup == nil ) {
return false
}
return true
}
func (i *InputBotInlineMessageMediaWebPage ) String () string {
if i == nil {
return "InputBotInlineMessageMediaWebPage(nil)"
}
type Alias InputBotInlineMessageMediaWebPage
return fmt .Sprintf ("InputBotInlineMessageMediaWebPage%+v" , Alias (*i ))
}
func (i *InputBotInlineMessageMediaWebPage ) FillFrom (from interface {
GetInvertMedia () (value bool )
GetForceLargeMedia () (value bool )
GetForceSmallMedia () (value bool )
GetOptional () (value bool )
GetMessage () (value string )
GetEntities () (value []MessageEntityClass , ok bool )
GetURL () (value string )
GetReplyMarkup () (value ReplyMarkupClass , ok bool )
}) {
i .InvertMedia = from .GetInvertMedia ()
i .ForceLargeMedia = from .GetForceLargeMedia ()
i .ForceSmallMedia = from .GetForceSmallMedia ()
i .Optional = from .GetOptional ()
i .Message = from .GetMessage ()
if val , ok := from .GetEntities (); ok {
i .Entities = val
}
i .URL = from .GetURL ()
if val , ok := from .GetReplyMarkup (); ok {
i .ReplyMarkup = val
}
}
func (*InputBotInlineMessageMediaWebPage ) TypeID () uint32 {
return InputBotInlineMessageMediaWebPageTypeID
}
func (*InputBotInlineMessageMediaWebPage ) TypeName () string {
return "inputBotInlineMessageMediaWebPage"
}
func (i *InputBotInlineMessageMediaWebPage ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "inputBotInlineMessageMediaWebPage" ,
ID : InputBotInlineMessageMediaWebPageTypeID ,
}
if i == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "InvertMedia" ,
SchemaName : "invert_media" ,
Null : !i .Flags .Has (3 ),
},
{
Name : "ForceLargeMedia" ,
SchemaName : "force_large_media" ,
Null : !i .Flags .Has (4 ),
},
{
Name : "ForceSmallMedia" ,
SchemaName : "force_small_media" ,
Null : !i .Flags .Has (5 ),
},
{
Name : "Optional" ,
SchemaName : "optional" ,
Null : !i .Flags .Has (6 ),
},
{
Name : "Message" ,
SchemaName : "message" ,
},
{
Name : "Entities" ,
SchemaName : "entities" ,
Null : !i .Flags .Has (1 ),
},
{
Name : "URL" ,
SchemaName : "url" ,
},
{
Name : "ReplyMarkup" ,
SchemaName : "reply_markup" ,
Null : !i .Flags .Has (2 ),
},
}
return typ
}
func (i *InputBotInlineMessageMediaWebPage ) SetFlags () {
if !(i .InvertMedia == false ) {
i .Flags .Set (3 )
}
if !(i .ForceLargeMedia == false ) {
i .Flags .Set (4 )
}
if !(i .ForceSmallMedia == false ) {
i .Flags .Set (5 )
}
if !(i .Optional == false ) {
i .Flags .Set (6 )
}
if !(i .Entities == nil ) {
i .Flags .Set (1 )
}
if !(i .ReplyMarkup == nil ) {
i .Flags .Set (2 )
}
}
func (i *InputBotInlineMessageMediaWebPage ) Encode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputBotInlineMessageMediaWebPage#bddcc510 as nil" )
}
b .PutID (InputBotInlineMessageMediaWebPageTypeID )
return i .EncodeBare (b )
}
func (i *InputBotInlineMessageMediaWebPage ) EncodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputBotInlineMessageMediaWebPage#bddcc510 as nil" )
}
i .SetFlags ()
if err := i .Flags .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaWebPage#bddcc510: field flags: %w" , err )
}
b .PutString (i .Message )
if i .Flags .Has (1 ) {
b .PutVectorHeader (len (i .Entities ))
for idx , v := range i .Entities {
if v == nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaWebPage#bddcc510: field entities element with index %d is nil" , idx )
}
if err := v .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaWebPage#bddcc510: field entities element with index %d: %w" , idx , err )
}
}
}
b .PutString (i .URL )
if i .Flags .Has (2 ) {
if i .ReplyMarkup == nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaWebPage#bddcc510: field reply_markup is nil" )
}
if err := i .ReplyMarkup .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode inputBotInlineMessageMediaWebPage#bddcc510: field reply_markup: %w" , err )
}
}
return nil
}
func (i *InputBotInlineMessageMediaWebPage ) Decode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputBotInlineMessageMediaWebPage#bddcc510 to nil" )
}
if err := b .ConsumeID (InputBotInlineMessageMediaWebPageTypeID ); err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaWebPage#bddcc510: %w" , err )
}
return i .DecodeBare (b )
}
func (i *InputBotInlineMessageMediaWebPage ) DecodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputBotInlineMessageMediaWebPage#bddcc510 to nil" )
}
{
if err := i .Flags .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaWebPage#bddcc510: field flags: %w" , err )
}
}
i .InvertMedia = i .Flags .Has (3 )
i .ForceLargeMedia = i .Flags .Has (4 )
i .ForceSmallMedia = i .Flags .Has (5 )
i .Optional = i .Flags .Has (6 )
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaWebPage#bddcc510: field message: %w" , err )
}
i .Message = value
}
if i .Flags .Has (1 ) {
headerLen , err := b .VectorHeader ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaWebPage#bddcc510: field entities: %w" , err )
}
if headerLen > 0 {
i .Entities = make ([]MessageEntityClass , 0 , headerLen %bin .PreallocateLimit )
}
for idx := 0 ; idx < headerLen ; idx ++ {
value , err := DecodeMessageEntity (b )
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaWebPage#bddcc510: field entities: %w" , err )
}
i .Entities = append (i .Entities , value )
}
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaWebPage#bddcc510: field url: %w" , err )
}
i .URL = value
}
if i .Flags .Has (2 ) {
value , err := DecodeReplyMarkup (b )
if err != nil {
return fmt .Errorf ("unable to decode inputBotInlineMessageMediaWebPage#bddcc510: field reply_markup: %w" , err )
}
i .ReplyMarkup = value
}
return nil
}
func (i *InputBotInlineMessageMediaWebPage ) SetInvertMedia (value bool ) {
if value {
i .Flags .Set (3 )
i .InvertMedia = true
} else {
i .Flags .Unset (3 )
i .InvertMedia = false
}
}
func (i *InputBotInlineMessageMediaWebPage ) GetInvertMedia () (value bool ) {
if i == nil {
return
}
return i .Flags .Has (3 )
}
func (i *InputBotInlineMessageMediaWebPage ) SetForceLargeMedia (value bool ) {
if value {
i .Flags .Set (4 )
i .ForceLargeMedia = true
} else {
i .Flags .Unset (4 )
i .ForceLargeMedia = false
}
}
func (i *InputBotInlineMessageMediaWebPage ) GetForceLargeMedia () (value bool ) {
if i == nil {
return
}
return i .Flags .Has (4 )
}
func (i *InputBotInlineMessageMediaWebPage ) SetForceSmallMedia (value bool ) {
if value {
i .Flags .Set (5 )
i .ForceSmallMedia = true
} else {
i .Flags .Unset (5 )
i .ForceSmallMedia = false
}
}
func (i *InputBotInlineMessageMediaWebPage ) GetForceSmallMedia () (value bool ) {
if i == nil {
return
}
return i .Flags .Has (5 )
}
func (i *InputBotInlineMessageMediaWebPage ) SetOptional (value bool ) {
if value {
i .Flags .Set (6 )
i .Optional = true
} else {
i .Flags .Unset (6 )
i .Optional = false
}
}
func (i *InputBotInlineMessageMediaWebPage ) GetOptional () (value bool ) {
if i == nil {
return
}
return i .Flags .Has (6 )
}
func (i *InputBotInlineMessageMediaWebPage ) GetMessage () (value string ) {
if i == nil {
return
}
return i .Message
}
func (i *InputBotInlineMessageMediaWebPage ) SetEntities (value []MessageEntityClass ) {
i .Flags .Set (1 )
i .Entities = value
}
func (i *InputBotInlineMessageMediaWebPage ) GetEntities () (value []MessageEntityClass , ok bool ) {
if i == nil {
return
}
if !i .Flags .Has (1 ) {
return value , false
}
return i .Entities , true
}
func (i *InputBotInlineMessageMediaWebPage ) GetURL () (value string ) {
if i == nil {
return
}
return i .URL
}
func (i *InputBotInlineMessageMediaWebPage ) SetReplyMarkup (value ReplyMarkupClass ) {
i .Flags .Set (2 )
i .ReplyMarkup = value
}
func (i *InputBotInlineMessageMediaWebPage ) GetReplyMarkup () (value ReplyMarkupClass , ok bool ) {
if i == nil {
return
}
if !i .Flags .Has (2 ) {
return value , false
}
return i .ReplyMarkup , true
}
func (i *InputBotInlineMessageMediaWebPage ) MapEntities () (value MessageEntityClassArray , ok bool ) {
if !i .Flags .Has (1 ) {
return value , false
}
return MessageEntityClassArray (i .Entities ), true
}
const InputBotInlineMessageClassName = "InputBotInlineMessage"
type InputBotInlineMessageClass interface {
bin .Encoder
bin .Decoder
bin .BareEncoder
bin .BareDecoder
construct () InputBotInlineMessageClass
TypeID () uint32
TypeName () string
String () string
Zero () bool
GetReplyMarkup () (value ReplyMarkupClass , ok bool )
}
func DecodeInputBotInlineMessage (buf *bin .Buffer ) (InputBotInlineMessageClass , error ) {
id , err := buf .PeekID ()
if err != nil {
return nil , err
}
switch id {
case InputBotInlineMessageMediaAutoTypeID :
v := InputBotInlineMessageMediaAuto {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode InputBotInlineMessageClass: %w" , err )
}
return &v , nil
case InputBotInlineMessageTextTypeID :
v := InputBotInlineMessageText {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode InputBotInlineMessageClass: %w" , err )
}
return &v , nil
case InputBotInlineMessageMediaGeoTypeID :
v := InputBotInlineMessageMediaGeo {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode InputBotInlineMessageClass: %w" , err )
}
return &v , nil
case InputBotInlineMessageMediaVenueTypeID :
v := InputBotInlineMessageMediaVenue {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode InputBotInlineMessageClass: %w" , err )
}
return &v , nil
case InputBotInlineMessageMediaContactTypeID :
v := InputBotInlineMessageMediaContact {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode InputBotInlineMessageClass: %w" , err )
}
return &v , nil
case InputBotInlineMessageGameTypeID :
v := InputBotInlineMessageGame {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode InputBotInlineMessageClass: %w" , err )
}
return &v , nil
case InputBotInlineMessageMediaInvoiceTypeID :
v := InputBotInlineMessageMediaInvoice {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode InputBotInlineMessageClass: %w" , err )
}
return &v , nil
case InputBotInlineMessageMediaWebPageTypeID :
v := InputBotInlineMessageMediaWebPage {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode InputBotInlineMessageClass: %w" , err )
}
return &v , nil
default :
return nil , fmt .Errorf ("unable to decode InputBotInlineMessageClass: %w" , bin .NewUnexpectedID (id ))
}
}
type InputBotInlineMessageBox struct {
InputBotInlineMessage InputBotInlineMessageClass
}
func (b *InputBotInlineMessageBox ) Decode (buf *bin .Buffer ) error {
if b == nil {
return fmt .Errorf ("unable to decode InputBotInlineMessageBox to nil" )
}
v , err := DecodeInputBotInlineMessage (buf )
if err != nil {
return fmt .Errorf ("unable to decode boxed value: %w" , err )
}
b .InputBotInlineMessage = v
return nil
}
func (b *InputBotInlineMessageBox ) Encode (buf *bin .Buffer ) error {
if b == nil || b .InputBotInlineMessage == nil {
return fmt .Errorf ("unable to encode InputBotInlineMessageClass as nil" )
}
return b .InputBotInlineMessage .Encode (buf )
}
The pages are generated with Golds v0.6.7 . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds .