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 InputStickerSetEmpty struct {
}
const InputStickerSetEmptyTypeID = 0xffb62b95
func (i InputStickerSetEmpty ) construct () InputStickerSetClass { return &i }
var (
_ bin .Encoder = &InputStickerSetEmpty {}
_ bin .Decoder = &InputStickerSetEmpty {}
_ bin .BareEncoder = &InputStickerSetEmpty {}
_ bin .BareDecoder = &InputStickerSetEmpty {}
_ InputStickerSetClass = &InputStickerSetEmpty {}
)
func (i *InputStickerSetEmpty ) Zero () bool {
if i == nil {
return true
}
return true
}
func (i *InputStickerSetEmpty ) String () string {
if i == nil {
return "InputStickerSetEmpty(nil)"
}
type Alias InputStickerSetEmpty
return fmt .Sprintf ("InputStickerSetEmpty%+v" , Alias (*i ))
}
func (*InputStickerSetEmpty ) TypeID () uint32 {
return InputStickerSetEmptyTypeID
}
func (*InputStickerSetEmpty ) TypeName () string {
return "inputStickerSetEmpty"
}
func (i *InputStickerSetEmpty ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "inputStickerSetEmpty" ,
ID : InputStickerSetEmptyTypeID ,
}
if i == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (i *InputStickerSetEmpty ) Encode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetEmpty#ffb62b95 as nil" )
}
b .PutID (InputStickerSetEmptyTypeID )
return i .EncodeBare (b )
}
func (i *InputStickerSetEmpty ) EncodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetEmpty#ffb62b95 as nil" )
}
return nil
}
func (i *InputStickerSetEmpty ) Decode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetEmpty#ffb62b95 to nil" )
}
if err := b .ConsumeID (InputStickerSetEmptyTypeID ); err != nil {
return fmt .Errorf ("unable to decode inputStickerSetEmpty#ffb62b95: %w" , err )
}
return i .DecodeBare (b )
}
func (i *InputStickerSetEmpty ) DecodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetEmpty#ffb62b95 to nil" )
}
return nil
}
type InputStickerSetID struct {
ID int64
AccessHash int64
}
const InputStickerSetIDTypeID = 0x9de7a269
func (i InputStickerSetID ) construct () InputStickerSetClass { return &i }
var (
_ bin .Encoder = &InputStickerSetID {}
_ bin .Decoder = &InputStickerSetID {}
_ bin .BareEncoder = &InputStickerSetID {}
_ bin .BareDecoder = &InputStickerSetID {}
_ InputStickerSetClass = &InputStickerSetID {}
)
func (i *InputStickerSetID ) Zero () bool {
if i == nil {
return true
}
if !(i .ID == 0 ) {
return false
}
if !(i .AccessHash == 0 ) {
return false
}
return true
}
func (i *InputStickerSetID ) String () string {
if i == nil {
return "InputStickerSetID(nil)"
}
type Alias InputStickerSetID
return fmt .Sprintf ("InputStickerSetID%+v" , Alias (*i ))
}
func (i *InputStickerSetID ) FillFrom (from interface {
GetID () (value int64 )
GetAccessHash () (value int64 )
}) {
i .ID = from .GetID ()
i .AccessHash = from .GetAccessHash ()
}
func (*InputStickerSetID ) TypeID () uint32 {
return InputStickerSetIDTypeID
}
func (*InputStickerSetID ) TypeName () string {
return "inputStickerSetID"
}
func (i *InputStickerSetID ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "inputStickerSetID" ,
ID : InputStickerSetIDTypeID ,
}
if i == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "ID" ,
SchemaName : "id" ,
},
{
Name : "AccessHash" ,
SchemaName : "access_hash" ,
},
}
return typ
}
func (i *InputStickerSetID ) Encode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetID#9de7a269 as nil" )
}
b .PutID (InputStickerSetIDTypeID )
return i .EncodeBare (b )
}
func (i *InputStickerSetID ) EncodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetID#9de7a269 as nil" )
}
b .PutLong (i .ID )
b .PutLong (i .AccessHash )
return nil
}
func (i *InputStickerSetID ) Decode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetID#9de7a269 to nil" )
}
if err := b .ConsumeID (InputStickerSetIDTypeID ); err != nil {
return fmt .Errorf ("unable to decode inputStickerSetID#9de7a269: %w" , err )
}
return i .DecodeBare (b )
}
func (i *InputStickerSetID ) DecodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetID#9de7a269 to nil" )
}
{
value , err := b .Long ()
if err != nil {
return fmt .Errorf ("unable to decode inputStickerSetID#9de7a269: field id: %w" , err )
}
i .ID = value
}
{
value , err := b .Long ()
if err != nil {
return fmt .Errorf ("unable to decode inputStickerSetID#9de7a269: field access_hash: %w" , err )
}
i .AccessHash = value
}
return nil
}
func (i *InputStickerSetID ) GetID () (value int64 ) {
if i == nil {
return
}
return i .ID
}
func (i *InputStickerSetID ) GetAccessHash () (value int64 ) {
if i == nil {
return
}
return i .AccessHash
}
type InputStickerSetShortName struct {
ShortName string
}
const InputStickerSetShortNameTypeID = 0x861cc8a0
func (i InputStickerSetShortName ) construct () InputStickerSetClass { return &i }
var (
_ bin .Encoder = &InputStickerSetShortName {}
_ bin .Decoder = &InputStickerSetShortName {}
_ bin .BareEncoder = &InputStickerSetShortName {}
_ bin .BareDecoder = &InputStickerSetShortName {}
_ InputStickerSetClass = &InputStickerSetShortName {}
)
func (i *InputStickerSetShortName ) Zero () bool {
if i == nil {
return true
}
if !(i .ShortName == "" ) {
return false
}
return true
}
func (i *InputStickerSetShortName ) String () string {
if i == nil {
return "InputStickerSetShortName(nil)"
}
type Alias InputStickerSetShortName
return fmt .Sprintf ("InputStickerSetShortName%+v" , Alias (*i ))
}
func (i *InputStickerSetShortName ) FillFrom (from interface {
GetShortName () (value string )
}) {
i .ShortName = from .GetShortName ()
}
func (*InputStickerSetShortName ) TypeID () uint32 {
return InputStickerSetShortNameTypeID
}
func (*InputStickerSetShortName ) TypeName () string {
return "inputStickerSetShortName"
}
func (i *InputStickerSetShortName ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "inputStickerSetShortName" ,
ID : InputStickerSetShortNameTypeID ,
}
if i == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "ShortName" ,
SchemaName : "short_name" ,
},
}
return typ
}
func (i *InputStickerSetShortName ) Encode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetShortName#861cc8a0 as nil" )
}
b .PutID (InputStickerSetShortNameTypeID )
return i .EncodeBare (b )
}
func (i *InputStickerSetShortName ) EncodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetShortName#861cc8a0 as nil" )
}
b .PutString (i .ShortName )
return nil
}
func (i *InputStickerSetShortName ) Decode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetShortName#861cc8a0 to nil" )
}
if err := b .ConsumeID (InputStickerSetShortNameTypeID ); err != nil {
return fmt .Errorf ("unable to decode inputStickerSetShortName#861cc8a0: %w" , err )
}
return i .DecodeBare (b )
}
func (i *InputStickerSetShortName ) DecodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetShortName#861cc8a0 to nil" )
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode inputStickerSetShortName#861cc8a0: field short_name: %w" , err )
}
i .ShortName = value
}
return nil
}
func (i *InputStickerSetShortName ) GetShortName () (value string ) {
if i == nil {
return
}
return i .ShortName
}
type InputStickerSetAnimatedEmoji struct {
}
const InputStickerSetAnimatedEmojiTypeID = 0x28703c8
func (i InputStickerSetAnimatedEmoji ) construct () InputStickerSetClass { return &i }
var (
_ bin .Encoder = &InputStickerSetAnimatedEmoji {}
_ bin .Decoder = &InputStickerSetAnimatedEmoji {}
_ bin .BareEncoder = &InputStickerSetAnimatedEmoji {}
_ bin .BareDecoder = &InputStickerSetAnimatedEmoji {}
_ InputStickerSetClass = &InputStickerSetAnimatedEmoji {}
)
func (i *InputStickerSetAnimatedEmoji ) Zero () bool {
if i == nil {
return true
}
return true
}
func (i *InputStickerSetAnimatedEmoji ) String () string {
if i == nil {
return "InputStickerSetAnimatedEmoji(nil)"
}
type Alias InputStickerSetAnimatedEmoji
return fmt .Sprintf ("InputStickerSetAnimatedEmoji%+v" , Alias (*i ))
}
func (*InputStickerSetAnimatedEmoji ) TypeID () uint32 {
return InputStickerSetAnimatedEmojiTypeID
}
func (*InputStickerSetAnimatedEmoji ) TypeName () string {
return "inputStickerSetAnimatedEmoji"
}
func (i *InputStickerSetAnimatedEmoji ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "inputStickerSetAnimatedEmoji" ,
ID : InputStickerSetAnimatedEmojiTypeID ,
}
if i == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (i *InputStickerSetAnimatedEmoji ) Encode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetAnimatedEmoji#28703c8 as nil" )
}
b .PutID (InputStickerSetAnimatedEmojiTypeID )
return i .EncodeBare (b )
}
func (i *InputStickerSetAnimatedEmoji ) EncodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetAnimatedEmoji#28703c8 as nil" )
}
return nil
}
func (i *InputStickerSetAnimatedEmoji ) Decode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetAnimatedEmoji#28703c8 to nil" )
}
if err := b .ConsumeID (InputStickerSetAnimatedEmojiTypeID ); err != nil {
return fmt .Errorf ("unable to decode inputStickerSetAnimatedEmoji#28703c8: %w" , err )
}
return i .DecodeBare (b )
}
func (i *InputStickerSetAnimatedEmoji ) DecodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetAnimatedEmoji#28703c8 to nil" )
}
return nil
}
type InputStickerSetDice struct {
Emoticon string
}
const InputStickerSetDiceTypeID = 0xe67f520e
func (i InputStickerSetDice ) construct () InputStickerSetClass { return &i }
var (
_ bin .Encoder = &InputStickerSetDice {}
_ bin .Decoder = &InputStickerSetDice {}
_ bin .BareEncoder = &InputStickerSetDice {}
_ bin .BareDecoder = &InputStickerSetDice {}
_ InputStickerSetClass = &InputStickerSetDice {}
)
func (i *InputStickerSetDice ) Zero () bool {
if i == nil {
return true
}
if !(i .Emoticon == "" ) {
return false
}
return true
}
func (i *InputStickerSetDice ) String () string {
if i == nil {
return "InputStickerSetDice(nil)"
}
type Alias InputStickerSetDice
return fmt .Sprintf ("InputStickerSetDice%+v" , Alias (*i ))
}
func (i *InputStickerSetDice ) FillFrom (from interface {
GetEmoticon () (value string )
}) {
i .Emoticon = from .GetEmoticon ()
}
func (*InputStickerSetDice ) TypeID () uint32 {
return InputStickerSetDiceTypeID
}
func (*InputStickerSetDice ) TypeName () string {
return "inputStickerSetDice"
}
func (i *InputStickerSetDice ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "inputStickerSetDice" ,
ID : InputStickerSetDiceTypeID ,
}
if i == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Emoticon" ,
SchemaName : "emoticon" ,
},
}
return typ
}
func (i *InputStickerSetDice ) Encode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetDice#e67f520e as nil" )
}
b .PutID (InputStickerSetDiceTypeID )
return i .EncodeBare (b )
}
func (i *InputStickerSetDice ) EncodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetDice#e67f520e as nil" )
}
b .PutString (i .Emoticon )
return nil
}
func (i *InputStickerSetDice ) Decode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetDice#e67f520e to nil" )
}
if err := b .ConsumeID (InputStickerSetDiceTypeID ); err != nil {
return fmt .Errorf ("unable to decode inputStickerSetDice#e67f520e: %w" , err )
}
return i .DecodeBare (b )
}
func (i *InputStickerSetDice ) DecodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetDice#e67f520e to nil" )
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode inputStickerSetDice#e67f520e: field emoticon: %w" , err )
}
i .Emoticon = value
}
return nil
}
func (i *InputStickerSetDice ) GetEmoticon () (value string ) {
if i == nil {
return
}
return i .Emoticon
}
type InputStickerSetAnimatedEmojiAnimations struct {
}
const InputStickerSetAnimatedEmojiAnimationsTypeID = 0xcde3739
func (i InputStickerSetAnimatedEmojiAnimations ) construct () InputStickerSetClass { return &i }
var (
_ bin .Encoder = &InputStickerSetAnimatedEmojiAnimations {}
_ bin .Decoder = &InputStickerSetAnimatedEmojiAnimations {}
_ bin .BareEncoder = &InputStickerSetAnimatedEmojiAnimations {}
_ bin .BareDecoder = &InputStickerSetAnimatedEmojiAnimations {}
_ InputStickerSetClass = &InputStickerSetAnimatedEmojiAnimations {}
)
func (i *InputStickerSetAnimatedEmojiAnimations ) Zero () bool {
if i == nil {
return true
}
return true
}
func (i *InputStickerSetAnimatedEmojiAnimations ) String () string {
if i == nil {
return "InputStickerSetAnimatedEmojiAnimations(nil)"
}
type Alias InputStickerSetAnimatedEmojiAnimations
return fmt .Sprintf ("InputStickerSetAnimatedEmojiAnimations%+v" , Alias (*i ))
}
func (*InputStickerSetAnimatedEmojiAnimations ) TypeID () uint32 {
return InputStickerSetAnimatedEmojiAnimationsTypeID
}
func (*InputStickerSetAnimatedEmojiAnimations ) TypeName () string {
return "inputStickerSetAnimatedEmojiAnimations"
}
func (i *InputStickerSetAnimatedEmojiAnimations ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "inputStickerSetAnimatedEmojiAnimations" ,
ID : InputStickerSetAnimatedEmojiAnimationsTypeID ,
}
if i == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (i *InputStickerSetAnimatedEmojiAnimations ) Encode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetAnimatedEmojiAnimations#cde3739 as nil" )
}
b .PutID (InputStickerSetAnimatedEmojiAnimationsTypeID )
return i .EncodeBare (b )
}
func (i *InputStickerSetAnimatedEmojiAnimations ) EncodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetAnimatedEmojiAnimations#cde3739 as nil" )
}
return nil
}
func (i *InputStickerSetAnimatedEmojiAnimations ) Decode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetAnimatedEmojiAnimations#cde3739 to nil" )
}
if err := b .ConsumeID (InputStickerSetAnimatedEmojiAnimationsTypeID ); err != nil {
return fmt .Errorf ("unable to decode inputStickerSetAnimatedEmojiAnimations#cde3739: %w" , err )
}
return i .DecodeBare (b )
}
func (i *InputStickerSetAnimatedEmojiAnimations ) DecodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetAnimatedEmojiAnimations#cde3739 to nil" )
}
return nil
}
type InputStickerSetPremiumGifts struct {
}
const InputStickerSetPremiumGiftsTypeID = 0xc88b3b02
func (i InputStickerSetPremiumGifts ) construct () InputStickerSetClass { return &i }
var (
_ bin .Encoder = &InputStickerSetPremiumGifts {}
_ bin .Decoder = &InputStickerSetPremiumGifts {}
_ bin .BareEncoder = &InputStickerSetPremiumGifts {}
_ bin .BareDecoder = &InputStickerSetPremiumGifts {}
_ InputStickerSetClass = &InputStickerSetPremiumGifts {}
)
func (i *InputStickerSetPremiumGifts ) Zero () bool {
if i == nil {
return true
}
return true
}
func (i *InputStickerSetPremiumGifts ) String () string {
if i == nil {
return "InputStickerSetPremiumGifts(nil)"
}
type Alias InputStickerSetPremiumGifts
return fmt .Sprintf ("InputStickerSetPremiumGifts%+v" , Alias (*i ))
}
func (*InputStickerSetPremiumGifts ) TypeID () uint32 {
return InputStickerSetPremiumGiftsTypeID
}
func (*InputStickerSetPremiumGifts ) TypeName () string {
return "inputStickerSetPremiumGifts"
}
func (i *InputStickerSetPremiumGifts ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "inputStickerSetPremiumGifts" ,
ID : InputStickerSetPremiumGiftsTypeID ,
}
if i == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (i *InputStickerSetPremiumGifts ) Encode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetPremiumGifts#c88b3b02 as nil" )
}
b .PutID (InputStickerSetPremiumGiftsTypeID )
return i .EncodeBare (b )
}
func (i *InputStickerSetPremiumGifts ) EncodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetPremiumGifts#c88b3b02 as nil" )
}
return nil
}
func (i *InputStickerSetPremiumGifts ) Decode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetPremiumGifts#c88b3b02 to nil" )
}
if err := b .ConsumeID (InputStickerSetPremiumGiftsTypeID ); err != nil {
return fmt .Errorf ("unable to decode inputStickerSetPremiumGifts#c88b3b02: %w" , err )
}
return i .DecodeBare (b )
}
func (i *InputStickerSetPremiumGifts ) DecodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetPremiumGifts#c88b3b02 to nil" )
}
return nil
}
type InputStickerSetEmojiGenericAnimations struct {
}
const InputStickerSetEmojiGenericAnimationsTypeID = 0x4c4d4ce
func (i InputStickerSetEmojiGenericAnimations ) construct () InputStickerSetClass { return &i }
var (
_ bin .Encoder = &InputStickerSetEmojiGenericAnimations {}
_ bin .Decoder = &InputStickerSetEmojiGenericAnimations {}
_ bin .BareEncoder = &InputStickerSetEmojiGenericAnimations {}
_ bin .BareDecoder = &InputStickerSetEmojiGenericAnimations {}
_ InputStickerSetClass = &InputStickerSetEmojiGenericAnimations {}
)
func (i *InputStickerSetEmojiGenericAnimations ) Zero () bool {
if i == nil {
return true
}
return true
}
func (i *InputStickerSetEmojiGenericAnimations ) String () string {
if i == nil {
return "InputStickerSetEmojiGenericAnimations(nil)"
}
type Alias InputStickerSetEmojiGenericAnimations
return fmt .Sprintf ("InputStickerSetEmojiGenericAnimations%+v" , Alias (*i ))
}
func (*InputStickerSetEmojiGenericAnimations ) TypeID () uint32 {
return InputStickerSetEmojiGenericAnimationsTypeID
}
func (*InputStickerSetEmojiGenericAnimations ) TypeName () string {
return "inputStickerSetEmojiGenericAnimations"
}
func (i *InputStickerSetEmojiGenericAnimations ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "inputStickerSetEmojiGenericAnimations" ,
ID : InputStickerSetEmojiGenericAnimationsTypeID ,
}
if i == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (i *InputStickerSetEmojiGenericAnimations ) Encode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetEmojiGenericAnimations#4c4d4ce as nil" )
}
b .PutID (InputStickerSetEmojiGenericAnimationsTypeID )
return i .EncodeBare (b )
}
func (i *InputStickerSetEmojiGenericAnimations ) EncodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetEmojiGenericAnimations#4c4d4ce as nil" )
}
return nil
}
func (i *InputStickerSetEmojiGenericAnimations ) Decode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetEmojiGenericAnimations#4c4d4ce to nil" )
}
if err := b .ConsumeID (InputStickerSetEmojiGenericAnimationsTypeID ); err != nil {
return fmt .Errorf ("unable to decode inputStickerSetEmojiGenericAnimations#4c4d4ce: %w" , err )
}
return i .DecodeBare (b )
}
func (i *InputStickerSetEmojiGenericAnimations ) DecodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetEmojiGenericAnimations#4c4d4ce to nil" )
}
return nil
}
type InputStickerSetEmojiDefaultStatuses struct {
}
const InputStickerSetEmojiDefaultStatusesTypeID = 0x29d0f5ee
func (i InputStickerSetEmojiDefaultStatuses ) construct () InputStickerSetClass { return &i }
var (
_ bin .Encoder = &InputStickerSetEmojiDefaultStatuses {}
_ bin .Decoder = &InputStickerSetEmojiDefaultStatuses {}
_ bin .BareEncoder = &InputStickerSetEmojiDefaultStatuses {}
_ bin .BareDecoder = &InputStickerSetEmojiDefaultStatuses {}
_ InputStickerSetClass = &InputStickerSetEmojiDefaultStatuses {}
)
func (i *InputStickerSetEmojiDefaultStatuses ) Zero () bool {
if i == nil {
return true
}
return true
}
func (i *InputStickerSetEmojiDefaultStatuses ) String () string {
if i == nil {
return "InputStickerSetEmojiDefaultStatuses(nil)"
}
type Alias InputStickerSetEmojiDefaultStatuses
return fmt .Sprintf ("InputStickerSetEmojiDefaultStatuses%+v" , Alias (*i ))
}
func (*InputStickerSetEmojiDefaultStatuses ) TypeID () uint32 {
return InputStickerSetEmojiDefaultStatusesTypeID
}
func (*InputStickerSetEmojiDefaultStatuses ) TypeName () string {
return "inputStickerSetEmojiDefaultStatuses"
}
func (i *InputStickerSetEmojiDefaultStatuses ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "inputStickerSetEmojiDefaultStatuses" ,
ID : InputStickerSetEmojiDefaultStatusesTypeID ,
}
if i == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (i *InputStickerSetEmojiDefaultStatuses ) Encode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetEmojiDefaultStatuses#29d0f5ee as nil" )
}
b .PutID (InputStickerSetEmojiDefaultStatusesTypeID )
return i .EncodeBare (b )
}
func (i *InputStickerSetEmojiDefaultStatuses ) EncodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetEmojiDefaultStatuses#29d0f5ee as nil" )
}
return nil
}
func (i *InputStickerSetEmojiDefaultStatuses ) Decode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetEmojiDefaultStatuses#29d0f5ee to nil" )
}
if err := b .ConsumeID (InputStickerSetEmojiDefaultStatusesTypeID ); err != nil {
return fmt .Errorf ("unable to decode inputStickerSetEmojiDefaultStatuses#29d0f5ee: %w" , err )
}
return i .DecodeBare (b )
}
func (i *InputStickerSetEmojiDefaultStatuses ) DecodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetEmojiDefaultStatuses#29d0f5ee to nil" )
}
return nil
}
type InputStickerSetEmojiDefaultTopicIcons struct {
}
const InputStickerSetEmojiDefaultTopicIconsTypeID = 0x44c1f8e9
func (i InputStickerSetEmojiDefaultTopicIcons ) construct () InputStickerSetClass { return &i }
var (
_ bin .Encoder = &InputStickerSetEmojiDefaultTopicIcons {}
_ bin .Decoder = &InputStickerSetEmojiDefaultTopicIcons {}
_ bin .BareEncoder = &InputStickerSetEmojiDefaultTopicIcons {}
_ bin .BareDecoder = &InputStickerSetEmojiDefaultTopicIcons {}
_ InputStickerSetClass = &InputStickerSetEmojiDefaultTopicIcons {}
)
func (i *InputStickerSetEmojiDefaultTopicIcons ) Zero () bool {
if i == nil {
return true
}
return true
}
func (i *InputStickerSetEmojiDefaultTopicIcons ) String () string {
if i == nil {
return "InputStickerSetEmojiDefaultTopicIcons(nil)"
}
type Alias InputStickerSetEmojiDefaultTopicIcons
return fmt .Sprintf ("InputStickerSetEmojiDefaultTopicIcons%+v" , Alias (*i ))
}
func (*InputStickerSetEmojiDefaultTopicIcons ) TypeID () uint32 {
return InputStickerSetEmojiDefaultTopicIconsTypeID
}
func (*InputStickerSetEmojiDefaultTopicIcons ) TypeName () string {
return "inputStickerSetEmojiDefaultTopicIcons"
}
func (i *InputStickerSetEmojiDefaultTopicIcons ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "inputStickerSetEmojiDefaultTopicIcons" ,
ID : InputStickerSetEmojiDefaultTopicIconsTypeID ,
}
if i == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (i *InputStickerSetEmojiDefaultTopicIcons ) Encode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetEmojiDefaultTopicIcons#44c1f8e9 as nil" )
}
b .PutID (InputStickerSetEmojiDefaultTopicIconsTypeID )
return i .EncodeBare (b )
}
func (i *InputStickerSetEmojiDefaultTopicIcons ) EncodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetEmojiDefaultTopicIcons#44c1f8e9 as nil" )
}
return nil
}
func (i *InputStickerSetEmojiDefaultTopicIcons ) Decode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetEmojiDefaultTopicIcons#44c1f8e9 to nil" )
}
if err := b .ConsumeID (InputStickerSetEmojiDefaultTopicIconsTypeID ); err != nil {
return fmt .Errorf ("unable to decode inputStickerSetEmojiDefaultTopicIcons#44c1f8e9: %w" , err )
}
return i .DecodeBare (b )
}
func (i *InputStickerSetEmojiDefaultTopicIcons ) DecodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetEmojiDefaultTopicIcons#44c1f8e9 to nil" )
}
return nil
}
type InputStickerSetEmojiChannelDefaultStatuses struct {
}
const InputStickerSetEmojiChannelDefaultStatusesTypeID = 0x49748553
func (i InputStickerSetEmojiChannelDefaultStatuses ) construct () InputStickerSetClass { return &i }
var (
_ bin .Encoder = &InputStickerSetEmojiChannelDefaultStatuses {}
_ bin .Decoder = &InputStickerSetEmojiChannelDefaultStatuses {}
_ bin .BareEncoder = &InputStickerSetEmojiChannelDefaultStatuses {}
_ bin .BareDecoder = &InputStickerSetEmojiChannelDefaultStatuses {}
_ InputStickerSetClass = &InputStickerSetEmojiChannelDefaultStatuses {}
)
func (i *InputStickerSetEmojiChannelDefaultStatuses ) Zero () bool {
if i == nil {
return true
}
return true
}
func (i *InputStickerSetEmojiChannelDefaultStatuses ) String () string {
if i == nil {
return "InputStickerSetEmojiChannelDefaultStatuses(nil)"
}
type Alias InputStickerSetEmojiChannelDefaultStatuses
return fmt .Sprintf ("InputStickerSetEmojiChannelDefaultStatuses%+v" , Alias (*i ))
}
func (*InputStickerSetEmojiChannelDefaultStatuses ) TypeID () uint32 {
return InputStickerSetEmojiChannelDefaultStatusesTypeID
}
func (*InputStickerSetEmojiChannelDefaultStatuses ) TypeName () string {
return "inputStickerSetEmojiChannelDefaultStatuses"
}
func (i *InputStickerSetEmojiChannelDefaultStatuses ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "inputStickerSetEmojiChannelDefaultStatuses" ,
ID : InputStickerSetEmojiChannelDefaultStatusesTypeID ,
}
if i == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (i *InputStickerSetEmojiChannelDefaultStatuses ) Encode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetEmojiChannelDefaultStatuses#49748553 as nil" )
}
b .PutID (InputStickerSetEmojiChannelDefaultStatusesTypeID )
return i .EncodeBare (b )
}
func (i *InputStickerSetEmojiChannelDefaultStatuses ) EncodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't encode inputStickerSetEmojiChannelDefaultStatuses#49748553 as nil" )
}
return nil
}
func (i *InputStickerSetEmojiChannelDefaultStatuses ) Decode (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetEmojiChannelDefaultStatuses#49748553 to nil" )
}
if err := b .ConsumeID (InputStickerSetEmojiChannelDefaultStatusesTypeID ); err != nil {
return fmt .Errorf ("unable to decode inputStickerSetEmojiChannelDefaultStatuses#49748553: %w" , err )
}
return i .DecodeBare (b )
}
func (i *InputStickerSetEmojiChannelDefaultStatuses ) DecodeBare (b *bin .Buffer ) error {
if i == nil {
return fmt .Errorf ("can't decode inputStickerSetEmojiChannelDefaultStatuses#49748553 to nil" )
}
return nil
}
const InputStickerSetClassName = "InputStickerSet"
type InputStickerSetClass interface {
bin .Encoder
bin .Decoder
bin .BareEncoder
bin .BareDecoder
construct () InputStickerSetClass
TypeID () uint32
TypeName () string
String () string
Zero () bool
}
func DecodeInputStickerSet (buf *bin .Buffer ) (InputStickerSetClass , error ) {
id , err := buf .PeekID ()
if err != nil {
return nil , err
}
switch id {
case InputStickerSetEmptyTypeID :
v := InputStickerSetEmpty {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode InputStickerSetClass: %w" , err )
}
return &v , nil
case InputStickerSetIDTypeID :
v := InputStickerSetID {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode InputStickerSetClass: %w" , err )
}
return &v , nil
case InputStickerSetShortNameTypeID :
v := InputStickerSetShortName {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode InputStickerSetClass: %w" , err )
}
return &v , nil
case InputStickerSetAnimatedEmojiTypeID :
v := InputStickerSetAnimatedEmoji {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode InputStickerSetClass: %w" , err )
}
return &v , nil
case InputStickerSetDiceTypeID :
v := InputStickerSetDice {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode InputStickerSetClass: %w" , err )
}
return &v , nil
case InputStickerSetAnimatedEmojiAnimationsTypeID :
v := InputStickerSetAnimatedEmojiAnimations {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode InputStickerSetClass: %w" , err )
}
return &v , nil
case InputStickerSetPremiumGiftsTypeID :
v := InputStickerSetPremiumGifts {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode InputStickerSetClass: %w" , err )
}
return &v , nil
case InputStickerSetEmojiGenericAnimationsTypeID :
v := InputStickerSetEmojiGenericAnimations {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode InputStickerSetClass: %w" , err )
}
return &v , nil
case InputStickerSetEmojiDefaultStatusesTypeID :
v := InputStickerSetEmojiDefaultStatuses {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode InputStickerSetClass: %w" , err )
}
return &v , nil
case InputStickerSetEmojiDefaultTopicIconsTypeID :
v := InputStickerSetEmojiDefaultTopicIcons {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode InputStickerSetClass: %w" , err )
}
return &v , nil
case InputStickerSetEmojiChannelDefaultStatusesTypeID :
v := InputStickerSetEmojiChannelDefaultStatuses {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode InputStickerSetClass: %w" , err )
}
return &v , nil
default :
return nil , fmt .Errorf ("unable to decode InputStickerSetClass: %w" , bin .NewUnexpectedID (id ))
}
}
type InputStickerSetBox struct {
InputStickerSet InputStickerSetClass
}
func (b *InputStickerSetBox ) Decode (buf *bin .Buffer ) error {
if b == nil {
return fmt .Errorf ("unable to decode InputStickerSetBox to nil" )
}
v , err := DecodeInputStickerSet (buf )
if err != nil {
return fmt .Errorf ("unable to decode boxed value: %w" , err )
}
b .InputStickerSet = v
return nil
}
func (b *InputStickerSetBox ) Encode (buf *bin .Buffer ) error {
if b == nil || b .InputStickerSet == nil {
return fmt .Errorf ("unable to encode InputStickerSetClass as nil" )
}
return b .InputStickerSet .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 .