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 PhoneGetGroupCallStarsRequest struct {
Call InputGroupCallClass
}
const PhoneGetGroupCallStarsRequestTypeID = 0x6f636302
var (
_ bin .Encoder = &PhoneGetGroupCallStarsRequest {}
_ bin .Decoder = &PhoneGetGroupCallStarsRequest {}
_ bin .BareEncoder = &PhoneGetGroupCallStarsRequest {}
_ bin .BareDecoder = &PhoneGetGroupCallStarsRequest {}
)
func (g *PhoneGetGroupCallStarsRequest ) Zero () bool {
if g == nil {
return true
}
if !(g .Call == nil ) {
return false
}
return true
}
func (g *PhoneGetGroupCallStarsRequest ) String () string {
if g == nil {
return "PhoneGetGroupCallStarsRequest(nil)"
}
type Alias PhoneGetGroupCallStarsRequest
return fmt .Sprintf ("PhoneGetGroupCallStarsRequest%+v" , Alias (*g ))
}
func (g *PhoneGetGroupCallStarsRequest ) FillFrom (from interface {
GetCall () (value InputGroupCallClass )
}) {
g .Call = from .GetCall ()
}
func (*PhoneGetGroupCallStarsRequest ) TypeID () uint32 {
return PhoneGetGroupCallStarsRequestTypeID
}
func (*PhoneGetGroupCallStarsRequest ) TypeName () string {
return "phone.getGroupCallStars"
}
func (g *PhoneGetGroupCallStarsRequest ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "phone.getGroupCallStars" ,
ID : PhoneGetGroupCallStarsRequestTypeID ,
}
if g == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Call" ,
SchemaName : "call" ,
},
}
return typ
}
func (g *PhoneGetGroupCallStarsRequest ) Encode (b *bin .Buffer ) error {
if g == nil {
return fmt .Errorf ("can't encode phone.getGroupCallStars#6f636302 as nil" )
}
b .PutID (PhoneGetGroupCallStarsRequestTypeID )
return g .EncodeBare (b )
}
func (g *PhoneGetGroupCallStarsRequest ) EncodeBare (b *bin .Buffer ) error {
if g == nil {
return fmt .Errorf ("can't encode phone.getGroupCallStars#6f636302 as nil" )
}
if g .Call == nil {
return fmt .Errorf ("unable to encode phone.getGroupCallStars#6f636302: field call is nil" )
}
if err := g .Call .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode phone.getGroupCallStars#6f636302: field call: %w" , err )
}
return nil
}
func (g *PhoneGetGroupCallStarsRequest ) Decode (b *bin .Buffer ) error {
if g == nil {
return fmt .Errorf ("can't decode phone.getGroupCallStars#6f636302 to nil" )
}
if err := b .ConsumeID (PhoneGetGroupCallStarsRequestTypeID ); err != nil {
return fmt .Errorf ("unable to decode phone.getGroupCallStars#6f636302: %w" , err )
}
return g .DecodeBare (b )
}
func (g *PhoneGetGroupCallStarsRequest ) DecodeBare (b *bin .Buffer ) error {
if g == nil {
return fmt .Errorf ("can't decode phone.getGroupCallStars#6f636302 to nil" )
}
{
value , err := DecodeInputGroupCall (b )
if err != nil {
return fmt .Errorf ("unable to decode phone.getGroupCallStars#6f636302: field call: %w" , err )
}
g .Call = value
}
return nil
}
func (g *PhoneGetGroupCallStarsRequest ) GetCall () (value InputGroupCallClass ) {
if g == nil {
return
}
return g .Call
}
func (c *Client ) PhoneGetGroupCallStars (ctx context .Context , call InputGroupCallClass ) (*PhoneGroupCallStars , error ) {
var result PhoneGroupCallStars
request := &PhoneGetGroupCallStarsRequest {
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.8.4 . (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 @zigo_101 (reachable from the left QR code) to get the latest news of Golds .