Source File
tl_payments_exported_invoice_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{})// PaymentsExportedInvoice represents TL type `payments.exportedInvoice#aed0cbd9`.// Exported invoice deep link¹//// Links:// 1. https://core.telegram.org/api/links#invoice-links//// See https://core.telegram.org/constructor/payments.exportedInvoice for reference.type PaymentsExportedInvoice struct {// Exported invoice deep link¹//// Links:// 1) https://core.telegram.org/api/links#invoice-linksURL string}// PaymentsExportedInvoiceTypeID is TL type id of PaymentsExportedInvoice.const PaymentsExportedInvoiceTypeID = 0xaed0cbd9// Ensuring interfaces in compile-time for PaymentsExportedInvoice.var (_ bin.Encoder = &PaymentsExportedInvoice{}_ bin.Decoder = &PaymentsExportedInvoice{}_ bin.BareEncoder = &PaymentsExportedInvoice{}_ bin.BareDecoder = &PaymentsExportedInvoice{})func ( *PaymentsExportedInvoice) () bool {if == nil {return true}if !(.URL == "") {return false}return true}// String implements fmt.Stringer.func ( *PaymentsExportedInvoice) () string {if == nil {return "PaymentsExportedInvoice(nil)"}type PaymentsExportedInvoicereturn fmt.Sprintf("PaymentsExportedInvoice%+v", (*))}// FillFrom fills PaymentsExportedInvoice from given interface.func ( *PaymentsExportedInvoice) ( interface {() ( string)}) {.URL = .()}// TypeID returns type id in TL schema.//// See https://core.telegram.org/mtproto/TL-tl#remarks.func (*PaymentsExportedInvoice) () uint32 {return PaymentsExportedInvoiceTypeID}// TypeName returns name of type in TL schema.func (*PaymentsExportedInvoice) () string {return "payments.exportedInvoice"}// TypeInfo returns info about TL type.func ( *PaymentsExportedInvoice) () tdp.Type {:= tdp.Type{Name: "payments.exportedInvoice",ID: PaymentsExportedInvoiceTypeID,}if == nil {.Null = truereturn}.Fields = []tdp.Field{{Name: "URL",SchemaName: "url",},}return}// Encode implements bin.Encoder.func ( *PaymentsExportedInvoice) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode payments.exportedInvoice#aed0cbd9 as nil")}.PutID(PaymentsExportedInvoiceTypeID)return .EncodeBare()}// EncodeBare implements bin.BareEncoder.func ( *PaymentsExportedInvoice) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't encode payments.exportedInvoice#aed0cbd9 as nil")}.PutString(.URL)return nil}// Decode implements bin.Decoder.func ( *PaymentsExportedInvoice) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode payments.exportedInvoice#aed0cbd9 to nil")}if := .ConsumeID(PaymentsExportedInvoiceTypeID); != nil {return fmt.Errorf("unable to decode payments.exportedInvoice#aed0cbd9: %w", )}return .DecodeBare()}// DecodeBare implements bin.BareDecoder.func ( *PaymentsExportedInvoice) ( *bin.Buffer) error {if == nil {return fmt.Errorf("can't decode payments.exportedInvoice#aed0cbd9 to nil")}{, := .String()if != nil {return fmt.Errorf("unable to decode payments.exportedInvoice#aed0cbd9: field url: %w", )}.URL =}return nil}// GetURL returns value of URL field.func ( *PaymentsExportedInvoice) () ( string) {if == nil {return}return .URL}
![]() |
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. |