Source File
tl_messages_get_suggested_dialog_filters_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{}
)
// MessagesGetSuggestedDialogFiltersRequest represents TL type `messages.getSuggestedDialogFilters#a29cd42c`.
// Get suggested foldersĀ¹
//
// Links:
// 1. https://core.telegram.org/api/folders
//
// See https://core.telegram.org/method/messages.getSuggestedDialogFilters for reference.
type MessagesGetSuggestedDialogFiltersRequest struct {
}
// MessagesGetSuggestedDialogFiltersRequestTypeID is TL type id of MessagesGetSuggestedDialogFiltersRequest.
const MessagesGetSuggestedDialogFiltersRequestTypeID = 0xa29cd42c
// Ensuring interfaces in compile-time for MessagesGetSuggestedDialogFiltersRequest.
var (
_ bin.Encoder = &MessagesGetSuggestedDialogFiltersRequest{}
_ bin.Decoder = &MessagesGetSuggestedDialogFiltersRequest{}
_ bin.BareEncoder = &MessagesGetSuggestedDialogFiltersRequest{}
_ bin.BareDecoder = &MessagesGetSuggestedDialogFiltersRequest{}
)
func ( *MessagesGetSuggestedDialogFiltersRequest) () bool {
if == nil {
return true
}
return true
}
// String implements fmt.Stringer.
func ( *MessagesGetSuggestedDialogFiltersRequest) () string {
if == nil {
return "MessagesGetSuggestedDialogFiltersRequest(nil)"
}
type MessagesGetSuggestedDialogFiltersRequest
return fmt.Sprintf("MessagesGetSuggestedDialogFiltersRequest%+v", (*))
}
// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*MessagesGetSuggestedDialogFiltersRequest) () uint32 {
return MessagesGetSuggestedDialogFiltersRequestTypeID
}
// TypeName returns name of type in TL schema.
func (*MessagesGetSuggestedDialogFiltersRequest) () string {
return "messages.getSuggestedDialogFilters"
}
// TypeInfo returns info about TL type.
func ( *MessagesGetSuggestedDialogFiltersRequest) () tdp.Type {
:= tdp.Type{
Name: "messages.getSuggestedDialogFilters",
ID: MessagesGetSuggestedDialogFiltersRequestTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{}
return
}
// Encode implements bin.Encoder.
func ( *MessagesGetSuggestedDialogFiltersRequest) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode messages.getSuggestedDialogFilters#a29cd42c as nil")
}
.PutID(MessagesGetSuggestedDialogFiltersRequestTypeID)
return .EncodeBare()
}
// EncodeBare implements bin.BareEncoder.
func ( *MessagesGetSuggestedDialogFiltersRequest) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode messages.getSuggestedDialogFilters#a29cd42c as nil")
}
return nil
}
// Decode implements bin.Decoder.
func ( *MessagesGetSuggestedDialogFiltersRequest) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode messages.getSuggestedDialogFilters#a29cd42c to nil")
}
if := .ConsumeID(MessagesGetSuggestedDialogFiltersRequestTypeID); != nil {
return fmt.Errorf("unable to decode messages.getSuggestedDialogFilters#a29cd42c: %w", )
}
return .DecodeBare()
}
// DecodeBare implements bin.BareDecoder.
func ( *MessagesGetSuggestedDialogFiltersRequest) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode messages.getSuggestedDialogFilters#a29cd42c to nil")
}
return nil
}
// MessagesGetSuggestedDialogFilters invokes method messages.getSuggestedDialogFilters#a29cd42c returning error if any.
// Get suggested foldersĀ¹
//
// Links:
// 1. https://core.telegram.org/api/folders
//
// See https://core.telegram.org/method/messages.getSuggestedDialogFilters for reference.
func ( *Client) ( context.Context) ([]DialogFilterSuggested, error) {
var DialogFilterSuggestedVector
:= &MessagesGetSuggestedDialogFiltersRequest{}
if := .rpc.Invoke(, , &); != nil {
return nil,
}
return []DialogFilterSuggested(.Elems), 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. |