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 PhoneGetGroupCallStreamChannelsRequest struct {
Call InputGroupCall
}
const PhoneGetGroupCallStreamChannelsRequestTypeID = 0x1ab21940
var (
_ bin .Encoder = &PhoneGetGroupCallStreamChannelsRequest {}
_ bin .Decoder = &PhoneGetGroupCallStreamChannelsRequest {}
_ bin .BareEncoder = &PhoneGetGroupCallStreamChannelsRequest {}
_ bin .BareDecoder = &PhoneGetGroupCallStreamChannelsRequest {}
)
func (g *PhoneGetGroupCallStreamChannelsRequest ) Zero () bool {
if g == nil {
return true
}
if !(g .Call .Zero ()) {
return false
}
return true
}
func (g *PhoneGetGroupCallStreamChannelsRequest ) String () string {
if g == nil {
return "PhoneGetGroupCallStreamChannelsRequest(nil)"
}
type Alias PhoneGetGroupCallStreamChannelsRequest
return fmt .Sprintf ("PhoneGetGroupCallStreamChannelsRequest%+v" , Alias (*g ))
}
func (g *PhoneGetGroupCallStreamChannelsRequest ) FillFrom (from interface {
GetCall () (value InputGroupCall )
}) {
g .Call = from .GetCall ()
}
func (*PhoneGetGroupCallStreamChannelsRequest ) TypeID () uint32 {
return PhoneGetGroupCallStreamChannelsRequestTypeID
}
func (*PhoneGetGroupCallStreamChannelsRequest ) TypeName () string {
return "phone.getGroupCallStreamChannels"
}
func (g *PhoneGetGroupCallStreamChannelsRequest ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "phone.getGroupCallStreamChannels" ,
ID : PhoneGetGroupCallStreamChannelsRequestTypeID ,
}
if g == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Call" ,
SchemaName : "call" ,
},
}
return typ
}
func (g *PhoneGetGroupCallStreamChannelsRequest ) Encode (b *bin .Buffer ) error {
if g == nil {
return fmt .Errorf ("can't encode phone.getGroupCallStreamChannels#1ab21940 as nil" )
}
b .PutID (PhoneGetGroupCallStreamChannelsRequestTypeID )
return g .EncodeBare (b )
}
func (g *PhoneGetGroupCallStreamChannelsRequest ) EncodeBare (b *bin .Buffer ) error {
if g == nil {
return fmt .Errorf ("can't encode phone.getGroupCallStreamChannels#1ab21940 as nil" )
}
if err := g .Call .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode phone.getGroupCallStreamChannels#1ab21940: field call: %w" , err )
}
return nil
}
func (g *PhoneGetGroupCallStreamChannelsRequest ) Decode (b *bin .Buffer ) error {
if g == nil {
return fmt .Errorf ("can't decode phone.getGroupCallStreamChannels#1ab21940 to nil" )
}
if err := b .ConsumeID (PhoneGetGroupCallStreamChannelsRequestTypeID ); err != nil {
return fmt .Errorf ("unable to decode phone.getGroupCallStreamChannels#1ab21940: %w" , err )
}
return g .DecodeBare (b )
}
func (g *PhoneGetGroupCallStreamChannelsRequest ) DecodeBare (b *bin .Buffer ) error {
if g == nil {
return fmt .Errorf ("can't decode phone.getGroupCallStreamChannels#1ab21940 to nil" )
}
{
if err := g .Call .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode phone.getGroupCallStreamChannels#1ab21940: field call: %w" , err )
}
}
return nil
}
func (g *PhoneGetGroupCallStreamChannelsRequest ) GetCall () (value InputGroupCall ) {
if g == nil {
return
}
return g .Call
}
func (c *Client ) PhoneGetGroupCallStreamChannels (ctx context .Context , call InputGroupCall ) (*PhoneGroupCallStreamChannels , error ) {
var result PhoneGroupCallStreamChannels
request := &PhoneGetGroupCallStreamChannelsRequest {
Call : call ,
}
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 .