package mt
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 MsgsStateInfo struct {
ReqMsgID int64
Info []byte
}
const MsgsStateInfoTypeID = 0x4deb57d
var (
_ bin .Encoder = &MsgsStateInfo {}
_ bin .Decoder = &MsgsStateInfo {}
_ bin .BareEncoder = &MsgsStateInfo {}
_ bin .BareDecoder = &MsgsStateInfo {}
)
func (m *MsgsStateInfo ) Zero () bool {
if m == nil {
return true
}
if !(m .ReqMsgID == 0 ) {
return false
}
if !(m .Info == nil ) {
return false
}
return true
}
func (m *MsgsStateInfo ) String () string {
if m == nil {
return "MsgsStateInfo(nil)"
}
type Alias MsgsStateInfo
return fmt .Sprintf ("MsgsStateInfo%+v" , Alias (*m ))
}
func (*MsgsStateInfo ) TypeID () uint32 {
return MsgsStateInfoTypeID
}
func (*MsgsStateInfo ) TypeName () string {
return "msgs_state_info"
}
func (m *MsgsStateInfo ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "msgs_state_info" ,
ID : MsgsStateInfoTypeID ,
}
if m == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "ReqMsgID" ,
SchemaName : "req_msg_id" ,
},
{
Name : "Info" ,
SchemaName : "info" ,
},
}
return typ
}
func (m *MsgsStateInfo ) Encode (b *bin .Buffer ) error {
if m == nil {
return fmt .Errorf ("can't encode msgs_state_info#4deb57d as nil" )
}
b .PutID (MsgsStateInfoTypeID )
return m .EncodeBare (b )
}
func (m *MsgsStateInfo ) EncodeBare (b *bin .Buffer ) error {
if m == nil {
return fmt .Errorf ("can't encode msgs_state_info#4deb57d as nil" )
}
b .PutLong (m .ReqMsgID )
b .PutBytes (m .Info )
return nil
}
func (m *MsgsStateInfo ) Decode (b *bin .Buffer ) error {
if m == nil {
return fmt .Errorf ("can't decode msgs_state_info#4deb57d to nil" )
}
if err := b .ConsumeID (MsgsStateInfoTypeID ); err != nil {
return fmt .Errorf ("unable to decode msgs_state_info#4deb57d: %w" , err )
}
return m .DecodeBare (b )
}
func (m *MsgsStateInfo ) DecodeBare (b *bin .Buffer ) error {
if m == nil {
return fmt .Errorf ("can't decode msgs_state_info#4deb57d to nil" )
}
{
value , err := b .Long ()
if err != nil {
return fmt .Errorf ("unable to decode msgs_state_info#4deb57d: field req_msg_id: %w" , err )
}
m .ReqMsgID = value
}
{
value , err := b .Bytes ()
if err != nil {
return fmt .Errorf ("unable to decode msgs_state_info#4deb57d: field info: %w" , err )
}
m .Info = value
}
return nil
}
func (m *MsgsStateInfo ) GetReqMsgID () (value int64 ) {
if m == nil {
return
}
return m .ReqMsgID
}
func (m *MsgsStateInfo ) GetInfo () (value []byte ) {
if m == nil {
return
}
return m .Info
}
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 .