oas

package
v0.0.0-...-aa11ac5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package oas contains generated openapi entities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

Types

type AddStickerToSet

type AddStickerToSet struct {
	// User identifier of sticker set owner.
	UserID int64 `json:"user_id"`
	// Sticker set name.
	Name    string       `json:"name"`
	Sticker InputSticker `json:"sticker"`
}

Input for addStickerToSet. Ref: #/components/schemas/addStickerToSet

func (*AddStickerToSet) Decode

func (s *AddStickerToSet) Decode(d *jx.Decoder) error

Decode decodes AddStickerToSet from json.

func (*AddStickerToSet) Encode

func (s *AddStickerToSet) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*AddStickerToSet) GetName

func (s *AddStickerToSet) GetName() string

GetName returns the value of Name.

func (*AddStickerToSet) GetSticker

func (s *AddStickerToSet) GetSticker() InputSticker

GetSticker returns the value of Sticker.

func (*AddStickerToSet) GetUserID

func (s *AddStickerToSet) GetUserID() int64

GetUserID returns the value of UserID.

func (*AddStickerToSet) MarshalJSON

func (s *AddStickerToSet) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*AddStickerToSet) SetName

func (s *AddStickerToSet) SetName(val string)

SetName sets the value of Name.

func (*AddStickerToSet) SetSticker

func (s *AddStickerToSet) SetSticker(val InputSticker)

SetSticker sets the value of Sticker.

func (*AddStickerToSet) SetUserID

func (s *AddStickerToSet) SetUserID(val int64)

SetUserID sets the value of UserID.

func (*AddStickerToSet) UnmarshalJSON

func (s *AddStickerToSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*AddStickerToSet) Validate

func (s *AddStickerToSet) Validate() error

type Animation

type Animation struct {
	// Identifier for this file, which can be used to download or reuse the file.
	FileID string `json:"file_id"`
	// Unique identifier for this file, which is supposed to be the same over time and for different bots.
	//  Can't be used to download or reuse the file.
	FileUniqueID string `json:"file_unique_id"`
	// Video width as defined by sender.
	Width int `json:"width"`
	// Video height as defined by sender.
	Height int `json:"height"`
	// Duration of the video in seconds as defined by sender.
	Duration  int          `json:"duration"`
	Thumbnail OptPhotoSize `json:"thumbnail"`
	// _Optional_. Original animation filename as defined by sender.
	FileName OptString `json:"file_name"`
	// _Optional_. MIME type of the file as defined by sender.
	MimeType OptString `json:"mime_type"`
	// _Optional_. File size in bytes. It can be bigger than 2^31 and some programming languages may have
	// difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed
	// 64-bit integer or double-precision float type are safe for storing this value.
	FileSize OptInt `json:"file_size"`
}

This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound). Ref: #/components/schemas/Animation

func (*Animation) Decode

func (s *Animation) Decode(d *jx.Decoder) error

Decode decodes Animation from json.

func (*Animation) Encode

func (s *Animation) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Animation) GetDuration

func (s *Animation) GetDuration() int

GetDuration returns the value of Duration.

func (*Animation) GetFileID

func (s *Animation) GetFileID() string

GetFileID returns the value of FileID.

func (*Animation) GetFileName

func (s *Animation) GetFileName() OptString

GetFileName returns the value of FileName.

func (*Animation) GetFileSize

func (s *Animation) GetFileSize() OptInt

GetFileSize returns the value of FileSize.

func (*Animation) GetFileUniqueID

func (s *Animation) GetFileUniqueID() string

GetFileUniqueID returns the value of FileUniqueID.

func (*Animation) GetHeight

func (s *Animation) GetHeight() int

GetHeight returns the value of Height.

func (*Animation) GetMimeType

func (s *Animation) GetMimeType() OptString

GetMimeType returns the value of MimeType.

func (*Animation) GetThumbnail

func (s *Animation) GetThumbnail() OptPhotoSize

GetThumbnail returns the value of Thumbnail.

func (*Animation) GetWidth

func (s *Animation) GetWidth() int

GetWidth returns the value of Width.

func (*Animation) MarshalJSON

func (s *Animation) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Animation) SetDuration

func (s *Animation) SetDuration(val int)

SetDuration sets the value of Duration.

func (*Animation) SetFileID

func (s *Animation) SetFileID(val string)

SetFileID sets the value of FileID.

func (*Animation) SetFileName

func (s *Animation) SetFileName(val OptString)

SetFileName sets the value of FileName.

func (*Animation) SetFileSize

func (s *Animation) SetFileSize(val OptInt)

SetFileSize sets the value of FileSize.

func (*Animation) SetFileUniqueID

func (s *Animation) SetFileUniqueID(val string)

SetFileUniqueID sets the value of FileUniqueID.

func (*Animation) SetHeight

func (s *Animation) SetHeight(val int)

SetHeight sets the value of Height.

func (*Animation) SetMimeType

func (s *Animation) SetMimeType(val OptString)

SetMimeType sets the value of MimeType.

func (*Animation) SetThumbnail

func (s *Animation) SetThumbnail(val OptPhotoSize)

SetThumbnail sets the value of Thumbnail.

func (*Animation) SetWidth

func (s *Animation) SetWidth(val int)

SetWidth sets the value of Width.

func (*Animation) UnmarshalJSON

func (s *Animation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Animation) Validate

func (s *Animation) Validate() error

type AnswerCallbackQuery

type AnswerCallbackQuery struct {
	// Unique identifier for the query to be answered.
	CallbackQueryID string `json:"callback_query_id"`
	// Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters.
	Text OptString `json:"text"`
	// If _True_, an alert will be shown by the client instead of a notification at the top of the chat
	// screen. Defaults to _false_.
	ShowAlert OptBool `json:"show_alert"`
	// URL that will be opened by the user's client. If you have created a [Game](https://core.telegram.
	// org/bots/api#game) and accepted the conditions via [@BotFather](https://t.me/botfather), specify
	// the URL that opens your game - note that this will only work if the query comes from a
	// [_callback_game_](https://core.telegram.org/bots/api#inlinekeyboardbutton) button.Otherwise, you
	// may use links like `t.me/your_bot?start=XXXX` that open your bot with a parameter.
	URL OptString `json:"url"`
	// The maximum amount of time in seconds that the result of the callback query may be cached
	// client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.
	CacheTime OptInt `json:"cache_time"`
}

Input for answerCallbackQuery. Ref: #/components/schemas/answerCallbackQuery

func (*AnswerCallbackQuery) Decode

func (s *AnswerCallbackQuery) Decode(d *jx.Decoder) error

Decode decodes AnswerCallbackQuery from json.

func (*AnswerCallbackQuery) Encode

func (s *AnswerCallbackQuery) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*AnswerCallbackQuery) GetCacheTime

func (s *AnswerCallbackQuery) GetCacheTime() OptInt

GetCacheTime returns the value of CacheTime.

func (*AnswerCallbackQuery) GetCallbackQueryID

func (s *AnswerCallbackQuery) GetCallbackQueryID() string

GetCallbackQueryID returns the value of CallbackQueryID.

func (*AnswerCallbackQuery) GetShowAlert

func (s *AnswerCallbackQuery) GetShowAlert() OptBool

GetShowAlert returns the value of ShowAlert.

func (*AnswerCallbackQuery) GetText

func (s *AnswerCallbackQuery) GetText() OptString

GetText returns the value of Text.

func (*AnswerCallbackQuery) GetURL

func (s *AnswerCallbackQuery) GetURL() OptString

GetURL returns the value of URL.

func (*AnswerCallbackQuery) MarshalJSON

func (s *AnswerCallbackQuery) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*AnswerCallbackQuery) SetCacheTime

func (s *AnswerCallbackQuery) SetCacheTime(val OptInt)

SetCacheTime sets the value of CacheTime.

func (*AnswerCallbackQuery) SetCallbackQueryID

func (s *AnswerCallbackQuery) SetCallbackQueryID(val string)

SetCallbackQueryID sets the value of CallbackQueryID.

func (*AnswerCallbackQuery) SetShowAlert

func (s *AnswerCallbackQuery) SetShowAlert(val OptBool)

SetShowAlert sets the value of ShowAlert.

func (*AnswerCallbackQuery) SetText

func (s *AnswerCallbackQuery) SetText(val OptString)

SetText sets the value of Text.

func (*AnswerCallbackQuery) SetURL

func (s *AnswerCallbackQuery) SetURL(val OptString)

SetURL sets the value of URL.

func (*AnswerCallbackQuery) UnmarshalJSON

func (s *AnswerCallbackQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*AnswerCallbackQuery) Validate

func (s *AnswerCallbackQuery) Validate() error

type AnswerInlineQuery

type AnswerInlineQuery struct {
	// Unique identifier for the answered query.
	InlineQueryID string `json:"inline_query_id"`
	// A JSON-serialized array of results for the inline query.
	Results []InlineQueryResult `json:"results"`
	// The maximum amount of time in seconds that the result of the inline query may be cached on the
	// server. Defaults to 300.
	CacheTime OptInt `json:"cache_time"`
	// Pass _True_ if results may be cached on the server side only for the user that sent the query. By
	// default, results may be returned to any user who sends the same query.
	IsPersonal OptBool `json:"is_personal"`
	// Pass the offset that a client should send in the next query with the same text to receive more
	// results. Pass an empty string if there are no more results or if you don't support pagination.
	// Offset length can't exceed 64 bytes.
	NextOffset OptString                   `json:"next_offset"`
	Button     OptInlineQueryResultsButton `json:"button"`
}

Input for answerInlineQuery. Ref: #/components/schemas/answerInlineQuery

func (*AnswerInlineQuery) Decode

func (s *AnswerInlineQuery) Decode(d *jx.Decoder) error

Decode decodes AnswerInlineQuery from json.

func (*AnswerInlineQuery) Encode

func (s *AnswerInlineQuery) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*AnswerInlineQuery) GetButton

GetButton returns the value of Button.

func (*AnswerInlineQuery) GetCacheTime

func (s *AnswerInlineQuery) GetCacheTime() OptInt

GetCacheTime returns the value of CacheTime.

func (*AnswerInlineQuery) GetInlineQueryID

func (s *AnswerInlineQuery) GetInlineQueryID() string

GetInlineQueryID returns the value of InlineQueryID.

func (*AnswerInlineQuery) GetIsPersonal

func (s *AnswerInlineQuery) GetIsPersonal() OptBool

GetIsPersonal returns the value of IsPersonal.

func (*AnswerInlineQuery) GetNextOffset

func (s *AnswerInlineQuery) GetNextOffset() OptString

GetNextOffset returns the value of NextOffset.

func (*AnswerInlineQuery) GetResults

func (s *AnswerInlineQuery) GetResults() []InlineQueryResult

GetResults returns the value of Results.

func (*AnswerInlineQuery) MarshalJSON

func (s *AnswerInlineQuery) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*AnswerInlineQuery) SetButton

SetButton sets the value of Button.

func (*AnswerInlineQuery) SetCacheTime

func (s *AnswerInlineQuery) SetCacheTime(val OptInt)

SetCacheTime sets the value of CacheTime.

func (*AnswerInlineQuery) SetInlineQueryID

func (s *AnswerInlineQuery) SetInlineQueryID(val string)

SetInlineQueryID sets the value of InlineQueryID.

func (*AnswerInlineQuery) SetIsPersonal

func (s *AnswerInlineQuery) SetIsPersonal(val OptBool)

SetIsPersonal sets the value of IsPersonal.

func (*AnswerInlineQuery) SetNextOffset

func (s *AnswerInlineQuery) SetNextOffset(val OptString)

SetNextOffset sets the value of NextOffset.

func (*AnswerInlineQuery) SetResults

func (s *AnswerInlineQuery) SetResults(val []InlineQueryResult)

SetResults sets the value of Results.

func (*AnswerInlineQuery) UnmarshalJSON

func (s *AnswerInlineQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*AnswerInlineQuery) Validate

func (s *AnswerInlineQuery) Validate() error

type AnswerPreCheckoutQuery

type AnswerPreCheckoutQuery struct {
	// Unique identifier for the query to be answered.
	PreCheckoutQueryID string `json:"pre_checkout_query_id"`
	// Specify _True_ if everything is alright (goods are available, etc.) and the bot is ready to
	// proceed with the order. Use _False_ if there are any problems.
	Ok bool `json:"ok"`
	// Required if _ok_ is _False_. Error message in human readable form that explains the reason for
	// failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing
	// black T-shirts while you were busy filling out your payment details. Please choose a different
	// color or garment!"). Telegram will display this message to the user.
	ErrorMessage OptString `json:"error_message"`
}

Input for answerPreCheckoutQuery. Ref: #/components/schemas/answerPreCheckoutQuery

func (*AnswerPreCheckoutQuery) Decode

func (s *AnswerPreCheckoutQuery) Decode(d *jx.Decoder) error

Decode decodes AnswerPreCheckoutQuery from json.

func (*AnswerPreCheckoutQuery) Encode

func (s *AnswerPreCheckoutQuery) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*AnswerPreCheckoutQuery) GetErrorMessage

func (s *AnswerPreCheckoutQuery) GetErrorMessage() OptString

GetErrorMessage returns the value of ErrorMessage.

func (*AnswerPreCheckoutQuery) GetOk

func (s *AnswerPreCheckoutQuery) GetOk() bool

GetOk returns the value of Ok.

func (*AnswerPreCheckoutQuery) GetPreCheckoutQueryID

func (s *AnswerPreCheckoutQuery) GetPreCheckoutQueryID() string

GetPreCheckoutQueryID returns the value of PreCheckoutQueryID.

func (*AnswerPreCheckoutQuery) MarshalJSON

func (s *AnswerPreCheckoutQuery) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*AnswerPreCheckoutQuery) SetErrorMessage

func (s *AnswerPreCheckoutQuery) SetErrorMessage(val OptString)

SetErrorMessage sets the value of ErrorMessage.

func (*AnswerPreCheckoutQuery) SetOk

func (s *AnswerPreCheckoutQuery) SetOk(val bool)

SetOk sets the value of Ok.

func (*AnswerPreCheckoutQuery) SetPreCheckoutQueryID

func (s *AnswerPreCheckoutQuery) SetPreCheckoutQueryID(val string)

SetPreCheckoutQueryID sets the value of PreCheckoutQueryID.

func (*AnswerPreCheckoutQuery) UnmarshalJSON

func (s *AnswerPreCheckoutQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type AnswerShippingQuery

type AnswerShippingQuery struct {
	// Unique identifier for the query to be answered.
	ShippingQueryID string `json:"shipping_query_id"`
	// Pass _True_ if delivery to the specified address is possible and _False_ if there are any problems
	// (for example, if delivery to the specified address is not possible).
	Ok bool `json:"ok"`
	// Required if _ok_ is _True_. A JSON-serialized array of available shipping options.
	ShippingOptions []ShippingOption `json:"shipping_options"`
	// Required if _ok_ is _False_. Error message in human readable form that explains why it is
	// impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable').
	// Telegram will display this message to the user.
	ErrorMessage OptString `json:"error_message"`
}

Input for answerShippingQuery. Ref: #/components/schemas/answerShippingQuery

func (*AnswerShippingQuery) Decode

func (s *AnswerShippingQuery) Decode(d *jx.Decoder) error

Decode decodes AnswerShippingQuery from json.

func (*AnswerShippingQuery) Encode

func (s *AnswerShippingQuery) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*AnswerShippingQuery) GetErrorMessage

func (s *AnswerShippingQuery) GetErrorMessage() OptString

GetErrorMessage returns the value of ErrorMessage.

func (*AnswerShippingQuery) GetOk

func (s *AnswerShippingQuery) GetOk() bool

GetOk returns the value of Ok.

func (*AnswerShippingQuery) GetShippingOptions

func (s *AnswerShippingQuery) GetShippingOptions() []ShippingOption

GetShippingOptions returns the value of ShippingOptions.

func (*AnswerShippingQuery) GetShippingQueryID

func (s *AnswerShippingQuery) GetShippingQueryID() string

GetShippingQueryID returns the value of ShippingQueryID.

func (*AnswerShippingQuery) MarshalJSON

func (s *AnswerShippingQuery) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*AnswerShippingQuery) SetErrorMessage

func (s *AnswerShippingQuery) SetErrorMessage(val OptString)

SetErrorMessage sets the value of ErrorMessage.

func (*AnswerShippingQuery) SetOk

func (s *AnswerShippingQuery) SetOk(val bool)

SetOk sets the value of Ok.

func (*AnswerShippingQuery) SetShippingOptions

func (s *AnswerShippingQuery) SetShippingOptions(val []ShippingOption)

SetShippingOptions sets the value of ShippingOptions.

func (*AnswerShippingQuery) SetShippingQueryID

func (s *AnswerShippingQuery) SetShippingQueryID(val string)

SetShippingQueryID sets the value of ShippingQueryID.

func (*AnswerShippingQuery) UnmarshalJSON

func (s *AnswerShippingQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*AnswerShippingQuery) Validate

func (s *AnswerShippingQuery) Validate() error

type AnswerWebAppQuery

type AnswerWebAppQuery struct {
	// Unique identifier for the query to be answered.
	WebAppQueryID string            `json:"web_app_query_id"`
	Result        InlineQueryResult `json:"result"`
}

Input for answerWebAppQuery. Ref: #/components/schemas/answerWebAppQuery

func (*AnswerWebAppQuery) Decode

func (s *AnswerWebAppQuery) Decode(d *jx.Decoder) error

Decode decodes AnswerWebAppQuery from json.

func (*AnswerWebAppQuery) Encode

func (s *AnswerWebAppQuery) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*AnswerWebAppQuery) GetResult

func (s *AnswerWebAppQuery) GetResult() InlineQueryResult

GetResult returns the value of Result.

func (*AnswerWebAppQuery) GetWebAppQueryID

func (s *AnswerWebAppQuery) GetWebAppQueryID() string

GetWebAppQueryID returns the value of WebAppQueryID.

func (*AnswerWebAppQuery) MarshalJSON

func (s *AnswerWebAppQuery) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*AnswerWebAppQuery) SetResult

func (s *AnswerWebAppQuery) SetResult(val InlineQueryResult)

SetResult sets the value of Result.

func (*AnswerWebAppQuery) SetWebAppQueryID

func (s *AnswerWebAppQuery) SetWebAppQueryID(val string)

SetWebAppQueryID sets the value of WebAppQueryID.

func (*AnswerWebAppQuery) UnmarshalJSON

func (s *AnswerWebAppQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*AnswerWebAppQuery) Validate

func (s *AnswerWebAppQuery) Validate() error

type ApproveChatJoinRequest

type ApproveChatJoinRequest struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier of the target user.
	UserID int64 `json:"user_id"`
}

Input for approveChatJoinRequest. Ref: #/components/schemas/approveChatJoinRequest

func (*ApproveChatJoinRequest) Decode

func (s *ApproveChatJoinRequest) Decode(d *jx.Decoder) error

Decode decodes ApproveChatJoinRequest from json.

func (*ApproveChatJoinRequest) Encode

func (s *ApproveChatJoinRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ApproveChatJoinRequest) GetChatID

func (s *ApproveChatJoinRequest) GetChatID() ID

GetChatID returns the value of ChatID.

func (*ApproveChatJoinRequest) GetUserID

func (s *ApproveChatJoinRequest) GetUserID() int64

GetUserID returns the value of UserID.

func (*ApproveChatJoinRequest) MarshalJSON

func (s *ApproveChatJoinRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ApproveChatJoinRequest) SetChatID

func (s *ApproveChatJoinRequest) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*ApproveChatJoinRequest) SetUserID

func (s *ApproveChatJoinRequest) SetUserID(val int64)

SetUserID sets the value of UserID.

func (*ApproveChatJoinRequest) UnmarshalJSON

func (s *ApproveChatJoinRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Audio

type Audio struct {
	// Identifier for this file, which can be used to download or reuse the file.
	FileID string `json:"file_id"`
	// Unique identifier for this file, which is supposed to be the same over time and for different bots.
	//  Can't be used to download or reuse the file.
	FileUniqueID string `json:"file_unique_id"`
	// Duration of the audio in seconds as defined by sender.
	Duration int `json:"duration"`
	// _Optional_. Performer of the audio as defined by sender or by audio tags.
	Performer OptString `json:"performer"`
	// _Optional_. Title of the audio as defined by sender or by audio tags.
	Title OptString `json:"title"`
	// _Optional_. Original filename as defined by sender.
	FileName OptString `json:"file_name"`
	// _Optional_. MIME type of the file as defined by sender.
	MimeType OptString `json:"mime_type"`
	// _Optional_. File size in bytes. It can be bigger than 2^31 and some programming languages may have
	// difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed
	// 64-bit integer or double-precision float type are safe for storing this value.
	FileSize  OptInt       `json:"file_size"`
	Thumbnail OptPhotoSize `json:"thumbnail"`
}

This object represents an audio file to be treated as music by the Telegram clients. Ref: #/components/schemas/Audio

func (*Audio) Decode

func (s *Audio) Decode(d *jx.Decoder) error

Decode decodes Audio from json.

func (*Audio) Encode

func (s *Audio) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Audio) GetDuration

func (s *Audio) GetDuration() int

GetDuration returns the value of Duration.

func (*Audio) GetFileID

func (s *Audio) GetFileID() string

GetFileID returns the value of FileID.

func (*Audio) GetFileName

func (s *Audio) GetFileName() OptString

GetFileName returns the value of FileName.

func (*Audio) GetFileSize

func (s *Audio) GetFileSize() OptInt

GetFileSize returns the value of FileSize.

func (*Audio) GetFileUniqueID

func (s *Audio) GetFileUniqueID() string

GetFileUniqueID returns the value of FileUniqueID.

func (*Audio) GetMimeType

func (s *Audio) GetMimeType() OptString

GetMimeType returns the value of MimeType.

func (*Audio) GetPerformer

func (s *Audio) GetPerformer() OptString

GetPerformer returns the value of Performer.

func (*Audio) GetThumbnail

func (s *Audio) GetThumbnail() OptPhotoSize

GetThumbnail returns the value of Thumbnail.

func (*Audio) GetTitle

func (s *Audio) GetTitle() OptString

GetTitle returns the value of Title.

func (*Audio) MarshalJSON

func (s *Audio) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Audio) SetDuration

func (s *Audio) SetDuration(val int)

SetDuration sets the value of Duration.

func (*Audio) SetFileID

func (s *Audio) SetFileID(val string)

SetFileID sets the value of FileID.

func (*Audio) SetFileName

func (s *Audio) SetFileName(val OptString)

SetFileName sets the value of FileName.

func (*Audio) SetFileSize

func (s *Audio) SetFileSize(val OptInt)

SetFileSize sets the value of FileSize.

func (*Audio) SetFileUniqueID

func (s *Audio) SetFileUniqueID(val string)

SetFileUniqueID sets the value of FileUniqueID.

func (*Audio) SetMimeType

func (s *Audio) SetMimeType(val OptString)

SetMimeType sets the value of MimeType.

func (*Audio) SetPerformer

func (s *Audio) SetPerformer(val OptString)

SetPerformer sets the value of Performer.

func (*Audio) SetThumbnail

func (s *Audio) SetThumbnail(val OptPhotoSize)

SetThumbnail sets the value of Thumbnail.

func (*Audio) SetTitle

func (s *Audio) SetTitle(val OptString)

SetTitle sets the value of Title.

func (*Audio) UnmarshalJSON

func (s *Audio) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Audio) Validate

func (s *Audio) Validate() error

type BanChatMember

type BanChatMember struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier of the target user.
	UserID int64 `json:"user_id"`
	// Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less
	// than 30 seconds from the current time they are considered to be banned forever. Applied for
	// supergroups and channels only.
	UntilDate OptInt `json:"until_date"`
	// Pass _True_ to delete all messages from the chat for the user that is being removed. If _False_,
	// the user will be able to see messages in the group that were sent before the user was removed.
	// Always _True_ for supergroups and channels.
	RevokeMessages OptBool `json:"revoke_messages"`
}

Input for banChatMember. Ref: #/components/schemas/banChatMember

func (*BanChatMember) Decode

func (s *BanChatMember) Decode(d *jx.Decoder) error

Decode decodes BanChatMember from json.

func (*BanChatMember) Encode

func (s *BanChatMember) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*BanChatMember) GetChatID

func (s *BanChatMember) GetChatID() ID

GetChatID returns the value of ChatID.

func (*BanChatMember) GetRevokeMessages

func (s *BanChatMember) GetRevokeMessages() OptBool

GetRevokeMessages returns the value of RevokeMessages.

func (*BanChatMember) GetUntilDate

func (s *BanChatMember) GetUntilDate() OptInt

GetUntilDate returns the value of UntilDate.

func (*BanChatMember) GetUserID

func (s *BanChatMember) GetUserID() int64

GetUserID returns the value of UserID.

func (*BanChatMember) MarshalJSON

func (s *BanChatMember) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BanChatMember) SetChatID

func (s *BanChatMember) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*BanChatMember) SetRevokeMessages

func (s *BanChatMember) SetRevokeMessages(val OptBool)

SetRevokeMessages sets the value of RevokeMessages.

func (*BanChatMember) SetUntilDate

func (s *BanChatMember) SetUntilDate(val OptInt)

SetUntilDate sets the value of UntilDate.

func (*BanChatMember) SetUserID

func (s *BanChatMember) SetUserID(val int64)

SetUserID sets the value of UserID.

func (*BanChatMember) UnmarshalJSON

func (s *BanChatMember) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type BanChatSenderChat

type BanChatSenderChat struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier of the target sender chat.
	SenderChatID int64 `json:"sender_chat_id"`
}

Input for banChatSenderChat. Ref: #/components/schemas/banChatSenderChat

func (*BanChatSenderChat) Decode

func (s *BanChatSenderChat) Decode(d *jx.Decoder) error

Decode decodes BanChatSenderChat from json.

func (*BanChatSenderChat) Encode

func (s *BanChatSenderChat) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*BanChatSenderChat) GetChatID

func (s *BanChatSenderChat) GetChatID() ID

GetChatID returns the value of ChatID.

func (*BanChatSenderChat) GetSenderChatID

func (s *BanChatSenderChat) GetSenderChatID() int64

GetSenderChatID returns the value of SenderChatID.

func (*BanChatSenderChat) MarshalJSON

func (s *BanChatSenderChat) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BanChatSenderChat) SetChatID

func (s *BanChatSenderChat) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*BanChatSenderChat) SetSenderChatID

func (s *BanChatSenderChat) SetSenderChatID(val int64)

SetSenderChatID sets the value of SenderChatID.

func (*BanChatSenderChat) UnmarshalJSON

func (s *BanChatSenderChat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type BotCommand

type BotCommand struct {
	// Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and
	// underscores.
	Command string `json:"command"`
	// Description of the command; 1-256 characters.
	Description string `json:"description"`
}

This object represents a bot command. Ref: #/components/schemas/BotCommand

func (*BotCommand) Decode

func (s *BotCommand) Decode(d *jx.Decoder) error

Decode decodes BotCommand from json.

func (*BotCommand) Encode

func (s *BotCommand) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*BotCommand) GetCommand

func (s *BotCommand) GetCommand() string

GetCommand returns the value of Command.

func (*BotCommand) GetDescription

func (s *BotCommand) GetDescription() string

GetDescription returns the value of Description.

func (*BotCommand) MarshalJSON

func (s *BotCommand) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BotCommand) SetCommand

func (s *BotCommand) SetCommand(val string)

SetCommand sets the value of Command.

func (*BotCommand) SetDescription

func (s *BotCommand) SetDescription(val string)

SetDescription sets the value of Description.

func (*BotCommand) UnmarshalJSON

func (s *BotCommand) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*BotCommand) Validate

func (s *BotCommand) Validate() error

type BotCommandScope

type BotCommandScope struct {
	Type                                 BotCommandScopeType // switch on this field
	BotCommandScopeDefault               BotCommandScopeDefault
	BotCommandScopeAllPrivateChats       BotCommandScopeAllPrivateChats
	BotCommandScopeAllGroupChats         BotCommandScopeAllGroupChats
	BotCommandScopeAllChatAdministrators BotCommandScopeAllChatAdministrators
	BotCommandScopeChat                  BotCommandScopeChat
	BotCommandScopeChatAdministrators    BotCommandScopeChatAdministrators
	BotCommandScopeChatMember            BotCommandScopeChatMember
}

This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:. Ref: #/components/schemas/BotCommandScope BotCommandScope represents sum type.

func NewBotCommandScopeAllChatAdministratorsBotCommandScope

func NewBotCommandScopeAllChatAdministratorsBotCommandScope(v BotCommandScopeAllChatAdministrators) BotCommandScope

NewBotCommandScopeAllChatAdministratorsBotCommandScope returns new BotCommandScope from BotCommandScopeAllChatAdministrators.

func NewBotCommandScopeAllGroupChatsBotCommandScope

func NewBotCommandScopeAllGroupChatsBotCommandScope(v BotCommandScopeAllGroupChats) BotCommandScope

NewBotCommandScopeAllGroupChatsBotCommandScope returns new BotCommandScope from BotCommandScopeAllGroupChats.

func NewBotCommandScopeAllPrivateChatsBotCommandScope

func NewBotCommandScopeAllPrivateChatsBotCommandScope(v BotCommandScopeAllPrivateChats) BotCommandScope

NewBotCommandScopeAllPrivateChatsBotCommandScope returns new BotCommandScope from BotCommandScopeAllPrivateChats.

func NewBotCommandScopeChatAdministratorsBotCommandScope

func NewBotCommandScopeChatAdministratorsBotCommandScope(v BotCommandScopeChatAdministrators) BotCommandScope

NewBotCommandScopeChatAdministratorsBotCommandScope returns new BotCommandScope from BotCommandScopeChatAdministrators.

func NewBotCommandScopeChatBotCommandScope

func NewBotCommandScopeChatBotCommandScope(v BotCommandScopeChat) BotCommandScope

NewBotCommandScopeChatBotCommandScope returns new BotCommandScope from BotCommandScopeChat.

func NewBotCommandScopeChatMemberBotCommandScope

func NewBotCommandScopeChatMemberBotCommandScope(v BotCommandScopeChatMember) BotCommandScope

NewBotCommandScopeChatMemberBotCommandScope returns new BotCommandScope from BotCommandScopeChatMember.

func NewBotCommandScopeDefaultBotCommandScope

func NewBotCommandScopeDefaultBotCommandScope(v BotCommandScopeDefault) BotCommandScope

NewBotCommandScopeDefaultBotCommandScope returns new BotCommandScope from BotCommandScopeDefault.

func (*BotCommandScope) Decode

func (s *BotCommandScope) Decode(d *jx.Decoder) error

Decode decodes BotCommandScope from json.

func (BotCommandScope) Encode

func (s BotCommandScope) Encode(e *jx.Encoder)

Encode encodes BotCommandScope as json.

func (BotCommandScope) GetBotCommandScopeAllChatAdministrators

func (s BotCommandScope) GetBotCommandScopeAllChatAdministrators() (v BotCommandScopeAllChatAdministrators, ok bool)

GetBotCommandScopeAllChatAdministrators returns BotCommandScopeAllChatAdministrators and true boolean if BotCommandScope is BotCommandScopeAllChatAdministrators.

func (BotCommandScope) GetBotCommandScopeAllGroupChats

func (s BotCommandScope) GetBotCommandScopeAllGroupChats() (v BotCommandScopeAllGroupChats, ok bool)

GetBotCommandScopeAllGroupChats returns BotCommandScopeAllGroupChats and true boolean if BotCommandScope is BotCommandScopeAllGroupChats.

func (BotCommandScope) GetBotCommandScopeAllPrivateChats

func (s BotCommandScope) GetBotCommandScopeAllPrivateChats() (v BotCommandScopeAllPrivateChats, ok bool)

GetBotCommandScopeAllPrivateChats returns BotCommandScopeAllPrivateChats and true boolean if BotCommandScope is BotCommandScopeAllPrivateChats.

func (BotCommandScope) GetBotCommandScopeChat

func (s BotCommandScope) GetBotCommandScopeChat() (v BotCommandScopeChat, ok bool)

GetBotCommandScopeChat returns BotCommandScopeChat and true boolean if BotCommandScope is BotCommandScopeChat.

func (BotCommandScope) GetBotCommandScopeChatAdministrators

func (s BotCommandScope) GetBotCommandScopeChatAdministrators() (v BotCommandScopeChatAdministrators, ok bool)

GetBotCommandScopeChatAdministrators returns BotCommandScopeChatAdministrators and true boolean if BotCommandScope is BotCommandScopeChatAdministrators.

func (BotCommandScope) GetBotCommandScopeChatMember

func (s BotCommandScope) GetBotCommandScopeChatMember() (v BotCommandScopeChatMember, ok bool)

GetBotCommandScopeChatMember returns BotCommandScopeChatMember and true boolean if BotCommandScope is BotCommandScopeChatMember.

func (BotCommandScope) GetBotCommandScopeDefault

func (s BotCommandScope) GetBotCommandScopeDefault() (v BotCommandScopeDefault, ok bool)

GetBotCommandScopeDefault returns BotCommandScopeDefault and true boolean if BotCommandScope is BotCommandScopeDefault.

func (BotCommandScope) IsBotCommandScopeAllChatAdministrators

func (s BotCommandScope) IsBotCommandScopeAllChatAdministrators() bool

IsBotCommandScopeAllChatAdministrators reports whether BotCommandScope is BotCommandScopeAllChatAdministrators.

func (BotCommandScope) IsBotCommandScopeAllGroupChats

func (s BotCommandScope) IsBotCommandScopeAllGroupChats() bool

IsBotCommandScopeAllGroupChats reports whether BotCommandScope is BotCommandScopeAllGroupChats.

func (BotCommandScope) IsBotCommandScopeAllPrivateChats

func (s BotCommandScope) IsBotCommandScopeAllPrivateChats() bool

IsBotCommandScopeAllPrivateChats reports whether BotCommandScope is BotCommandScopeAllPrivateChats.

func (BotCommandScope) IsBotCommandScopeChat

func (s BotCommandScope) IsBotCommandScopeChat() bool

IsBotCommandScopeChat reports whether BotCommandScope is BotCommandScopeChat.

func (BotCommandScope) IsBotCommandScopeChatAdministrators

func (s BotCommandScope) IsBotCommandScopeChatAdministrators() bool

IsBotCommandScopeChatAdministrators reports whether BotCommandScope is BotCommandScopeChatAdministrators.

func (BotCommandScope) IsBotCommandScopeChatMember

func (s BotCommandScope) IsBotCommandScopeChatMember() bool

IsBotCommandScopeChatMember reports whether BotCommandScope is BotCommandScopeChatMember.

func (BotCommandScope) IsBotCommandScopeDefault

func (s BotCommandScope) IsBotCommandScopeDefault() bool

IsBotCommandScopeDefault reports whether BotCommandScope is BotCommandScopeDefault.

func (BotCommandScope) MarshalJSON

func (s BotCommandScope) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BotCommandScope) SetBotCommandScopeAllChatAdministrators

func (s *BotCommandScope) SetBotCommandScopeAllChatAdministrators(v BotCommandScopeAllChatAdministrators)

SetBotCommandScopeAllChatAdministrators sets BotCommandScope to BotCommandScopeAllChatAdministrators.

func (*BotCommandScope) SetBotCommandScopeAllGroupChats

func (s *BotCommandScope) SetBotCommandScopeAllGroupChats(v BotCommandScopeAllGroupChats)

SetBotCommandScopeAllGroupChats sets BotCommandScope to BotCommandScopeAllGroupChats.

func (*BotCommandScope) SetBotCommandScopeAllPrivateChats

func (s *BotCommandScope) SetBotCommandScopeAllPrivateChats(v BotCommandScopeAllPrivateChats)

SetBotCommandScopeAllPrivateChats sets BotCommandScope to BotCommandScopeAllPrivateChats.

func (*BotCommandScope) SetBotCommandScopeChat

func (s *BotCommandScope) SetBotCommandScopeChat(v BotCommandScopeChat)

SetBotCommandScopeChat sets BotCommandScope to BotCommandScopeChat.

func (*BotCommandScope) SetBotCommandScopeChatAdministrators

func (s *BotCommandScope) SetBotCommandScopeChatAdministrators(v BotCommandScopeChatAdministrators)

SetBotCommandScopeChatAdministrators sets BotCommandScope to BotCommandScopeChatAdministrators.

func (*BotCommandScope) SetBotCommandScopeChatMember

func (s *BotCommandScope) SetBotCommandScopeChatMember(v BotCommandScopeChatMember)

SetBotCommandScopeChatMember sets BotCommandScope to BotCommandScopeChatMember.

func (*BotCommandScope) SetBotCommandScopeDefault

func (s *BotCommandScope) SetBotCommandScopeDefault(v BotCommandScopeDefault)

SetBotCommandScopeDefault sets BotCommandScope to BotCommandScopeDefault.

func (*BotCommandScope) UnmarshalJSON

func (s *BotCommandScope) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type BotCommandScopeAllChatAdministrators

type BotCommandScopeAllChatAdministrators struct{}

Represents the [scope](https://core.telegram.org/bots/api#botcommandscope) of bot commands, covering all group and supergroup chat administrators. Ref: #/components/schemas/BotCommandScopeAllChatAdministrators

func (*BotCommandScopeAllChatAdministrators) Decode

Decode decodes BotCommandScopeAllChatAdministrators from json.

func (*BotCommandScopeAllChatAdministrators) Encode

Encode implements json.Marshaler.

func (*BotCommandScopeAllChatAdministrators) MarshalJSON

func (s *BotCommandScopeAllChatAdministrators) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BotCommandScopeAllChatAdministrators) UnmarshalJSON

func (s *BotCommandScopeAllChatAdministrators) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type BotCommandScopeAllGroupChats

type BotCommandScopeAllGroupChats struct{}

Represents the [scope](https://core.telegram.org/bots/api#botcommandscope) of bot commands, covering all group and supergroup chats. Ref: #/components/schemas/BotCommandScopeAllGroupChats

func (*BotCommandScopeAllGroupChats) Decode

Decode decodes BotCommandScopeAllGroupChats from json.

func (*BotCommandScopeAllGroupChats) Encode

func (s *BotCommandScopeAllGroupChats) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*BotCommandScopeAllGroupChats) MarshalJSON

func (s *BotCommandScopeAllGroupChats) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BotCommandScopeAllGroupChats) UnmarshalJSON

func (s *BotCommandScopeAllGroupChats) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type BotCommandScopeAllPrivateChats

type BotCommandScopeAllPrivateChats struct{}

Represents the [scope](https://core.telegram.org/bots/api#botcommandscope) of bot commands, covering all private chats. Ref: #/components/schemas/BotCommandScopeAllPrivateChats

func (*BotCommandScopeAllPrivateChats) Decode

Decode decodes BotCommandScopeAllPrivateChats from json.

func (*BotCommandScopeAllPrivateChats) Encode

Encode implements json.Marshaler.

func (*BotCommandScopeAllPrivateChats) MarshalJSON

func (s *BotCommandScopeAllPrivateChats) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BotCommandScopeAllPrivateChats) UnmarshalJSON

func (s *BotCommandScopeAllPrivateChats) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type BotCommandScopeChat

type BotCommandScopeChat struct {
	ChatID ID `json:"chat_id"`
}

Represents the [scope](https://core.telegram.org/bots/api#botcommandscope) of bot commands, covering a specific chat. Ref: #/components/schemas/BotCommandScopeChat

func (*BotCommandScopeChat) Decode

func (s *BotCommandScopeChat) Decode(d *jx.Decoder) error

Decode decodes BotCommandScopeChat from json.

func (*BotCommandScopeChat) Encode

func (s *BotCommandScopeChat) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*BotCommandScopeChat) GetChatID

func (s *BotCommandScopeChat) GetChatID() ID

GetChatID returns the value of ChatID.

func (*BotCommandScopeChat) MarshalJSON

func (s *BotCommandScopeChat) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BotCommandScopeChat) SetChatID

func (s *BotCommandScopeChat) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*BotCommandScopeChat) UnmarshalJSON

func (s *BotCommandScopeChat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type BotCommandScopeChatAdministrators

type BotCommandScopeChatAdministrators struct {
	ChatID ID `json:"chat_id"`
}

Represents the [scope](https://core.telegram.org/bots/api#botcommandscope) of bot commands, covering all administrators of a specific group or supergroup chat. Ref: #/components/schemas/BotCommandScopeChatAdministrators

func (*BotCommandScopeChatAdministrators) Decode

Decode decodes BotCommandScopeChatAdministrators from json.

func (*BotCommandScopeChatAdministrators) Encode

Encode implements json.Marshaler.

func (*BotCommandScopeChatAdministrators) GetChatID

func (s *BotCommandScopeChatAdministrators) GetChatID() ID

GetChatID returns the value of ChatID.

func (*BotCommandScopeChatAdministrators) MarshalJSON

func (s *BotCommandScopeChatAdministrators) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BotCommandScopeChatAdministrators) SetChatID

func (s *BotCommandScopeChatAdministrators) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*BotCommandScopeChatAdministrators) UnmarshalJSON

func (s *BotCommandScopeChatAdministrators) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type BotCommandScopeChatMember

type BotCommandScopeChatMember struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier of the target user.
	UserID int64 `json:"user_id"`
}

Represents the [scope](https://core.telegram.org/bots/api#botcommandscope) of bot commands, covering a specific member of a group or supergroup chat. Ref: #/components/schemas/BotCommandScopeChatMember

func (*BotCommandScopeChatMember) Decode

func (s *BotCommandScopeChatMember) Decode(d *jx.Decoder) error

Decode decodes BotCommandScopeChatMember from json.

func (*BotCommandScopeChatMember) Encode

func (s *BotCommandScopeChatMember) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*BotCommandScopeChatMember) GetChatID

func (s *BotCommandScopeChatMember) GetChatID() ID

GetChatID returns the value of ChatID.

func (*BotCommandScopeChatMember) GetUserID

func (s *BotCommandScopeChatMember) GetUserID() int64

GetUserID returns the value of UserID.

func (*BotCommandScopeChatMember) MarshalJSON

func (s *BotCommandScopeChatMember) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BotCommandScopeChatMember) SetChatID

func (s *BotCommandScopeChatMember) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*BotCommandScopeChatMember) SetUserID

func (s *BotCommandScopeChatMember) SetUserID(val int64)

SetUserID sets the value of UserID.

func (*BotCommandScopeChatMember) UnmarshalJSON

func (s *BotCommandScopeChatMember) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type BotCommandScopeDefault

type BotCommandScopeDefault struct{}

Represents the default [scope](https://core.telegram.org/bots/api#botcommandscope) of bot commands.

Default commands are used if no commands with a [narrower scope](https://core.telegram.

org/bots/api#determining-list-of-commands) are specified for the user. Ref: #/components/schemas/BotCommandScopeDefault

func (*BotCommandScopeDefault) Decode

func (s *BotCommandScopeDefault) Decode(d *jx.Decoder) error

Decode decodes BotCommandScopeDefault from json.

func (*BotCommandScopeDefault) Encode

func (s *BotCommandScopeDefault) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*BotCommandScopeDefault) MarshalJSON

func (s *BotCommandScopeDefault) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BotCommandScopeDefault) UnmarshalJSON

func (s *BotCommandScopeDefault) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type BotCommandScopeType

type BotCommandScopeType string

BotCommandScopeType is oneOf type of BotCommandScope.

const (
	BotCommandScopeDefaultBotCommandScope               BotCommandScopeType = "BotCommandScopeDefault"
	BotCommandScopeAllPrivateChatsBotCommandScope       BotCommandScopeType = "BotCommandScopeAllPrivateChats"
	BotCommandScopeAllGroupChatsBotCommandScope         BotCommandScopeType = "BotCommandScopeAllGroupChats"
	BotCommandScopeAllChatAdministratorsBotCommandScope BotCommandScopeType = "BotCommandScopeAllChatAdministrators"
	BotCommandScopeChatBotCommandScope                  BotCommandScopeType = "BotCommandScopeChat"
	BotCommandScopeChatAdministratorsBotCommandScope    BotCommandScopeType = "BotCommandScopeChatAdministrators"
	BotCommandScopeChatMemberBotCommandScope            BotCommandScopeType = "BotCommandScopeChatMember"
)

Possible values for BotCommandScopeType.

type CallbackGame

type CallbackGame struct{}

A placeholder, currently holds no information. Use [BotFather](https://t.me/botfather) to set up your game. Ref: #/components/schemas/CallbackGame

func (*CallbackGame) Decode

func (s *CallbackGame) Decode(d *jx.Decoder) error

Decode decodes CallbackGame from json.

func (*CallbackGame) Encode

func (s *CallbackGame) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CallbackGame) MarshalJSON

func (s *CallbackGame) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CallbackGame) UnmarshalJSON

func (s *CallbackGame) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CallbackQuery

type CallbackQuery struct {
	// Unique identifier for this query.
	ID      string     `json:"id"`
	From    User       `json:"from"`
	Message OptMessage `json:"message"`
	// _Optional_. Identifier of the message sent via the bot in inline mode, that originated the query.
	InlineMessageID OptString `json:"inline_message_id"`
	// Global identifier, uniquely corresponding to the chat to which the message with the callback
	// button was sent. Useful for high scores in [games](https://core.telegram.org/bots/api#games).
	ChatInstance string `json:"chat_instance"`
	// _Optional_. Data associated with the callback button. Be aware that the message originated the
	// query can contain no callback buttons with this data.
	Data OptString `json:"data"`
	// _Optional_. Short name of a [Game](https://core.telegram.org/bots/api#games) to be returned,
	// serves as the unique identifier for the game.
	GameShortName OptString `json:"game_short_name"`
}

This object represents an incoming callback query from a callback button in an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards). If the button that originated the query was attached to a message sent by the bot, the field _message_ will be present. If the button was attached to a message sent via the bot (in [inline mode](https://core.telegram. org/bots/api#inline-mode)), the field _inline_message_id_ will be present. Exactly one of the fields _data_ or _game_short_name_ will be present. Ref: #/components/schemas/CallbackQuery

func (*CallbackQuery) Decode

func (s *CallbackQuery) Decode(d *jx.Decoder) error

Decode decodes CallbackQuery from json.

func (*CallbackQuery) Encode

func (s *CallbackQuery) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CallbackQuery) GetChatInstance

func (s *CallbackQuery) GetChatInstance() string

GetChatInstance returns the value of ChatInstance.

func (*CallbackQuery) GetData

func (s *CallbackQuery) GetData() OptString

GetData returns the value of Data.

func (*CallbackQuery) GetFrom

func (s *CallbackQuery) GetFrom() User

GetFrom returns the value of From.

func (*CallbackQuery) GetGameShortName

func (s *CallbackQuery) GetGameShortName() OptString

GetGameShortName returns the value of GameShortName.

func (*CallbackQuery) GetID

func (s *CallbackQuery) GetID() string

GetID returns the value of ID.

func (*CallbackQuery) GetInlineMessageID

func (s *CallbackQuery) GetInlineMessageID() OptString

GetInlineMessageID returns the value of InlineMessageID.

func (*CallbackQuery) GetMessage

func (s *CallbackQuery) GetMessage() OptMessage

GetMessage returns the value of Message.

func (*CallbackQuery) MarshalJSON

func (s *CallbackQuery) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CallbackQuery) SetChatInstance

func (s *CallbackQuery) SetChatInstance(val string)

SetChatInstance sets the value of ChatInstance.

func (*CallbackQuery) SetData

func (s *CallbackQuery) SetData(val OptString)

SetData sets the value of Data.

func (*CallbackQuery) SetFrom

func (s *CallbackQuery) SetFrom(val User)

SetFrom sets the value of From.

func (*CallbackQuery) SetGameShortName

func (s *CallbackQuery) SetGameShortName(val OptString)

SetGameShortName sets the value of GameShortName.

func (*CallbackQuery) SetID

func (s *CallbackQuery) SetID(val string)

SetID sets the value of ID.

func (*CallbackQuery) SetInlineMessageID

func (s *CallbackQuery) SetInlineMessageID(val OptString)

SetInlineMessageID sets the value of InlineMessageID.

func (*CallbackQuery) SetMessage

func (s *CallbackQuery) SetMessage(val OptMessage)

SetMessage sets the value of Message.

func (*CallbackQuery) UnmarshalJSON

func (s *CallbackQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CallbackQuery) Validate

func (s *CallbackQuery) Validate() error

type Chat

type Chat struct {
	// Unique identifier for this chat. This number may have more than 32 significant bits and some
	// programming languages may have difficulty/silent defects in interpreting it. But it has at most 52
	// significant bits, so a signed 64-bit integer or double-precision float type are safe for storing
	// this identifier.
	ID int64 `json:"id"`
	// Type of chat, can be either `private`, `group`, `supergroup` or `channel`.
	Type ChatType `json:"type"`
	// _Optional_. Title, for supergroups, channels and group chats.
	Title OptString `json:"title"`
	// _Optional_. Username, for private chats, supergroups and channels if available.
	Username OptString `json:"username"`
	// _Optional_. First name of the other party in a private chat.
	FirstName OptString `json:"first_name"`
	// _Optional_. Last name of the other party in a private chat.
	LastName OptString `json:"last_name"`
	// _Optional_. _True_, if the supergroup chat is a forum (has [topics](https://telegram.
	// org/blog/topics-in-groups-collectible-usernames#topics-in-groups) enabled).
	IsForum OptBool      `json:"is_forum"`
	Photo   OptChatPhoto `json:"photo"`
	// _Optional_. If non-empty, the list of all [active chat usernames](https://telegram.
	// org/blog/topics-in-groups-collectible-usernames#collectible-usernames); for private chats,
	// supergroups and channels. Returned only in [getChat](https://core.telegram.org/bots/api#getchat).
	ActiveUsernames []string `json:"active_usernames"`
	// _Optional_. Custom emoji identifier of emoji status of the other party in a private chat. Returned
	// only in [getChat](https://core.telegram.org/bots/api#getchat).
	EmojiStatusCustomEmojiID OptString `json:"emoji_status_custom_emoji_id"`
	// _Optional_. Bio of the other party in a private chat. Returned only in [getChat](https://core.
	// telegram.org/bots/api#getchat).
	Bio OptString `json:"bio"`
	// _Optional_. _True_, if privacy settings of the other party in the private chat allows to use
	// `tg://user?id=<user_id>` links only in chats with the user. Returned only in
	// [getChat](https://core.telegram.org/bots/api#getchat).
	HasPrivateForwards OptBool `json:"has_private_forwards"`
	// _Optional_. _True_, if the privacy settings of the other party restrict sending voice and video
	// note messages in the private chat. Returned only in [getChat](https://core.telegram.
	// org/bots/api#getchat).
	HasRestrictedVoiceAndVideoMessages OptBool `json:"has_restricted_voice_and_video_messages"`
	// _Optional_. _True_, if users need to join the supergroup before they can send messages. Returned
	// only in [getChat](https://core.telegram.org/bots/api#getchat).
	JoinToSendMessages OptBool `json:"join_to_send_messages"`
	// _Optional_. _True_, if all users directly joining the supergroup need to be approved by supergroup
	// administrators. Returned only in [getChat](https://core.telegram.org/bots/api#getchat).
	JoinByRequest OptBool `json:"join_by_request"`
	// _Optional_. Description, for groups, supergroups and channel chats. Returned only in
	// [getChat](https://core.telegram.org/bots/api#getchat).
	Description OptString `json:"description"`
	// _Optional_. Primary invite link, for groups, supergroups and channel chats. Returned only in
	// [getChat](https://core.telegram.org/bots/api#getchat).
	InviteLink    OptString          `json:"invite_link"`
	PinnedMessage *Message           `json:"pinned_message"`
	Permissions   OptChatPermissions `json:"permissions"`
	// _Optional_. For supergroups, the minimum allowed delay between consecutive messages sent by each
	// unprivileged user; in seconds. Returned only in [getChat](https://core.telegram.
	// org/bots/api#getchat).
	SlowModeDelay OptInt `json:"slow_mode_delay"`
	// _Optional_. The time after which all messages sent to the chat will be automatically deleted; in
	// seconds. Returned only in [getChat](https://core.telegram.org/bots/api#getchat).
	MessageAutoDeleteTime OptInt `json:"message_auto_delete_time"`
	// _Optional_. _True_, if aggressive anti-spam checks are enabled in the supergroup. The field is
	// only available to chat administrators. Returned only in [getChat](https://core.telegram.
	// org/bots/api#getchat).
	HasAggressiveAntiSpamEnabled OptBool `json:"has_aggressive_anti_spam_enabled"`
	// _Optional_. _True_, if non-administrators can only get the list of bots and administrators in the
	// chat. Returned only in [getChat](https://core.telegram.org/bots/api#getchat).
	HasHiddenMembers OptBool `json:"has_hidden_members"`
	// _Optional_. _True_, if messages from the chat can't be forwarded to other chats. Returned only in
	// [getChat](https://core.telegram.org/bots/api#getchat).
	HasProtectedContent OptBool `json:"has_protected_content"`
	// _Optional_. For supergroups, name of group sticker set. Returned only in [getChat](https://core.
	// telegram.org/bots/api#getchat).
	StickerSetName OptString `json:"sticker_set_name"`
	// _Optional_. _True_, if the bot can change the group sticker set. Returned only in
	// [getChat](https://core.telegram.org/bots/api#getchat).
	CanSetStickerSet OptBool `json:"can_set_sticker_set"`
	// _Optional_. Unique identifier for the linked chat, i.e. the discussion group identifier for a
	// channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32
	// bits and some programming languages may have difficulty/silent defects in interpreting it. But it
	// is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for
	// storing this identifier. Returned only in [getChat](https://core.telegram.org/bots/api#getchat).
	LinkedChatID                OptInt64        `json:"linked_chat_id"`
	Location                    OptChatLocation `json:"location"`
	AllMembersAreAdministrators OptBool         `json:"all_members_are_administrators"`
}

This object represents a chat. Ref: #/components/schemas/Chat

func (*Chat) Decode

func (s *Chat) Decode(d *jx.Decoder) error

Decode decodes Chat from json.

func (*Chat) Encode

func (s *Chat) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Chat) GetActiveUsernames

func (s *Chat) GetActiveUsernames() []string

GetActiveUsernames returns the value of ActiveUsernames.

func (*Chat) GetAllMembersAreAdministrators

func (s *Chat) GetAllMembersAreAdministrators() OptBool

GetAllMembersAreAdministrators returns the value of AllMembersAreAdministrators.

func (*Chat) GetBio

func (s *Chat) GetBio() OptString

GetBio returns the value of Bio.

func (*Chat) GetCanSetStickerSet

func (s *Chat) GetCanSetStickerSet() OptBool

GetCanSetStickerSet returns the value of CanSetStickerSet.

func (*Chat) GetDescription

func (s *Chat) GetDescription() OptString

GetDescription returns the value of Description.

func (*Chat) GetEmojiStatusCustomEmojiID

func (s *Chat) GetEmojiStatusCustomEmojiID() OptString

GetEmojiStatusCustomEmojiID returns the value of EmojiStatusCustomEmojiID.

func (*Chat) GetFirstName

func (s *Chat) GetFirstName() OptString

GetFirstName returns the value of FirstName.

func (*Chat) GetHasAggressiveAntiSpamEnabled

func (s *Chat) GetHasAggressiveAntiSpamEnabled() OptBool

GetHasAggressiveAntiSpamEnabled returns the value of HasAggressiveAntiSpamEnabled.

func (*Chat) GetHasHiddenMembers

func (s *Chat) GetHasHiddenMembers() OptBool

GetHasHiddenMembers returns the value of HasHiddenMembers.

func (*Chat) GetHasPrivateForwards

func (s *Chat) GetHasPrivateForwards() OptBool

GetHasPrivateForwards returns the value of HasPrivateForwards.

func (*Chat) GetHasProtectedContent

func (s *Chat) GetHasProtectedContent() OptBool

GetHasProtectedContent returns the value of HasProtectedContent.

func (*Chat) GetHasRestrictedVoiceAndVideoMessages

func (s *Chat) GetHasRestrictedVoiceAndVideoMessages() OptBool

GetHasRestrictedVoiceAndVideoMessages returns the value of HasRestrictedVoiceAndVideoMessages.

func (*Chat) GetID

func (s *Chat) GetID() int64

GetID returns the value of ID.

func (s *Chat) GetInviteLink() OptString

GetInviteLink returns the value of InviteLink.

func (*Chat) GetIsForum

func (s *Chat) GetIsForum() OptBool

GetIsForum returns the value of IsForum.

func (*Chat) GetJoinByRequest

func (s *Chat) GetJoinByRequest() OptBool

GetJoinByRequest returns the value of JoinByRequest.

func (*Chat) GetJoinToSendMessages

func (s *Chat) GetJoinToSendMessages() OptBool

GetJoinToSendMessages returns the value of JoinToSendMessages.

func (*Chat) GetLastName

func (s *Chat) GetLastName() OptString

GetLastName returns the value of LastName.

func (*Chat) GetLinkedChatID

func (s *Chat) GetLinkedChatID() OptInt64

GetLinkedChatID returns the value of LinkedChatID.

func (*Chat) GetLocation

func (s *Chat) GetLocation() OptChatLocation

GetLocation returns the value of Location.

func (*Chat) GetMessageAutoDeleteTime

func (s *Chat) GetMessageAutoDeleteTime() OptInt

GetMessageAutoDeleteTime returns the value of MessageAutoDeleteTime.

func (*Chat) GetPermissions

func (s *Chat) GetPermissions() OptChatPermissions

GetPermissions returns the value of Permissions.

func (*Chat) GetPhoto

func (s *Chat) GetPhoto() OptChatPhoto

GetPhoto returns the value of Photo.

func (*Chat) GetPinnedMessage

func (s *Chat) GetPinnedMessage() *Message

GetPinnedMessage returns the value of PinnedMessage.

func (*Chat) GetSlowModeDelay

func (s *Chat) GetSlowModeDelay() OptInt

GetSlowModeDelay returns the value of SlowModeDelay.

func (*Chat) GetStickerSetName

func (s *Chat) GetStickerSetName() OptString

GetStickerSetName returns the value of StickerSetName.

func (*Chat) GetTitle

func (s *Chat) GetTitle() OptString

GetTitle returns the value of Title.

func (*Chat) GetType

func (s *Chat) GetType() ChatType

GetType returns the value of Type.

func (*Chat) GetUsername

func (s *Chat) GetUsername() OptString

GetUsername returns the value of Username.

func (*Chat) MarshalJSON

func (s *Chat) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Chat) SetActiveUsernames

func (s *Chat) SetActiveUsernames(val []string)

SetActiveUsernames sets the value of ActiveUsernames.

func (*Chat) SetAllMembersAreAdministrators

func (s *Chat) SetAllMembersAreAdministrators(val OptBool)

SetAllMembersAreAdministrators sets the value of AllMembersAreAdministrators.

func (*Chat) SetBio

func (s *Chat) SetBio(val OptString)

SetBio sets the value of Bio.

func (*Chat) SetCanSetStickerSet

func (s *Chat) SetCanSetStickerSet(val OptBool)

SetCanSetStickerSet sets the value of CanSetStickerSet.

func (*Chat) SetDescription

func (s *Chat) SetDescription(val OptString)

SetDescription sets the value of Description.

func (*Chat) SetEmojiStatusCustomEmojiID

func (s *Chat) SetEmojiStatusCustomEmojiID(val OptString)

SetEmojiStatusCustomEmojiID sets the value of EmojiStatusCustomEmojiID.

func (*Chat) SetFirstName

func (s *Chat) SetFirstName(val OptString)

SetFirstName sets the value of FirstName.

func (*Chat) SetHasAggressiveAntiSpamEnabled

func (s *Chat) SetHasAggressiveAntiSpamEnabled(val OptBool)

SetHasAggressiveAntiSpamEnabled sets the value of HasAggressiveAntiSpamEnabled.

func (*Chat) SetHasHiddenMembers

func (s *Chat) SetHasHiddenMembers(val OptBool)

SetHasHiddenMembers sets the value of HasHiddenMembers.

func (*Chat) SetHasPrivateForwards

func (s *Chat) SetHasPrivateForwards(val OptBool)

SetHasPrivateForwards sets the value of HasPrivateForwards.

func (*Chat) SetHasProtectedContent

func (s *Chat) SetHasProtectedContent(val OptBool)

SetHasProtectedContent sets the value of HasProtectedContent.

func (*Chat) SetHasRestrictedVoiceAndVideoMessages

func (s *Chat) SetHasRestrictedVoiceAndVideoMessages(val OptBool)

SetHasRestrictedVoiceAndVideoMessages sets the value of HasRestrictedVoiceAndVideoMessages.

func (*Chat) SetID

func (s *Chat) SetID(val int64)

SetID sets the value of ID.

func (s *Chat) SetInviteLink(val OptString)

SetInviteLink sets the value of InviteLink.

func (*Chat) SetIsForum

func (s *Chat) SetIsForum(val OptBool)

SetIsForum sets the value of IsForum.

func (*Chat) SetJoinByRequest

func (s *Chat) SetJoinByRequest(val OptBool)

SetJoinByRequest sets the value of JoinByRequest.

func (*Chat) SetJoinToSendMessages

func (s *Chat) SetJoinToSendMessages(val OptBool)

SetJoinToSendMessages sets the value of JoinToSendMessages.

func (*Chat) SetLastName

func (s *Chat) SetLastName(val OptString)

SetLastName sets the value of LastName.

func (*Chat) SetLinkedChatID

func (s *Chat) SetLinkedChatID(val OptInt64)

SetLinkedChatID sets the value of LinkedChatID.

func (*Chat) SetLocation

func (s *Chat) SetLocation(val OptChatLocation)

SetLocation sets the value of Location.

func (*Chat) SetMessageAutoDeleteTime

func (s *Chat) SetMessageAutoDeleteTime(val OptInt)

SetMessageAutoDeleteTime sets the value of MessageAutoDeleteTime.

func (*Chat) SetPermissions

func (s *Chat) SetPermissions(val OptChatPermissions)

SetPermissions sets the value of Permissions.

func (*Chat) SetPhoto

func (s *Chat) SetPhoto(val OptChatPhoto)

SetPhoto sets the value of Photo.

func (*Chat) SetPinnedMessage

func (s *Chat) SetPinnedMessage(val *Message)

SetPinnedMessage sets the value of PinnedMessage.

func (*Chat) SetSlowModeDelay

func (s *Chat) SetSlowModeDelay(val OptInt)

SetSlowModeDelay sets the value of SlowModeDelay.

func (*Chat) SetStickerSetName

func (s *Chat) SetStickerSetName(val OptString)

SetStickerSetName sets the value of StickerSetName.

func (*Chat) SetTitle

func (s *Chat) SetTitle(val OptString)

SetTitle sets the value of Title.

func (*Chat) SetType

func (s *Chat) SetType(val ChatType)

SetType sets the value of Type.

func (*Chat) SetUsername

func (s *Chat) SetUsername(val OptString)

SetUsername sets the value of Username.

func (*Chat) UnmarshalJSON

func (s *Chat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Chat) Validate

func (s *Chat) Validate() error

type ChatAdministratorRights

type ChatAdministratorRights struct {
	// _True_, if the user's presence in the chat is hidden.
	IsAnonymous bool `json:"is_anonymous"`
	// _True_, if the administrator can access the chat event log, chat statistics, message statistics in
	// channels, see channel members, see anonymous administrators in supergroups and ignore slow mode.
	// Implied by any other administrator privilege.
	CanManageChat bool `json:"can_manage_chat"`
	// _True_, if the administrator can delete messages of other users.
	CanDeleteMessages bool `json:"can_delete_messages"`
	// _True_, if the administrator can manage video chats.
	CanManageVideoChats bool `json:"can_manage_video_chats"`
	// _True_, if the administrator can restrict, ban or unban chat members.
	CanRestrictMembers bool `json:"can_restrict_members"`
	// _True_, if the administrator can add new administrators with a subset of their own privileges or
	// demote administrators that they have promoted, directly or indirectly (promoted by administrators
	// that were appointed by the user).
	CanPromoteMembers bool `json:"can_promote_members"`
	// _True_, if the user is allowed to change the chat title, photo and other settings.
	CanChangeInfo bool `json:"can_change_info"`
	// _True_, if the user is allowed to invite new users to the chat.
	CanInviteUsers bool `json:"can_invite_users"`
	// _Optional_. _True_, if the administrator can post in the channel; channels only.
	CanPostMessages OptBool `json:"can_post_messages"`
	// _Optional_. _True_, if the administrator can edit messages of other users and can pin messages;
	// channels only.
	CanEditMessages OptBool `json:"can_edit_messages"`
	// _Optional_. _True_, if the user is allowed to pin messages; groups and supergroups only.
	CanPinMessages OptBool `json:"can_pin_messages"`
	// _Optional_. _True_, if the user is allowed to create, rename, close, and reopen forum topics;
	// supergroups only.
	CanManageTopics OptBool `json:"can_manage_topics"`
}

Represents the rights of an administrator in a chat. Ref: #/components/schemas/ChatAdministratorRights

func (*ChatAdministratorRights) Decode

func (s *ChatAdministratorRights) Decode(d *jx.Decoder) error

Decode decodes ChatAdministratorRights from json.

func (*ChatAdministratorRights) Encode

func (s *ChatAdministratorRights) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChatAdministratorRights) GetCanChangeInfo

func (s *ChatAdministratorRights) GetCanChangeInfo() bool

GetCanChangeInfo returns the value of CanChangeInfo.

func (*ChatAdministratorRights) GetCanDeleteMessages

func (s *ChatAdministratorRights) GetCanDeleteMessages() bool

GetCanDeleteMessages returns the value of CanDeleteMessages.

func (*ChatAdministratorRights) GetCanEditMessages

func (s *ChatAdministratorRights) GetCanEditMessages() OptBool

GetCanEditMessages returns the value of CanEditMessages.

func (*ChatAdministratorRights) GetCanInviteUsers

func (s *ChatAdministratorRights) GetCanInviteUsers() bool

GetCanInviteUsers returns the value of CanInviteUsers.

func (*ChatAdministratorRights) GetCanManageChat

func (s *ChatAdministratorRights) GetCanManageChat() bool

GetCanManageChat returns the value of CanManageChat.

func (*ChatAdministratorRights) GetCanManageTopics

func (s *ChatAdministratorRights) GetCanManageTopics() OptBool

GetCanManageTopics returns the value of CanManageTopics.

func (*ChatAdministratorRights) GetCanManageVideoChats

func (s *ChatAdministratorRights) GetCanManageVideoChats() bool

GetCanManageVideoChats returns the value of CanManageVideoChats.

func (*ChatAdministratorRights) GetCanPinMessages

func (s *ChatAdministratorRights) GetCanPinMessages() OptBool

GetCanPinMessages returns the value of CanPinMessages.

func (*ChatAdministratorRights) GetCanPostMessages

func (s *ChatAdministratorRights) GetCanPostMessages() OptBool

GetCanPostMessages returns the value of CanPostMessages.

func (*ChatAdministratorRights) GetCanPromoteMembers

func (s *ChatAdministratorRights) GetCanPromoteMembers() bool

GetCanPromoteMembers returns the value of CanPromoteMembers.

func (*ChatAdministratorRights) GetCanRestrictMembers

func (s *ChatAdministratorRights) GetCanRestrictMembers() bool

GetCanRestrictMembers returns the value of CanRestrictMembers.

func (*ChatAdministratorRights) GetIsAnonymous

func (s *ChatAdministratorRights) GetIsAnonymous() bool

GetIsAnonymous returns the value of IsAnonymous.

func (*ChatAdministratorRights) MarshalJSON

func (s *ChatAdministratorRights) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChatAdministratorRights) SetCanChangeInfo

func (s *ChatAdministratorRights) SetCanChangeInfo(val bool)

SetCanChangeInfo sets the value of CanChangeInfo.

func (*ChatAdministratorRights) SetCanDeleteMessages

func (s *ChatAdministratorRights) SetCanDeleteMessages(val bool)

SetCanDeleteMessages sets the value of CanDeleteMessages.

func (*ChatAdministratorRights) SetCanEditMessages

func (s *ChatAdministratorRights) SetCanEditMessages(val OptBool)

SetCanEditMessages sets the value of CanEditMessages.

func (*ChatAdministratorRights) SetCanInviteUsers

func (s *ChatAdministratorRights) SetCanInviteUsers(val bool)

SetCanInviteUsers sets the value of CanInviteUsers.

func (*ChatAdministratorRights) SetCanManageChat

func (s *ChatAdministratorRights) SetCanManageChat(val bool)

SetCanManageChat sets the value of CanManageChat.

func (*ChatAdministratorRights) SetCanManageTopics

func (s *ChatAdministratorRights) SetCanManageTopics(val OptBool)

SetCanManageTopics sets the value of CanManageTopics.

func (*ChatAdministratorRights) SetCanManageVideoChats

func (s *ChatAdministratorRights) SetCanManageVideoChats(val bool)

SetCanManageVideoChats sets the value of CanManageVideoChats.

func (*ChatAdministratorRights) SetCanPinMessages

func (s *ChatAdministratorRights) SetCanPinMessages(val OptBool)

SetCanPinMessages sets the value of CanPinMessages.

func (*ChatAdministratorRights) SetCanPostMessages

func (s *ChatAdministratorRights) SetCanPostMessages(val OptBool)

SetCanPostMessages sets the value of CanPostMessages.

func (*ChatAdministratorRights) SetCanPromoteMembers

func (s *ChatAdministratorRights) SetCanPromoteMembers(val bool)

SetCanPromoteMembers sets the value of CanPromoteMembers.

func (*ChatAdministratorRights) SetCanRestrictMembers

func (s *ChatAdministratorRights) SetCanRestrictMembers(val bool)

SetCanRestrictMembers sets the value of CanRestrictMembers.

func (*ChatAdministratorRights) SetIsAnonymous

func (s *ChatAdministratorRights) SetIsAnonymous(val bool)

SetIsAnonymous sets the value of IsAnonymous.

func (*ChatAdministratorRights) UnmarshalJSON

func (s *ChatAdministratorRights) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ChatInviteLink struct {
	// The invite link. If the link was created by another chat administrator, then the second part of
	// the link will be replaced with `...`.
	InviteLink string `json:"invite_link"`
	Creator    User   `json:"creator"`
	// _True_, if users joining the chat via the link need to be approved by chat administrators.
	CreatesJoinRequest bool `json:"creates_join_request"`
	// _True_, if the link is primary.
	IsPrimary bool `json:"is_primary"`
	// _True_, if the link is revoked.
	IsRevoked bool `json:"is_revoked"`
	// _Optional_. Invite link name.
	Name OptString `json:"name"`
	// _Optional_. Point in time (Unix timestamp) when the link will expire or has been expired.
	ExpireDate OptInt `json:"expire_date"`
	// _Optional_. The maximum number of users that can be members of the chat simultaneously after
	// joining the chat via this invite link; 1-99999.
	MemberLimit OptInt `json:"member_limit"`
	// _Optional_. Number of pending join requests created using this link.
	PendingJoinRequestCount OptInt `json:"pending_join_request_count"`
}

Represents an invite link for a chat. Ref: #/components/schemas/ChatInviteLink

func (*ChatInviteLink) Decode

func (s *ChatInviteLink) Decode(d *jx.Decoder) error

Decode decodes ChatInviteLink from json.

func (*ChatInviteLink) Encode

func (s *ChatInviteLink) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChatInviteLink) GetCreatesJoinRequest

func (s *ChatInviteLink) GetCreatesJoinRequest() bool

GetCreatesJoinRequest returns the value of CreatesJoinRequest.

func (*ChatInviteLink) GetCreator

func (s *ChatInviteLink) GetCreator() User

GetCreator returns the value of Creator.

func (*ChatInviteLink) GetExpireDate

func (s *ChatInviteLink) GetExpireDate() OptInt

GetExpireDate returns the value of ExpireDate.

func (s *ChatInviteLink) GetInviteLink() string

GetInviteLink returns the value of InviteLink.

func (*ChatInviteLink) GetIsPrimary

func (s *ChatInviteLink) GetIsPrimary() bool

GetIsPrimary returns the value of IsPrimary.

func (*ChatInviteLink) GetIsRevoked

func (s *ChatInviteLink) GetIsRevoked() bool

GetIsRevoked returns the value of IsRevoked.

func (*ChatInviteLink) GetMemberLimit

func (s *ChatInviteLink) GetMemberLimit() OptInt

GetMemberLimit returns the value of MemberLimit.

func (*ChatInviteLink) GetName

func (s *ChatInviteLink) GetName() OptString

GetName returns the value of Name.

func (*ChatInviteLink) GetPendingJoinRequestCount

func (s *ChatInviteLink) GetPendingJoinRequestCount() OptInt

GetPendingJoinRequestCount returns the value of PendingJoinRequestCount.

func (*ChatInviteLink) MarshalJSON

func (s *ChatInviteLink) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChatInviteLink) SetCreatesJoinRequest

func (s *ChatInviteLink) SetCreatesJoinRequest(val bool)

SetCreatesJoinRequest sets the value of CreatesJoinRequest.

func (*ChatInviteLink) SetCreator

func (s *ChatInviteLink) SetCreator(val User)

SetCreator sets the value of Creator.

func (*ChatInviteLink) SetExpireDate

func (s *ChatInviteLink) SetExpireDate(val OptInt)

SetExpireDate sets the value of ExpireDate.

func (s *ChatInviteLink) SetInviteLink(val string)

SetInviteLink sets the value of InviteLink.

func (*ChatInviteLink) SetIsPrimary

func (s *ChatInviteLink) SetIsPrimary(val bool)

SetIsPrimary sets the value of IsPrimary.

func (*ChatInviteLink) SetIsRevoked

func (s *ChatInviteLink) SetIsRevoked(val bool)

SetIsRevoked sets the value of IsRevoked.

func (*ChatInviteLink) SetMemberLimit

func (s *ChatInviteLink) SetMemberLimit(val OptInt)

SetMemberLimit sets the value of MemberLimit.

func (*ChatInviteLink) SetName

func (s *ChatInviteLink) SetName(val OptString)

SetName sets the value of Name.

func (*ChatInviteLink) SetPendingJoinRequestCount

func (s *ChatInviteLink) SetPendingJoinRequestCount(val OptInt)

SetPendingJoinRequestCount sets the value of PendingJoinRequestCount.

func (*ChatInviteLink) UnmarshalJSON

func (s *ChatInviteLink) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ChatInviteLink) Validate

func (s *ChatInviteLink) Validate() error

type ChatJoinRequest

type ChatJoinRequest struct {
	Chat Chat `json:"chat"`
	From User `json:"from"`
	// Identifier of a private chat with the user who sent the join request. This number may have more
	// than 32 significant bits and some programming languages may have difficulty/silent defects in
	// interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision
	// float type are safe for storing this identifier. The bot can use this identifier for 24 hours to
	// send messages until the join request is processed, assuming no other administrator contacted the
	// user.
	UserChatID int64 `json:"user_chat_id"`
	// Date the request was sent in Unix time.
	Date int `json:"date"`
	// _Optional_. Bio of the user.
	Bio        OptString         `json:"bio"`
	InviteLink OptChatInviteLink `json:"invite_link"`
}

Represents a join request sent to a chat. Ref: #/components/schemas/ChatJoinRequest

func (*ChatJoinRequest) Decode

func (s *ChatJoinRequest) Decode(d *jx.Decoder) error

Decode decodes ChatJoinRequest from json.

func (*ChatJoinRequest) Encode

func (s *ChatJoinRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChatJoinRequest) GetBio

func (s *ChatJoinRequest) GetBio() OptString

GetBio returns the value of Bio.

func (*ChatJoinRequest) GetChat

func (s *ChatJoinRequest) GetChat() Chat

GetChat returns the value of Chat.

func (*ChatJoinRequest) GetDate

func (s *ChatJoinRequest) GetDate() int

GetDate returns the value of Date.

func (*ChatJoinRequest) GetFrom

func (s *ChatJoinRequest) GetFrom() User

GetFrom returns the value of From.

func (s *ChatJoinRequest) GetInviteLink() OptChatInviteLink

GetInviteLink returns the value of InviteLink.

func (*ChatJoinRequest) GetUserChatID

func (s *ChatJoinRequest) GetUserChatID() int64

GetUserChatID returns the value of UserChatID.

func (*ChatJoinRequest) MarshalJSON

func (s *ChatJoinRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChatJoinRequest) SetBio

func (s *ChatJoinRequest) SetBio(val OptString)

SetBio sets the value of Bio.

func (*ChatJoinRequest) SetChat

func (s *ChatJoinRequest) SetChat(val Chat)

SetChat sets the value of Chat.

func (*ChatJoinRequest) SetDate

func (s *ChatJoinRequest) SetDate(val int)

SetDate sets the value of Date.

func (*ChatJoinRequest) SetFrom

func (s *ChatJoinRequest) SetFrom(val User)

SetFrom sets the value of From.

func (s *ChatJoinRequest) SetInviteLink(val OptChatInviteLink)

SetInviteLink sets the value of InviteLink.

func (*ChatJoinRequest) SetUserChatID

func (s *ChatJoinRequest) SetUserChatID(val int64)

SetUserChatID sets the value of UserChatID.

func (*ChatJoinRequest) UnmarshalJSON

func (s *ChatJoinRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ChatJoinRequest) Validate

func (s *ChatJoinRequest) Validate() error

type ChatLocation

type ChatLocation struct {
	Location Location `json:"location"`
	// Location address; 1-64 characters, as defined by the chat owner.
	Address string `json:"address"`
}

Represents a location to which a chat is connected. Ref: #/components/schemas/ChatLocation

func (*ChatLocation) Decode

func (s *ChatLocation) Decode(d *jx.Decoder) error

Decode decodes ChatLocation from json.

func (*ChatLocation) Encode

func (s *ChatLocation) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChatLocation) GetAddress

func (s *ChatLocation) GetAddress() string

GetAddress returns the value of Address.

func (*ChatLocation) GetLocation

func (s *ChatLocation) GetLocation() Location

GetLocation returns the value of Location.

func (*ChatLocation) MarshalJSON

func (s *ChatLocation) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChatLocation) SetAddress

func (s *ChatLocation) SetAddress(val string)

SetAddress sets the value of Address.

func (*ChatLocation) SetLocation

func (s *ChatLocation) SetLocation(val Location)

SetLocation sets the value of Location.

func (*ChatLocation) UnmarshalJSON

func (s *ChatLocation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ChatLocation) Validate

func (s *ChatLocation) Validate() error

type ChatMember

type ChatMember struct {
	Type                    ChatMemberType // switch on this field
	ChatMemberOwner         ChatMemberOwner
	ChatMemberAdministrator ChatMemberAdministrator
	ChatMemberMember        ChatMemberMember
	ChatMemberRestricted    ChatMemberRestricted
	ChatMemberLeft          ChatMemberLeft
	ChatMemberBanned        ChatMemberBanned
}

This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:. Ref: #/components/schemas/ChatMember ChatMember represents sum type.

func NewChatMemberAdministratorChatMember

func NewChatMemberAdministratorChatMember(v ChatMemberAdministrator) ChatMember

NewChatMemberAdministratorChatMember returns new ChatMember from ChatMemberAdministrator.

func NewChatMemberBannedChatMember

func NewChatMemberBannedChatMember(v ChatMemberBanned) ChatMember

NewChatMemberBannedChatMember returns new ChatMember from ChatMemberBanned.

func NewChatMemberLeftChatMember

func NewChatMemberLeftChatMember(v ChatMemberLeft) ChatMember

NewChatMemberLeftChatMember returns new ChatMember from ChatMemberLeft.

func NewChatMemberMemberChatMember

func NewChatMemberMemberChatMember(v ChatMemberMember) ChatMember

NewChatMemberMemberChatMember returns new ChatMember from ChatMemberMember.

func NewChatMemberOwnerChatMember

func NewChatMemberOwnerChatMember(v ChatMemberOwner) ChatMember

NewChatMemberOwnerChatMember returns new ChatMember from ChatMemberOwner.

func NewChatMemberRestrictedChatMember

func NewChatMemberRestrictedChatMember(v ChatMemberRestricted) ChatMember

NewChatMemberRestrictedChatMember returns new ChatMember from ChatMemberRestricted.

func (*ChatMember) Decode

func (s *ChatMember) Decode(d *jx.Decoder) error

Decode decodes ChatMember from json.

func (ChatMember) Encode

func (s ChatMember) Encode(e *jx.Encoder)

Encode encodes ChatMember as json.

func (ChatMember) GetChatMemberAdministrator

func (s ChatMember) GetChatMemberAdministrator() (v ChatMemberAdministrator, ok bool)

GetChatMemberAdministrator returns ChatMemberAdministrator and true boolean if ChatMember is ChatMemberAdministrator.

func (ChatMember) GetChatMemberBanned

func (s ChatMember) GetChatMemberBanned() (v ChatMemberBanned, ok bool)

GetChatMemberBanned returns ChatMemberBanned and true boolean if ChatMember is ChatMemberBanned.

func (ChatMember) GetChatMemberLeft

func (s ChatMember) GetChatMemberLeft() (v ChatMemberLeft, ok bool)

GetChatMemberLeft returns ChatMemberLeft and true boolean if ChatMember is ChatMemberLeft.

func (ChatMember) GetChatMemberMember

func (s ChatMember) GetChatMemberMember() (v ChatMemberMember, ok bool)

GetChatMemberMember returns ChatMemberMember and true boolean if ChatMember is ChatMemberMember.

func (ChatMember) GetChatMemberOwner

func (s ChatMember) GetChatMemberOwner() (v ChatMemberOwner, ok bool)

GetChatMemberOwner returns ChatMemberOwner and true boolean if ChatMember is ChatMemberOwner.

func (ChatMember) GetChatMemberRestricted

func (s ChatMember) GetChatMemberRestricted() (v ChatMemberRestricted, ok bool)

GetChatMemberRestricted returns ChatMemberRestricted and true boolean if ChatMember is ChatMemberRestricted.

func (ChatMember) IsChatMemberAdministrator

func (s ChatMember) IsChatMemberAdministrator() bool

IsChatMemberAdministrator reports whether ChatMember is ChatMemberAdministrator.

func (ChatMember) IsChatMemberBanned

func (s ChatMember) IsChatMemberBanned() bool

IsChatMemberBanned reports whether ChatMember is ChatMemberBanned.

func (ChatMember) IsChatMemberLeft

func (s ChatMember) IsChatMemberLeft() bool

IsChatMemberLeft reports whether ChatMember is ChatMemberLeft.

func (ChatMember) IsChatMemberMember

func (s ChatMember) IsChatMemberMember() bool

IsChatMemberMember reports whether ChatMember is ChatMemberMember.

func (ChatMember) IsChatMemberOwner

func (s ChatMember) IsChatMemberOwner() bool

IsChatMemberOwner reports whether ChatMember is ChatMemberOwner.

func (ChatMember) IsChatMemberRestricted

func (s ChatMember) IsChatMemberRestricted() bool

IsChatMemberRestricted reports whether ChatMember is ChatMemberRestricted.

func (ChatMember) MarshalJSON

func (s ChatMember) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChatMember) SetChatMemberAdministrator

func (s *ChatMember) SetChatMemberAdministrator(v ChatMemberAdministrator)

SetChatMemberAdministrator sets ChatMember to ChatMemberAdministrator.

func (*ChatMember) SetChatMemberBanned

func (s *ChatMember) SetChatMemberBanned(v ChatMemberBanned)

SetChatMemberBanned sets ChatMember to ChatMemberBanned.

func (*ChatMember) SetChatMemberLeft

func (s *ChatMember) SetChatMemberLeft(v ChatMemberLeft)

SetChatMemberLeft sets ChatMember to ChatMemberLeft.

func (*ChatMember) SetChatMemberMember

func (s *ChatMember) SetChatMemberMember(v ChatMemberMember)

SetChatMemberMember sets ChatMember to ChatMemberMember.

func (*ChatMember) SetChatMemberOwner

func (s *ChatMember) SetChatMemberOwner(v ChatMemberOwner)

SetChatMemberOwner sets ChatMember to ChatMemberOwner.

func (*ChatMember) SetChatMemberRestricted

func (s *ChatMember) SetChatMemberRestricted(v ChatMemberRestricted)

SetChatMemberRestricted sets ChatMember to ChatMemberRestricted.

func (*ChatMember) UnmarshalJSON

func (s *ChatMember) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ChatMemberAdministrator

type ChatMemberAdministrator struct {
	// The member's status in the chat, always `administrator`.
	Status string `json:"status"`
	User   User   `json:"user"`
	// _True_, if the bot is allowed to edit administrator privileges of that user.
	CanBeEdited bool `json:"can_be_edited"`
	// _True_, if the user's presence in the chat is hidden.
	IsAnonymous bool `json:"is_anonymous"`
	// _True_, if the administrator can access the chat event log, chat statistics, message statistics in
	// channels, see channel members, see anonymous administrators in supergroups and ignore slow mode.
	// Implied by any other administrator privilege.
	CanManageChat bool `json:"can_manage_chat"`
	// _True_, if the administrator can delete messages of other users.
	CanDeleteMessages bool `json:"can_delete_messages"`
	// _True_, if the administrator can manage video chats.
	CanManageVideoChats bool `json:"can_manage_video_chats"`
	// _True_, if the administrator can restrict, ban or unban chat members.
	CanRestrictMembers bool `json:"can_restrict_members"`
	// _True_, if the administrator can add new administrators with a subset of their own privileges or
	// demote administrators that they have promoted, directly or indirectly (promoted by administrators
	// that were appointed by the user).
	CanPromoteMembers bool `json:"can_promote_members"`
	// _True_, if the user is allowed to change the chat title, photo and other settings.
	CanChangeInfo bool `json:"can_change_info"`
	// _True_, if the user is allowed to invite new users to the chat.
	CanInviteUsers bool `json:"can_invite_users"`
	// _Optional_. _True_, if the administrator can post in the channel; channels only.
	CanPostMessages OptBool `json:"can_post_messages"`
	// _Optional_. _True_, if the administrator can edit messages of other users and can pin messages;
	// channels only.
	CanEditMessages OptBool `json:"can_edit_messages"`
	// _Optional_. _True_, if the user is allowed to pin messages; groups and supergroups only.
	CanPinMessages OptBool `json:"can_pin_messages"`
	// _Optional_. _True_, if the user is allowed to create, rename, close, and reopen forum topics;
	// supergroups only.
	CanManageTopics OptBool `json:"can_manage_topics"`
	// _Optional_. Custom title for this user.
	CustomTitle OptString `json:"custom_title"`
}

Represents a [chat member](https://core.telegram.org/bots/api#chatmember) that has some additional privileges. Ref: #/components/schemas/ChatMemberAdministrator

func (*ChatMemberAdministrator) Decode

func (s *ChatMemberAdministrator) Decode(d *jx.Decoder) error

Decode decodes ChatMemberAdministrator from json.

func (*ChatMemberAdministrator) Encode

func (s *ChatMemberAdministrator) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChatMemberAdministrator) GetCanBeEdited

func (s *ChatMemberAdministrator) GetCanBeEdited() bool

GetCanBeEdited returns the value of CanBeEdited.

func (*ChatMemberAdministrator) GetCanChangeInfo

func (s *ChatMemberAdministrator) GetCanChangeInfo() bool

GetCanChangeInfo returns the value of CanChangeInfo.

func (*ChatMemberAdministrator) GetCanDeleteMessages

func (s *ChatMemberAdministrator) GetCanDeleteMessages() bool

GetCanDeleteMessages returns the value of CanDeleteMessages.

func (*ChatMemberAdministrator) GetCanEditMessages

func (s *ChatMemberAdministrator) GetCanEditMessages() OptBool

GetCanEditMessages returns the value of CanEditMessages.

func (*ChatMemberAdministrator) GetCanInviteUsers

func (s *ChatMemberAdministrator) GetCanInviteUsers() bool

GetCanInviteUsers returns the value of CanInviteUsers.

func (*ChatMemberAdministrator) GetCanManageChat

func (s *ChatMemberAdministrator) GetCanManageChat() bool

GetCanManageChat returns the value of CanManageChat.

func (*ChatMemberAdministrator) GetCanManageTopics

func (s *ChatMemberAdministrator) GetCanManageTopics() OptBool

GetCanManageTopics returns the value of CanManageTopics.

func (*ChatMemberAdministrator) GetCanManageVideoChats

func (s *ChatMemberAdministrator) GetCanManageVideoChats() bool

GetCanManageVideoChats returns the value of CanManageVideoChats.

func (*ChatMemberAdministrator) GetCanPinMessages

func (s *ChatMemberAdministrator) GetCanPinMessages() OptBool

GetCanPinMessages returns the value of CanPinMessages.

func (*ChatMemberAdministrator) GetCanPostMessages

func (s *ChatMemberAdministrator) GetCanPostMessages() OptBool

GetCanPostMessages returns the value of CanPostMessages.

func (*ChatMemberAdministrator) GetCanPromoteMembers

func (s *ChatMemberAdministrator) GetCanPromoteMembers() bool

GetCanPromoteMembers returns the value of CanPromoteMembers.

func (*ChatMemberAdministrator) GetCanRestrictMembers

func (s *ChatMemberAdministrator) GetCanRestrictMembers() bool

GetCanRestrictMembers returns the value of CanRestrictMembers.

func (*ChatMemberAdministrator) GetCustomTitle

func (s *ChatMemberAdministrator) GetCustomTitle() OptString

GetCustomTitle returns the value of CustomTitle.

func (*ChatMemberAdministrator) GetIsAnonymous

func (s *ChatMemberAdministrator) GetIsAnonymous() bool

GetIsAnonymous returns the value of IsAnonymous.

func (*ChatMemberAdministrator) GetStatus

func (s *ChatMemberAdministrator) GetStatus() string

GetStatus returns the value of Status.

func (*ChatMemberAdministrator) GetUser

func (s *ChatMemberAdministrator) GetUser() User

GetUser returns the value of User.

func (*ChatMemberAdministrator) MarshalJSON

func (s *ChatMemberAdministrator) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChatMemberAdministrator) SetCanBeEdited

func (s *ChatMemberAdministrator) SetCanBeEdited(val bool)

SetCanBeEdited sets the value of CanBeEdited.

func (*ChatMemberAdministrator) SetCanChangeInfo

func (s *ChatMemberAdministrator) SetCanChangeInfo(val bool)

SetCanChangeInfo sets the value of CanChangeInfo.

func (*ChatMemberAdministrator) SetCanDeleteMessages

func (s *ChatMemberAdministrator) SetCanDeleteMessages(val bool)

SetCanDeleteMessages sets the value of CanDeleteMessages.

func (*ChatMemberAdministrator) SetCanEditMessages

func (s *ChatMemberAdministrator) SetCanEditMessages(val OptBool)

SetCanEditMessages sets the value of CanEditMessages.

func (*ChatMemberAdministrator) SetCanInviteUsers

func (s *ChatMemberAdministrator) SetCanInviteUsers(val bool)

SetCanInviteUsers sets the value of CanInviteUsers.

func (*ChatMemberAdministrator) SetCanManageChat

func (s *ChatMemberAdministrator) SetCanManageChat(val bool)

SetCanManageChat sets the value of CanManageChat.

func (*ChatMemberAdministrator) SetCanManageTopics

func (s *ChatMemberAdministrator) SetCanManageTopics(val OptBool)

SetCanManageTopics sets the value of CanManageTopics.

func (*ChatMemberAdministrator) SetCanManageVideoChats

func (s *ChatMemberAdministrator) SetCanManageVideoChats(val bool)

SetCanManageVideoChats sets the value of CanManageVideoChats.

func (*ChatMemberAdministrator) SetCanPinMessages

func (s *ChatMemberAdministrator) SetCanPinMessages(val OptBool)

SetCanPinMessages sets the value of CanPinMessages.

func (*ChatMemberAdministrator) SetCanPostMessages

func (s *ChatMemberAdministrator) SetCanPostMessages(val OptBool)

SetCanPostMessages sets the value of CanPostMessages.

func (*ChatMemberAdministrator) SetCanPromoteMembers

func (s *ChatMemberAdministrator) SetCanPromoteMembers(val bool)

SetCanPromoteMembers sets the value of CanPromoteMembers.

func (*ChatMemberAdministrator) SetCanRestrictMembers

func (s *ChatMemberAdministrator) SetCanRestrictMembers(val bool)

SetCanRestrictMembers sets the value of CanRestrictMembers.

func (*ChatMemberAdministrator) SetCustomTitle

func (s *ChatMemberAdministrator) SetCustomTitle(val OptString)

SetCustomTitle sets the value of CustomTitle.

func (*ChatMemberAdministrator) SetIsAnonymous

func (s *ChatMemberAdministrator) SetIsAnonymous(val bool)

SetIsAnonymous sets the value of IsAnonymous.

func (*ChatMemberAdministrator) SetStatus

func (s *ChatMemberAdministrator) SetStatus(val string)

SetStatus sets the value of Status.

func (*ChatMemberAdministrator) SetUser

func (s *ChatMemberAdministrator) SetUser(val User)

SetUser sets the value of User.

func (*ChatMemberAdministrator) UnmarshalJSON

func (s *ChatMemberAdministrator) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ChatMemberBanned

type ChatMemberBanned struct {
	// The member's status in the chat, always `kicked`.
	Status string `json:"status"`
	User   User   `json:"user"`
	// Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned
	// forever.
	UntilDate int `json:"until_date"`
}

Represents a [chat member](https://core.telegram.org/bots/api#chatmember) that was banned in the chat and can't return to the chat or view chat messages. Ref: #/components/schemas/ChatMemberBanned

func (*ChatMemberBanned) Decode

func (s *ChatMemberBanned) Decode(d *jx.Decoder) error

Decode decodes ChatMemberBanned from json.

func (*ChatMemberBanned) Encode

func (s *ChatMemberBanned) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChatMemberBanned) GetStatus

func (s *ChatMemberBanned) GetStatus() string

GetStatus returns the value of Status.

func (*ChatMemberBanned) GetUntilDate

func (s *ChatMemberBanned) GetUntilDate() int

GetUntilDate returns the value of UntilDate.

func (*ChatMemberBanned) GetUser

func (s *ChatMemberBanned) GetUser() User

GetUser returns the value of User.

func (*ChatMemberBanned) MarshalJSON

func (s *ChatMemberBanned) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChatMemberBanned) SetStatus

func (s *ChatMemberBanned) SetStatus(val string)

SetStatus sets the value of Status.

func (*ChatMemberBanned) SetUntilDate

func (s *ChatMemberBanned) SetUntilDate(val int)

SetUntilDate sets the value of UntilDate.

func (*ChatMemberBanned) SetUser

func (s *ChatMemberBanned) SetUser(val User)

SetUser sets the value of User.

func (*ChatMemberBanned) UnmarshalJSON

func (s *ChatMemberBanned) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ChatMemberLeft

type ChatMemberLeft struct {
	// The member's status in the chat, always `left`.
	Status string `json:"status"`
	User   User   `json:"user"`
}

Represents a [chat member](https://core.telegram.org/bots/api#chatmember) that isn't currently a member of the chat, but may join it themselves. Ref: #/components/schemas/ChatMemberLeft

func (*ChatMemberLeft) Decode

func (s *ChatMemberLeft) Decode(d *jx.Decoder) error

Decode decodes ChatMemberLeft from json.

func (*ChatMemberLeft) Encode

func (s *ChatMemberLeft) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChatMemberLeft) GetStatus

func (s *ChatMemberLeft) GetStatus() string

GetStatus returns the value of Status.

func (*ChatMemberLeft) GetUser

func (s *ChatMemberLeft) GetUser() User

GetUser returns the value of User.

func (*ChatMemberLeft) MarshalJSON

func (s *ChatMemberLeft) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChatMemberLeft) SetStatus

func (s *ChatMemberLeft) SetStatus(val string)

SetStatus sets the value of Status.

func (*ChatMemberLeft) SetUser

func (s *ChatMemberLeft) SetUser(val User)

SetUser sets the value of User.

func (*ChatMemberLeft) UnmarshalJSON

func (s *ChatMemberLeft) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ChatMemberMember

type ChatMemberMember struct {
	// The member's status in the chat, always `member`.
	Status string `json:"status"`
	User   User   `json:"user"`
}

Represents a [chat member](https://core.telegram.org/bots/api#chatmember) that has no additional privileges or restrictions. Ref: #/components/schemas/ChatMemberMember

func (*ChatMemberMember) Decode

func (s *ChatMemberMember) Decode(d *jx.Decoder) error

Decode decodes ChatMemberMember from json.

func (*ChatMemberMember) Encode

func (s *ChatMemberMember) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChatMemberMember) GetStatus

func (s *ChatMemberMember) GetStatus() string

GetStatus returns the value of Status.

func (*ChatMemberMember) GetUser

func (s *ChatMemberMember) GetUser() User

GetUser returns the value of User.

func (*ChatMemberMember) MarshalJSON

func (s *ChatMemberMember) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChatMemberMember) SetStatus

func (s *ChatMemberMember) SetStatus(val string)

SetStatus sets the value of Status.

func (*ChatMemberMember) SetUser

func (s *ChatMemberMember) SetUser(val User)

SetUser sets the value of User.

func (*ChatMemberMember) UnmarshalJSON

func (s *ChatMemberMember) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ChatMemberOwner

type ChatMemberOwner struct {
	// The member's status in the chat, always `creator`.
	Status string `json:"status"`
	User   User   `json:"user"`
	// _True_, if the user's presence in the chat is hidden.
	IsAnonymous bool `json:"is_anonymous"`
	// _Optional_. Custom title for this user.
	CustomTitle OptString `json:"custom_title"`
}

Represents a [chat member](https://core.telegram.org/bots/api#chatmember) that owns the chat and has all administrator privileges. Ref: #/components/schemas/ChatMemberOwner

func (*ChatMemberOwner) Decode

func (s *ChatMemberOwner) Decode(d *jx.Decoder) error

Decode decodes ChatMemberOwner from json.

func (*ChatMemberOwner) Encode

func (s *ChatMemberOwner) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChatMemberOwner) GetCustomTitle

func (s *ChatMemberOwner) GetCustomTitle() OptString

GetCustomTitle returns the value of CustomTitle.

func (*ChatMemberOwner) GetIsAnonymous

func (s *ChatMemberOwner) GetIsAnonymous() bool

GetIsAnonymous returns the value of IsAnonymous.

func (*ChatMemberOwner) GetStatus

func (s *ChatMemberOwner) GetStatus() string

GetStatus returns the value of Status.

func (*ChatMemberOwner) GetUser

func (s *ChatMemberOwner) GetUser() User

GetUser returns the value of User.

func (*ChatMemberOwner) MarshalJSON

func (s *ChatMemberOwner) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChatMemberOwner) SetCustomTitle

func (s *ChatMemberOwner) SetCustomTitle(val OptString)

SetCustomTitle sets the value of CustomTitle.

func (*ChatMemberOwner) SetIsAnonymous

func (s *ChatMemberOwner) SetIsAnonymous(val bool)

SetIsAnonymous sets the value of IsAnonymous.

func (*ChatMemberOwner) SetStatus

func (s *ChatMemberOwner) SetStatus(val string)

SetStatus sets the value of Status.

func (*ChatMemberOwner) SetUser

func (s *ChatMemberOwner) SetUser(val User)

SetUser sets the value of User.

func (*ChatMemberOwner) UnmarshalJSON

func (s *ChatMemberOwner) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ChatMemberRestricted

type ChatMemberRestricted struct {
	// The member's status in the chat, always `restricted`.
	Status string `json:"status"`
	User   User   `json:"user"`
	// _True_, if the user is a member of the chat at the moment of the request.
	IsMember bool `json:"is_member"`
	// _True_, if the user is allowed to send text messages, contacts, invoices, locations and venues.
	CanSendMessages bool `json:"can_send_messages"`
	// _True_, if the user is allowed to send audios.
	CanSendAudios bool `json:"can_send_audios"`
	// _True_, if the user is allowed to send documents.
	CanSendDocuments bool `json:"can_send_documents"`
	// _True_, if the user is allowed to send photos.
	CanSendPhotos bool `json:"can_send_photos"`
	// _True_, if the user is allowed to send videos.
	CanSendVideos bool `json:"can_send_videos"`
	// _True_, if the user is allowed to send video notes.
	CanSendVideoNotes bool `json:"can_send_video_notes"`
	// _True_, if the user is allowed to send voice notes.
	CanSendVoiceNotes bool `json:"can_send_voice_notes"`
	// _True_, if the user is allowed to send polls.
	CanSendPolls bool `json:"can_send_polls"`
	// _True_, if the user is allowed to send animations, games, stickers and use inline bots.
	CanSendOtherMessages bool `json:"can_send_other_messages"`
	// _True_, if the user is allowed to add web page previews to their messages.
	CanAddWebPagePreviews bool `json:"can_add_web_page_previews"`
	// _True_, if the user is allowed to change the chat title, photo and other settings.
	CanChangeInfo bool `json:"can_change_info"`
	// _True_, if the user is allowed to invite new users to the chat.
	CanInviteUsers bool `json:"can_invite_users"`
	// _True_, if the user is allowed to pin messages.
	CanPinMessages bool `json:"can_pin_messages"`
	// _True_, if the user is allowed to create forum topics.
	CanManageTopics bool `json:"can_manage_topics"`
	// Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted
	// forever.
	UntilDate int `json:"until_date"`
}

Represents a [chat member](https://core.telegram.org/bots/api#chatmember) that is under certain restrictions in the chat. Supergroups only. Ref: #/components/schemas/ChatMemberRestricted

func (*ChatMemberRestricted) Decode

func (s *ChatMemberRestricted) Decode(d *jx.Decoder) error

Decode decodes ChatMemberRestricted from json.

func (*ChatMemberRestricted) Encode

func (s *ChatMemberRestricted) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChatMemberRestricted) GetCanAddWebPagePreviews

func (s *ChatMemberRestricted) GetCanAddWebPagePreviews() bool

GetCanAddWebPagePreviews returns the value of CanAddWebPagePreviews.

func (*ChatMemberRestricted) GetCanChangeInfo

func (s *ChatMemberRestricted) GetCanChangeInfo() bool

GetCanChangeInfo returns the value of CanChangeInfo.

func (*ChatMemberRestricted) GetCanInviteUsers

func (s *ChatMemberRestricted) GetCanInviteUsers() bool

GetCanInviteUsers returns the value of CanInviteUsers.

func (*ChatMemberRestricted) GetCanManageTopics

func (s *ChatMemberRestricted) GetCanManageTopics() bool

GetCanManageTopics returns the value of CanManageTopics.

func (*ChatMemberRestricted) GetCanPinMessages

func (s *ChatMemberRestricted) GetCanPinMessages() bool

GetCanPinMessages returns the value of CanPinMessages.

func (*ChatMemberRestricted) GetCanSendAudios

func (s *ChatMemberRestricted) GetCanSendAudios() bool

GetCanSendAudios returns the value of CanSendAudios.

func (*ChatMemberRestricted) GetCanSendDocuments

func (s *ChatMemberRestricted) GetCanSendDocuments() bool

GetCanSendDocuments returns the value of CanSendDocuments.

func (*ChatMemberRestricted) GetCanSendMessages

func (s *ChatMemberRestricted) GetCanSendMessages() bool

GetCanSendMessages returns the value of CanSendMessages.

func (*ChatMemberRestricted) GetCanSendOtherMessages

func (s *ChatMemberRestricted) GetCanSendOtherMessages() bool

GetCanSendOtherMessages returns the value of CanSendOtherMessages.

func (*ChatMemberRestricted) GetCanSendPhotos

func (s *ChatMemberRestricted) GetCanSendPhotos() bool

GetCanSendPhotos returns the value of CanSendPhotos.

func (*ChatMemberRestricted) GetCanSendPolls

func (s *ChatMemberRestricted) GetCanSendPolls() bool

GetCanSendPolls returns the value of CanSendPolls.

func (*ChatMemberRestricted) GetCanSendVideoNotes

func (s *ChatMemberRestricted) GetCanSendVideoNotes() bool

GetCanSendVideoNotes returns the value of CanSendVideoNotes.

func (*ChatMemberRestricted) GetCanSendVideos

func (s *ChatMemberRestricted) GetCanSendVideos() bool

GetCanSendVideos returns the value of CanSendVideos.

func (*ChatMemberRestricted) GetCanSendVoiceNotes

func (s *ChatMemberRestricted) GetCanSendVoiceNotes() bool

GetCanSendVoiceNotes returns the value of CanSendVoiceNotes.

func (*ChatMemberRestricted) GetIsMember

func (s *ChatMemberRestricted) GetIsMember() bool

GetIsMember returns the value of IsMember.

func (*ChatMemberRestricted) GetStatus

func (s *ChatMemberRestricted) GetStatus() string

GetStatus returns the value of Status.

func (*ChatMemberRestricted) GetUntilDate

func (s *ChatMemberRestricted) GetUntilDate() int

GetUntilDate returns the value of UntilDate.

func (*ChatMemberRestricted) GetUser

func (s *ChatMemberRestricted) GetUser() User

GetUser returns the value of User.

func (*ChatMemberRestricted) MarshalJSON

func (s *ChatMemberRestricted) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChatMemberRestricted) SetCanAddWebPagePreviews

func (s *ChatMemberRestricted) SetCanAddWebPagePreviews(val bool)

SetCanAddWebPagePreviews sets the value of CanAddWebPagePreviews.

func (*ChatMemberRestricted) SetCanChangeInfo

func (s *ChatMemberRestricted) SetCanChangeInfo(val bool)

SetCanChangeInfo sets the value of CanChangeInfo.

func (*ChatMemberRestricted) SetCanInviteUsers

func (s *ChatMemberRestricted) SetCanInviteUsers(val bool)

SetCanInviteUsers sets the value of CanInviteUsers.

func (*ChatMemberRestricted) SetCanManageTopics

func (s *ChatMemberRestricted) SetCanManageTopics(val bool)

SetCanManageTopics sets the value of CanManageTopics.

func (*ChatMemberRestricted) SetCanPinMessages

func (s *ChatMemberRestricted) SetCanPinMessages(val bool)

SetCanPinMessages sets the value of CanPinMessages.

func (*ChatMemberRestricted) SetCanSendAudios

func (s *ChatMemberRestricted) SetCanSendAudios(val bool)

SetCanSendAudios sets the value of CanSendAudios.

func (*ChatMemberRestricted) SetCanSendDocuments

func (s *ChatMemberRestricted) SetCanSendDocuments(val bool)

SetCanSendDocuments sets the value of CanSendDocuments.

func (*ChatMemberRestricted) SetCanSendMessages

func (s *ChatMemberRestricted) SetCanSendMessages(val bool)

SetCanSendMessages sets the value of CanSendMessages.

func (*ChatMemberRestricted) SetCanSendOtherMessages

func (s *ChatMemberRestricted) SetCanSendOtherMessages(val bool)

SetCanSendOtherMessages sets the value of CanSendOtherMessages.

func (*ChatMemberRestricted) SetCanSendPhotos

func (s *ChatMemberRestricted) SetCanSendPhotos(val bool)

SetCanSendPhotos sets the value of CanSendPhotos.

func (*ChatMemberRestricted) SetCanSendPolls

func (s *ChatMemberRestricted) SetCanSendPolls(val bool)

SetCanSendPolls sets the value of CanSendPolls.

func (*ChatMemberRestricted) SetCanSendVideoNotes

func (s *ChatMemberRestricted) SetCanSendVideoNotes(val bool)

SetCanSendVideoNotes sets the value of CanSendVideoNotes.

func (*ChatMemberRestricted) SetCanSendVideos

func (s *ChatMemberRestricted) SetCanSendVideos(val bool)

SetCanSendVideos sets the value of CanSendVideos.

func (*ChatMemberRestricted) SetCanSendVoiceNotes

func (s *ChatMemberRestricted) SetCanSendVoiceNotes(val bool)

SetCanSendVoiceNotes sets the value of CanSendVoiceNotes.

func (*ChatMemberRestricted) SetIsMember

func (s *ChatMemberRestricted) SetIsMember(val bool)

SetIsMember sets the value of IsMember.

func (*ChatMemberRestricted) SetStatus

func (s *ChatMemberRestricted) SetStatus(val string)

SetStatus sets the value of Status.

func (*ChatMemberRestricted) SetUntilDate

func (s *ChatMemberRestricted) SetUntilDate(val int)

SetUntilDate sets the value of UntilDate.

func (*ChatMemberRestricted) SetUser

func (s *ChatMemberRestricted) SetUser(val User)

SetUser sets the value of User.

func (*ChatMemberRestricted) UnmarshalJSON

func (s *ChatMemberRestricted) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ChatMemberType

type ChatMemberType string

ChatMemberType is oneOf type of ChatMember.

const (
	ChatMemberOwnerChatMember         ChatMemberType = "ChatMemberOwner"
	ChatMemberAdministratorChatMember ChatMemberType = "ChatMemberAdministrator"
	ChatMemberMemberChatMember        ChatMemberType = "ChatMemberMember"
	ChatMemberRestrictedChatMember    ChatMemberType = "ChatMemberRestricted"
	ChatMemberLeftChatMember          ChatMemberType = "ChatMemberLeft"
	ChatMemberBannedChatMember        ChatMemberType = "ChatMemberBanned"
)

Possible values for ChatMemberType.

type ChatMemberUpdated

type ChatMemberUpdated struct {
	Chat Chat `json:"chat"`
	From User `json:"from"`
	// Date the change was done in Unix time.
	Date          int               `json:"date"`
	OldChatMember ChatMember        `json:"old_chat_member"`
	NewChatMember ChatMember        `json:"new_chat_member"`
	InviteLink    OptChatInviteLink `json:"invite_link"`
	// _Optional_. True, if the user joined the chat via a chat folder invite link.
	ViaChatFolderInviteLink OptBool `json:"via_chat_folder_invite_link"`
}

This object represents changes in the status of a chat member. Ref: #/components/schemas/ChatMemberUpdated

func (*ChatMemberUpdated) Decode

func (s *ChatMemberUpdated) Decode(d *jx.Decoder) error

Decode decodes ChatMemberUpdated from json.

func (*ChatMemberUpdated) Encode

func (s *ChatMemberUpdated) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChatMemberUpdated) GetChat

func (s *ChatMemberUpdated) GetChat() Chat

GetChat returns the value of Chat.

func (*ChatMemberUpdated) GetDate

func (s *ChatMemberUpdated) GetDate() int

GetDate returns the value of Date.

func (*ChatMemberUpdated) GetFrom

func (s *ChatMemberUpdated) GetFrom() User

GetFrom returns the value of From.

func (s *ChatMemberUpdated) GetInviteLink() OptChatInviteLink

GetInviteLink returns the value of InviteLink.

func (*ChatMemberUpdated) GetNewChatMember

func (s *ChatMemberUpdated) GetNewChatMember() ChatMember

GetNewChatMember returns the value of NewChatMember.

func (*ChatMemberUpdated) GetOldChatMember

func (s *ChatMemberUpdated) GetOldChatMember() ChatMember

GetOldChatMember returns the value of OldChatMember.

func (s *ChatMemberUpdated) GetViaChatFolderInviteLink() OptBool

GetViaChatFolderInviteLink returns the value of ViaChatFolderInviteLink.

func (*ChatMemberUpdated) MarshalJSON

func (s *ChatMemberUpdated) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChatMemberUpdated) SetChat

func (s *ChatMemberUpdated) SetChat(val Chat)

SetChat sets the value of Chat.

func (*ChatMemberUpdated) SetDate

func (s *ChatMemberUpdated) SetDate(val int)

SetDate sets the value of Date.

func (*ChatMemberUpdated) SetFrom

func (s *ChatMemberUpdated) SetFrom(val User)

SetFrom sets the value of From.

func (s *ChatMemberUpdated) SetInviteLink(val OptChatInviteLink)

SetInviteLink sets the value of InviteLink.

func (*ChatMemberUpdated) SetNewChatMember

func (s *ChatMemberUpdated) SetNewChatMember(val ChatMember)

SetNewChatMember sets the value of NewChatMember.

func (*ChatMemberUpdated) SetOldChatMember

func (s *ChatMemberUpdated) SetOldChatMember(val ChatMember)

SetOldChatMember sets the value of OldChatMember.

func (s *ChatMemberUpdated) SetViaChatFolderInviteLink(val OptBool)

SetViaChatFolderInviteLink sets the value of ViaChatFolderInviteLink.

func (*ChatMemberUpdated) UnmarshalJSON

func (s *ChatMemberUpdated) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ChatMemberUpdated) Validate

func (s *ChatMemberUpdated) Validate() error

type ChatPermissions

type ChatPermissions struct {
	// _Optional_. _True_, if the user is allowed to send text messages, contacts, invoices, locations
	// and venues.
	CanSendMessages OptBool `json:"can_send_messages"`
	// _Optional_. _True_, if the user is allowed to send audios.
	CanSendAudios OptBool `json:"can_send_audios"`
	// _Optional_. _True_, if the user is allowed to send documents.
	CanSendDocuments OptBool `json:"can_send_documents"`
	// _Optional_. _True_, if the user is allowed to send photos.
	CanSendPhotos OptBool `json:"can_send_photos"`
	// _Optional_. _True_, if the user is allowed to send videos.
	CanSendVideos OptBool `json:"can_send_videos"`
	// _Optional_. _True_, if the user is allowed to send video notes.
	CanSendVideoNotes OptBool `json:"can_send_video_notes"`
	// _Optional_. _True_, if the user is allowed to send voice notes.
	CanSendVoiceNotes OptBool `json:"can_send_voice_notes"`
	// _Optional_. _True_, if the user is allowed to send polls.
	CanSendPolls OptBool `json:"can_send_polls"`
	// _Optional_. _True_, if the user is allowed to send animations, games, stickers and use inline bots.
	CanSendOtherMessages OptBool `json:"can_send_other_messages"`
	// _Optional_. _True_, if the user is allowed to add web page previews to their messages.
	CanAddWebPagePreviews OptBool `json:"can_add_web_page_previews"`
	// _Optional_. _True_, if the user is allowed to change the chat title, photo and other settings.
	// Ignored in public supergroups.
	CanChangeInfo OptBool `json:"can_change_info"`
	// _Optional_. _True_, if the user is allowed to invite new users to the chat.
	CanInviteUsers OptBool `json:"can_invite_users"`
	// _Optional_. _True_, if the user is allowed to pin messages. Ignored in public supergroups.
	CanPinMessages OptBool `json:"can_pin_messages"`
	// _Optional_. _True_, if the user is allowed to create forum topics. If omitted defaults to the
	// value of can_pin_messages.
	CanManageTopics OptBool `json:"can_manage_topics"`
}

Describes actions that a non-administrator user is allowed to take in a chat. Ref: #/components/schemas/ChatPermissions

func (*ChatPermissions) Decode

func (s *ChatPermissions) Decode(d *jx.Decoder) error

Decode decodes ChatPermissions from json.

func (*ChatPermissions) Encode

func (s *ChatPermissions) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChatPermissions) GetCanAddWebPagePreviews

func (s *ChatPermissions) GetCanAddWebPagePreviews() OptBool

GetCanAddWebPagePreviews returns the value of CanAddWebPagePreviews.

func (*ChatPermissions) GetCanChangeInfo

func (s *ChatPermissions) GetCanChangeInfo() OptBool

GetCanChangeInfo returns the value of CanChangeInfo.

func (*ChatPermissions) GetCanInviteUsers

func (s *ChatPermissions) GetCanInviteUsers() OptBool

GetCanInviteUsers returns the value of CanInviteUsers.

func (*ChatPermissions) GetCanManageTopics

func (s *ChatPermissions) GetCanManageTopics() OptBool

GetCanManageTopics returns the value of CanManageTopics.

func (*ChatPermissions) GetCanPinMessages

func (s *ChatPermissions) GetCanPinMessages() OptBool

GetCanPinMessages returns the value of CanPinMessages.

func (*ChatPermissions) GetCanSendAudios

func (s *ChatPermissions) GetCanSendAudios() OptBool

GetCanSendAudios returns the value of CanSendAudios.

func (*ChatPermissions) GetCanSendDocuments

func (s *ChatPermissions) GetCanSendDocuments() OptBool

GetCanSendDocuments returns the value of CanSendDocuments.

func (*ChatPermissions) GetCanSendMessages

func (s *ChatPermissions) GetCanSendMessages() OptBool

GetCanSendMessages returns the value of CanSendMessages.

func (*ChatPermissions) GetCanSendOtherMessages

func (s *ChatPermissions) GetCanSendOtherMessages() OptBool

GetCanSendOtherMessages returns the value of CanSendOtherMessages.

func (*ChatPermissions) GetCanSendPhotos

func (s *ChatPermissions) GetCanSendPhotos() OptBool

GetCanSendPhotos returns the value of CanSendPhotos.

func (*ChatPermissions) GetCanSendPolls

func (s *ChatPermissions) GetCanSendPolls() OptBool

GetCanSendPolls returns the value of CanSendPolls.

func (*ChatPermissions) GetCanSendVideoNotes

func (s *ChatPermissions) GetCanSendVideoNotes() OptBool

GetCanSendVideoNotes returns the value of CanSendVideoNotes.

func (*ChatPermissions) GetCanSendVideos

func (s *ChatPermissions) GetCanSendVideos() OptBool

GetCanSendVideos returns the value of CanSendVideos.

func (*ChatPermissions) GetCanSendVoiceNotes

func (s *ChatPermissions) GetCanSendVoiceNotes() OptBool

GetCanSendVoiceNotes returns the value of CanSendVoiceNotes.

func (*ChatPermissions) MarshalJSON

func (s *ChatPermissions) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChatPermissions) SetCanAddWebPagePreviews

func (s *ChatPermissions) SetCanAddWebPagePreviews(val OptBool)

SetCanAddWebPagePreviews sets the value of CanAddWebPagePreviews.

func (*ChatPermissions) SetCanChangeInfo

func (s *ChatPermissions) SetCanChangeInfo(val OptBool)

SetCanChangeInfo sets the value of CanChangeInfo.

func (*ChatPermissions) SetCanInviteUsers

func (s *ChatPermissions) SetCanInviteUsers(val OptBool)

SetCanInviteUsers sets the value of CanInviteUsers.

func (*ChatPermissions) SetCanManageTopics

func (s *ChatPermissions) SetCanManageTopics(val OptBool)

SetCanManageTopics sets the value of CanManageTopics.

func (*ChatPermissions) SetCanPinMessages

func (s *ChatPermissions) SetCanPinMessages(val OptBool)

SetCanPinMessages sets the value of CanPinMessages.

func (*ChatPermissions) SetCanSendAudios

func (s *ChatPermissions) SetCanSendAudios(val OptBool)

SetCanSendAudios sets the value of CanSendAudios.

func (*ChatPermissions) SetCanSendDocuments

func (s *ChatPermissions) SetCanSendDocuments(val OptBool)

SetCanSendDocuments sets the value of CanSendDocuments.

func (*ChatPermissions) SetCanSendMessages

func (s *ChatPermissions) SetCanSendMessages(val OptBool)

SetCanSendMessages sets the value of CanSendMessages.

func (*ChatPermissions) SetCanSendOtherMessages

func (s *ChatPermissions) SetCanSendOtherMessages(val OptBool)

SetCanSendOtherMessages sets the value of CanSendOtherMessages.

func (*ChatPermissions) SetCanSendPhotos

func (s *ChatPermissions) SetCanSendPhotos(val OptBool)

SetCanSendPhotos sets the value of CanSendPhotos.

func (*ChatPermissions) SetCanSendPolls

func (s *ChatPermissions) SetCanSendPolls(val OptBool)

SetCanSendPolls sets the value of CanSendPolls.

func (*ChatPermissions) SetCanSendVideoNotes

func (s *ChatPermissions) SetCanSendVideoNotes(val OptBool)

SetCanSendVideoNotes sets the value of CanSendVideoNotes.

func (*ChatPermissions) SetCanSendVideos

func (s *ChatPermissions) SetCanSendVideos(val OptBool)

SetCanSendVideos sets the value of CanSendVideos.

func (*ChatPermissions) SetCanSendVoiceNotes

func (s *ChatPermissions) SetCanSendVoiceNotes(val OptBool)

SetCanSendVoiceNotes sets the value of CanSendVoiceNotes.

func (*ChatPermissions) UnmarshalJSON

func (s *ChatPermissions) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ChatPhoto

type ChatPhoto struct {
	// File identifier of small (160x160) chat photo. This file_id can be used only for photo download
	// and only for as long as the photo is not changed.
	SmallFileID string `json:"small_file_id"`
	// Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time
	// and for different bots. Can't be used to download or reuse the file.
	SmallFileUniqueID string `json:"small_file_unique_id"`
	// File identifier of big (640x640) chat photo. This file_id can be used only for photo download and
	// only for as long as the photo is not changed.
	BigFileID string `json:"big_file_id"`
	// Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and
	// for different bots. Can't be used to download or reuse the file.
	BigFileUniqueID string `json:"big_file_unique_id"`
}

This object represents a chat photo. Ref: #/components/schemas/ChatPhoto

func (*ChatPhoto) Decode

func (s *ChatPhoto) Decode(d *jx.Decoder) error

Decode decodes ChatPhoto from json.

func (*ChatPhoto) Encode

func (s *ChatPhoto) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChatPhoto) GetBigFileID

func (s *ChatPhoto) GetBigFileID() string

GetBigFileID returns the value of BigFileID.

func (*ChatPhoto) GetBigFileUniqueID

func (s *ChatPhoto) GetBigFileUniqueID() string

GetBigFileUniqueID returns the value of BigFileUniqueID.

func (*ChatPhoto) GetSmallFileID

func (s *ChatPhoto) GetSmallFileID() string

GetSmallFileID returns the value of SmallFileID.

func (*ChatPhoto) GetSmallFileUniqueID

func (s *ChatPhoto) GetSmallFileUniqueID() string

GetSmallFileUniqueID returns the value of SmallFileUniqueID.

func (*ChatPhoto) MarshalJSON

func (s *ChatPhoto) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChatPhoto) SetBigFileID

func (s *ChatPhoto) SetBigFileID(val string)

SetBigFileID sets the value of BigFileID.

func (*ChatPhoto) SetBigFileUniqueID

func (s *ChatPhoto) SetBigFileUniqueID(val string)

SetBigFileUniqueID sets the value of BigFileUniqueID.

func (*ChatPhoto) SetSmallFileID

func (s *ChatPhoto) SetSmallFileID(val string)

SetSmallFileID sets the value of SmallFileID.

func (*ChatPhoto) SetSmallFileUniqueID

func (s *ChatPhoto) SetSmallFileUniqueID(val string)

SetSmallFileUniqueID sets the value of SmallFileUniqueID.

func (*ChatPhoto) UnmarshalJSON

func (s *ChatPhoto) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ChatShared

type ChatShared struct {
	// Identifier of the request.
	RequestID int `json:"request_id"`
	// Identifier of the shared chat. This number may have more than 32 significant bits and some
	// programming languages may have difficulty/silent defects in interpreting it. But it has at most 52
	// significant bits, so a 64-bit integer or double-precision float type are safe for storing this
	// identifier. The bot may not have access to the chat and could be unable to use this identifier,
	// unless the chat is already known to the bot by some other means.
	ChatID int64 `json:"chat_id"`
}

This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat(https://core.telegram.org/bots/api#keyboardbuttonrequestchat) button. Ref: #/components/schemas/ChatShared

func (*ChatShared) Decode

func (s *ChatShared) Decode(d *jx.Decoder) error

Decode decodes ChatShared from json.

func (*ChatShared) Encode

func (s *ChatShared) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChatShared) GetChatID

func (s *ChatShared) GetChatID() int64

GetChatID returns the value of ChatID.

func (*ChatShared) GetRequestID

func (s *ChatShared) GetRequestID() int

GetRequestID returns the value of RequestID.

func (*ChatShared) MarshalJSON

func (s *ChatShared) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChatShared) SetChatID

func (s *ChatShared) SetChatID(val int64)

SetChatID sets the value of ChatID.

func (*ChatShared) SetRequestID

func (s *ChatShared) SetRequestID(val int)

SetRequestID sets the value of RequestID.

func (*ChatShared) UnmarshalJSON

func (s *ChatShared) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ChatType

type ChatType string

Type of chat, can be either `private`, `group`, `supergroup` or `channel`.

const (
	ChatTypePrivate    ChatType = "private"
	ChatTypeGroup      ChatType = "group"
	ChatTypeSupergroup ChatType = "supergroup"
	ChatTypeChannel    ChatType = "channel"
)

func (*ChatType) Decode

func (s *ChatType) Decode(d *jx.Decoder) error

Decode decodes ChatType from json.

func (ChatType) Encode

func (s ChatType) Encode(e *jx.Encoder)

Encode encodes ChatType as json.

func (ChatType) MarshalJSON

func (s ChatType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (ChatType) MarshalText

func (s ChatType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*ChatType) UnmarshalJSON

func (s *ChatType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ChatType) UnmarshalText

func (s *ChatType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (ChatType) Validate

func (s ChatType) Validate() error

type ChosenInlineResult

type ChosenInlineResult struct {
	// The unique identifier for the result that was chosen.
	ResultID string      `json:"result_id"`
	From     User        `json:"from"`
	Location OptLocation `json:"location"`
	// _Optional_. Identifier of the sent inline message. Available only if there is an [inline
	// keyboard](https://core.telegram.org/bots/api#inlinekeyboardmarkup) attached to the message. Will
	// be also received in [callback queries](https://core.telegram.org/bots/api#callbackquery) and can
	// be used to [edit](https://core.telegram.org/bots/api#updating-messages) the message.
	InlineMessageID OptString `json:"inline_message_id"`
	// The query that was used to obtain the result.
	Query string `json:"query"`
}

Represents a [result](https://core.telegram.org/bots/api#inlinequeryresult) of an inline query that was chosen by the user and sent to their chat partner. Ref: #/components/schemas/ChosenInlineResult

func (*ChosenInlineResult) Decode

func (s *ChosenInlineResult) Decode(d *jx.Decoder) error

Decode decodes ChosenInlineResult from json.

func (*ChosenInlineResult) Encode

func (s *ChosenInlineResult) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ChosenInlineResult) GetFrom

func (s *ChosenInlineResult) GetFrom() User

GetFrom returns the value of From.

func (*ChosenInlineResult) GetInlineMessageID

func (s *ChosenInlineResult) GetInlineMessageID() OptString

GetInlineMessageID returns the value of InlineMessageID.

func (*ChosenInlineResult) GetLocation

func (s *ChosenInlineResult) GetLocation() OptLocation

GetLocation returns the value of Location.

func (*ChosenInlineResult) GetQuery

func (s *ChosenInlineResult) GetQuery() string

GetQuery returns the value of Query.

func (*ChosenInlineResult) GetResultID

func (s *ChosenInlineResult) GetResultID() string

GetResultID returns the value of ResultID.

func (*ChosenInlineResult) MarshalJSON

func (s *ChosenInlineResult) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ChosenInlineResult) SetFrom

func (s *ChosenInlineResult) SetFrom(val User)

SetFrom sets the value of From.

func (*ChosenInlineResult) SetInlineMessageID

func (s *ChosenInlineResult) SetInlineMessageID(val OptString)

SetInlineMessageID sets the value of InlineMessageID.

func (*ChosenInlineResult) SetLocation

func (s *ChosenInlineResult) SetLocation(val OptLocation)

SetLocation sets the value of Location.

func (*ChosenInlineResult) SetQuery

func (s *ChosenInlineResult) SetQuery(val string)

SetQuery sets the value of Query.

func (*ChosenInlineResult) SetResultID

func (s *ChosenInlineResult) SetResultID(val string)

SetResultID sets the value of ResultID.

func (*ChosenInlineResult) UnmarshalJSON

func (s *ChosenInlineResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ChosenInlineResult) Validate

func (s *ChosenInlineResult) Validate() error

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client implements OAS client.

func NewClient

func NewClient(serverURL string, opts ...ClientOption) (*Client, error)

NewClient initializes new Client defined by OAS.

func (*Client) AddStickerToSet

func (c *Client) AddStickerToSet(ctx context.Context, request *AddStickerToSet) (*Result, error)

AddStickerToSet invokes addStickerToSet operation.

Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns _True_ on success.

POST /addStickerToSet

func (*Client) AnswerCallbackQuery

func (c *Client) AnswerCallbackQuery(ctx context.Context, request *AnswerCallbackQuery) (*Result, error)

AnswerCallbackQuery invokes answerCallbackQuery operation.

Use this method to send answers to callback queries sent from [inline keyboards](https://core. telegram.org/bots/features#inline-keyboards). The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, _True_ is returned.

POST /answerCallbackQuery

func (*Client) AnswerInlineQuery

func (c *Client) AnswerInlineQuery(ctx context.Context, request *AnswerInlineQuery) (*Result, error)

AnswerInlineQuery invokes answerInlineQuery operation.

Use this method to send answers to an inline query. On success, _True_ is returned.No more than **50** results per query are allowed.

POST /answerInlineQuery

func (*Client) AnswerPreCheckoutQuery

func (c *Client) AnswerPreCheckoutQuery(ctx context.Context, request *AnswerPreCheckoutQuery) (*Result, error)

AnswerPreCheckoutQuery invokes answerPreCheckoutQuery operation.

Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update(https://core.telegram.org/bots/api#update) with the field _pre_checkout_query_. Use this method to respond to such pre-checkout queries. On success, _True_ is returned. **Note:** The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.

POST /answerPreCheckoutQuery

func (*Client) AnswerShippingQuery

func (c *Client) AnswerShippingQuery(ctx context.Context, request *AnswerShippingQuery) (*Result, error)

AnswerShippingQuery invokes answerShippingQuery operation.

If you sent an invoice requesting a shipping address and the parameter _is_flexible_ was specified,

the Bot API will send an [Update](https://core.telegram.org/bots/api#update) with a

_shipping_query_ field to the bot. Use this method to reply to shipping queries. On success, _True_ is returned.

POST /answerShippingQuery

func (*Client) AnswerWebAppQuery

func (c *Client) AnswerWebAppQuery(ctx context.Context, request *AnswerWebAppQuery) (*Result, error)

AnswerWebAppQuery invokes answerWebAppQuery operation.

Use this method to set the result of an interaction with a [Web App](https://core.telegram. org/bots/webapps) and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a [SentWebAppMessage](https://core.telegram. org/bots/api#sentwebappmessage) object is returned.

POST /answerWebAppQuery

func (*Client) ApproveChatJoinRequest

func (c *Client) ApproveChatJoinRequest(ctx context.Context, request *ApproveChatJoinRequest) (*Result, error)

ApproveChatJoinRequest invokes approveChatJoinRequest operation.

Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the _can_invite_users_ administrator right. Returns _True_ on success.

POST /approveChatJoinRequest

func (*Client) BanChatMember

func (c *Client) BanChatMember(ctx context.Context, request *BanChatMember) (*Result, error)

BanChatMember invokes banChatMember operation.

Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc. , unless [unbanned](https://core.telegram.org/bots/api#unbanchatmember) first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns _True_ on success.

POST /banChatMember

func (*Client) BanChatSenderChat

func (c *Client) BanChatSenderChat(ctx context.Context, request *BanChatSenderChat) (*Result, error)

BanChatSenderChat invokes banChatSenderChat operation.

Use this method to ban a channel chat in a supergroup or a channel. Until the chat is [unbanned](https://core.telegram.org/bots/api#unbanchatsenderchat), the owner of the banned chat won't be able to send messages on behalf of **any of their channels**. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns _True_ on success.

POST /banChatSenderChat

func (*Client) Close

func (c *Client) Close(ctx context.Context) (*Result, error)

Close invokes close operation.

Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns _True_ on success. Requires no parameters.

POST /close

func (*Client) CloseForumTopic

func (c *Client) CloseForumTopic(ctx context.Context, request *CloseForumTopic) (*Result, error)

CloseForumTopic invokes closeForumTopic operation.

Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can_manage_topics_ administrator rights, unless it is the creator of the topic. Returns _True_ on success.

POST /closeForumTopic

func (*Client) CloseGeneralForumTopic

func (c *Client) CloseGeneralForumTopic(ctx context.Context, request *CloseGeneralForumTopic) (*Result, error)

CloseGeneralForumTopic invokes closeGeneralForumTopic operation.

Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can_manage_topics_ administrator rights. Returns _True_ on success.

POST /closeGeneralForumTopic

func (*Client) CopyMessage

func (c *Client) CopyMessage(ctx context.Context, request *CopyMessage) (*ResultMessageId, error)

CopyMessage invokes copyMessage operation.

Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. A quiz [poll](https://core.telegram.org/bots/api#poll) can be copied only if the value of the field _correct_option_id_ is known to the bot. The method is analogous to the method [forwardMessage](https://core.telegram.org/bots/api#forwardmessage), but the copied message doesn't have a link to the original message. Returns the MessageId(https://core.telegram. org/bots/api#messageid) of the sent message on success.

POST /copyMessage

func (c *Client) CreateChatInviteLink(ctx context.Context, request *CreateChatInviteLink) (*ResultChatInviteLink, error)

CreateChatInviteLink invokes createChatInviteLink operation.

Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method [revokeChatInviteLink](https://core.telegram. org/bots/api#revokechatinvitelink). Returns the new invite link as ChatInviteLink(https://core. telegram.org/bots/api#chatinvitelink) object.

POST /createChatInviteLink

func (*Client) CreateForumTopic

func (c *Client) CreateForumTopic(ctx context.Context, request *CreateForumTopic) (*Result, error)

CreateForumTopic invokes createForumTopic operation.

Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can_manage_topics_ administrator rights. Returns information about the created topic as a [ForumTopic](https://core.telegram. org/bots/api#forumtopic) object.

POST /createForumTopic

func (c *Client) CreateInvoiceLink(ctx context.Context, request *CreateInvoiceLink) (*ResultString, error)

CreateInvoiceLink invokes createInvoiceLink operation.

Use this method to create a link for an invoice. Returns the created invoice link as _String_ on success.

POST /createInvoiceLink

func (*Client) CreateNewStickerSet

func (c *Client) CreateNewStickerSet(ctx context.Context, request *CreateNewStickerSet) (*Result, error)

CreateNewStickerSet invokes createNewStickerSet operation.

Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns _True_ on success.

POST /createNewStickerSet

func (*Client) DeclineChatJoinRequest

func (c *Client) DeclineChatJoinRequest(ctx context.Context, request *DeclineChatJoinRequest) (*Result, error)

DeclineChatJoinRequest invokes declineChatJoinRequest operation.

Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the _can_invite_users_ administrator right. Returns _True_ on success.

POST /declineChatJoinRequest

func (*Client) DeleteChatPhoto

func (c *Client) DeleteChatPhoto(ctx context.Context, request *DeleteChatPhoto) (*Result, error)

DeleteChatPhoto invokes deleteChatPhoto operation.

Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns _True_ on success.

POST /deleteChatPhoto

func (*Client) DeleteChatStickerSet

func (c *Client) DeleteChatStickerSet(ctx context.Context, request *DeleteChatStickerSet) (*Result, error)

DeleteChatStickerSet invokes deleteChatStickerSet operation.

Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field _can_set_sticker_set_ optionally returned in [getChat](https://core.telegram.org/bots/api#getchat) requests to check if the bot can use this method. Returns _True_ on success.

POST /deleteChatStickerSet

func (*Client) DeleteForumTopic

func (c *Client) DeleteForumTopic(ctx context.Context, request *DeleteForumTopic) (*Result, error)

DeleteForumTopic invokes deleteForumTopic operation.

Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can_delete_messages_ administrator rights. Returns _True_ on success.

POST /deleteForumTopic

func (*Client) DeleteMessage

func (c *Client) DeleteMessage(ctx context.Context, request *DeleteMessage) (*Result, error)

DeleteMessage invokes deleteMessage operation.

Use this method to delete a message, including service messages, with the following limitations:- A message can only be deleted if it was sent less than 48 hours ago.- Service messages about a supergroup, channel, or forum topic creation can't be deleted.- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.- Bots can delete outgoing messages in private chats, groups, and supergroups.- Bots can delete incoming messages in private chats.- Bots granted _can_post_messages_ permissions can delete outgoing messages in channels.- If the bot is an administrator of a group, it can delete any message there.- If the bot has _can_delete_messages_ permission in a supergroup or a channel, it can delete any message there. Returns _True_ on success.

POST /deleteMessage

func (*Client) DeleteMyCommands

func (c *Client) DeleteMyCommands(ctx context.Context, request OptDeleteMyCommands) (*Result, error)

DeleteMyCommands invokes deleteMyCommands operation.

Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, [higher level commands](https://core.telegram. org/bots/api#determining-list-of-commands) will be shown to affected users. Returns _True_ on success.

POST /deleteMyCommands

func (*Client) DeleteStickerFromSet

func (c *Client) DeleteStickerFromSet(ctx context.Context, request *DeleteStickerFromSet) (*Result, error)

DeleteStickerFromSet invokes deleteStickerFromSet operation.

Use this method to delete a sticker from a set created by the bot. Returns _True_ on success.

POST /deleteStickerFromSet

func (*Client) DeleteStickerSet

func (c *Client) DeleteStickerSet(ctx context.Context, request *DeleteStickerSet) (*Result, error)

DeleteStickerSet invokes deleteStickerSet operation.

Use this method to delete a sticker set that was created by the bot. Returns _True_ on success.

POST /deleteStickerSet

func (*Client) DeleteWebhook

func (c *Client) DeleteWebhook(ctx context.Context, request OptDeleteWebhook) (*Result, error)

DeleteWebhook invokes deleteWebhook operation.

Use this method to remove webhook integration if you decide to switch back to [getUpdates](https://core.telegram.org/bots/api#getupdates). Returns _True_ on success.

POST /deleteWebhook

func (c *Client) EditChatInviteLink(ctx context.Context, request *EditChatInviteLink) (*ResultChatInviteLink, error)

EditChatInviteLink invokes editChatInviteLink operation.

Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a ChatInviteLink(https://core.telegram. org/bots/api#chatinvitelink) object.

POST /editChatInviteLink

func (*Client) EditForumTopic

func (c *Client) EditForumTopic(ctx context.Context, request *EditForumTopic) (*Result, error)

EditForumTopic invokes editForumTopic operation.

Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have _can_manage_topics_ administrator rights, unless it is the creator of the topic. Returns _True_ on success.

POST /editForumTopic

func (*Client) EditGeneralForumTopic

func (c *Client) EditGeneralForumTopic(ctx context.Context, request *EditGeneralForumTopic) (*Result, error)

EditGeneralForumTopic invokes editGeneralForumTopic operation.

Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have _can_manage_topics_ administrator rights. Returns _True_ on success.

POST /editGeneralForumTopic

func (*Client) EditMessageCaption

func (c *Client) EditMessageCaption(ctx context.Context, request *EditMessageCaption) (*ResultMessageOrBoolean, error)

EditMessageCaption invokes editMessageCaption operation.

Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message(https://core.telegram.org/bots/api#message) is returned, otherwise _True_ is returned.

POST /editMessageCaption

func (*Client) EditMessageLiveLocation

func (c *Client) EditMessageLiveLocation(ctx context.Context, request *EditMessageLiveLocation) (*ResultMessageOrBoolean, error)

EditMessageLiveLocation invokes editMessageLiveLocation operation.

Use this method to edit live location messages. A location can be edited until its _live_period_ expires or editing is explicitly disabled by a call to [stopMessageLiveLocation](https://core. telegram.org/bots/api#stopmessagelivelocation). On success, if the edited message is not an inline message, the edited Message(https://core.telegram.org/bots/api#message) is returned, otherwise _True_ is returned.

POST /editMessageLiveLocation

func (*Client) EditMessageMedia

func (c *Client) EditMessageMedia(ctx context.Context, request *EditMessageMedia) (*ResultMessageOrBoolean, error)

EditMessageMedia invokes editMessageMedia operation.

Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message(https://core. telegram.org/bots/api#message) is returned, otherwise _True_ is returned.

POST /editMessageMedia

func (*Client) EditMessageReplyMarkup

func (c *Client) EditMessageReplyMarkup(ctx context.Context, request *EditMessageReplyMarkup) (*ResultMessageOrBoolean, error)

EditMessageReplyMarkup invokes editMessageReplyMarkup operation.

Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message(https://core.telegram.org/bots/api#message) is returned, otherwise _True_ is returned.

POST /editMessageReplyMarkup

func (*Client) EditMessageText

func (c *Client) EditMessageText(ctx context.Context, request *EditMessageText) (*ResultMessageOrBoolean, error)

EditMessageText invokes editMessageText operation.

Use this method to edit text and [game](https://core.telegram.org/bots/api#games) messages. On success, if the edited message is not an inline message, the edited Message(https://core. telegram.org/bots/api#message) is returned, otherwise _True_ is returned.

POST /editMessageText

func (c *Client) ExportChatInviteLink(ctx context.Context, request *ExportChatInviteLink) (*ResultString, error)

ExportChatInviteLink invokes exportChatInviteLink operation.

Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as _String_ on success.

POST /exportChatInviteLink

func (*Client) ForwardMessage

func (c *Client) ForwardMessage(ctx context.Context, request *ForwardMessage) (*ResultMessage, error)

ForwardMessage invokes forwardMessage operation.

Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent Message(https://core.telegram.org/bots/api#message) is returned.

POST /forwardMessage

func (*Client) GetChat

func (c *Client) GetChat(ctx context.Context, request *GetChat) (*ResultChat, error)

GetChat invokes getChat operation.

Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a Chat(https://core.telegram.org/bots/api#chat) object on success.

POST /getChat

func (*Client) GetChatAdministrators

func (c *Client) GetChatAdministrators(ctx context.Context, request *GetChatAdministrators) (*ResultArrayOfChatMember, error)

GetChatAdministrators invokes getChatAdministrators operation.

Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember(https://core.telegram.org/bots/api#chatmember) objects.

POST /getChatAdministrators

func (*Client) GetChatMember

func (c *Client) GetChatMember(ctx context.Context, request *GetChatMember) (*ResultChatMember, error)

GetChatMember invokes getChatMember operation.

Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a ChatMember(https://core. telegram.org/bots/api#chatmember) object on success.

POST /getChatMember

func (*Client) GetChatMemberCount

func (c *Client) GetChatMemberCount(ctx context.Context, request *GetChatMemberCount) (*ResultInt, error)

GetChatMemberCount invokes getChatMemberCount operation.

Use this method to get the number of members in a chat. Returns _Int_ on success.

POST /getChatMemberCount

func (*Client) GetChatMenuButton

func (c *Client) GetChatMenuButton(ctx context.Context, request OptGetChatMenuButton) (*Result, error)

GetChatMenuButton invokes getChatMenuButton operation.

Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton(https://core.telegram.org/bots/api#menubutton) on success.

POST /getChatMenuButton

func (*Client) GetCustomEmojiStickers

func (c *Client) GetCustomEmojiStickers(ctx context.Context, request *GetCustomEmojiStickers) (*ResultArrayOfSticker, error)

GetCustomEmojiStickers invokes getCustomEmojiStickers operation.

Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker(https://core.telegram.org/bots/api#sticker) objects.

POST /getCustomEmojiStickers

func (*Client) GetFile

func (c *Client) GetFile(ctx context.Context, request *GetFile) (*ResultFile, error)

GetFile invokes getFile operation.

Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File(https://core.telegram. org/bots/api#file) object is returned. The file can then be downloaded via the link `https://api. telegram.org/file/bot<token>/<file_path>`, where `<file_path>` is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling [getFile](https://core.telegram.org/bots/api#getfile) again.

POST /getFile

func (*Client) GetForumTopicIconStickers

func (c *Client) GetForumTopicIconStickers(ctx context.Context) (*ResultArrayOfSticker, error)

GetForumTopicIconStickers invokes getForumTopicIconStickers operation.

Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of Sticker(https://core.telegram.org/bots/api#sticker) objects.

POST /getForumTopicIconStickers

func (*Client) GetGameHighScores

func (c *Client) GetGameHighScores(ctx context.Context, request *GetGameHighScores) (*ResultArrayOfGameHighScore, error)

GetGameHighScores invokes getGameHighScores operation.

Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of GameHighScore(https://core.telegram. org/bots/api#gamehighscore) objects.

POST /getGameHighScores

func (*Client) GetMe

func (c *Client) GetMe(ctx context.Context) (*ResultUser, error)

GetMe invokes getMe operation.

A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User(https://core.telegram.org/bots/api#user) object.

POST /getMe

func (*Client) GetMyCommands

func (c *Client) GetMyCommands(ctx context.Context, request OptGetMyCommands) (*ResultArrayOfBotCommand, error)

GetMyCommands invokes getMyCommands operation.

Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of BotCommand(https://core.telegram.org/bots/api#botcommand) objects. If commands aren't set, an empty list is returned.

POST /getMyCommands

func (*Client) GetMyDefaultAdministratorRights

func (c *Client) GetMyDefaultAdministratorRights(ctx context.Context, request OptGetMyDefaultAdministratorRights) (*Result, error)

GetMyDefaultAdministratorRights invokes getMyDefaultAdministratorRights operation.

Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights(https://core.telegram.org/bots/api#chatadministratorrights) on success.

POST /getMyDefaultAdministratorRights

func (*Client) GetMyDescription

func (c *Client) GetMyDescription(ctx context.Context, request OptGetMyDescription) (*Result, error)

GetMyDescription invokes getMyDescription operation.

Use this method to get the current bot description for the given user language. Returns [BotDescription](https://core.telegram.org/bots/api#botdescription) on success.

POST /getMyDescription

func (*Client) GetMyName

func (c *Client) GetMyName(ctx context.Context, request OptGetMyName) (*Result, error)

GetMyName invokes getMyName operation.

Use this method to get the current bot name for the given user language. Returns [BotName](https://core.telegram.org/bots/api#botname) on success.

POST /getMyName

func (*Client) GetMyShortDescription

func (c *Client) GetMyShortDescription(ctx context.Context, request OptGetMyShortDescription) (*Result, error)

GetMyShortDescription invokes getMyShortDescription operation.

Use this method to get the current bot short description for the given user language. Returns [BotShortDescription](https://core.telegram.org/bots/api#botshortdescription) on success.

POST /getMyShortDescription

func (*Client) GetStickerSet

func (c *Client) GetStickerSet(ctx context.Context, request *GetStickerSet) (*ResultStickerSet, error)

GetStickerSet invokes getStickerSet operation.

Use this method to get a sticker set. On success, a StickerSet(https://core.telegram. org/bots/api#stickerset) object is returned.

POST /getStickerSet

func (*Client) GetUpdates

func (c *Client) GetUpdates(ctx context.Context, request OptGetUpdates) (*ResultArrayOfUpdate, error)

GetUpdates invokes getUpdates operation.

Use this method to receive incoming updates using long polling ([wiki](https://en.wikipedia. org/wiki/Push_technology#Long_polling)). Returns an Array of Update(https://core.telegram. org/bots/api#update) objects.

POST /getUpdates

func (*Client) GetUserProfilePhotos

func (c *Client) GetUserProfilePhotos(ctx context.Context, request *GetUserProfilePhotos) (*ResultUserProfilePhotos, error)

GetUserProfilePhotos invokes getUserProfilePhotos operation.

Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos(https://core.telegram.org/bots/api#userprofilephotos) object.

POST /getUserProfilePhotos

func (*Client) GetWebhookInfo

func (c *Client) GetWebhookInfo(ctx context.Context) (*ResultWebhookInfo, error)

GetWebhookInfo invokes getWebhookInfo operation.

Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo(https://core.telegram.org/bots/api#webhookinfo) object. If the bot is using [getUpdates](https://core.telegram.org/bots/api#getupdates), will return an object with the _url_ field empty.

POST /getWebhookInfo

func (*Client) HideGeneralForumTopic

func (c *Client) HideGeneralForumTopic(ctx context.Context, request *HideGeneralForumTopic) (*Result, error)

HideGeneralForumTopic invokes hideGeneralForumTopic operation.

Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can_manage_topics_ administrator rights. The topic will be automatically closed if it was open. Returns _True_ on success.

POST /hideGeneralForumTopic

func (*Client) LeaveChat

func (c *Client) LeaveChat(ctx context.Context, request *LeaveChat) (*Result, error)

LeaveChat invokes leaveChat operation.

Use this method for your bot to leave a group, supergroup or channel. Returns _True_ on success.

POST /leaveChat

func (*Client) LogOut

func (c *Client) LogOut(ctx context.Context) (*Result, error)

LogOut invokes logOut operation.

Use this method to log out from the cloud Bot API server before launching the bot locally. You **must** log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns _True_ on success. Requires no parameters.

POST /logOut

func (*Client) PinChatMessage

func (c *Client) PinChatMessage(ctx context.Context, request *PinChatMessage) (*Result, error)

PinChatMessage invokes pinChatMessage operation.

Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns _True_ on success.

POST /pinChatMessage

func (*Client) PromoteChatMember

func (c *Client) PromoteChatMember(ctx context.Context, request *PromoteChatMember) (*Result, error)

PromoteChatMember invokes promoteChatMember operation.

Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass _False_ for all boolean parameters to demote a user. Returns _True_ on success.

POST /promoteChatMember

func (*Client) ReopenForumTopic

func (c *Client) ReopenForumTopic(ctx context.Context, request *ReopenForumTopic) (*Result, error)

ReopenForumTopic invokes reopenForumTopic operation.

Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can_manage_topics_ administrator rights, unless it is the creator of the topic. Returns _True_ on success.

POST /reopenForumTopic

func (*Client) ReopenGeneralForumTopic

func (c *Client) ReopenGeneralForumTopic(ctx context.Context, request *ReopenGeneralForumTopic) (*Result, error)

ReopenGeneralForumTopic invokes reopenGeneralForumTopic operation.

Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can_manage_topics_ administrator rights. The topic will be automatically unhidden if it was hidden. Returns _True_ on success.

POST /reopenGeneralForumTopic

func (*Client) RestrictChatMember

func (c *Client) RestrictChatMember(ctx context.Context, request *RestrictChatMember) (*Result, error)

RestrictChatMember invokes restrictChatMember operation.

Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass _True_ for all permissions to lift restrictions from a user. Returns _True_ on success.

POST /restrictChatMember

func (c *Client) RevokeChatInviteLink(ctx context.Context, request *RevokeChatInviteLink) (*ResultChatInviteLink, error)

RevokeChatInviteLink invokes revokeChatInviteLink operation.

Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink(https://core.telegram.org/bots/api#chatinvitelink) object.

POST /revokeChatInviteLink

func (*Client) SendAnimation

func (c *Client) SendAnimation(ctx context.Context, request *SendAnimation) (*ResultMessage, error)

SendAnimation invokes sendAnimation operation.

Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message(https://core.telegram.org/bots/api#message) is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.

POST /sendAnimation

func (*Client) SendAudio

func (c *Client) SendAudio(ctx context.Context, request *SendAudio) (*ResultMessage, error)

SendAudio invokes sendAudio operation.

For sending voice messages, use the [sendVoice](https://core.telegram.org/bots/api#sendvoice) method instead.

POST /sendAudio

func (*Client) SendChatAction

func (c *Client) SendChatAction(ctx context.Context, request *SendChatAction) (*Result, error)

SendChatAction invokes sendChatAction operation.

We only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive.

POST /sendChatAction

func (*Client) SendContact

func (c *Client) SendContact(ctx context.Context, request *SendContact) (*ResultMessage, error)

SendContact invokes sendContact operation.

Use this method to send phone contacts. On success, the sent Message(https://core.telegram. org/bots/api#message) is returned.

POST /sendContact

func (*Client) SendDice

func (c *Client) SendDice(ctx context.Context, request *SendDice) (*ResultMessage, error)

SendDice invokes sendDice operation.

Use this method to send an animated emoji that will display a random value. On success, the sent Message(https://core.telegram.org/bots/api#message) is returned.

POST /sendDice

func (*Client) SendDocument

func (c *Client) SendDocument(ctx context.Context, request *SendDocument) (*ResultMessage, error)

SendDocument invokes sendDocument operation.

Use this method to send general files. On success, the sent Message(https://core.telegram. org/bots/api#message) is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.

POST /sendDocument

func (*Client) SendGame

func (c *Client) SendGame(ctx context.Context, request *SendGame) (*ResultMessage, error)

SendGame invokes sendGame operation.

Use this method to send a game. On success, the sent Message(https://core.telegram. org/bots/api#message) is returned.

POST /sendGame

func (*Client) SendInvoice

func (c *Client) SendInvoice(ctx context.Context, request *SendInvoice) (*ResultMessage, error)

SendInvoice invokes sendInvoice operation.

Use this method to send invoices. On success, the sent Message(https://core.telegram. org/bots/api#message) is returned.

POST /sendInvoice

func (*Client) SendLocation

func (c *Client) SendLocation(ctx context.Context, request *SendLocation) (*ResultMessage, error)

SendLocation invokes sendLocation operation.

Use this method to send point on the map. On success, the sent Message(https://core.telegram. org/bots/api#message) is returned.

POST /sendLocation

func (*Client) SendMediaGroup

func (c *Client) SendMediaGroup(ctx context.Context, request *SendMediaGroup) (*ResultArrayOfMessage, error)

SendMediaGroup invokes sendMediaGroup operation.

Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of [Messages](https://core.telegram.org/bots/api#message) that were sent is returned.

POST /sendMediaGroup

func (*Client) SendMessage

func (c *Client) SendMessage(ctx context.Context, request *SendMessage) (*ResultMessage, error)

SendMessage invokes sendMessage operation.

Use this method to send text messages. On success, the sent Message(https://core.telegram. org/bots/api#message) is returned.

POST /sendMessage

func (*Client) SendPhoto

func (c *Client) SendPhoto(ctx context.Context, request *SendPhoto) (*ResultMessage, error)

SendPhoto invokes sendPhoto operation.

Use this method to send photos. On success, the sent Message(https://core.telegram. org/bots/api#message) is returned.

POST /sendPhoto

func (*Client) SendPoll

func (c *Client) SendPoll(ctx context.Context, request *SendPoll) (*ResultMessage, error)

SendPoll invokes sendPoll operation.

Use this method to send a native poll. On success, the sent Message(https://core.telegram. org/bots/api#message) is returned.

POST /sendPoll

func (*Client) SendSticker

func (c *Client) SendSticker(ctx context.Context, request *SendSticker) (*ResultMessage, error)

SendSticker invokes sendSticker operation.

Use this method to send static .WEBP, [animated](https://telegram.org/blog/animated-stickers) .TGS,

or [video](https://telegram.org/blog/video-stickers-better-reactions) .WEBM stickers. On success,

the sent Message(https://core.telegram.org/bots/api#message) is returned.

POST /sendSticker

func (*Client) SendVenue

func (c *Client) SendVenue(ctx context.Context, request *SendVenue) (*ResultMessage, error)

SendVenue invokes sendVenue operation.

Use this method to send information about a venue. On success, the sent Message(https://core. telegram.org/bots/api#message) is returned.

POST /sendVenue

func (*Client) SendVideo

func (c *Client) SendVideo(ctx context.Context, request *SendVideo) (*ResultMessage, error)

SendVideo invokes sendVideo operation.

Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document(https://core.telegram.org/bots/api#document)). On success, the sent Message(https://core.telegram.org/bots/api#message) is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.

POST /sendVideo

func (*Client) SendVideoNote

func (c *Client) SendVideoNote(ctx context.Context, request *SendVideoNote) (*ResultMessage, error)

SendVideoNote invokes sendVideoNote operation.

As of [v.4.0](https://telegram.org/blog/video-messages-and-telescope), Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent Message(https://core.telegram.org/bots/api#message) is returned.

POST /sendVideoNote

func (*Client) SendVoice

func (c *Client) SendVoice(ctx context.Context, request *SendVoice) (*ResultMessage, error)

SendVoice invokes sendVoice operation.

Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio(https://core.telegram.org/bots/api#audio) or Document(https://core.telegram.org/bots/api#document)). On success, the sent Message(https://core.telegram.org/bots/api#message) is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.

POST /sendVoice

func (*Client) SetChatAdministratorCustomTitle

func (c *Client) SetChatAdministratorCustomTitle(ctx context.Context, request *SetChatAdministratorCustomTitle) (*Result, error)

SetChatAdministratorCustomTitle invokes setChatAdministratorCustomTitle operation.

Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns _True_ on success.

POST /setChatAdministratorCustomTitle

func (*Client) SetChatDescription

func (c *Client) SetChatDescription(ctx context.Context, request *SetChatDescription) (*Result, error)

SetChatDescription invokes setChatDescription operation.

Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns _True_ on success.

POST /setChatDescription

func (*Client) SetChatMenuButton

func (c *Client) SetChatMenuButton(ctx context.Context, request OptSetChatMenuButton) (*Result, error)

SetChatMenuButton invokes setChatMenuButton operation.

Use this method to change the bot's menu button in a private chat, or the default menu button. Returns _True_ on success.

POST /setChatMenuButton

func (*Client) SetChatPermissions

func (c *Client) SetChatPermissions(ctx context.Context, request *SetChatPermissions) (*Result, error)

SetChatPermissions invokes setChatPermissions operation.

Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the _can_restrict_members_ administrator rights. Returns _True_ on success.

POST /setChatPermissions

func (*Client) SetChatPhoto

func (c *Client) SetChatPhoto(ctx context.Context, request *SetChatPhoto) (*Result, error)

SetChatPhoto invokes setChatPhoto operation.

Use this method to set a new profile photo for the chat. Photos can't be changed for private chats.

The bot must be an administrator in the chat for this to work and must have the appropriate

administrator rights. Returns _True_ on success.

POST /setChatPhoto

func (*Client) SetChatStickerSet

func (c *Client) SetChatStickerSet(ctx context.Context, request *SetChatStickerSet) (*Result, error)

SetChatStickerSet invokes setChatStickerSet operation.

Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field _can_set_sticker_set_ optionally returned in [getChat](https://core.telegram.org/bots/api#getchat) requests to check if the bot can use this method. Returns _True_ on success.

POST /setChatStickerSet

func (*Client) SetChatTitle

func (c *Client) SetChatTitle(ctx context.Context, request *SetChatTitle) (*Result, error)

SetChatTitle invokes setChatTitle operation.

Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns _True_ on success.

POST /setChatTitle

func (*Client) SetCustomEmojiStickerSetThumbnail

func (c *Client) SetCustomEmojiStickerSetThumbnail(ctx context.Context, request *SetCustomEmojiStickerSetThumbnail) (*Result, error)

SetCustomEmojiStickerSetThumbnail invokes setCustomEmojiStickerSetThumbnail operation.

Use this method to set the thumbnail of a custom emoji sticker set. Returns _True_ on success.

POST /setCustomEmojiStickerSetThumbnail

func (*Client) SetGameScore

func (c *Client) SetGameScore(ctx context.Context, request *SetGameScore) (*Result, error)

SetGameScore invokes setGameScore operation.

Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the Message(https://core.telegram.org/bots/api#message) is returned, otherwise _True_ is returned. Returns an error, if the new score is not greater than the user's current score in the chat and _force_ is _False_.

POST /setGameScore

func (*Client) SetMyCommands

func (c *Client) SetMyCommands(ctx context.Context, request *SetMyCommands) (*Result, error)

SetMyCommands invokes setMyCommands operation.

Use this method to change the list of the bot's commands. See [this manual](https://core.telegram. org/bots/features#commands) for more details about bot commands. Returns _True_ on success.

POST /setMyCommands

func (*Client) SetMyDefaultAdministratorRights

func (c *Client) SetMyDefaultAdministratorRights(ctx context.Context, request OptSetMyDefaultAdministratorRights) (*Result, error)

SetMyDefaultAdministratorRights invokes setMyDefaultAdministratorRights operation.

Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns _True_ on success.

POST /setMyDefaultAdministratorRights

func (*Client) SetMyDescription

func (c *Client) SetMyDescription(ctx context.Context, request OptSetMyDescription) (*Result, error)

SetMyDescription invokes setMyDescription operation.

Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns _True_ on success.

POST /setMyDescription

func (*Client) SetMyName

func (c *Client) SetMyName(ctx context.Context, request OptSetMyName) (*Result, error)

SetMyName invokes setMyName operation.

Use this method to change the bot's name. Returns _True_ on success.

POST /setMyName

func (*Client) SetMyShortDescription

func (c *Client) SetMyShortDescription(ctx context.Context, request OptSetMyShortDescription) (*Result, error)

SetMyShortDescription invokes setMyShortDescription operation.

Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns _True_ on success.

POST /setMyShortDescription

func (*Client) SetPassportDataErrors

func (c *Client) SetPassportDataErrors(ctx context.Context, request *SetPassportDataErrors) (*Result, error)

SetPassportDataErrors invokes setPassportDataErrors operation.

Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.

POST /setPassportDataErrors

func (*Client) SetStickerEmojiList

func (c *Client) SetStickerEmojiList(ctx context.Context, request *SetStickerEmojiList) (*Result, error)

SetStickerEmojiList invokes setStickerEmojiList operation.

Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns _True_ on success.

POST /setStickerEmojiList

func (*Client) SetStickerKeywords

func (c *Client) SetStickerKeywords(ctx context.Context, request *SetStickerKeywords) (*Result, error)

SetStickerKeywords invokes setStickerKeywords operation.

Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns _True_ on success.

POST /setStickerKeywords

func (*Client) SetStickerMaskPosition

func (c *Client) SetStickerMaskPosition(ctx context.Context, request *SetStickerMaskPosition) (*Result, error)

SetStickerMaskPosition invokes setStickerMaskPosition operation.

Use this method to change the [mask position](https://core.telegram.org/bots/api#maskposition) of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns _True_ on success.

POST /setStickerMaskPosition

func (*Client) SetStickerPositionInSet

func (c *Client) SetStickerPositionInSet(ctx context.Context, request *SetStickerPositionInSet) (*Result, error)

SetStickerPositionInSet invokes setStickerPositionInSet operation.

Use this method to move a sticker in a set created by the bot to a specific position. Returns _True_ on success.

POST /setStickerPositionInSet

func (*Client) SetStickerSetThumbnail

func (c *Client) SetStickerSetThumbnail(ctx context.Context, request *SetStickerSetThumbnail) (*Result, error)

SetStickerSetThumbnail invokes setStickerSetThumbnail operation.

Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns _True_ on success.

POST /setStickerSetThumbnail

func (*Client) SetStickerSetTitle

func (c *Client) SetStickerSetTitle(ctx context.Context, request *SetStickerSetTitle) (*Result, error)

SetStickerSetTitle invokes setStickerSetTitle operation.

Use this method to set the title of a created sticker set. Returns _True_ on success.

POST /setStickerSetTitle

func (*Client) SetWebhook

func (c *Client) SetWebhook(ctx context.Context, request *SetWebhook) (*Result, error)

SetWebhook invokes setWebhook operation.

If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter _secret_token_. If specified, the request will contain a header `X-Telegram-Bot-Api-Secret-Token` with the secret token as content.

POST /setWebhook

func (*Client) StopMessageLiveLocation

func (c *Client) StopMessageLiveLocation(ctx context.Context, request *StopMessageLiveLocation) (*ResultMessageOrBoolean, error)

StopMessageLiveLocation invokes stopMessageLiveLocation operation.

Use this method to stop updating a live location message before _live_period_ expires. On success, if the message is not an inline message, the edited Message(https://core.telegram. org/bots/api#message) is returned, otherwise _True_ is returned.

POST /stopMessageLiveLocation

func (*Client) StopPoll

func (c *Client) StopPoll(ctx context.Context, request *StopPoll) (*ResultPoll, error)

StopPoll invokes stopPoll operation.

Use this method to stop a poll which was sent by the bot. On success, the stopped Poll(https://core.telegram.org/bots/api#poll) is returned.

POST /stopPoll

func (*Client) UnbanChatMember

func (c *Client) UnbanChatMember(ctx context.Context, request *UnbanChatMember) (*Result, error)

UnbanChatMember invokes unbanChatMember operation.

Use this method to unban a previously banned user in a supergroup or channel. The user will **not** return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be **removed** from the chat. If you don't want this, use the parameter _only_if_banned_. Returns _True_ on success.

POST /unbanChatMember

func (*Client) UnbanChatSenderChat

func (c *Client) UnbanChatSenderChat(ctx context.Context, request *UnbanChatSenderChat) (*Result, error)

UnbanChatSenderChat invokes unbanChatSenderChat operation.

Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns _True_ on success.

POST /unbanChatSenderChat

func (*Client) UnhideGeneralForumTopic

func (c *Client) UnhideGeneralForumTopic(ctx context.Context, request *UnhideGeneralForumTopic) (*Result, error)

UnhideGeneralForumTopic invokes unhideGeneralForumTopic operation.

Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can_manage_topics_ administrator rights. Returns _True_ on success.

POST /unhideGeneralForumTopic

func (*Client) UnpinAllChatMessages

func (c *Client) UnpinAllChatMessages(ctx context.Context, request *UnpinAllChatMessages) (*Result, error)

UnpinAllChatMessages invokes unpinAllChatMessages operation.

Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns _True_ on success.

POST /unpinAllChatMessages

func (*Client) UnpinAllForumTopicMessages

func (c *Client) UnpinAllForumTopicMessages(ctx context.Context, request *UnpinAllForumTopicMessages) (*Result, error)

UnpinAllForumTopicMessages invokes unpinAllForumTopicMessages operation.

Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the _can_pin_messages_ administrator right in the supergroup. Returns _True_ on success.

POST /unpinAllForumTopicMessages

func (*Client) UnpinChatMessage

func (c *Client) UnpinChatMessage(ctx context.Context, request *UnpinChatMessage) (*Result, error)

UnpinChatMessage invokes unpinChatMessage operation.

Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns _True_ on success.

POST /unpinChatMessage

func (*Client) UploadStickerFile

func (c *Client) UploadStickerFile(ctx context.Context, request *UploadStickerFile) (*ResultFile, error)

UploadStickerFile invokes uploadStickerFile operation.

Use this method to upload a file with a sticker for later use in the [createNewStickerSet](https://core.telegram.org/bots/api#createnewstickerset) and [addStickerToSet](https://core.telegram.org/bots/api#addstickertoset) methods (the file can be used multiple times). Returns the uploaded File(https://core.telegram.org/bots/api#file) on success.

POST /uploadStickerFile

type ClientOption

type ClientOption interface {
	// contains filtered or unexported methods
}

ClientOption is client config option.

func WithClient

func WithClient(client ht.Client) ClientOption

WithClient specifies http client to use.

type CloseForumTopic

type CloseForumTopic struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread of the forum topic.
	MessageThreadID int `json:"message_thread_id"`
}

Input for closeForumTopic. Ref: #/components/schemas/closeForumTopic

func (*CloseForumTopic) Decode

func (s *CloseForumTopic) Decode(d *jx.Decoder) error

Decode decodes CloseForumTopic from json.

func (*CloseForumTopic) Encode

func (s *CloseForumTopic) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CloseForumTopic) GetChatID

func (s *CloseForumTopic) GetChatID() ID

GetChatID returns the value of ChatID.

func (*CloseForumTopic) GetMessageThreadID

func (s *CloseForumTopic) GetMessageThreadID() int

GetMessageThreadID returns the value of MessageThreadID.

func (*CloseForumTopic) MarshalJSON

func (s *CloseForumTopic) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CloseForumTopic) SetChatID

func (s *CloseForumTopic) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*CloseForumTopic) SetMessageThreadID

func (s *CloseForumTopic) SetMessageThreadID(val int)

SetMessageThreadID sets the value of MessageThreadID.

func (*CloseForumTopic) UnmarshalJSON

func (s *CloseForumTopic) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CloseGeneralForumTopic

type CloseGeneralForumTopic struct {
	ChatID ID `json:"chat_id"`
}

Input for closeGeneralForumTopic. Ref: #/components/schemas/closeGeneralForumTopic

func (*CloseGeneralForumTopic) Decode

func (s *CloseGeneralForumTopic) Decode(d *jx.Decoder) error

Decode decodes CloseGeneralForumTopic from json.

func (*CloseGeneralForumTopic) Encode

func (s *CloseGeneralForumTopic) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CloseGeneralForumTopic) GetChatID

func (s *CloseGeneralForumTopic) GetChatID() ID

GetChatID returns the value of ChatID.

func (*CloseGeneralForumTopic) MarshalJSON

func (s *CloseGeneralForumTopic) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CloseGeneralForumTopic) SetChatID

func (s *CloseGeneralForumTopic) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*CloseGeneralForumTopic) UnmarshalJSON

func (s *CloseGeneralForumTopic) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Contact

type Contact struct {
	// Contact's phone number.
	PhoneNumber string `json:"phone_number"`
	// Contact's first name.
	FirstName string `json:"first_name"`
	// _Optional_. Contact's last name.
	LastName OptString `json:"last_name"`
	// _Optional_. Contact's user identifier in Telegram. This number may have more than 32 significant
	// bits and some programming languages may have difficulty/silent defects in interpreting it. But it
	// has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for
	// storing this identifier.
	UserID OptInt64 `json:"user_id"`
	// _Optional_. Additional data about the contact in the form of a [vCard](https://en.wikipedia.
	// org/wiki/VCard).
	Vcard OptString `json:"vcard"`
}

This object represents a phone contact. Ref: #/components/schemas/Contact

func (*Contact) Decode

func (s *Contact) Decode(d *jx.Decoder) error

Decode decodes Contact from json.

func (*Contact) Encode

func (s *Contact) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Contact) GetFirstName

func (s *Contact) GetFirstName() string

GetFirstName returns the value of FirstName.

func (*Contact) GetLastName

func (s *Contact) GetLastName() OptString

GetLastName returns the value of LastName.

func (*Contact) GetPhoneNumber

func (s *Contact) GetPhoneNumber() string

GetPhoneNumber returns the value of PhoneNumber.

func (*Contact) GetUserID

func (s *Contact) GetUserID() OptInt64

GetUserID returns the value of UserID.

func (*Contact) GetVcard

func (s *Contact) GetVcard() OptString

GetVcard returns the value of Vcard.

func (*Contact) MarshalJSON

func (s *Contact) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Contact) SetFirstName

func (s *Contact) SetFirstName(val string)

SetFirstName sets the value of FirstName.

func (*Contact) SetLastName

func (s *Contact) SetLastName(val OptString)

SetLastName sets the value of LastName.

func (*Contact) SetPhoneNumber

func (s *Contact) SetPhoneNumber(val string)

SetPhoneNumber sets the value of PhoneNumber.

func (*Contact) SetUserID

func (s *Contact) SetUserID(val OptInt64)

SetUserID sets the value of UserID.

func (*Contact) SetVcard

func (s *Contact) SetVcard(val OptString)

SetVcard sets the value of Vcard.

func (*Contact) UnmarshalJSON

func (s *Contact) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CopyMessage

type CopyMessage struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.
	MessageThreadID OptInt `json:"message_thread_id"`
	FromChatID      ID     `json:"from_chat_id"`
	// Message identifier in the chat specified in _from_chat_id_.
	MessageID int `json:"message_id"`
	// New caption for media, 0-1024 characters after entities parsing. If not specified, the original
	// caption is kept.
	Caption OptString `json:"caption"`
	// Mode for parsing entities in the new caption. See [formatting options](https://core.telegram.
	// org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// A JSON-serialized list of special entities that appear in the new caption, which can be specified
	// instead of _parse_mode_.
	CaptionEntities []MessageEntity `json:"caption_entities"`
	// Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will
	// receive a notification with no sound.
	DisableNotification OptBool `json:"disable_notification"`
	// Protects the contents of the sent message from forwarding and saving.
	ProtectContent OptBool `json:"protect_content"`
	// If the message is a reply, ID of the original message.
	ReplyToMessageID OptInt `json:"reply_to_message_id"`
	// Pass _True_ if the message should be sent even if the specified replied-to message is not found.
	AllowSendingWithoutReply OptBool            `json:"allow_sending_without_reply"`
	ReplyMarkup              OptSendReplyMarkup `json:"reply_markup"`
}

Input for copyMessage. Ref: #/components/schemas/copyMessage

func (*CopyMessage) Decode

func (s *CopyMessage) Decode(d *jx.Decoder) error

Decode decodes CopyMessage from json.

func (*CopyMessage) Encode

func (s *CopyMessage) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CopyMessage) GetAllowSendingWithoutReply

func (s *CopyMessage) GetAllowSendingWithoutReply() OptBool

GetAllowSendingWithoutReply returns the value of AllowSendingWithoutReply.

func (*CopyMessage) GetCaption

func (s *CopyMessage) GetCaption() OptString

GetCaption returns the value of Caption.

func (*CopyMessage) GetCaptionEntities

func (s *CopyMessage) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*CopyMessage) GetChatID

func (s *CopyMessage) GetChatID() ID

GetChatID returns the value of ChatID.

func (*CopyMessage) GetDisableNotification

func (s *CopyMessage) GetDisableNotification() OptBool

GetDisableNotification returns the value of DisableNotification.

func (*CopyMessage) GetFromChatID

func (s *CopyMessage) GetFromChatID() ID

GetFromChatID returns the value of FromChatID.

func (*CopyMessage) GetMessageID

func (s *CopyMessage) GetMessageID() int

GetMessageID returns the value of MessageID.

func (*CopyMessage) GetMessageThreadID

func (s *CopyMessage) GetMessageThreadID() OptInt

GetMessageThreadID returns the value of MessageThreadID.

func (*CopyMessage) GetParseMode

func (s *CopyMessage) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*CopyMessage) GetProtectContent

func (s *CopyMessage) GetProtectContent() OptBool

GetProtectContent returns the value of ProtectContent.

func (*CopyMessage) GetReplyMarkup

func (s *CopyMessage) GetReplyMarkup() OptSendReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*CopyMessage) GetReplyToMessageID

func (s *CopyMessage) GetReplyToMessageID() OptInt

GetReplyToMessageID returns the value of ReplyToMessageID.

func (*CopyMessage) MarshalJSON

func (s *CopyMessage) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CopyMessage) SetAllowSendingWithoutReply

func (s *CopyMessage) SetAllowSendingWithoutReply(val OptBool)

SetAllowSendingWithoutReply sets the value of AllowSendingWithoutReply.

func (*CopyMessage) SetCaption

func (s *CopyMessage) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*CopyMessage) SetCaptionEntities

func (s *CopyMessage) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*CopyMessage) SetChatID

func (s *CopyMessage) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*CopyMessage) SetDisableNotification

func (s *CopyMessage) SetDisableNotification(val OptBool)

SetDisableNotification sets the value of DisableNotification.

func (*CopyMessage) SetFromChatID

func (s *CopyMessage) SetFromChatID(val ID)

SetFromChatID sets the value of FromChatID.

func (*CopyMessage) SetMessageID

func (s *CopyMessage) SetMessageID(val int)

SetMessageID sets the value of MessageID.

func (*CopyMessage) SetMessageThreadID

func (s *CopyMessage) SetMessageThreadID(val OptInt)

SetMessageThreadID sets the value of MessageThreadID.

func (*CopyMessage) SetParseMode

func (s *CopyMessage) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*CopyMessage) SetProtectContent

func (s *CopyMessage) SetProtectContent(val OptBool)

SetProtectContent sets the value of ProtectContent.

func (*CopyMessage) SetReplyMarkup

func (s *CopyMessage) SetReplyMarkup(val OptSendReplyMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*CopyMessage) SetReplyToMessageID

func (s *CopyMessage) SetReplyToMessageID(val OptInt)

SetReplyToMessageID sets the value of ReplyToMessageID.

func (*CopyMessage) UnmarshalJSON

func (s *CopyMessage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CopyMessage) Validate

func (s *CopyMessage) Validate() error
type CreateChatInviteLink struct {
	ChatID ID `json:"chat_id"`
	// Invite link name; 0-32 characters.
	Name OptString `json:"name"`
	// Point in time (Unix timestamp) when the link will expire.
	ExpireDate OptInt `json:"expire_date"`
	// The maximum number of users that can be members of the chat simultaneously after joining the chat
	// via this invite link; 1-99999.
	MemberLimit OptInt `json:"member_limit"`
	// _True_, if users joining the chat via the link need to be approved by chat administrators. If
	// _True_, _member_limit_ can't be specified.
	CreatesJoinRequest OptBool `json:"creates_join_request"`
}

Input for createChatInviteLink. Ref: #/components/schemas/createChatInviteLink

func (*CreateChatInviteLink) Decode

func (s *CreateChatInviteLink) Decode(d *jx.Decoder) error

Decode decodes CreateChatInviteLink from json.

func (*CreateChatInviteLink) Encode

func (s *CreateChatInviteLink) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CreateChatInviteLink) GetChatID

func (s *CreateChatInviteLink) GetChatID() ID

GetChatID returns the value of ChatID.

func (*CreateChatInviteLink) GetCreatesJoinRequest

func (s *CreateChatInviteLink) GetCreatesJoinRequest() OptBool

GetCreatesJoinRequest returns the value of CreatesJoinRequest.

func (*CreateChatInviteLink) GetExpireDate

func (s *CreateChatInviteLink) GetExpireDate() OptInt

GetExpireDate returns the value of ExpireDate.

func (*CreateChatInviteLink) GetMemberLimit

func (s *CreateChatInviteLink) GetMemberLimit() OptInt

GetMemberLimit returns the value of MemberLimit.

func (*CreateChatInviteLink) GetName

func (s *CreateChatInviteLink) GetName() OptString

GetName returns the value of Name.

func (*CreateChatInviteLink) MarshalJSON

func (s *CreateChatInviteLink) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateChatInviteLink) SetChatID

func (s *CreateChatInviteLink) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*CreateChatInviteLink) SetCreatesJoinRequest

func (s *CreateChatInviteLink) SetCreatesJoinRequest(val OptBool)

SetCreatesJoinRequest sets the value of CreatesJoinRequest.

func (*CreateChatInviteLink) SetExpireDate

func (s *CreateChatInviteLink) SetExpireDate(val OptInt)

SetExpireDate sets the value of ExpireDate.

func (*CreateChatInviteLink) SetMemberLimit

func (s *CreateChatInviteLink) SetMemberLimit(val OptInt)

SetMemberLimit sets the value of MemberLimit.

func (*CreateChatInviteLink) SetName

func (s *CreateChatInviteLink) SetName(val OptString)

SetName sets the value of Name.

func (*CreateChatInviteLink) UnmarshalJSON

func (s *CreateChatInviteLink) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CreateChatInviteLink) Validate

func (s *CreateChatInviteLink) Validate() error

type CreateForumTopic

type CreateForumTopic struct {
	ChatID ID `json:"chat_id"`
	// Topic name, 1-128 characters.
	Name string `json:"name"`
	// Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590
	// (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F).
	IconColor OptInt `json:"icon_color"`
	// Unique identifier of the custom emoji shown as the topic icon. Use
	// [getForumTopicIconStickers](https://core.telegram.org/bots/api#getforumtopiciconstickers) to get
	// all allowed custom emoji identifiers.
	IconCustomEmojiID OptString `json:"icon_custom_emoji_id"`
}

Input for createForumTopic. Ref: #/components/schemas/createForumTopic

func (*CreateForumTopic) Decode

func (s *CreateForumTopic) Decode(d *jx.Decoder) error

Decode decodes CreateForumTopic from json.

func (*CreateForumTopic) Encode

func (s *CreateForumTopic) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CreateForumTopic) GetChatID

func (s *CreateForumTopic) GetChatID() ID

GetChatID returns the value of ChatID.

func (*CreateForumTopic) GetIconColor

func (s *CreateForumTopic) GetIconColor() OptInt

GetIconColor returns the value of IconColor.

func (*CreateForumTopic) GetIconCustomEmojiID

func (s *CreateForumTopic) GetIconCustomEmojiID() OptString

GetIconCustomEmojiID returns the value of IconCustomEmojiID.

func (*CreateForumTopic) GetName

func (s *CreateForumTopic) GetName() string

GetName returns the value of Name.

func (*CreateForumTopic) MarshalJSON

func (s *CreateForumTopic) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateForumTopic) SetChatID

func (s *CreateForumTopic) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*CreateForumTopic) SetIconColor

func (s *CreateForumTopic) SetIconColor(val OptInt)

SetIconColor sets the value of IconColor.

func (*CreateForumTopic) SetIconCustomEmojiID

func (s *CreateForumTopic) SetIconCustomEmojiID(val OptString)

SetIconCustomEmojiID sets the value of IconCustomEmojiID.

func (*CreateForumTopic) SetName

func (s *CreateForumTopic) SetName(val string)

SetName sets the value of Name.

func (*CreateForumTopic) UnmarshalJSON

func (s *CreateForumTopic) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CreateForumTopic) Validate

func (s *CreateForumTopic) Validate() error
type CreateInvoiceLink struct {
	// Product name, 1-32 characters.
	Title string `json:"title"`
	// Product description, 1-255 characters.
	Description string `json:"description"`
	// Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your
	// internal processes.
	Payload string `json:"payload"`
	// Payment provider token, obtained via [BotFather](https://t.me/botfather).
	ProviderToken string `json:"provider_token"`
	// Three-letter ISO 4217 currency code, see [more on currencies](https://core.telegram.
	// org/bots/payments#supported-currencies).
	Currency string `json:"currency"`
	// Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery
	// cost, delivery tax, bonus, etc.).
	Prices []LabeledPrice `json:"prices"`
	// The maximum accepted amount for tips in the _smallest units_ of the currency (integer, **not**
	// float/double). For example, for a maximum tip of `US$ 1.45` pass `max_tip_amount = 145`. See the
	// _exp_ parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it
	// shows the number of digits past the decimal point for each currency (2 for the majority of
	// currencies). Defaults to 0.
	MaxTipAmount OptInt `json:"max_tip_amount"`
	// A JSON-serialized array of suggested amounts of tips in the _smallest units_ of the currency
	// (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested
	// tip amounts must be positive, passed in a strictly increased order and must not exceed
	// _max_tip_amount_.
	SuggestedTipAmounts []int `json:"suggested_tip_amounts"`
	// JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed
	// description of required fields should be provided by the payment provider.
	ProviderData OptString `json:"provider_data"`
	// URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a
	// service.
	PhotoURL OptString `json:"photo_url"`
	// Photo size in bytes.
	PhotoSize OptInt `json:"photo_size"`
	// Photo width.
	PhotoWidth OptInt `json:"photo_width"`
	// Photo height.
	PhotoHeight OptInt `json:"photo_height"`
	// Pass _True_ if you require the user's full name to complete the order.
	NeedName OptBool `json:"need_name"`
	// Pass _True_ if you require the user's phone number to complete the order.
	NeedPhoneNumber OptBool `json:"need_phone_number"`
	// Pass _True_ if you require the user's email address to complete the order.
	NeedEmail OptBool `json:"need_email"`
	// Pass _True_ if you require the user's shipping address to complete the order.
	NeedShippingAddress OptBool `json:"need_shipping_address"`
	// Pass _True_ if the user's phone number should be sent to the provider.
	SendPhoneNumberToProvider OptBool `json:"send_phone_number_to_provider"`
	// Pass _True_ if the user's email address should be sent to the provider.
	SendEmailToProvider OptBool `json:"send_email_to_provider"`
	// Pass _True_ if the final price depends on the shipping method.
	IsFlexible OptBool `json:"is_flexible"`
}

Input for createInvoiceLink. Ref: #/components/schemas/createInvoiceLink

func (*CreateInvoiceLink) Decode

func (s *CreateInvoiceLink) Decode(d *jx.Decoder) error

Decode decodes CreateInvoiceLink from json.

func (*CreateInvoiceLink) Encode

func (s *CreateInvoiceLink) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CreateInvoiceLink) GetCurrency

func (s *CreateInvoiceLink) GetCurrency() string

GetCurrency returns the value of Currency.

func (*CreateInvoiceLink) GetDescription

func (s *CreateInvoiceLink) GetDescription() string

GetDescription returns the value of Description.

func (*CreateInvoiceLink) GetIsFlexible

func (s *CreateInvoiceLink) GetIsFlexible() OptBool

GetIsFlexible returns the value of IsFlexible.

func (*CreateInvoiceLink) GetMaxTipAmount

func (s *CreateInvoiceLink) GetMaxTipAmount() OptInt

GetMaxTipAmount returns the value of MaxTipAmount.

func (*CreateInvoiceLink) GetNeedEmail

func (s *CreateInvoiceLink) GetNeedEmail() OptBool

GetNeedEmail returns the value of NeedEmail.

func (*CreateInvoiceLink) GetNeedName

func (s *CreateInvoiceLink) GetNeedName() OptBool

GetNeedName returns the value of NeedName.

func (*CreateInvoiceLink) GetNeedPhoneNumber

func (s *CreateInvoiceLink) GetNeedPhoneNumber() OptBool

GetNeedPhoneNumber returns the value of NeedPhoneNumber.

func (*CreateInvoiceLink) GetNeedShippingAddress

func (s *CreateInvoiceLink) GetNeedShippingAddress() OptBool

GetNeedShippingAddress returns the value of NeedShippingAddress.

func (*CreateInvoiceLink) GetPayload

func (s *CreateInvoiceLink) GetPayload() string

GetPayload returns the value of Payload.

func (*CreateInvoiceLink) GetPhotoHeight

func (s *CreateInvoiceLink) GetPhotoHeight() OptInt

GetPhotoHeight returns the value of PhotoHeight.

func (*CreateInvoiceLink) GetPhotoSize

func (s *CreateInvoiceLink) GetPhotoSize() OptInt

GetPhotoSize returns the value of PhotoSize.

func (*CreateInvoiceLink) GetPhotoURL

func (s *CreateInvoiceLink) GetPhotoURL() OptString

GetPhotoURL returns the value of PhotoURL.

func (*CreateInvoiceLink) GetPhotoWidth

func (s *CreateInvoiceLink) GetPhotoWidth() OptInt

GetPhotoWidth returns the value of PhotoWidth.

func (*CreateInvoiceLink) GetPrices

func (s *CreateInvoiceLink) GetPrices() []LabeledPrice

GetPrices returns the value of Prices.

func (*CreateInvoiceLink) GetProviderData

func (s *CreateInvoiceLink) GetProviderData() OptString

GetProviderData returns the value of ProviderData.

func (*CreateInvoiceLink) GetProviderToken

func (s *CreateInvoiceLink) GetProviderToken() string

GetProviderToken returns the value of ProviderToken.

func (*CreateInvoiceLink) GetSendEmailToProvider

func (s *CreateInvoiceLink) GetSendEmailToProvider() OptBool

GetSendEmailToProvider returns the value of SendEmailToProvider.

func (*CreateInvoiceLink) GetSendPhoneNumberToProvider

func (s *CreateInvoiceLink) GetSendPhoneNumberToProvider() OptBool

GetSendPhoneNumberToProvider returns the value of SendPhoneNumberToProvider.

func (*CreateInvoiceLink) GetSuggestedTipAmounts

func (s *CreateInvoiceLink) GetSuggestedTipAmounts() []int

GetSuggestedTipAmounts returns the value of SuggestedTipAmounts.

func (*CreateInvoiceLink) GetTitle

func (s *CreateInvoiceLink) GetTitle() string

GetTitle returns the value of Title.

func (*CreateInvoiceLink) MarshalJSON

func (s *CreateInvoiceLink) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateInvoiceLink) SetCurrency

func (s *CreateInvoiceLink) SetCurrency(val string)

SetCurrency sets the value of Currency.

func (*CreateInvoiceLink) SetDescription

func (s *CreateInvoiceLink) SetDescription(val string)

SetDescription sets the value of Description.

func (*CreateInvoiceLink) SetIsFlexible

func (s *CreateInvoiceLink) SetIsFlexible(val OptBool)

SetIsFlexible sets the value of IsFlexible.

func (*CreateInvoiceLink) SetMaxTipAmount

func (s *CreateInvoiceLink) SetMaxTipAmount(val OptInt)

SetMaxTipAmount sets the value of MaxTipAmount.

func (*CreateInvoiceLink) SetNeedEmail

func (s *CreateInvoiceLink) SetNeedEmail(val OptBool)

SetNeedEmail sets the value of NeedEmail.

func (*CreateInvoiceLink) SetNeedName

func (s *CreateInvoiceLink) SetNeedName(val OptBool)

SetNeedName sets the value of NeedName.

func (*CreateInvoiceLink) SetNeedPhoneNumber

func (s *CreateInvoiceLink) SetNeedPhoneNumber(val OptBool)

SetNeedPhoneNumber sets the value of NeedPhoneNumber.

func (*CreateInvoiceLink) SetNeedShippingAddress

func (s *CreateInvoiceLink) SetNeedShippingAddress(val OptBool)

SetNeedShippingAddress sets the value of NeedShippingAddress.

func (*CreateInvoiceLink) SetPayload

func (s *CreateInvoiceLink) SetPayload(val string)

SetPayload sets the value of Payload.

func (*CreateInvoiceLink) SetPhotoHeight

func (s *CreateInvoiceLink) SetPhotoHeight(val OptInt)

SetPhotoHeight sets the value of PhotoHeight.

func (*CreateInvoiceLink) SetPhotoSize

func (s *CreateInvoiceLink) SetPhotoSize(val OptInt)

SetPhotoSize sets the value of PhotoSize.

func (*CreateInvoiceLink) SetPhotoURL

func (s *CreateInvoiceLink) SetPhotoURL(val OptString)

SetPhotoURL sets the value of PhotoURL.

func (*CreateInvoiceLink) SetPhotoWidth

func (s *CreateInvoiceLink) SetPhotoWidth(val OptInt)

SetPhotoWidth sets the value of PhotoWidth.

func (*CreateInvoiceLink) SetPrices

func (s *CreateInvoiceLink) SetPrices(val []LabeledPrice)

SetPrices sets the value of Prices.

func (*CreateInvoiceLink) SetProviderData

func (s *CreateInvoiceLink) SetProviderData(val OptString)

SetProviderData sets the value of ProviderData.

func (*CreateInvoiceLink) SetProviderToken

func (s *CreateInvoiceLink) SetProviderToken(val string)

SetProviderToken sets the value of ProviderToken.

func (*CreateInvoiceLink) SetSendEmailToProvider

func (s *CreateInvoiceLink) SetSendEmailToProvider(val OptBool)

SetSendEmailToProvider sets the value of SendEmailToProvider.

func (*CreateInvoiceLink) SetSendPhoneNumberToProvider

func (s *CreateInvoiceLink) SetSendPhoneNumberToProvider(val OptBool)

SetSendPhoneNumberToProvider sets the value of SendPhoneNumberToProvider.

func (*CreateInvoiceLink) SetSuggestedTipAmounts

func (s *CreateInvoiceLink) SetSuggestedTipAmounts(val []int)

SetSuggestedTipAmounts sets the value of SuggestedTipAmounts.

func (*CreateInvoiceLink) SetTitle

func (s *CreateInvoiceLink) SetTitle(val string)

SetTitle sets the value of Title.

func (*CreateInvoiceLink) UnmarshalJSON

func (s *CreateInvoiceLink) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CreateInvoiceLink) Validate

func (s *CreateInvoiceLink) Validate() error

type CreateNewStickerSet

type CreateNewStickerSet struct {
	// User identifier of created sticker set owner.
	UserID int64 `json:"user_id"`
	// Short name of sticker set, to be used in `t.me/addstickers/` URLs (e.g., _animals_). Can contain
	// only English letters, digits and underscores. Must begin with a letter, can't contain consecutive
	// underscores and must end in `"_by_<bot_username>"`. `<bot_username>` is case insensitive. 1-64
	// characters.
	Name string `json:"name"`
	// Sticker set title, 1-64 characters.
	Title string `json:"title"`
	// A JSON-serialized list of 1-50 initial stickers to be added to the sticker set.
	Stickers []InputSticker `json:"stickers"`
	// Format of stickers in the set, must be one of `static`, `animated`, `video`.
	StickerFormat string `json:"sticker_format"`
	// Type of stickers in the set, pass `regular`, `mask`, or `custom_emoji`. By default, a regular
	// sticker set is created.
	StickerType OptString `json:"sticker_type"`
	// Pass _True_ if stickers in the sticker set must be repainted to the color of text when used in
	// messages, the accent color if used as emoji status, white on chat photos, or another appropriate
	// color based on context; for custom emoji sticker sets only.
	NeedsRepainting OptBool `json:"needs_repainting"`
}

Input for createNewStickerSet. Ref: #/components/schemas/createNewStickerSet

func (*CreateNewStickerSet) Decode

func (s *CreateNewStickerSet) Decode(d *jx.Decoder) error

Decode decodes CreateNewStickerSet from json.

func (*CreateNewStickerSet) Encode

func (s *CreateNewStickerSet) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CreateNewStickerSet) GetName

func (s *CreateNewStickerSet) GetName() string

GetName returns the value of Name.

func (*CreateNewStickerSet) GetNeedsRepainting

func (s *CreateNewStickerSet) GetNeedsRepainting() OptBool

GetNeedsRepainting returns the value of NeedsRepainting.

func (*CreateNewStickerSet) GetStickerFormat

func (s *CreateNewStickerSet) GetStickerFormat() string

GetStickerFormat returns the value of StickerFormat.

func (*CreateNewStickerSet) GetStickerType

func (s *CreateNewStickerSet) GetStickerType() OptString

GetStickerType returns the value of StickerType.

func (*CreateNewStickerSet) GetStickers

func (s *CreateNewStickerSet) GetStickers() []InputSticker

GetStickers returns the value of Stickers.

func (*CreateNewStickerSet) GetTitle

func (s *CreateNewStickerSet) GetTitle() string

GetTitle returns the value of Title.

func (*CreateNewStickerSet) GetUserID

func (s *CreateNewStickerSet) GetUserID() int64

GetUserID returns the value of UserID.

func (*CreateNewStickerSet) MarshalJSON

func (s *CreateNewStickerSet) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateNewStickerSet) SetName

func (s *CreateNewStickerSet) SetName(val string)

SetName sets the value of Name.

func (*CreateNewStickerSet) SetNeedsRepainting

func (s *CreateNewStickerSet) SetNeedsRepainting(val OptBool)

SetNeedsRepainting sets the value of NeedsRepainting.

func (*CreateNewStickerSet) SetStickerFormat

func (s *CreateNewStickerSet) SetStickerFormat(val string)

SetStickerFormat sets the value of StickerFormat.

func (*CreateNewStickerSet) SetStickerType

func (s *CreateNewStickerSet) SetStickerType(val OptString)

SetStickerType sets the value of StickerType.

func (*CreateNewStickerSet) SetStickers

func (s *CreateNewStickerSet) SetStickers(val []InputSticker)

SetStickers sets the value of Stickers.

func (*CreateNewStickerSet) SetTitle

func (s *CreateNewStickerSet) SetTitle(val string)

SetTitle sets the value of Title.

func (*CreateNewStickerSet) SetUserID

func (s *CreateNewStickerSet) SetUserID(val int64)

SetUserID sets the value of UserID.

func (*CreateNewStickerSet) UnmarshalJSON

func (s *CreateNewStickerSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CreateNewStickerSet) Validate

func (s *CreateNewStickerSet) Validate() error

type DeclineChatJoinRequest

type DeclineChatJoinRequest struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier of the target user.
	UserID int64 `json:"user_id"`
}

Input for declineChatJoinRequest. Ref: #/components/schemas/declineChatJoinRequest

func (*DeclineChatJoinRequest) Decode

func (s *DeclineChatJoinRequest) Decode(d *jx.Decoder) error

Decode decodes DeclineChatJoinRequest from json.

func (*DeclineChatJoinRequest) Encode

func (s *DeclineChatJoinRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*DeclineChatJoinRequest) GetChatID

func (s *DeclineChatJoinRequest) GetChatID() ID

GetChatID returns the value of ChatID.

func (*DeclineChatJoinRequest) GetUserID

func (s *DeclineChatJoinRequest) GetUserID() int64

GetUserID returns the value of UserID.

func (*DeclineChatJoinRequest) MarshalJSON

func (s *DeclineChatJoinRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DeclineChatJoinRequest) SetChatID

func (s *DeclineChatJoinRequest) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*DeclineChatJoinRequest) SetUserID

func (s *DeclineChatJoinRequest) SetUserID(val int64)

SetUserID sets the value of UserID.

func (*DeclineChatJoinRequest) UnmarshalJSON

func (s *DeclineChatJoinRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type DeleteChatPhoto

type DeleteChatPhoto struct {
	ChatID ID `json:"chat_id"`
}

Input for deleteChatPhoto. Ref: #/components/schemas/deleteChatPhoto

func (*DeleteChatPhoto) Decode

func (s *DeleteChatPhoto) Decode(d *jx.Decoder) error

Decode decodes DeleteChatPhoto from json.

func (*DeleteChatPhoto) Encode

func (s *DeleteChatPhoto) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*DeleteChatPhoto) GetChatID

func (s *DeleteChatPhoto) GetChatID() ID

GetChatID returns the value of ChatID.

func (*DeleteChatPhoto) MarshalJSON

func (s *DeleteChatPhoto) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DeleteChatPhoto) SetChatID

func (s *DeleteChatPhoto) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*DeleteChatPhoto) UnmarshalJSON

func (s *DeleteChatPhoto) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type DeleteChatStickerSet

type DeleteChatStickerSet struct {
	ChatID ID `json:"chat_id"`
}

Input for deleteChatStickerSet. Ref: #/components/schemas/deleteChatStickerSet

func (*DeleteChatStickerSet) Decode

func (s *DeleteChatStickerSet) Decode(d *jx.Decoder) error

Decode decodes DeleteChatStickerSet from json.

func (*DeleteChatStickerSet) Encode

func (s *DeleteChatStickerSet) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*DeleteChatStickerSet) GetChatID

func (s *DeleteChatStickerSet) GetChatID() ID

GetChatID returns the value of ChatID.

func (*DeleteChatStickerSet) MarshalJSON

func (s *DeleteChatStickerSet) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DeleteChatStickerSet) SetChatID

func (s *DeleteChatStickerSet) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*DeleteChatStickerSet) UnmarshalJSON

func (s *DeleteChatStickerSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type DeleteForumTopic

type DeleteForumTopic struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread of the forum topic.
	MessageThreadID int `json:"message_thread_id"`
}

Input for deleteForumTopic. Ref: #/components/schemas/deleteForumTopic

func (*DeleteForumTopic) Decode

func (s *DeleteForumTopic) Decode(d *jx.Decoder) error

Decode decodes DeleteForumTopic from json.

func (*DeleteForumTopic) Encode

func (s *DeleteForumTopic) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*DeleteForumTopic) GetChatID

func (s *DeleteForumTopic) GetChatID() ID

GetChatID returns the value of ChatID.

func (*DeleteForumTopic) GetMessageThreadID

func (s *DeleteForumTopic) GetMessageThreadID() int

GetMessageThreadID returns the value of MessageThreadID.

func (*DeleteForumTopic) MarshalJSON

func (s *DeleteForumTopic) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DeleteForumTopic) SetChatID

func (s *DeleteForumTopic) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*DeleteForumTopic) SetMessageThreadID

func (s *DeleteForumTopic) SetMessageThreadID(val int)

SetMessageThreadID sets the value of MessageThreadID.

func (*DeleteForumTopic) UnmarshalJSON

func (s *DeleteForumTopic) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type DeleteMessage

type DeleteMessage struct {
	ChatID ID `json:"chat_id"`
	// Identifier of the message to delete.
	MessageID int `json:"message_id"`
}

Input for deleteMessage. Ref: #/components/schemas/deleteMessage

func (*DeleteMessage) Decode

func (s *DeleteMessage) Decode(d *jx.Decoder) error

Decode decodes DeleteMessage from json.

func (*DeleteMessage) Encode

func (s *DeleteMessage) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*DeleteMessage) GetChatID

func (s *DeleteMessage) GetChatID() ID

GetChatID returns the value of ChatID.

func (*DeleteMessage) GetMessageID

func (s *DeleteMessage) GetMessageID() int

GetMessageID returns the value of MessageID.

func (*DeleteMessage) MarshalJSON

func (s *DeleteMessage) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DeleteMessage) SetChatID

func (s *DeleteMessage) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*DeleteMessage) SetMessageID

func (s *DeleteMessage) SetMessageID(val int)

SetMessageID sets the value of MessageID.

func (*DeleteMessage) UnmarshalJSON

func (s *DeleteMessage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type DeleteMyCommands

type DeleteMyCommands struct {
	Scope OptBotCommandScope `json:"scope"`
	// A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the
	// given scope, for whose language there are no dedicated commands.
	LanguageCode OptString `json:"language_code"`
}

Input for deleteMyCommands. Ref: #/components/schemas/deleteMyCommands

func (*DeleteMyCommands) Decode

func (s *DeleteMyCommands) Decode(d *jx.Decoder) error

Decode decodes DeleteMyCommands from json.

func (*DeleteMyCommands) Encode

func (s *DeleteMyCommands) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*DeleteMyCommands) GetLanguageCode

func (s *DeleteMyCommands) GetLanguageCode() OptString

GetLanguageCode returns the value of LanguageCode.

func (*DeleteMyCommands) GetScope

func (s *DeleteMyCommands) GetScope() OptBotCommandScope

GetScope returns the value of Scope.

func (*DeleteMyCommands) MarshalJSON

func (s *DeleteMyCommands) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DeleteMyCommands) SetLanguageCode

func (s *DeleteMyCommands) SetLanguageCode(val OptString)

SetLanguageCode sets the value of LanguageCode.

func (*DeleteMyCommands) SetScope

func (s *DeleteMyCommands) SetScope(val OptBotCommandScope)

SetScope sets the value of Scope.

func (*DeleteMyCommands) UnmarshalJSON

func (s *DeleteMyCommands) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type DeleteStickerFromSet

type DeleteStickerFromSet struct {
	// File identifier of the sticker.
	Sticker string `json:"sticker"`
}

Input for deleteStickerFromSet. Ref: #/components/schemas/deleteStickerFromSet

func (*DeleteStickerFromSet) Decode

func (s *DeleteStickerFromSet) Decode(d *jx.Decoder) error

Decode decodes DeleteStickerFromSet from json.

func (*DeleteStickerFromSet) Encode

func (s *DeleteStickerFromSet) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*DeleteStickerFromSet) GetSticker

func (s *DeleteStickerFromSet) GetSticker() string

GetSticker returns the value of Sticker.

func (*DeleteStickerFromSet) MarshalJSON

func (s *DeleteStickerFromSet) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DeleteStickerFromSet) SetSticker

func (s *DeleteStickerFromSet) SetSticker(val string)

SetSticker sets the value of Sticker.

func (*DeleteStickerFromSet) UnmarshalJSON

func (s *DeleteStickerFromSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type DeleteStickerSet

type DeleteStickerSet struct {
	// Sticker set name.
	Name string `json:"name"`
}

Input for deleteStickerSet. Ref: #/components/schemas/deleteStickerSet

func (*DeleteStickerSet) Decode

func (s *DeleteStickerSet) Decode(d *jx.Decoder) error

Decode decodes DeleteStickerSet from json.

func (*DeleteStickerSet) Encode

func (s *DeleteStickerSet) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*DeleteStickerSet) GetName

func (s *DeleteStickerSet) GetName() string

GetName returns the value of Name.

func (*DeleteStickerSet) MarshalJSON

func (s *DeleteStickerSet) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DeleteStickerSet) SetName

func (s *DeleteStickerSet) SetName(val string)

SetName sets the value of Name.

func (*DeleteStickerSet) UnmarshalJSON

func (s *DeleteStickerSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type DeleteWebhook

type DeleteWebhook struct {
	// Pass _True_ to drop all pending updates.
	DropPendingUpdates OptBool `json:"drop_pending_updates"`
}

Input for deleteWebhook. Ref: #/components/schemas/deleteWebhook

func (*DeleteWebhook) Decode

func (s *DeleteWebhook) Decode(d *jx.Decoder) error

Decode decodes DeleteWebhook from json.

func (*DeleteWebhook) Encode

func (s *DeleteWebhook) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*DeleteWebhook) GetDropPendingUpdates

func (s *DeleteWebhook) GetDropPendingUpdates() OptBool

GetDropPendingUpdates returns the value of DropPendingUpdates.

func (*DeleteWebhook) MarshalJSON

func (s *DeleteWebhook) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DeleteWebhook) SetDropPendingUpdates

func (s *DeleteWebhook) SetDropPendingUpdates(val OptBool)

SetDropPendingUpdates sets the value of DropPendingUpdates.

func (*DeleteWebhook) UnmarshalJSON

func (s *DeleteWebhook) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Dice

type Dice struct {
	// Emoji on which the dice throw animation is based.
	Emoji string `json:"emoji"`
	// Value of the dice, 1-6 for `🎲`, `🎯` and `🎳` base emoji, 1-5 for `🏀` and `⚽` base
	// emoji, 1-64 for `🎰` base emoji.
	Value int `json:"value"`
}

This object represents an animated emoji that displays a random value. Ref: #/components/schemas/Dice

func (*Dice) Decode

func (s *Dice) Decode(d *jx.Decoder) error

Decode decodes Dice from json.

func (*Dice) Encode

func (s *Dice) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Dice) GetEmoji

func (s *Dice) GetEmoji() string

GetEmoji returns the value of Emoji.

func (*Dice) GetValue

func (s *Dice) GetValue() int

GetValue returns the value of Value.

func (*Dice) MarshalJSON

func (s *Dice) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Dice) SetEmoji

func (s *Dice) SetEmoji(val string)

SetEmoji sets the value of Emoji.

func (*Dice) SetValue

func (s *Dice) SetValue(val int)

SetValue sets the value of Value.

func (*Dice) UnmarshalJSON

func (s *Dice) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Document

type Document struct {
	// Identifier for this file, which can be used to download or reuse the file.
	FileID string `json:"file_id"`
	// Unique identifier for this file, which is supposed to be the same over time and for different bots.
	//  Can't be used to download or reuse the file.
	FileUniqueID string       `json:"file_unique_id"`
	Thumbnail    OptPhotoSize `json:"thumbnail"`
	// _Optional_. Original filename as defined by sender.
	FileName OptString `json:"file_name"`
	// _Optional_. MIME type of the file as defined by sender.
	MimeType OptString `json:"mime_type"`
	// _Optional_. File size in bytes. It can be bigger than 2^31 and some programming languages may have
	// difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed
	// 64-bit integer or double-precision float type are safe for storing this value.
	FileSize OptInt `json:"file_size"`
}

This object represents a general file (as opposed to [photos](https://core.telegram. org/bots/api#photosize), [voice messages](https://core.telegram.org/bots/api#voice) and [audio files](https://core.telegram.org/bots/api#audio)). Ref: #/components/schemas/Document

func (*Document) Decode

func (s *Document) Decode(d *jx.Decoder) error

Decode decodes Document from json.

func (*Document) Encode

func (s *Document) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Document) GetFileID

func (s *Document) GetFileID() string

GetFileID returns the value of FileID.

func (*Document) GetFileName

func (s *Document) GetFileName() OptString

GetFileName returns the value of FileName.

func (*Document) GetFileSize

func (s *Document) GetFileSize() OptInt

GetFileSize returns the value of FileSize.

func (*Document) GetFileUniqueID

func (s *Document) GetFileUniqueID() string

GetFileUniqueID returns the value of FileUniqueID.

func (*Document) GetMimeType

func (s *Document) GetMimeType() OptString

GetMimeType returns the value of MimeType.

func (*Document) GetThumbnail

func (s *Document) GetThumbnail() OptPhotoSize

GetThumbnail returns the value of Thumbnail.

func (*Document) MarshalJSON

func (s *Document) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Document) SetFileID

func (s *Document) SetFileID(val string)

SetFileID sets the value of FileID.

func (*Document) SetFileName

func (s *Document) SetFileName(val OptString)

SetFileName sets the value of FileName.

func (*Document) SetFileSize

func (s *Document) SetFileSize(val OptInt)

SetFileSize sets the value of FileSize.

func (*Document) SetFileUniqueID

func (s *Document) SetFileUniqueID(val string)

SetFileUniqueID sets the value of FileUniqueID.

func (*Document) SetMimeType

func (s *Document) SetMimeType(val OptString)

SetMimeType sets the value of MimeType.

func (*Document) SetThumbnail

func (s *Document) SetThumbnail(val OptPhotoSize)

SetThumbnail sets the value of Thumbnail.

func (*Document) UnmarshalJSON

func (s *Document) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Document) Validate

func (s *Document) Validate() error
type EditChatInviteLink struct {
	ChatID ID `json:"chat_id"`
	// The invite link to edit.
	InviteLink string `json:"invite_link"`
	// Invite link name; 0-32 characters.
	Name OptString `json:"name"`
	// Point in time (Unix timestamp) when the link will expire.
	ExpireDate OptInt `json:"expire_date"`
	// The maximum number of users that can be members of the chat simultaneously after joining the chat
	// via this invite link; 1-99999.
	MemberLimit OptInt `json:"member_limit"`
	// _True_, if users joining the chat via the link need to be approved by chat administrators. If
	// _True_, _member_limit_ can't be specified.
	CreatesJoinRequest OptBool `json:"creates_join_request"`
}

Input for editChatInviteLink. Ref: #/components/schemas/editChatInviteLink

func (*EditChatInviteLink) Decode

func (s *EditChatInviteLink) Decode(d *jx.Decoder) error

Decode decodes EditChatInviteLink from json.

func (*EditChatInviteLink) Encode

func (s *EditChatInviteLink) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*EditChatInviteLink) GetChatID

func (s *EditChatInviteLink) GetChatID() ID

GetChatID returns the value of ChatID.

func (*EditChatInviteLink) GetCreatesJoinRequest

func (s *EditChatInviteLink) GetCreatesJoinRequest() OptBool

GetCreatesJoinRequest returns the value of CreatesJoinRequest.

func (*EditChatInviteLink) GetExpireDate

func (s *EditChatInviteLink) GetExpireDate() OptInt

GetExpireDate returns the value of ExpireDate.

func (s *EditChatInviteLink) GetInviteLink() string

GetInviteLink returns the value of InviteLink.

func (*EditChatInviteLink) GetMemberLimit

func (s *EditChatInviteLink) GetMemberLimit() OptInt

GetMemberLimit returns the value of MemberLimit.

func (*EditChatInviteLink) GetName

func (s *EditChatInviteLink) GetName() OptString

GetName returns the value of Name.

func (*EditChatInviteLink) MarshalJSON

func (s *EditChatInviteLink) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*EditChatInviteLink) SetChatID

func (s *EditChatInviteLink) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*EditChatInviteLink) SetCreatesJoinRequest

func (s *EditChatInviteLink) SetCreatesJoinRequest(val OptBool)

SetCreatesJoinRequest sets the value of CreatesJoinRequest.

func (*EditChatInviteLink) SetExpireDate

func (s *EditChatInviteLink) SetExpireDate(val OptInt)

SetExpireDate sets the value of ExpireDate.

func (s *EditChatInviteLink) SetInviteLink(val string)

SetInviteLink sets the value of InviteLink.

func (*EditChatInviteLink) SetMemberLimit

func (s *EditChatInviteLink) SetMemberLimit(val OptInt)

SetMemberLimit sets the value of MemberLimit.

func (*EditChatInviteLink) SetName

func (s *EditChatInviteLink) SetName(val OptString)

SetName sets the value of Name.

func (*EditChatInviteLink) UnmarshalJSON

func (s *EditChatInviteLink) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*EditChatInviteLink) Validate

func (s *EditChatInviteLink) Validate() error

type EditForumTopic

type EditForumTopic struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread of the forum topic.
	MessageThreadID int `json:"message_thread_id"`
	// New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be
	// kept.
	Name OptString `json:"name"`
	// New unique identifier of the custom emoji shown as the topic icon. Use
	// [getForumTopicIconStickers](https://core.telegram.org/bots/api#getforumtopiciconstickers) to get
	// all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified,
	// the current icon will be kept.
	IconCustomEmojiID OptString `json:"icon_custom_emoji_id"`
}

Input for editForumTopic. Ref: #/components/schemas/editForumTopic

func (*EditForumTopic) Decode

func (s *EditForumTopic) Decode(d *jx.Decoder) error

Decode decodes EditForumTopic from json.

func (*EditForumTopic) Encode

func (s *EditForumTopic) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*EditForumTopic) GetChatID

func (s *EditForumTopic) GetChatID() ID

GetChatID returns the value of ChatID.

func (*EditForumTopic) GetIconCustomEmojiID

func (s *EditForumTopic) GetIconCustomEmojiID() OptString

GetIconCustomEmojiID returns the value of IconCustomEmojiID.

func (*EditForumTopic) GetMessageThreadID

func (s *EditForumTopic) GetMessageThreadID() int

GetMessageThreadID returns the value of MessageThreadID.

func (*EditForumTopic) GetName

func (s *EditForumTopic) GetName() OptString

GetName returns the value of Name.

func (*EditForumTopic) MarshalJSON

func (s *EditForumTopic) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*EditForumTopic) SetChatID

func (s *EditForumTopic) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*EditForumTopic) SetIconCustomEmojiID

func (s *EditForumTopic) SetIconCustomEmojiID(val OptString)

SetIconCustomEmojiID sets the value of IconCustomEmojiID.

func (*EditForumTopic) SetMessageThreadID

func (s *EditForumTopic) SetMessageThreadID(val int)

SetMessageThreadID sets the value of MessageThreadID.

func (*EditForumTopic) SetName

func (s *EditForumTopic) SetName(val OptString)

SetName sets the value of Name.

func (*EditForumTopic) UnmarshalJSON

func (s *EditForumTopic) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*EditForumTopic) Validate

func (s *EditForumTopic) Validate() error

type EditGeneralForumTopic

type EditGeneralForumTopic struct {
	ChatID ID `json:"chat_id"`
	// New topic name, 1-128 characters.
	Name string `json:"name"`
}

Input for editGeneralForumTopic. Ref: #/components/schemas/editGeneralForumTopic

func (*EditGeneralForumTopic) Decode

func (s *EditGeneralForumTopic) Decode(d *jx.Decoder) error

Decode decodes EditGeneralForumTopic from json.

func (*EditGeneralForumTopic) Encode

func (s *EditGeneralForumTopic) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*EditGeneralForumTopic) GetChatID

func (s *EditGeneralForumTopic) GetChatID() ID

GetChatID returns the value of ChatID.

func (*EditGeneralForumTopic) GetName

func (s *EditGeneralForumTopic) GetName() string

GetName returns the value of Name.

func (*EditGeneralForumTopic) MarshalJSON

func (s *EditGeneralForumTopic) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*EditGeneralForumTopic) SetChatID

func (s *EditGeneralForumTopic) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*EditGeneralForumTopic) SetName

func (s *EditGeneralForumTopic) SetName(val string)

SetName sets the value of Name.

func (*EditGeneralForumTopic) UnmarshalJSON

func (s *EditGeneralForumTopic) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*EditGeneralForumTopic) Validate

func (s *EditGeneralForumTopic) Validate() error

type EditMessageCaption

type EditMessageCaption struct {
	ChatID OptID `json:"chat_id"`
	// Required if _inline_message_id_ is not specified. Identifier of the message to edit.
	MessageID OptInt `json:"message_id"`
	// Required if _chat_id_ and _message_id_ are not specified. Identifier of the inline message.
	InlineMessageID OptString `json:"inline_message_id"`
	// New caption of the message, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// Mode for parsing entities in the message caption. See [formatting options](https://core.telegram.
	// org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// A JSON-serialized list of special entities that appear in the caption, which can be specified
	// instead of _parse_mode_.
	CaptionEntities []MessageEntity         `json:"caption_entities"`
	ReplyMarkup     OptInlineKeyboardMarkup `json:"reply_markup"`
}

Input for editMessageCaption. Ref: #/components/schemas/editMessageCaption

func (*EditMessageCaption) Decode

func (s *EditMessageCaption) Decode(d *jx.Decoder) error

Decode decodes EditMessageCaption from json.

func (*EditMessageCaption) Encode

func (s *EditMessageCaption) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*EditMessageCaption) GetCaption

func (s *EditMessageCaption) GetCaption() OptString

GetCaption returns the value of Caption.

func (*EditMessageCaption) GetCaptionEntities

func (s *EditMessageCaption) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*EditMessageCaption) GetChatID

func (s *EditMessageCaption) GetChatID() OptID

GetChatID returns the value of ChatID.

func (*EditMessageCaption) GetInlineMessageID

func (s *EditMessageCaption) GetInlineMessageID() OptString

GetInlineMessageID returns the value of InlineMessageID.

func (*EditMessageCaption) GetMessageID

func (s *EditMessageCaption) GetMessageID() OptInt

GetMessageID returns the value of MessageID.

func (*EditMessageCaption) GetParseMode

func (s *EditMessageCaption) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*EditMessageCaption) GetReplyMarkup

func (s *EditMessageCaption) GetReplyMarkup() OptInlineKeyboardMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*EditMessageCaption) MarshalJSON

func (s *EditMessageCaption) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*EditMessageCaption) SetCaption

func (s *EditMessageCaption) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*EditMessageCaption) SetCaptionEntities

func (s *EditMessageCaption) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*EditMessageCaption) SetChatID

func (s *EditMessageCaption) SetChatID(val OptID)

SetChatID sets the value of ChatID.

func (*EditMessageCaption) SetInlineMessageID

func (s *EditMessageCaption) SetInlineMessageID(val OptString)

SetInlineMessageID sets the value of InlineMessageID.

func (*EditMessageCaption) SetMessageID

func (s *EditMessageCaption) SetMessageID(val OptInt)

SetMessageID sets the value of MessageID.

func (*EditMessageCaption) SetParseMode

func (s *EditMessageCaption) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*EditMessageCaption) SetReplyMarkup

func (s *EditMessageCaption) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*EditMessageCaption) UnmarshalJSON

func (s *EditMessageCaption) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*EditMessageCaption) Validate

func (s *EditMessageCaption) Validate() error

type EditMessageLiveLocation

type EditMessageLiveLocation struct {
	ChatID OptID `json:"chat_id"`
	// Required if _inline_message_id_ is not specified. Identifier of the message to edit.
	MessageID OptInt `json:"message_id"`
	// Required if _chat_id_ and _message_id_ are not specified. Identifier of the inline message.
	InlineMessageID OptString `json:"inline_message_id"`
	// Latitude of new location.
	Latitude float64 `json:"latitude"`
	// Longitude of new location.
	Longitude float64 `json:"longitude"`
	// The radius of uncertainty for the location, measured in meters; 0-1500.
	HorizontalAccuracy OptFloat64 `json:"horizontal_accuracy"`
	// Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
	Heading OptInt `json:"heading"`
	// The maximum distance for proximity alerts about approaching another chat member, in meters. Must
	// be between 1 and 100000 if specified.
	ProximityAlertRadius OptInt                  `json:"proximity_alert_radius"`
	ReplyMarkup          OptInlineKeyboardMarkup `json:"reply_markup"`
}

Input for editMessageLiveLocation. Ref: #/components/schemas/editMessageLiveLocation

func (*EditMessageLiveLocation) Decode

func (s *EditMessageLiveLocation) Decode(d *jx.Decoder) error

Decode decodes EditMessageLiveLocation from json.

func (*EditMessageLiveLocation) Encode

func (s *EditMessageLiveLocation) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*EditMessageLiveLocation) GetChatID

func (s *EditMessageLiveLocation) GetChatID() OptID

GetChatID returns the value of ChatID.

func (*EditMessageLiveLocation) GetHeading

func (s *EditMessageLiveLocation) GetHeading() OptInt

GetHeading returns the value of Heading.

func (*EditMessageLiveLocation) GetHorizontalAccuracy

func (s *EditMessageLiveLocation) GetHorizontalAccuracy() OptFloat64

GetHorizontalAccuracy returns the value of HorizontalAccuracy.

func (*EditMessageLiveLocation) GetInlineMessageID

func (s *EditMessageLiveLocation) GetInlineMessageID() OptString

GetInlineMessageID returns the value of InlineMessageID.

func (*EditMessageLiveLocation) GetLatitude

func (s *EditMessageLiveLocation) GetLatitude() float64

GetLatitude returns the value of Latitude.

func (*EditMessageLiveLocation) GetLongitude

func (s *EditMessageLiveLocation) GetLongitude() float64

GetLongitude returns the value of Longitude.

func (*EditMessageLiveLocation) GetMessageID

func (s *EditMessageLiveLocation) GetMessageID() OptInt

GetMessageID returns the value of MessageID.

func (*EditMessageLiveLocation) GetProximityAlertRadius

func (s *EditMessageLiveLocation) GetProximityAlertRadius() OptInt

GetProximityAlertRadius returns the value of ProximityAlertRadius.

func (*EditMessageLiveLocation) GetReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*EditMessageLiveLocation) MarshalJSON

func (s *EditMessageLiveLocation) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*EditMessageLiveLocation) SetChatID

func (s *EditMessageLiveLocation) SetChatID(val OptID)

SetChatID sets the value of ChatID.

func (*EditMessageLiveLocation) SetHeading

func (s *EditMessageLiveLocation) SetHeading(val OptInt)

SetHeading sets the value of Heading.

func (*EditMessageLiveLocation) SetHorizontalAccuracy

func (s *EditMessageLiveLocation) SetHorizontalAccuracy(val OptFloat64)

SetHorizontalAccuracy sets the value of HorizontalAccuracy.

func (*EditMessageLiveLocation) SetInlineMessageID

func (s *EditMessageLiveLocation) SetInlineMessageID(val OptString)

SetInlineMessageID sets the value of InlineMessageID.

func (*EditMessageLiveLocation) SetLatitude

func (s *EditMessageLiveLocation) SetLatitude(val float64)

SetLatitude sets the value of Latitude.

func (*EditMessageLiveLocation) SetLongitude

func (s *EditMessageLiveLocation) SetLongitude(val float64)

SetLongitude sets the value of Longitude.

func (*EditMessageLiveLocation) SetMessageID

func (s *EditMessageLiveLocation) SetMessageID(val OptInt)

SetMessageID sets the value of MessageID.

func (*EditMessageLiveLocation) SetProximityAlertRadius

func (s *EditMessageLiveLocation) SetProximityAlertRadius(val OptInt)

SetProximityAlertRadius sets the value of ProximityAlertRadius.

func (*EditMessageLiveLocation) SetReplyMarkup

func (s *EditMessageLiveLocation) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*EditMessageLiveLocation) UnmarshalJSON

func (s *EditMessageLiveLocation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*EditMessageLiveLocation) Validate

func (s *EditMessageLiveLocation) Validate() error

type EditMessageMedia

type EditMessageMedia struct {
	ChatID OptID `json:"chat_id"`
	// Required if _inline_message_id_ is not specified. Identifier of the message to edit.
	MessageID OptInt `json:"message_id"`
	// Required if _chat_id_ and _message_id_ are not specified. Identifier of the inline message.
	InlineMessageID OptString               `json:"inline_message_id"`
	Media           InputMedia              `json:"media"`
	ReplyMarkup     OptInlineKeyboardMarkup `json:"reply_markup"`
}

Input for editMessageMedia. Ref: #/components/schemas/editMessageMedia

func (*EditMessageMedia) Decode

func (s *EditMessageMedia) Decode(d *jx.Decoder) error

Decode decodes EditMessageMedia from json.

func (*EditMessageMedia) Encode

func (s *EditMessageMedia) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*EditMessageMedia) GetChatID

func (s *EditMessageMedia) GetChatID() OptID

GetChatID returns the value of ChatID.

func (*EditMessageMedia) GetInlineMessageID

func (s *EditMessageMedia) GetInlineMessageID() OptString

GetInlineMessageID returns the value of InlineMessageID.

func (*EditMessageMedia) GetMedia

func (s *EditMessageMedia) GetMedia() InputMedia

GetMedia returns the value of Media.

func (*EditMessageMedia) GetMessageID

func (s *EditMessageMedia) GetMessageID() OptInt

GetMessageID returns the value of MessageID.

func (*EditMessageMedia) GetReplyMarkup

func (s *EditMessageMedia) GetReplyMarkup() OptInlineKeyboardMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*EditMessageMedia) MarshalJSON

func (s *EditMessageMedia) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*EditMessageMedia) SetChatID

func (s *EditMessageMedia) SetChatID(val OptID)

SetChatID sets the value of ChatID.

func (*EditMessageMedia) SetInlineMessageID

func (s *EditMessageMedia) SetInlineMessageID(val OptString)

SetInlineMessageID sets the value of InlineMessageID.

func (*EditMessageMedia) SetMedia

func (s *EditMessageMedia) SetMedia(val InputMedia)

SetMedia sets the value of Media.

func (*EditMessageMedia) SetMessageID

func (s *EditMessageMedia) SetMessageID(val OptInt)

SetMessageID sets the value of MessageID.

func (*EditMessageMedia) SetReplyMarkup

func (s *EditMessageMedia) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*EditMessageMedia) UnmarshalJSON

func (s *EditMessageMedia) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*EditMessageMedia) Validate

func (s *EditMessageMedia) Validate() error

type EditMessageReplyMarkup

type EditMessageReplyMarkup struct {
	ChatID OptID `json:"chat_id"`
	// Required if _inline_message_id_ is not specified. Identifier of the message to edit.
	MessageID OptInt `json:"message_id"`
	// Required if _chat_id_ and _message_id_ are not specified. Identifier of the inline message.
	InlineMessageID OptString               `json:"inline_message_id"`
	ReplyMarkup     OptInlineKeyboardMarkup `json:"reply_markup"`
}

Input for editMessageReplyMarkup. Ref: #/components/schemas/editMessageReplyMarkup

func (*EditMessageReplyMarkup) Decode

func (s *EditMessageReplyMarkup) Decode(d *jx.Decoder) error

Decode decodes EditMessageReplyMarkup from json.

func (*EditMessageReplyMarkup) Encode

func (s *EditMessageReplyMarkup) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*EditMessageReplyMarkup) GetChatID

func (s *EditMessageReplyMarkup) GetChatID() OptID

GetChatID returns the value of ChatID.

func (*EditMessageReplyMarkup) GetInlineMessageID

func (s *EditMessageReplyMarkup) GetInlineMessageID() OptString

GetInlineMessageID returns the value of InlineMessageID.

func (*EditMessageReplyMarkup) GetMessageID

func (s *EditMessageReplyMarkup) GetMessageID() OptInt

GetMessageID returns the value of MessageID.

func (*EditMessageReplyMarkup) GetReplyMarkup

func (s *EditMessageReplyMarkup) GetReplyMarkup() OptInlineKeyboardMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*EditMessageReplyMarkup) MarshalJSON

func (s *EditMessageReplyMarkup) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*EditMessageReplyMarkup) SetChatID

func (s *EditMessageReplyMarkup) SetChatID(val OptID)

SetChatID sets the value of ChatID.

func (*EditMessageReplyMarkup) SetInlineMessageID

func (s *EditMessageReplyMarkup) SetInlineMessageID(val OptString)

SetInlineMessageID sets the value of InlineMessageID.

func (*EditMessageReplyMarkup) SetMessageID

func (s *EditMessageReplyMarkup) SetMessageID(val OptInt)

SetMessageID sets the value of MessageID.

func (*EditMessageReplyMarkup) SetReplyMarkup

func (s *EditMessageReplyMarkup) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*EditMessageReplyMarkup) UnmarshalJSON

func (s *EditMessageReplyMarkup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*EditMessageReplyMarkup) Validate

func (s *EditMessageReplyMarkup) Validate() error

type EditMessageText

type EditMessageText struct {
	ChatID OptID `json:"chat_id"`
	// Required if _inline_message_id_ is not specified. Identifier of the message to edit.
	MessageID OptInt `json:"message_id"`
	// Required if _chat_id_ and _message_id_ are not specified. Identifier of the inline message.
	InlineMessageID OptString `json:"inline_message_id"`
	// New text of the message, 1-4096 characters after entities parsing.
	Text string `json:"text"`
	// Mode for parsing entities in the message text. See [formatting options](https://core.telegram.
	// org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// A JSON-serialized list of special entities that appear in message text, which can be specified
	// instead of _parse_mode_.
	Entities []MessageEntity `json:"entities"`
	// Disables link previews for links in this message.
	DisableWebPagePreview OptBool                 `json:"disable_web_page_preview"`
	ReplyMarkup           OptInlineKeyboardMarkup `json:"reply_markup"`
}

Input for editMessageText. Ref: #/components/schemas/editMessageText

func (*EditMessageText) Decode

func (s *EditMessageText) Decode(d *jx.Decoder) error

Decode decodes EditMessageText from json.

func (*EditMessageText) Encode

func (s *EditMessageText) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*EditMessageText) GetChatID

func (s *EditMessageText) GetChatID() OptID

GetChatID returns the value of ChatID.

func (*EditMessageText) GetDisableWebPagePreview

func (s *EditMessageText) GetDisableWebPagePreview() OptBool

GetDisableWebPagePreview returns the value of DisableWebPagePreview.

func (*EditMessageText) GetEntities

func (s *EditMessageText) GetEntities() []MessageEntity

GetEntities returns the value of Entities.

func (*EditMessageText) GetInlineMessageID

func (s *EditMessageText) GetInlineMessageID() OptString

GetInlineMessageID returns the value of InlineMessageID.

func (*EditMessageText) GetMessageID

func (s *EditMessageText) GetMessageID() OptInt

GetMessageID returns the value of MessageID.

func (*EditMessageText) GetParseMode

func (s *EditMessageText) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*EditMessageText) GetReplyMarkup

func (s *EditMessageText) GetReplyMarkup() OptInlineKeyboardMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*EditMessageText) GetText

func (s *EditMessageText) GetText() string

GetText returns the value of Text.

func (*EditMessageText) MarshalJSON

func (s *EditMessageText) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*EditMessageText) SetChatID

func (s *EditMessageText) SetChatID(val OptID)

SetChatID sets the value of ChatID.

func (*EditMessageText) SetDisableWebPagePreview

func (s *EditMessageText) SetDisableWebPagePreview(val OptBool)

SetDisableWebPagePreview sets the value of DisableWebPagePreview.

func (*EditMessageText) SetEntities

func (s *EditMessageText) SetEntities(val []MessageEntity)

SetEntities sets the value of Entities.

func (*EditMessageText) SetInlineMessageID

func (s *EditMessageText) SetInlineMessageID(val OptString)

SetInlineMessageID sets the value of InlineMessageID.

func (*EditMessageText) SetMessageID

func (s *EditMessageText) SetMessageID(val OptInt)

SetMessageID sets the value of MessageID.

func (*EditMessageText) SetParseMode

func (s *EditMessageText) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*EditMessageText) SetReplyMarkup

func (s *EditMessageText) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*EditMessageText) SetText

func (s *EditMessageText) SetText(val string)

SetText sets the value of Text.

func (*EditMessageText) UnmarshalJSON

func (s *EditMessageText) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*EditMessageText) Validate

func (s *EditMessageText) Validate() error

type EncryptedCredentials

type EncryptedCredentials struct {
	// Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets
	// required for [EncryptedPassportElement](https://core.telegram.
	// org/bots/api#encryptedpassportelement) decryption and authentication.
	Data string `json:"data"`
	// Base64-encoded data hash for data authentication.
	Hash string `json:"hash"`
	// Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption.
	Secret string `json:"secret"`
}

Describes data required for decrypting and authenticating EncryptedPassportElement(https://core. telegram.org/bots/api#encryptedpassportelement). See the [Telegram Passport Documentation](https://core.telegram.org/passport#receiving-information) for a complete description of the data decryption and authentication processes. Ref: #/components/schemas/EncryptedCredentials

func (*EncryptedCredentials) Decode

func (s *EncryptedCredentials) Decode(d *jx.Decoder) error

Decode decodes EncryptedCredentials from json.

func (*EncryptedCredentials) Encode

func (s *EncryptedCredentials) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*EncryptedCredentials) GetData

func (s *EncryptedCredentials) GetData() string

GetData returns the value of Data.

func (*EncryptedCredentials) GetHash

func (s *EncryptedCredentials) GetHash() string

GetHash returns the value of Hash.

func (*EncryptedCredentials) GetSecret

func (s *EncryptedCredentials) GetSecret() string

GetSecret returns the value of Secret.

func (*EncryptedCredentials) MarshalJSON

func (s *EncryptedCredentials) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*EncryptedCredentials) SetData

func (s *EncryptedCredentials) SetData(val string)

SetData sets the value of Data.

func (*EncryptedCredentials) SetHash

func (s *EncryptedCredentials) SetHash(val string)

SetHash sets the value of Hash.

func (*EncryptedCredentials) SetSecret

func (s *EncryptedCredentials) SetSecret(val string)

SetSecret sets the value of Secret.

func (*EncryptedCredentials) UnmarshalJSON

func (s *EncryptedCredentials) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type EncryptedPassportElement

type EncryptedPassportElement struct {
	// Element type. One of `personal_details`, `passport`, `driver_license`, `identity_card`,
	// `internal_passport`, `address`, `utility_bill`, `bank_statement`, `rental_agreement`,
	// `passport_registration`, `temporary_registration`, `phone_number`, `email`.
	Type EncryptedPassportElementType `json:"type"`
	// _Optional_. Base64-encoded encrypted Telegram Passport element data provided by the user,
	// available for `personal_details`, `passport`, `driver_license`, `identity_card`,
	// `internal_passport` and `address` types. Can be decrypted and verified using the accompanying
	// [EncryptedCredentials](https://core.telegram.org/bots/api#encryptedcredentials).
	Data OptString `json:"data"`
	// _Optional_. User's verified phone number, available only for `phone_number` type.
	PhoneNumber OptString `json:"phone_number"`
	// _Optional_. User's verified email address, available only for `email` type.
	Email OptString `json:"email"`
	// _Optional_. Array of encrypted files with documents provided by the user, available for
	// `utility_bill`, `bank_statement`, `rental_agreement`, `passport_registration` and
	// `temporary_registration` types. Files can be decrypted and verified using the accompanying
	// [EncryptedCredentials](https://core.telegram.org/bots/api#encryptedcredentials).
	Files       []PassportFile  `json:"files"`
	FrontSide   OptPassportFile `json:"front_side"`
	ReverseSide OptPassportFile `json:"reverse_side"`
	Selfie      OptPassportFile `json:"selfie"`
	// _Optional_. Array of encrypted files with translated versions of documents provided by the user.
	// Available if requested for `passport`, `driver_license`, `identity_card`, `internal_passport`,
	// `utility_bill`, `bank_statement`, `rental_agreement`, `passport_registration` and
	// `temporary_registration` types. Files can be decrypted and verified using the accompanying
	// [EncryptedCredentials](https://core.telegram.org/bots/api#encryptedcredentials).
	Translation []PassportFile `json:"translation"`
	// Base64-encoded element hash for using in [PassportElementErrorUnspecified](https://core.telegram.
	// org/bots/api#passportelementerrorunspecified).
	Hash string `json:"hash"`
}

Describes documents or other Telegram Passport elements shared with the bot by the user. Ref: #/components/schemas/EncryptedPassportElement

func (*EncryptedPassportElement) Decode

func (s *EncryptedPassportElement) Decode(d *jx.Decoder) error

Decode decodes EncryptedPassportElement from json.

func (*EncryptedPassportElement) Encode

func (s *EncryptedPassportElement) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*EncryptedPassportElement) GetData

func (s *EncryptedPassportElement) GetData() OptString

GetData returns the value of Data.

func (*EncryptedPassportElement) GetEmail

func (s *EncryptedPassportElement) GetEmail() OptString

GetEmail returns the value of Email.

func (*EncryptedPassportElement) GetFiles

func (s *EncryptedPassportElement) GetFiles() []PassportFile

GetFiles returns the value of Files.

func (*EncryptedPassportElement) GetFrontSide

func (s *EncryptedPassportElement) GetFrontSide() OptPassportFile

GetFrontSide returns the value of FrontSide.

func (*EncryptedPassportElement) GetHash

func (s *EncryptedPassportElement) GetHash() string

GetHash returns the value of Hash.

func (*EncryptedPassportElement) GetPhoneNumber

func (s *EncryptedPassportElement) GetPhoneNumber() OptString

GetPhoneNumber returns the value of PhoneNumber.

func (*EncryptedPassportElement) GetReverseSide

func (s *EncryptedPassportElement) GetReverseSide() OptPassportFile

GetReverseSide returns the value of ReverseSide.

func (*EncryptedPassportElement) GetSelfie

GetSelfie returns the value of Selfie.

func (*EncryptedPassportElement) GetTranslation

func (s *EncryptedPassportElement) GetTranslation() []PassportFile

GetTranslation returns the value of Translation.

func (*EncryptedPassportElement) GetType

GetType returns the value of Type.

func (*EncryptedPassportElement) MarshalJSON

func (s *EncryptedPassportElement) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*EncryptedPassportElement) SetData

func (s *EncryptedPassportElement) SetData(val OptString)

SetData sets the value of Data.

func (*EncryptedPassportElement) SetEmail

func (s *EncryptedPassportElement) SetEmail(val OptString)

SetEmail sets the value of Email.

func (*EncryptedPassportElement) SetFiles

func (s *EncryptedPassportElement) SetFiles(val []PassportFile)

SetFiles sets the value of Files.

func (*EncryptedPassportElement) SetFrontSide

func (s *EncryptedPassportElement) SetFrontSide(val OptPassportFile)

SetFrontSide sets the value of FrontSide.

func (*EncryptedPassportElement) SetHash

func (s *EncryptedPassportElement) SetHash(val string)

SetHash sets the value of Hash.

func (*EncryptedPassportElement) SetPhoneNumber

func (s *EncryptedPassportElement) SetPhoneNumber(val OptString)

SetPhoneNumber sets the value of PhoneNumber.

func (*EncryptedPassportElement) SetReverseSide

func (s *EncryptedPassportElement) SetReverseSide(val OptPassportFile)

SetReverseSide sets the value of ReverseSide.

func (*EncryptedPassportElement) SetSelfie

func (s *EncryptedPassportElement) SetSelfie(val OptPassportFile)

SetSelfie sets the value of Selfie.

func (*EncryptedPassportElement) SetTranslation

func (s *EncryptedPassportElement) SetTranslation(val []PassportFile)

SetTranslation sets the value of Translation.

func (*EncryptedPassportElement) SetType

SetType sets the value of Type.

func (*EncryptedPassportElement) UnmarshalJSON

func (s *EncryptedPassportElement) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*EncryptedPassportElement) Validate

func (s *EncryptedPassportElement) Validate() error

type EncryptedPassportElementType

type EncryptedPassportElementType string

Element type. One of `personal_details`, `passport`, `driver_license`, `identity_card`, `internal_passport`, `address`, `utility_bill`, `bank_statement`, `rental_agreement`, `passport_registration`, `temporary_registration`, `phone_number`, `email`.

const (
	EncryptedPassportElementTypePersonalDetails       EncryptedPassportElementType = "personal_details"
	EncryptedPassportElementTypePassport              EncryptedPassportElementType = "passport"
	EncryptedPassportElementTypeDriverLicense         EncryptedPassportElementType = "driver_license"
	EncryptedPassportElementTypeIdentityCard          EncryptedPassportElementType = "identity_card"
	EncryptedPassportElementTypeInternalPassport      EncryptedPassportElementType = "internal_passport"
	EncryptedPassportElementTypeAddress               EncryptedPassportElementType = "address"
	EncryptedPassportElementTypeUtilityBill           EncryptedPassportElementType = "utility_bill"
	EncryptedPassportElementTypeBankStatement         EncryptedPassportElementType = "bank_statement"
	EncryptedPassportElementTypeRentalAgreement       EncryptedPassportElementType = "rental_agreement"
	EncryptedPassportElementTypePassportRegistration  EncryptedPassportElementType = "passport_registration"
	EncryptedPassportElementTypeTemporaryRegistration EncryptedPassportElementType = "temporary_registration"
	EncryptedPassportElementTypePhoneNumber           EncryptedPassportElementType = "phone_number"
	EncryptedPassportElementTypeEmail                 EncryptedPassportElementType = "email"
)

func (*EncryptedPassportElementType) Decode

Decode decodes EncryptedPassportElementType from json.

func (EncryptedPassportElementType) Encode

Encode encodes EncryptedPassportElementType as json.

func (EncryptedPassportElementType) MarshalJSON

func (s EncryptedPassportElementType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (EncryptedPassportElementType) MarshalText

func (s EncryptedPassportElementType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*EncryptedPassportElementType) UnmarshalJSON

func (s *EncryptedPassportElementType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*EncryptedPassportElementType) UnmarshalText

func (s *EncryptedPassportElementType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (EncryptedPassportElementType) Validate

func (s EncryptedPassportElementType) Validate() error

type Error

type Error struct {
	Ok          bool                  `json:"ok"`
	ErrorCode   int                   `json:"error_code"`
	Description string                `json:"description"`
	Parameters  OptResponseParameters `json:"parameters"`
}

Ref: #/components/schemas/Error

func (*Error) Decode

func (s *Error) Decode(d *jx.Decoder) error

Decode decodes Error from json.

func (*Error) Encode

func (s *Error) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Error) GetDescription

func (s *Error) GetDescription() string

GetDescription returns the value of Description.

func (*Error) GetErrorCode

func (s *Error) GetErrorCode() int

GetErrorCode returns the value of ErrorCode.

func (*Error) GetOk

func (s *Error) GetOk() bool

GetOk returns the value of Ok.

func (*Error) GetParameters

func (s *Error) GetParameters() OptResponseParameters

GetParameters returns the value of Parameters.

func (*Error) MarshalJSON

func (s *Error) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Error) SetDescription

func (s *Error) SetDescription(val string)

SetDescription sets the value of Description.

func (*Error) SetErrorCode

func (s *Error) SetErrorCode(val int)

SetErrorCode sets the value of ErrorCode.

func (*Error) SetOk

func (s *Error) SetOk(val bool)

SetOk sets the value of Ok.

func (*Error) SetParameters

func (s *Error) SetParameters(val OptResponseParameters)

SetParameters sets the value of Parameters.

func (*Error) UnmarshalJSON

func (s *Error) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type ErrorStatusCode

type ErrorStatusCode struct {
	StatusCode int
	Response   Error
}

ErrorStatusCode wraps Error with StatusCode.

func (*ErrorStatusCode) Error

func (s *ErrorStatusCode) Error() string

func (*ErrorStatusCode) GetResponse

func (s *ErrorStatusCode) GetResponse() Error

GetResponse returns the value of Response.

func (*ErrorStatusCode) GetStatusCode

func (s *ErrorStatusCode) GetStatusCode() int

GetStatusCode returns the value of StatusCode.

func (*ErrorStatusCode) SetResponse

func (s *ErrorStatusCode) SetResponse(val Error)

SetResponse sets the value of Response.

func (*ErrorStatusCode) SetStatusCode

func (s *ErrorStatusCode) SetStatusCode(val int)

SetStatusCode sets the value of StatusCode.

type ExportChatInviteLink struct {
	ChatID ID `json:"chat_id"`
}

Input for exportChatInviteLink. Ref: #/components/schemas/exportChatInviteLink

func (*ExportChatInviteLink) Decode

func (s *ExportChatInviteLink) Decode(d *jx.Decoder) error

Decode decodes ExportChatInviteLink from json.

func (*ExportChatInviteLink) Encode

func (s *ExportChatInviteLink) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ExportChatInviteLink) GetChatID

func (s *ExportChatInviteLink) GetChatID() ID

GetChatID returns the value of ChatID.

func (*ExportChatInviteLink) MarshalJSON

func (s *ExportChatInviteLink) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ExportChatInviteLink) SetChatID

func (s *ExportChatInviteLink) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*ExportChatInviteLink) UnmarshalJSON

func (s *ExportChatInviteLink) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type File

type File struct {
	// Identifier for this file, which can be used to download or reuse the file.
	FileID string `json:"file_id"`
	// Unique identifier for this file, which is supposed to be the same over time and for different bots.
	//  Can't be used to download or reuse the file.
	FileUniqueID string `json:"file_unique_id"`
	// _Optional_. File size in bytes. It can be bigger than 2^31 and some programming languages may have
	// difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed
	// 64-bit integer or double-precision float type are safe for storing this value.
	FileSize OptInt `json:"file_size"`
	// _Optional_. File path. Use `https://api.telegram.org/file/bot<token>/<file_path>` to get the file.
	FilePath OptString `json:"file_path"`
}

This object represents a file ready to be downloaded. The file can be downloaded via the link `https://api.telegram.org/file/bot<token>/<file_path>`. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling [getFile](https://core.telegram.org/bots/api#getfile). Ref: #/components/schemas/File

func (*File) Decode

func (s *File) Decode(d *jx.Decoder) error

Decode decodes File from json.

func (*File) Encode

func (s *File) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*File) GetFileID

func (s *File) GetFileID() string

GetFileID returns the value of FileID.

func (*File) GetFilePath

func (s *File) GetFilePath() OptString

GetFilePath returns the value of FilePath.

func (*File) GetFileSize

func (s *File) GetFileSize() OptInt

GetFileSize returns the value of FileSize.

func (*File) GetFileUniqueID

func (s *File) GetFileUniqueID() string

GetFileUniqueID returns the value of FileUniqueID.

func (*File) MarshalJSON

func (s *File) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*File) SetFileID

func (s *File) SetFileID(val string)

SetFileID sets the value of FileID.

func (*File) SetFilePath

func (s *File) SetFilePath(val OptString)

SetFilePath sets the value of FilePath.

func (*File) SetFileSize

func (s *File) SetFileSize(val OptInt)

SetFileSize sets the value of FileSize.

func (*File) SetFileUniqueID

func (s *File) SetFileUniqueID(val string)

SetFileUniqueID sets the value of FileUniqueID.

func (*File) UnmarshalJSON

func (s *File) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ForceReply

type ForceReply struct {
	// Shows reply interface to the user, as if they manually selected the bot's message and tapped
	// 'Reply'.
	ForceReply bool `json:"force_reply"`
	// _Optional_. The placeholder to be shown in the input field when the reply is active; 1-64
	// characters.
	InputFieldPlaceholder OptString `json:"input_field_placeholder"`
	// _Optional_. Use this parameter if you want to force reply from specific users only. Targets: 1)
	// users that are @mentioned in the _text_ of the [Message](https://core.telegram.
	// org/bots/api#message) object; 2) if the bot's message is a reply (has _reply_to_message_id_),
	// sender of the original message.
	Selective OptBool `json:"selective"`
}

Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice [privacy mode](https://core.telegram.org/bots/features#privacy-mode). Ref: #/components/schemas/ForceReply

func (*ForceReply) Decode

func (s *ForceReply) Decode(d *jx.Decoder) error

Decode decodes ForceReply from json.

func (*ForceReply) Encode

func (s *ForceReply) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ForceReply) GetForceReply

func (s *ForceReply) GetForceReply() bool

GetForceReply returns the value of ForceReply.

func (*ForceReply) GetInputFieldPlaceholder

func (s *ForceReply) GetInputFieldPlaceholder() OptString

GetInputFieldPlaceholder returns the value of InputFieldPlaceholder.

func (*ForceReply) GetSelective

func (s *ForceReply) GetSelective() OptBool

GetSelective returns the value of Selective.

func (*ForceReply) MarshalJSON

func (s *ForceReply) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ForceReply) SetForceReply

func (s *ForceReply) SetForceReply(val bool)

SetForceReply sets the value of ForceReply.

func (*ForceReply) SetInputFieldPlaceholder

func (s *ForceReply) SetInputFieldPlaceholder(val OptString)

SetInputFieldPlaceholder sets the value of InputFieldPlaceholder.

func (*ForceReply) SetSelective

func (s *ForceReply) SetSelective(val OptBool)

SetSelective sets the value of Selective.

func (*ForceReply) UnmarshalJSON

func (s *ForceReply) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ForceReply) Validate

func (s *ForceReply) Validate() error

type ForumTopicClosed

type ForumTopicClosed struct{}

This object represents a service message about a forum topic closed in the chat. Currently holds no information. Ref: #/components/schemas/ForumTopicClosed

func (*ForumTopicClosed) Decode

func (s *ForumTopicClosed) Decode(d *jx.Decoder) error

Decode decodes ForumTopicClosed from json.

func (*ForumTopicClosed) Encode

func (s *ForumTopicClosed) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ForumTopicClosed) MarshalJSON

func (s *ForumTopicClosed) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ForumTopicClosed) UnmarshalJSON

func (s *ForumTopicClosed) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ForumTopicCreated

type ForumTopicCreated struct {
	// Name of the topic.
	Name string `json:"name"`
	// Color of the topic icon in RGB format.
	IconColor int `json:"icon_color"`
	// _Optional_. Unique identifier of the custom emoji shown as the topic icon.
	IconCustomEmojiID OptString `json:"icon_custom_emoji_id"`
}

This object represents a service message about a new forum topic created in the chat. Ref: #/components/schemas/ForumTopicCreated

func (*ForumTopicCreated) Decode

func (s *ForumTopicCreated) Decode(d *jx.Decoder) error

Decode decodes ForumTopicCreated from json.

func (*ForumTopicCreated) Encode

func (s *ForumTopicCreated) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ForumTopicCreated) GetIconColor

func (s *ForumTopicCreated) GetIconColor() int

GetIconColor returns the value of IconColor.

func (*ForumTopicCreated) GetIconCustomEmojiID

func (s *ForumTopicCreated) GetIconCustomEmojiID() OptString

GetIconCustomEmojiID returns the value of IconCustomEmojiID.

func (*ForumTopicCreated) GetName

func (s *ForumTopicCreated) GetName() string

GetName returns the value of Name.

func (*ForumTopicCreated) MarshalJSON

func (s *ForumTopicCreated) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ForumTopicCreated) SetIconColor

func (s *ForumTopicCreated) SetIconColor(val int)

SetIconColor sets the value of IconColor.

func (*ForumTopicCreated) SetIconCustomEmojiID

func (s *ForumTopicCreated) SetIconCustomEmojiID(val OptString)

SetIconCustomEmojiID sets the value of IconCustomEmojiID.

func (*ForumTopicCreated) SetName

func (s *ForumTopicCreated) SetName(val string)

SetName sets the value of Name.

func (*ForumTopicCreated) UnmarshalJSON

func (s *ForumTopicCreated) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ForumTopicEdited

type ForumTopicEdited struct {
	// _Optional_. New name of the topic, if it was edited.
	Name OptString `json:"name"`
	// _Optional_. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty
	// string if the icon was removed.
	IconCustomEmojiID OptString `json:"icon_custom_emoji_id"`
}

This object represents a service message about an edited forum topic. Ref: #/components/schemas/ForumTopicEdited

func (*ForumTopicEdited) Decode

func (s *ForumTopicEdited) Decode(d *jx.Decoder) error

Decode decodes ForumTopicEdited from json.

func (*ForumTopicEdited) Encode

func (s *ForumTopicEdited) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ForumTopicEdited) GetIconCustomEmojiID

func (s *ForumTopicEdited) GetIconCustomEmojiID() OptString

GetIconCustomEmojiID returns the value of IconCustomEmojiID.

func (*ForumTopicEdited) GetName

func (s *ForumTopicEdited) GetName() OptString

GetName returns the value of Name.

func (*ForumTopicEdited) MarshalJSON

func (s *ForumTopicEdited) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ForumTopicEdited) SetIconCustomEmojiID

func (s *ForumTopicEdited) SetIconCustomEmojiID(val OptString)

SetIconCustomEmojiID sets the value of IconCustomEmojiID.

func (*ForumTopicEdited) SetName

func (s *ForumTopicEdited) SetName(val OptString)

SetName sets the value of Name.

func (*ForumTopicEdited) UnmarshalJSON

func (s *ForumTopicEdited) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ForumTopicReopened

type ForumTopicReopened struct{}

This object represents a service message about a forum topic reopened in the chat. Currently holds no information. Ref: #/components/schemas/ForumTopicReopened

func (*ForumTopicReopened) Decode

func (s *ForumTopicReopened) Decode(d *jx.Decoder) error

Decode decodes ForumTopicReopened from json.

func (*ForumTopicReopened) Encode

func (s *ForumTopicReopened) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ForumTopicReopened) MarshalJSON

func (s *ForumTopicReopened) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ForumTopicReopened) UnmarshalJSON

func (s *ForumTopicReopened) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ForwardMessage

type ForwardMessage struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.
	MessageThreadID OptInt `json:"message_thread_id"`
	FromChatID      ID     `json:"from_chat_id"`
	// Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will
	// receive a notification with no sound.
	DisableNotification OptBool `json:"disable_notification"`
	// Protects the contents of the forwarded message from forwarding and saving.
	ProtectContent OptBool `json:"protect_content"`
	// Message identifier in the chat specified in _from_chat_id_.
	MessageID int `json:"message_id"`
}

Input for forwardMessage. Ref: #/components/schemas/forwardMessage

func (*ForwardMessage) Decode

func (s *ForwardMessage) Decode(d *jx.Decoder) error

Decode decodes ForwardMessage from json.

func (*ForwardMessage) Encode

func (s *ForwardMessage) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ForwardMessage) GetChatID

func (s *ForwardMessage) GetChatID() ID

GetChatID returns the value of ChatID.

func (*ForwardMessage) GetDisableNotification

func (s *ForwardMessage) GetDisableNotification() OptBool

GetDisableNotification returns the value of DisableNotification.

func (*ForwardMessage) GetFromChatID

func (s *ForwardMessage) GetFromChatID() ID

GetFromChatID returns the value of FromChatID.

func (*ForwardMessage) GetMessageID

func (s *ForwardMessage) GetMessageID() int

GetMessageID returns the value of MessageID.

func (*ForwardMessage) GetMessageThreadID

func (s *ForwardMessage) GetMessageThreadID() OptInt

GetMessageThreadID returns the value of MessageThreadID.

func (*ForwardMessage) GetProtectContent

func (s *ForwardMessage) GetProtectContent() OptBool

GetProtectContent returns the value of ProtectContent.

func (*ForwardMessage) MarshalJSON

func (s *ForwardMessage) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ForwardMessage) SetChatID

func (s *ForwardMessage) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*ForwardMessage) SetDisableNotification

func (s *ForwardMessage) SetDisableNotification(val OptBool)

SetDisableNotification sets the value of DisableNotification.

func (*ForwardMessage) SetFromChatID

func (s *ForwardMessage) SetFromChatID(val ID)

SetFromChatID sets the value of FromChatID.

func (*ForwardMessage) SetMessageID

func (s *ForwardMessage) SetMessageID(val int)

SetMessageID sets the value of MessageID.

func (*ForwardMessage) SetMessageThreadID

func (s *ForwardMessage) SetMessageThreadID(val OptInt)

SetMessageThreadID sets the value of MessageThreadID.

func (*ForwardMessage) SetProtectContent

func (s *ForwardMessage) SetProtectContent(val OptBool)

SetProtectContent sets the value of ProtectContent.

func (*ForwardMessage) UnmarshalJSON

func (s *ForwardMessage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Game

type Game struct {
	// Title of the game.
	Title string `json:"title"`
	// Description of the game.
	Description string `json:"description"`
	// Photo that will be displayed in the game message in chats.
	Photo []PhotoSize `json:"photo"`
	// _Optional_. Brief description of the game or high scores included in the game message. Can be
	// automatically edited to include current high scores for the game when the bot calls
	// [setGameScore](https://core.telegram.org/bots/api#setgamescore), or manually edited using
	// [editMessageText](https://core.telegram.org/bots/api#editmessagetext). 0-4096 characters.
	Text OptString `json:"text"`
	// _Optional_. Special entities that appear in _text_, such as usernames, URLs, bot commands, etc.
	TextEntities []MessageEntity `json:"text_entities"`
	Animation    OptAnimation    `json:"animation"`
}

This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers. Ref: #/components/schemas/Game

func (*Game) Decode

func (s *Game) Decode(d *jx.Decoder) error

Decode decodes Game from json.

func (*Game) Encode

func (s *Game) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Game) GetAnimation

func (s *Game) GetAnimation() OptAnimation

GetAnimation returns the value of Animation.

func (*Game) GetDescription

func (s *Game) GetDescription() string

GetDescription returns the value of Description.

func (*Game) GetPhoto

func (s *Game) GetPhoto() []PhotoSize

GetPhoto returns the value of Photo.

func (*Game) GetText

func (s *Game) GetText() OptString

GetText returns the value of Text.

func (*Game) GetTextEntities

func (s *Game) GetTextEntities() []MessageEntity

GetTextEntities returns the value of TextEntities.

func (*Game) GetTitle

func (s *Game) GetTitle() string

GetTitle returns the value of Title.

func (*Game) MarshalJSON

func (s *Game) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Game) SetAnimation

func (s *Game) SetAnimation(val OptAnimation)

SetAnimation sets the value of Animation.

func (*Game) SetDescription

func (s *Game) SetDescription(val string)

SetDescription sets the value of Description.

func (*Game) SetPhoto

func (s *Game) SetPhoto(val []PhotoSize)

SetPhoto sets the value of Photo.

func (*Game) SetText

func (s *Game) SetText(val OptString)

SetText sets the value of Text.

func (*Game) SetTextEntities

func (s *Game) SetTextEntities(val []MessageEntity)

SetTextEntities sets the value of TextEntities.

func (*Game) SetTitle

func (s *Game) SetTitle(val string)

SetTitle sets the value of Title.

func (*Game) UnmarshalJSON

func (s *Game) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Game) Validate

func (s *Game) Validate() error

type GameHighScore

type GameHighScore struct {
	// Position in high score table for the game.
	Position int  `json:"position"`
	User     User `json:"user"`
	// Score.
	Score int `json:"score"`
}

This object represents one row of the high scores table for a game. Ref: #/components/schemas/GameHighScore

func (*GameHighScore) Decode

func (s *GameHighScore) Decode(d *jx.Decoder) error

Decode decodes GameHighScore from json.

func (*GameHighScore) Encode

func (s *GameHighScore) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GameHighScore) GetPosition

func (s *GameHighScore) GetPosition() int

GetPosition returns the value of Position.

func (*GameHighScore) GetScore

func (s *GameHighScore) GetScore() int

GetScore returns the value of Score.

func (*GameHighScore) GetUser

func (s *GameHighScore) GetUser() User

GetUser returns the value of User.

func (*GameHighScore) MarshalJSON

func (s *GameHighScore) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GameHighScore) SetPosition

func (s *GameHighScore) SetPosition(val int)

SetPosition sets the value of Position.

func (*GameHighScore) SetScore

func (s *GameHighScore) SetScore(val int)

SetScore sets the value of Score.

func (*GameHighScore) SetUser

func (s *GameHighScore) SetUser(val User)

SetUser sets the value of User.

func (*GameHighScore) UnmarshalJSON

func (s *GameHighScore) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GeneralForumTopicHidden

type GeneralForumTopicHidden struct{}

This object represents a service message about General forum topic hidden in the chat. Currently holds no information. Ref: #/components/schemas/GeneralForumTopicHidden

func (*GeneralForumTopicHidden) Decode

func (s *GeneralForumTopicHidden) Decode(d *jx.Decoder) error

Decode decodes GeneralForumTopicHidden from json.

func (*GeneralForumTopicHidden) Encode

func (s *GeneralForumTopicHidden) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GeneralForumTopicHidden) MarshalJSON

func (s *GeneralForumTopicHidden) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GeneralForumTopicHidden) UnmarshalJSON

func (s *GeneralForumTopicHidden) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GeneralForumTopicUnhidden

type GeneralForumTopicUnhidden struct{}

This object represents a service message about General forum topic unhidden in the chat. Currently holds no information. Ref: #/components/schemas/GeneralForumTopicUnhidden

func (*GeneralForumTopicUnhidden) Decode

func (s *GeneralForumTopicUnhidden) Decode(d *jx.Decoder) error

Decode decodes GeneralForumTopicUnhidden from json.

func (*GeneralForumTopicUnhidden) Encode

func (s *GeneralForumTopicUnhidden) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GeneralForumTopicUnhidden) MarshalJSON

func (s *GeneralForumTopicUnhidden) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GeneralForumTopicUnhidden) UnmarshalJSON

func (s *GeneralForumTopicUnhidden) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetChat

type GetChat struct {
	ChatID ID `json:"chat_id"`
}

Input for getChat. Ref: #/components/schemas/getChat

func (*GetChat) Decode

func (s *GetChat) Decode(d *jx.Decoder) error

Decode decodes GetChat from json.

func (*GetChat) Encode

func (s *GetChat) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetChat) GetChatID

func (s *GetChat) GetChatID() ID

GetChatID returns the value of ChatID.

func (*GetChat) MarshalJSON

func (s *GetChat) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetChat) SetChatID

func (s *GetChat) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*GetChat) UnmarshalJSON

func (s *GetChat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetChatAdministrators

type GetChatAdministrators struct {
	ChatID ID `json:"chat_id"`
}

Input for getChatAdministrators. Ref: #/components/schemas/getChatAdministrators

func (*GetChatAdministrators) Decode

func (s *GetChatAdministrators) Decode(d *jx.Decoder) error

Decode decodes GetChatAdministrators from json.

func (*GetChatAdministrators) Encode

func (s *GetChatAdministrators) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetChatAdministrators) GetChatID

func (s *GetChatAdministrators) GetChatID() ID

GetChatID returns the value of ChatID.

func (*GetChatAdministrators) MarshalJSON

func (s *GetChatAdministrators) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetChatAdministrators) SetChatID

func (s *GetChatAdministrators) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*GetChatAdministrators) UnmarshalJSON

func (s *GetChatAdministrators) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetChatMember

type GetChatMember struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier of the target user.
	UserID int64 `json:"user_id"`
}

Input for getChatMember. Ref: #/components/schemas/getChatMember

func (*GetChatMember) Decode

func (s *GetChatMember) Decode(d *jx.Decoder) error

Decode decodes GetChatMember from json.

func (*GetChatMember) Encode

func (s *GetChatMember) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetChatMember) GetChatID

func (s *GetChatMember) GetChatID() ID

GetChatID returns the value of ChatID.

func (*GetChatMember) GetUserID

func (s *GetChatMember) GetUserID() int64

GetUserID returns the value of UserID.

func (*GetChatMember) MarshalJSON

func (s *GetChatMember) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetChatMember) SetChatID

func (s *GetChatMember) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*GetChatMember) SetUserID

func (s *GetChatMember) SetUserID(val int64)

SetUserID sets the value of UserID.

func (*GetChatMember) UnmarshalJSON

func (s *GetChatMember) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetChatMemberCount

type GetChatMemberCount struct {
	ChatID ID `json:"chat_id"`
}

Input for getChatMemberCount. Ref: #/components/schemas/getChatMemberCount

func (*GetChatMemberCount) Decode

func (s *GetChatMemberCount) Decode(d *jx.Decoder) error

Decode decodes GetChatMemberCount from json.

func (*GetChatMemberCount) Encode

func (s *GetChatMemberCount) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetChatMemberCount) GetChatID

func (s *GetChatMemberCount) GetChatID() ID

GetChatID returns the value of ChatID.

func (*GetChatMemberCount) MarshalJSON

func (s *GetChatMemberCount) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetChatMemberCount) SetChatID

func (s *GetChatMemberCount) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*GetChatMemberCount) UnmarshalJSON

func (s *GetChatMemberCount) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetChatMenuButton

type GetChatMenuButton struct {
	// Unique identifier for the target private chat. If not specified, default bot's menu button will be
	// returned.
	ChatID OptInt64 `json:"chat_id"`
}

Input for getChatMenuButton. Ref: #/components/schemas/getChatMenuButton

func (*GetChatMenuButton) Decode

func (s *GetChatMenuButton) Decode(d *jx.Decoder) error

Decode decodes GetChatMenuButton from json.

func (*GetChatMenuButton) Encode

func (s *GetChatMenuButton) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetChatMenuButton) GetChatID

func (s *GetChatMenuButton) GetChatID() OptInt64

GetChatID returns the value of ChatID.

func (*GetChatMenuButton) MarshalJSON

func (s *GetChatMenuButton) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetChatMenuButton) SetChatID

func (s *GetChatMenuButton) SetChatID(val OptInt64)

SetChatID sets the value of ChatID.

func (*GetChatMenuButton) UnmarshalJSON

func (s *GetChatMenuButton) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetCustomEmojiStickers

type GetCustomEmojiStickers struct {
	// List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.
	CustomEmojiIds []string `json:"custom_emoji_ids"`
}

Input for getCustomEmojiStickers. Ref: #/components/schemas/getCustomEmojiStickers

func (*GetCustomEmojiStickers) Decode

func (s *GetCustomEmojiStickers) Decode(d *jx.Decoder) error

Decode decodes GetCustomEmojiStickers from json.

func (*GetCustomEmojiStickers) Encode

func (s *GetCustomEmojiStickers) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetCustomEmojiStickers) GetCustomEmojiIds

func (s *GetCustomEmojiStickers) GetCustomEmojiIds() []string

GetCustomEmojiIds returns the value of CustomEmojiIds.

func (*GetCustomEmojiStickers) MarshalJSON

func (s *GetCustomEmojiStickers) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetCustomEmojiStickers) SetCustomEmojiIds

func (s *GetCustomEmojiStickers) SetCustomEmojiIds(val []string)

SetCustomEmojiIds sets the value of CustomEmojiIds.

func (*GetCustomEmojiStickers) UnmarshalJSON

func (s *GetCustomEmojiStickers) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*GetCustomEmojiStickers) Validate

func (s *GetCustomEmojiStickers) Validate() error

type GetFile

type GetFile struct {
	// File identifier to get information about.
	FileID string `json:"file_id"`
}

Input for getFile. Ref: #/components/schemas/getFile

func (*GetFile) Decode

func (s *GetFile) Decode(d *jx.Decoder) error

Decode decodes GetFile from json.

func (*GetFile) Encode

func (s *GetFile) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetFile) GetFileID

func (s *GetFile) GetFileID() string

GetFileID returns the value of FileID.

func (*GetFile) MarshalJSON

func (s *GetFile) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetFile) SetFileID

func (s *GetFile) SetFileID(val string)

SetFileID sets the value of FileID.

func (*GetFile) UnmarshalJSON

func (s *GetFile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetGameHighScores

type GetGameHighScores struct {
	// Target user id.
	UserID int64 `json:"user_id"`
	// Required if _inline_message_id_ is not specified. Unique identifier for the target chat.
	ChatID OptInt64 `json:"chat_id"`
	// Required if _inline_message_id_ is not specified. Identifier of the sent message.
	MessageID OptInt `json:"message_id"`
	// Required if _chat_id_ and _message_id_ are not specified. Identifier of the inline message.
	InlineMessageID OptString `json:"inline_message_id"`
}

Input for getGameHighScores. Ref: #/components/schemas/getGameHighScores

func (*GetGameHighScores) Decode

func (s *GetGameHighScores) Decode(d *jx.Decoder) error

Decode decodes GetGameHighScores from json.

func (*GetGameHighScores) Encode

func (s *GetGameHighScores) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetGameHighScores) GetChatID

func (s *GetGameHighScores) GetChatID() OptInt64

GetChatID returns the value of ChatID.

func (*GetGameHighScores) GetInlineMessageID

func (s *GetGameHighScores) GetInlineMessageID() OptString

GetInlineMessageID returns the value of InlineMessageID.

func (*GetGameHighScores) GetMessageID

func (s *GetGameHighScores) GetMessageID() OptInt

GetMessageID returns the value of MessageID.

func (*GetGameHighScores) GetUserID

func (s *GetGameHighScores) GetUserID() int64

GetUserID returns the value of UserID.

func (*GetGameHighScores) MarshalJSON

func (s *GetGameHighScores) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetGameHighScores) SetChatID

func (s *GetGameHighScores) SetChatID(val OptInt64)

SetChatID sets the value of ChatID.

func (*GetGameHighScores) SetInlineMessageID

func (s *GetGameHighScores) SetInlineMessageID(val OptString)

SetInlineMessageID sets the value of InlineMessageID.

func (*GetGameHighScores) SetMessageID

func (s *GetGameHighScores) SetMessageID(val OptInt)

SetMessageID sets the value of MessageID.

func (*GetGameHighScores) SetUserID

func (s *GetGameHighScores) SetUserID(val int64)

SetUserID sets the value of UserID.

func (*GetGameHighScores) UnmarshalJSON

func (s *GetGameHighScores) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetMyCommands

type GetMyCommands struct {
	Scope OptBotCommandScope `json:"scope"`
	// A two-letter ISO 639-1 language code or an empty string.
	LanguageCode OptString `json:"language_code"`
}

Input for getMyCommands. Ref: #/components/schemas/getMyCommands

func (*GetMyCommands) Decode

func (s *GetMyCommands) Decode(d *jx.Decoder) error

Decode decodes GetMyCommands from json.

func (*GetMyCommands) Encode

func (s *GetMyCommands) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetMyCommands) GetLanguageCode

func (s *GetMyCommands) GetLanguageCode() OptString

GetLanguageCode returns the value of LanguageCode.

func (*GetMyCommands) GetScope

func (s *GetMyCommands) GetScope() OptBotCommandScope

GetScope returns the value of Scope.

func (*GetMyCommands) MarshalJSON

func (s *GetMyCommands) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetMyCommands) SetLanguageCode

func (s *GetMyCommands) SetLanguageCode(val OptString)

SetLanguageCode sets the value of LanguageCode.

func (*GetMyCommands) SetScope

func (s *GetMyCommands) SetScope(val OptBotCommandScope)

SetScope sets the value of Scope.

func (*GetMyCommands) UnmarshalJSON

func (s *GetMyCommands) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetMyDefaultAdministratorRights

type GetMyDefaultAdministratorRights struct {
	// Pass _True_ to get default administrator rights of the bot in channels. Otherwise, default
	// administrator rights of the bot for groups and supergroups will be returned.
	ForChannels OptBool `json:"for_channels"`
}

Input for getMyDefaultAdministratorRights. Ref: #/components/schemas/getMyDefaultAdministratorRights

func (*GetMyDefaultAdministratorRights) Decode

Decode decodes GetMyDefaultAdministratorRights from json.

func (*GetMyDefaultAdministratorRights) Encode

Encode implements json.Marshaler.

func (*GetMyDefaultAdministratorRights) GetForChannels

func (s *GetMyDefaultAdministratorRights) GetForChannels() OptBool

GetForChannels returns the value of ForChannels.

func (*GetMyDefaultAdministratorRights) MarshalJSON

func (s *GetMyDefaultAdministratorRights) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetMyDefaultAdministratorRights) SetForChannels

func (s *GetMyDefaultAdministratorRights) SetForChannels(val OptBool)

SetForChannels sets the value of ForChannels.

func (*GetMyDefaultAdministratorRights) UnmarshalJSON

func (s *GetMyDefaultAdministratorRights) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetMyDescription

type GetMyDescription struct {
	// A two-letter ISO 639-1 language code or an empty string.
	LanguageCode OptString `json:"language_code"`
}

Input for getMyDescription. Ref: #/components/schemas/getMyDescription

func (*GetMyDescription) Decode

func (s *GetMyDescription) Decode(d *jx.Decoder) error

Decode decodes GetMyDescription from json.

func (*GetMyDescription) Encode

func (s *GetMyDescription) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetMyDescription) GetLanguageCode

func (s *GetMyDescription) GetLanguageCode() OptString

GetLanguageCode returns the value of LanguageCode.

func (*GetMyDescription) MarshalJSON

func (s *GetMyDescription) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetMyDescription) SetLanguageCode

func (s *GetMyDescription) SetLanguageCode(val OptString)

SetLanguageCode sets the value of LanguageCode.

func (*GetMyDescription) UnmarshalJSON

func (s *GetMyDescription) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetMyName

type GetMyName struct {
	// A two-letter ISO 639-1 language code or an empty string.
	LanguageCode OptString `json:"language_code"`
}

Input for getMyName. Ref: #/components/schemas/getMyName

func (*GetMyName) Decode

func (s *GetMyName) Decode(d *jx.Decoder) error

Decode decodes GetMyName from json.

func (*GetMyName) Encode

func (s *GetMyName) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetMyName) GetLanguageCode

func (s *GetMyName) GetLanguageCode() OptString

GetLanguageCode returns the value of LanguageCode.

func (*GetMyName) MarshalJSON

func (s *GetMyName) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetMyName) SetLanguageCode

func (s *GetMyName) SetLanguageCode(val OptString)

SetLanguageCode sets the value of LanguageCode.

func (*GetMyName) UnmarshalJSON

func (s *GetMyName) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetMyShortDescription

type GetMyShortDescription struct {
	// A two-letter ISO 639-1 language code or an empty string.
	LanguageCode OptString `json:"language_code"`
}

Input for getMyShortDescription. Ref: #/components/schemas/getMyShortDescription

func (*GetMyShortDescription) Decode

func (s *GetMyShortDescription) Decode(d *jx.Decoder) error

Decode decodes GetMyShortDescription from json.

func (*GetMyShortDescription) Encode

func (s *GetMyShortDescription) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetMyShortDescription) GetLanguageCode

func (s *GetMyShortDescription) GetLanguageCode() OptString

GetLanguageCode returns the value of LanguageCode.

func (*GetMyShortDescription) MarshalJSON

func (s *GetMyShortDescription) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetMyShortDescription) SetLanguageCode

func (s *GetMyShortDescription) SetLanguageCode(val OptString)

SetLanguageCode sets the value of LanguageCode.

func (*GetMyShortDescription) UnmarshalJSON

func (s *GetMyShortDescription) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetStickerSet

type GetStickerSet struct {
	// Name of the sticker set.
	Name string `json:"name"`
}

Input for getStickerSet. Ref: #/components/schemas/getStickerSet

func (*GetStickerSet) Decode

func (s *GetStickerSet) Decode(d *jx.Decoder) error

Decode decodes GetStickerSet from json.

func (*GetStickerSet) Encode

func (s *GetStickerSet) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetStickerSet) GetName

func (s *GetStickerSet) GetName() string

GetName returns the value of Name.

func (*GetStickerSet) MarshalJSON

func (s *GetStickerSet) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetStickerSet) SetName

func (s *GetStickerSet) SetName(val string)

SetName sets the value of Name.

func (*GetStickerSet) UnmarshalJSON

func (s *GetStickerSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetUpdates

type GetUpdates struct {
	// Identifier of the first update to be returned. Must be greater by one than the highest among the
	// identifiers of previously received updates. By default, updates starting with the earliest
	// unconfirmed update are returned. An update is considered confirmed as soon as
	// [getUpdates](https://core.telegram.org/bots/api#getupdates) is called with an _offset_ higher than
	// its _update_id_. The negative offset can be specified to retrieve updates starting from _-offset_
	// update from the end of the updates queue. All previous updates will be forgotten.
	Offset OptInt `json:"offset"`
	// Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.
	Limit OptInt `json:"limit"`
	// Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive,
	// short polling should be used for testing purposes only.
	Timeout OptInt `json:"timeout"`
	// A JSON-serialized list of the update types you want your bot to receive. For example, specify
	// [`message`, `edited_channel_post`, `callback_query`] to only receive updates of these types. See
	// [Update](https://core.telegram.org/bots/api#update) for a complete list of available update types.
	// Specify an empty list to receive all update types except _chat_member_ (default). If not specified,
	//  the previous setting will be used.Please note that this parameter doesn't affect updates created
	// before the call to the getUpdates, so unwanted updates may be received for a short period of time.
	AllowedUpdates []string `json:"allowed_updates"`
}

Input for getUpdates. Ref: #/components/schemas/getUpdates

func (*GetUpdates) Decode

func (s *GetUpdates) Decode(d *jx.Decoder) error

Decode decodes GetUpdates from json.

func (*GetUpdates) Encode

func (s *GetUpdates) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetUpdates) GetAllowedUpdates

func (s *GetUpdates) GetAllowedUpdates() []string

GetAllowedUpdates returns the value of AllowedUpdates.

func (*GetUpdates) GetLimit

func (s *GetUpdates) GetLimit() OptInt

GetLimit returns the value of Limit.

func (*GetUpdates) GetOffset

func (s *GetUpdates) GetOffset() OptInt

GetOffset returns the value of Offset.

func (*GetUpdates) GetTimeout

func (s *GetUpdates) GetTimeout() OptInt

GetTimeout returns the value of Timeout.

func (*GetUpdates) MarshalJSON

func (s *GetUpdates) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetUpdates) SetAllowedUpdates

func (s *GetUpdates) SetAllowedUpdates(val []string)

SetAllowedUpdates sets the value of AllowedUpdates.

func (*GetUpdates) SetLimit

func (s *GetUpdates) SetLimit(val OptInt)

SetLimit sets the value of Limit.

func (*GetUpdates) SetOffset

func (s *GetUpdates) SetOffset(val OptInt)

SetOffset sets the value of Offset.

func (*GetUpdates) SetTimeout

func (s *GetUpdates) SetTimeout(val OptInt)

SetTimeout sets the value of Timeout.

func (*GetUpdates) UnmarshalJSON

func (s *GetUpdates) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*GetUpdates) Validate

func (s *GetUpdates) Validate() error

type GetUserProfilePhotos

type GetUserProfilePhotos struct {
	// Unique identifier of the target user.
	UserID int64 `json:"user_id"`
	// Sequential number of the first photo to be returned. By default, all photos are returned.
	Offset OptInt `json:"offset"`
	// Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.
	Limit OptInt `json:"limit"`
}

Input for getUserProfilePhotos. Ref: #/components/schemas/getUserProfilePhotos

func (*GetUserProfilePhotos) Decode

func (s *GetUserProfilePhotos) Decode(d *jx.Decoder) error

Decode decodes GetUserProfilePhotos from json.

func (*GetUserProfilePhotos) Encode

func (s *GetUserProfilePhotos) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetUserProfilePhotos) GetLimit

func (s *GetUserProfilePhotos) GetLimit() OptInt

GetLimit returns the value of Limit.

func (*GetUserProfilePhotos) GetOffset

func (s *GetUserProfilePhotos) GetOffset() OptInt

GetOffset returns the value of Offset.

func (*GetUserProfilePhotos) GetUserID

func (s *GetUserProfilePhotos) GetUserID() int64

GetUserID returns the value of UserID.

func (*GetUserProfilePhotos) MarshalJSON

func (s *GetUserProfilePhotos) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetUserProfilePhotos) SetLimit

func (s *GetUserProfilePhotos) SetLimit(val OptInt)

SetLimit sets the value of Limit.

func (*GetUserProfilePhotos) SetOffset

func (s *GetUserProfilePhotos) SetOffset(val OptInt)

SetOffset sets the value of Offset.

func (*GetUserProfilePhotos) SetUserID

func (s *GetUserProfilePhotos) SetUserID(val int64)

SetUserID sets the value of UserID.

func (*GetUserProfilePhotos) UnmarshalJSON

func (s *GetUserProfilePhotos) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*GetUserProfilePhotos) Validate

func (s *GetUserProfilePhotos) Validate() error

type Handler

type Handler interface {
	// AddStickerToSet implements addStickerToSet operation.
	//
	// Use this method to add a new sticker to a set created by the bot. The format of the added sticker
	// must match the format of the other stickers in the set. Emoji sticker sets can have up to 200
	// stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have
	// up to 120 stickers. Returns _True_ on success.
	//
	// POST /addStickerToSet
	AddStickerToSet(ctx context.Context, req *AddStickerToSet) (*Result, error)
	// AnswerCallbackQuery implements answerCallbackQuery operation.
	//
	// Use this method to send answers to callback queries sent from [inline keyboards](https://core.
	// telegram.org/bots/features#inline-keyboards). The answer will be displayed to the user as a
	// notification at the top of the chat screen or as an alert. On success, _True_ is returned.
	//
	// POST /answerCallbackQuery
	AnswerCallbackQuery(ctx context.Context, req *AnswerCallbackQuery) (*Result, error)
	// AnswerInlineQuery implements answerInlineQuery operation.
	//
	// Use this method to send answers to an inline query. On success, _True_ is returned.No more than
	// **50** results per query are allowed.
	//
	// POST /answerInlineQuery
	AnswerInlineQuery(ctx context.Context, req *AnswerInlineQuery) (*Result, error)
	// AnswerPreCheckoutQuery implements answerPreCheckoutQuery operation.
	//
	// Once the user has confirmed their payment and shipping details, the Bot API sends the final
	// confirmation in the form of an [Update](https://core.telegram.org/bots/api#update) with the field
	// _pre_checkout_query_. Use this method to respond to such pre-checkout queries. On success, _True_
	// is returned. **Note:** The Bot API must receive an answer within 10 seconds after the pre-checkout
	// query was sent.
	//
	// POST /answerPreCheckoutQuery
	AnswerPreCheckoutQuery(ctx context.Context, req *AnswerPreCheckoutQuery) (*Result, error)
	// AnswerShippingQuery implements answerShippingQuery operation.
	//
	// If you sent an invoice requesting a shipping address and the parameter _is_flexible_ was specified,
	//  the Bot API will send an [Update](https://core.telegram.org/bots/api#update) with a
	// _shipping_query_ field to the bot. Use this method to reply to shipping queries. On success,
	// _True_ is returned.
	//
	// POST /answerShippingQuery
	AnswerShippingQuery(ctx context.Context, req *AnswerShippingQuery) (*Result, error)
	// AnswerWebAppQuery implements answerWebAppQuery operation.
	//
	// Use this method to set the result of an interaction with a [Web App](https://core.telegram.
	// org/bots/webapps) and send a corresponding message on behalf of the user to the chat from which
	// the query originated. On success, a [SentWebAppMessage](https://core.telegram.
	// org/bots/api#sentwebappmessage) object is returned.
	//
	// POST /answerWebAppQuery
	AnswerWebAppQuery(ctx context.Context, req *AnswerWebAppQuery) (*Result, error)
	// ApproveChatJoinRequest implements approveChatJoinRequest operation.
	//
	// Use this method to approve a chat join request. The bot must be an administrator in the chat for
	// this to work and must have the _can_invite_users_ administrator right. Returns _True_ on success.
	//
	// POST /approveChatJoinRequest
	ApproveChatJoinRequest(ctx context.Context, req *ApproveChatJoinRequest) (*Result, error)
	// BanChatMember implements banChatMember operation.
	//
	// Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups
	// and channels, the user will not be able to return to the chat on their own using invite links, etc.
	// , unless [unbanned](https://core.telegram.org/bots/api#unbanchatmember) first. The bot must be an
	// administrator in the chat for this to work and must have the appropriate administrator rights.
	// Returns _True_ on success.
	//
	// POST /banChatMember
	BanChatMember(ctx context.Context, req *BanChatMember) (*Result, error)
	// BanChatSenderChat implements banChatSenderChat operation.
	//
	// Use this method to ban a channel chat in a supergroup or a channel. Until the chat is
	// [unbanned](https://core.telegram.org/bots/api#unbanchatsenderchat), the owner of the banned chat
	// won't be able to send messages on behalf of **any of their channels**. The bot must be an
	// administrator in the supergroup or channel for this to work and must have the appropriate
	// administrator rights. Returns _True_ on success.
	//
	// POST /banChatSenderChat
	BanChatSenderChat(ctx context.Context, req *BanChatSenderChat) (*Result, error)
	// Close implements close operation.
	//
	// Use this method to close the bot instance before moving it from one local server to another. You
	// need to delete the webhook before calling this method to ensure that the bot isn't launched again
	// after server restart. The method will return error 429 in the first 10 minutes after the bot is
	// launched. Returns _True_ on success. Requires no parameters.
	//
	// POST /close
	Close(ctx context.Context) (*Result, error)
	// CloseForumTopic implements closeForumTopic operation.
	//
	// Use this method to close an open topic in a forum supergroup chat. The bot must be an
	// administrator in the chat for this to work and must have the _can_manage_topics_ administrator
	// rights, unless it is the creator of the topic. Returns _True_ on success.
	//
	// POST /closeForumTopic
	CloseForumTopic(ctx context.Context, req *CloseForumTopic) (*Result, error)
	// CloseGeneralForumTopic implements closeGeneralForumTopic operation.
	//
	// Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an
	// administrator in the chat for this to work and must have the _can_manage_topics_ administrator
	// rights. Returns _True_ on success.
	//
	// POST /closeGeneralForumTopic
	CloseGeneralForumTopic(ctx context.Context, req *CloseGeneralForumTopic) (*Result, error)
	// CopyMessage implements copyMessage operation.
	//
	// Use this method to copy messages of any kind. Service messages and invoice messages can't be
	// copied. A quiz [poll](https://core.telegram.org/bots/api#poll) can be copied only if the value of
	// the field _correct_option_id_ is known to the bot. The method is analogous to the method
	// [forwardMessage](https://core.telegram.org/bots/api#forwardmessage), but the copied message
	// doesn't have a link to the original message. Returns the [MessageId](https://core.telegram.
	// org/bots/api#messageid) of the sent message on success.
	//
	// POST /copyMessage
	CopyMessage(ctx context.Context, req *CopyMessage) (*ResultMessageId, error)
	// CreateChatInviteLink implements createChatInviteLink operation.
	//
	// Use this method to create an additional invite link for a chat. The bot must be an administrator
	// in the chat for this to work and must have the appropriate administrator rights. The link can be
	// revoked using the method [revokeChatInviteLink](https://core.telegram.
	// org/bots/api#revokechatinvitelink). Returns the new invite link as [ChatInviteLink](https://core.
	// telegram.org/bots/api#chatinvitelink) object.
	//
	// POST /createChatInviteLink
	CreateChatInviteLink(ctx context.Context, req *CreateChatInviteLink) (*ResultChatInviteLink, error)
	// CreateForumTopic implements createForumTopic operation.
	//
	// Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in
	// the chat for this to work and must have the _can_manage_topics_ administrator rights. Returns
	// information about the created topic as a [ForumTopic](https://core.telegram.
	// org/bots/api#forumtopic) object.
	//
	// POST /createForumTopic
	CreateForumTopic(ctx context.Context, req *CreateForumTopic) (*Result, error)
	// CreateInvoiceLink implements createInvoiceLink operation.
	//
	// Use this method to create a link for an invoice. Returns the created invoice link as _String_ on
	// success.
	//
	// POST /createInvoiceLink
	CreateInvoiceLink(ctx context.Context, req *CreateInvoiceLink) (*ResultString, error)
	// CreateNewStickerSet implements createNewStickerSet operation.
	//
	// Use this method to create a new sticker set owned by a user. The bot will be able to edit the
	// sticker set thus created. Returns _True_ on success.
	//
	// POST /createNewStickerSet
	CreateNewStickerSet(ctx context.Context, req *CreateNewStickerSet) (*Result, error)
	// DeclineChatJoinRequest implements declineChatJoinRequest operation.
	//
	// Use this method to decline a chat join request. The bot must be an administrator in the chat for
	// this to work and must have the _can_invite_users_ administrator right. Returns _True_ on success.
	//
	// POST /declineChatJoinRequest
	DeclineChatJoinRequest(ctx context.Context, req *DeclineChatJoinRequest) (*Result, error)
	// DeleteChatPhoto implements deleteChatPhoto operation.
	//
	// Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be
	// an administrator in the chat for this to work and must have the appropriate administrator rights.
	// Returns _True_ on success.
	//
	// POST /deleteChatPhoto
	DeleteChatPhoto(ctx context.Context, req *DeleteChatPhoto) (*Result, error)
	// DeleteChatStickerSet implements deleteChatStickerSet operation.
	//
	// Use this method to delete a group sticker set from a supergroup. The bot must be an administrator
	// in the chat for this to work and must have the appropriate administrator rights. Use the field
	// _can_set_sticker_set_ optionally returned in [getChat](https://core.telegram.org/bots/api#getchat)
	// requests to check if the bot can use this method. Returns _True_ on success.
	//
	// POST /deleteChatStickerSet
	DeleteChatStickerSet(ctx context.Context, req *DeleteChatStickerSet) (*Result, error)
	// DeleteForumTopic implements deleteForumTopic operation.
	//
	// Use this method to delete a forum topic along with all its messages in a forum supergroup chat.
	// The bot must be an administrator in the chat for this to work and must have the
	// _can_delete_messages_ administrator rights. Returns _True_ on success.
	//
	// POST /deleteForumTopic
	DeleteForumTopic(ctx context.Context, req *DeleteForumTopic) (*Result, error)
	// DeleteMessage implements deleteMessage operation.
	//
	// Use this method to delete a message, including service messages, with the following limitations:-
	// A message can only be deleted if it was sent less than 48 hours ago.- Service messages about a
	// supergroup, channel, or forum topic creation can't be deleted.- A dice message in a private chat
	// can only be deleted if it was sent more than 24 hours ago.- Bots can delete outgoing messages in
	// private chats, groups, and supergroups.- Bots can delete incoming messages in private chats.- Bots
	// granted _can_post_messages_ permissions can delete outgoing messages in channels.- If the bot is
	// an administrator of a group, it can delete any message there.- If the bot has
	// _can_delete_messages_ permission in a supergroup or a channel, it can delete any message there.
	// Returns _True_ on success.
	//
	// POST /deleteMessage
	DeleteMessage(ctx context.Context, req *DeleteMessage) (*Result, error)
	// DeleteMyCommands implements deleteMyCommands operation.
	//
	// Use this method to delete the list of the bot's commands for the given scope and user language.
	// After deletion, [higher level commands](https://core.telegram.
	// org/bots/api#determining-list-of-commands) will be shown to affected users. Returns _True_ on
	// success.
	//
	// POST /deleteMyCommands
	DeleteMyCommands(ctx context.Context, req OptDeleteMyCommands) (*Result, error)
	// DeleteStickerFromSet implements deleteStickerFromSet operation.
	//
	// Use this method to delete a sticker from a set created by the bot. Returns _True_ on success.
	//
	// POST /deleteStickerFromSet
	DeleteStickerFromSet(ctx context.Context, req *DeleteStickerFromSet) (*Result, error)
	// DeleteStickerSet implements deleteStickerSet operation.
	//
	// Use this method to delete a sticker set that was created by the bot. Returns _True_ on success.
	//
	// POST /deleteStickerSet
	DeleteStickerSet(ctx context.Context, req *DeleteStickerSet) (*Result, error)
	// DeleteWebhook implements deleteWebhook operation.
	//
	// Use this method to remove webhook integration if you decide to switch back to
	// [getUpdates](https://core.telegram.org/bots/api#getupdates). Returns _True_ on success.
	//
	// POST /deleteWebhook
	DeleteWebhook(ctx context.Context, req OptDeleteWebhook) (*Result, error)
	// EditChatInviteLink implements editChatInviteLink operation.
	//
	// Use this method to edit a non-primary invite link created by the bot. The bot must be an
	// administrator in the chat for this to work and must have the appropriate administrator rights.
	// Returns the edited invite link as a [ChatInviteLink](https://core.telegram.
	// org/bots/api#chatinvitelink) object.
	//
	// POST /editChatInviteLink
	EditChatInviteLink(ctx context.Context, req *EditChatInviteLink) (*ResultChatInviteLink, error)
	// EditForumTopic implements editForumTopic operation.
	//
	// Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an
	// administrator in the chat for this to work and must have _can_manage_topics_ administrator rights,
	// unless it is the creator of the topic. Returns _True_ on success.
	//
	// POST /editForumTopic
	EditForumTopic(ctx context.Context, req *EditForumTopic) (*Result, error)
	// EditGeneralForumTopic implements editGeneralForumTopic operation.
	//
	// Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must
	// be an administrator in the chat for this to work and must have _can_manage_topics_ administrator
	// rights. Returns _True_ on success.
	//
	// POST /editGeneralForumTopic
	EditGeneralForumTopic(ctx context.Context, req *EditGeneralForumTopic) (*Result, error)
	// EditMessageCaption implements editMessageCaption operation.
	//
	// Use this method to edit captions of messages. On success, if the edited message is not an inline
	// message, the edited [Message](https://core.telegram.org/bots/api#message) is returned, otherwise
	// _True_ is returned.
	//
	// POST /editMessageCaption
	EditMessageCaption(ctx context.Context, req *EditMessageCaption) (*ResultMessageOrBoolean, error)
	// EditMessageLiveLocation implements editMessageLiveLocation operation.
	//
	// Use this method to edit live location messages. A location can be edited until its _live_period_
	// expires or editing is explicitly disabled by a call to [stopMessageLiveLocation](https://core.
	// telegram.org/bots/api#stopmessagelivelocation). On success, if the edited message is not an inline
	// message, the edited [Message](https://core.telegram.org/bots/api#message) is returned, otherwise
	// _True_ is returned.
	//
	// POST /editMessageLiveLocation
	EditMessageLiveLocation(ctx context.Context, req *EditMessageLiveLocation) (*ResultMessageOrBoolean, error)
	// EditMessageMedia implements editMessageMedia operation.
	//
	// Use this method to edit animation, audio, document, photo, or video messages. If a message is part
	// of a message album, then it can be edited only to an audio for audio albums, only to a document
	// for document albums and to a photo or a video otherwise. When an inline message is edited, a new
	// file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On
	// success, if the edited message is not an inline message, the edited [Message](https://core.
	// telegram.org/bots/api#message) is returned, otherwise _True_ is returned.
	//
	// POST /editMessageMedia
	EditMessageMedia(ctx context.Context, req *EditMessageMedia) (*ResultMessageOrBoolean, error)
	// EditMessageReplyMarkup implements editMessageReplyMarkup operation.
	//
	// Use this method to edit only the reply markup of messages. On success, if the edited message is
	// not an inline message, the edited [Message](https://core.telegram.org/bots/api#message) is
	// returned, otherwise _True_ is returned.
	//
	// POST /editMessageReplyMarkup
	EditMessageReplyMarkup(ctx context.Context, req *EditMessageReplyMarkup) (*ResultMessageOrBoolean, error)
	// EditMessageText implements editMessageText operation.
	//
	// Use this method to edit text and [game](https://core.telegram.org/bots/api#games) messages. On
	// success, if the edited message is not an inline message, the edited [Message](https://core.
	// telegram.org/bots/api#message) is returned, otherwise _True_ is returned.
	//
	// POST /editMessageText
	EditMessageText(ctx context.Context, req *EditMessageText) (*ResultMessageOrBoolean, error)
	// ExportChatInviteLink implements exportChatInviteLink operation.
	//
	// Use this method to generate a new primary invite link for a chat; any previously generated primary
	// link is revoked. The bot must be an administrator in the chat for this to work and must have the
	// appropriate administrator rights. Returns the new invite link as _String_ on success.
	//
	// POST /exportChatInviteLink
	ExportChatInviteLink(ctx context.Context, req *ExportChatInviteLink) (*ResultString, error)
	// ForwardMessage implements forwardMessage operation.
	//
	// Use this method to forward messages of any kind. Service messages can't be forwarded. On success,
	// the sent [Message](https://core.telegram.org/bots/api#message) is returned.
	//
	// POST /forwardMessage
	ForwardMessage(ctx context.Context, req *ForwardMessage) (*ResultMessage, error)
	// GetChat implements getChat operation.
	//
	// Use this method to get up to date information about the chat (current name of the user for
	// one-on-one conversations, current username of a user, group or channel, etc.). Returns a
	// [Chat](https://core.telegram.org/bots/api#chat) object on success.
	//
	// POST /getChat
	GetChat(ctx context.Context, req *GetChat) (*ResultChat, error)
	// GetChatAdministrators implements getChatAdministrators operation.
	//
	// Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of
	// [ChatMember](https://core.telegram.org/bots/api#chatmember) objects.
	//
	// POST /getChatAdministrators
	GetChatAdministrators(ctx context.Context, req *GetChatAdministrators) (*ResultArrayOfChatMember, error)
	// GetChatMember implements getChatMember operation.
	//
	// Use this method to get information about a member of a chat. The method is only guaranteed to work
	// for other users if the bot is an administrator in the chat. Returns a [ChatMember](https://core.
	// telegram.org/bots/api#chatmember) object on success.
	//
	// POST /getChatMember
	GetChatMember(ctx context.Context, req *GetChatMember) (*ResultChatMember, error)
	// GetChatMemberCount implements getChatMemberCount operation.
	//
	// Use this method to get the number of members in a chat. Returns _Int_ on success.
	//
	// POST /getChatMemberCount
	GetChatMemberCount(ctx context.Context, req *GetChatMemberCount) (*ResultInt, error)
	// GetChatMenuButton implements getChatMenuButton operation.
	//
	// Use this method to get the current value of the bot's menu button in a private chat, or the
	// default menu button. Returns [MenuButton](https://core.telegram.org/bots/api#menubutton) on
	// success.
	//
	// POST /getChatMenuButton
	GetChatMenuButton(ctx context.Context, req OptGetChatMenuButton) (*Result, error)
	// GetCustomEmojiStickers implements getCustomEmojiStickers operation.
	//
	// Use this method to get information about custom emoji stickers by their identifiers. Returns an
	// Array of [Sticker](https://core.telegram.org/bots/api#sticker) objects.
	//
	// POST /getCustomEmojiStickers
	GetCustomEmojiStickers(ctx context.Context, req *GetCustomEmojiStickers) (*ResultArrayOfSticker, error)
	// GetFile implements getFile operation.
	//
	// Use this method to get basic information about a file and prepare it for downloading. For the
	// moment, bots can download files of up to 20MB in size. On success, a [File](https://core.telegram.
	// org/bots/api#file) object is returned. The file can then be downloaded via the link `https://api.
	// telegram.org/file/bot<token>/<file_path>`, where `<file_path>` is taken from the response. It is
	// guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can
	// be requested by calling [getFile](https://core.telegram.org/bots/api#getfile) again.
	//
	// POST /getFile
	GetFile(ctx context.Context, req *GetFile) (*ResultFile, error)
	// GetForumTopicIconStickers implements getForumTopicIconStickers operation.
	//
	// Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user.
	// Requires no parameters. Returns an Array of [Sticker](https://core.telegram.org/bots/api#sticker)
	// objects.
	//
	// POST /getForumTopicIconStickers
	GetForumTopicIconStickers(ctx context.Context) (*ResultArrayOfSticker, error)
	// GetGameHighScores implements getGameHighScores operation.
	//
	// Use this method to get data for high score tables. Will return the score of the specified user and
	// several of their neighbors in a game. Returns an Array of [GameHighScore](https://core.telegram.
	// org/bots/api#gamehighscore) objects.
	//
	// POST /getGameHighScores
	GetGameHighScores(ctx context.Context, req *GetGameHighScores) (*ResultArrayOfGameHighScore, error)
	// GetMe implements getMe operation.
	//
	// A simple method for testing your bot's authentication token. Requires no parameters. Returns basic
	// information about the bot in form of a [User](https://core.telegram.org/bots/api#user) object.
	//
	// POST /getMe
	GetMe(ctx context.Context) (*ResultUser, error)
	// GetMyCommands implements getMyCommands operation.
	//
	// Use this method to get the current list of the bot's commands for the given scope and user
	// language. Returns an Array of [BotCommand](https://core.telegram.org/bots/api#botcommand) objects.
	// If commands aren't set, an empty list is returned.
	//
	// POST /getMyCommands
	GetMyCommands(ctx context.Context, req OptGetMyCommands) (*ResultArrayOfBotCommand, error)
	// GetMyDefaultAdministratorRights implements getMyDefaultAdministratorRights operation.
	//
	// Use this method to get the current default administrator rights of the bot. Returns
	// [ChatAdministratorRights](https://core.telegram.org/bots/api#chatadministratorrights) on success.
	//
	// POST /getMyDefaultAdministratorRights
	GetMyDefaultAdministratorRights(ctx context.Context, req OptGetMyDefaultAdministratorRights) (*Result, error)
	// GetMyDescription implements getMyDescription operation.
	//
	// Use this method to get the current bot description for the given user language. Returns
	// [BotDescription](https://core.telegram.org/bots/api#botdescription) on success.
	//
	// POST /getMyDescription
	GetMyDescription(ctx context.Context, req OptGetMyDescription) (*Result, error)
	// GetMyName implements getMyName operation.
	//
	// Use this method to get the current bot name for the given user language. Returns
	// [BotName](https://core.telegram.org/bots/api#botname) on success.
	//
	// POST /getMyName
	GetMyName(ctx context.Context, req OptGetMyName) (*Result, error)
	// GetMyShortDescription implements getMyShortDescription operation.
	//
	// Use this method to get the current bot short description for the given user language. Returns
	// [BotShortDescription](https://core.telegram.org/bots/api#botshortdescription) on success.
	//
	// POST /getMyShortDescription
	GetMyShortDescription(ctx context.Context, req OptGetMyShortDescription) (*Result, error)
	// GetStickerSet implements getStickerSet operation.
	//
	// Use this method to get a sticker set. On success, a [StickerSet](https://core.telegram.
	// org/bots/api#stickerset) object is returned.
	//
	// POST /getStickerSet
	GetStickerSet(ctx context.Context, req *GetStickerSet) (*ResultStickerSet, error)
	// GetUpdates implements getUpdates operation.
	//
	// Use this method to receive incoming updates using long polling ([wiki](https://en.wikipedia.
	// org/wiki/Push_technology#Long_polling)). Returns an Array of [Update](https://core.telegram.
	// org/bots/api#update) objects.
	//
	// POST /getUpdates
	GetUpdates(ctx context.Context, req OptGetUpdates) (*ResultArrayOfUpdate, error)
	// GetUserProfilePhotos implements getUserProfilePhotos operation.
	//
	// Use this method to get a list of profile pictures for a user. Returns a
	// [UserProfilePhotos](https://core.telegram.org/bots/api#userprofilephotos) object.
	//
	// POST /getUserProfilePhotos
	GetUserProfilePhotos(ctx context.Context, req *GetUserProfilePhotos) (*ResultUserProfilePhotos, error)
	// GetWebhookInfo implements getWebhookInfo operation.
	//
	// Use this method to get current webhook status. Requires no parameters. On success, returns a
	// [WebhookInfo](https://core.telegram.org/bots/api#webhookinfo) object. If the bot is using
	// [getUpdates](https://core.telegram.org/bots/api#getupdates), will return an object with the _url_
	// field empty.
	//
	// POST /getWebhookInfo
	GetWebhookInfo(ctx context.Context) (*ResultWebhookInfo, error)
	// HideGeneralForumTopic implements hideGeneralForumTopic operation.
	//
	// Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an
	// administrator in the chat for this to work and must have the _can_manage_topics_ administrator
	// rights. The topic will be automatically closed if it was open. Returns _True_ on success.
	//
	// POST /hideGeneralForumTopic
	HideGeneralForumTopic(ctx context.Context, req *HideGeneralForumTopic) (*Result, error)
	// LeaveChat implements leaveChat operation.
	//
	// Use this method for your bot to leave a group, supergroup or channel. Returns _True_ on success.
	//
	// POST /leaveChat
	LeaveChat(ctx context.Context, req *LeaveChat) (*Result, error)
	// LogOut implements logOut operation.
	//
	// Use this method to log out from the cloud Bot API server before launching the bot locally. You
	// **must** log out the bot before running it locally, otherwise there is no guarantee that the bot
	// will receive updates. After a successful call, you can immediately log in on a local server, but
	// will not be able to log in back to the cloud Bot API server for 10 minutes. Returns _True_ on
	// success. Requires no parameters.
	//
	// POST /logOut
	LogOut(ctx context.Context) (*Result, error)
	// PinChatMessage implements pinChatMessage operation.
	//
	// Use this method to add a message to the list of pinned messages in a chat. If the chat is not a
	// private chat, the bot must be an administrator in the chat for this to work and must have the
	// 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right
	// in a channel. Returns _True_ on success.
	//
	// POST /pinChatMessage
	PinChatMessage(ctx context.Context, req *PinChatMessage) (*Result, error)
	// PromoteChatMember implements promoteChatMember operation.
	//
	// Use this method to promote or demote a user in a supergroup or a channel. The bot must be an
	// administrator in the chat for this to work and must have the appropriate administrator rights.
	// Pass _False_ for all boolean parameters to demote a user. Returns _True_ on success.
	//
	// POST /promoteChatMember
	PromoteChatMember(ctx context.Context, req *PromoteChatMember) (*Result, error)
	// ReopenForumTopic implements reopenForumTopic operation.
	//
	// Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an
	// administrator in the chat for this to work and must have the _can_manage_topics_ administrator
	// rights, unless it is the creator of the topic. Returns _True_ on success.
	//
	// POST /reopenForumTopic
	ReopenForumTopic(ctx context.Context, req *ReopenForumTopic) (*Result, error)
	// ReopenGeneralForumTopic implements reopenGeneralForumTopic operation.
	//
	// Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an
	// administrator in the chat for this to work and must have the _can_manage_topics_ administrator
	// rights. The topic will be automatically unhidden if it was hidden. Returns _True_ on success.
	//
	// POST /reopenGeneralForumTopic
	ReopenGeneralForumTopic(ctx context.Context, req *ReopenGeneralForumTopic) (*Result, error)
	// RestrictChatMember implements restrictChatMember operation.
	//
	// Use this method to restrict a user in a supergroup. The bot must be an administrator in the
	// supergroup for this to work and must have the appropriate administrator rights. Pass _True_ for
	// all permissions to lift restrictions from a user. Returns _True_ on success.
	//
	// POST /restrictChatMember
	RestrictChatMember(ctx context.Context, req *RestrictChatMember) (*Result, error)
	// RevokeChatInviteLink implements revokeChatInviteLink operation.
	//
	// Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new
	// link is automatically generated. The bot must be an administrator in the chat for this to work and
	// must have the appropriate administrator rights. Returns the revoked invite link as
	// [ChatInviteLink](https://core.telegram.org/bots/api#chatinvitelink) object.
	//
	// POST /revokeChatInviteLink
	RevokeChatInviteLink(ctx context.Context, req *RevokeChatInviteLink) (*ResultChatInviteLink, error)
	// SendAnimation implements sendAnimation operation.
	//
	// Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success,
	// the sent [Message](https://core.telegram.org/bots/api#message) is returned. Bots can currently
	// send animation files of up to 50 MB in size, this limit may be changed in the future.
	//
	// POST /sendAnimation
	SendAnimation(ctx context.Context, req *SendAnimation) (*ResultMessage, error)
	// SendAudio implements sendAudio operation.
	//
	// For sending voice messages, use the [sendVoice](https://core.telegram.org/bots/api#sendvoice)
	// method instead.
	//
	// POST /sendAudio
	SendAudio(ctx context.Context, req *SendAudio) (*ResultMessage, error)
	// SendChatAction implements sendChatAction operation.
	//
	// We only recommend using this method when a response from the bot will take a **noticeable** amount
	// of time to arrive.
	//
	// POST /sendChatAction
	SendChatAction(ctx context.Context, req *SendChatAction) (*Result, error)
	// SendContact implements sendContact operation.
	//
	// Use this method to send phone contacts. On success, the sent [Message](https://core.telegram.
	// org/bots/api#message) is returned.
	//
	// POST /sendContact
	SendContact(ctx context.Context, req *SendContact) (*ResultMessage, error)
	// SendDice implements sendDice operation.
	//
	// Use this method to send an animated emoji that will display a random value. On success, the sent
	// [Message](https://core.telegram.org/bots/api#message) is returned.
	//
	// POST /sendDice
	SendDice(ctx context.Context, req *SendDice) (*ResultMessage, error)
	// SendDocument implements sendDocument operation.
	//
	// Use this method to send general files. On success, the sent [Message](https://core.telegram.
	// org/bots/api#message) is returned. Bots can currently send files of any type of up to 50 MB in
	// size, this limit may be changed in the future.
	//
	// POST /sendDocument
	SendDocument(ctx context.Context, req *SendDocument) (*ResultMessage, error)
	// SendGame implements sendGame operation.
	//
	// Use this method to send a game. On success, the sent [Message](https://core.telegram.
	// org/bots/api#message) is returned.
	//
	// POST /sendGame
	SendGame(ctx context.Context, req *SendGame) (*ResultMessage, error)
	// SendInvoice implements sendInvoice operation.
	//
	// Use this method to send invoices. On success, the sent [Message](https://core.telegram.
	// org/bots/api#message) is returned.
	//
	// POST /sendInvoice
	SendInvoice(ctx context.Context, req *SendInvoice) (*ResultMessage, error)
	// SendLocation implements sendLocation operation.
	//
	// Use this method to send point on the map. On success, the sent [Message](https://core.telegram.
	// org/bots/api#message) is returned.
	//
	// POST /sendLocation
	SendLocation(ctx context.Context, req *SendLocation) (*ResultMessage, error)
	// SendMediaGroup implements sendMediaGroup operation.
	//
	// Use this method to send a group of photos, videos, documents or audios as an album. Documents and
	// audio files can be only grouped in an album with messages of the same type. On success, an array
	// of [Messages](https://core.telegram.org/bots/api#message) that were sent is returned.
	//
	// POST /sendMediaGroup
	SendMediaGroup(ctx context.Context, req *SendMediaGroup) (*ResultArrayOfMessage, error)
	// SendMessage implements sendMessage operation.
	//
	// Use this method to send text messages. On success, the sent [Message](https://core.telegram.
	// org/bots/api#message) is returned.
	//
	// POST /sendMessage
	SendMessage(ctx context.Context, req *SendMessage) (*ResultMessage, error)
	// SendPhoto implements sendPhoto operation.
	//
	// Use this method to send photos. On success, the sent [Message](https://core.telegram.
	// org/bots/api#message) is returned.
	//
	// POST /sendPhoto
	SendPhoto(ctx context.Context, req *SendPhoto) (*ResultMessage, error)
	// SendPoll implements sendPoll operation.
	//
	// Use this method to send a native poll. On success, the sent [Message](https://core.telegram.
	// org/bots/api#message) is returned.
	//
	// POST /sendPoll
	SendPoll(ctx context.Context, req *SendPoll) (*ResultMessage, error)
	// SendSticker implements sendSticker operation.
	//
	// Use this method to send static .WEBP, [animated](https://telegram.org/blog/animated-stickers) .TGS,
	//  or [video](https://telegram.org/blog/video-stickers-better-reactions) .WEBM stickers. On success,
	// the sent [Message](https://core.telegram.org/bots/api#message) is returned.
	//
	// POST /sendSticker
	SendSticker(ctx context.Context, req *SendSticker) (*ResultMessage, error)
	// SendVenue implements sendVenue operation.
	//
	// Use this method to send information about a venue. On success, the sent [Message](https://core.
	// telegram.org/bots/api#message) is returned.
	//
	// POST /sendVenue
	SendVenue(ctx context.Context, req *SendVenue) (*ResultMessage, error)
	// SendVideo implements sendVideo operation.
	//
	// Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be
	// sent as [Document](https://core.telegram.org/bots/api#document)). On success, the sent
	// [Message](https://core.telegram.org/bots/api#message) is returned. Bots can currently send video
	// files of up to 50 MB in size, this limit may be changed in the future.
	//
	// POST /sendVideo
	SendVideo(ctx context.Context, req *SendVideo) (*ResultMessage, error)
	// SendVideoNote implements sendVideoNote operation.
	//
	// As of [v.4.0](https://telegram.org/blog/video-messages-and-telescope), Telegram clients support
	// rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On
	// success, the sent [Message](https://core.telegram.org/bots/api#message) is returned.
	//
	// POST /sendVideoNote
	SendVideoNote(ctx context.Context, req *SendVideoNote) (*ResultMessage, error)
	// SendVoice implements sendVoice operation.
	//
	// Use this method to send audio files, if you want Telegram clients to display the file as a
	// playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS
	// (other formats may be sent as [Audio](https://core.telegram.org/bots/api#audio) or
	// [Document](https://core.telegram.org/bots/api#document)). On success, the sent
	// [Message](https://core.telegram.org/bots/api#message) is returned. Bots can currently send voice
	// messages of up to 50 MB in size, this limit may be changed in the future.
	//
	// POST /sendVoice
	SendVoice(ctx context.Context, req *SendVoice) (*ResultMessage, error)
	// SetChatAdministratorCustomTitle implements setChatAdministratorCustomTitle operation.
	//
	// Use this method to set a custom title for an administrator in a supergroup promoted by the bot.
	// Returns _True_ on success.
	//
	// POST /setChatAdministratorCustomTitle
	SetChatAdministratorCustomTitle(ctx context.Context, req *SetChatAdministratorCustomTitle) (*Result, error)
	// SetChatDescription implements setChatDescription operation.
	//
	// Use this method to change the description of a group, a supergroup or a channel. The bot must be
	// an administrator in the chat for this to work and must have the appropriate administrator rights.
	// Returns _True_ on success.
	//
	// POST /setChatDescription
	SetChatDescription(ctx context.Context, req *SetChatDescription) (*Result, error)
	// SetChatMenuButton implements setChatMenuButton operation.
	//
	// Use this method to change the bot's menu button in a private chat, or the default menu button.
	// Returns _True_ on success.
	//
	// POST /setChatMenuButton
	SetChatMenuButton(ctx context.Context, req OptSetChatMenuButton) (*Result, error)
	// SetChatPermissions implements setChatPermissions operation.
	//
	// Use this method to set default chat permissions for all members. The bot must be an administrator
	// in the group or a supergroup for this to work and must have the _can_restrict_members_
	// administrator rights. Returns _True_ on success.
	//
	// POST /setChatPermissions
	SetChatPermissions(ctx context.Context, req *SetChatPermissions) (*Result, error)
	// SetChatPhoto implements setChatPhoto operation.
	//
	// Use this method to set a new profile photo for the chat. Photos can't be changed for private chats.
	//  The bot must be an administrator in the chat for this to work and must have the appropriate
	// administrator rights. Returns _True_ on success.
	//
	// POST /setChatPhoto
	SetChatPhoto(ctx context.Context, req *SetChatPhoto) (*Result, error)
	// SetChatStickerSet implements setChatStickerSet operation.
	//
	// Use this method to set a new group sticker set for a supergroup. The bot must be an administrator
	// in the chat for this to work and must have the appropriate administrator rights. Use the field
	// _can_set_sticker_set_ optionally returned in [getChat](https://core.telegram.org/bots/api#getchat)
	// requests to check if the bot can use this method. Returns _True_ on success.
	//
	// POST /setChatStickerSet
	SetChatStickerSet(ctx context.Context, req *SetChatStickerSet) (*Result, error)
	// SetChatTitle implements setChatTitle operation.
	//
	// Use this method to change the title of a chat. Titles can't be changed for private chats. The bot
	// must be an administrator in the chat for this to work and must have the appropriate administrator
	// rights. Returns _True_ on success.
	//
	// POST /setChatTitle
	SetChatTitle(ctx context.Context, req *SetChatTitle) (*Result, error)
	// SetCustomEmojiStickerSetThumbnail implements setCustomEmojiStickerSetThumbnail operation.
	//
	// Use this method to set the thumbnail of a custom emoji sticker set. Returns _True_ on success.
	//
	// POST /setCustomEmojiStickerSetThumbnail
	SetCustomEmojiStickerSetThumbnail(ctx context.Context, req *SetCustomEmojiStickerSetThumbnail) (*Result, error)
	// SetGameScore implements setGameScore operation.
	//
	// Use this method to set the score of the specified user in a game message. On success, if the
	// message is not an inline message, the [Message](https://core.telegram.org/bots/api#message) is
	// returned, otherwise _True_ is returned. Returns an error, if the new score is not greater than the
	// user's current score in the chat and _force_ is _False_.
	//
	// POST /setGameScore
	SetGameScore(ctx context.Context, req *SetGameScore) (*Result, error)
	// SetMyCommands implements setMyCommands operation.
	//
	// Use this method to change the list of the bot's commands. See [this manual](https://core.telegram.
	// org/bots/features#commands) for more details about bot commands. Returns _True_ on success.
	//
	// POST /setMyCommands
	SetMyCommands(ctx context.Context, req *SetMyCommands) (*Result, error)
	// SetMyDefaultAdministratorRights implements setMyDefaultAdministratorRights operation.
	//
	// Use this method to change the default administrator rights requested by the bot when it's added as
	// an administrator to groups or channels. These rights will be suggested to users, but they are free
	// to modify the list before adding the bot. Returns _True_ on success.
	//
	// POST /setMyDefaultAdministratorRights
	SetMyDefaultAdministratorRights(ctx context.Context, req OptSetMyDefaultAdministratorRights) (*Result, error)
	// SetMyDescription implements setMyDescription operation.
	//
	// Use this method to change the bot's description, which is shown in the chat with the bot if the
	// chat is empty. Returns _True_ on success.
	//
	// POST /setMyDescription
	SetMyDescription(ctx context.Context, req OptSetMyDescription) (*Result, error)
	// SetMyName implements setMyName operation.
	//
	// Use this method to change the bot's name. Returns _True_ on success.
	//
	// POST /setMyName
	SetMyName(ctx context.Context, req OptSetMyName) (*Result, error)
	// SetMyShortDescription implements setMyShortDescription operation.
	//
	// Use this method to change the bot's short description, which is shown on the bot's profile page
	// and is sent together with the link when users share the bot. Returns _True_ on success.
	//
	// POST /setMyShortDescription
	SetMyShortDescription(ctx context.Context, req OptSetMyShortDescription) (*Result, error)
	// SetPassportDataErrors implements setPassportDataErrors operation.
	//
	// Use this if the data submitted by the user doesn't satisfy the standards your service requires for
	// any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan
	// shows evidence of tampering, etc. Supply some details in the error message to make sure the user
	// knows how to correct the issues.
	//
	// POST /setPassportDataErrors
	SetPassportDataErrors(ctx context.Context, req *SetPassportDataErrors) (*Result, error)
	// SetStickerEmojiList implements setStickerEmojiList operation.
	//
	// Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The
	// sticker must belong to a sticker set created by the bot. Returns _True_ on success.
	//
	// POST /setStickerEmojiList
	SetStickerEmojiList(ctx context.Context, req *SetStickerEmojiList) (*Result, error)
	// SetStickerKeywords implements setStickerKeywords operation.
	//
	// Use this method to change search keywords assigned to a regular or custom emoji sticker. The
	// sticker must belong to a sticker set created by the bot. Returns _True_ on success.
	//
	// POST /setStickerKeywords
	SetStickerKeywords(ctx context.Context, req *SetStickerKeywords) (*Result, error)
	// SetStickerMaskPosition implements setStickerMaskPosition operation.
	//
	// Use this method to change the [mask position](https://core.telegram.org/bots/api#maskposition) of
	// a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns
	// _True_ on success.
	//
	// POST /setStickerMaskPosition
	SetStickerMaskPosition(ctx context.Context, req *SetStickerMaskPosition) (*Result, error)
	// SetStickerPositionInSet implements setStickerPositionInSet operation.
	//
	// Use this method to move a sticker in a set created by the bot to a specific position. Returns
	// _True_ on success.
	//
	// POST /setStickerPositionInSet
	SetStickerPositionInSet(ctx context.Context, req *SetStickerPositionInSet) (*Result, error)
	// SetStickerSetThumbnail implements setStickerSetThumbnail operation.
	//
	// Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail
	// file must match the format of the stickers in the set. Returns _True_ on success.
	//
	// POST /setStickerSetThumbnail
	SetStickerSetThumbnail(ctx context.Context, req *SetStickerSetThumbnail) (*Result, error)
	// SetStickerSetTitle implements setStickerSetTitle operation.
	//
	// Use this method to set the title of a created sticker set. Returns _True_ on success.
	//
	// POST /setStickerSetTitle
	SetStickerSetTitle(ctx context.Context, req *SetStickerSetTitle) (*Result, error)
	// SetWebhook implements setWebhook operation.
	//
	// If you'd like to make sure that the webhook was set by you, you can specify secret data in the
	// parameter _secret_token_. If specified, the request will contain a header
	// `X-Telegram-Bot-Api-Secret-Token` with the secret token as content.
	//
	// POST /setWebhook
	SetWebhook(ctx context.Context, req *SetWebhook) (*Result, error)
	// StopMessageLiveLocation implements stopMessageLiveLocation operation.
	//
	// Use this method to stop updating a live location message before _live_period_ expires. On success,
	// if the message is not an inline message, the edited [Message](https://core.telegram.
	// org/bots/api#message) is returned, otherwise _True_ is returned.
	//
	// POST /stopMessageLiveLocation
	StopMessageLiveLocation(ctx context.Context, req *StopMessageLiveLocation) (*ResultMessageOrBoolean, error)
	// StopPoll implements stopPoll operation.
	//
	// Use this method to stop a poll which was sent by the bot. On success, the stopped
	// [Poll](https://core.telegram.org/bots/api#poll) is returned.
	//
	// POST /stopPoll
	StopPoll(ctx context.Context, req *StopPoll) (*ResultPoll, error)
	// UnbanChatMember implements unbanChatMember operation.
	//
	// Use this method to unban a previously banned user in a supergroup or channel. The user will
	// **not** return to the group or channel automatically, but will be able to join via link, etc. The
	// bot must be an administrator for this to work. By default, this method guarantees that after the
	// call the user is not a member of the chat, but will be able to join it. So if the user is a member
	// of the chat they will also be **removed** from the chat. If you don't want this, use the parameter
	// _only_if_banned_. Returns _True_ on success.
	//
	// POST /unbanChatMember
	UnbanChatMember(ctx context.Context, req *UnbanChatMember) (*Result, error)
	// UnbanChatSenderChat implements unbanChatSenderChat operation.
	//
	// Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must
	// be an administrator for this to work and must have the appropriate administrator rights. Returns
	// _True_ on success.
	//
	// POST /unbanChatSenderChat
	UnbanChatSenderChat(ctx context.Context, req *UnbanChatSenderChat) (*Result, error)
	// UnhideGeneralForumTopic implements unhideGeneralForumTopic operation.
	//
	// Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an
	// administrator in the chat for this to work and must have the _can_manage_topics_ administrator
	// rights. Returns _True_ on success.
	//
	// POST /unhideGeneralForumTopic
	UnhideGeneralForumTopic(ctx context.Context, req *UnhideGeneralForumTopic) (*Result, error)
	// UnpinAllChatMessages implements unpinAllChatMessages operation.
	//
	// Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat,
	// the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages'
	// administrator right in a supergroup or 'can_edit_messages' administrator right in a channel.
	// Returns _True_ on success.
	//
	// POST /unpinAllChatMessages
	UnpinAllChatMessages(ctx context.Context, req *UnpinAllChatMessages) (*Result, error)
	// UnpinAllForumTopicMessages implements unpinAllForumTopicMessages operation.
	//
	// Use this method to clear the list of pinned messages in a forum topic. The bot must be an
	// administrator in the chat for this to work and must have the _can_pin_messages_ administrator
	// right in the supergroup. Returns _True_ on success.
	//
	// POST /unpinAllForumTopicMessages
	UnpinAllForumTopicMessages(ctx context.Context, req *UnpinAllForumTopicMessages) (*Result, error)
	// UnpinChatMessage implements unpinChatMessage operation.
	//
	// Use this method to remove a message from the list of pinned messages in a chat. If the chat is not
	// a private chat, the bot must be an administrator in the chat for this to work and must have the
	// 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right
	// in a channel. Returns _True_ on success.
	//
	// POST /unpinChatMessage
	UnpinChatMessage(ctx context.Context, req *UnpinChatMessage) (*Result, error)
	// UploadStickerFile implements uploadStickerFile operation.
	//
	// Use this method to upload a file with a sticker for later use in the
	// [createNewStickerSet](https://core.telegram.org/bots/api#createnewstickerset) and
	// [addStickerToSet](https://core.telegram.org/bots/api#addstickertoset) methods (the file can be
	// used multiple times). Returns the uploaded [File](https://core.telegram.org/bots/api#file) on
	// success.
	//
	// POST /uploadStickerFile
	UploadStickerFile(ctx context.Context, req *UploadStickerFile) (*ResultFile, error)
	// NewError creates *ErrorStatusCode from error returned by handler.
	//
	// Used for common default response.
	NewError(ctx context.Context, err error) *ErrorStatusCode
}

Handler handles operations described by OpenAPI v3 specification.

type HideGeneralForumTopic

type HideGeneralForumTopic struct {
	ChatID ID `json:"chat_id"`
}

Input for hideGeneralForumTopic. Ref: #/components/schemas/hideGeneralForumTopic

func (*HideGeneralForumTopic) Decode

func (s *HideGeneralForumTopic) Decode(d *jx.Decoder) error

Decode decodes HideGeneralForumTopic from json.

func (*HideGeneralForumTopic) Encode

func (s *HideGeneralForumTopic) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*HideGeneralForumTopic) GetChatID

func (s *HideGeneralForumTopic) GetChatID() ID

GetChatID returns the value of ChatID.

func (*HideGeneralForumTopic) MarshalJSON

func (s *HideGeneralForumTopic) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*HideGeneralForumTopic) SetChatID

func (s *HideGeneralForumTopic) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*HideGeneralForumTopic) UnmarshalJSON

func (s *HideGeneralForumTopic) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ID

type ID struct {
	Type   IDType // switch on this field
	String string
	Int64  int64
}

Ref: #/components/schemas/ID ID represents sum type.

func NewInt64ID

func NewInt64ID(v int64) ID

NewInt64ID returns new ID from int64.

func NewStringID

func NewStringID(v string) ID

NewStringID returns new ID from string.

func (*ID) Decode

func (s *ID) Decode(d *jx.Decoder) error

Decode decodes ID from json.

func (ID) Encode

func (s ID) Encode(e *jx.Encoder)

Encode encodes ID as json.

func (ID) GetInt64

func (s ID) GetInt64() (v int64, ok bool)

GetInt64 returns int64 and true boolean if ID is int64.

func (ID) GetString

func (s ID) GetString() (v string, ok bool)

GetString returns string and true boolean if ID is string.

func (ID) IsInt64

func (s ID) IsInt64() bool

IsInt64 reports whether ID is int64.

func (ID) IsString

func (s ID) IsString() bool

IsString reports whether ID is string.

func (ID) MarshalJSON

func (s ID) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ID) SetInt64

func (s *ID) SetInt64(v int64)

SetInt64 sets ID to int64.

func (*ID) SetString

func (s *ID) SetString(v string)

SetString sets ID to string.

func (*ID) UnmarshalJSON

func (s *ID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type IDType

type IDType string

IDType is oneOf type of ID.

const (
	StringID IDType = "string"
	Int64ID  IDType = "int64"
)

Possible values for IDType.

type InlineKeyboardButton

type InlineKeyboardButton struct {
	// Label text on the button.
	Text string `json:"text"`
	// _Optional_. HTTP or tg:// URL to be opened when the button is pressed. Links
	// `tg://user?id=<user_id>` can be used to mention a user by their ID without using a username, if
	// this is allowed by their privacy settings.
	URL OptString `json:"url"`
	// _Optional_. Data to be sent in a [callback query](https://core.telegram.
	// org/bots/api#callbackquery) to the bot when button is pressed, 1-64 bytes.
	CallbackData OptString     `json:"callback_data"`
	WebApp       OptWebAppInfo `json:"web_app"`
	LoginURL     OptLoginUrl   `json:"login_url"`
	// _Optional_. If set, pressing the button will prompt the user to select one of their chats, open
	// that chat and insert the bot's username and the specified inline query in the input field. May be
	// empty, in which case just the bot's username will be inserted.**Note:** This offers an easy way
	// for users to start using your bot in [inline mode](https://core.telegram.org/bots/inline) when
	// they are currently in a private chat with it. Especially useful when combined with [_switch_pm...
	// _](https://core.telegram.org/bots/api#answerinlinequery) actions - in this case the user will be
	// automatically returned to the chat they switched from, skipping the chat selection screen.
	SwitchInlineQuery OptString `json:"switch_inline_query"`
	// _Optional_. If set, pressing the button will insert the bot's username and the specified inline
	// query in the current chat's input field. May be empty, in which case only the bot's username will
	// be inserted.This offers a quick way for the user to open your bot in inline mode in the same chat
	// - good for selecting something from multiple options.
	SwitchInlineQueryCurrentChat OptString                      `json:"switch_inline_query_current_chat"`
	SwitchInlineQueryChosenChat  OptSwitchInlineQueryChosenChat `json:"switch_inline_query_chosen_chat"`
	CallbackGame                 *CallbackGame                  `json:"callback_game"`
	// _Optional_. Specify _True_, to send a [Pay button](https://core.telegram.org/bots/api#payments).
	// **NOTE:** This type of button **must** always be the first button in the first row and can only be
	// used in invoice messages.
	Pay OptBool `json:"pay"`
}

This object represents one button of an inline keyboard. You **must** use exactly one of the optional fields. Ref: #/components/schemas/InlineKeyboardButton

func (*InlineKeyboardButton) Decode

func (s *InlineKeyboardButton) Decode(d *jx.Decoder) error

Decode decodes InlineKeyboardButton from json.

func (*InlineKeyboardButton) Encode

func (s *InlineKeyboardButton) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InlineKeyboardButton) GetCallbackData

func (s *InlineKeyboardButton) GetCallbackData() OptString

GetCallbackData returns the value of CallbackData.

func (*InlineKeyboardButton) GetCallbackGame

func (s *InlineKeyboardButton) GetCallbackGame() *CallbackGame

GetCallbackGame returns the value of CallbackGame.

func (*InlineKeyboardButton) GetLoginURL

func (s *InlineKeyboardButton) GetLoginURL() OptLoginUrl

GetLoginURL returns the value of LoginURL.

func (*InlineKeyboardButton) GetPay

func (s *InlineKeyboardButton) GetPay() OptBool

GetPay returns the value of Pay.

func (*InlineKeyboardButton) GetSwitchInlineQuery

func (s *InlineKeyboardButton) GetSwitchInlineQuery() OptString

GetSwitchInlineQuery returns the value of SwitchInlineQuery.

func (*InlineKeyboardButton) GetSwitchInlineQueryChosenChat

func (s *InlineKeyboardButton) GetSwitchInlineQueryChosenChat() OptSwitchInlineQueryChosenChat

GetSwitchInlineQueryChosenChat returns the value of SwitchInlineQueryChosenChat.

func (*InlineKeyboardButton) GetSwitchInlineQueryCurrentChat

func (s *InlineKeyboardButton) GetSwitchInlineQueryCurrentChat() OptString

GetSwitchInlineQueryCurrentChat returns the value of SwitchInlineQueryCurrentChat.

func (*InlineKeyboardButton) GetText

func (s *InlineKeyboardButton) GetText() string

GetText returns the value of Text.

func (*InlineKeyboardButton) GetURL

func (s *InlineKeyboardButton) GetURL() OptString

GetURL returns the value of URL.

func (*InlineKeyboardButton) GetWebApp

func (s *InlineKeyboardButton) GetWebApp() OptWebAppInfo

GetWebApp returns the value of WebApp.

func (*InlineKeyboardButton) MarshalJSON

func (s *InlineKeyboardButton) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineKeyboardButton) SetCallbackData

func (s *InlineKeyboardButton) SetCallbackData(val OptString)

SetCallbackData sets the value of CallbackData.

func (*InlineKeyboardButton) SetCallbackGame

func (s *InlineKeyboardButton) SetCallbackGame(val *CallbackGame)

SetCallbackGame sets the value of CallbackGame.

func (*InlineKeyboardButton) SetLoginURL

func (s *InlineKeyboardButton) SetLoginURL(val OptLoginUrl)

SetLoginURL sets the value of LoginURL.

func (*InlineKeyboardButton) SetPay

func (s *InlineKeyboardButton) SetPay(val OptBool)

SetPay sets the value of Pay.

func (*InlineKeyboardButton) SetSwitchInlineQuery

func (s *InlineKeyboardButton) SetSwitchInlineQuery(val OptString)

SetSwitchInlineQuery sets the value of SwitchInlineQuery.

func (*InlineKeyboardButton) SetSwitchInlineQueryChosenChat

func (s *InlineKeyboardButton) SetSwitchInlineQueryChosenChat(val OptSwitchInlineQueryChosenChat)

SetSwitchInlineQueryChosenChat sets the value of SwitchInlineQueryChosenChat.

func (*InlineKeyboardButton) SetSwitchInlineQueryCurrentChat

func (s *InlineKeyboardButton) SetSwitchInlineQueryCurrentChat(val OptString)

SetSwitchInlineQueryCurrentChat sets the value of SwitchInlineQueryCurrentChat.

func (*InlineKeyboardButton) SetText

func (s *InlineKeyboardButton) SetText(val string)

SetText sets the value of Text.

func (*InlineKeyboardButton) SetURL

func (s *InlineKeyboardButton) SetURL(val OptString)

SetURL sets the value of URL.

func (*InlineKeyboardButton) SetWebApp

func (s *InlineKeyboardButton) SetWebApp(val OptWebAppInfo)

SetWebApp sets the value of WebApp.

func (*InlineKeyboardButton) UnmarshalJSON

func (s *InlineKeyboardButton) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineKeyboardButton) Validate

func (s *InlineKeyboardButton) Validate() error

type InlineKeyboardMarkup

type InlineKeyboardMarkup struct {
	// Array of button rows, each represented by an Array of [InlineKeyboardButton](https://core.telegram.
	// org/bots/api#inlinekeyboardbutton) objects.
	InlineKeyboard [][]InlineKeyboardButton `json:"inline_keyboard"`
}

This object represents an [inline keyboard](https://core.telegram. org/bots/features#inline-keyboards) that appears right next to the message it belongs to. Ref: #/components/schemas/InlineKeyboardMarkup

func (*InlineKeyboardMarkup) Decode

func (s *InlineKeyboardMarkup) Decode(d *jx.Decoder) error

Decode decodes InlineKeyboardMarkup from json.

func (*InlineKeyboardMarkup) Encode

func (s *InlineKeyboardMarkup) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InlineKeyboardMarkup) GetInlineKeyboard

func (s *InlineKeyboardMarkup) GetInlineKeyboard() [][]InlineKeyboardButton

GetInlineKeyboard returns the value of InlineKeyboard.

func (*InlineKeyboardMarkup) MarshalJSON

func (s *InlineKeyboardMarkup) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineKeyboardMarkup) SetInlineKeyboard

func (s *InlineKeyboardMarkup) SetInlineKeyboard(val [][]InlineKeyboardButton)

SetInlineKeyboard sets the value of InlineKeyboard.

func (*InlineKeyboardMarkup) UnmarshalJSON

func (s *InlineKeyboardMarkup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineKeyboardMarkup) Validate

func (s *InlineKeyboardMarkup) Validate() error

type InlineQuery

type InlineQuery struct {
	// Unique identifier for this query.
	ID   string `json:"id"`
	From User   `json:"from"`
	// Text of the query (up to 256 characters).
	Query string `json:"query"`
	// Offset of the results to be returned, can be controlled by the bot.
	Offset string `json:"offset"`
	// _Optional_. Type of the chat from which the inline query was sent. Can be either `sender` for a
	// private chat with the inline query sender, `private`, `group`, `supergroup`, or `channel`. The
	// chat type should be always known for requests sent from official clients and most third-party
	// clients, unless the request was sent from a secret chat.
	ChatType OptInlineQueryChatType `json:"chat_type"`
	Location OptLocation            `json:"location"`
}

This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results. Ref: #/components/schemas/InlineQuery

func (*InlineQuery) Decode

func (s *InlineQuery) Decode(d *jx.Decoder) error

Decode decodes InlineQuery from json.

func (*InlineQuery) Encode

func (s *InlineQuery) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InlineQuery) GetChatType

func (s *InlineQuery) GetChatType() OptInlineQueryChatType

GetChatType returns the value of ChatType.

func (*InlineQuery) GetFrom

func (s *InlineQuery) GetFrom() User

GetFrom returns the value of From.

func (*InlineQuery) GetID

func (s *InlineQuery) GetID() string

GetID returns the value of ID.

func (*InlineQuery) GetLocation

func (s *InlineQuery) GetLocation() OptLocation

GetLocation returns the value of Location.

func (*InlineQuery) GetOffset

func (s *InlineQuery) GetOffset() string

GetOffset returns the value of Offset.

func (*InlineQuery) GetQuery

func (s *InlineQuery) GetQuery() string

GetQuery returns the value of Query.

func (*InlineQuery) MarshalJSON

func (s *InlineQuery) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQuery) SetChatType

func (s *InlineQuery) SetChatType(val OptInlineQueryChatType)

SetChatType sets the value of ChatType.

func (*InlineQuery) SetFrom

func (s *InlineQuery) SetFrom(val User)

SetFrom sets the value of From.

func (*InlineQuery) SetID

func (s *InlineQuery) SetID(val string)

SetID sets the value of ID.

func (*InlineQuery) SetLocation

func (s *InlineQuery) SetLocation(val OptLocation)

SetLocation sets the value of Location.

func (*InlineQuery) SetOffset

func (s *InlineQuery) SetOffset(val string)

SetOffset sets the value of Offset.

func (*InlineQuery) SetQuery

func (s *InlineQuery) SetQuery(val string)

SetQuery sets the value of Query.

func (*InlineQuery) UnmarshalJSON

func (s *InlineQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQuery) Validate

func (s *InlineQuery) Validate() error

type InlineQueryChatType

type InlineQueryChatType string

_Optional_. Type of the chat from which the inline query was sent. Can be either `sender` for a private chat with the inline query sender, `private`, `group`, `supergroup`, or `channel`. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat.

const (
	InlineQueryChatTypeSender     InlineQueryChatType = "sender"
	InlineQueryChatTypePrivate    InlineQueryChatType = "private"
	InlineQueryChatTypeGroup      InlineQueryChatType = "group"
	InlineQueryChatTypeSupergroup InlineQueryChatType = "supergroup"
	InlineQueryChatTypeChannel    InlineQueryChatType = "channel"
)

func (*InlineQueryChatType) Decode

func (s *InlineQueryChatType) Decode(d *jx.Decoder) error

Decode decodes InlineQueryChatType from json.

func (InlineQueryChatType) Encode

func (s InlineQueryChatType) Encode(e *jx.Encoder)

Encode encodes InlineQueryChatType as json.

func (InlineQueryChatType) MarshalJSON

func (s InlineQueryChatType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (InlineQueryChatType) MarshalText

func (s InlineQueryChatType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*InlineQueryChatType) UnmarshalJSON

func (s *InlineQueryChatType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryChatType) UnmarshalText

func (s *InlineQueryChatType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (InlineQueryChatType) Validate

func (s InlineQueryChatType) Validate() error

type InlineQueryResult

type InlineQueryResult struct {
	Type                            InlineQueryResultType // switch on this field
	InlineQueryResultCachedAudio    InlineQueryResultCachedAudio
	InlineQueryResultCachedDocument InlineQueryResultCachedDocument
	InlineQueryResultCachedGif      InlineQueryResultCachedGif
	InlineQueryResultCachedMpeg4Gif InlineQueryResultCachedMpeg4Gif
	InlineQueryResultCachedPhoto    InlineQueryResultCachedPhoto
	InlineQueryResultCachedSticker  InlineQueryResultCachedSticker
	InlineQueryResultCachedVideo    InlineQueryResultCachedVideo
	InlineQueryResultCachedVoice    InlineQueryResultCachedVoice
	InlineQueryResultArticle        InlineQueryResultArticle
	InlineQueryResultAudio          InlineQueryResultAudio
	InlineQueryResultContact        InlineQueryResultContact
	InlineQueryResultGame           InlineQueryResultGame
	InlineQueryResultDocument       InlineQueryResultDocument
	InlineQueryResultGif            InlineQueryResultGif
	InlineQueryResultLocation       InlineQueryResultLocation
	InlineQueryResultMpeg4Gif       InlineQueryResultMpeg4Gif
	InlineQueryResultPhoto          InlineQueryResultPhoto
	InlineQueryResultVenue          InlineQueryResultVenue
	InlineQueryResultVideo          InlineQueryResultVideo
	InlineQueryResultVoice          InlineQueryResultVoice
}

This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:. Ref: #/components/schemas/InlineQueryResult InlineQueryResult represents sum type.

func NewInlineQueryResultArticleInlineQueryResult

func NewInlineQueryResultArticleInlineQueryResult(v InlineQueryResultArticle) InlineQueryResult

NewInlineQueryResultArticleInlineQueryResult returns new InlineQueryResult from InlineQueryResultArticle.

func NewInlineQueryResultAudioInlineQueryResult

func NewInlineQueryResultAudioInlineQueryResult(v InlineQueryResultAudio) InlineQueryResult

NewInlineQueryResultAudioInlineQueryResult returns new InlineQueryResult from InlineQueryResultAudio.

func NewInlineQueryResultCachedAudioInlineQueryResult

func NewInlineQueryResultCachedAudioInlineQueryResult(v InlineQueryResultCachedAudio) InlineQueryResult

NewInlineQueryResultCachedAudioInlineQueryResult returns new InlineQueryResult from InlineQueryResultCachedAudio.

func NewInlineQueryResultCachedDocumentInlineQueryResult

func NewInlineQueryResultCachedDocumentInlineQueryResult(v InlineQueryResultCachedDocument) InlineQueryResult

NewInlineQueryResultCachedDocumentInlineQueryResult returns new InlineQueryResult from InlineQueryResultCachedDocument.

func NewInlineQueryResultCachedGifInlineQueryResult

func NewInlineQueryResultCachedGifInlineQueryResult(v InlineQueryResultCachedGif) InlineQueryResult

NewInlineQueryResultCachedGifInlineQueryResult returns new InlineQueryResult from InlineQueryResultCachedGif.

func NewInlineQueryResultCachedMpeg4GifInlineQueryResult

func NewInlineQueryResultCachedMpeg4GifInlineQueryResult(v InlineQueryResultCachedMpeg4Gif) InlineQueryResult

NewInlineQueryResultCachedMpeg4GifInlineQueryResult returns new InlineQueryResult from InlineQueryResultCachedMpeg4Gif.

func NewInlineQueryResultCachedPhotoInlineQueryResult

func NewInlineQueryResultCachedPhotoInlineQueryResult(v InlineQueryResultCachedPhoto) InlineQueryResult

NewInlineQueryResultCachedPhotoInlineQueryResult returns new InlineQueryResult from InlineQueryResultCachedPhoto.

func NewInlineQueryResultCachedStickerInlineQueryResult

func NewInlineQueryResultCachedStickerInlineQueryResult(v InlineQueryResultCachedSticker) InlineQueryResult

NewInlineQueryResultCachedStickerInlineQueryResult returns new InlineQueryResult from InlineQueryResultCachedSticker.

func NewInlineQueryResultCachedVideoInlineQueryResult

func NewInlineQueryResultCachedVideoInlineQueryResult(v InlineQueryResultCachedVideo) InlineQueryResult

NewInlineQueryResultCachedVideoInlineQueryResult returns new InlineQueryResult from InlineQueryResultCachedVideo.

func NewInlineQueryResultCachedVoiceInlineQueryResult

func NewInlineQueryResultCachedVoiceInlineQueryResult(v InlineQueryResultCachedVoice) InlineQueryResult

NewInlineQueryResultCachedVoiceInlineQueryResult returns new InlineQueryResult from InlineQueryResultCachedVoice.

func NewInlineQueryResultContactInlineQueryResult

func NewInlineQueryResultContactInlineQueryResult(v InlineQueryResultContact) InlineQueryResult

NewInlineQueryResultContactInlineQueryResult returns new InlineQueryResult from InlineQueryResultContact.

func NewInlineQueryResultDocumentInlineQueryResult

func NewInlineQueryResultDocumentInlineQueryResult(v InlineQueryResultDocument) InlineQueryResult

NewInlineQueryResultDocumentInlineQueryResult returns new InlineQueryResult from InlineQueryResultDocument.

func NewInlineQueryResultGameInlineQueryResult

func NewInlineQueryResultGameInlineQueryResult(v InlineQueryResultGame) InlineQueryResult

NewInlineQueryResultGameInlineQueryResult returns new InlineQueryResult from InlineQueryResultGame.

func NewInlineQueryResultGifInlineQueryResult

func NewInlineQueryResultGifInlineQueryResult(v InlineQueryResultGif) InlineQueryResult

NewInlineQueryResultGifInlineQueryResult returns new InlineQueryResult from InlineQueryResultGif.

func NewInlineQueryResultLocationInlineQueryResult

func NewInlineQueryResultLocationInlineQueryResult(v InlineQueryResultLocation) InlineQueryResult

NewInlineQueryResultLocationInlineQueryResult returns new InlineQueryResult from InlineQueryResultLocation.

func NewInlineQueryResultMpeg4GifInlineQueryResult

func NewInlineQueryResultMpeg4GifInlineQueryResult(v InlineQueryResultMpeg4Gif) InlineQueryResult

NewInlineQueryResultMpeg4GifInlineQueryResult returns new InlineQueryResult from InlineQueryResultMpeg4Gif.

func NewInlineQueryResultPhotoInlineQueryResult

func NewInlineQueryResultPhotoInlineQueryResult(v InlineQueryResultPhoto) InlineQueryResult

NewInlineQueryResultPhotoInlineQueryResult returns new InlineQueryResult from InlineQueryResultPhoto.

func NewInlineQueryResultVenueInlineQueryResult

func NewInlineQueryResultVenueInlineQueryResult(v InlineQueryResultVenue) InlineQueryResult

NewInlineQueryResultVenueInlineQueryResult returns new InlineQueryResult from InlineQueryResultVenue.

func NewInlineQueryResultVideoInlineQueryResult

func NewInlineQueryResultVideoInlineQueryResult(v InlineQueryResultVideo) InlineQueryResult

NewInlineQueryResultVideoInlineQueryResult returns new InlineQueryResult from InlineQueryResultVideo.

func NewInlineQueryResultVoiceInlineQueryResult

func NewInlineQueryResultVoiceInlineQueryResult(v InlineQueryResultVoice) InlineQueryResult

NewInlineQueryResultVoiceInlineQueryResult returns new InlineQueryResult from InlineQueryResultVoice.

func (*InlineQueryResult) Decode

func (s *InlineQueryResult) Decode(d *jx.Decoder) error

Decode decodes InlineQueryResult from json.

func (InlineQueryResult) Encode

func (s InlineQueryResult) Encode(e *jx.Encoder)

Encode encodes InlineQueryResult as json.

func (InlineQueryResult) GetInlineQueryResultArticle

func (s InlineQueryResult) GetInlineQueryResultArticle() (v InlineQueryResultArticle, ok bool)

GetInlineQueryResultArticle returns InlineQueryResultArticle and true boolean if InlineQueryResult is InlineQueryResultArticle.

func (InlineQueryResult) GetInlineQueryResultAudio

func (s InlineQueryResult) GetInlineQueryResultAudio() (v InlineQueryResultAudio, ok bool)

GetInlineQueryResultAudio returns InlineQueryResultAudio and true boolean if InlineQueryResult is InlineQueryResultAudio.

func (InlineQueryResult) GetInlineQueryResultCachedAudio

func (s InlineQueryResult) GetInlineQueryResultCachedAudio() (v InlineQueryResultCachedAudio, ok bool)

GetInlineQueryResultCachedAudio returns InlineQueryResultCachedAudio and true boolean if InlineQueryResult is InlineQueryResultCachedAudio.

func (InlineQueryResult) GetInlineQueryResultCachedDocument

func (s InlineQueryResult) GetInlineQueryResultCachedDocument() (v InlineQueryResultCachedDocument, ok bool)

GetInlineQueryResultCachedDocument returns InlineQueryResultCachedDocument and true boolean if InlineQueryResult is InlineQueryResultCachedDocument.

func (InlineQueryResult) GetInlineQueryResultCachedGif

func (s InlineQueryResult) GetInlineQueryResultCachedGif() (v InlineQueryResultCachedGif, ok bool)

GetInlineQueryResultCachedGif returns InlineQueryResultCachedGif and true boolean if InlineQueryResult is InlineQueryResultCachedGif.

func (InlineQueryResult) GetInlineQueryResultCachedMpeg4Gif

func (s InlineQueryResult) GetInlineQueryResultCachedMpeg4Gif() (v InlineQueryResultCachedMpeg4Gif, ok bool)

GetInlineQueryResultCachedMpeg4Gif returns InlineQueryResultCachedMpeg4Gif and true boolean if InlineQueryResult is InlineQueryResultCachedMpeg4Gif.

func (InlineQueryResult) GetInlineQueryResultCachedPhoto

func (s InlineQueryResult) GetInlineQueryResultCachedPhoto() (v InlineQueryResultCachedPhoto, ok bool)

GetInlineQueryResultCachedPhoto returns InlineQueryResultCachedPhoto and true boolean if InlineQueryResult is InlineQueryResultCachedPhoto.

func (InlineQueryResult) GetInlineQueryResultCachedSticker

func (s InlineQueryResult) GetInlineQueryResultCachedSticker() (v InlineQueryResultCachedSticker, ok bool)

GetInlineQueryResultCachedSticker returns InlineQueryResultCachedSticker and true boolean if InlineQueryResult is InlineQueryResultCachedSticker.

func (InlineQueryResult) GetInlineQueryResultCachedVideo

func (s InlineQueryResult) GetInlineQueryResultCachedVideo() (v InlineQueryResultCachedVideo, ok bool)

GetInlineQueryResultCachedVideo returns InlineQueryResultCachedVideo and true boolean if InlineQueryResult is InlineQueryResultCachedVideo.

func (InlineQueryResult) GetInlineQueryResultCachedVoice

func (s InlineQueryResult) GetInlineQueryResultCachedVoice() (v InlineQueryResultCachedVoice, ok bool)

GetInlineQueryResultCachedVoice returns InlineQueryResultCachedVoice and true boolean if InlineQueryResult is InlineQueryResultCachedVoice.

func (InlineQueryResult) GetInlineQueryResultContact

func (s InlineQueryResult) GetInlineQueryResultContact() (v InlineQueryResultContact, ok bool)

GetInlineQueryResultContact returns InlineQueryResultContact and true boolean if InlineQueryResult is InlineQueryResultContact.

func (InlineQueryResult) GetInlineQueryResultDocument

func (s InlineQueryResult) GetInlineQueryResultDocument() (v InlineQueryResultDocument, ok bool)

GetInlineQueryResultDocument returns InlineQueryResultDocument and true boolean if InlineQueryResult is InlineQueryResultDocument.

func (InlineQueryResult) GetInlineQueryResultGame

func (s InlineQueryResult) GetInlineQueryResultGame() (v InlineQueryResultGame, ok bool)

GetInlineQueryResultGame returns InlineQueryResultGame and true boolean if InlineQueryResult is InlineQueryResultGame.

func (InlineQueryResult) GetInlineQueryResultGif

func (s InlineQueryResult) GetInlineQueryResultGif() (v InlineQueryResultGif, ok bool)

GetInlineQueryResultGif returns InlineQueryResultGif and true boolean if InlineQueryResult is InlineQueryResultGif.

func (InlineQueryResult) GetInlineQueryResultLocation

func (s InlineQueryResult) GetInlineQueryResultLocation() (v InlineQueryResultLocation, ok bool)

GetInlineQueryResultLocation returns InlineQueryResultLocation and true boolean if InlineQueryResult is InlineQueryResultLocation.

func (InlineQueryResult) GetInlineQueryResultMpeg4Gif

func (s InlineQueryResult) GetInlineQueryResultMpeg4Gif() (v InlineQueryResultMpeg4Gif, ok bool)

GetInlineQueryResultMpeg4Gif returns InlineQueryResultMpeg4Gif and true boolean if InlineQueryResult is InlineQueryResultMpeg4Gif.

func (InlineQueryResult) GetInlineQueryResultPhoto

func (s InlineQueryResult) GetInlineQueryResultPhoto() (v InlineQueryResultPhoto, ok bool)

GetInlineQueryResultPhoto returns InlineQueryResultPhoto and true boolean if InlineQueryResult is InlineQueryResultPhoto.

func (InlineQueryResult) GetInlineQueryResultVenue

func (s InlineQueryResult) GetInlineQueryResultVenue() (v InlineQueryResultVenue, ok bool)

GetInlineQueryResultVenue returns InlineQueryResultVenue and true boolean if InlineQueryResult is InlineQueryResultVenue.

func (InlineQueryResult) GetInlineQueryResultVideo

func (s InlineQueryResult) GetInlineQueryResultVideo() (v InlineQueryResultVideo, ok bool)

GetInlineQueryResultVideo returns InlineQueryResultVideo and true boolean if InlineQueryResult is InlineQueryResultVideo.

func (InlineQueryResult) GetInlineQueryResultVoice

func (s InlineQueryResult) GetInlineQueryResultVoice() (v InlineQueryResultVoice, ok bool)

GetInlineQueryResultVoice returns InlineQueryResultVoice and true boolean if InlineQueryResult is InlineQueryResultVoice.

func (InlineQueryResult) IsInlineQueryResultArticle

func (s InlineQueryResult) IsInlineQueryResultArticle() bool

IsInlineQueryResultArticle reports whether InlineQueryResult is InlineQueryResultArticle.

func (InlineQueryResult) IsInlineQueryResultAudio

func (s InlineQueryResult) IsInlineQueryResultAudio() bool

IsInlineQueryResultAudio reports whether InlineQueryResult is InlineQueryResultAudio.

func (InlineQueryResult) IsInlineQueryResultCachedAudio

func (s InlineQueryResult) IsInlineQueryResultCachedAudio() bool

IsInlineQueryResultCachedAudio reports whether InlineQueryResult is InlineQueryResultCachedAudio.

func (InlineQueryResult) IsInlineQueryResultCachedDocument

func (s InlineQueryResult) IsInlineQueryResultCachedDocument() bool

IsInlineQueryResultCachedDocument reports whether InlineQueryResult is InlineQueryResultCachedDocument.

func (InlineQueryResult) IsInlineQueryResultCachedGif

func (s InlineQueryResult) IsInlineQueryResultCachedGif() bool

IsInlineQueryResultCachedGif reports whether InlineQueryResult is InlineQueryResultCachedGif.

func (InlineQueryResult) IsInlineQueryResultCachedMpeg4Gif

func (s InlineQueryResult) IsInlineQueryResultCachedMpeg4Gif() bool

IsInlineQueryResultCachedMpeg4Gif reports whether InlineQueryResult is InlineQueryResultCachedMpeg4Gif.

func (InlineQueryResult) IsInlineQueryResultCachedPhoto

func (s InlineQueryResult) IsInlineQueryResultCachedPhoto() bool

IsInlineQueryResultCachedPhoto reports whether InlineQueryResult is InlineQueryResultCachedPhoto.

func (InlineQueryResult) IsInlineQueryResultCachedSticker

func (s InlineQueryResult) IsInlineQueryResultCachedSticker() bool

IsInlineQueryResultCachedSticker reports whether InlineQueryResult is InlineQueryResultCachedSticker.

func (InlineQueryResult) IsInlineQueryResultCachedVideo

func (s InlineQueryResult) IsInlineQueryResultCachedVideo() bool

IsInlineQueryResultCachedVideo reports whether InlineQueryResult is InlineQueryResultCachedVideo.

func (InlineQueryResult) IsInlineQueryResultCachedVoice

func (s InlineQueryResult) IsInlineQueryResultCachedVoice() bool

IsInlineQueryResultCachedVoice reports whether InlineQueryResult is InlineQueryResultCachedVoice.

func (InlineQueryResult) IsInlineQueryResultContact

func (s InlineQueryResult) IsInlineQueryResultContact() bool

IsInlineQueryResultContact reports whether InlineQueryResult is InlineQueryResultContact.

func (InlineQueryResult) IsInlineQueryResultDocument

func (s InlineQueryResult) IsInlineQueryResultDocument() bool

IsInlineQueryResultDocument reports whether InlineQueryResult is InlineQueryResultDocument.

func (InlineQueryResult) IsInlineQueryResultGame

func (s InlineQueryResult) IsInlineQueryResultGame() bool

IsInlineQueryResultGame reports whether InlineQueryResult is InlineQueryResultGame.

func (InlineQueryResult) IsInlineQueryResultGif

func (s InlineQueryResult) IsInlineQueryResultGif() bool

IsInlineQueryResultGif reports whether InlineQueryResult is InlineQueryResultGif.

func (InlineQueryResult) IsInlineQueryResultLocation

func (s InlineQueryResult) IsInlineQueryResultLocation() bool

IsInlineQueryResultLocation reports whether InlineQueryResult is InlineQueryResultLocation.

func (InlineQueryResult) IsInlineQueryResultMpeg4Gif

func (s InlineQueryResult) IsInlineQueryResultMpeg4Gif() bool

IsInlineQueryResultMpeg4Gif reports whether InlineQueryResult is InlineQueryResultMpeg4Gif.

func (InlineQueryResult) IsInlineQueryResultPhoto

func (s InlineQueryResult) IsInlineQueryResultPhoto() bool

IsInlineQueryResultPhoto reports whether InlineQueryResult is InlineQueryResultPhoto.

func (InlineQueryResult) IsInlineQueryResultVenue

func (s InlineQueryResult) IsInlineQueryResultVenue() bool

IsInlineQueryResultVenue reports whether InlineQueryResult is InlineQueryResultVenue.

func (InlineQueryResult) IsInlineQueryResultVideo

func (s InlineQueryResult) IsInlineQueryResultVideo() bool

IsInlineQueryResultVideo reports whether InlineQueryResult is InlineQueryResultVideo.

func (InlineQueryResult) IsInlineQueryResultVoice

func (s InlineQueryResult) IsInlineQueryResultVoice() bool

IsInlineQueryResultVoice reports whether InlineQueryResult is InlineQueryResultVoice.

func (InlineQueryResult) MarshalJSON

func (s InlineQueryResult) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResult) SetInlineQueryResultArticle

func (s *InlineQueryResult) SetInlineQueryResultArticle(v InlineQueryResultArticle)

SetInlineQueryResultArticle sets InlineQueryResult to InlineQueryResultArticle.

func (*InlineQueryResult) SetInlineQueryResultAudio

func (s *InlineQueryResult) SetInlineQueryResultAudio(v InlineQueryResultAudio)

SetInlineQueryResultAudio sets InlineQueryResult to InlineQueryResultAudio.

func (*InlineQueryResult) SetInlineQueryResultCachedAudio

func (s *InlineQueryResult) SetInlineQueryResultCachedAudio(v InlineQueryResultCachedAudio)

SetInlineQueryResultCachedAudio sets InlineQueryResult to InlineQueryResultCachedAudio.

func (*InlineQueryResult) SetInlineQueryResultCachedDocument

func (s *InlineQueryResult) SetInlineQueryResultCachedDocument(v InlineQueryResultCachedDocument)

SetInlineQueryResultCachedDocument sets InlineQueryResult to InlineQueryResultCachedDocument.

func (*InlineQueryResult) SetInlineQueryResultCachedGif

func (s *InlineQueryResult) SetInlineQueryResultCachedGif(v InlineQueryResultCachedGif)

SetInlineQueryResultCachedGif sets InlineQueryResult to InlineQueryResultCachedGif.

func (*InlineQueryResult) SetInlineQueryResultCachedMpeg4Gif

func (s *InlineQueryResult) SetInlineQueryResultCachedMpeg4Gif(v InlineQueryResultCachedMpeg4Gif)

SetInlineQueryResultCachedMpeg4Gif sets InlineQueryResult to InlineQueryResultCachedMpeg4Gif.

func (*InlineQueryResult) SetInlineQueryResultCachedPhoto

func (s *InlineQueryResult) SetInlineQueryResultCachedPhoto(v InlineQueryResultCachedPhoto)

SetInlineQueryResultCachedPhoto sets InlineQueryResult to InlineQueryResultCachedPhoto.

func (*InlineQueryResult) SetInlineQueryResultCachedSticker

func (s *InlineQueryResult) SetInlineQueryResultCachedSticker(v InlineQueryResultCachedSticker)

SetInlineQueryResultCachedSticker sets InlineQueryResult to InlineQueryResultCachedSticker.

func (*InlineQueryResult) SetInlineQueryResultCachedVideo

func (s *InlineQueryResult) SetInlineQueryResultCachedVideo(v InlineQueryResultCachedVideo)

SetInlineQueryResultCachedVideo sets InlineQueryResult to InlineQueryResultCachedVideo.

func (*InlineQueryResult) SetInlineQueryResultCachedVoice

func (s *InlineQueryResult) SetInlineQueryResultCachedVoice(v InlineQueryResultCachedVoice)

SetInlineQueryResultCachedVoice sets InlineQueryResult to InlineQueryResultCachedVoice.

func (*InlineQueryResult) SetInlineQueryResultContact

func (s *InlineQueryResult) SetInlineQueryResultContact(v InlineQueryResultContact)

SetInlineQueryResultContact sets InlineQueryResult to InlineQueryResultContact.

func (*InlineQueryResult) SetInlineQueryResultDocument

func (s *InlineQueryResult) SetInlineQueryResultDocument(v InlineQueryResultDocument)

SetInlineQueryResultDocument sets InlineQueryResult to InlineQueryResultDocument.

func (*InlineQueryResult) SetInlineQueryResultGame

func (s *InlineQueryResult) SetInlineQueryResultGame(v InlineQueryResultGame)

SetInlineQueryResultGame sets InlineQueryResult to InlineQueryResultGame.

func (*InlineQueryResult) SetInlineQueryResultGif

func (s *InlineQueryResult) SetInlineQueryResultGif(v InlineQueryResultGif)

SetInlineQueryResultGif sets InlineQueryResult to InlineQueryResultGif.

func (*InlineQueryResult) SetInlineQueryResultLocation

func (s *InlineQueryResult) SetInlineQueryResultLocation(v InlineQueryResultLocation)

SetInlineQueryResultLocation sets InlineQueryResult to InlineQueryResultLocation.

func (*InlineQueryResult) SetInlineQueryResultMpeg4Gif

func (s *InlineQueryResult) SetInlineQueryResultMpeg4Gif(v InlineQueryResultMpeg4Gif)

SetInlineQueryResultMpeg4Gif sets InlineQueryResult to InlineQueryResultMpeg4Gif.

func (*InlineQueryResult) SetInlineQueryResultPhoto

func (s *InlineQueryResult) SetInlineQueryResultPhoto(v InlineQueryResultPhoto)

SetInlineQueryResultPhoto sets InlineQueryResult to InlineQueryResultPhoto.

func (*InlineQueryResult) SetInlineQueryResultVenue

func (s *InlineQueryResult) SetInlineQueryResultVenue(v InlineQueryResultVenue)

SetInlineQueryResultVenue sets InlineQueryResult to InlineQueryResultVenue.

func (*InlineQueryResult) SetInlineQueryResultVideo

func (s *InlineQueryResult) SetInlineQueryResultVideo(v InlineQueryResultVideo)

SetInlineQueryResultVideo sets InlineQueryResult to InlineQueryResultVideo.

func (*InlineQueryResult) SetInlineQueryResultVoice

func (s *InlineQueryResult) SetInlineQueryResultVoice(v InlineQueryResultVoice)

SetInlineQueryResultVoice sets InlineQueryResult to InlineQueryResultVoice.

func (*InlineQueryResult) UnmarshalJSON

func (s *InlineQueryResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (InlineQueryResult) Validate

func (s InlineQueryResult) Validate() error

type InlineQueryResultArticle

type InlineQueryResultArticle struct {
	// Unique identifier for this result, 1-64 Bytes.
	ID string `json:"id"`
	// Title of the result.
	Title               string                  `json:"title"`
	InputMessageContent InputMessageContent     `json:"input_message_content"`
	ReplyMarkup         OptInlineKeyboardMarkup `json:"reply_markup"`
	// _Optional_. URL of the result.
	URL OptString `json:"url"`
	// _Optional_. Pass _True_ if you don't want the URL to be shown in the message.
	HideURL OptBool `json:"hide_url"`
	// _Optional_. Short description of the result.
	Description OptString `json:"description"`
	// _Optional_. URL of the thumbnail for the result.
	ThumbnailURL OptString `json:"thumbnail_url"`
	// _Optional_. Thumbnail width.
	ThumbnailWidth OptInt `json:"thumbnail_width"`
	// _Optional_. Thumbnail height.
	ThumbnailHeight OptInt `json:"thumbnail_height"`
}

Represents a link to an article or web page. Ref: #/components/schemas/InlineQueryResultArticle

func (*InlineQueryResultArticle) Decode

func (s *InlineQueryResultArticle) Decode(d *jx.Decoder) error

Decode decodes InlineQueryResultArticle from json.

func (*InlineQueryResultArticle) Encode

func (s *InlineQueryResultArticle) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InlineQueryResultArticle) GetDescription

func (s *InlineQueryResultArticle) GetDescription() OptString

GetDescription returns the value of Description.

func (*InlineQueryResultArticle) GetHideURL

func (s *InlineQueryResultArticle) GetHideURL() OptBool

GetHideURL returns the value of HideURL.

func (*InlineQueryResultArticle) GetID

func (s *InlineQueryResultArticle) GetID() string

GetID returns the value of ID.

func (*InlineQueryResultArticle) GetInputMessageContent

func (s *InlineQueryResultArticle) GetInputMessageContent() InputMessageContent

GetInputMessageContent returns the value of InputMessageContent.

func (*InlineQueryResultArticle) GetReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*InlineQueryResultArticle) GetThumbnailHeight

func (s *InlineQueryResultArticle) GetThumbnailHeight() OptInt

GetThumbnailHeight returns the value of ThumbnailHeight.

func (*InlineQueryResultArticle) GetThumbnailURL

func (s *InlineQueryResultArticle) GetThumbnailURL() OptString

GetThumbnailURL returns the value of ThumbnailURL.

func (*InlineQueryResultArticle) GetThumbnailWidth

func (s *InlineQueryResultArticle) GetThumbnailWidth() OptInt

GetThumbnailWidth returns the value of ThumbnailWidth.

func (*InlineQueryResultArticle) GetTitle

func (s *InlineQueryResultArticle) GetTitle() string

GetTitle returns the value of Title.

func (*InlineQueryResultArticle) GetURL

func (s *InlineQueryResultArticle) GetURL() OptString

GetURL returns the value of URL.

func (*InlineQueryResultArticle) MarshalJSON

func (s *InlineQueryResultArticle) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResultArticle) SetDescription

func (s *InlineQueryResultArticle) SetDescription(val OptString)

SetDescription sets the value of Description.

func (*InlineQueryResultArticle) SetHideURL

func (s *InlineQueryResultArticle) SetHideURL(val OptBool)

SetHideURL sets the value of HideURL.

func (*InlineQueryResultArticle) SetID

func (s *InlineQueryResultArticle) SetID(val string)

SetID sets the value of ID.

func (*InlineQueryResultArticle) SetInputMessageContent

func (s *InlineQueryResultArticle) SetInputMessageContent(val InputMessageContent)

SetInputMessageContent sets the value of InputMessageContent.

func (*InlineQueryResultArticle) SetReplyMarkup

func (s *InlineQueryResultArticle) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*InlineQueryResultArticle) SetThumbnailHeight

func (s *InlineQueryResultArticle) SetThumbnailHeight(val OptInt)

SetThumbnailHeight sets the value of ThumbnailHeight.

func (*InlineQueryResultArticle) SetThumbnailURL

func (s *InlineQueryResultArticle) SetThumbnailURL(val OptString)

SetThumbnailURL sets the value of ThumbnailURL.

func (*InlineQueryResultArticle) SetThumbnailWidth

func (s *InlineQueryResultArticle) SetThumbnailWidth(val OptInt)

SetThumbnailWidth sets the value of ThumbnailWidth.

func (*InlineQueryResultArticle) SetTitle

func (s *InlineQueryResultArticle) SetTitle(val string)

SetTitle sets the value of Title.

func (*InlineQueryResultArticle) SetURL

func (s *InlineQueryResultArticle) SetURL(val OptString)

SetURL sets the value of URL.

func (*InlineQueryResultArticle) UnmarshalJSON

func (s *InlineQueryResultArticle) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryResultArticle) Validate

func (s *InlineQueryResultArticle) Validate() error

type InlineQueryResultAudio

type InlineQueryResultAudio struct {
	// Unique identifier for this result, 1-64 bytes.
	ID string `json:"id"`
	// A valid URL for the audio file.
	AudioURL string `json:"audio_url"`
	// Title.
	Title string `json:"title"`
	// _Optional_. Caption, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// _Optional_. Mode for parsing entities in the audio caption. See [formatting options](https://core.
	// telegram.org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// _Optional_. List of special entities that appear in the caption, which can be specified instead of
	// _parse_mode_.
	CaptionEntities []MessageEntity `json:"caption_entities"`
	// _Optional_. Performer.
	Performer OptString `json:"performer"`
	// _Optional_. Audio duration in seconds.
	AudioDuration       OptInt                  `json:"audio_duration"`
	ReplyMarkup         OptInlineKeyboardMarkup `json:"reply_markup"`
	InputMessageContent OptInputMessageContent  `json:"input_message_content"`
}

Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use _input_message_content_ to send a message with the specified content instead of the audio. Ref: #/components/schemas/InlineQueryResultAudio

func (*InlineQueryResultAudio) Decode

func (s *InlineQueryResultAudio) Decode(d *jx.Decoder) error

Decode decodes InlineQueryResultAudio from json.

func (*InlineQueryResultAudio) Encode

func (s *InlineQueryResultAudio) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InlineQueryResultAudio) GetAudioDuration

func (s *InlineQueryResultAudio) GetAudioDuration() OptInt

GetAudioDuration returns the value of AudioDuration.

func (*InlineQueryResultAudio) GetAudioURL

func (s *InlineQueryResultAudio) GetAudioURL() string

GetAudioURL returns the value of AudioURL.

func (*InlineQueryResultAudio) GetCaption

func (s *InlineQueryResultAudio) GetCaption() OptString

GetCaption returns the value of Caption.

func (*InlineQueryResultAudio) GetCaptionEntities

func (s *InlineQueryResultAudio) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*InlineQueryResultAudio) GetID

func (s *InlineQueryResultAudio) GetID() string

GetID returns the value of ID.

func (*InlineQueryResultAudio) GetInputMessageContent

func (s *InlineQueryResultAudio) GetInputMessageContent() OptInputMessageContent

GetInputMessageContent returns the value of InputMessageContent.

func (*InlineQueryResultAudio) GetParseMode

func (s *InlineQueryResultAudio) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*InlineQueryResultAudio) GetPerformer

func (s *InlineQueryResultAudio) GetPerformer() OptString

GetPerformer returns the value of Performer.

func (*InlineQueryResultAudio) GetReplyMarkup

func (s *InlineQueryResultAudio) GetReplyMarkup() OptInlineKeyboardMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*InlineQueryResultAudio) GetTitle

func (s *InlineQueryResultAudio) GetTitle() string

GetTitle returns the value of Title.

func (*InlineQueryResultAudio) MarshalJSON

func (s *InlineQueryResultAudio) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResultAudio) SetAudioDuration

func (s *InlineQueryResultAudio) SetAudioDuration(val OptInt)

SetAudioDuration sets the value of AudioDuration.

func (*InlineQueryResultAudio) SetAudioURL

func (s *InlineQueryResultAudio) SetAudioURL(val string)

SetAudioURL sets the value of AudioURL.

func (*InlineQueryResultAudio) SetCaption

func (s *InlineQueryResultAudio) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*InlineQueryResultAudio) SetCaptionEntities

func (s *InlineQueryResultAudio) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*InlineQueryResultAudio) SetID

func (s *InlineQueryResultAudio) SetID(val string)

SetID sets the value of ID.

func (*InlineQueryResultAudio) SetInputMessageContent

func (s *InlineQueryResultAudio) SetInputMessageContent(val OptInputMessageContent)

SetInputMessageContent sets the value of InputMessageContent.

func (*InlineQueryResultAudio) SetParseMode

func (s *InlineQueryResultAudio) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*InlineQueryResultAudio) SetPerformer

func (s *InlineQueryResultAudio) SetPerformer(val OptString)

SetPerformer sets the value of Performer.

func (*InlineQueryResultAudio) SetReplyMarkup

func (s *InlineQueryResultAudio) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*InlineQueryResultAudio) SetTitle

func (s *InlineQueryResultAudio) SetTitle(val string)

SetTitle sets the value of Title.

func (*InlineQueryResultAudio) UnmarshalJSON

func (s *InlineQueryResultAudio) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryResultAudio) Validate

func (s *InlineQueryResultAudio) Validate() error

type InlineQueryResultCachedAudio

type InlineQueryResultCachedAudio struct {
	// Type of the result, must be _audio_.
	Type string `json:"type"`
	// Unique identifier for this result, 1-64 bytes.
	ID string `json:"id"`
	// A valid file identifier for the audio file.
	AudioFileID string `json:"audio_file_id"`
	// _Optional_. Caption, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// _Optional_. Mode for parsing entities in the audio caption. See [formatting options](https://core.
	// telegram.org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// _Optional_. List of special entities that appear in the caption, which can be specified instead of
	// _parse_mode_.
	CaptionEntities     []MessageEntity         `json:"caption_entities"`
	ReplyMarkup         OptInlineKeyboardMarkup `json:"reply_markup"`
	InputMessageContent OptInputMessageContent  `json:"input_message_content"`
}

Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use _input_message_content_ to send a message with the specified content instead of the audio. Ref: #/components/schemas/InlineQueryResultCachedAudio

func (*InlineQueryResultCachedAudio) Decode

Decode decodes InlineQueryResultCachedAudio from json.

func (*InlineQueryResultCachedAudio) Encode

func (s *InlineQueryResultCachedAudio) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InlineQueryResultCachedAudio) GetAudioFileID

func (s *InlineQueryResultCachedAudio) GetAudioFileID() string

GetAudioFileID returns the value of AudioFileID.

func (*InlineQueryResultCachedAudio) GetCaption

func (s *InlineQueryResultCachedAudio) GetCaption() OptString

GetCaption returns the value of Caption.

func (*InlineQueryResultCachedAudio) GetCaptionEntities

func (s *InlineQueryResultCachedAudio) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*InlineQueryResultCachedAudio) GetID

GetID returns the value of ID.

func (*InlineQueryResultCachedAudio) GetInputMessageContent

func (s *InlineQueryResultCachedAudio) GetInputMessageContent() OptInputMessageContent

GetInputMessageContent returns the value of InputMessageContent.

func (*InlineQueryResultCachedAudio) GetParseMode

func (s *InlineQueryResultCachedAudio) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*InlineQueryResultCachedAudio) GetReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*InlineQueryResultCachedAudio) GetType

func (s *InlineQueryResultCachedAudio) GetType() string

GetType returns the value of Type.

func (*InlineQueryResultCachedAudio) MarshalJSON

func (s *InlineQueryResultCachedAudio) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResultCachedAudio) SetAudioFileID

func (s *InlineQueryResultCachedAudio) SetAudioFileID(val string)

SetAudioFileID sets the value of AudioFileID.

func (*InlineQueryResultCachedAudio) SetCaption

func (s *InlineQueryResultCachedAudio) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*InlineQueryResultCachedAudio) SetCaptionEntities

func (s *InlineQueryResultCachedAudio) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*InlineQueryResultCachedAudio) SetID

func (s *InlineQueryResultCachedAudio) SetID(val string)

SetID sets the value of ID.

func (*InlineQueryResultCachedAudio) SetInputMessageContent

func (s *InlineQueryResultCachedAudio) SetInputMessageContent(val OptInputMessageContent)

SetInputMessageContent sets the value of InputMessageContent.

func (*InlineQueryResultCachedAudio) SetParseMode

func (s *InlineQueryResultCachedAudio) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*InlineQueryResultCachedAudio) SetReplyMarkup

SetReplyMarkup sets the value of ReplyMarkup.

func (*InlineQueryResultCachedAudio) SetType

func (s *InlineQueryResultCachedAudio) SetType(val string)

SetType sets the value of Type.

func (*InlineQueryResultCachedAudio) UnmarshalJSON

func (s *InlineQueryResultCachedAudio) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryResultCachedAudio) Validate

func (s *InlineQueryResultCachedAudio) Validate() error

type InlineQueryResultCachedDocument

type InlineQueryResultCachedDocument struct {
	// Type of the result, must be _document_.
	Type string `json:"type"`
	// Unique identifier for this result, 1-64 bytes.
	ID string `json:"id"`
	// Title for the result.
	Title string `json:"title"`
	// A valid file identifier for the file.
	DocumentFileID string `json:"document_file_id"`
	// _Optional_. Short description of the result.
	Description OptString `json:"description"`
	// _Optional_. Caption of the document to be sent, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// _Optional_. Mode for parsing entities in the document caption. See [formatting
	// options](https://core.telegram.org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// _Optional_. List of special entities that appear in the caption, which can be specified instead of
	// _parse_mode_.
	CaptionEntities     []MessageEntity         `json:"caption_entities"`
	ReplyMarkup         OptInlineKeyboardMarkup `json:"reply_markup"`
	InputMessageContent OptInputMessageContent  `json:"input_message_content"`
}

Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use _input_message_content_ to send a message with the specified content instead of the file. Ref: #/components/schemas/InlineQueryResultCachedDocument

func (*InlineQueryResultCachedDocument) Decode

Decode decodes InlineQueryResultCachedDocument from json.

func (*InlineQueryResultCachedDocument) Encode

Encode implements json.Marshaler.

func (*InlineQueryResultCachedDocument) GetCaption

GetCaption returns the value of Caption.

func (*InlineQueryResultCachedDocument) GetCaptionEntities

func (s *InlineQueryResultCachedDocument) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*InlineQueryResultCachedDocument) GetDescription

func (s *InlineQueryResultCachedDocument) GetDescription() OptString

GetDescription returns the value of Description.

func (*InlineQueryResultCachedDocument) GetDocumentFileID

func (s *InlineQueryResultCachedDocument) GetDocumentFileID() string

GetDocumentFileID returns the value of DocumentFileID.

func (*InlineQueryResultCachedDocument) GetID

GetID returns the value of ID.

func (*InlineQueryResultCachedDocument) GetInputMessageContent

func (s *InlineQueryResultCachedDocument) GetInputMessageContent() OptInputMessageContent

GetInputMessageContent returns the value of InputMessageContent.

func (*InlineQueryResultCachedDocument) GetParseMode

func (s *InlineQueryResultCachedDocument) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*InlineQueryResultCachedDocument) GetReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*InlineQueryResultCachedDocument) GetTitle

GetTitle returns the value of Title.

func (*InlineQueryResultCachedDocument) GetType

GetType returns the value of Type.

func (*InlineQueryResultCachedDocument) MarshalJSON

func (s *InlineQueryResultCachedDocument) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResultCachedDocument) SetCaption

func (s *InlineQueryResultCachedDocument) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*InlineQueryResultCachedDocument) SetCaptionEntities

func (s *InlineQueryResultCachedDocument) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*InlineQueryResultCachedDocument) SetDescription

func (s *InlineQueryResultCachedDocument) SetDescription(val OptString)

SetDescription sets the value of Description.

func (*InlineQueryResultCachedDocument) SetDocumentFileID

func (s *InlineQueryResultCachedDocument) SetDocumentFileID(val string)

SetDocumentFileID sets the value of DocumentFileID.

func (*InlineQueryResultCachedDocument) SetID

SetID sets the value of ID.

func (*InlineQueryResultCachedDocument) SetInputMessageContent

func (s *InlineQueryResultCachedDocument) SetInputMessageContent(val OptInputMessageContent)

SetInputMessageContent sets the value of InputMessageContent.

func (*InlineQueryResultCachedDocument) SetParseMode

func (s *InlineQueryResultCachedDocument) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*InlineQueryResultCachedDocument) SetReplyMarkup

SetReplyMarkup sets the value of ReplyMarkup.

func (*InlineQueryResultCachedDocument) SetTitle

func (s *InlineQueryResultCachedDocument) SetTitle(val string)

SetTitle sets the value of Title.

func (*InlineQueryResultCachedDocument) SetType

func (s *InlineQueryResultCachedDocument) SetType(val string)

SetType sets the value of Type.

func (*InlineQueryResultCachedDocument) UnmarshalJSON

func (s *InlineQueryResultCachedDocument) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryResultCachedDocument) Validate

func (s *InlineQueryResultCachedDocument) Validate() error

type InlineQueryResultCachedGif

type InlineQueryResultCachedGif struct {
	// Type of the result, must be _gif_.
	Type string `json:"type"`
	// Unique identifier for this result, 1-64 bytes.
	ID string `json:"id"`
	// A valid file identifier for the GIF file.
	GIFFileID string `json:"gif_file_id"`
	// _Optional_. Title for the result.
	Title OptString `json:"title"`
	// _Optional_. Caption of the GIF file to be sent, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// _Optional_. Mode for parsing entities in the caption. See [formatting options](https://core.
	// telegram.org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// _Optional_. List of special entities that appear in the caption, which can be specified instead of
	// _parse_mode_.
	CaptionEntities     []MessageEntity         `json:"caption_entities"`
	ReplyMarkup         OptInlineKeyboardMarkup `json:"reply_markup"`
	InputMessageContent OptInputMessageContent  `json:"input_message_content"`
}

Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use _input_message_content_ to send a message with specified content instead of the animation. Ref: #/components/schemas/InlineQueryResultCachedGif

func (*InlineQueryResultCachedGif) Decode

Decode decodes InlineQueryResultCachedGif from json.

func (*InlineQueryResultCachedGif) Encode

func (s *InlineQueryResultCachedGif) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InlineQueryResultCachedGif) GetCaption

func (s *InlineQueryResultCachedGif) GetCaption() OptString

GetCaption returns the value of Caption.

func (*InlineQueryResultCachedGif) GetCaptionEntities

func (s *InlineQueryResultCachedGif) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*InlineQueryResultCachedGif) GetGIFFileID

func (s *InlineQueryResultCachedGif) GetGIFFileID() string

GetGIFFileID returns the value of GIFFileID.

func (*InlineQueryResultCachedGif) GetID

GetID returns the value of ID.

func (*InlineQueryResultCachedGif) GetInputMessageContent

func (s *InlineQueryResultCachedGif) GetInputMessageContent() OptInputMessageContent

GetInputMessageContent returns the value of InputMessageContent.

func (*InlineQueryResultCachedGif) GetParseMode

func (s *InlineQueryResultCachedGif) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*InlineQueryResultCachedGif) GetReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*InlineQueryResultCachedGif) GetTitle

func (s *InlineQueryResultCachedGif) GetTitle() OptString

GetTitle returns the value of Title.

func (*InlineQueryResultCachedGif) GetType

func (s *InlineQueryResultCachedGif) GetType() string

GetType returns the value of Type.

func (*InlineQueryResultCachedGif) MarshalJSON

func (s *InlineQueryResultCachedGif) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResultCachedGif) SetCaption

func (s *InlineQueryResultCachedGif) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*InlineQueryResultCachedGif) SetCaptionEntities

func (s *InlineQueryResultCachedGif) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*InlineQueryResultCachedGif) SetGIFFileID

func (s *InlineQueryResultCachedGif) SetGIFFileID(val string)

SetGIFFileID sets the value of GIFFileID.

func (*InlineQueryResultCachedGif) SetID

func (s *InlineQueryResultCachedGif) SetID(val string)

SetID sets the value of ID.

func (*InlineQueryResultCachedGif) SetInputMessageContent

func (s *InlineQueryResultCachedGif) SetInputMessageContent(val OptInputMessageContent)

SetInputMessageContent sets the value of InputMessageContent.

func (*InlineQueryResultCachedGif) SetParseMode

func (s *InlineQueryResultCachedGif) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*InlineQueryResultCachedGif) SetReplyMarkup

func (s *InlineQueryResultCachedGif) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*InlineQueryResultCachedGif) SetTitle

func (s *InlineQueryResultCachedGif) SetTitle(val OptString)

SetTitle sets the value of Title.

func (*InlineQueryResultCachedGif) SetType

func (s *InlineQueryResultCachedGif) SetType(val string)

SetType sets the value of Type.

func (*InlineQueryResultCachedGif) UnmarshalJSON

func (s *InlineQueryResultCachedGif) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryResultCachedGif) Validate

func (s *InlineQueryResultCachedGif) Validate() error

type InlineQueryResultCachedMpeg4Gif

type InlineQueryResultCachedMpeg4Gif struct {
	// Type of the result, must be _mpeg4_gif_.
	Type string `json:"type"`
	// Unique identifier for this result, 1-64 bytes.
	ID string `json:"id"`
	// A valid file identifier for the MPEG4 file.
	Mpeg4FileID string `json:"mpeg4_file_id"`
	// _Optional_. Title for the result.
	Title OptString `json:"title"`
	// _Optional_. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// _Optional_. Mode for parsing entities in the caption. See [formatting options](https://core.
	// telegram.org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// _Optional_. List of special entities that appear in the caption, which can be specified instead of
	// _parse_mode_.
	CaptionEntities     []MessageEntity         `json:"caption_entities"`
	ReplyMarkup         OptInlineKeyboardMarkup `json:"reply_markup"`
	InputMessageContent OptInputMessageContent  `json:"input_message_content"`
}

Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use _input_message_content_ to send a message with the specified content instead of the animation. Ref: #/components/schemas/InlineQueryResultCachedMpeg4Gif

func (*InlineQueryResultCachedMpeg4Gif) Decode

Decode decodes InlineQueryResultCachedMpeg4Gif from json.

func (*InlineQueryResultCachedMpeg4Gif) Encode

Encode implements json.Marshaler.

func (*InlineQueryResultCachedMpeg4Gif) GetCaption

GetCaption returns the value of Caption.

func (*InlineQueryResultCachedMpeg4Gif) GetCaptionEntities

func (s *InlineQueryResultCachedMpeg4Gif) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*InlineQueryResultCachedMpeg4Gif) GetID

GetID returns the value of ID.

func (*InlineQueryResultCachedMpeg4Gif) GetInputMessageContent

func (s *InlineQueryResultCachedMpeg4Gif) GetInputMessageContent() OptInputMessageContent

GetInputMessageContent returns the value of InputMessageContent.

func (*InlineQueryResultCachedMpeg4Gif) GetMpeg4FileID

func (s *InlineQueryResultCachedMpeg4Gif) GetMpeg4FileID() string

GetMpeg4FileID returns the value of Mpeg4FileID.

func (*InlineQueryResultCachedMpeg4Gif) GetParseMode

func (s *InlineQueryResultCachedMpeg4Gif) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*InlineQueryResultCachedMpeg4Gif) GetReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*InlineQueryResultCachedMpeg4Gif) GetTitle

GetTitle returns the value of Title.

func (*InlineQueryResultCachedMpeg4Gif) GetType

GetType returns the value of Type.

func (*InlineQueryResultCachedMpeg4Gif) MarshalJSON

func (s *InlineQueryResultCachedMpeg4Gif) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResultCachedMpeg4Gif) SetCaption

func (s *InlineQueryResultCachedMpeg4Gif) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*InlineQueryResultCachedMpeg4Gif) SetCaptionEntities

func (s *InlineQueryResultCachedMpeg4Gif) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*InlineQueryResultCachedMpeg4Gif) SetID

SetID sets the value of ID.

func (*InlineQueryResultCachedMpeg4Gif) SetInputMessageContent

func (s *InlineQueryResultCachedMpeg4Gif) SetInputMessageContent(val OptInputMessageContent)

SetInputMessageContent sets the value of InputMessageContent.

func (*InlineQueryResultCachedMpeg4Gif) SetMpeg4FileID

func (s *InlineQueryResultCachedMpeg4Gif) SetMpeg4FileID(val string)

SetMpeg4FileID sets the value of Mpeg4FileID.

func (*InlineQueryResultCachedMpeg4Gif) SetParseMode

func (s *InlineQueryResultCachedMpeg4Gif) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*InlineQueryResultCachedMpeg4Gif) SetReplyMarkup

SetReplyMarkup sets the value of ReplyMarkup.

func (*InlineQueryResultCachedMpeg4Gif) SetTitle

func (s *InlineQueryResultCachedMpeg4Gif) SetTitle(val OptString)

SetTitle sets the value of Title.

func (*InlineQueryResultCachedMpeg4Gif) SetType

func (s *InlineQueryResultCachedMpeg4Gif) SetType(val string)

SetType sets the value of Type.

func (*InlineQueryResultCachedMpeg4Gif) UnmarshalJSON

func (s *InlineQueryResultCachedMpeg4Gif) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryResultCachedMpeg4Gif) Validate

func (s *InlineQueryResultCachedMpeg4Gif) Validate() error

type InlineQueryResultCachedPhoto

type InlineQueryResultCachedPhoto struct {
	// Type of the result, must be _photo_.
	Type string `json:"type"`
	// Unique identifier for this result, 1-64 bytes.
	ID string `json:"id"`
	// A valid file identifier of the photo.
	PhotoFileID string `json:"photo_file_id"`
	// _Optional_. Title for the result.
	Title OptString `json:"title"`
	// _Optional_. Short description of the result.
	Description OptString `json:"description"`
	// _Optional_. Caption of the photo to be sent, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// _Optional_. Mode for parsing entities in the photo caption. See [formatting options](https://core.
	// telegram.org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// _Optional_. List of special entities that appear in the caption, which can be specified instead of
	// _parse_mode_.
	CaptionEntities     []MessageEntity         `json:"caption_entities"`
	ReplyMarkup         OptInlineKeyboardMarkup `json:"reply_markup"`
	InputMessageContent OptInputMessageContent  `json:"input_message_content"`
}

Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use _input_message_content_ to send a message with the specified content instead of the photo. Ref: #/components/schemas/InlineQueryResultCachedPhoto

func (*InlineQueryResultCachedPhoto) Decode

Decode decodes InlineQueryResultCachedPhoto from json.

func (*InlineQueryResultCachedPhoto) Encode

func (s *InlineQueryResultCachedPhoto) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InlineQueryResultCachedPhoto) GetCaption

func (s *InlineQueryResultCachedPhoto) GetCaption() OptString

GetCaption returns the value of Caption.

func (*InlineQueryResultCachedPhoto) GetCaptionEntities

func (s *InlineQueryResultCachedPhoto) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*InlineQueryResultCachedPhoto) GetDescription

func (s *InlineQueryResultCachedPhoto) GetDescription() OptString

GetDescription returns the value of Description.

func (*InlineQueryResultCachedPhoto) GetID

GetID returns the value of ID.

func (*InlineQueryResultCachedPhoto) GetInputMessageContent

func (s *InlineQueryResultCachedPhoto) GetInputMessageContent() OptInputMessageContent

GetInputMessageContent returns the value of InputMessageContent.

func (*InlineQueryResultCachedPhoto) GetParseMode

func (s *InlineQueryResultCachedPhoto) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*InlineQueryResultCachedPhoto) GetPhotoFileID

func (s *InlineQueryResultCachedPhoto) GetPhotoFileID() string

GetPhotoFileID returns the value of PhotoFileID.

func (*InlineQueryResultCachedPhoto) GetReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*InlineQueryResultCachedPhoto) GetTitle

GetTitle returns the value of Title.

func (*InlineQueryResultCachedPhoto) GetType

func (s *InlineQueryResultCachedPhoto) GetType() string

GetType returns the value of Type.

func (*InlineQueryResultCachedPhoto) MarshalJSON

func (s *InlineQueryResultCachedPhoto) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResultCachedPhoto) SetCaption

func (s *InlineQueryResultCachedPhoto) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*InlineQueryResultCachedPhoto) SetCaptionEntities

func (s *InlineQueryResultCachedPhoto) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*InlineQueryResultCachedPhoto) SetDescription

func (s *InlineQueryResultCachedPhoto) SetDescription(val OptString)

SetDescription sets the value of Description.

func (*InlineQueryResultCachedPhoto) SetID

func (s *InlineQueryResultCachedPhoto) SetID(val string)

SetID sets the value of ID.

func (*InlineQueryResultCachedPhoto) SetInputMessageContent

func (s *InlineQueryResultCachedPhoto) SetInputMessageContent(val OptInputMessageContent)

SetInputMessageContent sets the value of InputMessageContent.

func (*InlineQueryResultCachedPhoto) SetParseMode

func (s *InlineQueryResultCachedPhoto) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*InlineQueryResultCachedPhoto) SetPhotoFileID

func (s *InlineQueryResultCachedPhoto) SetPhotoFileID(val string)

SetPhotoFileID sets the value of PhotoFileID.

func (*InlineQueryResultCachedPhoto) SetReplyMarkup

SetReplyMarkup sets the value of ReplyMarkup.

func (*InlineQueryResultCachedPhoto) SetTitle

func (s *InlineQueryResultCachedPhoto) SetTitle(val OptString)

SetTitle sets the value of Title.

func (*InlineQueryResultCachedPhoto) SetType

func (s *InlineQueryResultCachedPhoto) SetType(val string)

SetType sets the value of Type.

func (*InlineQueryResultCachedPhoto) UnmarshalJSON

func (s *InlineQueryResultCachedPhoto) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryResultCachedPhoto) Validate

func (s *InlineQueryResultCachedPhoto) Validate() error

type InlineQueryResultCachedSticker

type InlineQueryResultCachedSticker struct {
	// Unique identifier for this result, 1-64 bytes.
	ID string `json:"id"`
	// A valid file identifier of the sticker.
	StickerFileID       string                  `json:"sticker_file_id"`
	ReplyMarkup         OptInlineKeyboardMarkup `json:"reply_markup"`
	InputMessageContent OptInputMessageContent  `json:"input_message_content"`
}

Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use _input_message_content_ to send a message with the specified content instead of the sticker. Ref: #/components/schemas/InlineQueryResultCachedSticker

func (*InlineQueryResultCachedSticker) Decode

Decode decodes InlineQueryResultCachedSticker from json.

func (*InlineQueryResultCachedSticker) Encode

Encode implements json.Marshaler.

func (*InlineQueryResultCachedSticker) GetID

GetID returns the value of ID.

func (*InlineQueryResultCachedSticker) GetInputMessageContent

func (s *InlineQueryResultCachedSticker) GetInputMessageContent() OptInputMessageContent

GetInputMessageContent returns the value of InputMessageContent.

func (*InlineQueryResultCachedSticker) GetReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*InlineQueryResultCachedSticker) GetStickerFileID

func (s *InlineQueryResultCachedSticker) GetStickerFileID() string

GetStickerFileID returns the value of StickerFileID.

func (*InlineQueryResultCachedSticker) MarshalJSON

func (s *InlineQueryResultCachedSticker) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResultCachedSticker) SetID

func (s *InlineQueryResultCachedSticker) SetID(val string)

SetID sets the value of ID.

func (*InlineQueryResultCachedSticker) SetInputMessageContent

func (s *InlineQueryResultCachedSticker) SetInputMessageContent(val OptInputMessageContent)

SetInputMessageContent sets the value of InputMessageContent.

func (*InlineQueryResultCachedSticker) SetReplyMarkup

SetReplyMarkup sets the value of ReplyMarkup.

func (*InlineQueryResultCachedSticker) SetStickerFileID

func (s *InlineQueryResultCachedSticker) SetStickerFileID(val string)

SetStickerFileID sets the value of StickerFileID.

func (*InlineQueryResultCachedSticker) UnmarshalJSON

func (s *InlineQueryResultCachedSticker) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryResultCachedSticker) Validate

func (s *InlineQueryResultCachedSticker) Validate() error

type InlineQueryResultCachedVideo

type InlineQueryResultCachedVideo struct {
	// Type of the result, must be _video_.
	Type string `json:"type"`
	// Unique identifier for this result, 1-64 bytes.
	ID string `json:"id"`
	// A valid file identifier for the video file.
	VideoFileID string `json:"video_file_id"`
	// Title for the result.
	Title string `json:"title"`
	// _Optional_. Short description of the result.
	Description OptString `json:"description"`
	// _Optional_. Caption of the video to be sent, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// _Optional_. Mode for parsing entities in the video caption. See [formatting options](https://core.
	// telegram.org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// _Optional_. List of special entities that appear in the caption, which can be specified instead of
	// _parse_mode_.
	CaptionEntities     []MessageEntity         `json:"caption_entities"`
	ReplyMarkup         OptInlineKeyboardMarkup `json:"reply_markup"`
	InputMessageContent OptInputMessageContent  `json:"input_message_content"`
}

Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use _input_message_content_ to send a message with the specified content instead of the video. Ref: #/components/schemas/InlineQueryResultCachedVideo

func (*InlineQueryResultCachedVideo) Decode

Decode decodes InlineQueryResultCachedVideo from json.

func (*InlineQueryResultCachedVideo) Encode

func (s *InlineQueryResultCachedVideo) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InlineQueryResultCachedVideo) GetCaption

func (s *InlineQueryResultCachedVideo) GetCaption() OptString

GetCaption returns the value of Caption.

func (*InlineQueryResultCachedVideo) GetCaptionEntities

func (s *InlineQueryResultCachedVideo) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*InlineQueryResultCachedVideo) GetDescription

func (s *InlineQueryResultCachedVideo) GetDescription() OptString

GetDescription returns the value of Description.

func (*InlineQueryResultCachedVideo) GetID

GetID returns the value of ID.

func (*InlineQueryResultCachedVideo) GetInputMessageContent

func (s *InlineQueryResultCachedVideo) GetInputMessageContent() OptInputMessageContent

GetInputMessageContent returns the value of InputMessageContent.

func (*InlineQueryResultCachedVideo) GetParseMode

func (s *InlineQueryResultCachedVideo) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*InlineQueryResultCachedVideo) GetReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*InlineQueryResultCachedVideo) GetTitle

func (s *InlineQueryResultCachedVideo) GetTitle() string

GetTitle returns the value of Title.

func (*InlineQueryResultCachedVideo) GetType

func (s *InlineQueryResultCachedVideo) GetType() string

GetType returns the value of Type.

func (*InlineQueryResultCachedVideo) GetVideoFileID

func (s *InlineQueryResultCachedVideo) GetVideoFileID() string

GetVideoFileID returns the value of VideoFileID.

func (*InlineQueryResultCachedVideo) MarshalJSON

func (s *InlineQueryResultCachedVideo) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResultCachedVideo) SetCaption

func (s *InlineQueryResultCachedVideo) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*InlineQueryResultCachedVideo) SetCaptionEntities

func (s *InlineQueryResultCachedVideo) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*InlineQueryResultCachedVideo) SetDescription

func (s *InlineQueryResultCachedVideo) SetDescription(val OptString)

SetDescription sets the value of Description.

func (*InlineQueryResultCachedVideo) SetID

func (s *InlineQueryResultCachedVideo) SetID(val string)

SetID sets the value of ID.

func (*InlineQueryResultCachedVideo) SetInputMessageContent

func (s *InlineQueryResultCachedVideo) SetInputMessageContent(val OptInputMessageContent)

SetInputMessageContent sets the value of InputMessageContent.

func (*InlineQueryResultCachedVideo) SetParseMode

func (s *InlineQueryResultCachedVideo) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*InlineQueryResultCachedVideo) SetReplyMarkup

SetReplyMarkup sets the value of ReplyMarkup.

func (*InlineQueryResultCachedVideo) SetTitle

func (s *InlineQueryResultCachedVideo) SetTitle(val string)

SetTitle sets the value of Title.

func (*InlineQueryResultCachedVideo) SetType

func (s *InlineQueryResultCachedVideo) SetType(val string)

SetType sets the value of Type.

func (*InlineQueryResultCachedVideo) SetVideoFileID

func (s *InlineQueryResultCachedVideo) SetVideoFileID(val string)

SetVideoFileID sets the value of VideoFileID.

func (*InlineQueryResultCachedVideo) UnmarshalJSON

func (s *InlineQueryResultCachedVideo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryResultCachedVideo) Validate

func (s *InlineQueryResultCachedVideo) Validate() error

type InlineQueryResultCachedVoice

type InlineQueryResultCachedVoice struct {
	// Type of the result, must be _voice_.
	Type string `json:"type"`
	// Unique identifier for this result, 1-64 bytes.
	ID string `json:"id"`
	// A valid file identifier for the voice message.
	VoiceFileID string `json:"voice_file_id"`
	// Voice message title.
	Title string `json:"title"`
	// _Optional_. Caption, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// _Optional_. Mode for parsing entities in the voice message caption. See [formatting
	// options](https://core.telegram.org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// _Optional_. List of special entities that appear in the caption, which can be specified instead of
	// _parse_mode_.
	CaptionEntities     []MessageEntity         `json:"caption_entities"`
	ReplyMarkup         OptInlineKeyboardMarkup `json:"reply_markup"`
	InputMessageContent OptInputMessageContent  `json:"input_message_content"`
}

Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use _input_message_content_ to send a message with the specified content instead of the voice message. Ref: #/components/schemas/InlineQueryResultCachedVoice

func (*InlineQueryResultCachedVoice) Decode

Decode decodes InlineQueryResultCachedVoice from json.

func (*InlineQueryResultCachedVoice) Encode

func (s *InlineQueryResultCachedVoice) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InlineQueryResultCachedVoice) GetCaption

func (s *InlineQueryResultCachedVoice) GetCaption() OptString

GetCaption returns the value of Caption.

func (*InlineQueryResultCachedVoice) GetCaptionEntities

func (s *InlineQueryResultCachedVoice) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*InlineQueryResultCachedVoice) GetID

GetID returns the value of ID.

func (*InlineQueryResultCachedVoice) GetInputMessageContent

func (s *InlineQueryResultCachedVoice) GetInputMessageContent() OptInputMessageContent

GetInputMessageContent returns the value of InputMessageContent.

func (*InlineQueryResultCachedVoice) GetParseMode

func (s *InlineQueryResultCachedVoice) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*InlineQueryResultCachedVoice) GetReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*InlineQueryResultCachedVoice) GetTitle

func (s *InlineQueryResultCachedVoice) GetTitle() string

GetTitle returns the value of Title.

func (*InlineQueryResultCachedVoice) GetType

func (s *InlineQueryResultCachedVoice) GetType() string

GetType returns the value of Type.

func (*InlineQueryResultCachedVoice) GetVoiceFileID

func (s *InlineQueryResultCachedVoice) GetVoiceFileID() string

GetVoiceFileID returns the value of VoiceFileID.

func (*InlineQueryResultCachedVoice) MarshalJSON

func (s *InlineQueryResultCachedVoice) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResultCachedVoice) SetCaption

func (s *InlineQueryResultCachedVoice) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*InlineQueryResultCachedVoice) SetCaptionEntities

func (s *InlineQueryResultCachedVoice) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*InlineQueryResultCachedVoice) SetID

func (s *InlineQueryResultCachedVoice) SetID(val string)

SetID sets the value of ID.

func (*InlineQueryResultCachedVoice) SetInputMessageContent

func (s *InlineQueryResultCachedVoice) SetInputMessageContent(val OptInputMessageContent)

SetInputMessageContent sets the value of InputMessageContent.

func (*InlineQueryResultCachedVoice) SetParseMode

func (s *InlineQueryResultCachedVoice) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*InlineQueryResultCachedVoice) SetReplyMarkup

SetReplyMarkup sets the value of ReplyMarkup.

func (*InlineQueryResultCachedVoice) SetTitle

func (s *InlineQueryResultCachedVoice) SetTitle(val string)

SetTitle sets the value of Title.

func (*InlineQueryResultCachedVoice) SetType

func (s *InlineQueryResultCachedVoice) SetType(val string)

SetType sets the value of Type.

func (*InlineQueryResultCachedVoice) SetVoiceFileID

func (s *InlineQueryResultCachedVoice) SetVoiceFileID(val string)

SetVoiceFileID sets the value of VoiceFileID.

func (*InlineQueryResultCachedVoice) UnmarshalJSON

func (s *InlineQueryResultCachedVoice) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryResultCachedVoice) Validate

func (s *InlineQueryResultCachedVoice) Validate() error

type InlineQueryResultContact

type InlineQueryResultContact struct {
	// Unique identifier for this result, 1-64 Bytes.
	ID string `json:"id"`
	// Contact's phone number.
	PhoneNumber string `json:"phone_number"`
	// Contact's first name.
	FirstName string `json:"first_name"`
	// _Optional_. Contact's last name.
	LastName OptString `json:"last_name"`
	// _Optional_. Additional data about the contact in the form of a [vCard](https://en.wikipedia.
	// org/wiki/VCard), 0-2048 bytes.
	Vcard               OptString               `json:"vcard"`
	ReplyMarkup         OptInlineKeyboardMarkup `json:"reply_markup"`
	InputMessageContent OptInputMessageContent  `json:"input_message_content"`
	// _Optional_. URL of the thumbnail for the result.
	ThumbnailURL OptString `json:"thumbnail_url"`
	// _Optional_. Thumbnail width.
	ThumbnailWidth OptInt `json:"thumbnail_width"`
	// _Optional_. Thumbnail height.
	ThumbnailHeight OptInt `json:"thumbnail_height"`
}

Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use _input_message_content_ to send a message with the specified content instead of the contact. Ref: #/components/schemas/InlineQueryResultContact

func (*InlineQueryResultContact) Decode

func (s *InlineQueryResultContact) Decode(d *jx.Decoder) error

Decode decodes InlineQueryResultContact from json.

func (*InlineQueryResultContact) Encode

func (s *InlineQueryResultContact) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InlineQueryResultContact) GetFirstName

func (s *InlineQueryResultContact) GetFirstName() string

GetFirstName returns the value of FirstName.

func (*InlineQueryResultContact) GetID

func (s *InlineQueryResultContact) GetID() string

GetID returns the value of ID.

func (*InlineQueryResultContact) GetInputMessageContent

func (s *InlineQueryResultContact) GetInputMessageContent() OptInputMessageContent

GetInputMessageContent returns the value of InputMessageContent.

func (*InlineQueryResultContact) GetLastName

func (s *InlineQueryResultContact) GetLastName() OptString

GetLastName returns the value of LastName.

func (*InlineQueryResultContact) GetPhoneNumber

func (s *InlineQueryResultContact) GetPhoneNumber() string

GetPhoneNumber returns the value of PhoneNumber.

func (*InlineQueryResultContact) GetReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*InlineQueryResultContact) GetThumbnailHeight

func (s *InlineQueryResultContact) GetThumbnailHeight() OptInt

GetThumbnailHeight returns the value of ThumbnailHeight.

func (*InlineQueryResultContact) GetThumbnailURL

func (s *InlineQueryResultContact) GetThumbnailURL() OptString

GetThumbnailURL returns the value of ThumbnailURL.

func (*InlineQueryResultContact) GetThumbnailWidth

func (s *InlineQueryResultContact) GetThumbnailWidth() OptInt

GetThumbnailWidth returns the value of ThumbnailWidth.

func (*InlineQueryResultContact) GetVcard

func (s *InlineQueryResultContact) GetVcard() OptString

GetVcard returns the value of Vcard.

func (*InlineQueryResultContact) MarshalJSON

func (s *InlineQueryResultContact) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResultContact) SetFirstName

func (s *InlineQueryResultContact) SetFirstName(val string)

SetFirstName sets the value of FirstName.

func (*InlineQueryResultContact) SetID

func (s *InlineQueryResultContact) SetID(val string)

SetID sets the value of ID.

func (*InlineQueryResultContact) SetInputMessageContent

func (s *InlineQueryResultContact) SetInputMessageContent(val OptInputMessageContent)

SetInputMessageContent sets the value of InputMessageContent.

func (*InlineQueryResultContact) SetLastName

func (s *InlineQueryResultContact) SetLastName(val OptString)

SetLastName sets the value of LastName.

func (*InlineQueryResultContact) SetPhoneNumber

func (s *InlineQueryResultContact) SetPhoneNumber(val string)

SetPhoneNumber sets the value of PhoneNumber.

func (*InlineQueryResultContact) SetReplyMarkup

func (s *InlineQueryResultContact) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*InlineQueryResultContact) SetThumbnailHeight

func (s *InlineQueryResultContact) SetThumbnailHeight(val OptInt)

SetThumbnailHeight sets the value of ThumbnailHeight.

func (*InlineQueryResultContact) SetThumbnailURL

func (s *InlineQueryResultContact) SetThumbnailURL(val OptString)

SetThumbnailURL sets the value of ThumbnailURL.

func (*InlineQueryResultContact) SetThumbnailWidth

func (s *InlineQueryResultContact) SetThumbnailWidth(val OptInt)

SetThumbnailWidth sets the value of ThumbnailWidth.

func (*InlineQueryResultContact) SetVcard

func (s *InlineQueryResultContact) SetVcard(val OptString)

SetVcard sets the value of Vcard.

func (*InlineQueryResultContact) UnmarshalJSON

func (s *InlineQueryResultContact) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryResultContact) Validate

func (s *InlineQueryResultContact) Validate() error

type InlineQueryResultDocument

type InlineQueryResultDocument struct {
	// Unique identifier for this result, 1-64 bytes.
	ID string `json:"id"`
	// Title for the result.
	Title string `json:"title"`
	// _Optional_. Caption of the document to be sent, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// _Optional_. Mode for parsing entities in the document caption. See [formatting
	// options](https://core.telegram.org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// _Optional_. List of special entities that appear in the caption, which can be specified instead of
	// _parse_mode_.
	CaptionEntities []MessageEntity `json:"caption_entities"`
	// A valid URL for the file.
	DocumentURL string `json:"document_url"`
	// MIME type of the content of the file, either `application/pdf` or `application/zip`.
	MimeType string `json:"mime_type"`
	// _Optional_. Short description of the result.
	Description         OptString               `json:"description"`
	ReplyMarkup         OptInlineKeyboardMarkup `json:"reply_markup"`
	InputMessageContent OptInputMessageContent  `json:"input_message_content"`
	// _Optional_. URL of the thumbnail (JPEG only) for the file.
	ThumbnailURL OptString `json:"thumbnail_url"`
	// _Optional_. Thumbnail width.
	ThumbnailWidth OptInt `json:"thumbnail_width"`
	// _Optional_. Thumbnail height.
	ThumbnailHeight OptInt `json:"thumbnail_height"`
}

Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use _input_message_content_ to send a message with the specified content instead of the file. Currently, only **.PDF** and **.ZIP** files can be sent using this method. Ref: #/components/schemas/InlineQueryResultDocument

func (*InlineQueryResultDocument) Decode

func (s *InlineQueryResultDocument) Decode(d *jx.Decoder) error

Decode decodes InlineQueryResultDocument from json.

func (*InlineQueryResultDocument) Encode

func (s *InlineQueryResultDocument) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InlineQueryResultDocument) GetCaption

func (s *InlineQueryResultDocument) GetCaption() OptString

GetCaption returns the value of Caption.

func (*InlineQueryResultDocument) GetCaptionEntities

func (s *InlineQueryResultDocument) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*InlineQueryResultDocument) GetDescription

func (s *InlineQueryResultDocument) GetDescription() OptString

GetDescription returns the value of Description.

func (*InlineQueryResultDocument) GetDocumentURL

func (s *InlineQueryResultDocument) GetDocumentURL() string

GetDocumentURL returns the value of DocumentURL.

func (*InlineQueryResultDocument) GetID

func (s *InlineQueryResultDocument) GetID() string

GetID returns the value of ID.

func (*InlineQueryResultDocument) GetInputMessageContent

func (s *InlineQueryResultDocument) GetInputMessageContent() OptInputMessageContent

GetInputMessageContent returns the value of InputMessageContent.

func (*InlineQueryResultDocument) GetMimeType

func (s *InlineQueryResultDocument) GetMimeType() string

GetMimeType returns the value of MimeType.

func (*InlineQueryResultDocument) GetParseMode

func (s *InlineQueryResultDocument) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*InlineQueryResultDocument) GetReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*InlineQueryResultDocument) GetThumbnailHeight

func (s *InlineQueryResultDocument) GetThumbnailHeight() OptInt

GetThumbnailHeight returns the value of ThumbnailHeight.

func (*InlineQueryResultDocument) GetThumbnailURL

func (s *InlineQueryResultDocument) GetThumbnailURL() OptString

GetThumbnailURL returns the value of ThumbnailURL.

func (*InlineQueryResultDocument) GetThumbnailWidth

func (s *InlineQueryResultDocument) GetThumbnailWidth() OptInt

GetThumbnailWidth returns the value of ThumbnailWidth.

func (*InlineQueryResultDocument) GetTitle

func (s *InlineQueryResultDocument) GetTitle() string

GetTitle returns the value of Title.

func (*InlineQueryResultDocument) MarshalJSON

func (s *InlineQueryResultDocument) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResultDocument) SetCaption

func (s *InlineQueryResultDocument) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*InlineQueryResultDocument) SetCaptionEntities

func (s *InlineQueryResultDocument) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*InlineQueryResultDocument) SetDescription

func (s *InlineQueryResultDocument) SetDescription(val OptString)

SetDescription sets the value of Description.

func (*InlineQueryResultDocument) SetDocumentURL

func (s *InlineQueryResultDocument) SetDocumentURL(val string)

SetDocumentURL sets the value of DocumentURL.

func (*InlineQueryResultDocument) SetID

func (s *InlineQueryResultDocument) SetID(val string)

SetID sets the value of ID.

func (*InlineQueryResultDocument) SetInputMessageContent

func (s *InlineQueryResultDocument) SetInputMessageContent(val OptInputMessageContent)

SetInputMessageContent sets the value of InputMessageContent.

func (*InlineQueryResultDocument) SetMimeType

func (s *InlineQueryResultDocument) SetMimeType(val string)

SetMimeType sets the value of MimeType.

func (*InlineQueryResultDocument) SetParseMode

func (s *InlineQueryResultDocument) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*InlineQueryResultDocument) SetReplyMarkup

func (s *InlineQueryResultDocument) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*InlineQueryResultDocument) SetThumbnailHeight

func (s *InlineQueryResultDocument) SetThumbnailHeight(val OptInt)

SetThumbnailHeight sets the value of ThumbnailHeight.

func (*InlineQueryResultDocument) SetThumbnailURL

func (s *InlineQueryResultDocument) SetThumbnailURL(val OptString)

SetThumbnailURL sets the value of ThumbnailURL.

func (*InlineQueryResultDocument) SetThumbnailWidth

func (s *InlineQueryResultDocument) SetThumbnailWidth(val OptInt)

SetThumbnailWidth sets the value of ThumbnailWidth.

func (*InlineQueryResultDocument) SetTitle

func (s *InlineQueryResultDocument) SetTitle(val string)

SetTitle sets the value of Title.

func (*InlineQueryResultDocument) UnmarshalJSON

func (s *InlineQueryResultDocument) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryResultDocument) Validate

func (s *InlineQueryResultDocument) Validate() error

type InlineQueryResultGame

type InlineQueryResultGame struct {
	// Unique identifier for this result, 1-64 bytes.
	ID string `json:"id"`
	// Short name of the game.
	GameShortName string                  `json:"game_short_name"`
	ReplyMarkup   OptInlineKeyboardMarkup `json:"reply_markup"`
}

Represents a Game(https://core.telegram.org/bots/api#games). Ref: #/components/schemas/InlineQueryResultGame

func (*InlineQueryResultGame) Decode

func (s *InlineQueryResultGame) Decode(d *jx.Decoder) error

Decode decodes InlineQueryResultGame from json.

func (*InlineQueryResultGame) Encode

func (s *InlineQueryResultGame) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InlineQueryResultGame) GetGameShortName

func (s *InlineQueryResultGame) GetGameShortName() string

GetGameShortName returns the value of GameShortName.

func (*InlineQueryResultGame) GetID

func (s *InlineQueryResultGame) GetID() string

GetID returns the value of ID.

func (*InlineQueryResultGame) GetReplyMarkup

func (s *InlineQueryResultGame) GetReplyMarkup() OptInlineKeyboardMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*InlineQueryResultGame) MarshalJSON

func (s *InlineQueryResultGame) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResultGame) SetGameShortName

func (s *InlineQueryResultGame) SetGameShortName(val string)

SetGameShortName sets the value of GameShortName.

func (*InlineQueryResultGame) SetID

func (s *InlineQueryResultGame) SetID(val string)

SetID sets the value of ID.

func (*InlineQueryResultGame) SetReplyMarkup

func (s *InlineQueryResultGame) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*InlineQueryResultGame) UnmarshalJSON

func (s *InlineQueryResultGame) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryResultGame) Validate

func (s *InlineQueryResultGame) Validate() error

type InlineQueryResultGif

type InlineQueryResultGif struct {
	// Unique identifier for this result, 1-64 bytes.
	ID string `json:"id"`
	// A valid URL for the GIF file. File size must not exceed 1MB.
	GIFURL string `json:"gif_url"`
	// _Optional_. Width of the GIF.
	GIFWidth OptInt `json:"gif_width"`
	// _Optional_. Height of the GIF.
	GIFHeight OptInt `json:"gif_height"`
	// _Optional_. Duration of the GIF in seconds.
	GIFDuration OptInt `json:"gif_duration"`
	// URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result.
	ThumbnailURL string `json:"thumbnail_url"`
	// _Optional_. MIME type of the thumbnail, must be one of `image/jpeg`, `image/gif`, or `video/mp4`.
	// Defaults to `image/jpeg`.
	ThumbnailMimeType OptString `json:"thumbnail_mime_type"`
	// _Optional_. Title for the result.
	Title OptString `json:"title"`
	// _Optional_. Caption of the GIF file to be sent, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// _Optional_. Mode for parsing entities in the caption. See [formatting options](https://core.
	// telegram.org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// _Optional_. List of special entities that appear in the caption, which can be specified instead of
	// _parse_mode_.
	CaptionEntities     []MessageEntity         `json:"caption_entities"`
	ReplyMarkup         OptInlineKeyboardMarkup `json:"reply_markup"`
	InputMessageContent OptInputMessageContent  `json:"input_message_content"`
}

Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use _input_message_content_ to send a message with the specified content instead of the animation. Ref: #/components/schemas/InlineQueryResultGif

func (*InlineQueryResultGif) Decode

func (s *InlineQueryResultGif) Decode(d *jx.Decoder) error

Decode decodes InlineQueryResultGif from json.

func (*InlineQueryResultGif) Encode

func (s *InlineQueryResultGif) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InlineQueryResultGif) GetCaption

func (s *InlineQueryResultGif) GetCaption() OptString

GetCaption returns the value of Caption.

func (*InlineQueryResultGif) GetCaptionEntities

func (s *InlineQueryResultGif) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*InlineQueryResultGif) GetGIFDuration

func (s *InlineQueryResultGif) GetGIFDuration() OptInt

GetGIFDuration returns the value of GIFDuration.

func (*InlineQueryResultGif) GetGIFHeight

func (s *InlineQueryResultGif) GetGIFHeight() OptInt

GetGIFHeight returns the value of GIFHeight.

func (*InlineQueryResultGif) GetGIFURL

func (s *InlineQueryResultGif) GetGIFURL() string

GetGIFURL returns the value of GIFURL.

func (*InlineQueryResultGif) GetGIFWidth

func (s *InlineQueryResultGif) GetGIFWidth() OptInt

GetGIFWidth returns the value of GIFWidth.

func (*InlineQueryResultGif) GetID

func (s *InlineQueryResultGif) GetID() string

GetID returns the value of ID.

func (*InlineQueryResultGif) GetInputMessageContent

func (s *InlineQueryResultGif) GetInputMessageContent() OptInputMessageContent

GetInputMessageContent returns the value of InputMessageContent.

func (*InlineQueryResultGif) GetParseMode

func (s *InlineQueryResultGif) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*InlineQueryResultGif) GetReplyMarkup

func (s *InlineQueryResultGif) GetReplyMarkup() OptInlineKeyboardMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*InlineQueryResultGif) GetThumbnailMimeType

func (s *InlineQueryResultGif) GetThumbnailMimeType() OptString

GetThumbnailMimeType returns the value of ThumbnailMimeType.

func (*InlineQueryResultGif) GetThumbnailURL

func (s *InlineQueryResultGif) GetThumbnailURL() string

GetThumbnailURL returns the value of ThumbnailURL.

func (*InlineQueryResultGif) GetTitle

func (s *InlineQueryResultGif) GetTitle() OptString

GetTitle returns the value of Title.

func (*InlineQueryResultGif) MarshalJSON

func (s *InlineQueryResultGif) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResultGif) SetCaption

func (s *InlineQueryResultGif) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*InlineQueryResultGif) SetCaptionEntities

func (s *InlineQueryResultGif) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*InlineQueryResultGif) SetGIFDuration

func (s *InlineQueryResultGif) SetGIFDuration(val OptInt)

SetGIFDuration sets the value of GIFDuration.

func (*InlineQueryResultGif) SetGIFHeight

func (s *InlineQueryResultGif) SetGIFHeight(val OptInt)

SetGIFHeight sets the value of GIFHeight.

func (*InlineQueryResultGif) SetGIFURL

func (s *InlineQueryResultGif) SetGIFURL(val string)

SetGIFURL sets the value of GIFURL.

func (*InlineQueryResultGif) SetGIFWidth

func (s *InlineQueryResultGif) SetGIFWidth(val OptInt)

SetGIFWidth sets the value of GIFWidth.

func (*InlineQueryResultGif) SetID

func (s *InlineQueryResultGif) SetID(val string)

SetID sets the value of ID.

func (*InlineQueryResultGif) SetInputMessageContent

func (s *InlineQueryResultGif) SetInputMessageContent(val OptInputMessageContent)

SetInputMessageContent sets the value of InputMessageContent.

func (*InlineQueryResultGif) SetParseMode

func (s *InlineQueryResultGif) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*InlineQueryResultGif) SetReplyMarkup

func (s *InlineQueryResultGif) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*InlineQueryResultGif) SetThumbnailMimeType

func (s *InlineQueryResultGif) SetThumbnailMimeType(val OptString)

SetThumbnailMimeType sets the value of ThumbnailMimeType.

func (*InlineQueryResultGif) SetThumbnailURL

func (s *InlineQueryResultGif) SetThumbnailURL(val string)

SetThumbnailURL sets the value of ThumbnailURL.

func (*InlineQueryResultGif) SetTitle

func (s *InlineQueryResultGif) SetTitle(val OptString)

SetTitle sets the value of Title.

func (*InlineQueryResultGif) UnmarshalJSON

func (s *InlineQueryResultGif) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryResultGif) Validate

func (s *InlineQueryResultGif) Validate() error

type InlineQueryResultLocation

type InlineQueryResultLocation struct {
	// Unique identifier for this result, 1-64 Bytes.
	ID string `json:"id"`
	// Location latitude in degrees.
	Latitude float64 `json:"latitude"`
	// Location longitude in degrees.
	Longitude float64 `json:"longitude"`
	// Location title.
	Title string `json:"title"`
	// _Optional_. The radius of uncertainty for the location, measured in meters; 0-1500.
	HorizontalAccuracy OptFloat64 `json:"horizontal_accuracy"`
	// _Optional_. Period in seconds for which the location can be updated, should be between 60 and 86400.
	LivePeriod OptInt `json:"live_period"`
	// _Optional_. For live locations, a direction in which the user is moving, in degrees. Must be
	// between 1 and 360 if specified.
	Heading OptInt `json:"heading"`
	// _Optional_. For live locations, a maximum distance for proximity alerts about approaching another
	// chat member, in meters. Must be between 1 and 100000 if specified.
	ProximityAlertRadius OptInt                  `json:"proximity_alert_radius"`
	ReplyMarkup          OptInlineKeyboardMarkup `json:"reply_markup"`
	InputMessageContent  OptInputMessageContent  `json:"input_message_content"`
	// _Optional_. URL of the thumbnail for the result.
	ThumbnailURL OptString `json:"thumbnail_url"`
	// _Optional_. Thumbnail width.
	ThumbnailWidth OptInt `json:"thumbnail_width"`
	// _Optional_. Thumbnail height.
	ThumbnailHeight OptInt `json:"thumbnail_height"`
}

Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use _input_message_content_ to send a message with the specified content instead of the location. Ref: #/components/schemas/InlineQueryResultLocation

func (*InlineQueryResultLocation) Decode

func (s *InlineQueryResultLocation) Decode(d *jx.Decoder) error

Decode decodes InlineQueryResultLocation from json.

func (*InlineQueryResultLocation) Encode

func (s *InlineQueryResultLocation) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InlineQueryResultLocation) GetHeading

func (s *InlineQueryResultLocation) GetHeading() OptInt

GetHeading returns the value of Heading.

func (*InlineQueryResultLocation) GetHorizontalAccuracy

func (s *InlineQueryResultLocation) GetHorizontalAccuracy() OptFloat64

GetHorizontalAccuracy returns the value of HorizontalAccuracy.

func (*InlineQueryResultLocation) GetID

func (s *InlineQueryResultLocation) GetID() string

GetID returns the value of ID.

func (*InlineQueryResultLocation) GetInputMessageContent

func (s *InlineQueryResultLocation) GetInputMessageContent() OptInputMessageContent

GetInputMessageContent returns the value of InputMessageContent.

func (*InlineQueryResultLocation) GetLatitude

func (s *InlineQueryResultLocation) GetLatitude() float64

GetLatitude returns the value of Latitude.

func (*InlineQueryResultLocation) GetLivePeriod

func (s *InlineQueryResultLocation) GetLivePeriod() OptInt

GetLivePeriod returns the value of LivePeriod.

func (*InlineQueryResultLocation) GetLongitude

func (s *InlineQueryResultLocation) GetLongitude() float64

GetLongitude returns the value of Longitude.

func (*InlineQueryResultLocation) GetProximityAlertRadius

func (s *InlineQueryResultLocation) GetProximityAlertRadius() OptInt

GetProximityAlertRadius returns the value of ProximityAlertRadius.

func (*InlineQueryResultLocation) GetReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*InlineQueryResultLocation) GetThumbnailHeight

func (s *InlineQueryResultLocation) GetThumbnailHeight() OptInt

GetThumbnailHeight returns the value of ThumbnailHeight.

func (*InlineQueryResultLocation) GetThumbnailURL

func (s *InlineQueryResultLocation) GetThumbnailURL() OptString

GetThumbnailURL returns the value of ThumbnailURL.

func (*InlineQueryResultLocation) GetThumbnailWidth

func (s *InlineQueryResultLocation) GetThumbnailWidth() OptInt

GetThumbnailWidth returns the value of ThumbnailWidth.

func (*InlineQueryResultLocation) GetTitle

func (s *InlineQueryResultLocation) GetTitle() string

GetTitle returns the value of Title.

func (*InlineQueryResultLocation) MarshalJSON

func (s *InlineQueryResultLocation) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResultLocation) SetHeading

func (s *InlineQueryResultLocation) SetHeading(val OptInt)

SetHeading sets the value of Heading.

func (*InlineQueryResultLocation) SetHorizontalAccuracy

func (s *InlineQueryResultLocation) SetHorizontalAccuracy(val OptFloat64)

SetHorizontalAccuracy sets the value of HorizontalAccuracy.

func (*InlineQueryResultLocation) SetID

func (s *InlineQueryResultLocation) SetID(val string)

SetID sets the value of ID.

func (*InlineQueryResultLocation) SetInputMessageContent

func (s *InlineQueryResultLocation) SetInputMessageContent(val OptInputMessageContent)

SetInputMessageContent sets the value of InputMessageContent.

func (*InlineQueryResultLocation) SetLatitude

func (s *InlineQueryResultLocation) SetLatitude(val float64)

SetLatitude sets the value of Latitude.

func (*InlineQueryResultLocation) SetLivePeriod

func (s *InlineQueryResultLocation) SetLivePeriod(val OptInt)

SetLivePeriod sets the value of LivePeriod.

func (*InlineQueryResultLocation) SetLongitude

func (s *InlineQueryResultLocation) SetLongitude(val float64)

SetLongitude sets the value of Longitude.

func (*InlineQueryResultLocation) SetProximityAlertRadius

func (s *InlineQueryResultLocation) SetProximityAlertRadius(val OptInt)

SetProximityAlertRadius sets the value of ProximityAlertRadius.

func (*InlineQueryResultLocation) SetReplyMarkup

func (s *InlineQueryResultLocation) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*InlineQueryResultLocation) SetThumbnailHeight

func (s *InlineQueryResultLocation) SetThumbnailHeight(val OptInt)

SetThumbnailHeight sets the value of ThumbnailHeight.

func (*InlineQueryResultLocation) SetThumbnailURL

func (s *InlineQueryResultLocation) SetThumbnailURL(val OptString)

SetThumbnailURL sets the value of ThumbnailURL.

func (*InlineQueryResultLocation) SetThumbnailWidth

func (s *InlineQueryResultLocation) SetThumbnailWidth(val OptInt)

SetThumbnailWidth sets the value of ThumbnailWidth.

func (*InlineQueryResultLocation) SetTitle

func (s *InlineQueryResultLocation) SetTitle(val string)

SetTitle sets the value of Title.

func (*InlineQueryResultLocation) UnmarshalJSON

func (s *InlineQueryResultLocation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryResultLocation) Validate

func (s *InlineQueryResultLocation) Validate() error

type InlineQueryResultMpeg4Gif

type InlineQueryResultMpeg4Gif struct {
	// Unique identifier for this result, 1-64 bytes.
	ID string `json:"id"`
	// A valid URL for the MPEG4 file. File size must not exceed 1MB.
	Mpeg4URL string `json:"mpeg4_url"`
	// _Optional_. Video width.
	Mpeg4Width OptInt `json:"mpeg4_width"`
	// _Optional_. Video height.
	Mpeg4Height OptInt `json:"mpeg4_height"`
	// _Optional_. Video duration in seconds.
	Mpeg4Duration OptInt `json:"mpeg4_duration"`
	// URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result.
	ThumbnailURL string `json:"thumbnail_url"`
	// _Optional_. MIME type of the thumbnail, must be one of `image/jpeg`, `image/gif`, or `video/mp4`.
	// Defaults to `image/jpeg`.
	ThumbnailMimeType OptString `json:"thumbnail_mime_type"`
	// _Optional_. Title for the result.
	Title OptString `json:"title"`
	// _Optional_. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// _Optional_. Mode for parsing entities in the caption. See [formatting options](https://core.
	// telegram.org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// _Optional_. List of special entities that appear in the caption, which can be specified instead of
	// _parse_mode_.
	CaptionEntities     []MessageEntity         `json:"caption_entities"`
	ReplyMarkup         OptInlineKeyboardMarkup `json:"reply_markup"`
	InputMessageContent OptInputMessageContent  `json:"input_message_content"`
}

Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use _input_message_content_ to send a message with the specified content instead of the animation. Ref: #/components/schemas/InlineQueryResultMpeg4Gif

func (*InlineQueryResultMpeg4Gif) Decode

func (s *InlineQueryResultMpeg4Gif) Decode(d *jx.Decoder) error

Decode decodes InlineQueryResultMpeg4Gif from json.

func (*InlineQueryResultMpeg4Gif) Encode

func (s *InlineQueryResultMpeg4Gif) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InlineQueryResultMpeg4Gif) GetCaption

func (s *InlineQueryResultMpeg4Gif) GetCaption() OptString

GetCaption returns the value of Caption.

func (*InlineQueryResultMpeg4Gif) GetCaptionEntities

func (s *InlineQueryResultMpeg4Gif) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*InlineQueryResultMpeg4Gif) GetID

func (s *InlineQueryResultMpeg4Gif) GetID() string

GetID returns the value of ID.

func (*InlineQueryResultMpeg4Gif) GetInputMessageContent

func (s *InlineQueryResultMpeg4Gif) GetInputMessageContent() OptInputMessageContent

GetInputMessageContent returns the value of InputMessageContent.

func (*InlineQueryResultMpeg4Gif) GetMpeg4Duration

func (s *InlineQueryResultMpeg4Gif) GetMpeg4Duration() OptInt

GetMpeg4Duration returns the value of Mpeg4Duration.

func (*InlineQueryResultMpeg4Gif) GetMpeg4Height

func (s *InlineQueryResultMpeg4Gif) GetMpeg4Height() OptInt

GetMpeg4Height returns the value of Mpeg4Height.

func (*InlineQueryResultMpeg4Gif) GetMpeg4URL

func (s *InlineQueryResultMpeg4Gif) GetMpeg4URL() string

GetMpeg4URL returns the value of Mpeg4URL.

func (*InlineQueryResultMpeg4Gif) GetMpeg4Width

func (s *InlineQueryResultMpeg4Gif) GetMpeg4Width() OptInt

GetMpeg4Width returns the value of Mpeg4Width.

func (*InlineQueryResultMpeg4Gif) GetParseMode

func (s *InlineQueryResultMpeg4Gif) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*InlineQueryResultMpeg4Gif) GetReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*InlineQueryResultMpeg4Gif) GetThumbnailMimeType

func (s *InlineQueryResultMpeg4Gif) GetThumbnailMimeType() OptString

GetThumbnailMimeType returns the value of ThumbnailMimeType.

func (*InlineQueryResultMpeg4Gif) GetThumbnailURL

func (s *InlineQueryResultMpeg4Gif) GetThumbnailURL() string

GetThumbnailURL returns the value of ThumbnailURL.

func (*InlineQueryResultMpeg4Gif) GetTitle

func (s *InlineQueryResultMpeg4Gif) GetTitle() OptString

GetTitle returns the value of Title.

func (*InlineQueryResultMpeg4Gif) MarshalJSON

func (s *InlineQueryResultMpeg4Gif) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResultMpeg4Gif) SetCaption

func (s *InlineQueryResultMpeg4Gif) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*InlineQueryResultMpeg4Gif) SetCaptionEntities

func (s *InlineQueryResultMpeg4Gif) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*InlineQueryResultMpeg4Gif) SetID

func (s *InlineQueryResultMpeg4Gif) SetID(val string)

SetID sets the value of ID.

func (*InlineQueryResultMpeg4Gif) SetInputMessageContent

func (s *InlineQueryResultMpeg4Gif) SetInputMessageContent(val OptInputMessageContent)

SetInputMessageContent sets the value of InputMessageContent.

func (*InlineQueryResultMpeg4Gif) SetMpeg4Duration

func (s *InlineQueryResultMpeg4Gif) SetMpeg4Duration(val OptInt)

SetMpeg4Duration sets the value of Mpeg4Duration.

func (*InlineQueryResultMpeg4Gif) SetMpeg4Height

func (s *InlineQueryResultMpeg4Gif) SetMpeg4Height(val OptInt)

SetMpeg4Height sets the value of Mpeg4Height.

func (*InlineQueryResultMpeg4Gif) SetMpeg4URL

func (s *InlineQueryResultMpeg4Gif) SetMpeg4URL(val string)

SetMpeg4URL sets the value of Mpeg4URL.

func (*InlineQueryResultMpeg4Gif) SetMpeg4Width

func (s *InlineQueryResultMpeg4Gif) SetMpeg4Width(val OptInt)

SetMpeg4Width sets the value of Mpeg4Width.

func (*InlineQueryResultMpeg4Gif) SetParseMode

func (s *InlineQueryResultMpeg4Gif) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*InlineQueryResultMpeg4Gif) SetReplyMarkup

func (s *InlineQueryResultMpeg4Gif) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*InlineQueryResultMpeg4Gif) SetThumbnailMimeType

func (s *InlineQueryResultMpeg4Gif) SetThumbnailMimeType(val OptString)

SetThumbnailMimeType sets the value of ThumbnailMimeType.

func (*InlineQueryResultMpeg4Gif) SetThumbnailURL

func (s *InlineQueryResultMpeg4Gif) SetThumbnailURL(val string)

SetThumbnailURL sets the value of ThumbnailURL.

func (*InlineQueryResultMpeg4Gif) SetTitle

func (s *InlineQueryResultMpeg4Gif) SetTitle(val OptString)

SetTitle sets the value of Title.

func (*InlineQueryResultMpeg4Gif) UnmarshalJSON

func (s *InlineQueryResultMpeg4Gif) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryResultMpeg4Gif) Validate

func (s *InlineQueryResultMpeg4Gif) Validate() error

type InlineQueryResultPhoto

type InlineQueryResultPhoto struct {
	// Unique identifier for this result, 1-64 bytes.
	ID string `json:"id"`
	// A valid URL of the photo. Photo must be in **JPEG** format. Photo size must not exceed 5MB.
	PhotoURL string `json:"photo_url"`
	// URL of the thumbnail for the photo.
	ThumbnailURL string `json:"thumbnail_url"`
	// _Optional_. Width of the photo.
	PhotoWidth OptInt `json:"photo_width"`
	// _Optional_. Height of the photo.
	PhotoHeight OptInt `json:"photo_height"`
	// _Optional_. Title for the result.
	Title OptString `json:"title"`
	// _Optional_. Short description of the result.
	Description OptString `json:"description"`
	// _Optional_. Caption of the photo to be sent, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// _Optional_. Mode for parsing entities in the photo caption. See [formatting options](https://core.
	// telegram.org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// _Optional_. List of special entities that appear in the caption, which can be specified instead of
	// _parse_mode_.
	CaptionEntities     []MessageEntity         `json:"caption_entities"`
	ReplyMarkup         OptInlineKeyboardMarkup `json:"reply_markup"`
	InputMessageContent OptInputMessageContent  `json:"input_message_content"`
}

Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use _input_message_content_ to send a message with the specified content instead of the photo. Ref: #/components/schemas/InlineQueryResultPhoto

func (*InlineQueryResultPhoto) Decode

func (s *InlineQueryResultPhoto) Decode(d *jx.Decoder) error

Decode decodes InlineQueryResultPhoto from json.

func (*InlineQueryResultPhoto) Encode

func (s *InlineQueryResultPhoto) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InlineQueryResultPhoto) GetCaption

func (s *InlineQueryResultPhoto) GetCaption() OptString

GetCaption returns the value of Caption.

func (*InlineQueryResultPhoto) GetCaptionEntities

func (s *InlineQueryResultPhoto) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*InlineQueryResultPhoto) GetDescription

func (s *InlineQueryResultPhoto) GetDescription() OptString

GetDescription returns the value of Description.

func (*InlineQueryResultPhoto) GetID

func (s *InlineQueryResultPhoto) GetID() string

GetID returns the value of ID.

func (*InlineQueryResultPhoto) GetInputMessageContent

func (s *InlineQueryResultPhoto) GetInputMessageContent() OptInputMessageContent

GetInputMessageContent returns the value of InputMessageContent.

func (*InlineQueryResultPhoto) GetParseMode

func (s *InlineQueryResultPhoto) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*InlineQueryResultPhoto) GetPhotoHeight

func (s *InlineQueryResultPhoto) GetPhotoHeight() OptInt

GetPhotoHeight returns the value of PhotoHeight.

func (*InlineQueryResultPhoto) GetPhotoURL

func (s *InlineQueryResultPhoto) GetPhotoURL() string

GetPhotoURL returns the value of PhotoURL.

func (*InlineQueryResultPhoto) GetPhotoWidth

func (s *InlineQueryResultPhoto) GetPhotoWidth() OptInt

GetPhotoWidth returns the value of PhotoWidth.

func (*InlineQueryResultPhoto) GetReplyMarkup

func (s *InlineQueryResultPhoto) GetReplyMarkup() OptInlineKeyboardMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*InlineQueryResultPhoto) GetThumbnailURL

func (s *InlineQueryResultPhoto) GetThumbnailURL() string

GetThumbnailURL returns the value of ThumbnailURL.

func (*InlineQueryResultPhoto) GetTitle

func (s *InlineQueryResultPhoto) GetTitle() OptString

GetTitle returns the value of Title.

func (*InlineQueryResultPhoto) MarshalJSON

func (s *InlineQueryResultPhoto) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResultPhoto) SetCaption

func (s *InlineQueryResultPhoto) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*InlineQueryResultPhoto) SetCaptionEntities

func (s *InlineQueryResultPhoto) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*InlineQueryResultPhoto) SetDescription

func (s *InlineQueryResultPhoto) SetDescription(val OptString)

SetDescription sets the value of Description.

func (*InlineQueryResultPhoto) SetID

func (s *InlineQueryResultPhoto) SetID(val string)

SetID sets the value of ID.

func (*InlineQueryResultPhoto) SetInputMessageContent

func (s *InlineQueryResultPhoto) SetInputMessageContent(val OptInputMessageContent)

SetInputMessageContent sets the value of InputMessageContent.

func (*InlineQueryResultPhoto) SetParseMode

func (s *InlineQueryResultPhoto) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*InlineQueryResultPhoto) SetPhotoHeight

func (s *InlineQueryResultPhoto) SetPhotoHeight(val OptInt)

SetPhotoHeight sets the value of PhotoHeight.

func (*InlineQueryResultPhoto) SetPhotoURL

func (s *InlineQueryResultPhoto) SetPhotoURL(val string)

SetPhotoURL sets the value of PhotoURL.

func (*InlineQueryResultPhoto) SetPhotoWidth

func (s *InlineQueryResultPhoto) SetPhotoWidth(val OptInt)

SetPhotoWidth sets the value of PhotoWidth.

func (*InlineQueryResultPhoto) SetReplyMarkup

func (s *InlineQueryResultPhoto) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*InlineQueryResultPhoto) SetThumbnailURL

func (s *InlineQueryResultPhoto) SetThumbnailURL(val string)

SetThumbnailURL sets the value of ThumbnailURL.

func (*InlineQueryResultPhoto) SetTitle

func (s *InlineQueryResultPhoto) SetTitle(val OptString)

SetTitle sets the value of Title.

func (*InlineQueryResultPhoto) UnmarshalJSON

func (s *InlineQueryResultPhoto) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryResultPhoto) Validate

func (s *InlineQueryResultPhoto) Validate() error

type InlineQueryResultType

type InlineQueryResultType string

InlineQueryResultType is oneOf type of InlineQueryResult.

const (
	InlineQueryResultCachedAudioInlineQueryResult    InlineQueryResultType = "InlineQueryResultCachedAudio"
	InlineQueryResultCachedDocumentInlineQueryResult InlineQueryResultType = "InlineQueryResultCachedDocument"
	InlineQueryResultCachedGifInlineQueryResult      InlineQueryResultType = "InlineQueryResultCachedGif"
	InlineQueryResultCachedMpeg4GifInlineQueryResult InlineQueryResultType = "InlineQueryResultCachedMpeg4Gif"
	InlineQueryResultCachedPhotoInlineQueryResult    InlineQueryResultType = "InlineQueryResultCachedPhoto"
	InlineQueryResultCachedStickerInlineQueryResult  InlineQueryResultType = "InlineQueryResultCachedSticker"
	InlineQueryResultCachedVideoInlineQueryResult    InlineQueryResultType = "InlineQueryResultCachedVideo"
	InlineQueryResultCachedVoiceInlineQueryResult    InlineQueryResultType = "InlineQueryResultCachedVoice"
	InlineQueryResultArticleInlineQueryResult        InlineQueryResultType = "InlineQueryResultArticle"
	InlineQueryResultAudioInlineQueryResult          InlineQueryResultType = "InlineQueryResultAudio"
	InlineQueryResultContactInlineQueryResult        InlineQueryResultType = "InlineQueryResultContact"
	InlineQueryResultGameInlineQueryResult           InlineQueryResultType = "InlineQueryResultGame"
	InlineQueryResultDocumentInlineQueryResult       InlineQueryResultType = "InlineQueryResultDocument"
	InlineQueryResultGifInlineQueryResult            InlineQueryResultType = "InlineQueryResultGif"
	InlineQueryResultLocationInlineQueryResult       InlineQueryResultType = "InlineQueryResultLocation"
	InlineQueryResultMpeg4GifInlineQueryResult       InlineQueryResultType = "InlineQueryResultMpeg4Gif"
	InlineQueryResultPhotoInlineQueryResult          InlineQueryResultType = "InlineQueryResultPhoto"
	InlineQueryResultVenueInlineQueryResult          InlineQueryResultType = "InlineQueryResultVenue"
	InlineQueryResultVideoInlineQueryResult          InlineQueryResultType = "InlineQueryResultVideo"
	InlineQueryResultVoiceInlineQueryResult          InlineQueryResultType = "InlineQueryResultVoice"
)

Possible values for InlineQueryResultType.

type InlineQueryResultVenue

type InlineQueryResultVenue struct {
	// Unique identifier for this result, 1-64 Bytes.
	ID string `json:"id"`
	// Latitude of the venue location in degrees.
	Latitude float64 `json:"latitude"`
	// Longitude of the venue location in degrees.
	Longitude float64 `json:"longitude"`
	// Title of the venue.
	Title string `json:"title"`
	// Address of the venue.
	Address string `json:"address"`
	// _Optional_. Foursquare identifier of the venue if known.
	FoursquareID OptString `json:"foursquare_id"`
	// _Optional_. Foursquare type of the venue, if known. (For example, `arts_entertainment/default`,
	// `arts_entertainment/aquarium` or `food/icecream`.).
	FoursquareType OptString `json:"foursquare_type"`
	// _Optional_. Google Places identifier of the venue.
	GooglePlaceID OptString `json:"google_place_id"`
	// _Optional_. Google Places type of the venue. (See [supported types](https://developers.google.
	// com/places/web-service/supported_types).).
	GooglePlaceType     OptString               `json:"google_place_type"`
	ReplyMarkup         OptInlineKeyboardMarkup `json:"reply_markup"`
	InputMessageContent OptInputMessageContent  `json:"input_message_content"`
	// _Optional_. URL of the thumbnail for the result.
	ThumbnailURL OptString `json:"thumbnail_url"`
	// _Optional_. Thumbnail width.
	ThumbnailWidth OptInt `json:"thumbnail_width"`
	// _Optional_. Thumbnail height.
	ThumbnailHeight OptInt `json:"thumbnail_height"`
}

Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use _input_message_content_ to send a message with the specified content instead of the venue. Ref: #/components/schemas/InlineQueryResultVenue

func (*InlineQueryResultVenue) Decode

func (s *InlineQueryResultVenue) Decode(d *jx.Decoder) error

Decode decodes InlineQueryResultVenue from json.

func (*InlineQueryResultVenue) Encode

func (s *InlineQueryResultVenue) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InlineQueryResultVenue) GetAddress

func (s *InlineQueryResultVenue) GetAddress() string

GetAddress returns the value of Address.

func (*InlineQueryResultVenue) GetFoursquareID

func (s *InlineQueryResultVenue) GetFoursquareID() OptString

GetFoursquareID returns the value of FoursquareID.

func (*InlineQueryResultVenue) GetFoursquareType

func (s *InlineQueryResultVenue) GetFoursquareType() OptString

GetFoursquareType returns the value of FoursquareType.

func (*InlineQueryResultVenue) GetGooglePlaceID

func (s *InlineQueryResultVenue) GetGooglePlaceID() OptString

GetGooglePlaceID returns the value of GooglePlaceID.

func (*InlineQueryResultVenue) GetGooglePlaceType

func (s *InlineQueryResultVenue) GetGooglePlaceType() OptString

GetGooglePlaceType returns the value of GooglePlaceType.

func (*InlineQueryResultVenue) GetID

func (s *InlineQueryResultVenue) GetID() string

GetID returns the value of ID.

func (*InlineQueryResultVenue) GetInputMessageContent

func (s *InlineQueryResultVenue) GetInputMessageContent() OptInputMessageContent

GetInputMessageContent returns the value of InputMessageContent.

func (*InlineQueryResultVenue) GetLatitude

func (s *InlineQueryResultVenue) GetLatitude() float64

GetLatitude returns the value of Latitude.

func (*InlineQueryResultVenue) GetLongitude

func (s *InlineQueryResultVenue) GetLongitude() float64

GetLongitude returns the value of Longitude.

func (*InlineQueryResultVenue) GetReplyMarkup

func (s *InlineQueryResultVenue) GetReplyMarkup() OptInlineKeyboardMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*InlineQueryResultVenue) GetThumbnailHeight

func (s *InlineQueryResultVenue) GetThumbnailHeight() OptInt

GetThumbnailHeight returns the value of ThumbnailHeight.

func (*InlineQueryResultVenue) GetThumbnailURL

func (s *InlineQueryResultVenue) GetThumbnailURL() OptString

GetThumbnailURL returns the value of ThumbnailURL.

func (*InlineQueryResultVenue) GetThumbnailWidth

func (s *InlineQueryResultVenue) GetThumbnailWidth() OptInt

GetThumbnailWidth returns the value of ThumbnailWidth.

func (*InlineQueryResultVenue) GetTitle

func (s *InlineQueryResultVenue) GetTitle() string

GetTitle returns the value of Title.

func (*InlineQueryResultVenue) MarshalJSON

func (s *InlineQueryResultVenue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResultVenue) SetAddress

func (s *InlineQueryResultVenue) SetAddress(val string)

SetAddress sets the value of Address.

func (*InlineQueryResultVenue) SetFoursquareID

func (s *InlineQueryResultVenue) SetFoursquareID(val OptString)

SetFoursquareID sets the value of FoursquareID.

func (*InlineQueryResultVenue) SetFoursquareType

func (s *InlineQueryResultVenue) SetFoursquareType(val OptString)

SetFoursquareType sets the value of FoursquareType.

func (*InlineQueryResultVenue) SetGooglePlaceID

func (s *InlineQueryResultVenue) SetGooglePlaceID(val OptString)

SetGooglePlaceID sets the value of GooglePlaceID.

func (*InlineQueryResultVenue) SetGooglePlaceType

func (s *InlineQueryResultVenue) SetGooglePlaceType(val OptString)

SetGooglePlaceType sets the value of GooglePlaceType.

func (*InlineQueryResultVenue) SetID

func (s *InlineQueryResultVenue) SetID(val string)

SetID sets the value of ID.

func (*InlineQueryResultVenue) SetInputMessageContent

func (s *InlineQueryResultVenue) SetInputMessageContent(val OptInputMessageContent)

SetInputMessageContent sets the value of InputMessageContent.

func (*InlineQueryResultVenue) SetLatitude

func (s *InlineQueryResultVenue) SetLatitude(val float64)

SetLatitude sets the value of Latitude.

func (*InlineQueryResultVenue) SetLongitude

func (s *InlineQueryResultVenue) SetLongitude(val float64)

SetLongitude sets the value of Longitude.

func (*InlineQueryResultVenue) SetReplyMarkup

func (s *InlineQueryResultVenue) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*InlineQueryResultVenue) SetThumbnailHeight

func (s *InlineQueryResultVenue) SetThumbnailHeight(val OptInt)

SetThumbnailHeight sets the value of ThumbnailHeight.

func (*InlineQueryResultVenue) SetThumbnailURL

func (s *InlineQueryResultVenue) SetThumbnailURL(val OptString)

SetThumbnailURL sets the value of ThumbnailURL.

func (*InlineQueryResultVenue) SetThumbnailWidth

func (s *InlineQueryResultVenue) SetThumbnailWidth(val OptInt)

SetThumbnailWidth sets the value of ThumbnailWidth.

func (*InlineQueryResultVenue) SetTitle

func (s *InlineQueryResultVenue) SetTitle(val string)

SetTitle sets the value of Title.

func (*InlineQueryResultVenue) UnmarshalJSON

func (s *InlineQueryResultVenue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryResultVenue) Validate

func (s *InlineQueryResultVenue) Validate() error

type InlineQueryResultVideo

type InlineQueryResultVideo struct {
	// Unique identifier for this result, 1-64 bytes.
	ID string `json:"id"`
	// A valid URL for the embedded video player or video file.
	VideoURL string `json:"video_url"`
	// MIME type of the content of the video URL, `text/html` or `video/mp4`.
	MimeType string `json:"mime_type"`
	// URL of the thumbnail (JPEG only) for the video.
	ThumbnailURL string `json:"thumbnail_url"`
	// Title for the result.
	Title string `json:"title"`
	// _Optional_. Caption of the video to be sent, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// _Optional_. Mode for parsing entities in the video caption. See [formatting options](https://core.
	// telegram.org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// _Optional_. List of special entities that appear in the caption, which can be specified instead of
	// _parse_mode_.
	CaptionEntities []MessageEntity `json:"caption_entities"`
	// _Optional_. Video width.
	VideoWidth OptInt `json:"video_width"`
	// _Optional_. Video height.
	VideoHeight OptInt `json:"video_height"`
	// _Optional_. Video duration in seconds.
	VideoDuration OptInt `json:"video_duration"`
	// _Optional_. Short description of the result.
	Description         OptString               `json:"description"`
	ReplyMarkup         OptInlineKeyboardMarkup `json:"reply_markup"`
	InputMessageContent OptInputMessageContent  `json:"input_message_content"`
}

Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use _input_message_content_ to send a message with the specified content instead of the video. Ref: #/components/schemas/InlineQueryResultVideo

func (*InlineQueryResultVideo) Decode

func (s *InlineQueryResultVideo) Decode(d *jx.Decoder) error

Decode decodes InlineQueryResultVideo from json.

func (*InlineQueryResultVideo) Encode

func (s *InlineQueryResultVideo) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InlineQueryResultVideo) GetCaption

func (s *InlineQueryResultVideo) GetCaption() OptString

GetCaption returns the value of Caption.

func (*InlineQueryResultVideo) GetCaptionEntities

func (s *InlineQueryResultVideo) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*InlineQueryResultVideo) GetDescription

func (s *InlineQueryResultVideo) GetDescription() OptString

GetDescription returns the value of Description.

func (*InlineQueryResultVideo) GetID

func (s *InlineQueryResultVideo) GetID() string

GetID returns the value of ID.

func (*InlineQueryResultVideo) GetInputMessageContent

func (s *InlineQueryResultVideo) GetInputMessageContent() OptInputMessageContent

GetInputMessageContent returns the value of InputMessageContent.

func (*InlineQueryResultVideo) GetMimeType

func (s *InlineQueryResultVideo) GetMimeType() string

GetMimeType returns the value of MimeType.

func (*InlineQueryResultVideo) GetParseMode

func (s *InlineQueryResultVideo) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*InlineQueryResultVideo) GetReplyMarkup

func (s *InlineQueryResultVideo) GetReplyMarkup() OptInlineKeyboardMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*InlineQueryResultVideo) GetThumbnailURL

func (s *InlineQueryResultVideo) GetThumbnailURL() string

GetThumbnailURL returns the value of ThumbnailURL.

func (*InlineQueryResultVideo) GetTitle

func (s *InlineQueryResultVideo) GetTitle() string

GetTitle returns the value of Title.

func (*InlineQueryResultVideo) GetVideoDuration

func (s *InlineQueryResultVideo) GetVideoDuration() OptInt

GetVideoDuration returns the value of VideoDuration.

func (*InlineQueryResultVideo) GetVideoHeight

func (s *InlineQueryResultVideo) GetVideoHeight() OptInt

GetVideoHeight returns the value of VideoHeight.

func (*InlineQueryResultVideo) GetVideoURL

func (s *InlineQueryResultVideo) GetVideoURL() string

GetVideoURL returns the value of VideoURL.

func (*InlineQueryResultVideo) GetVideoWidth

func (s *InlineQueryResultVideo) GetVideoWidth() OptInt

GetVideoWidth returns the value of VideoWidth.

func (*InlineQueryResultVideo) MarshalJSON

func (s *InlineQueryResultVideo) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResultVideo) SetCaption

func (s *InlineQueryResultVideo) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*InlineQueryResultVideo) SetCaptionEntities

func (s *InlineQueryResultVideo) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*InlineQueryResultVideo) SetDescription

func (s *InlineQueryResultVideo) SetDescription(val OptString)

SetDescription sets the value of Description.

func (*InlineQueryResultVideo) SetID

func (s *InlineQueryResultVideo) SetID(val string)

SetID sets the value of ID.

func (*InlineQueryResultVideo) SetInputMessageContent

func (s *InlineQueryResultVideo) SetInputMessageContent(val OptInputMessageContent)

SetInputMessageContent sets the value of InputMessageContent.

func (*InlineQueryResultVideo) SetMimeType

func (s *InlineQueryResultVideo) SetMimeType(val string)

SetMimeType sets the value of MimeType.

func (*InlineQueryResultVideo) SetParseMode

func (s *InlineQueryResultVideo) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*InlineQueryResultVideo) SetReplyMarkup

func (s *InlineQueryResultVideo) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*InlineQueryResultVideo) SetThumbnailURL

func (s *InlineQueryResultVideo) SetThumbnailURL(val string)

SetThumbnailURL sets the value of ThumbnailURL.

func (*InlineQueryResultVideo) SetTitle

func (s *InlineQueryResultVideo) SetTitle(val string)

SetTitle sets the value of Title.

func (*InlineQueryResultVideo) SetVideoDuration

func (s *InlineQueryResultVideo) SetVideoDuration(val OptInt)

SetVideoDuration sets the value of VideoDuration.

func (*InlineQueryResultVideo) SetVideoHeight

func (s *InlineQueryResultVideo) SetVideoHeight(val OptInt)

SetVideoHeight sets the value of VideoHeight.

func (*InlineQueryResultVideo) SetVideoURL

func (s *InlineQueryResultVideo) SetVideoURL(val string)

SetVideoURL sets the value of VideoURL.

func (*InlineQueryResultVideo) SetVideoWidth

func (s *InlineQueryResultVideo) SetVideoWidth(val OptInt)

SetVideoWidth sets the value of VideoWidth.

func (*InlineQueryResultVideo) UnmarshalJSON

func (s *InlineQueryResultVideo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryResultVideo) Validate

func (s *InlineQueryResultVideo) Validate() error

type InlineQueryResultVoice

type InlineQueryResultVoice struct {
	// Unique identifier for this result, 1-64 bytes.
	ID string `json:"id"`
	// A valid URL for the voice recording.
	VoiceURL string `json:"voice_url"`
	// Recording title.
	Title string `json:"title"`
	// _Optional_. Caption, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// _Optional_. Mode for parsing entities in the voice message caption. See [formatting
	// options](https://core.telegram.org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// _Optional_. List of special entities that appear in the caption, which can be specified instead of
	// _parse_mode_.
	CaptionEntities []MessageEntity `json:"caption_entities"`
	// _Optional_. Recording duration in seconds.
	VoiceDuration       OptInt                  `json:"voice_duration"`
	ReplyMarkup         OptInlineKeyboardMarkup `json:"reply_markup"`
	InputMessageContent OptInputMessageContent  `json:"input_message_content"`
}

Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use _input_message_content_ to send a message with the specified content instead of the the voice message. Ref: #/components/schemas/InlineQueryResultVoice

func (*InlineQueryResultVoice) Decode

func (s *InlineQueryResultVoice) Decode(d *jx.Decoder) error

Decode decodes InlineQueryResultVoice from json.

func (*InlineQueryResultVoice) Encode

func (s *InlineQueryResultVoice) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InlineQueryResultVoice) GetCaption

func (s *InlineQueryResultVoice) GetCaption() OptString

GetCaption returns the value of Caption.

func (*InlineQueryResultVoice) GetCaptionEntities

func (s *InlineQueryResultVoice) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*InlineQueryResultVoice) GetID

func (s *InlineQueryResultVoice) GetID() string

GetID returns the value of ID.

func (*InlineQueryResultVoice) GetInputMessageContent

func (s *InlineQueryResultVoice) GetInputMessageContent() OptInputMessageContent

GetInputMessageContent returns the value of InputMessageContent.

func (*InlineQueryResultVoice) GetParseMode

func (s *InlineQueryResultVoice) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*InlineQueryResultVoice) GetReplyMarkup

func (s *InlineQueryResultVoice) GetReplyMarkup() OptInlineKeyboardMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*InlineQueryResultVoice) GetTitle

func (s *InlineQueryResultVoice) GetTitle() string

GetTitle returns the value of Title.

func (*InlineQueryResultVoice) GetVoiceDuration

func (s *InlineQueryResultVoice) GetVoiceDuration() OptInt

GetVoiceDuration returns the value of VoiceDuration.

func (*InlineQueryResultVoice) GetVoiceURL

func (s *InlineQueryResultVoice) GetVoiceURL() string

GetVoiceURL returns the value of VoiceURL.

func (*InlineQueryResultVoice) MarshalJSON

func (s *InlineQueryResultVoice) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResultVoice) SetCaption

func (s *InlineQueryResultVoice) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*InlineQueryResultVoice) SetCaptionEntities

func (s *InlineQueryResultVoice) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*InlineQueryResultVoice) SetID

func (s *InlineQueryResultVoice) SetID(val string)

SetID sets the value of ID.

func (*InlineQueryResultVoice) SetInputMessageContent

func (s *InlineQueryResultVoice) SetInputMessageContent(val OptInputMessageContent)

SetInputMessageContent sets the value of InputMessageContent.

func (*InlineQueryResultVoice) SetParseMode

func (s *InlineQueryResultVoice) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*InlineQueryResultVoice) SetReplyMarkup

func (s *InlineQueryResultVoice) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*InlineQueryResultVoice) SetTitle

func (s *InlineQueryResultVoice) SetTitle(val string)

SetTitle sets the value of Title.

func (*InlineQueryResultVoice) SetVoiceDuration

func (s *InlineQueryResultVoice) SetVoiceDuration(val OptInt)

SetVoiceDuration sets the value of VoiceDuration.

func (*InlineQueryResultVoice) SetVoiceURL

func (s *InlineQueryResultVoice) SetVoiceURL(val string)

SetVoiceURL sets the value of VoiceURL.

func (*InlineQueryResultVoice) UnmarshalJSON

func (s *InlineQueryResultVoice) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryResultVoice) Validate

func (s *InlineQueryResultVoice) Validate() error

type InlineQueryResultsButton

type InlineQueryResultsButton struct {
	// Label text on the button.
	Text   string        `json:"text"`
	WebApp OptWebAppInfo `json:"web_app"`
	// _Optional_. [Deep-linking](https://core.telegram.org/bots/features#deep-linking) parameter for the
	// /start message sent to the bot when a user presses the button. 1-64 characters, only `A-Z`, `a-z`,
	// `0-9`, `_` and `-` are allowed._Example:_ An inline bot that sends YouTube videos can ask the user
	// to connect the bot to their YouTube account to adapt search results accordingly. To do this, it
	// displays a 'Connect your YouTube account' button above the results, or even before showing any.
	// The user presses the button, switches to a private chat with the bot and, in doing so, passes a
	// start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a
	// [_switch_inline_](https://core.telegram.org/bots/api#inlinekeyboardmarkup) button so that the user
	// can easily return to the chat where they wanted to use the bot's inline capabilities.
	StartParameter OptString `json:"start_parameter"`
}

This object represents a button to be shown above inline query results. You **must** use exactly one of the optional fields. Ref: #/components/schemas/InlineQueryResultsButton

func (*InlineQueryResultsButton) Decode

func (s *InlineQueryResultsButton) Decode(d *jx.Decoder) error

Decode decodes InlineQueryResultsButton from json.

func (*InlineQueryResultsButton) Encode

func (s *InlineQueryResultsButton) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InlineQueryResultsButton) GetStartParameter

func (s *InlineQueryResultsButton) GetStartParameter() OptString

GetStartParameter returns the value of StartParameter.

func (*InlineQueryResultsButton) GetText

func (s *InlineQueryResultsButton) GetText() string

GetText returns the value of Text.

func (*InlineQueryResultsButton) GetWebApp

func (s *InlineQueryResultsButton) GetWebApp() OptWebAppInfo

GetWebApp returns the value of WebApp.

func (*InlineQueryResultsButton) MarshalJSON

func (s *InlineQueryResultsButton) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InlineQueryResultsButton) SetStartParameter

func (s *InlineQueryResultsButton) SetStartParameter(val OptString)

SetStartParameter sets the value of StartParameter.

func (*InlineQueryResultsButton) SetText

func (s *InlineQueryResultsButton) SetText(val string)

SetText sets the value of Text.

func (*InlineQueryResultsButton) SetWebApp

func (s *InlineQueryResultsButton) SetWebApp(val OptWebAppInfo)

SetWebApp sets the value of WebApp.

func (*InlineQueryResultsButton) UnmarshalJSON

func (s *InlineQueryResultsButton) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InlineQueryResultsButton) Validate

func (s *InlineQueryResultsButton) Validate() error

type InputContactMessageContent

type InputContactMessageContent struct {
	// Contact's phone number.
	PhoneNumber string `json:"phone_number"`
	// Contact's first name.
	FirstName string `json:"first_name"`
	// _Optional_. Contact's last name.
	LastName OptString `json:"last_name"`
	// _Optional_. Additional data about the contact in the form of a [vCard](https://en.wikipedia.
	// org/wiki/VCard), 0-2048 bytes.
	Vcard OptString `json:"vcard"`
}

Represents the [content](https://core.telegram.org/bots/api#inputmessagecontent) of a contact message to be sent as the result of an inline query. Ref: #/components/schemas/InputContactMessageContent

func (*InputContactMessageContent) Decode

Decode decodes InputContactMessageContent from json.

func (*InputContactMessageContent) Encode

func (s *InputContactMessageContent) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InputContactMessageContent) GetFirstName

func (s *InputContactMessageContent) GetFirstName() string

GetFirstName returns the value of FirstName.

func (*InputContactMessageContent) GetLastName

func (s *InputContactMessageContent) GetLastName() OptString

GetLastName returns the value of LastName.

func (*InputContactMessageContent) GetPhoneNumber

func (s *InputContactMessageContent) GetPhoneNumber() string

GetPhoneNumber returns the value of PhoneNumber.

func (*InputContactMessageContent) GetVcard

func (s *InputContactMessageContent) GetVcard() OptString

GetVcard returns the value of Vcard.

func (*InputContactMessageContent) MarshalJSON

func (s *InputContactMessageContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InputContactMessageContent) SetFirstName

func (s *InputContactMessageContent) SetFirstName(val string)

SetFirstName sets the value of FirstName.

func (*InputContactMessageContent) SetLastName

func (s *InputContactMessageContent) SetLastName(val OptString)

SetLastName sets the value of LastName.

func (*InputContactMessageContent) SetPhoneNumber

func (s *InputContactMessageContent) SetPhoneNumber(val string)

SetPhoneNumber sets the value of PhoneNumber.

func (*InputContactMessageContent) SetVcard

func (s *InputContactMessageContent) SetVcard(val OptString)

SetVcard sets the value of Vcard.

func (*InputContactMessageContent) UnmarshalJSON

func (s *InputContactMessageContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InputContactMessageContent) Validate

func (s *InputContactMessageContent) Validate() error

type InputInvoiceMessageContent

type InputInvoiceMessageContent struct {
	// Product name, 1-32 characters.
	Title string `json:"title"`
	// Product description, 1-255 characters.
	Description string `json:"description"`
	// Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your
	// internal processes.
	Payload string `json:"payload"`
	// Payment provider token, obtained via [@BotFather](https://t.me/botfather).
	ProviderToken string `json:"provider_token"`
	// Three-letter ISO 4217 currency code, see [more on currencies](https://core.telegram.
	// org/bots/payments#supported-currencies).
	Currency string `json:"currency"`
	// Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery
	// cost, delivery tax, bonus, etc.).
	Prices []LabeledPrice `json:"prices"`
	// _Optional_. The maximum accepted amount for tips in the _smallest units_ of the currency (integer,
	// **not** float/double). For example, for a maximum tip of `US$ 1.45` pass `max_tip_amount = 145`.
	// See the _exp_ parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.
	// json), it shows the number of digits past the decimal point for each currency (2 for the majority
	// of currencies). Defaults to 0.
	MaxTipAmount OptInt `json:"max_tip_amount"`
	// _Optional_. A JSON-serialized array of suggested amounts of tip in the _smallest units_ of the
	// currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The
	// suggested tip amounts must be positive, passed in a strictly increased order and must not exceed
	// _max_tip_amount_.
	SuggestedTipAmounts []int64 `json:"suggested_tip_amounts"`
	// _Optional_. A JSON-serialized object for data about the invoice, which will be shared with the
	// payment provider. A detailed description of the required fields should be provided by the payment
	// provider.
	ProviderData OptString `json:"provider_data"`
	// _Optional_. URL of the product photo for the invoice. Can be a photo of the goods or a marketing
	// image for a service.
	PhotoURL OptString `json:"photo_url"`
	// _Optional_. Photo size in bytes.
	PhotoSize OptInt `json:"photo_size"`
	// _Optional_. Photo width.
	PhotoWidth OptInt `json:"photo_width"`
	// _Optional_. Photo height.
	PhotoHeight OptInt `json:"photo_height"`
	// _Optional_. Pass _True_ if you require the user's full name to complete the order.
	NeedName OptBool `json:"need_name"`
	// _Optional_. Pass _True_ if you require the user's phone number to complete the order.
	NeedPhoneNumber OptBool `json:"need_phone_number"`
	// _Optional_. Pass _True_ if you require the user's email address to complete the order.
	NeedEmail OptBool `json:"need_email"`
	// _Optional_. Pass _True_ if you require the user's shipping address to complete the order.
	NeedShippingAddress OptBool `json:"need_shipping_address"`
	// _Optional_. Pass _True_ if the user's phone number should be sent to provider.
	SendPhoneNumberToProvider OptBool `json:"send_phone_number_to_provider"`
	// _Optional_. Pass _True_ if the user's email address should be sent to provider.
	SendEmailToProvider OptBool `json:"send_email_to_provider"`
	// _Optional_. Pass _True_ if the final price depends on the shipping method.
	IsFlexible OptBool `json:"is_flexible"`
}

Represents the [content](https://core.telegram.org/bots/api#inputmessagecontent) of an invoice message to be sent as the result of an inline query. Ref: #/components/schemas/InputInvoiceMessageContent

func (*InputInvoiceMessageContent) Decode

Decode decodes InputInvoiceMessageContent from json.

func (*InputInvoiceMessageContent) Encode

func (s *InputInvoiceMessageContent) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InputInvoiceMessageContent) GetCurrency

func (s *InputInvoiceMessageContent) GetCurrency() string

GetCurrency returns the value of Currency.

func (*InputInvoiceMessageContent) GetDescription

func (s *InputInvoiceMessageContent) GetDescription() string

GetDescription returns the value of Description.

func (*InputInvoiceMessageContent) GetIsFlexible

func (s *InputInvoiceMessageContent) GetIsFlexible() OptBool

GetIsFlexible returns the value of IsFlexible.

func (*InputInvoiceMessageContent) GetMaxTipAmount

func (s *InputInvoiceMessageContent) GetMaxTipAmount() OptInt

GetMaxTipAmount returns the value of MaxTipAmount.

func (*InputInvoiceMessageContent) GetNeedEmail

func (s *InputInvoiceMessageContent) GetNeedEmail() OptBool

GetNeedEmail returns the value of NeedEmail.

func (*InputInvoiceMessageContent) GetNeedName

func (s *InputInvoiceMessageContent) GetNeedName() OptBool

GetNeedName returns the value of NeedName.

func (*InputInvoiceMessageContent) GetNeedPhoneNumber

func (s *InputInvoiceMessageContent) GetNeedPhoneNumber() OptBool

GetNeedPhoneNumber returns the value of NeedPhoneNumber.

func (*InputInvoiceMessageContent) GetNeedShippingAddress

func (s *InputInvoiceMessageContent) GetNeedShippingAddress() OptBool

GetNeedShippingAddress returns the value of NeedShippingAddress.

func (*InputInvoiceMessageContent) GetPayload

func (s *InputInvoiceMessageContent) GetPayload() string

GetPayload returns the value of Payload.

func (*InputInvoiceMessageContent) GetPhotoHeight

func (s *InputInvoiceMessageContent) GetPhotoHeight() OptInt

GetPhotoHeight returns the value of PhotoHeight.

func (*InputInvoiceMessageContent) GetPhotoSize

func (s *InputInvoiceMessageContent) GetPhotoSize() OptInt

GetPhotoSize returns the value of PhotoSize.

func (*InputInvoiceMessageContent) GetPhotoURL

func (s *InputInvoiceMessageContent) GetPhotoURL() OptString

GetPhotoURL returns the value of PhotoURL.

func (*InputInvoiceMessageContent) GetPhotoWidth

func (s *InputInvoiceMessageContent) GetPhotoWidth() OptInt

GetPhotoWidth returns the value of PhotoWidth.

func (*InputInvoiceMessageContent) GetPrices

func (s *InputInvoiceMessageContent) GetPrices() []LabeledPrice

GetPrices returns the value of Prices.

func (*InputInvoiceMessageContent) GetProviderData

func (s *InputInvoiceMessageContent) GetProviderData() OptString

GetProviderData returns the value of ProviderData.

func (*InputInvoiceMessageContent) GetProviderToken

func (s *InputInvoiceMessageContent) GetProviderToken() string

GetProviderToken returns the value of ProviderToken.

func (*InputInvoiceMessageContent) GetSendEmailToProvider

func (s *InputInvoiceMessageContent) GetSendEmailToProvider() OptBool

GetSendEmailToProvider returns the value of SendEmailToProvider.

func (*InputInvoiceMessageContent) GetSendPhoneNumberToProvider

func (s *InputInvoiceMessageContent) GetSendPhoneNumberToProvider() OptBool

GetSendPhoneNumberToProvider returns the value of SendPhoneNumberToProvider.

func (*InputInvoiceMessageContent) GetSuggestedTipAmounts

func (s *InputInvoiceMessageContent) GetSuggestedTipAmounts() []int64

GetSuggestedTipAmounts returns the value of SuggestedTipAmounts.

func (*InputInvoiceMessageContent) GetTitle

func (s *InputInvoiceMessageContent) GetTitle() string

GetTitle returns the value of Title.

func (*InputInvoiceMessageContent) MarshalJSON

func (s *InputInvoiceMessageContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InputInvoiceMessageContent) SetCurrency

func (s *InputInvoiceMessageContent) SetCurrency(val string)

SetCurrency sets the value of Currency.

func (*InputInvoiceMessageContent) SetDescription

func (s *InputInvoiceMessageContent) SetDescription(val string)

SetDescription sets the value of Description.

func (*InputInvoiceMessageContent) SetIsFlexible

func (s *InputInvoiceMessageContent) SetIsFlexible(val OptBool)

SetIsFlexible sets the value of IsFlexible.

func (*InputInvoiceMessageContent) SetMaxTipAmount

func (s *InputInvoiceMessageContent) SetMaxTipAmount(val OptInt)

SetMaxTipAmount sets the value of MaxTipAmount.

func (*InputInvoiceMessageContent) SetNeedEmail

func (s *InputInvoiceMessageContent) SetNeedEmail(val OptBool)

SetNeedEmail sets the value of NeedEmail.

func (*InputInvoiceMessageContent) SetNeedName

func (s *InputInvoiceMessageContent) SetNeedName(val OptBool)

SetNeedName sets the value of NeedName.

func (*InputInvoiceMessageContent) SetNeedPhoneNumber

func (s *InputInvoiceMessageContent) SetNeedPhoneNumber(val OptBool)

SetNeedPhoneNumber sets the value of NeedPhoneNumber.

func (*InputInvoiceMessageContent) SetNeedShippingAddress

func (s *InputInvoiceMessageContent) SetNeedShippingAddress(val OptBool)

SetNeedShippingAddress sets the value of NeedShippingAddress.

func (*InputInvoiceMessageContent) SetPayload

func (s *InputInvoiceMessageContent) SetPayload(val string)

SetPayload sets the value of Payload.

func (*InputInvoiceMessageContent) SetPhotoHeight

func (s *InputInvoiceMessageContent) SetPhotoHeight(val OptInt)

SetPhotoHeight sets the value of PhotoHeight.

func (*InputInvoiceMessageContent) SetPhotoSize

func (s *InputInvoiceMessageContent) SetPhotoSize(val OptInt)

SetPhotoSize sets the value of PhotoSize.

func (*InputInvoiceMessageContent) SetPhotoURL

func (s *InputInvoiceMessageContent) SetPhotoURL(val OptString)

SetPhotoURL sets the value of PhotoURL.

func (*InputInvoiceMessageContent) SetPhotoWidth

func (s *InputInvoiceMessageContent) SetPhotoWidth(val OptInt)

SetPhotoWidth sets the value of PhotoWidth.

func (*InputInvoiceMessageContent) SetPrices

func (s *InputInvoiceMessageContent) SetPrices(val []LabeledPrice)

SetPrices sets the value of Prices.

func (*InputInvoiceMessageContent) SetProviderData

func (s *InputInvoiceMessageContent) SetProviderData(val OptString)

SetProviderData sets the value of ProviderData.

func (*InputInvoiceMessageContent) SetProviderToken

func (s *InputInvoiceMessageContent) SetProviderToken(val string)

SetProviderToken sets the value of ProviderToken.

func (*InputInvoiceMessageContent) SetSendEmailToProvider

func (s *InputInvoiceMessageContent) SetSendEmailToProvider(val OptBool)

SetSendEmailToProvider sets the value of SendEmailToProvider.

func (*InputInvoiceMessageContent) SetSendPhoneNumberToProvider

func (s *InputInvoiceMessageContent) SetSendPhoneNumberToProvider(val OptBool)

SetSendPhoneNumberToProvider sets the value of SendPhoneNumberToProvider.

func (*InputInvoiceMessageContent) SetSuggestedTipAmounts

func (s *InputInvoiceMessageContent) SetSuggestedTipAmounts(val []int64)

SetSuggestedTipAmounts sets the value of SuggestedTipAmounts.

func (*InputInvoiceMessageContent) SetTitle

func (s *InputInvoiceMessageContent) SetTitle(val string)

SetTitle sets the value of Title.

func (*InputInvoiceMessageContent) UnmarshalJSON

func (s *InputInvoiceMessageContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InputInvoiceMessageContent) Validate

func (s *InputInvoiceMessageContent) Validate() error

type InputLocationMessageContent

type InputLocationMessageContent struct {
	// Latitude of the location in degrees.
	Latitude float64 `json:"latitude"`
	// Longitude of the location in degrees.
	Longitude float64 `json:"longitude"`
	// _Optional_. The radius of uncertainty for the location, measured in meters; 0-1500.
	HorizontalAccuracy OptFloat64 `json:"horizontal_accuracy"`
	// _Optional_. Period in seconds for which the location can be updated, should be between 60 and 86400.
	LivePeriod OptInt `json:"live_period"`
	// _Optional_. For live locations, a direction in which the user is moving, in degrees. Must be
	// between 1 and 360 if specified.
	Heading OptInt `json:"heading"`
	// _Optional_. For live locations, a maximum distance for proximity alerts about approaching another
	// chat member, in meters. Must be between 1 and 100000 if specified.
	ProximityAlertRadius OptInt `json:"proximity_alert_radius"`
}

Represents the [content](https://core.telegram.org/bots/api#inputmessagecontent) of a location message to be sent as the result of an inline query. Ref: #/components/schemas/InputLocationMessageContent

func (*InputLocationMessageContent) Decode

Decode decodes InputLocationMessageContent from json.

func (*InputLocationMessageContent) Encode

func (s *InputLocationMessageContent) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InputLocationMessageContent) GetHeading

func (s *InputLocationMessageContent) GetHeading() OptInt

GetHeading returns the value of Heading.

func (*InputLocationMessageContent) GetHorizontalAccuracy

func (s *InputLocationMessageContent) GetHorizontalAccuracy() OptFloat64

GetHorizontalAccuracy returns the value of HorizontalAccuracy.

func (*InputLocationMessageContent) GetLatitude

func (s *InputLocationMessageContent) GetLatitude() float64

GetLatitude returns the value of Latitude.

func (*InputLocationMessageContent) GetLivePeriod

func (s *InputLocationMessageContent) GetLivePeriod() OptInt

GetLivePeriod returns the value of LivePeriod.

func (*InputLocationMessageContent) GetLongitude

func (s *InputLocationMessageContent) GetLongitude() float64

GetLongitude returns the value of Longitude.

func (*InputLocationMessageContent) GetProximityAlertRadius

func (s *InputLocationMessageContent) GetProximityAlertRadius() OptInt

GetProximityAlertRadius returns the value of ProximityAlertRadius.

func (*InputLocationMessageContent) MarshalJSON

func (s *InputLocationMessageContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InputLocationMessageContent) SetHeading

func (s *InputLocationMessageContent) SetHeading(val OptInt)

SetHeading sets the value of Heading.

func (*InputLocationMessageContent) SetHorizontalAccuracy

func (s *InputLocationMessageContent) SetHorizontalAccuracy(val OptFloat64)

SetHorizontalAccuracy sets the value of HorizontalAccuracy.

func (*InputLocationMessageContent) SetLatitude

func (s *InputLocationMessageContent) SetLatitude(val float64)

SetLatitude sets the value of Latitude.

func (*InputLocationMessageContent) SetLivePeriod

func (s *InputLocationMessageContent) SetLivePeriod(val OptInt)

SetLivePeriod sets the value of LivePeriod.

func (*InputLocationMessageContent) SetLongitude

func (s *InputLocationMessageContent) SetLongitude(val float64)

SetLongitude sets the value of Longitude.

func (*InputLocationMessageContent) SetProximityAlertRadius

func (s *InputLocationMessageContent) SetProximityAlertRadius(val OptInt)

SetProximityAlertRadius sets the value of ProximityAlertRadius.

func (*InputLocationMessageContent) UnmarshalJSON

func (s *InputLocationMessageContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InputLocationMessageContent) Validate

func (s *InputLocationMessageContent) Validate() error

type InputMedia

type InputMedia struct {
	Type                InputMediaType // switch on this field
	InputMediaAnimation InputMediaAnimation
	InputMediaDocument  InputMediaDocument
	InputMediaAudio     InputMediaAudio
	InputMediaPhoto     InputMediaPhoto
	InputMediaVideo     InputMediaVideo
}

This object represents the content of a media message to be sent. It should be one of. Ref: #/components/schemas/InputMedia InputMedia represents sum type.

func NewInputMediaAnimationInputMedia

func NewInputMediaAnimationInputMedia(v InputMediaAnimation) InputMedia

NewInputMediaAnimationInputMedia returns new InputMedia from InputMediaAnimation.

func NewInputMediaAudioInputMedia

func NewInputMediaAudioInputMedia(v InputMediaAudio) InputMedia

NewInputMediaAudioInputMedia returns new InputMedia from InputMediaAudio.

func NewInputMediaDocumentInputMedia

func NewInputMediaDocumentInputMedia(v InputMediaDocument) InputMedia

NewInputMediaDocumentInputMedia returns new InputMedia from InputMediaDocument.

func NewInputMediaPhotoInputMedia

func NewInputMediaPhotoInputMedia(v InputMediaPhoto) InputMedia

NewInputMediaPhotoInputMedia returns new InputMedia from InputMediaPhoto.

func NewInputMediaVideoInputMedia

func NewInputMediaVideoInputMedia(v InputMediaVideo) InputMedia

NewInputMediaVideoInputMedia returns new InputMedia from InputMediaVideo.

func (*InputMedia) Decode

func (s *InputMedia) Decode(d *jx.Decoder) error

Decode decodes InputMedia from json.

func (InputMedia) Encode

func (s InputMedia) Encode(e *jx.Encoder)

Encode encodes InputMedia as json.

func (InputMedia) GetInputMediaAnimation

func (s InputMedia) GetInputMediaAnimation() (v InputMediaAnimation, ok bool)

GetInputMediaAnimation returns InputMediaAnimation and true boolean if InputMedia is InputMediaAnimation.

func (InputMedia) GetInputMediaAudio

func (s InputMedia) GetInputMediaAudio() (v InputMediaAudio, ok bool)

GetInputMediaAudio returns InputMediaAudio and true boolean if InputMedia is InputMediaAudio.

func (InputMedia) GetInputMediaDocument

func (s InputMedia) GetInputMediaDocument() (v InputMediaDocument, ok bool)

GetInputMediaDocument returns InputMediaDocument and true boolean if InputMedia is InputMediaDocument.

func (InputMedia) GetInputMediaPhoto

func (s InputMedia) GetInputMediaPhoto() (v InputMediaPhoto, ok bool)

GetInputMediaPhoto returns InputMediaPhoto and true boolean if InputMedia is InputMediaPhoto.

func (InputMedia) GetInputMediaVideo

func (s InputMedia) GetInputMediaVideo() (v InputMediaVideo, ok bool)

GetInputMediaVideo returns InputMediaVideo and true boolean if InputMedia is InputMediaVideo.

func (InputMedia) IsInputMediaAnimation

func (s InputMedia) IsInputMediaAnimation() bool

IsInputMediaAnimation reports whether InputMedia is InputMediaAnimation.

func (InputMedia) IsInputMediaAudio

func (s InputMedia) IsInputMediaAudio() bool

IsInputMediaAudio reports whether InputMedia is InputMediaAudio.

func (InputMedia) IsInputMediaDocument

func (s InputMedia) IsInputMediaDocument() bool

IsInputMediaDocument reports whether InputMedia is InputMediaDocument.

func (InputMedia) IsInputMediaPhoto

func (s InputMedia) IsInputMediaPhoto() bool

IsInputMediaPhoto reports whether InputMedia is InputMediaPhoto.

func (InputMedia) IsInputMediaVideo

func (s InputMedia) IsInputMediaVideo() bool

IsInputMediaVideo reports whether InputMedia is InputMediaVideo.

func (InputMedia) MarshalJSON

func (s InputMedia) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InputMedia) SetInputMediaAnimation

func (s *InputMedia) SetInputMediaAnimation(v InputMediaAnimation)

SetInputMediaAnimation sets InputMedia to InputMediaAnimation.

func (*InputMedia) SetInputMediaAudio

func (s *InputMedia) SetInputMediaAudio(v InputMediaAudio)

SetInputMediaAudio sets InputMedia to InputMediaAudio.

func (*InputMedia) SetInputMediaDocument

func (s *InputMedia) SetInputMediaDocument(v InputMediaDocument)

SetInputMediaDocument sets InputMedia to InputMediaDocument.

func (*InputMedia) SetInputMediaPhoto

func (s *InputMedia) SetInputMediaPhoto(v InputMediaPhoto)

SetInputMediaPhoto sets InputMedia to InputMediaPhoto.

func (*InputMedia) SetInputMediaVideo

func (s *InputMedia) SetInputMediaVideo(v InputMediaVideo)

SetInputMediaVideo sets InputMedia to InputMediaVideo.

func (*InputMedia) UnmarshalJSON

func (s *InputMedia) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (InputMedia) Validate

func (s InputMedia) Validate() error

type InputMediaAnimation

type InputMediaAnimation struct {
	// File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended),
	// pass an HTTP URL for Telegram to get a file from the Internet, or pass
	// `attach://<file_attach_name>` to upload a new one using multipart/form-data under
	// <file_attach_name> name. [More information on Sending Files](https://core.telegram.
	// org/bots/api#sending-files).
	Media string `json:"media"`
	// _Optional_. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is
	// supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A
	// thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using
	// multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can
	// pass `attach://<file_attach_name>` if the thumbnail was uploaded using multipart/form-data under
	// <file_attach_name>. [More information on Sending Files](https://core.telegram.
	// org/bots/api#sending-files).
	Thumbnail OptString `json:"thumbnail"`
	// _Optional_. Caption of the animation to be sent, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// _Optional_. Mode for parsing entities in the animation caption. See [formatting
	// options](https://core.telegram.org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// _Optional_. List of special entities that appear in the caption, which can be specified instead of
	// _parse_mode_.
	CaptionEntities []MessageEntity `json:"caption_entities"`
	// _Optional_. Animation width.
	Width OptInt `json:"width"`
	// _Optional_. Animation height.
	Height OptInt `json:"height"`
	// _Optional_. Animation duration in seconds.
	Duration OptInt `json:"duration"`
	// _Optional_. Pass _True_ if the animation needs to be covered with a spoiler animation.
	HasSpoiler OptBool `json:"has_spoiler"`
}

Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent. Ref: #/components/schemas/InputMediaAnimation

func (*InputMediaAnimation) Decode

func (s *InputMediaAnimation) Decode(d *jx.Decoder) error

Decode decodes InputMediaAnimation from json.

func (*InputMediaAnimation) Encode

func (s *InputMediaAnimation) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InputMediaAnimation) GetCaption

func (s *InputMediaAnimation) GetCaption() OptString

GetCaption returns the value of Caption.

func (*InputMediaAnimation) GetCaptionEntities

func (s *InputMediaAnimation) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*InputMediaAnimation) GetDuration

func (s *InputMediaAnimation) GetDuration() OptInt

GetDuration returns the value of Duration.

func (*InputMediaAnimation) GetHasSpoiler

func (s *InputMediaAnimation) GetHasSpoiler() OptBool

GetHasSpoiler returns the value of HasSpoiler.

func (*InputMediaAnimation) GetHeight

func (s *InputMediaAnimation) GetHeight() OptInt

GetHeight returns the value of Height.

func (*InputMediaAnimation) GetMedia

func (s *InputMediaAnimation) GetMedia() string

GetMedia returns the value of Media.

func (*InputMediaAnimation) GetParseMode

func (s *InputMediaAnimation) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*InputMediaAnimation) GetThumbnail

func (s *InputMediaAnimation) GetThumbnail() OptString

GetThumbnail returns the value of Thumbnail.

func (*InputMediaAnimation) GetWidth

func (s *InputMediaAnimation) GetWidth() OptInt

GetWidth returns the value of Width.

func (*InputMediaAnimation) MarshalJSON

func (s *InputMediaAnimation) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InputMediaAnimation) SetCaption

func (s *InputMediaAnimation) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*InputMediaAnimation) SetCaptionEntities

func (s *InputMediaAnimation) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*InputMediaAnimation) SetDuration

func (s *InputMediaAnimation) SetDuration(val OptInt)

SetDuration sets the value of Duration.

func (*InputMediaAnimation) SetHasSpoiler

func (s *InputMediaAnimation) SetHasSpoiler(val OptBool)

SetHasSpoiler sets the value of HasSpoiler.

func (*InputMediaAnimation) SetHeight

func (s *InputMediaAnimation) SetHeight(val OptInt)

SetHeight sets the value of Height.

func (*InputMediaAnimation) SetMedia

func (s *InputMediaAnimation) SetMedia(val string)

SetMedia sets the value of Media.

func (*InputMediaAnimation) SetParseMode

func (s *InputMediaAnimation) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*InputMediaAnimation) SetThumbnail

func (s *InputMediaAnimation) SetThumbnail(val OptString)

SetThumbnail sets the value of Thumbnail.

func (*InputMediaAnimation) SetWidth

func (s *InputMediaAnimation) SetWidth(val OptInt)

SetWidth sets the value of Width.

func (*InputMediaAnimation) UnmarshalJSON

func (s *InputMediaAnimation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InputMediaAnimation) Validate

func (s *InputMediaAnimation) Validate() error

type InputMediaAudio

type InputMediaAudio struct {
	// File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended),
	// pass an HTTP URL for Telegram to get a file from the Internet, or pass
	// `attach://<file_attach_name>` to upload a new one using multipart/form-data under
	// <file_attach_name> name. [More information on Sending Files](https://core.telegram.
	// org/bots/api#sending-files).
	Media string `json:"media"`
	// _Optional_. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is
	// supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A
	// thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using
	// multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can
	// pass `attach://<file_attach_name>` if the thumbnail was uploaded using multipart/form-data under
	// <file_attach_name>. [More information on Sending Files](https://core.telegram.
	// org/bots/api#sending-files).
	Thumbnail OptString `json:"thumbnail"`
	// _Optional_. Caption of the audio to be sent, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// _Optional_. Mode for parsing entities in the audio caption. See [formatting options](https://core.
	// telegram.org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// _Optional_. List of special entities that appear in the caption, which can be specified instead of
	// _parse_mode_.
	CaptionEntities []MessageEntity `json:"caption_entities"`
	// _Optional_. Duration of the audio in seconds.
	Duration OptInt `json:"duration"`
	// _Optional_. Performer of the audio.
	Performer OptString `json:"performer"`
	// _Optional_. Title of the audio.
	Title OptString `json:"title"`
}

Represents an audio file to be treated as music to be sent. Ref: #/components/schemas/InputMediaAudio

func (*InputMediaAudio) Decode

func (s *InputMediaAudio) Decode(d *jx.Decoder) error

Decode decodes InputMediaAudio from json.

func (*InputMediaAudio) Encode

func (s *InputMediaAudio) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InputMediaAudio) GetCaption

func (s *InputMediaAudio) GetCaption() OptString

GetCaption returns the value of Caption.

func (*InputMediaAudio) GetCaptionEntities

func (s *InputMediaAudio) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*InputMediaAudio) GetDuration

func (s *InputMediaAudio) GetDuration() OptInt

GetDuration returns the value of Duration.

func (*InputMediaAudio) GetMedia

func (s *InputMediaAudio) GetMedia() string

GetMedia returns the value of Media.

func (*InputMediaAudio) GetParseMode

func (s *InputMediaAudio) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*InputMediaAudio) GetPerformer

func (s *InputMediaAudio) GetPerformer() OptString

GetPerformer returns the value of Performer.

func (*InputMediaAudio) GetThumbnail

func (s *InputMediaAudio) GetThumbnail() OptString

GetThumbnail returns the value of Thumbnail.

func (*InputMediaAudio) GetTitle

func (s *InputMediaAudio) GetTitle() OptString

GetTitle returns the value of Title.

func (*InputMediaAudio) MarshalJSON

func (s *InputMediaAudio) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InputMediaAudio) SetCaption

func (s *InputMediaAudio) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*InputMediaAudio) SetCaptionEntities

func (s *InputMediaAudio) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*InputMediaAudio) SetDuration

func (s *InputMediaAudio) SetDuration(val OptInt)

SetDuration sets the value of Duration.

func (*InputMediaAudio) SetMedia

func (s *InputMediaAudio) SetMedia(val string)

SetMedia sets the value of Media.

func (*InputMediaAudio) SetParseMode

func (s *InputMediaAudio) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*InputMediaAudio) SetPerformer

func (s *InputMediaAudio) SetPerformer(val OptString)

SetPerformer sets the value of Performer.

func (*InputMediaAudio) SetThumbnail

func (s *InputMediaAudio) SetThumbnail(val OptString)

SetThumbnail sets the value of Thumbnail.

func (*InputMediaAudio) SetTitle

func (s *InputMediaAudio) SetTitle(val OptString)

SetTitle sets the value of Title.

func (*InputMediaAudio) UnmarshalJSON

func (s *InputMediaAudio) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InputMediaAudio) Validate

func (s *InputMediaAudio) Validate() error

type InputMediaDocument

type InputMediaDocument struct {
	// File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended),
	// pass an HTTP URL for Telegram to get a file from the Internet, or pass
	// `attach://<file_attach_name>` to upload a new one using multipart/form-data under
	// <file_attach_name> name. [More information on Sending Files](https://core.telegram.
	// org/bots/api#sending-files).
	Media string `json:"media"`
	// _Optional_. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is
	// supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A
	// thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using
	// multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can
	// pass `attach://<file_attach_name>` if the thumbnail was uploaded using multipart/form-data under
	// <file_attach_name>. [More information on Sending Files](https://core.telegram.
	// org/bots/api#sending-files).
	Thumbnail OptString `json:"thumbnail"`
	// _Optional_. Caption of the document to be sent, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// _Optional_. Mode for parsing entities in the document caption. See [formatting
	// options](https://core.telegram.org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// _Optional_. List of special entities that appear in the caption, which can be specified instead of
	// _parse_mode_.
	CaptionEntities []MessageEntity `json:"caption_entities"`
	// _Optional_. Disables automatic server-side content type detection for files uploaded using
	// multipart/form-data. Always _True_, if the document is sent as part of an album.
	DisableContentTypeDetection OptBool `json:"disable_content_type_detection"`
}

Represents a general file to be sent. Ref: #/components/schemas/InputMediaDocument

func (*InputMediaDocument) Decode

func (s *InputMediaDocument) Decode(d *jx.Decoder) error

Decode decodes InputMediaDocument from json.

func (*InputMediaDocument) Encode

func (s *InputMediaDocument) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InputMediaDocument) GetCaption

func (s *InputMediaDocument) GetCaption() OptString

GetCaption returns the value of Caption.

func (*InputMediaDocument) GetCaptionEntities

func (s *InputMediaDocument) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*InputMediaDocument) GetDisableContentTypeDetection

func (s *InputMediaDocument) GetDisableContentTypeDetection() OptBool

GetDisableContentTypeDetection returns the value of DisableContentTypeDetection.

func (*InputMediaDocument) GetMedia

func (s *InputMediaDocument) GetMedia() string

GetMedia returns the value of Media.

func (*InputMediaDocument) GetParseMode

func (s *InputMediaDocument) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*InputMediaDocument) GetThumbnail

func (s *InputMediaDocument) GetThumbnail() OptString

GetThumbnail returns the value of Thumbnail.

func (*InputMediaDocument) MarshalJSON

func (s *InputMediaDocument) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InputMediaDocument) SetCaption

func (s *InputMediaDocument) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*InputMediaDocument) SetCaptionEntities

func (s *InputMediaDocument) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*InputMediaDocument) SetDisableContentTypeDetection

func (s *InputMediaDocument) SetDisableContentTypeDetection(val OptBool)

SetDisableContentTypeDetection sets the value of DisableContentTypeDetection.

func (*InputMediaDocument) SetMedia

func (s *InputMediaDocument) SetMedia(val string)

SetMedia sets the value of Media.

func (*InputMediaDocument) SetParseMode

func (s *InputMediaDocument) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*InputMediaDocument) SetThumbnail

func (s *InputMediaDocument) SetThumbnail(val OptString)

SetThumbnail sets the value of Thumbnail.

func (*InputMediaDocument) UnmarshalJSON

func (s *InputMediaDocument) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InputMediaDocument) Validate

func (s *InputMediaDocument) Validate() error

type InputMediaPhoto

type InputMediaPhoto struct {
	// File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended),
	// pass an HTTP URL for Telegram to get a file from the Internet, or pass
	// `attach://<file_attach_name>` to upload a new one using multipart/form-data under
	// <file_attach_name> name. [More information on Sending Files](https://core.telegram.
	// org/bots/api#sending-files).
	Media string `json:"media"`
	// _Optional_. Caption of the photo to be sent, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// _Optional_. Mode for parsing entities in the photo caption. See [formatting options](https://core.
	// telegram.org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// _Optional_. List of special entities that appear in the caption, which can be specified instead of
	// _parse_mode_.
	CaptionEntities []MessageEntity `json:"caption_entities"`
	// _Optional_. Pass _True_ if the photo needs to be covered with a spoiler animation.
	HasSpoiler OptBool `json:"has_spoiler"`
}

Represents a photo to be sent. Ref: #/components/schemas/InputMediaPhoto

func (*InputMediaPhoto) Decode

func (s *InputMediaPhoto) Decode(d *jx.Decoder) error

Decode decodes InputMediaPhoto from json.

func (*InputMediaPhoto) Encode

func (s *InputMediaPhoto) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InputMediaPhoto) GetCaption

func (s *InputMediaPhoto) GetCaption() OptString

GetCaption returns the value of Caption.

func (*InputMediaPhoto) GetCaptionEntities

func (s *InputMediaPhoto) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*InputMediaPhoto) GetHasSpoiler

func (s *InputMediaPhoto) GetHasSpoiler() OptBool

GetHasSpoiler returns the value of HasSpoiler.

func (*InputMediaPhoto) GetMedia

func (s *InputMediaPhoto) GetMedia() string

GetMedia returns the value of Media.

func (*InputMediaPhoto) GetParseMode

func (s *InputMediaPhoto) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*InputMediaPhoto) MarshalJSON

func (s *InputMediaPhoto) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InputMediaPhoto) SetCaption

func (s *InputMediaPhoto) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*InputMediaPhoto) SetCaptionEntities

func (s *InputMediaPhoto) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*InputMediaPhoto) SetHasSpoiler

func (s *InputMediaPhoto) SetHasSpoiler(val OptBool)

SetHasSpoiler sets the value of HasSpoiler.

func (*InputMediaPhoto) SetMedia

func (s *InputMediaPhoto) SetMedia(val string)

SetMedia sets the value of Media.

func (*InputMediaPhoto) SetParseMode

func (s *InputMediaPhoto) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*InputMediaPhoto) UnmarshalJSON

func (s *InputMediaPhoto) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InputMediaPhoto) Validate

func (s *InputMediaPhoto) Validate() error

type InputMediaType

type InputMediaType string

InputMediaType is oneOf type of InputMedia.

const (
	InputMediaAnimationInputMedia InputMediaType = "InputMediaAnimation"
	InputMediaDocumentInputMedia  InputMediaType = "InputMediaDocument"
	InputMediaAudioInputMedia     InputMediaType = "InputMediaAudio"
	InputMediaPhotoInputMedia     InputMediaType = "InputMediaPhoto"
	InputMediaVideoInputMedia     InputMediaType = "InputMediaVideo"
)

Possible values for InputMediaType.

type InputMediaVideo

type InputMediaVideo struct {
	// File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended),
	// pass an HTTP URL for Telegram to get a file from the Internet, or pass
	// `attach://<file_attach_name>` to upload a new one using multipart/form-data under
	// <file_attach_name> name. [More information on Sending Files](https://core.telegram.
	// org/bots/api#sending-files).
	Media string `json:"media"`
	// _Optional_. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is
	// supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A
	// thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using
	// multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can
	// pass `attach://<file_attach_name>` if the thumbnail was uploaded using multipart/form-data under
	// <file_attach_name>. [More information on Sending Files](https://core.telegram.
	// org/bots/api#sending-files).
	Thumbnail OptString `json:"thumbnail"`
	// _Optional_. Caption of the video to be sent, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// _Optional_. Mode for parsing entities in the video caption. See [formatting options](https://core.
	// telegram.org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// _Optional_. List of special entities that appear in the caption, which can be specified instead of
	// _parse_mode_.
	CaptionEntities []MessageEntity `json:"caption_entities"`
	// _Optional_. Video width.
	Width OptInt `json:"width"`
	// _Optional_. Video height.
	Height OptInt `json:"height"`
	// _Optional_. Video duration in seconds.
	Duration OptInt `json:"duration"`
	// _Optional_. Pass _True_ if the uploaded video is suitable for streaming.
	SupportsStreaming OptBool `json:"supports_streaming"`
	// _Optional_. Pass _True_ if the video needs to be covered with a spoiler animation.
	HasSpoiler OptBool `json:"has_spoiler"`
}

Represents a video to be sent. Ref: #/components/schemas/InputMediaVideo

func (*InputMediaVideo) Decode

func (s *InputMediaVideo) Decode(d *jx.Decoder) error

Decode decodes InputMediaVideo from json.

func (*InputMediaVideo) Encode

func (s *InputMediaVideo) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InputMediaVideo) GetCaption

func (s *InputMediaVideo) GetCaption() OptString

GetCaption returns the value of Caption.

func (*InputMediaVideo) GetCaptionEntities

func (s *InputMediaVideo) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*InputMediaVideo) GetDuration

func (s *InputMediaVideo) GetDuration() OptInt

GetDuration returns the value of Duration.

func (*InputMediaVideo) GetHasSpoiler

func (s *InputMediaVideo) GetHasSpoiler() OptBool

GetHasSpoiler returns the value of HasSpoiler.

func (*InputMediaVideo) GetHeight

func (s *InputMediaVideo) GetHeight() OptInt

GetHeight returns the value of Height.

func (*InputMediaVideo) GetMedia

func (s *InputMediaVideo) GetMedia() string

GetMedia returns the value of Media.

func (*InputMediaVideo) GetParseMode

func (s *InputMediaVideo) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*InputMediaVideo) GetSupportsStreaming

func (s *InputMediaVideo) GetSupportsStreaming() OptBool

GetSupportsStreaming returns the value of SupportsStreaming.

func (*InputMediaVideo) GetThumbnail

func (s *InputMediaVideo) GetThumbnail() OptString

GetThumbnail returns the value of Thumbnail.

func (*InputMediaVideo) GetWidth

func (s *InputMediaVideo) GetWidth() OptInt

GetWidth returns the value of Width.

func (*InputMediaVideo) MarshalJSON

func (s *InputMediaVideo) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InputMediaVideo) SetCaption

func (s *InputMediaVideo) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*InputMediaVideo) SetCaptionEntities

func (s *InputMediaVideo) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*InputMediaVideo) SetDuration

func (s *InputMediaVideo) SetDuration(val OptInt)

SetDuration sets the value of Duration.

func (*InputMediaVideo) SetHasSpoiler

func (s *InputMediaVideo) SetHasSpoiler(val OptBool)

SetHasSpoiler sets the value of HasSpoiler.

func (*InputMediaVideo) SetHeight

func (s *InputMediaVideo) SetHeight(val OptInt)

SetHeight sets the value of Height.

func (*InputMediaVideo) SetMedia

func (s *InputMediaVideo) SetMedia(val string)

SetMedia sets the value of Media.

func (*InputMediaVideo) SetParseMode

func (s *InputMediaVideo) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*InputMediaVideo) SetSupportsStreaming

func (s *InputMediaVideo) SetSupportsStreaming(val OptBool)

SetSupportsStreaming sets the value of SupportsStreaming.

func (*InputMediaVideo) SetThumbnail

func (s *InputMediaVideo) SetThumbnail(val OptString)

SetThumbnail sets the value of Thumbnail.

func (*InputMediaVideo) SetWidth

func (s *InputMediaVideo) SetWidth(val OptInt)

SetWidth sets the value of Width.

func (*InputMediaVideo) UnmarshalJSON

func (s *InputMediaVideo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InputMediaVideo) Validate

func (s *InputMediaVideo) Validate() error

type InputMessageContent

type InputMessageContent struct {
	Type                        InputMessageContentType // switch on this field
	InputTextMessageContent     InputTextMessageContent
	InputLocationMessageContent InputLocationMessageContent
	InputVenueMessageContent    InputVenueMessageContent
	InputContactMessageContent  InputContactMessageContent
	InputInvoiceMessageContent  InputInvoiceMessageContent
}

This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:. Ref: #/components/schemas/InputMessageContent InputMessageContent represents sum type.

func NewInputContactMessageContentInputMessageContent

func NewInputContactMessageContentInputMessageContent(v InputContactMessageContent) InputMessageContent

NewInputContactMessageContentInputMessageContent returns new InputMessageContent from InputContactMessageContent.

func NewInputInvoiceMessageContentInputMessageContent

func NewInputInvoiceMessageContentInputMessageContent(v InputInvoiceMessageContent) InputMessageContent

NewInputInvoiceMessageContentInputMessageContent returns new InputMessageContent from InputInvoiceMessageContent.

func NewInputLocationMessageContentInputMessageContent

func NewInputLocationMessageContentInputMessageContent(v InputLocationMessageContent) InputMessageContent

NewInputLocationMessageContentInputMessageContent returns new InputMessageContent from InputLocationMessageContent.

func NewInputTextMessageContentInputMessageContent

func NewInputTextMessageContentInputMessageContent(v InputTextMessageContent) InputMessageContent

NewInputTextMessageContentInputMessageContent returns new InputMessageContent from InputTextMessageContent.

func NewInputVenueMessageContentInputMessageContent

func NewInputVenueMessageContentInputMessageContent(v InputVenueMessageContent) InputMessageContent

NewInputVenueMessageContentInputMessageContent returns new InputMessageContent from InputVenueMessageContent.

func (*InputMessageContent) Decode

func (s *InputMessageContent) Decode(d *jx.Decoder) error

Decode decodes InputMessageContent from json.

func (InputMessageContent) Encode

func (s InputMessageContent) Encode(e *jx.Encoder)

Encode encodes InputMessageContent as json.

func (InputMessageContent) GetInputContactMessageContent

func (s InputMessageContent) GetInputContactMessageContent() (v InputContactMessageContent, ok bool)

GetInputContactMessageContent returns InputContactMessageContent and true boolean if InputMessageContent is InputContactMessageContent.

func (InputMessageContent) GetInputInvoiceMessageContent

func (s InputMessageContent) GetInputInvoiceMessageContent() (v InputInvoiceMessageContent, ok bool)

GetInputInvoiceMessageContent returns InputInvoiceMessageContent and true boolean if InputMessageContent is InputInvoiceMessageContent.

func (InputMessageContent) GetInputLocationMessageContent

func (s InputMessageContent) GetInputLocationMessageContent() (v InputLocationMessageContent, ok bool)

GetInputLocationMessageContent returns InputLocationMessageContent and true boolean if InputMessageContent is InputLocationMessageContent.

func (InputMessageContent) GetInputTextMessageContent

func (s InputMessageContent) GetInputTextMessageContent() (v InputTextMessageContent, ok bool)

GetInputTextMessageContent returns InputTextMessageContent and true boolean if InputMessageContent is InputTextMessageContent.

func (InputMessageContent) GetInputVenueMessageContent

func (s InputMessageContent) GetInputVenueMessageContent() (v InputVenueMessageContent, ok bool)

GetInputVenueMessageContent returns InputVenueMessageContent and true boolean if InputMessageContent is InputVenueMessageContent.

func (InputMessageContent) IsInputContactMessageContent

func (s InputMessageContent) IsInputContactMessageContent() bool

IsInputContactMessageContent reports whether InputMessageContent is InputContactMessageContent.

func (InputMessageContent) IsInputInvoiceMessageContent

func (s InputMessageContent) IsInputInvoiceMessageContent() bool

IsInputInvoiceMessageContent reports whether InputMessageContent is InputInvoiceMessageContent.

func (InputMessageContent) IsInputLocationMessageContent

func (s InputMessageContent) IsInputLocationMessageContent() bool

IsInputLocationMessageContent reports whether InputMessageContent is InputLocationMessageContent.

func (InputMessageContent) IsInputTextMessageContent

func (s InputMessageContent) IsInputTextMessageContent() bool

IsInputTextMessageContent reports whether InputMessageContent is InputTextMessageContent.

func (InputMessageContent) IsInputVenueMessageContent

func (s InputMessageContent) IsInputVenueMessageContent() bool

IsInputVenueMessageContent reports whether InputMessageContent is InputVenueMessageContent.

func (InputMessageContent) MarshalJSON

func (s InputMessageContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InputMessageContent) SetInputContactMessageContent

func (s *InputMessageContent) SetInputContactMessageContent(v InputContactMessageContent)

SetInputContactMessageContent sets InputMessageContent to InputContactMessageContent.

func (*InputMessageContent) SetInputInvoiceMessageContent

func (s *InputMessageContent) SetInputInvoiceMessageContent(v InputInvoiceMessageContent)

SetInputInvoiceMessageContent sets InputMessageContent to InputInvoiceMessageContent.

func (*InputMessageContent) SetInputLocationMessageContent

func (s *InputMessageContent) SetInputLocationMessageContent(v InputLocationMessageContent)

SetInputLocationMessageContent sets InputMessageContent to InputLocationMessageContent.

func (*InputMessageContent) SetInputTextMessageContent

func (s *InputMessageContent) SetInputTextMessageContent(v InputTextMessageContent)

SetInputTextMessageContent sets InputMessageContent to InputTextMessageContent.

func (*InputMessageContent) SetInputVenueMessageContent

func (s *InputMessageContent) SetInputVenueMessageContent(v InputVenueMessageContent)

SetInputVenueMessageContent sets InputMessageContent to InputVenueMessageContent.

func (*InputMessageContent) UnmarshalJSON

func (s *InputMessageContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (InputMessageContent) Validate

func (s InputMessageContent) Validate() error

type InputMessageContentType

type InputMessageContentType string

InputMessageContentType is oneOf type of InputMessageContent.

const (
	InputTextMessageContentInputMessageContent     InputMessageContentType = "InputTextMessageContent"
	InputLocationMessageContentInputMessageContent InputMessageContentType = "InputLocationMessageContent"
	InputVenueMessageContentInputMessageContent    InputMessageContentType = "InputVenueMessageContent"
	InputContactMessageContentInputMessageContent  InputMessageContentType = "InputContactMessageContent"
	InputInvoiceMessageContentInputMessageContent  InputMessageContentType = "InputInvoiceMessageContent"
)

Possible values for InputMessageContentType.

type InputSticker

type InputSticker struct {
	// The added sticker. Pass a _file_id_ as a String to send a file that already exists on the Telegram
	// servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, upload a new
	// one using multipart/form-data, or pass `attach://<file_attach_name>` to upload a new one using
	// multipart/form-data under <file_attach_name> name. Animated and video stickers can't be uploaded
	// via HTTP URL. [More information on Sending Files](https://core.telegram.org/bots/api#sending-files).
	Sticker string `json:"sticker"`
	// List of 1-20 emoji associated with the sticker.
	EmojiList    []string        `json:"emoji_list"`
	MaskPosition OptMaskPosition `json:"mask_position"`
	// _Optional_. List of 0-20 search keywords for the sticker with total length of up to 64 characters.
	// For `regular` and `custom_emoji` stickers only.
	Keywords []string `json:"keywords"`
}

This object describes a sticker to be added to a sticker set. Ref: #/components/schemas/InputSticker

func (*InputSticker) Decode

func (s *InputSticker) Decode(d *jx.Decoder) error

Decode decodes InputSticker from json.

func (*InputSticker) Encode

func (s *InputSticker) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InputSticker) GetEmojiList

func (s *InputSticker) GetEmojiList() []string

GetEmojiList returns the value of EmojiList.

func (*InputSticker) GetKeywords

func (s *InputSticker) GetKeywords() []string

GetKeywords returns the value of Keywords.

func (*InputSticker) GetMaskPosition

func (s *InputSticker) GetMaskPosition() OptMaskPosition

GetMaskPosition returns the value of MaskPosition.

func (*InputSticker) GetSticker

func (s *InputSticker) GetSticker() string

GetSticker returns the value of Sticker.

func (*InputSticker) MarshalJSON

func (s *InputSticker) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InputSticker) SetEmojiList

func (s *InputSticker) SetEmojiList(val []string)

SetEmojiList sets the value of EmojiList.

func (*InputSticker) SetKeywords

func (s *InputSticker) SetKeywords(val []string)

SetKeywords sets the value of Keywords.

func (*InputSticker) SetMaskPosition

func (s *InputSticker) SetMaskPosition(val OptMaskPosition)

SetMaskPosition sets the value of MaskPosition.

func (*InputSticker) SetSticker

func (s *InputSticker) SetSticker(val string)

SetSticker sets the value of Sticker.

func (*InputSticker) UnmarshalJSON

func (s *InputSticker) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InputSticker) Validate

func (s *InputSticker) Validate() error

type InputTextMessageContent

type InputTextMessageContent struct {
	// Text of the message to be sent, 1-4096 characters.
	MessageText string `json:"message_text"`
	// _Optional_. Mode for parsing entities in the message text. See [formatting options](https://core.
	// telegram.org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// _Optional_. List of special entities that appear in message text, which can be specified instead
	// of _parse_mode_.
	Entities []MessageEntity `json:"entities"`
	// _Optional_. Disables link previews for links in the sent message.
	DisableWebPagePreview OptBool `json:"disable_web_page_preview"`
}

Represents the [content](https://core.telegram.org/bots/api#inputmessagecontent) of a text message to be sent as the result of an inline query. Ref: #/components/schemas/InputTextMessageContent

func (*InputTextMessageContent) Decode

func (s *InputTextMessageContent) Decode(d *jx.Decoder) error

Decode decodes InputTextMessageContent from json.

func (*InputTextMessageContent) Encode

func (s *InputTextMessageContent) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InputTextMessageContent) GetDisableWebPagePreview

func (s *InputTextMessageContent) GetDisableWebPagePreview() OptBool

GetDisableWebPagePreview returns the value of DisableWebPagePreview.

func (*InputTextMessageContent) GetEntities

func (s *InputTextMessageContent) GetEntities() []MessageEntity

GetEntities returns the value of Entities.

func (*InputTextMessageContent) GetMessageText

func (s *InputTextMessageContent) GetMessageText() string

GetMessageText returns the value of MessageText.

func (*InputTextMessageContent) GetParseMode

func (s *InputTextMessageContent) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*InputTextMessageContent) MarshalJSON

func (s *InputTextMessageContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InputTextMessageContent) SetDisableWebPagePreview

func (s *InputTextMessageContent) SetDisableWebPagePreview(val OptBool)

SetDisableWebPagePreview sets the value of DisableWebPagePreview.

func (*InputTextMessageContent) SetEntities

func (s *InputTextMessageContent) SetEntities(val []MessageEntity)

SetEntities sets the value of Entities.

func (*InputTextMessageContent) SetMessageText

func (s *InputTextMessageContent) SetMessageText(val string)

SetMessageText sets the value of MessageText.

func (*InputTextMessageContent) SetParseMode

func (s *InputTextMessageContent) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*InputTextMessageContent) UnmarshalJSON

func (s *InputTextMessageContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InputTextMessageContent) Validate

func (s *InputTextMessageContent) Validate() error

type InputVenueMessageContent

type InputVenueMessageContent struct {
	// Latitude of the venue in degrees.
	Latitude float64 `json:"latitude"`
	// Longitude of the venue in degrees.
	Longitude float64 `json:"longitude"`
	// Name of the venue.
	Title string `json:"title"`
	// Address of the venue.
	Address string `json:"address"`
	// _Optional_. Foursquare identifier of the venue, if known.
	FoursquareID OptString `json:"foursquare_id"`
	// _Optional_. Foursquare type of the venue, if known. (For example, `arts_entertainment/default`,
	// `arts_entertainment/aquarium` or `food/icecream`.).
	FoursquareType OptString `json:"foursquare_type"`
	// _Optional_. Google Places identifier of the venue.
	GooglePlaceID OptString `json:"google_place_id"`
	// _Optional_. Google Places type of the venue. (See [supported types](https://developers.google.
	// com/places/web-service/supported_types).).
	GooglePlaceType OptString `json:"google_place_type"`
}

Represents the [content](https://core.telegram.org/bots/api#inputmessagecontent) of a venue message to be sent as the result of an inline query. Ref: #/components/schemas/InputVenueMessageContent

func (*InputVenueMessageContent) Decode

func (s *InputVenueMessageContent) Decode(d *jx.Decoder) error

Decode decodes InputVenueMessageContent from json.

func (*InputVenueMessageContent) Encode

func (s *InputVenueMessageContent) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*InputVenueMessageContent) GetAddress

func (s *InputVenueMessageContent) GetAddress() string

GetAddress returns the value of Address.

func (*InputVenueMessageContent) GetFoursquareID

func (s *InputVenueMessageContent) GetFoursquareID() OptString

GetFoursquareID returns the value of FoursquareID.

func (*InputVenueMessageContent) GetFoursquareType

func (s *InputVenueMessageContent) GetFoursquareType() OptString

GetFoursquareType returns the value of FoursquareType.

func (*InputVenueMessageContent) GetGooglePlaceID

func (s *InputVenueMessageContent) GetGooglePlaceID() OptString

GetGooglePlaceID returns the value of GooglePlaceID.

func (*InputVenueMessageContent) GetGooglePlaceType

func (s *InputVenueMessageContent) GetGooglePlaceType() OptString

GetGooglePlaceType returns the value of GooglePlaceType.

func (*InputVenueMessageContent) GetLatitude

func (s *InputVenueMessageContent) GetLatitude() float64

GetLatitude returns the value of Latitude.

func (*InputVenueMessageContent) GetLongitude

func (s *InputVenueMessageContent) GetLongitude() float64

GetLongitude returns the value of Longitude.

func (*InputVenueMessageContent) GetTitle

func (s *InputVenueMessageContent) GetTitle() string

GetTitle returns the value of Title.

func (*InputVenueMessageContent) MarshalJSON

func (s *InputVenueMessageContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*InputVenueMessageContent) SetAddress

func (s *InputVenueMessageContent) SetAddress(val string)

SetAddress sets the value of Address.

func (*InputVenueMessageContent) SetFoursquareID

func (s *InputVenueMessageContent) SetFoursquareID(val OptString)

SetFoursquareID sets the value of FoursquareID.

func (*InputVenueMessageContent) SetFoursquareType

func (s *InputVenueMessageContent) SetFoursquareType(val OptString)

SetFoursquareType sets the value of FoursquareType.

func (*InputVenueMessageContent) SetGooglePlaceID

func (s *InputVenueMessageContent) SetGooglePlaceID(val OptString)

SetGooglePlaceID sets the value of GooglePlaceID.

func (*InputVenueMessageContent) SetGooglePlaceType

func (s *InputVenueMessageContent) SetGooglePlaceType(val OptString)

SetGooglePlaceType sets the value of GooglePlaceType.

func (*InputVenueMessageContent) SetLatitude

func (s *InputVenueMessageContent) SetLatitude(val float64)

SetLatitude sets the value of Latitude.

func (*InputVenueMessageContent) SetLongitude

func (s *InputVenueMessageContent) SetLongitude(val float64)

SetLongitude sets the value of Longitude.

func (*InputVenueMessageContent) SetTitle

func (s *InputVenueMessageContent) SetTitle(val string)

SetTitle sets the value of Title.

func (*InputVenueMessageContent) UnmarshalJSON

func (s *InputVenueMessageContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*InputVenueMessageContent) Validate

func (s *InputVenueMessageContent) Validate() error

type Invoice

type Invoice struct {
	// Product name.
	Title string `json:"title"`
	// Product description.
	Description string `json:"description"`
	// Unique bot deep-linking parameter that can be used to generate this invoice.
	StartParameter string `json:"start_parameter"`
	// Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code.
	Currency string `json:"currency"`
	// Total price in the _smallest units_ of the currency (integer, **not** float/double). For example,
	// for a price of `US$ 1.45` pass `amount = 145`. See the _exp_ parameter in [currencies.
	// json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past
	// the decimal point for each currency (2 for the majority of currencies).
	TotalAmount int `json:"total_amount"`
}

This object contains basic information about an invoice. Ref: #/components/schemas/Invoice

func (*Invoice) Decode

func (s *Invoice) Decode(d *jx.Decoder) error

Decode decodes Invoice from json.

func (*Invoice) Encode

func (s *Invoice) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Invoice) GetCurrency

func (s *Invoice) GetCurrency() string

GetCurrency returns the value of Currency.

func (*Invoice) GetDescription

func (s *Invoice) GetDescription() string

GetDescription returns the value of Description.

func (*Invoice) GetStartParameter

func (s *Invoice) GetStartParameter() string

GetStartParameter returns the value of StartParameter.

func (*Invoice) GetTitle

func (s *Invoice) GetTitle() string

GetTitle returns the value of Title.

func (*Invoice) GetTotalAmount

func (s *Invoice) GetTotalAmount() int

GetTotalAmount returns the value of TotalAmount.

func (*Invoice) MarshalJSON

func (s *Invoice) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Invoice) SetCurrency

func (s *Invoice) SetCurrency(val string)

SetCurrency sets the value of Currency.

func (*Invoice) SetDescription

func (s *Invoice) SetDescription(val string)

SetDescription sets the value of Description.

func (*Invoice) SetStartParameter

func (s *Invoice) SetStartParameter(val string)

SetStartParameter sets the value of StartParameter.

func (*Invoice) SetTitle

func (s *Invoice) SetTitle(val string)

SetTitle sets the value of Title.

func (*Invoice) SetTotalAmount

func (s *Invoice) SetTotalAmount(val int)

SetTotalAmount sets the value of TotalAmount.

func (*Invoice) UnmarshalJSON

func (s *Invoice) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type KeyboardButton

type KeyboardButton struct {
	Type                 KeyboardButtonType // switch on this field
	String               string
	KeyboardButtonObject KeyboardButtonObject
}

Ref: #/components/schemas/KeyboardButton KeyboardButton represents sum type.

func NewKeyboardButtonObjectKeyboardButton

func NewKeyboardButtonObjectKeyboardButton(v KeyboardButtonObject) KeyboardButton

NewKeyboardButtonObjectKeyboardButton returns new KeyboardButton from KeyboardButtonObject.

func NewStringKeyboardButton

func NewStringKeyboardButton(v string) KeyboardButton

NewStringKeyboardButton returns new KeyboardButton from string.

func (*KeyboardButton) Decode

func (s *KeyboardButton) Decode(d *jx.Decoder) error

Decode decodes KeyboardButton from json.

func (KeyboardButton) Encode

func (s KeyboardButton) Encode(e *jx.Encoder)

Encode encodes KeyboardButton as json.

func (KeyboardButton) GetKeyboardButtonObject

func (s KeyboardButton) GetKeyboardButtonObject() (v KeyboardButtonObject, ok bool)

GetKeyboardButtonObject returns KeyboardButtonObject and true boolean if KeyboardButton is KeyboardButtonObject.

func (KeyboardButton) GetString

func (s KeyboardButton) GetString() (v string, ok bool)

GetString returns string and true boolean if KeyboardButton is string.

func (KeyboardButton) IsKeyboardButtonObject

func (s KeyboardButton) IsKeyboardButtonObject() bool

IsKeyboardButtonObject reports whether KeyboardButton is KeyboardButtonObject.

func (KeyboardButton) IsString

func (s KeyboardButton) IsString() bool

IsString reports whether KeyboardButton is string.

func (KeyboardButton) MarshalJSON

func (s KeyboardButton) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*KeyboardButton) SetKeyboardButtonObject

func (s *KeyboardButton) SetKeyboardButtonObject(v KeyboardButtonObject)

SetKeyboardButtonObject sets KeyboardButton to KeyboardButtonObject.

func (*KeyboardButton) SetString

func (s *KeyboardButton) SetString(v string)

SetString sets KeyboardButton to string.

func (*KeyboardButton) UnmarshalJSON

func (s *KeyboardButton) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type KeyboardButtonObject

type KeyboardButtonObject struct {
	// Text of the button. If none of the optional fields are used, it will be sent as a message when the
	// button is pressed.
	Text        string                       `json:"text"`
	RequestUser OptKeyboardButtonRequestUser `json:"request_user"`
	RequestChat OptKeyboardButtonRequestChat `json:"request_chat"`
	// _Optional_. If _True_, the user's phone number will be sent as a contact when the button is
	// pressed. Available in private chats only.
	RequestContact OptBool `json:"request_contact"`
	// _Optional_. If _True_, the user's current location will be sent when the button is pressed.
	// Available in private chats only.
	RequestLocation OptBool                   `json:"request_location"`
	RequestPoll     OptKeyboardButtonPollType `json:"request_poll"`
	WebApp          OptWebAppInfo             `json:"web_app"`
}

This object represents one button of the reply keyboard. For simple text buttons, _String_ can be used instead of this object to specify the button text. The optional fields _web_app_, _request_user_, _request_chat_, _request_contact_, _request_location_, and _request_poll_ are mutually exclusive. Ref: #/components/schemas/KeyboardButtonObject

func (*KeyboardButtonObject) Decode

func (s *KeyboardButtonObject) Decode(d *jx.Decoder) error

Decode decodes KeyboardButtonObject from json.

func (*KeyboardButtonObject) Encode

func (s *KeyboardButtonObject) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*KeyboardButtonObject) GetRequestChat

GetRequestChat returns the value of RequestChat.

func (*KeyboardButtonObject) GetRequestContact

func (s *KeyboardButtonObject) GetRequestContact() OptBool

GetRequestContact returns the value of RequestContact.

func (*KeyboardButtonObject) GetRequestLocation

func (s *KeyboardButtonObject) GetRequestLocation() OptBool

GetRequestLocation returns the value of RequestLocation.

func (*KeyboardButtonObject) GetRequestPoll

func (s *KeyboardButtonObject) GetRequestPoll() OptKeyboardButtonPollType

GetRequestPoll returns the value of RequestPoll.

func (*KeyboardButtonObject) GetRequestUser

GetRequestUser returns the value of RequestUser.

func (*KeyboardButtonObject) GetText

func (s *KeyboardButtonObject) GetText() string

GetText returns the value of Text.

func (*KeyboardButtonObject) GetWebApp

func (s *KeyboardButtonObject) GetWebApp() OptWebAppInfo

GetWebApp returns the value of WebApp.

func (*KeyboardButtonObject) MarshalJSON

func (s *KeyboardButtonObject) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*KeyboardButtonObject) SetRequestChat

func (s *KeyboardButtonObject) SetRequestChat(val OptKeyboardButtonRequestChat)

SetRequestChat sets the value of RequestChat.

func (*KeyboardButtonObject) SetRequestContact

func (s *KeyboardButtonObject) SetRequestContact(val OptBool)

SetRequestContact sets the value of RequestContact.

func (*KeyboardButtonObject) SetRequestLocation

func (s *KeyboardButtonObject) SetRequestLocation(val OptBool)

SetRequestLocation sets the value of RequestLocation.

func (*KeyboardButtonObject) SetRequestPoll

func (s *KeyboardButtonObject) SetRequestPoll(val OptKeyboardButtonPollType)

SetRequestPoll sets the value of RequestPoll.

func (*KeyboardButtonObject) SetRequestUser

func (s *KeyboardButtonObject) SetRequestUser(val OptKeyboardButtonRequestUser)

SetRequestUser sets the value of RequestUser.

func (*KeyboardButtonObject) SetText

func (s *KeyboardButtonObject) SetText(val string)

SetText sets the value of Text.

func (*KeyboardButtonObject) SetWebApp

func (s *KeyboardButtonObject) SetWebApp(val OptWebAppInfo)

SetWebApp sets the value of WebApp.

func (*KeyboardButtonObject) UnmarshalJSON

func (s *KeyboardButtonObject) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type KeyboardButtonPollType

type KeyboardButtonPollType struct {
	// _Optional_. If _quiz_ is passed, the user will be allowed to create only polls in the quiz mode.
	// If _regular_ is passed, only regular polls will be allowed. Otherwise, the user will be allowed to
	// create a poll of any type.
	Type OptString `json:"type"`
}

This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed. Ref: #/components/schemas/KeyboardButtonPollType

func (*KeyboardButtonPollType) Decode

func (s *KeyboardButtonPollType) Decode(d *jx.Decoder) error

Decode decodes KeyboardButtonPollType from json.

func (*KeyboardButtonPollType) Encode

func (s *KeyboardButtonPollType) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*KeyboardButtonPollType) GetType

func (s *KeyboardButtonPollType) GetType() OptString

GetType returns the value of Type.

func (*KeyboardButtonPollType) MarshalJSON

func (s *KeyboardButtonPollType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*KeyboardButtonPollType) SetType

func (s *KeyboardButtonPollType) SetType(val OptString)

SetType sets the value of Type.

func (*KeyboardButtonPollType) UnmarshalJSON

func (s *KeyboardButtonPollType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type KeyboardButtonRequestChat

type KeyboardButtonRequestChat struct {
	// Signed 32-bit identifier of the request, which will be received back in the
	// [ChatShared](https://core.telegram.org/bots/api#chatshared) object. Must be unique within the
	// message.
	RequestID int `json:"request_id"`
	// Pass _True_ to request a channel chat, pass _False_ to request a group or a supergroup chat.
	ChatIsChannel bool `json:"chat_is_channel"`
	// _Optional_. Pass _True_ to request a forum supergroup, pass _False_ to request a non-forum chat.
	// If not specified, no additional restrictions are applied.
	ChatIsForum OptBool `json:"chat_is_forum"`
	// _Optional_. Pass _True_ to request a supergroup or a channel with a username, pass _False_ to
	// request a chat without a username. If not specified, no additional restrictions are applied.
	ChatHasUsername OptBool `json:"chat_has_username"`
	// _Optional_. Pass _True_ to request a chat owned by the user. Otherwise, no additional restrictions
	// are applied.
	ChatIsCreated           OptBool                    `json:"chat_is_created"`
	UserAdministratorRights OptChatAdministratorRights `json:"user_administrator_rights"`
	BotAdministratorRights  OptChatAdministratorRights `json:"bot_administrator_rights"`
	// _Optional_. Pass _True_ to request a chat with the bot as a member. Otherwise, no additional
	// restrictions are applied.
	BotIsMember OptBool `json:"bot_is_member"`
}

This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed. [More about requesting chats](https://core.telegram.org/bots/features#chat-and-user-selection). Ref: #/components/schemas/KeyboardButtonRequestChat

func (*KeyboardButtonRequestChat) Decode

func (s *KeyboardButtonRequestChat) Decode(d *jx.Decoder) error

Decode decodes KeyboardButtonRequestChat from json.

func (*KeyboardButtonRequestChat) Encode

func (s *KeyboardButtonRequestChat) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*KeyboardButtonRequestChat) GetBotAdministratorRights

func (s *KeyboardButtonRequestChat) GetBotAdministratorRights() OptChatAdministratorRights

GetBotAdministratorRights returns the value of BotAdministratorRights.

func (*KeyboardButtonRequestChat) GetBotIsMember

func (s *KeyboardButtonRequestChat) GetBotIsMember() OptBool

GetBotIsMember returns the value of BotIsMember.

func (*KeyboardButtonRequestChat) GetChatHasUsername

func (s *KeyboardButtonRequestChat) GetChatHasUsername() OptBool

GetChatHasUsername returns the value of ChatHasUsername.

func (*KeyboardButtonRequestChat) GetChatIsChannel

func (s *KeyboardButtonRequestChat) GetChatIsChannel() bool

GetChatIsChannel returns the value of ChatIsChannel.

func (*KeyboardButtonRequestChat) GetChatIsCreated

func (s *KeyboardButtonRequestChat) GetChatIsCreated() OptBool

GetChatIsCreated returns the value of ChatIsCreated.

func (*KeyboardButtonRequestChat) GetChatIsForum

func (s *KeyboardButtonRequestChat) GetChatIsForum() OptBool

GetChatIsForum returns the value of ChatIsForum.

func (*KeyboardButtonRequestChat) GetRequestID

func (s *KeyboardButtonRequestChat) GetRequestID() int

GetRequestID returns the value of RequestID.

func (*KeyboardButtonRequestChat) GetUserAdministratorRights

func (s *KeyboardButtonRequestChat) GetUserAdministratorRights() OptChatAdministratorRights

GetUserAdministratorRights returns the value of UserAdministratorRights.

func (*KeyboardButtonRequestChat) MarshalJSON

func (s *KeyboardButtonRequestChat) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*KeyboardButtonRequestChat) SetBotAdministratorRights

func (s *KeyboardButtonRequestChat) SetBotAdministratorRights(val OptChatAdministratorRights)

SetBotAdministratorRights sets the value of BotAdministratorRights.

func (*KeyboardButtonRequestChat) SetBotIsMember

func (s *KeyboardButtonRequestChat) SetBotIsMember(val OptBool)

SetBotIsMember sets the value of BotIsMember.

func (*KeyboardButtonRequestChat) SetChatHasUsername

func (s *KeyboardButtonRequestChat) SetChatHasUsername(val OptBool)

SetChatHasUsername sets the value of ChatHasUsername.

func (*KeyboardButtonRequestChat) SetChatIsChannel

func (s *KeyboardButtonRequestChat) SetChatIsChannel(val bool)

SetChatIsChannel sets the value of ChatIsChannel.

func (*KeyboardButtonRequestChat) SetChatIsCreated

func (s *KeyboardButtonRequestChat) SetChatIsCreated(val OptBool)

SetChatIsCreated sets the value of ChatIsCreated.

func (*KeyboardButtonRequestChat) SetChatIsForum

func (s *KeyboardButtonRequestChat) SetChatIsForum(val OptBool)

SetChatIsForum sets the value of ChatIsForum.

func (*KeyboardButtonRequestChat) SetRequestID

func (s *KeyboardButtonRequestChat) SetRequestID(val int)

SetRequestID sets the value of RequestID.

func (*KeyboardButtonRequestChat) SetUserAdministratorRights

func (s *KeyboardButtonRequestChat) SetUserAdministratorRights(val OptChatAdministratorRights)

SetUserAdministratorRights sets the value of UserAdministratorRights.

func (*KeyboardButtonRequestChat) UnmarshalJSON

func (s *KeyboardButtonRequestChat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type KeyboardButtonRequestUser

type KeyboardButtonRequestUser struct {
	// Signed 32-bit identifier of the request, which will be received back in the
	// [UserShared](https://core.telegram.org/bots/api#usershared) object. Must be unique within the
	// message.
	RequestID int `json:"request_id"`
	// _Optional_. Pass _True_ to request a bot, pass _False_ to request a regular user. If not specified,
	//  no additional restrictions are applied.
	UserIsBot OptBool `json:"user_is_bot"`
	// _Optional_. Pass _True_ to request a premium user, pass _False_ to request a non-premium user. If
	// not specified, no additional restrictions are applied.
	UserIsPremium OptBool `json:"user_is_premium"`
}

This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed. [More about requesting users](https://core.telegram.org/bots/features#chat-and-user-selection). Ref: #/components/schemas/KeyboardButtonRequestUser

func (*KeyboardButtonRequestUser) Decode

func (s *KeyboardButtonRequestUser) Decode(d *jx.Decoder) error

Decode decodes KeyboardButtonRequestUser from json.

func (*KeyboardButtonRequestUser) Encode

func (s *KeyboardButtonRequestUser) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*KeyboardButtonRequestUser) GetRequestID

func (s *KeyboardButtonRequestUser) GetRequestID() int

GetRequestID returns the value of RequestID.

func (*KeyboardButtonRequestUser) GetUserIsBot

func (s *KeyboardButtonRequestUser) GetUserIsBot() OptBool

GetUserIsBot returns the value of UserIsBot.

func (*KeyboardButtonRequestUser) GetUserIsPremium

func (s *KeyboardButtonRequestUser) GetUserIsPremium() OptBool

GetUserIsPremium returns the value of UserIsPremium.

func (*KeyboardButtonRequestUser) MarshalJSON

func (s *KeyboardButtonRequestUser) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*KeyboardButtonRequestUser) SetRequestID

func (s *KeyboardButtonRequestUser) SetRequestID(val int)

SetRequestID sets the value of RequestID.

func (*KeyboardButtonRequestUser) SetUserIsBot

func (s *KeyboardButtonRequestUser) SetUserIsBot(val OptBool)

SetUserIsBot sets the value of UserIsBot.

func (*KeyboardButtonRequestUser) SetUserIsPremium

func (s *KeyboardButtonRequestUser) SetUserIsPremium(val OptBool)

SetUserIsPremium sets the value of UserIsPremium.

func (*KeyboardButtonRequestUser) UnmarshalJSON

func (s *KeyboardButtonRequestUser) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type KeyboardButtonType

type KeyboardButtonType string

KeyboardButtonType is oneOf type of KeyboardButton.

const (
	StringKeyboardButton               KeyboardButtonType = "string"
	KeyboardButtonObjectKeyboardButton KeyboardButtonType = "KeyboardButtonObject"
)

Possible values for KeyboardButtonType.

type LabeledPrice

type LabeledPrice struct {
	// Portion label.
	Label string `json:"label"`
	// Price of the product in the _smallest units_ of the [currency](https://core.telegram.
	// org/bots/payments#supported-currencies) (integer, **not** float/double). For example, for a price
	// of `US$ 1.45` pass `amount = 145`. See the _exp_ parameter in [currencies.json](https://core.
	// telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point
	// for each currency (2 for the majority of currencies).
	Amount int `json:"amount"`
}

This object represents a portion of the price for goods or services. Ref: #/components/schemas/LabeledPrice

func (*LabeledPrice) Decode

func (s *LabeledPrice) Decode(d *jx.Decoder) error

Decode decodes LabeledPrice from json.

func (*LabeledPrice) Encode

func (s *LabeledPrice) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*LabeledPrice) GetAmount

func (s *LabeledPrice) GetAmount() int

GetAmount returns the value of Amount.

func (*LabeledPrice) GetLabel

func (s *LabeledPrice) GetLabel() string

GetLabel returns the value of Label.

func (*LabeledPrice) MarshalJSON

func (s *LabeledPrice) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*LabeledPrice) SetAmount

func (s *LabeledPrice) SetAmount(val int)

SetAmount sets the value of Amount.

func (*LabeledPrice) SetLabel

func (s *LabeledPrice) SetLabel(val string)

SetLabel sets the value of Label.

func (*LabeledPrice) UnmarshalJSON

func (s *LabeledPrice) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type LeaveChat

type LeaveChat struct {
	ChatID ID `json:"chat_id"`
}

Input for leaveChat. Ref: #/components/schemas/leaveChat

func (*LeaveChat) Decode

func (s *LeaveChat) Decode(d *jx.Decoder) error

Decode decodes LeaveChat from json.

func (*LeaveChat) Encode

func (s *LeaveChat) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*LeaveChat) GetChatID

func (s *LeaveChat) GetChatID() ID

GetChatID returns the value of ChatID.

func (*LeaveChat) MarshalJSON

func (s *LeaveChat) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*LeaveChat) SetChatID

func (s *LeaveChat) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*LeaveChat) UnmarshalJSON

func (s *LeaveChat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Location

type Location struct {
	// Longitude as defined by sender.
	Longitude float64 `json:"longitude"`
	// Latitude as defined by sender.
	Latitude float64 `json:"latitude"`
	// _Optional_. The radius of uncertainty for the location, measured in meters; 0-1500.
	HorizontalAccuracy OptFloat64 `json:"horizontal_accuracy"`
	// _Optional_. Time relative to the message sending date, during which the location can be updated;
	// in seconds. For active live locations only.
	LivePeriod OptInt `json:"live_period"`
	// _Optional_. The direction in which user is moving, in degrees; 1-360. For active live locations
	// only.
	Heading OptInt `json:"heading"`
	// _Optional_. The maximum distance for proximity alerts about approaching another chat member, in
	// meters. For sent live locations only.
	ProximityAlertRadius OptInt `json:"proximity_alert_radius"`
}

This object represents a point on the map. Ref: #/components/schemas/Location

func (*Location) Decode

func (s *Location) Decode(d *jx.Decoder) error

Decode decodes Location from json.

func (*Location) Encode

func (s *Location) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Location) GetHeading

func (s *Location) GetHeading() OptInt

GetHeading returns the value of Heading.

func (*Location) GetHorizontalAccuracy

func (s *Location) GetHorizontalAccuracy() OptFloat64

GetHorizontalAccuracy returns the value of HorizontalAccuracy.

func (*Location) GetLatitude

func (s *Location) GetLatitude() float64

GetLatitude returns the value of Latitude.

func (*Location) GetLivePeriod

func (s *Location) GetLivePeriod() OptInt

GetLivePeriod returns the value of LivePeriod.

func (*Location) GetLongitude

func (s *Location) GetLongitude() float64

GetLongitude returns the value of Longitude.

func (*Location) GetProximityAlertRadius

func (s *Location) GetProximityAlertRadius() OptInt

GetProximityAlertRadius returns the value of ProximityAlertRadius.

func (*Location) MarshalJSON

func (s *Location) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Location) SetHeading

func (s *Location) SetHeading(val OptInt)

SetHeading sets the value of Heading.

func (*Location) SetHorizontalAccuracy

func (s *Location) SetHorizontalAccuracy(val OptFloat64)

SetHorizontalAccuracy sets the value of HorizontalAccuracy.

func (*Location) SetLatitude

func (s *Location) SetLatitude(val float64)

SetLatitude sets the value of Latitude.

func (*Location) SetLivePeriod

func (s *Location) SetLivePeriod(val OptInt)

SetLivePeriod sets the value of LivePeriod.

func (*Location) SetLongitude

func (s *Location) SetLongitude(val float64)

SetLongitude sets the value of Longitude.

func (*Location) SetProximityAlertRadius

func (s *Location) SetProximityAlertRadius(val OptInt)

SetProximityAlertRadius sets the value of ProximityAlertRadius.

func (*Location) UnmarshalJSON

func (s *Location) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Location) Validate

func (s *Location) Validate() error

type LoginUrl

type LoginUrl struct {
	// An HTTPS URL to be opened with user authorization data added to the query string when the button
	// is pressed. If the user refuses to provide authorization data, the original URL without
	// information about the user will be opened. The data added is the same as described in [Receiving
	// authorization data](https://core.telegram.org/widgets/login#receiving-authorization-data).
	// **NOTE:** You **must** always check the hash of the received data to verify the authentication and
	// the integrity of the data as described in [Checking authorization](https://core.telegram.
	// org/widgets/login#checking-authorization).
	URL string `json:"url"`
	// _Optional_. New text of the button in forwarded messages.
	ForwardText OptString `json:"forward_text"`
	// _Optional_. Username of a bot, which will be used for user authorization. See [Setting up a
	// bot](https://core.telegram.org/widgets/login#setting-up-a-bot) for more details. If not specified,
	// the current bot's username will be assumed. The _url_'s domain must be the same as the domain
	// linked with the bot. See [Linking your domain to the bot](https://core.telegram.
	// org/widgets/login#linking-your-domain-to-the-bot) for more details.
	BotUsername OptString `json:"bot_username"`
	// _Optional_. Pass _True_ to request the permission for your bot to send messages to the user.
	RequestWriteAccess OptBool `json:"request_write_access"`
}

Telegram apps support these buttons as of [version 5.7](https://telegram. org/blog/privacy-discussions-web-bots#meet-seamless-web-bots). Ref: #/components/schemas/LoginUrl

func (*LoginUrl) Decode

func (s *LoginUrl) Decode(d *jx.Decoder) error

Decode decodes LoginUrl from json.

func (*LoginUrl) Encode

func (s *LoginUrl) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*LoginUrl) GetBotUsername

func (s *LoginUrl) GetBotUsername() OptString

GetBotUsername returns the value of BotUsername.

func (*LoginUrl) GetForwardText

func (s *LoginUrl) GetForwardText() OptString

GetForwardText returns the value of ForwardText.

func (*LoginUrl) GetRequestWriteAccess

func (s *LoginUrl) GetRequestWriteAccess() OptBool

GetRequestWriteAccess returns the value of RequestWriteAccess.

func (*LoginUrl) GetURL

func (s *LoginUrl) GetURL() string

GetURL returns the value of URL.

func (*LoginUrl) MarshalJSON

func (s *LoginUrl) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*LoginUrl) SetBotUsername

func (s *LoginUrl) SetBotUsername(val OptString)

SetBotUsername sets the value of BotUsername.

func (*LoginUrl) SetForwardText

func (s *LoginUrl) SetForwardText(val OptString)

SetForwardText sets the value of ForwardText.

func (*LoginUrl) SetRequestWriteAccess

func (s *LoginUrl) SetRequestWriteAccess(val OptBool)

SetRequestWriteAccess sets the value of RequestWriteAccess.

func (*LoginUrl) SetURL

func (s *LoginUrl) SetURL(val string)

SetURL sets the value of URL.

func (*LoginUrl) UnmarshalJSON

func (s *LoginUrl) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type MaskPosition

type MaskPosition struct {
	// The part of the face relative to which the mask should be placed. One of `forehead`, `eyes`,
	// `mouth`, or `chin`.
	Point string `json:"point"`
	// Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For
	// example, choosing -1.0 will place mask just to the left of the default mask position.
	XShift float64 `json:"x_shift"`
	// Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For
	// example, 1.0 will place the mask just below the default mask position.
	YShift float64 `json:"y_shift"`
	// Mask scaling coefficient. For example, 2.0 means double size.
	Scale float64 `json:"scale"`
}

This object describes the position on faces where a mask should be placed by default. Ref: #/components/schemas/MaskPosition

func (*MaskPosition) Decode

func (s *MaskPosition) Decode(d *jx.Decoder) error

Decode decodes MaskPosition from json.

func (*MaskPosition) Encode

func (s *MaskPosition) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*MaskPosition) GetPoint

func (s *MaskPosition) GetPoint() string

GetPoint returns the value of Point.

func (*MaskPosition) GetScale

func (s *MaskPosition) GetScale() float64

GetScale returns the value of Scale.

func (*MaskPosition) GetXShift

func (s *MaskPosition) GetXShift() float64

GetXShift returns the value of XShift.

func (*MaskPosition) GetYShift

func (s *MaskPosition) GetYShift() float64

GetYShift returns the value of YShift.

func (*MaskPosition) MarshalJSON

func (s *MaskPosition) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*MaskPosition) SetPoint

func (s *MaskPosition) SetPoint(val string)

SetPoint sets the value of Point.

func (*MaskPosition) SetScale

func (s *MaskPosition) SetScale(val float64)

SetScale sets the value of Scale.

func (*MaskPosition) SetXShift

func (s *MaskPosition) SetXShift(val float64)

SetXShift sets the value of XShift.

func (*MaskPosition) SetYShift

func (s *MaskPosition) SetYShift(val float64)

SetYShift sets the value of YShift.

func (*MaskPosition) UnmarshalJSON

func (s *MaskPosition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*MaskPosition) Validate

func (s *MaskPosition) Validate() error
type MenuButton struct {
	Type               MenuButtonType // switch on this field
	MenuButtonCommands MenuButtonCommands
	MenuButtonWebApp   MenuButtonWebApp
	MenuButtonDefault  MenuButtonDefault
}

This object describes the bot's menu button in a private chat. It should be one of. Ref: #/components/schemas/MenuButton MenuButton represents sum type.

func NewMenuButtonCommandsMenuButton

func NewMenuButtonCommandsMenuButton(v MenuButtonCommands) MenuButton

NewMenuButtonCommandsMenuButton returns new MenuButton from MenuButtonCommands.

func NewMenuButtonDefaultMenuButton

func NewMenuButtonDefaultMenuButton(v MenuButtonDefault) MenuButton

NewMenuButtonDefaultMenuButton returns new MenuButton from MenuButtonDefault.

func NewMenuButtonWebAppMenuButton

func NewMenuButtonWebAppMenuButton(v MenuButtonWebApp) MenuButton

NewMenuButtonWebAppMenuButton returns new MenuButton from MenuButtonWebApp.

func (s *MenuButton) Decode(d *jx.Decoder) error

Decode decodes MenuButton from json.

func (s MenuButton) Encode(e *jx.Encoder)

Encode encodes MenuButton as json.

func (s MenuButton) GetMenuButtonCommands() (v MenuButtonCommands, ok bool)

GetMenuButtonCommands returns MenuButtonCommands and true boolean if MenuButton is MenuButtonCommands.

func (s MenuButton) GetMenuButtonDefault() (v MenuButtonDefault, ok bool)

GetMenuButtonDefault returns MenuButtonDefault and true boolean if MenuButton is MenuButtonDefault.

func (s MenuButton) GetMenuButtonWebApp() (v MenuButtonWebApp, ok bool)

GetMenuButtonWebApp returns MenuButtonWebApp and true boolean if MenuButton is MenuButtonWebApp.

func (s MenuButton) IsMenuButtonCommands() bool

IsMenuButtonCommands reports whether MenuButton is MenuButtonCommands.

func (s MenuButton) IsMenuButtonDefault() bool

IsMenuButtonDefault reports whether MenuButton is MenuButtonDefault.

func (s MenuButton) IsMenuButtonWebApp() bool

IsMenuButtonWebApp reports whether MenuButton is MenuButtonWebApp.

func (s MenuButton) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (s *MenuButton) SetMenuButtonCommands(v MenuButtonCommands)

SetMenuButtonCommands sets MenuButton to MenuButtonCommands.

func (s *MenuButton) SetMenuButtonDefault(v MenuButtonDefault)

SetMenuButtonDefault sets MenuButton to MenuButtonDefault.

func (s *MenuButton) SetMenuButtonWebApp(v MenuButtonWebApp)

SetMenuButtonWebApp sets MenuButton to MenuButtonWebApp.

func (s *MenuButton) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type MenuButtonCommands struct{}

Represents a menu button, which opens the bot's list of commands. Ref: #/components/schemas/MenuButtonCommands

func (s *MenuButtonCommands) Decode(d *jx.Decoder) error

Decode decodes MenuButtonCommands from json.

func (s *MenuButtonCommands) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (s *MenuButtonCommands) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (s *MenuButtonCommands) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type MenuButtonDefault struct{}

Describes that no specific value for the menu button was set. Ref: #/components/schemas/MenuButtonDefault

func (s *MenuButtonDefault) Decode(d *jx.Decoder) error

Decode decodes MenuButtonDefault from json.

func (s *MenuButtonDefault) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (s *MenuButtonDefault) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (s *MenuButtonDefault) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type MenuButtonType string

MenuButtonType is oneOf type of MenuButton.

const (
	MenuButtonCommandsMenuButton MenuButtonType = "MenuButtonCommands"
	MenuButtonWebAppMenuButton   MenuButtonType = "MenuButtonWebApp"
	MenuButtonDefaultMenuButton  MenuButtonType = "MenuButtonDefault"
)

Possible values for MenuButtonType.

type MenuButtonWebApp struct {
	// Text on the button.
	Text   string     `json:"text"`
	WebApp WebAppInfo `json:"web_app"`
}

Represents a menu button, which launches a [Web App](https://core.telegram.org/bots/webapps). Ref: #/components/schemas/MenuButtonWebApp

func (s *MenuButtonWebApp) Decode(d *jx.Decoder) error

Decode decodes MenuButtonWebApp from json.

func (s *MenuButtonWebApp) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (s *MenuButtonWebApp) GetText() string

GetText returns the value of Text.

func (s *MenuButtonWebApp) GetWebApp() WebAppInfo

GetWebApp returns the value of WebApp.

func (s *MenuButtonWebApp) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (s *MenuButtonWebApp) SetText(val string)

SetText sets the value of Text.

func (s *MenuButtonWebApp) SetWebApp(val WebAppInfo)

SetWebApp sets the value of WebApp.

func (s *MenuButtonWebApp) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Message

type Message struct {
	// Unique message identifier inside this chat.
	MessageID int `json:"message_id"`
	// _Optional_. Unique identifier of a message thread to which the message belongs; for supergroups
	// only.
	MessageThreadID OptInt  `json:"message_thread_id"`
	From            OptUser `json:"from"`
	SenderChat      OptChat `json:"sender_chat"`
	// Date the message was sent in Unix time.
	Date            int     `json:"date"`
	Chat            Chat    `json:"chat"`
	ForwardFrom     OptUser `json:"forward_from"`
	ForwardFromChat OptChat `json:"forward_from_chat"`
	// _Optional_. For messages forwarded from channels, identifier of the original message in the channel.
	ForwardFromMessageID OptInt `json:"forward_from_message_id"`
	// _Optional_. For forwarded messages that were originally sent in channels or by an anonymous chat
	// administrator, signature of the message sender if present.
	ForwardSignature OptString `json:"forward_signature"`
	// _Optional_. Sender's name for messages forwarded from users who disallow adding a link to their
	// account in forwarded messages.
	ForwardSenderName OptString `json:"forward_sender_name"`
	// _Optional_. For forwarded messages, date the original message was sent in Unix time.
	ForwardDate OptInt `json:"forward_date"`
	// _Optional_. _True_, if the message is sent to a forum topic.
	IsTopicMessage OptBool `json:"is_topic_message"`
	// _Optional_. _True_, if the message is a channel post that was automatically forwarded to the
	// connected discussion group.
	IsAutomaticForward OptBool  `json:"is_automatic_forward"`
	ReplyToMessage     *Message `json:"reply_to_message"`
	ViaBot             OptUser  `json:"via_bot"`
	// _Optional_. Date the message was last edited in Unix time.
	EditDate OptInt `json:"edit_date"`
	// _Optional_. _True_, if the message can't be forwarded.
	HasProtectedContent OptBool `json:"has_protected_content"`
	// _Optional_. The unique identifier of a media message group this message belongs to.
	MediaGroupID OptString `json:"media_group_id"`
	// _Optional_. Signature of the post author for messages in channels, or the custom title of an
	// anonymous group administrator.
	AuthorSignature OptString `json:"author_signature"`
	// _Optional_. For text messages, the actual UTF-8 text of the message.
	Text OptString `json:"text"`
	// _Optional_. For text messages, special entities like usernames, URLs, bot commands, etc. that
	// appear in the text.
	Entities  []MessageEntity `json:"entities"`
	Animation OptAnimation    `json:"animation"`
	Audio     OptAudio        `json:"audio"`
	Document  OptDocument     `json:"document"`
	// _Optional_. Message is a photo, available sizes of the photo.
	Photo     []PhotoSize  `json:"photo"`
	Sticker   OptSticker   `json:"sticker"`
	Video     OptVideo     `json:"video"`
	VideoNote OptVideoNote `json:"video_note"`
	Voice     OptVoice     `json:"voice"`
	// _Optional_. Caption for the animation, audio, document, photo, video or voice.
	Caption OptString `json:"caption"`
	// _Optional_. For messages with a caption, special entities like usernames, URLs, bot commands, etc.
	// that appear in the caption.
	CaptionEntities []MessageEntity `json:"caption_entities"`
	// _Optional_. _True_, if the message media is covered by a spoiler animation.
	HasMediaSpoiler OptBool     `json:"has_media_spoiler"`
	Contact         OptContact  `json:"contact"`
	Dice            OptDice     `json:"dice"`
	Game            OptGame     `json:"game"`
	Poll            OptPoll     `json:"poll"`
	Venue           OptVenue    `json:"venue"`
	Location        OptLocation `json:"location"`
	// _Optional_. New members that were added to the group or supergroup and information about them (the
	// bot itself may be one of these members).
	NewChatMembers []User  `json:"new_chat_members"`
	LeftChatMember OptUser `json:"left_chat_member"`
	// _Optional_. A chat title was changed to this value.
	NewChatTitle OptString `json:"new_chat_title"`
	// _Optional_. A chat photo was change to this value.
	NewChatPhoto []PhotoSize `json:"new_chat_photo"`
	// _Optional_. Service message: the chat photo was deleted.
	DeleteChatPhoto OptBool `json:"delete_chat_photo"`
	// _Optional_. Service message: the group has been created.
	GroupChatCreated OptBool `json:"group_chat_created"`
	// _Optional_. Service message: the supergroup has been created. This field can't be received in a
	// message coming through updates, because bot can't be a member of a supergroup when it is created.
	// It can only be found in reply_to_message if someone replies to a very first message in a directly
	// created supergroup.
	SupergroupChatCreated OptBool `json:"supergroup_chat_created"`
	// _Optional_. Service message: the channel has been created. This field can't be received in a
	// message coming through updates, because bot can't be a member of a channel when it is created. It
	// can only be found in reply_to_message if someone replies to a very first message in a channel.
	ChannelChatCreated            OptBool                          `json:"channel_chat_created"`
	MessageAutoDeleteTimerChanged OptMessageAutoDeleteTimerChanged `json:"message_auto_delete_timer_changed"`
	// _Optional_. The group has been migrated to a supergroup with the specified identifier. This number
	// may have more than 32 significant bits and some programming languages may have difficulty/silent
	// defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or
	// double-precision float type are safe for storing this identifier.
	MigrateToChatID OptInt64 `json:"migrate_to_chat_id"`
	// _Optional_. The supergroup has been migrated from a group with the specified identifier. This
	// number may have more than 32 significant bits and some programming languages may have
	// difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed
	// 64-bit integer or double-precision float type are safe for storing this identifier.
	MigrateFromChatID OptInt64             `json:"migrate_from_chat_id"`
	PinnedMessage     *Message             `json:"pinned_message"`
	Invoice           OptInvoice           `json:"invoice"`
	SuccessfulPayment OptSuccessfulPayment `json:"successful_payment"`
	UserShared        OptUserShared        `json:"user_shared"`
	ChatShared        OptChatShared        `json:"chat_shared"`
	// _Optional_. The domain name of the website on which the user has logged in. [More about Telegram
	// Login](https://core.telegram.org/widgets/login).
	ConnectedWebsite             OptString                       `json:"connected_website"`
	WriteAccessAllowed           OptWriteAccessAllowed           `json:"write_access_allowed"`
	PassportData                 OptPassportData                 `json:"passport_data"`
	ProximityAlertTriggered      OptProximityAlertTriggered      `json:"proximity_alert_triggered"`
	ForumTopicCreated            OptForumTopicCreated            `json:"forum_topic_created"`
	ForumTopicEdited             OptForumTopicEdited             `json:"forum_topic_edited"`
	ForumTopicClosed             *ForumTopicClosed               `json:"forum_topic_closed"`
	ForumTopicReopened           *ForumTopicReopened             `json:"forum_topic_reopened"`
	GeneralForumTopicHidden      *GeneralForumTopicHidden        `json:"general_forum_topic_hidden"`
	GeneralForumTopicUnhidden    *GeneralForumTopicUnhidden      `json:"general_forum_topic_unhidden"`
	VideoChatScheduled           OptVideoChatScheduled           `json:"video_chat_scheduled"`
	VideoChatStarted             *VideoChatStarted               `json:"video_chat_started"`
	VideoChatEnded               OptVideoChatEnded               `json:"video_chat_ended"`
	VideoChatParticipantsInvited OptVideoChatParticipantsInvited `json:"video_chat_participants_invited"`
	WebAppData                   OptWebAppData                   `json:"web_app_data"`
	ReplyMarkup                  OptInlineKeyboardMarkup         `json:"reply_markup"`
	NewChatMember                OptUser                         `json:"new_chat_member"`
	NewChatParticipant           OptUser                         `json:"new_chat_participant"`
	LeftChatParticipant          OptUser                         `json:"left_chat_participant"`
}

This object represents a message. Ref: #/components/schemas/Message

func (*Message) Decode

func (s *Message) Decode(d *jx.Decoder) error

Decode decodes Message from json.

func (*Message) Encode

func (s *Message) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Message) GetAnimation

func (s *Message) GetAnimation() OptAnimation

GetAnimation returns the value of Animation.

func (*Message) GetAudio

func (s *Message) GetAudio() OptAudio

GetAudio returns the value of Audio.

func (*Message) GetAuthorSignature

func (s *Message) GetAuthorSignature() OptString

GetAuthorSignature returns the value of AuthorSignature.

func (*Message) GetCaption

func (s *Message) GetCaption() OptString

GetCaption returns the value of Caption.

func (*Message) GetCaptionEntities

func (s *Message) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*Message) GetChannelChatCreated

func (s *Message) GetChannelChatCreated() OptBool

GetChannelChatCreated returns the value of ChannelChatCreated.

func (*Message) GetChat

func (s *Message) GetChat() Chat

GetChat returns the value of Chat.

func (*Message) GetChatShared

func (s *Message) GetChatShared() OptChatShared

GetChatShared returns the value of ChatShared.

func (*Message) GetConnectedWebsite

func (s *Message) GetConnectedWebsite() OptString

GetConnectedWebsite returns the value of ConnectedWebsite.

func (*Message) GetContact

func (s *Message) GetContact() OptContact

GetContact returns the value of Contact.

func (*Message) GetDate

func (s *Message) GetDate() int

GetDate returns the value of Date.

func (*Message) GetDeleteChatPhoto

func (s *Message) GetDeleteChatPhoto() OptBool

GetDeleteChatPhoto returns the value of DeleteChatPhoto.

func (*Message) GetDice

func (s *Message) GetDice() OptDice

GetDice returns the value of Dice.

func (*Message) GetDocument

func (s *Message) GetDocument() OptDocument

GetDocument returns the value of Document.

func (*Message) GetEditDate

func (s *Message) GetEditDate() OptInt

GetEditDate returns the value of EditDate.

func (*Message) GetEntities

func (s *Message) GetEntities() []MessageEntity

GetEntities returns the value of Entities.

func (*Message) GetForumTopicClosed

func (s *Message) GetForumTopicClosed() *ForumTopicClosed

GetForumTopicClosed returns the value of ForumTopicClosed.

func (*Message) GetForumTopicCreated

func (s *Message) GetForumTopicCreated() OptForumTopicCreated

GetForumTopicCreated returns the value of ForumTopicCreated.

func (*Message) GetForumTopicEdited

func (s *Message) GetForumTopicEdited() OptForumTopicEdited

GetForumTopicEdited returns the value of ForumTopicEdited.

func (*Message) GetForumTopicReopened

func (s *Message) GetForumTopicReopened() *ForumTopicReopened

GetForumTopicReopened returns the value of ForumTopicReopened.

func (*Message) GetForwardDate

func (s *Message) GetForwardDate() OptInt

GetForwardDate returns the value of ForwardDate.

func (*Message) GetForwardFrom

func (s *Message) GetForwardFrom() OptUser

GetForwardFrom returns the value of ForwardFrom.

func (*Message) GetForwardFromChat

func (s *Message) GetForwardFromChat() OptChat

GetForwardFromChat returns the value of ForwardFromChat.

func (*Message) GetForwardFromMessageID

func (s *Message) GetForwardFromMessageID() OptInt

GetForwardFromMessageID returns the value of ForwardFromMessageID.

func (*Message) GetForwardSenderName

func (s *Message) GetForwardSenderName() OptString

GetForwardSenderName returns the value of ForwardSenderName.

func (*Message) GetForwardSignature

func (s *Message) GetForwardSignature() OptString

GetForwardSignature returns the value of ForwardSignature.

func (*Message) GetFrom

func (s *Message) GetFrom() OptUser

GetFrom returns the value of From.

func (*Message) GetGame

func (s *Message) GetGame() OptGame

GetGame returns the value of Game.

func (*Message) GetGeneralForumTopicHidden

func (s *Message) GetGeneralForumTopicHidden() *GeneralForumTopicHidden

GetGeneralForumTopicHidden returns the value of GeneralForumTopicHidden.

func (*Message) GetGeneralForumTopicUnhidden

func (s *Message) GetGeneralForumTopicUnhidden() *GeneralForumTopicUnhidden

GetGeneralForumTopicUnhidden returns the value of GeneralForumTopicUnhidden.

func (*Message) GetGroupChatCreated

func (s *Message) GetGroupChatCreated() OptBool

GetGroupChatCreated returns the value of GroupChatCreated.

func (*Message) GetHasMediaSpoiler

func (s *Message) GetHasMediaSpoiler() OptBool

GetHasMediaSpoiler returns the value of HasMediaSpoiler.

func (*Message) GetHasProtectedContent

func (s *Message) GetHasProtectedContent() OptBool

GetHasProtectedContent returns the value of HasProtectedContent.

func (*Message) GetInvoice

func (s *Message) GetInvoice() OptInvoice

GetInvoice returns the value of Invoice.

func (*Message) GetIsAutomaticForward

func (s *Message) GetIsAutomaticForward() OptBool

GetIsAutomaticForward returns the value of IsAutomaticForward.

func (*Message) GetIsTopicMessage

func (s *Message) GetIsTopicMessage() OptBool

GetIsTopicMessage returns the value of IsTopicMessage.

func (*Message) GetLeftChatMember

func (s *Message) GetLeftChatMember() OptUser

GetLeftChatMember returns the value of LeftChatMember.

func (*Message) GetLeftChatParticipant

func (s *Message) GetLeftChatParticipant() OptUser

GetLeftChatParticipant returns the value of LeftChatParticipant.

func (*Message) GetLocation

func (s *Message) GetLocation() OptLocation

GetLocation returns the value of Location.

func (*Message) GetMediaGroupID

func (s *Message) GetMediaGroupID() OptString

GetMediaGroupID returns the value of MediaGroupID.

func (*Message) GetMessageAutoDeleteTimerChanged

func (s *Message) GetMessageAutoDeleteTimerChanged() OptMessageAutoDeleteTimerChanged

GetMessageAutoDeleteTimerChanged returns the value of MessageAutoDeleteTimerChanged.

func (*Message) GetMessageID

func (s *Message) GetMessageID() int

GetMessageID returns the value of MessageID.

func (*Message) GetMessageThreadID

func (s *Message) GetMessageThreadID() OptInt

GetMessageThreadID returns the value of MessageThreadID.

func (*Message) GetMigrateFromChatID

func (s *Message) GetMigrateFromChatID() OptInt64

GetMigrateFromChatID returns the value of MigrateFromChatID.

func (*Message) GetMigrateToChatID

func (s *Message) GetMigrateToChatID() OptInt64

GetMigrateToChatID returns the value of MigrateToChatID.

func (*Message) GetNewChatMember

func (s *Message) GetNewChatMember() OptUser

GetNewChatMember returns the value of NewChatMember.

func (*Message) GetNewChatMembers

func (s *Message) GetNewChatMembers() []User

GetNewChatMembers returns the value of NewChatMembers.

func (*Message) GetNewChatParticipant

func (s *Message) GetNewChatParticipant() OptUser

GetNewChatParticipant returns the value of NewChatParticipant.

func (*Message) GetNewChatPhoto

func (s *Message) GetNewChatPhoto() []PhotoSize

GetNewChatPhoto returns the value of NewChatPhoto.

func (*Message) GetNewChatTitle

func (s *Message) GetNewChatTitle() OptString

GetNewChatTitle returns the value of NewChatTitle.

func (*Message) GetPassportData

func (s *Message) GetPassportData() OptPassportData

GetPassportData returns the value of PassportData.

func (*Message) GetPhoto

func (s *Message) GetPhoto() []PhotoSize

GetPhoto returns the value of Photo.

func (*Message) GetPinnedMessage

func (s *Message) GetPinnedMessage() *Message

GetPinnedMessage returns the value of PinnedMessage.

func (*Message) GetPoll

func (s *Message) GetPoll() OptPoll

GetPoll returns the value of Poll.

func (*Message) GetProximityAlertTriggered

func (s *Message) GetProximityAlertTriggered() OptProximityAlertTriggered

GetProximityAlertTriggered returns the value of ProximityAlertTriggered.

func (*Message) GetReplyMarkup

func (s *Message) GetReplyMarkup() OptInlineKeyboardMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*Message) GetReplyToMessage

func (s *Message) GetReplyToMessage() *Message

GetReplyToMessage returns the value of ReplyToMessage.

func (*Message) GetSenderChat

func (s *Message) GetSenderChat() OptChat

GetSenderChat returns the value of SenderChat.

func (*Message) GetSticker

func (s *Message) GetSticker() OptSticker

GetSticker returns the value of Sticker.

func (*Message) GetSuccessfulPayment

func (s *Message) GetSuccessfulPayment() OptSuccessfulPayment

GetSuccessfulPayment returns the value of SuccessfulPayment.

func (*Message) GetSupergroupChatCreated

func (s *Message) GetSupergroupChatCreated() OptBool

GetSupergroupChatCreated returns the value of SupergroupChatCreated.

func (*Message) GetText

func (s *Message) GetText() OptString

GetText returns the value of Text.

func (*Message) GetUserShared

func (s *Message) GetUserShared() OptUserShared

GetUserShared returns the value of UserShared.

func (*Message) GetVenue

func (s *Message) GetVenue() OptVenue

GetVenue returns the value of Venue.

func (*Message) GetViaBot

func (s *Message) GetViaBot() OptUser

GetViaBot returns the value of ViaBot.

func (*Message) GetVideo

func (s *Message) GetVideo() OptVideo

GetVideo returns the value of Video.

func (*Message) GetVideoChatEnded

func (s *Message) GetVideoChatEnded() OptVideoChatEnded

GetVideoChatEnded returns the value of VideoChatEnded.

func (*Message) GetVideoChatParticipantsInvited

func (s *Message) GetVideoChatParticipantsInvited() OptVideoChatParticipantsInvited

GetVideoChatParticipantsInvited returns the value of VideoChatParticipantsInvited.

func (*Message) GetVideoChatScheduled

func (s *Message) GetVideoChatScheduled() OptVideoChatScheduled

GetVideoChatScheduled returns the value of VideoChatScheduled.

func (*Message) GetVideoChatStarted

func (s *Message) GetVideoChatStarted() *VideoChatStarted

GetVideoChatStarted returns the value of VideoChatStarted.

func (*Message) GetVideoNote

func (s *Message) GetVideoNote() OptVideoNote

GetVideoNote returns the value of VideoNote.

func (*Message) GetVoice

func (s *Message) GetVoice() OptVoice

GetVoice returns the value of Voice.

func (*Message) GetWebAppData

func (s *Message) GetWebAppData() OptWebAppData

GetWebAppData returns the value of WebAppData.

func (*Message) GetWriteAccessAllowed

func (s *Message) GetWriteAccessAllowed() OptWriteAccessAllowed

GetWriteAccessAllowed returns the value of WriteAccessAllowed.

func (*Message) MarshalJSON

func (s *Message) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Message) SetAnimation

func (s *Message) SetAnimation(val OptAnimation)

SetAnimation sets the value of Animation.

func (*Message) SetAudio

func (s *Message) SetAudio(val OptAudio)

SetAudio sets the value of Audio.

func (*Message) SetAuthorSignature

func (s *Message) SetAuthorSignature(val OptString)

SetAuthorSignature sets the value of AuthorSignature.

func (*Message) SetCaption

func (s *Message) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*Message) SetCaptionEntities

func (s *Message) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*Message) SetChannelChatCreated

func (s *Message) SetChannelChatCreated(val OptBool)

SetChannelChatCreated sets the value of ChannelChatCreated.

func (*Message) SetChat

func (s *Message) SetChat(val Chat)

SetChat sets the value of Chat.

func (*Message) SetChatShared

func (s *Message) SetChatShared(val OptChatShared)

SetChatShared sets the value of ChatShared.

func (*Message) SetConnectedWebsite

func (s *Message) SetConnectedWebsite(val OptString)

SetConnectedWebsite sets the value of ConnectedWebsite.

func (*Message) SetContact

func (s *Message) SetContact(val OptContact)

SetContact sets the value of Contact.

func (*Message) SetDate

func (s *Message) SetDate(val int)

SetDate sets the value of Date.

func (*Message) SetDeleteChatPhoto

func (s *Message) SetDeleteChatPhoto(val OptBool)

SetDeleteChatPhoto sets the value of DeleteChatPhoto.

func (*Message) SetDice

func (s *Message) SetDice(val OptDice)

SetDice sets the value of Dice.

func (*Message) SetDocument

func (s *Message) SetDocument(val OptDocument)

SetDocument sets the value of Document.

func (*Message) SetEditDate

func (s *Message) SetEditDate(val OptInt)

SetEditDate sets the value of EditDate.

func (*Message) SetEntities

func (s *Message) SetEntities(val []MessageEntity)

SetEntities sets the value of Entities.

func (*Message) SetForumTopicClosed

func (s *Message) SetForumTopicClosed(val *ForumTopicClosed)

SetForumTopicClosed sets the value of ForumTopicClosed.

func (*Message) SetForumTopicCreated

func (s *Message) SetForumTopicCreated(val OptForumTopicCreated)

SetForumTopicCreated sets the value of ForumTopicCreated.

func (*Message) SetForumTopicEdited

func (s *Message) SetForumTopicEdited(val OptForumTopicEdited)

SetForumTopicEdited sets the value of ForumTopicEdited.

func (*Message) SetForumTopicReopened

func (s *Message) SetForumTopicReopened(val *ForumTopicReopened)

SetForumTopicReopened sets the value of ForumTopicReopened.

func (*Message) SetForwardDate

func (s *Message) SetForwardDate(val OptInt)

SetForwardDate sets the value of ForwardDate.

func (*Message) SetForwardFrom

func (s *Message) SetForwardFrom(val OptUser)

SetForwardFrom sets the value of ForwardFrom.

func (*Message) SetForwardFromChat

func (s *Message) SetForwardFromChat(val OptChat)

SetForwardFromChat sets the value of ForwardFromChat.

func (*Message) SetForwardFromMessageID

func (s *Message) SetForwardFromMessageID(val OptInt)

SetForwardFromMessageID sets the value of ForwardFromMessageID.

func (*Message) SetForwardSenderName

func (s *Message) SetForwardSenderName(val OptString)

SetForwardSenderName sets the value of ForwardSenderName.

func (*Message) SetForwardSignature

func (s *Message) SetForwardSignature(val OptString)

SetForwardSignature sets the value of ForwardSignature.

func (*Message) SetFrom

func (s *Message) SetFrom(val OptUser)

SetFrom sets the value of From.

func (*Message) SetGame

func (s *Message) SetGame(val OptGame)

SetGame sets the value of Game.

func (*Message) SetGeneralForumTopicHidden

func (s *Message) SetGeneralForumTopicHidden(val *GeneralForumTopicHidden)

SetGeneralForumTopicHidden sets the value of GeneralForumTopicHidden.

func (*Message) SetGeneralForumTopicUnhidden

func (s *Message) SetGeneralForumTopicUnhidden(val *GeneralForumTopicUnhidden)

SetGeneralForumTopicUnhidden sets the value of GeneralForumTopicUnhidden.

func (*Message) SetGroupChatCreated

func (s *Message) SetGroupChatCreated(val OptBool)

SetGroupChatCreated sets the value of GroupChatCreated.

func (*Message) SetHasMediaSpoiler

func (s *Message) SetHasMediaSpoiler(val OptBool)

SetHasMediaSpoiler sets the value of HasMediaSpoiler.

func (*Message) SetHasProtectedContent

func (s *Message) SetHasProtectedContent(val OptBool)

SetHasProtectedContent sets the value of HasProtectedContent.

func (*Message) SetInvoice

func (s *Message) SetInvoice(val OptInvoice)

SetInvoice sets the value of Invoice.

func (*Message) SetIsAutomaticForward

func (s *Message) SetIsAutomaticForward(val OptBool)

SetIsAutomaticForward sets the value of IsAutomaticForward.

func (*Message) SetIsTopicMessage

func (s *Message) SetIsTopicMessage(val OptBool)

SetIsTopicMessage sets the value of IsTopicMessage.

func (*Message) SetLeftChatMember

func (s *Message) SetLeftChatMember(val OptUser)

SetLeftChatMember sets the value of LeftChatMember.

func (*Message) SetLeftChatParticipant

func (s *Message) SetLeftChatParticipant(val OptUser)

SetLeftChatParticipant sets the value of LeftChatParticipant.

func (*Message) SetLocation

func (s *Message) SetLocation(val OptLocation)

SetLocation sets the value of Location.

func (*Message) SetMediaGroupID

func (s *Message) SetMediaGroupID(val OptString)

SetMediaGroupID sets the value of MediaGroupID.

func (*Message) SetMessageAutoDeleteTimerChanged

func (s *Message) SetMessageAutoDeleteTimerChanged(val OptMessageAutoDeleteTimerChanged)

SetMessageAutoDeleteTimerChanged sets the value of MessageAutoDeleteTimerChanged.

func (*Message) SetMessageID

func (s *Message) SetMessageID(val int)

SetMessageID sets the value of MessageID.

func (*Message) SetMessageThreadID

func (s *Message) SetMessageThreadID(val OptInt)

SetMessageThreadID sets the value of MessageThreadID.

func (*Message) SetMigrateFromChatID

func (s *Message) SetMigrateFromChatID(val OptInt64)

SetMigrateFromChatID sets the value of MigrateFromChatID.

func (*Message) SetMigrateToChatID

func (s *Message) SetMigrateToChatID(val OptInt64)

SetMigrateToChatID sets the value of MigrateToChatID.

func (*Message) SetNewChatMember

func (s *Message) SetNewChatMember(val OptUser)

SetNewChatMember sets the value of NewChatMember.

func (*Message) SetNewChatMembers

func (s *Message) SetNewChatMembers(val []User)

SetNewChatMembers sets the value of NewChatMembers.

func (*Message) SetNewChatParticipant

func (s *Message) SetNewChatParticipant(val OptUser)

SetNewChatParticipant sets the value of NewChatParticipant.

func (*Message) SetNewChatPhoto

func (s *Message) SetNewChatPhoto(val []PhotoSize)

SetNewChatPhoto sets the value of NewChatPhoto.

func (*Message) SetNewChatTitle

func (s *Message) SetNewChatTitle(val OptString)

SetNewChatTitle sets the value of NewChatTitle.

func (*Message) SetPassportData

func (s *Message) SetPassportData(val OptPassportData)

SetPassportData sets the value of PassportData.

func (*Message) SetPhoto

func (s *Message) SetPhoto(val []PhotoSize)

SetPhoto sets the value of Photo.

func (*Message) SetPinnedMessage

func (s *Message) SetPinnedMessage(val *Message)

SetPinnedMessage sets the value of PinnedMessage.

func (*Message) SetPoll

func (s *Message) SetPoll(val OptPoll)

SetPoll sets the value of Poll.

func (*Message) SetProximityAlertTriggered

func (s *Message) SetProximityAlertTriggered(val OptProximityAlertTriggered)

SetProximityAlertTriggered sets the value of ProximityAlertTriggered.

func (*Message) SetReplyMarkup

func (s *Message) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*Message) SetReplyToMessage

func (s *Message) SetReplyToMessage(val *Message)

SetReplyToMessage sets the value of ReplyToMessage.

func (*Message) SetSenderChat

func (s *Message) SetSenderChat(val OptChat)

SetSenderChat sets the value of SenderChat.

func (*Message) SetSticker

func (s *Message) SetSticker(val OptSticker)

SetSticker sets the value of Sticker.

func (*Message) SetSuccessfulPayment

func (s *Message) SetSuccessfulPayment(val OptSuccessfulPayment)

SetSuccessfulPayment sets the value of SuccessfulPayment.

func (*Message) SetSupergroupChatCreated

func (s *Message) SetSupergroupChatCreated(val OptBool)

SetSupergroupChatCreated sets the value of SupergroupChatCreated.

func (*Message) SetText

func (s *Message) SetText(val OptString)

SetText sets the value of Text.

func (*Message) SetUserShared

func (s *Message) SetUserShared(val OptUserShared)

SetUserShared sets the value of UserShared.

func (*Message) SetVenue

func (s *Message) SetVenue(val OptVenue)

SetVenue sets the value of Venue.

func (*Message) SetViaBot

func (s *Message) SetViaBot(val OptUser)

SetViaBot sets the value of ViaBot.

func (*Message) SetVideo

func (s *Message) SetVideo(val OptVideo)

SetVideo sets the value of Video.

func (*Message) SetVideoChatEnded

func (s *Message) SetVideoChatEnded(val OptVideoChatEnded)

SetVideoChatEnded sets the value of VideoChatEnded.

func (*Message) SetVideoChatParticipantsInvited

func (s *Message) SetVideoChatParticipantsInvited(val OptVideoChatParticipantsInvited)

SetVideoChatParticipantsInvited sets the value of VideoChatParticipantsInvited.

func (*Message) SetVideoChatScheduled

func (s *Message) SetVideoChatScheduled(val OptVideoChatScheduled)

SetVideoChatScheduled sets the value of VideoChatScheduled.

func (*Message) SetVideoChatStarted

func (s *Message) SetVideoChatStarted(val *VideoChatStarted)

SetVideoChatStarted sets the value of VideoChatStarted.

func (*Message) SetVideoNote

func (s *Message) SetVideoNote(val OptVideoNote)

SetVideoNote sets the value of VideoNote.

func (*Message) SetVoice

func (s *Message) SetVoice(val OptVoice)

SetVoice sets the value of Voice.

func (*Message) SetWebAppData

func (s *Message) SetWebAppData(val OptWebAppData)

SetWebAppData sets the value of WebAppData.

func (*Message) SetWriteAccessAllowed

func (s *Message) SetWriteAccessAllowed(val OptWriteAccessAllowed)

SetWriteAccessAllowed sets the value of WriteAccessAllowed.

func (*Message) UnmarshalJSON

func (s *Message) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Message) Validate

func (s *Message) Validate() error

type MessageAutoDeleteTimerChanged

type MessageAutoDeleteTimerChanged struct {
	// New auto-delete time for messages in the chat; in seconds.
	MessageAutoDeleteTime int `json:"message_auto_delete_time"`
}

This object represents a service message about a change in auto-delete timer settings. Ref: #/components/schemas/MessageAutoDeleteTimerChanged

func (*MessageAutoDeleteTimerChanged) Decode

Decode decodes MessageAutoDeleteTimerChanged from json.

func (*MessageAutoDeleteTimerChanged) Encode

Encode implements json.Marshaler.

func (*MessageAutoDeleteTimerChanged) GetMessageAutoDeleteTime

func (s *MessageAutoDeleteTimerChanged) GetMessageAutoDeleteTime() int

GetMessageAutoDeleteTime returns the value of MessageAutoDeleteTime.

func (*MessageAutoDeleteTimerChanged) MarshalJSON

func (s *MessageAutoDeleteTimerChanged) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*MessageAutoDeleteTimerChanged) SetMessageAutoDeleteTime

func (s *MessageAutoDeleteTimerChanged) SetMessageAutoDeleteTime(val int)

SetMessageAutoDeleteTime sets the value of MessageAutoDeleteTime.

func (*MessageAutoDeleteTimerChanged) UnmarshalJSON

func (s *MessageAutoDeleteTimerChanged) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type MessageEntity

type MessageEntity struct {
	// Type of the entity. Currently, can be `mention` (`@username`), `hashtag` (`#hashtag`), `cashtag`
	// (`$USD`), `bot_command` (`/start@jobs_bot`), `url` (`https://telegram.org`), `email`
	// (`do-not-reply@telegram.org`), `phone_number` (`+1-212-555-0123`), `bold` (**bold text**),
	// `italic` (_italic text_), `underline` (underlined text), `strikethrough` (strikethrough text),
	// `spoiler` (spoiler message), `code` (monowidth string), `pre` (monowidth block), `text_link` (for
	// clickable text URLs), `text_mention` (for users [without usernames](https://telegram.
	// org/blog/edit#new-mentions)), `custom_emoji` (for inline custom emoji stickers).
	Type MessageEntityType `json:"type"`
	// Offset in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length) to the start
	// of the entity.
	Offset int `json:"offset"`
	// Length of the entity in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length).
	Length int `json:"length"`
	// _Optional_. For `text_link` only, URL that will be opened after user taps on the text.
	URL  OptString `json:"url"`
	User OptUser   `json:"user"`
	// _Optional_. For `pre` only, the programming language of the entity text.
	Language OptString `json:"language"`
	// _Optional_. For `custom_emoji` only, unique identifier of the custom emoji. Use
	// [getCustomEmojiStickers](https://core.telegram.org/bots/api#getcustomemojistickers) to get full
	// information about the sticker.
	CustomEmojiID OptString `json:"custom_emoji_id"`
}

This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. Ref: #/components/schemas/MessageEntity

func (*MessageEntity) Decode

func (s *MessageEntity) Decode(d *jx.Decoder) error

Decode decodes MessageEntity from json.

func (*MessageEntity) Encode

func (s *MessageEntity) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*MessageEntity) GetCustomEmojiID

func (s *MessageEntity) GetCustomEmojiID() OptString

GetCustomEmojiID returns the value of CustomEmojiID.

func (*MessageEntity) GetLanguage

func (s *MessageEntity) GetLanguage() OptString

GetLanguage returns the value of Language.

func (*MessageEntity) GetLength

func (s *MessageEntity) GetLength() int

GetLength returns the value of Length.

func (*MessageEntity) GetOffset

func (s *MessageEntity) GetOffset() int

GetOffset returns the value of Offset.

func (*MessageEntity) GetType

func (s *MessageEntity) GetType() MessageEntityType

GetType returns the value of Type.

func (*MessageEntity) GetURL

func (s *MessageEntity) GetURL() OptString

GetURL returns the value of URL.

func (*MessageEntity) GetUser

func (s *MessageEntity) GetUser() OptUser

GetUser returns the value of User.

func (*MessageEntity) MarshalJSON

func (s *MessageEntity) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*MessageEntity) SetCustomEmojiID

func (s *MessageEntity) SetCustomEmojiID(val OptString)

SetCustomEmojiID sets the value of CustomEmojiID.

func (*MessageEntity) SetLanguage

func (s *MessageEntity) SetLanguage(val OptString)

SetLanguage sets the value of Language.

func (*MessageEntity) SetLength

func (s *MessageEntity) SetLength(val int)

SetLength sets the value of Length.

func (*MessageEntity) SetOffset

func (s *MessageEntity) SetOffset(val int)

SetOffset sets the value of Offset.

func (*MessageEntity) SetType

func (s *MessageEntity) SetType(val MessageEntityType)

SetType sets the value of Type.

func (*MessageEntity) SetURL

func (s *MessageEntity) SetURL(val OptString)

SetURL sets the value of URL.

func (*MessageEntity) SetUser

func (s *MessageEntity) SetUser(val OptUser)

SetUser sets the value of User.

func (*MessageEntity) UnmarshalJSON

func (s *MessageEntity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*MessageEntity) Validate

func (s *MessageEntity) Validate() error

type MessageEntityType

type MessageEntityType string

Type of the entity. Currently, can be `mention` (`@username`), `hashtag` (`#hashtag`), `cashtag` (`$USD`), `bot_command` (`/start@jobs_bot`), `url` (`https://telegram.org`), `email` (`do-not-reply@telegram.org`), `phone_number` (`+1-212-555-0123`), `bold` (**bold text**), `italic` (_italic text_), `underline` (underlined text), `strikethrough` (strikethrough text), `spoiler` (spoiler message), `code` (monowidth string), `pre` (monowidth block), `text_link` (for clickable text URLs), `text_mention` (for users [without usernames](https://telegram. org/blog/edit#new-mentions)), `custom_emoji` (for inline custom emoji stickers).

const (
	MessageEntityTypeMention       MessageEntityType = "mention"
	MessageEntityTypeHashtag       MessageEntityType = "hashtag"
	MessageEntityTypeCashtag       MessageEntityType = "cashtag"
	MessageEntityTypeBotCommand    MessageEntityType = "bot_command"
	MessageEntityTypeURL           MessageEntityType = "url"
	MessageEntityTypeEmail         MessageEntityType = "email"
	MessageEntityTypePhoneNumber   MessageEntityType = "phone_number"
	MessageEntityTypeBold          MessageEntityType = "bold"
	MessageEntityTypeItalic        MessageEntityType = "italic"
	MessageEntityTypeUnderline     MessageEntityType = "underline"
	MessageEntityTypeStrikethrough MessageEntityType = "strikethrough"
	MessageEntityTypeSpoiler       MessageEntityType = "spoiler"
	MessageEntityTypeCode          MessageEntityType = "code"
	MessageEntityTypePre           MessageEntityType = "pre"
	MessageEntityTypeTextLink      MessageEntityType = "text_link"
	MessageEntityTypeTextMention   MessageEntityType = "text_mention"
	MessageEntityTypeCustomEmoji   MessageEntityType = "custom_emoji"
)

func (*MessageEntityType) Decode

func (s *MessageEntityType) Decode(d *jx.Decoder) error

Decode decodes MessageEntityType from json.

func (MessageEntityType) Encode

func (s MessageEntityType) Encode(e *jx.Encoder)

Encode encodes MessageEntityType as json.

func (MessageEntityType) MarshalJSON

func (s MessageEntityType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (MessageEntityType) MarshalText

func (s MessageEntityType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*MessageEntityType) UnmarshalJSON

func (s *MessageEntityType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*MessageEntityType) UnmarshalText

func (s *MessageEntityType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (MessageEntityType) Validate

func (s MessageEntityType) Validate() error

type MessageId

type MessageId struct {
	// Unique message identifier.
	MessageID int `json:"message_id"`
}

This object represents a unique message identifier. Ref: #/components/schemas/MessageId

func (*MessageId) Decode

func (s *MessageId) Decode(d *jx.Decoder) error

Decode decodes MessageId from json.

func (*MessageId) Encode

func (s *MessageId) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*MessageId) GetMessageID

func (s *MessageId) GetMessageID() int

GetMessageID returns the value of MessageID.

func (*MessageId) MarshalJSON

func (s *MessageId) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*MessageId) SetMessageID

func (s *MessageId) SetMessageID(val int)

SetMessageID sets the value of MessageID.

func (*MessageId) UnmarshalJSON

func (s *MessageId) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type OptAnimation

type OptAnimation struct {
	Value Animation
	Set   bool
}

OptAnimation is optional Animation.

func NewOptAnimation

func NewOptAnimation(v Animation) OptAnimation

NewOptAnimation returns new OptAnimation with value set to v.

func (*OptAnimation) Decode

func (o *OptAnimation) Decode(d *jx.Decoder) error

Decode decodes Animation from json.

func (OptAnimation) Encode

func (o OptAnimation) Encode(e *jx.Encoder)

Encode encodes Animation as json.

func (OptAnimation) Get

func (o OptAnimation) Get() (v Animation, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptAnimation) IsSet

func (o OptAnimation) IsSet() bool

IsSet returns true if OptAnimation was set.

func (OptAnimation) MarshalJSON

func (s OptAnimation) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptAnimation) Or

Or returns value if set, or given parameter if does not.

func (*OptAnimation) Reset

func (o *OptAnimation) Reset()

Reset unsets value.

func (*OptAnimation) SetTo

func (o *OptAnimation) SetTo(v Animation)

SetTo sets value to v.

func (*OptAnimation) UnmarshalJSON

func (s *OptAnimation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptAudio

type OptAudio struct {
	Value Audio
	Set   bool
}

OptAudio is optional Audio.

func NewOptAudio

func NewOptAudio(v Audio) OptAudio

NewOptAudio returns new OptAudio with value set to v.

func (*OptAudio) Decode

func (o *OptAudio) Decode(d *jx.Decoder) error

Decode decodes Audio from json.

func (OptAudio) Encode

func (o OptAudio) Encode(e *jx.Encoder)

Encode encodes Audio as json.

func (OptAudio) Get

func (o OptAudio) Get() (v Audio, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptAudio) IsSet

func (o OptAudio) IsSet() bool

IsSet returns true if OptAudio was set.

func (OptAudio) MarshalJSON

func (s OptAudio) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptAudio) Or

func (o OptAudio) Or(d Audio) Audio

Or returns value if set, or given parameter if does not.

func (*OptAudio) Reset

func (o *OptAudio) Reset()

Reset unsets value.

func (*OptAudio) SetTo

func (o *OptAudio) SetTo(v Audio)

SetTo sets value to v.

func (*OptAudio) UnmarshalJSON

func (s *OptAudio) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptBool

type OptBool struct {
	Value bool
	Set   bool
}

OptBool is optional bool.

func NewOptBool

func NewOptBool(v bool) OptBool

NewOptBool returns new OptBool with value set to v.

func (*OptBool) Decode

func (o *OptBool) Decode(d *jx.Decoder) error

Decode decodes bool from json.

func (OptBool) Encode

func (o OptBool) Encode(e *jx.Encoder)

Encode encodes bool as json.

func (OptBool) Get

func (o OptBool) Get() (v bool, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptBool) IsSet

func (o OptBool) IsSet() bool

IsSet returns true if OptBool was set.

func (OptBool) MarshalJSON

func (s OptBool) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptBool) Or

func (o OptBool) Or(d bool) bool

Or returns value if set, or given parameter if does not.

func (*OptBool) Reset

func (o *OptBool) Reset()

Reset unsets value.

func (*OptBool) SetTo

func (o *OptBool) SetTo(v bool)

SetTo sets value to v.

func (*OptBool) UnmarshalJSON

func (s *OptBool) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptBotCommandScope

type OptBotCommandScope struct {
	Value BotCommandScope
	Set   bool
}

OptBotCommandScope is optional BotCommandScope.

func NewOptBotCommandScope

func NewOptBotCommandScope(v BotCommandScope) OptBotCommandScope

NewOptBotCommandScope returns new OptBotCommandScope with value set to v.

func (*OptBotCommandScope) Decode

func (o *OptBotCommandScope) Decode(d *jx.Decoder) error

Decode decodes BotCommandScope from json.

func (OptBotCommandScope) Encode

func (o OptBotCommandScope) Encode(e *jx.Encoder)

Encode encodes BotCommandScope as json.

func (OptBotCommandScope) Get

func (o OptBotCommandScope) Get() (v BotCommandScope, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptBotCommandScope) IsSet

func (o OptBotCommandScope) IsSet() bool

IsSet returns true if OptBotCommandScope was set.

func (OptBotCommandScope) MarshalJSON

func (s OptBotCommandScope) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptBotCommandScope) Or

Or returns value if set, or given parameter if does not.

func (*OptBotCommandScope) Reset

func (o *OptBotCommandScope) Reset()

Reset unsets value.

func (*OptBotCommandScope) SetTo

func (o *OptBotCommandScope) SetTo(v BotCommandScope)

SetTo sets value to v.

func (*OptBotCommandScope) UnmarshalJSON

func (s *OptBotCommandScope) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptCallbackQuery

type OptCallbackQuery struct {
	Value CallbackQuery
	Set   bool
}

OptCallbackQuery is optional CallbackQuery.

func NewOptCallbackQuery

func NewOptCallbackQuery(v CallbackQuery) OptCallbackQuery

NewOptCallbackQuery returns new OptCallbackQuery with value set to v.

func (*OptCallbackQuery) Decode

func (o *OptCallbackQuery) Decode(d *jx.Decoder) error

Decode decodes CallbackQuery from json.

func (OptCallbackQuery) Encode

func (o OptCallbackQuery) Encode(e *jx.Encoder)

Encode encodes CallbackQuery as json.

func (OptCallbackQuery) Get

func (o OptCallbackQuery) Get() (v CallbackQuery, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptCallbackQuery) IsSet

func (o OptCallbackQuery) IsSet() bool

IsSet returns true if OptCallbackQuery was set.

func (OptCallbackQuery) MarshalJSON

func (s OptCallbackQuery) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptCallbackQuery) Or

Or returns value if set, or given parameter if does not.

func (*OptCallbackQuery) Reset

func (o *OptCallbackQuery) Reset()

Reset unsets value.

func (*OptCallbackQuery) SetTo

func (o *OptCallbackQuery) SetTo(v CallbackQuery)

SetTo sets value to v.

func (*OptCallbackQuery) UnmarshalJSON

func (s *OptCallbackQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptChat

type OptChat struct {
	Value Chat
	Set   bool
}

OptChat is optional Chat.

func NewOptChat

func NewOptChat(v Chat) OptChat

NewOptChat returns new OptChat with value set to v.

func (*OptChat) Decode

func (o *OptChat) Decode(d *jx.Decoder) error

Decode decodes Chat from json.

func (OptChat) Encode

func (o OptChat) Encode(e *jx.Encoder)

Encode encodes Chat as json.

func (OptChat) Get

func (o OptChat) Get() (v Chat, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptChat) IsSet

func (o OptChat) IsSet() bool

IsSet returns true if OptChat was set.

func (OptChat) MarshalJSON

func (s OptChat) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptChat) Or

func (o OptChat) Or(d Chat) Chat

Or returns value if set, or given parameter if does not.

func (*OptChat) Reset

func (o *OptChat) Reset()

Reset unsets value.

func (*OptChat) SetTo

func (o *OptChat) SetTo(v Chat)

SetTo sets value to v.

func (*OptChat) UnmarshalJSON

func (s *OptChat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptChatAdministratorRights

type OptChatAdministratorRights struct {
	Value ChatAdministratorRights
	Set   bool
}

OptChatAdministratorRights is optional ChatAdministratorRights.

func NewOptChatAdministratorRights

func NewOptChatAdministratorRights(v ChatAdministratorRights) OptChatAdministratorRights

NewOptChatAdministratorRights returns new OptChatAdministratorRights with value set to v.

func (*OptChatAdministratorRights) Decode

Decode decodes ChatAdministratorRights from json.

func (OptChatAdministratorRights) Encode

func (o OptChatAdministratorRights) Encode(e *jx.Encoder)

Encode encodes ChatAdministratorRights as json.

func (OptChatAdministratorRights) Get

Get returns value and boolean that denotes whether value was set.

func (OptChatAdministratorRights) IsSet

func (o OptChatAdministratorRights) IsSet() bool

IsSet returns true if OptChatAdministratorRights was set.

func (OptChatAdministratorRights) MarshalJSON

func (s OptChatAdministratorRights) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptChatAdministratorRights) Or

Or returns value if set, or given parameter if does not.

func (*OptChatAdministratorRights) Reset

func (o *OptChatAdministratorRights) Reset()

Reset unsets value.

func (*OptChatAdministratorRights) SetTo

SetTo sets value to v.

func (*OptChatAdministratorRights) UnmarshalJSON

func (s *OptChatAdministratorRights) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptChatInviteLink struct {
	Value ChatInviteLink
	Set   bool
}

OptChatInviteLink is optional ChatInviteLink.

func NewOptChatInviteLink(v ChatInviteLink) OptChatInviteLink

NewOptChatInviteLink returns new OptChatInviteLink with value set to v.

func (*OptChatInviteLink) Decode

func (o *OptChatInviteLink) Decode(d *jx.Decoder) error

Decode decodes ChatInviteLink from json.

func (OptChatInviteLink) Encode

func (o OptChatInviteLink) Encode(e *jx.Encoder)

Encode encodes ChatInviteLink as json.

func (OptChatInviteLink) Get

func (o OptChatInviteLink) Get() (v ChatInviteLink, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptChatInviteLink) IsSet

func (o OptChatInviteLink) IsSet() bool

IsSet returns true if OptChatInviteLink was set.

func (OptChatInviteLink) MarshalJSON

func (s OptChatInviteLink) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptChatInviteLink) Or

Or returns value if set, or given parameter if does not.

func (*OptChatInviteLink) Reset

func (o *OptChatInviteLink) Reset()

Reset unsets value.

func (*OptChatInviteLink) SetTo

func (o *OptChatInviteLink) SetTo(v ChatInviteLink)

SetTo sets value to v.

func (*OptChatInviteLink) UnmarshalJSON

func (s *OptChatInviteLink) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptChatJoinRequest

type OptChatJoinRequest struct {
	Value ChatJoinRequest
	Set   bool
}

OptChatJoinRequest is optional ChatJoinRequest.

func NewOptChatJoinRequest

func NewOptChatJoinRequest(v ChatJoinRequest) OptChatJoinRequest

NewOptChatJoinRequest returns new OptChatJoinRequest with value set to v.

func (*OptChatJoinRequest) Decode

func (o *OptChatJoinRequest) Decode(d *jx.Decoder) error

Decode decodes ChatJoinRequest from json.

func (OptChatJoinRequest) Encode

func (o OptChatJoinRequest) Encode(e *jx.Encoder)

Encode encodes ChatJoinRequest as json.

func (OptChatJoinRequest) Get

func (o OptChatJoinRequest) Get() (v ChatJoinRequest, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptChatJoinRequest) IsSet

func (o OptChatJoinRequest) IsSet() bool

IsSet returns true if OptChatJoinRequest was set.

func (OptChatJoinRequest) MarshalJSON

func (s OptChatJoinRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptChatJoinRequest) Or

Or returns value if set, or given parameter if does not.

func (*OptChatJoinRequest) Reset

func (o *OptChatJoinRequest) Reset()

Reset unsets value.

func (*OptChatJoinRequest) SetTo

func (o *OptChatJoinRequest) SetTo(v ChatJoinRequest)

SetTo sets value to v.

func (*OptChatJoinRequest) UnmarshalJSON

func (s *OptChatJoinRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptChatLocation

type OptChatLocation struct {
	Value ChatLocation
	Set   bool
}

OptChatLocation is optional ChatLocation.

func NewOptChatLocation

func NewOptChatLocation(v ChatLocation) OptChatLocation

NewOptChatLocation returns new OptChatLocation with value set to v.

func (*OptChatLocation) Decode

func (o *OptChatLocation) Decode(d *jx.Decoder) error

Decode decodes ChatLocation from json.

func (OptChatLocation) Encode

func (o OptChatLocation) Encode(e *jx.Encoder)

Encode encodes ChatLocation as json.

func (OptChatLocation) Get

func (o OptChatLocation) Get() (v ChatLocation, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptChatLocation) IsSet

func (o OptChatLocation) IsSet() bool

IsSet returns true if OptChatLocation was set.

func (OptChatLocation) MarshalJSON

func (s OptChatLocation) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptChatLocation) Or

Or returns value if set, or given parameter if does not.

func (*OptChatLocation) Reset

func (o *OptChatLocation) Reset()

Reset unsets value.

func (*OptChatLocation) SetTo

func (o *OptChatLocation) SetTo(v ChatLocation)

SetTo sets value to v.

func (*OptChatLocation) UnmarshalJSON

func (s *OptChatLocation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptChatMember

type OptChatMember struct {
	Value ChatMember
	Set   bool
}

OptChatMember is optional ChatMember.

func NewOptChatMember

func NewOptChatMember(v ChatMember) OptChatMember

NewOptChatMember returns new OptChatMember with value set to v.

func (*OptChatMember) Decode

func (o *OptChatMember) Decode(d *jx.Decoder) error

Decode decodes ChatMember from json.

func (OptChatMember) Encode

func (o OptChatMember) Encode(e *jx.Encoder)

Encode encodes ChatMember as json.

func (OptChatMember) Get

func (o OptChatMember) Get() (v ChatMember, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptChatMember) IsSet

func (o OptChatMember) IsSet() bool

IsSet returns true if OptChatMember was set.

func (OptChatMember) MarshalJSON

func (s OptChatMember) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptChatMember) Or

Or returns value if set, or given parameter if does not.

func (*OptChatMember) Reset

func (o *OptChatMember) Reset()

Reset unsets value.

func (*OptChatMember) SetTo

func (o *OptChatMember) SetTo(v ChatMember)

SetTo sets value to v.

func (*OptChatMember) UnmarshalJSON

func (s *OptChatMember) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptChatMemberUpdated

type OptChatMemberUpdated struct {
	Value ChatMemberUpdated
	Set   bool
}

OptChatMemberUpdated is optional ChatMemberUpdated.

func NewOptChatMemberUpdated

func NewOptChatMemberUpdated(v ChatMemberUpdated) OptChatMemberUpdated

NewOptChatMemberUpdated returns new OptChatMemberUpdated with value set to v.

func (*OptChatMemberUpdated) Decode

func (o *OptChatMemberUpdated) Decode(d *jx.Decoder) error

Decode decodes ChatMemberUpdated from json.

func (OptChatMemberUpdated) Encode

func (o OptChatMemberUpdated) Encode(e *jx.Encoder)

Encode encodes ChatMemberUpdated as json.

func (OptChatMemberUpdated) Get

Get returns value and boolean that denotes whether value was set.

func (OptChatMemberUpdated) IsSet

func (o OptChatMemberUpdated) IsSet() bool

IsSet returns true if OptChatMemberUpdated was set.

func (OptChatMemberUpdated) MarshalJSON

func (s OptChatMemberUpdated) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptChatMemberUpdated) Or

Or returns value if set, or given parameter if does not.

func (*OptChatMemberUpdated) Reset

func (o *OptChatMemberUpdated) Reset()

Reset unsets value.

func (*OptChatMemberUpdated) SetTo

SetTo sets value to v.

func (*OptChatMemberUpdated) UnmarshalJSON

func (s *OptChatMemberUpdated) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptChatPermissions

type OptChatPermissions struct {
	Value ChatPermissions
	Set   bool
}

OptChatPermissions is optional ChatPermissions.

func NewOptChatPermissions

func NewOptChatPermissions(v ChatPermissions) OptChatPermissions

NewOptChatPermissions returns new OptChatPermissions with value set to v.

func (*OptChatPermissions) Decode

func (o *OptChatPermissions) Decode(d *jx.Decoder) error

Decode decodes ChatPermissions from json.

func (OptChatPermissions) Encode

func (o OptChatPermissions) Encode(e *jx.Encoder)

Encode encodes ChatPermissions as json.

func (OptChatPermissions) Get

func (o OptChatPermissions) Get() (v ChatPermissions, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptChatPermissions) IsSet

func (o OptChatPermissions) IsSet() bool

IsSet returns true if OptChatPermissions was set.

func (OptChatPermissions) MarshalJSON

func (s OptChatPermissions) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptChatPermissions) Or

Or returns value if set, or given parameter if does not.

func (*OptChatPermissions) Reset

func (o *OptChatPermissions) Reset()

Reset unsets value.

func (*OptChatPermissions) SetTo

func (o *OptChatPermissions) SetTo(v ChatPermissions)

SetTo sets value to v.

func (*OptChatPermissions) UnmarshalJSON

func (s *OptChatPermissions) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptChatPhoto

type OptChatPhoto struct {
	Value ChatPhoto
	Set   bool
}

OptChatPhoto is optional ChatPhoto.

func NewOptChatPhoto

func NewOptChatPhoto(v ChatPhoto) OptChatPhoto

NewOptChatPhoto returns new OptChatPhoto with value set to v.

func (*OptChatPhoto) Decode

func (o *OptChatPhoto) Decode(d *jx.Decoder) error

Decode decodes ChatPhoto from json.

func (OptChatPhoto) Encode

func (o OptChatPhoto) Encode(e *jx.Encoder)

Encode encodes ChatPhoto as json.

func (OptChatPhoto) Get

func (o OptChatPhoto) Get() (v ChatPhoto, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptChatPhoto) IsSet

func (o OptChatPhoto) IsSet() bool

IsSet returns true if OptChatPhoto was set.

func (OptChatPhoto) MarshalJSON

func (s OptChatPhoto) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptChatPhoto) Or

Or returns value if set, or given parameter if does not.

func (*OptChatPhoto) Reset

func (o *OptChatPhoto) Reset()

Reset unsets value.

func (*OptChatPhoto) SetTo

func (o *OptChatPhoto) SetTo(v ChatPhoto)

SetTo sets value to v.

func (*OptChatPhoto) UnmarshalJSON

func (s *OptChatPhoto) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptChatShared

type OptChatShared struct {
	Value ChatShared
	Set   bool
}

OptChatShared is optional ChatShared.

func NewOptChatShared

func NewOptChatShared(v ChatShared) OptChatShared

NewOptChatShared returns new OptChatShared with value set to v.

func (*OptChatShared) Decode

func (o *OptChatShared) Decode(d *jx.Decoder) error

Decode decodes ChatShared from json.

func (OptChatShared) Encode

func (o OptChatShared) Encode(e *jx.Encoder)

Encode encodes ChatShared as json.

func (OptChatShared) Get

func (o OptChatShared) Get() (v ChatShared, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptChatShared) IsSet

func (o OptChatShared) IsSet() bool

IsSet returns true if OptChatShared was set.

func (OptChatShared) MarshalJSON

func (s OptChatShared) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptChatShared) Or

Or returns value if set, or given parameter if does not.

func (*OptChatShared) Reset

func (o *OptChatShared) Reset()

Reset unsets value.

func (*OptChatShared) SetTo

func (o *OptChatShared) SetTo(v ChatShared)

SetTo sets value to v.

func (*OptChatShared) UnmarshalJSON

func (s *OptChatShared) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptChosenInlineResult

type OptChosenInlineResult struct {
	Value ChosenInlineResult
	Set   bool
}

OptChosenInlineResult is optional ChosenInlineResult.

func NewOptChosenInlineResult

func NewOptChosenInlineResult(v ChosenInlineResult) OptChosenInlineResult

NewOptChosenInlineResult returns new OptChosenInlineResult with value set to v.

func (*OptChosenInlineResult) Decode

func (o *OptChosenInlineResult) Decode(d *jx.Decoder) error

Decode decodes ChosenInlineResult from json.

func (OptChosenInlineResult) Encode

func (o OptChosenInlineResult) Encode(e *jx.Encoder)

Encode encodes ChosenInlineResult as json.

func (OptChosenInlineResult) Get

Get returns value and boolean that denotes whether value was set.

func (OptChosenInlineResult) IsSet

func (o OptChosenInlineResult) IsSet() bool

IsSet returns true if OptChosenInlineResult was set.

func (OptChosenInlineResult) MarshalJSON

func (s OptChosenInlineResult) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptChosenInlineResult) Or

Or returns value if set, or given parameter if does not.

func (*OptChosenInlineResult) Reset

func (o *OptChosenInlineResult) Reset()

Reset unsets value.

func (*OptChosenInlineResult) SetTo

SetTo sets value to v.

func (*OptChosenInlineResult) UnmarshalJSON

func (s *OptChosenInlineResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptContact

type OptContact struct {
	Value Contact
	Set   bool
}

OptContact is optional Contact.

func NewOptContact

func NewOptContact(v Contact) OptContact

NewOptContact returns new OptContact with value set to v.

func (*OptContact) Decode

func (o *OptContact) Decode(d *jx.Decoder) error

Decode decodes Contact from json.

func (OptContact) Encode

func (o OptContact) Encode(e *jx.Encoder)

Encode encodes Contact as json.

func (OptContact) Get

func (o OptContact) Get() (v Contact, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptContact) IsSet

func (o OptContact) IsSet() bool

IsSet returns true if OptContact was set.

func (OptContact) MarshalJSON

func (s OptContact) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptContact) Or

func (o OptContact) Or(d Contact) Contact

Or returns value if set, or given parameter if does not.

func (*OptContact) Reset

func (o *OptContact) Reset()

Reset unsets value.

func (*OptContact) SetTo

func (o *OptContact) SetTo(v Contact)

SetTo sets value to v.

func (*OptContact) UnmarshalJSON

func (s *OptContact) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptDeleteMyCommands

type OptDeleteMyCommands struct {
	Value DeleteMyCommands
	Set   bool
}

OptDeleteMyCommands is optional DeleteMyCommands.

func NewOptDeleteMyCommands

func NewOptDeleteMyCommands(v DeleteMyCommands) OptDeleteMyCommands

NewOptDeleteMyCommands returns new OptDeleteMyCommands with value set to v.

func (*OptDeleteMyCommands) Decode

func (o *OptDeleteMyCommands) Decode(d *jx.Decoder) error

Decode decodes DeleteMyCommands from json.

func (OptDeleteMyCommands) Encode

func (o OptDeleteMyCommands) Encode(e *jx.Encoder)

Encode encodes DeleteMyCommands as json.

func (OptDeleteMyCommands) Get

func (o OptDeleteMyCommands) Get() (v DeleteMyCommands, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptDeleteMyCommands) IsSet

func (o OptDeleteMyCommands) IsSet() bool

IsSet returns true if OptDeleteMyCommands was set.

func (OptDeleteMyCommands) MarshalJSON

func (s OptDeleteMyCommands) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptDeleteMyCommands) Or

Or returns value if set, or given parameter if does not.

func (*OptDeleteMyCommands) Reset

func (o *OptDeleteMyCommands) Reset()

Reset unsets value.

func (*OptDeleteMyCommands) SetTo

SetTo sets value to v.

func (*OptDeleteMyCommands) UnmarshalJSON

func (s *OptDeleteMyCommands) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptDeleteWebhook

type OptDeleteWebhook struct {
	Value DeleteWebhook
	Set   bool
}

OptDeleteWebhook is optional DeleteWebhook.

func NewOptDeleteWebhook

func NewOptDeleteWebhook(v DeleteWebhook) OptDeleteWebhook

NewOptDeleteWebhook returns new OptDeleteWebhook with value set to v.

func (*OptDeleteWebhook) Decode

func (o *OptDeleteWebhook) Decode(d *jx.Decoder) error

Decode decodes DeleteWebhook from json.

func (OptDeleteWebhook) Encode

func (o OptDeleteWebhook) Encode(e *jx.Encoder)

Encode encodes DeleteWebhook as json.

func (OptDeleteWebhook) Get

func (o OptDeleteWebhook) Get() (v DeleteWebhook, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptDeleteWebhook) IsSet

func (o OptDeleteWebhook) IsSet() bool

IsSet returns true if OptDeleteWebhook was set.

func (OptDeleteWebhook) MarshalJSON

func (s OptDeleteWebhook) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptDeleteWebhook) Or

Or returns value if set, or given parameter if does not.

func (*OptDeleteWebhook) Reset

func (o *OptDeleteWebhook) Reset()

Reset unsets value.

func (*OptDeleteWebhook) SetTo

func (o *OptDeleteWebhook) SetTo(v DeleteWebhook)

SetTo sets value to v.

func (*OptDeleteWebhook) UnmarshalJSON

func (s *OptDeleteWebhook) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptDice

type OptDice struct {
	Value Dice
	Set   bool
}

OptDice is optional Dice.

func NewOptDice

func NewOptDice(v Dice) OptDice

NewOptDice returns new OptDice with value set to v.

func (*OptDice) Decode

func (o *OptDice) Decode(d *jx.Decoder) error

Decode decodes Dice from json.

func (OptDice) Encode

func (o OptDice) Encode(e *jx.Encoder)

Encode encodes Dice as json.

func (OptDice) Get

func (o OptDice) Get() (v Dice, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptDice) IsSet

func (o OptDice) IsSet() bool

IsSet returns true if OptDice was set.

func (OptDice) MarshalJSON

func (s OptDice) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptDice) Or

func (o OptDice) Or(d Dice) Dice

Or returns value if set, or given parameter if does not.

func (*OptDice) Reset

func (o *OptDice) Reset()

Reset unsets value.

func (*OptDice) SetTo

func (o *OptDice) SetTo(v Dice)

SetTo sets value to v.

func (*OptDice) UnmarshalJSON

func (s *OptDice) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptDocument

type OptDocument struct {
	Value Document
	Set   bool
}

OptDocument is optional Document.

func NewOptDocument

func NewOptDocument(v Document) OptDocument

NewOptDocument returns new OptDocument with value set to v.

func (*OptDocument) Decode

func (o *OptDocument) Decode(d *jx.Decoder) error

Decode decodes Document from json.

func (OptDocument) Encode

func (o OptDocument) Encode(e *jx.Encoder)

Encode encodes Document as json.

func (OptDocument) Get

func (o OptDocument) Get() (v Document, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptDocument) IsSet

func (o OptDocument) IsSet() bool

IsSet returns true if OptDocument was set.

func (OptDocument) MarshalJSON

func (s OptDocument) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptDocument) Or

func (o OptDocument) Or(d Document) Document

Or returns value if set, or given parameter if does not.

func (*OptDocument) Reset

func (o *OptDocument) Reset()

Reset unsets value.

func (*OptDocument) SetTo

func (o *OptDocument) SetTo(v Document)

SetTo sets value to v.

func (*OptDocument) UnmarshalJSON

func (s *OptDocument) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptFile

type OptFile struct {
	Value File
	Set   bool
}

OptFile is optional File.

func NewOptFile

func NewOptFile(v File) OptFile

NewOptFile returns new OptFile with value set to v.

func (*OptFile) Decode

func (o *OptFile) Decode(d *jx.Decoder) error

Decode decodes File from json.

func (OptFile) Encode

func (o OptFile) Encode(e *jx.Encoder)

Encode encodes File as json.

func (OptFile) Get

func (o OptFile) Get() (v File, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptFile) IsSet

func (o OptFile) IsSet() bool

IsSet returns true if OptFile was set.

func (OptFile) MarshalJSON

func (s OptFile) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptFile) Or

func (o OptFile) Or(d File) File

Or returns value if set, or given parameter if does not.

func (*OptFile) Reset

func (o *OptFile) Reset()

Reset unsets value.

func (*OptFile) SetTo

func (o *OptFile) SetTo(v File)

SetTo sets value to v.

func (*OptFile) UnmarshalJSON

func (s *OptFile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptFloat64

type OptFloat64 struct {
	Value float64
	Set   bool
}

OptFloat64 is optional float64.

func NewOptFloat64

func NewOptFloat64(v float64) OptFloat64

NewOptFloat64 returns new OptFloat64 with value set to v.

func (*OptFloat64) Decode

func (o *OptFloat64) Decode(d *jx.Decoder) error

Decode decodes float64 from json.

func (OptFloat64) Encode

func (o OptFloat64) Encode(e *jx.Encoder)

Encode encodes float64 as json.

func (OptFloat64) Get

func (o OptFloat64) Get() (v float64, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptFloat64) IsSet

func (o OptFloat64) IsSet() bool

IsSet returns true if OptFloat64 was set.

func (OptFloat64) MarshalJSON

func (s OptFloat64) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptFloat64) Or

func (o OptFloat64) Or(d float64) float64

Or returns value if set, or given parameter if does not.

func (*OptFloat64) Reset

func (o *OptFloat64) Reset()

Reset unsets value.

func (*OptFloat64) SetTo

func (o *OptFloat64) SetTo(v float64)

SetTo sets value to v.

func (*OptFloat64) UnmarshalJSON

func (s *OptFloat64) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptForumTopicCreated

type OptForumTopicCreated struct {
	Value ForumTopicCreated
	Set   bool
}

OptForumTopicCreated is optional ForumTopicCreated.

func NewOptForumTopicCreated

func NewOptForumTopicCreated(v ForumTopicCreated) OptForumTopicCreated

NewOptForumTopicCreated returns new OptForumTopicCreated with value set to v.

func (*OptForumTopicCreated) Decode

func (o *OptForumTopicCreated) Decode(d *jx.Decoder) error

Decode decodes ForumTopicCreated from json.

func (OptForumTopicCreated) Encode

func (o OptForumTopicCreated) Encode(e *jx.Encoder)

Encode encodes ForumTopicCreated as json.

func (OptForumTopicCreated) Get

Get returns value and boolean that denotes whether value was set.

func (OptForumTopicCreated) IsSet

func (o OptForumTopicCreated) IsSet() bool

IsSet returns true if OptForumTopicCreated was set.

func (OptForumTopicCreated) MarshalJSON

func (s OptForumTopicCreated) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptForumTopicCreated) Or

Or returns value if set, or given parameter if does not.

func (*OptForumTopicCreated) Reset

func (o *OptForumTopicCreated) Reset()

Reset unsets value.

func (*OptForumTopicCreated) SetTo

SetTo sets value to v.

func (*OptForumTopicCreated) UnmarshalJSON

func (s *OptForumTopicCreated) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptForumTopicEdited

type OptForumTopicEdited struct {
	Value ForumTopicEdited
	Set   bool
}

OptForumTopicEdited is optional ForumTopicEdited.

func NewOptForumTopicEdited

func NewOptForumTopicEdited(v ForumTopicEdited) OptForumTopicEdited

NewOptForumTopicEdited returns new OptForumTopicEdited with value set to v.

func (*OptForumTopicEdited) Decode

func (o *OptForumTopicEdited) Decode(d *jx.Decoder) error

Decode decodes ForumTopicEdited from json.

func (OptForumTopicEdited) Encode

func (o OptForumTopicEdited) Encode(e *jx.Encoder)

Encode encodes ForumTopicEdited as json.

func (OptForumTopicEdited) Get

func (o OptForumTopicEdited) Get() (v ForumTopicEdited, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptForumTopicEdited) IsSet

func (o OptForumTopicEdited) IsSet() bool

IsSet returns true if OptForumTopicEdited was set.

func (OptForumTopicEdited) MarshalJSON

func (s OptForumTopicEdited) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptForumTopicEdited) Or

Or returns value if set, or given parameter if does not.

func (*OptForumTopicEdited) Reset

func (o *OptForumTopicEdited) Reset()

Reset unsets value.

func (*OptForumTopicEdited) SetTo

SetTo sets value to v.

func (*OptForumTopicEdited) UnmarshalJSON

func (s *OptForumTopicEdited) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptGame

type OptGame struct {
	Value Game
	Set   bool
}

OptGame is optional Game.

func NewOptGame

func NewOptGame(v Game) OptGame

NewOptGame returns new OptGame with value set to v.

func (*OptGame) Decode

func (o *OptGame) Decode(d *jx.Decoder) error

Decode decodes Game from json.

func (OptGame) Encode

func (o OptGame) Encode(e *jx.Encoder)

Encode encodes Game as json.

func (OptGame) Get

func (o OptGame) Get() (v Game, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptGame) IsSet

func (o OptGame) IsSet() bool

IsSet returns true if OptGame was set.

func (OptGame) MarshalJSON

func (s OptGame) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptGame) Or

func (o OptGame) Or(d Game) Game

Or returns value if set, or given parameter if does not.

func (*OptGame) Reset

func (o *OptGame) Reset()

Reset unsets value.

func (*OptGame) SetTo

func (o *OptGame) SetTo(v Game)

SetTo sets value to v.

func (*OptGame) UnmarshalJSON

func (s *OptGame) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptGetChatMenuButton

type OptGetChatMenuButton struct {
	Value GetChatMenuButton
	Set   bool
}

OptGetChatMenuButton is optional GetChatMenuButton.

func NewOptGetChatMenuButton

func NewOptGetChatMenuButton(v GetChatMenuButton) OptGetChatMenuButton

NewOptGetChatMenuButton returns new OptGetChatMenuButton with value set to v.

func (*OptGetChatMenuButton) Decode

func (o *OptGetChatMenuButton) Decode(d *jx.Decoder) error

Decode decodes GetChatMenuButton from json.

func (OptGetChatMenuButton) Encode

func (o OptGetChatMenuButton) Encode(e *jx.Encoder)

Encode encodes GetChatMenuButton as json.

func (OptGetChatMenuButton) Get

Get returns value and boolean that denotes whether value was set.

func (OptGetChatMenuButton) IsSet

func (o OptGetChatMenuButton) IsSet() bool

IsSet returns true if OptGetChatMenuButton was set.

func (OptGetChatMenuButton) MarshalJSON

func (s OptGetChatMenuButton) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptGetChatMenuButton) Or

Or returns value if set, or given parameter if does not.

func (*OptGetChatMenuButton) Reset

func (o *OptGetChatMenuButton) Reset()

Reset unsets value.

func (*OptGetChatMenuButton) SetTo

SetTo sets value to v.

func (*OptGetChatMenuButton) UnmarshalJSON

func (s *OptGetChatMenuButton) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptGetMyCommands

type OptGetMyCommands struct {
	Value GetMyCommands
	Set   bool
}

OptGetMyCommands is optional GetMyCommands.

func NewOptGetMyCommands

func NewOptGetMyCommands(v GetMyCommands) OptGetMyCommands

NewOptGetMyCommands returns new OptGetMyCommands with value set to v.

func (*OptGetMyCommands) Decode

func (o *OptGetMyCommands) Decode(d *jx.Decoder) error

Decode decodes GetMyCommands from json.

func (OptGetMyCommands) Encode

func (o OptGetMyCommands) Encode(e *jx.Encoder)

Encode encodes GetMyCommands as json.

func (OptGetMyCommands) Get

func (o OptGetMyCommands) Get() (v GetMyCommands, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptGetMyCommands) IsSet

func (o OptGetMyCommands) IsSet() bool

IsSet returns true if OptGetMyCommands was set.

func (OptGetMyCommands) MarshalJSON

func (s OptGetMyCommands) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptGetMyCommands) Or

Or returns value if set, or given parameter if does not.

func (*OptGetMyCommands) Reset

func (o *OptGetMyCommands) Reset()

Reset unsets value.

func (*OptGetMyCommands) SetTo

func (o *OptGetMyCommands) SetTo(v GetMyCommands)

SetTo sets value to v.

func (*OptGetMyCommands) UnmarshalJSON

func (s *OptGetMyCommands) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptGetMyDefaultAdministratorRights

type OptGetMyDefaultAdministratorRights struct {
	Value GetMyDefaultAdministratorRights
	Set   bool
}

OptGetMyDefaultAdministratorRights is optional GetMyDefaultAdministratorRights.

func NewOptGetMyDefaultAdministratorRights

func NewOptGetMyDefaultAdministratorRights(v GetMyDefaultAdministratorRights) OptGetMyDefaultAdministratorRights

NewOptGetMyDefaultAdministratorRights returns new OptGetMyDefaultAdministratorRights with value set to v.

func (*OptGetMyDefaultAdministratorRights) Decode

Decode decodes GetMyDefaultAdministratorRights from json.

func (OptGetMyDefaultAdministratorRights) Encode

Encode encodes GetMyDefaultAdministratorRights as json.

func (OptGetMyDefaultAdministratorRights) Get

Get returns value and boolean that denotes whether value was set.

func (OptGetMyDefaultAdministratorRights) IsSet

IsSet returns true if OptGetMyDefaultAdministratorRights was set.

func (OptGetMyDefaultAdministratorRights) MarshalJSON

func (s OptGetMyDefaultAdministratorRights) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptGetMyDefaultAdministratorRights) Or

Or returns value if set, or given parameter if does not.

func (*OptGetMyDefaultAdministratorRights) Reset

Reset unsets value.

func (*OptGetMyDefaultAdministratorRights) SetTo

SetTo sets value to v.

func (*OptGetMyDefaultAdministratorRights) UnmarshalJSON

func (s *OptGetMyDefaultAdministratorRights) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptGetMyDescription

type OptGetMyDescription struct {
	Value GetMyDescription
	Set   bool
}

OptGetMyDescription is optional GetMyDescription.

func NewOptGetMyDescription

func NewOptGetMyDescription(v GetMyDescription) OptGetMyDescription

NewOptGetMyDescription returns new OptGetMyDescription with value set to v.

func (*OptGetMyDescription) Decode

func (o *OptGetMyDescription) Decode(d *jx.Decoder) error

Decode decodes GetMyDescription from json.

func (OptGetMyDescription) Encode

func (o OptGetMyDescription) Encode(e *jx.Encoder)

Encode encodes GetMyDescription as json.

func (OptGetMyDescription) Get

func (o OptGetMyDescription) Get() (v GetMyDescription, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptGetMyDescription) IsSet

func (o OptGetMyDescription) IsSet() bool

IsSet returns true if OptGetMyDescription was set.

func (OptGetMyDescription) MarshalJSON

func (s OptGetMyDescription) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptGetMyDescription) Or

Or returns value if set, or given parameter if does not.

func (*OptGetMyDescription) Reset

func (o *OptGetMyDescription) Reset()

Reset unsets value.

func (*OptGetMyDescription) SetTo

SetTo sets value to v.

func (*OptGetMyDescription) UnmarshalJSON

func (s *OptGetMyDescription) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptGetMyName

type OptGetMyName struct {
	Value GetMyName
	Set   bool
}

OptGetMyName is optional GetMyName.

func NewOptGetMyName

func NewOptGetMyName(v GetMyName) OptGetMyName

NewOptGetMyName returns new OptGetMyName with value set to v.

func (*OptGetMyName) Decode

func (o *OptGetMyName) Decode(d *jx.Decoder) error

Decode decodes GetMyName from json.

func (OptGetMyName) Encode

func (o OptGetMyName) Encode(e *jx.Encoder)

Encode encodes GetMyName as json.

func (OptGetMyName) Get

func (o OptGetMyName) Get() (v GetMyName, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptGetMyName) IsSet

func (o OptGetMyName) IsSet() bool

IsSet returns true if OptGetMyName was set.

func (OptGetMyName) MarshalJSON

func (s OptGetMyName) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptGetMyName) Or

Or returns value if set, or given parameter if does not.

func (*OptGetMyName) Reset

func (o *OptGetMyName) Reset()

Reset unsets value.

func (*OptGetMyName) SetTo

func (o *OptGetMyName) SetTo(v GetMyName)

SetTo sets value to v.

func (*OptGetMyName) UnmarshalJSON

func (s *OptGetMyName) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptGetMyShortDescription

type OptGetMyShortDescription struct {
	Value GetMyShortDescription
	Set   bool
}

OptGetMyShortDescription is optional GetMyShortDescription.

func NewOptGetMyShortDescription

func NewOptGetMyShortDescription(v GetMyShortDescription) OptGetMyShortDescription

NewOptGetMyShortDescription returns new OptGetMyShortDescription with value set to v.

func (*OptGetMyShortDescription) Decode

func (o *OptGetMyShortDescription) Decode(d *jx.Decoder) error

Decode decodes GetMyShortDescription from json.

func (OptGetMyShortDescription) Encode

func (o OptGetMyShortDescription) Encode(e *jx.Encoder)

Encode encodes GetMyShortDescription as json.

func (OptGetMyShortDescription) Get

Get returns value and boolean that denotes whether value was set.

func (OptGetMyShortDescription) IsSet

func (o OptGetMyShortDescription) IsSet() bool

IsSet returns true if OptGetMyShortDescription was set.

func (OptGetMyShortDescription) MarshalJSON

func (s OptGetMyShortDescription) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptGetMyShortDescription) Or

Or returns value if set, or given parameter if does not.

func (*OptGetMyShortDescription) Reset

func (o *OptGetMyShortDescription) Reset()

Reset unsets value.

func (*OptGetMyShortDescription) SetTo

SetTo sets value to v.

func (*OptGetMyShortDescription) UnmarshalJSON

func (s *OptGetMyShortDescription) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptGetUpdates

type OptGetUpdates struct {
	Value GetUpdates
	Set   bool
}

OptGetUpdates is optional GetUpdates.

func NewOptGetUpdates

func NewOptGetUpdates(v GetUpdates) OptGetUpdates

NewOptGetUpdates returns new OptGetUpdates with value set to v.

func (*OptGetUpdates) Decode

func (o *OptGetUpdates) Decode(d *jx.Decoder) error

Decode decodes GetUpdates from json.

func (OptGetUpdates) Encode

func (o OptGetUpdates) Encode(e *jx.Encoder)

Encode encodes GetUpdates as json.

func (OptGetUpdates) Get

func (o OptGetUpdates) Get() (v GetUpdates, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptGetUpdates) IsSet

func (o OptGetUpdates) IsSet() bool

IsSet returns true if OptGetUpdates was set.

func (OptGetUpdates) MarshalJSON

func (s OptGetUpdates) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptGetUpdates) Or

Or returns value if set, or given parameter if does not.

func (*OptGetUpdates) Reset

func (o *OptGetUpdates) Reset()

Reset unsets value.

func (*OptGetUpdates) SetTo

func (o *OptGetUpdates) SetTo(v GetUpdates)

SetTo sets value to v.

func (*OptGetUpdates) UnmarshalJSON

func (s *OptGetUpdates) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptID

type OptID struct {
	Value ID
	Set   bool
}

OptID is optional ID.

func NewOptID

func NewOptID(v ID) OptID

NewOptID returns new OptID with value set to v.

func (*OptID) Decode

func (o *OptID) Decode(d *jx.Decoder) error

Decode decodes ID from json.

func (OptID) Encode

func (o OptID) Encode(e *jx.Encoder)

Encode encodes ID as json.

func (OptID) Get

func (o OptID) Get() (v ID, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptID) IsSet

func (o OptID) IsSet() bool

IsSet returns true if OptID was set.

func (OptID) MarshalJSON

func (s OptID) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptID) Or

func (o OptID) Or(d ID) ID

Or returns value if set, or given parameter if does not.

func (*OptID) Reset

func (o *OptID) Reset()

Reset unsets value.

func (*OptID) SetTo

func (o *OptID) SetTo(v ID)

SetTo sets value to v.

func (*OptID) UnmarshalJSON

func (s *OptID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInlineKeyboardMarkup

type OptInlineKeyboardMarkup struct {
	Value InlineKeyboardMarkup
	Set   bool
}

OptInlineKeyboardMarkup is optional InlineKeyboardMarkup.

func NewOptInlineKeyboardMarkup

func NewOptInlineKeyboardMarkup(v InlineKeyboardMarkup) OptInlineKeyboardMarkup

NewOptInlineKeyboardMarkup returns new OptInlineKeyboardMarkup with value set to v.

func (*OptInlineKeyboardMarkup) Decode

func (o *OptInlineKeyboardMarkup) Decode(d *jx.Decoder) error

Decode decodes InlineKeyboardMarkup from json.

func (OptInlineKeyboardMarkup) Encode

func (o OptInlineKeyboardMarkup) Encode(e *jx.Encoder)

Encode encodes InlineKeyboardMarkup as json.

func (OptInlineKeyboardMarkup) Get

Get returns value and boolean that denotes whether value was set.

func (OptInlineKeyboardMarkup) IsSet

func (o OptInlineKeyboardMarkup) IsSet() bool

IsSet returns true if OptInlineKeyboardMarkup was set.

func (OptInlineKeyboardMarkup) MarshalJSON

func (s OptInlineKeyboardMarkup) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInlineKeyboardMarkup) Or

Or returns value if set, or given parameter if does not.

func (*OptInlineKeyboardMarkup) Reset

func (o *OptInlineKeyboardMarkup) Reset()

Reset unsets value.

func (*OptInlineKeyboardMarkup) SetTo

SetTo sets value to v.

func (*OptInlineKeyboardMarkup) UnmarshalJSON

func (s *OptInlineKeyboardMarkup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInlineQuery

type OptInlineQuery struct {
	Value InlineQuery
	Set   bool
}

OptInlineQuery is optional InlineQuery.

func NewOptInlineQuery

func NewOptInlineQuery(v InlineQuery) OptInlineQuery

NewOptInlineQuery returns new OptInlineQuery with value set to v.

func (*OptInlineQuery) Decode

func (o *OptInlineQuery) Decode(d *jx.Decoder) error

Decode decodes InlineQuery from json.

func (OptInlineQuery) Encode

func (o OptInlineQuery) Encode(e *jx.Encoder)

Encode encodes InlineQuery as json.

func (OptInlineQuery) Get

func (o OptInlineQuery) Get() (v InlineQuery, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInlineQuery) IsSet

func (o OptInlineQuery) IsSet() bool

IsSet returns true if OptInlineQuery was set.

func (OptInlineQuery) MarshalJSON

func (s OptInlineQuery) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInlineQuery) Or

Or returns value if set, or given parameter if does not.

func (*OptInlineQuery) Reset

func (o *OptInlineQuery) Reset()

Reset unsets value.

func (*OptInlineQuery) SetTo

func (o *OptInlineQuery) SetTo(v InlineQuery)

SetTo sets value to v.

func (*OptInlineQuery) UnmarshalJSON

func (s *OptInlineQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInlineQueryChatType

type OptInlineQueryChatType struct {
	Value InlineQueryChatType
	Set   bool
}

OptInlineQueryChatType is optional InlineQueryChatType.

func NewOptInlineQueryChatType

func NewOptInlineQueryChatType(v InlineQueryChatType) OptInlineQueryChatType

NewOptInlineQueryChatType returns new OptInlineQueryChatType with value set to v.

func (*OptInlineQueryChatType) Decode

func (o *OptInlineQueryChatType) Decode(d *jx.Decoder) error

Decode decodes InlineQueryChatType from json.

func (OptInlineQueryChatType) Encode

func (o OptInlineQueryChatType) Encode(e *jx.Encoder)

Encode encodes InlineQueryChatType as json.

func (OptInlineQueryChatType) Get

Get returns value and boolean that denotes whether value was set.

func (OptInlineQueryChatType) IsSet

func (o OptInlineQueryChatType) IsSet() bool

IsSet returns true if OptInlineQueryChatType was set.

func (OptInlineQueryChatType) MarshalJSON

func (s OptInlineQueryChatType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInlineQueryChatType) Or

Or returns value if set, or given parameter if does not.

func (*OptInlineQueryChatType) Reset

func (o *OptInlineQueryChatType) Reset()

Reset unsets value.

func (*OptInlineQueryChatType) SetTo

SetTo sets value to v.

func (*OptInlineQueryChatType) UnmarshalJSON

func (s *OptInlineQueryChatType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInlineQueryResultsButton

type OptInlineQueryResultsButton struct {
	Value InlineQueryResultsButton
	Set   bool
}

OptInlineQueryResultsButton is optional InlineQueryResultsButton.

func NewOptInlineQueryResultsButton

func NewOptInlineQueryResultsButton(v InlineQueryResultsButton) OptInlineQueryResultsButton

NewOptInlineQueryResultsButton returns new OptInlineQueryResultsButton with value set to v.

func (*OptInlineQueryResultsButton) Decode

Decode decodes InlineQueryResultsButton from json.

func (OptInlineQueryResultsButton) Encode

func (o OptInlineQueryResultsButton) Encode(e *jx.Encoder)

Encode encodes InlineQueryResultsButton as json.

func (OptInlineQueryResultsButton) Get

Get returns value and boolean that denotes whether value was set.

func (OptInlineQueryResultsButton) IsSet

IsSet returns true if OptInlineQueryResultsButton was set.

func (OptInlineQueryResultsButton) MarshalJSON

func (s OptInlineQueryResultsButton) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInlineQueryResultsButton) Or

Or returns value if set, or given parameter if does not.

func (*OptInlineQueryResultsButton) Reset

func (o *OptInlineQueryResultsButton) Reset()

Reset unsets value.

func (*OptInlineQueryResultsButton) SetTo

SetTo sets value to v.

func (*OptInlineQueryResultsButton) UnmarshalJSON

func (s *OptInlineQueryResultsButton) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInputMessageContent

type OptInputMessageContent struct {
	Value InputMessageContent
	Set   bool
}

OptInputMessageContent is optional InputMessageContent.

func NewOptInputMessageContent

func NewOptInputMessageContent(v InputMessageContent) OptInputMessageContent

NewOptInputMessageContent returns new OptInputMessageContent with value set to v.

func (*OptInputMessageContent) Decode

func (o *OptInputMessageContent) Decode(d *jx.Decoder) error

Decode decodes InputMessageContent from json.

func (OptInputMessageContent) Encode

func (o OptInputMessageContent) Encode(e *jx.Encoder)

Encode encodes InputMessageContent as json.

func (OptInputMessageContent) Get

Get returns value and boolean that denotes whether value was set.

func (OptInputMessageContent) IsSet

func (o OptInputMessageContent) IsSet() bool

IsSet returns true if OptInputMessageContent was set.

func (OptInputMessageContent) MarshalJSON

func (s OptInputMessageContent) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInputMessageContent) Or

Or returns value if set, or given parameter if does not.

func (*OptInputMessageContent) Reset

func (o *OptInputMessageContent) Reset()

Reset unsets value.

func (*OptInputMessageContent) SetTo

SetTo sets value to v.

func (*OptInputMessageContent) UnmarshalJSON

func (s *OptInputMessageContent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInt

type OptInt struct {
	Value int
	Set   bool
}

OptInt is optional int.

func NewOptInt

func NewOptInt(v int) OptInt

NewOptInt returns new OptInt with value set to v.

func (*OptInt) Decode

func (o *OptInt) Decode(d *jx.Decoder) error

Decode decodes int from json.

func (OptInt) Encode

func (o OptInt) Encode(e *jx.Encoder)

Encode encodes int as json.

func (OptInt) Get

func (o OptInt) Get() (v int, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInt) IsSet

func (o OptInt) IsSet() bool

IsSet returns true if OptInt was set.

func (OptInt) MarshalJSON

func (s OptInt) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInt) Or

func (o OptInt) Or(d int) int

Or returns value if set, or given parameter if does not.

func (*OptInt) Reset

func (o *OptInt) Reset()

Reset unsets value.

func (*OptInt) SetTo

func (o *OptInt) SetTo(v int)

SetTo sets value to v.

func (*OptInt) UnmarshalJSON

func (s *OptInt) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInt64

type OptInt64 struct {
	Value int64
	Set   bool
}

OptInt64 is optional int64.

func NewOptInt64

func NewOptInt64(v int64) OptInt64

NewOptInt64 returns new OptInt64 with value set to v.

func (*OptInt64) Decode

func (o *OptInt64) Decode(d *jx.Decoder) error

Decode decodes int64 from json.

func (OptInt64) Encode

func (o OptInt64) Encode(e *jx.Encoder)

Encode encodes int64 as json.

func (OptInt64) Get

func (o OptInt64) Get() (v int64, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInt64) IsSet

func (o OptInt64) IsSet() bool

IsSet returns true if OptInt64 was set.

func (OptInt64) MarshalJSON

func (s OptInt64) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInt64) Or

func (o OptInt64) Or(d int64) int64

Or returns value if set, or given parameter if does not.

func (*OptInt64) Reset

func (o *OptInt64) Reset()

Reset unsets value.

func (*OptInt64) SetTo

func (o *OptInt64) SetTo(v int64)

SetTo sets value to v.

func (*OptInt64) UnmarshalJSON

func (s *OptInt64) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInvoice

type OptInvoice struct {
	Value Invoice
	Set   bool
}

OptInvoice is optional Invoice.

func NewOptInvoice

func NewOptInvoice(v Invoice) OptInvoice

NewOptInvoice returns new OptInvoice with value set to v.

func (*OptInvoice) Decode

func (o *OptInvoice) Decode(d *jx.Decoder) error

Decode decodes Invoice from json.

func (OptInvoice) Encode

func (o OptInvoice) Encode(e *jx.Encoder)

Encode encodes Invoice as json.

func (OptInvoice) Get

func (o OptInvoice) Get() (v Invoice, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInvoice) IsSet

func (o OptInvoice) IsSet() bool

IsSet returns true if OptInvoice was set.

func (OptInvoice) MarshalJSON

func (s OptInvoice) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInvoice) Or

func (o OptInvoice) Or(d Invoice) Invoice

Or returns value if set, or given parameter if does not.

func (*OptInvoice) Reset

func (o *OptInvoice) Reset()

Reset unsets value.

func (*OptInvoice) SetTo

func (o *OptInvoice) SetTo(v Invoice)

SetTo sets value to v.

func (*OptInvoice) UnmarshalJSON

func (s *OptInvoice) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptKeyboardButtonPollType

type OptKeyboardButtonPollType struct {
	Value KeyboardButtonPollType
	Set   bool
}

OptKeyboardButtonPollType is optional KeyboardButtonPollType.

func NewOptKeyboardButtonPollType

func NewOptKeyboardButtonPollType(v KeyboardButtonPollType) OptKeyboardButtonPollType

NewOptKeyboardButtonPollType returns new OptKeyboardButtonPollType with value set to v.

func (*OptKeyboardButtonPollType) Decode

func (o *OptKeyboardButtonPollType) Decode(d *jx.Decoder) error

Decode decodes KeyboardButtonPollType from json.

func (OptKeyboardButtonPollType) Encode

func (o OptKeyboardButtonPollType) Encode(e *jx.Encoder)

Encode encodes KeyboardButtonPollType as json.

func (OptKeyboardButtonPollType) Get

Get returns value and boolean that denotes whether value was set.

func (OptKeyboardButtonPollType) IsSet

func (o OptKeyboardButtonPollType) IsSet() bool

IsSet returns true if OptKeyboardButtonPollType was set.

func (OptKeyboardButtonPollType) MarshalJSON

func (s OptKeyboardButtonPollType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptKeyboardButtonPollType) Or

Or returns value if set, or given parameter if does not.

func (*OptKeyboardButtonPollType) Reset

func (o *OptKeyboardButtonPollType) Reset()

Reset unsets value.

func (*OptKeyboardButtonPollType) SetTo

SetTo sets value to v.

func (*OptKeyboardButtonPollType) UnmarshalJSON

func (s *OptKeyboardButtonPollType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptKeyboardButtonRequestChat

type OptKeyboardButtonRequestChat struct {
	Value KeyboardButtonRequestChat
	Set   bool
}

OptKeyboardButtonRequestChat is optional KeyboardButtonRequestChat.

func NewOptKeyboardButtonRequestChat

func NewOptKeyboardButtonRequestChat(v KeyboardButtonRequestChat) OptKeyboardButtonRequestChat

NewOptKeyboardButtonRequestChat returns new OptKeyboardButtonRequestChat with value set to v.

func (*OptKeyboardButtonRequestChat) Decode

Decode decodes KeyboardButtonRequestChat from json.

func (OptKeyboardButtonRequestChat) Encode

Encode encodes KeyboardButtonRequestChat as json.

func (OptKeyboardButtonRequestChat) Get

Get returns value and boolean that denotes whether value was set.

func (OptKeyboardButtonRequestChat) IsSet

IsSet returns true if OptKeyboardButtonRequestChat was set.

func (OptKeyboardButtonRequestChat) MarshalJSON

func (s OptKeyboardButtonRequestChat) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptKeyboardButtonRequestChat) Or

Or returns value if set, or given parameter if does not.

func (*OptKeyboardButtonRequestChat) Reset

func (o *OptKeyboardButtonRequestChat) Reset()

Reset unsets value.

func (*OptKeyboardButtonRequestChat) SetTo

SetTo sets value to v.

func (*OptKeyboardButtonRequestChat) UnmarshalJSON

func (s *OptKeyboardButtonRequestChat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptKeyboardButtonRequestUser

type OptKeyboardButtonRequestUser struct {
	Value KeyboardButtonRequestUser
	Set   bool
}

OptKeyboardButtonRequestUser is optional KeyboardButtonRequestUser.

func NewOptKeyboardButtonRequestUser

func NewOptKeyboardButtonRequestUser(v KeyboardButtonRequestUser) OptKeyboardButtonRequestUser

NewOptKeyboardButtonRequestUser returns new OptKeyboardButtonRequestUser with value set to v.

func (*OptKeyboardButtonRequestUser) Decode

Decode decodes KeyboardButtonRequestUser from json.

func (OptKeyboardButtonRequestUser) Encode

Encode encodes KeyboardButtonRequestUser as json.

func (OptKeyboardButtonRequestUser) Get

Get returns value and boolean that denotes whether value was set.

func (OptKeyboardButtonRequestUser) IsSet

IsSet returns true if OptKeyboardButtonRequestUser was set.

func (OptKeyboardButtonRequestUser) MarshalJSON

func (s OptKeyboardButtonRequestUser) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptKeyboardButtonRequestUser) Or

Or returns value if set, or given parameter if does not.

func (*OptKeyboardButtonRequestUser) Reset

func (o *OptKeyboardButtonRequestUser) Reset()

Reset unsets value.

func (*OptKeyboardButtonRequestUser) SetTo

SetTo sets value to v.

func (*OptKeyboardButtonRequestUser) UnmarshalJSON

func (s *OptKeyboardButtonRequestUser) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptLocation

type OptLocation struct {
	Value Location
	Set   bool
}

OptLocation is optional Location.

func NewOptLocation

func NewOptLocation(v Location) OptLocation

NewOptLocation returns new OptLocation with value set to v.

func (*OptLocation) Decode

func (o *OptLocation) Decode(d *jx.Decoder) error

Decode decodes Location from json.

func (OptLocation) Encode

func (o OptLocation) Encode(e *jx.Encoder)

Encode encodes Location as json.

func (OptLocation) Get

func (o OptLocation) Get() (v Location, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptLocation) IsSet

func (o OptLocation) IsSet() bool

IsSet returns true if OptLocation was set.

func (OptLocation) MarshalJSON

func (s OptLocation) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptLocation) Or

func (o OptLocation) Or(d Location) Location

Or returns value if set, or given parameter if does not.

func (*OptLocation) Reset

func (o *OptLocation) Reset()

Reset unsets value.

func (*OptLocation) SetTo

func (o *OptLocation) SetTo(v Location)

SetTo sets value to v.

func (*OptLocation) UnmarshalJSON

func (s *OptLocation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptLoginUrl

type OptLoginUrl struct {
	Value LoginUrl
	Set   bool
}

OptLoginUrl is optional LoginUrl.

func NewOptLoginUrl

func NewOptLoginUrl(v LoginUrl) OptLoginUrl

NewOptLoginUrl returns new OptLoginUrl with value set to v.

func (*OptLoginUrl) Decode

func (o *OptLoginUrl) Decode(d *jx.Decoder) error

Decode decodes LoginUrl from json.

func (OptLoginUrl) Encode

func (o OptLoginUrl) Encode(e *jx.Encoder)

Encode encodes LoginUrl as json.

func (OptLoginUrl) Get

func (o OptLoginUrl) Get() (v LoginUrl, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptLoginUrl) IsSet

func (o OptLoginUrl) IsSet() bool

IsSet returns true if OptLoginUrl was set.

func (OptLoginUrl) MarshalJSON

func (s OptLoginUrl) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptLoginUrl) Or

func (o OptLoginUrl) Or(d LoginUrl) LoginUrl

Or returns value if set, or given parameter if does not.

func (*OptLoginUrl) Reset

func (o *OptLoginUrl) Reset()

Reset unsets value.

func (*OptLoginUrl) SetTo

func (o *OptLoginUrl) SetTo(v LoginUrl)

SetTo sets value to v.

func (*OptLoginUrl) UnmarshalJSON

func (s *OptLoginUrl) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptMaskPosition

type OptMaskPosition struct {
	Value MaskPosition
	Set   bool
}

OptMaskPosition is optional MaskPosition.

func NewOptMaskPosition

func NewOptMaskPosition(v MaskPosition) OptMaskPosition

NewOptMaskPosition returns new OptMaskPosition with value set to v.

func (*OptMaskPosition) Decode

func (o *OptMaskPosition) Decode(d *jx.Decoder) error

Decode decodes MaskPosition from json.

func (OptMaskPosition) Encode

func (o OptMaskPosition) Encode(e *jx.Encoder)

Encode encodes MaskPosition as json.

func (OptMaskPosition) Get

func (o OptMaskPosition) Get() (v MaskPosition, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptMaskPosition) IsSet

func (o OptMaskPosition) IsSet() bool

IsSet returns true if OptMaskPosition was set.

func (OptMaskPosition) MarshalJSON

func (s OptMaskPosition) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptMaskPosition) Or

Or returns value if set, or given parameter if does not.

func (*OptMaskPosition) Reset

func (o *OptMaskPosition) Reset()

Reset unsets value.

func (*OptMaskPosition) SetTo

func (o *OptMaskPosition) SetTo(v MaskPosition)

SetTo sets value to v.

func (*OptMaskPosition) UnmarshalJSON

func (s *OptMaskPosition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptMenuButton

type OptMenuButton struct {
	Value MenuButton
	Set   bool
}

OptMenuButton is optional MenuButton.

func NewOptMenuButton

func NewOptMenuButton(v MenuButton) OptMenuButton

NewOptMenuButton returns new OptMenuButton with value set to v.

func (*OptMenuButton) Decode

func (o *OptMenuButton) Decode(d *jx.Decoder) error

Decode decodes MenuButton from json.

func (OptMenuButton) Encode

func (o OptMenuButton) Encode(e *jx.Encoder)

Encode encodes MenuButton as json.

func (OptMenuButton) Get

func (o OptMenuButton) Get() (v MenuButton, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptMenuButton) IsSet

func (o OptMenuButton) IsSet() bool

IsSet returns true if OptMenuButton was set.

func (OptMenuButton) MarshalJSON

func (s OptMenuButton) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptMenuButton) Or

Or returns value if set, or given parameter if does not.

func (*OptMenuButton) Reset

func (o *OptMenuButton) Reset()

Reset unsets value.

func (*OptMenuButton) SetTo

func (o *OptMenuButton) SetTo(v MenuButton)

SetTo sets value to v.

func (*OptMenuButton) UnmarshalJSON

func (s *OptMenuButton) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptMessage

type OptMessage struct {
	Value Message
	Set   bool
}

OptMessage is optional Message.

func NewOptMessage

func NewOptMessage(v Message) OptMessage

NewOptMessage returns new OptMessage with value set to v.

func (*OptMessage) Decode

func (o *OptMessage) Decode(d *jx.Decoder) error

Decode decodes Message from json.

func (OptMessage) Encode

func (o OptMessage) Encode(e *jx.Encoder)

Encode encodes Message as json.

func (OptMessage) Get

func (o OptMessage) Get() (v Message, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptMessage) IsSet

func (o OptMessage) IsSet() bool

IsSet returns true if OptMessage was set.

func (OptMessage) MarshalJSON

func (s OptMessage) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptMessage) Or

func (o OptMessage) Or(d Message) Message

Or returns value if set, or given parameter if does not.

func (*OptMessage) Reset

func (o *OptMessage) Reset()

Reset unsets value.

func (*OptMessage) SetTo

func (o *OptMessage) SetTo(v Message)

SetTo sets value to v.

func (*OptMessage) UnmarshalJSON

func (s *OptMessage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptMessageAutoDeleteTimerChanged

type OptMessageAutoDeleteTimerChanged struct {
	Value MessageAutoDeleteTimerChanged
	Set   bool
}

OptMessageAutoDeleteTimerChanged is optional MessageAutoDeleteTimerChanged.

func NewOptMessageAutoDeleteTimerChanged

func NewOptMessageAutoDeleteTimerChanged(v MessageAutoDeleteTimerChanged) OptMessageAutoDeleteTimerChanged

NewOptMessageAutoDeleteTimerChanged returns new OptMessageAutoDeleteTimerChanged with value set to v.

func (*OptMessageAutoDeleteTimerChanged) Decode

Decode decodes MessageAutoDeleteTimerChanged from json.

func (OptMessageAutoDeleteTimerChanged) Encode

Encode encodes MessageAutoDeleteTimerChanged as json.

func (OptMessageAutoDeleteTimerChanged) Get

Get returns value and boolean that denotes whether value was set.

func (OptMessageAutoDeleteTimerChanged) IsSet

IsSet returns true if OptMessageAutoDeleteTimerChanged was set.

func (OptMessageAutoDeleteTimerChanged) MarshalJSON

func (s OptMessageAutoDeleteTimerChanged) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptMessageAutoDeleteTimerChanged) Or

Or returns value if set, or given parameter if does not.

func (*OptMessageAutoDeleteTimerChanged) Reset

Reset unsets value.

func (*OptMessageAutoDeleteTimerChanged) SetTo

SetTo sets value to v.

func (*OptMessageAutoDeleteTimerChanged) UnmarshalJSON

func (s *OptMessageAutoDeleteTimerChanged) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptMessageId

type OptMessageId struct {
	Value MessageId
	Set   bool
}

OptMessageId is optional MessageId.

func NewOptMessageId

func NewOptMessageId(v MessageId) OptMessageId

NewOptMessageId returns new OptMessageId with value set to v.

func (*OptMessageId) Decode

func (o *OptMessageId) Decode(d *jx.Decoder) error

Decode decodes MessageId from json.

func (OptMessageId) Encode

func (o OptMessageId) Encode(e *jx.Encoder)

Encode encodes MessageId as json.

func (OptMessageId) Get

func (o OptMessageId) Get() (v MessageId, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptMessageId) IsSet

func (o OptMessageId) IsSet() bool

IsSet returns true if OptMessageId was set.

func (OptMessageId) MarshalJSON

func (s OptMessageId) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptMessageId) Or

Or returns value if set, or given parameter if does not.

func (*OptMessageId) Reset

func (o *OptMessageId) Reset()

Reset unsets value.

func (*OptMessageId) SetTo

func (o *OptMessageId) SetTo(v MessageId)

SetTo sets value to v.

func (*OptMessageId) UnmarshalJSON

func (s *OptMessageId) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptOrderInfo

type OptOrderInfo struct {
	Value OrderInfo
	Set   bool
}

OptOrderInfo is optional OrderInfo.

func NewOptOrderInfo

func NewOptOrderInfo(v OrderInfo) OptOrderInfo

NewOptOrderInfo returns new OptOrderInfo with value set to v.

func (*OptOrderInfo) Decode

func (o *OptOrderInfo) Decode(d *jx.Decoder) error

Decode decodes OrderInfo from json.

func (OptOrderInfo) Encode

func (o OptOrderInfo) Encode(e *jx.Encoder)

Encode encodes OrderInfo as json.

func (OptOrderInfo) Get

func (o OptOrderInfo) Get() (v OrderInfo, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptOrderInfo) IsSet

func (o OptOrderInfo) IsSet() bool

IsSet returns true if OptOrderInfo was set.

func (OptOrderInfo) MarshalJSON

func (s OptOrderInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptOrderInfo) Or

Or returns value if set, or given parameter if does not.

func (*OptOrderInfo) Reset

func (o *OptOrderInfo) Reset()

Reset unsets value.

func (*OptOrderInfo) SetTo

func (o *OptOrderInfo) SetTo(v OrderInfo)

SetTo sets value to v.

func (*OptOrderInfo) UnmarshalJSON

func (s *OptOrderInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptPassportData

type OptPassportData struct {
	Value PassportData
	Set   bool
}

OptPassportData is optional PassportData.

func NewOptPassportData

func NewOptPassportData(v PassportData) OptPassportData

NewOptPassportData returns new OptPassportData with value set to v.

func (*OptPassportData) Decode

func (o *OptPassportData) Decode(d *jx.Decoder) error

Decode decodes PassportData from json.

func (OptPassportData) Encode

func (o OptPassportData) Encode(e *jx.Encoder)

Encode encodes PassportData as json.

func (OptPassportData) Get

func (o OptPassportData) Get() (v PassportData, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptPassportData) IsSet

func (o OptPassportData) IsSet() bool

IsSet returns true if OptPassportData was set.

func (OptPassportData) MarshalJSON

func (s OptPassportData) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptPassportData) Or

Or returns value if set, or given parameter if does not.

func (*OptPassportData) Reset

func (o *OptPassportData) Reset()

Reset unsets value.

func (*OptPassportData) SetTo

func (o *OptPassportData) SetTo(v PassportData)

SetTo sets value to v.

func (*OptPassportData) UnmarshalJSON

func (s *OptPassportData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptPassportFile

type OptPassportFile struct {
	Value PassportFile
	Set   bool
}

OptPassportFile is optional PassportFile.

func NewOptPassportFile

func NewOptPassportFile(v PassportFile) OptPassportFile

NewOptPassportFile returns new OptPassportFile with value set to v.

func (*OptPassportFile) Decode

func (o *OptPassportFile) Decode(d *jx.Decoder) error

Decode decodes PassportFile from json.

func (OptPassportFile) Encode

func (o OptPassportFile) Encode(e *jx.Encoder)

Encode encodes PassportFile as json.

func (OptPassportFile) Get

func (o OptPassportFile) Get() (v PassportFile, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptPassportFile) IsSet

func (o OptPassportFile) IsSet() bool

IsSet returns true if OptPassportFile was set.

func (OptPassportFile) MarshalJSON

func (s OptPassportFile) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptPassportFile) Or

Or returns value if set, or given parameter if does not.

func (*OptPassportFile) Reset

func (o *OptPassportFile) Reset()

Reset unsets value.

func (*OptPassportFile) SetTo

func (o *OptPassportFile) SetTo(v PassportFile)

SetTo sets value to v.

func (*OptPassportFile) UnmarshalJSON

func (s *OptPassportFile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptPhotoSize

type OptPhotoSize struct {
	Value PhotoSize
	Set   bool
}

OptPhotoSize is optional PhotoSize.

func NewOptPhotoSize

func NewOptPhotoSize(v PhotoSize) OptPhotoSize

NewOptPhotoSize returns new OptPhotoSize with value set to v.

func (*OptPhotoSize) Decode

func (o *OptPhotoSize) Decode(d *jx.Decoder) error

Decode decodes PhotoSize from json.

func (OptPhotoSize) Encode

func (o OptPhotoSize) Encode(e *jx.Encoder)

Encode encodes PhotoSize as json.

func (OptPhotoSize) Get

func (o OptPhotoSize) Get() (v PhotoSize, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptPhotoSize) IsSet

func (o OptPhotoSize) IsSet() bool

IsSet returns true if OptPhotoSize was set.

func (OptPhotoSize) MarshalJSON

func (s OptPhotoSize) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptPhotoSize) Or

Or returns value if set, or given parameter if does not.

func (*OptPhotoSize) Reset

func (o *OptPhotoSize) Reset()

Reset unsets value.

func (*OptPhotoSize) SetTo

func (o *OptPhotoSize) SetTo(v PhotoSize)

SetTo sets value to v.

func (*OptPhotoSize) UnmarshalJSON

func (s *OptPhotoSize) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptPoll

type OptPoll struct {
	Value Poll
	Set   bool
}

OptPoll is optional Poll.

func NewOptPoll

func NewOptPoll(v Poll) OptPoll

NewOptPoll returns new OptPoll with value set to v.

func (*OptPoll) Decode

func (o *OptPoll) Decode(d *jx.Decoder) error

Decode decodes Poll from json.

func (OptPoll) Encode

func (o OptPoll) Encode(e *jx.Encoder)

Encode encodes Poll as json.

func (OptPoll) Get

func (o OptPoll) Get() (v Poll, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptPoll) IsSet

func (o OptPoll) IsSet() bool

IsSet returns true if OptPoll was set.

func (OptPoll) MarshalJSON

func (s OptPoll) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptPoll) Or

func (o OptPoll) Or(d Poll) Poll

Or returns value if set, or given parameter if does not.

func (*OptPoll) Reset

func (o *OptPoll) Reset()

Reset unsets value.

func (*OptPoll) SetTo

func (o *OptPoll) SetTo(v Poll)

SetTo sets value to v.

func (*OptPoll) UnmarshalJSON

func (s *OptPoll) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptPollAnswer

type OptPollAnswer struct {
	Value PollAnswer
	Set   bool
}

OptPollAnswer is optional PollAnswer.

func NewOptPollAnswer

func NewOptPollAnswer(v PollAnswer) OptPollAnswer

NewOptPollAnswer returns new OptPollAnswer with value set to v.

func (*OptPollAnswer) Decode

func (o *OptPollAnswer) Decode(d *jx.Decoder) error

Decode decodes PollAnswer from json.

func (OptPollAnswer) Encode

func (o OptPollAnswer) Encode(e *jx.Encoder)

Encode encodes PollAnswer as json.

func (OptPollAnswer) Get

func (o OptPollAnswer) Get() (v PollAnswer, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptPollAnswer) IsSet

func (o OptPollAnswer) IsSet() bool

IsSet returns true if OptPollAnswer was set.

func (OptPollAnswer) MarshalJSON

func (s OptPollAnswer) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptPollAnswer) Or

Or returns value if set, or given parameter if does not.

func (*OptPollAnswer) Reset

func (o *OptPollAnswer) Reset()

Reset unsets value.

func (*OptPollAnswer) SetTo

func (o *OptPollAnswer) SetTo(v PollAnswer)

SetTo sets value to v.

func (*OptPollAnswer) UnmarshalJSON

func (s *OptPollAnswer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptPreCheckoutQuery

type OptPreCheckoutQuery struct {
	Value PreCheckoutQuery
	Set   bool
}

OptPreCheckoutQuery is optional PreCheckoutQuery.

func NewOptPreCheckoutQuery

func NewOptPreCheckoutQuery(v PreCheckoutQuery) OptPreCheckoutQuery

NewOptPreCheckoutQuery returns new OptPreCheckoutQuery with value set to v.

func (*OptPreCheckoutQuery) Decode

func (o *OptPreCheckoutQuery) Decode(d *jx.Decoder) error

Decode decodes PreCheckoutQuery from json.

func (OptPreCheckoutQuery) Encode

func (o OptPreCheckoutQuery) Encode(e *jx.Encoder)

Encode encodes PreCheckoutQuery as json.

func (OptPreCheckoutQuery) Get

func (o OptPreCheckoutQuery) Get() (v PreCheckoutQuery, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptPreCheckoutQuery) IsSet

func (o OptPreCheckoutQuery) IsSet() bool

IsSet returns true if OptPreCheckoutQuery was set.

func (OptPreCheckoutQuery) MarshalJSON

func (s OptPreCheckoutQuery) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptPreCheckoutQuery) Or

Or returns value if set, or given parameter if does not.

func (*OptPreCheckoutQuery) Reset

func (o *OptPreCheckoutQuery) Reset()

Reset unsets value.

func (*OptPreCheckoutQuery) SetTo

SetTo sets value to v.

func (*OptPreCheckoutQuery) UnmarshalJSON

func (s *OptPreCheckoutQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptProximityAlertTriggered

type OptProximityAlertTriggered struct {
	Value ProximityAlertTriggered
	Set   bool
}

OptProximityAlertTriggered is optional ProximityAlertTriggered.

func NewOptProximityAlertTriggered

func NewOptProximityAlertTriggered(v ProximityAlertTriggered) OptProximityAlertTriggered

NewOptProximityAlertTriggered returns new OptProximityAlertTriggered with value set to v.

func (*OptProximityAlertTriggered) Decode

Decode decodes ProximityAlertTriggered from json.

func (OptProximityAlertTriggered) Encode

func (o OptProximityAlertTriggered) Encode(e *jx.Encoder)

Encode encodes ProximityAlertTriggered as json.

func (OptProximityAlertTriggered) Get

Get returns value and boolean that denotes whether value was set.

func (OptProximityAlertTriggered) IsSet

func (o OptProximityAlertTriggered) IsSet() bool

IsSet returns true if OptProximityAlertTriggered was set.

func (OptProximityAlertTriggered) MarshalJSON

func (s OptProximityAlertTriggered) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptProximityAlertTriggered) Or

Or returns value if set, or given parameter if does not.

func (*OptProximityAlertTriggered) Reset

func (o *OptProximityAlertTriggered) Reset()

Reset unsets value.

func (*OptProximityAlertTriggered) SetTo

SetTo sets value to v.

func (*OptProximityAlertTriggered) UnmarshalJSON

func (s *OptProximityAlertTriggered) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptResponseParameters

type OptResponseParameters struct {
	Value ResponseParameters
	Set   bool
}

OptResponseParameters is optional ResponseParameters.

func NewOptResponseParameters

func NewOptResponseParameters(v ResponseParameters) OptResponseParameters

NewOptResponseParameters returns new OptResponseParameters with value set to v.

func (*OptResponseParameters) Decode

func (o *OptResponseParameters) Decode(d *jx.Decoder) error

Decode decodes ResponseParameters from json.

func (OptResponseParameters) Encode

func (o OptResponseParameters) Encode(e *jx.Encoder)

Encode encodes ResponseParameters as json.

func (OptResponseParameters) Get

Get returns value and boolean that denotes whether value was set.

func (OptResponseParameters) IsSet

func (o OptResponseParameters) IsSet() bool

IsSet returns true if OptResponseParameters was set.

func (OptResponseParameters) MarshalJSON

func (s OptResponseParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptResponseParameters) Or

Or returns value if set, or given parameter if does not.

func (*OptResponseParameters) Reset

func (o *OptResponseParameters) Reset()

Reset unsets value.

func (*OptResponseParameters) SetTo

SetTo sets value to v.

func (*OptResponseParameters) UnmarshalJSON

func (s *OptResponseParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptResultMessageOrBooleanResult

type OptResultMessageOrBooleanResult struct {
	Value ResultMessageOrBooleanResult
	Set   bool
}

OptResultMessageOrBooleanResult is optional ResultMessageOrBooleanResult.

func NewOptResultMessageOrBooleanResult

func NewOptResultMessageOrBooleanResult(v ResultMessageOrBooleanResult) OptResultMessageOrBooleanResult

NewOptResultMessageOrBooleanResult returns new OptResultMessageOrBooleanResult with value set to v.

func (*OptResultMessageOrBooleanResult) Decode

Decode decodes ResultMessageOrBooleanResult from json.

func (OptResultMessageOrBooleanResult) Encode

Encode encodes ResultMessageOrBooleanResult as json.

func (OptResultMessageOrBooleanResult) Get

Get returns value and boolean that denotes whether value was set.

func (OptResultMessageOrBooleanResult) IsSet

IsSet returns true if OptResultMessageOrBooleanResult was set.

func (OptResultMessageOrBooleanResult) MarshalJSON

func (s OptResultMessageOrBooleanResult) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptResultMessageOrBooleanResult) Or

Or returns value if set, or given parameter if does not.

func (*OptResultMessageOrBooleanResult) Reset

Reset unsets value.

func (*OptResultMessageOrBooleanResult) SetTo

SetTo sets value to v.

func (*OptResultMessageOrBooleanResult) UnmarshalJSON

func (s *OptResultMessageOrBooleanResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptSendReplyMarkup

type OptSendReplyMarkup struct {
	Value SendReplyMarkup
	Set   bool
}

OptSendReplyMarkup is optional SendReplyMarkup.

func NewOptSendReplyMarkup

func NewOptSendReplyMarkup(v SendReplyMarkup) OptSendReplyMarkup

NewOptSendReplyMarkup returns new OptSendReplyMarkup with value set to v.

func (*OptSendReplyMarkup) Decode

func (o *OptSendReplyMarkup) Decode(d *jx.Decoder) error

Decode decodes SendReplyMarkup from json.

func (OptSendReplyMarkup) Encode

func (o OptSendReplyMarkup) Encode(e *jx.Encoder)

Encode encodes SendReplyMarkup as json.

func (OptSendReplyMarkup) Get

func (o OptSendReplyMarkup) Get() (v SendReplyMarkup, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptSendReplyMarkup) IsSet

func (o OptSendReplyMarkup) IsSet() bool

IsSet returns true if OptSendReplyMarkup was set.

func (OptSendReplyMarkup) MarshalJSON

func (s OptSendReplyMarkup) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptSendReplyMarkup) Or

Or returns value if set, or given parameter if does not.

func (*OptSendReplyMarkup) Reset

func (o *OptSendReplyMarkup) Reset()

Reset unsets value.

func (*OptSendReplyMarkup) SetTo

func (o *OptSendReplyMarkup) SetTo(v SendReplyMarkup)

SetTo sets value to v.

func (*OptSendReplyMarkup) UnmarshalJSON

func (s *OptSendReplyMarkup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptSetChatMenuButton

type OptSetChatMenuButton struct {
	Value SetChatMenuButton
	Set   bool
}

OptSetChatMenuButton is optional SetChatMenuButton.

func NewOptSetChatMenuButton

func NewOptSetChatMenuButton(v SetChatMenuButton) OptSetChatMenuButton

NewOptSetChatMenuButton returns new OptSetChatMenuButton with value set to v.

func (*OptSetChatMenuButton) Decode

func (o *OptSetChatMenuButton) Decode(d *jx.Decoder) error

Decode decodes SetChatMenuButton from json.

func (OptSetChatMenuButton) Encode

func (o OptSetChatMenuButton) Encode(e *jx.Encoder)

Encode encodes SetChatMenuButton as json.

func (OptSetChatMenuButton) Get

Get returns value and boolean that denotes whether value was set.

func (OptSetChatMenuButton) IsSet

func (o OptSetChatMenuButton) IsSet() bool

IsSet returns true if OptSetChatMenuButton was set.

func (OptSetChatMenuButton) MarshalJSON

func (s OptSetChatMenuButton) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptSetChatMenuButton) Or

Or returns value if set, or given parameter if does not.

func (*OptSetChatMenuButton) Reset

func (o *OptSetChatMenuButton) Reset()

Reset unsets value.

func (*OptSetChatMenuButton) SetTo

SetTo sets value to v.

func (*OptSetChatMenuButton) UnmarshalJSON

func (s *OptSetChatMenuButton) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptSetMyDefaultAdministratorRights

type OptSetMyDefaultAdministratorRights struct {
	Value SetMyDefaultAdministratorRights
	Set   bool
}

OptSetMyDefaultAdministratorRights is optional SetMyDefaultAdministratorRights.

func NewOptSetMyDefaultAdministratorRights

func NewOptSetMyDefaultAdministratorRights(v SetMyDefaultAdministratorRights) OptSetMyDefaultAdministratorRights

NewOptSetMyDefaultAdministratorRights returns new OptSetMyDefaultAdministratorRights with value set to v.

func (*OptSetMyDefaultAdministratorRights) Decode

Decode decodes SetMyDefaultAdministratorRights from json.

func (OptSetMyDefaultAdministratorRights) Encode

Encode encodes SetMyDefaultAdministratorRights as json.

func (OptSetMyDefaultAdministratorRights) Get

Get returns value and boolean that denotes whether value was set.

func (OptSetMyDefaultAdministratorRights) IsSet

IsSet returns true if OptSetMyDefaultAdministratorRights was set.

func (OptSetMyDefaultAdministratorRights) MarshalJSON

func (s OptSetMyDefaultAdministratorRights) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptSetMyDefaultAdministratorRights) Or

Or returns value if set, or given parameter if does not.

func (*OptSetMyDefaultAdministratorRights) Reset

Reset unsets value.

func (*OptSetMyDefaultAdministratorRights) SetTo

SetTo sets value to v.

func (*OptSetMyDefaultAdministratorRights) UnmarshalJSON

func (s *OptSetMyDefaultAdministratorRights) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptSetMyDescription

type OptSetMyDescription struct {
	Value SetMyDescription
	Set   bool
}

OptSetMyDescription is optional SetMyDescription.

func NewOptSetMyDescription

func NewOptSetMyDescription(v SetMyDescription) OptSetMyDescription

NewOptSetMyDescription returns new OptSetMyDescription with value set to v.

func (*OptSetMyDescription) Decode

func (o *OptSetMyDescription) Decode(d *jx.Decoder) error

Decode decodes SetMyDescription from json.

func (OptSetMyDescription) Encode

func (o OptSetMyDescription) Encode(e *jx.Encoder)

Encode encodes SetMyDescription as json.

func (OptSetMyDescription) Get

func (o OptSetMyDescription) Get() (v SetMyDescription, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptSetMyDescription) IsSet

func (o OptSetMyDescription) IsSet() bool

IsSet returns true if OptSetMyDescription was set.

func (OptSetMyDescription) MarshalJSON

func (s OptSetMyDescription) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptSetMyDescription) Or

Or returns value if set, or given parameter if does not.

func (*OptSetMyDescription) Reset

func (o *OptSetMyDescription) Reset()

Reset unsets value.

func (*OptSetMyDescription) SetTo

SetTo sets value to v.

func (*OptSetMyDescription) UnmarshalJSON

func (s *OptSetMyDescription) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptSetMyName

type OptSetMyName struct {
	Value SetMyName
	Set   bool
}

OptSetMyName is optional SetMyName.

func NewOptSetMyName

func NewOptSetMyName(v SetMyName) OptSetMyName

NewOptSetMyName returns new OptSetMyName with value set to v.

func (*OptSetMyName) Decode

func (o *OptSetMyName) Decode(d *jx.Decoder) error

Decode decodes SetMyName from json.

func (OptSetMyName) Encode

func (o OptSetMyName) Encode(e *jx.Encoder)

Encode encodes SetMyName as json.

func (OptSetMyName) Get

func (o OptSetMyName) Get() (v SetMyName, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptSetMyName) IsSet

func (o OptSetMyName) IsSet() bool

IsSet returns true if OptSetMyName was set.

func (OptSetMyName) MarshalJSON

func (s OptSetMyName) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptSetMyName) Or

Or returns value if set, or given parameter if does not.

func (*OptSetMyName) Reset

func (o *OptSetMyName) Reset()

Reset unsets value.

func (*OptSetMyName) SetTo

func (o *OptSetMyName) SetTo(v SetMyName)

SetTo sets value to v.

func (*OptSetMyName) UnmarshalJSON

func (s *OptSetMyName) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptSetMyShortDescription

type OptSetMyShortDescription struct {
	Value SetMyShortDescription
	Set   bool
}

OptSetMyShortDescription is optional SetMyShortDescription.

func NewOptSetMyShortDescription

func NewOptSetMyShortDescription(v SetMyShortDescription) OptSetMyShortDescription

NewOptSetMyShortDescription returns new OptSetMyShortDescription with value set to v.

func (*OptSetMyShortDescription) Decode

func (o *OptSetMyShortDescription) Decode(d *jx.Decoder) error

Decode decodes SetMyShortDescription from json.

func (OptSetMyShortDescription) Encode

func (o OptSetMyShortDescription) Encode(e *jx.Encoder)

Encode encodes SetMyShortDescription as json.

func (OptSetMyShortDescription) Get

Get returns value and boolean that denotes whether value was set.

func (OptSetMyShortDescription) IsSet

func (o OptSetMyShortDescription) IsSet() bool

IsSet returns true if OptSetMyShortDescription was set.

func (OptSetMyShortDescription) MarshalJSON

func (s OptSetMyShortDescription) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptSetMyShortDescription) Or

Or returns value if set, or given parameter if does not.

func (*OptSetMyShortDescription) Reset

func (o *OptSetMyShortDescription) Reset()

Reset unsets value.

func (*OptSetMyShortDescription) SetTo

SetTo sets value to v.

func (*OptSetMyShortDescription) UnmarshalJSON

func (s *OptSetMyShortDescription) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptShippingAddress

type OptShippingAddress struct {
	Value ShippingAddress
	Set   bool
}

OptShippingAddress is optional ShippingAddress.

func NewOptShippingAddress

func NewOptShippingAddress(v ShippingAddress) OptShippingAddress

NewOptShippingAddress returns new OptShippingAddress with value set to v.

func (*OptShippingAddress) Decode

func (o *OptShippingAddress) Decode(d *jx.Decoder) error

Decode decodes ShippingAddress from json.

func (OptShippingAddress) Encode

func (o OptShippingAddress) Encode(e *jx.Encoder)

Encode encodes ShippingAddress as json.

func (OptShippingAddress) Get

func (o OptShippingAddress) Get() (v ShippingAddress, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptShippingAddress) IsSet

func (o OptShippingAddress) IsSet() bool

IsSet returns true if OptShippingAddress was set.

func (OptShippingAddress) MarshalJSON

func (s OptShippingAddress) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptShippingAddress) Or

Or returns value if set, or given parameter if does not.

func (*OptShippingAddress) Reset

func (o *OptShippingAddress) Reset()

Reset unsets value.

func (*OptShippingAddress) SetTo

func (o *OptShippingAddress) SetTo(v ShippingAddress)

SetTo sets value to v.

func (*OptShippingAddress) UnmarshalJSON

func (s *OptShippingAddress) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptShippingQuery

type OptShippingQuery struct {
	Value ShippingQuery
	Set   bool
}

OptShippingQuery is optional ShippingQuery.

func NewOptShippingQuery

func NewOptShippingQuery(v ShippingQuery) OptShippingQuery

NewOptShippingQuery returns new OptShippingQuery with value set to v.

func (*OptShippingQuery) Decode

func (o *OptShippingQuery) Decode(d *jx.Decoder) error

Decode decodes ShippingQuery from json.

func (OptShippingQuery) Encode

func (o OptShippingQuery) Encode(e *jx.Encoder)

Encode encodes ShippingQuery as json.

func (OptShippingQuery) Get

func (o OptShippingQuery) Get() (v ShippingQuery, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptShippingQuery) IsSet

func (o OptShippingQuery) IsSet() bool

IsSet returns true if OptShippingQuery was set.

func (OptShippingQuery) MarshalJSON

func (s OptShippingQuery) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptShippingQuery) Or

Or returns value if set, or given parameter if does not.

func (*OptShippingQuery) Reset

func (o *OptShippingQuery) Reset()

Reset unsets value.

func (*OptShippingQuery) SetTo

func (o *OptShippingQuery) SetTo(v ShippingQuery)

SetTo sets value to v.

func (*OptShippingQuery) UnmarshalJSON

func (s *OptShippingQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptSticker

type OptSticker struct {
	Value Sticker
	Set   bool
}

OptSticker is optional Sticker.

func NewOptSticker

func NewOptSticker(v Sticker) OptSticker

NewOptSticker returns new OptSticker with value set to v.

func (*OptSticker) Decode

func (o *OptSticker) Decode(d *jx.Decoder) error

Decode decodes Sticker from json.

func (OptSticker) Encode

func (o OptSticker) Encode(e *jx.Encoder)

Encode encodes Sticker as json.

func (OptSticker) Get

func (o OptSticker) Get() (v Sticker, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptSticker) IsSet

func (o OptSticker) IsSet() bool

IsSet returns true if OptSticker was set.

func (OptSticker) MarshalJSON

func (s OptSticker) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptSticker) Or

func (o OptSticker) Or(d Sticker) Sticker

Or returns value if set, or given parameter if does not.

func (*OptSticker) Reset

func (o *OptSticker) Reset()

Reset unsets value.

func (*OptSticker) SetTo

func (o *OptSticker) SetTo(v Sticker)

SetTo sets value to v.

func (*OptSticker) UnmarshalJSON

func (s *OptSticker) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptStickerSet

type OptStickerSet struct {
	Value StickerSet
	Set   bool
}

OptStickerSet is optional StickerSet.

func NewOptStickerSet

func NewOptStickerSet(v StickerSet) OptStickerSet

NewOptStickerSet returns new OptStickerSet with value set to v.

func (*OptStickerSet) Decode

func (o *OptStickerSet) Decode(d *jx.Decoder) error

Decode decodes StickerSet from json.

func (OptStickerSet) Encode

func (o OptStickerSet) Encode(e *jx.Encoder)

Encode encodes StickerSet as json.

func (OptStickerSet) Get

func (o OptStickerSet) Get() (v StickerSet, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptStickerSet) IsSet

func (o OptStickerSet) IsSet() bool

IsSet returns true if OptStickerSet was set.

func (OptStickerSet) MarshalJSON

func (s OptStickerSet) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptStickerSet) Or

Or returns value if set, or given parameter if does not.

func (*OptStickerSet) Reset

func (o *OptStickerSet) Reset()

Reset unsets value.

func (*OptStickerSet) SetTo

func (o *OptStickerSet) SetTo(v StickerSet)

SetTo sets value to v.

func (*OptStickerSet) UnmarshalJSON

func (s *OptStickerSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptString

type OptString struct {
	Value string
	Set   bool
}

OptString is optional string.

func NewOptString

func NewOptString(v string) OptString

NewOptString returns new OptString with value set to v.

func (*OptString) Decode

func (o *OptString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (OptString) Encode

func (o OptString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (OptString) Get

func (o OptString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptString) IsSet

func (o OptString) IsSet() bool

IsSet returns true if OptString was set.

func (OptString) MarshalJSON

func (s OptString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptString) Or

func (o OptString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*OptString) Reset

func (o *OptString) Reset()

Reset unsets value.

func (*OptString) SetTo

func (o *OptString) SetTo(v string)

SetTo sets value to v.

func (*OptString) UnmarshalJSON

func (s *OptString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptSuccessfulPayment

type OptSuccessfulPayment struct {
	Value SuccessfulPayment
	Set   bool
}

OptSuccessfulPayment is optional SuccessfulPayment.

func NewOptSuccessfulPayment

func NewOptSuccessfulPayment(v SuccessfulPayment) OptSuccessfulPayment

NewOptSuccessfulPayment returns new OptSuccessfulPayment with value set to v.

func (*OptSuccessfulPayment) Decode

func (o *OptSuccessfulPayment) Decode(d *jx.Decoder) error

Decode decodes SuccessfulPayment from json.

func (OptSuccessfulPayment) Encode

func (o OptSuccessfulPayment) Encode(e *jx.Encoder)

Encode encodes SuccessfulPayment as json.

func (OptSuccessfulPayment) Get

Get returns value and boolean that denotes whether value was set.

func (OptSuccessfulPayment) IsSet

func (o OptSuccessfulPayment) IsSet() bool

IsSet returns true if OptSuccessfulPayment was set.

func (OptSuccessfulPayment) MarshalJSON

func (s OptSuccessfulPayment) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptSuccessfulPayment) Or

Or returns value if set, or given parameter if does not.

func (*OptSuccessfulPayment) Reset

func (o *OptSuccessfulPayment) Reset()

Reset unsets value.

func (*OptSuccessfulPayment) SetTo

SetTo sets value to v.

func (*OptSuccessfulPayment) UnmarshalJSON

func (s *OptSuccessfulPayment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptSwitchInlineQueryChosenChat

type OptSwitchInlineQueryChosenChat struct {
	Value SwitchInlineQueryChosenChat
	Set   bool
}

OptSwitchInlineQueryChosenChat is optional SwitchInlineQueryChosenChat.

func NewOptSwitchInlineQueryChosenChat

func NewOptSwitchInlineQueryChosenChat(v SwitchInlineQueryChosenChat) OptSwitchInlineQueryChosenChat

NewOptSwitchInlineQueryChosenChat returns new OptSwitchInlineQueryChosenChat with value set to v.

func (*OptSwitchInlineQueryChosenChat) Decode

Decode decodes SwitchInlineQueryChosenChat from json.

func (OptSwitchInlineQueryChosenChat) Encode

Encode encodes SwitchInlineQueryChosenChat as json.

func (OptSwitchInlineQueryChosenChat) Get

Get returns value and boolean that denotes whether value was set.

func (OptSwitchInlineQueryChosenChat) IsSet

IsSet returns true if OptSwitchInlineQueryChosenChat was set.

func (OptSwitchInlineQueryChosenChat) MarshalJSON

func (s OptSwitchInlineQueryChosenChat) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptSwitchInlineQueryChosenChat) Or

Or returns value if set, or given parameter if does not.

func (*OptSwitchInlineQueryChosenChat) Reset

func (o *OptSwitchInlineQueryChosenChat) Reset()

Reset unsets value.

func (*OptSwitchInlineQueryChosenChat) SetTo

SetTo sets value to v.

func (*OptSwitchInlineQueryChosenChat) UnmarshalJSON

func (s *OptSwitchInlineQueryChosenChat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptUser

type OptUser struct {
	Value User
	Set   bool
}

OptUser is optional User.

func NewOptUser

func NewOptUser(v User) OptUser

NewOptUser returns new OptUser with value set to v.

func (*OptUser) Decode

func (o *OptUser) Decode(d *jx.Decoder) error

Decode decodes User from json.

func (OptUser) Encode

func (o OptUser) Encode(e *jx.Encoder)

Encode encodes User as json.

func (OptUser) Get

func (o OptUser) Get() (v User, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptUser) IsSet

func (o OptUser) IsSet() bool

IsSet returns true if OptUser was set.

func (OptUser) MarshalJSON

func (s OptUser) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptUser) Or

func (o OptUser) Or(d User) User

Or returns value if set, or given parameter if does not.

func (*OptUser) Reset

func (o *OptUser) Reset()

Reset unsets value.

func (*OptUser) SetTo

func (o *OptUser) SetTo(v User)

SetTo sets value to v.

func (*OptUser) UnmarshalJSON

func (s *OptUser) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptUserProfilePhotos

type OptUserProfilePhotos struct {
	Value UserProfilePhotos
	Set   bool
}

OptUserProfilePhotos is optional UserProfilePhotos.

func NewOptUserProfilePhotos

func NewOptUserProfilePhotos(v UserProfilePhotos) OptUserProfilePhotos

NewOptUserProfilePhotos returns new OptUserProfilePhotos with value set to v.

func (*OptUserProfilePhotos) Decode

func (o *OptUserProfilePhotos) Decode(d *jx.Decoder) error

Decode decodes UserProfilePhotos from json.

func (OptUserProfilePhotos) Encode

func (o OptUserProfilePhotos) Encode(e *jx.Encoder)

Encode encodes UserProfilePhotos as json.

func (OptUserProfilePhotos) Get

Get returns value and boolean that denotes whether value was set.

func (OptUserProfilePhotos) IsSet

func (o OptUserProfilePhotos) IsSet() bool

IsSet returns true if OptUserProfilePhotos was set.

func (OptUserProfilePhotos) MarshalJSON

func (s OptUserProfilePhotos) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptUserProfilePhotos) Or

Or returns value if set, or given parameter if does not.

func (*OptUserProfilePhotos) Reset

func (o *OptUserProfilePhotos) Reset()

Reset unsets value.

func (*OptUserProfilePhotos) SetTo

SetTo sets value to v.

func (*OptUserProfilePhotos) UnmarshalJSON

func (s *OptUserProfilePhotos) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptUserShared

type OptUserShared struct {
	Value UserShared
	Set   bool
}

OptUserShared is optional UserShared.

func NewOptUserShared

func NewOptUserShared(v UserShared) OptUserShared

NewOptUserShared returns new OptUserShared with value set to v.

func (*OptUserShared) Decode

func (o *OptUserShared) Decode(d *jx.Decoder) error

Decode decodes UserShared from json.

func (OptUserShared) Encode

func (o OptUserShared) Encode(e *jx.Encoder)

Encode encodes UserShared as json.

func (OptUserShared) Get

func (o OptUserShared) Get() (v UserShared, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptUserShared) IsSet

func (o OptUserShared) IsSet() bool

IsSet returns true if OptUserShared was set.

func (OptUserShared) MarshalJSON

func (s OptUserShared) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptUserShared) Or

Or returns value if set, or given parameter if does not.

func (*OptUserShared) Reset

func (o *OptUserShared) Reset()

Reset unsets value.

func (*OptUserShared) SetTo

func (o *OptUserShared) SetTo(v UserShared)

SetTo sets value to v.

func (*OptUserShared) UnmarshalJSON

func (s *OptUserShared) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptVenue

type OptVenue struct {
	Value Venue
	Set   bool
}

OptVenue is optional Venue.

func NewOptVenue

func NewOptVenue(v Venue) OptVenue

NewOptVenue returns new OptVenue with value set to v.

func (*OptVenue) Decode

func (o *OptVenue) Decode(d *jx.Decoder) error

Decode decodes Venue from json.

func (OptVenue) Encode

func (o OptVenue) Encode(e *jx.Encoder)

Encode encodes Venue as json.

func (OptVenue) Get

func (o OptVenue) Get() (v Venue, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptVenue) IsSet

func (o OptVenue) IsSet() bool

IsSet returns true if OptVenue was set.

func (OptVenue) MarshalJSON

func (s OptVenue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptVenue) Or

func (o OptVenue) Or(d Venue) Venue

Or returns value if set, or given parameter if does not.

func (*OptVenue) Reset

func (o *OptVenue) Reset()

Reset unsets value.

func (*OptVenue) SetTo

func (o *OptVenue) SetTo(v Venue)

SetTo sets value to v.

func (*OptVenue) UnmarshalJSON

func (s *OptVenue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptVideo

type OptVideo struct {
	Value Video
	Set   bool
}

OptVideo is optional Video.

func NewOptVideo

func NewOptVideo(v Video) OptVideo

NewOptVideo returns new OptVideo with value set to v.

func (*OptVideo) Decode

func (o *OptVideo) Decode(d *jx.Decoder) error

Decode decodes Video from json.

func (OptVideo) Encode

func (o OptVideo) Encode(e *jx.Encoder)

Encode encodes Video as json.

func (OptVideo) Get

func (o OptVideo) Get() (v Video, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptVideo) IsSet

func (o OptVideo) IsSet() bool

IsSet returns true if OptVideo was set.

func (OptVideo) MarshalJSON

func (s OptVideo) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptVideo) Or

func (o OptVideo) Or(d Video) Video

Or returns value if set, or given parameter if does not.

func (*OptVideo) Reset

func (o *OptVideo) Reset()

Reset unsets value.

func (*OptVideo) SetTo

func (o *OptVideo) SetTo(v Video)

SetTo sets value to v.

func (*OptVideo) UnmarshalJSON

func (s *OptVideo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptVideoChatEnded

type OptVideoChatEnded struct {
	Value VideoChatEnded
	Set   bool
}

OptVideoChatEnded is optional VideoChatEnded.

func NewOptVideoChatEnded

func NewOptVideoChatEnded(v VideoChatEnded) OptVideoChatEnded

NewOptVideoChatEnded returns new OptVideoChatEnded with value set to v.

func (*OptVideoChatEnded) Decode

func (o *OptVideoChatEnded) Decode(d *jx.Decoder) error

Decode decodes VideoChatEnded from json.

func (OptVideoChatEnded) Encode

func (o OptVideoChatEnded) Encode(e *jx.Encoder)

Encode encodes VideoChatEnded as json.

func (OptVideoChatEnded) Get

func (o OptVideoChatEnded) Get() (v VideoChatEnded, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptVideoChatEnded) IsSet

func (o OptVideoChatEnded) IsSet() bool

IsSet returns true if OptVideoChatEnded was set.

func (OptVideoChatEnded) MarshalJSON

func (s OptVideoChatEnded) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptVideoChatEnded) Or

Or returns value if set, or given parameter if does not.

func (*OptVideoChatEnded) Reset

func (o *OptVideoChatEnded) Reset()

Reset unsets value.

func (*OptVideoChatEnded) SetTo

func (o *OptVideoChatEnded) SetTo(v VideoChatEnded)

SetTo sets value to v.

func (*OptVideoChatEnded) UnmarshalJSON

func (s *OptVideoChatEnded) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptVideoChatParticipantsInvited

type OptVideoChatParticipantsInvited struct {
	Value VideoChatParticipantsInvited
	Set   bool
}

OptVideoChatParticipantsInvited is optional VideoChatParticipantsInvited.

func NewOptVideoChatParticipantsInvited

func NewOptVideoChatParticipantsInvited(v VideoChatParticipantsInvited) OptVideoChatParticipantsInvited

NewOptVideoChatParticipantsInvited returns new OptVideoChatParticipantsInvited with value set to v.

func (*OptVideoChatParticipantsInvited) Decode

Decode decodes VideoChatParticipantsInvited from json.

func (OptVideoChatParticipantsInvited) Encode

Encode encodes VideoChatParticipantsInvited as json.

func (OptVideoChatParticipantsInvited) Get

Get returns value and boolean that denotes whether value was set.

func (OptVideoChatParticipantsInvited) IsSet

IsSet returns true if OptVideoChatParticipantsInvited was set.

func (OptVideoChatParticipantsInvited) MarshalJSON

func (s OptVideoChatParticipantsInvited) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptVideoChatParticipantsInvited) Or

Or returns value if set, or given parameter if does not.

func (*OptVideoChatParticipantsInvited) Reset

Reset unsets value.

func (*OptVideoChatParticipantsInvited) SetTo

SetTo sets value to v.

func (*OptVideoChatParticipantsInvited) UnmarshalJSON

func (s *OptVideoChatParticipantsInvited) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptVideoChatScheduled

type OptVideoChatScheduled struct {
	Value VideoChatScheduled
	Set   bool
}

OptVideoChatScheduled is optional VideoChatScheduled.

func NewOptVideoChatScheduled

func NewOptVideoChatScheduled(v VideoChatScheduled) OptVideoChatScheduled

NewOptVideoChatScheduled returns new OptVideoChatScheduled with value set to v.

func (*OptVideoChatScheduled) Decode

func (o *OptVideoChatScheduled) Decode(d *jx.Decoder) error

Decode decodes VideoChatScheduled from json.

func (OptVideoChatScheduled) Encode

func (o OptVideoChatScheduled) Encode(e *jx.Encoder)

Encode encodes VideoChatScheduled as json.

func (OptVideoChatScheduled) Get

Get returns value and boolean that denotes whether value was set.

func (OptVideoChatScheduled) IsSet

func (o OptVideoChatScheduled) IsSet() bool

IsSet returns true if OptVideoChatScheduled was set.

func (OptVideoChatScheduled) MarshalJSON

func (s OptVideoChatScheduled) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptVideoChatScheduled) Or

Or returns value if set, or given parameter if does not.

func (*OptVideoChatScheduled) Reset

func (o *OptVideoChatScheduled) Reset()

Reset unsets value.

func (*OptVideoChatScheduled) SetTo

SetTo sets value to v.

func (*OptVideoChatScheduled) UnmarshalJSON

func (s *OptVideoChatScheduled) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptVideoNote

type OptVideoNote struct {
	Value VideoNote
	Set   bool
}

OptVideoNote is optional VideoNote.

func NewOptVideoNote

func NewOptVideoNote(v VideoNote) OptVideoNote

NewOptVideoNote returns new OptVideoNote with value set to v.

func (*OptVideoNote) Decode

func (o *OptVideoNote) Decode(d *jx.Decoder) error

Decode decodes VideoNote from json.

func (OptVideoNote) Encode

func (o OptVideoNote) Encode(e *jx.Encoder)

Encode encodes VideoNote as json.

func (OptVideoNote) Get

func (o OptVideoNote) Get() (v VideoNote, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptVideoNote) IsSet

func (o OptVideoNote) IsSet() bool

IsSet returns true if OptVideoNote was set.

func (OptVideoNote) MarshalJSON

func (s OptVideoNote) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptVideoNote) Or

Or returns value if set, or given parameter if does not.

func (*OptVideoNote) Reset

func (o *OptVideoNote) Reset()

Reset unsets value.

func (*OptVideoNote) SetTo

func (o *OptVideoNote) SetTo(v VideoNote)

SetTo sets value to v.

func (*OptVideoNote) UnmarshalJSON

func (s *OptVideoNote) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptVoice

type OptVoice struct {
	Value Voice
	Set   bool
}

OptVoice is optional Voice.

func NewOptVoice

func NewOptVoice(v Voice) OptVoice

NewOptVoice returns new OptVoice with value set to v.

func (*OptVoice) Decode

func (o *OptVoice) Decode(d *jx.Decoder) error

Decode decodes Voice from json.

func (OptVoice) Encode

func (o OptVoice) Encode(e *jx.Encoder)

Encode encodes Voice as json.

func (OptVoice) Get

func (o OptVoice) Get() (v Voice, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptVoice) IsSet

func (o OptVoice) IsSet() bool

IsSet returns true if OptVoice was set.

func (OptVoice) MarshalJSON

func (s OptVoice) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptVoice) Or

func (o OptVoice) Or(d Voice) Voice

Or returns value if set, or given parameter if does not.

func (*OptVoice) Reset

func (o *OptVoice) Reset()

Reset unsets value.

func (*OptVoice) SetTo

func (o *OptVoice) SetTo(v Voice)

SetTo sets value to v.

func (*OptVoice) UnmarshalJSON

func (s *OptVoice) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptWebAppData

type OptWebAppData struct {
	Value WebAppData
	Set   bool
}

OptWebAppData is optional WebAppData.

func NewOptWebAppData

func NewOptWebAppData(v WebAppData) OptWebAppData

NewOptWebAppData returns new OptWebAppData with value set to v.

func (*OptWebAppData) Decode

func (o *OptWebAppData) Decode(d *jx.Decoder) error

Decode decodes WebAppData from json.

func (OptWebAppData) Encode

func (o OptWebAppData) Encode(e *jx.Encoder)

Encode encodes WebAppData as json.

func (OptWebAppData) Get

func (o OptWebAppData) Get() (v WebAppData, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptWebAppData) IsSet

func (o OptWebAppData) IsSet() bool

IsSet returns true if OptWebAppData was set.

func (OptWebAppData) MarshalJSON

func (s OptWebAppData) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptWebAppData) Or

Or returns value if set, or given parameter if does not.

func (*OptWebAppData) Reset

func (o *OptWebAppData) Reset()

Reset unsets value.

func (*OptWebAppData) SetTo

func (o *OptWebAppData) SetTo(v WebAppData)

SetTo sets value to v.

func (*OptWebAppData) UnmarshalJSON

func (s *OptWebAppData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptWebAppInfo

type OptWebAppInfo struct {
	Value WebAppInfo
	Set   bool
}

OptWebAppInfo is optional WebAppInfo.

func NewOptWebAppInfo

func NewOptWebAppInfo(v WebAppInfo) OptWebAppInfo

NewOptWebAppInfo returns new OptWebAppInfo with value set to v.

func (*OptWebAppInfo) Decode

func (o *OptWebAppInfo) Decode(d *jx.Decoder) error

Decode decodes WebAppInfo from json.

func (OptWebAppInfo) Encode

func (o OptWebAppInfo) Encode(e *jx.Encoder)

Encode encodes WebAppInfo as json.

func (OptWebAppInfo) Get

func (o OptWebAppInfo) Get() (v WebAppInfo, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptWebAppInfo) IsSet

func (o OptWebAppInfo) IsSet() bool

IsSet returns true if OptWebAppInfo was set.

func (OptWebAppInfo) MarshalJSON

func (s OptWebAppInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptWebAppInfo) Or

Or returns value if set, or given parameter if does not.

func (*OptWebAppInfo) Reset

func (o *OptWebAppInfo) Reset()

Reset unsets value.

func (*OptWebAppInfo) SetTo

func (o *OptWebAppInfo) SetTo(v WebAppInfo)

SetTo sets value to v.

func (*OptWebAppInfo) UnmarshalJSON

func (s *OptWebAppInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptWebhookInfo

type OptWebhookInfo struct {
	Value WebhookInfo
	Set   bool
}

OptWebhookInfo is optional WebhookInfo.

func NewOptWebhookInfo

func NewOptWebhookInfo(v WebhookInfo) OptWebhookInfo

NewOptWebhookInfo returns new OptWebhookInfo with value set to v.

func (*OptWebhookInfo) Decode

func (o *OptWebhookInfo) Decode(d *jx.Decoder) error

Decode decodes WebhookInfo from json.

func (OptWebhookInfo) Encode

func (o OptWebhookInfo) Encode(e *jx.Encoder)

Encode encodes WebhookInfo as json.

func (OptWebhookInfo) Get

func (o OptWebhookInfo) Get() (v WebhookInfo, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptWebhookInfo) IsSet

func (o OptWebhookInfo) IsSet() bool

IsSet returns true if OptWebhookInfo was set.

func (OptWebhookInfo) MarshalJSON

func (s OptWebhookInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptWebhookInfo) Or

Or returns value if set, or given parameter if does not.

func (*OptWebhookInfo) Reset

func (o *OptWebhookInfo) Reset()

Reset unsets value.

func (*OptWebhookInfo) SetTo

func (o *OptWebhookInfo) SetTo(v WebhookInfo)

SetTo sets value to v.

func (*OptWebhookInfo) UnmarshalJSON

func (s *OptWebhookInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptWriteAccessAllowed

type OptWriteAccessAllowed struct {
	Value WriteAccessAllowed
	Set   bool
}

OptWriteAccessAllowed is optional WriteAccessAllowed.

func NewOptWriteAccessAllowed

func NewOptWriteAccessAllowed(v WriteAccessAllowed) OptWriteAccessAllowed

NewOptWriteAccessAllowed returns new OptWriteAccessAllowed with value set to v.

func (*OptWriteAccessAllowed) Decode

func (o *OptWriteAccessAllowed) Decode(d *jx.Decoder) error

Decode decodes WriteAccessAllowed from json.

func (OptWriteAccessAllowed) Encode

func (o OptWriteAccessAllowed) Encode(e *jx.Encoder)

Encode encodes WriteAccessAllowed as json.

func (OptWriteAccessAllowed) Get

Get returns value and boolean that denotes whether value was set.

func (OptWriteAccessAllowed) IsSet

func (o OptWriteAccessAllowed) IsSet() bool

IsSet returns true if OptWriteAccessAllowed was set.

func (OptWriteAccessAllowed) MarshalJSON

func (s OptWriteAccessAllowed) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptWriteAccessAllowed) Or

Or returns value if set, or given parameter if does not.

func (*OptWriteAccessAllowed) Reset

func (o *OptWriteAccessAllowed) Reset()

Reset unsets value.

func (*OptWriteAccessAllowed) SetTo

SetTo sets value to v.

func (*OptWriteAccessAllowed) UnmarshalJSON

func (s *OptWriteAccessAllowed) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Option

type Option interface {
	ServerOption
	ClientOption
}

Option is config option.

func WithMeterProvider

func WithMeterProvider(provider metric.MeterProvider) Option

WithMeterProvider specifies a meter provider to use for creating a meter.

If none is specified, the otel.GetMeterProvider() is used.

func WithTracerProvider

func WithTracerProvider(provider trace.TracerProvider) Option

WithTracerProvider specifies a tracer provider to use for creating a tracer.

If none is specified, the global provider is used.

type OrderInfo

type OrderInfo struct {
	// _Optional_. User name.
	Name OptString `json:"name"`
	// _Optional_. User's phone number.
	PhoneNumber OptString `json:"phone_number"`
	// _Optional_. User email.
	Email           OptString          `json:"email"`
	ShippingAddress OptShippingAddress `json:"shipping_address"`
}

This object represents information about an order. Ref: #/components/schemas/OrderInfo

func (*OrderInfo) Decode

func (s *OrderInfo) Decode(d *jx.Decoder) error

Decode decodes OrderInfo from json.

func (*OrderInfo) Encode

func (s *OrderInfo) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*OrderInfo) GetEmail

func (s *OrderInfo) GetEmail() OptString

GetEmail returns the value of Email.

func (*OrderInfo) GetName

func (s *OrderInfo) GetName() OptString

GetName returns the value of Name.

func (*OrderInfo) GetPhoneNumber

func (s *OrderInfo) GetPhoneNumber() OptString

GetPhoneNumber returns the value of PhoneNumber.

func (*OrderInfo) GetShippingAddress

func (s *OrderInfo) GetShippingAddress() OptShippingAddress

GetShippingAddress returns the value of ShippingAddress.

func (*OrderInfo) MarshalJSON

func (s *OrderInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*OrderInfo) SetEmail

func (s *OrderInfo) SetEmail(val OptString)

SetEmail sets the value of Email.

func (*OrderInfo) SetName

func (s *OrderInfo) SetName(val OptString)

SetName sets the value of Name.

func (*OrderInfo) SetPhoneNumber

func (s *OrderInfo) SetPhoneNumber(val OptString)

SetPhoneNumber sets the value of PhoneNumber.

func (*OrderInfo) SetShippingAddress

func (s *OrderInfo) SetShippingAddress(val OptShippingAddress)

SetShippingAddress sets the value of ShippingAddress.

func (*OrderInfo) UnmarshalJSON

func (s *OrderInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type PassportData

type PassportData struct {
	// Array with information about documents and other Telegram Passport elements that was shared with
	// the bot.
	Data        []EncryptedPassportElement `json:"data"`
	Credentials EncryptedCredentials       `json:"credentials"`
}

Describes Telegram Passport data shared with the bot by the user. Ref: #/components/schemas/PassportData

func (*PassportData) Decode

func (s *PassportData) Decode(d *jx.Decoder) error

Decode decodes PassportData from json.

func (*PassportData) Encode

func (s *PassportData) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*PassportData) GetCredentials

func (s *PassportData) GetCredentials() EncryptedCredentials

GetCredentials returns the value of Credentials.

func (*PassportData) GetData

func (s *PassportData) GetData() []EncryptedPassportElement

GetData returns the value of Data.

func (*PassportData) MarshalJSON

func (s *PassportData) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PassportData) SetCredentials

func (s *PassportData) SetCredentials(val EncryptedCredentials)

SetCredentials sets the value of Credentials.

func (*PassportData) SetData

func (s *PassportData) SetData(val []EncryptedPassportElement)

SetData sets the value of Data.

func (*PassportData) UnmarshalJSON

func (s *PassportData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*PassportData) Validate

func (s *PassportData) Validate() error

type PassportElementError

type PassportElementError struct {
	Type                                 PassportElementErrorType // switch on this field
	PassportElementErrorDataField        PassportElementErrorDataField
	PassportElementErrorFrontSide        PassportElementErrorFrontSide
	PassportElementErrorReverseSide      PassportElementErrorReverseSide
	PassportElementErrorSelfie           PassportElementErrorSelfie
	PassportElementErrorFile             PassportElementErrorFile
	PassportElementErrorFiles            PassportElementErrorFiles
	PassportElementErrorTranslationFile  PassportElementErrorTranslationFile
	PassportElementErrorTranslationFiles PassportElementErrorTranslationFiles
	PassportElementErrorUnspecified      PassportElementErrorUnspecified
}

This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:. Ref: #/components/schemas/PassportElementError PassportElementError represents sum type.

func NewPassportElementErrorDataFieldPassportElementError

func NewPassportElementErrorDataFieldPassportElementError(v PassportElementErrorDataField) PassportElementError

NewPassportElementErrorDataFieldPassportElementError returns new PassportElementError from PassportElementErrorDataField.

func NewPassportElementErrorFilePassportElementError

func NewPassportElementErrorFilePassportElementError(v PassportElementErrorFile) PassportElementError

NewPassportElementErrorFilePassportElementError returns new PassportElementError from PassportElementErrorFile.

func NewPassportElementErrorFilesPassportElementError

func NewPassportElementErrorFilesPassportElementError(v PassportElementErrorFiles) PassportElementError

NewPassportElementErrorFilesPassportElementError returns new PassportElementError from PassportElementErrorFiles.

func NewPassportElementErrorFrontSidePassportElementError

func NewPassportElementErrorFrontSidePassportElementError(v PassportElementErrorFrontSide) PassportElementError

NewPassportElementErrorFrontSidePassportElementError returns new PassportElementError from PassportElementErrorFrontSide.

func NewPassportElementErrorReverseSidePassportElementError

func NewPassportElementErrorReverseSidePassportElementError(v PassportElementErrorReverseSide) PassportElementError

NewPassportElementErrorReverseSidePassportElementError returns new PassportElementError from PassportElementErrorReverseSide.

func NewPassportElementErrorSelfiePassportElementError

func NewPassportElementErrorSelfiePassportElementError(v PassportElementErrorSelfie) PassportElementError

NewPassportElementErrorSelfiePassportElementError returns new PassportElementError from PassportElementErrorSelfie.

func NewPassportElementErrorTranslationFilePassportElementError

func NewPassportElementErrorTranslationFilePassportElementError(v PassportElementErrorTranslationFile) PassportElementError

NewPassportElementErrorTranslationFilePassportElementError returns new PassportElementError from PassportElementErrorTranslationFile.

func NewPassportElementErrorTranslationFilesPassportElementError

func NewPassportElementErrorTranslationFilesPassportElementError(v PassportElementErrorTranslationFiles) PassportElementError

NewPassportElementErrorTranslationFilesPassportElementError returns new PassportElementError from PassportElementErrorTranslationFiles.

func NewPassportElementErrorUnspecifiedPassportElementError

func NewPassportElementErrorUnspecifiedPassportElementError(v PassportElementErrorUnspecified) PassportElementError

NewPassportElementErrorUnspecifiedPassportElementError returns new PassportElementError from PassportElementErrorUnspecified.

func (*PassportElementError) Decode

func (s *PassportElementError) Decode(d *jx.Decoder) error

Decode decodes PassportElementError from json.

func (PassportElementError) Encode

func (s PassportElementError) Encode(e *jx.Encoder)

Encode encodes PassportElementError as json.

func (PassportElementError) GetPassportElementErrorDataField

func (s PassportElementError) GetPassportElementErrorDataField() (v PassportElementErrorDataField, ok bool)

GetPassportElementErrorDataField returns PassportElementErrorDataField and true boolean if PassportElementError is PassportElementErrorDataField.

func (PassportElementError) GetPassportElementErrorFile

func (s PassportElementError) GetPassportElementErrorFile() (v PassportElementErrorFile, ok bool)

GetPassportElementErrorFile returns PassportElementErrorFile and true boolean if PassportElementError is PassportElementErrorFile.

func (PassportElementError) GetPassportElementErrorFiles

func (s PassportElementError) GetPassportElementErrorFiles() (v PassportElementErrorFiles, ok bool)

GetPassportElementErrorFiles returns PassportElementErrorFiles and true boolean if PassportElementError is PassportElementErrorFiles.

func (PassportElementError) GetPassportElementErrorFrontSide

func (s PassportElementError) GetPassportElementErrorFrontSide() (v PassportElementErrorFrontSide, ok bool)

GetPassportElementErrorFrontSide returns PassportElementErrorFrontSide and true boolean if PassportElementError is PassportElementErrorFrontSide.

func (PassportElementError) GetPassportElementErrorReverseSide

func (s PassportElementError) GetPassportElementErrorReverseSide() (v PassportElementErrorReverseSide, ok bool)

GetPassportElementErrorReverseSide returns PassportElementErrorReverseSide and true boolean if PassportElementError is PassportElementErrorReverseSide.

func (PassportElementError) GetPassportElementErrorSelfie

func (s PassportElementError) GetPassportElementErrorSelfie() (v PassportElementErrorSelfie, ok bool)

GetPassportElementErrorSelfie returns PassportElementErrorSelfie and true boolean if PassportElementError is PassportElementErrorSelfie.

func (PassportElementError) GetPassportElementErrorTranslationFile

func (s PassportElementError) GetPassportElementErrorTranslationFile() (v PassportElementErrorTranslationFile, ok bool)

GetPassportElementErrorTranslationFile returns PassportElementErrorTranslationFile and true boolean if PassportElementError is PassportElementErrorTranslationFile.

func (PassportElementError) GetPassportElementErrorTranslationFiles

func (s PassportElementError) GetPassportElementErrorTranslationFiles() (v PassportElementErrorTranslationFiles, ok bool)

GetPassportElementErrorTranslationFiles returns PassportElementErrorTranslationFiles and true boolean if PassportElementError is PassportElementErrorTranslationFiles.

func (PassportElementError) GetPassportElementErrorUnspecified

func (s PassportElementError) GetPassportElementErrorUnspecified() (v PassportElementErrorUnspecified, ok bool)

GetPassportElementErrorUnspecified returns PassportElementErrorUnspecified and true boolean if PassportElementError is PassportElementErrorUnspecified.

func (PassportElementError) IsPassportElementErrorDataField

func (s PassportElementError) IsPassportElementErrorDataField() bool

IsPassportElementErrorDataField reports whether PassportElementError is PassportElementErrorDataField.

func (PassportElementError) IsPassportElementErrorFile

func (s PassportElementError) IsPassportElementErrorFile() bool

IsPassportElementErrorFile reports whether PassportElementError is PassportElementErrorFile.

func (PassportElementError) IsPassportElementErrorFiles

func (s PassportElementError) IsPassportElementErrorFiles() bool

IsPassportElementErrorFiles reports whether PassportElementError is PassportElementErrorFiles.

func (PassportElementError) IsPassportElementErrorFrontSide

func (s PassportElementError) IsPassportElementErrorFrontSide() bool

IsPassportElementErrorFrontSide reports whether PassportElementError is PassportElementErrorFrontSide.

func (PassportElementError) IsPassportElementErrorReverseSide

func (s PassportElementError) IsPassportElementErrorReverseSide() bool

IsPassportElementErrorReverseSide reports whether PassportElementError is PassportElementErrorReverseSide.

func (PassportElementError) IsPassportElementErrorSelfie

func (s PassportElementError) IsPassportElementErrorSelfie() bool

IsPassportElementErrorSelfie reports whether PassportElementError is PassportElementErrorSelfie.

func (PassportElementError) IsPassportElementErrorTranslationFile

func (s PassportElementError) IsPassportElementErrorTranslationFile() bool

IsPassportElementErrorTranslationFile reports whether PassportElementError is PassportElementErrorTranslationFile.

func (PassportElementError) IsPassportElementErrorTranslationFiles

func (s PassportElementError) IsPassportElementErrorTranslationFiles() bool

IsPassportElementErrorTranslationFiles reports whether PassportElementError is PassportElementErrorTranslationFiles.

func (PassportElementError) IsPassportElementErrorUnspecified

func (s PassportElementError) IsPassportElementErrorUnspecified() bool

IsPassportElementErrorUnspecified reports whether PassportElementError is PassportElementErrorUnspecified.

func (PassportElementError) MarshalJSON

func (s PassportElementError) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PassportElementError) SetPassportElementErrorDataField

func (s *PassportElementError) SetPassportElementErrorDataField(v PassportElementErrorDataField)

SetPassportElementErrorDataField sets PassportElementError to PassportElementErrorDataField.

func (*PassportElementError) SetPassportElementErrorFile

func (s *PassportElementError) SetPassportElementErrorFile(v PassportElementErrorFile)

SetPassportElementErrorFile sets PassportElementError to PassportElementErrorFile.

func (*PassportElementError) SetPassportElementErrorFiles

func (s *PassportElementError) SetPassportElementErrorFiles(v PassportElementErrorFiles)

SetPassportElementErrorFiles sets PassportElementError to PassportElementErrorFiles.

func (*PassportElementError) SetPassportElementErrorFrontSide

func (s *PassportElementError) SetPassportElementErrorFrontSide(v PassportElementErrorFrontSide)

SetPassportElementErrorFrontSide sets PassportElementError to PassportElementErrorFrontSide.

func (*PassportElementError) SetPassportElementErrorReverseSide

func (s *PassportElementError) SetPassportElementErrorReverseSide(v PassportElementErrorReverseSide)

SetPassportElementErrorReverseSide sets PassportElementError to PassportElementErrorReverseSide.

func (*PassportElementError) SetPassportElementErrorSelfie

func (s *PassportElementError) SetPassportElementErrorSelfie(v PassportElementErrorSelfie)

SetPassportElementErrorSelfie sets PassportElementError to PassportElementErrorSelfie.

func (*PassportElementError) SetPassportElementErrorTranslationFile

func (s *PassportElementError) SetPassportElementErrorTranslationFile(v PassportElementErrorTranslationFile)

SetPassportElementErrorTranslationFile sets PassportElementError to PassportElementErrorTranslationFile.

func (*PassportElementError) SetPassportElementErrorTranslationFiles

func (s *PassportElementError) SetPassportElementErrorTranslationFiles(v PassportElementErrorTranslationFiles)

SetPassportElementErrorTranslationFiles sets PassportElementError to PassportElementErrorTranslationFiles.

func (*PassportElementError) SetPassportElementErrorUnspecified

func (s *PassportElementError) SetPassportElementErrorUnspecified(v PassportElementErrorUnspecified)

SetPassportElementErrorUnspecified sets PassportElementError to PassportElementErrorUnspecified.

func (*PassportElementError) UnmarshalJSON

func (s *PassportElementError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (PassportElementError) Validate

func (s PassportElementError) Validate() error

type PassportElementErrorDataField

type PassportElementErrorDataField struct {
	// Error source, must be _data_.
	Source string `json:"source"`
	// Name of the data field which has the error.
	FieldName string `json:"field_name"`
	// Base64-encoded data hash.
	DataHash string `json:"data_hash"`
	// Error message.
	Message string `json:"message"`
}

Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes. Ref: #/components/schemas/PassportElementErrorDataField

func (*PassportElementErrorDataField) Decode

Decode decodes PassportElementErrorDataField from json.

func (*PassportElementErrorDataField) Encode

Encode implements json.Marshaler.

func (*PassportElementErrorDataField) GetDataHash

func (s *PassportElementErrorDataField) GetDataHash() string

GetDataHash returns the value of DataHash.

func (*PassportElementErrorDataField) GetFieldName

func (s *PassportElementErrorDataField) GetFieldName() string

GetFieldName returns the value of FieldName.

func (*PassportElementErrorDataField) GetMessage

func (s *PassportElementErrorDataField) GetMessage() string

GetMessage returns the value of Message.

func (*PassportElementErrorDataField) GetSource

func (s *PassportElementErrorDataField) GetSource() string

GetSource returns the value of Source.

func (*PassportElementErrorDataField) MarshalJSON

func (s *PassportElementErrorDataField) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PassportElementErrorDataField) SetDataHash

func (s *PassportElementErrorDataField) SetDataHash(val string)

SetDataHash sets the value of DataHash.

func (*PassportElementErrorDataField) SetFieldName

func (s *PassportElementErrorDataField) SetFieldName(val string)

SetFieldName sets the value of FieldName.

func (*PassportElementErrorDataField) SetMessage

func (s *PassportElementErrorDataField) SetMessage(val string)

SetMessage sets the value of Message.

func (*PassportElementErrorDataField) SetSource

func (s *PassportElementErrorDataField) SetSource(val string)

SetSource sets the value of Source.

func (*PassportElementErrorDataField) UnmarshalJSON

func (s *PassportElementErrorDataField) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type PassportElementErrorDataFieldType

type PassportElementErrorDataFieldType string

The section of the user's Telegram Passport which has the error, one of `personal_details`, `passport`, `driver_license`, `identity_card`, `internal_passport`, `address`.

const (
	PassportElementErrorDataFieldTypePersonalDetails  PassportElementErrorDataFieldType = "personal_details"
	PassportElementErrorDataFieldTypePassport         PassportElementErrorDataFieldType = "passport"
	PassportElementErrorDataFieldTypeDriverLicense    PassportElementErrorDataFieldType = "driver_license"
	PassportElementErrorDataFieldTypeIdentityCard     PassportElementErrorDataFieldType = "identity_card"
	PassportElementErrorDataFieldTypeInternalPassport PassportElementErrorDataFieldType = "internal_passport"
	PassportElementErrorDataFieldTypeAddress          PassportElementErrorDataFieldType = "address"
)

func (PassportElementErrorDataFieldType) MarshalText

func (s PassportElementErrorDataFieldType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*PassportElementErrorDataFieldType) UnmarshalText

func (s *PassportElementErrorDataFieldType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (PassportElementErrorDataFieldType) Validate

type PassportElementErrorFile

type PassportElementErrorFile struct {
	// Error source, must be _file_.
	Source string `json:"source"`
	// Base64-encoded file hash.
	FileHash string `json:"file_hash"`
	// Error message.
	Message string `json:"message"`
}

Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes. Ref: #/components/schemas/PassportElementErrorFile

func (*PassportElementErrorFile) Decode

func (s *PassportElementErrorFile) Decode(d *jx.Decoder) error

Decode decodes PassportElementErrorFile from json.

func (*PassportElementErrorFile) Encode

func (s *PassportElementErrorFile) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*PassportElementErrorFile) GetFileHash

func (s *PassportElementErrorFile) GetFileHash() string

GetFileHash returns the value of FileHash.

func (*PassportElementErrorFile) GetMessage

func (s *PassportElementErrorFile) GetMessage() string

GetMessage returns the value of Message.

func (*PassportElementErrorFile) GetSource

func (s *PassportElementErrorFile) GetSource() string

GetSource returns the value of Source.

func (*PassportElementErrorFile) MarshalJSON

func (s *PassportElementErrorFile) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PassportElementErrorFile) SetFileHash

func (s *PassportElementErrorFile) SetFileHash(val string)

SetFileHash sets the value of FileHash.

func (*PassportElementErrorFile) SetMessage

func (s *PassportElementErrorFile) SetMessage(val string)

SetMessage sets the value of Message.

func (*PassportElementErrorFile) SetSource

func (s *PassportElementErrorFile) SetSource(val string)

SetSource sets the value of Source.

func (*PassportElementErrorFile) UnmarshalJSON

func (s *PassportElementErrorFile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type PassportElementErrorFileType

type PassportElementErrorFileType string

The section of the user's Telegram Passport which has the issue, one of `utility_bill`, `bank_statement`, `rental_agreement`, `passport_registration`, `temporary_registration`.

const (
	PassportElementErrorFileTypeUtilityBill           PassportElementErrorFileType = "utility_bill"
	PassportElementErrorFileTypeBankStatement         PassportElementErrorFileType = "bank_statement"
	PassportElementErrorFileTypeRentalAgreement       PassportElementErrorFileType = "rental_agreement"
	PassportElementErrorFileTypePassportRegistration  PassportElementErrorFileType = "passport_registration"
	PassportElementErrorFileTypeTemporaryRegistration PassportElementErrorFileType = "temporary_registration"
)

func (PassportElementErrorFileType) MarshalText

func (s PassportElementErrorFileType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*PassportElementErrorFileType) UnmarshalText

func (s *PassportElementErrorFileType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (PassportElementErrorFileType) Validate

func (s PassportElementErrorFileType) Validate() error

type PassportElementErrorFiles

type PassportElementErrorFiles struct {
	// Error source, must be _files_.
	Source string `json:"source"`
	// List of base64-encoded file hashes.
	FileHashes []string `json:"file_hashes"`
	// Error message.
	Message string `json:"message"`
}

Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes. Ref: #/components/schemas/PassportElementErrorFiles

func (*PassportElementErrorFiles) Decode

func (s *PassportElementErrorFiles) Decode(d *jx.Decoder) error

Decode decodes PassportElementErrorFiles from json.

func (*PassportElementErrorFiles) Encode

func (s *PassportElementErrorFiles) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*PassportElementErrorFiles) GetFileHashes

func (s *PassportElementErrorFiles) GetFileHashes() []string

GetFileHashes returns the value of FileHashes.

func (*PassportElementErrorFiles) GetMessage

func (s *PassportElementErrorFiles) GetMessage() string

GetMessage returns the value of Message.

func (*PassportElementErrorFiles) GetSource

func (s *PassportElementErrorFiles) GetSource() string

GetSource returns the value of Source.

func (*PassportElementErrorFiles) MarshalJSON

func (s *PassportElementErrorFiles) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PassportElementErrorFiles) SetFileHashes

func (s *PassportElementErrorFiles) SetFileHashes(val []string)

SetFileHashes sets the value of FileHashes.

func (*PassportElementErrorFiles) SetMessage

func (s *PassportElementErrorFiles) SetMessage(val string)

SetMessage sets the value of Message.

func (*PassportElementErrorFiles) SetSource

func (s *PassportElementErrorFiles) SetSource(val string)

SetSource sets the value of Source.

func (*PassportElementErrorFiles) UnmarshalJSON

func (s *PassportElementErrorFiles) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*PassportElementErrorFiles) Validate

func (s *PassportElementErrorFiles) Validate() error

type PassportElementErrorFilesType

type PassportElementErrorFilesType string

The section of the user's Telegram Passport which has the issue, one of `utility_bill`, `bank_statement`, `rental_agreement`, `passport_registration`, `temporary_registration`.

const (
	PassportElementErrorFilesTypeUtilityBill           PassportElementErrorFilesType = "utility_bill"
	PassportElementErrorFilesTypeBankStatement         PassportElementErrorFilesType = "bank_statement"
	PassportElementErrorFilesTypeRentalAgreement       PassportElementErrorFilesType = "rental_agreement"
	PassportElementErrorFilesTypePassportRegistration  PassportElementErrorFilesType = "passport_registration"
	PassportElementErrorFilesTypeTemporaryRegistration PassportElementErrorFilesType = "temporary_registration"
)

func (PassportElementErrorFilesType) MarshalText

func (s PassportElementErrorFilesType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*PassportElementErrorFilesType) UnmarshalText

func (s *PassportElementErrorFilesType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (PassportElementErrorFilesType) Validate

func (s PassportElementErrorFilesType) Validate() error

type PassportElementErrorFrontSide

type PassportElementErrorFrontSide struct {
	// Error source, must be _front_side_.
	Source string `json:"source"`
	// Base64-encoded hash of the file with the front side of the document.
	FileHash string `json:"file_hash"`
	// Error message.
	Message string `json:"message"`
}

Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes. Ref: #/components/schemas/PassportElementErrorFrontSide

func (*PassportElementErrorFrontSide) Decode

Decode decodes PassportElementErrorFrontSide from json.

func (*PassportElementErrorFrontSide) Encode

Encode implements json.Marshaler.

func (*PassportElementErrorFrontSide) GetFileHash

func (s *PassportElementErrorFrontSide) GetFileHash() string

GetFileHash returns the value of FileHash.

func (*PassportElementErrorFrontSide) GetMessage

func (s *PassportElementErrorFrontSide) GetMessage() string

GetMessage returns the value of Message.

func (*PassportElementErrorFrontSide) GetSource

func (s *PassportElementErrorFrontSide) GetSource() string

GetSource returns the value of Source.

func (*PassportElementErrorFrontSide) MarshalJSON

func (s *PassportElementErrorFrontSide) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PassportElementErrorFrontSide) SetFileHash

func (s *PassportElementErrorFrontSide) SetFileHash(val string)

SetFileHash sets the value of FileHash.

func (*PassportElementErrorFrontSide) SetMessage

func (s *PassportElementErrorFrontSide) SetMessage(val string)

SetMessage sets the value of Message.

func (*PassportElementErrorFrontSide) SetSource

func (s *PassportElementErrorFrontSide) SetSource(val string)

SetSource sets the value of Source.

func (*PassportElementErrorFrontSide) UnmarshalJSON

func (s *PassportElementErrorFrontSide) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type PassportElementErrorFrontSideType

type PassportElementErrorFrontSideType string

The section of the user's Telegram Passport which has the issue, one of `passport`, `driver_license`, `identity_card`, `internal_passport`.

const (
	PassportElementErrorFrontSideTypePassport         PassportElementErrorFrontSideType = "passport"
	PassportElementErrorFrontSideTypeDriverLicense    PassportElementErrorFrontSideType = "driver_license"
	PassportElementErrorFrontSideTypeIdentityCard     PassportElementErrorFrontSideType = "identity_card"
	PassportElementErrorFrontSideTypeInternalPassport PassportElementErrorFrontSideType = "internal_passport"
)

func (PassportElementErrorFrontSideType) MarshalText

func (s PassportElementErrorFrontSideType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*PassportElementErrorFrontSideType) UnmarshalText

func (s *PassportElementErrorFrontSideType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (PassportElementErrorFrontSideType) Validate

type PassportElementErrorReverseSide

type PassportElementErrorReverseSide struct {
	// Error source, must be _reverse_side_.
	Source string `json:"source"`
	// Base64-encoded hash of the file with the reverse side of the document.
	FileHash string `json:"file_hash"`
	// Error message.
	Message string `json:"message"`
}

Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes. Ref: #/components/schemas/PassportElementErrorReverseSide

func (*PassportElementErrorReverseSide) Decode

Decode decodes PassportElementErrorReverseSide from json.

func (*PassportElementErrorReverseSide) Encode

Encode implements json.Marshaler.

func (*PassportElementErrorReverseSide) GetFileHash

func (s *PassportElementErrorReverseSide) GetFileHash() string

GetFileHash returns the value of FileHash.

func (*PassportElementErrorReverseSide) GetMessage

func (s *PassportElementErrorReverseSide) GetMessage() string

GetMessage returns the value of Message.

func (*PassportElementErrorReverseSide) GetSource

func (s *PassportElementErrorReverseSide) GetSource() string

GetSource returns the value of Source.

func (*PassportElementErrorReverseSide) MarshalJSON

func (s *PassportElementErrorReverseSide) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PassportElementErrorReverseSide) SetFileHash

func (s *PassportElementErrorReverseSide) SetFileHash(val string)

SetFileHash sets the value of FileHash.

func (*PassportElementErrorReverseSide) SetMessage

func (s *PassportElementErrorReverseSide) SetMessage(val string)

SetMessage sets the value of Message.

func (*PassportElementErrorReverseSide) SetSource

func (s *PassportElementErrorReverseSide) SetSource(val string)

SetSource sets the value of Source.

func (*PassportElementErrorReverseSide) UnmarshalJSON

func (s *PassportElementErrorReverseSide) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type PassportElementErrorReverseSideType

type PassportElementErrorReverseSideType string

The section of the user's Telegram Passport which has the issue, one of `driver_license`, `identity_card`.

const (
	PassportElementErrorReverseSideTypeDriverLicense PassportElementErrorReverseSideType = "driver_license"
	PassportElementErrorReverseSideTypeIdentityCard  PassportElementErrorReverseSideType = "identity_card"
)

func (PassportElementErrorReverseSideType) MarshalText

func (s PassportElementErrorReverseSideType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*PassportElementErrorReverseSideType) UnmarshalText

func (s *PassportElementErrorReverseSideType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (PassportElementErrorReverseSideType) Validate

type PassportElementErrorSelfie

type PassportElementErrorSelfie struct {
	// Error source, must be _selfie_.
	Source string `json:"source"`
	// Base64-encoded hash of the file with the selfie.
	FileHash string `json:"file_hash"`
	// Error message.
	Message string `json:"message"`
}

Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes. Ref: #/components/schemas/PassportElementErrorSelfie

func (*PassportElementErrorSelfie) Decode

Decode decodes PassportElementErrorSelfie from json.

func (*PassportElementErrorSelfie) Encode

func (s *PassportElementErrorSelfie) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*PassportElementErrorSelfie) GetFileHash

func (s *PassportElementErrorSelfie) GetFileHash() string

GetFileHash returns the value of FileHash.

func (*PassportElementErrorSelfie) GetMessage

func (s *PassportElementErrorSelfie) GetMessage() string

GetMessage returns the value of Message.

func (*PassportElementErrorSelfie) GetSource

func (s *PassportElementErrorSelfie) GetSource() string

GetSource returns the value of Source.

func (*PassportElementErrorSelfie) MarshalJSON

func (s *PassportElementErrorSelfie) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PassportElementErrorSelfie) SetFileHash

func (s *PassportElementErrorSelfie) SetFileHash(val string)

SetFileHash sets the value of FileHash.

func (*PassportElementErrorSelfie) SetMessage

func (s *PassportElementErrorSelfie) SetMessage(val string)

SetMessage sets the value of Message.

func (*PassportElementErrorSelfie) SetSource

func (s *PassportElementErrorSelfie) SetSource(val string)

SetSource sets the value of Source.

func (*PassportElementErrorSelfie) UnmarshalJSON

func (s *PassportElementErrorSelfie) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type PassportElementErrorSelfieType

type PassportElementErrorSelfieType string

The section of the user's Telegram Passport which has the issue, one of `passport`, `driver_license`, `identity_card`, `internal_passport`.

const (
	PassportElementErrorSelfieTypePassport         PassportElementErrorSelfieType = "passport"
	PassportElementErrorSelfieTypeDriverLicense    PassportElementErrorSelfieType = "driver_license"
	PassportElementErrorSelfieTypeIdentityCard     PassportElementErrorSelfieType = "identity_card"
	PassportElementErrorSelfieTypeInternalPassport PassportElementErrorSelfieType = "internal_passport"
)

func (PassportElementErrorSelfieType) MarshalText

func (s PassportElementErrorSelfieType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*PassportElementErrorSelfieType) UnmarshalText

func (s *PassportElementErrorSelfieType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (PassportElementErrorSelfieType) Validate

type PassportElementErrorTranslationFile

type PassportElementErrorTranslationFile struct {
	// Error source, must be _translation_file_.
	Source string `json:"source"`
	// Base64-encoded file hash.
	FileHash string `json:"file_hash"`
	// Error message.
	Message string `json:"message"`
}

Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes. Ref: #/components/schemas/PassportElementErrorTranslationFile

func (*PassportElementErrorTranslationFile) Decode

Decode decodes PassportElementErrorTranslationFile from json.

func (*PassportElementErrorTranslationFile) Encode

Encode implements json.Marshaler.

func (*PassportElementErrorTranslationFile) GetFileHash

GetFileHash returns the value of FileHash.

func (*PassportElementErrorTranslationFile) GetMessage

GetMessage returns the value of Message.

func (*PassportElementErrorTranslationFile) GetSource

GetSource returns the value of Source.

func (*PassportElementErrorTranslationFile) MarshalJSON

func (s *PassportElementErrorTranslationFile) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PassportElementErrorTranslationFile) SetFileHash

func (s *PassportElementErrorTranslationFile) SetFileHash(val string)

SetFileHash sets the value of FileHash.

func (*PassportElementErrorTranslationFile) SetMessage

func (s *PassportElementErrorTranslationFile) SetMessage(val string)

SetMessage sets the value of Message.

func (*PassportElementErrorTranslationFile) SetSource

func (s *PassportElementErrorTranslationFile) SetSource(val string)

SetSource sets the value of Source.

func (*PassportElementErrorTranslationFile) UnmarshalJSON

func (s *PassportElementErrorTranslationFile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type PassportElementErrorTranslationFileType

type PassportElementErrorTranslationFileType string

Type of element of the user's Telegram Passport which has the issue, one of `passport`, `driver_license`, `identity_card`, `internal_passport`, `utility_bill`, `bank_statement`, `rental_agreement`, `passport_registration`, `temporary_registration`.

const (
	PassportElementErrorTranslationFileTypePassport              PassportElementErrorTranslationFileType = "passport"
	PassportElementErrorTranslationFileTypeDriverLicense         PassportElementErrorTranslationFileType = "driver_license"
	PassportElementErrorTranslationFileTypeIdentityCard          PassportElementErrorTranslationFileType = "identity_card"
	PassportElementErrorTranslationFileTypeInternalPassport      PassportElementErrorTranslationFileType = "internal_passport"
	PassportElementErrorTranslationFileTypeUtilityBill           PassportElementErrorTranslationFileType = "utility_bill"
	PassportElementErrorTranslationFileTypeBankStatement         PassportElementErrorTranslationFileType = "bank_statement"
	PassportElementErrorTranslationFileTypeRentalAgreement       PassportElementErrorTranslationFileType = "rental_agreement"
	PassportElementErrorTranslationFileTypePassportRegistration  PassportElementErrorTranslationFileType = "passport_registration"
	PassportElementErrorTranslationFileTypeTemporaryRegistration PassportElementErrorTranslationFileType = "temporary_registration"
)

func (PassportElementErrorTranslationFileType) MarshalText

func (s PassportElementErrorTranslationFileType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*PassportElementErrorTranslationFileType) UnmarshalText

func (s *PassportElementErrorTranslationFileType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (PassportElementErrorTranslationFileType) Validate

type PassportElementErrorTranslationFiles

type PassportElementErrorTranslationFiles struct {
	// Error source, must be _translation_files_.
	Source string `json:"source"`
	// List of base64-encoded file hashes.
	FileHashes []string `json:"file_hashes"`
	// Error message.
	Message string `json:"message"`
}

Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change. Ref: #/components/schemas/PassportElementErrorTranslationFiles

func (*PassportElementErrorTranslationFiles) Decode

Decode decodes PassportElementErrorTranslationFiles from json.

func (*PassportElementErrorTranslationFiles) Encode

Encode implements json.Marshaler.

func (*PassportElementErrorTranslationFiles) GetFileHashes

func (s *PassportElementErrorTranslationFiles) GetFileHashes() []string

GetFileHashes returns the value of FileHashes.

func (*PassportElementErrorTranslationFiles) GetMessage

GetMessage returns the value of Message.

func (*PassportElementErrorTranslationFiles) GetSource

GetSource returns the value of Source.

func (*PassportElementErrorTranslationFiles) MarshalJSON

func (s *PassportElementErrorTranslationFiles) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PassportElementErrorTranslationFiles) SetFileHashes

func (s *PassportElementErrorTranslationFiles) SetFileHashes(val []string)

SetFileHashes sets the value of FileHashes.

func (*PassportElementErrorTranslationFiles) SetMessage

func (s *PassportElementErrorTranslationFiles) SetMessage(val string)

SetMessage sets the value of Message.

func (*PassportElementErrorTranslationFiles) SetSource

func (s *PassportElementErrorTranslationFiles) SetSource(val string)

SetSource sets the value of Source.

func (*PassportElementErrorTranslationFiles) UnmarshalJSON

func (s *PassportElementErrorTranslationFiles) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*PassportElementErrorTranslationFiles) Validate

type PassportElementErrorTranslationFilesType

type PassportElementErrorTranslationFilesType string

Type of element of the user's Telegram Passport which has the issue, one of `passport`, `driver_license`, `identity_card`, `internal_passport`, `utility_bill`, `bank_statement`, `rental_agreement`, `passport_registration`, `temporary_registration`.

const (
	PassportElementErrorTranslationFilesTypePassport              PassportElementErrorTranslationFilesType = "passport"
	PassportElementErrorTranslationFilesTypeDriverLicense         PassportElementErrorTranslationFilesType = "driver_license"
	PassportElementErrorTranslationFilesTypeIdentityCard          PassportElementErrorTranslationFilesType = "identity_card"
	PassportElementErrorTranslationFilesTypeInternalPassport      PassportElementErrorTranslationFilesType = "internal_passport"
	PassportElementErrorTranslationFilesTypeUtilityBill           PassportElementErrorTranslationFilesType = "utility_bill"
	PassportElementErrorTranslationFilesTypeBankStatement         PassportElementErrorTranslationFilesType = "bank_statement"
	PassportElementErrorTranslationFilesTypeRentalAgreement       PassportElementErrorTranslationFilesType = "rental_agreement"
	PassportElementErrorTranslationFilesTypePassportRegistration  PassportElementErrorTranslationFilesType = "passport_registration"
	PassportElementErrorTranslationFilesTypeTemporaryRegistration PassportElementErrorTranslationFilesType = "temporary_registration"
)

func (PassportElementErrorTranslationFilesType) MarshalText

MarshalText implements encoding.TextMarshaler.

func (*PassportElementErrorTranslationFilesType) UnmarshalText

func (s *PassportElementErrorTranslationFilesType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (PassportElementErrorTranslationFilesType) Validate

type PassportElementErrorType

type PassportElementErrorType string

PassportElementErrorType is oneOf type of PassportElementError.

const (
	PassportElementErrorDataFieldPassportElementError        PassportElementErrorType = "PassportElementErrorDataField"
	PassportElementErrorFrontSidePassportElementError        PassportElementErrorType = "PassportElementErrorFrontSide"
	PassportElementErrorReverseSidePassportElementError      PassportElementErrorType = "PassportElementErrorReverseSide"
	PassportElementErrorSelfiePassportElementError           PassportElementErrorType = "PassportElementErrorSelfie"
	PassportElementErrorFilePassportElementError             PassportElementErrorType = "PassportElementErrorFile"
	PassportElementErrorFilesPassportElementError            PassportElementErrorType = "PassportElementErrorFiles"
	PassportElementErrorTranslationFilePassportElementError  PassportElementErrorType = "PassportElementErrorTranslationFile"
	PassportElementErrorTranslationFilesPassportElementError PassportElementErrorType = "PassportElementErrorTranslationFiles"
	PassportElementErrorUnspecifiedPassportElementError      PassportElementErrorType = "PassportElementErrorUnspecified"
)

Possible values for PassportElementErrorType.

type PassportElementErrorUnspecified

type PassportElementErrorUnspecified struct {
	// Error source, must be _unspecified_.
	Source string `json:"source"`
	// Base64-encoded element hash.
	ElementHash string `json:"element_hash"`
	// Error message.
	Message string `json:"message"`
}

Represents an issue in an unspecified place. The error is considered resolved when new data is added. Ref: #/components/schemas/PassportElementErrorUnspecified

func (*PassportElementErrorUnspecified) Decode

Decode decodes PassportElementErrorUnspecified from json.

func (*PassportElementErrorUnspecified) Encode

Encode implements json.Marshaler.

func (*PassportElementErrorUnspecified) GetElementHash

func (s *PassportElementErrorUnspecified) GetElementHash() string

GetElementHash returns the value of ElementHash.

func (*PassportElementErrorUnspecified) GetMessage

func (s *PassportElementErrorUnspecified) GetMessage() string

GetMessage returns the value of Message.

func (*PassportElementErrorUnspecified) GetSource

func (s *PassportElementErrorUnspecified) GetSource() string

GetSource returns the value of Source.

func (*PassportElementErrorUnspecified) MarshalJSON

func (s *PassportElementErrorUnspecified) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PassportElementErrorUnspecified) SetElementHash

func (s *PassportElementErrorUnspecified) SetElementHash(val string)

SetElementHash sets the value of ElementHash.

func (*PassportElementErrorUnspecified) SetMessage

func (s *PassportElementErrorUnspecified) SetMessage(val string)

SetMessage sets the value of Message.

func (*PassportElementErrorUnspecified) SetSource

func (s *PassportElementErrorUnspecified) SetSource(val string)

SetSource sets the value of Source.

func (*PassportElementErrorUnspecified) UnmarshalJSON

func (s *PassportElementErrorUnspecified) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type PassportFile

type PassportFile struct {
	// Identifier for this file, which can be used to download or reuse the file.
	FileID string `json:"file_id"`
	// Unique identifier for this file, which is supposed to be the same over time and for different bots.
	//  Can't be used to download or reuse the file.
	FileUniqueID string `json:"file_unique_id"`
	// File size in bytes.
	FileSize int `json:"file_size"`
	// Unix time when the file was uploaded.
	FileDate int `json:"file_date"`
}

This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB. Ref: #/components/schemas/PassportFile

func (*PassportFile) Decode

func (s *PassportFile) Decode(d *jx.Decoder) error

Decode decodes PassportFile from json.

func (*PassportFile) Encode

func (s *PassportFile) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*PassportFile) GetFileDate

func (s *PassportFile) GetFileDate() int

GetFileDate returns the value of FileDate.

func (*PassportFile) GetFileID

func (s *PassportFile) GetFileID() string

GetFileID returns the value of FileID.

func (*PassportFile) GetFileSize

func (s *PassportFile) GetFileSize() int

GetFileSize returns the value of FileSize.

func (*PassportFile) GetFileUniqueID

func (s *PassportFile) GetFileUniqueID() string

GetFileUniqueID returns the value of FileUniqueID.

func (*PassportFile) MarshalJSON

func (s *PassportFile) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PassportFile) SetFileDate

func (s *PassportFile) SetFileDate(val int)

SetFileDate sets the value of FileDate.

func (*PassportFile) SetFileID

func (s *PassportFile) SetFileID(val string)

SetFileID sets the value of FileID.

func (*PassportFile) SetFileSize

func (s *PassportFile) SetFileSize(val int)

SetFileSize sets the value of FileSize.

func (*PassportFile) SetFileUniqueID

func (s *PassportFile) SetFileUniqueID(val string)

SetFileUniqueID sets the value of FileUniqueID.

func (*PassportFile) UnmarshalJSON

func (s *PassportFile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type PhotoSize

type PhotoSize struct {
	// Identifier for this file, which can be used to download or reuse the file.
	FileID string `json:"file_id"`
	// Unique identifier for this file, which is supposed to be the same over time and for different bots.
	//  Can't be used to download or reuse the file.
	FileUniqueID string `json:"file_unique_id"`
	// Photo width.
	Width int `json:"width"`
	// Photo height.
	Height int `json:"height"`
	// _Optional_. File size in bytes.
	FileSize OptInt `json:"file_size"`
}

This object represents one size of a photo or a [file](https://core.telegram. org/bots/api#document) / [sticker](https://core.telegram.org/bots/api#sticker) thumbnail. Ref: #/components/schemas/PhotoSize

func (*PhotoSize) Decode

func (s *PhotoSize) Decode(d *jx.Decoder) error

Decode decodes PhotoSize from json.

func (*PhotoSize) Encode

func (s *PhotoSize) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*PhotoSize) GetFileID

func (s *PhotoSize) GetFileID() string

GetFileID returns the value of FileID.

func (*PhotoSize) GetFileSize

func (s *PhotoSize) GetFileSize() OptInt

GetFileSize returns the value of FileSize.

func (*PhotoSize) GetFileUniqueID

func (s *PhotoSize) GetFileUniqueID() string

GetFileUniqueID returns the value of FileUniqueID.

func (*PhotoSize) GetHeight

func (s *PhotoSize) GetHeight() int

GetHeight returns the value of Height.

func (*PhotoSize) GetWidth

func (s *PhotoSize) GetWidth() int

GetWidth returns the value of Width.

func (*PhotoSize) MarshalJSON

func (s *PhotoSize) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PhotoSize) SetFileID

func (s *PhotoSize) SetFileID(val string)

SetFileID sets the value of FileID.

func (*PhotoSize) SetFileSize

func (s *PhotoSize) SetFileSize(val OptInt)

SetFileSize sets the value of FileSize.

func (*PhotoSize) SetFileUniqueID

func (s *PhotoSize) SetFileUniqueID(val string)

SetFileUniqueID sets the value of FileUniqueID.

func (*PhotoSize) SetHeight

func (s *PhotoSize) SetHeight(val int)

SetHeight sets the value of Height.

func (*PhotoSize) SetWidth

func (s *PhotoSize) SetWidth(val int)

SetWidth sets the value of Width.

func (*PhotoSize) UnmarshalJSON

func (s *PhotoSize) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*PhotoSize) Validate

func (s *PhotoSize) Validate() error

type PinChatMessage

type PinChatMessage struct {
	ChatID ID `json:"chat_id"`
	// Identifier of a message to pin.
	MessageID int `json:"message_id"`
	// Pass _True_ if it is not necessary to send a notification to all chat members about the new pinned
	// message. Notifications are always disabled in channels and private chats.
	DisableNotification OptBool `json:"disable_notification"`
}

Input for pinChatMessage. Ref: #/components/schemas/pinChatMessage

func (*PinChatMessage) Decode

func (s *PinChatMessage) Decode(d *jx.Decoder) error

Decode decodes PinChatMessage from json.

func (*PinChatMessage) Encode

func (s *PinChatMessage) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*PinChatMessage) GetChatID

func (s *PinChatMessage) GetChatID() ID

GetChatID returns the value of ChatID.

func (*PinChatMessage) GetDisableNotification

func (s *PinChatMessage) GetDisableNotification() OptBool

GetDisableNotification returns the value of DisableNotification.

func (*PinChatMessage) GetMessageID

func (s *PinChatMessage) GetMessageID() int

GetMessageID returns the value of MessageID.

func (*PinChatMessage) MarshalJSON

func (s *PinChatMessage) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PinChatMessage) SetChatID

func (s *PinChatMessage) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*PinChatMessage) SetDisableNotification

func (s *PinChatMessage) SetDisableNotification(val OptBool)

SetDisableNotification sets the value of DisableNotification.

func (*PinChatMessage) SetMessageID

func (s *PinChatMessage) SetMessageID(val int)

SetMessageID sets the value of MessageID.

func (*PinChatMessage) UnmarshalJSON

func (s *PinChatMessage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Poll

type Poll struct {
	// Unique poll identifier.
	ID string `json:"id"`
	// Poll question, 1-300 characters.
	Question string `json:"question"`
	// List of poll options.
	Options []PollOption `json:"options"`
	// Total number of users that voted in the poll.
	TotalVoterCount int `json:"total_voter_count"`
	// _True_, if the poll is closed.
	IsClosed bool `json:"is_closed"`
	// _True_, if the poll is anonymous.
	IsAnonymous bool `json:"is_anonymous"`
	// Poll type, currently can be `regular` or `quiz`.
	Type PollType `json:"type"`
	// _True_, if the poll allows multiple answers.
	AllowsMultipleAnswers bool `json:"allows_multiple_answers"`
	// _Optional_. 0-based identifier of the correct answer option. Available only for polls in the quiz
	// mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.
	CorrectOptionID OptInt `json:"correct_option_id"`
	// _Optional_. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in
	// a quiz-style poll, 0-200 characters.
	Explanation OptString `json:"explanation"`
	// _Optional_. Special entities like usernames, URLs, bot commands, etc. that appear in the
	// _explanation_.
	ExplanationEntities []MessageEntity `json:"explanation_entities"`
	// _Optional_. Amount of time in seconds the poll will be active after creation.
	OpenPeriod OptInt `json:"open_period"`
	// _Optional_. Point in time (Unix timestamp) when the poll will be automatically closed.
	CloseDate OptInt `json:"close_date"`
}

This object contains information about a poll. Ref: #/components/schemas/Poll

func (*Poll) Decode

func (s *Poll) Decode(d *jx.Decoder) error

Decode decodes Poll from json.

func (*Poll) Encode

func (s *Poll) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Poll) GetAllowsMultipleAnswers

func (s *Poll) GetAllowsMultipleAnswers() bool

GetAllowsMultipleAnswers returns the value of AllowsMultipleAnswers.

func (*Poll) GetCloseDate

func (s *Poll) GetCloseDate() OptInt

GetCloseDate returns the value of CloseDate.

func (*Poll) GetCorrectOptionID

func (s *Poll) GetCorrectOptionID() OptInt

GetCorrectOptionID returns the value of CorrectOptionID.

func (*Poll) GetExplanation

func (s *Poll) GetExplanation() OptString

GetExplanation returns the value of Explanation.

func (*Poll) GetExplanationEntities

func (s *Poll) GetExplanationEntities() []MessageEntity

GetExplanationEntities returns the value of ExplanationEntities.

func (*Poll) GetID

func (s *Poll) GetID() string

GetID returns the value of ID.

func (*Poll) GetIsAnonymous

func (s *Poll) GetIsAnonymous() bool

GetIsAnonymous returns the value of IsAnonymous.

func (*Poll) GetIsClosed

func (s *Poll) GetIsClosed() bool

GetIsClosed returns the value of IsClosed.

func (*Poll) GetOpenPeriod

func (s *Poll) GetOpenPeriod() OptInt

GetOpenPeriod returns the value of OpenPeriod.

func (*Poll) GetOptions

func (s *Poll) GetOptions() []PollOption

GetOptions returns the value of Options.

func (*Poll) GetQuestion

func (s *Poll) GetQuestion() string

GetQuestion returns the value of Question.

func (*Poll) GetTotalVoterCount

func (s *Poll) GetTotalVoterCount() int

GetTotalVoterCount returns the value of TotalVoterCount.

func (*Poll) GetType

func (s *Poll) GetType() PollType

GetType returns the value of Type.

func (*Poll) MarshalJSON

func (s *Poll) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Poll) SetAllowsMultipleAnswers

func (s *Poll) SetAllowsMultipleAnswers(val bool)

SetAllowsMultipleAnswers sets the value of AllowsMultipleAnswers.

func (*Poll) SetCloseDate

func (s *Poll) SetCloseDate(val OptInt)

SetCloseDate sets the value of CloseDate.

func (*Poll) SetCorrectOptionID

func (s *Poll) SetCorrectOptionID(val OptInt)

SetCorrectOptionID sets the value of CorrectOptionID.

func (*Poll) SetExplanation

func (s *Poll) SetExplanation(val OptString)

SetExplanation sets the value of Explanation.

func (*Poll) SetExplanationEntities

func (s *Poll) SetExplanationEntities(val []MessageEntity)

SetExplanationEntities sets the value of ExplanationEntities.

func (*Poll) SetID

func (s *Poll) SetID(val string)

SetID sets the value of ID.

func (*Poll) SetIsAnonymous

func (s *Poll) SetIsAnonymous(val bool)

SetIsAnonymous sets the value of IsAnonymous.

func (*Poll) SetIsClosed

func (s *Poll) SetIsClosed(val bool)

SetIsClosed sets the value of IsClosed.

func (*Poll) SetOpenPeriod

func (s *Poll) SetOpenPeriod(val OptInt)

SetOpenPeriod sets the value of OpenPeriod.

func (*Poll) SetOptions

func (s *Poll) SetOptions(val []PollOption)

SetOptions sets the value of Options.

func (*Poll) SetQuestion

func (s *Poll) SetQuestion(val string)

SetQuestion sets the value of Question.

func (*Poll) SetTotalVoterCount

func (s *Poll) SetTotalVoterCount(val int)

SetTotalVoterCount sets the value of TotalVoterCount.

func (*Poll) SetType

func (s *Poll) SetType(val PollType)

SetType sets the value of Type.

func (*Poll) UnmarshalJSON

func (s *Poll) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Poll) Validate

func (s *Poll) Validate() error

type PollAnswer

type PollAnswer struct {
	// Unique poll identifier.
	PollID string `json:"poll_id"`
	User   User   `json:"user"`
	// 0-based identifiers of answer options, chosen by the user. May be empty if the user retracted
	// their vote.
	OptionIds []int `json:"option_ids"`
}

This object represents an answer of a user in a non-anonymous poll. Ref: #/components/schemas/PollAnswer

func (*PollAnswer) Decode

func (s *PollAnswer) Decode(d *jx.Decoder) error

Decode decodes PollAnswer from json.

func (*PollAnswer) Encode

func (s *PollAnswer) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*PollAnswer) GetOptionIds

func (s *PollAnswer) GetOptionIds() []int

GetOptionIds returns the value of OptionIds.

func (*PollAnswer) GetPollID

func (s *PollAnswer) GetPollID() string

GetPollID returns the value of PollID.

func (*PollAnswer) GetUser

func (s *PollAnswer) GetUser() User

GetUser returns the value of User.

func (*PollAnswer) MarshalJSON

func (s *PollAnswer) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PollAnswer) SetOptionIds

func (s *PollAnswer) SetOptionIds(val []int)

SetOptionIds sets the value of OptionIds.

func (*PollAnswer) SetPollID

func (s *PollAnswer) SetPollID(val string)

SetPollID sets the value of PollID.

func (*PollAnswer) SetUser

func (s *PollAnswer) SetUser(val User)

SetUser sets the value of User.

func (*PollAnswer) UnmarshalJSON

func (s *PollAnswer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*PollAnswer) Validate

func (s *PollAnswer) Validate() error

type PollOption

type PollOption struct {
	// Option text, 1-100 characters.
	Text string `json:"text"`
	// Number of users that voted for this option.
	VoterCount int `json:"voter_count"`
}

This object contains information about one answer option in a poll. Ref: #/components/schemas/PollOption

func (*PollOption) Decode

func (s *PollOption) Decode(d *jx.Decoder) error

Decode decodes PollOption from json.

func (*PollOption) Encode

func (s *PollOption) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*PollOption) GetText

func (s *PollOption) GetText() string

GetText returns the value of Text.

func (*PollOption) GetVoterCount

func (s *PollOption) GetVoterCount() int

GetVoterCount returns the value of VoterCount.

func (*PollOption) MarshalJSON

func (s *PollOption) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PollOption) SetText

func (s *PollOption) SetText(val string)

SetText sets the value of Text.

func (*PollOption) SetVoterCount

func (s *PollOption) SetVoterCount(val int)

SetVoterCount sets the value of VoterCount.

func (*PollOption) UnmarshalJSON

func (s *PollOption) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*PollOption) Validate

func (s *PollOption) Validate() error

type PollType

type PollType string

Poll type, currently can be `regular` or `quiz`.

const (
	PollTypeRegular PollType = "regular"
	PollTypeQuiz    PollType = "quiz"
)

func (*PollType) Decode

func (s *PollType) Decode(d *jx.Decoder) error

Decode decodes PollType from json.

func (PollType) Encode

func (s PollType) Encode(e *jx.Encoder)

Encode encodes PollType as json.

func (PollType) MarshalJSON

func (s PollType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (PollType) MarshalText

func (s PollType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*PollType) UnmarshalJSON

func (s *PollType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*PollType) UnmarshalText

func (s *PollType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (PollType) Validate

func (s PollType) Validate() error

type PreCheckoutQuery

type PreCheckoutQuery struct {
	// Unique query identifier.
	ID   string `json:"id"`
	From User   `json:"from"`
	// Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code.
	Currency string `json:"currency"`
	// Total price in the _smallest units_ of the currency (integer, **not** float/double). For example,
	// for a price of `US$ 1.45` pass `amount = 145`. See the _exp_ parameter in [currencies.
	// json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past
	// the decimal point for each currency (2 for the majority of currencies).
	TotalAmount int `json:"total_amount"`
	// Bot specified invoice payload.
	InvoicePayload string `json:"invoice_payload"`
	// _Optional_. Identifier of the shipping option chosen by the user.
	ShippingOptionID OptString    `json:"shipping_option_id"`
	OrderInfo        OptOrderInfo `json:"order_info"`
}

This object contains information about an incoming pre-checkout query. Ref: #/components/schemas/PreCheckoutQuery

func (*PreCheckoutQuery) Decode

func (s *PreCheckoutQuery) Decode(d *jx.Decoder) error

Decode decodes PreCheckoutQuery from json.

func (*PreCheckoutQuery) Encode

func (s *PreCheckoutQuery) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*PreCheckoutQuery) GetCurrency

func (s *PreCheckoutQuery) GetCurrency() string

GetCurrency returns the value of Currency.

func (*PreCheckoutQuery) GetFrom

func (s *PreCheckoutQuery) GetFrom() User

GetFrom returns the value of From.

func (*PreCheckoutQuery) GetID

func (s *PreCheckoutQuery) GetID() string

GetID returns the value of ID.

func (*PreCheckoutQuery) GetInvoicePayload

func (s *PreCheckoutQuery) GetInvoicePayload() string

GetInvoicePayload returns the value of InvoicePayload.

func (*PreCheckoutQuery) GetOrderInfo

func (s *PreCheckoutQuery) GetOrderInfo() OptOrderInfo

GetOrderInfo returns the value of OrderInfo.

func (*PreCheckoutQuery) GetShippingOptionID

func (s *PreCheckoutQuery) GetShippingOptionID() OptString

GetShippingOptionID returns the value of ShippingOptionID.

func (*PreCheckoutQuery) GetTotalAmount

func (s *PreCheckoutQuery) GetTotalAmount() int

GetTotalAmount returns the value of TotalAmount.

func (*PreCheckoutQuery) MarshalJSON

func (s *PreCheckoutQuery) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PreCheckoutQuery) SetCurrency

func (s *PreCheckoutQuery) SetCurrency(val string)

SetCurrency sets the value of Currency.

func (*PreCheckoutQuery) SetFrom

func (s *PreCheckoutQuery) SetFrom(val User)

SetFrom sets the value of From.

func (*PreCheckoutQuery) SetID

func (s *PreCheckoutQuery) SetID(val string)

SetID sets the value of ID.

func (*PreCheckoutQuery) SetInvoicePayload

func (s *PreCheckoutQuery) SetInvoicePayload(val string)

SetInvoicePayload sets the value of InvoicePayload.

func (*PreCheckoutQuery) SetOrderInfo

func (s *PreCheckoutQuery) SetOrderInfo(val OptOrderInfo)

SetOrderInfo sets the value of OrderInfo.

func (*PreCheckoutQuery) SetShippingOptionID

func (s *PreCheckoutQuery) SetShippingOptionID(val OptString)

SetShippingOptionID sets the value of ShippingOptionID.

func (*PreCheckoutQuery) SetTotalAmount

func (s *PreCheckoutQuery) SetTotalAmount(val int)

SetTotalAmount sets the value of TotalAmount.

func (*PreCheckoutQuery) UnmarshalJSON

func (s *PreCheckoutQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type PromoteChatMember

type PromoteChatMember struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier of the target user.
	UserID int64 `json:"user_id"`
	// Pass _True_ if the administrator's presence in the chat is hidden.
	IsAnonymous OptBool `json:"is_anonymous"`
	// Pass _True_ if the administrator can access the chat event log, chat statistics, message
	// statistics in channels, see channel members, see anonymous administrators in supergroups and
	// ignore slow mode. Implied by any other administrator privilege.
	CanManageChat OptBool `json:"can_manage_chat"`
	// Pass _True_ if the administrator can create channel posts, channels only.
	CanPostMessages OptBool `json:"can_post_messages"`
	// Pass _True_ if the administrator can edit messages of other users and can pin messages, channels
	// only.
	CanEditMessages OptBool `json:"can_edit_messages"`
	// Pass _True_ if the administrator can delete messages of other users.
	CanDeleteMessages OptBool `json:"can_delete_messages"`
	// Pass _True_ if the administrator can manage video chats.
	CanManageVideoChats OptBool `json:"can_manage_video_chats"`
	// Pass _True_ if the administrator can restrict, ban or unban chat members.
	CanRestrictMembers OptBool `json:"can_restrict_members"`
	// Pass _True_ if the administrator can add new administrators with a subset of their own privileges
	// or demote administrators that they have promoted, directly or indirectly (promoted by
	// administrators that were appointed by him).
	CanPromoteMembers OptBool `json:"can_promote_members"`
	// Pass _True_ if the administrator can change chat title, photo and other settings.
	CanChangeInfo OptBool `json:"can_change_info"`
	// Pass _True_ if the administrator can invite new users to the chat.
	CanInviteUsers OptBool `json:"can_invite_users"`
	// Pass _True_ if the administrator can pin messages, supergroups only.
	CanPinMessages OptBool `json:"can_pin_messages"`
	// Pass _True_ if the user is allowed to create, rename, close, and reopen forum topics, supergroups
	// only.
	CanManageTopics OptBool `json:"can_manage_topics"`
}

Input for promoteChatMember. Ref: #/components/schemas/promoteChatMember

func (*PromoteChatMember) Decode

func (s *PromoteChatMember) Decode(d *jx.Decoder) error

Decode decodes PromoteChatMember from json.

func (*PromoteChatMember) Encode

func (s *PromoteChatMember) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*PromoteChatMember) GetCanChangeInfo

func (s *PromoteChatMember) GetCanChangeInfo() OptBool

GetCanChangeInfo returns the value of CanChangeInfo.

func (*PromoteChatMember) GetCanDeleteMessages

func (s *PromoteChatMember) GetCanDeleteMessages() OptBool

GetCanDeleteMessages returns the value of CanDeleteMessages.

func (*PromoteChatMember) GetCanEditMessages

func (s *PromoteChatMember) GetCanEditMessages() OptBool

GetCanEditMessages returns the value of CanEditMessages.

func (*PromoteChatMember) GetCanInviteUsers

func (s *PromoteChatMember) GetCanInviteUsers() OptBool

GetCanInviteUsers returns the value of CanInviteUsers.

func (*PromoteChatMember) GetCanManageChat

func (s *PromoteChatMember) GetCanManageChat() OptBool

GetCanManageChat returns the value of CanManageChat.

func (*PromoteChatMember) GetCanManageTopics

func (s *PromoteChatMember) GetCanManageTopics() OptBool

GetCanManageTopics returns the value of CanManageTopics.

func (*PromoteChatMember) GetCanManageVideoChats

func (s *PromoteChatMember) GetCanManageVideoChats() OptBool

GetCanManageVideoChats returns the value of CanManageVideoChats.

func (*PromoteChatMember) GetCanPinMessages

func (s *PromoteChatMember) GetCanPinMessages() OptBool

GetCanPinMessages returns the value of CanPinMessages.

func (*PromoteChatMember) GetCanPostMessages

func (s *PromoteChatMember) GetCanPostMessages() OptBool

GetCanPostMessages returns the value of CanPostMessages.

func (*PromoteChatMember) GetCanPromoteMembers

func (s *PromoteChatMember) GetCanPromoteMembers() OptBool

GetCanPromoteMembers returns the value of CanPromoteMembers.

func (*PromoteChatMember) GetCanRestrictMembers

func (s *PromoteChatMember) GetCanRestrictMembers() OptBool

GetCanRestrictMembers returns the value of CanRestrictMembers.

func (*PromoteChatMember) GetChatID

func (s *PromoteChatMember) GetChatID() ID

GetChatID returns the value of ChatID.

func (*PromoteChatMember) GetIsAnonymous

func (s *PromoteChatMember) GetIsAnonymous() OptBool

GetIsAnonymous returns the value of IsAnonymous.

func (*PromoteChatMember) GetUserID

func (s *PromoteChatMember) GetUserID() int64

GetUserID returns the value of UserID.

func (*PromoteChatMember) MarshalJSON

func (s *PromoteChatMember) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PromoteChatMember) SetCanChangeInfo

func (s *PromoteChatMember) SetCanChangeInfo(val OptBool)

SetCanChangeInfo sets the value of CanChangeInfo.

func (*PromoteChatMember) SetCanDeleteMessages

func (s *PromoteChatMember) SetCanDeleteMessages(val OptBool)

SetCanDeleteMessages sets the value of CanDeleteMessages.

func (*PromoteChatMember) SetCanEditMessages

func (s *PromoteChatMember) SetCanEditMessages(val OptBool)

SetCanEditMessages sets the value of CanEditMessages.

func (*PromoteChatMember) SetCanInviteUsers

func (s *PromoteChatMember) SetCanInviteUsers(val OptBool)

SetCanInviteUsers sets the value of CanInviteUsers.

func (*PromoteChatMember) SetCanManageChat

func (s *PromoteChatMember) SetCanManageChat(val OptBool)

SetCanManageChat sets the value of CanManageChat.

func (*PromoteChatMember) SetCanManageTopics

func (s *PromoteChatMember) SetCanManageTopics(val OptBool)

SetCanManageTopics sets the value of CanManageTopics.

func (*PromoteChatMember) SetCanManageVideoChats

func (s *PromoteChatMember) SetCanManageVideoChats(val OptBool)

SetCanManageVideoChats sets the value of CanManageVideoChats.

func (*PromoteChatMember) SetCanPinMessages

func (s *PromoteChatMember) SetCanPinMessages(val OptBool)

SetCanPinMessages sets the value of CanPinMessages.

func (*PromoteChatMember) SetCanPostMessages

func (s *PromoteChatMember) SetCanPostMessages(val OptBool)

SetCanPostMessages sets the value of CanPostMessages.

func (*PromoteChatMember) SetCanPromoteMembers

func (s *PromoteChatMember) SetCanPromoteMembers(val OptBool)

SetCanPromoteMembers sets the value of CanPromoteMembers.

func (*PromoteChatMember) SetCanRestrictMembers

func (s *PromoteChatMember) SetCanRestrictMembers(val OptBool)

SetCanRestrictMembers sets the value of CanRestrictMembers.

func (*PromoteChatMember) SetChatID

func (s *PromoteChatMember) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*PromoteChatMember) SetIsAnonymous

func (s *PromoteChatMember) SetIsAnonymous(val OptBool)

SetIsAnonymous sets the value of IsAnonymous.

func (*PromoteChatMember) SetUserID

func (s *PromoteChatMember) SetUserID(val int64)

SetUserID sets the value of UserID.

func (*PromoteChatMember) UnmarshalJSON

func (s *PromoteChatMember) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ProximityAlertTriggered

type ProximityAlertTriggered struct {
	Traveler User `json:"traveler"`
	Watcher  User `json:"watcher"`
	// The distance between the users.
	Distance int `json:"distance"`
}

This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user. Ref: #/components/schemas/ProximityAlertTriggered

func (*ProximityAlertTriggered) Decode

func (s *ProximityAlertTriggered) Decode(d *jx.Decoder) error

Decode decodes ProximityAlertTriggered from json.

func (*ProximityAlertTriggered) Encode

func (s *ProximityAlertTriggered) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ProximityAlertTriggered) GetDistance

func (s *ProximityAlertTriggered) GetDistance() int

GetDistance returns the value of Distance.

func (*ProximityAlertTriggered) GetTraveler

func (s *ProximityAlertTriggered) GetTraveler() User

GetTraveler returns the value of Traveler.

func (*ProximityAlertTriggered) GetWatcher

func (s *ProximityAlertTriggered) GetWatcher() User

GetWatcher returns the value of Watcher.

func (*ProximityAlertTriggered) MarshalJSON

func (s *ProximityAlertTriggered) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ProximityAlertTriggered) SetDistance

func (s *ProximityAlertTriggered) SetDistance(val int)

SetDistance sets the value of Distance.

func (*ProximityAlertTriggered) SetTraveler

func (s *ProximityAlertTriggered) SetTraveler(val User)

SetTraveler sets the value of Traveler.

func (*ProximityAlertTriggered) SetWatcher

func (s *ProximityAlertTriggered) SetWatcher(val User)

SetWatcher sets the value of Watcher.

func (*ProximityAlertTriggered) UnmarshalJSON

func (s *ProximityAlertTriggered) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ReopenForumTopic

type ReopenForumTopic struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread of the forum topic.
	MessageThreadID int `json:"message_thread_id"`
}

Input for reopenForumTopic. Ref: #/components/schemas/reopenForumTopic

func (*ReopenForumTopic) Decode

func (s *ReopenForumTopic) Decode(d *jx.Decoder) error

Decode decodes ReopenForumTopic from json.

func (*ReopenForumTopic) Encode

func (s *ReopenForumTopic) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ReopenForumTopic) GetChatID

func (s *ReopenForumTopic) GetChatID() ID

GetChatID returns the value of ChatID.

func (*ReopenForumTopic) GetMessageThreadID

func (s *ReopenForumTopic) GetMessageThreadID() int

GetMessageThreadID returns the value of MessageThreadID.

func (*ReopenForumTopic) MarshalJSON

func (s *ReopenForumTopic) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ReopenForumTopic) SetChatID

func (s *ReopenForumTopic) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*ReopenForumTopic) SetMessageThreadID

func (s *ReopenForumTopic) SetMessageThreadID(val int)

SetMessageThreadID sets the value of MessageThreadID.

func (*ReopenForumTopic) UnmarshalJSON

func (s *ReopenForumTopic) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ReopenGeneralForumTopic

type ReopenGeneralForumTopic struct {
	ChatID ID `json:"chat_id"`
}

Input for reopenGeneralForumTopic. Ref: #/components/schemas/reopenGeneralForumTopic

func (*ReopenGeneralForumTopic) Decode

func (s *ReopenGeneralForumTopic) Decode(d *jx.Decoder) error

Decode decodes ReopenGeneralForumTopic from json.

func (*ReopenGeneralForumTopic) Encode

func (s *ReopenGeneralForumTopic) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ReopenGeneralForumTopic) GetChatID

func (s *ReopenGeneralForumTopic) GetChatID() ID

GetChatID returns the value of ChatID.

func (*ReopenGeneralForumTopic) MarshalJSON

func (s *ReopenGeneralForumTopic) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ReopenGeneralForumTopic) SetChatID

func (s *ReopenGeneralForumTopic) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*ReopenGeneralForumTopic) UnmarshalJSON

func (s *ReopenGeneralForumTopic) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ReplyKeyboardMarkup

type ReplyKeyboardMarkup struct {
	// Array of button rows, each represented by an Array of [KeyboardButton](https://core.telegram.
	// org/bots/api#keyboardbutton) objects.
	Keyboard [][]KeyboardButton `json:"keyboard"`
	// _Optional_. Requests clients to always show the keyboard when the regular keyboard is hidden.
	// Defaults to _false_, in which case the custom keyboard can be hidden and opened with a keyboard
	// icon.
	IsPersistent OptBool `json:"is_persistent"`
	// _Optional_. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the
	// keyboard smaller if there are just two rows of buttons). Defaults to _false_, in which case the
	// custom keyboard is always of the same height as the app's standard keyboard.
	ResizeKeyboard OptBool `json:"resize_keyboard"`
	// _Optional_. Requests clients to hide the keyboard as soon as it's been used. The keyboard will
	// still be available, but clients will automatically display the usual letter-keyboard in the chat -
	// the user can press a special button in the input field to see the custom keyboard again. Defaults
	// to _false_.
	OneTimeKeyboard OptBool `json:"one_time_keyboard"`
	// _Optional_. The placeholder to be shown in the input field when the keyboard is active; 1-64
	// characters.
	InputFieldPlaceholder OptString `json:"input_field_placeholder"`
	// _Optional_. Use this parameter if you want to show the keyboard to specific users only. Targets:
	// 1) users that are @mentioned in the _text_ of the [Message](https://core.telegram.
	// org/bots/api#message) object; 2) if the bot's message is a reply (has _reply_to_message_id_),
	// sender of the original message._Example:_ A user requests to change the bot's language, bot
	// replies to the request with a keyboard to select the new language. Other users in the group don't
	// see the keyboard.
	Selective OptBool `json:"selective"`
}

This object represents a [custom keyboard](https://core.telegram.org/bots/features#keyboards) with reply options (see [Introduction to bots](https://core.telegram.org/bots/features#keyboards) for details and examples). Ref: #/components/schemas/ReplyKeyboardMarkup

func (*ReplyKeyboardMarkup) Decode

func (s *ReplyKeyboardMarkup) Decode(d *jx.Decoder) error

Decode decodes ReplyKeyboardMarkup from json.

func (*ReplyKeyboardMarkup) Encode

func (s *ReplyKeyboardMarkup) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ReplyKeyboardMarkup) GetInputFieldPlaceholder

func (s *ReplyKeyboardMarkup) GetInputFieldPlaceholder() OptString

GetInputFieldPlaceholder returns the value of InputFieldPlaceholder.

func (*ReplyKeyboardMarkup) GetIsPersistent

func (s *ReplyKeyboardMarkup) GetIsPersistent() OptBool

GetIsPersistent returns the value of IsPersistent.

func (*ReplyKeyboardMarkup) GetKeyboard

func (s *ReplyKeyboardMarkup) GetKeyboard() [][]KeyboardButton

GetKeyboard returns the value of Keyboard.

func (*ReplyKeyboardMarkup) GetOneTimeKeyboard

func (s *ReplyKeyboardMarkup) GetOneTimeKeyboard() OptBool

GetOneTimeKeyboard returns the value of OneTimeKeyboard.

func (*ReplyKeyboardMarkup) GetResizeKeyboard

func (s *ReplyKeyboardMarkup) GetResizeKeyboard() OptBool

GetResizeKeyboard returns the value of ResizeKeyboard.

func (*ReplyKeyboardMarkup) GetSelective

func (s *ReplyKeyboardMarkup) GetSelective() OptBool

GetSelective returns the value of Selective.

func (*ReplyKeyboardMarkup) MarshalJSON

func (s *ReplyKeyboardMarkup) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ReplyKeyboardMarkup) SetInputFieldPlaceholder

func (s *ReplyKeyboardMarkup) SetInputFieldPlaceholder(val OptString)

SetInputFieldPlaceholder sets the value of InputFieldPlaceholder.

func (*ReplyKeyboardMarkup) SetIsPersistent

func (s *ReplyKeyboardMarkup) SetIsPersistent(val OptBool)

SetIsPersistent sets the value of IsPersistent.

func (*ReplyKeyboardMarkup) SetKeyboard

func (s *ReplyKeyboardMarkup) SetKeyboard(val [][]KeyboardButton)

SetKeyboard sets the value of Keyboard.

func (*ReplyKeyboardMarkup) SetOneTimeKeyboard

func (s *ReplyKeyboardMarkup) SetOneTimeKeyboard(val OptBool)

SetOneTimeKeyboard sets the value of OneTimeKeyboard.

func (*ReplyKeyboardMarkup) SetResizeKeyboard

func (s *ReplyKeyboardMarkup) SetResizeKeyboard(val OptBool)

SetResizeKeyboard sets the value of ResizeKeyboard.

func (*ReplyKeyboardMarkup) SetSelective

func (s *ReplyKeyboardMarkup) SetSelective(val OptBool)

SetSelective sets the value of Selective.

func (*ReplyKeyboardMarkup) UnmarshalJSON

func (s *ReplyKeyboardMarkup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ReplyKeyboardMarkup) Validate

func (s *ReplyKeyboardMarkup) Validate() error

type ReplyKeyboardRemove

type ReplyKeyboardRemove struct {
	// Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if
	// you want to hide the keyboard from sight but keep it accessible, use _one_time_keyboard_ in
	// [ReplyKeyboardMarkup](https://core.telegram.org/bots/api#replykeyboardmarkup)).
	RemoveKeyboard bool `json:"remove_keyboard"`
	// _Optional_. Use this parameter if you want to remove the keyboard for specific users only.
	// Targets: 1) users that are @mentioned in the _text_ of the [Message](https://core.telegram.
	// org/bots/api#message) object; 2) if the bot's message is a reply (has _reply_to_message_id_),
	// sender of the original message._Example:_ A user votes in a poll, bot returns confirmation message
	// in reply to the vote and removes the keyboard for that user, while still showing the keyboard with
	// poll options to users who haven't voted yet.
	Selective OptBool `json:"selective"`
}

Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup(https://core.telegram. org/bots/api#replykeyboardmarkup)). Ref: #/components/schemas/ReplyKeyboardRemove

func (*ReplyKeyboardRemove) Decode

func (s *ReplyKeyboardRemove) Decode(d *jx.Decoder) error

Decode decodes ReplyKeyboardRemove from json.

func (*ReplyKeyboardRemove) Encode

func (s *ReplyKeyboardRemove) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ReplyKeyboardRemove) GetRemoveKeyboard

func (s *ReplyKeyboardRemove) GetRemoveKeyboard() bool

GetRemoveKeyboard returns the value of RemoveKeyboard.

func (*ReplyKeyboardRemove) GetSelective

func (s *ReplyKeyboardRemove) GetSelective() OptBool

GetSelective returns the value of Selective.

func (*ReplyKeyboardRemove) MarshalJSON

func (s *ReplyKeyboardRemove) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ReplyKeyboardRemove) SetRemoveKeyboard

func (s *ReplyKeyboardRemove) SetRemoveKeyboard(val bool)

SetRemoveKeyboard sets the value of RemoveKeyboard.

func (*ReplyKeyboardRemove) SetSelective

func (s *ReplyKeyboardRemove) SetSelective(val OptBool)

SetSelective sets the value of Selective.

func (*ReplyKeyboardRemove) UnmarshalJSON

func (s *ReplyKeyboardRemove) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ResponseParameters

type ResponseParameters struct {
	// _Optional_. The group has been migrated to a supergroup with the specified identifier. This number
	// may have more than 32 significant bits and some programming languages may have difficulty/silent
	// defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or
	// double-precision float type are safe for storing this identifier.
	MigrateToChatID OptInt64 `json:"migrate_to_chat_id"`
	// _Optional_. In case of exceeding flood control, the number of seconds left to wait before the
	// request can be repeated.
	RetryAfter OptInt `json:"retry_after"`
}

Describes why a request was unsuccessful. Ref: #/components/schemas/ResponseParameters

func (*ResponseParameters) Decode

func (s *ResponseParameters) Decode(d *jx.Decoder) error

Decode decodes ResponseParameters from json.

func (*ResponseParameters) Encode

func (s *ResponseParameters) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ResponseParameters) GetMigrateToChatID

func (s *ResponseParameters) GetMigrateToChatID() OptInt64

GetMigrateToChatID returns the value of MigrateToChatID.

func (*ResponseParameters) GetRetryAfter

func (s *ResponseParameters) GetRetryAfter() OptInt

GetRetryAfter returns the value of RetryAfter.

func (*ResponseParameters) MarshalJSON

func (s *ResponseParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResponseParameters) SetMigrateToChatID

func (s *ResponseParameters) SetMigrateToChatID(val OptInt64)

SetMigrateToChatID sets the value of MigrateToChatID.

func (*ResponseParameters) SetRetryAfter

func (s *ResponseParameters) SetRetryAfter(val OptInt)

SetRetryAfter sets the value of RetryAfter.

func (*ResponseParameters) UnmarshalJSON

func (s *ResponseParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type RestrictChatMember

type RestrictChatMember struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier of the target user.
	UserID      int64           `json:"user_id"`
	Permissions ChatPermissions `json:"permissions"`
	// Pass _True_ if chat permissions are set independently. Otherwise, the _can_send_other_messages_
	// and _can_add_web_page_previews_ permissions will imply the _can_send_messages_, _can_send_audios_,
	// _can_send_documents_, _can_send_photos_, _can_send_videos_, _can_send_video_notes_, and
	// _can_send_voice_notes_ permissions; the _can_send_polls_ permission will imply the
	// _can_send_messages_ permission.
	UseIndependentChatPermissions OptBool `json:"use_independent_chat_permissions"`
	// Date when restrictions will be lifted for the user, unix time. If user is restricted for more than
	// 366 days or less than 30 seconds from the current time, they are considered to be restricted
	// forever.
	UntilDate OptInt `json:"until_date"`
}

Input for restrictChatMember. Ref: #/components/schemas/restrictChatMember

func (*RestrictChatMember) Decode

func (s *RestrictChatMember) Decode(d *jx.Decoder) error

Decode decodes RestrictChatMember from json.

func (*RestrictChatMember) Encode

func (s *RestrictChatMember) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*RestrictChatMember) GetChatID

func (s *RestrictChatMember) GetChatID() ID

GetChatID returns the value of ChatID.

func (*RestrictChatMember) GetPermissions

func (s *RestrictChatMember) GetPermissions() ChatPermissions

GetPermissions returns the value of Permissions.

func (*RestrictChatMember) GetUntilDate

func (s *RestrictChatMember) GetUntilDate() OptInt

GetUntilDate returns the value of UntilDate.

func (*RestrictChatMember) GetUseIndependentChatPermissions

func (s *RestrictChatMember) GetUseIndependentChatPermissions() OptBool

GetUseIndependentChatPermissions returns the value of UseIndependentChatPermissions.

func (*RestrictChatMember) GetUserID

func (s *RestrictChatMember) GetUserID() int64

GetUserID returns the value of UserID.

func (*RestrictChatMember) MarshalJSON

func (s *RestrictChatMember) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*RestrictChatMember) SetChatID

func (s *RestrictChatMember) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*RestrictChatMember) SetPermissions

func (s *RestrictChatMember) SetPermissions(val ChatPermissions)

SetPermissions sets the value of Permissions.

func (*RestrictChatMember) SetUntilDate

func (s *RestrictChatMember) SetUntilDate(val OptInt)

SetUntilDate sets the value of UntilDate.

func (*RestrictChatMember) SetUseIndependentChatPermissions

func (s *RestrictChatMember) SetUseIndependentChatPermissions(val OptBool)

SetUseIndependentChatPermissions sets the value of UseIndependentChatPermissions.

func (*RestrictChatMember) SetUserID

func (s *RestrictChatMember) SetUserID(val int64)

SetUserID sets the value of UserID.

func (*RestrictChatMember) UnmarshalJSON

func (s *RestrictChatMember) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Result

type Result struct {
	Result OptBool `json:"result"`
	Ok     bool    `json:"ok"`
}

Ref: #/components/schemas/Result

func (*Result) Decode

func (s *Result) Decode(d *jx.Decoder) error

Decode decodes Result from json.

func (*Result) Encode

func (s *Result) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Result) GetOk

func (s *Result) GetOk() bool

GetOk returns the value of Ok.

func (*Result) GetResult

func (s *Result) GetResult() OptBool

GetResult returns the value of Result.

func (*Result) MarshalJSON

func (s *Result) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Result) SetOk

func (s *Result) SetOk(val bool)

SetOk sets the value of Ok.

func (*Result) SetResult

func (s *Result) SetResult(val OptBool)

SetResult sets the value of Result.

func (*Result) UnmarshalJSON

func (s *Result) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ResultArrayOfBotCommand

type ResultArrayOfBotCommand struct {
	Result []BotCommand `json:"result"`
	Ok     bool         `json:"ok"`
}

Ref: #/components/schemas/ResultArrayOfBotCommand

func (*ResultArrayOfBotCommand) Decode

func (s *ResultArrayOfBotCommand) Decode(d *jx.Decoder) error

Decode decodes ResultArrayOfBotCommand from json.

func (*ResultArrayOfBotCommand) Encode

func (s *ResultArrayOfBotCommand) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ResultArrayOfBotCommand) GetOk

func (s *ResultArrayOfBotCommand) GetOk() bool

GetOk returns the value of Ok.

func (*ResultArrayOfBotCommand) GetResult

func (s *ResultArrayOfBotCommand) GetResult() []BotCommand

GetResult returns the value of Result.

func (*ResultArrayOfBotCommand) MarshalJSON

func (s *ResultArrayOfBotCommand) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResultArrayOfBotCommand) SetOk

func (s *ResultArrayOfBotCommand) SetOk(val bool)

SetOk sets the value of Ok.

func (*ResultArrayOfBotCommand) SetResult

func (s *ResultArrayOfBotCommand) SetResult(val []BotCommand)

SetResult sets the value of Result.

func (*ResultArrayOfBotCommand) UnmarshalJSON

func (s *ResultArrayOfBotCommand) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ResultArrayOfBotCommand) Validate

func (s *ResultArrayOfBotCommand) Validate() error

type ResultArrayOfChatMember

type ResultArrayOfChatMember struct {
	Result []ChatMember `json:"result"`
	Ok     bool         `json:"ok"`
}

Ref: #/components/schemas/ResultArrayOfChatMember

func (*ResultArrayOfChatMember) Decode

func (s *ResultArrayOfChatMember) Decode(d *jx.Decoder) error

Decode decodes ResultArrayOfChatMember from json.

func (*ResultArrayOfChatMember) Encode

func (s *ResultArrayOfChatMember) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ResultArrayOfChatMember) GetOk

func (s *ResultArrayOfChatMember) GetOk() bool

GetOk returns the value of Ok.

func (*ResultArrayOfChatMember) GetResult

func (s *ResultArrayOfChatMember) GetResult() []ChatMember

GetResult returns the value of Result.

func (*ResultArrayOfChatMember) MarshalJSON

func (s *ResultArrayOfChatMember) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResultArrayOfChatMember) SetOk

func (s *ResultArrayOfChatMember) SetOk(val bool)

SetOk sets the value of Ok.

func (*ResultArrayOfChatMember) SetResult

func (s *ResultArrayOfChatMember) SetResult(val []ChatMember)

SetResult sets the value of Result.

func (*ResultArrayOfChatMember) UnmarshalJSON

func (s *ResultArrayOfChatMember) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ResultArrayOfGameHighScore

type ResultArrayOfGameHighScore struct {
	Result []GameHighScore `json:"result"`
	Ok     bool            `json:"ok"`
}

Ref: #/components/schemas/ResultArrayOfGameHighScore

func (*ResultArrayOfGameHighScore) Decode

Decode decodes ResultArrayOfGameHighScore from json.

func (*ResultArrayOfGameHighScore) Encode

func (s *ResultArrayOfGameHighScore) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ResultArrayOfGameHighScore) GetOk

func (s *ResultArrayOfGameHighScore) GetOk() bool

GetOk returns the value of Ok.

func (*ResultArrayOfGameHighScore) GetResult

func (s *ResultArrayOfGameHighScore) GetResult() []GameHighScore

GetResult returns the value of Result.

func (*ResultArrayOfGameHighScore) MarshalJSON

func (s *ResultArrayOfGameHighScore) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResultArrayOfGameHighScore) SetOk

func (s *ResultArrayOfGameHighScore) SetOk(val bool)

SetOk sets the value of Ok.

func (*ResultArrayOfGameHighScore) SetResult

func (s *ResultArrayOfGameHighScore) SetResult(val []GameHighScore)

SetResult sets the value of Result.

func (*ResultArrayOfGameHighScore) UnmarshalJSON

func (s *ResultArrayOfGameHighScore) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ResultArrayOfMessage

type ResultArrayOfMessage struct {
	Result []Message `json:"result"`
	Ok     bool      `json:"ok"`
}

Ref: #/components/schemas/ResultArrayOfMessage

func (*ResultArrayOfMessage) Decode

func (s *ResultArrayOfMessage) Decode(d *jx.Decoder) error

Decode decodes ResultArrayOfMessage from json.

func (*ResultArrayOfMessage) Encode

func (s *ResultArrayOfMessage) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ResultArrayOfMessage) GetOk

func (s *ResultArrayOfMessage) GetOk() bool

GetOk returns the value of Ok.

func (*ResultArrayOfMessage) GetResult

func (s *ResultArrayOfMessage) GetResult() []Message

GetResult returns the value of Result.

func (*ResultArrayOfMessage) MarshalJSON

func (s *ResultArrayOfMessage) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResultArrayOfMessage) SetOk

func (s *ResultArrayOfMessage) SetOk(val bool)

SetOk sets the value of Ok.

func (*ResultArrayOfMessage) SetResult

func (s *ResultArrayOfMessage) SetResult(val []Message)

SetResult sets the value of Result.

func (*ResultArrayOfMessage) UnmarshalJSON

func (s *ResultArrayOfMessage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ResultArrayOfMessage) Validate

func (s *ResultArrayOfMessage) Validate() error

type ResultArrayOfSticker

type ResultArrayOfSticker struct {
	Result []Sticker `json:"result"`
	Ok     bool      `json:"ok"`
}

Ref: #/components/schemas/ResultArrayOfSticker

func (*ResultArrayOfSticker) Decode

func (s *ResultArrayOfSticker) Decode(d *jx.Decoder) error

Decode decodes ResultArrayOfSticker from json.

func (*ResultArrayOfSticker) Encode

func (s *ResultArrayOfSticker) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ResultArrayOfSticker) GetOk

func (s *ResultArrayOfSticker) GetOk() bool

GetOk returns the value of Ok.

func (*ResultArrayOfSticker) GetResult

func (s *ResultArrayOfSticker) GetResult() []Sticker

GetResult returns the value of Result.

func (*ResultArrayOfSticker) MarshalJSON

func (s *ResultArrayOfSticker) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResultArrayOfSticker) SetOk

func (s *ResultArrayOfSticker) SetOk(val bool)

SetOk sets the value of Ok.

func (*ResultArrayOfSticker) SetResult

func (s *ResultArrayOfSticker) SetResult(val []Sticker)

SetResult sets the value of Result.

func (*ResultArrayOfSticker) UnmarshalJSON

func (s *ResultArrayOfSticker) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ResultArrayOfSticker) Validate

func (s *ResultArrayOfSticker) Validate() error

type ResultArrayOfUpdate

type ResultArrayOfUpdate struct {
	Result []Update `json:"result"`
	Ok     bool     `json:"ok"`
}

Ref: #/components/schemas/ResultArrayOfUpdate

func (*ResultArrayOfUpdate) Decode

func (s *ResultArrayOfUpdate) Decode(d *jx.Decoder) error

Decode decodes ResultArrayOfUpdate from json.

func (*ResultArrayOfUpdate) Encode

func (s *ResultArrayOfUpdate) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ResultArrayOfUpdate) GetOk

func (s *ResultArrayOfUpdate) GetOk() bool

GetOk returns the value of Ok.

func (*ResultArrayOfUpdate) GetResult

func (s *ResultArrayOfUpdate) GetResult() []Update

GetResult returns the value of Result.

func (*ResultArrayOfUpdate) MarshalJSON

func (s *ResultArrayOfUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResultArrayOfUpdate) SetOk

func (s *ResultArrayOfUpdate) SetOk(val bool)

SetOk sets the value of Ok.

func (*ResultArrayOfUpdate) SetResult

func (s *ResultArrayOfUpdate) SetResult(val []Update)

SetResult sets the value of Result.

func (*ResultArrayOfUpdate) UnmarshalJSON

func (s *ResultArrayOfUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ResultArrayOfUpdate) Validate

func (s *ResultArrayOfUpdate) Validate() error

type ResultChat

type ResultChat struct {
	Result OptChat `json:"result"`
	Ok     bool    `json:"ok"`
}

Ref: #/components/schemas/ResultChat

func (*ResultChat) Decode

func (s *ResultChat) Decode(d *jx.Decoder) error

Decode decodes ResultChat from json.

func (*ResultChat) Encode

func (s *ResultChat) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ResultChat) GetOk

func (s *ResultChat) GetOk() bool

GetOk returns the value of Ok.

func (*ResultChat) GetResult

func (s *ResultChat) GetResult() OptChat

GetResult returns the value of Result.

func (*ResultChat) MarshalJSON

func (s *ResultChat) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResultChat) SetOk

func (s *ResultChat) SetOk(val bool)

SetOk sets the value of Ok.

func (*ResultChat) SetResult

func (s *ResultChat) SetResult(val OptChat)

SetResult sets the value of Result.

func (*ResultChat) UnmarshalJSON

func (s *ResultChat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ResultChat) Validate

func (s *ResultChat) Validate() error
type ResultChatInviteLink struct {
	Result OptChatInviteLink `json:"result"`
	Ok     bool              `json:"ok"`
}

Ref: #/components/schemas/ResultChatInviteLink

func (*ResultChatInviteLink) Decode

func (s *ResultChatInviteLink) Decode(d *jx.Decoder) error

Decode decodes ResultChatInviteLink from json.

func (*ResultChatInviteLink) Encode

func (s *ResultChatInviteLink) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ResultChatInviteLink) GetOk

func (s *ResultChatInviteLink) GetOk() bool

GetOk returns the value of Ok.

func (*ResultChatInviteLink) GetResult

func (s *ResultChatInviteLink) GetResult() OptChatInviteLink

GetResult returns the value of Result.

func (*ResultChatInviteLink) MarshalJSON

func (s *ResultChatInviteLink) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResultChatInviteLink) SetOk

func (s *ResultChatInviteLink) SetOk(val bool)

SetOk sets the value of Ok.

func (*ResultChatInviteLink) SetResult

func (s *ResultChatInviteLink) SetResult(val OptChatInviteLink)

SetResult sets the value of Result.

func (*ResultChatInviteLink) UnmarshalJSON

func (s *ResultChatInviteLink) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ResultChatInviteLink) Validate

func (s *ResultChatInviteLink) Validate() error

type ResultChatMember

type ResultChatMember struct {
	Result OptChatMember `json:"result"`
	Ok     bool          `json:"ok"`
}

Ref: #/components/schemas/ResultChatMember

func (*ResultChatMember) Decode

func (s *ResultChatMember) Decode(d *jx.Decoder) error

Decode decodes ResultChatMember from json.

func (*ResultChatMember) Encode

func (s *ResultChatMember) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ResultChatMember) GetOk

func (s *ResultChatMember) GetOk() bool

GetOk returns the value of Ok.

func (*ResultChatMember) GetResult

func (s *ResultChatMember) GetResult() OptChatMember

GetResult returns the value of Result.

func (*ResultChatMember) MarshalJSON

func (s *ResultChatMember) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResultChatMember) SetOk

func (s *ResultChatMember) SetOk(val bool)

SetOk sets the value of Ok.

func (*ResultChatMember) SetResult

func (s *ResultChatMember) SetResult(val OptChatMember)

SetResult sets the value of Result.

func (*ResultChatMember) UnmarshalJSON

func (s *ResultChatMember) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ResultFile

type ResultFile struct {
	Result OptFile `json:"result"`
	Ok     bool    `json:"ok"`
}

Ref: #/components/schemas/ResultFile

func (*ResultFile) Decode

func (s *ResultFile) Decode(d *jx.Decoder) error

Decode decodes ResultFile from json.

func (*ResultFile) Encode

func (s *ResultFile) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ResultFile) GetOk

func (s *ResultFile) GetOk() bool

GetOk returns the value of Ok.

func (*ResultFile) GetResult

func (s *ResultFile) GetResult() OptFile

GetResult returns the value of Result.

func (*ResultFile) MarshalJSON

func (s *ResultFile) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResultFile) SetOk

func (s *ResultFile) SetOk(val bool)

SetOk sets the value of Ok.

func (*ResultFile) SetResult

func (s *ResultFile) SetResult(val OptFile)

SetResult sets the value of Result.

func (*ResultFile) UnmarshalJSON

func (s *ResultFile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ResultInt

type ResultInt struct {
	Result OptInt `json:"result"`
	Ok     bool   `json:"ok"`
}

Ref: #/components/schemas/ResultInt

func (*ResultInt) Decode

func (s *ResultInt) Decode(d *jx.Decoder) error

Decode decodes ResultInt from json.

func (*ResultInt) Encode

func (s *ResultInt) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ResultInt) GetOk

func (s *ResultInt) GetOk() bool

GetOk returns the value of Ok.

func (*ResultInt) GetResult

func (s *ResultInt) GetResult() OptInt

GetResult returns the value of Result.

func (*ResultInt) MarshalJSON

func (s *ResultInt) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResultInt) SetOk

func (s *ResultInt) SetOk(val bool)

SetOk sets the value of Ok.

func (*ResultInt) SetResult

func (s *ResultInt) SetResult(val OptInt)

SetResult sets the value of Result.

func (*ResultInt) UnmarshalJSON

func (s *ResultInt) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ResultMessage

type ResultMessage struct {
	Result OptMessage `json:"result"`
	Ok     bool       `json:"ok"`
}

Ref: #/components/schemas/ResultMessage

func (*ResultMessage) Decode

func (s *ResultMessage) Decode(d *jx.Decoder) error

Decode decodes ResultMessage from json.

func (*ResultMessage) Encode

func (s *ResultMessage) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ResultMessage) GetOk

func (s *ResultMessage) GetOk() bool

GetOk returns the value of Ok.

func (*ResultMessage) GetResult

func (s *ResultMessage) GetResult() OptMessage

GetResult returns the value of Result.

func (*ResultMessage) MarshalJSON

func (s *ResultMessage) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResultMessage) SetOk

func (s *ResultMessage) SetOk(val bool)

SetOk sets the value of Ok.

func (*ResultMessage) SetResult

func (s *ResultMessage) SetResult(val OptMessage)

SetResult sets the value of Result.

func (*ResultMessage) UnmarshalJSON

func (s *ResultMessage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ResultMessage) Validate

func (s *ResultMessage) Validate() error

type ResultMessageId

type ResultMessageId struct {
	Result OptMessageId `json:"result"`
	Ok     bool         `json:"ok"`
}

Ref: #/components/schemas/ResultMessageId

func (*ResultMessageId) Decode

func (s *ResultMessageId) Decode(d *jx.Decoder) error

Decode decodes ResultMessageId from json.

func (*ResultMessageId) Encode

func (s *ResultMessageId) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ResultMessageId) GetOk

func (s *ResultMessageId) GetOk() bool

GetOk returns the value of Ok.

func (*ResultMessageId) GetResult

func (s *ResultMessageId) GetResult() OptMessageId

GetResult returns the value of Result.

func (*ResultMessageId) MarshalJSON

func (s *ResultMessageId) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResultMessageId) SetOk

func (s *ResultMessageId) SetOk(val bool)

SetOk sets the value of Ok.

func (*ResultMessageId) SetResult

func (s *ResultMessageId) SetResult(val OptMessageId)

SetResult sets the value of Result.

func (*ResultMessageId) UnmarshalJSON

func (s *ResultMessageId) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ResultMessageOrBoolean

type ResultMessageOrBoolean struct {
	Result OptResultMessageOrBooleanResult `json:"result"`
	Ok     bool                            `json:"ok"`
}

Ref: #/components/schemas/ResultMessageOrBoolean

func (*ResultMessageOrBoolean) Decode

func (s *ResultMessageOrBoolean) Decode(d *jx.Decoder) error

Decode decodes ResultMessageOrBoolean from json.

func (*ResultMessageOrBoolean) Encode

func (s *ResultMessageOrBoolean) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ResultMessageOrBoolean) GetOk

func (s *ResultMessageOrBoolean) GetOk() bool

GetOk returns the value of Ok.

func (*ResultMessageOrBoolean) GetResult

GetResult returns the value of Result.

func (*ResultMessageOrBoolean) MarshalJSON

func (s *ResultMessageOrBoolean) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResultMessageOrBoolean) SetOk

func (s *ResultMessageOrBoolean) SetOk(val bool)

SetOk sets the value of Ok.

func (*ResultMessageOrBoolean) SetResult

SetResult sets the value of Result.

func (*ResultMessageOrBoolean) UnmarshalJSON

func (s *ResultMessageOrBoolean) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ResultMessageOrBoolean) Validate

func (s *ResultMessageOrBoolean) Validate() error

type ResultMessageOrBooleanResult

type ResultMessageOrBooleanResult struct {
	Type    ResultMessageOrBooleanResultType // switch on this field
	Message Message
	Bool    bool
}

ResultMessageOrBooleanResult represents sum type.

func NewBoolResultMessageOrBooleanResult

func NewBoolResultMessageOrBooleanResult(v bool) ResultMessageOrBooleanResult

NewBoolResultMessageOrBooleanResult returns new ResultMessageOrBooleanResult from bool.

func NewMessageResultMessageOrBooleanResult

func NewMessageResultMessageOrBooleanResult(v Message) ResultMessageOrBooleanResult

NewMessageResultMessageOrBooleanResult returns new ResultMessageOrBooleanResult from Message.

func (*ResultMessageOrBooleanResult) Decode

Decode decodes ResultMessageOrBooleanResult from json.

func (ResultMessageOrBooleanResult) Encode

Encode encodes ResultMessageOrBooleanResult as json.

func (ResultMessageOrBooleanResult) GetBool

func (s ResultMessageOrBooleanResult) GetBool() (v bool, ok bool)

GetBool returns bool and true boolean if ResultMessageOrBooleanResult is bool.

func (ResultMessageOrBooleanResult) GetMessage

func (s ResultMessageOrBooleanResult) GetMessage() (v Message, ok bool)

GetMessage returns Message and true boolean if ResultMessageOrBooleanResult is Message.

func (ResultMessageOrBooleanResult) IsBool

IsBool reports whether ResultMessageOrBooleanResult is bool.

func (ResultMessageOrBooleanResult) IsMessage

func (s ResultMessageOrBooleanResult) IsMessage() bool

IsMessage reports whether ResultMessageOrBooleanResult is Message.

func (ResultMessageOrBooleanResult) MarshalJSON

func (s ResultMessageOrBooleanResult) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResultMessageOrBooleanResult) SetBool

func (s *ResultMessageOrBooleanResult) SetBool(v bool)

SetBool sets ResultMessageOrBooleanResult to bool.

func (*ResultMessageOrBooleanResult) SetMessage

func (s *ResultMessageOrBooleanResult) SetMessage(v Message)

SetMessage sets ResultMessageOrBooleanResult to Message.

func (*ResultMessageOrBooleanResult) UnmarshalJSON

func (s *ResultMessageOrBooleanResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (ResultMessageOrBooleanResult) Validate

func (s ResultMessageOrBooleanResult) Validate() error

type ResultMessageOrBooleanResultType

type ResultMessageOrBooleanResultType string

ResultMessageOrBooleanResultType is oneOf type of ResultMessageOrBooleanResult.

const (
	MessageResultMessageOrBooleanResult ResultMessageOrBooleanResultType = "Message"
	BoolResultMessageOrBooleanResult    ResultMessageOrBooleanResultType = "bool"
)

Possible values for ResultMessageOrBooleanResultType.

type ResultPoll

type ResultPoll struct {
	Result OptPoll `json:"result"`
	Ok     bool    `json:"ok"`
}

Ref: #/components/schemas/ResultPoll

func (*ResultPoll) Decode

func (s *ResultPoll) Decode(d *jx.Decoder) error

Decode decodes ResultPoll from json.

func (*ResultPoll) Encode

func (s *ResultPoll) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ResultPoll) GetOk

func (s *ResultPoll) GetOk() bool

GetOk returns the value of Ok.

func (*ResultPoll) GetResult

func (s *ResultPoll) GetResult() OptPoll

GetResult returns the value of Result.

func (*ResultPoll) MarshalJSON

func (s *ResultPoll) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResultPoll) SetOk

func (s *ResultPoll) SetOk(val bool)

SetOk sets the value of Ok.

func (*ResultPoll) SetResult

func (s *ResultPoll) SetResult(val OptPoll)

SetResult sets the value of Result.

func (*ResultPoll) UnmarshalJSON

func (s *ResultPoll) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ResultPoll) Validate

func (s *ResultPoll) Validate() error

type ResultStickerSet

type ResultStickerSet struct {
	Result OptStickerSet `json:"result"`
	Ok     bool          `json:"ok"`
}

Ref: #/components/schemas/ResultStickerSet

func (*ResultStickerSet) Decode

func (s *ResultStickerSet) Decode(d *jx.Decoder) error

Decode decodes ResultStickerSet from json.

func (*ResultStickerSet) Encode

func (s *ResultStickerSet) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ResultStickerSet) GetOk

func (s *ResultStickerSet) GetOk() bool

GetOk returns the value of Ok.

func (*ResultStickerSet) GetResult

func (s *ResultStickerSet) GetResult() OptStickerSet

GetResult returns the value of Result.

func (*ResultStickerSet) MarshalJSON

func (s *ResultStickerSet) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResultStickerSet) SetOk

func (s *ResultStickerSet) SetOk(val bool)

SetOk sets the value of Ok.

func (*ResultStickerSet) SetResult

func (s *ResultStickerSet) SetResult(val OptStickerSet)

SetResult sets the value of Result.

func (*ResultStickerSet) UnmarshalJSON

func (s *ResultStickerSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ResultStickerSet) Validate

func (s *ResultStickerSet) Validate() error

type ResultString

type ResultString struct {
	Result OptString `json:"result"`
	Ok     bool      `json:"ok"`
}

Ref: #/components/schemas/ResultString

func (*ResultString) Decode

func (s *ResultString) Decode(d *jx.Decoder) error

Decode decodes ResultString from json.

func (*ResultString) Encode

func (s *ResultString) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ResultString) GetOk

func (s *ResultString) GetOk() bool

GetOk returns the value of Ok.

func (*ResultString) GetResult

func (s *ResultString) GetResult() OptString

GetResult returns the value of Result.

func (*ResultString) MarshalJSON

func (s *ResultString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResultString) SetOk

func (s *ResultString) SetOk(val bool)

SetOk sets the value of Ok.

func (*ResultString) SetResult

func (s *ResultString) SetResult(val OptString)

SetResult sets the value of Result.

func (*ResultString) UnmarshalJSON

func (s *ResultString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ResultUser

type ResultUser struct {
	Result OptUser `json:"result"`
	Ok     bool    `json:"ok"`
}

Ref: #/components/schemas/ResultUser

func (*ResultUser) Decode

func (s *ResultUser) Decode(d *jx.Decoder) error

Decode decodes ResultUser from json.

func (*ResultUser) Encode

func (s *ResultUser) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ResultUser) GetOk

func (s *ResultUser) GetOk() bool

GetOk returns the value of Ok.

func (*ResultUser) GetResult

func (s *ResultUser) GetResult() OptUser

GetResult returns the value of Result.

func (*ResultUser) MarshalJSON

func (s *ResultUser) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResultUser) SetOk

func (s *ResultUser) SetOk(val bool)

SetOk sets the value of Ok.

func (*ResultUser) SetResult

func (s *ResultUser) SetResult(val OptUser)

SetResult sets the value of Result.

func (*ResultUser) UnmarshalJSON

func (s *ResultUser) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ResultUserProfilePhotos

type ResultUserProfilePhotos struct {
	Result OptUserProfilePhotos `json:"result"`
	Ok     bool                 `json:"ok"`
}

Ref: #/components/schemas/ResultUserProfilePhotos

func (*ResultUserProfilePhotos) Decode

func (s *ResultUserProfilePhotos) Decode(d *jx.Decoder) error

Decode decodes ResultUserProfilePhotos from json.

func (*ResultUserProfilePhotos) Encode

func (s *ResultUserProfilePhotos) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ResultUserProfilePhotos) GetOk

func (s *ResultUserProfilePhotos) GetOk() bool

GetOk returns the value of Ok.

func (*ResultUserProfilePhotos) GetResult

GetResult returns the value of Result.

func (*ResultUserProfilePhotos) MarshalJSON

func (s *ResultUserProfilePhotos) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResultUserProfilePhotos) SetOk

func (s *ResultUserProfilePhotos) SetOk(val bool)

SetOk sets the value of Ok.

func (*ResultUserProfilePhotos) SetResult

SetResult sets the value of Result.

func (*ResultUserProfilePhotos) UnmarshalJSON

func (s *ResultUserProfilePhotos) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ResultUserProfilePhotos) Validate

func (s *ResultUserProfilePhotos) Validate() error

type ResultWebhookInfo

type ResultWebhookInfo struct {
	Result OptWebhookInfo `json:"result"`
	Ok     bool           `json:"ok"`
}

Ref: #/components/schemas/ResultWebhookInfo

func (*ResultWebhookInfo) Decode

func (s *ResultWebhookInfo) Decode(d *jx.Decoder) error

Decode decodes ResultWebhookInfo from json.

func (*ResultWebhookInfo) Encode

func (s *ResultWebhookInfo) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ResultWebhookInfo) GetOk

func (s *ResultWebhookInfo) GetOk() bool

GetOk returns the value of Ok.

func (*ResultWebhookInfo) GetResult

func (s *ResultWebhookInfo) GetResult() OptWebhookInfo

GetResult returns the value of Result.

func (*ResultWebhookInfo) MarshalJSON

func (s *ResultWebhookInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ResultWebhookInfo) SetOk

func (s *ResultWebhookInfo) SetOk(val bool)

SetOk sets the value of Ok.

func (*ResultWebhookInfo) SetResult

func (s *ResultWebhookInfo) SetResult(val OptWebhookInfo)

SetResult sets the value of Result.

func (*ResultWebhookInfo) UnmarshalJSON

func (s *ResultWebhookInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type RevokeChatInviteLink struct {
	ChatID ID `json:"chat_id"`
	// The invite link to revoke.
	InviteLink string `json:"invite_link"`
}

Input for revokeChatInviteLink. Ref: #/components/schemas/revokeChatInviteLink

func (*RevokeChatInviteLink) Decode

func (s *RevokeChatInviteLink) Decode(d *jx.Decoder) error

Decode decodes RevokeChatInviteLink from json.

func (*RevokeChatInviteLink) Encode

func (s *RevokeChatInviteLink) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*RevokeChatInviteLink) GetChatID

func (s *RevokeChatInviteLink) GetChatID() ID

GetChatID returns the value of ChatID.

func (s *RevokeChatInviteLink) GetInviteLink() string

GetInviteLink returns the value of InviteLink.

func (*RevokeChatInviteLink) MarshalJSON

func (s *RevokeChatInviteLink) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*RevokeChatInviteLink) SetChatID

func (s *RevokeChatInviteLink) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (s *RevokeChatInviteLink) SetInviteLink(val string)

SetInviteLink sets the value of InviteLink.

func (*RevokeChatInviteLink) UnmarshalJSON

func (s *RevokeChatInviteLink) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Route

type Route struct {
	// contains filtered or unexported fields
}

Route is route object.

func (Route) Args

func (r Route) Args() []string

Args returns parsed arguments.

func (Route) Name

func (r Route) Name() string

Name returns ogen operation name.

It is guaranteed to be unique and not empty.

func (Route) OperationID

func (r Route) OperationID() string

OperationID returns OpenAPI operationId.

func (Route) PathPattern

func (r Route) PathPattern() string

PathPattern returns OpenAPI path.

type SendAnimation

type SendAnimation struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.
	MessageThreadID OptInt `json:"message_thread_id"`
	// Animation to send. Pass a file_id as String to send an animation that exists on the Telegram
	// servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the
	// Internet, or upload a new animation using multipart/form-data. [More information on Sending
	// Files](https://core.telegram.org/bots/api#sending-files).
	Animation string `json:"animation"`
	// Duration of sent animation in seconds.
	Duration OptInt `json:"duration"`
	// Animation width.
	Width OptInt `json:"width"`
	// Animation height.
	Height OptInt `json:"height"`
	// Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported
	// server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's
	// width and height should not exceed 320. Ignored if the file is not uploaded using
	// multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can
	// pass `attach://<file_attach_name>` if the thumbnail was uploaded using multipart/form-data under
	// <file_attach_name>. [More information on Sending Files](https://core.telegram.
	// org/bots/api#sending-files).
	Thumbnail OptString `json:"thumbnail"`
	// Animation caption (may also be used when resending animation by _file_id_), 0-1024 characters
	// after entities parsing.
	Caption OptString `json:"caption"`
	// Mode for parsing entities in the animation caption. See [formatting options](https://core.telegram.
	// org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// A JSON-serialized list of special entities that appear in the caption, which can be specified
	// instead of _parse_mode_.
	CaptionEntities []MessageEntity `json:"caption_entities"`
	// Pass _True_ if the animation needs to be covered with a spoiler animation.
	HasSpoiler OptBool `json:"has_spoiler"`
	// Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will
	// receive a notification with no sound.
	DisableNotification OptBool `json:"disable_notification"`
	// Protects the contents of the sent message from forwarding and saving.
	ProtectContent OptBool `json:"protect_content"`
	// If the message is a reply, ID of the original message.
	ReplyToMessageID OptInt `json:"reply_to_message_id"`
	// Pass _True_ if the message should be sent even if the specified replied-to message is not found.
	AllowSendingWithoutReply OptBool            `json:"allow_sending_without_reply"`
	ReplyMarkup              OptSendReplyMarkup `json:"reply_markup"`
}

Input for sendAnimation. Ref: #/components/schemas/sendAnimation

func (*SendAnimation) Decode

func (s *SendAnimation) Decode(d *jx.Decoder) error

Decode decodes SendAnimation from json.

func (*SendAnimation) Encode

func (s *SendAnimation) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SendAnimation) GetAllowSendingWithoutReply

func (s *SendAnimation) GetAllowSendingWithoutReply() OptBool

GetAllowSendingWithoutReply returns the value of AllowSendingWithoutReply.

func (*SendAnimation) GetAnimation

func (s *SendAnimation) GetAnimation() string

GetAnimation returns the value of Animation.

func (*SendAnimation) GetCaption

func (s *SendAnimation) GetCaption() OptString

GetCaption returns the value of Caption.

func (*SendAnimation) GetCaptionEntities

func (s *SendAnimation) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*SendAnimation) GetChatID

func (s *SendAnimation) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SendAnimation) GetDisableNotification

func (s *SendAnimation) GetDisableNotification() OptBool

GetDisableNotification returns the value of DisableNotification.

func (*SendAnimation) GetDuration

func (s *SendAnimation) GetDuration() OptInt

GetDuration returns the value of Duration.

func (*SendAnimation) GetHasSpoiler

func (s *SendAnimation) GetHasSpoiler() OptBool

GetHasSpoiler returns the value of HasSpoiler.

func (*SendAnimation) GetHeight

func (s *SendAnimation) GetHeight() OptInt

GetHeight returns the value of Height.

func (*SendAnimation) GetMessageThreadID

func (s *SendAnimation) GetMessageThreadID() OptInt

GetMessageThreadID returns the value of MessageThreadID.

func (*SendAnimation) GetParseMode

func (s *SendAnimation) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*SendAnimation) GetProtectContent

func (s *SendAnimation) GetProtectContent() OptBool

GetProtectContent returns the value of ProtectContent.

func (*SendAnimation) GetReplyMarkup

func (s *SendAnimation) GetReplyMarkup() OptSendReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*SendAnimation) GetReplyToMessageID

func (s *SendAnimation) GetReplyToMessageID() OptInt

GetReplyToMessageID returns the value of ReplyToMessageID.

func (*SendAnimation) GetThumbnail

func (s *SendAnimation) GetThumbnail() OptString

GetThumbnail returns the value of Thumbnail.

func (*SendAnimation) GetWidth

func (s *SendAnimation) GetWidth() OptInt

GetWidth returns the value of Width.

func (*SendAnimation) MarshalJSON

func (s *SendAnimation) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SendAnimation) SetAllowSendingWithoutReply

func (s *SendAnimation) SetAllowSendingWithoutReply(val OptBool)

SetAllowSendingWithoutReply sets the value of AllowSendingWithoutReply.

func (*SendAnimation) SetAnimation

func (s *SendAnimation) SetAnimation(val string)

SetAnimation sets the value of Animation.

func (*SendAnimation) SetCaption

func (s *SendAnimation) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*SendAnimation) SetCaptionEntities

func (s *SendAnimation) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*SendAnimation) SetChatID

func (s *SendAnimation) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SendAnimation) SetDisableNotification

func (s *SendAnimation) SetDisableNotification(val OptBool)

SetDisableNotification sets the value of DisableNotification.

func (*SendAnimation) SetDuration

func (s *SendAnimation) SetDuration(val OptInt)

SetDuration sets the value of Duration.

func (*SendAnimation) SetHasSpoiler

func (s *SendAnimation) SetHasSpoiler(val OptBool)

SetHasSpoiler sets the value of HasSpoiler.

func (*SendAnimation) SetHeight

func (s *SendAnimation) SetHeight(val OptInt)

SetHeight sets the value of Height.

func (*SendAnimation) SetMessageThreadID

func (s *SendAnimation) SetMessageThreadID(val OptInt)

SetMessageThreadID sets the value of MessageThreadID.

func (*SendAnimation) SetParseMode

func (s *SendAnimation) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*SendAnimation) SetProtectContent

func (s *SendAnimation) SetProtectContent(val OptBool)

SetProtectContent sets the value of ProtectContent.

func (*SendAnimation) SetReplyMarkup

func (s *SendAnimation) SetReplyMarkup(val OptSendReplyMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*SendAnimation) SetReplyToMessageID

func (s *SendAnimation) SetReplyToMessageID(val OptInt)

SetReplyToMessageID sets the value of ReplyToMessageID.

func (*SendAnimation) SetThumbnail

func (s *SendAnimation) SetThumbnail(val OptString)

SetThumbnail sets the value of Thumbnail.

func (*SendAnimation) SetWidth

func (s *SendAnimation) SetWidth(val OptInt)

SetWidth sets the value of Width.

func (*SendAnimation) UnmarshalJSON

func (s *SendAnimation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SendAnimation) Validate

func (s *SendAnimation) Validate() error

type SendAudio

type SendAudio struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.
	MessageThreadID OptInt `json:"message_thread_id"`
	// Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram
	// servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the
	// Internet, or upload a new one using multipart/form-data. [More information on Sending
	// Files](https://core.telegram.org/bots/api#sending-files).
	Audio string `json:"audio"`
	// Audio caption, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// Mode for parsing entities in the audio caption. See [formatting options](https://core.telegram.
	// org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// A JSON-serialized list of special entities that appear in the caption, which can be specified
	// instead of _parse_mode_.
	CaptionEntities []MessageEntity `json:"caption_entities"`
	// Duration of the audio in seconds.
	Duration OptInt `json:"duration"`
	// Performer.
	Performer OptString `json:"performer"`
	// Track name.
	Title OptString `json:"title"`
	// Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported
	// server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's
	// width and height should not exceed 320. Ignored if the file is not uploaded using
	// multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can
	// pass `attach://<file_attach_name>` if the thumbnail was uploaded using multipart/form-data under
	// <file_attach_name>. [More information on Sending Files](https://core.telegram.
	// org/bots/api#sending-files).
	Thumbnail OptString `json:"thumbnail"`
	// Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will
	// receive a notification with no sound.
	DisableNotification OptBool `json:"disable_notification"`
	// Protects the contents of the sent message from forwarding and saving.
	ProtectContent OptBool `json:"protect_content"`
	// If the message is a reply, ID of the original message.
	ReplyToMessageID OptInt `json:"reply_to_message_id"`
	// Pass _True_ if the message should be sent even if the specified replied-to message is not found.
	AllowSendingWithoutReply OptBool            `json:"allow_sending_without_reply"`
	ReplyMarkup              OptSendReplyMarkup `json:"reply_markup"`
}

Input for sendAudio. Ref: #/components/schemas/sendAudio

func (*SendAudio) Decode

func (s *SendAudio) Decode(d *jx.Decoder) error

Decode decodes SendAudio from json.

func (*SendAudio) Encode

func (s *SendAudio) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SendAudio) GetAllowSendingWithoutReply

func (s *SendAudio) GetAllowSendingWithoutReply() OptBool

GetAllowSendingWithoutReply returns the value of AllowSendingWithoutReply.

func (*SendAudio) GetAudio

func (s *SendAudio) GetAudio() string

GetAudio returns the value of Audio.

func (*SendAudio) GetCaption

func (s *SendAudio) GetCaption() OptString

GetCaption returns the value of Caption.

func (*SendAudio) GetCaptionEntities

func (s *SendAudio) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*SendAudio) GetChatID

func (s *SendAudio) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SendAudio) GetDisableNotification

func (s *SendAudio) GetDisableNotification() OptBool

GetDisableNotification returns the value of DisableNotification.

func (*SendAudio) GetDuration

func (s *SendAudio) GetDuration() OptInt

GetDuration returns the value of Duration.

func (*SendAudio) GetMessageThreadID

func (s *SendAudio) GetMessageThreadID() OptInt

GetMessageThreadID returns the value of MessageThreadID.

func (*SendAudio) GetParseMode

func (s *SendAudio) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*SendAudio) GetPerformer

func (s *SendAudio) GetPerformer() OptString

GetPerformer returns the value of Performer.

func (*SendAudio) GetProtectContent

func (s *SendAudio) GetProtectContent() OptBool

GetProtectContent returns the value of ProtectContent.

func (*SendAudio) GetReplyMarkup

func (s *SendAudio) GetReplyMarkup() OptSendReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*SendAudio) GetReplyToMessageID

func (s *SendAudio) GetReplyToMessageID() OptInt

GetReplyToMessageID returns the value of ReplyToMessageID.

func (*SendAudio) GetThumbnail

func (s *SendAudio) GetThumbnail() OptString

GetThumbnail returns the value of Thumbnail.

func (*SendAudio) GetTitle

func (s *SendAudio) GetTitle() OptString

GetTitle returns the value of Title.

func (*SendAudio) MarshalJSON

func (s *SendAudio) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SendAudio) SetAllowSendingWithoutReply

func (s *SendAudio) SetAllowSendingWithoutReply(val OptBool)

SetAllowSendingWithoutReply sets the value of AllowSendingWithoutReply.

func (*SendAudio) SetAudio

func (s *SendAudio) SetAudio(val string)

SetAudio sets the value of Audio.

func (*SendAudio) SetCaption

func (s *SendAudio) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*SendAudio) SetCaptionEntities

func (s *SendAudio) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*SendAudio) SetChatID

func (s *SendAudio) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SendAudio) SetDisableNotification

func (s *SendAudio) SetDisableNotification(val OptBool)

SetDisableNotification sets the value of DisableNotification.

func (*SendAudio) SetDuration

func (s *SendAudio) SetDuration(val OptInt)

SetDuration sets the value of Duration.

func (*SendAudio) SetMessageThreadID

func (s *SendAudio) SetMessageThreadID(val OptInt)

SetMessageThreadID sets the value of MessageThreadID.

func (*SendAudio) SetParseMode

func (s *SendAudio) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*SendAudio) SetPerformer

func (s *SendAudio) SetPerformer(val OptString)

SetPerformer sets the value of Performer.

func (*SendAudio) SetProtectContent

func (s *SendAudio) SetProtectContent(val OptBool)

SetProtectContent sets the value of ProtectContent.

func (*SendAudio) SetReplyMarkup

func (s *SendAudio) SetReplyMarkup(val OptSendReplyMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*SendAudio) SetReplyToMessageID

func (s *SendAudio) SetReplyToMessageID(val OptInt)

SetReplyToMessageID sets the value of ReplyToMessageID.

func (*SendAudio) SetThumbnail

func (s *SendAudio) SetThumbnail(val OptString)

SetThumbnail sets the value of Thumbnail.

func (*SendAudio) SetTitle

func (s *SendAudio) SetTitle(val OptString)

SetTitle sets the value of Title.

func (*SendAudio) UnmarshalJSON

func (s *SendAudio) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SendAudio) Validate

func (s *SendAudio) Validate() error

type SendChatAction

type SendChatAction struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread; supergroups only.
	MessageThreadID OptInt `json:"message_thread_id"`
	// Type of action to broadcast. Choose one, depending on what the user is about to receive: _typing_
	// for [text messages](https://core.telegram.org/bots/api#sendmessage), _upload_photo_ for
	// [photos](https://core.telegram.org/bots/api#sendphoto), _record_video_ or _upload_video_ for
	// [videos](https://core.telegram.org/bots/api#sendvideo), _record_voice_ or _upload_voice_ for
	// [voice notes](https://core.telegram.org/bots/api#sendvoice), _upload_document_ for [general
	// files](https://core.telegram.org/bots/api#senddocument), _choose_sticker_ for
	// [stickers](https://core.telegram.org/bots/api#sendsticker), _find_location_ for [location
	// data](https://core.telegram.org/bots/api#sendlocation), _record_video_note_ or _upload_video_note_
	// for [video notes](https://core.telegram.org/bots/api#sendvideonote).
	Action string `json:"action"`
}

Input for sendChatAction. Ref: #/components/schemas/sendChatAction

func (*SendChatAction) Decode

func (s *SendChatAction) Decode(d *jx.Decoder) error

Decode decodes SendChatAction from json.

func (*SendChatAction) Encode

func (s *SendChatAction) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SendChatAction) GetAction

func (s *SendChatAction) GetAction() string

GetAction returns the value of Action.

func (*SendChatAction) GetChatID

func (s *SendChatAction) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SendChatAction) GetMessageThreadID

func (s *SendChatAction) GetMessageThreadID() OptInt

GetMessageThreadID returns the value of MessageThreadID.

func (*SendChatAction) MarshalJSON

func (s *SendChatAction) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SendChatAction) SetAction

func (s *SendChatAction) SetAction(val string)

SetAction sets the value of Action.

func (*SendChatAction) SetChatID

func (s *SendChatAction) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SendChatAction) SetMessageThreadID

func (s *SendChatAction) SetMessageThreadID(val OptInt)

SetMessageThreadID sets the value of MessageThreadID.

func (*SendChatAction) UnmarshalJSON

func (s *SendChatAction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type SendContact

type SendContact struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.
	MessageThreadID OptInt `json:"message_thread_id"`
	// Contact's phone number.
	PhoneNumber string `json:"phone_number"`
	// Contact's first name.
	FirstName string `json:"first_name"`
	// Contact's last name.
	LastName OptString `json:"last_name"`
	// Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard),
	// 0-2048 bytes.
	Vcard OptString `json:"vcard"`
	// Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will
	// receive a notification with no sound.
	DisableNotification OptBool `json:"disable_notification"`
	// Protects the contents of the sent message from forwarding and saving.
	ProtectContent OptBool `json:"protect_content"`
	// If the message is a reply, ID of the original message.
	ReplyToMessageID OptInt `json:"reply_to_message_id"`
	// Pass _True_ if the message should be sent even if the specified replied-to message is not found.
	AllowSendingWithoutReply OptBool            `json:"allow_sending_without_reply"`
	ReplyMarkup              OptSendReplyMarkup `json:"reply_markup"`
}

Input for sendContact. Ref: #/components/schemas/sendContact

func (*SendContact) Decode

func (s *SendContact) Decode(d *jx.Decoder) error

Decode decodes SendContact from json.

func (*SendContact) Encode

func (s *SendContact) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SendContact) GetAllowSendingWithoutReply

func (s *SendContact) GetAllowSendingWithoutReply() OptBool

GetAllowSendingWithoutReply returns the value of AllowSendingWithoutReply.

func (*SendContact) GetChatID

func (s *SendContact) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SendContact) GetDisableNotification

func (s *SendContact) GetDisableNotification() OptBool

GetDisableNotification returns the value of DisableNotification.

func (*SendContact) GetFirstName

func (s *SendContact) GetFirstName() string

GetFirstName returns the value of FirstName.

func (*SendContact) GetLastName

func (s *SendContact) GetLastName() OptString

GetLastName returns the value of LastName.

func (*SendContact) GetMessageThreadID

func (s *SendContact) GetMessageThreadID() OptInt

GetMessageThreadID returns the value of MessageThreadID.

func (*SendContact) GetPhoneNumber

func (s *SendContact) GetPhoneNumber() string

GetPhoneNumber returns the value of PhoneNumber.

func (*SendContact) GetProtectContent

func (s *SendContact) GetProtectContent() OptBool

GetProtectContent returns the value of ProtectContent.

func (*SendContact) GetReplyMarkup

func (s *SendContact) GetReplyMarkup() OptSendReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*SendContact) GetReplyToMessageID

func (s *SendContact) GetReplyToMessageID() OptInt

GetReplyToMessageID returns the value of ReplyToMessageID.

func (*SendContact) GetVcard

func (s *SendContact) GetVcard() OptString

GetVcard returns the value of Vcard.

func (*SendContact) MarshalJSON

func (s *SendContact) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SendContact) SetAllowSendingWithoutReply

func (s *SendContact) SetAllowSendingWithoutReply(val OptBool)

SetAllowSendingWithoutReply sets the value of AllowSendingWithoutReply.

func (*SendContact) SetChatID

func (s *SendContact) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SendContact) SetDisableNotification

func (s *SendContact) SetDisableNotification(val OptBool)

SetDisableNotification sets the value of DisableNotification.

func (*SendContact) SetFirstName

func (s *SendContact) SetFirstName(val string)

SetFirstName sets the value of FirstName.

func (*SendContact) SetLastName

func (s *SendContact) SetLastName(val OptString)

SetLastName sets the value of LastName.

func (*SendContact) SetMessageThreadID

func (s *SendContact) SetMessageThreadID(val OptInt)

SetMessageThreadID sets the value of MessageThreadID.

func (*SendContact) SetPhoneNumber

func (s *SendContact) SetPhoneNumber(val string)

SetPhoneNumber sets the value of PhoneNumber.

func (*SendContact) SetProtectContent

func (s *SendContact) SetProtectContent(val OptBool)

SetProtectContent sets the value of ProtectContent.

func (*SendContact) SetReplyMarkup

func (s *SendContact) SetReplyMarkup(val OptSendReplyMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*SendContact) SetReplyToMessageID

func (s *SendContact) SetReplyToMessageID(val OptInt)

SetReplyToMessageID sets the value of ReplyToMessageID.

func (*SendContact) SetVcard

func (s *SendContact) SetVcard(val OptString)

SetVcard sets the value of Vcard.

func (*SendContact) UnmarshalJSON

func (s *SendContact) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SendContact) Validate

func (s *SendContact) Validate() error

type SendDice

type SendDice struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.
	MessageThreadID OptInt `json:"message_thread_id"`
	// Emoji on which the dice throw animation is based. Currently, must be one of `🎲`, `🎯`, `🏀`,
	//  `⚽`, `🎳`, or `🎰`. Dice can have values 1-6 for `🎲`, `🎯` and `🎳`, values 1-5 for
	// `🏀` and `⚽`, and values 1-64 for `🎰`. Defaults to `🎲`.
	Emoji OptString `json:"emoji"`
	// Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will
	// receive a notification with no sound.
	DisableNotification OptBool `json:"disable_notification"`
	// Protects the contents of the sent message from forwarding.
	ProtectContent OptBool `json:"protect_content"`
	// If the message is a reply, ID of the original message.
	ReplyToMessageID OptInt `json:"reply_to_message_id"`
	// Pass _True_ if the message should be sent even if the specified replied-to message is not found.
	AllowSendingWithoutReply OptBool            `json:"allow_sending_without_reply"`
	ReplyMarkup              OptSendReplyMarkup `json:"reply_markup"`
}

Input for sendDice. Ref: #/components/schemas/sendDice

func (*SendDice) Decode

func (s *SendDice) Decode(d *jx.Decoder) error

Decode decodes SendDice from json.

func (*SendDice) Encode

func (s *SendDice) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SendDice) GetAllowSendingWithoutReply

func (s *SendDice) GetAllowSendingWithoutReply() OptBool

GetAllowSendingWithoutReply returns the value of AllowSendingWithoutReply.

func (*SendDice) GetChatID

func (s *SendDice) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SendDice) GetDisableNotification

func (s *SendDice) GetDisableNotification() OptBool

GetDisableNotification returns the value of DisableNotification.

func (*SendDice) GetEmoji

func (s *SendDice) GetEmoji() OptString

GetEmoji returns the value of Emoji.

func (*SendDice) GetMessageThreadID

func (s *SendDice) GetMessageThreadID() OptInt

GetMessageThreadID returns the value of MessageThreadID.

func (*SendDice) GetProtectContent

func (s *SendDice) GetProtectContent() OptBool

GetProtectContent returns the value of ProtectContent.

func (*SendDice) GetReplyMarkup

func (s *SendDice) GetReplyMarkup() OptSendReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*SendDice) GetReplyToMessageID

func (s *SendDice) GetReplyToMessageID() OptInt

GetReplyToMessageID returns the value of ReplyToMessageID.

func (*SendDice) MarshalJSON

func (s *SendDice) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SendDice) SetAllowSendingWithoutReply

func (s *SendDice) SetAllowSendingWithoutReply(val OptBool)

SetAllowSendingWithoutReply sets the value of AllowSendingWithoutReply.

func (*SendDice) SetChatID

func (s *SendDice) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SendDice) SetDisableNotification

func (s *SendDice) SetDisableNotification(val OptBool)

SetDisableNotification sets the value of DisableNotification.

func (*SendDice) SetEmoji

func (s *SendDice) SetEmoji(val OptString)

SetEmoji sets the value of Emoji.

func (*SendDice) SetMessageThreadID

func (s *SendDice) SetMessageThreadID(val OptInt)

SetMessageThreadID sets the value of MessageThreadID.

func (*SendDice) SetProtectContent

func (s *SendDice) SetProtectContent(val OptBool)

SetProtectContent sets the value of ProtectContent.

func (*SendDice) SetReplyMarkup

func (s *SendDice) SetReplyMarkup(val OptSendReplyMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*SendDice) SetReplyToMessageID

func (s *SendDice) SetReplyToMessageID(val OptInt)

SetReplyToMessageID sets the value of ReplyToMessageID.

func (*SendDice) UnmarshalJSON

func (s *SendDice) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SendDice) Validate

func (s *SendDice) Validate() error

type SendDocument

type SendDocument struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.
	MessageThreadID OptInt `json:"message_thread_id"`
	// File to send. Pass a file_id as String to send a file that exists on the Telegram servers
	// (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or
	// upload a new one using multipart/form-data. [More information on Sending Files](https://core.
	// telegram.org/bots/api#sending-files).
	Document string `json:"document"`
	// Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported
	// server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's
	// width and height should not exceed 320. Ignored if the file is not uploaded using
	// multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can
	// pass `attach://<file_attach_name>` if the thumbnail was uploaded using multipart/form-data under
	// <file_attach_name>. [More information on Sending Files](https://core.telegram.
	// org/bots/api#sending-files).
	Thumbnail OptString `json:"thumbnail"`
	// Document caption (may also be used when resending documents by _file_id_), 0-1024 characters after
	// entities parsing.
	Caption OptString `json:"caption"`
	// Mode for parsing entities in the document caption. See [formatting options](https://core.telegram.
	// org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// A JSON-serialized list of special entities that appear in the caption, which can be specified
	// instead of _parse_mode_.
	CaptionEntities []MessageEntity `json:"caption_entities"`
	// Disables automatic server-side content type detection for files uploaded using multipart/form-data.
	DisableContentTypeDetection OptBool `json:"disable_content_type_detection"`
	// Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will
	// receive a notification with no sound.
	DisableNotification OptBool `json:"disable_notification"`
	// Protects the contents of the sent message from forwarding and saving.
	ProtectContent OptBool `json:"protect_content"`
	// If the message is a reply, ID of the original message.
	ReplyToMessageID OptInt `json:"reply_to_message_id"`
	// Pass _True_ if the message should be sent even if the specified replied-to message is not found.
	AllowSendingWithoutReply OptBool            `json:"allow_sending_without_reply"`
	ReplyMarkup              OptSendReplyMarkup `json:"reply_markup"`
}

Input for sendDocument. Ref: #/components/schemas/sendDocument

func (*SendDocument) Decode

func (s *SendDocument) Decode(d *jx.Decoder) error

Decode decodes SendDocument from json.

func (*SendDocument) Encode

func (s *SendDocument) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SendDocument) GetAllowSendingWithoutReply

func (s *SendDocument) GetAllowSendingWithoutReply() OptBool

GetAllowSendingWithoutReply returns the value of AllowSendingWithoutReply.

func (*SendDocument) GetCaption

func (s *SendDocument) GetCaption() OptString

GetCaption returns the value of Caption.

func (*SendDocument) GetCaptionEntities

func (s *SendDocument) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*SendDocument) GetChatID

func (s *SendDocument) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SendDocument) GetDisableContentTypeDetection

func (s *SendDocument) GetDisableContentTypeDetection() OptBool

GetDisableContentTypeDetection returns the value of DisableContentTypeDetection.

func (*SendDocument) GetDisableNotification

func (s *SendDocument) GetDisableNotification() OptBool

GetDisableNotification returns the value of DisableNotification.

func (*SendDocument) GetDocument

func (s *SendDocument) GetDocument() string

GetDocument returns the value of Document.

func (*SendDocument) GetMessageThreadID

func (s *SendDocument) GetMessageThreadID() OptInt

GetMessageThreadID returns the value of MessageThreadID.

func (*SendDocument) GetParseMode

func (s *SendDocument) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*SendDocument) GetProtectContent

func (s *SendDocument) GetProtectContent() OptBool

GetProtectContent returns the value of ProtectContent.

func (*SendDocument) GetReplyMarkup

func (s *SendDocument) GetReplyMarkup() OptSendReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*SendDocument) GetReplyToMessageID

func (s *SendDocument) GetReplyToMessageID() OptInt

GetReplyToMessageID returns the value of ReplyToMessageID.

func (*SendDocument) GetThumbnail

func (s *SendDocument) GetThumbnail() OptString

GetThumbnail returns the value of Thumbnail.

func (*SendDocument) MarshalJSON

func (s *SendDocument) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SendDocument) SetAllowSendingWithoutReply

func (s *SendDocument) SetAllowSendingWithoutReply(val OptBool)

SetAllowSendingWithoutReply sets the value of AllowSendingWithoutReply.

func (*SendDocument) SetCaption

func (s *SendDocument) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*SendDocument) SetCaptionEntities

func (s *SendDocument) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*SendDocument) SetChatID

func (s *SendDocument) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SendDocument) SetDisableContentTypeDetection

func (s *SendDocument) SetDisableContentTypeDetection(val OptBool)

SetDisableContentTypeDetection sets the value of DisableContentTypeDetection.

func (*SendDocument) SetDisableNotification

func (s *SendDocument) SetDisableNotification(val OptBool)

SetDisableNotification sets the value of DisableNotification.

func (*SendDocument) SetDocument

func (s *SendDocument) SetDocument(val string)

SetDocument sets the value of Document.

func (*SendDocument) SetMessageThreadID

func (s *SendDocument) SetMessageThreadID(val OptInt)

SetMessageThreadID sets the value of MessageThreadID.

func (*SendDocument) SetParseMode

func (s *SendDocument) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*SendDocument) SetProtectContent

func (s *SendDocument) SetProtectContent(val OptBool)

SetProtectContent sets the value of ProtectContent.

func (*SendDocument) SetReplyMarkup

func (s *SendDocument) SetReplyMarkup(val OptSendReplyMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*SendDocument) SetReplyToMessageID

func (s *SendDocument) SetReplyToMessageID(val OptInt)

SetReplyToMessageID sets the value of ReplyToMessageID.

func (*SendDocument) SetThumbnail

func (s *SendDocument) SetThumbnail(val OptString)

SetThumbnail sets the value of Thumbnail.

func (*SendDocument) UnmarshalJSON

func (s *SendDocument) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SendDocument) Validate

func (s *SendDocument) Validate() error

type SendGame

type SendGame struct {
	// Unique identifier for the target chat.
	ChatID int64 `json:"chat_id"`
	// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.
	MessageThreadID OptInt `json:"message_thread_id"`
	// Short name of the game, serves as the unique identifier for the game. Set up your games via
	// [@BotFather](https://t.me/botfather).
	GameShortName string `json:"game_short_name"`
	// Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will
	// receive a notification with no sound.
	DisableNotification OptBool `json:"disable_notification"`
	// Protects the contents of the sent message from forwarding and saving.
	ProtectContent OptBool `json:"protect_content"`
	// If the message is a reply, ID of the original message.
	ReplyToMessageID OptInt `json:"reply_to_message_id"`
	// Pass _True_ if the message should be sent even if the specified replied-to message is not found.
	AllowSendingWithoutReply OptBool                 `json:"allow_sending_without_reply"`
	ReplyMarkup              OptInlineKeyboardMarkup `json:"reply_markup"`
}

Input for sendGame. Ref: #/components/schemas/sendGame

func (*SendGame) Decode

func (s *SendGame) Decode(d *jx.Decoder) error

Decode decodes SendGame from json.

func (*SendGame) Encode

func (s *SendGame) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SendGame) GetAllowSendingWithoutReply

func (s *SendGame) GetAllowSendingWithoutReply() OptBool

GetAllowSendingWithoutReply returns the value of AllowSendingWithoutReply.

func (*SendGame) GetChatID

func (s *SendGame) GetChatID() int64

GetChatID returns the value of ChatID.

func (*SendGame) GetDisableNotification

func (s *SendGame) GetDisableNotification() OptBool

GetDisableNotification returns the value of DisableNotification.

func (*SendGame) GetGameShortName

func (s *SendGame) GetGameShortName() string

GetGameShortName returns the value of GameShortName.

func (*SendGame) GetMessageThreadID

func (s *SendGame) GetMessageThreadID() OptInt

GetMessageThreadID returns the value of MessageThreadID.

func (*SendGame) GetProtectContent

func (s *SendGame) GetProtectContent() OptBool

GetProtectContent returns the value of ProtectContent.

func (*SendGame) GetReplyMarkup

func (s *SendGame) GetReplyMarkup() OptInlineKeyboardMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*SendGame) GetReplyToMessageID

func (s *SendGame) GetReplyToMessageID() OptInt

GetReplyToMessageID returns the value of ReplyToMessageID.

func (*SendGame) MarshalJSON

func (s *SendGame) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SendGame) SetAllowSendingWithoutReply

func (s *SendGame) SetAllowSendingWithoutReply(val OptBool)

SetAllowSendingWithoutReply sets the value of AllowSendingWithoutReply.

func (*SendGame) SetChatID

func (s *SendGame) SetChatID(val int64)

SetChatID sets the value of ChatID.

func (*SendGame) SetDisableNotification

func (s *SendGame) SetDisableNotification(val OptBool)

SetDisableNotification sets the value of DisableNotification.

func (*SendGame) SetGameShortName

func (s *SendGame) SetGameShortName(val string)

SetGameShortName sets the value of GameShortName.

func (*SendGame) SetMessageThreadID

func (s *SendGame) SetMessageThreadID(val OptInt)

SetMessageThreadID sets the value of MessageThreadID.

func (*SendGame) SetProtectContent

func (s *SendGame) SetProtectContent(val OptBool)

SetProtectContent sets the value of ProtectContent.

func (*SendGame) SetReplyMarkup

func (s *SendGame) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*SendGame) SetReplyToMessageID

func (s *SendGame) SetReplyToMessageID(val OptInt)

SetReplyToMessageID sets the value of ReplyToMessageID.

func (*SendGame) UnmarshalJSON

func (s *SendGame) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SendGame) Validate

func (s *SendGame) Validate() error

type SendInvoice

type SendInvoice struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.
	MessageThreadID OptInt `json:"message_thread_id"`
	// Product name, 1-32 characters.
	Title string `json:"title"`
	// Product description, 1-255 characters.
	Description string `json:"description"`
	// Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your
	// internal processes.
	Payload string `json:"payload"`
	// Payment provider token, obtained via [@BotFather](https://t.me/botfather).
	ProviderToken string `json:"provider_token"`
	// Three-letter ISO 4217 currency code, see [more on currencies](https://core.telegram.
	// org/bots/payments#supported-currencies).
	Currency string `json:"currency"`
	// Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery
	// cost, delivery tax, bonus, etc.).
	Prices []LabeledPrice `json:"prices"`
	// The maximum accepted amount for tips in the _smallest units_ of the currency (integer, **not**
	// float/double). For example, for a maximum tip of `US$ 1.45` pass `max_tip_amount = 145`. See the
	// _exp_ parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it
	// shows the number of digits past the decimal point for each currency (2 for the majority of
	// currencies). Defaults to 0.
	MaxTipAmount OptInt `json:"max_tip_amount"`
	// A JSON-serialized array of suggested amounts of tips in the _smallest units_ of the currency
	// (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested
	// tip amounts must be positive, passed in a strictly increased order and must not exceed
	// _max_tip_amount_.
	SuggestedTipAmounts []int64 `json:"suggested_tip_amounts"`
	// Unique deep-linking parameter. If left empty, **forwarded copies** of the sent message will have a
	// _Pay_ button, allowing multiple users to pay directly from the forwarded message, using the same
	// invoice. If non-empty, forwarded copies of the sent message will have a _URL_ button with a deep
	// link to the bot (instead of a _Pay_ button), with the value used as the start parameter.
	StartParameter OptString `json:"start_parameter"`
	// JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed
	// description of required fields should be provided by the payment provider.
	ProviderData OptString `json:"provider_data"`
	// URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a
	// service. People like it better when they see what they are paying for.
	PhotoURL OptString `json:"photo_url"`
	// Photo size in bytes.
	PhotoSize OptInt `json:"photo_size"`
	// Photo width.
	PhotoWidth OptInt `json:"photo_width"`
	// Photo height.
	PhotoHeight OptInt `json:"photo_height"`
	// Pass _True_ if you require the user's full name to complete the order.
	NeedName OptBool `json:"need_name"`
	// Pass _True_ if you require the user's phone number to complete the order.
	NeedPhoneNumber OptBool `json:"need_phone_number"`
	// Pass _True_ if you require the user's email address to complete the order.
	NeedEmail OptBool `json:"need_email"`
	// Pass _True_ if you require the user's shipping address to complete the order.
	NeedShippingAddress OptBool `json:"need_shipping_address"`
	// Pass _True_ if the user's phone number should be sent to provider.
	SendPhoneNumberToProvider OptBool `json:"send_phone_number_to_provider"`
	// Pass _True_ if the user's email address should be sent to provider.
	SendEmailToProvider OptBool `json:"send_email_to_provider"`
	// Pass _True_ if the final price depends on the shipping method.
	IsFlexible OptBool `json:"is_flexible"`
	// Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will
	// receive a notification with no sound.
	DisableNotification OptBool `json:"disable_notification"`
	// Protects the contents of the sent message from forwarding and saving.
	ProtectContent OptBool `json:"protect_content"`
	// If the message is a reply, ID of the original message.
	ReplyToMessageID OptInt `json:"reply_to_message_id"`
	// Pass _True_ if the message should be sent even if the specified replied-to message is not found.
	AllowSendingWithoutReply OptBool                 `json:"allow_sending_without_reply"`
	ReplyMarkup              OptInlineKeyboardMarkup `json:"reply_markup"`
}

Input for sendInvoice. Ref: #/components/schemas/sendInvoice

func (*SendInvoice) Decode

func (s *SendInvoice) Decode(d *jx.Decoder) error

Decode decodes SendInvoice from json.

func (*SendInvoice) Encode

func (s *SendInvoice) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SendInvoice) GetAllowSendingWithoutReply

func (s *SendInvoice) GetAllowSendingWithoutReply() OptBool

GetAllowSendingWithoutReply returns the value of AllowSendingWithoutReply.

func (*SendInvoice) GetChatID

func (s *SendInvoice) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SendInvoice) GetCurrency

func (s *SendInvoice) GetCurrency() string

GetCurrency returns the value of Currency.

func (*SendInvoice) GetDescription

func (s *SendInvoice) GetDescription() string

GetDescription returns the value of Description.

func (*SendInvoice) GetDisableNotification

func (s *SendInvoice) GetDisableNotification() OptBool

GetDisableNotification returns the value of DisableNotification.

func (*SendInvoice) GetIsFlexible

func (s *SendInvoice) GetIsFlexible() OptBool

GetIsFlexible returns the value of IsFlexible.

func (*SendInvoice) GetMaxTipAmount

func (s *SendInvoice) GetMaxTipAmount() OptInt

GetMaxTipAmount returns the value of MaxTipAmount.

func (*SendInvoice) GetMessageThreadID

func (s *SendInvoice) GetMessageThreadID() OptInt

GetMessageThreadID returns the value of MessageThreadID.

func (*SendInvoice) GetNeedEmail

func (s *SendInvoice) GetNeedEmail() OptBool

GetNeedEmail returns the value of NeedEmail.

func (*SendInvoice) GetNeedName

func (s *SendInvoice) GetNeedName() OptBool

GetNeedName returns the value of NeedName.

func (*SendInvoice) GetNeedPhoneNumber

func (s *SendInvoice) GetNeedPhoneNumber() OptBool

GetNeedPhoneNumber returns the value of NeedPhoneNumber.

func (*SendInvoice) GetNeedShippingAddress

func (s *SendInvoice) GetNeedShippingAddress() OptBool

GetNeedShippingAddress returns the value of NeedShippingAddress.

func (*SendInvoice) GetPayload

func (s *SendInvoice) GetPayload() string

GetPayload returns the value of Payload.

func (*SendInvoice) GetPhotoHeight

func (s *SendInvoice) GetPhotoHeight() OptInt

GetPhotoHeight returns the value of PhotoHeight.

func (*SendInvoice) GetPhotoSize

func (s *SendInvoice) GetPhotoSize() OptInt

GetPhotoSize returns the value of PhotoSize.

func (*SendInvoice) GetPhotoURL

func (s *SendInvoice) GetPhotoURL() OptString

GetPhotoURL returns the value of PhotoURL.

func (*SendInvoice) GetPhotoWidth

func (s *SendInvoice) GetPhotoWidth() OptInt

GetPhotoWidth returns the value of PhotoWidth.

func (*SendInvoice) GetPrices

func (s *SendInvoice) GetPrices() []LabeledPrice

GetPrices returns the value of Prices.

func (*SendInvoice) GetProtectContent

func (s *SendInvoice) GetProtectContent() OptBool

GetProtectContent returns the value of ProtectContent.

func (*SendInvoice) GetProviderData

func (s *SendInvoice) GetProviderData() OptString

GetProviderData returns the value of ProviderData.

func (*SendInvoice) GetProviderToken

func (s *SendInvoice) GetProviderToken() string

GetProviderToken returns the value of ProviderToken.

func (*SendInvoice) GetReplyMarkup

func (s *SendInvoice) GetReplyMarkup() OptInlineKeyboardMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*SendInvoice) GetReplyToMessageID

func (s *SendInvoice) GetReplyToMessageID() OptInt

GetReplyToMessageID returns the value of ReplyToMessageID.

func (*SendInvoice) GetSendEmailToProvider

func (s *SendInvoice) GetSendEmailToProvider() OptBool

GetSendEmailToProvider returns the value of SendEmailToProvider.

func (*SendInvoice) GetSendPhoneNumberToProvider

func (s *SendInvoice) GetSendPhoneNumberToProvider() OptBool

GetSendPhoneNumberToProvider returns the value of SendPhoneNumberToProvider.

func (*SendInvoice) GetStartParameter

func (s *SendInvoice) GetStartParameter() OptString

GetStartParameter returns the value of StartParameter.

func (*SendInvoice) GetSuggestedTipAmounts

func (s *SendInvoice) GetSuggestedTipAmounts() []int64

GetSuggestedTipAmounts returns the value of SuggestedTipAmounts.

func (*SendInvoice) GetTitle

func (s *SendInvoice) GetTitle() string

GetTitle returns the value of Title.

func (*SendInvoice) MarshalJSON

func (s *SendInvoice) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SendInvoice) SetAllowSendingWithoutReply

func (s *SendInvoice) SetAllowSendingWithoutReply(val OptBool)

SetAllowSendingWithoutReply sets the value of AllowSendingWithoutReply.

func (*SendInvoice) SetChatID

func (s *SendInvoice) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SendInvoice) SetCurrency

func (s *SendInvoice) SetCurrency(val string)

SetCurrency sets the value of Currency.

func (*SendInvoice) SetDescription

func (s *SendInvoice) SetDescription(val string)

SetDescription sets the value of Description.

func (*SendInvoice) SetDisableNotification

func (s *SendInvoice) SetDisableNotification(val OptBool)

SetDisableNotification sets the value of DisableNotification.

func (*SendInvoice) SetIsFlexible

func (s *SendInvoice) SetIsFlexible(val OptBool)

SetIsFlexible sets the value of IsFlexible.

func (*SendInvoice) SetMaxTipAmount

func (s *SendInvoice) SetMaxTipAmount(val OptInt)

SetMaxTipAmount sets the value of MaxTipAmount.

func (*SendInvoice) SetMessageThreadID

func (s *SendInvoice) SetMessageThreadID(val OptInt)

SetMessageThreadID sets the value of MessageThreadID.

func (*SendInvoice) SetNeedEmail

func (s *SendInvoice) SetNeedEmail(val OptBool)

SetNeedEmail sets the value of NeedEmail.

func (*SendInvoice) SetNeedName

func (s *SendInvoice) SetNeedName(val OptBool)

SetNeedName sets the value of NeedName.

func (*SendInvoice) SetNeedPhoneNumber

func (s *SendInvoice) SetNeedPhoneNumber(val OptBool)

SetNeedPhoneNumber sets the value of NeedPhoneNumber.

func (*SendInvoice) SetNeedShippingAddress

func (s *SendInvoice) SetNeedShippingAddress(val OptBool)

SetNeedShippingAddress sets the value of NeedShippingAddress.

func (*SendInvoice) SetPayload

func (s *SendInvoice) SetPayload(val string)

SetPayload sets the value of Payload.

func (*SendInvoice) SetPhotoHeight

func (s *SendInvoice) SetPhotoHeight(val OptInt)

SetPhotoHeight sets the value of PhotoHeight.

func (*SendInvoice) SetPhotoSize

func (s *SendInvoice) SetPhotoSize(val OptInt)

SetPhotoSize sets the value of PhotoSize.

func (*SendInvoice) SetPhotoURL

func (s *SendInvoice) SetPhotoURL(val OptString)

SetPhotoURL sets the value of PhotoURL.

func (*SendInvoice) SetPhotoWidth

func (s *SendInvoice) SetPhotoWidth(val OptInt)

SetPhotoWidth sets the value of PhotoWidth.

func (*SendInvoice) SetPrices

func (s *SendInvoice) SetPrices(val []LabeledPrice)

SetPrices sets the value of Prices.

func (*SendInvoice) SetProtectContent

func (s *SendInvoice) SetProtectContent(val OptBool)

SetProtectContent sets the value of ProtectContent.

func (*SendInvoice) SetProviderData

func (s *SendInvoice) SetProviderData(val OptString)

SetProviderData sets the value of ProviderData.

func (*SendInvoice) SetProviderToken

func (s *SendInvoice) SetProviderToken(val string)

SetProviderToken sets the value of ProviderToken.

func (*SendInvoice) SetReplyMarkup

func (s *SendInvoice) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*SendInvoice) SetReplyToMessageID

func (s *SendInvoice) SetReplyToMessageID(val OptInt)

SetReplyToMessageID sets the value of ReplyToMessageID.

func (*SendInvoice) SetSendEmailToProvider

func (s *SendInvoice) SetSendEmailToProvider(val OptBool)

SetSendEmailToProvider sets the value of SendEmailToProvider.

func (*SendInvoice) SetSendPhoneNumberToProvider

func (s *SendInvoice) SetSendPhoneNumberToProvider(val OptBool)

SetSendPhoneNumberToProvider sets the value of SendPhoneNumberToProvider.

func (*SendInvoice) SetStartParameter

func (s *SendInvoice) SetStartParameter(val OptString)

SetStartParameter sets the value of StartParameter.

func (*SendInvoice) SetSuggestedTipAmounts

func (s *SendInvoice) SetSuggestedTipAmounts(val []int64)

SetSuggestedTipAmounts sets the value of SuggestedTipAmounts.

func (*SendInvoice) SetTitle

func (s *SendInvoice) SetTitle(val string)

SetTitle sets the value of Title.

func (*SendInvoice) UnmarshalJSON

func (s *SendInvoice) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SendInvoice) Validate

func (s *SendInvoice) Validate() error

type SendLocation

type SendLocation struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.
	MessageThreadID OptInt `json:"message_thread_id"`
	// Latitude of the location.
	Latitude float64 `json:"latitude"`
	// Longitude of the location.
	Longitude float64 `json:"longitude"`
	// The radius of uncertainty for the location, measured in meters; 0-1500.
	HorizontalAccuracy OptFloat64 `json:"horizontal_accuracy"`
	// Period in seconds for which the location will be updated (see [Live Locations](https://telegram.
	// org/blog/live-locations), should be between 60 and 86400.
	LivePeriod OptInt `json:"live_period"`
	// For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360
	// if specified.
	Heading OptInt `json:"heading"`
	// For live locations, a maximum distance for proximity alerts about approaching another chat member,
	// in meters. Must be between 1 and 100000 if specified.
	ProximityAlertRadius OptInt `json:"proximity_alert_radius"`
	// Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will
	// receive a notification with no sound.
	DisableNotification OptBool `json:"disable_notification"`
	// Protects the contents of the sent message from forwarding and saving.
	ProtectContent OptBool `json:"protect_content"`
	// If the message is a reply, ID of the original message.
	ReplyToMessageID OptInt `json:"reply_to_message_id"`
	// Pass _True_ if the message should be sent even if the specified replied-to message is not found.
	AllowSendingWithoutReply OptBool            `json:"allow_sending_without_reply"`
	ReplyMarkup              OptSendReplyMarkup `json:"reply_markup"`
}

Input for sendLocation. Ref: #/components/schemas/sendLocation

func (*SendLocation) Decode

func (s *SendLocation) Decode(d *jx.Decoder) error

Decode decodes SendLocation from json.

func (*SendLocation) Encode

func (s *SendLocation) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SendLocation) GetAllowSendingWithoutReply

func (s *SendLocation) GetAllowSendingWithoutReply() OptBool

GetAllowSendingWithoutReply returns the value of AllowSendingWithoutReply.

func (*SendLocation) GetChatID

func (s *SendLocation) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SendLocation) GetDisableNotification

func (s *SendLocation) GetDisableNotification() OptBool

GetDisableNotification returns the value of DisableNotification.

func (*SendLocation) GetHeading

func (s *SendLocation) GetHeading() OptInt

GetHeading returns the value of Heading.

func (*SendLocation) GetHorizontalAccuracy

func (s *SendLocation) GetHorizontalAccuracy() OptFloat64

GetHorizontalAccuracy returns the value of HorizontalAccuracy.

func (*SendLocation) GetLatitude

func (s *SendLocation) GetLatitude() float64

GetLatitude returns the value of Latitude.

func (*SendLocation) GetLivePeriod

func (s *SendLocation) GetLivePeriod() OptInt

GetLivePeriod returns the value of LivePeriod.

func (*SendLocation) GetLongitude

func (s *SendLocation) GetLongitude() float64

GetLongitude returns the value of Longitude.

func (*SendLocation) GetMessageThreadID

func (s *SendLocation) GetMessageThreadID() OptInt

GetMessageThreadID returns the value of MessageThreadID.

func (*SendLocation) GetProtectContent

func (s *SendLocation) GetProtectContent() OptBool

GetProtectContent returns the value of ProtectContent.

func (*SendLocation) GetProximityAlertRadius

func (s *SendLocation) GetProximityAlertRadius() OptInt

GetProximityAlertRadius returns the value of ProximityAlertRadius.

func (*SendLocation) GetReplyMarkup

func (s *SendLocation) GetReplyMarkup() OptSendReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*SendLocation) GetReplyToMessageID

func (s *SendLocation) GetReplyToMessageID() OptInt

GetReplyToMessageID returns the value of ReplyToMessageID.

func (*SendLocation) MarshalJSON

func (s *SendLocation) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SendLocation) SetAllowSendingWithoutReply

func (s *SendLocation) SetAllowSendingWithoutReply(val OptBool)

SetAllowSendingWithoutReply sets the value of AllowSendingWithoutReply.

func (*SendLocation) SetChatID

func (s *SendLocation) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SendLocation) SetDisableNotification

func (s *SendLocation) SetDisableNotification(val OptBool)

SetDisableNotification sets the value of DisableNotification.

func (*SendLocation) SetHeading

func (s *SendLocation) SetHeading(val OptInt)

SetHeading sets the value of Heading.

func (*SendLocation) SetHorizontalAccuracy

func (s *SendLocation) SetHorizontalAccuracy(val OptFloat64)

SetHorizontalAccuracy sets the value of HorizontalAccuracy.

func (*SendLocation) SetLatitude

func (s *SendLocation) SetLatitude(val float64)

SetLatitude sets the value of Latitude.

func (*SendLocation) SetLivePeriod

func (s *SendLocation) SetLivePeriod(val OptInt)

SetLivePeriod sets the value of LivePeriod.

func (*SendLocation) SetLongitude

func (s *SendLocation) SetLongitude(val float64)

SetLongitude sets the value of Longitude.

func (*SendLocation) SetMessageThreadID

func (s *SendLocation) SetMessageThreadID(val OptInt)

SetMessageThreadID sets the value of MessageThreadID.

func (*SendLocation) SetProtectContent

func (s *SendLocation) SetProtectContent(val OptBool)

SetProtectContent sets the value of ProtectContent.

func (*SendLocation) SetProximityAlertRadius

func (s *SendLocation) SetProximityAlertRadius(val OptInt)

SetProximityAlertRadius sets the value of ProximityAlertRadius.

func (*SendLocation) SetReplyMarkup

func (s *SendLocation) SetReplyMarkup(val OptSendReplyMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*SendLocation) SetReplyToMessageID

func (s *SendLocation) SetReplyToMessageID(val OptInt)

SetReplyToMessageID sets the value of ReplyToMessageID.

func (*SendLocation) UnmarshalJSON

func (s *SendLocation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SendLocation) Validate

func (s *SendLocation) Validate() error

type SendMediaGroup

type SendMediaGroup struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.
	MessageThreadID OptInt `json:"message_thread_id"`
	// A JSON-serialized array describing messages to be sent, must include 2-10 items.
	Media []SendMediaGroupMediaItem `json:"media"`
	// Sends messages [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will
	// receive a notification with no sound.
	DisableNotification OptBool `json:"disable_notification"`
	// Protects the contents of the sent messages from forwarding and saving.
	ProtectContent OptBool `json:"protect_content"`
	// If the messages are a reply, ID of the original message.
	ReplyToMessageID OptInt `json:"reply_to_message_id"`
	// Pass _True_ if the message should be sent even if the specified replied-to message is not found.
	AllowSendingWithoutReply OptBool `json:"allow_sending_without_reply"`
}

Input for sendMediaGroup. Ref: #/components/schemas/sendMediaGroup

func (*SendMediaGroup) Decode

func (s *SendMediaGroup) Decode(d *jx.Decoder) error

Decode decodes SendMediaGroup from json.

func (*SendMediaGroup) Encode

func (s *SendMediaGroup) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SendMediaGroup) GetAllowSendingWithoutReply

func (s *SendMediaGroup) GetAllowSendingWithoutReply() OptBool

GetAllowSendingWithoutReply returns the value of AllowSendingWithoutReply.

func (*SendMediaGroup) GetChatID

func (s *SendMediaGroup) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SendMediaGroup) GetDisableNotification

func (s *SendMediaGroup) GetDisableNotification() OptBool

GetDisableNotification returns the value of DisableNotification.

func (*SendMediaGroup) GetMedia

func (s *SendMediaGroup) GetMedia() []SendMediaGroupMediaItem

GetMedia returns the value of Media.

func (*SendMediaGroup) GetMessageThreadID

func (s *SendMediaGroup) GetMessageThreadID() OptInt

GetMessageThreadID returns the value of MessageThreadID.

func (*SendMediaGroup) GetProtectContent

func (s *SendMediaGroup) GetProtectContent() OptBool

GetProtectContent returns the value of ProtectContent.

func (*SendMediaGroup) GetReplyToMessageID

func (s *SendMediaGroup) GetReplyToMessageID() OptInt

GetReplyToMessageID returns the value of ReplyToMessageID.

func (*SendMediaGroup) MarshalJSON

func (s *SendMediaGroup) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SendMediaGroup) SetAllowSendingWithoutReply

func (s *SendMediaGroup) SetAllowSendingWithoutReply(val OptBool)

SetAllowSendingWithoutReply sets the value of AllowSendingWithoutReply.

func (*SendMediaGroup) SetChatID

func (s *SendMediaGroup) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SendMediaGroup) SetDisableNotification

func (s *SendMediaGroup) SetDisableNotification(val OptBool)

SetDisableNotification sets the value of DisableNotification.

func (*SendMediaGroup) SetMedia

func (s *SendMediaGroup) SetMedia(val []SendMediaGroupMediaItem)

SetMedia sets the value of Media.

func (*SendMediaGroup) SetMessageThreadID

func (s *SendMediaGroup) SetMessageThreadID(val OptInt)

SetMessageThreadID sets the value of MessageThreadID.

func (*SendMediaGroup) SetProtectContent

func (s *SendMediaGroup) SetProtectContent(val OptBool)

SetProtectContent sets the value of ProtectContent.

func (*SendMediaGroup) SetReplyToMessageID

func (s *SendMediaGroup) SetReplyToMessageID(val OptInt)

SetReplyToMessageID sets the value of ReplyToMessageID.

func (*SendMediaGroup) UnmarshalJSON

func (s *SendMediaGroup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SendMediaGroup) Validate

func (s *SendMediaGroup) Validate() error

type SendMediaGroupMediaItem

type SendMediaGroupMediaItem struct {
	Type               SendMediaGroupMediaItemType // switch on this field
	InputMediaAudio    InputMediaAudio
	InputMediaDocument InputMediaDocument
	InputMediaPhoto    InputMediaPhoto
	InputMediaVideo    InputMediaVideo
}

SendMediaGroupMediaItem represents sum type.

func NewInputMediaAudioSendMediaGroupMediaItem

func NewInputMediaAudioSendMediaGroupMediaItem(v InputMediaAudio) SendMediaGroupMediaItem

NewInputMediaAudioSendMediaGroupMediaItem returns new SendMediaGroupMediaItem from InputMediaAudio.

func NewInputMediaDocumentSendMediaGroupMediaItem

func NewInputMediaDocumentSendMediaGroupMediaItem(v InputMediaDocument) SendMediaGroupMediaItem

NewInputMediaDocumentSendMediaGroupMediaItem returns new SendMediaGroupMediaItem from InputMediaDocument.

func NewInputMediaPhotoSendMediaGroupMediaItem

func NewInputMediaPhotoSendMediaGroupMediaItem(v InputMediaPhoto) SendMediaGroupMediaItem

NewInputMediaPhotoSendMediaGroupMediaItem returns new SendMediaGroupMediaItem from InputMediaPhoto.

func NewInputMediaVideoSendMediaGroupMediaItem

func NewInputMediaVideoSendMediaGroupMediaItem(v InputMediaVideo) SendMediaGroupMediaItem

NewInputMediaVideoSendMediaGroupMediaItem returns new SendMediaGroupMediaItem from InputMediaVideo.

func (*SendMediaGroupMediaItem) Decode

func (s *SendMediaGroupMediaItem) Decode(d *jx.Decoder) error

Decode decodes SendMediaGroupMediaItem from json.

func (SendMediaGroupMediaItem) Encode

func (s SendMediaGroupMediaItem) Encode(e *jx.Encoder)

Encode encodes SendMediaGroupMediaItem as json.

func (SendMediaGroupMediaItem) GetInputMediaAudio

func (s SendMediaGroupMediaItem) GetInputMediaAudio() (v InputMediaAudio, ok bool)

GetInputMediaAudio returns InputMediaAudio and true boolean if SendMediaGroupMediaItem is InputMediaAudio.

func (SendMediaGroupMediaItem) GetInputMediaDocument

func (s SendMediaGroupMediaItem) GetInputMediaDocument() (v InputMediaDocument, ok bool)

GetInputMediaDocument returns InputMediaDocument and true boolean if SendMediaGroupMediaItem is InputMediaDocument.

func (SendMediaGroupMediaItem) GetInputMediaPhoto

func (s SendMediaGroupMediaItem) GetInputMediaPhoto() (v InputMediaPhoto, ok bool)

GetInputMediaPhoto returns InputMediaPhoto and true boolean if SendMediaGroupMediaItem is InputMediaPhoto.

func (SendMediaGroupMediaItem) GetInputMediaVideo

func (s SendMediaGroupMediaItem) GetInputMediaVideo() (v InputMediaVideo, ok bool)

GetInputMediaVideo returns InputMediaVideo and true boolean if SendMediaGroupMediaItem is InputMediaVideo.

func (SendMediaGroupMediaItem) IsInputMediaAudio

func (s SendMediaGroupMediaItem) IsInputMediaAudio() bool

IsInputMediaAudio reports whether SendMediaGroupMediaItem is InputMediaAudio.

func (SendMediaGroupMediaItem) IsInputMediaDocument

func (s SendMediaGroupMediaItem) IsInputMediaDocument() bool

IsInputMediaDocument reports whether SendMediaGroupMediaItem is InputMediaDocument.

func (SendMediaGroupMediaItem) IsInputMediaPhoto

func (s SendMediaGroupMediaItem) IsInputMediaPhoto() bool

IsInputMediaPhoto reports whether SendMediaGroupMediaItem is InputMediaPhoto.

func (SendMediaGroupMediaItem) IsInputMediaVideo

func (s SendMediaGroupMediaItem) IsInputMediaVideo() bool

IsInputMediaVideo reports whether SendMediaGroupMediaItem is InputMediaVideo.

func (SendMediaGroupMediaItem) MarshalJSON

func (s SendMediaGroupMediaItem) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SendMediaGroupMediaItem) SetInputMediaAudio

func (s *SendMediaGroupMediaItem) SetInputMediaAudio(v InputMediaAudio)

SetInputMediaAudio sets SendMediaGroupMediaItem to InputMediaAudio.

func (*SendMediaGroupMediaItem) SetInputMediaDocument

func (s *SendMediaGroupMediaItem) SetInputMediaDocument(v InputMediaDocument)

SetInputMediaDocument sets SendMediaGroupMediaItem to InputMediaDocument.

func (*SendMediaGroupMediaItem) SetInputMediaPhoto

func (s *SendMediaGroupMediaItem) SetInputMediaPhoto(v InputMediaPhoto)

SetInputMediaPhoto sets SendMediaGroupMediaItem to InputMediaPhoto.

func (*SendMediaGroupMediaItem) SetInputMediaVideo

func (s *SendMediaGroupMediaItem) SetInputMediaVideo(v InputMediaVideo)

SetInputMediaVideo sets SendMediaGroupMediaItem to InputMediaVideo.

func (*SendMediaGroupMediaItem) UnmarshalJSON

func (s *SendMediaGroupMediaItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (SendMediaGroupMediaItem) Validate

func (s SendMediaGroupMediaItem) Validate() error

type SendMediaGroupMediaItemType

type SendMediaGroupMediaItemType string

SendMediaGroupMediaItemType is oneOf type of SendMediaGroupMediaItem.

const (
	InputMediaAudioSendMediaGroupMediaItem    SendMediaGroupMediaItemType = "InputMediaAudio"
	InputMediaDocumentSendMediaGroupMediaItem SendMediaGroupMediaItemType = "InputMediaDocument"
	InputMediaPhotoSendMediaGroupMediaItem    SendMediaGroupMediaItemType = "InputMediaPhoto"
	InputMediaVideoSendMediaGroupMediaItem    SendMediaGroupMediaItemType = "InputMediaVideo"
)

Possible values for SendMediaGroupMediaItemType.

type SendMessage

type SendMessage struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.
	MessageThreadID OptInt `json:"message_thread_id"`
	// Text of the message to be sent, 1-4096 characters after entities parsing.
	Text string `json:"text"`
	// Mode for parsing entities in the message text. See [formatting options](https://core.telegram.
	// org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// A JSON-serialized list of special entities that appear in message text, which can be specified
	// instead of _parse_mode_.
	Entities []MessageEntity `json:"entities"`
	// Disables link previews for links in this message.
	DisableWebPagePreview OptBool `json:"disable_web_page_preview"`
	// Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will
	// receive a notification with no sound.
	DisableNotification OptBool `json:"disable_notification"`
	// Protects the contents of the sent message from forwarding and saving.
	ProtectContent OptBool `json:"protect_content"`
	// If the message is a reply, ID of the original message.
	ReplyToMessageID OptInt `json:"reply_to_message_id"`
	// Pass _True_ if the message should be sent even if the specified replied-to message is not found.
	AllowSendingWithoutReply OptBool            `json:"allow_sending_without_reply"`
	ReplyMarkup              OptSendReplyMarkup `json:"reply_markup"`
}

Input for sendMessage. Ref: #/components/schemas/sendMessage

func (*SendMessage) Decode

func (s *SendMessage) Decode(d *jx.Decoder) error

Decode decodes SendMessage from json.

func (*SendMessage) Encode

func (s *SendMessage) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SendMessage) GetAllowSendingWithoutReply

func (s *SendMessage) GetAllowSendingWithoutReply() OptBool

GetAllowSendingWithoutReply returns the value of AllowSendingWithoutReply.

func (*SendMessage) GetChatID

func (s *SendMessage) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SendMessage) GetDisableNotification

func (s *SendMessage) GetDisableNotification() OptBool

GetDisableNotification returns the value of DisableNotification.

func (*SendMessage) GetDisableWebPagePreview

func (s *SendMessage) GetDisableWebPagePreview() OptBool

GetDisableWebPagePreview returns the value of DisableWebPagePreview.

func (*SendMessage) GetEntities

func (s *SendMessage) GetEntities() []MessageEntity

GetEntities returns the value of Entities.

func (*SendMessage) GetMessageThreadID

func (s *SendMessage) GetMessageThreadID() OptInt

GetMessageThreadID returns the value of MessageThreadID.

func (*SendMessage) GetParseMode

func (s *SendMessage) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*SendMessage) GetProtectContent

func (s *SendMessage) GetProtectContent() OptBool

GetProtectContent returns the value of ProtectContent.

func (*SendMessage) GetReplyMarkup

func (s *SendMessage) GetReplyMarkup() OptSendReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*SendMessage) GetReplyToMessageID

func (s *SendMessage) GetReplyToMessageID() OptInt

GetReplyToMessageID returns the value of ReplyToMessageID.

func (*SendMessage) GetText

func (s *SendMessage) GetText() string

GetText returns the value of Text.

func (*SendMessage) MarshalJSON

func (s *SendMessage) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SendMessage) SetAllowSendingWithoutReply

func (s *SendMessage) SetAllowSendingWithoutReply(val OptBool)

SetAllowSendingWithoutReply sets the value of AllowSendingWithoutReply.

func (*SendMessage) SetChatID

func (s *SendMessage) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SendMessage) SetDisableNotification

func (s *SendMessage) SetDisableNotification(val OptBool)

SetDisableNotification sets the value of DisableNotification.

func (*SendMessage) SetDisableWebPagePreview

func (s *SendMessage) SetDisableWebPagePreview(val OptBool)

SetDisableWebPagePreview sets the value of DisableWebPagePreview.

func (*SendMessage) SetEntities

func (s *SendMessage) SetEntities(val []MessageEntity)

SetEntities sets the value of Entities.

func (*SendMessage) SetMessageThreadID

func (s *SendMessage) SetMessageThreadID(val OptInt)

SetMessageThreadID sets the value of MessageThreadID.

func (*SendMessage) SetParseMode

func (s *SendMessage) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*SendMessage) SetProtectContent

func (s *SendMessage) SetProtectContent(val OptBool)

SetProtectContent sets the value of ProtectContent.

func (*SendMessage) SetReplyMarkup

func (s *SendMessage) SetReplyMarkup(val OptSendReplyMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*SendMessage) SetReplyToMessageID

func (s *SendMessage) SetReplyToMessageID(val OptInt)

SetReplyToMessageID sets the value of ReplyToMessageID.

func (*SendMessage) SetText

func (s *SendMessage) SetText(val string)

SetText sets the value of Text.

func (*SendMessage) UnmarshalJSON

func (s *SendMessage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SendMessage) Validate

func (s *SendMessage) Validate() error

type SendPhoto

type SendPhoto struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.
	MessageThreadID OptInt `json:"message_thread_id"`
	// Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers
	// (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or
	// upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's
	// width and height must not exceed 10000 in total. Width and height ratio must be at most 20. [More
	// information on Sending Files](https://core.telegram.org/bots/api#sending-files).
	Photo string `json:"photo"`
	// Photo caption (may also be used when resending photos by _file_id_), 0-1024 characters after
	// entities parsing.
	Caption OptString `json:"caption"`
	// Mode for parsing entities in the photo caption. See [formatting options](https://core.telegram.
	// org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// A JSON-serialized list of special entities that appear in the caption, which can be specified
	// instead of _parse_mode_.
	CaptionEntities []MessageEntity `json:"caption_entities"`
	// Pass _True_ if the photo needs to be covered with a spoiler animation.
	HasSpoiler OptBool `json:"has_spoiler"`
	// Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will
	// receive a notification with no sound.
	DisableNotification OptBool `json:"disable_notification"`
	// Protects the contents of the sent message from forwarding and saving.
	ProtectContent OptBool `json:"protect_content"`
	// If the message is a reply, ID of the original message.
	ReplyToMessageID OptInt `json:"reply_to_message_id"`
	// Pass _True_ if the message should be sent even if the specified replied-to message is not found.
	AllowSendingWithoutReply OptBool            `json:"allow_sending_without_reply"`
	ReplyMarkup              OptSendReplyMarkup `json:"reply_markup"`
}

Input for sendPhoto. Ref: #/components/schemas/sendPhoto

func (*SendPhoto) Decode

func (s *SendPhoto) Decode(d *jx.Decoder) error

Decode decodes SendPhoto from json.

func (*SendPhoto) Encode

func (s *SendPhoto) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SendPhoto) GetAllowSendingWithoutReply

func (s *SendPhoto) GetAllowSendingWithoutReply() OptBool

GetAllowSendingWithoutReply returns the value of AllowSendingWithoutReply.

func (*SendPhoto) GetCaption

func (s *SendPhoto) GetCaption() OptString

GetCaption returns the value of Caption.

func (*SendPhoto) GetCaptionEntities

func (s *SendPhoto) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*SendPhoto) GetChatID

func (s *SendPhoto) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SendPhoto) GetDisableNotification

func (s *SendPhoto) GetDisableNotification() OptBool

GetDisableNotification returns the value of DisableNotification.

func (*SendPhoto) GetHasSpoiler

func (s *SendPhoto) GetHasSpoiler() OptBool

GetHasSpoiler returns the value of HasSpoiler.

func (*SendPhoto) GetMessageThreadID

func (s *SendPhoto) GetMessageThreadID() OptInt

GetMessageThreadID returns the value of MessageThreadID.

func (*SendPhoto) GetParseMode

func (s *SendPhoto) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*SendPhoto) GetPhoto

func (s *SendPhoto) GetPhoto() string

GetPhoto returns the value of Photo.

func (*SendPhoto) GetProtectContent

func (s *SendPhoto) GetProtectContent() OptBool

GetProtectContent returns the value of ProtectContent.

func (*SendPhoto) GetReplyMarkup

func (s *SendPhoto) GetReplyMarkup() OptSendReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*SendPhoto) GetReplyToMessageID

func (s *SendPhoto) GetReplyToMessageID() OptInt

GetReplyToMessageID returns the value of ReplyToMessageID.

func (*SendPhoto) MarshalJSON

func (s *SendPhoto) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SendPhoto) SetAllowSendingWithoutReply

func (s *SendPhoto) SetAllowSendingWithoutReply(val OptBool)

SetAllowSendingWithoutReply sets the value of AllowSendingWithoutReply.

func (*SendPhoto) SetCaption

func (s *SendPhoto) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*SendPhoto) SetCaptionEntities

func (s *SendPhoto) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*SendPhoto) SetChatID

func (s *SendPhoto) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SendPhoto) SetDisableNotification

func (s *SendPhoto) SetDisableNotification(val OptBool)

SetDisableNotification sets the value of DisableNotification.

func (*SendPhoto) SetHasSpoiler

func (s *SendPhoto) SetHasSpoiler(val OptBool)

SetHasSpoiler sets the value of HasSpoiler.

func (*SendPhoto) SetMessageThreadID

func (s *SendPhoto) SetMessageThreadID(val OptInt)

SetMessageThreadID sets the value of MessageThreadID.

func (*SendPhoto) SetParseMode

func (s *SendPhoto) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*SendPhoto) SetPhoto

func (s *SendPhoto) SetPhoto(val string)

SetPhoto sets the value of Photo.

func (*SendPhoto) SetProtectContent

func (s *SendPhoto) SetProtectContent(val OptBool)

SetProtectContent sets the value of ProtectContent.

func (*SendPhoto) SetReplyMarkup

func (s *SendPhoto) SetReplyMarkup(val OptSendReplyMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*SendPhoto) SetReplyToMessageID

func (s *SendPhoto) SetReplyToMessageID(val OptInt)

SetReplyToMessageID sets the value of ReplyToMessageID.

func (*SendPhoto) UnmarshalJSON

func (s *SendPhoto) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SendPhoto) Validate

func (s *SendPhoto) Validate() error

type SendPoll

type SendPoll struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.
	MessageThreadID OptInt `json:"message_thread_id"`
	// Poll question, 1-300 characters.
	Question string `json:"question"`
	// A JSON-serialized list of answer options, 2-10 strings 1-100 characters each.
	Options []string `json:"options"`
	// _True_, if the poll needs to be anonymous, defaults to _True_.
	IsAnonymous OptBool `json:"is_anonymous"`
	// Poll type, `quiz` or `regular`, defaults to `regular`.
	Type OptString `json:"type"`
	// _True_, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to _False_.
	AllowsMultipleAnswers OptBool `json:"allows_multiple_answers"`
	// 0-based identifier of the correct answer option, required for polls in quiz mode.
	CorrectOptionID OptInt `json:"correct_option_id"`
	// Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a
	// quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing.
	Explanation OptString `json:"explanation"`
	// Mode for parsing entities in the explanation. See [formatting options](https://core.telegram.
	// org/bots/api#formatting-options) for more details.
	ExplanationParseMode OptString `json:"explanation_parse_mode"`
	// A JSON-serialized list of special entities that appear in the poll explanation, which can be
	// specified instead of _parse_mode_.
	ExplanationEntities []MessageEntity `json:"explanation_entities"`
	// Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together
	// with _close_date_.
	OpenPeriod OptInt `json:"open_period"`
	// Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and
	// no more than 600 seconds in the future. Can't be used together with _open_period_.
	CloseDate OptInt `json:"close_date"`
	// Pass _True_ if the poll needs to be immediately closed. This can be useful for poll preview.
	IsClosed OptBool `json:"is_closed"`
	// Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will
	// receive a notification with no sound.
	DisableNotification OptBool `json:"disable_notification"`
	// Protects the contents of the sent message from forwarding and saving.
	ProtectContent OptBool `json:"protect_content"`
	// If the message is a reply, ID of the original message.
	ReplyToMessageID OptInt `json:"reply_to_message_id"`
	// Pass _True_ if the message should be sent even if the specified replied-to message is not found.
	AllowSendingWithoutReply OptBool            `json:"allow_sending_without_reply"`
	ReplyMarkup              OptSendReplyMarkup `json:"reply_markup"`
}

Input for sendPoll. Ref: #/components/schemas/sendPoll

func (*SendPoll) Decode

func (s *SendPoll) Decode(d *jx.Decoder) error

Decode decodes SendPoll from json.

func (*SendPoll) Encode

func (s *SendPoll) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SendPoll) GetAllowSendingWithoutReply

func (s *SendPoll) GetAllowSendingWithoutReply() OptBool

GetAllowSendingWithoutReply returns the value of AllowSendingWithoutReply.

func (*SendPoll) GetAllowsMultipleAnswers

func (s *SendPoll) GetAllowsMultipleAnswers() OptBool

GetAllowsMultipleAnswers returns the value of AllowsMultipleAnswers.

func (*SendPoll) GetChatID

func (s *SendPoll) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SendPoll) GetCloseDate

func (s *SendPoll) GetCloseDate() OptInt

GetCloseDate returns the value of CloseDate.

func (*SendPoll) GetCorrectOptionID

func (s *SendPoll) GetCorrectOptionID() OptInt

GetCorrectOptionID returns the value of CorrectOptionID.

func (*SendPoll) GetDisableNotification

func (s *SendPoll) GetDisableNotification() OptBool

GetDisableNotification returns the value of DisableNotification.

func (*SendPoll) GetExplanation

func (s *SendPoll) GetExplanation() OptString

GetExplanation returns the value of Explanation.

func (*SendPoll) GetExplanationEntities

func (s *SendPoll) GetExplanationEntities() []MessageEntity

GetExplanationEntities returns the value of ExplanationEntities.

func (*SendPoll) GetExplanationParseMode

func (s *SendPoll) GetExplanationParseMode() OptString

GetExplanationParseMode returns the value of ExplanationParseMode.

func (*SendPoll) GetIsAnonymous

func (s *SendPoll) GetIsAnonymous() OptBool

GetIsAnonymous returns the value of IsAnonymous.

func (*SendPoll) GetIsClosed

func (s *SendPoll) GetIsClosed() OptBool

GetIsClosed returns the value of IsClosed.

func (*SendPoll) GetMessageThreadID

func (s *SendPoll) GetMessageThreadID() OptInt

GetMessageThreadID returns the value of MessageThreadID.

func (*SendPoll) GetOpenPeriod

func (s *SendPoll) GetOpenPeriod() OptInt

GetOpenPeriod returns the value of OpenPeriod.

func (*SendPoll) GetOptions

func (s *SendPoll) GetOptions() []string

GetOptions returns the value of Options.

func (*SendPoll) GetProtectContent

func (s *SendPoll) GetProtectContent() OptBool

GetProtectContent returns the value of ProtectContent.

func (*SendPoll) GetQuestion

func (s *SendPoll) GetQuestion() string

GetQuestion returns the value of Question.

func (*SendPoll) GetReplyMarkup

func (s *SendPoll) GetReplyMarkup() OptSendReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*SendPoll) GetReplyToMessageID

func (s *SendPoll) GetReplyToMessageID() OptInt

GetReplyToMessageID returns the value of ReplyToMessageID.

func (*SendPoll) GetType

func (s *SendPoll) GetType() OptString

GetType returns the value of Type.

func (*SendPoll) MarshalJSON

func (s *SendPoll) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SendPoll) SetAllowSendingWithoutReply

func (s *SendPoll) SetAllowSendingWithoutReply(val OptBool)

SetAllowSendingWithoutReply sets the value of AllowSendingWithoutReply.

func (*SendPoll) SetAllowsMultipleAnswers

func (s *SendPoll) SetAllowsMultipleAnswers(val OptBool)

SetAllowsMultipleAnswers sets the value of AllowsMultipleAnswers.

func (*SendPoll) SetChatID

func (s *SendPoll) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SendPoll) SetCloseDate

func (s *SendPoll) SetCloseDate(val OptInt)

SetCloseDate sets the value of CloseDate.

func (*SendPoll) SetCorrectOptionID

func (s *SendPoll) SetCorrectOptionID(val OptInt)

SetCorrectOptionID sets the value of CorrectOptionID.

func (*SendPoll) SetDisableNotification

func (s *SendPoll) SetDisableNotification(val OptBool)

SetDisableNotification sets the value of DisableNotification.

func (*SendPoll) SetExplanation

func (s *SendPoll) SetExplanation(val OptString)

SetExplanation sets the value of Explanation.

func (*SendPoll) SetExplanationEntities

func (s *SendPoll) SetExplanationEntities(val []MessageEntity)

SetExplanationEntities sets the value of ExplanationEntities.

func (*SendPoll) SetExplanationParseMode

func (s *SendPoll) SetExplanationParseMode(val OptString)

SetExplanationParseMode sets the value of ExplanationParseMode.

func (*SendPoll) SetIsAnonymous

func (s *SendPoll) SetIsAnonymous(val OptBool)

SetIsAnonymous sets the value of IsAnonymous.

func (*SendPoll) SetIsClosed

func (s *SendPoll) SetIsClosed(val OptBool)

SetIsClosed sets the value of IsClosed.

func (*SendPoll) SetMessageThreadID

func (s *SendPoll) SetMessageThreadID(val OptInt)

SetMessageThreadID sets the value of MessageThreadID.

func (*SendPoll) SetOpenPeriod

func (s *SendPoll) SetOpenPeriod(val OptInt)

SetOpenPeriod sets the value of OpenPeriod.

func (*SendPoll) SetOptions

func (s *SendPoll) SetOptions(val []string)

SetOptions sets the value of Options.

func (*SendPoll) SetProtectContent

func (s *SendPoll) SetProtectContent(val OptBool)

SetProtectContent sets the value of ProtectContent.

func (*SendPoll) SetQuestion

func (s *SendPoll) SetQuestion(val string)

SetQuestion sets the value of Question.

func (*SendPoll) SetReplyMarkup

func (s *SendPoll) SetReplyMarkup(val OptSendReplyMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*SendPoll) SetReplyToMessageID

func (s *SendPoll) SetReplyToMessageID(val OptInt)

SetReplyToMessageID sets the value of ReplyToMessageID.

func (*SendPoll) SetType

func (s *SendPoll) SetType(val OptString)

SetType sets the value of Type.

func (*SendPoll) UnmarshalJSON

func (s *SendPoll) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SendPoll) Validate

func (s *SendPoll) Validate() error

type SendReplyMarkup

type SendReplyMarkup struct {
	Type                 SendReplyMarkupType // switch on this field
	InlineKeyboardMarkup InlineKeyboardMarkup
	ReplyKeyboardMarkup  ReplyKeyboardMarkup
	ReplyKeyboardRemove  ReplyKeyboardRemove
	ForceReply           ForceReply
}

Ref: #/components/schemas/SendReplyMarkup SendReplyMarkup represents sum type.

func NewForceReplySendReplyMarkup

func NewForceReplySendReplyMarkup(v ForceReply) SendReplyMarkup

NewForceReplySendReplyMarkup returns new SendReplyMarkup from ForceReply.

func NewInlineKeyboardMarkupSendReplyMarkup

func NewInlineKeyboardMarkupSendReplyMarkup(v InlineKeyboardMarkup) SendReplyMarkup

NewInlineKeyboardMarkupSendReplyMarkup returns new SendReplyMarkup from InlineKeyboardMarkup.

func NewReplyKeyboardMarkupSendReplyMarkup

func NewReplyKeyboardMarkupSendReplyMarkup(v ReplyKeyboardMarkup) SendReplyMarkup

NewReplyKeyboardMarkupSendReplyMarkup returns new SendReplyMarkup from ReplyKeyboardMarkup.

func NewReplyKeyboardRemoveSendReplyMarkup

func NewReplyKeyboardRemoveSendReplyMarkup(v ReplyKeyboardRemove) SendReplyMarkup

NewReplyKeyboardRemoveSendReplyMarkup returns new SendReplyMarkup from ReplyKeyboardRemove.

func (*SendReplyMarkup) Decode

func (s *SendReplyMarkup) Decode(d *jx.Decoder) error

Decode decodes SendReplyMarkup from json.

func (SendReplyMarkup) Encode

func (s SendReplyMarkup) Encode(e *jx.Encoder)

Encode encodes SendReplyMarkup as json.

func (SendReplyMarkup) GetForceReply

func (s SendReplyMarkup) GetForceReply() (v ForceReply, ok bool)

GetForceReply returns ForceReply and true boolean if SendReplyMarkup is ForceReply.

func (SendReplyMarkup) GetInlineKeyboardMarkup

func (s SendReplyMarkup) GetInlineKeyboardMarkup() (v InlineKeyboardMarkup, ok bool)

GetInlineKeyboardMarkup returns InlineKeyboardMarkup and true boolean if SendReplyMarkup is InlineKeyboardMarkup.

func (SendReplyMarkup) GetReplyKeyboardMarkup

func (s SendReplyMarkup) GetReplyKeyboardMarkup() (v ReplyKeyboardMarkup, ok bool)

GetReplyKeyboardMarkup returns ReplyKeyboardMarkup and true boolean if SendReplyMarkup is ReplyKeyboardMarkup.

func (SendReplyMarkup) GetReplyKeyboardRemove

func (s SendReplyMarkup) GetReplyKeyboardRemove() (v ReplyKeyboardRemove, ok bool)

GetReplyKeyboardRemove returns ReplyKeyboardRemove and true boolean if SendReplyMarkup is ReplyKeyboardRemove.

func (SendReplyMarkup) IsForceReply

func (s SendReplyMarkup) IsForceReply() bool

IsForceReply reports whether SendReplyMarkup is ForceReply.

func (SendReplyMarkup) IsInlineKeyboardMarkup

func (s SendReplyMarkup) IsInlineKeyboardMarkup() bool

IsInlineKeyboardMarkup reports whether SendReplyMarkup is InlineKeyboardMarkup.

func (SendReplyMarkup) IsReplyKeyboardMarkup

func (s SendReplyMarkup) IsReplyKeyboardMarkup() bool

IsReplyKeyboardMarkup reports whether SendReplyMarkup is ReplyKeyboardMarkup.

func (SendReplyMarkup) IsReplyKeyboardRemove

func (s SendReplyMarkup) IsReplyKeyboardRemove() bool

IsReplyKeyboardRemove reports whether SendReplyMarkup is ReplyKeyboardRemove.

func (SendReplyMarkup) MarshalJSON

func (s SendReplyMarkup) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SendReplyMarkup) SetForceReply

func (s *SendReplyMarkup) SetForceReply(v ForceReply)

SetForceReply sets SendReplyMarkup to ForceReply.

func (*SendReplyMarkup) SetInlineKeyboardMarkup

func (s *SendReplyMarkup) SetInlineKeyboardMarkup(v InlineKeyboardMarkup)

SetInlineKeyboardMarkup sets SendReplyMarkup to InlineKeyboardMarkup.

func (*SendReplyMarkup) SetReplyKeyboardMarkup

func (s *SendReplyMarkup) SetReplyKeyboardMarkup(v ReplyKeyboardMarkup)

SetReplyKeyboardMarkup sets SendReplyMarkup to ReplyKeyboardMarkup.

func (*SendReplyMarkup) SetReplyKeyboardRemove

func (s *SendReplyMarkup) SetReplyKeyboardRemove(v ReplyKeyboardRemove)

SetReplyKeyboardRemove sets SendReplyMarkup to ReplyKeyboardRemove.

func (*SendReplyMarkup) UnmarshalJSON

func (s *SendReplyMarkup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (SendReplyMarkup) Validate

func (s SendReplyMarkup) Validate() error

type SendReplyMarkupType

type SendReplyMarkupType string

SendReplyMarkupType is oneOf type of SendReplyMarkup.

const (
	InlineKeyboardMarkupSendReplyMarkup SendReplyMarkupType = "InlineKeyboardMarkup"
	ReplyKeyboardMarkupSendReplyMarkup  SendReplyMarkupType = "ReplyKeyboardMarkup"
	ReplyKeyboardRemoveSendReplyMarkup  SendReplyMarkupType = "ReplyKeyboardRemove"
	ForceReplySendReplyMarkup           SendReplyMarkupType = "ForceReply"
)

Possible values for SendReplyMarkupType.

type SendSticker

type SendSticker struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.
	MessageThreadID OptInt `json:"message_thread_id"`
	// Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers
	// (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet,
	// or upload a new .WEBP or .TGS sticker using multipart/form-data. [More information on Sending
	// Files](https://core.telegram.org/bots/api#sending-files). Video stickers can only be sent by a
	// file_id. Animated stickers can't be sent via an HTTP URL.
	Sticker string `json:"sticker"`
	// Emoji associated with the sticker; only for just uploaded stickers.
	Emoji OptString `json:"emoji"`
	// Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will
	// receive a notification with no sound.
	DisableNotification OptBool `json:"disable_notification"`
	// Protects the contents of the sent message from forwarding and saving.
	ProtectContent OptBool `json:"protect_content"`
	// If the message is a reply, ID of the original message.
	ReplyToMessageID OptInt `json:"reply_to_message_id"`
	// Pass _True_ if the message should be sent even if the specified replied-to message is not found.
	AllowSendingWithoutReply OptBool            `json:"allow_sending_without_reply"`
	ReplyMarkup              OptSendReplyMarkup `json:"reply_markup"`
}

Input for sendSticker. Ref: #/components/schemas/sendSticker

func (*SendSticker) Decode

func (s *SendSticker) Decode(d *jx.Decoder) error

Decode decodes SendSticker from json.

func (*SendSticker) Encode

func (s *SendSticker) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SendSticker) GetAllowSendingWithoutReply

func (s *SendSticker) GetAllowSendingWithoutReply() OptBool

GetAllowSendingWithoutReply returns the value of AllowSendingWithoutReply.

func (*SendSticker) GetChatID

func (s *SendSticker) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SendSticker) GetDisableNotification

func (s *SendSticker) GetDisableNotification() OptBool

GetDisableNotification returns the value of DisableNotification.

func (*SendSticker) GetEmoji

func (s *SendSticker) GetEmoji() OptString

GetEmoji returns the value of Emoji.

func (*SendSticker) GetMessageThreadID

func (s *SendSticker) GetMessageThreadID() OptInt

GetMessageThreadID returns the value of MessageThreadID.

func (*SendSticker) GetProtectContent

func (s *SendSticker) GetProtectContent() OptBool

GetProtectContent returns the value of ProtectContent.

func (*SendSticker) GetReplyMarkup

func (s *SendSticker) GetReplyMarkup() OptSendReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*SendSticker) GetReplyToMessageID

func (s *SendSticker) GetReplyToMessageID() OptInt

GetReplyToMessageID returns the value of ReplyToMessageID.

func (*SendSticker) GetSticker

func (s *SendSticker) GetSticker() string

GetSticker returns the value of Sticker.

func (*SendSticker) MarshalJSON

func (s *SendSticker) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SendSticker) SetAllowSendingWithoutReply

func (s *SendSticker) SetAllowSendingWithoutReply(val OptBool)

SetAllowSendingWithoutReply sets the value of AllowSendingWithoutReply.

func (*SendSticker) SetChatID

func (s *SendSticker) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SendSticker) SetDisableNotification

func (s *SendSticker) SetDisableNotification(val OptBool)

SetDisableNotification sets the value of DisableNotification.

func (*SendSticker) SetEmoji

func (s *SendSticker) SetEmoji(val OptString)

SetEmoji sets the value of Emoji.

func (*SendSticker) SetMessageThreadID

func (s *SendSticker) SetMessageThreadID(val OptInt)

SetMessageThreadID sets the value of MessageThreadID.

func (*SendSticker) SetProtectContent

func (s *SendSticker) SetProtectContent(val OptBool)

SetProtectContent sets the value of ProtectContent.

func (*SendSticker) SetReplyMarkup

func (s *SendSticker) SetReplyMarkup(val OptSendReplyMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*SendSticker) SetReplyToMessageID

func (s *SendSticker) SetReplyToMessageID(val OptInt)

SetReplyToMessageID sets the value of ReplyToMessageID.

func (*SendSticker) SetSticker

func (s *SendSticker) SetSticker(val string)

SetSticker sets the value of Sticker.

func (*SendSticker) UnmarshalJSON

func (s *SendSticker) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SendSticker) Validate

func (s *SendSticker) Validate() error

type SendVenue

type SendVenue struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.
	MessageThreadID OptInt `json:"message_thread_id"`
	// Latitude of the venue.
	Latitude float64 `json:"latitude"`
	// Longitude of the venue.
	Longitude float64 `json:"longitude"`
	// Name of the venue.
	Title string `json:"title"`
	// Address of the venue.
	Address string `json:"address"`
	// Foursquare identifier of the venue.
	FoursquareID OptString `json:"foursquare_id"`
	// Foursquare type of the venue, if known. (For example, `arts_entertainment/default`,
	// `arts_entertainment/aquarium` or `food/icecream`.).
	FoursquareType OptString `json:"foursquare_type"`
	// Google Places identifier of the venue.
	GooglePlaceID OptString `json:"google_place_id"`
	// Google Places type of the venue. (See [supported types](https://developers.google.
	// com/places/web-service/supported_types).).
	GooglePlaceType OptString `json:"google_place_type"`
	// Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will
	// receive a notification with no sound.
	DisableNotification OptBool `json:"disable_notification"`
	// Protects the contents of the sent message from forwarding and saving.
	ProtectContent OptBool `json:"protect_content"`
	// If the message is a reply, ID of the original message.
	ReplyToMessageID OptInt `json:"reply_to_message_id"`
	// Pass _True_ if the message should be sent even if the specified replied-to message is not found.
	AllowSendingWithoutReply OptBool            `json:"allow_sending_without_reply"`
	ReplyMarkup              OptSendReplyMarkup `json:"reply_markup"`
}

Input for sendVenue. Ref: #/components/schemas/sendVenue

func (*SendVenue) Decode

func (s *SendVenue) Decode(d *jx.Decoder) error

Decode decodes SendVenue from json.

func (*SendVenue) Encode

func (s *SendVenue) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SendVenue) GetAddress

func (s *SendVenue) GetAddress() string

GetAddress returns the value of Address.

func (*SendVenue) GetAllowSendingWithoutReply

func (s *SendVenue) GetAllowSendingWithoutReply() OptBool

GetAllowSendingWithoutReply returns the value of AllowSendingWithoutReply.

func (*SendVenue) GetChatID

func (s *SendVenue) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SendVenue) GetDisableNotification

func (s *SendVenue) GetDisableNotification() OptBool

GetDisableNotification returns the value of DisableNotification.

func (*SendVenue) GetFoursquareID

func (s *SendVenue) GetFoursquareID() OptString

GetFoursquareID returns the value of FoursquareID.

func (*SendVenue) GetFoursquareType

func (s *SendVenue) GetFoursquareType() OptString

GetFoursquareType returns the value of FoursquareType.

func (*SendVenue) GetGooglePlaceID

func (s *SendVenue) GetGooglePlaceID() OptString

GetGooglePlaceID returns the value of GooglePlaceID.

func (*SendVenue) GetGooglePlaceType

func (s *SendVenue) GetGooglePlaceType() OptString

GetGooglePlaceType returns the value of GooglePlaceType.

func (*SendVenue) GetLatitude

func (s *SendVenue) GetLatitude() float64

GetLatitude returns the value of Latitude.

func (*SendVenue) GetLongitude

func (s *SendVenue) GetLongitude() float64

GetLongitude returns the value of Longitude.

func (*SendVenue) GetMessageThreadID

func (s *SendVenue) GetMessageThreadID() OptInt

GetMessageThreadID returns the value of MessageThreadID.

func (*SendVenue) GetProtectContent

func (s *SendVenue) GetProtectContent() OptBool

GetProtectContent returns the value of ProtectContent.

func (*SendVenue) GetReplyMarkup

func (s *SendVenue) GetReplyMarkup() OptSendReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*SendVenue) GetReplyToMessageID

func (s *SendVenue) GetReplyToMessageID() OptInt

GetReplyToMessageID returns the value of ReplyToMessageID.

func (*SendVenue) GetTitle

func (s *SendVenue) GetTitle() string

GetTitle returns the value of Title.

func (*SendVenue) MarshalJSON

func (s *SendVenue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SendVenue) SetAddress

func (s *SendVenue) SetAddress(val string)

SetAddress sets the value of Address.

func (*SendVenue) SetAllowSendingWithoutReply

func (s *SendVenue) SetAllowSendingWithoutReply(val OptBool)

SetAllowSendingWithoutReply sets the value of AllowSendingWithoutReply.

func (*SendVenue) SetChatID

func (s *SendVenue) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SendVenue) SetDisableNotification

func (s *SendVenue) SetDisableNotification(val OptBool)

SetDisableNotification sets the value of DisableNotification.

func (*SendVenue) SetFoursquareID

func (s *SendVenue) SetFoursquareID(val OptString)

SetFoursquareID sets the value of FoursquareID.

func (*SendVenue) SetFoursquareType

func (s *SendVenue) SetFoursquareType(val OptString)

SetFoursquareType sets the value of FoursquareType.

func (*SendVenue) SetGooglePlaceID

func (s *SendVenue) SetGooglePlaceID(val OptString)

SetGooglePlaceID sets the value of GooglePlaceID.

func (*SendVenue) SetGooglePlaceType

func (s *SendVenue) SetGooglePlaceType(val OptString)

SetGooglePlaceType sets the value of GooglePlaceType.

func (*SendVenue) SetLatitude

func (s *SendVenue) SetLatitude(val float64)

SetLatitude sets the value of Latitude.

func (*SendVenue) SetLongitude

func (s *SendVenue) SetLongitude(val float64)

SetLongitude sets the value of Longitude.

func (*SendVenue) SetMessageThreadID

func (s *SendVenue) SetMessageThreadID(val OptInt)

SetMessageThreadID sets the value of MessageThreadID.

func (*SendVenue) SetProtectContent

func (s *SendVenue) SetProtectContent(val OptBool)

SetProtectContent sets the value of ProtectContent.

func (*SendVenue) SetReplyMarkup

func (s *SendVenue) SetReplyMarkup(val OptSendReplyMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*SendVenue) SetReplyToMessageID

func (s *SendVenue) SetReplyToMessageID(val OptInt)

SetReplyToMessageID sets the value of ReplyToMessageID.

func (*SendVenue) SetTitle

func (s *SendVenue) SetTitle(val string)

SetTitle sets the value of Title.

func (*SendVenue) UnmarshalJSON

func (s *SendVenue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SendVenue) Validate

func (s *SendVenue) Validate() error

type SendVideo

type SendVideo struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.
	MessageThreadID OptInt `json:"message_thread_id"`
	// Video to send. Pass a file_id as String to send a video that exists on the Telegram servers
	// (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or
	// upload a new video using multipart/form-data. [More information on Sending Files](https://core.
	// telegram.org/bots/api#sending-files).
	Video string `json:"video"`
	// Duration of sent video in seconds.
	Duration OptInt `json:"duration"`
	// Video width.
	Width OptInt `json:"width"`
	// Video height.
	Height OptInt `json:"height"`
	// Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported
	// server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's
	// width and height should not exceed 320. Ignored if the file is not uploaded using
	// multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can
	// pass `attach://<file_attach_name>` if the thumbnail was uploaded using multipart/form-data under
	// <file_attach_name>. [More information on Sending Files](https://core.telegram.
	// org/bots/api#sending-files).
	Thumbnail OptString `json:"thumbnail"`
	// Video caption (may also be used when resending videos by _file_id_), 0-1024 characters after
	// entities parsing.
	Caption OptString `json:"caption"`
	// Mode for parsing entities in the video caption. See [formatting options](https://core.telegram.
	// org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// A JSON-serialized list of special entities that appear in the caption, which can be specified
	// instead of _parse_mode_.
	CaptionEntities []MessageEntity `json:"caption_entities"`
	// Pass _True_ if the video needs to be covered with a spoiler animation.
	HasSpoiler OptBool `json:"has_spoiler"`
	// Pass _True_ if the uploaded video is suitable for streaming.
	SupportsStreaming OptBool `json:"supports_streaming"`
	// Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will
	// receive a notification with no sound.
	DisableNotification OptBool `json:"disable_notification"`
	// Protects the contents of the sent message from forwarding and saving.
	ProtectContent OptBool `json:"protect_content"`
	// If the message is a reply, ID of the original message.
	ReplyToMessageID OptInt `json:"reply_to_message_id"`
	// Pass _True_ if the message should be sent even if the specified replied-to message is not found.
	AllowSendingWithoutReply OptBool            `json:"allow_sending_without_reply"`
	ReplyMarkup              OptSendReplyMarkup `json:"reply_markup"`
}

Input for sendVideo. Ref: #/components/schemas/sendVideo

func (*SendVideo) Decode

func (s *SendVideo) Decode(d *jx.Decoder) error

Decode decodes SendVideo from json.

func (*SendVideo) Encode

func (s *SendVideo) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SendVideo) GetAllowSendingWithoutReply

func (s *SendVideo) GetAllowSendingWithoutReply() OptBool

GetAllowSendingWithoutReply returns the value of AllowSendingWithoutReply.

func (*SendVideo) GetCaption

func (s *SendVideo) GetCaption() OptString

GetCaption returns the value of Caption.

func (*SendVideo) GetCaptionEntities

func (s *SendVideo) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*SendVideo) GetChatID

func (s *SendVideo) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SendVideo) GetDisableNotification

func (s *SendVideo) GetDisableNotification() OptBool

GetDisableNotification returns the value of DisableNotification.

func (*SendVideo) GetDuration

func (s *SendVideo) GetDuration() OptInt

GetDuration returns the value of Duration.

func (*SendVideo) GetHasSpoiler

func (s *SendVideo) GetHasSpoiler() OptBool

GetHasSpoiler returns the value of HasSpoiler.

func (*SendVideo) GetHeight

func (s *SendVideo) GetHeight() OptInt

GetHeight returns the value of Height.

func (*SendVideo) GetMessageThreadID

func (s *SendVideo) GetMessageThreadID() OptInt

GetMessageThreadID returns the value of MessageThreadID.

func (*SendVideo) GetParseMode

func (s *SendVideo) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*SendVideo) GetProtectContent

func (s *SendVideo) GetProtectContent() OptBool

GetProtectContent returns the value of ProtectContent.

func (*SendVideo) GetReplyMarkup

func (s *SendVideo) GetReplyMarkup() OptSendReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*SendVideo) GetReplyToMessageID

func (s *SendVideo) GetReplyToMessageID() OptInt

GetReplyToMessageID returns the value of ReplyToMessageID.

func (*SendVideo) GetSupportsStreaming

func (s *SendVideo) GetSupportsStreaming() OptBool

GetSupportsStreaming returns the value of SupportsStreaming.

func (*SendVideo) GetThumbnail

func (s *SendVideo) GetThumbnail() OptString

GetThumbnail returns the value of Thumbnail.

func (*SendVideo) GetVideo

func (s *SendVideo) GetVideo() string

GetVideo returns the value of Video.

func (*SendVideo) GetWidth

func (s *SendVideo) GetWidth() OptInt

GetWidth returns the value of Width.

func (*SendVideo) MarshalJSON

func (s *SendVideo) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SendVideo) SetAllowSendingWithoutReply

func (s *SendVideo) SetAllowSendingWithoutReply(val OptBool)

SetAllowSendingWithoutReply sets the value of AllowSendingWithoutReply.

func (*SendVideo) SetCaption

func (s *SendVideo) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*SendVideo) SetCaptionEntities

func (s *SendVideo) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*SendVideo) SetChatID

func (s *SendVideo) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SendVideo) SetDisableNotification

func (s *SendVideo) SetDisableNotification(val OptBool)

SetDisableNotification sets the value of DisableNotification.

func (*SendVideo) SetDuration

func (s *SendVideo) SetDuration(val OptInt)

SetDuration sets the value of Duration.

func (*SendVideo) SetHasSpoiler

func (s *SendVideo) SetHasSpoiler(val OptBool)

SetHasSpoiler sets the value of HasSpoiler.

func (*SendVideo) SetHeight

func (s *SendVideo) SetHeight(val OptInt)

SetHeight sets the value of Height.

func (*SendVideo) SetMessageThreadID

func (s *SendVideo) SetMessageThreadID(val OptInt)

SetMessageThreadID sets the value of MessageThreadID.

func (*SendVideo) SetParseMode

func (s *SendVideo) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*SendVideo) SetProtectContent

func (s *SendVideo) SetProtectContent(val OptBool)

SetProtectContent sets the value of ProtectContent.

func (*SendVideo) SetReplyMarkup

func (s *SendVideo) SetReplyMarkup(val OptSendReplyMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*SendVideo) SetReplyToMessageID

func (s *SendVideo) SetReplyToMessageID(val OptInt)

SetReplyToMessageID sets the value of ReplyToMessageID.

func (*SendVideo) SetSupportsStreaming

func (s *SendVideo) SetSupportsStreaming(val OptBool)

SetSupportsStreaming sets the value of SupportsStreaming.

func (*SendVideo) SetThumbnail

func (s *SendVideo) SetThumbnail(val OptString)

SetThumbnail sets the value of Thumbnail.

func (*SendVideo) SetVideo

func (s *SendVideo) SetVideo(val string)

SetVideo sets the value of Video.

func (*SendVideo) SetWidth

func (s *SendVideo) SetWidth(val OptInt)

SetWidth sets the value of Width.

func (*SendVideo) UnmarshalJSON

func (s *SendVideo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SendVideo) Validate

func (s *SendVideo) Validate() error

type SendVideoNote

type SendVideoNote struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.
	MessageThreadID OptInt `json:"message_thread_id"`
	// Video note to send. Pass a file_id as String to send a video note that exists on the Telegram
	// servers (recommended) or upload a new video using multipart/form-data. [More information on
	// Sending Files](https://core.telegram.org/bots/api#sending-files). Sending video notes by a URL is
	// currently unsupported.
	VideoNote string `json:"video_note"`
	// Duration of sent video in seconds.
	Duration OptInt `json:"duration"`
	// Video width and height, i.e. diameter of the video message.
	Length OptInt `json:"length"`
	// Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported
	// server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's
	// width and height should not exceed 320. Ignored if the file is not uploaded using
	// multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can
	// pass `attach://<file_attach_name>` if the thumbnail was uploaded using multipart/form-data under
	// <file_attach_name>. [More information on Sending Files](https://core.telegram.
	// org/bots/api#sending-files).
	Thumbnail OptString `json:"thumbnail"`
	// Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will
	// receive a notification with no sound.
	DisableNotification OptBool `json:"disable_notification"`
	// Protects the contents of the sent message from forwarding and saving.
	ProtectContent OptBool `json:"protect_content"`
	// If the message is a reply, ID of the original message.
	ReplyToMessageID OptInt `json:"reply_to_message_id"`
	// Pass _True_ if the message should be sent even if the specified replied-to message is not found.
	AllowSendingWithoutReply OptBool            `json:"allow_sending_without_reply"`
	ReplyMarkup              OptSendReplyMarkup `json:"reply_markup"`
}

Input for sendVideoNote. Ref: #/components/schemas/sendVideoNote

func (*SendVideoNote) Decode

func (s *SendVideoNote) Decode(d *jx.Decoder) error

Decode decodes SendVideoNote from json.

func (*SendVideoNote) Encode

func (s *SendVideoNote) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SendVideoNote) GetAllowSendingWithoutReply

func (s *SendVideoNote) GetAllowSendingWithoutReply() OptBool

GetAllowSendingWithoutReply returns the value of AllowSendingWithoutReply.

func (*SendVideoNote) GetChatID

func (s *SendVideoNote) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SendVideoNote) GetDisableNotification

func (s *SendVideoNote) GetDisableNotification() OptBool

GetDisableNotification returns the value of DisableNotification.

func (*SendVideoNote) GetDuration

func (s *SendVideoNote) GetDuration() OptInt

GetDuration returns the value of Duration.

func (*SendVideoNote) GetLength

func (s *SendVideoNote) GetLength() OptInt

GetLength returns the value of Length.

func (*SendVideoNote) GetMessageThreadID

func (s *SendVideoNote) GetMessageThreadID() OptInt

GetMessageThreadID returns the value of MessageThreadID.

func (*SendVideoNote) GetProtectContent

func (s *SendVideoNote) GetProtectContent() OptBool

GetProtectContent returns the value of ProtectContent.

func (*SendVideoNote) GetReplyMarkup

func (s *SendVideoNote) GetReplyMarkup() OptSendReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*SendVideoNote) GetReplyToMessageID

func (s *SendVideoNote) GetReplyToMessageID() OptInt

GetReplyToMessageID returns the value of ReplyToMessageID.

func (*SendVideoNote) GetThumbnail

func (s *SendVideoNote) GetThumbnail() OptString

GetThumbnail returns the value of Thumbnail.

func (*SendVideoNote) GetVideoNote

func (s *SendVideoNote) GetVideoNote() string

GetVideoNote returns the value of VideoNote.

func (*SendVideoNote) MarshalJSON

func (s *SendVideoNote) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SendVideoNote) SetAllowSendingWithoutReply

func (s *SendVideoNote) SetAllowSendingWithoutReply(val OptBool)

SetAllowSendingWithoutReply sets the value of AllowSendingWithoutReply.

func (*SendVideoNote) SetChatID

func (s *SendVideoNote) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SendVideoNote) SetDisableNotification

func (s *SendVideoNote) SetDisableNotification(val OptBool)

SetDisableNotification sets the value of DisableNotification.

func (*SendVideoNote) SetDuration

func (s *SendVideoNote) SetDuration(val OptInt)

SetDuration sets the value of Duration.

func (*SendVideoNote) SetLength

func (s *SendVideoNote) SetLength(val OptInt)

SetLength sets the value of Length.

func (*SendVideoNote) SetMessageThreadID

func (s *SendVideoNote) SetMessageThreadID(val OptInt)

SetMessageThreadID sets the value of MessageThreadID.

func (*SendVideoNote) SetProtectContent

func (s *SendVideoNote) SetProtectContent(val OptBool)

SetProtectContent sets the value of ProtectContent.

func (*SendVideoNote) SetReplyMarkup

func (s *SendVideoNote) SetReplyMarkup(val OptSendReplyMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*SendVideoNote) SetReplyToMessageID

func (s *SendVideoNote) SetReplyToMessageID(val OptInt)

SetReplyToMessageID sets the value of ReplyToMessageID.

func (*SendVideoNote) SetThumbnail

func (s *SendVideoNote) SetThumbnail(val OptString)

SetThumbnail sets the value of Thumbnail.

func (*SendVideoNote) SetVideoNote

func (s *SendVideoNote) SetVideoNote(val string)

SetVideoNote sets the value of VideoNote.

func (*SendVideoNote) UnmarshalJSON

func (s *SendVideoNote) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SendVideoNote) Validate

func (s *SendVideoNote) Validate() error

type SendVoice

type SendVoice struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.
	MessageThreadID OptInt `json:"message_thread_id"`
	// Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers
	// (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or
	// upload a new one using multipart/form-data. [More information on Sending Files](https://core.
	// telegram.org/bots/api#sending-files).
	Voice string `json:"voice"`
	// Voice message caption, 0-1024 characters after entities parsing.
	Caption OptString `json:"caption"`
	// Mode for parsing entities in the voice message caption. See [formatting options](https://core.
	// telegram.org/bots/api#formatting-options) for more details.
	ParseMode OptString `json:"parse_mode"`
	// A JSON-serialized list of special entities that appear in the caption, which can be specified
	// instead of _parse_mode_.
	CaptionEntities []MessageEntity `json:"caption_entities"`
	// Duration of the voice message in seconds.
	Duration OptInt `json:"duration"`
	// Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will
	// receive a notification with no sound.
	DisableNotification OptBool `json:"disable_notification"`
	// Protects the contents of the sent message from forwarding and saving.
	ProtectContent OptBool `json:"protect_content"`
	// If the message is a reply, ID of the original message.
	ReplyToMessageID OptInt `json:"reply_to_message_id"`
	// Pass _True_ if the message should be sent even if the specified replied-to message is not found.
	AllowSendingWithoutReply OptBool            `json:"allow_sending_without_reply"`
	ReplyMarkup              OptSendReplyMarkup `json:"reply_markup"`
}

Input for sendVoice. Ref: #/components/schemas/sendVoice

func (*SendVoice) Decode

func (s *SendVoice) Decode(d *jx.Decoder) error

Decode decodes SendVoice from json.

func (*SendVoice) Encode

func (s *SendVoice) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SendVoice) GetAllowSendingWithoutReply

func (s *SendVoice) GetAllowSendingWithoutReply() OptBool

GetAllowSendingWithoutReply returns the value of AllowSendingWithoutReply.

func (*SendVoice) GetCaption

func (s *SendVoice) GetCaption() OptString

GetCaption returns the value of Caption.

func (*SendVoice) GetCaptionEntities

func (s *SendVoice) GetCaptionEntities() []MessageEntity

GetCaptionEntities returns the value of CaptionEntities.

func (*SendVoice) GetChatID

func (s *SendVoice) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SendVoice) GetDisableNotification

func (s *SendVoice) GetDisableNotification() OptBool

GetDisableNotification returns the value of DisableNotification.

func (*SendVoice) GetDuration

func (s *SendVoice) GetDuration() OptInt

GetDuration returns the value of Duration.

func (*SendVoice) GetMessageThreadID

func (s *SendVoice) GetMessageThreadID() OptInt

GetMessageThreadID returns the value of MessageThreadID.

func (*SendVoice) GetParseMode

func (s *SendVoice) GetParseMode() OptString

GetParseMode returns the value of ParseMode.

func (*SendVoice) GetProtectContent

func (s *SendVoice) GetProtectContent() OptBool

GetProtectContent returns the value of ProtectContent.

func (*SendVoice) GetReplyMarkup

func (s *SendVoice) GetReplyMarkup() OptSendReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*SendVoice) GetReplyToMessageID

func (s *SendVoice) GetReplyToMessageID() OptInt

GetReplyToMessageID returns the value of ReplyToMessageID.

func (*SendVoice) GetVoice

func (s *SendVoice) GetVoice() string

GetVoice returns the value of Voice.

func (*SendVoice) MarshalJSON

func (s *SendVoice) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SendVoice) SetAllowSendingWithoutReply

func (s *SendVoice) SetAllowSendingWithoutReply(val OptBool)

SetAllowSendingWithoutReply sets the value of AllowSendingWithoutReply.

func (*SendVoice) SetCaption

func (s *SendVoice) SetCaption(val OptString)

SetCaption sets the value of Caption.

func (*SendVoice) SetCaptionEntities

func (s *SendVoice) SetCaptionEntities(val []MessageEntity)

SetCaptionEntities sets the value of CaptionEntities.

func (*SendVoice) SetChatID

func (s *SendVoice) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SendVoice) SetDisableNotification

func (s *SendVoice) SetDisableNotification(val OptBool)

SetDisableNotification sets the value of DisableNotification.

func (*SendVoice) SetDuration

func (s *SendVoice) SetDuration(val OptInt)

SetDuration sets the value of Duration.

func (*SendVoice) SetMessageThreadID

func (s *SendVoice) SetMessageThreadID(val OptInt)

SetMessageThreadID sets the value of MessageThreadID.

func (*SendVoice) SetParseMode

func (s *SendVoice) SetParseMode(val OptString)

SetParseMode sets the value of ParseMode.

func (*SendVoice) SetProtectContent

func (s *SendVoice) SetProtectContent(val OptBool)

SetProtectContent sets the value of ProtectContent.

func (*SendVoice) SetReplyMarkup

func (s *SendVoice) SetReplyMarkup(val OptSendReplyMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*SendVoice) SetReplyToMessageID

func (s *SendVoice) SetReplyToMessageID(val OptInt)

SetReplyToMessageID sets the value of ReplyToMessageID.

func (*SendVoice) SetVoice

func (s *SendVoice) SetVoice(val string)

SetVoice sets the value of Voice.

func (*SendVoice) UnmarshalJSON

func (s *SendVoice) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SendVoice) Validate

func (s *SendVoice) Validate() error

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.

func NewServer

func NewServer(h Handler, opts ...ServerOption) (*Server, error)

NewServer creates new Server.

func (*Server) FindPath

func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool)

FindPath finds Route for given method and URL.

func (*Server) FindRoute

func (s *Server) FindRoute(method, path string) (Route, bool)

FindRoute finds Route for given method and path.

Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves http request as defined by OpenAPI v3 specification, calling handler that matches the path or returning not found error.

type ServerOption

type ServerOption interface {
	// contains filtered or unexported methods
}

ServerOption is server config option.

func WithErrorHandler

func WithErrorHandler(h ErrorHandler) ServerOption

WithErrorHandler specifies error handler to use.

func WithMaxMultipartMemory

func WithMaxMultipartMemory(max int64) ServerOption

WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.

func WithMethodNotAllowed

func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption

WithMethodNotAllowed specifies Method Not Allowed handler to use.

func WithMiddleware

func WithMiddleware(m ...Middleware) ServerOption

WithMiddleware specifies middlewares to use.

func WithNotFound

func WithNotFound(notFound http.HandlerFunc) ServerOption

WithNotFound specifies Not Found handler to use.

func WithPathPrefix

func WithPathPrefix(prefix string) ServerOption

WithPathPrefix specifies server path prefix.

type SetChatAdministratorCustomTitle

type SetChatAdministratorCustomTitle struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier of the target user.
	UserID int64 `json:"user_id"`
	// New custom title for the administrator; 0-16 characters, emoji are not allowed.
	CustomTitle string `json:"custom_title"`
}

Input for setChatAdministratorCustomTitle. Ref: #/components/schemas/setChatAdministratorCustomTitle

func (*SetChatAdministratorCustomTitle) Decode

Decode decodes SetChatAdministratorCustomTitle from json.

func (*SetChatAdministratorCustomTitle) Encode

Encode implements json.Marshaler.

func (*SetChatAdministratorCustomTitle) GetChatID

func (s *SetChatAdministratorCustomTitle) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SetChatAdministratorCustomTitle) GetCustomTitle

func (s *SetChatAdministratorCustomTitle) GetCustomTitle() string

GetCustomTitle returns the value of CustomTitle.

func (*SetChatAdministratorCustomTitle) GetUserID

func (s *SetChatAdministratorCustomTitle) GetUserID() int64

GetUserID returns the value of UserID.

func (*SetChatAdministratorCustomTitle) MarshalJSON

func (s *SetChatAdministratorCustomTitle) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetChatAdministratorCustomTitle) SetChatID

func (s *SetChatAdministratorCustomTitle) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SetChatAdministratorCustomTitle) SetCustomTitle

func (s *SetChatAdministratorCustomTitle) SetCustomTitle(val string)

SetCustomTitle sets the value of CustomTitle.

func (*SetChatAdministratorCustomTitle) SetUserID

func (s *SetChatAdministratorCustomTitle) SetUserID(val int64)

SetUserID sets the value of UserID.

func (*SetChatAdministratorCustomTitle) UnmarshalJSON

func (s *SetChatAdministratorCustomTitle) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SetChatAdministratorCustomTitle) Validate

func (s *SetChatAdministratorCustomTitle) Validate() error

type SetChatDescription

type SetChatDescription struct {
	ChatID ID `json:"chat_id"`
	// New chat description, 0-255 characters.
	Description OptString `json:"description"`
}

Input for setChatDescription. Ref: #/components/schemas/setChatDescription

func (*SetChatDescription) Decode

func (s *SetChatDescription) Decode(d *jx.Decoder) error

Decode decodes SetChatDescription from json.

func (*SetChatDescription) Encode

func (s *SetChatDescription) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SetChatDescription) GetChatID

func (s *SetChatDescription) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SetChatDescription) GetDescription

func (s *SetChatDescription) GetDescription() OptString

GetDescription returns the value of Description.

func (*SetChatDescription) MarshalJSON

func (s *SetChatDescription) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetChatDescription) SetChatID

func (s *SetChatDescription) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SetChatDescription) SetDescription

func (s *SetChatDescription) SetDescription(val OptString)

SetDescription sets the value of Description.

func (*SetChatDescription) UnmarshalJSON

func (s *SetChatDescription) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SetChatDescription) Validate

func (s *SetChatDescription) Validate() error

type SetChatMenuButton

type SetChatMenuButton struct {
	// Unique identifier for the target private chat. If not specified, default bot's menu button will be
	// changed.
	ChatID     OptInt64      `json:"chat_id"`
	MenuButton OptMenuButton `json:"menu_button"`
}

Input for setChatMenuButton. Ref: #/components/schemas/setChatMenuButton

func (*SetChatMenuButton) Decode

func (s *SetChatMenuButton) Decode(d *jx.Decoder) error

Decode decodes SetChatMenuButton from json.

func (*SetChatMenuButton) Encode

func (s *SetChatMenuButton) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SetChatMenuButton) GetChatID

func (s *SetChatMenuButton) GetChatID() OptInt64

GetChatID returns the value of ChatID.

func (*SetChatMenuButton) GetMenuButton

func (s *SetChatMenuButton) GetMenuButton() OptMenuButton

GetMenuButton returns the value of MenuButton.

func (*SetChatMenuButton) MarshalJSON

func (s *SetChatMenuButton) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetChatMenuButton) SetChatID

func (s *SetChatMenuButton) SetChatID(val OptInt64)

SetChatID sets the value of ChatID.

func (*SetChatMenuButton) SetMenuButton

func (s *SetChatMenuButton) SetMenuButton(val OptMenuButton)

SetMenuButton sets the value of MenuButton.

func (*SetChatMenuButton) UnmarshalJSON

func (s *SetChatMenuButton) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type SetChatPermissions

type SetChatPermissions struct {
	ChatID      ID              `json:"chat_id"`
	Permissions ChatPermissions `json:"permissions"`
	// Pass _True_ if chat permissions are set independently. Otherwise, the _can_send_other_messages_
	// and _can_add_web_page_previews_ permissions will imply the _can_send_messages_, _can_send_audios_,
	// _can_send_documents_, _can_send_photos_, _can_send_videos_, _can_send_video_notes_, and
	// _can_send_voice_notes_ permissions; the _can_send_polls_ permission will imply the
	// _can_send_messages_ permission.
	UseIndependentChatPermissions OptBool `json:"use_independent_chat_permissions"`
}

Input for setChatPermissions. Ref: #/components/schemas/setChatPermissions

func (*SetChatPermissions) Decode

func (s *SetChatPermissions) Decode(d *jx.Decoder) error

Decode decodes SetChatPermissions from json.

func (*SetChatPermissions) Encode

func (s *SetChatPermissions) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SetChatPermissions) GetChatID

func (s *SetChatPermissions) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SetChatPermissions) GetPermissions

func (s *SetChatPermissions) GetPermissions() ChatPermissions

GetPermissions returns the value of Permissions.

func (*SetChatPermissions) GetUseIndependentChatPermissions

func (s *SetChatPermissions) GetUseIndependentChatPermissions() OptBool

GetUseIndependentChatPermissions returns the value of UseIndependentChatPermissions.

func (*SetChatPermissions) MarshalJSON

func (s *SetChatPermissions) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetChatPermissions) SetChatID

func (s *SetChatPermissions) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SetChatPermissions) SetPermissions

func (s *SetChatPermissions) SetPermissions(val ChatPermissions)

SetPermissions sets the value of Permissions.

func (*SetChatPermissions) SetUseIndependentChatPermissions

func (s *SetChatPermissions) SetUseIndependentChatPermissions(val OptBool)

SetUseIndependentChatPermissions sets the value of UseIndependentChatPermissions.

func (*SetChatPermissions) UnmarshalJSON

func (s *SetChatPermissions) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type SetChatPhoto

type SetChatPhoto struct {
	ChatID ID `json:"chat_id"`
	// New chat photo, uploaded using multipart/form-data.
	Photo string `json:"photo"`
}

Input for setChatPhoto. Ref: #/components/schemas/setChatPhoto

func (*SetChatPhoto) Decode

func (s *SetChatPhoto) Decode(d *jx.Decoder) error

Decode decodes SetChatPhoto from json.

func (*SetChatPhoto) Encode

func (s *SetChatPhoto) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SetChatPhoto) GetChatID

func (s *SetChatPhoto) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SetChatPhoto) GetPhoto

func (s *SetChatPhoto) GetPhoto() string

GetPhoto returns the value of Photo.

func (*SetChatPhoto) MarshalJSON

func (s *SetChatPhoto) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetChatPhoto) SetChatID

func (s *SetChatPhoto) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SetChatPhoto) SetPhoto

func (s *SetChatPhoto) SetPhoto(val string)

SetPhoto sets the value of Photo.

func (*SetChatPhoto) UnmarshalJSON

func (s *SetChatPhoto) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type SetChatStickerSet

type SetChatStickerSet struct {
	ChatID ID `json:"chat_id"`
	// Name of the sticker set to be set as the group sticker set.
	StickerSetName string `json:"sticker_set_name"`
}

Input for setChatStickerSet. Ref: #/components/schemas/setChatStickerSet

func (*SetChatStickerSet) Decode

func (s *SetChatStickerSet) Decode(d *jx.Decoder) error

Decode decodes SetChatStickerSet from json.

func (*SetChatStickerSet) Encode

func (s *SetChatStickerSet) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SetChatStickerSet) GetChatID

func (s *SetChatStickerSet) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SetChatStickerSet) GetStickerSetName

func (s *SetChatStickerSet) GetStickerSetName() string

GetStickerSetName returns the value of StickerSetName.

func (*SetChatStickerSet) MarshalJSON

func (s *SetChatStickerSet) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetChatStickerSet) SetChatID

func (s *SetChatStickerSet) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SetChatStickerSet) SetStickerSetName

func (s *SetChatStickerSet) SetStickerSetName(val string)

SetStickerSetName sets the value of StickerSetName.

func (*SetChatStickerSet) UnmarshalJSON

func (s *SetChatStickerSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type SetChatTitle

type SetChatTitle struct {
	ChatID ID `json:"chat_id"`
	// New chat title, 1-128 characters.
	Title string `json:"title"`
}

Input for setChatTitle. Ref: #/components/schemas/setChatTitle

func (*SetChatTitle) Decode

func (s *SetChatTitle) Decode(d *jx.Decoder) error

Decode decodes SetChatTitle from json.

func (*SetChatTitle) Encode

func (s *SetChatTitle) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SetChatTitle) GetChatID

func (s *SetChatTitle) GetChatID() ID

GetChatID returns the value of ChatID.

func (*SetChatTitle) GetTitle

func (s *SetChatTitle) GetTitle() string

GetTitle returns the value of Title.

func (*SetChatTitle) MarshalJSON

func (s *SetChatTitle) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetChatTitle) SetChatID

func (s *SetChatTitle) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*SetChatTitle) SetTitle

func (s *SetChatTitle) SetTitle(val string)

SetTitle sets the value of Title.

func (*SetChatTitle) UnmarshalJSON

func (s *SetChatTitle) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SetChatTitle) Validate

func (s *SetChatTitle) Validate() error

type SetCustomEmojiStickerSetThumbnail

type SetCustomEmojiStickerSetThumbnail struct {
	// Sticker set name.
	Name string `json:"name"`
	// Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the
	// thumbnail and use the first sticker as the thumbnail.
	CustomEmojiID OptString `json:"custom_emoji_id"`
}

Input for setCustomEmojiStickerSetThumbnail. Ref: #/components/schemas/setCustomEmojiStickerSetThumbnail

func (*SetCustomEmojiStickerSetThumbnail) Decode

Decode decodes SetCustomEmojiStickerSetThumbnail from json.

func (*SetCustomEmojiStickerSetThumbnail) Encode

Encode implements json.Marshaler.

func (*SetCustomEmojiStickerSetThumbnail) GetCustomEmojiID

func (s *SetCustomEmojiStickerSetThumbnail) GetCustomEmojiID() OptString

GetCustomEmojiID returns the value of CustomEmojiID.

func (*SetCustomEmojiStickerSetThumbnail) GetName

GetName returns the value of Name.

func (*SetCustomEmojiStickerSetThumbnail) MarshalJSON

func (s *SetCustomEmojiStickerSetThumbnail) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetCustomEmojiStickerSetThumbnail) SetCustomEmojiID

func (s *SetCustomEmojiStickerSetThumbnail) SetCustomEmojiID(val OptString)

SetCustomEmojiID sets the value of CustomEmojiID.

func (*SetCustomEmojiStickerSetThumbnail) SetName

func (s *SetCustomEmojiStickerSetThumbnail) SetName(val string)

SetName sets the value of Name.

func (*SetCustomEmojiStickerSetThumbnail) UnmarshalJSON

func (s *SetCustomEmojiStickerSetThumbnail) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type SetGameScore

type SetGameScore struct {
	// User identifier.
	UserID int64 `json:"user_id"`
	// New score, must be non-negative.
	Score int `json:"score"`
	// Pass _True_ if the high score is allowed to decrease. This can be useful when fixing mistakes or
	// banning cheaters.
	Force OptBool `json:"force"`
	// Pass _True_ if the game message should not be automatically edited to include the current
	// scoreboard.
	DisableEditMessage OptBool `json:"disable_edit_message"`
	// Required if _inline_message_id_ is not specified. Unique identifier for the target chat.
	ChatID OptInt64 `json:"chat_id"`
	// Required if _inline_message_id_ is not specified. Identifier of the sent message.
	MessageID OptInt `json:"message_id"`
	// Required if _chat_id_ and _message_id_ are not specified. Identifier of the inline message.
	InlineMessageID OptString `json:"inline_message_id"`
}

Input for setGameScore. Ref: #/components/schemas/setGameScore

func (*SetGameScore) Decode

func (s *SetGameScore) Decode(d *jx.Decoder) error

Decode decodes SetGameScore from json.

func (*SetGameScore) Encode

func (s *SetGameScore) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SetGameScore) GetChatID

func (s *SetGameScore) GetChatID() OptInt64

GetChatID returns the value of ChatID.

func (*SetGameScore) GetDisableEditMessage

func (s *SetGameScore) GetDisableEditMessage() OptBool

GetDisableEditMessage returns the value of DisableEditMessage.

func (*SetGameScore) GetForce

func (s *SetGameScore) GetForce() OptBool

GetForce returns the value of Force.

func (*SetGameScore) GetInlineMessageID

func (s *SetGameScore) GetInlineMessageID() OptString

GetInlineMessageID returns the value of InlineMessageID.

func (*SetGameScore) GetMessageID

func (s *SetGameScore) GetMessageID() OptInt

GetMessageID returns the value of MessageID.

func (*SetGameScore) GetScore

func (s *SetGameScore) GetScore() int

GetScore returns the value of Score.

func (*SetGameScore) GetUserID

func (s *SetGameScore) GetUserID() int64

GetUserID returns the value of UserID.

func (*SetGameScore) MarshalJSON

func (s *SetGameScore) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetGameScore) SetChatID

func (s *SetGameScore) SetChatID(val OptInt64)

SetChatID sets the value of ChatID.

func (*SetGameScore) SetDisableEditMessage

func (s *SetGameScore) SetDisableEditMessage(val OptBool)

SetDisableEditMessage sets the value of DisableEditMessage.

func (*SetGameScore) SetForce

func (s *SetGameScore) SetForce(val OptBool)

SetForce sets the value of Force.

func (*SetGameScore) SetInlineMessageID

func (s *SetGameScore) SetInlineMessageID(val OptString)

SetInlineMessageID sets the value of InlineMessageID.

func (*SetGameScore) SetMessageID

func (s *SetGameScore) SetMessageID(val OptInt)

SetMessageID sets the value of MessageID.

func (*SetGameScore) SetScore

func (s *SetGameScore) SetScore(val int)

SetScore sets the value of Score.

func (*SetGameScore) SetUserID

func (s *SetGameScore) SetUserID(val int64)

SetUserID sets the value of UserID.

func (*SetGameScore) UnmarshalJSON

func (s *SetGameScore) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type SetMyCommands

type SetMyCommands struct {
	// A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100
	// commands can be specified.
	Commands []BotCommand       `json:"commands"`
	Scope    OptBotCommandScope `json:"scope"`
	// A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the
	// given scope, for whose language there are no dedicated commands.
	LanguageCode OptString `json:"language_code"`
}

Input for setMyCommands. Ref: #/components/schemas/setMyCommands

func (*SetMyCommands) Decode

func (s *SetMyCommands) Decode(d *jx.Decoder) error

Decode decodes SetMyCommands from json.

func (*SetMyCommands) Encode

func (s *SetMyCommands) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SetMyCommands) GetCommands

func (s *SetMyCommands) GetCommands() []BotCommand

GetCommands returns the value of Commands.

func (*SetMyCommands) GetLanguageCode

func (s *SetMyCommands) GetLanguageCode() OptString

GetLanguageCode returns the value of LanguageCode.

func (*SetMyCommands) GetScope

func (s *SetMyCommands) GetScope() OptBotCommandScope

GetScope returns the value of Scope.

func (*SetMyCommands) MarshalJSON

func (s *SetMyCommands) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetMyCommands) SetCommands

func (s *SetMyCommands) SetCommands(val []BotCommand)

SetCommands sets the value of Commands.

func (*SetMyCommands) SetLanguageCode

func (s *SetMyCommands) SetLanguageCode(val OptString)

SetLanguageCode sets the value of LanguageCode.

func (*SetMyCommands) SetScope

func (s *SetMyCommands) SetScope(val OptBotCommandScope)

SetScope sets the value of Scope.

func (*SetMyCommands) UnmarshalJSON

func (s *SetMyCommands) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SetMyCommands) Validate

func (s *SetMyCommands) Validate() error

type SetMyDefaultAdministratorRights

type SetMyDefaultAdministratorRights struct {
	Rights OptChatAdministratorRights `json:"rights"`
	// Pass _True_ to change the default administrator rights of the bot in channels. Otherwise, the
	// default administrator rights of the bot for groups and supergroups will be changed.
	ForChannels OptBool `json:"for_channels"`
}

Input for setMyDefaultAdministratorRights. Ref: #/components/schemas/setMyDefaultAdministratorRights

func (*SetMyDefaultAdministratorRights) Decode

Decode decodes SetMyDefaultAdministratorRights from json.

func (*SetMyDefaultAdministratorRights) Encode

Encode implements json.Marshaler.

func (*SetMyDefaultAdministratorRights) GetForChannels

func (s *SetMyDefaultAdministratorRights) GetForChannels() OptBool

GetForChannels returns the value of ForChannels.

func (*SetMyDefaultAdministratorRights) GetRights

GetRights returns the value of Rights.

func (*SetMyDefaultAdministratorRights) MarshalJSON

func (s *SetMyDefaultAdministratorRights) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetMyDefaultAdministratorRights) SetForChannels

func (s *SetMyDefaultAdministratorRights) SetForChannels(val OptBool)

SetForChannels sets the value of ForChannels.

func (*SetMyDefaultAdministratorRights) SetRights

SetRights sets the value of Rights.

func (*SetMyDefaultAdministratorRights) UnmarshalJSON

func (s *SetMyDefaultAdministratorRights) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type SetMyDescription

type SetMyDescription struct {
	// New bot description; 0-512 characters. Pass an empty string to remove the dedicated description
	// for the given language.
	Description OptString `json:"description"`
	// A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for
	// whose language there is no dedicated description.
	LanguageCode OptString `json:"language_code"`
}

Input for setMyDescription. Ref: #/components/schemas/setMyDescription

func (*SetMyDescription) Decode

func (s *SetMyDescription) Decode(d *jx.Decoder) error

Decode decodes SetMyDescription from json.

func (*SetMyDescription) Encode

func (s *SetMyDescription) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SetMyDescription) GetDescription

func (s *SetMyDescription) GetDescription() OptString

GetDescription returns the value of Description.

func (*SetMyDescription) GetLanguageCode

func (s *SetMyDescription) GetLanguageCode() OptString

GetLanguageCode returns the value of LanguageCode.

func (*SetMyDescription) MarshalJSON

func (s *SetMyDescription) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetMyDescription) SetDescription

func (s *SetMyDescription) SetDescription(val OptString)

SetDescription sets the value of Description.

func (*SetMyDescription) SetLanguageCode

func (s *SetMyDescription) SetLanguageCode(val OptString)

SetLanguageCode sets the value of LanguageCode.

func (*SetMyDescription) UnmarshalJSON

func (s *SetMyDescription) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SetMyDescription) Validate

func (s *SetMyDescription) Validate() error

type SetMyName

type SetMyName struct {
	// New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given
	// language.
	Name OptString `json:"name"`
	// A two-letter ISO 639-1 language code. If empty, the name will be shown to all users for whose
	// language there is no dedicated name.
	LanguageCode OptString `json:"language_code"`
}

Input for setMyName. Ref: #/components/schemas/setMyName

func (*SetMyName) Decode

func (s *SetMyName) Decode(d *jx.Decoder) error

Decode decodes SetMyName from json.

func (*SetMyName) Encode

func (s *SetMyName) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SetMyName) GetLanguageCode

func (s *SetMyName) GetLanguageCode() OptString

GetLanguageCode returns the value of LanguageCode.

func (*SetMyName) GetName

func (s *SetMyName) GetName() OptString

GetName returns the value of Name.

func (*SetMyName) MarshalJSON

func (s *SetMyName) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetMyName) SetLanguageCode

func (s *SetMyName) SetLanguageCode(val OptString)

SetLanguageCode sets the value of LanguageCode.

func (*SetMyName) SetName

func (s *SetMyName) SetName(val OptString)

SetName sets the value of Name.

func (*SetMyName) UnmarshalJSON

func (s *SetMyName) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SetMyName) Validate

func (s *SetMyName) Validate() error

type SetMyShortDescription

type SetMyShortDescription struct {
	// New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated
	// short description for the given language.
	ShortDescription OptString `json:"short_description"`
	// A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users
	// for whose language there is no dedicated short description.
	LanguageCode OptString `json:"language_code"`
}

Input for setMyShortDescription. Ref: #/components/schemas/setMyShortDescription

func (*SetMyShortDescription) Decode

func (s *SetMyShortDescription) Decode(d *jx.Decoder) error

Decode decodes SetMyShortDescription from json.

func (*SetMyShortDescription) Encode

func (s *SetMyShortDescription) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SetMyShortDescription) GetLanguageCode

func (s *SetMyShortDescription) GetLanguageCode() OptString

GetLanguageCode returns the value of LanguageCode.

func (*SetMyShortDescription) GetShortDescription

func (s *SetMyShortDescription) GetShortDescription() OptString

GetShortDescription returns the value of ShortDescription.

func (*SetMyShortDescription) MarshalJSON

func (s *SetMyShortDescription) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetMyShortDescription) SetLanguageCode

func (s *SetMyShortDescription) SetLanguageCode(val OptString)

SetLanguageCode sets the value of LanguageCode.

func (*SetMyShortDescription) SetShortDescription

func (s *SetMyShortDescription) SetShortDescription(val OptString)

SetShortDescription sets the value of ShortDescription.

func (*SetMyShortDescription) UnmarshalJSON

func (s *SetMyShortDescription) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SetMyShortDescription) Validate

func (s *SetMyShortDescription) Validate() error

type SetPassportDataErrors

type SetPassportDataErrors struct {
	// User identifier.
	UserID int64 `json:"user_id"`
	// A JSON-serialized array describing the errors.
	Errors []PassportElementError `json:"errors"`
}

Input for setPassportDataErrors. Ref: #/components/schemas/setPassportDataErrors

func (*SetPassportDataErrors) Decode

func (s *SetPassportDataErrors) Decode(d *jx.Decoder) error

Decode decodes SetPassportDataErrors from json.

func (*SetPassportDataErrors) Encode

func (s *SetPassportDataErrors) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SetPassportDataErrors) GetErrors

GetErrors returns the value of Errors.

func (*SetPassportDataErrors) GetUserID

func (s *SetPassportDataErrors) GetUserID() int64

GetUserID returns the value of UserID.

func (*SetPassportDataErrors) MarshalJSON

func (s *SetPassportDataErrors) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetPassportDataErrors) SetErrors

func (s *SetPassportDataErrors) SetErrors(val []PassportElementError)

SetErrors sets the value of Errors.

func (*SetPassportDataErrors) SetUserID

func (s *SetPassportDataErrors) SetUserID(val int64)

SetUserID sets the value of UserID.

func (*SetPassportDataErrors) UnmarshalJSON

func (s *SetPassportDataErrors) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SetPassportDataErrors) Validate

func (s *SetPassportDataErrors) Validate() error

type SetStickerEmojiList

type SetStickerEmojiList struct {
	// File identifier of the sticker.
	Sticker string `json:"sticker"`
	// A JSON-serialized list of 1-20 emoji associated with the sticker.
	EmojiList []string `json:"emoji_list"`
}

Input for setStickerEmojiList. Ref: #/components/schemas/setStickerEmojiList

func (*SetStickerEmojiList) Decode

func (s *SetStickerEmojiList) Decode(d *jx.Decoder) error

Decode decodes SetStickerEmojiList from json.

func (*SetStickerEmojiList) Encode

func (s *SetStickerEmojiList) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SetStickerEmojiList) GetEmojiList

func (s *SetStickerEmojiList) GetEmojiList() []string

GetEmojiList returns the value of EmojiList.

func (*SetStickerEmojiList) GetSticker

func (s *SetStickerEmojiList) GetSticker() string

GetSticker returns the value of Sticker.

func (*SetStickerEmojiList) MarshalJSON

func (s *SetStickerEmojiList) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetStickerEmojiList) SetEmojiList

func (s *SetStickerEmojiList) SetEmojiList(val []string)

SetEmojiList sets the value of EmojiList.

func (*SetStickerEmojiList) SetSticker

func (s *SetStickerEmojiList) SetSticker(val string)

SetSticker sets the value of Sticker.

func (*SetStickerEmojiList) UnmarshalJSON

func (s *SetStickerEmojiList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SetStickerEmojiList) Validate

func (s *SetStickerEmojiList) Validate() error

type SetStickerKeywords

type SetStickerKeywords struct {
	// File identifier of the sticker.
	Sticker string `json:"sticker"`
	// A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64
	// characters.
	Keywords []string `json:"keywords"`
}

Input for setStickerKeywords. Ref: #/components/schemas/setStickerKeywords

func (*SetStickerKeywords) Decode

func (s *SetStickerKeywords) Decode(d *jx.Decoder) error

Decode decodes SetStickerKeywords from json.

func (*SetStickerKeywords) Encode

func (s *SetStickerKeywords) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SetStickerKeywords) GetKeywords

func (s *SetStickerKeywords) GetKeywords() []string

GetKeywords returns the value of Keywords.

func (*SetStickerKeywords) GetSticker

func (s *SetStickerKeywords) GetSticker() string

GetSticker returns the value of Sticker.

func (*SetStickerKeywords) MarshalJSON

func (s *SetStickerKeywords) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetStickerKeywords) SetKeywords

func (s *SetStickerKeywords) SetKeywords(val []string)

SetKeywords sets the value of Keywords.

func (*SetStickerKeywords) SetSticker

func (s *SetStickerKeywords) SetSticker(val string)

SetSticker sets the value of Sticker.

func (*SetStickerKeywords) UnmarshalJSON

func (s *SetStickerKeywords) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type SetStickerMaskPosition

type SetStickerMaskPosition struct {
	// File identifier of the sticker.
	Sticker      string          `json:"sticker"`
	MaskPosition OptMaskPosition `json:"mask_position"`
}

Input for setStickerMaskPosition. Ref: #/components/schemas/setStickerMaskPosition

func (*SetStickerMaskPosition) Decode

func (s *SetStickerMaskPosition) Decode(d *jx.Decoder) error

Decode decodes SetStickerMaskPosition from json.

func (*SetStickerMaskPosition) Encode

func (s *SetStickerMaskPosition) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SetStickerMaskPosition) GetMaskPosition

func (s *SetStickerMaskPosition) GetMaskPosition() OptMaskPosition

GetMaskPosition returns the value of MaskPosition.

func (*SetStickerMaskPosition) GetSticker

func (s *SetStickerMaskPosition) GetSticker() string

GetSticker returns the value of Sticker.

func (*SetStickerMaskPosition) MarshalJSON

func (s *SetStickerMaskPosition) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetStickerMaskPosition) SetMaskPosition

func (s *SetStickerMaskPosition) SetMaskPosition(val OptMaskPosition)

SetMaskPosition sets the value of MaskPosition.

func (*SetStickerMaskPosition) SetSticker

func (s *SetStickerMaskPosition) SetSticker(val string)

SetSticker sets the value of Sticker.

func (*SetStickerMaskPosition) UnmarshalJSON

func (s *SetStickerMaskPosition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SetStickerMaskPosition) Validate

func (s *SetStickerMaskPosition) Validate() error

type SetStickerPositionInSet

type SetStickerPositionInSet struct {
	// File identifier of the sticker.
	Sticker string `json:"sticker"`
	// New sticker position in the set, zero-based.
	Position int `json:"position"`
}

Input for setStickerPositionInSet. Ref: #/components/schemas/setStickerPositionInSet

func (*SetStickerPositionInSet) Decode

func (s *SetStickerPositionInSet) Decode(d *jx.Decoder) error

Decode decodes SetStickerPositionInSet from json.

func (*SetStickerPositionInSet) Encode

func (s *SetStickerPositionInSet) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SetStickerPositionInSet) GetPosition

func (s *SetStickerPositionInSet) GetPosition() int

GetPosition returns the value of Position.

func (*SetStickerPositionInSet) GetSticker

func (s *SetStickerPositionInSet) GetSticker() string

GetSticker returns the value of Sticker.

func (*SetStickerPositionInSet) MarshalJSON

func (s *SetStickerPositionInSet) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetStickerPositionInSet) SetPosition

func (s *SetStickerPositionInSet) SetPosition(val int)

SetPosition sets the value of Position.

func (*SetStickerPositionInSet) SetSticker

func (s *SetStickerPositionInSet) SetSticker(val string)

SetSticker sets the value of Sticker.

func (*SetStickerPositionInSet) UnmarshalJSON

func (s *SetStickerPositionInSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type SetStickerSetThumbnail

type SetStickerSetThumbnail struct {
	// Sticker set name.
	Name string `json:"name"`
	// User identifier of the sticker set owner.
	UserID int64 `json:"user_id"`
	// A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a
	// width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in
	// size (see [](https://core.telegram.org/stickers#animated-sticker-requirements)[https://core.
	// telegram.org/stickers#animated-sticker-requirements](https://core.telegram.
	// org/stickers#animated-sticker-requirements) for animated sticker technical requirements), or a
	// **WEBM** video with the thumbnail up to 32 kilobytes in size; see [](https://core.telegram.
	// org/stickers#video-sticker-requirements)[https://core.telegram.
	// org/stickers#video-sticker-requirements](https://core.telegram.
	// org/stickers#video-sticker-requirements) for video sticker technical requirements. Pass a
	// _file_id_ as a String to send a file that already exists on the Telegram servers, pass an HTTP URL
	// as a String for Telegram to get a file from the Internet, or upload a new one using
	// multipart/form-data. [More information on Sending Files](https://core.telegram.
	// org/bots/api#sending-files). Animated and video sticker set thumbnails can't be uploaded via HTTP
	// URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.
	Thumbnail OptString `json:"thumbnail"`
}

Input for setStickerSetThumbnail. Ref: #/components/schemas/setStickerSetThumbnail

func (*SetStickerSetThumbnail) Decode

func (s *SetStickerSetThumbnail) Decode(d *jx.Decoder) error

Decode decodes SetStickerSetThumbnail from json.

func (*SetStickerSetThumbnail) Encode

func (s *SetStickerSetThumbnail) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SetStickerSetThumbnail) GetName

func (s *SetStickerSetThumbnail) GetName() string

GetName returns the value of Name.

func (*SetStickerSetThumbnail) GetThumbnail

func (s *SetStickerSetThumbnail) GetThumbnail() OptString

GetThumbnail returns the value of Thumbnail.

func (*SetStickerSetThumbnail) GetUserID

func (s *SetStickerSetThumbnail) GetUserID() int64

GetUserID returns the value of UserID.

func (*SetStickerSetThumbnail) MarshalJSON

func (s *SetStickerSetThumbnail) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetStickerSetThumbnail) SetName

func (s *SetStickerSetThumbnail) SetName(val string)

SetName sets the value of Name.

func (*SetStickerSetThumbnail) SetThumbnail

func (s *SetStickerSetThumbnail) SetThumbnail(val OptString)

SetThumbnail sets the value of Thumbnail.

func (*SetStickerSetThumbnail) SetUserID

func (s *SetStickerSetThumbnail) SetUserID(val int64)

SetUserID sets the value of UserID.

func (*SetStickerSetThumbnail) UnmarshalJSON

func (s *SetStickerSetThumbnail) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type SetStickerSetTitle

type SetStickerSetTitle struct {
	// Sticker set name.
	Name string `json:"name"`
	// Sticker set title, 1-64 characters.
	Title string `json:"title"`
}

Input for setStickerSetTitle. Ref: #/components/schemas/setStickerSetTitle

func (*SetStickerSetTitle) Decode

func (s *SetStickerSetTitle) Decode(d *jx.Decoder) error

Decode decodes SetStickerSetTitle from json.

func (*SetStickerSetTitle) Encode

func (s *SetStickerSetTitle) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SetStickerSetTitle) GetName

func (s *SetStickerSetTitle) GetName() string

GetName returns the value of Name.

func (*SetStickerSetTitle) GetTitle

func (s *SetStickerSetTitle) GetTitle() string

GetTitle returns the value of Title.

func (*SetStickerSetTitle) MarshalJSON

func (s *SetStickerSetTitle) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetStickerSetTitle) SetName

func (s *SetStickerSetTitle) SetName(val string)

SetName sets the value of Name.

func (*SetStickerSetTitle) SetTitle

func (s *SetStickerSetTitle) SetTitle(val string)

SetTitle sets the value of Title.

func (*SetStickerSetTitle) UnmarshalJSON

func (s *SetStickerSetTitle) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SetStickerSetTitle) Validate

func (s *SetStickerSetTitle) Validate() error

type SetWebhook

type SetWebhook struct {
	// HTTPS URL to send updates to. Use an empty string to remove webhook integration.
	URL string `json:"url"`
	// Upload your public key certificate so that the root certificate in use can be checked. See our
	// [self-signed guide](https://core.telegram.org/bots/self-signed) for details.
	Certificate OptString `json:"certificate"`
	// The fixed IP address which will be used to send webhook requests instead of the IP address
	// resolved through DNS.
	IPAddress OptString `json:"ip_address"`
	// The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery,
	// 1-100. Defaults to _40_. Use lower values to limit the load on your bot's server, and higher
	// values to increase your bot's throughput.
	MaxConnections OptInt `json:"max_connections"`
	// A JSON-serialized list of the update types you want your bot to receive. For example, specify
	// [`message`, `edited_channel_post`, `callback_query`] to only receive updates of these types. See
	// [Update](https://core.telegram.org/bots/api#update) for a complete list of available update types.
	// Specify an empty list to receive all update types except _chat_member_ (default). If not specified,
	//  the previous setting will be used.Please note that this parameter doesn't affect updates created
	// before the call to the setWebhook, so unwanted updates may be received for a short period of time.
	AllowedUpdates []string `json:"allowed_updates"`
	// Pass _True_ to drop all pending updates.
	DropPendingUpdates OptBool `json:"drop_pending_updates"`
	// A secret token to be sent in a header `X-Telegram-Bot-Api-Secret-Token` in every webhook request,
	// 1-256 characters. Only characters `A-Z`, `a-z`, `0-9`, `_` and `-` are allowed. The header is
	// useful to ensure that the request comes from a webhook set by you.
	SecretToken OptString `json:"secret_token"`
}

Input for setWebhook. Ref: #/components/schemas/setWebhook

func (*SetWebhook) Decode

func (s *SetWebhook) Decode(d *jx.Decoder) error

Decode decodes SetWebhook from json.

func (*SetWebhook) Encode

func (s *SetWebhook) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SetWebhook) GetAllowedUpdates

func (s *SetWebhook) GetAllowedUpdates() []string

GetAllowedUpdates returns the value of AllowedUpdates.

func (*SetWebhook) GetCertificate

func (s *SetWebhook) GetCertificate() OptString

GetCertificate returns the value of Certificate.

func (*SetWebhook) GetDropPendingUpdates

func (s *SetWebhook) GetDropPendingUpdates() OptBool

GetDropPendingUpdates returns the value of DropPendingUpdates.

func (*SetWebhook) GetIPAddress

func (s *SetWebhook) GetIPAddress() OptString

GetIPAddress returns the value of IPAddress.

func (*SetWebhook) GetMaxConnections

func (s *SetWebhook) GetMaxConnections() OptInt

GetMaxConnections returns the value of MaxConnections.

func (*SetWebhook) GetSecretToken

func (s *SetWebhook) GetSecretToken() OptString

GetSecretToken returns the value of SecretToken.

func (*SetWebhook) GetURL

func (s *SetWebhook) GetURL() string

GetURL returns the value of URL.

func (*SetWebhook) MarshalJSON

func (s *SetWebhook) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SetWebhook) SetAllowedUpdates

func (s *SetWebhook) SetAllowedUpdates(val []string)

SetAllowedUpdates sets the value of AllowedUpdates.

func (*SetWebhook) SetCertificate

func (s *SetWebhook) SetCertificate(val OptString)

SetCertificate sets the value of Certificate.

func (*SetWebhook) SetDropPendingUpdates

func (s *SetWebhook) SetDropPendingUpdates(val OptBool)

SetDropPendingUpdates sets the value of DropPendingUpdates.

func (*SetWebhook) SetIPAddress

func (s *SetWebhook) SetIPAddress(val OptString)

SetIPAddress sets the value of IPAddress.

func (*SetWebhook) SetMaxConnections

func (s *SetWebhook) SetMaxConnections(val OptInt)

SetMaxConnections sets the value of MaxConnections.

func (*SetWebhook) SetSecretToken

func (s *SetWebhook) SetSecretToken(val OptString)

SetSecretToken sets the value of SecretToken.

func (*SetWebhook) SetURL

func (s *SetWebhook) SetURL(val string)

SetURL sets the value of URL.

func (*SetWebhook) UnmarshalJSON

func (s *SetWebhook) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SetWebhook) Validate

func (s *SetWebhook) Validate() error

type ShippingAddress

type ShippingAddress struct {
	// Two-letter ISO 3166-1 alpha-2 country code.
	CountryCode string `json:"country_code"`
	// State, if applicable.
	State string `json:"state"`
	// City.
	City string `json:"city"`
	// First line for the address.
	StreetLine1 string `json:"street_line1"`
	// Second line for the address.
	StreetLine2 string `json:"street_line2"`
	// Address post code.
	PostCode string `json:"post_code"`
}

This object represents a shipping address. Ref: #/components/schemas/ShippingAddress

func (*ShippingAddress) Decode

func (s *ShippingAddress) Decode(d *jx.Decoder) error

Decode decodes ShippingAddress from json.

func (*ShippingAddress) Encode

func (s *ShippingAddress) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ShippingAddress) GetCity

func (s *ShippingAddress) GetCity() string

GetCity returns the value of City.

func (*ShippingAddress) GetCountryCode

func (s *ShippingAddress) GetCountryCode() string

GetCountryCode returns the value of CountryCode.

func (*ShippingAddress) GetPostCode

func (s *ShippingAddress) GetPostCode() string

GetPostCode returns the value of PostCode.

func (*ShippingAddress) GetState

func (s *ShippingAddress) GetState() string

GetState returns the value of State.

func (*ShippingAddress) GetStreetLine1

func (s *ShippingAddress) GetStreetLine1() string

GetStreetLine1 returns the value of StreetLine1.

func (*ShippingAddress) GetStreetLine2

func (s *ShippingAddress) GetStreetLine2() string

GetStreetLine2 returns the value of StreetLine2.

func (*ShippingAddress) MarshalJSON

func (s *ShippingAddress) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ShippingAddress) SetCity

func (s *ShippingAddress) SetCity(val string)

SetCity sets the value of City.

func (*ShippingAddress) SetCountryCode

func (s *ShippingAddress) SetCountryCode(val string)

SetCountryCode sets the value of CountryCode.

func (*ShippingAddress) SetPostCode

func (s *ShippingAddress) SetPostCode(val string)

SetPostCode sets the value of PostCode.

func (*ShippingAddress) SetState

func (s *ShippingAddress) SetState(val string)

SetState sets the value of State.

func (*ShippingAddress) SetStreetLine1

func (s *ShippingAddress) SetStreetLine1(val string)

SetStreetLine1 sets the value of StreetLine1.

func (*ShippingAddress) SetStreetLine2

func (s *ShippingAddress) SetStreetLine2(val string)

SetStreetLine2 sets the value of StreetLine2.

func (*ShippingAddress) UnmarshalJSON

func (s *ShippingAddress) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ShippingOption

type ShippingOption struct {
	// Shipping option identifier.
	ID string `json:"id"`
	// Option title.
	Title string `json:"title"`
	// List of price portions.
	Prices []LabeledPrice `json:"prices"`
}

This object represents one shipping option. Ref: #/components/schemas/ShippingOption

func (*ShippingOption) Decode

func (s *ShippingOption) Decode(d *jx.Decoder) error

Decode decodes ShippingOption from json.

func (*ShippingOption) Encode

func (s *ShippingOption) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ShippingOption) GetID

func (s *ShippingOption) GetID() string

GetID returns the value of ID.

func (*ShippingOption) GetPrices

func (s *ShippingOption) GetPrices() []LabeledPrice

GetPrices returns the value of Prices.

func (*ShippingOption) GetTitle

func (s *ShippingOption) GetTitle() string

GetTitle returns the value of Title.

func (*ShippingOption) MarshalJSON

func (s *ShippingOption) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ShippingOption) SetID

func (s *ShippingOption) SetID(val string)

SetID sets the value of ID.

func (*ShippingOption) SetPrices

func (s *ShippingOption) SetPrices(val []LabeledPrice)

SetPrices sets the value of Prices.

func (*ShippingOption) SetTitle

func (s *ShippingOption) SetTitle(val string)

SetTitle sets the value of Title.

func (*ShippingOption) UnmarshalJSON

func (s *ShippingOption) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ShippingOption) Validate

func (s *ShippingOption) Validate() error

type ShippingQuery

type ShippingQuery struct {
	// Unique query identifier.
	ID   string `json:"id"`
	From User   `json:"from"`
	// Bot specified invoice payload.
	InvoicePayload  string          `json:"invoice_payload"`
	ShippingAddress ShippingAddress `json:"shipping_address"`
}

This object contains information about an incoming shipping query. Ref: #/components/schemas/ShippingQuery

func (*ShippingQuery) Decode

func (s *ShippingQuery) Decode(d *jx.Decoder) error

Decode decodes ShippingQuery from json.

func (*ShippingQuery) Encode

func (s *ShippingQuery) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ShippingQuery) GetFrom

func (s *ShippingQuery) GetFrom() User

GetFrom returns the value of From.

func (*ShippingQuery) GetID

func (s *ShippingQuery) GetID() string

GetID returns the value of ID.

func (*ShippingQuery) GetInvoicePayload

func (s *ShippingQuery) GetInvoicePayload() string

GetInvoicePayload returns the value of InvoicePayload.

func (*ShippingQuery) GetShippingAddress

func (s *ShippingQuery) GetShippingAddress() ShippingAddress

GetShippingAddress returns the value of ShippingAddress.

func (*ShippingQuery) MarshalJSON

func (s *ShippingQuery) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ShippingQuery) SetFrom

func (s *ShippingQuery) SetFrom(val User)

SetFrom sets the value of From.

func (*ShippingQuery) SetID

func (s *ShippingQuery) SetID(val string)

SetID sets the value of ID.

func (*ShippingQuery) SetInvoicePayload

func (s *ShippingQuery) SetInvoicePayload(val string)

SetInvoicePayload sets the value of InvoicePayload.

func (*ShippingQuery) SetShippingAddress

func (s *ShippingQuery) SetShippingAddress(val ShippingAddress)

SetShippingAddress sets the value of ShippingAddress.

func (*ShippingQuery) UnmarshalJSON

func (s *ShippingQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Sticker

type Sticker struct {
	// Identifier for this file, which can be used to download or reuse the file.
	FileID string `json:"file_id"`
	// Unique identifier for this file, which is supposed to be the same over time and for different bots.
	//  Can't be used to download or reuse the file.
	FileUniqueID string `json:"file_unique_id"`
	// Type of the sticker, currently one of `regular`, `mask`, `custom_emoji`. The type of the sticker
	// is independent from its format, which is determined by the fields _is_animated_ and _is_video_.
	Type StickerType `json:"type"`
	// Sticker width.
	Width int `json:"width"`
	// Sticker height.
	Height int `json:"height"`
	// _True_, if the sticker is [animated](https://telegram.org/blog/animated-stickers).
	IsAnimated bool `json:"is_animated"`
	// _True_, if the sticker is a [video sticker](https://telegram.
	// org/blog/video-stickers-better-reactions).
	IsVideo   bool         `json:"is_video"`
	Thumbnail OptPhotoSize `json:"thumbnail"`
	// _Optional_. Emoji associated with the sticker.
	Emoji OptString `json:"emoji"`
	// _Optional_. Name of the sticker set to which the sticker belongs.
	SetName          OptString       `json:"set_name"`
	PremiumAnimation OptFile         `json:"premium_animation"`
	MaskPosition     OptMaskPosition `json:"mask_position"`
	// _Optional_. For custom emoji stickers, unique identifier of the custom emoji.
	CustomEmojiID OptString `json:"custom_emoji_id"`
	// _Optional_. _True_, if the sticker must be repainted to a text color in messages, the color of the
	// Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color
	// in other places.
	NeedsRepainting OptBool `json:"needs_repainting"`
	// _Optional_. File size in bytes.
	FileSize OptInt `json:"file_size"`
}

This object represents a sticker. Ref: #/components/schemas/Sticker

func (*Sticker) Decode

func (s *Sticker) Decode(d *jx.Decoder) error

Decode decodes Sticker from json.

func (*Sticker) Encode

func (s *Sticker) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Sticker) GetCustomEmojiID

func (s *Sticker) GetCustomEmojiID() OptString

GetCustomEmojiID returns the value of CustomEmojiID.

func (*Sticker) GetEmoji

func (s *Sticker) GetEmoji() OptString

GetEmoji returns the value of Emoji.

func (*Sticker) GetFileID

func (s *Sticker) GetFileID() string

GetFileID returns the value of FileID.

func (*Sticker) GetFileSize

func (s *Sticker) GetFileSize() OptInt

GetFileSize returns the value of FileSize.

func (*Sticker) GetFileUniqueID

func (s *Sticker) GetFileUniqueID() string

GetFileUniqueID returns the value of FileUniqueID.

func (*Sticker) GetHeight

func (s *Sticker) GetHeight() int

GetHeight returns the value of Height.

func (*Sticker) GetIsAnimated

func (s *Sticker) GetIsAnimated() bool

GetIsAnimated returns the value of IsAnimated.

func (*Sticker) GetIsVideo

func (s *Sticker) GetIsVideo() bool

GetIsVideo returns the value of IsVideo.

func (*Sticker) GetMaskPosition

func (s *Sticker) GetMaskPosition() OptMaskPosition

GetMaskPosition returns the value of MaskPosition.

func (*Sticker) GetNeedsRepainting

func (s *Sticker) GetNeedsRepainting() OptBool

GetNeedsRepainting returns the value of NeedsRepainting.

func (*Sticker) GetPremiumAnimation

func (s *Sticker) GetPremiumAnimation() OptFile

GetPremiumAnimation returns the value of PremiumAnimation.

func (*Sticker) GetSetName

func (s *Sticker) GetSetName() OptString

GetSetName returns the value of SetName.

func (*Sticker) GetThumbnail

func (s *Sticker) GetThumbnail() OptPhotoSize

GetThumbnail returns the value of Thumbnail.

func (*Sticker) GetType

func (s *Sticker) GetType() StickerType

GetType returns the value of Type.

func (*Sticker) GetWidth

func (s *Sticker) GetWidth() int

GetWidth returns the value of Width.

func (*Sticker) MarshalJSON

func (s *Sticker) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Sticker) SetCustomEmojiID

func (s *Sticker) SetCustomEmojiID(val OptString)

SetCustomEmojiID sets the value of CustomEmojiID.

func (*Sticker) SetEmoji

func (s *Sticker) SetEmoji(val OptString)

SetEmoji sets the value of Emoji.

func (*Sticker) SetFileID

func (s *Sticker) SetFileID(val string)

SetFileID sets the value of FileID.

func (*Sticker) SetFileSize

func (s *Sticker) SetFileSize(val OptInt)

SetFileSize sets the value of FileSize.

func (*Sticker) SetFileUniqueID

func (s *Sticker) SetFileUniqueID(val string)

SetFileUniqueID sets the value of FileUniqueID.

func (*Sticker) SetHeight

func (s *Sticker) SetHeight(val int)

SetHeight sets the value of Height.

func (*Sticker) SetIsAnimated

func (s *Sticker) SetIsAnimated(val bool)

SetIsAnimated sets the value of IsAnimated.

func (*Sticker) SetIsVideo

func (s *Sticker) SetIsVideo(val bool)

SetIsVideo sets the value of IsVideo.

func (*Sticker) SetMaskPosition

func (s *Sticker) SetMaskPosition(val OptMaskPosition)

SetMaskPosition sets the value of MaskPosition.

func (*Sticker) SetNeedsRepainting

func (s *Sticker) SetNeedsRepainting(val OptBool)

SetNeedsRepainting sets the value of NeedsRepainting.

func (*Sticker) SetPremiumAnimation

func (s *Sticker) SetPremiumAnimation(val OptFile)

SetPremiumAnimation sets the value of PremiumAnimation.

func (*Sticker) SetSetName

func (s *Sticker) SetSetName(val OptString)

SetSetName sets the value of SetName.

func (*Sticker) SetThumbnail

func (s *Sticker) SetThumbnail(val OptPhotoSize)

SetThumbnail sets the value of Thumbnail.

func (*Sticker) SetType

func (s *Sticker) SetType(val StickerType)

SetType sets the value of Type.

func (*Sticker) SetWidth

func (s *Sticker) SetWidth(val int)

SetWidth sets the value of Width.

func (*Sticker) UnmarshalJSON

func (s *Sticker) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Sticker) Validate

func (s *Sticker) Validate() error

type StickerSet

type StickerSet struct {
	// Sticker set name.
	Name string `json:"name"`
	// Sticker set title.
	Title string `json:"title"`
	// Type of stickers in the set, currently one of `regular`, `mask`, `custom_emoji`.
	StickerType string `json:"sticker_type"`
	// _True_, if the sticker set contains [animated stickers](https://telegram.
	// org/blog/animated-stickers).
	IsAnimated bool `json:"is_animated"`
	// _True_, if the sticker set contains [video stickers](https://telegram.
	// org/blog/video-stickers-better-reactions).
	IsVideo bool `json:"is_video"`
	// List of all set stickers.
	Stickers  []Sticker    `json:"stickers"`
	Thumbnail OptPhotoSize `json:"thumbnail"`
}

This object represents a sticker set. Ref: #/components/schemas/StickerSet

func (*StickerSet) Decode

func (s *StickerSet) Decode(d *jx.Decoder) error

Decode decodes StickerSet from json.

func (*StickerSet) Encode

func (s *StickerSet) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*StickerSet) GetIsAnimated

func (s *StickerSet) GetIsAnimated() bool

GetIsAnimated returns the value of IsAnimated.

func (*StickerSet) GetIsVideo

func (s *StickerSet) GetIsVideo() bool

GetIsVideo returns the value of IsVideo.

func (*StickerSet) GetName

func (s *StickerSet) GetName() string

GetName returns the value of Name.

func (*StickerSet) GetStickerType

func (s *StickerSet) GetStickerType() string

GetStickerType returns the value of StickerType.

func (*StickerSet) GetStickers

func (s *StickerSet) GetStickers() []Sticker

GetStickers returns the value of Stickers.

func (*StickerSet) GetThumbnail

func (s *StickerSet) GetThumbnail() OptPhotoSize

GetThumbnail returns the value of Thumbnail.

func (*StickerSet) GetTitle

func (s *StickerSet) GetTitle() string

GetTitle returns the value of Title.

func (*StickerSet) MarshalJSON

func (s *StickerSet) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*StickerSet) SetIsAnimated

func (s *StickerSet) SetIsAnimated(val bool)

SetIsAnimated sets the value of IsAnimated.

func (*StickerSet) SetIsVideo

func (s *StickerSet) SetIsVideo(val bool)

SetIsVideo sets the value of IsVideo.

func (*StickerSet) SetName

func (s *StickerSet) SetName(val string)

SetName sets the value of Name.

func (*StickerSet) SetStickerType

func (s *StickerSet) SetStickerType(val string)

SetStickerType sets the value of StickerType.

func (*StickerSet) SetStickers

func (s *StickerSet) SetStickers(val []Sticker)

SetStickers sets the value of Stickers.

func (*StickerSet) SetThumbnail

func (s *StickerSet) SetThumbnail(val OptPhotoSize)

SetThumbnail sets the value of Thumbnail.

func (*StickerSet) SetTitle

func (s *StickerSet) SetTitle(val string)

SetTitle sets the value of Title.

func (*StickerSet) UnmarshalJSON

func (s *StickerSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StickerSet) Validate

func (s *StickerSet) Validate() error

type StickerType

type StickerType string

Type of the sticker, currently one of `regular`, `mask`, `custom_emoji`. The type of the sticker is independent from its format, which is determined by the fields _is_animated_ and _is_video_.

const (
	StickerTypeRegular     StickerType = "regular"
	StickerTypeMask        StickerType = "mask"
	StickerTypeCustomEmoji StickerType = "custom_emoji"
)

func (*StickerType) Decode

func (s *StickerType) Decode(d *jx.Decoder) error

Decode decodes StickerType from json.

func (StickerType) Encode

func (s StickerType) Encode(e *jx.Encoder)

Encode encodes StickerType as json.

func (StickerType) MarshalJSON

func (s StickerType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (StickerType) MarshalText

func (s StickerType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*StickerType) UnmarshalJSON

func (s *StickerType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StickerType) UnmarshalText

func (s *StickerType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (StickerType) Validate

func (s StickerType) Validate() error

type StopMessageLiveLocation

type StopMessageLiveLocation struct {
	ChatID OptID `json:"chat_id"`
	// Required if _inline_message_id_ is not specified. Identifier of the message with live location to
	// stop.
	MessageID OptInt `json:"message_id"`
	// Required if _chat_id_ and _message_id_ are not specified. Identifier of the inline message.
	InlineMessageID OptString               `json:"inline_message_id"`
	ReplyMarkup     OptInlineKeyboardMarkup `json:"reply_markup"`
}

Input for stopMessageLiveLocation. Ref: #/components/schemas/stopMessageLiveLocation

func (*StopMessageLiveLocation) Decode

func (s *StopMessageLiveLocation) Decode(d *jx.Decoder) error

Decode decodes StopMessageLiveLocation from json.

func (*StopMessageLiveLocation) Encode

func (s *StopMessageLiveLocation) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*StopMessageLiveLocation) GetChatID

func (s *StopMessageLiveLocation) GetChatID() OptID

GetChatID returns the value of ChatID.

func (*StopMessageLiveLocation) GetInlineMessageID

func (s *StopMessageLiveLocation) GetInlineMessageID() OptString

GetInlineMessageID returns the value of InlineMessageID.

func (*StopMessageLiveLocation) GetMessageID

func (s *StopMessageLiveLocation) GetMessageID() OptInt

GetMessageID returns the value of MessageID.

func (*StopMessageLiveLocation) GetReplyMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*StopMessageLiveLocation) MarshalJSON

func (s *StopMessageLiveLocation) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*StopMessageLiveLocation) SetChatID

func (s *StopMessageLiveLocation) SetChatID(val OptID)

SetChatID sets the value of ChatID.

func (*StopMessageLiveLocation) SetInlineMessageID

func (s *StopMessageLiveLocation) SetInlineMessageID(val OptString)

SetInlineMessageID sets the value of InlineMessageID.

func (*StopMessageLiveLocation) SetMessageID

func (s *StopMessageLiveLocation) SetMessageID(val OptInt)

SetMessageID sets the value of MessageID.

func (*StopMessageLiveLocation) SetReplyMarkup

func (s *StopMessageLiveLocation) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*StopMessageLiveLocation) UnmarshalJSON

func (s *StopMessageLiveLocation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StopMessageLiveLocation) Validate

func (s *StopMessageLiveLocation) Validate() error

type StopPoll

type StopPoll struct {
	ChatID ID `json:"chat_id"`
	// Identifier of the original message with the poll.
	MessageID   int                     `json:"message_id"`
	ReplyMarkup OptInlineKeyboardMarkup `json:"reply_markup"`
}

Input for stopPoll. Ref: #/components/schemas/stopPoll

func (*StopPoll) Decode

func (s *StopPoll) Decode(d *jx.Decoder) error

Decode decodes StopPoll from json.

func (*StopPoll) Encode

func (s *StopPoll) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*StopPoll) GetChatID

func (s *StopPoll) GetChatID() ID

GetChatID returns the value of ChatID.

func (*StopPoll) GetMessageID

func (s *StopPoll) GetMessageID() int

GetMessageID returns the value of MessageID.

func (*StopPoll) GetReplyMarkup

func (s *StopPoll) GetReplyMarkup() OptInlineKeyboardMarkup

GetReplyMarkup returns the value of ReplyMarkup.

func (*StopPoll) MarshalJSON

func (s *StopPoll) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*StopPoll) SetChatID

func (s *StopPoll) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*StopPoll) SetMessageID

func (s *StopPoll) SetMessageID(val int)

SetMessageID sets the value of MessageID.

func (*StopPoll) SetReplyMarkup

func (s *StopPoll) SetReplyMarkup(val OptInlineKeyboardMarkup)

SetReplyMarkup sets the value of ReplyMarkup.

func (*StopPoll) UnmarshalJSON

func (s *StopPoll) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StopPoll) Validate

func (s *StopPoll) Validate() error

type SuccessfulPayment

type SuccessfulPayment struct {
	// Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code.
	Currency string `json:"currency"`
	// Total price in the _smallest units_ of the currency (integer, **not** float/double). For example,
	// for a price of `US$ 1.45` pass `amount = 145`. See the _exp_ parameter in [currencies.
	// json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past
	// the decimal point for each currency (2 for the majority of currencies).
	TotalAmount int `json:"total_amount"`
	// Bot specified invoice payload.
	InvoicePayload string `json:"invoice_payload"`
	// _Optional_. Identifier of the shipping option chosen by the user.
	ShippingOptionID OptString    `json:"shipping_option_id"`
	OrderInfo        OptOrderInfo `json:"order_info"`
	// Telegram payment identifier.
	TelegramPaymentChargeID string `json:"telegram_payment_charge_id"`
	// Provider payment identifier.
	ProviderPaymentChargeID string `json:"provider_payment_charge_id"`
}

This object contains basic information about a successful payment. Ref: #/components/schemas/SuccessfulPayment

func (*SuccessfulPayment) Decode

func (s *SuccessfulPayment) Decode(d *jx.Decoder) error

Decode decodes SuccessfulPayment from json.

func (*SuccessfulPayment) Encode

func (s *SuccessfulPayment) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SuccessfulPayment) GetCurrency

func (s *SuccessfulPayment) GetCurrency() string

GetCurrency returns the value of Currency.

func (*SuccessfulPayment) GetInvoicePayload

func (s *SuccessfulPayment) GetInvoicePayload() string

GetInvoicePayload returns the value of InvoicePayload.

func (*SuccessfulPayment) GetOrderInfo

func (s *SuccessfulPayment) GetOrderInfo() OptOrderInfo

GetOrderInfo returns the value of OrderInfo.

func (*SuccessfulPayment) GetProviderPaymentChargeID

func (s *SuccessfulPayment) GetProviderPaymentChargeID() string

GetProviderPaymentChargeID returns the value of ProviderPaymentChargeID.

func (*SuccessfulPayment) GetShippingOptionID

func (s *SuccessfulPayment) GetShippingOptionID() OptString

GetShippingOptionID returns the value of ShippingOptionID.

func (*SuccessfulPayment) GetTelegramPaymentChargeID

func (s *SuccessfulPayment) GetTelegramPaymentChargeID() string

GetTelegramPaymentChargeID returns the value of TelegramPaymentChargeID.

func (*SuccessfulPayment) GetTotalAmount

func (s *SuccessfulPayment) GetTotalAmount() int

GetTotalAmount returns the value of TotalAmount.

func (*SuccessfulPayment) MarshalJSON

func (s *SuccessfulPayment) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SuccessfulPayment) SetCurrency

func (s *SuccessfulPayment) SetCurrency(val string)

SetCurrency sets the value of Currency.

func (*SuccessfulPayment) SetInvoicePayload

func (s *SuccessfulPayment) SetInvoicePayload(val string)

SetInvoicePayload sets the value of InvoicePayload.

func (*SuccessfulPayment) SetOrderInfo

func (s *SuccessfulPayment) SetOrderInfo(val OptOrderInfo)

SetOrderInfo sets the value of OrderInfo.

func (*SuccessfulPayment) SetProviderPaymentChargeID

func (s *SuccessfulPayment) SetProviderPaymentChargeID(val string)

SetProviderPaymentChargeID sets the value of ProviderPaymentChargeID.

func (*SuccessfulPayment) SetShippingOptionID

func (s *SuccessfulPayment) SetShippingOptionID(val OptString)

SetShippingOptionID sets the value of ShippingOptionID.

func (*SuccessfulPayment) SetTelegramPaymentChargeID

func (s *SuccessfulPayment) SetTelegramPaymentChargeID(val string)

SetTelegramPaymentChargeID sets the value of TelegramPaymentChargeID.

func (*SuccessfulPayment) SetTotalAmount

func (s *SuccessfulPayment) SetTotalAmount(val int)

SetTotalAmount sets the value of TotalAmount.

func (*SuccessfulPayment) UnmarshalJSON

func (s *SuccessfulPayment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type SwitchInlineQueryChosenChat

type SwitchInlineQueryChosenChat struct {
	// _Optional_. The default inline query to be inserted in the input field. If left empty, only the
	// bot's username will be inserted.
	Query OptString `json:"query"`
	// _Optional_. True, if private chats with users can be chosen.
	AllowUserChats OptBool `json:"allow_user_chats"`
	// _Optional_. True, if private chats with bots can be chosen.
	AllowBotChats OptBool `json:"allow_bot_chats"`
	// _Optional_. True, if group and supergroup chats can be chosen.
	AllowGroupChats OptBool `json:"allow_group_chats"`
	// _Optional_. True, if channel chats can be chosen.
	AllowChannelChats OptBool `json:"allow_channel_chats"`
}

This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query. Ref: #/components/schemas/SwitchInlineQueryChosenChat

func (*SwitchInlineQueryChosenChat) Decode

Decode decodes SwitchInlineQueryChosenChat from json.

func (*SwitchInlineQueryChosenChat) Encode

func (s *SwitchInlineQueryChosenChat) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SwitchInlineQueryChosenChat) GetAllowBotChats

func (s *SwitchInlineQueryChosenChat) GetAllowBotChats() OptBool

GetAllowBotChats returns the value of AllowBotChats.

func (*SwitchInlineQueryChosenChat) GetAllowChannelChats

func (s *SwitchInlineQueryChosenChat) GetAllowChannelChats() OptBool

GetAllowChannelChats returns the value of AllowChannelChats.

func (*SwitchInlineQueryChosenChat) GetAllowGroupChats

func (s *SwitchInlineQueryChosenChat) GetAllowGroupChats() OptBool

GetAllowGroupChats returns the value of AllowGroupChats.

func (*SwitchInlineQueryChosenChat) GetAllowUserChats

func (s *SwitchInlineQueryChosenChat) GetAllowUserChats() OptBool

GetAllowUserChats returns the value of AllowUserChats.

func (*SwitchInlineQueryChosenChat) GetQuery

func (s *SwitchInlineQueryChosenChat) GetQuery() OptString

GetQuery returns the value of Query.

func (*SwitchInlineQueryChosenChat) MarshalJSON

func (s *SwitchInlineQueryChosenChat) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SwitchInlineQueryChosenChat) SetAllowBotChats

func (s *SwitchInlineQueryChosenChat) SetAllowBotChats(val OptBool)

SetAllowBotChats sets the value of AllowBotChats.

func (*SwitchInlineQueryChosenChat) SetAllowChannelChats

func (s *SwitchInlineQueryChosenChat) SetAllowChannelChats(val OptBool)

SetAllowChannelChats sets the value of AllowChannelChats.

func (*SwitchInlineQueryChosenChat) SetAllowGroupChats

func (s *SwitchInlineQueryChosenChat) SetAllowGroupChats(val OptBool)

SetAllowGroupChats sets the value of AllowGroupChats.

func (*SwitchInlineQueryChosenChat) SetAllowUserChats

func (s *SwitchInlineQueryChosenChat) SetAllowUserChats(val OptBool)

SetAllowUserChats sets the value of AllowUserChats.

func (*SwitchInlineQueryChosenChat) SetQuery

func (s *SwitchInlineQueryChosenChat) SetQuery(val OptString)

SetQuery sets the value of Query.

func (*SwitchInlineQueryChosenChat) UnmarshalJSON

func (s *SwitchInlineQueryChosenChat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UnbanChatMember

type UnbanChatMember struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier of the target user.
	UserID int64 `json:"user_id"`
	// Do nothing if the user is not banned.
	OnlyIfBanned OptBool `json:"only_if_banned"`
}

Input for unbanChatMember. Ref: #/components/schemas/unbanChatMember

func (*UnbanChatMember) Decode

func (s *UnbanChatMember) Decode(d *jx.Decoder) error

Decode decodes UnbanChatMember from json.

func (*UnbanChatMember) Encode

func (s *UnbanChatMember) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UnbanChatMember) GetChatID

func (s *UnbanChatMember) GetChatID() ID

GetChatID returns the value of ChatID.

func (*UnbanChatMember) GetOnlyIfBanned

func (s *UnbanChatMember) GetOnlyIfBanned() OptBool

GetOnlyIfBanned returns the value of OnlyIfBanned.

func (*UnbanChatMember) GetUserID

func (s *UnbanChatMember) GetUserID() int64

GetUserID returns the value of UserID.

func (*UnbanChatMember) MarshalJSON

func (s *UnbanChatMember) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UnbanChatMember) SetChatID

func (s *UnbanChatMember) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*UnbanChatMember) SetOnlyIfBanned

func (s *UnbanChatMember) SetOnlyIfBanned(val OptBool)

SetOnlyIfBanned sets the value of OnlyIfBanned.

func (*UnbanChatMember) SetUserID

func (s *UnbanChatMember) SetUserID(val int64)

SetUserID sets the value of UserID.

func (*UnbanChatMember) UnmarshalJSON

func (s *UnbanChatMember) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UnbanChatSenderChat

type UnbanChatSenderChat struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier of the target sender chat.
	SenderChatID int64 `json:"sender_chat_id"`
}

Input for unbanChatSenderChat. Ref: #/components/schemas/unbanChatSenderChat

func (*UnbanChatSenderChat) Decode

func (s *UnbanChatSenderChat) Decode(d *jx.Decoder) error

Decode decodes UnbanChatSenderChat from json.

func (*UnbanChatSenderChat) Encode

func (s *UnbanChatSenderChat) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UnbanChatSenderChat) GetChatID

func (s *UnbanChatSenderChat) GetChatID() ID

GetChatID returns the value of ChatID.

func (*UnbanChatSenderChat) GetSenderChatID

func (s *UnbanChatSenderChat) GetSenderChatID() int64

GetSenderChatID returns the value of SenderChatID.

func (*UnbanChatSenderChat) MarshalJSON

func (s *UnbanChatSenderChat) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UnbanChatSenderChat) SetChatID

func (s *UnbanChatSenderChat) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*UnbanChatSenderChat) SetSenderChatID

func (s *UnbanChatSenderChat) SetSenderChatID(val int64)

SetSenderChatID sets the value of SenderChatID.

func (*UnbanChatSenderChat) UnmarshalJSON

func (s *UnbanChatSenderChat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UnhideGeneralForumTopic

type UnhideGeneralForumTopic struct {
	ChatID ID `json:"chat_id"`
}

Input for unhideGeneralForumTopic. Ref: #/components/schemas/unhideGeneralForumTopic

func (*UnhideGeneralForumTopic) Decode

func (s *UnhideGeneralForumTopic) Decode(d *jx.Decoder) error

Decode decodes UnhideGeneralForumTopic from json.

func (*UnhideGeneralForumTopic) Encode

func (s *UnhideGeneralForumTopic) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UnhideGeneralForumTopic) GetChatID

func (s *UnhideGeneralForumTopic) GetChatID() ID

GetChatID returns the value of ChatID.

func (*UnhideGeneralForumTopic) MarshalJSON

func (s *UnhideGeneralForumTopic) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UnhideGeneralForumTopic) SetChatID

func (s *UnhideGeneralForumTopic) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*UnhideGeneralForumTopic) UnmarshalJSON

func (s *UnhideGeneralForumTopic) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UnimplementedHandler

type UnimplementedHandler struct{}

UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.

func (UnimplementedHandler) AddStickerToSet

func (UnimplementedHandler) AddStickerToSet(ctx context.Context, req *AddStickerToSet) (r *Result, _ error)

AddStickerToSet implements addStickerToSet operation.

Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns _True_ on success.

POST /addStickerToSet

func (UnimplementedHandler) AnswerCallbackQuery

func (UnimplementedHandler) AnswerCallbackQuery(ctx context.Context, req *AnswerCallbackQuery) (r *Result, _ error)

AnswerCallbackQuery implements answerCallbackQuery operation.

Use this method to send answers to callback queries sent from [inline keyboards](https://core. telegram.org/bots/features#inline-keyboards). The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, _True_ is returned.

POST /answerCallbackQuery

func (UnimplementedHandler) AnswerInlineQuery

func (UnimplementedHandler) AnswerInlineQuery(ctx context.Context, req *AnswerInlineQuery) (r *Result, _ error)

AnswerInlineQuery implements answerInlineQuery operation.

Use this method to send answers to an inline query. On success, _True_ is returned.No more than **50** results per query are allowed.

POST /answerInlineQuery

func (UnimplementedHandler) AnswerPreCheckoutQuery

func (UnimplementedHandler) AnswerPreCheckoutQuery(ctx context.Context, req *AnswerPreCheckoutQuery) (r *Result, _ error)

AnswerPreCheckoutQuery implements answerPreCheckoutQuery operation.

Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update(https://core.telegram.org/bots/api#update) with the field _pre_checkout_query_. Use this method to respond to such pre-checkout queries. On success, _True_ is returned. **Note:** The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.

POST /answerPreCheckoutQuery

func (UnimplementedHandler) AnswerShippingQuery

func (UnimplementedHandler) AnswerShippingQuery(ctx context.Context, req *AnswerShippingQuery) (r *Result, _ error)

AnswerShippingQuery implements answerShippingQuery operation.

If you sent an invoice requesting a shipping address and the parameter _is_flexible_ was specified,

the Bot API will send an [Update](https://core.telegram.org/bots/api#update) with a

_shipping_query_ field to the bot. Use this method to reply to shipping queries. On success, _True_ is returned.

POST /answerShippingQuery

func (UnimplementedHandler) AnswerWebAppQuery

func (UnimplementedHandler) AnswerWebAppQuery(ctx context.Context, req *AnswerWebAppQuery) (r *Result, _ error)

AnswerWebAppQuery implements answerWebAppQuery operation.

Use this method to set the result of an interaction with a [Web App](https://core.telegram. org/bots/webapps) and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a [SentWebAppMessage](https://core.telegram. org/bots/api#sentwebappmessage) object is returned.

POST /answerWebAppQuery

func (UnimplementedHandler) ApproveChatJoinRequest

func (UnimplementedHandler) ApproveChatJoinRequest(ctx context.Context, req *ApproveChatJoinRequest) (r *Result, _ error)

ApproveChatJoinRequest implements approveChatJoinRequest operation.

Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the _can_invite_users_ administrator right. Returns _True_ on success.

POST /approveChatJoinRequest

func (UnimplementedHandler) BanChatMember

func (UnimplementedHandler) BanChatMember(ctx context.Context, req *BanChatMember) (r *Result, _ error)

BanChatMember implements banChatMember operation.

Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc. , unless [unbanned](https://core.telegram.org/bots/api#unbanchatmember) first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns _True_ on success.

POST /banChatMember

func (UnimplementedHandler) BanChatSenderChat

func (UnimplementedHandler) BanChatSenderChat(ctx context.Context, req *BanChatSenderChat) (r *Result, _ error)

BanChatSenderChat implements banChatSenderChat operation.

Use this method to ban a channel chat in a supergroup or a channel. Until the chat is [unbanned](https://core.telegram.org/bots/api#unbanchatsenderchat), the owner of the banned chat won't be able to send messages on behalf of **any of their channels**. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns _True_ on success.

POST /banChatSenderChat

func (UnimplementedHandler) Close

func (UnimplementedHandler) Close(ctx context.Context) (r *Result, _ error)

Close implements close operation.

Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns _True_ on success. Requires no parameters.

POST /close

func (UnimplementedHandler) CloseForumTopic

func (UnimplementedHandler) CloseForumTopic(ctx context.Context, req *CloseForumTopic) (r *Result, _ error)

CloseForumTopic implements closeForumTopic operation.

Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can_manage_topics_ administrator rights, unless it is the creator of the topic. Returns _True_ on success.

POST /closeForumTopic

func (UnimplementedHandler) CloseGeneralForumTopic

func (UnimplementedHandler) CloseGeneralForumTopic(ctx context.Context, req *CloseGeneralForumTopic) (r *Result, _ error)

CloseGeneralForumTopic implements closeGeneralForumTopic operation.

Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can_manage_topics_ administrator rights. Returns _True_ on success.

POST /closeGeneralForumTopic

func (UnimplementedHandler) CopyMessage

func (UnimplementedHandler) CopyMessage(ctx context.Context, req *CopyMessage) (r *ResultMessageId, _ error)

CopyMessage implements copyMessage operation.

Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. A quiz [poll](https://core.telegram.org/bots/api#poll) can be copied only if the value of the field _correct_option_id_ is known to the bot. The method is analogous to the method [forwardMessage](https://core.telegram.org/bots/api#forwardmessage), but the copied message doesn't have a link to the original message. Returns the MessageId(https://core.telegram. org/bots/api#messageid) of the sent message on success.

POST /copyMessage

func (UnimplementedHandler) CreateChatInviteLink(ctx context.Context, req *CreateChatInviteLink) (r *ResultChatInviteLink, _ error)

CreateChatInviteLink implements createChatInviteLink operation.

Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method [revokeChatInviteLink](https://core.telegram. org/bots/api#revokechatinvitelink). Returns the new invite link as ChatInviteLink(https://core. telegram.org/bots/api#chatinvitelink) object.

POST /createChatInviteLink

func (UnimplementedHandler) CreateForumTopic

func (UnimplementedHandler) CreateForumTopic(ctx context.Context, req *CreateForumTopic) (r *Result, _ error)

CreateForumTopic implements createForumTopic operation.

Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can_manage_topics_ administrator rights. Returns information about the created topic as a [ForumTopic](https://core.telegram. org/bots/api#forumtopic) object.

POST /createForumTopic

func (UnimplementedHandler) CreateInvoiceLink(ctx context.Context, req *CreateInvoiceLink) (r *ResultString, _ error)

CreateInvoiceLink implements createInvoiceLink operation.

Use this method to create a link for an invoice. Returns the created invoice link as _String_ on success.

POST /createInvoiceLink

func (UnimplementedHandler) CreateNewStickerSet

func (UnimplementedHandler) CreateNewStickerSet(ctx context.Context, req *CreateNewStickerSet) (r *Result, _ error)

CreateNewStickerSet implements createNewStickerSet operation.

Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns _True_ on success.

POST /createNewStickerSet

func (UnimplementedHandler) DeclineChatJoinRequest

func (UnimplementedHandler) DeclineChatJoinRequest(ctx context.Context, req *DeclineChatJoinRequest) (r *Result, _ error)

DeclineChatJoinRequest implements declineChatJoinRequest operation.

Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the _can_invite_users_ administrator right. Returns _True_ on success.

POST /declineChatJoinRequest

func (UnimplementedHandler) DeleteChatPhoto

func (UnimplementedHandler) DeleteChatPhoto(ctx context.Context, req *DeleteChatPhoto) (r *Result, _ error)

DeleteChatPhoto implements deleteChatPhoto operation.

Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns _True_ on success.

POST /deleteChatPhoto

func (UnimplementedHandler) DeleteChatStickerSet

func (UnimplementedHandler) DeleteChatStickerSet(ctx context.Context, req *DeleteChatStickerSet) (r *Result, _ error)

DeleteChatStickerSet implements deleteChatStickerSet operation.

Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field _can_set_sticker_set_ optionally returned in [getChat](https://core.telegram.org/bots/api#getchat) requests to check if the bot can use this method. Returns _True_ on success.

POST /deleteChatStickerSet

func (UnimplementedHandler) DeleteForumTopic

func (UnimplementedHandler) DeleteForumTopic(ctx context.Context, req *DeleteForumTopic) (r *Result, _ error)

DeleteForumTopic implements deleteForumTopic operation.

Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can_delete_messages_ administrator rights. Returns _True_ on success.

POST /deleteForumTopic

func (UnimplementedHandler) DeleteMessage

func (UnimplementedHandler) DeleteMessage(ctx context.Context, req *DeleteMessage) (r *Result, _ error)

DeleteMessage implements deleteMessage operation.

Use this method to delete a message, including service messages, with the following limitations:- A message can only be deleted if it was sent less than 48 hours ago.- Service messages about a supergroup, channel, or forum topic creation can't be deleted.- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.- Bots can delete outgoing messages in private chats, groups, and supergroups.- Bots can delete incoming messages in private chats.- Bots granted _can_post_messages_ permissions can delete outgoing messages in channels.- If the bot is an administrator of a group, it can delete any message there.- If the bot has _can_delete_messages_ permission in a supergroup or a channel, it can delete any message there. Returns _True_ on success.

POST /deleteMessage

func (UnimplementedHandler) DeleteMyCommands

func (UnimplementedHandler) DeleteMyCommands(ctx context.Context, req OptDeleteMyCommands) (r *Result, _ error)

DeleteMyCommands implements deleteMyCommands operation.

Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, [higher level commands](https://core.telegram. org/bots/api#determining-list-of-commands) will be shown to affected users. Returns _True_ on success.

POST /deleteMyCommands

func (UnimplementedHandler) DeleteStickerFromSet

func (UnimplementedHandler) DeleteStickerFromSet(ctx context.Context, req *DeleteStickerFromSet) (r *Result, _ error)

DeleteStickerFromSet implements deleteStickerFromSet operation.

Use this method to delete a sticker from a set created by the bot. Returns _True_ on success.

POST /deleteStickerFromSet

func (UnimplementedHandler) DeleteStickerSet

func (UnimplementedHandler) DeleteStickerSet(ctx context.Context, req *DeleteStickerSet) (r *Result, _ error)

DeleteStickerSet implements deleteStickerSet operation.

Use this method to delete a sticker set that was created by the bot. Returns _True_ on success.

POST /deleteStickerSet

func (UnimplementedHandler) DeleteWebhook

func (UnimplementedHandler) DeleteWebhook(ctx context.Context, req OptDeleteWebhook) (r *Result, _ error)

DeleteWebhook implements deleteWebhook operation.

Use this method to remove webhook integration if you decide to switch back to [getUpdates](https://core.telegram.org/bots/api#getupdates). Returns _True_ on success.

POST /deleteWebhook

func (UnimplementedHandler) EditChatInviteLink(ctx context.Context, req *EditChatInviteLink) (r *ResultChatInviteLink, _ error)

EditChatInviteLink implements editChatInviteLink operation.

Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a ChatInviteLink(https://core.telegram. org/bots/api#chatinvitelink) object.

POST /editChatInviteLink

func (UnimplementedHandler) EditForumTopic

func (UnimplementedHandler) EditForumTopic(ctx context.Context, req *EditForumTopic) (r *Result, _ error)

EditForumTopic implements editForumTopic operation.

Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have _can_manage_topics_ administrator rights, unless it is the creator of the topic. Returns _True_ on success.

POST /editForumTopic

func (UnimplementedHandler) EditGeneralForumTopic

func (UnimplementedHandler) EditGeneralForumTopic(ctx context.Context, req *EditGeneralForumTopic) (r *Result, _ error)

EditGeneralForumTopic implements editGeneralForumTopic operation.

Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have _can_manage_topics_ administrator rights. Returns _True_ on success.

POST /editGeneralForumTopic

func (UnimplementedHandler) EditMessageCaption

EditMessageCaption implements editMessageCaption operation.

Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message(https://core.telegram.org/bots/api#message) is returned, otherwise _True_ is returned.

POST /editMessageCaption

func (UnimplementedHandler) EditMessageLiveLocation

func (UnimplementedHandler) EditMessageLiveLocation(ctx context.Context, req *EditMessageLiveLocation) (r *ResultMessageOrBoolean, _ error)

EditMessageLiveLocation implements editMessageLiveLocation operation.

Use this method to edit live location messages. A location can be edited until its _live_period_ expires or editing is explicitly disabled by a call to [stopMessageLiveLocation](https://core. telegram.org/bots/api#stopmessagelivelocation). On success, if the edited message is not an inline message, the edited Message(https://core.telegram.org/bots/api#message) is returned, otherwise _True_ is returned.

POST /editMessageLiveLocation

func (UnimplementedHandler) EditMessageMedia

EditMessageMedia implements editMessageMedia operation.

Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message(https://core. telegram.org/bots/api#message) is returned, otherwise _True_ is returned.

POST /editMessageMedia

func (UnimplementedHandler) EditMessageReplyMarkup

func (UnimplementedHandler) EditMessageReplyMarkup(ctx context.Context, req *EditMessageReplyMarkup) (r *ResultMessageOrBoolean, _ error)

EditMessageReplyMarkup implements editMessageReplyMarkup operation.

Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message(https://core.telegram.org/bots/api#message) is returned, otherwise _True_ is returned.

POST /editMessageReplyMarkup

func (UnimplementedHandler) EditMessageText

EditMessageText implements editMessageText operation.

Use this method to edit text and [game](https://core.telegram.org/bots/api#games) messages. On success, if the edited message is not an inline message, the edited Message(https://core. telegram.org/bots/api#message) is returned, otherwise _True_ is returned.

POST /editMessageText

func (UnimplementedHandler) ExportChatInviteLink(ctx context.Context, req *ExportChatInviteLink) (r *ResultString, _ error)

ExportChatInviteLink implements exportChatInviteLink operation.

Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as _String_ on success.

POST /exportChatInviteLink

func (UnimplementedHandler) ForwardMessage

func (UnimplementedHandler) ForwardMessage(ctx context.Context, req *ForwardMessage) (r *ResultMessage, _ error)

ForwardMessage implements forwardMessage operation.

Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent Message(https://core.telegram.org/bots/api#message) is returned.

POST /forwardMessage

func (UnimplementedHandler) GetChat

func (UnimplementedHandler) GetChat(ctx context.Context, req *GetChat) (r *ResultChat, _ error)

GetChat implements getChat operation.

Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a Chat(https://core.telegram.org/bots/api#chat) object on success.

POST /getChat

func (UnimplementedHandler) GetChatAdministrators

GetChatAdministrators implements getChatAdministrators operation.

Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember(https://core.telegram.org/bots/api#chatmember) objects.

POST /getChatAdministrators

func (UnimplementedHandler) GetChatMember

func (UnimplementedHandler) GetChatMember(ctx context.Context, req *GetChatMember) (r *ResultChatMember, _ error)

GetChatMember implements getChatMember operation.

Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a ChatMember(https://core. telegram.org/bots/api#chatmember) object on success.

POST /getChatMember

func (UnimplementedHandler) GetChatMemberCount

func (UnimplementedHandler) GetChatMemberCount(ctx context.Context, req *GetChatMemberCount) (r *ResultInt, _ error)

GetChatMemberCount implements getChatMemberCount operation.

Use this method to get the number of members in a chat. Returns _Int_ on success.

POST /getChatMemberCount

func (UnimplementedHandler) GetChatMenuButton

func (UnimplementedHandler) GetChatMenuButton(ctx context.Context, req OptGetChatMenuButton) (r *Result, _ error)

GetChatMenuButton implements getChatMenuButton operation.

Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton(https://core.telegram.org/bots/api#menubutton) on success.

POST /getChatMenuButton

func (UnimplementedHandler) GetCustomEmojiStickers

func (UnimplementedHandler) GetCustomEmojiStickers(ctx context.Context, req *GetCustomEmojiStickers) (r *ResultArrayOfSticker, _ error)

GetCustomEmojiStickers implements getCustomEmojiStickers operation.

Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker(https://core.telegram.org/bots/api#sticker) objects.

POST /getCustomEmojiStickers

func (UnimplementedHandler) GetFile

func (UnimplementedHandler) GetFile(ctx context.Context, req *GetFile) (r *ResultFile, _ error)

GetFile implements getFile operation.

Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File(https://core.telegram. org/bots/api#file) object is returned. The file can then be downloaded via the link `https://api. telegram.org/file/bot<token>/<file_path>`, where `<file_path>` is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling [getFile](https://core.telegram.org/bots/api#getfile) again.

POST /getFile

func (UnimplementedHandler) GetForumTopicIconStickers

func (UnimplementedHandler) GetForumTopicIconStickers(ctx context.Context) (r *ResultArrayOfSticker, _ error)

GetForumTopicIconStickers implements getForumTopicIconStickers operation.

Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of Sticker(https://core.telegram.org/bots/api#sticker) objects.

POST /getForumTopicIconStickers

func (UnimplementedHandler) GetGameHighScores

GetGameHighScores implements getGameHighScores operation.

Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of GameHighScore(https://core.telegram. org/bots/api#gamehighscore) objects.

POST /getGameHighScores

func (UnimplementedHandler) GetMe

GetMe implements getMe operation.

A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User(https://core.telegram.org/bots/api#user) object.

POST /getMe

func (UnimplementedHandler) GetMyCommands

GetMyCommands implements getMyCommands operation.

Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of BotCommand(https://core.telegram.org/bots/api#botcommand) objects. If commands aren't set, an empty list is returned.

POST /getMyCommands

func (UnimplementedHandler) GetMyDefaultAdministratorRights

func (UnimplementedHandler) GetMyDefaultAdministratorRights(ctx context.Context, req OptGetMyDefaultAdministratorRights) (r *Result, _ error)

GetMyDefaultAdministratorRights implements getMyDefaultAdministratorRights operation.

Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights(https://core.telegram.org/bots/api#chatadministratorrights) on success.

POST /getMyDefaultAdministratorRights

func (UnimplementedHandler) GetMyDescription

func (UnimplementedHandler) GetMyDescription(ctx context.Context, req OptGetMyDescription) (r *Result, _ error)

GetMyDescription implements getMyDescription operation.

Use this method to get the current bot description for the given user language. Returns [BotDescription](https://core.telegram.org/bots/api#botdescription) on success.

POST /getMyDescription

func (UnimplementedHandler) GetMyName

func (UnimplementedHandler) GetMyName(ctx context.Context, req OptGetMyName) (r *Result, _ error)

GetMyName implements getMyName operation.

Use this method to get the current bot name for the given user language. Returns [BotName](https://core.telegram.org/bots/api#botname) on success.

POST /getMyName

func (UnimplementedHandler) GetMyShortDescription

func (UnimplementedHandler) GetMyShortDescription(ctx context.Context, req OptGetMyShortDescription) (r *Result, _ error)

GetMyShortDescription implements getMyShortDescription operation.

Use this method to get the current bot short description for the given user language. Returns [BotShortDescription](https://core.telegram.org/bots/api#botshortdescription) on success.

POST /getMyShortDescription

func (UnimplementedHandler) GetStickerSet

func (UnimplementedHandler) GetStickerSet(ctx context.Context, req *GetStickerSet) (r *ResultStickerSet, _ error)

GetStickerSet implements getStickerSet operation.

Use this method to get a sticker set. On success, a StickerSet(https://core.telegram. org/bots/api#stickerset) object is returned.

POST /getStickerSet

func (UnimplementedHandler) GetUpdates

GetUpdates implements getUpdates operation.

Use this method to receive incoming updates using long polling ([wiki](https://en.wikipedia. org/wiki/Push_technology#Long_polling)). Returns an Array of Update(https://core.telegram. org/bots/api#update) objects.

POST /getUpdates

func (UnimplementedHandler) GetUserProfilePhotos

GetUserProfilePhotos implements getUserProfilePhotos operation.

Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos(https://core.telegram.org/bots/api#userprofilephotos) object.

POST /getUserProfilePhotos

func (UnimplementedHandler) GetWebhookInfo

func (UnimplementedHandler) GetWebhookInfo(ctx context.Context) (r *ResultWebhookInfo, _ error)

GetWebhookInfo implements getWebhookInfo operation.

Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo(https://core.telegram.org/bots/api#webhookinfo) object. If the bot is using [getUpdates](https://core.telegram.org/bots/api#getupdates), will return an object with the _url_ field empty.

POST /getWebhookInfo

func (UnimplementedHandler) HideGeneralForumTopic

func (UnimplementedHandler) HideGeneralForumTopic(ctx context.Context, req *HideGeneralForumTopic) (r *Result, _ error)

HideGeneralForumTopic implements hideGeneralForumTopic operation.

Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can_manage_topics_ administrator rights. The topic will be automatically closed if it was open. Returns _True_ on success.

POST /hideGeneralForumTopic

func (UnimplementedHandler) LeaveChat

func (UnimplementedHandler) LeaveChat(ctx context.Context, req *LeaveChat) (r *Result, _ error)

LeaveChat implements leaveChat operation.

Use this method for your bot to leave a group, supergroup or channel. Returns _True_ on success.

POST /leaveChat

func (UnimplementedHandler) LogOut

func (UnimplementedHandler) LogOut(ctx context.Context) (r *Result, _ error)

LogOut implements logOut operation.

Use this method to log out from the cloud Bot API server before launching the bot locally. You **must** log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns _True_ on success. Requires no parameters.

POST /logOut

func (UnimplementedHandler) NewError

func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *ErrorStatusCode)

NewError creates *ErrorStatusCode from error returned by handler.

Used for common default response.

func (UnimplementedHandler) PinChatMessage

func (UnimplementedHandler) PinChatMessage(ctx context.Context, req *PinChatMessage) (r *Result, _ error)

PinChatMessage implements pinChatMessage operation.

Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns _True_ on success.

POST /pinChatMessage

func (UnimplementedHandler) PromoteChatMember

func (UnimplementedHandler) PromoteChatMember(ctx context.Context, req *PromoteChatMember) (r *Result, _ error)

PromoteChatMember implements promoteChatMember operation.

Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass _False_ for all boolean parameters to demote a user. Returns _True_ on success.

POST /promoteChatMember

func (UnimplementedHandler) ReopenForumTopic

func (UnimplementedHandler) ReopenForumTopic(ctx context.Context, req *ReopenForumTopic) (r *Result, _ error)

ReopenForumTopic implements reopenForumTopic operation.

Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can_manage_topics_ administrator rights, unless it is the creator of the topic. Returns _True_ on success.

POST /reopenForumTopic

func (UnimplementedHandler) ReopenGeneralForumTopic

func (UnimplementedHandler) ReopenGeneralForumTopic(ctx context.Context, req *ReopenGeneralForumTopic) (r *Result, _ error)

ReopenGeneralForumTopic implements reopenGeneralForumTopic operation.

Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can_manage_topics_ administrator rights. The topic will be automatically unhidden if it was hidden. Returns _True_ on success.

POST /reopenGeneralForumTopic

func (UnimplementedHandler) RestrictChatMember

func (UnimplementedHandler) RestrictChatMember(ctx context.Context, req *RestrictChatMember) (r *Result, _ error)

RestrictChatMember implements restrictChatMember operation.

Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass _True_ for all permissions to lift restrictions from a user. Returns _True_ on success.

POST /restrictChatMember

func (UnimplementedHandler) RevokeChatInviteLink(ctx context.Context, req *RevokeChatInviteLink) (r *ResultChatInviteLink, _ error)

RevokeChatInviteLink implements revokeChatInviteLink operation.

Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink(https://core.telegram.org/bots/api#chatinvitelink) object.

POST /revokeChatInviteLink

func (UnimplementedHandler) SendAnimation

func (UnimplementedHandler) SendAnimation(ctx context.Context, req *SendAnimation) (r *ResultMessage, _ error)

SendAnimation implements sendAnimation operation.

Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message(https://core.telegram.org/bots/api#message) is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.

POST /sendAnimation

func (UnimplementedHandler) SendAudio

func (UnimplementedHandler) SendAudio(ctx context.Context, req *SendAudio) (r *ResultMessage, _ error)

SendAudio implements sendAudio operation.

For sending voice messages, use the [sendVoice](https://core.telegram.org/bots/api#sendvoice) method instead.

POST /sendAudio

func (UnimplementedHandler) SendChatAction

func (UnimplementedHandler) SendChatAction(ctx context.Context, req *SendChatAction) (r *Result, _ error)

SendChatAction implements sendChatAction operation.

We only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive.

POST /sendChatAction

func (UnimplementedHandler) SendContact

func (UnimplementedHandler) SendContact(ctx context.Context, req *SendContact) (r *ResultMessage, _ error)

SendContact implements sendContact operation.

Use this method to send phone contacts. On success, the sent Message(https://core.telegram. org/bots/api#message) is returned.

POST /sendContact

func (UnimplementedHandler) SendDice

func (UnimplementedHandler) SendDice(ctx context.Context, req *SendDice) (r *ResultMessage, _ error)

SendDice implements sendDice operation.

Use this method to send an animated emoji that will display a random value. On success, the sent Message(https://core.telegram.org/bots/api#message) is returned.

POST /sendDice

func (UnimplementedHandler) SendDocument

func (UnimplementedHandler) SendDocument(ctx context.Context, req *SendDocument) (r *ResultMessage, _ error)

SendDocument implements sendDocument operation.

Use this method to send general files. On success, the sent Message(https://core.telegram. org/bots/api#message) is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.

POST /sendDocument

func (UnimplementedHandler) SendGame

func (UnimplementedHandler) SendGame(ctx context.Context, req *SendGame) (r *ResultMessage, _ error)

SendGame implements sendGame operation.

Use this method to send a game. On success, the sent Message(https://core.telegram. org/bots/api#message) is returned.

POST /sendGame

func (UnimplementedHandler) SendInvoice

func (UnimplementedHandler) SendInvoice(ctx context.Context, req *SendInvoice) (r *ResultMessage, _ error)

SendInvoice implements sendInvoice operation.

Use this method to send invoices. On success, the sent Message(https://core.telegram. org/bots/api#message) is returned.

POST /sendInvoice

func (UnimplementedHandler) SendLocation

func (UnimplementedHandler) SendLocation(ctx context.Context, req *SendLocation) (r *ResultMessage, _ error)

SendLocation implements sendLocation operation.

Use this method to send point on the map. On success, the sent Message(https://core.telegram. org/bots/api#message) is returned.

POST /sendLocation

func (UnimplementedHandler) SendMediaGroup

SendMediaGroup implements sendMediaGroup operation.

Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of [Messages](https://core.telegram.org/bots/api#message) that were sent is returned.

POST /sendMediaGroup

func (UnimplementedHandler) SendMessage

func (UnimplementedHandler) SendMessage(ctx context.Context, req *SendMessage) (r *ResultMessage, _ error)

SendMessage implements sendMessage operation.

Use this method to send text messages. On success, the sent Message(https://core.telegram. org/bots/api#message) is returned.

POST /sendMessage

func (UnimplementedHandler) SendPhoto

func (UnimplementedHandler) SendPhoto(ctx context.Context, req *SendPhoto) (r *ResultMessage, _ error)

SendPhoto implements sendPhoto operation.

Use this method to send photos. On success, the sent Message(https://core.telegram. org/bots/api#message) is returned.

POST /sendPhoto

func (UnimplementedHandler) SendPoll

func (UnimplementedHandler) SendPoll(ctx context.Context, req *SendPoll) (r *ResultMessage, _ error)

SendPoll implements sendPoll operation.

Use this method to send a native poll. On success, the sent Message(https://core.telegram. org/bots/api#message) is returned.

POST /sendPoll

func (UnimplementedHandler) SendSticker

func (UnimplementedHandler) SendSticker(ctx context.Context, req *SendSticker) (r *ResultMessage, _ error)

SendSticker implements sendSticker operation.

Use this method to send static .WEBP, [animated](https://telegram.org/blog/animated-stickers) .TGS,

or [video](https://telegram.org/blog/video-stickers-better-reactions) .WEBM stickers. On success,

the sent Message(https://core.telegram.org/bots/api#message) is returned.

POST /sendSticker

func (UnimplementedHandler) SendVenue

func (UnimplementedHandler) SendVenue(ctx context.Context, req *SendVenue) (r *ResultMessage, _ error)

SendVenue implements sendVenue operation.

Use this method to send information about a venue. On success, the sent Message(https://core. telegram.org/bots/api#message) is returned.

POST /sendVenue

func (UnimplementedHandler) SendVideo

func (UnimplementedHandler) SendVideo(ctx context.Context, req *SendVideo) (r *ResultMessage, _ error)

SendVideo implements sendVideo operation.

Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document(https://core.telegram.org/bots/api#document)). On success, the sent Message(https://core.telegram.org/bots/api#message) is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.

POST /sendVideo

func (UnimplementedHandler) SendVideoNote

func (UnimplementedHandler) SendVideoNote(ctx context.Context, req *SendVideoNote) (r *ResultMessage, _ error)

SendVideoNote implements sendVideoNote operation.

As of [v.4.0](https://telegram.org/blog/video-messages-and-telescope), Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent Message(https://core.telegram.org/bots/api#message) is returned.

POST /sendVideoNote

func (UnimplementedHandler) SendVoice

func (UnimplementedHandler) SendVoice(ctx context.Context, req *SendVoice) (r *ResultMessage, _ error)

SendVoice implements sendVoice operation.

Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio(https://core.telegram.org/bots/api#audio) or Document(https://core.telegram.org/bots/api#document)). On success, the sent Message(https://core.telegram.org/bots/api#message) is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.

POST /sendVoice

func (UnimplementedHandler) SetChatAdministratorCustomTitle

func (UnimplementedHandler) SetChatAdministratorCustomTitle(ctx context.Context, req *SetChatAdministratorCustomTitle) (r *Result, _ error)

SetChatAdministratorCustomTitle implements setChatAdministratorCustomTitle operation.

Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns _True_ on success.

POST /setChatAdministratorCustomTitle

func (UnimplementedHandler) SetChatDescription

func (UnimplementedHandler) SetChatDescription(ctx context.Context, req *SetChatDescription) (r *Result, _ error)

SetChatDescription implements setChatDescription operation.

Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns _True_ on success.

POST /setChatDescription

func (UnimplementedHandler) SetChatMenuButton

func (UnimplementedHandler) SetChatMenuButton(ctx context.Context, req OptSetChatMenuButton) (r *Result, _ error)

SetChatMenuButton implements setChatMenuButton operation.

Use this method to change the bot's menu button in a private chat, or the default menu button. Returns _True_ on success.

POST /setChatMenuButton

func (UnimplementedHandler) SetChatPermissions

func (UnimplementedHandler) SetChatPermissions(ctx context.Context, req *SetChatPermissions) (r *Result, _ error)

SetChatPermissions implements setChatPermissions operation.

Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the _can_restrict_members_ administrator rights. Returns _True_ on success.

POST /setChatPermissions

func (UnimplementedHandler) SetChatPhoto

func (UnimplementedHandler) SetChatPhoto(ctx context.Context, req *SetChatPhoto) (r *Result, _ error)

SetChatPhoto implements setChatPhoto operation.

Use this method to set a new profile photo for the chat. Photos can't be changed for private chats.

The bot must be an administrator in the chat for this to work and must have the appropriate

administrator rights. Returns _True_ on success.

POST /setChatPhoto

func (UnimplementedHandler) SetChatStickerSet

func (UnimplementedHandler) SetChatStickerSet(ctx context.Context, req *SetChatStickerSet) (r *Result, _ error)

SetChatStickerSet implements setChatStickerSet operation.

Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field _can_set_sticker_set_ optionally returned in [getChat](https://core.telegram.org/bots/api#getchat) requests to check if the bot can use this method. Returns _True_ on success.

POST /setChatStickerSet

func (UnimplementedHandler) SetChatTitle

func (UnimplementedHandler) SetChatTitle(ctx context.Context, req *SetChatTitle) (r *Result, _ error)

SetChatTitle implements setChatTitle operation.

Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns _True_ on success.

POST /setChatTitle

func (UnimplementedHandler) SetCustomEmojiStickerSetThumbnail

func (UnimplementedHandler) SetCustomEmojiStickerSetThumbnail(ctx context.Context, req *SetCustomEmojiStickerSetThumbnail) (r *Result, _ error)

SetCustomEmojiStickerSetThumbnail implements setCustomEmojiStickerSetThumbnail operation.

Use this method to set the thumbnail of a custom emoji sticker set. Returns _True_ on success.

POST /setCustomEmojiStickerSetThumbnail

func (UnimplementedHandler) SetGameScore

func (UnimplementedHandler) SetGameScore(ctx context.Context, req *SetGameScore) (r *Result, _ error)

SetGameScore implements setGameScore operation.

Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the Message(https://core.telegram.org/bots/api#message) is returned, otherwise _True_ is returned. Returns an error, if the new score is not greater than the user's current score in the chat and _force_ is _False_.

POST /setGameScore

func (UnimplementedHandler) SetMyCommands

func (UnimplementedHandler) SetMyCommands(ctx context.Context, req *SetMyCommands) (r *Result, _ error)

SetMyCommands implements setMyCommands operation.

Use this method to change the list of the bot's commands. See [this manual](https://core.telegram. org/bots/features#commands) for more details about bot commands. Returns _True_ on success.

POST /setMyCommands

func (UnimplementedHandler) SetMyDefaultAdministratorRights

func (UnimplementedHandler) SetMyDefaultAdministratorRights(ctx context.Context, req OptSetMyDefaultAdministratorRights) (r *Result, _ error)

SetMyDefaultAdministratorRights implements setMyDefaultAdministratorRights operation.

Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns _True_ on success.

POST /setMyDefaultAdministratorRights

func (UnimplementedHandler) SetMyDescription

func (UnimplementedHandler) SetMyDescription(ctx context.Context, req OptSetMyDescription) (r *Result, _ error)

SetMyDescription implements setMyDescription operation.

Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns _True_ on success.

POST /setMyDescription

func (UnimplementedHandler) SetMyName

func (UnimplementedHandler) SetMyName(ctx context.Context, req OptSetMyName) (r *Result, _ error)

SetMyName implements setMyName operation.

Use this method to change the bot's name. Returns _True_ on success.

POST /setMyName

func (UnimplementedHandler) SetMyShortDescription

func (UnimplementedHandler) SetMyShortDescription(ctx context.Context, req OptSetMyShortDescription) (r *Result, _ error)

SetMyShortDescription implements setMyShortDescription operation.

Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns _True_ on success.

POST /setMyShortDescription

func (UnimplementedHandler) SetPassportDataErrors

func (UnimplementedHandler) SetPassportDataErrors(ctx context.Context, req *SetPassportDataErrors) (r *Result, _ error)

SetPassportDataErrors implements setPassportDataErrors operation.

Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.

POST /setPassportDataErrors

func (UnimplementedHandler) SetStickerEmojiList

func (UnimplementedHandler) SetStickerEmojiList(ctx context.Context, req *SetStickerEmojiList) (r *Result, _ error)

SetStickerEmojiList implements setStickerEmojiList operation.

Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns _True_ on success.

POST /setStickerEmojiList

func (UnimplementedHandler) SetStickerKeywords

func (UnimplementedHandler) SetStickerKeywords(ctx context.Context, req *SetStickerKeywords) (r *Result, _ error)

SetStickerKeywords implements setStickerKeywords operation.

Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns _True_ on success.

POST /setStickerKeywords

func (UnimplementedHandler) SetStickerMaskPosition

func (UnimplementedHandler) SetStickerMaskPosition(ctx context.Context, req *SetStickerMaskPosition) (r *Result, _ error)

SetStickerMaskPosition implements setStickerMaskPosition operation.

Use this method to change the [mask position](https://core.telegram.org/bots/api#maskposition) of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns _True_ on success.

POST /setStickerMaskPosition

func (UnimplementedHandler) SetStickerPositionInSet

func (UnimplementedHandler) SetStickerPositionInSet(ctx context.Context, req *SetStickerPositionInSet) (r *Result, _ error)

SetStickerPositionInSet implements setStickerPositionInSet operation.

Use this method to move a sticker in a set created by the bot to a specific position. Returns _True_ on success.

POST /setStickerPositionInSet

func (UnimplementedHandler) SetStickerSetThumbnail

func (UnimplementedHandler) SetStickerSetThumbnail(ctx context.Context, req *SetStickerSetThumbnail) (r *Result, _ error)

SetStickerSetThumbnail implements setStickerSetThumbnail operation.

Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns _True_ on success.

POST /setStickerSetThumbnail

func (UnimplementedHandler) SetStickerSetTitle

func (UnimplementedHandler) SetStickerSetTitle(ctx context.Context, req *SetStickerSetTitle) (r *Result, _ error)

SetStickerSetTitle implements setStickerSetTitle operation.

Use this method to set the title of a created sticker set. Returns _True_ on success.

POST /setStickerSetTitle

func (UnimplementedHandler) SetWebhook

func (UnimplementedHandler) SetWebhook(ctx context.Context, req *SetWebhook) (r *Result, _ error)

SetWebhook implements setWebhook operation.

If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter _secret_token_. If specified, the request will contain a header `X-Telegram-Bot-Api-Secret-Token` with the secret token as content.

POST /setWebhook

func (UnimplementedHandler) StopMessageLiveLocation

func (UnimplementedHandler) StopMessageLiveLocation(ctx context.Context, req *StopMessageLiveLocation) (r *ResultMessageOrBoolean, _ error)

StopMessageLiveLocation implements stopMessageLiveLocation operation.

Use this method to stop updating a live location message before _live_period_ expires. On success, if the message is not an inline message, the edited Message(https://core.telegram. org/bots/api#message) is returned, otherwise _True_ is returned.

POST /stopMessageLiveLocation

func (UnimplementedHandler) StopPoll

func (UnimplementedHandler) StopPoll(ctx context.Context, req *StopPoll) (r *ResultPoll, _ error)

StopPoll implements stopPoll operation.

Use this method to stop a poll which was sent by the bot. On success, the stopped Poll(https://core.telegram.org/bots/api#poll) is returned.

POST /stopPoll

func (UnimplementedHandler) UnbanChatMember

func (UnimplementedHandler) UnbanChatMember(ctx context.Context, req *UnbanChatMember) (r *Result, _ error)

UnbanChatMember implements unbanChatMember operation.

Use this method to unban a previously banned user in a supergroup or channel. The user will **not** return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be **removed** from the chat. If you don't want this, use the parameter _only_if_banned_. Returns _True_ on success.

POST /unbanChatMember

func (UnimplementedHandler) UnbanChatSenderChat

func (UnimplementedHandler) UnbanChatSenderChat(ctx context.Context, req *UnbanChatSenderChat) (r *Result, _ error)

UnbanChatSenderChat implements unbanChatSenderChat operation.

Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns _True_ on success.

POST /unbanChatSenderChat

func (UnimplementedHandler) UnhideGeneralForumTopic

func (UnimplementedHandler) UnhideGeneralForumTopic(ctx context.Context, req *UnhideGeneralForumTopic) (r *Result, _ error)

UnhideGeneralForumTopic implements unhideGeneralForumTopic operation.

Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the _can_manage_topics_ administrator rights. Returns _True_ on success.

POST /unhideGeneralForumTopic

func (UnimplementedHandler) UnpinAllChatMessages

func (UnimplementedHandler) UnpinAllChatMessages(ctx context.Context, req *UnpinAllChatMessages) (r *Result, _ error)

UnpinAllChatMessages implements unpinAllChatMessages operation.

Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns _True_ on success.

POST /unpinAllChatMessages

func (UnimplementedHandler) UnpinAllForumTopicMessages

func (UnimplementedHandler) UnpinAllForumTopicMessages(ctx context.Context, req *UnpinAllForumTopicMessages) (r *Result, _ error)

UnpinAllForumTopicMessages implements unpinAllForumTopicMessages operation.

Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the _can_pin_messages_ administrator right in the supergroup. Returns _True_ on success.

POST /unpinAllForumTopicMessages

func (UnimplementedHandler) UnpinChatMessage

func (UnimplementedHandler) UnpinChatMessage(ctx context.Context, req *UnpinChatMessage) (r *Result, _ error)

UnpinChatMessage implements unpinChatMessage operation.

Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns _True_ on success.

POST /unpinChatMessage

func (UnimplementedHandler) UploadStickerFile

func (UnimplementedHandler) UploadStickerFile(ctx context.Context, req *UploadStickerFile) (r *ResultFile, _ error)

UploadStickerFile implements uploadStickerFile operation.

Use this method to upload a file with a sticker for later use in the [createNewStickerSet](https://core.telegram.org/bots/api#createnewstickerset) and [addStickerToSet](https://core.telegram.org/bots/api#addstickertoset) methods (the file can be used multiple times). Returns the uploaded File(https://core.telegram.org/bots/api#file) on success.

POST /uploadStickerFile

type UnpinAllChatMessages

type UnpinAllChatMessages struct {
	ChatID ID `json:"chat_id"`
}

Input for unpinAllChatMessages. Ref: #/components/schemas/unpinAllChatMessages

func (*UnpinAllChatMessages) Decode

func (s *UnpinAllChatMessages) Decode(d *jx.Decoder) error

Decode decodes UnpinAllChatMessages from json.

func (*UnpinAllChatMessages) Encode

func (s *UnpinAllChatMessages) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UnpinAllChatMessages) GetChatID

func (s *UnpinAllChatMessages) GetChatID() ID

GetChatID returns the value of ChatID.

func (*UnpinAllChatMessages) MarshalJSON

func (s *UnpinAllChatMessages) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UnpinAllChatMessages) SetChatID

func (s *UnpinAllChatMessages) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*UnpinAllChatMessages) UnmarshalJSON

func (s *UnpinAllChatMessages) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UnpinAllForumTopicMessages

type UnpinAllForumTopicMessages struct {
	ChatID ID `json:"chat_id"`
	// Unique identifier for the target message thread of the forum topic.
	MessageThreadID int `json:"message_thread_id"`
}

Input for unpinAllForumTopicMessages. Ref: #/components/schemas/unpinAllForumTopicMessages

func (*UnpinAllForumTopicMessages) Decode

Decode decodes UnpinAllForumTopicMessages from json.

func (*UnpinAllForumTopicMessages) Encode

func (s *UnpinAllForumTopicMessages) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UnpinAllForumTopicMessages) GetChatID

func (s *UnpinAllForumTopicMessages) GetChatID() ID

GetChatID returns the value of ChatID.

func (*UnpinAllForumTopicMessages) GetMessageThreadID

func (s *UnpinAllForumTopicMessages) GetMessageThreadID() int

GetMessageThreadID returns the value of MessageThreadID.

func (*UnpinAllForumTopicMessages) MarshalJSON

func (s *UnpinAllForumTopicMessages) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UnpinAllForumTopicMessages) SetChatID

func (s *UnpinAllForumTopicMessages) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*UnpinAllForumTopicMessages) SetMessageThreadID

func (s *UnpinAllForumTopicMessages) SetMessageThreadID(val int)

SetMessageThreadID sets the value of MessageThreadID.

func (*UnpinAllForumTopicMessages) UnmarshalJSON

func (s *UnpinAllForumTopicMessages) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UnpinChatMessage

type UnpinChatMessage struct {
	ChatID ID `json:"chat_id"`
	// Identifier of a message to unpin. If not specified, the most recent pinned message (by sending
	// date) will be unpinned.
	MessageID OptInt `json:"message_id"`
}

Input for unpinChatMessage. Ref: #/components/schemas/unpinChatMessage

func (*UnpinChatMessage) Decode

func (s *UnpinChatMessage) Decode(d *jx.Decoder) error

Decode decodes UnpinChatMessage from json.

func (*UnpinChatMessage) Encode

func (s *UnpinChatMessage) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UnpinChatMessage) GetChatID

func (s *UnpinChatMessage) GetChatID() ID

GetChatID returns the value of ChatID.

func (*UnpinChatMessage) GetMessageID

func (s *UnpinChatMessage) GetMessageID() OptInt

GetMessageID returns the value of MessageID.

func (*UnpinChatMessage) MarshalJSON

func (s *UnpinChatMessage) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UnpinChatMessage) SetChatID

func (s *UnpinChatMessage) SetChatID(val ID)

SetChatID sets the value of ChatID.

func (*UnpinChatMessage) SetMessageID

func (s *UnpinChatMessage) SetMessageID(val OptInt)

SetMessageID sets the value of MessageID.

func (*UnpinChatMessage) UnmarshalJSON

func (s *UnpinChatMessage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Update

type Update struct {
	// The update's unique identifier. Update identifiers start from a certain positive number and
	// increase sequentially. This ID becomes especially handy if you're using [webhooks](https://core.
	// telegram.org/bots/api#setwebhook), since it allows you to ignore repeated updates or to restore
	// the correct update sequence, should they get out of order. If there are no new updates for at
	// least a week, then identifier of the next update will be chosen randomly instead of sequentially.
	UpdateID           int                   `json:"update_id"`
	Message            OptMessage            `json:"message"`
	EditedMessage      OptMessage            `json:"edited_message"`
	ChannelPost        OptMessage            `json:"channel_post"`
	EditedChannelPost  OptMessage            `json:"edited_channel_post"`
	InlineQuery        OptInlineQuery        `json:"inline_query"`
	ChosenInlineResult OptChosenInlineResult `json:"chosen_inline_result"`
	CallbackQuery      OptCallbackQuery      `json:"callback_query"`
	ShippingQuery      OptShippingQuery      `json:"shipping_query"`
	PreCheckoutQuery   OptPreCheckoutQuery   `json:"pre_checkout_query"`
	Poll               OptPoll               `json:"poll"`
	PollAnswer         OptPollAnswer         `json:"poll_answer"`
	MyChatMember       OptChatMemberUpdated  `json:"my_chat_member"`
	ChatMember         OptChatMemberUpdated  `json:"chat_member"`
	ChatJoinRequest    OptChatJoinRequest    `json:"chat_join_request"`
}

This [object](https://core.telegram.org/bots/api#available-types) represents an incoming update.At most **one** of the optional parameters can be present in any given update. Ref: #/components/schemas/Update

func (*Update) Decode

func (s *Update) Decode(d *jx.Decoder) error

Decode decodes Update from json.

func (*Update) Encode

func (s *Update) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Update) GetCallbackQuery

func (s *Update) GetCallbackQuery() OptCallbackQuery

GetCallbackQuery returns the value of CallbackQuery.

func (*Update) GetChannelPost

func (s *Update) GetChannelPost() OptMessage

GetChannelPost returns the value of ChannelPost.

func (*Update) GetChatJoinRequest

func (s *Update) GetChatJoinRequest() OptChatJoinRequest

GetChatJoinRequest returns the value of ChatJoinRequest.

func (*Update) GetChatMember

func (s *Update) GetChatMember() OptChatMemberUpdated

GetChatMember returns the value of ChatMember.

func (*Update) GetChosenInlineResult

func (s *Update) GetChosenInlineResult() OptChosenInlineResult

GetChosenInlineResult returns the value of ChosenInlineResult.

func (*Update) GetEditedChannelPost

func (s *Update) GetEditedChannelPost() OptMessage

GetEditedChannelPost returns the value of EditedChannelPost.

func (*Update) GetEditedMessage

func (s *Update) GetEditedMessage() OptMessage

GetEditedMessage returns the value of EditedMessage.

func (*Update) GetInlineQuery

func (s *Update) GetInlineQuery() OptInlineQuery

GetInlineQuery returns the value of InlineQuery.

func (*Update) GetMessage

func (s *Update) GetMessage() OptMessage

GetMessage returns the value of Message.

func (*Update) GetMyChatMember

func (s *Update) GetMyChatMember() OptChatMemberUpdated

GetMyChatMember returns the value of MyChatMember.

func (*Update) GetPoll

func (s *Update) GetPoll() OptPoll

GetPoll returns the value of Poll.

func (*Update) GetPollAnswer

func (s *Update) GetPollAnswer() OptPollAnswer

GetPollAnswer returns the value of PollAnswer.

func (*Update) GetPreCheckoutQuery

func (s *Update) GetPreCheckoutQuery() OptPreCheckoutQuery

GetPreCheckoutQuery returns the value of PreCheckoutQuery.

func (*Update) GetShippingQuery

func (s *Update) GetShippingQuery() OptShippingQuery

GetShippingQuery returns the value of ShippingQuery.

func (*Update) GetUpdateID

func (s *Update) GetUpdateID() int

GetUpdateID returns the value of UpdateID.

func (*Update) MarshalJSON

func (s *Update) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Update) SetCallbackQuery

func (s *Update) SetCallbackQuery(val OptCallbackQuery)

SetCallbackQuery sets the value of CallbackQuery.

func (*Update) SetChannelPost

func (s *Update) SetChannelPost(val OptMessage)

SetChannelPost sets the value of ChannelPost.

func (*Update) SetChatJoinRequest

func (s *Update) SetChatJoinRequest(val OptChatJoinRequest)

SetChatJoinRequest sets the value of ChatJoinRequest.

func (*Update) SetChatMember

func (s *Update) SetChatMember(val OptChatMemberUpdated)

SetChatMember sets the value of ChatMember.

func (*Update) SetChosenInlineResult

func (s *Update) SetChosenInlineResult(val OptChosenInlineResult)

SetChosenInlineResult sets the value of ChosenInlineResult.

func (*Update) SetEditedChannelPost

func (s *Update) SetEditedChannelPost(val OptMessage)

SetEditedChannelPost sets the value of EditedChannelPost.

func (*Update) SetEditedMessage

func (s *Update) SetEditedMessage(val OptMessage)

SetEditedMessage sets the value of EditedMessage.

func (*Update) SetInlineQuery

func (s *Update) SetInlineQuery(val OptInlineQuery)

SetInlineQuery sets the value of InlineQuery.

func (*Update) SetMessage

func (s *Update) SetMessage(val OptMessage)

SetMessage sets the value of Message.

func (*Update) SetMyChatMember

func (s *Update) SetMyChatMember(val OptChatMemberUpdated)

SetMyChatMember sets the value of MyChatMember.

func (*Update) SetPoll

func (s *Update) SetPoll(val OptPoll)

SetPoll sets the value of Poll.

func (*Update) SetPollAnswer

func (s *Update) SetPollAnswer(val OptPollAnswer)

SetPollAnswer sets the value of PollAnswer.

func (*Update) SetPreCheckoutQuery

func (s *Update) SetPreCheckoutQuery(val OptPreCheckoutQuery)

SetPreCheckoutQuery sets the value of PreCheckoutQuery.

func (*Update) SetShippingQuery

func (s *Update) SetShippingQuery(val OptShippingQuery)

SetShippingQuery sets the value of ShippingQuery.

func (*Update) SetUpdateID

func (s *Update) SetUpdateID(val int)

SetUpdateID sets the value of UpdateID.

func (*Update) UnmarshalJSON

func (s *Update) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Update) Validate

func (s *Update) Validate() error

type UploadStickerFile

type UploadStickerFile struct {
	// User identifier of sticker file owner.
	UserID int64 `json:"user_id"`
	// A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See [](https://core.telegram.
	// org/stickers)[https://core.telegram.org/stickers](https://core.telegram.org/stickers) for
	// technical requirements. [More information on Sending Files](https://core.telegram.
	// org/bots/api#sending-files).
	Sticker string `json:"sticker"`
	// Format of the sticker, must be one of `static`, `animated`, `video`.
	StickerFormat string `json:"sticker_format"`
}

Input for uploadStickerFile. Ref: #/components/schemas/uploadStickerFile

func (*UploadStickerFile) Decode

func (s *UploadStickerFile) Decode(d *jx.Decoder) error

Decode decodes UploadStickerFile from json.

func (*UploadStickerFile) Encode

func (s *UploadStickerFile) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UploadStickerFile) GetSticker

func (s *UploadStickerFile) GetSticker() string

GetSticker returns the value of Sticker.

func (*UploadStickerFile) GetStickerFormat

func (s *UploadStickerFile) GetStickerFormat() string

GetStickerFormat returns the value of StickerFormat.

func (*UploadStickerFile) GetUserID

func (s *UploadStickerFile) GetUserID() int64

GetUserID returns the value of UserID.

func (*UploadStickerFile) MarshalJSON

func (s *UploadStickerFile) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UploadStickerFile) SetSticker

func (s *UploadStickerFile) SetSticker(val string)

SetSticker sets the value of Sticker.

func (*UploadStickerFile) SetStickerFormat

func (s *UploadStickerFile) SetStickerFormat(val string)

SetStickerFormat sets the value of StickerFormat.

func (*UploadStickerFile) SetUserID

func (s *UploadStickerFile) SetUserID(val int64)

SetUserID sets the value of UserID.

func (*UploadStickerFile) UnmarshalJSON

func (s *UploadStickerFile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type User

type User struct {
	// Unique identifier for this user or bot. This number may have more than 32 significant bits and
	// some programming languages may have difficulty/silent defects in interpreting it. But it has at
	// most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing
	// this identifier.
	ID int64 `json:"id"`
	// _True_, if this user is a bot.
	IsBot bool `json:"is_bot"`
	// User's or bot's first name.
	FirstName string `json:"first_name"`
	// _Optional_. User's or bot's last name.
	LastName OptString `json:"last_name"`
	// _Optional_. User's or bot's username.
	Username OptString `json:"username"`
	// _Optional_. [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) of the user's
	// language.
	LanguageCode OptString `json:"language_code"`
	// _Optional_. _True_, if this user is a Telegram Premium user.
	IsPremium OptBool `json:"is_premium"`
	// _Optional_. _True_, if this user added the bot to the attachment menu.
	AddedToAttachmentMenu OptBool `json:"added_to_attachment_menu"`
	// _Optional_. _True_, if the bot can be invited to groups. Returned only in [getMe](https://core.
	// telegram.org/bots/api#getme).
	CanJoinGroups OptBool `json:"can_join_groups"`
	// _Optional_. _True_, if [privacy mode](https://core.telegram.org/bots/features#privacy-mode) is
	// disabled for the bot. Returned only in [getMe](https://core.telegram.org/bots/api#getme).
	CanReadAllGroupMessages OptBool `json:"can_read_all_group_messages"`
	// _Optional_. _True_, if the bot supports inline queries. Returned only in [getMe](https://core.
	// telegram.org/bots/api#getme).
	SupportsInlineQueries OptBool `json:"supports_inline_queries"`
}

This object represents a Telegram user or bot. Ref: #/components/schemas/User

func (*User) Decode

func (s *User) Decode(d *jx.Decoder) error

Decode decodes User from json.

func (*User) Encode

func (s *User) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*User) GetAddedToAttachmentMenu

func (s *User) GetAddedToAttachmentMenu() OptBool

GetAddedToAttachmentMenu returns the value of AddedToAttachmentMenu.

func (*User) GetCanJoinGroups

func (s *User) GetCanJoinGroups() OptBool

GetCanJoinGroups returns the value of CanJoinGroups.

func (*User) GetCanReadAllGroupMessages

func (s *User) GetCanReadAllGroupMessages() OptBool

GetCanReadAllGroupMessages returns the value of CanReadAllGroupMessages.

func (*User) GetFirstName

func (s *User) GetFirstName() string

GetFirstName returns the value of FirstName.

func (*User) GetID

func (s *User) GetID() int64

GetID returns the value of ID.

func (*User) GetIsBot

func (s *User) GetIsBot() bool

GetIsBot returns the value of IsBot.

func (*User) GetIsPremium

func (s *User) GetIsPremium() OptBool

GetIsPremium returns the value of IsPremium.

func (*User) GetLanguageCode

func (s *User) GetLanguageCode() OptString

GetLanguageCode returns the value of LanguageCode.

func (*User) GetLastName

func (s *User) GetLastName() OptString

GetLastName returns the value of LastName.

func (*User) GetSupportsInlineQueries

func (s *User) GetSupportsInlineQueries() OptBool

GetSupportsInlineQueries returns the value of SupportsInlineQueries.

func (*User) GetUsername

func (s *User) GetUsername() OptString

GetUsername returns the value of Username.

func (*User) MarshalJSON

func (s *User) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*User) SetAddedToAttachmentMenu

func (s *User) SetAddedToAttachmentMenu(val OptBool)

SetAddedToAttachmentMenu sets the value of AddedToAttachmentMenu.

func (*User) SetCanJoinGroups

func (s *User) SetCanJoinGroups(val OptBool)

SetCanJoinGroups sets the value of CanJoinGroups.

func (*User) SetCanReadAllGroupMessages

func (s *User) SetCanReadAllGroupMessages(val OptBool)

SetCanReadAllGroupMessages sets the value of CanReadAllGroupMessages.

func (*User) SetFirstName

func (s *User) SetFirstName(val string)

SetFirstName sets the value of FirstName.

func (*User) SetID

func (s *User) SetID(val int64)

SetID sets the value of ID.

func (*User) SetIsBot

func (s *User) SetIsBot(val bool)

SetIsBot sets the value of IsBot.

func (*User) SetIsPremium

func (s *User) SetIsPremium(val OptBool)

SetIsPremium sets the value of IsPremium.

func (*User) SetLanguageCode

func (s *User) SetLanguageCode(val OptString)

SetLanguageCode sets the value of LanguageCode.

func (*User) SetLastName

func (s *User) SetLastName(val OptString)

SetLastName sets the value of LastName.

func (*User) SetSupportsInlineQueries

func (s *User) SetSupportsInlineQueries(val OptBool)

SetSupportsInlineQueries sets the value of SupportsInlineQueries.

func (*User) SetUsername

func (s *User) SetUsername(val OptString)

SetUsername sets the value of Username.

func (*User) UnmarshalJSON

func (s *User) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UserProfilePhotos

type UserProfilePhotos struct {
	// Total number of profile pictures the target user has.
	TotalCount int `json:"total_count"`
	// Requested profile pictures (in up to 4 sizes each).
	Photos [][]PhotoSize `json:"photos"`
}

This object represent a user's profile pictures. Ref: #/components/schemas/UserProfilePhotos

func (*UserProfilePhotos) Decode

func (s *UserProfilePhotos) Decode(d *jx.Decoder) error

Decode decodes UserProfilePhotos from json.

func (*UserProfilePhotos) Encode

func (s *UserProfilePhotos) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UserProfilePhotos) GetPhotos

func (s *UserProfilePhotos) GetPhotos() [][]PhotoSize

GetPhotos returns the value of Photos.

func (*UserProfilePhotos) GetTotalCount

func (s *UserProfilePhotos) GetTotalCount() int

GetTotalCount returns the value of TotalCount.

func (*UserProfilePhotos) MarshalJSON

func (s *UserProfilePhotos) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UserProfilePhotos) SetPhotos

func (s *UserProfilePhotos) SetPhotos(val [][]PhotoSize)

SetPhotos sets the value of Photos.

func (*UserProfilePhotos) SetTotalCount

func (s *UserProfilePhotos) SetTotalCount(val int)

SetTotalCount sets the value of TotalCount.

func (*UserProfilePhotos) UnmarshalJSON

func (s *UserProfilePhotos) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*UserProfilePhotos) Validate

func (s *UserProfilePhotos) Validate() error

type UserShared

type UserShared struct {
	// Identifier of the request.
	RequestID int `json:"request_id"`
	// Identifier of the shared user. This number may have more than 32 significant bits and some
	// programming languages may have difficulty/silent defects in interpreting it. But it has at most 52
	// significant bits, so a 64-bit integer or double-precision float type are safe for storing this
	// identifier. The bot may not have access to the user and could be unable to use this identifier,
	// unless the user is already known to the bot by some other means.
	UserID int64 `json:"user_id"`
}

This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser(https://core.telegram.org/bots/api#keyboardbuttonrequestuser) button. Ref: #/components/schemas/UserShared

func (*UserShared) Decode

func (s *UserShared) Decode(d *jx.Decoder) error

Decode decodes UserShared from json.

func (*UserShared) Encode

func (s *UserShared) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UserShared) GetRequestID

func (s *UserShared) GetRequestID() int

GetRequestID returns the value of RequestID.

func (*UserShared) GetUserID

func (s *UserShared) GetUserID() int64

GetUserID returns the value of UserID.

func (*UserShared) MarshalJSON

func (s *UserShared) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UserShared) SetRequestID

func (s *UserShared) SetRequestID(val int)

SetRequestID sets the value of RequestID.

func (*UserShared) SetUserID

func (s *UserShared) SetUserID(val int64)

SetUserID sets the value of UserID.

func (*UserShared) UnmarshalJSON

func (s *UserShared) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Venue

type Venue struct {
	Location Location `json:"location"`
	// Name of the venue.
	Title string `json:"title"`
	// Address of the venue.
	Address string `json:"address"`
	// _Optional_. Foursquare identifier of the venue.
	FoursquareID OptString `json:"foursquare_id"`
	// _Optional_. Foursquare type of the venue. (For example, `arts_entertainment/default`,
	// `arts_entertainment/aquarium` or `food/icecream`.).
	FoursquareType OptString `json:"foursquare_type"`
	// _Optional_. Google Places identifier of the venue.
	GooglePlaceID OptString `json:"google_place_id"`
	// _Optional_. Google Places type of the venue. (See [supported types](https://developers.google.
	// com/places/web-service/supported_types).).
	GooglePlaceType OptString `json:"google_place_type"`
}

This object represents a venue. Ref: #/components/schemas/Venue

func (*Venue) Decode

func (s *Venue) Decode(d *jx.Decoder) error

Decode decodes Venue from json.

func (*Venue) Encode

func (s *Venue) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Venue) GetAddress

func (s *Venue) GetAddress() string

GetAddress returns the value of Address.

func (*Venue) GetFoursquareID

func (s *Venue) GetFoursquareID() OptString

GetFoursquareID returns the value of FoursquareID.

func (*Venue) GetFoursquareType

func (s *Venue) GetFoursquareType() OptString

GetFoursquareType returns the value of FoursquareType.

func (*Venue) GetGooglePlaceID

func (s *Venue) GetGooglePlaceID() OptString

GetGooglePlaceID returns the value of GooglePlaceID.

func (*Venue) GetGooglePlaceType

func (s *Venue) GetGooglePlaceType() OptString

GetGooglePlaceType returns the value of GooglePlaceType.

func (*Venue) GetLocation

func (s *Venue) GetLocation() Location

GetLocation returns the value of Location.

func (*Venue) GetTitle

func (s *Venue) GetTitle() string

GetTitle returns the value of Title.

func (*Venue) MarshalJSON

func (s *Venue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Venue) SetAddress

func (s *Venue) SetAddress(val string)

SetAddress sets the value of Address.

func (*Venue) SetFoursquareID

func (s *Venue) SetFoursquareID(val OptString)

SetFoursquareID sets the value of FoursquareID.

func (*Venue) SetFoursquareType

func (s *Venue) SetFoursquareType(val OptString)

SetFoursquareType sets the value of FoursquareType.

func (*Venue) SetGooglePlaceID

func (s *Venue) SetGooglePlaceID(val OptString)

SetGooglePlaceID sets the value of GooglePlaceID.

func (*Venue) SetGooglePlaceType

func (s *Venue) SetGooglePlaceType(val OptString)

SetGooglePlaceType sets the value of GooglePlaceType.

func (*Venue) SetLocation

func (s *Venue) SetLocation(val Location)

SetLocation sets the value of Location.

func (*Venue) SetTitle

func (s *Venue) SetTitle(val string)

SetTitle sets the value of Title.

func (*Venue) UnmarshalJSON

func (s *Venue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Venue) Validate

func (s *Venue) Validate() error

type Video

type Video struct {
	// Identifier for this file, which can be used to download or reuse the file.
	FileID string `json:"file_id"`
	// Unique identifier for this file, which is supposed to be the same over time and for different bots.
	//  Can't be used to download or reuse the file.
	FileUniqueID string `json:"file_unique_id"`
	// Video width as defined by sender.
	Width int `json:"width"`
	// Video height as defined by sender.
	Height int `json:"height"`
	// Duration of the video in seconds as defined by sender.
	Duration  int          `json:"duration"`
	Thumbnail OptPhotoSize `json:"thumbnail"`
	// _Optional_. Original filename as defined by sender.
	FileName OptString `json:"file_name"`
	// _Optional_. MIME type of the file as defined by sender.
	MimeType OptString `json:"mime_type"`
	// _Optional_. File size in bytes. It can be bigger than 2^31 and some programming languages may have
	// difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed
	// 64-bit integer or double-precision float type are safe for storing this value.
	FileSize OptInt `json:"file_size"`
}

This object represents a video file. Ref: #/components/schemas/Video

func (*Video) Decode

func (s *Video) Decode(d *jx.Decoder) error

Decode decodes Video from json.

func (*Video) Encode

func (s *Video) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Video) GetDuration

func (s *Video) GetDuration() int

GetDuration returns the value of Duration.

func (*Video) GetFileID

func (s *Video) GetFileID() string

GetFileID returns the value of FileID.

func (*Video) GetFileName

func (s *Video) GetFileName() OptString

GetFileName returns the value of FileName.

func (*Video) GetFileSize

func (s *Video) GetFileSize() OptInt

GetFileSize returns the value of FileSize.

func (*Video) GetFileUniqueID

func (s *Video) GetFileUniqueID() string

GetFileUniqueID returns the value of FileUniqueID.

func (*Video) GetHeight

func (s *Video) GetHeight() int

GetHeight returns the value of Height.

func (*Video) GetMimeType

func (s *Video) GetMimeType() OptString

GetMimeType returns the value of MimeType.

func (*Video) GetThumbnail

func (s *Video) GetThumbnail() OptPhotoSize

GetThumbnail returns the value of Thumbnail.

func (*Video) GetWidth

func (s *Video) GetWidth() int

GetWidth returns the value of Width.

func (*Video) MarshalJSON

func (s *Video) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Video) SetDuration

func (s *Video) SetDuration(val int)

SetDuration sets the value of Duration.

func (*Video) SetFileID

func (s *Video) SetFileID(val string)

SetFileID sets the value of FileID.

func (*Video) SetFileName

func (s *Video) SetFileName(val OptString)

SetFileName sets the value of FileName.

func (*Video) SetFileSize

func (s *Video) SetFileSize(val OptInt)

SetFileSize sets the value of FileSize.

func (*Video) SetFileUniqueID

func (s *Video) SetFileUniqueID(val string)

SetFileUniqueID sets the value of FileUniqueID.

func (*Video) SetHeight

func (s *Video) SetHeight(val int)

SetHeight sets the value of Height.

func (*Video) SetMimeType

func (s *Video) SetMimeType(val OptString)

SetMimeType sets the value of MimeType.

func (*Video) SetThumbnail

func (s *Video) SetThumbnail(val OptPhotoSize)

SetThumbnail sets the value of Thumbnail.

func (*Video) SetWidth

func (s *Video) SetWidth(val int)

SetWidth sets the value of Width.

func (*Video) UnmarshalJSON

func (s *Video) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Video) Validate

func (s *Video) Validate() error

type VideoChatEnded

type VideoChatEnded struct {
	// Video chat duration in seconds.
	Duration int `json:"duration"`
}

This object represents a service message about a video chat ended in the chat. Ref: #/components/schemas/VideoChatEnded

func (*VideoChatEnded) Decode

func (s *VideoChatEnded) Decode(d *jx.Decoder) error

Decode decodes VideoChatEnded from json.

func (*VideoChatEnded) Encode

func (s *VideoChatEnded) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*VideoChatEnded) GetDuration

func (s *VideoChatEnded) GetDuration() int

GetDuration returns the value of Duration.

func (*VideoChatEnded) MarshalJSON

func (s *VideoChatEnded) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*VideoChatEnded) SetDuration

func (s *VideoChatEnded) SetDuration(val int)

SetDuration sets the value of Duration.

func (*VideoChatEnded) UnmarshalJSON

func (s *VideoChatEnded) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*VideoChatEnded) Validate

func (s *VideoChatEnded) Validate() error

type VideoChatParticipantsInvited

type VideoChatParticipantsInvited struct {
	// New members that were invited to the video chat.
	Users []User `json:"users"`
}

This object represents a service message about new members invited to a video chat. Ref: #/components/schemas/VideoChatParticipantsInvited

func (*VideoChatParticipantsInvited) Decode

Decode decodes VideoChatParticipantsInvited from json.

func (*VideoChatParticipantsInvited) Encode

func (s *VideoChatParticipantsInvited) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*VideoChatParticipantsInvited) GetUsers

func (s *VideoChatParticipantsInvited) GetUsers() []User

GetUsers returns the value of Users.

func (*VideoChatParticipantsInvited) MarshalJSON

func (s *VideoChatParticipantsInvited) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*VideoChatParticipantsInvited) SetUsers

func (s *VideoChatParticipantsInvited) SetUsers(val []User)

SetUsers sets the value of Users.

func (*VideoChatParticipantsInvited) UnmarshalJSON

func (s *VideoChatParticipantsInvited) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*VideoChatParticipantsInvited) Validate

func (s *VideoChatParticipantsInvited) Validate() error

type VideoChatScheduled

type VideoChatScheduled struct {
	// Point in time (Unix timestamp) when the video chat is supposed to be started by a chat
	// administrator.
	StartDate int `json:"start_date"`
}

This object represents a service message about a video chat scheduled in the chat. Ref: #/components/schemas/VideoChatScheduled

func (*VideoChatScheduled) Decode

func (s *VideoChatScheduled) Decode(d *jx.Decoder) error

Decode decodes VideoChatScheduled from json.

func (*VideoChatScheduled) Encode

func (s *VideoChatScheduled) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*VideoChatScheduled) GetStartDate

func (s *VideoChatScheduled) GetStartDate() int

GetStartDate returns the value of StartDate.

func (*VideoChatScheduled) MarshalJSON

func (s *VideoChatScheduled) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*VideoChatScheduled) SetStartDate

func (s *VideoChatScheduled) SetStartDate(val int)

SetStartDate sets the value of StartDate.

func (*VideoChatScheduled) UnmarshalJSON

func (s *VideoChatScheduled) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type VideoChatStarted

type VideoChatStarted struct{}

This object represents a service message about a video chat started in the chat. Currently holds no information. Ref: #/components/schemas/VideoChatStarted

func (*VideoChatStarted) Decode

func (s *VideoChatStarted) Decode(d *jx.Decoder) error

Decode decodes VideoChatStarted from json.

func (*VideoChatStarted) Encode

func (s *VideoChatStarted) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*VideoChatStarted) MarshalJSON

func (s *VideoChatStarted) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*VideoChatStarted) UnmarshalJSON

func (s *VideoChatStarted) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type VideoNote

type VideoNote struct {
	// Identifier for this file, which can be used to download or reuse the file.
	FileID string `json:"file_id"`
	// Unique identifier for this file, which is supposed to be the same over time and for different bots.
	//  Can't be used to download or reuse the file.
	FileUniqueID string `json:"file_unique_id"`
	// Video width and height (diameter of the video message) as defined by sender.
	Length int `json:"length"`
	// Duration of the video in seconds as defined by sender.
	Duration  int          `json:"duration"`
	Thumbnail OptPhotoSize `json:"thumbnail"`
	// _Optional_. File size in bytes.
	FileSize OptInt `json:"file_size"`
}

This object represents a [video message](https://telegram.org/blog/video-messages-and-telescope) (available in Telegram apps as of [v.4.0](https://telegram.org/blog/video-messages-and-telescope)). Ref: #/components/schemas/VideoNote

func (*VideoNote) Decode

func (s *VideoNote) Decode(d *jx.Decoder) error

Decode decodes VideoNote from json.

func (*VideoNote) Encode

func (s *VideoNote) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*VideoNote) GetDuration

func (s *VideoNote) GetDuration() int

GetDuration returns the value of Duration.

func (*VideoNote) GetFileID

func (s *VideoNote) GetFileID() string

GetFileID returns the value of FileID.

func (*VideoNote) GetFileSize

func (s *VideoNote) GetFileSize() OptInt

GetFileSize returns the value of FileSize.

func (*VideoNote) GetFileUniqueID

func (s *VideoNote) GetFileUniqueID() string

GetFileUniqueID returns the value of FileUniqueID.

func (*VideoNote) GetLength

func (s *VideoNote) GetLength() int

GetLength returns the value of Length.

func (*VideoNote) GetThumbnail

func (s *VideoNote) GetThumbnail() OptPhotoSize

GetThumbnail returns the value of Thumbnail.

func (*VideoNote) MarshalJSON

func (s *VideoNote) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*VideoNote) SetDuration

func (s *VideoNote) SetDuration(val int)

SetDuration sets the value of Duration.

func (*VideoNote) SetFileID

func (s *VideoNote) SetFileID(val string)

SetFileID sets the value of FileID.

func (*VideoNote) SetFileSize

func (s *VideoNote) SetFileSize(val OptInt)

SetFileSize sets the value of FileSize.

func (*VideoNote) SetFileUniqueID

func (s *VideoNote) SetFileUniqueID(val string)

SetFileUniqueID sets the value of FileUniqueID.

func (*VideoNote) SetLength

func (s *VideoNote) SetLength(val int)

SetLength sets the value of Length.

func (*VideoNote) SetThumbnail

func (s *VideoNote) SetThumbnail(val OptPhotoSize)

SetThumbnail sets the value of Thumbnail.

func (*VideoNote) UnmarshalJSON

func (s *VideoNote) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*VideoNote) Validate

func (s *VideoNote) Validate() error

type Voice

type Voice struct {
	// Identifier for this file, which can be used to download or reuse the file.
	FileID string `json:"file_id"`
	// Unique identifier for this file, which is supposed to be the same over time and for different bots.
	//  Can't be used to download or reuse the file.
	FileUniqueID string `json:"file_unique_id"`
	// Duration of the audio in seconds as defined by sender.
	Duration int `json:"duration"`
	// _Optional_. MIME type of the file as defined by sender.
	MimeType OptString `json:"mime_type"`
	// _Optional_. File size in bytes. It can be bigger than 2^31 and some programming languages may have
	// difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed
	// 64-bit integer or double-precision float type are safe for storing this value.
	FileSize OptInt `json:"file_size"`
}

This object represents a voice note. Ref: #/components/schemas/Voice

func (*Voice) Decode

func (s *Voice) Decode(d *jx.Decoder) error

Decode decodes Voice from json.

func (*Voice) Encode

func (s *Voice) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Voice) GetDuration

func (s *Voice) GetDuration() int

GetDuration returns the value of Duration.

func (*Voice) GetFileID

func (s *Voice) GetFileID() string

GetFileID returns the value of FileID.

func (*Voice) GetFileSize

func (s *Voice) GetFileSize() OptInt

GetFileSize returns the value of FileSize.

func (*Voice) GetFileUniqueID

func (s *Voice) GetFileUniqueID() string

GetFileUniqueID returns the value of FileUniqueID.

func (*Voice) GetMimeType

func (s *Voice) GetMimeType() OptString

GetMimeType returns the value of MimeType.

func (*Voice) MarshalJSON

func (s *Voice) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Voice) SetDuration

func (s *Voice) SetDuration(val int)

SetDuration sets the value of Duration.

func (*Voice) SetFileID

func (s *Voice) SetFileID(val string)

SetFileID sets the value of FileID.

func (*Voice) SetFileSize

func (s *Voice) SetFileSize(val OptInt)

SetFileSize sets the value of FileSize.

func (*Voice) SetFileUniqueID

func (s *Voice) SetFileUniqueID(val string)

SetFileUniqueID sets the value of FileUniqueID.

func (*Voice) SetMimeType

func (s *Voice) SetMimeType(val OptString)

SetMimeType sets the value of MimeType.

func (*Voice) UnmarshalJSON

func (s *Voice) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Voice) Validate

func (s *Voice) Validate() error

type WebAppData

type WebAppData struct {
	// The data. Be aware that a bad client can send arbitrary data in this field.
	Data string `json:"data"`
	// Text of the _web_app_ keyboard button from which the Web App was opened. Be aware that a bad
	// client can send arbitrary data in this field.
	ButtonText string `json:"button_text"`
}

Describes data sent from a [Web App](https://core.telegram.org/bots/webapps) to the bot. Ref: #/components/schemas/WebAppData

func (*WebAppData) Decode

func (s *WebAppData) Decode(d *jx.Decoder) error

Decode decodes WebAppData from json.

func (*WebAppData) Encode

func (s *WebAppData) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*WebAppData) GetButtonText

func (s *WebAppData) GetButtonText() string

GetButtonText returns the value of ButtonText.

func (*WebAppData) GetData

func (s *WebAppData) GetData() string

GetData returns the value of Data.

func (*WebAppData) MarshalJSON

func (s *WebAppData) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*WebAppData) SetButtonText

func (s *WebAppData) SetButtonText(val string)

SetButtonText sets the value of ButtonText.

func (*WebAppData) SetData

func (s *WebAppData) SetData(val string)

SetData sets the value of Data.

func (*WebAppData) UnmarshalJSON

func (s *WebAppData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type WebAppInfo

type WebAppInfo struct {
	// An HTTPS URL of a Web App to be opened with additional data as specified in [Initializing Web
	// Apps](https://core.telegram.org/bots/webapps#initializing-web-apps).
	URL string `json:"url"`
}

Describes a [Web App](https://core.telegram.org/bots/webapps). Ref: #/components/schemas/WebAppInfo

func (*WebAppInfo) Decode

func (s *WebAppInfo) Decode(d *jx.Decoder) error

Decode decodes WebAppInfo from json.

func (*WebAppInfo) Encode

func (s *WebAppInfo) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*WebAppInfo) GetURL

func (s *WebAppInfo) GetURL() string

GetURL returns the value of URL.

func (*WebAppInfo) MarshalJSON

func (s *WebAppInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*WebAppInfo) SetURL

func (s *WebAppInfo) SetURL(val string)

SetURL sets the value of URL.

func (*WebAppInfo) UnmarshalJSON

func (s *WebAppInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type WebhookInfo

type WebhookInfo struct {
	// Webhook URL, may be empty if webhook is not set up.
	URL string `json:"url"`
	// _True_, if a custom certificate was provided for webhook certificate checks.
	HasCustomCertificate bool `json:"has_custom_certificate"`
	// Number of updates awaiting delivery.
	PendingUpdateCount int `json:"pending_update_count"`
	// _Optional_. Currently used webhook IP address.
	IPAddress OptString `json:"ip_address"`
	// _Optional_. Unix time for the most recent error that happened when trying to deliver an update via
	// webhook.
	LastErrorDate OptInt `json:"last_error_date"`
	// _Optional_. Error message in human-readable format for the most recent error that happened when
	// trying to deliver an update via webhook.
	LastErrorMessage OptString `json:"last_error_message"`
	// _Optional_. Unix time of the most recent error that happened when trying to synchronize available
	// updates with Telegram datacenters.
	LastSynchronizationErrorDate OptInt `json:"last_synchronization_error_date"`
	// _Optional_. The maximum allowed number of simultaneous HTTPS connections to the webhook for update
	// delivery.
	MaxConnections OptInt `json:"max_connections"`
	// _Optional_. A list of update types the bot is subscribed to. Defaults to all update types except
	// _chat_member_.
	AllowedUpdates []string `json:"allowed_updates"`
}

Describes the current status of a webhook. Ref: #/components/schemas/WebhookInfo

func (*WebhookInfo) Decode

func (s *WebhookInfo) Decode(d *jx.Decoder) error

Decode decodes WebhookInfo from json.

func (*WebhookInfo) Encode

func (s *WebhookInfo) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*WebhookInfo) GetAllowedUpdates

func (s *WebhookInfo) GetAllowedUpdates() []string

GetAllowedUpdates returns the value of AllowedUpdates.

func (*WebhookInfo) GetHasCustomCertificate

func (s *WebhookInfo) GetHasCustomCertificate() bool

GetHasCustomCertificate returns the value of HasCustomCertificate.

func (*WebhookInfo) GetIPAddress

func (s *WebhookInfo) GetIPAddress() OptString

GetIPAddress returns the value of IPAddress.

func (*WebhookInfo) GetLastErrorDate

func (s *WebhookInfo) GetLastErrorDate() OptInt

GetLastErrorDate returns the value of LastErrorDate.

func (*WebhookInfo) GetLastErrorMessage

func (s *WebhookInfo) GetLastErrorMessage() OptString

GetLastErrorMessage returns the value of LastErrorMessage.

func (*WebhookInfo) GetLastSynchronizationErrorDate

func (s *WebhookInfo) GetLastSynchronizationErrorDate() OptInt

GetLastSynchronizationErrorDate returns the value of LastSynchronizationErrorDate.

func (*WebhookInfo) GetMaxConnections

func (s *WebhookInfo) GetMaxConnections() OptInt

GetMaxConnections returns the value of MaxConnections.

func (*WebhookInfo) GetPendingUpdateCount

func (s *WebhookInfo) GetPendingUpdateCount() int

GetPendingUpdateCount returns the value of PendingUpdateCount.

func (*WebhookInfo) GetURL

func (s *WebhookInfo) GetURL() string

GetURL returns the value of URL.

func (*WebhookInfo) MarshalJSON

func (s *WebhookInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*WebhookInfo) SetAllowedUpdates

func (s *WebhookInfo) SetAllowedUpdates(val []string)

SetAllowedUpdates sets the value of AllowedUpdates.

func (*WebhookInfo) SetHasCustomCertificate

func (s *WebhookInfo) SetHasCustomCertificate(val bool)

SetHasCustomCertificate sets the value of HasCustomCertificate.

func (*WebhookInfo) SetIPAddress

func (s *WebhookInfo) SetIPAddress(val OptString)

SetIPAddress sets the value of IPAddress.

func (*WebhookInfo) SetLastErrorDate

func (s *WebhookInfo) SetLastErrorDate(val OptInt)

SetLastErrorDate sets the value of LastErrorDate.

func (*WebhookInfo) SetLastErrorMessage

func (s *WebhookInfo) SetLastErrorMessage(val OptString)

SetLastErrorMessage sets the value of LastErrorMessage.

func (*WebhookInfo) SetLastSynchronizationErrorDate

func (s *WebhookInfo) SetLastSynchronizationErrorDate(val OptInt)

SetLastSynchronizationErrorDate sets the value of LastSynchronizationErrorDate.

func (*WebhookInfo) SetMaxConnections

func (s *WebhookInfo) SetMaxConnections(val OptInt)

SetMaxConnections sets the value of MaxConnections.

func (*WebhookInfo) SetPendingUpdateCount

func (s *WebhookInfo) SetPendingUpdateCount(val int)

SetPendingUpdateCount sets the value of PendingUpdateCount.

func (*WebhookInfo) SetURL

func (s *WebhookInfo) SetURL(val string)

SetURL sets the value of URL.

func (*WebhookInfo) UnmarshalJSON

func (s *WebhookInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type WriteAccessAllowed

type WriteAccessAllowed struct {
	// _Optional_. Name of the Web App which was launched from a link.
	WebAppName OptString `json:"web_app_name"`
}

This object represents a service message about a user allowing a bot to write messages after adding the bot to the attachment menu or launching a Web App from a link. Ref: #/components/schemas/WriteAccessAllowed

func (*WriteAccessAllowed) Decode

func (s *WriteAccessAllowed) Decode(d *jx.Decoder) error

Decode decodes WriteAccessAllowed from json.

func (*WriteAccessAllowed) Encode

func (s *WriteAccessAllowed) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*WriteAccessAllowed) GetWebAppName

func (s *WriteAccessAllowed) GetWebAppName() OptString

GetWebAppName returns the value of WebAppName.

func (*WriteAccessAllowed) MarshalJSON

func (s *WriteAccessAllowed) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*WriteAccessAllowed) SetWebAppName

func (s *WriteAccessAllowed) SetWebAppName(val OptString)

SetWebAppName sets the value of WebAppName.

func (*WriteAccessAllowed) UnmarshalJSON

func (s *WriteAccessAllowed) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL