Source File
tl_bots_requested_button_gen.go
Belonging Package
github.com/gotd/td/tg
// Code generated by gotdgen, DO NOT EDIT.package tgimport ()// 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{})// BotsRequestedButton represents TL type `bots.requestedButton#f13bbcd7`.//// See https://core.telegram.org/constructor/bots.requestedButton for reference.type BotsRequestedButton struct {// WebappReqID field of BotsRequestedButton.WebappReqID string}// BotsRequestedButtonTypeID is TL type id of BotsRequestedButton.const BotsRequestedButtonTypeID = 0xf13bbcd7// Ensuring interfaces in compile-time for BotsRequestedButton.var (_ bin.Encoder = &BotsRequestedButton{}_ bin.Decoder = &BotsRequestedButton{}_ bin.BareEncoder = &BotsRequestedButton{}_ bin.BareDecoder = &BotsRequestedButton{})func ( *BotsRequestedButton) () bool {if == nil {return true}if !(.WebappReqID == "") {return false}return true}// String implements fmt.Stringer.func ( *BotsRequestedButton) () string {if == nil {return "BotsRequestedButton(nil)"}type BotsRequestedButtonreturn fmt.Sprintf("BotsRequestedButton%+v", (*))}// FillFrom fills BotsRequestedButton from given interface.func ( *BotsRequestedButton) ( interface {() ( string)}) {.WebappReqID = .()}// TypeID returns type id in TL schema.//// See https://core.telegram.org/mtproto/TL-tl#remarks.func (*BotsRequestedButton) () uint32 {return BotsRequestedButtonTypeID}// TypeName returns name of type in TL schema.func (*BotsRequestedButton) () string {return "bots.requestedButton"}// TypeInfo returns info about TL type.func ( *BotsRequestedButton) () tdp.Type {:= tdp.Type{Name: "bots.requestedButton",ID: BotsRequestedButtonTypeID,}if == nil {.Null = truereturn}.Fields = []tdp.Field{{Name: "WebappReqID",SchemaName: "webapp_req_id",},}return}// Encode implements bin.Encoder.func ( *BotsRequestedButton) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode bots.requestedButton#f13bbcd7 as nil")}.PutID(BotsRequestedButtonTypeID)return .EncodeBare()}// EncodeBare implements bin.BareEncoder.func ( *BotsRequestedButton) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode bots.requestedButton#f13bbcd7 as nil")}.PutString(.WebappReqID)return nil}// Decode implements bin.Decoder.func ( *BotsRequestedButton) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode bots.requestedButton#f13bbcd7 to nil")}if := .ConsumeID(BotsRequestedButtonTypeID); != nil {return fmt.Errorf("unable to decode bots.requestedButton#f13bbcd7: %w", )}return .DecodeBare()}// DecodeBare implements bin.BareDecoder.func ( *BotsRequestedButton) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode bots.requestedButton#f13bbcd7 to nil")}{, := .String()if != nil {return fmt.Errorf("unable to decode bots.requestedButton#f13bbcd7: field webapp_req_id: %w", )}.WebappReqID =}return nil}// GetWebappReqID returns value of WebappReqID field.func ( *BotsRequestedButton) () ( string) {if == nil {return}return .WebappReqID}
![]() |
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. |