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 SendMessageTypingAction struct {
}
const SendMessageTypingActionTypeID = 0x16bf744e
func (s SendMessageTypingAction ) construct () SendMessageActionClass { return &s }
var (
_ bin .Encoder = &SendMessageTypingAction {}
_ bin .Decoder = &SendMessageTypingAction {}
_ bin .BareEncoder = &SendMessageTypingAction {}
_ bin .BareDecoder = &SendMessageTypingAction {}
_ SendMessageActionClass = &SendMessageTypingAction {}
)
func (s *SendMessageTypingAction ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SendMessageTypingAction ) String () string {
if s == nil {
return "SendMessageTypingAction(nil)"
}
type Alias SendMessageTypingAction
return fmt .Sprintf ("SendMessageTypingAction%+v" , Alias (*s ))
}
func (*SendMessageTypingAction ) TypeID () uint32 {
return SendMessageTypingActionTypeID
}
func (*SendMessageTypingAction ) TypeName () string {
return "sendMessageTypingAction"
}
func (s *SendMessageTypingAction ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "sendMessageTypingAction" ,
ID : SendMessageTypingActionTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SendMessageTypingAction ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageTypingAction#16bf744e as nil" )
}
b .PutID (SendMessageTypingActionTypeID )
return s .EncodeBare (b )
}
func (s *SendMessageTypingAction ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageTypingAction#16bf744e as nil" )
}
return nil
}
func (s *SendMessageTypingAction ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageTypingAction#16bf744e to nil" )
}
if err := b .ConsumeID (SendMessageTypingActionTypeID ); err != nil {
return fmt .Errorf ("unable to decode sendMessageTypingAction#16bf744e: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SendMessageTypingAction ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageTypingAction#16bf744e to nil" )
}
return nil
}
type SendMessageCancelAction struct {
}
const SendMessageCancelActionTypeID = 0xfd5ec8f5
func (s SendMessageCancelAction ) construct () SendMessageActionClass { return &s }
var (
_ bin .Encoder = &SendMessageCancelAction {}
_ bin .Decoder = &SendMessageCancelAction {}
_ bin .BareEncoder = &SendMessageCancelAction {}
_ bin .BareDecoder = &SendMessageCancelAction {}
_ SendMessageActionClass = &SendMessageCancelAction {}
)
func (s *SendMessageCancelAction ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SendMessageCancelAction ) String () string {
if s == nil {
return "SendMessageCancelAction(nil)"
}
type Alias SendMessageCancelAction
return fmt .Sprintf ("SendMessageCancelAction%+v" , Alias (*s ))
}
func (*SendMessageCancelAction ) TypeID () uint32 {
return SendMessageCancelActionTypeID
}
func (*SendMessageCancelAction ) TypeName () string {
return "sendMessageCancelAction"
}
func (s *SendMessageCancelAction ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "sendMessageCancelAction" ,
ID : SendMessageCancelActionTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SendMessageCancelAction ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageCancelAction#fd5ec8f5 as nil" )
}
b .PutID (SendMessageCancelActionTypeID )
return s .EncodeBare (b )
}
func (s *SendMessageCancelAction ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageCancelAction#fd5ec8f5 as nil" )
}
return nil
}
func (s *SendMessageCancelAction ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageCancelAction#fd5ec8f5 to nil" )
}
if err := b .ConsumeID (SendMessageCancelActionTypeID ); err != nil {
return fmt .Errorf ("unable to decode sendMessageCancelAction#fd5ec8f5: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SendMessageCancelAction ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageCancelAction#fd5ec8f5 to nil" )
}
return nil
}
type SendMessageRecordVideoAction struct {
}
const SendMessageRecordVideoActionTypeID = 0xa187d66f
func (s SendMessageRecordVideoAction ) construct () SendMessageActionClass { return &s }
var (
_ bin .Encoder = &SendMessageRecordVideoAction {}
_ bin .Decoder = &SendMessageRecordVideoAction {}
_ bin .BareEncoder = &SendMessageRecordVideoAction {}
_ bin .BareDecoder = &SendMessageRecordVideoAction {}
_ SendMessageActionClass = &SendMessageRecordVideoAction {}
)
func (s *SendMessageRecordVideoAction ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SendMessageRecordVideoAction ) String () string {
if s == nil {
return "SendMessageRecordVideoAction(nil)"
}
type Alias SendMessageRecordVideoAction
return fmt .Sprintf ("SendMessageRecordVideoAction%+v" , Alias (*s ))
}
func (*SendMessageRecordVideoAction ) TypeID () uint32 {
return SendMessageRecordVideoActionTypeID
}
func (*SendMessageRecordVideoAction ) TypeName () string {
return "sendMessageRecordVideoAction"
}
func (s *SendMessageRecordVideoAction ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "sendMessageRecordVideoAction" ,
ID : SendMessageRecordVideoActionTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SendMessageRecordVideoAction ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageRecordVideoAction#a187d66f as nil" )
}
b .PutID (SendMessageRecordVideoActionTypeID )
return s .EncodeBare (b )
}
func (s *SendMessageRecordVideoAction ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageRecordVideoAction#a187d66f as nil" )
}
return nil
}
func (s *SendMessageRecordVideoAction ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageRecordVideoAction#a187d66f to nil" )
}
if err := b .ConsumeID (SendMessageRecordVideoActionTypeID ); err != nil {
return fmt .Errorf ("unable to decode sendMessageRecordVideoAction#a187d66f: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SendMessageRecordVideoAction ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageRecordVideoAction#a187d66f to nil" )
}
return nil
}
type SendMessageUploadVideoAction struct {
Progress int
}
const SendMessageUploadVideoActionTypeID = 0xe9763aec
func (s SendMessageUploadVideoAction ) construct () SendMessageActionClass { return &s }
var (
_ bin .Encoder = &SendMessageUploadVideoAction {}
_ bin .Decoder = &SendMessageUploadVideoAction {}
_ bin .BareEncoder = &SendMessageUploadVideoAction {}
_ bin .BareDecoder = &SendMessageUploadVideoAction {}
_ SendMessageActionClass = &SendMessageUploadVideoAction {}
)
func (s *SendMessageUploadVideoAction ) Zero () bool {
if s == nil {
return true
}
if !(s .Progress == 0 ) {
return false
}
return true
}
func (s *SendMessageUploadVideoAction ) String () string {
if s == nil {
return "SendMessageUploadVideoAction(nil)"
}
type Alias SendMessageUploadVideoAction
return fmt .Sprintf ("SendMessageUploadVideoAction%+v" , Alias (*s ))
}
func (s *SendMessageUploadVideoAction ) FillFrom (from interface {
GetProgress () (value int )
}) {
s .Progress = from .GetProgress ()
}
func (*SendMessageUploadVideoAction ) TypeID () uint32 {
return SendMessageUploadVideoActionTypeID
}
func (*SendMessageUploadVideoAction ) TypeName () string {
return "sendMessageUploadVideoAction"
}
func (s *SendMessageUploadVideoAction ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "sendMessageUploadVideoAction" ,
ID : SendMessageUploadVideoActionTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Progress" ,
SchemaName : "progress" ,
},
}
return typ
}
func (s *SendMessageUploadVideoAction ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageUploadVideoAction#e9763aec as nil" )
}
b .PutID (SendMessageUploadVideoActionTypeID )
return s .EncodeBare (b )
}
func (s *SendMessageUploadVideoAction ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageUploadVideoAction#e9763aec as nil" )
}
b .PutInt (s .Progress )
return nil
}
func (s *SendMessageUploadVideoAction ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageUploadVideoAction#e9763aec to nil" )
}
if err := b .ConsumeID (SendMessageUploadVideoActionTypeID ); err != nil {
return fmt .Errorf ("unable to decode sendMessageUploadVideoAction#e9763aec: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SendMessageUploadVideoAction ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageUploadVideoAction#e9763aec to nil" )
}
{
value , err := b .Int ()
if err != nil {
return fmt .Errorf ("unable to decode sendMessageUploadVideoAction#e9763aec: field progress: %w" , err )
}
s .Progress = value
}
return nil
}
func (s *SendMessageUploadVideoAction ) GetProgress () (value int ) {
if s == nil {
return
}
return s .Progress
}
type SendMessageRecordAudioAction struct {
}
const SendMessageRecordAudioActionTypeID = 0xd52f73f7
func (s SendMessageRecordAudioAction ) construct () SendMessageActionClass { return &s }
var (
_ bin .Encoder = &SendMessageRecordAudioAction {}
_ bin .Decoder = &SendMessageRecordAudioAction {}
_ bin .BareEncoder = &SendMessageRecordAudioAction {}
_ bin .BareDecoder = &SendMessageRecordAudioAction {}
_ SendMessageActionClass = &SendMessageRecordAudioAction {}
)
func (s *SendMessageRecordAudioAction ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SendMessageRecordAudioAction ) String () string {
if s == nil {
return "SendMessageRecordAudioAction(nil)"
}
type Alias SendMessageRecordAudioAction
return fmt .Sprintf ("SendMessageRecordAudioAction%+v" , Alias (*s ))
}
func (*SendMessageRecordAudioAction ) TypeID () uint32 {
return SendMessageRecordAudioActionTypeID
}
func (*SendMessageRecordAudioAction ) TypeName () string {
return "sendMessageRecordAudioAction"
}
func (s *SendMessageRecordAudioAction ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "sendMessageRecordAudioAction" ,
ID : SendMessageRecordAudioActionTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SendMessageRecordAudioAction ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageRecordAudioAction#d52f73f7 as nil" )
}
b .PutID (SendMessageRecordAudioActionTypeID )
return s .EncodeBare (b )
}
func (s *SendMessageRecordAudioAction ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageRecordAudioAction#d52f73f7 as nil" )
}
return nil
}
func (s *SendMessageRecordAudioAction ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageRecordAudioAction#d52f73f7 to nil" )
}
if err := b .ConsumeID (SendMessageRecordAudioActionTypeID ); err != nil {
return fmt .Errorf ("unable to decode sendMessageRecordAudioAction#d52f73f7: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SendMessageRecordAudioAction ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageRecordAudioAction#d52f73f7 to nil" )
}
return nil
}
type SendMessageUploadAudioAction struct {
Progress int
}
const SendMessageUploadAudioActionTypeID = 0xf351d7ab
func (s SendMessageUploadAudioAction ) construct () SendMessageActionClass { return &s }
var (
_ bin .Encoder = &SendMessageUploadAudioAction {}
_ bin .Decoder = &SendMessageUploadAudioAction {}
_ bin .BareEncoder = &SendMessageUploadAudioAction {}
_ bin .BareDecoder = &SendMessageUploadAudioAction {}
_ SendMessageActionClass = &SendMessageUploadAudioAction {}
)
func (s *SendMessageUploadAudioAction ) Zero () bool {
if s == nil {
return true
}
if !(s .Progress == 0 ) {
return false
}
return true
}
func (s *SendMessageUploadAudioAction ) String () string {
if s == nil {
return "SendMessageUploadAudioAction(nil)"
}
type Alias SendMessageUploadAudioAction
return fmt .Sprintf ("SendMessageUploadAudioAction%+v" , Alias (*s ))
}
func (s *SendMessageUploadAudioAction ) FillFrom (from interface {
GetProgress () (value int )
}) {
s .Progress = from .GetProgress ()
}
func (*SendMessageUploadAudioAction ) TypeID () uint32 {
return SendMessageUploadAudioActionTypeID
}
func (*SendMessageUploadAudioAction ) TypeName () string {
return "sendMessageUploadAudioAction"
}
func (s *SendMessageUploadAudioAction ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "sendMessageUploadAudioAction" ,
ID : SendMessageUploadAudioActionTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Progress" ,
SchemaName : "progress" ,
},
}
return typ
}
func (s *SendMessageUploadAudioAction ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageUploadAudioAction#f351d7ab as nil" )
}
b .PutID (SendMessageUploadAudioActionTypeID )
return s .EncodeBare (b )
}
func (s *SendMessageUploadAudioAction ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageUploadAudioAction#f351d7ab as nil" )
}
b .PutInt (s .Progress )
return nil
}
func (s *SendMessageUploadAudioAction ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageUploadAudioAction#f351d7ab to nil" )
}
if err := b .ConsumeID (SendMessageUploadAudioActionTypeID ); err != nil {
return fmt .Errorf ("unable to decode sendMessageUploadAudioAction#f351d7ab: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SendMessageUploadAudioAction ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageUploadAudioAction#f351d7ab to nil" )
}
{
value , err := b .Int ()
if err != nil {
return fmt .Errorf ("unable to decode sendMessageUploadAudioAction#f351d7ab: field progress: %w" , err )
}
s .Progress = value
}
return nil
}
func (s *SendMessageUploadAudioAction ) GetProgress () (value int ) {
if s == nil {
return
}
return s .Progress
}
type SendMessageUploadPhotoAction struct {
Progress int
}
const SendMessageUploadPhotoActionTypeID = 0xd1d34a26
func (s SendMessageUploadPhotoAction ) construct () SendMessageActionClass { return &s }
var (
_ bin .Encoder = &SendMessageUploadPhotoAction {}
_ bin .Decoder = &SendMessageUploadPhotoAction {}
_ bin .BareEncoder = &SendMessageUploadPhotoAction {}
_ bin .BareDecoder = &SendMessageUploadPhotoAction {}
_ SendMessageActionClass = &SendMessageUploadPhotoAction {}
)
func (s *SendMessageUploadPhotoAction ) Zero () bool {
if s == nil {
return true
}
if !(s .Progress == 0 ) {
return false
}
return true
}
func (s *SendMessageUploadPhotoAction ) String () string {
if s == nil {
return "SendMessageUploadPhotoAction(nil)"
}
type Alias SendMessageUploadPhotoAction
return fmt .Sprintf ("SendMessageUploadPhotoAction%+v" , Alias (*s ))
}
func (s *SendMessageUploadPhotoAction ) FillFrom (from interface {
GetProgress () (value int )
}) {
s .Progress = from .GetProgress ()
}
func (*SendMessageUploadPhotoAction ) TypeID () uint32 {
return SendMessageUploadPhotoActionTypeID
}
func (*SendMessageUploadPhotoAction ) TypeName () string {
return "sendMessageUploadPhotoAction"
}
func (s *SendMessageUploadPhotoAction ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "sendMessageUploadPhotoAction" ,
ID : SendMessageUploadPhotoActionTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Progress" ,
SchemaName : "progress" ,
},
}
return typ
}
func (s *SendMessageUploadPhotoAction ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageUploadPhotoAction#d1d34a26 as nil" )
}
b .PutID (SendMessageUploadPhotoActionTypeID )
return s .EncodeBare (b )
}
func (s *SendMessageUploadPhotoAction ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageUploadPhotoAction#d1d34a26 as nil" )
}
b .PutInt (s .Progress )
return nil
}
func (s *SendMessageUploadPhotoAction ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageUploadPhotoAction#d1d34a26 to nil" )
}
if err := b .ConsumeID (SendMessageUploadPhotoActionTypeID ); err != nil {
return fmt .Errorf ("unable to decode sendMessageUploadPhotoAction#d1d34a26: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SendMessageUploadPhotoAction ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageUploadPhotoAction#d1d34a26 to nil" )
}
{
value , err := b .Int ()
if err != nil {
return fmt .Errorf ("unable to decode sendMessageUploadPhotoAction#d1d34a26: field progress: %w" , err )
}
s .Progress = value
}
return nil
}
func (s *SendMessageUploadPhotoAction ) GetProgress () (value int ) {
if s == nil {
return
}
return s .Progress
}
type SendMessageUploadDocumentAction struct {
Progress int
}
const SendMessageUploadDocumentActionTypeID = 0xaa0cd9e4
func (s SendMessageUploadDocumentAction ) construct () SendMessageActionClass { return &s }
var (
_ bin .Encoder = &SendMessageUploadDocumentAction {}
_ bin .Decoder = &SendMessageUploadDocumentAction {}
_ bin .BareEncoder = &SendMessageUploadDocumentAction {}
_ bin .BareDecoder = &SendMessageUploadDocumentAction {}
_ SendMessageActionClass = &SendMessageUploadDocumentAction {}
)
func (s *SendMessageUploadDocumentAction ) Zero () bool {
if s == nil {
return true
}
if !(s .Progress == 0 ) {
return false
}
return true
}
func (s *SendMessageUploadDocumentAction ) String () string {
if s == nil {
return "SendMessageUploadDocumentAction(nil)"
}
type Alias SendMessageUploadDocumentAction
return fmt .Sprintf ("SendMessageUploadDocumentAction%+v" , Alias (*s ))
}
func (s *SendMessageUploadDocumentAction ) FillFrom (from interface {
GetProgress () (value int )
}) {
s .Progress = from .GetProgress ()
}
func (*SendMessageUploadDocumentAction ) TypeID () uint32 {
return SendMessageUploadDocumentActionTypeID
}
func (*SendMessageUploadDocumentAction ) TypeName () string {
return "sendMessageUploadDocumentAction"
}
func (s *SendMessageUploadDocumentAction ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "sendMessageUploadDocumentAction" ,
ID : SendMessageUploadDocumentActionTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Progress" ,
SchemaName : "progress" ,
},
}
return typ
}
func (s *SendMessageUploadDocumentAction ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageUploadDocumentAction#aa0cd9e4 as nil" )
}
b .PutID (SendMessageUploadDocumentActionTypeID )
return s .EncodeBare (b )
}
func (s *SendMessageUploadDocumentAction ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageUploadDocumentAction#aa0cd9e4 as nil" )
}
b .PutInt (s .Progress )
return nil
}
func (s *SendMessageUploadDocumentAction ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageUploadDocumentAction#aa0cd9e4 to nil" )
}
if err := b .ConsumeID (SendMessageUploadDocumentActionTypeID ); err != nil {
return fmt .Errorf ("unable to decode sendMessageUploadDocumentAction#aa0cd9e4: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SendMessageUploadDocumentAction ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageUploadDocumentAction#aa0cd9e4 to nil" )
}
{
value , err := b .Int ()
if err != nil {
return fmt .Errorf ("unable to decode sendMessageUploadDocumentAction#aa0cd9e4: field progress: %w" , err )
}
s .Progress = value
}
return nil
}
func (s *SendMessageUploadDocumentAction ) GetProgress () (value int ) {
if s == nil {
return
}
return s .Progress
}
type SendMessageGeoLocationAction struct {
}
const SendMessageGeoLocationActionTypeID = 0x176f8ba1
func (s SendMessageGeoLocationAction ) construct () SendMessageActionClass { return &s }
var (
_ bin .Encoder = &SendMessageGeoLocationAction {}
_ bin .Decoder = &SendMessageGeoLocationAction {}
_ bin .BareEncoder = &SendMessageGeoLocationAction {}
_ bin .BareDecoder = &SendMessageGeoLocationAction {}
_ SendMessageActionClass = &SendMessageGeoLocationAction {}
)
func (s *SendMessageGeoLocationAction ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SendMessageGeoLocationAction ) String () string {
if s == nil {
return "SendMessageGeoLocationAction(nil)"
}
type Alias SendMessageGeoLocationAction
return fmt .Sprintf ("SendMessageGeoLocationAction%+v" , Alias (*s ))
}
func (*SendMessageGeoLocationAction ) TypeID () uint32 {
return SendMessageGeoLocationActionTypeID
}
func (*SendMessageGeoLocationAction ) TypeName () string {
return "sendMessageGeoLocationAction"
}
func (s *SendMessageGeoLocationAction ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "sendMessageGeoLocationAction" ,
ID : SendMessageGeoLocationActionTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SendMessageGeoLocationAction ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageGeoLocationAction#176f8ba1 as nil" )
}
b .PutID (SendMessageGeoLocationActionTypeID )
return s .EncodeBare (b )
}
func (s *SendMessageGeoLocationAction ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageGeoLocationAction#176f8ba1 as nil" )
}
return nil
}
func (s *SendMessageGeoLocationAction ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageGeoLocationAction#176f8ba1 to nil" )
}
if err := b .ConsumeID (SendMessageGeoLocationActionTypeID ); err != nil {
return fmt .Errorf ("unable to decode sendMessageGeoLocationAction#176f8ba1: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SendMessageGeoLocationAction ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageGeoLocationAction#176f8ba1 to nil" )
}
return nil
}
type SendMessageChooseContactAction struct {
}
const SendMessageChooseContactActionTypeID = 0x628cbc6f
func (s SendMessageChooseContactAction ) construct () SendMessageActionClass { return &s }
var (
_ bin .Encoder = &SendMessageChooseContactAction {}
_ bin .Decoder = &SendMessageChooseContactAction {}
_ bin .BareEncoder = &SendMessageChooseContactAction {}
_ bin .BareDecoder = &SendMessageChooseContactAction {}
_ SendMessageActionClass = &SendMessageChooseContactAction {}
)
func (s *SendMessageChooseContactAction ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SendMessageChooseContactAction ) String () string {
if s == nil {
return "SendMessageChooseContactAction(nil)"
}
type Alias SendMessageChooseContactAction
return fmt .Sprintf ("SendMessageChooseContactAction%+v" , Alias (*s ))
}
func (*SendMessageChooseContactAction ) TypeID () uint32 {
return SendMessageChooseContactActionTypeID
}
func (*SendMessageChooseContactAction ) TypeName () string {
return "sendMessageChooseContactAction"
}
func (s *SendMessageChooseContactAction ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "sendMessageChooseContactAction" ,
ID : SendMessageChooseContactActionTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SendMessageChooseContactAction ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageChooseContactAction#628cbc6f as nil" )
}
b .PutID (SendMessageChooseContactActionTypeID )
return s .EncodeBare (b )
}
func (s *SendMessageChooseContactAction ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageChooseContactAction#628cbc6f as nil" )
}
return nil
}
func (s *SendMessageChooseContactAction ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageChooseContactAction#628cbc6f to nil" )
}
if err := b .ConsumeID (SendMessageChooseContactActionTypeID ); err != nil {
return fmt .Errorf ("unable to decode sendMessageChooseContactAction#628cbc6f: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SendMessageChooseContactAction ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageChooseContactAction#628cbc6f to nil" )
}
return nil
}
type SendMessageGamePlayAction struct {
}
const SendMessageGamePlayActionTypeID = 0xdd6a8f48
func (s SendMessageGamePlayAction ) construct () SendMessageActionClass { return &s }
var (
_ bin .Encoder = &SendMessageGamePlayAction {}
_ bin .Decoder = &SendMessageGamePlayAction {}
_ bin .BareEncoder = &SendMessageGamePlayAction {}
_ bin .BareDecoder = &SendMessageGamePlayAction {}
_ SendMessageActionClass = &SendMessageGamePlayAction {}
)
func (s *SendMessageGamePlayAction ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SendMessageGamePlayAction ) String () string {
if s == nil {
return "SendMessageGamePlayAction(nil)"
}
type Alias SendMessageGamePlayAction
return fmt .Sprintf ("SendMessageGamePlayAction%+v" , Alias (*s ))
}
func (*SendMessageGamePlayAction ) TypeID () uint32 {
return SendMessageGamePlayActionTypeID
}
func (*SendMessageGamePlayAction ) TypeName () string {
return "sendMessageGamePlayAction"
}
func (s *SendMessageGamePlayAction ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "sendMessageGamePlayAction" ,
ID : SendMessageGamePlayActionTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SendMessageGamePlayAction ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageGamePlayAction#dd6a8f48 as nil" )
}
b .PutID (SendMessageGamePlayActionTypeID )
return s .EncodeBare (b )
}
func (s *SendMessageGamePlayAction ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageGamePlayAction#dd6a8f48 as nil" )
}
return nil
}
func (s *SendMessageGamePlayAction ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageGamePlayAction#dd6a8f48 to nil" )
}
if err := b .ConsumeID (SendMessageGamePlayActionTypeID ); err != nil {
return fmt .Errorf ("unable to decode sendMessageGamePlayAction#dd6a8f48: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SendMessageGamePlayAction ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageGamePlayAction#dd6a8f48 to nil" )
}
return nil
}
type SendMessageRecordRoundAction struct {
}
const SendMessageRecordRoundActionTypeID = 0x88f27fbc
func (s SendMessageRecordRoundAction ) construct () SendMessageActionClass { return &s }
var (
_ bin .Encoder = &SendMessageRecordRoundAction {}
_ bin .Decoder = &SendMessageRecordRoundAction {}
_ bin .BareEncoder = &SendMessageRecordRoundAction {}
_ bin .BareDecoder = &SendMessageRecordRoundAction {}
_ SendMessageActionClass = &SendMessageRecordRoundAction {}
)
func (s *SendMessageRecordRoundAction ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SendMessageRecordRoundAction ) String () string {
if s == nil {
return "SendMessageRecordRoundAction(nil)"
}
type Alias SendMessageRecordRoundAction
return fmt .Sprintf ("SendMessageRecordRoundAction%+v" , Alias (*s ))
}
func (*SendMessageRecordRoundAction ) TypeID () uint32 {
return SendMessageRecordRoundActionTypeID
}
func (*SendMessageRecordRoundAction ) TypeName () string {
return "sendMessageRecordRoundAction"
}
func (s *SendMessageRecordRoundAction ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "sendMessageRecordRoundAction" ,
ID : SendMessageRecordRoundActionTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SendMessageRecordRoundAction ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageRecordRoundAction#88f27fbc as nil" )
}
b .PutID (SendMessageRecordRoundActionTypeID )
return s .EncodeBare (b )
}
func (s *SendMessageRecordRoundAction ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageRecordRoundAction#88f27fbc as nil" )
}
return nil
}
func (s *SendMessageRecordRoundAction ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageRecordRoundAction#88f27fbc to nil" )
}
if err := b .ConsumeID (SendMessageRecordRoundActionTypeID ); err != nil {
return fmt .Errorf ("unable to decode sendMessageRecordRoundAction#88f27fbc: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SendMessageRecordRoundAction ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageRecordRoundAction#88f27fbc to nil" )
}
return nil
}
type SendMessageUploadRoundAction struct {
Progress int
}
const SendMessageUploadRoundActionTypeID = 0x243e1c66
func (s SendMessageUploadRoundAction ) construct () SendMessageActionClass { return &s }
var (
_ bin .Encoder = &SendMessageUploadRoundAction {}
_ bin .Decoder = &SendMessageUploadRoundAction {}
_ bin .BareEncoder = &SendMessageUploadRoundAction {}
_ bin .BareDecoder = &SendMessageUploadRoundAction {}
_ SendMessageActionClass = &SendMessageUploadRoundAction {}
)
func (s *SendMessageUploadRoundAction ) Zero () bool {
if s == nil {
return true
}
if !(s .Progress == 0 ) {
return false
}
return true
}
func (s *SendMessageUploadRoundAction ) String () string {
if s == nil {
return "SendMessageUploadRoundAction(nil)"
}
type Alias SendMessageUploadRoundAction
return fmt .Sprintf ("SendMessageUploadRoundAction%+v" , Alias (*s ))
}
func (s *SendMessageUploadRoundAction ) FillFrom (from interface {
GetProgress () (value int )
}) {
s .Progress = from .GetProgress ()
}
func (*SendMessageUploadRoundAction ) TypeID () uint32 {
return SendMessageUploadRoundActionTypeID
}
func (*SendMessageUploadRoundAction ) TypeName () string {
return "sendMessageUploadRoundAction"
}
func (s *SendMessageUploadRoundAction ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "sendMessageUploadRoundAction" ,
ID : SendMessageUploadRoundActionTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Progress" ,
SchemaName : "progress" ,
},
}
return typ
}
func (s *SendMessageUploadRoundAction ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageUploadRoundAction#243e1c66 as nil" )
}
b .PutID (SendMessageUploadRoundActionTypeID )
return s .EncodeBare (b )
}
func (s *SendMessageUploadRoundAction ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageUploadRoundAction#243e1c66 as nil" )
}
b .PutInt (s .Progress )
return nil
}
func (s *SendMessageUploadRoundAction ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageUploadRoundAction#243e1c66 to nil" )
}
if err := b .ConsumeID (SendMessageUploadRoundActionTypeID ); err != nil {
return fmt .Errorf ("unable to decode sendMessageUploadRoundAction#243e1c66: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SendMessageUploadRoundAction ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageUploadRoundAction#243e1c66 to nil" )
}
{
value , err := b .Int ()
if err != nil {
return fmt .Errorf ("unable to decode sendMessageUploadRoundAction#243e1c66: field progress: %w" , err )
}
s .Progress = value
}
return nil
}
func (s *SendMessageUploadRoundAction ) GetProgress () (value int ) {
if s == nil {
return
}
return s .Progress
}
type SpeakingInGroupCallAction struct {
}
const SpeakingInGroupCallActionTypeID = 0xd92c2285
func (s SpeakingInGroupCallAction ) construct () SendMessageActionClass { return &s }
var (
_ bin .Encoder = &SpeakingInGroupCallAction {}
_ bin .Decoder = &SpeakingInGroupCallAction {}
_ bin .BareEncoder = &SpeakingInGroupCallAction {}
_ bin .BareDecoder = &SpeakingInGroupCallAction {}
_ SendMessageActionClass = &SpeakingInGroupCallAction {}
)
func (s *SpeakingInGroupCallAction ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SpeakingInGroupCallAction ) String () string {
if s == nil {
return "SpeakingInGroupCallAction(nil)"
}
type Alias SpeakingInGroupCallAction
return fmt .Sprintf ("SpeakingInGroupCallAction%+v" , Alias (*s ))
}
func (*SpeakingInGroupCallAction ) TypeID () uint32 {
return SpeakingInGroupCallActionTypeID
}
func (*SpeakingInGroupCallAction ) TypeName () string {
return "speakingInGroupCallAction"
}
func (s *SpeakingInGroupCallAction ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "speakingInGroupCallAction" ,
ID : SpeakingInGroupCallActionTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SpeakingInGroupCallAction ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode speakingInGroupCallAction#d92c2285 as nil" )
}
b .PutID (SpeakingInGroupCallActionTypeID )
return s .EncodeBare (b )
}
func (s *SpeakingInGroupCallAction ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode speakingInGroupCallAction#d92c2285 as nil" )
}
return nil
}
func (s *SpeakingInGroupCallAction ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode speakingInGroupCallAction#d92c2285 to nil" )
}
if err := b .ConsumeID (SpeakingInGroupCallActionTypeID ); err != nil {
return fmt .Errorf ("unable to decode speakingInGroupCallAction#d92c2285: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SpeakingInGroupCallAction ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode speakingInGroupCallAction#d92c2285 to nil" )
}
return nil
}
type SendMessageHistoryImportAction struct {
Progress int
}
const SendMessageHistoryImportActionTypeID = 0xdbda9246
func (s SendMessageHistoryImportAction ) construct () SendMessageActionClass { return &s }
var (
_ bin .Encoder = &SendMessageHistoryImportAction {}
_ bin .Decoder = &SendMessageHistoryImportAction {}
_ bin .BareEncoder = &SendMessageHistoryImportAction {}
_ bin .BareDecoder = &SendMessageHistoryImportAction {}
_ SendMessageActionClass = &SendMessageHistoryImportAction {}
)
func (s *SendMessageHistoryImportAction ) Zero () bool {
if s == nil {
return true
}
if !(s .Progress == 0 ) {
return false
}
return true
}
func (s *SendMessageHistoryImportAction ) String () string {
if s == nil {
return "SendMessageHistoryImportAction(nil)"
}
type Alias SendMessageHistoryImportAction
return fmt .Sprintf ("SendMessageHistoryImportAction%+v" , Alias (*s ))
}
func (s *SendMessageHistoryImportAction ) FillFrom (from interface {
GetProgress () (value int )
}) {
s .Progress = from .GetProgress ()
}
func (*SendMessageHistoryImportAction ) TypeID () uint32 {
return SendMessageHistoryImportActionTypeID
}
func (*SendMessageHistoryImportAction ) TypeName () string {
return "sendMessageHistoryImportAction"
}
func (s *SendMessageHistoryImportAction ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "sendMessageHistoryImportAction" ,
ID : SendMessageHistoryImportActionTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Progress" ,
SchemaName : "progress" ,
},
}
return typ
}
func (s *SendMessageHistoryImportAction ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageHistoryImportAction#dbda9246 as nil" )
}
b .PutID (SendMessageHistoryImportActionTypeID )
return s .EncodeBare (b )
}
func (s *SendMessageHistoryImportAction ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageHistoryImportAction#dbda9246 as nil" )
}
b .PutInt (s .Progress )
return nil
}
func (s *SendMessageHistoryImportAction ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageHistoryImportAction#dbda9246 to nil" )
}
if err := b .ConsumeID (SendMessageHistoryImportActionTypeID ); err != nil {
return fmt .Errorf ("unable to decode sendMessageHistoryImportAction#dbda9246: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SendMessageHistoryImportAction ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageHistoryImportAction#dbda9246 to nil" )
}
{
value , err := b .Int ()
if err != nil {
return fmt .Errorf ("unable to decode sendMessageHistoryImportAction#dbda9246: field progress: %w" , err )
}
s .Progress = value
}
return nil
}
func (s *SendMessageHistoryImportAction ) GetProgress () (value int ) {
if s == nil {
return
}
return s .Progress
}
type SendMessageChooseStickerAction struct {
}
const SendMessageChooseStickerActionTypeID = 0xb05ac6b1
func (s SendMessageChooseStickerAction ) construct () SendMessageActionClass { return &s }
var (
_ bin .Encoder = &SendMessageChooseStickerAction {}
_ bin .Decoder = &SendMessageChooseStickerAction {}
_ bin .BareEncoder = &SendMessageChooseStickerAction {}
_ bin .BareDecoder = &SendMessageChooseStickerAction {}
_ SendMessageActionClass = &SendMessageChooseStickerAction {}
)
func (s *SendMessageChooseStickerAction ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SendMessageChooseStickerAction ) String () string {
if s == nil {
return "SendMessageChooseStickerAction(nil)"
}
type Alias SendMessageChooseStickerAction
return fmt .Sprintf ("SendMessageChooseStickerAction%+v" , Alias (*s ))
}
func (*SendMessageChooseStickerAction ) TypeID () uint32 {
return SendMessageChooseStickerActionTypeID
}
func (*SendMessageChooseStickerAction ) TypeName () string {
return "sendMessageChooseStickerAction"
}
func (s *SendMessageChooseStickerAction ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "sendMessageChooseStickerAction" ,
ID : SendMessageChooseStickerActionTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SendMessageChooseStickerAction ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageChooseStickerAction#b05ac6b1 as nil" )
}
b .PutID (SendMessageChooseStickerActionTypeID )
return s .EncodeBare (b )
}
func (s *SendMessageChooseStickerAction ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageChooseStickerAction#b05ac6b1 as nil" )
}
return nil
}
func (s *SendMessageChooseStickerAction ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageChooseStickerAction#b05ac6b1 to nil" )
}
if err := b .ConsumeID (SendMessageChooseStickerActionTypeID ); err != nil {
return fmt .Errorf ("unable to decode sendMessageChooseStickerAction#b05ac6b1: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SendMessageChooseStickerAction ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageChooseStickerAction#b05ac6b1 to nil" )
}
return nil
}
type SendMessageEmojiInteraction struct {
Emoticon string
MsgID int
Interaction DataJSON
}
const SendMessageEmojiInteractionTypeID = 0x25972bcb
func (s SendMessageEmojiInteraction ) construct () SendMessageActionClass { return &s }
var (
_ bin .Encoder = &SendMessageEmojiInteraction {}
_ bin .Decoder = &SendMessageEmojiInteraction {}
_ bin .BareEncoder = &SendMessageEmojiInteraction {}
_ bin .BareDecoder = &SendMessageEmojiInteraction {}
_ SendMessageActionClass = &SendMessageEmojiInteraction {}
)
func (s *SendMessageEmojiInteraction ) Zero () bool {
if s == nil {
return true
}
if !(s .Emoticon == "" ) {
return false
}
if !(s .MsgID == 0 ) {
return false
}
if !(s .Interaction .Zero ()) {
return false
}
return true
}
func (s *SendMessageEmojiInteraction ) String () string {
if s == nil {
return "SendMessageEmojiInteraction(nil)"
}
type Alias SendMessageEmojiInteraction
return fmt .Sprintf ("SendMessageEmojiInteraction%+v" , Alias (*s ))
}
func (s *SendMessageEmojiInteraction ) FillFrom (from interface {
GetEmoticon () (value string )
GetMsgID () (value int )
GetInteraction () (value DataJSON )
}) {
s .Emoticon = from .GetEmoticon ()
s .MsgID = from .GetMsgID ()
s .Interaction = from .GetInteraction ()
}
func (*SendMessageEmojiInteraction ) TypeID () uint32 {
return SendMessageEmojiInteractionTypeID
}
func (*SendMessageEmojiInteraction ) TypeName () string {
return "sendMessageEmojiInteraction"
}
func (s *SendMessageEmojiInteraction ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "sendMessageEmojiInteraction" ,
ID : SendMessageEmojiInteractionTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Emoticon" ,
SchemaName : "emoticon" ,
},
{
Name : "MsgID" ,
SchemaName : "msg_id" ,
},
{
Name : "Interaction" ,
SchemaName : "interaction" ,
},
}
return typ
}
func (s *SendMessageEmojiInteraction ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageEmojiInteraction#25972bcb as nil" )
}
b .PutID (SendMessageEmojiInteractionTypeID )
return s .EncodeBare (b )
}
func (s *SendMessageEmojiInteraction ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageEmojiInteraction#25972bcb as nil" )
}
b .PutString (s .Emoticon )
b .PutInt (s .MsgID )
if err := s .Interaction .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode sendMessageEmojiInteraction#25972bcb: field interaction: %w" , err )
}
return nil
}
func (s *SendMessageEmojiInteraction ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageEmojiInteraction#25972bcb to nil" )
}
if err := b .ConsumeID (SendMessageEmojiInteractionTypeID ); err != nil {
return fmt .Errorf ("unable to decode sendMessageEmojiInteraction#25972bcb: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SendMessageEmojiInteraction ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageEmojiInteraction#25972bcb to nil" )
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode sendMessageEmojiInteraction#25972bcb: field emoticon: %w" , err )
}
s .Emoticon = value
}
{
value , err := b .Int ()
if err != nil {
return fmt .Errorf ("unable to decode sendMessageEmojiInteraction#25972bcb: field msg_id: %w" , err )
}
s .MsgID = value
}
{
if err := s .Interaction .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode sendMessageEmojiInteraction#25972bcb: field interaction: %w" , err )
}
}
return nil
}
func (s *SendMessageEmojiInteraction ) GetEmoticon () (value string ) {
if s == nil {
return
}
return s .Emoticon
}
func (s *SendMessageEmojiInteraction ) GetMsgID () (value int ) {
if s == nil {
return
}
return s .MsgID
}
func (s *SendMessageEmojiInteraction ) GetInteraction () (value DataJSON ) {
if s == nil {
return
}
return s .Interaction
}
type SendMessageEmojiInteractionSeen struct {
Emoticon string
}
const SendMessageEmojiInteractionSeenTypeID = 0xb665902e
func (s SendMessageEmojiInteractionSeen ) construct () SendMessageActionClass { return &s }
var (
_ bin .Encoder = &SendMessageEmojiInteractionSeen {}
_ bin .Decoder = &SendMessageEmojiInteractionSeen {}
_ bin .BareEncoder = &SendMessageEmojiInteractionSeen {}
_ bin .BareDecoder = &SendMessageEmojiInteractionSeen {}
_ SendMessageActionClass = &SendMessageEmojiInteractionSeen {}
)
func (s *SendMessageEmojiInteractionSeen ) Zero () bool {
if s == nil {
return true
}
if !(s .Emoticon == "" ) {
return false
}
return true
}
func (s *SendMessageEmojiInteractionSeen ) String () string {
if s == nil {
return "SendMessageEmojiInteractionSeen(nil)"
}
type Alias SendMessageEmojiInteractionSeen
return fmt .Sprintf ("SendMessageEmojiInteractionSeen%+v" , Alias (*s ))
}
func (s *SendMessageEmojiInteractionSeen ) FillFrom (from interface {
GetEmoticon () (value string )
}) {
s .Emoticon = from .GetEmoticon ()
}
func (*SendMessageEmojiInteractionSeen ) TypeID () uint32 {
return SendMessageEmojiInteractionSeenTypeID
}
func (*SendMessageEmojiInteractionSeen ) TypeName () string {
return "sendMessageEmojiInteractionSeen"
}
func (s *SendMessageEmojiInteractionSeen ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "sendMessageEmojiInteractionSeen" ,
ID : SendMessageEmojiInteractionSeenTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Emoticon" ,
SchemaName : "emoticon" ,
},
}
return typ
}
func (s *SendMessageEmojiInteractionSeen ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageEmojiInteractionSeen#b665902e as nil" )
}
b .PutID (SendMessageEmojiInteractionSeenTypeID )
return s .EncodeBare (b )
}
func (s *SendMessageEmojiInteractionSeen ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode sendMessageEmojiInteractionSeen#b665902e as nil" )
}
b .PutString (s .Emoticon )
return nil
}
func (s *SendMessageEmojiInteractionSeen ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageEmojiInteractionSeen#b665902e to nil" )
}
if err := b .ConsumeID (SendMessageEmojiInteractionSeenTypeID ); err != nil {
return fmt .Errorf ("unable to decode sendMessageEmojiInteractionSeen#b665902e: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SendMessageEmojiInteractionSeen ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode sendMessageEmojiInteractionSeen#b665902e to nil" )
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode sendMessageEmojiInteractionSeen#b665902e: field emoticon: %w" , err )
}
s .Emoticon = value
}
return nil
}
func (s *SendMessageEmojiInteractionSeen ) GetEmoticon () (value string ) {
if s == nil {
return
}
return s .Emoticon
}
const SendMessageActionClassName = "SendMessageAction"
type SendMessageActionClass interface {
bin .Encoder
bin .Decoder
bin .BareEncoder
bin .BareDecoder
construct () SendMessageActionClass
TypeID () uint32
TypeName () string
String () string
Zero () bool
}
func DecodeSendMessageAction (buf *bin .Buffer ) (SendMessageActionClass , error ) {
id , err := buf .PeekID ()
if err != nil {
return nil , err
}
switch id {
case SendMessageTypingActionTypeID :
v := SendMessageTypingAction {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SendMessageActionClass: %w" , err )
}
return &v , nil
case SendMessageCancelActionTypeID :
v := SendMessageCancelAction {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SendMessageActionClass: %w" , err )
}
return &v , nil
case SendMessageRecordVideoActionTypeID :
v := SendMessageRecordVideoAction {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SendMessageActionClass: %w" , err )
}
return &v , nil
case SendMessageUploadVideoActionTypeID :
v := SendMessageUploadVideoAction {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SendMessageActionClass: %w" , err )
}
return &v , nil
case SendMessageRecordAudioActionTypeID :
v := SendMessageRecordAudioAction {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SendMessageActionClass: %w" , err )
}
return &v , nil
case SendMessageUploadAudioActionTypeID :
v := SendMessageUploadAudioAction {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SendMessageActionClass: %w" , err )
}
return &v , nil
case SendMessageUploadPhotoActionTypeID :
v := SendMessageUploadPhotoAction {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SendMessageActionClass: %w" , err )
}
return &v , nil
case SendMessageUploadDocumentActionTypeID :
v := SendMessageUploadDocumentAction {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SendMessageActionClass: %w" , err )
}
return &v , nil
case SendMessageGeoLocationActionTypeID :
v := SendMessageGeoLocationAction {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SendMessageActionClass: %w" , err )
}
return &v , nil
case SendMessageChooseContactActionTypeID :
v := SendMessageChooseContactAction {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SendMessageActionClass: %w" , err )
}
return &v , nil
case SendMessageGamePlayActionTypeID :
v := SendMessageGamePlayAction {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SendMessageActionClass: %w" , err )
}
return &v , nil
case SendMessageRecordRoundActionTypeID :
v := SendMessageRecordRoundAction {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SendMessageActionClass: %w" , err )
}
return &v , nil
case SendMessageUploadRoundActionTypeID :
v := SendMessageUploadRoundAction {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SendMessageActionClass: %w" , err )
}
return &v , nil
case SpeakingInGroupCallActionTypeID :
v := SpeakingInGroupCallAction {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SendMessageActionClass: %w" , err )
}
return &v , nil
case SendMessageHistoryImportActionTypeID :
v := SendMessageHistoryImportAction {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SendMessageActionClass: %w" , err )
}
return &v , nil
case SendMessageChooseStickerActionTypeID :
v := SendMessageChooseStickerAction {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SendMessageActionClass: %w" , err )
}
return &v , nil
case SendMessageEmojiInteractionTypeID :
v := SendMessageEmojiInteraction {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SendMessageActionClass: %w" , err )
}
return &v , nil
case SendMessageEmojiInteractionSeenTypeID :
v := SendMessageEmojiInteractionSeen {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SendMessageActionClass: %w" , err )
}
return &v , nil
default :
return nil , fmt .Errorf ("unable to decode SendMessageActionClass: %w" , bin .NewUnexpectedID (id ))
}
}
type SendMessageActionBox struct {
SendMessageAction SendMessageActionClass
}
func (b *SendMessageActionBox ) Decode (buf *bin .Buffer ) error {
if b == nil {
return fmt .Errorf ("unable to decode SendMessageActionBox to nil" )
}
v , err := DecodeSendMessageAction (buf )
if err != nil {
return fmt .Errorf ("unable to decode boxed value: %w" , err )
}
b .SendMessageAction = v
return nil
}
func (b *SendMessageActionBox ) Encode (buf *bin .Buffer ) error {
if b == nil || b .SendMessageAction == nil {
return fmt .Errorf ("unable to encode SendMessageActionClass as nil" )
}
return b .SendMessageAction .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 .