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 ChatlistsGetExportedInvitesRequest struct {
Chatlist InputChatlistDialogFilter
}
const ChatlistsGetExportedInvitesRequestTypeID = 0xce03da83
var (
_ bin .Encoder = &ChatlistsGetExportedInvitesRequest {}
_ bin .Decoder = &ChatlistsGetExportedInvitesRequest {}
_ bin .BareEncoder = &ChatlistsGetExportedInvitesRequest {}
_ bin .BareDecoder = &ChatlistsGetExportedInvitesRequest {}
)
func (g *ChatlistsGetExportedInvitesRequest ) Zero () bool {
if g == nil {
return true
}
if !(g .Chatlist .Zero ()) {
return false
}
return true
}
func (g *ChatlistsGetExportedInvitesRequest ) String () string {
if g == nil {
return "ChatlistsGetExportedInvitesRequest(nil)"
}
type Alias ChatlistsGetExportedInvitesRequest
return fmt .Sprintf ("ChatlistsGetExportedInvitesRequest%+v" , Alias (*g ))
}
func (g *ChatlistsGetExportedInvitesRequest ) FillFrom (from interface {
GetChatlist () (value InputChatlistDialogFilter )
}) {
g .Chatlist = from .GetChatlist ()
}
func (*ChatlistsGetExportedInvitesRequest ) TypeID () uint32 {
return ChatlistsGetExportedInvitesRequestTypeID
}
func (*ChatlistsGetExportedInvitesRequest ) TypeName () string {
return "chatlists.getExportedInvites"
}
func (g *ChatlistsGetExportedInvitesRequest ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "chatlists.getExportedInvites" ,
ID : ChatlistsGetExportedInvitesRequestTypeID ,
}
if g == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Chatlist" ,
SchemaName : "chatlist" ,
},
}
return typ
}
func (g *ChatlistsGetExportedInvitesRequest ) Encode (b *bin .Buffer ) error {
if g == nil {
return fmt .Errorf ("can't encode chatlists.getExportedInvites#ce03da83 as nil" )
}
b .PutID (ChatlistsGetExportedInvitesRequestTypeID )
return g .EncodeBare (b )
}
func (g *ChatlistsGetExportedInvitesRequest ) EncodeBare (b *bin .Buffer ) error {
if g == nil {
return fmt .Errorf ("can't encode chatlists.getExportedInvites#ce03da83 as nil" )
}
if err := g .Chatlist .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode chatlists.getExportedInvites#ce03da83: field chatlist: %w" , err )
}
return nil
}
func (g *ChatlistsGetExportedInvitesRequest ) Decode (b *bin .Buffer ) error {
if g == nil {
return fmt .Errorf ("can't decode chatlists.getExportedInvites#ce03da83 to nil" )
}
if err := b .ConsumeID (ChatlistsGetExportedInvitesRequestTypeID ); err != nil {
return fmt .Errorf ("unable to decode chatlists.getExportedInvites#ce03da83: %w" , err )
}
return g .DecodeBare (b )
}
func (g *ChatlistsGetExportedInvitesRequest ) DecodeBare (b *bin .Buffer ) error {
if g == nil {
return fmt .Errorf ("can't decode chatlists.getExportedInvites#ce03da83 to nil" )
}
{
if err := g .Chatlist .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode chatlists.getExportedInvites#ce03da83: field chatlist: %w" , err )
}
}
return nil
}
func (g *ChatlistsGetExportedInvitesRequest ) GetChatlist () (value InputChatlistDialogFilter ) {
if g == nil {
return
}
return g .Chatlist
}
func (c *Client ) ChatlistsGetExportedInvites (ctx context .Context , chatlist InputChatlistDialogFilter ) (*ChatlistsExportedInvites , error ) {
var result ChatlistsExportedInvites
request := &ChatlistsGetExportedInvitesRequest {
Chatlist : chatlist ,
}
if err := c .rpc .Invoke (ctx , request , &result ); err != nil {
return nil , err
}
return &result , nil
}
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 .