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 SMSJobsJoinRequest struct {
}
const SMSJobsJoinRequestTypeID = 0xa74ece2d
var (
_ bin .Encoder = &SMSJobsJoinRequest {}
_ bin .Decoder = &SMSJobsJoinRequest {}
_ bin .BareEncoder = &SMSJobsJoinRequest {}
_ bin .BareDecoder = &SMSJobsJoinRequest {}
)
func (j *SMSJobsJoinRequest ) Zero () bool {
if j == nil {
return true
}
return true
}
func (j *SMSJobsJoinRequest ) String () string {
if j == nil {
return "SMSJobsJoinRequest(nil)"
}
type Alias SMSJobsJoinRequest
return fmt .Sprintf ("SMSJobsJoinRequest%+v" , Alias (*j ))
}
func (*SMSJobsJoinRequest ) TypeID () uint32 {
return SMSJobsJoinRequestTypeID
}
func (*SMSJobsJoinRequest ) TypeName () string {
return "smsjobs.join"
}
func (j *SMSJobsJoinRequest ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "smsjobs.join" ,
ID : SMSJobsJoinRequestTypeID ,
}
if j == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (j *SMSJobsJoinRequest ) Encode (b *bin .Buffer ) error {
if j == nil {
return fmt .Errorf ("can't encode smsjobs.join#a74ece2d as nil" )
}
b .PutID (SMSJobsJoinRequestTypeID )
return j .EncodeBare (b )
}
func (j *SMSJobsJoinRequest ) EncodeBare (b *bin .Buffer ) error {
if j == nil {
return fmt .Errorf ("can't encode smsjobs.join#a74ece2d as nil" )
}
return nil
}
func (j *SMSJobsJoinRequest ) Decode (b *bin .Buffer ) error {
if j == nil {
return fmt .Errorf ("can't decode smsjobs.join#a74ece2d to nil" )
}
if err := b .ConsumeID (SMSJobsJoinRequestTypeID ); err != nil {
return fmt .Errorf ("unable to decode smsjobs.join#a74ece2d: %w" , err )
}
return j .DecodeBare (b )
}
func (j *SMSJobsJoinRequest ) DecodeBare (b *bin .Buffer ) error {
if j == nil {
return fmt .Errorf ("can't decode smsjobs.join#a74ece2d to nil" )
}
return nil
}
func (c *Client ) SMSJobsJoin (ctx context .Context ) (bool , error ) {
var result BoolBox
request := &SMSJobsJoinRequest {}
if err := c .rpc .Invoke (ctx , request , &result ); err != nil {
return false , err
}
_ , ok := result .Bool .(*BoolTrue )
return ok , 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 .