Source File
tl_account_get_auto_download_settings_gen.go
Belonging Package
github.com/gotd/td/tg
// Code generated by gotdgen, DO NOT EDIT.
package tg
import (
)
// No-op definition for keeping imports.
var (
_ = bin.Buffer{}
_ = context.Background()
_ = fmt.Stringer(nil)
_ = strings.Builder{}
_ = errors.Is
_ = multierr.AppendInto
_ = sort.Ints
_ = tdp.Format
_ = tgerr.Error{}
_ = tdjson.Encoder{}
)
// AccountGetAutoDownloadSettingsRequest represents TL type `account.getAutoDownloadSettings#56da0b3f`.
// Get media autodownload settings
//
// See https://core.telegram.org/method/account.getAutoDownloadSettings for reference.
type AccountGetAutoDownloadSettingsRequest struct {
}
// AccountGetAutoDownloadSettingsRequestTypeID is TL type id of AccountGetAutoDownloadSettingsRequest.
const AccountGetAutoDownloadSettingsRequestTypeID = 0x56da0b3f
// Ensuring interfaces in compile-time for AccountGetAutoDownloadSettingsRequest.
var (
_ bin.Encoder = &AccountGetAutoDownloadSettingsRequest{}
_ bin.Decoder = &AccountGetAutoDownloadSettingsRequest{}
_ bin.BareEncoder = &AccountGetAutoDownloadSettingsRequest{}
_ bin.BareDecoder = &AccountGetAutoDownloadSettingsRequest{}
)
func ( *AccountGetAutoDownloadSettingsRequest) () bool {
if == nil {
return true
}
return true
}
// String implements fmt.Stringer.
func ( *AccountGetAutoDownloadSettingsRequest) () string {
if == nil {
return "AccountGetAutoDownloadSettingsRequest(nil)"
}
type AccountGetAutoDownloadSettingsRequest
return fmt.Sprintf("AccountGetAutoDownloadSettingsRequest%+v", (*))
}
// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*AccountGetAutoDownloadSettingsRequest) () uint32 {
return AccountGetAutoDownloadSettingsRequestTypeID
}
// TypeName returns name of type in TL schema.
func (*AccountGetAutoDownloadSettingsRequest) () string {
return "account.getAutoDownloadSettings"
}
// TypeInfo returns info about TL type.
func ( *AccountGetAutoDownloadSettingsRequest) () tdp.Type {
:= tdp.Type{
Name: "account.getAutoDownloadSettings",
ID: AccountGetAutoDownloadSettingsRequestTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{}
return
}
// Encode implements bin.Encoder.
func ( *AccountGetAutoDownloadSettingsRequest) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode account.getAutoDownloadSettings#56da0b3f as nil")
}
.PutID(AccountGetAutoDownloadSettingsRequestTypeID)
return .EncodeBare()
}
// EncodeBare implements bin.BareEncoder.
func ( *AccountGetAutoDownloadSettingsRequest) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode account.getAutoDownloadSettings#56da0b3f as nil")
}
return nil
}
// Decode implements bin.Decoder.
func ( *AccountGetAutoDownloadSettingsRequest) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode account.getAutoDownloadSettings#56da0b3f to nil")
}
if := .ConsumeID(AccountGetAutoDownloadSettingsRequestTypeID); != nil {
return fmt.Errorf("unable to decode account.getAutoDownloadSettings#56da0b3f: %w", )
}
return .DecodeBare()
}
// DecodeBare implements bin.BareDecoder.
func ( *AccountGetAutoDownloadSettingsRequest) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode account.getAutoDownloadSettings#56da0b3f to nil")
}
return nil
}
// AccountGetAutoDownloadSettings invokes method account.getAutoDownloadSettings#56da0b3f returning error if any.
// Get media autodownload settings
//
// See https://core.telegram.org/method/account.getAutoDownloadSettings for reference.
func ( *Client) ( context.Context) (*AccountAutoDownloadSettings, error) {
var AccountAutoDownloadSettings
:= &AccountGetAutoDownloadSettingsRequest{}
if := .rpc.Invoke(, , &); != nil {
return nil,
}
return &, 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. |