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